/** * Types for the chat-widget package */ export type Json = string | number | boolean | null | { [key: string]: Json | undefined; } | Json[]; export type DataResponse = { data: T; }; export interface ChatMessage { conversation_id: string; created_at: string; id: string; organisation_id: string; payload: string; sender_id: string | null; sender_type: string; updated_at: string; } export interface Conversation { created_at: string; description: string | null; handled_manually: boolean; id: string; initiator: string; is_resolved: boolean; last_message_content: string | null; last_message_timestamp: string | null; organisation_id: string; title: string; updated_at: string; } export interface CreateChatParams { message: string; conversation_id?: string; organisation_id: string; } export interface ChatWidgetProps { /** * Your Lumi organisation ID */ organisationId: string; /** * Base URL for API endpoints * If not provided, it will use the current host */ baseUrl?: string; /** * Whether the widget is expanded initially */ initialExpanded?: boolean; /** * Configuration options for the widget appearance */ config?: { /** * Header background color (CSS color value) * @default "#3a49ee" */ headerColor?: string; /** * Maximum height of the widget when expanded (CSS dimension value) * @default "600px" */ maxHeight?: string; /** * Maximum width of the widget when expanded (CSS dimension value) * @default "380px" */ maxWidth?: string; /** * Primary color for buttons and accents (CSS color value) * @default "#3a49ee" */ primaryColor?: string; }; }