API Docs for: 2.0.20133.2
Show:

File: src\internal\ui\chat\config.ts

/// <reference path="../uiConfig.ts" />

/**
 * @module UI
 * @submodule UI Chat
 * @namespace ui.chat
 */
namespace internal.ui.chat {
    /**
     * Configuration for chat component
     * @class Config
     * @extends ui.UIConfig
     */
    export interface Config extends UIConfig {
        /**
         * An array of modality objects (defined in the {{#crossLinkModule "API Modalities"}}API Modalities{{/crossLinkModule}} module) returned by the Modalities API
         * @property {Array} modalities
         */
        modalities: Array<api.modalities.ModalityObject>;

        /**
         * Url to rejoin a previous chat session
         *@property {string} rejoinUrl
         */
        rejoinUrl: string;

        /**
         * @property {string} surveyType
         */
        surveyType?: string;

        /**
         * Additional context to pass to the chat agent
         * @property {object} context
         */
        context?: any;

        /**
         * Fires when the chat session is established
         * @event onEstablished
         */
        onEstablished?: EventListener;

        /**
         * Fires when chat request is queued
         * @event onQueued
         */
        onQueued?: EventListener;

        /**
         * Fires when chat queue status changes
         * @event onQueueUpdated
         * @param {object} data A data object that is passed through the event
         * @param {Number} data.position Current queue position
         */
        onQueueUpdated?: EventListener;

        /**
         * Fired when chat session is closed
         * @event onClosed
         */
        onClosed?: EventListener;

        /**
         * Fired when a chat message is received
         * @event onMessage
         * @param {object} data A data object that is passed through the event
         * @param {object} data.sender Sender of the message
         * @param {String} data.sender.senderName Sender's name
         */
        onMessage?: EventListener;

         /**
          * Fired when chat is transferred
          * @event onTransferred
          */
         onTransferred?: EventListener;

        /**
         * Fired when chat rejoin url is received
         * @event onRejoinUrl
         * @param {string} data Url to rejoin the chat
         */
        onRejoinUrl?: EventListener;

        /**
         * Fired when a chat message is received
         * @event onAgentDataReady
         * @param {object} data A data object that is passed through the event
         * @param {String} data.AgentId The Id of the Agent
         * @param {String} data.DisplayName The name of the Agent
         * @param {String} data.ImageUrl A relative url to an image of the Agent
         */
        onAgentDataReady?: EventListener;
    }
}