@thoughtspot/visual-embed-sdk 1.37.1 → 1.38.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cjs/package.json +1 -1
- package/cjs/src/embed/app.js +1 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +44 -9
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +35 -5
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +290 -5
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +40 -11
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +29 -4
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +7 -7
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +21 -10
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +4 -4
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +5 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +3 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +53 -5
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +73 -4
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +94 -0
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +2 -1
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +1 -0
- package/cjs/src/types.js.map +1 -1
- package/dist/{index-m9UtENc9.js → index-DeFzsyFF.js} +1 -1
- package/dist/index-NZYq1Tu3.js +7370 -0
- package/dist/src/embed/bodyless-conversation.d.ts +44 -9
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +40 -11
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/react/index.d.ts +53 -5
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +2 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +583 -21
- package/dist/tsembed-react.js +583 -19
- package/dist/tsembed.es.js +86 -22
- package/dist/tsembed.js +92 -26
- package/dist/visual-embed-sdk-react-full.d.ts +184 -72
- package/dist/visual-embed-sdk-react.d.ts +184 -72
- package/dist/visual-embed-sdk.d.ts +87 -22
- package/lib/package.json +1 -1
- package/lib/src/embed/app.js +1 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +44 -9
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +33 -4
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +292 -7
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +40 -11
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +27 -3
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +8 -8
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +21 -10
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +4 -4
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +4 -4
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/index.d.ts +53 -5
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +73 -4
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +96 -2
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +2 -1
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +1 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +90 -25
- package/package.json +1 -1
- package/src/embed/app.ts +1 -1
- package/src/embed/bodyless-conversation.spec.ts +314 -7
- package/src/embed/bodyless-conversation.ts +53 -8
- package/src/embed/conversation.spec.ts +16 -16
- package/src/embed/conversation.ts +44 -11
- package/src/embed/liveboard.ts +25 -10
- package/src/embed/ts-embed.spec.ts +0 -2
- package/src/index.ts +16 -5
- package/src/react/all-types-export.ts +2 -0
- package/src/react/index.spec.tsx +157 -1
- package/src/react/index.tsx +98 -11
- package/src/types.ts +1 -0
|
@@ -195,6 +195,8 @@ export const SageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & React.R
|
|
|
195
195
|
* ```
|
|
196
196
|
*/
|
|
197
197
|
export const PreRenderedSageEmbed: React.ForwardRefExoticComponent<SageEmbedProps & PreRenderProps & React.RefAttributes<_SageEmbed>>;
|
|
198
|
+
interface SpotterEmbedProps extends EmbedProps, SpotterEmbedViewConfig {
|
|
199
|
+
}
|
|
198
200
|
interface ConversationEmbedProps extends EmbedProps, ConversationViewConfig {
|
|
199
201
|
}
|
|
200
202
|
/**
|
|
@@ -202,6 +204,24 @@ interface ConversationEmbedProps extends EmbedProps, ConversationViewConfig {
|
|
|
202
204
|
* @example
|
|
203
205
|
* ```tsx
|
|
204
206
|
* function Sage() {
|
|
207
|
+
* return <SpotterEmbed
|
|
208
|
+
* worksheetId="<worksheet-id-here>"
|
|
209
|
+
* searchOptions={{
|
|
210
|
+
* searchQuery: "<search query to start with>"
|
|
211
|
+
* }}
|
|
212
|
+
* ... other view config props or event listeners.
|
|
213
|
+
* />
|
|
214
|
+
* }
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
export const SpotterEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & React.RefAttributes<_SpotterEmbed>>;
|
|
218
|
+
/**
|
|
219
|
+
* React component for LLM based conversation BI.
|
|
220
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
221
|
+
* Use {@link SpotterEmbed} instead
|
|
222
|
+
* @example
|
|
223
|
+
* ```tsx
|
|
224
|
+
* function Sage() {
|
|
205
225
|
* return <ConversationEmbed
|
|
206
226
|
* worksheetId="<worksheet-id-here>"
|
|
207
227
|
* searchOptions={{
|
|
@@ -213,10 +233,37 @@ interface ConversationEmbedProps extends EmbedProps, ConversationViewConfig {
|
|
|
213
233
|
* ```
|
|
214
234
|
*/
|
|
215
235
|
export const ConversationEmbed: React.ForwardRefExoticComponent<ConversationEmbedProps & React.RefAttributes<_ConversationEmbed>>;
|
|
236
|
+
interface SpotterAgentEmbedProps extends EmbedProps, SpotterAgentEmbedViewConfig {
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* React component for SpotterAgent embed, which can be integrated inside
|
|
240
|
+
* chatbots or other conversational interfaces.
|
|
241
|
+
* @example
|
|
242
|
+
* ```tsx
|
|
243
|
+
* function SpotterAgent() {
|
|
244
|
+
* const ref = useRef();
|
|
245
|
+
*
|
|
246
|
+
* const handleSendMessage = async () => {
|
|
247
|
+
* const { container, error } = await ref.current.sendMessage('show me sales by region');
|
|
248
|
+
* if (container) {
|
|
249
|
+
* document.body.appendChild(container);
|
|
250
|
+
* }
|
|
251
|
+
* };
|
|
252
|
+
*
|
|
253
|
+
* return (
|
|
254
|
+
* <div>
|
|
255
|
+
* <SpotterAgentEmbed ref={ref} worksheetId="worksheetId" />
|
|
256
|
+
* <button onClick={handleSendMessage}>Send Message</button>
|
|
257
|
+
* </div>
|
|
258
|
+
* );
|
|
259
|
+
* }
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
export const SpotterAgentEmbed: React.ForwardRefExoticComponent<SpotterAgentEmbedProps & React.RefAttributes<_SpotterAgentEmbed>>;
|
|
216
263
|
/**
|
|
217
264
|
* React component for PreRendered Conversation embed.
|
|
218
265
|
*
|
|
219
|
-
* PreRenderedConversationEmbed will preRender the
|
|
266
|
+
* PreRenderedConversationEmbed will preRender the SpotterEmbed and will be hidden by
|
|
220
267
|
* default.
|
|
221
268
|
*
|
|
222
269
|
* SageEmbed with preRenderId passed will call showPreRender on the embed.
|
|
@@ -227,12 +274,12 @@ export const ConversationEmbed: React.ForwardRefExoticComponent<ConversationEmbe
|
|
|
227
274
|
* }
|
|
228
275
|
* ```
|
|
229
276
|
* function MyComponent() {
|
|
230
|
-
* return <
|
|
277
|
+
* return <SpotterEmbed preRenderId="someId" worksheetId="id" />
|
|
231
278
|
* }
|
|
232
279
|
* ```
|
|
233
280
|
*/
|
|
234
|
-
export const PreRenderedConversationEmbed: React.ForwardRefExoticComponent<
|
|
235
|
-
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof ConversationEmbed;
|
|
281
|
+
export const PreRenderedConversationEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & PreRenderProps & React.RefAttributes<_SpotterEmbed>>;
|
|
282
|
+
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof SpotterAgentEmbed | typeof SpotterEmbed | typeof ConversationEmbed;
|
|
236
283
|
/**
|
|
237
284
|
* Get a reference to the embed component to trigger events on the component.
|
|
238
285
|
* @example
|
|
@@ -273,7 +320,7 @@ export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEm
|
|
|
273
320
|
* @summary ThoughtSpot Visual Embed SDK
|
|
274
321
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
275
322
|
*/
|
|
276
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed,
|
|
323
|
+
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, SpotterAgentEmbed, SpotterAgentEmbedViewConfig, BodylessConversationViewConfig, BodylessConversation, SpotterEmbed, SpotterEmbedViewConfig, ConversationViewConfig, ConversationEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, };
|
|
277
324
|
|
|
278
325
|
export declare let loggedInStatus: boolean;
|
|
279
326
|
export declare let samlAuthWindow: Window;
|
|
@@ -2048,6 +2095,96 @@ export declare class LiveboardEmbed extends V1Embed {
|
|
|
2048
2095
|
export declare class PinboardEmbed extends LiveboardEmbed {
|
|
2049
2096
|
}
|
|
2050
2097
|
|
|
2098
|
+
/**
|
|
2099
|
+
* Configuration for bodyless conversation options.
|
|
2100
|
+
* @group Embed components
|
|
2101
|
+
*/
|
|
2102
|
+
export interface SpotterAgentEmbedViewConfig extends ViewConfig {
|
|
2103
|
+
/**
|
|
2104
|
+
* The ID of the worksheet to use for the conversation.
|
|
2105
|
+
*/
|
|
2106
|
+
worksheetId: string;
|
|
2107
|
+
/**
|
|
2108
|
+
* Optional CSS class name to add to the container div.
|
|
2109
|
+
*/
|
|
2110
|
+
containerClassName?: string;
|
|
2111
|
+
}
|
|
2112
|
+
/**
|
|
2113
|
+
* Configuration for conversation options.
|
|
2114
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
2115
|
+
* Use {@link SpotterAgentEmbedViewConfig} instead
|
|
2116
|
+
* @group Embed components
|
|
2117
|
+
*/
|
|
2118
|
+
export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
|
|
2119
|
+
}
|
|
2120
|
+
interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
2121
|
+
sessionId: string;
|
|
2122
|
+
genNo: number;
|
|
2123
|
+
acSessionId: string;
|
|
2124
|
+
acGenNo: number;
|
|
2125
|
+
}
|
|
2126
|
+
declare class ConversationMessage extends TsEmbed {
|
|
2127
|
+
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
2128
|
+
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
2129
|
+
getIframeSrc(): string;
|
|
2130
|
+
render(): Promise<ConversationMessage>;
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Create a conversation embed, which can be integrated inside
|
|
2134
|
+
* chatbots or other conversational interfaces.
|
|
2135
|
+
* @example
|
|
2136
|
+
* ```js
|
|
2137
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
2138
|
+
*
|
|
2139
|
+
* const conversation = new SpotterAgentEmbed({
|
|
2140
|
+
* worksheetId: 'worksheetId',
|
|
2141
|
+
* });
|
|
2142
|
+
*
|
|
2143
|
+
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
2144
|
+
*
|
|
2145
|
+
* // append the container to the DOM
|
|
2146
|
+
* document.body.appendChild(container); // or to any other element
|
|
2147
|
+
* ```
|
|
2148
|
+
* @group Embed components
|
|
2149
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
2150
|
+
*/
|
|
2151
|
+
export declare class SpotterAgentEmbed {
|
|
2152
|
+
constructor(viewConfig: SpotterAgentEmbedViewConfig);
|
|
2153
|
+
sendMessage(userMessage: string): Promise<{
|
|
2154
|
+
error: any;
|
|
2155
|
+
container?: undefined;
|
|
2156
|
+
viz?: undefined;
|
|
2157
|
+
} | {
|
|
2158
|
+
container: HTMLDivElement;
|
|
2159
|
+
viz: ConversationMessage;
|
|
2160
|
+
error?: undefined;
|
|
2161
|
+
}>;
|
|
2162
|
+
}
|
|
2163
|
+
/**
|
|
2164
|
+
* Create a conversation embed, which can be integrated inside
|
|
2165
|
+
* chatbots or other conversational interfaces.
|
|
2166
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
2167
|
+
* Use {@link SpotterAgentEmbed} instead
|
|
2168
|
+
* @example
|
|
2169
|
+
* ```js
|
|
2170
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
2171
|
+
*
|
|
2172
|
+
* const conversation = new SpotterAgentEmbed({
|
|
2173
|
+
* worksheetId: 'worksheetId',
|
|
2174
|
+
* });
|
|
2175
|
+
*
|
|
2176
|
+
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
2177
|
+
*
|
|
2178
|
+
* // append the container to the DOM
|
|
2179
|
+
* document.body.appendChild(container); // or to any other element
|
|
2180
|
+
* ```
|
|
2181
|
+
* @group Embed components
|
|
2182
|
+
*/
|
|
2183
|
+
export declare class BodylessConversation extends SpotterAgentEmbed {
|
|
2184
|
+
constructor(viewConfig: BodylessConversationViewConfig);
|
|
2185
|
+
}
|
|
2186
|
+
export {};
|
|
2187
|
+
|
|
2051
2188
|
/**
|
|
2052
2189
|
* Copyright (c) 2023
|
|
2053
2190
|
*
|
|
@@ -5645,7 +5782,8 @@ export declare enum Param {
|
|
|
5645
5782
|
preAuthCache = "preAuthCache",
|
|
5646
5783
|
ShowSpotterLimitations = "showSpotterLimitations",
|
|
5647
5784
|
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
|
|
5648
|
-
PrimaryAction = "primaryAction"
|
|
5785
|
+
PrimaryAction = "primaryAction",
|
|
5786
|
+
isSpotterAgentEmbed = "isSpotterAgentEmbed"
|
|
5649
5787
|
}
|
|
5650
5788
|
/**
|
|
5651
5789
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -7050,10 +7188,10 @@ export interface SearchOptions {
|
|
|
7050
7188
|
searchQuery: string;
|
|
7051
7189
|
}
|
|
7052
7190
|
/**
|
|
7053
|
-
* The configuration for the embedded
|
|
7191
|
+
* The configuration for the embedded spotterEmbed options.
|
|
7054
7192
|
* @group Embed components
|
|
7055
7193
|
*/
|
|
7056
|
-
export interface
|
|
7194
|
+
export interface SpotterEmbedViewConfig extends ViewConfig {
|
|
7057
7195
|
/**
|
|
7058
7196
|
* The ID of the worksheet to use for the conversation.
|
|
7059
7197
|
*/
|
|
@@ -7067,7 +7205,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
7067
7205
|
* but still display the selected data source.
|
|
7068
7206
|
* @example
|
|
7069
7207
|
* ```js
|
|
7070
|
-
* const embed = new
|
|
7208
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
7071
7209
|
* ... // other options
|
|
7072
7210
|
* disableSourceSelection : true,
|
|
7073
7211
|
* })
|
|
@@ -7079,7 +7217,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
7079
7217
|
* hideSourceSelection : Hide data source selection
|
|
7080
7218
|
* @example
|
|
7081
7219
|
* ```js
|
|
7082
|
-
* const embed = new
|
|
7220
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
7083
7221
|
* ... // other options
|
|
7084
7222
|
* hideSourceSelection : true,
|
|
7085
7223
|
* })
|
|
@@ -7106,7 +7244,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
7106
7244
|
* default is false.
|
|
7107
7245
|
* @example
|
|
7108
7246
|
* ```js
|
|
7109
|
-
* const embed = new
|
|
7247
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
7110
7248
|
* ... // other options
|
|
7111
7249
|
* showSpotterLimitations : true,
|
|
7112
7250
|
* })
|
|
@@ -7119,7 +7257,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
7119
7257
|
* the initial screen of the conversation.
|
|
7120
7258
|
* @example
|
|
7121
7259
|
* ```js
|
|
7122
|
-
* const embed = new
|
|
7260
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
7123
7261
|
* ... // other options
|
|
7124
7262
|
* hideSampleQuestions : true,
|
|
7125
7263
|
* })
|
|
@@ -7128,12 +7266,20 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
7128
7266
|
*/
|
|
7129
7267
|
hideSampleQuestions?: boolean;
|
|
7130
7268
|
}
|
|
7269
|
+
/**
|
|
7270
|
+
* The configuration for the embedded spotterEmbed options.
|
|
7271
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
7272
|
+
* Use {@link SpotterEmbedViewConfig} instead
|
|
7273
|
+
* @group Embed components
|
|
7274
|
+
*/
|
|
7275
|
+
export interface ConversationViewConfig extends SpotterEmbedViewConfig {
|
|
7276
|
+
}
|
|
7131
7277
|
/**
|
|
7132
7278
|
* Embed ThoughtSpot AI Conversation.
|
|
7133
7279
|
* @group Embed components
|
|
7134
7280
|
* @example
|
|
7135
7281
|
* ```js
|
|
7136
|
-
* const conversation = new
|
|
7282
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
7137
7283
|
* worksheetId: 'worksheetId',
|
|
7138
7284
|
* searchOptions: {
|
|
7139
7285
|
* searchQuery: 'searchQuery',
|
|
@@ -7141,13 +7287,34 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
7141
7287
|
* });
|
|
7142
7288
|
* conversation.render();
|
|
7143
7289
|
* ```
|
|
7144
|
-
* @version SDK: 1.
|
|
7290
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
7145
7291
|
*/
|
|
7146
|
-
export declare class
|
|
7292
|
+
export declare class SpotterEmbed extends TsEmbed {
|
|
7293
|
+
protected viewConfig: SpotterEmbedViewConfig;
|
|
7294
|
+
constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
|
|
7295
|
+
getIframeSrc(): string;
|
|
7296
|
+
render(): Promise<SpotterEmbed>;
|
|
7297
|
+
}
|
|
7298
|
+
/**
|
|
7299
|
+
* Embed ThoughtSpot AI Conversation.
|
|
7300
|
+
* @deprecated from SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
7301
|
+
* Use {@link SpotterEmbed} instead
|
|
7302
|
+
* @group Embed components
|
|
7303
|
+
* @example
|
|
7304
|
+
* ```js
|
|
7305
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
7306
|
+
* worksheetId: 'worksheetId',
|
|
7307
|
+
* searchOptions: {
|
|
7308
|
+
* searchQuery: 'searchQuery',
|
|
7309
|
+
* },
|
|
7310
|
+
* });
|
|
7311
|
+
* conversation.render();
|
|
7312
|
+
* ```
|
|
7313
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
7314
|
+
*/
|
|
7315
|
+
export declare class ConversationEmbed extends SpotterEmbed {
|
|
7147
7316
|
protected viewConfig: ConversationViewConfig;
|
|
7148
7317
|
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
7149
|
-
getIframeSrc(): string;
|
|
7150
|
-
render(): Promise<ConversationEmbed>;
|
|
7151
7318
|
}
|
|
7152
7319
|
|
|
7153
7320
|
import '../utils/with-resolvers-polyfill';
|
|
@@ -7291,61 +7458,6 @@ export declare const exportTML: (data: exportTMLInput) => Promise<any>;
|
|
|
7291
7458
|
*/
|
|
7292
7459
|
export declare function reset(): void;
|
|
7293
7460
|
|
|
7294
|
-
/**
|
|
7295
|
-
* Configuration for bodyless conversation options.
|
|
7296
|
-
* @group Embed components
|
|
7297
|
-
*/
|
|
7298
|
-
export interface BodylessConversationViewConfig extends ViewConfig {
|
|
7299
|
-
/**
|
|
7300
|
-
* The ID of the worksheet to use for the conversation.
|
|
7301
|
-
*/
|
|
7302
|
-
worksheetId: string;
|
|
7303
|
-
}
|
|
7304
|
-
interface ConversationMessageViewConfig extends BodylessConversationViewConfig {
|
|
7305
|
-
sessionId: string;
|
|
7306
|
-
genNo: number;
|
|
7307
|
-
acSessionId: string;
|
|
7308
|
-
acGenNo: number;
|
|
7309
|
-
}
|
|
7310
|
-
declare class ConversationMessage extends TsEmbed {
|
|
7311
|
-
protected viewConfig: ConversationMessageViewConfig;
|
|
7312
|
-
constructor(container: HTMLElement, viewConfig: ConversationMessageViewConfig);
|
|
7313
|
-
getIframeSrc(): string;
|
|
7314
|
-
render(): Promise<ConversationMessage>;
|
|
7315
|
-
}
|
|
7316
|
-
/**
|
|
7317
|
-
* Create a conversation embed, which can be integrated inside
|
|
7318
|
-
* chatbots or other conversational interfaces.
|
|
7319
|
-
* @example
|
|
7320
|
-
* ```js
|
|
7321
|
-
* import { BodylessConversation } from '@thoughtspot/visual-embed-sdk';
|
|
7322
|
-
*
|
|
7323
|
-
* const conversation = new BodylessConversation({
|
|
7324
|
-
* worksheetId: 'worksheetId',
|
|
7325
|
-
* });
|
|
7326
|
-
*
|
|
7327
|
-
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
7328
|
-
*
|
|
7329
|
-
* // append the container to the DOM
|
|
7330
|
-
* document.body.appendChild(container); // or to any other element
|
|
7331
|
-
* ```
|
|
7332
|
-
* @group Embed components
|
|
7333
|
-
* @version SDK: 1.33.1 | ThoughtSpot: 10.5.0.cl
|
|
7334
|
-
*/
|
|
7335
|
-
export declare class BodylessConversation {
|
|
7336
|
-
constructor(viewConfig: BodylessConversationViewConfig);
|
|
7337
|
-
sendMessage(userMessage: string): Promise<{
|
|
7338
|
-
error: any;
|
|
7339
|
-
container?: undefined;
|
|
7340
|
-
viz?: undefined;
|
|
7341
|
-
} | {
|
|
7342
|
-
container: HTMLDivElement;
|
|
7343
|
-
viz: ConversationMessage;
|
|
7344
|
-
error?: undefined;
|
|
7345
|
-
}>;
|
|
7346
|
-
}
|
|
7347
|
-
export {};
|
|
7348
|
-
|
|
7349
7461
|
export type SessionInfo = {
|
|
7350
7462
|
releaseVersion: string;
|
|
7351
7463
|
userGUID: string;
|