@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
|
|
@@ -279,7 +298,8 @@ export declare enum AuthFailureType {
|
|
|
279
298
|
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
280
299
|
EXPIRY = "EXPIRY",
|
|
281
300
|
OTHER = "OTHER",
|
|
282
|
-
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT"
|
|
301
|
+
IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
|
|
302
|
+
UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
|
|
283
303
|
}
|
|
284
304
|
/**
|
|
285
305
|
* Enum for auth status emitted by the emitter returned from {@link init}.
|
|
@@ -313,7 +333,11 @@ export declare enum AuthStatus {
|
|
|
313
333
|
* or by the trigger button.
|
|
314
334
|
* @version SDK: 1.19.0
|
|
315
335
|
*/
|
|
316
|
-
WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
|
|
336
|
+
WAITING_FOR_POPUP = "WAITING_FOR_POPUP",
|
|
337
|
+
/**
|
|
338
|
+
* Emitted when the SAML popup is closed without authentication
|
|
339
|
+
*/
|
|
340
|
+
SAML_POPUP_CLOSED_NO_AUTH = "SAML_POPUP_CLOSED_NO_AUTH"
|
|
317
341
|
}
|
|
318
342
|
/**
|
|
319
343
|
* Event emitter returned from {@link init}.
|
|
@@ -331,10 +355,10 @@ export interface AuthEventEmitter {
|
|
|
331
355
|
* @param event
|
|
332
356
|
* @param listener
|
|
333
357
|
*/
|
|
334
|
-
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
358
|
+
on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
|
|
335
359
|
on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
336
360
|
once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
|
|
337
|
-
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
|
|
361
|
+
once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
|
|
338
362
|
once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
|
|
339
363
|
/**
|
|
340
364
|
* Trigger an event on the emitter returned from init.
|
|
@@ -1130,6 +1154,51 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1130
1154
|
* ```
|
|
1131
1155
|
*/
|
|
1132
1156
|
enablePendoHelp?: boolean;
|
|
1157
|
+
/**
|
|
1158
|
+
* Control the visibility of the hamburger icon on the top nav bar
|
|
1159
|
+
* available when new navigation V3 is enabled.
|
|
1160
|
+
*
|
|
1161
|
+
* @default false
|
|
1162
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1163
|
+
* @example
|
|
1164
|
+
* ```js
|
|
1165
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1166
|
+
* ... // other options
|
|
1167
|
+
* hideHamburger : true,
|
|
1168
|
+
* })
|
|
1169
|
+
* ```
|
|
1170
|
+
*/
|
|
1171
|
+
hideHamburger?: boolean;
|
|
1172
|
+
/**
|
|
1173
|
+
* Control the visibility of the Eureka search on the top nav bar
|
|
1174
|
+
* this will control for both new V2 and new navigation V3.
|
|
1175
|
+
*
|
|
1176
|
+
* @default true
|
|
1177
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1178
|
+
* @example
|
|
1179
|
+
* ```js
|
|
1180
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1181
|
+
* ... // other options
|
|
1182
|
+
* hideObjectSearch: false,
|
|
1183
|
+
* })
|
|
1184
|
+
* ```
|
|
1185
|
+
*/
|
|
1186
|
+
hideObjectSearch?: boolean;
|
|
1187
|
+
/**
|
|
1188
|
+
* Control the visibility of the notification on the top nav bar V3,
|
|
1189
|
+
* available when new navigation V3 is enabled.
|
|
1190
|
+
*
|
|
1191
|
+
* @default true
|
|
1192
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1193
|
+
* @example
|
|
1194
|
+
* ```js
|
|
1195
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1196
|
+
* ... // other options
|
|
1197
|
+
* hideNotification: false,
|
|
1198
|
+
* })
|
|
1199
|
+
* ```
|
|
1200
|
+
*/
|
|
1201
|
+
hideNotification?: boolean;
|
|
1133
1202
|
/**
|
|
1134
1203
|
* Control the visibility of the application switcher button on the nav-bar.
|
|
1135
1204
|
* By default, the application switcher is shown.
|
|
@@ -1323,6 +1392,20 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
|
|
|
1323
1392
|
* ```
|
|
1324
1393
|
*/
|
|
1325
1394
|
modularHomeExperience?: boolean;
|
|
1395
|
+
/**
|
|
1396
|
+
* Flag to control new navigation v3 home experience.
|
|
1397
|
+
*
|
|
1398
|
+
* @default false
|
|
1399
|
+
* @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
|
|
1400
|
+
* @example
|
|
1401
|
+
* ```js
|
|
1402
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
1403
|
+
* ... // other options
|
|
1404
|
+
* modularHomeExperienceV3 : true,
|
|
1405
|
+
* })
|
|
1406
|
+
* ```
|
|
1407
|
+
*/
|
|
1408
|
+
modularHomeExperienceV3?: boolean;
|
|
1326
1409
|
/**
|
|
1327
1410
|
* Boolean to control if Liveboard header is sticky or not.
|
|
1328
1411
|
* @example
|
|
@@ -2134,7 +2217,19 @@ export declare enum HomeLeftNavItem {
|
|
|
2134
2217
|
/**
|
|
2135
2218
|
* @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
|
|
2136
2219
|
*/
|
|
2137
|
-
LiveboardSchedules = "liveboard-schedules"
|
|
2220
|
+
LiveboardSchedules = "liveboard-schedules",
|
|
2221
|
+
/**
|
|
2222
|
+
* Create new options in the insights left navigation,
|
|
2223
|
+
* available when new navigation V3 is enabled.
|
|
2224
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
2225
|
+
*/
|
|
2226
|
+
Create = "create",
|
|
2227
|
+
/**
|
|
2228
|
+
* Spotter option in the insights left navigation,
|
|
2229
|
+
* available when new navigation V3 is enabled.
|
|
2230
|
+
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
2231
|
+
*/
|
|
2232
|
+
Spotter = "spotter"
|
|
2138
2233
|
}
|
|
2139
2234
|
export type DOMSelector = string | HTMLElement;
|
|
2140
2235
|
/**
|
|
@@ -2615,6 +2710,19 @@ export interface ViewConfig {
|
|
|
2615
2710
|
* ```
|
|
2616
2711
|
*/
|
|
2617
2712
|
disabledActions?: Action[];
|
|
2713
|
+
/**
|
|
2714
|
+
* The primary action to display on top of the viz for Liveboard and App Embed.
|
|
2715
|
+
* Use this to set the primary action.
|
|
2716
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
2717
|
+
* @example
|
|
2718
|
+
* ```js
|
|
2719
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
2720
|
+
* ... // other liveboard view config
|
|
2721
|
+
* primaryAction: Action.Download
|
|
2722
|
+
* });
|
|
2723
|
+
* ```
|
|
2724
|
+
*/
|
|
2725
|
+
primaryAction?: Action | string;
|
|
2618
2726
|
/**
|
|
2619
2727
|
* The tooltip to display for disabled actions.
|
|
2620
2728
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
@@ -5204,8 +5312,17 @@ export declare enum HostEvent {
|
|
|
5204
5312
|
/**
|
|
5205
5313
|
* Get the Answer session for a Search or
|
|
5206
5314
|
* Liveboard visualization.
|
|
5315
|
+
*
|
|
5316
|
+
* Note: This event is not typically used directly. Instead, use the
|
|
5317
|
+
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
5318
|
+
* object that provides a more convenient interface for working with answers.
|
|
5319
|
+
*
|
|
5207
5320
|
* @example
|
|
5208
5321
|
* ```js
|
|
5322
|
+
* // Preferred way to get an AnswerService
|
|
5323
|
+
* const service = await embed.getAnswerService();
|
|
5324
|
+
*
|
|
5325
|
+
* // Alternative direct usage (not recommended)
|
|
5209
5326
|
* const {session} = await embed.trigger(
|
|
5210
5327
|
* HostEvent.GetAnswerSession, {
|
|
5211
5328
|
* vizId: '123', // For Liveboard Visualization.
|
|
@@ -5213,6 +5330,10 @@ export declare enum HostEvent {
|
|
|
5213
5330
|
* ```
|
|
5214
5331
|
* @example
|
|
5215
5332
|
* ```js
|
|
5333
|
+
* // Preferred way to get an AnswerService
|
|
5334
|
+
* const service = await embed.getAnswerService();
|
|
5335
|
+
*
|
|
5336
|
+
* // Alternative direct usage (not recommended)
|
|
5216
5337
|
* const {session} = await embed.trigger( HostEvent.GetAnswerSession )
|
|
5217
5338
|
* ```
|
|
5218
5339
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
|
|
@@ -5340,7 +5461,55 @@ export declare enum HostEvent {
|
|
|
5340
5461
|
* ```
|
|
5341
5462
|
* @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
5342
5463
|
*/
|
|
5343
|
-
TransformTableVizData = "TransformTableVizData"
|
|
5464
|
+
TransformTableVizData = "TransformTableVizData",
|
|
5465
|
+
/**
|
|
5466
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5467
|
+
* Includes the following properties:
|
|
5468
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5469
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5470
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5471
|
+
*/
|
|
5472
|
+
SpotterSearch = "SpotterSearch",
|
|
5473
|
+
/**
|
|
5474
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5475
|
+
* Includes the following properties:
|
|
5476
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5477
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5478
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5479
|
+
*/
|
|
5480
|
+
EditLastPrompt = "EditLastPrompt",
|
|
5481
|
+
/**
|
|
5482
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5483
|
+
* Includes the following properties:
|
|
5484
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5485
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5486
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5487
|
+
*/
|
|
5488
|
+
PreviewSpotterData = "PreviewSpotterData",
|
|
5489
|
+
/**
|
|
5490
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5491
|
+
* Includes the following properties:
|
|
5492
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5493
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5494
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5495
|
+
*/
|
|
5496
|
+
ResetSpotterConversation = "ResetSpotterConversation",
|
|
5497
|
+
/**
|
|
5498
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5499
|
+
* Includes the following properties:
|
|
5500
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5501
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5502
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5503
|
+
*/
|
|
5504
|
+
DeleteLastPrompt = "DeleteLastPrompt",
|
|
5505
|
+
/**
|
|
5506
|
+
* Triggers the table visualization re-render with the updated data.
|
|
5507
|
+
* Includes the following properties:
|
|
5508
|
+
* @param - `columnDataLite` - an array of object containing the
|
|
5509
|
+
* data value modifications retrieved from the `EmbedEvent.TableVizRendered`
|
|
5510
|
+
* payload.For example, { columnDataLite: []}`.
|
|
5511
|
+
*/
|
|
5512
|
+
AnswerChartSwitcher = "answerChartSwitcher"
|
|
5344
5513
|
}
|
|
5345
5514
|
/**
|
|
5346
5515
|
* The different visual modes that the data sources panel within
|
|
@@ -5411,6 +5580,10 @@ export declare enum Param {
|
|
|
5411
5580
|
ShowInsertToSlide = "insertInToSlide",
|
|
5412
5581
|
PrimaryNavHidden = "primaryNavHidden",
|
|
5413
5582
|
HideProfleAndHelp = "profileAndHelpInNavBarHidden",
|
|
5583
|
+
NavigationVersion = "navigationVersion",
|
|
5584
|
+
HideHamburger = "hideHamburger",
|
|
5585
|
+
HideObjectSearch = "hideObjectSearch",
|
|
5586
|
+
HideNotification = "hideNotification",
|
|
5414
5587
|
HideApplicationSwitcher = "applicationSwitcherHidden",
|
|
5415
5588
|
HideOrgSwitcher = "orgSwitcherHidden",
|
|
5416
5589
|
IsSageEmbed = "isSageEmbed",
|
|
@@ -5466,7 +5639,9 @@ export declare enum Param {
|
|
|
5466
5639
|
DataSourceId = "dataSourceId",
|
|
5467
5640
|
preAuthCache = "preAuthCache",
|
|
5468
5641
|
ShowSpotterLimitations = "showSpotterLimitations",
|
|
5469
|
-
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
|
|
5642
|
+
CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
|
|
5643
|
+
PrimaryAction = "primaryAction",
|
|
5644
|
+
isSpotterAgentEmbed = "isSpotterAgentEmbed"
|
|
5470
5645
|
}
|
|
5471
5646
|
/**
|
|
5472
5647
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6871,10 +7046,10 @@ export interface SearchOptions {
|
|
|
6871
7046
|
searchQuery: string;
|
|
6872
7047
|
}
|
|
6873
7048
|
/**
|
|
6874
|
-
* The configuration for the embedded
|
|
7049
|
+
* The configuration for the embedded spotterEmbed options.
|
|
6875
7050
|
* @group Embed components
|
|
6876
7051
|
*/
|
|
6877
|
-
export interface
|
|
7052
|
+
export interface SpotterEmbedViewConfig extends ViewConfig {
|
|
6878
7053
|
/**
|
|
6879
7054
|
* The ID of the worksheet to use for the conversation.
|
|
6880
7055
|
*/
|
|
@@ -6888,7 +7063,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6888
7063
|
* but still display the selected data source.
|
|
6889
7064
|
* @example
|
|
6890
7065
|
* ```js
|
|
6891
|
-
* const embed = new
|
|
7066
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6892
7067
|
* ... // other options
|
|
6893
7068
|
* disableSourceSelection : true,
|
|
6894
7069
|
* })
|
|
@@ -6900,7 +7075,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6900
7075
|
* hideSourceSelection : Hide data source selection
|
|
6901
7076
|
* @example
|
|
6902
7077
|
* ```js
|
|
6903
|
-
* const embed = new
|
|
7078
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6904
7079
|
* ... // other options
|
|
6905
7080
|
* hideSourceSelection : true,
|
|
6906
7081
|
* })
|
|
@@ -6927,7 +7102,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6927
7102
|
* default is false.
|
|
6928
7103
|
* @example
|
|
6929
7104
|
* ```js
|
|
6930
|
-
* const embed = new
|
|
7105
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6931
7106
|
* ... // other options
|
|
6932
7107
|
* showSpotterLimitations : true,
|
|
6933
7108
|
* })
|
|
@@ -6940,7 +7115,7 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6940
7115
|
* the initial screen of the conversation.
|
|
6941
7116
|
* @example
|
|
6942
7117
|
* ```js
|
|
6943
|
-
* const embed = new
|
|
7118
|
+
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
6944
7119
|
* ... // other options
|
|
6945
7120
|
* hideSampleQuestions : true,
|
|
6946
7121
|
* })
|
|
@@ -6949,12 +7124,19 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6949
7124
|
*/
|
|
6950
7125
|
hideSampleQuestions?: boolean;
|
|
6951
7126
|
}
|
|
7127
|
+
/**
|
|
7128
|
+
* The configuration for the embedded spotterEmbed options.
|
|
7129
|
+
* @deprecated Renamed to SpotterEmbedViewConfig
|
|
7130
|
+
* @group Embed components
|
|
7131
|
+
*/
|
|
7132
|
+
export interface ConversationViewConfig extends SpotterEmbedViewConfig {
|
|
7133
|
+
}
|
|
6952
7134
|
/**
|
|
6953
7135
|
* Embed ThoughtSpot AI Conversation.
|
|
6954
7136
|
* @group Embed components
|
|
6955
7137
|
* @example
|
|
6956
7138
|
* ```js
|
|
6957
|
-
* const conversation = new
|
|
7139
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
6958
7140
|
* worksheetId: 'worksheetId',
|
|
6959
7141
|
* searchOptions: {
|
|
6960
7142
|
* searchQuery: 'searchQuery',
|
|
@@ -6962,13 +7144,33 @@ export interface ConversationViewConfig extends ViewConfig {
|
|
|
6962
7144
|
* });
|
|
6963
7145
|
* conversation.render();
|
|
6964
7146
|
* ```
|
|
6965
|
-
* @version SDK: 1.
|
|
7147
|
+
* @version SDK: 1.38.0 | ThoughtSpot: 10.10.0.cl
|
|
6966
7148
|
*/
|
|
6967
|
-
export declare class
|
|
7149
|
+
export declare class SpotterEmbed extends TsEmbed {
|
|
7150
|
+
protected viewConfig: SpotterEmbedViewConfig;
|
|
7151
|
+
constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
|
|
7152
|
+
getIframeSrc(): string;
|
|
7153
|
+
render(): Promise<SpotterEmbed>;
|
|
7154
|
+
}
|
|
7155
|
+
/**
|
|
7156
|
+
* Embed ThoughtSpot AI Conversation.
|
|
7157
|
+
* @deprecated Renamed to SpotterEmbed
|
|
7158
|
+
* @group Embed components
|
|
7159
|
+
* @example
|
|
7160
|
+
* ```js
|
|
7161
|
+
* const conversation = new SpotterEmbed('#tsEmbed', {
|
|
7162
|
+
* worksheetId: 'worksheetId',
|
|
7163
|
+
* searchOptions: {
|
|
7164
|
+
* searchQuery: 'searchQuery',
|
|
7165
|
+
* },
|
|
7166
|
+
* });
|
|
7167
|
+
* conversation.render();
|
|
7168
|
+
* ```
|
|
7169
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
7170
|
+
*/
|
|
7171
|
+
export declare class ConversationEmbed extends SpotterEmbed {
|
|
6968
7172
|
protected viewConfig: ConversationViewConfig;
|
|
6969
7173
|
constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
|
|
6970
|
-
getIframeSrc(): string;
|
|
6971
|
-
render(): Promise<ConversationEmbed>;
|
|
6972
7174
|
}
|
|
6973
7175
|
|
|
6974
7176
|
/**
|
|
@@ -6979,7 +7181,7 @@ export declare class ConversationEmbed extends TsEmbed {
|
|
|
6979
7181
|
* @summary ThoughtSpot Visual Embed SDK
|
|
6980
7182
|
* @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
|
|
6981
7183
|
*/
|
|
6982
|
-
export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed,
|
|
7184
|
+
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, };
|
|
6983
7185
|
|
|
6984
7186
|
/**
|
|
6985
7187
|
* Copyright (c) 2022
|
|
@@ -7777,29 +7979,49 @@ export interface UnderlyingDataPoint {
|
|
|
7777
7979
|
dataValue: any;
|
|
7778
7980
|
}
|
|
7779
7981
|
/**
|
|
7780
|
-
*
|
|
7781
|
-
*
|
|
7782
|
-
*
|
|
7783
|
-
*
|
|
7982
|
+
* AnswerService provides a simple way to work with ThoughtSpot Answers.
|
|
7983
|
+
*
|
|
7984
|
+
* This service allows you to interact with ThoughtSpot Answers programmatically,
|
|
7985
|
+
* making it easy to customize visualizations, filter data, and extract insights
|
|
7986
|
+
* directly from your application.
|
|
7987
|
+
*
|
|
7988
|
+
* You can use this service to:
|
|
7989
|
+
* - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
|
|
7990
|
+
* - Apply filters to Answers (`addFilter`)
|
|
7991
|
+
* - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
|
|
7992
|
+
* - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
|
|
7993
|
+
* - Run custom queries (`executeQuery`)
|
|
7994
|
+
* - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
|
|
7995
|
+
*
|
|
7784
7996
|
* @example
|
|
7785
7997
|
* ```js
|
|
7786
|
-
*
|
|
7787
|
-
*
|
|
7788
|
-
*
|
|
7789
|
-
*
|
|
7790
|
-
*
|
|
7791
|
-
*
|
|
7998
|
+
* // Get the answer service
|
|
7999
|
+
* embed.on(EmbedEvent.Data, async (e) => {
|
|
8000
|
+
* const service = await embed.getAnswerService();
|
|
8001
|
+
*
|
|
8002
|
+
* // Add columns to the answer
|
|
8003
|
+
* await service.addColumnsByName(["Sales", "Region"]);
|
|
8004
|
+
*
|
|
8005
|
+
* // Get the data
|
|
8006
|
+
* const data = await service.fetchData();
|
|
8007
|
+
* console.log(data);
|
|
8008
|
+
* });
|
|
7792
8009
|
* ```
|
|
8010
|
+
*
|
|
7793
8011
|
* @example
|
|
7794
8012
|
* ```js
|
|
7795
|
-
*
|
|
7796
|
-
*
|
|
7797
|
-
* await
|
|
7798
|
-
*
|
|
8013
|
+
* // Get data for a point in a visualization
|
|
8014
|
+
* embed.on(EmbedEvent.CustomAction, async (e) => {
|
|
8015
|
+
* const underlying = await e.answerService.getUnderlyingDataForPoint([
|
|
8016
|
+
* 'Product Name',
|
|
8017
|
+
* 'Sales Amount'
|
|
7799
8018
|
* ]);
|
|
7800
|
-
*
|
|
8019
|
+
*
|
|
8020
|
+
* const data = await underlying.fetchData(0, 100);
|
|
8021
|
+
* console.log(data);
|
|
7801
8022
|
* });
|
|
7802
8023
|
* ```
|
|
8024
|
+
*
|
|
7803
8025
|
* @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
|
|
7804
8026
|
* @group Events
|
|
7805
8027
|
*/
|
|
@@ -8079,21 +8301,28 @@ export declare function reset(): void;
|
|
|
8079
8301
|
* Configuration for bodyless conversation options.
|
|
8080
8302
|
* @group Embed components
|
|
8081
8303
|
*/
|
|
8082
|
-
export interface
|
|
8304
|
+
export interface SpotterAgentEmbedViewConfig extends ViewConfig {
|
|
8083
8305
|
/**
|
|
8084
8306
|
* The ID of the worksheet to use for the conversation.
|
|
8085
8307
|
*/
|
|
8086
8308
|
worksheetId: string;
|
|
8087
8309
|
}
|
|
8088
|
-
|
|
8310
|
+
/**
|
|
8311
|
+
* Configuration for conversation options.
|
|
8312
|
+
* @deprecated Renamed to SpotterAgentEmbedViewConfig
|
|
8313
|
+
* @group Embed components
|
|
8314
|
+
*/
|
|
8315
|
+
export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
|
|
8316
|
+
}
|
|
8317
|
+
interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
|
|
8089
8318
|
sessionId: string;
|
|
8090
8319
|
genNo: number;
|
|
8091
8320
|
acSessionId: string;
|
|
8092
8321
|
acGenNo: number;
|
|
8093
8322
|
}
|
|
8094
8323
|
declare class ConversationMessage extends TsEmbed {
|
|
8095
|
-
protected viewConfig:
|
|
8096
|
-
constructor(container: HTMLElement, viewConfig:
|
|
8324
|
+
protected viewConfig: SpotterAgentMessageViewConfig;
|
|
8325
|
+
constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
|
|
8097
8326
|
getIframeSrc(): string;
|
|
8098
8327
|
render(): Promise<ConversationMessage>;
|
|
8099
8328
|
}
|
|
@@ -8102,9 +8331,9 @@ declare class ConversationMessage extends TsEmbed {
|
|
|
8102
8331
|
* chatbots or other conversational interfaces.
|
|
8103
8332
|
* @example
|
|
8104
8333
|
* ```js
|
|
8105
|
-
* import {
|
|
8334
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
8106
8335
|
*
|
|
8107
|
-
* const conversation = new
|
|
8336
|
+
* const conversation = new SpotterAgentEmbed({
|
|
8108
8337
|
* worksheetId: 'worksheetId',
|
|
8109
8338
|
* });
|
|
8110
8339
|
*
|
|
@@ -8114,10 +8343,10 @@ declare class ConversationMessage extends TsEmbed {
|
|
|
8114
8343
|
* document.body.appendChild(container); // or to any other element
|
|
8115
8344
|
* ```
|
|
8116
8345
|
* @group Embed components
|
|
8117
|
-
* @version SDK: 1.
|
|
8346
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
8118
8347
|
*/
|
|
8119
|
-
export declare class
|
|
8120
|
-
constructor(viewConfig:
|
|
8348
|
+
export declare class SpotterAgentEmbed {
|
|
8349
|
+
constructor(viewConfig: SpotterAgentEmbedViewConfig);
|
|
8121
8350
|
sendMessage(userMessage: string): Promise<{
|
|
8122
8351
|
error: any;
|
|
8123
8352
|
container?: undefined;
|
|
@@ -8128,6 +8357,29 @@ export declare class BodylessConversation {
|
|
|
8128
8357
|
error?: undefined;
|
|
8129
8358
|
}>;
|
|
8130
8359
|
}
|
|
8360
|
+
/**
|
|
8361
|
+
* Create a conversation embed, which can be integrated inside
|
|
8362
|
+
* chatbots or other conversational interfaces.
|
|
8363
|
+
* @deprecated Renamed to SpotterAgentEmbed
|
|
8364
|
+
* @example
|
|
8365
|
+
* ```js
|
|
8366
|
+
* import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
|
|
8367
|
+
*
|
|
8368
|
+
* const conversation = new SpotterAgentEmbed({
|
|
8369
|
+
* worksheetId: 'worksheetId',
|
|
8370
|
+
* });
|
|
8371
|
+
*
|
|
8372
|
+
* const { container, error } = await conversation.sendMessage('show me sales by region');
|
|
8373
|
+
*
|
|
8374
|
+
* // append the container to the DOM
|
|
8375
|
+
* document.body.appendChild(container); // or to any other element
|
|
8376
|
+
* ```
|
|
8377
|
+
* @group Embed components
|
|
8378
|
+
* @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
|
|
8379
|
+
*/
|
|
8380
|
+
export declare class BodylessConversation extends SpotterAgentEmbed {
|
|
8381
|
+
constructor(viewConfig: BodylessConversationViewConfig);
|
|
8382
|
+
}
|
|
8131
8383
|
export {};
|
|
8132
8384
|
|
|
8133
8385
|
export type SessionInfo = {
|