ChatBotKit Node SDK
    Preparing search index...

    Interface ChatBotKitWidgetElementV2

    The ChatBotKit Widget custom element interface (v2). This interface represents the public API of the chatbotkit-widget custom element.

    interface ChatBotKitWidgetElementV2 {
        contact: Contact;
        functions: Record<string, FunctionDefinition>;
        messages: Message[];
        meta: Meta;
        notifications: Record<string, NotificationDefinition | null>;
        open: boolean;
        ready: boolean;
        readyPromise: Promise<boolean>;
        assignContact(props: Contact): void;
        hide(): void;
        initiateMessage(props: InitiateMessageOptions): void;
        maximize(): void;
        minimize(): void;
        registerFunctions(
            functions: Record<string, FunctionDefinition | null>,
        ): void;
        render(props: RenderOptions): void;
        restartConversation(): void;
        sendMessage(props: SendMessageOptions): void;
        show(): void;
        unregisterFunctions(functions: string[]): void;
    }

    Hierarchy

    Index

    Properties

    contact: Contact

    The contact information

    functions: Record<string, FunctionDefinition>

    The registered engine functions

    messages: Message[]

    The current conversation messages

    meta: Meta

    The session metadata

    notifications: Record<string, NotificationDefinition | null>

    The current notifications

    open: boolean

    Whether the widget is open

    ready: boolean

    Whether the widget is ready for interaction

    readyPromise: Promise<boolean>

    Promise that resolves when the widget is ready

    Methods

    • Assigns contact information (legacy method)

      Parameters

      Returns void

    • Hides the widget

      Returns void

    • Maximizes the widget

      Returns void

    • Minimizes the widget

      Returns void

    • Restarts the conversation

      Returns void

    • Shows the widget

      Returns void

    • Unregisters functions by name

      Parameters

      • functions: string[]

      Returns void