UNPKG

@infomatebot/chatbot-widget

Version:

Build intelligent chatbots using pre-designed conversation flows with quick reply options. Upload documents for AI-powered, context-aware responses and reduce support costs by 80% with guided conversations

70 lines 2.53 kB
import type { ChatbotEvents, ChatbotIntegrationAPI } from '../types/public.types'; import type { RequiredChatbotConfig } from '../types/internal.types'; export declare class ChatbotWidget extends HTMLElement { static readonly VERSION = "1.0.5"; static readonly ELEMENT_NAME = "infomate-chatbot"; private shadow; private config; private state; private apiService; private ui; private styles; private isInitialized; private isDestroyed; private isConfigurationLocked; private inputCollector; private integrationAPI; constructor(); static get observedAttributes(): string[]; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; private handleAttributeChange; connectedCallback(): Promise<void>; disconnectedCallback(): void; private initialize; private continueInitialization; private syncAttributesToConfig; private initializeServices; private createUI; private initializeActionSystem; private setupEventListeners; private createIntegrationAPI; private setupGlobalEventListeners; private handleOutsideClick; private handleKeyDown; private handleVisibilityChange; private loadTenantConfiguration; private setupOfflineMode; private addWelcomeMessage; private handleUserMessage; private handleEnhancedQuickReplyResponse; private handleStandardQuickReply; private dispatchActionEvent; private handleInputCollectorResponse; private proceedToFlow; private getBotResponse; private handleMessageError; private addMessage; private showTypingIndicator; private hideTypingIndicator; private toggle; private open; private close; private updateConfiguration; private injectStyles; private handleError; private destroy; sendMessage(content: string): void; openChat(): void; closeChat(): void; clearConversation(): void; isOpen(): boolean; isReady(): boolean; getConfig(): Readonly<RequiredChatbotConfig>; getIntegrationAPI(): ChatbotIntegrationAPI | null; on<K extends keyof ChatbotEvents>(type: K, listener: (event: ChatbotEvents[K]) => void): void; off<K extends keyof ChatbotEvents>(type: K, listener: (event: ChatbotEvents[K]) => void): void; once<K extends keyof ChatbotEvents>(type: K, listener: (event: ChatbotEvents[K]) => void): void; static getVersion(): string; static define(): void; } //# sourceMappingURL=chatbot-widget.d.ts.map