import { EventEmitter } from '../stencil-public-runtime'; import { Message } from '@rasahq/chat-widget-sdk'; export declare class RasaChatbotWidget { private client; private messageDelayQueue; private disconnectTimeout; private sentMessage; el: HTMLRasaChatbotWidgetElement; isOpen: boolean; isFullScreen: boolean; messageHistory: Message[]; messages: Message[]; typingIndicator: boolean; cachedMessages: Element[]; isConnected: boolean; showFeedback: boolean; feedbackSubmitted: boolean; /** * Emitted when the Chat Widget is opened by the user */ chatSessionStarted: EventEmitter<{ sessionId: string; }>; /** * Emitted when the user receives a message */ chatWidgetReceivedMessage: EventEmitter; /** * Emitted when the user sends a message */ chatWidgetSentMessage: EventEmitter; /** * Emitted when the user click on quick reply */ chatWidgetQuickReply: EventEmitter; /** * Emitted when the Chat Widget is opened by the user */ chatWidgetOpened: EventEmitter; /** * Emitted when the Chat Widget is closed by the user */ chatWidgetClosed: EventEmitter; /** * Emitted when a user clicks on a hyperlink option. */ chatWidgetHyperlinkClicked: EventEmitter; /** * Emitted when a user is starting to download a file. */ chatWidgetFileStartedDownload: EventEmitter; /** * Emitted when conversation feedback is submitted. */ chatWidgetFeedbackSubmitted: EventEmitter<{ rating: 'positive' | 'negative'; helpful: boolean; }>; /** * Url of the Rasa chatbot backend server (example: https://example.com) */ serverUrl: string; /** * User authentication token */ authenticationToken: string; /** * Title of the Chat Widget */ widgetTitle: string; /** * Static icon for the chatbot */ botIcon: string; /** * Static icon for the widget */ widgetIcon: string; /** * Indicates if a message timestamp should be displayed */ displayTimestamp: boolean; /** * Format of the message timestamp */ messageTimestamp: string; /** * Data that should be sent on Chat Widget initialization */ initialPayload: string; /** * ID of a user engaged with the Chat Widget */ senderId: string; /** * Indicates time between message is received and printed. * */ messageDelay: number; /** * If set to True, bot messages will be received as stream (printing word by word). * */ streamMessages: boolean; /** * If set to True, it will open the chat, triggering the 'initialPayload' immediately if set. * */ autoOpen: boolean; /** * Message that should be displayed if an error occurs */ errorMessage: string; /** * Indicates whether the chat messenger can be toggled to full screen mode. * */ toggleFullScreen: boolean; /** * Message placeholder for input */ inputMessagePlaceholder: string; /** * If set to True, instead of the default WebSocket communication, the widget will use the HTTP protocol. * */ restEnabled: boolean; /** * If set to True, shows conversation feedback component at the bottom of the chat. * */ enableFeedback: boolean; /** * Text for the feedback question. If empty, feedback component will not be shown. * */ feedbackQuestionText: string; /** * Text for the thank you message after feedback submission. If empty, no thank you message will be shown. * */ feedbackThankYouText: string; /** * Text to display before the session start date in session divider * */ sessionStartedText: string; /** * Font family to use for the widget. Defaults to 'Lato, sans-serif' * */ fontFamily: string; componentWillLoad(): void; private scrollToBottom; private sessionConfirm; private onNewMessage; private loadHistory; private connect; private disconnect; private emitChatWidgetOpenCloseEvents; private toggleOpenState; connectedCallback(): void; private sendMessageHandler; private quickReplySelected; private linkClickedHanlder; private handleFeedbackSubmitted; private showConversationFeedback; private getAltText; private toggleFullscreenMode; onMessagesChange(): void; private renderMessage; render(): any; }