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

178 lines 7.7 kB
import type { RequiredChatbotConfig, ThemeConfig, QuickReply } from '../types/internal.types'; export declare const DEFAULT_CONFIG: RequiredChatbotConfig; export declare const ELEMENT_NAME = "infomate-chatbot"; export declare const VERSION = "1.0.5"; export declare const CSS_CLASSES: { readonly trigger: "chatbot-trigger"; readonly window: "chatbot-window"; readonly windowActive: "chatbot-window-active"; readonly header: "header"; readonly messages: "messages"; readonly message: "message"; readonly messageBot: "message-bot"; readonly messageUser: "message-user"; readonly messageError: "message-error"; readonly typing: "typing-message"; readonly typingIndicator: "typing-indicator"; readonly quickReplies: "quick-replies"; readonly quickReply: "quick-reply"; readonly inputArea: "input-area"; readonly messageInput: "message-input"; readonly sendButton: "send-button"; readonly closeButton: "close-button"; readonly botAvatar: "bot-avatar"; readonly msgAvatar: "msg-avatar"; readonly msgContent: "msg-content"; readonly botInfo: "bot-info"; readonly botName: "bot-name"; readonly botStatus: "bot-status"; readonly maximizeButton: "maximize-button"; readonly windowMaximized: "chatbot-window-maximized"; readonly quickReplyAction: "quick-reply-action"; readonly quickReplyDisabled: "quick-reply-disabled"; readonly inputCollector: "input-collector"; readonly inputCollectorField: "input-collector-field"; readonly inputCollectorButtons: "input-collector-buttons"; readonly inputCollectorSubmit: "input-collector-submit"; readonly inputCollectorCancel: "input-collector-cancel"; readonly inputCollectorError: "input-collector-error"; readonly actionLoader: "action-loader"; readonly messageLoading: "message-loading"; readonly messageProcessing: "message-processing"; readonly inputDisabled: "input-disabled"; readonly actionFeedback: "action-feedback"; readonly poweredBy: "powered-by"; }; export declare const ELEMENT_IDS: { readonly typingIndicator: "typingIndicator"; readonly messagesContainer: "messagesContainer"; }; export declare const ALLOWED_ATTRIBUTES: { readonly apiBaseUrl: "api-base-url"; readonly apibaseurl: "apibaseurl"; readonly apiBaseUrlCamel: "apiBaseUrl"; readonly apiKey: "api-key"; readonly apikey: "apikey"; readonly apiKeyCamel: "apiKey"; }; export declare const EVENTS: { readonly opened: "chatbot:opened"; readonly closed: "chatbot:closed"; readonly message: "chatbot:message"; readonly error: "chatbot:error"; readonly typingStart: "chatbot:typing-start"; readonly typingEnd: "chatbot:typing-end"; readonly actionExecuted: "chatbot:action-executed"; readonly actionSuccess: "chatbot:action-success"; readonly actionFailure: "chatbot:action-failure"; readonly actionTimeout: "chatbot:action-timeout"; readonly inputRequested: "chatbot:input-requested"; readonly inputSubmitted: "chatbot:input-submitted"; readonly inputCancelled: "chatbot:input-cancelled"; }; export declare const API_ENDPOINTS: { readonly chatInit: "/chat/start"; readonly sendMessage: "/chat/send"; }; export declare const LIGHT_THEME: ThemeConfig; export declare const DARK_THEME: ThemeConfig; export declare const SIZE_CONFIG: { readonly small: { readonly width: 320; readonly height: 450; }; readonly medium: { readonly width: 380; readonly height: 520; }; readonly large: { readonly width: 450; readonly height: 600; }; readonly xl: { readonly width: 520; readonly height: 680; }; }; export declare const ANIMATIONS: { readonly windowToggle: 300; readonly messageSlide: 300; readonly typingDelay: 1500; readonly focusDelay: 300; readonly welcomeDelay: 1000; readonly autoOpenDelay: 1000; }; export declare const Z_INDEX: { readonly chatbot: 999999; readonly overlay: 999998; }; export declare const DEFAULT_QUICK_REPLIES: QuickReply[]; export declare const ERROR_MESSAGES: { readonly INITIALIZATION_FAILED: "Failed to initialize chatbot"; readonly API_REQUEST_FAILED: "Failed to send message"; readonly TENANT_CONFIG_FAILED: "Failed to load tenant configuration"; readonly MESSAGE_SEND_FAILED: "Failed to send message"; readonly INVALID_CONFIGURATION: "Invalid chatbot configuration"; readonly MISSING_TENANT_ID: "Tenant ID is required"; readonly NETWORK_ERROR: "Network error occurred"; readonly UNKNOWN_ERROR: "An unknown error occurred"; }; export declare const MOCK_RESPONSES: { readonly greeting: readonly ["Hello! Great to meet you! How can I assist you today?", "Hi there! I'm here to help. What can I do for you?", "Hey! Nice to chat with you. What would you like to know?"]; readonly help: readonly ["I'm here to help! I can answer questions, provide information, and assist with various tasks. What specific help do you need?", "Happy to help! Feel free to ask me anything - I'm designed to be as helpful as possible!"]; readonly services: readonly ["We offer a comprehensive range of services including customer support, technical assistance, product information, and general inquiries. What specific service interests you?"]; readonly contact: readonly ["You can reach our support team at support@infomate.com or call 1-800-INFOMATE. We're available 24/7!"]; readonly default: readonly ["That's a great question! I'm working on providing you with the best answer possible. Is there anything specific you'd like to know more about?", "Thanks for asking! I understand what you're looking for. Let me help you with that right away!", "Interesting point! I'm here to provide you with accurate and helpful information. How else can I assist you?"]; }; export declare const MESSAGE_PATTERNS: { readonly greeting: RegExp; readonly help: RegExp; readonly services: RegExp; readonly contact: RegExp; }; export declare const ARIA_LABELS: { readonly trigger: "Open chat"; readonly close: "Close chat"; readonly send: "Send message"; readonly input: "Type your message"; readonly messages: "Chat messages"; readonly quickReply: "Quick reply option"; readonly maximize: "Maximize chat window"; readonly minimize: "Minimize chat window"; readonly inputCollector: "Input collector"; readonly inputField: "Enter required information"; readonly submitInput: "Submit input"; readonly cancelInput: "Cancel input"; readonly actionButton: "Action button"; readonly actionLoader: "Processing action"; }; export declare const INPUT_PATTERNS: { readonly email: RegExp; readonly phone: RegExp; readonly number: RegExp; readonly text: RegExp; readonly policyId: RegExp; readonly zipCode: RegExp; }; export declare const VALIDATION_MESSAGES: { readonly required: "This field is required"; readonly email: "Please enter a valid email address"; readonly phone: "Please enter a valid phone number"; readonly number: "Please enter a valid number"; readonly minLength: "Input is too short"; readonly maxLength: "Input is too long"; readonly pattern: "Input format is invalid"; }; export declare const ACTION_CONFIG: { readonly maxRetries: 0; readonly defaultTimeout: 5000; readonly minTimeout: 1000; readonly maxTimeout: 30000; readonly loadingDelay: 500; }; export declare const TEMPLATE_PATTERNS: { readonly variable: RegExp; readonly conditionalBlock: RegExp; readonly arrayLoop: RegExp; }; //# sourceMappingURL=defaults.d.ts.map