import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit';
import type { AnswerApiQueryParams } from '../../features/generated-answer/generated-answer-request.js';
import type { EventSourceMessage } from '../../utils/fetch-event-source/parse.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 buildAnswerEndpoint: (platformEndpoint: string, organizationId: string, answerConfigurationId: string, insightId?: string) => string;
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<AnswerApiQueryParams, 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", unknown>;
}, "answer", never, typeof import("@reduxjs/toolkit/query").coreModuleName>;
export declare const fetchAnswer: (fetchAnswerParams: AnswerApiQueryParams) => import("redux-thunk").ThunkAction<import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<AnswerApiQueryParams, 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", unknown>>, any, any, UnknownAction>;
export declare const selectAnswer: (state: StreamAnswerAPIState) => ({
    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;
    endpointName: string;
    originalArgs: AnswerApiQueryParams;
    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: AnswerApiQueryParams;
    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;
    endpointName: string;
    fulfilledTimeStamp?: number | undefined;
    originalArgs: AnswerApiQueryParams;
    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;
});
