@thoughtspot/visual-embed-sdk
Version:
ThoughtSpot Embed SDK
43 lines • 1.33 kB
TypeScript
import { ViewConfig } from '../types';
/**
* Configuration for bodyless conversation options.
* @group Embed components
*/
export interface BodylessConversationViewConfig extends ViewConfig {
/**
* The ID of the worksheet to use for the conversation.
*/
worksheetId: string;
}
/**
* Create a conversation embed, which can be integrated inside
* chatbots or other conversational interfaces.
* @example
* ```js
* import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
*
* const conversation = new BodylessConversation({
* worksheetId: 'worksheetId',
* });
*
* const { container, error } = await conversation.sendMessage('show me sales by region');
*
* // append the container to the DOM
* document.body.appendChild(container); // or to any other element
* ```
* @group Embed components
* @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
*/
export declare class BodylessConversation {
private viewConfig;
private conversationService;
constructor(viewConfig: BodylessConversationViewConfig);
sendMessage(userMessage: string): Promise<{
error: any;
container?: undefined;
} | {
container: HTMLDivElement;
error?: undefined;
}>;
}
//# sourceMappingURL=bodyless-conversation.d.ts.map