import { StringValue } from '@coveo/bueno';
import type { GeneratedAnswerCitationsPayload, GeneratedAnswerMessagePayload } from '../../api/generated-answer/generated-answer-event-payload.js';
import type { StreamAnswerAPIState } from '../../api/knowledge/stream-answer-api-state.js';
import type { SearchThunkExtraArguments } from '../../app/search-thunk-extra-arguments.js';
import type { AnswerApiQueryParams } from '../../features/generated-answer/generated-answer-request.js';
import type { ConfigurationSection, DebugSection, GeneratedAnswerSection, SearchSection } from '../../state/state-sections.js';
import { type GenerationStepName, type GenerationToolCallArgsGeneric, type GenerationToolCallArgsSearch, type GenerationToolCallType } from './generated-answer-state.js';
import { type GeneratedResponseFormat } from './generated-response-format.js';
type StateNeededByGeneratedAnswerStream = ConfigurationSection & SearchSection & GeneratedAnswerSection & DebugSection;
export declare const citationSchema: {
    id: StringValue<string>;
    title: StringValue<string>;
    uri: StringValue<string>;
    permanentid: StringValue<string>;
    clickUri: StringValue<string>;
};
export declare const answerContentFormatSchema: StringValue<"text/plain" | "text/markdown">;
export interface GeneratedAnswerErrorPayload {
    message?: string;
    code?: number;
}
export declare const setIsVisible: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "generatedAnswer/setIsVisible", never, never>;
export declare const setAnswerId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: string], string, "generatedAnswer/setAnswerId", never, never>;
export declare const setAnswerGenerationMode: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: "automatic" | "manual"], "automatic" | "manual", "generatedAnswer/setAnswerGenerationMode", never, never>;
export declare const setIsEnabled: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "generatedAnswer/setIsEnabled", never, never>;
export declare const updateMessage: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: GeneratedAnswerMessagePayload], GeneratedAnswerMessagePayload, "generatedAnswer/updateMessage", never, never>;
export declare const updateCitations: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: GeneratedAnswerCitationsPayload], GeneratedAnswerCitationsPayload, "generatedAnswer/updateCitations", never, never>;
export declare const updateError: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: GeneratedAnswerErrorPayload], GeneratedAnswerErrorPayload, "generatedAnswer/updateError", never, never>;
export declare const resetAnswer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/resetAnswer">;
export declare const likeGeneratedAnswer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/like">;
export declare const dislikeGeneratedAnswer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/dislike">;
export declare const openGeneratedAnswerFeedbackModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/feedbackModal/open">;
export declare const expandGeneratedAnswer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/expand">;
export declare const collapseGeneratedAnswer: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/collapse">;
export declare const setId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
    id: string;
}], {
    id: string;
}, "generatedAnswer/setId", never, never>;
export declare const closeGeneratedAnswerFeedbackModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/feedbackModal/close">;
export declare const sendGeneratedAnswerFeedback: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"generatedAnswer/sendFeedback">;
export declare const setIsLoading: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "generatedAnswer/setIsLoading", never, never>;
export declare const setIsStreaming: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "generatedAnswer/setIsStreaming", never, never>;
export declare const setAnswerContentFormat: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: "text/plain" | "text/markdown"], "text/plain" | "text/markdown", "generatedAnswer/setAnswerContentFormat", never, never>;
export declare const updateResponseFormat: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: GeneratedResponseFormat], GeneratedResponseFormat, "generatedAnswer/updateResponseFormat", never, never>;
export declare const updateAnswerConfigurationId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: string], string, "knowledge/updateAnswerConfigurationId", never, never>;
export declare const registerFieldsToIncludeInCitations: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: string[]], string[], "generatedAnswer/registerFieldsToIncludeInCitations", never, never>;
export declare const setIsAnswerGenerated: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "generatedAnswer/setIsAnswerGenerated", never, never>;
export declare const setCannotAnswer: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: boolean], boolean, "generatedAnswer/setCannotAnswer", never, never>;
export declare const setAnswerApiQueryParams: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: Partial<AnswerApiQueryParams>], unknown, "generatedAnswer/setAnswerApiQueryParams", never, never>;
export declare const startStep: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
    name: string;
    startedAt: number;
}], Omit<{
    name: string;
    startedAt: number;
}, "name"> & {
    name: GenerationStepName;
}, "generatedAnswer/startStep", never, never>;
export declare const finishStep: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
    name: string;
    finishedAt: number;
}], Omit<{
    name: string;
    finishedAt: number;
}, "name"> & {
    name: GenerationStepName;
}, "generatedAnswer/finishStep", never, never>;
export declare const startToolCall: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
    toolCallName: string;
    startedAt: number;
    toolCallId: string;
}], {
    toolCallName: string;
    startedAt: number;
    toolCallId: string;
}, "generatedAnswer/startToolCall", never, never>;
export declare const finishToolCall: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
    finishedAt: number;
    toolCallId: string;
}], {
    finishedAt: number;
    toolCallId: string;
}, "generatedAnswer/finishToolCall", never, never>;
export declare const toolCallArgs: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[payload: {
    toolCallId: string;
    args: GenerationToolCallArgsSearch | GenerationToolCallArgsGeneric;
    type: GenerationToolCallType;
}], {
    toolCallId: string;
    args: GenerationToolCallArgsSearch | GenerationToolCallArgsGeneric;
    type: GenerationToolCallType;
}, "generatedAnswer/toolCallArgs", never, never>;
interface StreamAnswerArgs {
    setAbortControllerRef: (ref: AbortController) => void;
}
export declare const streamAnswer: import("@reduxjs/toolkit").AsyncThunk<void, StreamAnswerArgs, {
    state: StateNeededByGeneratedAnswerStream;
    extra: import("../../app/thunk-extra-arguments.js").ClientThunkExtraArguments<import("../../api/generated-answer/generated-answer-client.js").GeneratedAnswerAPIClient, import("../../api/generated-answer/generated-answer-client.js").GeneratedAnswerAPIClient>;
    dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("@reduxjs/toolkit").UnknownAction> | undefined;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
/**
 * Thunk to handle the sequence of actions required to generate a new answer
 * after a search request.
 *
 * ⚠️ This action only works when an **answer configuration ID** is present
 * in the engine configuration. In that case, the **Answer API** will be used
 * instead of the regular search pipeline.
 *
 * Flow:
 * 1. Reset the current generated answer state.
 * 2. Construct the Answer API query parameters based on the current state.
 * 3. Fetch a new answer from the Answer API using the provided configuration.
 */
export declare const generateAnswer: import("@reduxjs/toolkit").AsyncThunk<void, void, {
    state: StreamAnswerAPIState;
    extra: SearchThunkExtraArguments;
    dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("@reduxjs/toolkit").UnknownAction> | undefined;
    rejectValue?: unknown;
    serializedErrorType?: unknown;
    pendingMeta?: unknown;
    fulfilledMeta?: unknown;
    rejectedMeta?: unknown;
}>;
export {};
