UNPKG

@thoughtspot/visual-embed-sdk

Version:
152 lines 4.59 kB
import { BaseViewConfig } from '../types'; import { TsEmbed } from './ts-embed'; /** * Configuration for search options */ export interface SearchOptions { /** * The query string to pass to start the Conversation. */ searchQuery: string; } /** * The configuration for the embedded spotterEmbed options. * @group Embed components */ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAction'> { /** * The ID of the data source object. For example, Model, View, or Table. Spotter uses this object to query data and generate Answers. */ worksheetId: string; /** * Ability to pass a starting search query to the conversation. */ searchOptions?: SearchOptions; /** * disableSourceSelection : Disables data source selection * but still display the selected data source. * * Supported embed types: `SpotterEmbed` * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * disableSourceSelection : true, * }) * ``` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl */ disableSourceSelection?: boolean; /** * hideSourceSelection : Hide data source selection * * Supported embed types: `SpotterEmbed` * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * hideSourceSelection : true, * }) * ``` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl */ hideSourceSelection?: boolean; /** * Flag to control Data panel experience * * Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed` * @default false * @version SDK: 1.36.0 | ThoughtSpot Cloud: 10.4.0.cl * @example * ```js * // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed * const embed = new <EmbedComponent>('#tsEmbed', { * ... // other embed view config * dataPanelV2: true, * }) * ``` */ dataPanelV2?: boolean; /** * showSpotterLimitations : show limitation text * of the spotter underneath the chat input. * default is false. * * Supported embed types: `SpotterEmbed` * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * showSpotterLimitations : true, * }) * ``` * @version SDK: 1.36.0 | ThoughtSpot: 10.5.0.cl */ showSpotterLimitations?: boolean; /** * hideSampleQuestions : Hide sample questions on * the initial screen of the conversation. * * Supported embed types: `SpotterEmbed` * @example * ```js * const embed = new SpotterEmbed('#tsEmbed', { * ... //other embed view config * hideSampleQuestions : true, * }) * ``` * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl */ hideSampleQuestions?: boolean; } /** * The configuration for the embedded spotterEmbed options. * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * Use {@link SpotterEmbedViewConfig} instead * @group Embed components */ export interface ConversationViewConfig extends SpotterEmbedViewConfig { } /** * Embed ThoughtSpot AI Conversation. * @group Embed components * @example * ```js * const conversation = new SpotterEmbed('#tsEmbed', { * worksheetId: 'worksheetId', * searchOptions: { * searchQuery: 'searchQuery', * }, * }); * conversation.render(); * ``` * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl */ export declare class SpotterEmbed extends TsEmbed { protected viewConfig: SpotterEmbedViewConfig; constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig); getIframeSrc(): string; render(): Promise<SpotterEmbed>; } /** * Embed ThoughtSpot AI Conversation. * @deprecated from SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl * Use {@link SpotterEmbed} instead * @group Embed components * @example * ```js * const conversation = new SpotterEmbed('#tsEmbed', { * worksheetId: 'worksheetId', * searchOptions: { * searchQuery: 'searchQuery', * }, * }); * conversation.render(); * ``` * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl */ export declare class ConversationEmbed extends SpotterEmbed { protected viewConfig: ConversationViewConfig; constructor(container: HTMLElement, viewConfig: ConversationViewConfig); } //# sourceMappingURL=conversation.d.ts.map