@thoughtspot/visual-embed-sdk 1.37.0 → 1.37.1-spotter-embed
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/cjs/package.json +3 -3
- package/cjs/src/auth.d.ts +9 -4
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +21 -0
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/auth.spec.js +48 -0
- package/cjs/src/auth.spec.js.map +1 -1
- package/cjs/src/embed/app.d.ts +59 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +13 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +44 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.d.ts +39 -9
- package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +32 -5
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.spec.js +4 -4
- package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +38 -11
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +28 -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/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +4 -1
- package/cjs/src/embed/ts-embed.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 +3 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +5 -3
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/pages/embed-test.page.d.ts +8 -0
- package/cjs/src/pages/embed-test.page.d.ts.map +1 -0
- package/cjs/src/pages/embed-test.page.js +20 -0
- package/cjs/src/pages/embed-test.page.js.map +1 -0
- package/cjs/src/pages/home.page.d.ts +6 -0
- package/cjs/src/pages/home.page.d.ts.map +1 -0
- package/cjs/src/pages/home.page.js +12 -0
- package/cjs/src/pages/home.page.js.map +1 -0
- package/cjs/src/pages/login.page.d.ts +15 -0
- package/cjs/src/pages/login.page.d.ts.map +1 -0
- package/cjs/src/pages/login.page.js +22 -0
- package/cjs/src/pages/login.page.js.map +1 -0
- 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 +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/index.d.ts +24 -5
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +21 -4
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/tests/auth.test.d.ts +1 -0
- package/cjs/src/tests/auth.test.d.ts.map +1 -0
- package/cjs/src/tests/auth.test.js +1 -0
- package/cjs/src/tests/auth.test.js.map +1 -0
- package/cjs/src/tests/e2e/auth.spec.d.ts +2 -0
- package/cjs/src/tests/e2e/auth.spec.d.ts.map +1 -0
- package/cjs/src/tests/e2e/auth.spec.js +54 -0
- package/cjs/src/tests/e2e/auth.spec.js.map +1 -0
- package/cjs/src/types.d.ts +95 -3
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +79 -0
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +35 -15
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/processData.js +6 -4
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/index-Cj4BVGHL.js +7371 -0
- package/dist/index-DUaG1OG2.js +7447 -0
- package/dist/index-Fhk1V_Gw.js +7371 -0
- package/dist/index-OuiZF3zE.js +7371 -0
- package/dist/src/auth.d.ts +9 -4
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +59 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/bodyless-conversation.d.ts +39 -9
- package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +38 -11
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -3
- 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 +24 -5
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +95 -3
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +208 -31
- package/dist/tsembed-react.js +428 -174
- package/dist/tsembed.es.js +170 -32
- package/dist/tsembed.js +392 -176
- package/dist/visual-embed-sdk-react-full.d.ts +299 -47
- package/dist/visual-embed-sdk-react.d.ts +299 -47
- package/dist/visual-embed-sdk.d.ts +276 -43
- package/lib/package.json +3 -3
- package/lib/src/auth.d.ts +9 -4
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +21 -0
- package/lib/src/auth.js.map +1 -1
- package/lib/src/auth.spec.js +48 -0
- package/lib/src/auth.spec.js.map +1 -1
- package/lib/src/embed/app.d.ts +59 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +13 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +44 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.d.ts +39 -9
- package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +30 -4
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.spec.js +5 -5
- package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +38 -11
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +26 -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/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +4 -1
- package/lib/src/embed/ts-embed.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 +3 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -3
- 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 +24 -5
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +21 -4
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +95 -3
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +79 -0
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +35 -15
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +35 -15
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/processData.js +6 -4
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +278 -45
- package/package.json +3 -3
- package/src/auth.spec.ts +52 -0
- package/src/auth.ts +25 -3
- package/src/embed/app.spec.ts +64 -0
- package/src/embed/app.ts +80 -0
- package/src/embed/bodyless-conversation.spec.ts +6 -6
- package/src/embed/bodyless-conversation.ts +43 -8
- package/src/embed/conversation.spec.ts +16 -16
- package/src/embed/conversation.ts +42 -11
- package/src/embed/ts-embed.spec.ts +0 -2
- package/src/embed/ts-embed.ts +4 -0
- package/src/index.ts +8 -4
- package/src/react/all-types-export.ts +1 -0
- package/src/react/index.tsx +36 -10
- package/src/types.ts +99 -1
- package/src/utils/graphql/answerService/answerService.ts +35 -15
- package/src/utils/processData.ts +6 -6
|
@@ -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,23 @@ 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 This component is renamed to SpotterEmbed. Use {@link SpotterEmbed} instead.
|
|
221
|
+
* @example
|
|
222
|
+
* ```tsx
|
|
223
|
+
* function Sage() {
|
|
205
224
|
* return <ConversationEmbed
|
|
206
225
|
* worksheetId="<worksheet-id-here>"
|
|
207
226
|
* searchOptions={{
|
|
@@ -216,7 +235,7 @@ export const ConversationEmbed: React.ForwardRefExoticComponent<ConversationEmbe
|
|
|
216
235
|
/**
|
|
217
236
|
* React component for PreRendered Conversation embed.
|
|
218
237
|
*
|
|
219
|
-
* PreRenderedConversationEmbed will preRender the
|
|
238
|
+
* PreRenderedConversationEmbed will preRender the SpotterEmbed and will be hidden by
|
|
220
239
|
* default.
|
|
221
240
|
*
|
|
222
241
|
* SageEmbed with preRenderId passed will call showPreRender on the embed.
|
|
@@ -227,12 +246,12 @@ export const ConversationEmbed: React.ForwardRefExoticComponent<ConversationEmbe
|
|
|
227
246
|
* }
|
|
228
247
|
* ```
|
|
229
248
|
* function MyComponent() {
|
|
230
|
-
* return <
|
|
249
|
+
* return <SpotterEmbed preRenderId="someId" worksheetId="id" />
|
|
231
250
|
* }
|
|
232
251
|
* ```
|
|
233
252
|
*/
|
|
234
|
-
export const PreRenderedConversationEmbed: React.ForwardRefExoticComponent<
|
|
235
|
-
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof ConversationEmbed;
|
|
253
|
+
export const PreRenderedConversationEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & PreRenderProps & React.RefAttributes<_SpotterEmbed>>;
|
|
254
|
+
type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof SpotterEmbed | typeof ConversationEmbed;
|
|
236
255
|
/**
|
|
237
256
|
* Get a reference to the embed component to trigger events on the component.
|
|
238
257
|
* @example
|
|
@@ -273,7 +292,7 @@ export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEm
|
|
|
273
292
|
* @summary ThoughtSpot Visual Embed SDK
|
|
274
293
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
275
294
|
*/
|
|
276
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed,
|
|
295
|
+
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, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, };
|
|
277
296
|
|
|
278
297
|
export declare let loggedInStatus: boolean;
|
|
279
298
|
export declare let samlAuthWindow: Window;
|
|
@@ -289,7 +308,8 @@ export declare enum AuthFailureType {
|
|
|
289
308
|
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
290
309
|
EXPIRY = "EXPIRY",
|
|
291
310
|
OTHER = "OTHER",
|
|
292
|
-
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT"
|
|
311
|
+
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
|
|
312
|
+
UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
|
|
293
313
|
}
|
|
294
314
|
/**
|
|
295
315
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -323,7 +343,11 @@ export declare enum AuthStatus {
|
|
|
323
343
|
* or by the trigger button.
|
|
324
344
|
* @version SDK: 1.19.0
|
|
325
345
|
*/
|
|
326
|
-
WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
|
|
346
|
+
WAITING_FOR_POPUP = "WAITING_FOR_POPUP",
|
|
347
|
+
/**
|
|
348
|
+
* Emitted when the SAML popup is closed without authentication
|
|
349
|
+
*/
|
|
350
|
+
SAML_POPUP_CLOSED_NO_AUTH = "SAML_POPUP_CLOSED_NO_AUTH"
|
|
327
351
|
}
|
|
328
352
|
/**
|
|
329
353
|
* Event emitter returned from {@link init}.
|
|
@@ -341,10 +365,10 @@ export interface AuthEventEmitter {
|
|
|
341
365
|
* @param event
|
|
342
366
|
* @param listener
|
|
343
367
|
*/
|
|
344
|
-
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
368
|
+
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
|
|
345
369
|
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
346
370
|
once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
347
|
-
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
371
|
+
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
|
|
348
372
|
once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
349
373
|
/**
|
|
350
374
|
* Trigger an event on the emitter returned from init.
|
|
@@ -1140,6 +1164,51 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1140
1164
|
* ```
|
|
1141
1165
|
*/
|
|
1142
1166
|
enablePendoHelp?: boolean;
|
|
1167
|
+
/**
|
|
1168
|
+
* Control the visibility of the hamburger icon on the top nav bar
|
|
1169
|
+
* available when new navigation V3 is enabled.
|
|
1170
|
+
*
|
|
1171
|
+
* @default false
|
|
1172
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1173
|
+
* @example
|
|
1174
|
+
* ```js
|
|
1175
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1176
|
+
* ... // other options
|
|
1177
|
+
* hideHamburger : true,
|
|
1178
|
+
* })
|
|
1179
|
+
* ```
|
|
1180
|
+
*/
|
|
1181
|
+
hideHamburger?: boolean;
|
|
1182
|
+
/**
|
|
1183
|
+
* Control the visibility of the Eureka search on the top nav bar
|
|
1184
|
+
* this will control for both new V2 and new navigation V3.
|
|
1185
|
+
*
|
|
1186
|
+
* @default true
|
|
1187
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1188
|
+
* @example
|
|
1189
|
+
* ```js
|
|
1190
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1191
|
+
* ... // other options
|
|
1192
|
+
* hideObjectSearch: false,
|
|
1193
|
+
* })
|
|
1194
|
+
* ```
|
|
1195
|
+
*/
|
|
1196
|
+
hideObjectSearch?: boolean;
|
|
1197
|
+
/**
|
|
1198
|
+
* Control the visibility of the notification on the top nav bar V3,
|
|
1199
|
+
* available when new navigation V3 is enabled.
|
|
1200
|
+
*
|
|
1201
|
+
* @default true
|
|
1202
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1203
|
+
* @example
|
|
1204
|
+
* ```js
|
|
1205
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1206
|
+
* ... // other options
|
|
1207
|
+
* hideNotification: false,
|
|
1208
|
+
* })
|
|
1209
|
+
* ```
|
|
1210
|
+
*/
|
|
1211
|
+
hideNotification?: boolean;
|
|
1143
1212
|
/**
|
|
1144
1213
|
* Control the visibility of the application switcher button on the nav-bar.
|
|
1145
1214
|
* By default, the application switcher is shown.
|
|
@@ -1333,6 +1402,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1333
1402
|
* ```
|
|
1334
1403
|
*/
|
|
1335
1404
|
modularHomeExperience?: boolean;
|
|
1405
|
+
/**
|
|
1406
|
+
* Flag to control new navigation v3 home experience.
|
|
1407
|
+
*
|
|
1408
|
+
* @default false
|
|
1409
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1410
|
+
* @example
|
|
1411
|
+
* ```js
|
|
1412
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1413
|
+
* ... // other options
|
|
1414
|
+
* modularHomeExperienceV3 : true,
|
|
1415
|
+
* })
|
|
1416
|
+
* ```
|
|
1417
|
+
*/
|
|
1418
|
+
modularHomeExperienceV3?: boolean;
|
|
1336
1419
|
/**
|
|
1337
1420
|
* Boolean to control if Liveboard header is sticky or not.
|
|
1338
1421
|
* @example
|
|
@@ -2144,7 +2227,19 @@ export declare enum HomeLeftNavItem {
|
|
|
2144
2227
|
/**
|
|
2145
2228
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
2146
2229
|
*/
|
|
2147
|
-
LiveboardSchedules = "liveboard-schedules"
|
|
2230
|
+
LiveboardSchedules = "liveboard-schedules",
|
|
2231
|
+
/**
|
|
2232
|
+
* Create new options in the insights left navigation,
|
|
2233
|
+
* available when new navigation V3 is enabled.
|
|
2234
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
2235
|
+
*/
|
|
2236
|
+
Create = "create",
|
|
2237
|
+
/**
|
|
2238
|
+
* Spotter option in the insights left navigation,
|
|
2239
|
+
* available when new navigation V3 is enabled.
|
|
2240
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
2241
|
+
*/
|
|
2242
|
+
Spotter = "spotter"
|
|
2148
2243
|
}
|
|
2149
2244
|
export type DOMSelector = string | HTMLElement;
|
|
2150
2245
|
/**
|
|
@@ -2625,6 +2720,19 @@ export interface ViewConfig {
|
|
|
2625
2720
|
* ```
|
|
2626
2721
|
*/
|
|
2627
2722
|
disabledActions?: Action[];
|
|
2723
|
+
/**
|
|
2724
|
+
* The primary action to display on top of the viz for Liveboard and App Embed.
|
|
2725
|
+
* Use this to set the primary action.
|
|
2726
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
2727
|
+
* @example
|
|
2728
|
+
* ```js
|
|
2729
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
2730
|
+
* ... // other liveboard view config
|
|
2731
|
+
* primaryAction: Action.Download
|
|
2732
|
+
* });
|
|
2733
|
+
* ```
|
|
2734
|
+
*/
|
|
2735
|
+
primaryAction?: Action | string;
|
|
2628
2736
|
/**
|
|
2629
2737
|
* The tooltip to display for disabled actions.
|
|
2630
2738
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
@@ -5214,8 +5322,17 @@ export declare enum HostEvent {
|
|
|
5214
5322
|
/**
|
|
5215
5323
|
* Get the Answer session for a Search or
|
|
5216
5324
|
* Liveboard visualization.
|
|
5325
|
+
*
|
|
5326
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
5327
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
5328
|
+
* object that provides a more convenient interface for working with answers.
|
|
5329
|
+
*
|
|
5217
5330
|
* @example
|
|
5218
5331
|
* ```js
|
|
5332
|
+
* // Preferred way to get an AnswerService
|
|
5333
|
+
* const service = await embed.getAnswerService();
|
|
5334
|
+
*
|
|
5335
|
+
* // Alternative direct usage (not recommended)
|
|
5219
5336
|
* const {session} = await embed.trigger(
|
|
5220
5337
|
* HostEvent.GetAnswerSession, {
|
|
5221
5338
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -5223,6 +5340,10 @@ export declare enum HostEvent {
|
|
|
5223
5340
|
* ```
|
|
5224
5341
|
* @example
|
|
5225
5342
|
* ```js
|
|
5343
|
+
* // Preferred way to get an AnswerService
|
|
5344
|
+
* const service = await embed.getAnswerService();
|
|
5345
|
+
*
|
|
5346
|
+
* // Alternative direct usage (not recommended)
|
|
5226
5347
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
5227
5348
|
* ```
|
|
5228
5349
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -5350,7 +5471,55 @@ export declare enum HostEvent {
|
|
|
5350
5471
|
* ```
|
|
5351
5472
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
5352
5473
|
*/
|
|
5353
|
-
TransformTableVizData = "TransformTableVizData"
|
|
5474
|
+
TransformTableVizData = "TransformTableVizData",
|
|
5475
|
+
/**
|
|
5476
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5477
|
+
* Includes the following properties:
|
|
5478
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5479
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5480
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5481
|
+
*/
|
|
5482
|
+
SpotterSearch = "SpotterSearch",
|
|
5483
|
+
/**
|
|
5484
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5485
|
+
* Includes the following properties:
|
|
5486
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5487
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5488
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5489
|
+
*/
|
|
5490
|
+
EditLastPrompt = "EditLastPrompt",
|
|
5491
|
+
/**
|
|
5492
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5493
|
+
* Includes the following properties:
|
|
5494
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5495
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5496
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5497
|
+
*/
|
|
5498
|
+
PreviewSpotterData = "PreviewSpotterData",
|
|
5499
|
+
/**
|
|
5500
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5501
|
+
* Includes the following properties:
|
|
5502
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5503
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5504
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5505
|
+
*/
|
|
5506
|
+
ResetSpotterConversation = "ResetSpotterConversation",
|
|
5507
|
+
/**
|
|
5508
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5509
|
+
* Includes the following properties:
|
|
5510
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5511
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5512
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5513
|
+
*/
|
|
5514
|
+
DeleteLastPrompt = "DeleteLastPrompt",
|
|
5515
|
+
/**
|
|
5516
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5517
|
+
* Includes the following properties:
|
|
5518
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5519
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5520
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5521
|
+
*/
|
|
5522
|
+
AnswerChartSwitcher = "answerChartSwitcher"
|
|
5354
5523
|
}
|
|
5355
5524
|
/**
|
|
5356
5525
|
* The different visual modes that the data sources panel within
|
|
@@ -5421,6 +5590,10 @@ export declare enum Param {
|
|
|
5421
5590
|
ShowInsertToSlide = "insertInToSlide",
|
|
5422
5591
|
PrimaryNavHidden = "primaryNavHidden",
|
|
5423
5592
|
HideProfleAndHelp = "profileAndHelpInNavBarHidden",
|
|
5593
|
+
NavigationVersion = "navigationVersion",
|
|
5594
|
+
HideHamburger = "hideHamburger",
|
|
5595
|
+
HideObjectSearch = "hideObjectSearch",
|
|
5596
|
+
HideNotification = "hideNotification",
|
|
5424
5597
|
HideApplicationSwitcher = "applicationSwitcherHidden",
|
|
5425
5598
|
HideOrgSwitcher = "orgSwitcherHidden",
|
|
5426
5599
|
IsSageEmbed = "isSageEmbed",
|
|
@@ -5476,7 +5649,9 @@ export declare enum Param {
|
|
|
5476
5649
|
DataSourceId = "dataSourceId",
|
|
5477
5650
|
preAuthCache = "preAuthCache",
|
|
5478
5651
|
ShowSpotterLimitations = "showSpotterLimitations",
|
|
5479
|
-
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
|
|
5652
|
+
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
|
|
5653
|
+
PrimaryAction = "primaryAction",
|
|
5654
|
+
isSpotterAgentEmbed = "isSpotterAgentEmbed"
|
|
5480
5655
|
}
|
|
5481
5656
|
/**
|
|
5482
5657
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6881,10 +7056,10 @@ export interface SearchOptions {
|
|
|
6881
7056
|
searchQuery: string;
|
|
6882
7057
|
}
|
|
6883
7058
|
/**
|
|
6884
|
-
* The configuration for the embedded
|
|
7059
|
+
* The configuration for the embedded spotterEmbed options.
|
|
6885
7060
|
* @group Embed components
|
|
6886
7061
|
*/
|
|
6887
|
-
export interface
|
|
7062
|
+
export interface SpotterEmbedViewConfig extends ViewConfig {
|
|
6888
7063
|
/**
|
|
6889
7064
|
* The ID of the worksheet to use for the conversation.
|
|
6890
7065
|
*/
|
|
@@ -6898,7 +7073,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6898
7073
|
* but still display the selected data source.
|
|
6899
7074
|
* @example
|
|
6900
7075
|
* ```js
|
|
6901
|
-
* const embed = new
|
|
7076
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6902
7077
|
* ... // other options
|
|
6903
7078
|
* disableSourceSelection : true,
|
|
6904
7079
|
* })
|
|
@@ -6910,7 +7085,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6910
7085
|
* hideSourceSelection : Hide data source selection
|
|
6911
7086
|
* @example
|
|
6912
7087
|
* ```js
|
|
6913
|
-
* const embed = new
|
|
7088
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6914
7089
|
* ... // other options
|
|
6915
7090
|
* hideSourceSelection : true,
|
|
6916
7091
|
* })
|
|
@@ -6937,7 +7112,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6937
7112
|
* default is false.
|
|
6938
7113
|
* @example
|
|
6939
7114
|
* ```js
|
|
6940
|
-
* const embed = new
|
|
7115
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6941
7116
|
* ... // other options
|
|
6942
7117
|
* showSpotterLimitations : true,
|
|
6943
7118
|
* })
|
|
@@ -6950,7 +7125,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6950
7125
|
* the initial screen of the conversation.
|
|
6951
7126
|
* @example
|
|
6952
7127
|
* ```js
|
|
6953
|
-
* const embed = new
|
|
7128
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6954
7129
|
* ... // other options
|
|
6955
7130
|
* hideSampleQuestions : true,
|
|
6956
7131
|
* })
|
|
@@ -6959,12 +7134,19 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6959
7134
|
*/
|
|
6960
7135
|
hideSampleQuestions?: boolean;
|
|
6961
7136
|
}
|
|
7137
|
+
/**
|
|
7138
|
+
* The configuration for the embedded spotterEmbed options.
|
|
7139
|
+
* @deprecated Renamed to SpotterEmbedViewConfig
|
|
7140
|
+
* @group Embed components
|
|
7141
|
+
*/
|
|
7142
|
+
export interface ConversationViewConfig extends SpotterEmbedViewConfig {
|
|
7143
|
+
}
|
|
6962
7144
|
/**
|
|
6963
7145
|
* Embed ThoughtSpot AI Conversation.
|
|
6964
7146
|
* @group Embed components
|
|
6965
7147
|
* @example
|
|
6966
7148
|
* ```js
|
|
6967
|
-
* const conversation = new
|
|
7149
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
6968
7150
|
* worksheetId: 'worksheetId',
|
|
6969
7151
|
* searchOptions: {
|
|
6970
7152
|
* searchQuery: 'searchQuery',
|
|
@@ -6972,13 +7154,33 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6972
7154
|
* });
|
|
6973
7155
|
* conversation.render();
|
|
6974
7156
|
* ```
|
|
6975
|
-
* @version SDK: 1.
|
|
7157
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
6976
7158
|
*/
|
|
6977
|
-
export declare class
|
|
7159
|
+
export declare class SpotterEmbed extends TsEmbed {
|
|
7160
|
+
protected viewConfig: SpotterEmbedViewConfig;
|
|
7161
|
+
constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
|
|
7162
|
+
getIframeSrc(): string;
|
|
7163
|
+
render(): Promise<SpotterEmbed>;
|
|
7164
|
+
}
|
|
7165
|
+
/**
|
|
7166
|
+
* Embed ThoughtSpot AI Conversation.
|
|
7167
|
+
* @deprecated Renamed to SpotterEmbed
|
|
7168
|
+
* @group Embed components
|
|
7169
|
+
* @example
|
|
7170
|
+
* ```js
|
|
7171
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
7172
|
+
* worksheetId: 'worksheetId',
|
|
7173
|
+
* searchOptions: {
|
|
7174
|
+
* searchQuery: 'searchQuery',
|
|
7175
|
+
* },
|
|
7176
|
+
* });
|
|
7177
|
+
* conversation.render();
|
|
7178
|
+
* ```
|
|
7179
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
7180
|
+
*/
|
|
7181
|
+
export declare class ConversationEmbed extends SpotterEmbed {
|
|
6978
7182
|
protected viewConfig: ConversationViewConfig;
|
|
6979
7183
|
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
6980
|
-
getIframeSrc(): string;
|
|
6981
|
-
render(): Promise<ConversationEmbed>;
|
|
6982
7184
|
}
|
|
6983
7185
|
|
|
6984
7186
|
import '../utils/with-resolvers-polyfill';
|
|
@@ -7126,21 +7328,28 @@ export declare function reset(): void;
|
|
|
7126
7328
|
* Configuration for bodyless conversation options.
|
|
7127
7329
|
* @group Embed components
|
|
7128
7330
|
*/
|
|
7129
|
-
export interface
|
|
7331
|
+
export interface SpotterAgentEmbedViewConfig extends ViewConfig {
|
|
7130
7332
|
/**
|
|
7131
7333
|
* The ID of the worksheet to use for the conversation.
|
|
7132
7334
|
*/
|
|
7133
7335
|
worksheetId: string;
|
|
7134
7336
|
}
|
|
7135
|
-
|
|
7337
|
+
/**
|
|
7338
|
+
* Configuration for conversation options.
|
|
7339
|
+
* @deprecated Renamed to SpotterAgentEmbedViewConfig
|
|
7340
|
+
* @group Embed components
|
|
7341
|
+
*/
|
|
7342
|
+
export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
|
|
7343
|
+
}
|
|
7344
|
+
interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
7136
7345
|
sessionId: string;
|
|
7137
7346
|
genNo: number;
|
|
7138
7347
|
acSessionId: string;
|
|
7139
7348
|
acGenNo: number;
|
|
7140
7349
|
}
|
|
7141
7350
|
declare class ConversationMessage extends TsEmbed {
|
|
7142
|
-
protected viewConfig:
|
|
7143
|
-
constructor(container: HTMLElement, viewConfig:
|
|
7351
|
+
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
7352
|
+
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
7144
7353
|
getIframeSrc(): string;
|
|
7145
7354
|
render(): Promise<ConversationMessage>;
|
|
7146
7355
|
}
|
|
@@ -7149,9 +7358,9 @@ declare class ConversationMessage extends TsEmbed {
|
|
|
7149
7358
|
* chatbots or other conversational interfaces.
|
|
7150
7359
|
* @example
|
|
7151
7360
|
* ```js
|
|
7152
|
-
* import {
|
|
7361
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
7153
7362
|
*
|
|
7154
|
-
* const conversation = new
|
|
7363
|
+
* const conversation = new SpotterAgentEmbed({
|
|
7155
7364
|
* worksheetId: 'worksheetId',
|
|
7156
7365
|
* });
|
|
7157
7366
|
*
|
|
@@ -7161,10 +7370,10 @@ declare class ConversationMessage extends TsEmbed {
|
|
|
7161
7370
|
* document.body.appendChild(container); // or to any other element
|
|
7162
7371
|
* ```
|
|
7163
7372
|
* @group Embed components
|
|
7164
|
-
* @version SDK: 1.
|
|
7373
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
7165
7374
|
*/
|
|
7166
|
-
export declare class
|
|
7167
|
-
constructor(viewConfig:
|
|
7375
|
+
export declare class SpotterAgentEmbed {
|
|
7376
|
+
constructor(viewConfig: SpotterAgentEmbedViewConfig);
|
|
7168
7377
|
sendMessage(userMessage: string): Promise<{
|
|
7169
7378
|
error: any;
|
|
7170
7379
|
container?: undefined;
|
|
@@ -7175,6 +7384,29 @@ export declare class BodylessConversation {
|
|
|
7175
7384
|
error?: undefined;
|
|
7176
7385
|
}>;
|
|
7177
7386
|
}
|
|
7387
|
+
/**
|
|
7388
|
+
* Create a conversation embed, which can be integrated inside
|
|
7389
|
+
* chatbots or other conversational interfaces.
|
|
7390
|
+
* @deprecated Renamed to SpotterAgentEmbed
|
|
7391
|
+
* @example
|
|
7392
|
+
* ```js
|
|
7393
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
7394
|
+
*
|
|
7395
|
+
* const conversation = new SpotterAgentEmbed({
|
|
7396
|
+
* worksheetId: 'worksheetId',
|
|
7397
|
+
* });
|
|
7398
|
+
*
|
|
7399
|
+
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
7400
|
+
*
|
|
7401
|
+
* // append the container to the DOM
|
|
7402
|
+
* document.body.appendChild(container); // or to any other element
|
|
7403
|
+
* ```
|
|
7404
|
+
* @group Embed components
|
|
7405
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
7406
|
+
*/
|
|
7407
|
+
export declare class BodylessConversation extends SpotterAgentEmbed {
|
|
7408
|
+
constructor(viewConfig: BodylessConversationViewConfig);
|
|
7409
|
+
}
|
|
7178
7410
|
export {};
|
|
7179
7411
|
|
|
7180
7412
|
export type SessionInfo = {
|
|
@@ -7690,29 +7922,49 @@ export interface UnderlyingDataPoint {
|
|
|
7690
7922
|
dataValue: any;
|
|
7691
7923
|
}
|
|
7692
7924
|
/**
|
|
7693
|
-
*
|
|
7694
|
-
*
|
|
7695
|
-
*
|
|
7696
|
-
*
|
|
7925
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7926
|
+
*
|
|
7927
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7928
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7929
|
+
* directly from your application.
|
|
7930
|
+
*
|
|
7931
|
+
* You can use this service to:
|
|
7932
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7933
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7934
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7935
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7936
|
+
* - Run custom queries (`executeQuery`)
|
|
7937
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7938
|
+
*
|
|
7697
7939
|
* @example
|
|
7698
7940
|
* ```js
|
|
7699
|
-
*
|
|
7700
|
-
*
|
|
7701
|
-
*
|
|
7702
|
-
*
|
|
7703
|
-
*
|
|
7704
|
-
*
|
|
7941
|
+
* // Get the answer service
|
|
7942
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
7943
|
+
* const service = await embed.getAnswerService();
|
|
7944
|
+
*
|
|
7945
|
+
* // Add columns to the answer
|
|
7946
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
7947
|
+
*
|
|
7948
|
+
* // Get the data
|
|
7949
|
+
* const data = await service.fetchData();
|
|
7950
|
+
* console.log(data);
|
|
7951
|
+
* });
|
|
7705
7952
|
* ```
|
|
7953
|
+
*
|
|
7706
7954
|
* @example
|
|
7707
7955
|
* ```js
|
|
7708
|
-
*
|
|
7709
|
-
*
|
|
7710
|
-
* await
|
|
7711
|
-
*
|
|
7956
|
+
* // Get data for a point in a visualization
|
|
7957
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
7958
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
7959
|
+
* 'Product Name',
|
|
7960
|
+
* 'Sales Amount'
|
|
7712
7961
|
* ]);
|
|
7713
|
-
*
|
|
7962
|
+
*
|
|
7963
|
+
* const data = await underlying.fetchData(0, 100);
|
|
7964
|
+
* console.log(data);
|
|
7714
7965
|
* });
|
|
7715
7966
|
* ```
|
|
7967
|
+
*
|
|
7716
7968
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7717
7969
|
* @group Events
|
|
7718
7970
|
*/
|