Interface ChatInstance

The interface represents the API contract with the chat widget and contains all the public methods and properties that can be used with web chat.

interface ChatInstance {
    addNotification: (notification: NotificationMessage) => void;
    agentEndConversation: () => Promise<void>;
    changeView: (newView: ViewState | ViewType) => Promise<void>;
    customPanels: CustomPanels;
    destroy: () => void;
    destroySession: () => Promise<void>;
    doAutoScroll: () => void;
    elements: InstanceElements;
    getIntl: () => IntlShape;
    getLocale: () => string;
    getState: () => PublicWebChatState;
    getWidgetVersion: () => string;
    messaging: ChatInstanceMessaging;
    notifications: ChatInstanceNotifications;
    off: (handlers: TypeAndHandler | TypeAndHandler[]) => EventHandlers;
    on: (handlers: TypeAndHandler | TypeAndHandler[]) => EventHandlers;
    once: (handlers: TypeAndHandler | TypeAndHandler[]) => EventHandlers;
    render: () => Promise<ChatInstance>;
    requestFocus: () => boolean | void;
    restartConversation: () => Promise<void>;
    scrollToMessage: (messageID: string, animate?: boolean) => void;
    send: (
        message: string | MessageRequest<MessageInput>,
        options?: SendOptions,
    ) => Promise<void>;
    serviceDesk: ChatInstanceServiceDeskActions;
    showLauncherGreetingMessage: (
        time: number,
        launcherType?: LauncherType,
    ) => void;
    tours: ChatInstanceTours;
    updateAssistantInputFieldVisibility: (isVisible: boolean) => void;
    updateBotUnreadIndicatorVisibility: (isVisible: boolean) => void;
    updateCSSVariables: (publicVars: Record<string, string>) => void;
    updateCustomMenuOptions: (options: CustomMenuOption[]) => void;
    updateHeaderConfig: (config: ChatHeaderConfig) => void;
    updateHistoryUserDefined: (
        messageID: string,
        data: unknown,
    ) => Promise<void>;
    updateHomeScreenConfig: (homeScreenConfig: HomeScreenConfig) => void;
    updateInputIsDisabled: (isDisabled: boolean) => void;
    updateIsChatLoadingCounter: (direction: string) => void;
    updateIsLoadingCounter: (direction: string) => void;
    updateIsTypingCounter: (direction: IncreaseOrDecrease) => void;
    updateLanguagePack: (
        newPack: {
            agent_agentEndedChat?: string;
            agent_agentEndedChatNoName?: string;
            agent_agentJoinedName?: string;
            agent_agentJoinedNoName?: string;
            agent_agentLeftChat?: string;
            agent_agentLeftChatNoName?: string;
            agent_agentNoNameTitle?: string;
            agent_ariaAgentAvatar?: string;
            agent_ariaGenericAvatar?: string;
            agent_ariaGenericBotAvatar?: string;
            agent_botReturned?: string;
            agent_cardButtonChatEnded?: string;
            agent_cardButtonChatRequested?: string;
            agent_cardButtonConnected?: string;
            agent_cardMessageChatEnded?: string;
            agent_cardMessageConnected?: string;
            agent_chatTitle?: string;
            agent_confirmCancelRequestMessage?: string;
            agent_confirmCancelRequestNo?: string;
            agent_confirmCancelRequestTitle?: string;
            agent_confirmCancelRequestYes?: string;
            agent_confirmEndChat?: string;
            agent_confirmEndChatNo?: string;
            agent_confirmEndChatYes?: string;
            agent_confirmEndSuspendedYes?: string;
            agent_confirmSuspendedEndChatMessage?: string;
            agent_confirmSuspendedEndChatTitle?: string;
            agent_connectButtonCancel?: string;
            agent_connectedButtonEndChat?: string;
            agent_connecting?: string;
            agent_connectingMinutes?: string;
            agent_connectingQueue?: string;
            agent_connectWaiting?: string;
            agent_conversationWasEnded?: string;
            agent_defaultMessageToAgent?: string;
            agent_disconnected?: string;
            agent_endChat?: string;
            agent_inputPlaceholderConnecting?: string;
            agent_inputPlaceholderReconnecting?: string;
            agent_newMessage?: string;
            agent_noName?: string;
            agent_reason_error?: string;
            agent_reconnected?: string;
            agent_sdMissingWarning?: string;
            agent_sharingAcceptButton?: string;
            agent_sharingAccepted?: string;
            agent_sharingCancelled?: string;
            agent_sharingDeclineButton?: string;
            agent_sharingDeclined?: string;
            agent_sharingEnded?: string;
            agent_sharingRequested?: string;
            agent_sharingRequestMessage?: string;
            agent_sharingRequestTitle?: string;
            agent_sharingStopSharingButton?: string;
            agent_startChat?: string;
            agent_suspendedWarning?: string;
            agent_transferring?: string;
            agent_transferringNoName?: string;
            agent_youConnectedWarning?: string;
            agent_youEndedChat?: string;
            ai_slug_description?: string;
            ai_slug_title?: string;
            branding_ariaInformationButton?: string;
            branding_description?: string;
            branding_headline?: string;
            branding_sign_up?: string;
            buttons_cancel?: string;
            buttons_restart?: string;
            buttons_retry?: string;
            carousel_nextNavButton?: string;
            carousel_prevNavButton?: string;
            chainOfThought_explainabilityLabel?: string;
            chainOfThought_inputLabel?: string;
            chainOfThought_outputLabel?: string;
            chainOfThought_statusFailedLabel?: string;
            chainOfThought_statusProcessingLabel?: string;
            chainOfThought_statusSucceededLabel?: string;
            chainOfThought_stepTitle?: string;
            chainOfThought_toolLabel?: string;
            channelTransfer_failed?: string;
            closeAndRestartModal_cancel?: string;
            closeAndRestartModal_confirm?: string;
            closeAndRestartModal_message?: string;
            closeAndRestartModal_title?: string;
            components_overflow_ariaLabel?: string;
            components_swiper_currentLabel?: string;
            conversationalSearch_responseStopped?: string;
            conversationalSearch_streamingIncomplete?: string;
            conversationalSearch_toggleCitations?: string;
            conversationalSearch_viewPDF?: string;
            conversationalSearch_viewSourceDocument?: string;
            datePicker_chooseDate?: string;
            datePicker_confirmDate?: string;
            default_agent_availableMessage?: string;
            default_agent_unavailableMessage?: string;
            disclaimer_accept?: string;
            disclaimer_title?: string;
            documentViewer_ariaRoleLabel?: string;
            documentViewer_clearSearch?: string;
            documentViewer_close?: string;
            documentViewer_currentPage?: string;
            documentViewer_download?: string;
            documentViewer_loadError?: string;
            documentViewer_loadErrorRetry?: string;
            documentViewer_loadErrorTitle?: string;
            documentViewer_nextMatch?: string;
            documentViewer_nextPage?: string;
            documentViewer_pagesLabel?: string;
            documentViewer_previousMatch?: string;
            documentViewer_previousPage?: string;
            documentViewer_search?: string;
            documentViewer_title?: string;
            documentViewer_zoomIn?: string;
            documentViewer_zoomOut?: string;
            documentViewer_zoomReset?: string;
            errors_agentAppSessionExpired?: string;
            errors_ariaMessageFailed?: string;
            errors_ariaMessageRetrying?: string;
            errors_audioSource?: string;
            errors_busy?: string;
            errors_communicating?: string;
            errors_connectingToAgent?: string;
            errors_generalContent?: string;
            errors_iframeSource?: string;
            errors_imageSource?: string;
            errors_noAgentsAvailable?: string;
            errors_noAgentsJoined?: string;
            errors_singleMessage?: string;
            errors_somethingWrong?: string;
            errors_videoSource?: string;
            feedback_cancelLabel?: string;
            feedback_defaultPlaceholder?: string;
            feedback_defaultPrompt?: string;
            feedback_defaultTitle?: string;
            feedback_negativeLabel?: string;
            feedback_positiveLabel?: string;
            feedback_submitLabel?: string;
            fileSharing_agentMessageText?: string;
            fileSharing_ariaAnnounceSuccess?: string;
            fileSharing_fileIcon?: string;
            fileSharing_fileTooLarge?: string;
            fileSharing_removeButtonTitle?: string;
            fileSharing_request?: string;
            fileSharing_statusUploading?: string;
            fileSharing_uploadFailed?: string;
            general_ariaAnnounceClosedInformationOverlay?: string;
            general_ariaAnnounceEscapeOverlay?: string;
            general_ariaAnnounceOpenedInformationOverlay?: string;
            general_ariaCloseInformationOverlay?: string;
            general_returnToAssistant?: string;
            header_ariaBotAvatar?: string;
            header_ariaCloseRestart?: string;
            header_overflowMenu_options?: string;
            header_previewLinkTitle?: string;
            homeScreen_ariaQuickStartListButton?: string;
            homeScreen_ariaQuickStartListClosed?: string;
            homeScreen_ariaQuickStartListOpened?: string;
            homeScreen_overflowMenuHomeScreen?: string;
            homeScreen_returnToAssistant?: string;
            homeScreen_returnToHome?: string;
            icon_ariaUnreadMessages?: string;
            iframe_ariaClickPreviewCard?: string;
            iframe_ariaClosedPanel?: string;
            iframe_ariaClosePanel?: string;
            iframe_ariaImageAltText?: string;
            iframe_ariaOpenedPanel?: string;
            iframe_ariaSourceLoaded?: string;
            input_ariaLabel?: string;
            input_buttonLabel?: string;
            input_completionsTagApp?: string;
            input_completionsTagAssistant?: string;
            input_placeholder?: string;
            input_stopResponse?: string;
            input_uploadButtonLabel?: string;
            launcher_ariaIsExpanded?: string;
            launcher_chatNow?: string;
            launcher_closeButton?: string;
            launcher_desktopGreeting?: string;
            launcher_isClosed?: string;
            launcher_isOpen?: string;
            launcher_isTourClosed?: string;
            launcher_isTourOpen?: string;
            launcher_mobileGreeting?: string;
            message_labelBot?: string;
            message_labelYou?: string;
            messages_agentIsTyping?: string;
            messages_agentSaid?: string;
            messages_botIsLoading?: string;
            messages_botIsTyping?: string;
            messages_botSaid?: string;
            messages_responseStopped?: string;
            messages_scrollHandle?: string;
            messages_scrollHandleDetailed?: string;
            messages_scrollHandleEnd?: string;
            messages_scrollHandleEndDetailed?: string;
            messages_searchResults?: string;
            messages_searchResultsCollapse?: string;
            messages_searchResultsExpand?: string;
            messages_searchResultsLink?: string;
            messages_searchResultsOpenDocument?: string;
            messages_searchResultsOpenDocumentWithLabel?: string;
            messages_youSaid?: string;
            notifications_toastClose?: string;
            options_ariaOptionsDisabled?: string;
            options_select?: string;
            serviceDesk_niceDFO_fileUploadError?: string;
            sessionHistory_expired?: string;
            sessionHistory_expiredNoCopy?: string;
            showMore?: string;
            showMoreResults?: string;
            suggestions_ariaAnnounceButtonShow?: string;
            suggestions_ariaAnnounceListClosed?: string;
            suggestions_ariaAnnounceListCollapsed?: string;
            suggestions_ariaAnnounceListExpanded?: string;
            suggestions_ariaAnnounceListOpen?: string;
            suggestions_ariaButtonToClose?: string;
            suggestions_ariaButtonToOpen?: string;
            suggestions_ariaMessageButtons?: string;
            suggestions_ariaPanelButtonToggle?: string;
            suggestions_connectToAgent?: string;
            suggestions_noSearchResults?: string;
            suggestions_searchBookmarkButtonDescription?: string;
            suggestions_searchBookmarkFooter?: string;
            suggestions_searchBookmarkHeader?: string;
            suggestions_sectionTitleAlternateResponses?: string;
            suggestions_sectionTitleContact?: string;
            suggestions_sectionTitleSearch?: string;
            suggestions_sectionTitleStarters?: string;
            suggestions_title?: string;
            table_filterPlaceholder?: string;
            table_itemsPerPage?: string;
            table_nextPage?: string;
            table_paginationStatus?: string;
            table_paginationSupplementalText?: string;
            table_previousPage?: string;
            tour_ariaChatButton?: string;
            tour_ariaCloseButton?: string;
            tour_ariaMinimizeButton?: string;
            tour_ariaNextButton?: string;
            tour_ariaPreviousButton?: string;
            tour_doneButton?: string;
            tour_errorBody?: string;
            tour_errorFetchingStep?: string;
            tour_errorTitle?: string;
            tour_instructions?: string;
            tour_restartButton?: string;
            tour_resumeButton?: string;
            tour_startButton?: string;
            window_ariaChatRegion?: string;
            window_ariaChatRegionNamespace?: string;
            window_ariaTourRegion?: string;
            window_ariaTourRegionNamespace?: string;
            window_ariaWindowClosed?: string;
            window_ariaWindowLoading?: string;
            window_ariaWindowOpened?: string;
            window_title?: string;
        },
    ) => void;
    updateLauncherGreetingMessage: (
        greetingMessage: string,
        launcherType?: LauncherType,
    ) => void;
    updateLocale: (newLocale: string) => Promise<void>;
    updateMainHeaderAvatar: (config?: ChatHeaderAvatarConfig) => void;
    updateMainHeaderTitle: (title?: string) => void;
    writeableElements: WriteableElements;
}

Hierarchy (View Summary, Expand)

Properties

addNotification: (notification: NotificationMessage) => void

Add a system level notification to the list of system notifications.

agentEndConversation: () => Promise<void>

Ends the conversation with a human agent. This does not request confirmation from the user first. If the user is not connected or connecting to a human agent, this function has no effect. You can determine if the user is connected or connecting by calling ChatInstance.getState. Note that this function returns a Promise that only resolves when the conversation has ended. This includes after the BusEventType.AGENT_PRE_END_CHAT and BusEventType.AGENT_END_CHAT events have been fired and resolved.

changeView: (newView: ViewState | ViewType) => Promise<void>

Fire the view:pre:change and view:change events and change the view of the web chat. If a ViewType is provided then that view will become visible and the rest will be hidden. If a ViewState is provided that includes all of the views then all of the views will be changed accordingly. If a partial ViewState is provided then only the views provided will be changed.

customPanels: CustomPanels

An instance of the custom panel with methods to manipulate the behavior of the custom panels.

destroy: () => void

Destroy the chat widget and return initial content to the DOM.

destroySession: () => Promise<void>

Clears the current state and removes all references to the current session. Does not start a new session unless a new message is subsequently sent.

doAutoScroll: () => void

Initiates a Chat#doAutoScroll on the currently visible chat panel.

The elements of web chat that need to be exposed for customers to manipulate. Unlike writeable elements, these elements have existing content

getIntl: () => IntlShape

Returns an instance of the intl object that is used for generating translated text. Note that the object returned from this function changes each time the locale or language pack is changed.

getLocale: () => string

Returns the current locale in use by the widget. This may not match the locale that was provided in the original public configuration if that value was invalid or if the locale has been changed since then.

Type declaration

    • (): string
    • Returns string

      A string containing the language and possibly a region code. Example values include: 'en' and 'en-us'.

getState: () => PublicWebChatState

Returns state information of the web chat that could be useful.

getWidgetVersion: () => string

Returns the version number of code the widget is running.

Messaging actions for a chat instance.

The state of notifications in the chat.

Removes an event listener that was previously added via on or once.

Type declaration

Adds the given event handler as a listener for events of the given type.

Type declaration

Adds the given event handler as a listener for events of the given type. After the first event is handled, this handler will automatically be removed.

Type declaration

render: () => Promise<ChatInstance>

This function will be called customer code after 'loadWatsonAssistantChat' has been called and after any login or subscription operations have been performed that are required before the user's history can be loaded and the widget rendered. When called, this will load the history and then render the widget.

requestFocus: () => boolean | void

This function can be called when another component wishes this component to gain focus. It is up to the component to decide where focus belongs. This may return true or false to indicate if a suitable focus location was found.

restartConversation: () => Promise<void>

Restarts the conversation with the assistant. This does not make any changes to a conversation with a human agent. This will clear all the current assistant messages from the main bot view and cancel any outstanding messages. This will also clear the current assistant session which will force a new session to start on the next message.

scrollToMessage: (messageID: string, animate?: boolean) => void

Scrolls to the (original) message with the given ID. Since there may be multiple message items in a given message, this will scroll the first message to the top of the message window.

Type declaration

    • (messageID: string, animate?: boolean): void
    • Parameters

      • messageID: string

        The (original) message ID to scroll to.

      • Optionalanimate: boolean

        Whether or not the scroll should be animated. Defaults to true.

      Returns void

send: (
    message: string | MessageRequest<MessageInput>,
    options?: SendOptions,
) => Promise<void>

Sends the given message to the assistant on the remote server. This will result in a "pre:send" and "send" event being fired on the event bus. The returned promise will resolve once a response has received and processed and both the "pre:receive" and "receive" events have fired. It will reject when too many errors have occurred and the system gives up retrying.

Type declaration

Actions that are related to a service desk integration.

showLauncherGreetingMessage: (time: number, launcherType?: LauncherType) => void

Control when the greeting message should appear. The default time is 0s which will cause it to appear immediately. Optionally specify which launcher, desktop or mobile, that the time should be set for.

Methods provided to developers to interact with the tour feature.

updateAssistantInputFieldVisibility: (isVisible: boolean) => void

Allow being able to set the input field to be invisible on assistant facing (not agent) views. Helpful for when you want to force input into a button, etc.

updateBotUnreadIndicatorVisibility: (isVisible: boolean) => void

Updates the visibility of the custom unread indicator that appears on the launcher. This indicator appears as a small empty circle on the launcher. If there are any unread messages from a human agent, this indicator will be shown with a number regardless of the custom setting of this flag.

updateCSSVariables: (publicVars: Record<string, string>) => void

This updates the map that can be used to override the values for CSS variables in the application. Each key of the map is the name of a variable (without the "--cds-chat-" prefix) and the value is whatever the value of the variable should be set at. This function may only be called if publicConfig.ibm.allowPrivateMethods has been set. The values in the provided map will be merged with any variables that may already be defined in the public config which allows this function to update only the specific variables desired.

Type declaration

    • (publicVars: Record<string, string>): void
    • Parameters

      • publicVars: Record<string, string>

        A map of CSS variables. Each key of the map is the name of a variable (without the "--cds-chat-" prefix) and the value is whatever the value of the variable should be set at.

      Returns void

updateCustomMenuOptions: (options: CustomMenuOption[]) => void

Updates the custom menu options.

updateHeaderConfig: (config: ChatHeaderConfig) => void

Updates the configuration that handles rendering custom objects in the chat header.

updateHistoryUserDefined: (messageID: string, data: unknown) => Promise<void>

If the messageID provided is the id of a response then save the data provided within history.user_defined so it can be used to repopulate a message upon reload/page change with session history.

updateHomeScreenConfig: (homeScreenConfig: HomeScreenConfig) => void

Updates the currently active homeScreenConfig. Currently only used in tooling to show live updates when editing web chat configuration.

updateInputIsDisabled: (isDisabled: boolean) => void

Changes the state of web chat to allow or disallow input. This includes the input field as well as inputs like buttons and dropdowns.

updateIsChatLoadingCounter: (direction: string) => void

Either increases or decreases the internal counter that indicates whether the hydration fullscreen loading state is shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will increase or decrease the value. Any other value with log an error.

updateIsLoadingCounter: (direction: string) => void

Either increases or decreases the internal counter that indicates whether the "bot is loading" indicator is shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will increase or decrease the value. Any other value with log an error. Currently, this is the same as the typing indicator.

updateIsTypingCounter: (direction: IncreaseOrDecrease) => void

Either increases or decreases the internal counter that indicates whether the "bot is typing" indicator is shown. If the count is greater than zero, then the indicator is shown. Values of "increase" or "decrease" will increase or decrease the value. Any other value with log an error. Currently, this is the same as the loading indicator.

updateLanguagePack: (
    newPack: {
        agent_agentEndedChat?: string;
        agent_agentEndedChatNoName?: string;
        agent_agentJoinedName?: string;
        agent_agentJoinedNoName?: string;
        agent_agentLeftChat?: string;
        agent_agentLeftChatNoName?: string;
        agent_agentNoNameTitle?: string;
        agent_ariaAgentAvatar?: string;
        agent_ariaGenericAvatar?: string;
        agent_ariaGenericBotAvatar?: string;
        agent_botReturned?: string;
        agent_cardButtonChatEnded?: string;
        agent_cardButtonChatRequested?: string;
        agent_cardButtonConnected?: string;
        agent_cardMessageChatEnded?: string;
        agent_cardMessageConnected?: string;
        agent_chatTitle?: string;
        agent_confirmCancelRequestMessage?: string;
        agent_confirmCancelRequestNo?: string;
        agent_confirmCancelRequestTitle?: string;
        agent_confirmCancelRequestYes?: string;
        agent_confirmEndChat?: string;
        agent_confirmEndChatNo?: string;
        agent_confirmEndChatYes?: string;
        agent_confirmEndSuspendedYes?: string;
        agent_confirmSuspendedEndChatMessage?: string;
        agent_confirmSuspendedEndChatTitle?: string;
        agent_connectButtonCancel?: string;
        agent_connectedButtonEndChat?: string;
        agent_connecting?: string;
        agent_connectingMinutes?: string;
        agent_connectingQueue?: string;
        agent_connectWaiting?: string;
        agent_conversationWasEnded?: string;
        agent_defaultMessageToAgent?: string;
        agent_disconnected?: string;
        agent_endChat?: string;
        agent_inputPlaceholderConnecting?: string;
        agent_inputPlaceholderReconnecting?: string;
        agent_newMessage?: string;
        agent_noName?: string;
        agent_reason_error?: string;
        agent_reconnected?: string;
        agent_sdMissingWarning?: string;
        agent_sharingAcceptButton?: string;
        agent_sharingAccepted?: string;
        agent_sharingCancelled?: string;
        agent_sharingDeclineButton?: string;
        agent_sharingDeclined?: string;
        agent_sharingEnded?: string;
        agent_sharingRequested?: string;
        agent_sharingRequestMessage?: string;
        agent_sharingRequestTitle?: string;
        agent_sharingStopSharingButton?: string;
        agent_startChat?: string;
        agent_suspendedWarning?: string;
        agent_transferring?: string;
        agent_transferringNoName?: string;
        agent_youConnectedWarning?: string;
        agent_youEndedChat?: string;
        ai_slug_description?: string;
        ai_slug_title?: string;
        branding_ariaInformationButton?: string;
        branding_description?: string;
        branding_headline?: string;
        branding_sign_up?: string;
        buttons_cancel?: string;
        buttons_restart?: string;
        buttons_retry?: string;
        carousel_nextNavButton?: string;
        carousel_prevNavButton?: string;
        chainOfThought_explainabilityLabel?: string;
        chainOfThought_inputLabel?: string;
        chainOfThought_outputLabel?: string;
        chainOfThought_statusFailedLabel?: string;
        chainOfThought_statusProcessingLabel?: string;
        chainOfThought_statusSucceededLabel?: string;
        chainOfThought_stepTitle?: string;
        chainOfThought_toolLabel?: string;
        channelTransfer_failed?: string;
        closeAndRestartModal_cancel?: string;
        closeAndRestartModal_confirm?: string;
        closeAndRestartModal_message?: string;
        closeAndRestartModal_title?: string;
        components_overflow_ariaLabel?: string;
        components_swiper_currentLabel?: string;
        conversationalSearch_responseStopped?: string;
        conversationalSearch_streamingIncomplete?: string;
        conversationalSearch_toggleCitations?: string;
        conversationalSearch_viewPDF?: string;
        conversationalSearch_viewSourceDocument?: string;
        datePicker_chooseDate?: string;
        datePicker_confirmDate?: string;
        default_agent_availableMessage?: string;
        default_agent_unavailableMessage?: string;
        disclaimer_accept?: string;
        disclaimer_title?: string;
        documentViewer_ariaRoleLabel?: string;
        documentViewer_clearSearch?: string;
        documentViewer_close?: string;
        documentViewer_currentPage?: string;
        documentViewer_download?: string;
        documentViewer_loadError?: string;
        documentViewer_loadErrorRetry?: string;
        documentViewer_loadErrorTitle?: string;
        documentViewer_nextMatch?: string;
        documentViewer_nextPage?: string;
        documentViewer_pagesLabel?: string;
        documentViewer_previousMatch?: string;
        documentViewer_previousPage?: string;
        documentViewer_search?: string;
        documentViewer_title?: string;
        documentViewer_zoomIn?: string;
        documentViewer_zoomOut?: string;
        documentViewer_zoomReset?: string;
        errors_agentAppSessionExpired?: string;
        errors_ariaMessageFailed?: string;
        errors_ariaMessageRetrying?: string;
        errors_audioSource?: string;
        errors_busy?: string;
        errors_communicating?: string;
        errors_connectingToAgent?: string;
        errors_generalContent?: string;
        errors_iframeSource?: string;
        errors_imageSource?: string;
        errors_noAgentsAvailable?: string;
        errors_noAgentsJoined?: string;
        errors_singleMessage?: string;
        errors_somethingWrong?: string;
        errors_videoSource?: string;
        feedback_cancelLabel?: string;
        feedback_defaultPlaceholder?: string;
        feedback_defaultPrompt?: string;
        feedback_defaultTitle?: string;
        feedback_negativeLabel?: string;
        feedback_positiveLabel?: string;
        feedback_submitLabel?: string;
        fileSharing_agentMessageText?: string;
        fileSharing_ariaAnnounceSuccess?: string;
        fileSharing_fileIcon?: string;
        fileSharing_fileTooLarge?: string;
        fileSharing_removeButtonTitle?: string;
        fileSharing_request?: string;
        fileSharing_statusUploading?: string;
        fileSharing_uploadFailed?: string;
        general_ariaAnnounceClosedInformationOverlay?: string;
        general_ariaAnnounceEscapeOverlay?: string;
        general_ariaAnnounceOpenedInformationOverlay?: string;
        general_ariaCloseInformationOverlay?: string;
        general_returnToAssistant?: string;
        header_ariaBotAvatar?: string;
        header_ariaCloseRestart?: string;
        header_overflowMenu_options?: string;
        header_previewLinkTitle?: string;
        homeScreen_ariaQuickStartListButton?: string;
        homeScreen_ariaQuickStartListClosed?: string;
        homeScreen_ariaQuickStartListOpened?: string;
        homeScreen_overflowMenuHomeScreen?: string;
        homeScreen_returnToAssistant?: string;
        homeScreen_returnToHome?: string;
        icon_ariaUnreadMessages?: string;
        iframe_ariaClickPreviewCard?: string;
        iframe_ariaClosedPanel?: string;
        iframe_ariaClosePanel?: string;
        iframe_ariaImageAltText?: string;
        iframe_ariaOpenedPanel?: string;
        iframe_ariaSourceLoaded?: string;
        input_ariaLabel?: string;
        input_buttonLabel?: string;
        input_completionsTagApp?: string;
        input_completionsTagAssistant?: string;
        input_placeholder?: string;
        input_stopResponse?: string;
        input_uploadButtonLabel?: string;
        launcher_ariaIsExpanded?: string;
        launcher_chatNow?: string;
        launcher_closeButton?: string;
        launcher_desktopGreeting?: string;
        launcher_isClosed?: string;
        launcher_isOpen?: string;
        launcher_isTourClosed?: string;
        launcher_isTourOpen?: string;
        launcher_mobileGreeting?: string;
        message_labelBot?: string;
        message_labelYou?: string;
        messages_agentIsTyping?: string;
        messages_agentSaid?: string;
        messages_botIsLoading?: string;
        messages_botIsTyping?: string;
        messages_botSaid?: string;
        messages_responseStopped?: string;
        messages_scrollHandle?: string;
        messages_scrollHandleDetailed?: string;
        messages_scrollHandleEnd?: string;
        messages_scrollHandleEndDetailed?: string;
        messages_searchResults?: string;
        messages_searchResultsCollapse?: string;
        messages_searchResultsExpand?: string;
        messages_searchResultsLink?: string;
        messages_searchResultsOpenDocument?: string;
        messages_searchResultsOpenDocumentWithLabel?: string;
        messages_youSaid?: string;
        notifications_toastClose?: string;
        options_ariaOptionsDisabled?: string;
        options_select?: string;
        serviceDesk_niceDFO_fileUploadError?: string;
        sessionHistory_expired?: string;
        sessionHistory_expiredNoCopy?: string;
        showMore?: string;
        showMoreResults?: string;
        suggestions_ariaAnnounceButtonShow?: string;
        suggestions_ariaAnnounceListClosed?: string;
        suggestions_ariaAnnounceListCollapsed?: string;
        suggestions_ariaAnnounceListExpanded?: string;
        suggestions_ariaAnnounceListOpen?: string;
        suggestions_ariaButtonToClose?: string;
        suggestions_ariaButtonToOpen?: string;
        suggestions_ariaMessageButtons?: string;
        suggestions_ariaPanelButtonToggle?: string;
        suggestions_connectToAgent?: string;
        suggestions_noSearchResults?: string;
        suggestions_searchBookmarkButtonDescription?: string;
        suggestions_searchBookmarkFooter?: string;
        suggestions_searchBookmarkHeader?: string;
        suggestions_sectionTitleAlternateResponses?: string;
        suggestions_sectionTitleContact?: string;
        suggestions_sectionTitleSearch?: string;
        suggestions_sectionTitleStarters?: string;
        suggestions_title?: string;
        table_filterPlaceholder?: string;
        table_itemsPerPage?: string;
        table_nextPage?: string;
        table_paginationStatus?: string;
        table_paginationSupplementalText?: string;
        table_previousPage?: string;
        tour_ariaChatButton?: string;
        tour_ariaCloseButton?: string;
        tour_ariaMinimizeButton?: string;
        tour_ariaNextButton?: string;
        tour_ariaPreviousButton?: string;
        tour_doneButton?: string;
        tour_errorBody?: string;
        tour_errorFetchingStep?: string;
        tour_errorTitle?: string;
        tour_instructions?: string;
        tour_restartButton?: string;
        tour_resumeButton?: string;
        tour_startButton?: string;
        window_ariaChatRegion?: string;
        window_ariaChatRegionNamespace?: string;
        window_ariaTourRegion?: string;
        window_ariaTourRegionNamespace?: string;
        window_ariaWindowClosed?: string;
        window_ariaWindowLoading?: string;
        window_ariaWindowOpened?: string;
        window_title?: string;
    },
) => void

Updates the current language pack using the values from the provided language pack. This language pack does not need to be complete; only the strings contained in it will be updated. Any strings that are missing will be ignored and the current values will remain unchanged. You can use getLocale to identify the current locale if you need to make an update based on the user's locale.

updateLauncherGreetingMessage: (
    greetingMessage: string,
    launcherType?: LauncherType,
) => void

Set the greeting message text for the launcher. Optionally specify which launcher, desktop or mobile, that the greeting message is being set for.

updateLocale: (newLocale: string) => Promise<void>

Updates the current locale. This will override the default values of the language pack. You can use getLocale to identify the current locale if you need to make an update based on the user's locale.

updateMainHeaderAvatar: (config?: ChatHeaderAvatarConfig) => void

Updates the avatar image of the bot panel.

updateMainHeaderTitle: (title?: string) => void

Updates the title of the bot panel. This value defaults to the bot name with the AI theme turned off and defaults to nothing when the AI theme is turned on.

writeableElements: WriteableElements

Returns elements that Deb can write content to. This object is indirectly exposed to Deb using a proxy returned from createWriteableElementsProxy.

MMNEPVFCICPMFPCPTTAAATR