UNPKG

@gameon/web

Version:
107 lines 3.4 kB
import '@gameon/on-ui-components/chat/widget'; import '@gameon/on-ui-components/chat/window'; import '@gameon/on-ui-components/chat/notification'; import { LitElement, nothing, PropertyValues } from 'lit'; import '@lottiefiles/lottie-player'; import '../notifications/notifications'; import '@gameon/on-ui-components/base/button'; export interface ClientSendMessageDetail { message: string; } export declare enum Environment { PRODUCTION = "PRODUCTION", STAGING = "STAGING", LOCAL = "LOCAL" } export declare enum DisplayMode { FULL_SCREEN = "FULL_SCREEN", SURFACE = "SURFACE", WIDGET = "WIDGET", WIDGET_WITHOUT_BUTTON = "WIDGET_WITHOUT_BUTTON" } export declare enum OnSearchParams { INITIAL_PROMPT = "on_initial_prompt", SHOULD_AUTO_OPEN = "on_should_auto_open", SHOULD_AUTO_OPEN_MOBILE = "on_should_auto_open_mobile" } export declare enum WidgetVisibility { HIDDEN = "hidden", VISIBLE = "visible" } export declare class OnChatBotClient extends LitElement { static styles: import("lit").CSSResult; private onChatWindowEl?; private onChatWidgetEl?; chatCloseImageUrl?: string; chatOpenImageUrl?: string; clientId: string; debug: boolean; messageHistoryLimit: number; displayMode: DisplayMode; env: Environment; initialPrompt?: string; isSurfaceChatOpen: boolean; persistMessagesAcrossSessions: boolean; shouldAutoOpen: boolean; shouldAutoOpenMobile: boolean; private botAvatarUrl?; private botId?; private botName?; private customStyles; private initialMessage?; private messages; private speakers; private startingContent?; private surfaceChatInputValue; private userId; private usersTyping; private webChannelParticipants; private webChannelUserId?; private widgetVisibility?; private lastSeenMessageProvider; private onChatCardContextProvider; private onChatCarouselContextProvider; private onChatInputContextProvider; private onChatMessageContextProvider; private get webChannelApiBaseUrl(); private get firebaseConfig(); open(): void; close(): void; toggle(): void; private getConversationId; private setConversationId; private getWebChannelBotId; protected willUpdate(changedProperties: PropertyValues): void; private getBotMessages; private resetLastSeenMessage; protected firstUpdated(): void; private handleLottieLoad; private configureClient; private updateMessages; private computeCustomStyles; private fetchStoredUserId; private storeUserId; private loadBotConfig; private pushNotifications; private initializeConversation; private initializeFirestoreConversation; private sendMessage; private handleSurfaceChatCloseClick; private handleChatInputSubmit; private hasAutoOpenedThisSession; private connectToFirestore; private renderChatWindow; private renderSurface; private renderChatNotifications; private renderCustomButton; render(): import("lit-html").TemplateResult<1> | typeof nothing | undefined; } declare global { interface HTMLElementTagNameMap { 'on-chat-bot-client': OnChatBotClient; } interface HTMLElementEventMap { 'on-client-send-message': CustomEvent<ClientSendMessageDetail>; } } //# sourceMappingURL=bot-client.d.ts.map