import { IARHDirectAPIResponse } from '@ifd-ui/ask-redhat-core'; export interface IActionType { type: string; payload?: any; } export interface IAIResponseState { aiResponse: IARHDirectAPIResponse | null; error: string | null; lastUpdated: Date | null; streamingChunk?: string; accumulatedResponse?: string; isStreaming?: boolean; submittedFeedbackTypes: string[]; isRateLimited?: boolean; quotaLimit?: number; hasChunkReceived?: boolean; } export declare const initialAIResponseState: IAIResponseState; export declare enum ARHConversationErrorType { AI_RESPONSE_ERROR = "error_in_arh_ai_response", FUNCTIONAL_COOKIE_NOT_ACCEPTED = "functional_cookie_not_accepted", ARH_LIMIT_EXCEEDED = "arh_limit_exceeded" } export declare enum AIResponseConstants { clearAIResponse = "clearAIResponse", streamingStarted = "streamingStarted", streamingChunkReceived = "streamingChunkReceived", streamingCompleted = "streamingCompleted", streamingError = "streamingError", addSubmittedFeedbackType = "addSubmittedFeedbackType", clearSubmittedFeedbackTypes = "clearSubmittedFeedbackTypes", updateQuotaLimit = "updateQuotaLimit", updateConversationId = "updateConversationId", setHasChunkReceived = "setHasChunkReceived" } export interface IClearAIResponseAction extends IActionType { type: AIResponseConstants.clearAIResponse; } export interface IStreamingStartedAction extends IActionType { type: AIResponseConstants.streamingStarted; } export interface IStreamingChunkReceivedAction extends IActionType { type: AIResponseConstants.streamingChunkReceived; payload: { chunk: string; accumulatedResponse: string; }; } export interface IStreamingCompletedAction extends IActionType { type: AIResponseConstants.streamingCompleted; payload: { finalResponse: IARHDirectAPIResponse; }; } export interface IStreamingErrorAction extends IActionType { type: AIResponseConstants.streamingError; payload: { isRateLimited: boolean; error: string; }; } export interface IAddSubmittedFeedbackTypeAction extends IActionType { type: AIResponseConstants.addSubmittedFeedbackType; payload: { feedbackType: string; }; } export interface IClearSubmittedFeedbackTypesAction extends IActionType { type: AIResponseConstants.clearSubmittedFeedbackTypes; } export interface IUpdateQuotaLimitAction extends IActionType { type: AIResponseConstants.updateQuotaLimit; payload: { quotaLimit: number; }; } export interface IUpdateConversationIdAction extends IActionType { type: AIResponseConstants.updateConversationId; payload: { conversationId: string; }; } export interface ISetHasChunkReceivedAction extends IActionType { type: AIResponseConstants.setHasChunkReceived; payload: { hasChunkReceived: boolean; }; } export type IAIResponseActionType = IClearAIResponseAction | IStreamingStartedAction | IStreamingChunkReceivedAction | IStreamingCompletedAction | IStreamingErrorAction | IAddSubmittedFeedbackTypeAction | IClearSubmittedFeedbackTypesAction | IUpdateQuotaLimitAction | IUpdateConversationIdAction | ISetHasChunkReceivedAction; //# sourceMappingURL=AIResponseConstNTypes.d.ts.map