UNPKG

shiza-developer-chat-embed

Version:

Javascript library to display SHIZA Developer chatbot on your website

89 lines 2.86 kB
import { FileUpload, IAction } from '@/components/Bot'; export type IncomingInput = { question?: string; form?: Record<string, unknown>; uploads?: FileUpload[]; overrideConfig?: Record<string, unknown>; socketIOClientId?: string; chatId?: string; fileName?: string; leadEmail?: string; action?: IAction; humanInput?: Record<string, unknown>; }; type BaseRequest = { apiHost?: string; onRequest?: (request: RequestInit) => Promise<void>; }; export type MessageRequest = BaseRequest & { nexusId?: string; body?: IncomingInput; }; export type FeedbackRatingType = 'THUMBS_UP' | 'THUMBS_DOWN'; export type FeedbackInput = { chatId: string; messageId: string; rating: FeedbackRatingType; content?: string; }; export type CreateFeedbackRequest = BaseRequest & { nexusId?: string; body?: FeedbackInput; }; export type UpdateFeedbackRequest = BaseRequest & { id: string; body?: Partial<FeedbackInput>; }; export type UpsertRequest = BaseRequest & { nexusId: string; apiHost?: string; formData: FormData; }; export type LeadCaptureInput = { chatflowid: string; chatId: string; name?: string; email?: string; phone?: string; }; export type LeadCaptureRequest = BaseRequest & { body: Partial<LeadCaptureInput>; }; export declare const sendFeedbackQuery: ({ nexusId, apiHost, body, onRequest }: CreateFeedbackRequest) => Promise<{ data?: unknown; error?: Error | undefined; }>; export declare const updateFeedbackQuery: ({ id, apiHost, body, onRequest }: UpdateFeedbackRequest) => Promise<{ data?: unknown; error?: Error | undefined; }>; export declare const sendMessageQuery: ({ nexusId, apiHost, body, onRequest }: MessageRequest) => Promise<{ data?: any; error?: Error | undefined; }>; export declare const createAttachmentWithFormData: ({ nexusId, apiHost, formData, onRequest }: UpsertRequest) => Promise<{ data?: unknown; error?: Error | undefined; }>; export declare const upsertVectorStoreWithFormData: ({ nexusId, apiHost, formData, onRequest }: UpsertRequest) => Promise<{ data?: unknown; error?: Error | undefined; }>; export declare const getChatbotConfig: ({ nexusId, apiHost, onRequest }: MessageRequest) => Promise<{ data?: any; error?: Error | undefined; }>; export declare const isStreamAvailableQuery: ({ nexusId, apiHost, onRequest }: MessageRequest) => Promise<{ data?: any; error?: Error | undefined; }>; export declare const sendFileDownloadQuery: ({ apiHost, body, onRequest }: MessageRequest) => Promise<{ data?: any; error?: Error | undefined; }>; export declare const addLeadQuery: ({ apiHost, body, onRequest }: LeadCaptureRequest) => Promise<{ data?: any; error?: Error | undefined; }>; export {}; //# sourceMappingURL=sendMessageQuery.d.ts.map