import { CartState, EVENT_TYPE, LeadingQueries, MESSAGE_ROLE, MessageEvent, UserInfo } from '@debales/shared'; import { DisplayMode, LeadCaptureData, Product, ShopifyStoreMeta, SuggestedQuestionAnswer, UiData, VariantQuantity, Message } from '.'; export interface OnSendMessageOptions { message: string; answer?: string; products?: Product[]; fromKlaviyo?: boolean; leading_queries?: string[]; followUpQuestion?: string; messType?: string; } export interface DebalesContextType { nameSpace: string; messages: Message[]; isLoading: boolean; isMessageLoading: boolean; sessionId: string; isKlaviyoMessage: boolean; showUserInfoModel: boolean; pendingBulkItems: VariantQuantity[]; lastedBotmessageId: string | null; uiData: UiData | null; storeMetaData: ShopifyStoreMeta | null; suggestedQuestions: SuggestedQuestionAnswer[]; isUserInfoNeeded: boolean; userInfo: UserInfo | null; input: string; pendingQuestion: SuggestedQuestionAnswer | null; isFormClosedByUser: boolean; onSendMessage: (options: OnSendMessageOptions) => Promise; submitLeadCapture: (lead: LeadCaptureData) => Promise; setIsKlaviyoMessage: React.Dispatch>; setShowUserInfoModel: React.Dispatch>; setPendingBulkItems: React.Dispatch>; setLastedBotmessageId: React.Dispatch>; fetchUiInfo: () => Promise; setIsLoading: React.Dispatch>; setIsMessageLoading: React.Dispatch>; setMessages: React.Dispatch>; changeDisplayModel: (displayMode: DisplayMode) => void; saveConversation: (messages: Message[]) => void; loadConversation: () => Message[]; setSuggestedQuestions: React.Dispatch>; setInput: React.Dispatch>; setPendingQuestion: React.Dispatch>; setUserInfo: React.Dispatch>; setIsFormClosedByUser: React.Dispatch>; } export interface WebsocketMessageEvent extends MessageEvent { type: typeof EVENT_TYPE.MESSAGE | typeof EVENT_TYPE.USER_ACTION; role: (typeof MESSAGE_ROLE)[keyof typeof MESSAGE_ROLE]; query: string; nameSpace: string; page_path?: string; conversationId?: string; userInfo?: UserInfo; anonymousUserId?: string; distinctId?: string; timeZone?: string; sessionId: string; timestamp?: string; leadingQueries?: LeadingQueries; answer?: string; products?: Product[]; followUpQuestion?: string; messType?: string; cart?: CartState | null; }