File: src\internal\ui\chat\sdk.ts
/// <reference path="../../packages.ts" />
/**
* @module UI
* @submodule UI Chat
* @namespace ui.chat
*/
namespace internal.ui.chat {
/**
* An object resolved by the render() method to interact with the chat component
* @class SDK
*/
export interface SDK extends ComponentSDK {
/**
* Insert a message in the user's chat with an agent
* @method sendMessage
* @param {String} message A message to insert in the chat
* @return {Promise}
* @example
*
* ui.chat.render(config).then(
* function(sdk) {
* // Send a message to agent
* sdk.sendMessage("Test message");
* },
* function() {
* console.log("Unable to render chat");
* });
*/
sendMessage (message: any): JQueryPromise<any>;
/**
* Update the current chat context
* @method updateContext
* @param {object} properties List of properties to update
* @return {Promise}
* @example
*
* ui.chat.render(config).then(
* function(sdk) {
* // Update the current chat context
* sdk.updateContext({ foo: "bar" });
* },
* function() {
* console.log("Unable to render chat");
* });
*/
updateContext(properties: any): JQueryPromise<any>;
}
}