UNPKG

contentstack-chat-widget-sdk

Version:

React TypeScript SDK for embedding ContentStack AI-powered chat widgets into websites

58 lines 1.49 kB
export interface ChatMessage { id: string; type: 'user' | 'assistant' | 'status'; content: string; timestamp: Date; isLoading?: boolean; isStatus?: boolean; } export interface ChatWidgetTheme { primaryColor?: string; secondaryColor?: string; backgroundColor?: string; textColor?: string; userMessageColor?: string; assistantMessageColor?: string; borderRadius?: string; fontFamily?: string; } export interface ChatWidgetProps { apiEndpoint?: string; tenantId?: string; apiKey?: string; projectId?: string; provider?: string; model?: string; theme?: ChatWidgetTheme; position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'; chatTitle?: string; placeholder?: string; welcomeMessage?: string; isOpen?: boolean; onToggle?: (isOpen: boolean) => void; onMessage?: (message: ChatMessage) => void; typingSpeed?: number; className?: string; style?: React.CSSProperties; } export interface ChatAPIRequest { query: string; tenantId?: string; apiKey?: string; projectId?: string; provider?: string; model?: string; sessionId?: string; } export interface ChatAPIResponse { response: string; metadata?: { toolsUsed?: string[]; provider?: string; model?: string; timestamp?: string; }; error?: string; } export declare const DEFAULT_THEME: ChatWidgetTheme; //# sourceMappingURL=index.d.ts.map