import { type ThunkDispatch, type UnknownAction } from '@reduxjs/toolkit';
import { type NavigatorContext } from '../../app/navigator-context-provider.js';
import type { EventSourceMessage } from '../../utils/fetch-event-source/parse.js';
import type { SearchRequest } from '../search/search/search-request.js';
import type { GeneratedAnswerStream } from './generated-answer-stream.js';
import type { StreamAnswerAPIState } from './stream-answer-api-state.js';
export declare const updateCacheWithEvent: (event: EventSourceMessage, draft: GeneratedAnswerStream, dispatch: ThunkDispatch<StreamAnswerAPIState, unknown, UnknownAction>) => void;
export declare const answerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, {
    getAnswer: import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer">;
}, "answer", never, typeof import("@reduxjs/toolkit/query").coreModuleName>;
export declare const selectAnswerTriggerParams: ((state: any, ...params: any[]) => {
    q: any;
    requestId: any;
    cannotAnswer: any;
    analyticsMode: any;
    actionCause: any;
}) & {
    clearCache: () => void;
    resultsCount: () => number;
    resetResultsCount: () => void;
} & {
    resultFunc: (...resultFuncArgs: readonly any[]) => {
        q: any;
        requestId: any;
        cannotAnswer: any;
        analyticsMode: any;
        actionCause: any;
    };
    memoizedResultFunc: ((...resultFuncArgs: readonly any[]) => {
        q: any;
        requestId: any;
        cannotAnswer: any;
        analyticsMode: any;
        actionCause: any;
    }) & {
        clearCache: () => void;
        resultsCount: () => number;
        resetResultsCount: () => void;
    };
    lastResult: () => {
        q: any;
        requestId: any;
        cannotAnswer: any;
        analyticsMode: any;
        actionCause: any;
    };
    dependencies: import("reselect").SelectorArray<any>;
    recomputations: () => number;
    resetRecomputations: () => void;
    dependencyRecomputations: () => number;
    resetDependencyRecomputations: () => void;
} & {
    argsMemoize: typeof import("reselect").weakMapMemoize;
    memoize: typeof import("reselect").weakMapMemoize;
};
export declare const constructAnswerQueryParams: (state: StreamAnswerAPIState, usage: "fetch" | "select", navigatorContext: NavigatorContext) => {
    analytics?: {
        actionCause?: string;
        customData?: object;
        clientId: string;
        deviceId?: string;
        pageId?: string;
        clientTimestamp: string;
        documentReferrer: string | null;
        originContext: string;
        userDisplayName?: string;
        documentLocation?: string | null;
        trackingId?: string;
        capture?: boolean;
        source?: string[];
    };
    tab: string;
    numberOfResults?: number | undefined;
    firstResult?: number | undefined;
    queryCorrection?: {
        enabled: boolean;
        options: {
            automaticallyCorrect: "never" | "whenNoResults";
        };
    } | undefined;
    enableDidYouMean?: boolean | undefined;
    fieldsToInclude?: string[] | undefined;
    facets?: (import("../../features/facets/facet-set/interfaces/request.js").FacetRequest | import("../../features/facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../features/facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest | import("../../features/facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest)[] | undefined;
    pipeline?: string | undefined;
    searchHub?: string | undefined;
    pipelineRuleParameters: {
        mlGenerativeQuestionAnswering: {
            responseFormat: import("../../index.js").GeneratedResponseFormat;
            citationsFieldToInclude: string[];
        };
    };
    context?: import("../../ssr.index.js").ContextPayload | undefined;
    enableQuerySyntax?: boolean | undefined;
    lq?: string | undefined;
    dq?: string | undefined;
    cq?: string | undefined;
    aq?: string | undefined;
    q: string | undefined;
};
export declare const fetchAnswer: (state: StreamAnswerAPIState, navigatorContext: NavigatorContext) => import("redux-thunk").ThunkAction<import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer">>, any, any, UnknownAction>;
export declare const selectAnswer: (state: StreamAnswerAPIState, navigatorContext?: NavigatorContext) => ({
    status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
    originalArgs?: undefined | undefined;
    data?: undefined | undefined;
    error?: undefined | undefined;
    requestId?: undefined | undefined;
    endpointName?: string | undefined;
    startedTimeStamp?: undefined | undefined;
    fulfilledTimeStamp?: undefined | undefined;
} & {
    status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
    isUninitialized: true;
    isLoading: false;
    isSuccess: false;
    isError: false;
}) | ({
    status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
    error: undefined;
    requestId: string;
    originalArgs: Partial<SearchRequest>;
    endpointName: string;
    startedTimeStamp: number;
    data: GeneratedAnswerStream;
    fulfilledTimeStamp: number;
} & {
    status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
    isUninitialized: false;
    isLoading: false;
    isSuccess: true;
    isError: false;
}) | ({
    status: import("@reduxjs/toolkit/query").QueryStatus.pending;
    originalArgs: Partial<SearchRequest>;
    requestId: string;
    data?: GeneratedAnswerStream | undefined;
    error?: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError | undefined;
    endpointName: string;
    startedTimeStamp: number;
    fulfilledTimeStamp?: number | undefined;
} & {
    status: import("@reduxjs/toolkit/query").QueryStatus.pending;
    isUninitialized: false;
    isLoading: true;
    isSuccess: false;
    isError: false;
}) | ({
    status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
    requestId: string;
    data?: GeneratedAnswerStream | undefined;
    fulfilledTimeStamp?: number | undefined;
    originalArgs: Partial<SearchRequest>;
    endpointName: string;
    startedTimeStamp: number;
    error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError;
} & {
    status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
    isUninitialized: false;
    isLoading: false;
    isSuccess: false;
    isError: true;
});
