@thoughtspot/visual-embed-sdk 1.51.2 → 1.52.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/cjs/package.json +9 -1
- package/cjs/src/api-intercept.d.ts.map +1 -1
- package/cjs/src/api-intercept.js +1 -0
- package/cjs/src/api-intercept.js.map +1 -1
- package/cjs/src/contracts/contracts.spec.d.ts +2 -0
- package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
- package/cjs/src/contracts/contracts.spec.js +345 -0
- package/cjs/src/contracts/contracts.spec.js.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.js +3 -0
- package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
- package/cjs/src/contracts/host-event-contracts.d.ts +378 -0
- package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/cjs/src/contracts/host-event-contracts.js +3 -0
- package/cjs/src/contracts/host-event-contracts.js.map +1 -0
- package/cjs/src/contracts/index.d.ts +22 -0
- package/cjs/src/contracts/index.d.ts.map +1 -0
- package/cjs/src/contracts/index.js +33 -0
- package/cjs/src/contracts/index.js.map +1 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/cjs/src/css-variables.d.ts +1 -1
- package/cjs/src/embed/app.d.ts +17 -140
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +20 -120
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +70 -26
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +5 -5
- package/cjs/src/embed/events.spec.js +12 -2
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -2
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +23 -18
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +36 -36
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.js +3 -3
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +9 -161
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +68 -135
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +215 -32
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +14 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +4 -1
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +65 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +21 -25
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +105 -72
- 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 +380 -33
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/full-height.d.ts +137 -0
- package/cjs/src/full-height.d.ts.map +1 -0
- package/cjs/src/full-height.js +272 -0
- package/cjs/src/full-height.js.map +1 -0
- package/cjs/src/full-height.spec.d.ts +2 -0
- package/cjs/src/full-height.spec.d.ts.map +1 -0
- package/cjs/src/full-height.spec.js +835 -0
- package/cjs/src/full-height.spec.js.map +1 -0
- package/cjs/src/index.d.ts +4 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +5 -4
- 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 +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.js +55 -3
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
- package/cjs/src/react/index.d.ts +8 -8
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +1 -1
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/react/index.spec.js +7 -7
- package/cjs/src/react/index.spec.js.map +1 -1
- package/cjs/src/types.d.ts +664 -39
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +406 -13
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +3 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +19 -51
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
- package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.js +108 -0
- package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/cjs/src/utils.d.ts +18 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +39 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +62 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-D8_Zs-Nr.js → index-C1pmYb5H.js} +1 -1
- package/dist/src/api-intercept.d.ts.map +1 -1
- package/dist/src/contracts/contracts.spec.d.ts +2 -0
- package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
- package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
- package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/dist/src/contracts/host-event-contracts.d.ts +378 -0
- package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/dist/src/contracts/index.d.ts +22 -0
- package/dist/src/contracts/index.d.ts.map +1 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/dist/src/css-variables.d.ts +1 -1
- package/dist/src/embed/app.d.ts +17 -140
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +5 -5
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -2
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +9 -161
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +14 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +21 -25
- 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/full-height.d.ts +137 -0
- package/dist/src/full-height.d.ts.map +1 -0
- package/dist/src/full-height.spec.d.ts +2 -0
- package/dist/src/full-height.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -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 +8 -8
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +664 -39
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/processTrigger.d.ts +3 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
- package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/dist/src/utils.d.ts +18 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1031 -392
- package/dist/tsembed-react.js +1030 -391
- package/dist/tsembed.es.js +1031 -392
- package/dist/tsembed.js +1029 -390
- package/dist/visual-embed-sdk-react-full.d.ts +1483 -693
- package/dist/visual-embed-sdk-react.d.ts +1364 -647
- package/dist/visual-embed-sdk.d.ts +1426 -659
- package/lib/package.json +9 -1
- package/lib/src/api-intercept.d.ts.map +1 -1
- package/lib/src/api-intercept.js +2 -1
- package/lib/src/api-intercept.js.map +1 -1
- package/lib/src/contracts/contracts.spec.d.ts +2 -0
- package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
- package/lib/src/contracts/contracts.spec.js +342 -0
- package/lib/src/contracts/contracts.spec.js.map +1 -0
- package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
- package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/lib/src/contracts/embed-event-payloads.js +2 -0
- package/lib/src/contracts/embed-event-payloads.js.map +1 -0
- package/lib/src/contracts/host-event-contracts.d.ts +378 -0
- package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/lib/src/contracts/host-event-contracts.js +2 -0
- package/lib/src/contracts/host-event-contracts.js.map +1 -0
- package/lib/src/contracts/index.d.ts +22 -0
- package/lib/src/contracts/index.d.ts.map +1 -0
- package/lib/src/contracts/index.js +22 -0
- package/lib/src/contracts/index.js.map +1 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/lib/src/css-variables.d.ts +1 -1
- package/lib/src/embed/app.d.ts +17 -140
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +22 -122
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +70 -26
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +5 -5
- package/lib/src/embed/events.spec.js +12 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -2
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +6 -1
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/utils.js +1 -1
- package/lib/src/embed/hostEventClient/utils.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +9 -161
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +70 -137
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +215 -32
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +14 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +4 -1
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +65 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +21 -25
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +106 -73
- 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 +378 -31
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/full-height.d.ts +137 -0
- package/lib/src/full-height.d.ts.map +1 -0
- package/lib/src/full-height.js +268 -0
- package/lib/src/full-height.js.map +1 -0
- package/lib/src/full-height.spec.d.ts +2 -0
- package/lib/src/full-height.spec.d.ts.map +1 -0
- package/lib/src/full-height.spec.js +833 -0
- package/lib/src/full-height.spec.js.map +1 -0
- package/lib/src/index.d.ts +4 -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/all-types-export.parity.spec.js +55 -3
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
- package/lib/src/react/index.d.ts +8 -8
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +1 -1
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/react/index.spec.js +7 -7
- package/lib/src/react/index.spec.js.map +1 -1
- package/lib/src/types.d.ts +664 -39
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +405 -12
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +3 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +19 -51
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
- package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.js +101 -0
- package/lib/src/utils/transport/iframe-transport.js.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
- package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/lib/src/utils.d.ts +18 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +37 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +63 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1426 -659
- package/package.json +9 -1
- package/src/api-intercept.ts +2 -1
- package/src/contracts/contracts.spec.ts +392 -0
- package/src/contracts/embed-event-payloads.ts +83 -0
- package/src/contracts/host-event-contracts.ts +456 -0
- package/src/contracts/index.ts +53 -0
- package/src/contracts/ui-passthrough-contracts.ts +301 -0
- package/src/css-variables.ts +1 -1
- package/src/embed/app.spec.ts +86 -34
- package/src/embed/app.ts +37 -264
- package/src/embed/conversation.ts +5 -5
- package/src/embed/events.spec.ts +14 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
- package/src/embed/hostEventClient/host-event-client.ts +18 -5
- package/src/embed/hostEventClient/utils.ts +2 -1
- package/src/embed/liveboard.spec.ts +261 -42
- package/src/embed/liveboard.ts +78 -297
- package/src/embed/search.spec.ts +80 -0
- package/src/embed/search.ts +20 -0
- package/src/embed/ts-embed.spec.ts +518 -31
- package/src/embed/ts-embed.ts +133 -82
- package/src/full-height.spec.ts +1008 -0
- package/src/full-height.ts +361 -0
- package/src/index.ts +95 -5
- package/src/react/all-types-export.parity.spec.ts +63 -3
- package/src/react/all-types-export.ts +46 -0
- package/src/react/index.spec.tsx +7 -7
- package/src/react/index.tsx +9 -9
- package/src/types.ts +665 -37
- package/src/utils/processTrigger.ts +28 -58
- package/src/utils/transport/iframe-transport.spec.ts +177 -0
- package/src/utils/transport/iframe-transport.ts +122 -0
- package/src/utils.spec.ts +71 -0
- package/src/utils.ts +38 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
- package/src/embed/hostEventClient/contracts.ts +0 -262
|
@@ -444,7 +444,7 @@ export interface CustomCssVariables {
|
|
|
444
444
|
* Left and right margin of the header and the tab/filter section of an
|
|
445
445
|
* embedded Liveboard. Use alongside the `liveboardGutter` view config to
|
|
446
446
|
* keep the header aligned with a custom tile-grid gutter.
|
|
447
|
-
* @version SDK: 1.
|
|
447
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
448
448
|
*/
|
|
449
449
|
"--ts-var-liveboard-header-horizontal-margin"?: string;
|
|
450
450
|
/**
|
|
@@ -1300,6 +1300,280 @@ export class AnswerService {
|
|
|
1300
1300
|
addDisplayedVizToLiveboard(liveboardId: string): Promise<any>;
|
|
1301
1301
|
setTMLOverride(override: any): void;
|
|
1302
1302
|
}
|
|
1303
|
+
export interface LiveboardTab {
|
|
1304
|
+
id: string;
|
|
1305
|
+
name: string;
|
|
1306
|
+
[key: string]: any;
|
|
1307
|
+
}
|
|
1308
|
+
export interface LiveboardGroup {
|
|
1309
|
+
id: string;
|
|
1310
|
+
name: string;
|
|
1311
|
+
[key: string]: any;
|
|
1312
|
+
}
|
|
1313
|
+
/**
|
|
1314
|
+
* Levels at which a filter or parameter can be applied.
|
|
1315
|
+
*/
|
|
1316
|
+
export enum ApplicabilityLevel {
|
|
1317
|
+
Liveboard = "LIVEBOARD",
|
|
1318
|
+
Tab = "TAB",
|
|
1319
|
+
Group = "GROUP"
|
|
1320
|
+
}
|
|
1321
|
+
/**
|
|
1322
|
+
* Scopes a filter or parameter to a specific target.
|
|
1323
|
+
* At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
|
|
1324
|
+
* is not required. `level` accepts the enum or its string value, e.g. `'TAB'`.
|
|
1325
|
+
*/
|
|
1326
|
+
export interface Applicability {
|
|
1327
|
+
level: ApplicabilityLevel | `${ApplicabilityLevel}`;
|
|
1328
|
+
targetId?: string;
|
|
1329
|
+
}
|
|
1330
|
+
export interface FilterUpdate {
|
|
1331
|
+
column: string;
|
|
1332
|
+
oper: string;
|
|
1333
|
+
values: string[];
|
|
1334
|
+
type?: string;
|
|
1335
|
+
applicability?: Applicability;
|
|
1336
|
+
}
|
|
1337
|
+
export interface LiveboardFilter {
|
|
1338
|
+
applicability?: Applicability;
|
|
1339
|
+
[key: string]: any;
|
|
1340
|
+
}
|
|
1341
|
+
export interface LiveboardParameter {
|
|
1342
|
+
applicability?: Applicability;
|
|
1343
|
+
[key: string]: any;
|
|
1344
|
+
}
|
|
1345
|
+
export enum UIPassthroughEvent {
|
|
1346
|
+
PinAnswerToLiveboard = "addVizToPinboard",
|
|
1347
|
+
SaveAnswer = "saveAnswer",
|
|
1348
|
+
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
1349
|
+
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
1350
|
+
GetAnswerConfig = "getAnswerPageConfig",
|
|
1351
|
+
GetLiveboardConfig = "getPinboardPageConfig",
|
|
1352
|
+
GetUnsavedAnswerTML = "getUnsavedAnswerTML",
|
|
1353
|
+
UpdateFilters = "updateFilters",
|
|
1354
|
+
Drilldown = "drillDown",
|
|
1355
|
+
GetAnswerSession = "getAnswerSession",
|
|
1356
|
+
GetFilters = "getFilters",
|
|
1357
|
+
GetIframeUrl = "getIframeUrl",
|
|
1358
|
+
GetParameters = "getParameters",
|
|
1359
|
+
GetTML = "getTML",
|
|
1360
|
+
GetTabs = "getTabs",
|
|
1361
|
+
GetGroups = "getGroups",
|
|
1362
|
+
GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* UI passthrough contract. Each event's request/response is a named interface so it
|
|
1366
|
+
* documents and imports cleanly; `UIPassthroughContractBase` maps events to the pairs.
|
|
1367
|
+
*/
|
|
1368
|
+
/** Request for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
|
|
1369
|
+
export interface PinAnswerToLiveboardRequest {
|
|
1370
|
+
vizId?: string;
|
|
1371
|
+
newVizName: string;
|
|
1372
|
+
newVizDescription?: string;
|
|
1373
|
+
liveboardId?: string;
|
|
1374
|
+
tabId?: string;
|
|
1375
|
+
newLiveboardName?: string;
|
|
1376
|
+
newTabName?: string;
|
|
1377
|
+
}
|
|
1378
|
+
/** Response for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
|
|
1379
|
+
export interface PinAnswerToLiveboardResponse {
|
|
1380
|
+
liveboardId: string;
|
|
1381
|
+
tabId: string;
|
|
1382
|
+
vizId: string;
|
|
1383
|
+
}
|
|
1384
|
+
/** Request for {@link UIPassthroughEvent.SaveAnswer}. */
|
|
1385
|
+
export interface SaveAnswerRequest {
|
|
1386
|
+
name: string;
|
|
1387
|
+
description: string;
|
|
1388
|
+
vizId?: string;
|
|
1389
|
+
isDiscoverable?: boolean;
|
|
1390
|
+
}
|
|
1391
|
+
/** Response for {@link UIPassthroughEvent.SaveAnswer}. */
|
|
1392
|
+
export interface SaveAnswerResponse {
|
|
1393
|
+
answerId: string;
|
|
1394
|
+
saveResponse?: any;
|
|
1395
|
+
shareResponse?: any;
|
|
1396
|
+
}
|
|
1397
|
+
/** Response for {@link UIPassthroughEvent.GetDiscoverabilityStatus}. */
|
|
1398
|
+
export interface GetDiscoverabilityStatusResponse {
|
|
1399
|
+
shouldShowDiscoverability: boolean;
|
|
1400
|
+
isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
|
|
1401
|
+
}
|
|
1402
|
+
/** Response for {@link UIPassthroughEvent.GetAvailableUIPassthroughs}. */
|
|
1403
|
+
export interface GetAvailableUIPassthroughsResponse {
|
|
1404
|
+
keys: string[];
|
|
1405
|
+
}
|
|
1406
|
+
/** Request for {@link UIPassthroughEvent.GetAnswerConfig}. */
|
|
1407
|
+
export interface GetAnswerConfigRequest {
|
|
1408
|
+
vizId?: string;
|
|
1409
|
+
}
|
|
1410
|
+
/** Request for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
|
|
1411
|
+
export interface GetUnsavedAnswerTMLRequest {
|
|
1412
|
+
sessionId?: string;
|
|
1413
|
+
vizId?: string;
|
|
1414
|
+
}
|
|
1415
|
+
/** Response for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
|
|
1416
|
+
export interface GetUnsavedAnswerTMLResponse {
|
|
1417
|
+
tml: string;
|
|
1418
|
+
}
|
|
1419
|
+
/** Request for {@link UIPassthroughEvent.GetAnswerSession}. */
|
|
1420
|
+
export interface GetAnswerSessionRequest {
|
|
1421
|
+
vizId?: string;
|
|
1422
|
+
}
|
|
1423
|
+
/** Response for {@link UIPassthroughEvent.GetAnswerSession}. */
|
|
1424
|
+
export interface GetAnswerSessionResponse {
|
|
1425
|
+
session: SessionInterface;
|
|
1426
|
+
embedAnswerData?: Record<string, any>;
|
|
1427
|
+
}
|
|
1428
|
+
/** Request for {@link UIPassthroughEvent.GetFilters}. */
|
|
1429
|
+
export interface GetFiltersRequest {
|
|
1430
|
+
vizId?: string;
|
|
1431
|
+
}
|
|
1432
|
+
/** Response for {@link UIPassthroughEvent.GetFilters}. */
|
|
1433
|
+
export interface GetFiltersResponse {
|
|
1434
|
+
liveboardFilters: LiveboardFilter[];
|
|
1435
|
+
runtimeFilters: RuntimeFilter[];
|
|
1436
|
+
}
|
|
1437
|
+
/** Response for {@link UIPassthroughEvent.GetIframeUrl}. */
|
|
1438
|
+
export interface GetIframeUrlResponse {
|
|
1439
|
+
iframeUrl: string;
|
|
1440
|
+
}
|
|
1441
|
+
/** Response for {@link UIPassthroughEvent.GetParameters}. */
|
|
1442
|
+
export interface GetParametersResponse {
|
|
1443
|
+
parameters: LiveboardParameter[];
|
|
1444
|
+
}
|
|
1445
|
+
/** Request for {@link UIPassthroughEvent.GetTML}. */
|
|
1446
|
+
export interface GetTMLRequest {
|
|
1447
|
+
vizId?: string;
|
|
1448
|
+
includeNonExecutedSearchTokens?: boolean;
|
|
1449
|
+
}
|
|
1450
|
+
/** Response for {@link UIPassthroughEvent.GetTabs}. */
|
|
1451
|
+
export interface GetTabsResponse {
|
|
1452
|
+
orderedTabIds: string[];
|
|
1453
|
+
numberOfTabs: number;
|
|
1454
|
+
Tabs: LiveboardTab[];
|
|
1455
|
+
}
|
|
1456
|
+
/** Response for {@link UIPassthroughEvent.GetGroups}. */
|
|
1457
|
+
export interface GetGroupsResponse {
|
|
1458
|
+
orderedGroupIds: string[];
|
|
1459
|
+
numberOfGroups: number;
|
|
1460
|
+
Groups: LiveboardGroup[];
|
|
1461
|
+
}
|
|
1462
|
+
/** Response for {@link UIPassthroughEvent.GetExportRequestForCurrentPinboard}. */
|
|
1463
|
+
export interface GetExportRequestForCurrentPinboardResponse {
|
|
1464
|
+
data: {
|
|
1465
|
+
v2Content: string;
|
|
1466
|
+
};
|
|
1467
|
+
type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* Request for {@link UIPassthroughEvent.UpdateFilters}. Not the host-event
|
|
1471
|
+
* `UpdateFiltersRequest` (host-event-contracts.ts), which has a different shape.
|
|
1472
|
+
*/
|
|
1473
|
+
export interface UpdateFiltersPassthroughRequest {
|
|
1474
|
+
filter?: FilterUpdate;
|
|
1475
|
+
filters?: FilterUpdate[];
|
|
1476
|
+
}
|
|
1477
|
+
/** Request for {@link UIPassthroughEvent.Drilldown}. */
|
|
1478
|
+
export interface DrilldownRequest {
|
|
1479
|
+
points: {
|
|
1480
|
+
selectedPoints?: string[];
|
|
1481
|
+
clickedPoint?: string;
|
|
1482
|
+
};
|
|
1483
|
+
columnGuid?: string;
|
|
1484
|
+
autoDrillDown?: boolean;
|
|
1485
|
+
vizId?: string;
|
|
1486
|
+
}
|
|
1487
|
+
/** Maps each UI passthrough event to its request/response pair. */
|
|
1488
|
+
export type UIPassthroughContractBase = {
|
|
1489
|
+
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
1490
|
+
request: PinAnswerToLiveboardRequest;
|
|
1491
|
+
response: PinAnswerToLiveboardResponse;
|
|
1492
|
+
};
|
|
1493
|
+
[UIPassthroughEvent.SaveAnswer]: {
|
|
1494
|
+
request: SaveAnswerRequest;
|
|
1495
|
+
response: SaveAnswerResponse;
|
|
1496
|
+
};
|
|
1497
|
+
[UIPassthroughEvent.GetDiscoverabilityStatus]: {
|
|
1498
|
+
request: any;
|
|
1499
|
+
response: GetDiscoverabilityStatusResponse;
|
|
1500
|
+
};
|
|
1501
|
+
[UIPassthroughEvent.GetAvailableUIPassthroughs]: {
|
|
1502
|
+
request: any;
|
|
1503
|
+
response: GetAvailableUIPassthroughsResponse;
|
|
1504
|
+
};
|
|
1505
|
+
[UIPassthroughEvent.GetAnswerConfig]: {
|
|
1506
|
+
request: GetAnswerConfigRequest;
|
|
1507
|
+
response: any;
|
|
1508
|
+
};
|
|
1509
|
+
[UIPassthroughEvent.GetLiveboardConfig]: {
|
|
1510
|
+
request: any;
|
|
1511
|
+
response: any;
|
|
1512
|
+
};
|
|
1513
|
+
[UIPassthroughEvent.GetUnsavedAnswerTML]: {
|
|
1514
|
+
request: GetUnsavedAnswerTMLRequest;
|
|
1515
|
+
response: GetUnsavedAnswerTMLResponse;
|
|
1516
|
+
};
|
|
1517
|
+
[UIPassthroughEvent.GetAnswerSession]: {
|
|
1518
|
+
request: GetAnswerSessionRequest;
|
|
1519
|
+
response: GetAnswerSessionResponse;
|
|
1520
|
+
};
|
|
1521
|
+
[UIPassthroughEvent.GetFilters]: {
|
|
1522
|
+
request: GetFiltersRequest;
|
|
1523
|
+
response: GetFiltersResponse;
|
|
1524
|
+
};
|
|
1525
|
+
[UIPassthroughEvent.GetIframeUrl]: {
|
|
1526
|
+
request: Record<string, never>;
|
|
1527
|
+
response: GetIframeUrlResponse;
|
|
1528
|
+
};
|
|
1529
|
+
[UIPassthroughEvent.GetParameters]: {
|
|
1530
|
+
request: Record<string, never>;
|
|
1531
|
+
response: GetParametersResponse;
|
|
1532
|
+
};
|
|
1533
|
+
[UIPassthroughEvent.GetTML]: {
|
|
1534
|
+
request: GetTMLRequest;
|
|
1535
|
+
response: Record<string, any>;
|
|
1536
|
+
};
|
|
1537
|
+
[UIPassthroughEvent.GetTabs]: {
|
|
1538
|
+
request: Record<string, never>;
|
|
1539
|
+
response: GetTabsResponse;
|
|
1540
|
+
};
|
|
1541
|
+
[UIPassthroughEvent.GetGroups]: {
|
|
1542
|
+
request: Record<string, never>;
|
|
1543
|
+
response: GetGroupsResponse;
|
|
1544
|
+
};
|
|
1545
|
+
[UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
|
|
1546
|
+
request: Record<string, never>;
|
|
1547
|
+
response: GetExportRequestForCurrentPinboardResponse;
|
|
1548
|
+
};
|
|
1549
|
+
[UIPassthroughEvent.UpdateFilters]: {
|
|
1550
|
+
request: UpdateFiltersPassthroughRequest;
|
|
1551
|
+
response: unknown;
|
|
1552
|
+
};
|
|
1553
|
+
[UIPassthroughEvent.Drilldown]: {
|
|
1554
|
+
request: DrilldownRequest;
|
|
1555
|
+
response: unknown;
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
1559
|
+
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
1560
|
+
export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
|
|
1561
|
+
refId?: string;
|
|
1562
|
+
value?: UIPassthroughResponse<ApiName>;
|
|
1563
|
+
error?: any;
|
|
1564
|
+
}>;
|
|
1565
|
+
export type EmbedApiHostEventMapping = {
|
|
1566
|
+
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
|
|
1567
|
+
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
1568
|
+
[HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
|
|
1569
|
+
[HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
|
|
1570
|
+
[HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
|
|
1571
|
+
[HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
|
|
1572
|
+
[HostEvent.GetTML]: UIPassthroughEvent.GetTML;
|
|
1573
|
+
[HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
|
|
1574
|
+
[HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
|
|
1575
|
+
[HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
1576
|
+
};
|
|
1303
1577
|
/**
|
|
1304
1578
|
* The authentication mechanism for allowing access to
|
|
1305
1579
|
* the embedded app
|
|
@@ -2155,9 +2429,11 @@ export interface FrameParams {
|
|
|
2155
2429
|
}
|
|
2156
2430
|
/**
|
|
2157
2431
|
* Configuration for the pre-render wrapper element.
|
|
2158
|
-
*
|
|
2159
|
-
* {@link BaseViewConfig}
|
|
2160
|
-
*
|
|
2432
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
2433
|
+
* {@link BaseViewConfig} — `id` over `preRenderId`, `containerSelector` over
|
|
2434
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
2435
|
+
* and takes precedence when both are set, so existing top-level usage continues
|
|
2436
|
+
* to work without any changes.
|
|
2161
2437
|
*
|
|
2162
2438
|
* @version SDK: 1.52.0
|
|
2163
2439
|
* @example
|
|
@@ -2165,9 +2441,9 @@ export interface FrameParams {
|
|
|
2165
2441
|
* init({ thoughtSpotHost: '...', authType: AuthType.None });
|
|
2166
2442
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2167
2443
|
* preRenderConfig: {
|
|
2168
|
-
*
|
|
2169
|
-
*
|
|
2170
|
-
*
|
|
2444
|
+
* id: 'my-liveboard',
|
|
2445
|
+
* containerSelector: '#my-scroll-container',
|
|
2446
|
+
* doNotTrackSize: false,
|
|
2171
2447
|
* zIndex: -10,
|
|
2172
2448
|
* },
|
|
2173
2449
|
* });
|
|
@@ -2188,7 +2464,7 @@ export interface PreRenderConfig {
|
|
|
2188
2464
|
*
|
|
2189
2465
|
* @default undefined
|
|
2190
2466
|
*/
|
|
2191
|
-
|
|
2467
|
+
id?: string;
|
|
2192
2468
|
/**
|
|
2193
2469
|
* The DOM element or CSS selector string specifying the container into
|
|
2194
2470
|
* which the pre-rendered wrapper is inserted.
|
|
@@ -2204,7 +2480,7 @@ export interface PreRenderConfig {
|
|
|
2204
2480
|
*
|
|
2205
2481
|
* @default document.body
|
|
2206
2482
|
*/
|
|
2207
|
-
|
|
2483
|
+
containerSelector?: string | HTMLElement;
|
|
2208
2484
|
/**
|
|
2209
2485
|
* Disables the `ResizeObserver` that keeps the wrapper sized to the
|
|
2210
2486
|
* placeholder element.
|
|
@@ -2216,7 +2492,7 @@ export interface PreRenderConfig {
|
|
|
2216
2492
|
*
|
|
2217
2493
|
* @default false
|
|
2218
2494
|
*/
|
|
2219
|
-
|
|
2495
|
+
doNotTrackSize?: boolean;
|
|
2220
2496
|
/**
|
|
2221
2497
|
* CSS `z-index` value applied to the pre-render wrapper when hidden.
|
|
2222
2498
|
* Override this when the host page's stacking context does not reach `-1000`
|
|
@@ -2423,7 +2699,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2423
2699
|
*
|
|
2424
2700
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
|
|
2425
2701
|
* @version SDK: 1.25.0 | ThoughtSpot: 9.6.0.cl, 9.8.0.sw
|
|
2426
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2702
|
+
* @deprecated Use {@link PreRenderConfig.id} via `preRenderConfig` instead.
|
|
2427
2703
|
* @example
|
|
2428
2704
|
* ```js
|
|
2429
2705
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed, SearchEmbed, or LiveboardEmbed
|
|
@@ -2443,7 +2719,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2443
2719
|
* @type {boolean}
|
|
2444
2720
|
* @default false
|
|
2445
2721
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.4.0.cl, 9.4.0.sw
|
|
2446
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2722
|
+
* @deprecated Use {@link PreRenderConfig.doNotTrackSize} via `preRenderConfig` instead.
|
|
2447
2723
|
* @example
|
|
2448
2724
|
* ```js
|
|
2449
2725
|
* // Disable tracking PreRender size in the configuration
|
|
@@ -2485,7 +2761,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2485
2761
|
*
|
|
2486
2762
|
* @type {string | HTMLElement}
|
|
2487
2763
|
* @version SDK: 1.49.2 | ThoughtSpot: *
|
|
2488
|
-
* @deprecated Use {@link PreRenderConfig.
|
|
2764
|
+
* @deprecated Use {@link PreRenderConfig.containerSelector} via `preRenderConfig` instead.
|
|
2489
2765
|
* @example
|
|
2490
2766
|
* ```js
|
|
2491
2767
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
@@ -2498,9 +2774,11 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2498
2774
|
preRenderContainer?: string | HTMLElement;
|
|
2499
2775
|
/**
|
|
2500
2776
|
* Configuration for the pre-render wrapper element.
|
|
2501
|
-
*
|
|
2502
|
-
* `BaseViewConfig`
|
|
2503
|
-
*
|
|
2777
|
+
* Each property here supersedes its deprecated top-level counterpart on
|
|
2778
|
+
* `BaseViewConfig` — `id` over `preRenderId`, `containerSelector` over
|
|
2779
|
+
* `preRenderContainer` and `doNotTrackSize` over `doNotTrackPreRenderSize` —
|
|
2780
|
+
* and takes precedence when both are set, so existing top-level usage
|
|
2781
|
+
* continues to work without any changes.
|
|
2504
2782
|
* See {@link PreRenderConfig} for available options.
|
|
2505
2783
|
*
|
|
2506
2784
|
* @version SDK: 1.52.0
|
|
@@ -2508,7 +2786,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
|
|
|
2508
2786
|
* ```js
|
|
2509
2787
|
* const embed = new LiveboardEmbed('#tsEmbed', {
|
|
2510
2788
|
* preRenderConfig: {
|
|
2511
|
-
*
|
|
2789
|
+
* id: 'my-liveboard',
|
|
2512
2790
|
* zIndex: -10,
|
|
2513
2791
|
* },
|
|
2514
2792
|
* });
|
|
@@ -3275,7 +3553,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3275
3553
|
*
|
|
3276
3554
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3277
3555
|
* @type {boolean}
|
|
3278
|
-
* @version SDK: 1.
|
|
3556
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
3279
3557
|
* @default false
|
|
3280
3558
|
* @example
|
|
3281
3559
|
* ```js
|
|
@@ -3400,7 +3678,7 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
3400
3678
|
*
|
|
3401
3679
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
3402
3680
|
* @type {number}
|
|
3403
|
-
* @version SDK: 1.
|
|
3681
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
3404
3682
|
* @example
|
|
3405
3683
|
* ```js
|
|
3406
3684
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -3730,6 +4008,15 @@ export interface RuntimeParameter {
|
|
|
3730
4008
|
* Values
|
|
3731
4009
|
*/
|
|
3732
4010
|
value: number | boolean | string;
|
|
4011
|
+
/**
|
|
4012
|
+
* Whether the parameter is visible to the user (`UpdateParameters` only).
|
|
4013
|
+
*/
|
|
4014
|
+
isVisibleToUser?: boolean;
|
|
4015
|
+
/**
|
|
4016
|
+
* Scope of the update (`UpdateParameters` only). Omitting it, or `level`,
|
|
4017
|
+
* targets the Liveboard level.
|
|
4018
|
+
*/
|
|
4019
|
+
applicability?: Applicability;
|
|
3733
4020
|
}
|
|
3734
4021
|
/**
|
|
3735
4022
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
@@ -4181,6 +4468,9 @@ export enum EmbedEvent {
|
|
|
4181
4468
|
Download = "download",
|
|
4182
4469
|
/**
|
|
4183
4470
|
* Emitted when the download action is triggered on an Answer.
|
|
4471
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
4472
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
4473
|
+
* accepts the union now; per-context enforced next release.
|
|
4184
4474
|
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
4185
4475
|
* subscribe to when download is completed. Default is end:true.
|
|
4186
4476
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
@@ -4197,6 +4487,9 @@ export enum EmbedEvent {
|
|
|
4197
4487
|
DownloadAsPng = "downloadAsPng",
|
|
4198
4488
|
/**
|
|
4199
4489
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
4490
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
|
|
4491
|
+
* liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
|
|
4492
|
+
* accepts the union now; per-context enforced next release.
|
|
4200
4493
|
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
4201
4494
|
* subscribe to when download as PDF is completed. Default is end:true.
|
|
4202
4495
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -4213,6 +4506,9 @@ export enum EmbedEvent {
|
|
|
4213
4506
|
DownloadAsPdf = "downloadAsPdf",
|
|
4214
4507
|
/**
|
|
4215
4508
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
4509
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
4510
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
4511
|
+
* accepts the union now; per-context enforced next release.
|
|
4216
4512
|
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
4217
4513
|
* subscribe to when download as CSV is completed. Default is end:true.
|
|
4218
4514
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -4229,6 +4525,9 @@ export enum EmbedEvent {
|
|
|
4229
4525
|
DownloadAsCsv = "downloadAsCsv",
|
|
4230
4526
|
/**
|
|
4231
4527
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
4528
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
4529
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
4530
|
+
* accepts the union now; per-context enforced next release.
|
|
4232
4531
|
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
4233
4532
|
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
4234
4533
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -4507,6 +4806,9 @@ export enum EmbedEvent {
|
|
|
4507
4806
|
Schedule = "subscription",
|
|
4508
4807
|
/**
|
|
4509
4808
|
* Emitted when a user clicks **Edit** on a Liveboard or visualization
|
|
4809
|
+
* Payload varies by context: {@link VizScopedRequest} (Liveboard),
|
|
4810
|
+
* {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
|
|
4811
|
+
* union now; per-context enforced next release.
|
|
4510
4812
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4511
4813
|
* @example
|
|
4512
4814
|
* ```js
|
|
@@ -5048,7 +5350,32 @@ export enum EmbedEvent {
|
|
|
5048
5350
|
*/
|
|
5049
5351
|
OrgSwitched = "orgSwitched",
|
|
5050
5352
|
/**
|
|
5051
|
-
* Emitted
|
|
5353
|
+
* Emitted before the embedded ThoughtSpot app sends a network request whose
|
|
5354
|
+
* fully resolved URL matches one of the `interceptUrls` in the view config.
|
|
5355
|
+
* The request is held until you call `responder`, which decides whether the
|
|
5356
|
+
* real request goes out or a response you supply is used in its place.
|
|
5357
|
+
*
|
|
5358
|
+
* Setting `interceptUrls` is what enables this; there is no separate enable
|
|
5359
|
+
* flag. If `responder` is not called within `interceptTimeout` (30000 ms by
|
|
5360
|
+
* default) the request fails and `EmbedEvent.Error` is emitted.
|
|
5361
|
+
*
|
|
5362
|
+
* The payload is `{ input, init, urlType }`, where `input` is the request
|
|
5363
|
+
* URL and `init` is the `fetch` init object, with `init.body` parsed into an
|
|
5364
|
+
* object when it is valid JSON. `urlType` is the matching
|
|
5365
|
+
* `InterceptedApiType`; it is `InterceptedApiType.ALL` for any URL outside
|
|
5366
|
+
* the recognized API groups.
|
|
5367
|
+
*
|
|
5368
|
+
* Interception wraps the outermost layer of `fetch`, so `init` holds the
|
|
5369
|
+
* request as the application composed it, before ThoughtSpot attaches its
|
|
5370
|
+
* authentication headers. Those headers, and any token refresh and retry,
|
|
5371
|
+
* are applied afterwards and only when you pass `execute: true`. Only
|
|
5372
|
+
* requests made through `fetch` are intercepted.
|
|
5373
|
+
*
|
|
5374
|
+
* Pass `execute: true` to let the original request proceed untouched, in
|
|
5375
|
+
* which case any `response` you supply alongside it is ignored. With
|
|
5376
|
+
* `execute: false` the request is never sent, and your `response.body` is
|
|
5377
|
+
* returned to the app as JSON, defaulting to status 200 and a
|
|
5378
|
+
* `Content-Type: application/json` header.
|
|
5052
5379
|
*
|
|
5053
5380
|
* Supported on all embed types.
|
|
5054
5381
|
*
|
|
@@ -5560,6 +5887,7 @@ export enum HostEvent {
|
|
|
5560
5887
|
* the search query string.
|
|
5561
5888
|
* Supported in `AppEmbed` and `SearchEmbed` deployments.
|
|
5562
5889
|
* Includes the following properties:
|
|
5890
|
+
* Payload: {@link SearchRequest}.
|
|
5563
5891
|
* @param - Includes the following keys:
|
|
5564
5892
|
* - `searchQuery`: Query string with search tokens.
|
|
5565
5893
|
* - `dataSources`: Data source GUID to search on.
|
|
@@ -5587,6 +5915,9 @@ export enum HostEvent {
|
|
|
5587
5915
|
Search = "search",
|
|
5588
5916
|
/**
|
|
5589
5917
|
* Triggers a drill on certain points of the specified column
|
|
5918
|
+
* Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
|
|
5919
|
+
* ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
|
|
5920
|
+
* enforced next release.
|
|
5590
5921
|
* Includes the following properties:
|
|
5591
5922
|
* @param - Includes the following keys:
|
|
5592
5923
|
* - `points`: An object containing `selectedPoints` and/or `clickedPoint`
|
|
@@ -5666,6 +5997,8 @@ export enum HostEvent {
|
|
|
5666
5997
|
Reload = "reload",
|
|
5667
5998
|
/**
|
|
5668
5999
|
* Get iframe URL for the current embed view.
|
|
6000
|
+
* Payload: none.
|
|
6001
|
+
* Response: {@link GetIframeUrlResponse}.
|
|
5669
6002
|
* @example
|
|
5670
6003
|
* ```js
|
|
5671
6004
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
@@ -5684,6 +6017,7 @@ export enum HostEvent {
|
|
|
5684
6017
|
GetIframeUrl = "GetIframeUrl",
|
|
5685
6018
|
/**
|
|
5686
6019
|
* Display specific visualizations on a Liveboard.
|
|
6020
|
+
* Payload: `string[]`.
|
|
5687
6021
|
* @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
|
|
5688
6022
|
* in this parameter will be hidden.
|
|
5689
6023
|
* @example
|
|
@@ -5706,6 +6040,7 @@ export enum HostEvent {
|
|
|
5706
6040
|
SetVisibleVizs = "SetPinboardVisibleVizs",
|
|
5707
6041
|
/**
|
|
5708
6042
|
* Set a Liveboard tab as an active tab.
|
|
6043
|
+
* Payload: {@link SetActiveTabRequest}.
|
|
5709
6044
|
* @param - tabId - string of id of Tab to show
|
|
5710
6045
|
* @example
|
|
5711
6046
|
* ```js
|
|
@@ -5733,6 +6068,7 @@ export enum HostEvent {
|
|
|
5733
6068
|
* and `AppEmbed` only. In full application embedding, this event updates
|
|
5734
6069
|
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
5735
6070
|
*
|
|
6071
|
+
* Payload: {@link RuntimeFilter}[].
|
|
5736
6072
|
* @param - Array of {@link RuntimeFilter} objects. Each item includes:
|
|
5737
6073
|
* - `columnName`: Name of the column to filter on.
|
|
5738
6074
|
* - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
|
|
@@ -5774,6 +6110,7 @@ export enum HostEvent {
|
|
|
5774
6110
|
* Accepts either a plain value or an object with `path`
|
|
5775
6111
|
* and an optional `replace` flag.
|
|
5776
6112
|
*
|
|
6113
|
+
* Payload: `string` | `number` | {@link NavigateRequest}.
|
|
5777
6114
|
* @param data - A string path, a numeric history delta, or an object
|
|
5778
6115
|
* `{ path: string | number, replace?: boolean }`.
|
|
5779
6116
|
* - `path` — the route to navigate to, or a history delta such as `1`
|
|
@@ -5801,6 +6138,9 @@ export enum HostEvent {
|
|
|
5801
6138
|
/**
|
|
5802
6139
|
* Open the filter panel for a particular column.
|
|
5803
6140
|
* Works with Search and Liveboard embed.
|
|
6141
|
+
* Payload: {@link OpenFilterRequest} (the cross-context superset). The
|
|
6142
|
+
* accepted fields vary by context: {@link OpenFilterLiveboardRequest},
|
|
6143
|
+
* {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
|
|
5804
6144
|
* @param - { columnId: string,
|
|
5805
6145
|
* name: string,
|
|
5806
6146
|
* type: ATTRIBUTE/MEASURE,
|
|
@@ -5857,7 +6197,7 @@ export enum HostEvent {
|
|
|
5857
6197
|
*
|
|
5858
6198
|
* Unlike {@link HostEvent.OpenFilter}, which opens the panel of an
|
|
5859
6199
|
* existing filter, this event starts the creation of a new filter.
|
|
5860
|
-
* @version SDK: 1.
|
|
6200
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
5861
6201
|
* @example
|
|
5862
6202
|
* ```js
|
|
5863
6203
|
* liveboardEmbed.trigger(HostEvent.OpenAddFilterModal);
|
|
@@ -5873,7 +6213,7 @@ export enum HostEvent {
|
|
|
5873
6213
|
* Hiding the *Add parameter* button with `hiddenActions:
|
|
5874
6214
|
* [Action.AddParameter]` does not block this event, but disabling it
|
|
5875
6215
|
* with `disabledActions` does.
|
|
5876
|
-
* @version SDK: 1.
|
|
6216
|
+
* @version SDK: 1.51.1 | ThoughtSpot Cloud: 26.8.0.cl
|
|
5877
6217
|
* @example
|
|
5878
6218
|
* ```js
|
|
5879
6219
|
* liveboardEmbed.trigger(HostEvent.OpenAddParameterModal);
|
|
@@ -5883,6 +6223,7 @@ export enum HostEvent {
|
|
|
5883
6223
|
/**
|
|
5884
6224
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
5885
6225
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
6226
|
+
* Payload: {@link OpenParameterRequest}.
|
|
5886
6227
|
* @param - Includes the following keys:
|
|
5887
6228
|
* - `parameter`: An object identifying the parameter to open, for
|
|
5888
6229
|
* example, `{ parameterId: '<parameter-GUID>' }`.
|
|
@@ -5914,6 +6255,7 @@ export enum HostEvent {
|
|
|
5914
6255
|
OpenParameter = "openParameter",
|
|
5915
6256
|
/**
|
|
5916
6257
|
* Add columns to the current search query.
|
|
6258
|
+
* Payload: `{ columnIds: string[] }`.
|
|
5917
6259
|
* @param - { columnIds: string[] }
|
|
5918
6260
|
* @example
|
|
5919
6261
|
* ```js
|
|
@@ -5932,6 +6274,7 @@ export enum HostEvent {
|
|
|
5932
6274
|
AddColumns = "addColumns",
|
|
5933
6275
|
/**
|
|
5934
6276
|
* Remove a column from the current search query.
|
|
6277
|
+
* Payload: `{ columnId: string }`.
|
|
5935
6278
|
* @param - { columnId: string }
|
|
5936
6279
|
* @example
|
|
5937
6280
|
* ```js
|
|
@@ -5956,6 +6299,8 @@ export enum HostEvent {
|
|
|
5956
6299
|
* sorting, toggling of legends, and data drill down.
|
|
5957
6300
|
* For more information, see
|
|
5958
6301
|
* link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
|
|
6302
|
+
* Payload: none.
|
|
6303
|
+
* Response: {@link GetExportRequestForCurrentPinboardResponse}.
|
|
5959
6304
|
* @example
|
|
5960
6305
|
* ```js
|
|
5961
6306
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
@@ -5977,6 +6322,8 @@ export enum HostEvent {
|
|
|
5977
6322
|
* requiring additional user input via the *Pin to Liveboard* modal, define
|
|
5978
6323
|
* the following parameters:
|
|
5979
6324
|
*
|
|
6325
|
+
* Payload: {@link PinAnswerToLiveboardRequest}.
|
|
6326
|
+
* Response: {@link PinAnswerToLiveboardResponse}.
|
|
5980
6327
|
* @param - Includes the following keys:
|
|
5981
6328
|
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
5982
6329
|
* Liveboard.
|
|
@@ -6091,6 +6438,7 @@ export enum HostEvent {
|
|
|
6091
6438
|
LiveboardInfo = "pinboardInfo",
|
|
6092
6439
|
/**
|
|
6093
6440
|
* Trigger the **Schedule** action on an embedded Liveboard.
|
|
6441
|
+
* Payload: {@link VizScopedRequest}.
|
|
6094
6442
|
* @example
|
|
6095
6443
|
* ```js
|
|
6096
6444
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
@@ -6106,6 +6454,7 @@ export enum HostEvent {
|
|
|
6106
6454
|
Schedule = "subscription",
|
|
6107
6455
|
/**
|
|
6108
6456
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
6457
|
+
* Payload: {@link VizScopedRequest}.
|
|
6109
6458
|
* @example
|
|
6110
6459
|
* ```js
|
|
6111
6460
|
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
@@ -6122,6 +6471,7 @@ export enum HostEvent {
|
|
|
6122
6471
|
/**
|
|
6123
6472
|
* Trigger the **Export TML** action on an embedded Liveboard or
|
|
6124
6473
|
* Answer.
|
|
6474
|
+
* Payload: {@link VizScopedRequest}.
|
|
6125
6475
|
* @example
|
|
6126
6476
|
* ```js
|
|
6127
6477
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
@@ -6144,6 +6494,7 @@ export enum HostEvent {
|
|
|
6144
6494
|
/**
|
|
6145
6495
|
* Trigger the **Edit TML** action on an embedded Liveboard or
|
|
6146
6496
|
* saved Answers in the full application embedding.
|
|
6497
|
+
* Payload: {@link VizScopedRequest}.
|
|
6147
6498
|
* @example
|
|
6148
6499
|
* ```js
|
|
6149
6500
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
@@ -6165,6 +6516,7 @@ export enum HostEvent {
|
|
|
6165
6516
|
EditTML = "editTSL",
|
|
6166
6517
|
/**
|
|
6167
6518
|
* Trigger the **Update TML** action on an embedded Liveboard.
|
|
6519
|
+
* Payload: {@link VizScopedRequest}.
|
|
6168
6520
|
* @example
|
|
6169
6521
|
* ```js
|
|
6170
6522
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
@@ -6182,6 +6534,7 @@ export enum HostEvent {
|
|
|
6182
6534
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
6183
6535
|
* visualization or Answer.
|
|
6184
6536
|
*
|
|
6537
|
+
* Payload: {@link VizScopedRequest} plus optional `liveboardId`.
|
|
6185
6538
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
6186
6539
|
*
|
|
6187
6540
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
@@ -6232,6 +6585,7 @@ export enum HostEvent {
|
|
|
6232
6585
|
/**
|
|
6233
6586
|
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
6234
6587
|
*
|
|
6588
|
+
* Payload: none.
|
|
6235
6589
|
* @example
|
|
6236
6590
|
* ```js
|
|
6237
6591
|
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
@@ -6286,6 +6640,9 @@ export enum HostEvent {
|
|
|
6286
6640
|
MakeACopy = "makeACopy",
|
|
6287
6641
|
/**
|
|
6288
6642
|
* Trigger the **Delete** action for a Liveboard.
|
|
6643
|
+
* Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
|
|
6644
|
+
* required), {@link VizScopedRequest} (Search). trigger() accepts the union
|
|
6645
|
+
* now; per-context enforced next release.
|
|
6289
6646
|
* @example
|
|
6290
6647
|
* ```js
|
|
6291
6648
|
* appEmbed.trigger(HostEvent.Remove)
|
|
@@ -6300,6 +6657,7 @@ export enum HostEvent {
|
|
|
6300
6657
|
Remove = "delete",
|
|
6301
6658
|
/**
|
|
6302
6659
|
* Trigger the **Explore** action on a visualization.
|
|
6660
|
+
* Payload: {@link RequiredVizRequest}.
|
|
6303
6661
|
* @param - an object with `vizId` as a key
|
|
6304
6662
|
* @example
|
|
6305
6663
|
* ```js
|
|
@@ -6319,6 +6677,7 @@ export enum HostEvent {
|
|
|
6319
6677
|
/**
|
|
6320
6678
|
* Trigger the **Create alert** action on a KPI chart
|
|
6321
6679
|
* in a Liveboard or saved Answer.
|
|
6680
|
+
* Payload: {@link VizScopedRequest}.
|
|
6322
6681
|
* @param - an object with `vizId` as a key
|
|
6323
6682
|
* @example
|
|
6324
6683
|
* ```js
|
|
@@ -6350,6 +6709,7 @@ export enum HostEvent {
|
|
|
6350
6709
|
/**
|
|
6351
6710
|
* Trigger the **Manage alerts** action on a KPI chart
|
|
6352
6711
|
* in a visualization or saved Answer.
|
|
6712
|
+
* Payload: {@link VizScopedRequest}.
|
|
6353
6713
|
* @param - an object with `vizId` as a key
|
|
6354
6714
|
* @example
|
|
6355
6715
|
* ```js
|
|
@@ -6387,6 +6747,7 @@ export enum HostEvent {
|
|
|
6387
6747
|
* on a Liveboard.
|
|
6388
6748
|
*
|
|
6389
6749
|
* This event is not supported in visualization embed and search embed.
|
|
6750
|
+
* Payload: {@link VizScopedRequest}.
|
|
6390
6751
|
* @param - Object parameter. Includes the following keys:
|
|
6391
6752
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
6392
6753
|
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
@@ -6429,6 +6790,7 @@ export enum HostEvent {
|
|
|
6429
6790
|
Edit = "edit",
|
|
6430
6791
|
/**
|
|
6431
6792
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
6793
|
+
* Payload: {@link VizScopedRequest}.
|
|
6432
6794
|
* @param - object - to trigger the action for a
|
|
6433
6795
|
* specific visualization in Liveboard embed, pass in `vizId` as a key
|
|
6434
6796
|
* @example
|
|
@@ -6474,6 +6836,7 @@ export enum HostEvent {
|
|
|
6474
6836
|
CopyLink = "embedDocument",
|
|
6475
6837
|
/**
|
|
6476
6838
|
* Trigger the **Present** action on a Liveboard or visualization
|
|
6839
|
+
* Payload: {@link VizScopedRequest}.
|
|
6477
6840
|
* @param - object - to trigger the action for a specific visualization
|
|
6478
6841
|
* in Liveboard embed, pass in `vizId` as a key
|
|
6479
6842
|
* @example
|
|
@@ -6519,6 +6882,8 @@ export enum HostEvent {
|
|
|
6519
6882
|
Present = "present",
|
|
6520
6883
|
/**
|
|
6521
6884
|
* Get TML for the current search.
|
|
6885
|
+
* Payload: {@link GetTMLRequest}.
|
|
6886
|
+
* Response: `Record<string, any>`.
|
|
6522
6887
|
* @example
|
|
6523
6888
|
* ```js
|
|
6524
6889
|
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
@@ -6568,6 +6933,7 @@ export enum HostEvent {
|
|
|
6568
6933
|
* Trigger the **Show underlying data** action on a
|
|
6569
6934
|
* chart or table.
|
|
6570
6935
|
*
|
|
6936
|
+
* Payload: {@link VizScopedRequest}.
|
|
6571
6937
|
* @param - an object with vizId as a key
|
|
6572
6938
|
* @example
|
|
6573
6939
|
* ```js
|
|
@@ -6601,6 +6967,7 @@ export enum HostEvent {
|
|
|
6601
6967
|
* Trigger the **Delete** action for a visualization
|
|
6602
6968
|
* in an embedded Liveboard, or a chart or table
|
|
6603
6969
|
* generated from Search.
|
|
6970
|
+
* Payload: {@link VizScopedRequest}.
|
|
6604
6971
|
* @param - Liveboard embed takes an object with `vizId` as a key.
|
|
6605
6972
|
* Can be left empty if embedding Search or visualization.
|
|
6606
6973
|
* @example
|
|
@@ -6629,6 +6996,7 @@ export enum HostEvent {
|
|
|
6629
6996
|
/**
|
|
6630
6997
|
* Trigger the **SpotIQ analyze** action on a
|
|
6631
6998
|
* chart or table.
|
|
6999
|
+
* Payload: {@link VizScopedRequest}.
|
|
6632
7000
|
* @param - Liveboard embed takes `vizId` as a
|
|
6633
7001
|
* key. Can be left undefined when embedding Search or
|
|
6634
7002
|
* visualization.
|
|
@@ -6691,6 +7059,7 @@ export enum HostEvent {
|
|
|
6691
7059
|
/**
|
|
6692
7060
|
* Trigger the **Download** > **PNG** action on
|
|
6693
7061
|
* charts in the embedded view.
|
|
7062
|
+
* Payload: {@link VizScopedRequest}.
|
|
6694
7063
|
* @example
|
|
6695
7064
|
* ```js
|
|
6696
7065
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPng,
|
|
@@ -6721,6 +7090,7 @@ export enum HostEvent {
|
|
|
6721
7090
|
/**
|
|
6722
7091
|
* Trigger the **Download** > **CSV** action on tables in
|
|
6723
7092
|
* the embedded view.
|
|
7093
|
+
* Payload: {@link VizScopedRequest}.
|
|
6724
7094
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
6725
7095
|
* @example
|
|
6726
7096
|
* ```js
|
|
@@ -6760,6 +7130,7 @@ export enum HostEvent {
|
|
|
6760
7130
|
/**
|
|
6761
7131
|
* Trigger the **Download** > **XLSX** action on tables
|
|
6762
7132
|
* in the embedded view.
|
|
7133
|
+
* Payload: {@link VizScopedRequest}.
|
|
6763
7134
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
6764
7135
|
* @example
|
|
6765
7136
|
* ```js
|
|
@@ -6799,6 +7170,7 @@ export enum HostEvent {
|
|
|
6799
7170
|
/**
|
|
6800
7171
|
* Trigger the **Share** action on an embedded
|
|
6801
7172
|
* Liveboard or Answer.
|
|
7173
|
+
* Payload: {@link VizScopedRequest}.
|
|
6802
7174
|
* @example
|
|
6803
7175
|
* ```js
|
|
6804
7176
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
@@ -6825,6 +7197,7 @@ export enum HostEvent {
|
|
|
6825
7197
|
* Trigger the **Save** action on a Liveboard, Answer, or Spotter.
|
|
6826
7198
|
* Saves the changes.
|
|
6827
7199
|
*
|
|
7200
|
+
* Payload: {@link VizScopedRequest}.
|
|
6828
7201
|
* @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
|
|
6829
7202
|
* It is required and can be retrieved from the data embed event.
|
|
6830
7203
|
*
|
|
@@ -6876,6 +7249,7 @@ export enum HostEvent {
|
|
|
6876
7249
|
/**
|
|
6877
7250
|
* Trigger the **Sync to Sheets** action on an embedded visualization or Answer
|
|
6878
7251
|
* Sends data from an Answer or Liveboard visualization to a Google sheet.
|
|
7252
|
+
* Payload: {@link VizScopedRequest}.
|
|
6879
7253
|
* @param - an object with `vizId` as a key
|
|
6880
7254
|
* @example
|
|
6881
7255
|
* ```js
|
|
@@ -6906,6 +7280,7 @@ export enum HostEvent {
|
|
|
6906
7280
|
* Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
|
|
6907
7281
|
* Sends data from an Answer or Liveboard visualization to third-party apps such
|
|
6908
7282
|
* as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
|
|
7283
|
+
* Payload: {@link VizScopedRequest}.
|
|
6909
7284
|
* @param - an object with vizId as a key
|
|
6910
7285
|
* @example
|
|
6911
7286
|
* ```js
|
|
@@ -6936,6 +7311,7 @@ export enum HostEvent {
|
|
|
6936
7311
|
* Trigger the **Manage pipelines** action on an embedded
|
|
6937
7312
|
* visualization or Answer.
|
|
6938
7313
|
* Allows users to manage ThoughtSpot Sync pipelines.
|
|
7314
|
+
* Payload: {@link VizScopedRequest}.
|
|
6939
7315
|
* @param - an object with `vizId` as a key
|
|
6940
7316
|
* @example
|
|
6941
7317
|
* ```js
|
|
@@ -6964,6 +7340,7 @@ export enum HostEvent {
|
|
|
6964
7340
|
ManagePipelines = "manage-pipeline",
|
|
6965
7341
|
/**
|
|
6966
7342
|
* Reset search operation on the Search or Answer page.
|
|
7343
|
+
* Payload: none.
|
|
6967
7344
|
* @example
|
|
6968
7345
|
* ```js
|
|
6969
7346
|
* searchEmbed.trigger(HostEvent.ResetSearch)
|
|
@@ -6991,6 +7368,8 @@ export enum HostEvent {
|
|
|
6991
7368
|
* whole Liveboard.
|
|
6992
7369
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
6993
7370
|
* ThoughtSpot: 26.10.0.cl.
|
|
7371
|
+
* Payload: {@link GetFiltersRequest}.
|
|
7372
|
+
* Response: {@link GetFiltersResponse}.
|
|
6994
7373
|
* @example
|
|
6995
7374
|
* ```js
|
|
6996
7375
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
@@ -7010,6 +7389,7 @@ export enum HostEvent {
|
|
|
7010
7389
|
GetFilters = "getFilters",
|
|
7011
7390
|
/**
|
|
7012
7391
|
* Update one or several filters applied on a Liveboard.
|
|
7392
|
+
* Payload: {@link UpdateFiltersRequest}.
|
|
7013
7393
|
* @param - Includes the following keys:
|
|
7014
7394
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
7015
7395
|
* values.
|
|
@@ -7138,6 +7518,8 @@ export enum HostEvent {
|
|
|
7138
7518
|
UpdateFilters = "updateFilters",
|
|
7139
7519
|
/**
|
|
7140
7520
|
* Get tab details for the current Liveboard.
|
|
7521
|
+
* Payload: none.
|
|
7522
|
+
* Response: {@link GetTabsResponse}.
|
|
7141
7523
|
* @example
|
|
7142
7524
|
* ```js
|
|
7143
7525
|
* liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
|
|
@@ -7163,6 +7545,8 @@ export enum HostEvent {
|
|
|
7163
7545
|
/**
|
|
7164
7546
|
* Get group details for the current Liveboard.
|
|
7165
7547
|
* Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
|
|
7548
|
+
* Payload: none.
|
|
7549
|
+
* Response: {@link GetGroupsResponse}.
|
|
7166
7550
|
* @example
|
|
7167
7551
|
* ```js
|
|
7168
7552
|
* liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
|
|
@@ -7187,6 +7571,7 @@ export enum HostEvent {
|
|
|
7187
7571
|
GetGroups = "getGroups",
|
|
7188
7572
|
/**
|
|
7189
7573
|
* Set the visible tabs on a Liveboard.
|
|
7574
|
+
* Payload: `string[]`.
|
|
7190
7575
|
* @param - an array of ids of tabs to show, the IDs not passed
|
|
7191
7576
|
* will be hidden.
|
|
7192
7577
|
* @example
|
|
@@ -7209,6 +7594,7 @@ export enum HostEvent {
|
|
|
7209
7594
|
SetVisibleTabs = "SetPinboardVisibleTabs",
|
|
7210
7595
|
/**
|
|
7211
7596
|
* Set the hidden tabs on a Liveboard.
|
|
7597
|
+
* Payload: `string[]`.
|
|
7212
7598
|
* @param - an array of the IDs of the tabs to hide.
|
|
7213
7599
|
* The IDs not passed will be shown.
|
|
7214
7600
|
* @example
|
|
@@ -7237,6 +7623,8 @@ export enum HostEvent {
|
|
|
7237
7623
|
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
7238
7624
|
* object that provides a more convenient interface for working with answers.
|
|
7239
7625
|
*
|
|
7626
|
+
* Payload: {@link GetAnswerSessionRequest}.
|
|
7627
|
+
* Response: {@link GetAnswerSessionResponse}.
|
|
7240
7628
|
* @example
|
|
7241
7629
|
* ```js
|
|
7242
7630
|
* // Preferred way to get an AnswerService
|
|
@@ -7264,6 +7652,7 @@ export enum HostEvent {
|
|
|
7264
7652
|
GetAnswerSession = "getAnswerSession",
|
|
7265
7653
|
/**
|
|
7266
7654
|
* Trigger the *Ask Sage* action for visualizations
|
|
7655
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7267
7656
|
* @example
|
|
7268
7657
|
* ```js
|
|
7269
7658
|
* liveboardEmbed.trigger(HostEvent.AskSage,
|
|
@@ -7275,6 +7664,7 @@ export enum HostEvent {
|
|
|
7275
7664
|
/**
|
|
7276
7665
|
* Trigger cross filter update action on a Liveboard.
|
|
7277
7666
|
*
|
|
7667
|
+
* Payload: {@link UpdateCrossFilterRequest}.
|
|
7278
7668
|
* @example
|
|
7279
7669
|
* ```js
|
|
7280
7670
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -7290,7 +7680,9 @@ export enum HostEvent {
|
|
|
7290
7680
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
7291
7681
|
/**
|
|
7292
7682
|
* Trigger reset action for a personalized Liveboard view.
|
|
7293
|
-
* This event is deprecated.
|
|
7683
|
+
* This event is deprecated.
|
|
7684
|
+
* Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
7685
|
+
* Payload: none.
|
|
7294
7686
|
* @example
|
|
7295
7687
|
* ```js
|
|
7296
7688
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -7311,6 +7703,7 @@ export enum HostEvent {
|
|
|
7311
7703
|
/**
|
|
7312
7704
|
* Triggers an action to update Parameter values on embedded
|
|
7313
7705
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
7706
|
+
* Payload: {@link RuntimeParameter}[].
|
|
7314
7707
|
* @param - Includes the following keys for each item:
|
|
7315
7708
|
* - `name`: Name of the parameter.
|
|
7316
7709
|
* - `value`: The value to set for the parameter.
|
|
@@ -7368,6 +7761,8 @@ export enum HostEvent {
|
|
|
7368
7761
|
* whole Liveboard.
|
|
7369
7762
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
7370
7763
|
* ThoughtSpot: 26.10.0.cl.
|
|
7764
|
+
* Payload: none.
|
|
7765
|
+
* Response: {@link GetParametersResponse}.
|
|
7371
7766
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
7372
7767
|
* ```js
|
|
7373
7768
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
@@ -7405,6 +7800,7 @@ export enum HostEvent {
|
|
|
7405
7800
|
* ```js
|
|
7406
7801
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7407
7802
|
* ```
|
|
7803
|
+
* Payload: {@link PersonalisedViewRequest} (`viewId` only).
|
|
7408
7804
|
* @example
|
|
7409
7805
|
* ```js
|
|
7410
7806
|
* // Update personalized view from liveboard context
|
|
@@ -7437,6 +7833,7 @@ export enum HostEvent {
|
|
|
7437
7833
|
* If neither is provided, the Liveboard resets to the original/default view.
|
|
7438
7834
|
* When a `viewName` is provided and multiple views share
|
|
7439
7835
|
* the same name, the first match is selected.
|
|
7836
|
+
* Payload: {@link PersonalisedViewRequest}.
|
|
7440
7837
|
* @example
|
|
7441
7838
|
* ```js
|
|
7442
7839
|
* liveboardEmbed.trigger(
|
|
@@ -7480,6 +7877,8 @@ export enum HostEvent {
|
|
|
7480
7877
|
* If no parameters are specified, the save action is
|
|
7481
7878
|
* triggered with a modal to prompt users to
|
|
7482
7879
|
* add a name and description for the Answer.
|
|
7880
|
+
* Payload: {@link SaveAnswerRequest}.
|
|
7881
|
+
* Response: {@link SaveAnswerResponse}.
|
|
7483
7882
|
* @param - Includes the following keys:
|
|
7484
7883
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
7485
7884
|
* embed.
|
|
@@ -7565,6 +7964,7 @@ export enum HostEvent {
|
|
|
7565
7964
|
/**
|
|
7566
7965
|
* Triggers a search operation with the search tokens specified in
|
|
7567
7966
|
* the search query string in spotter embed.
|
|
7967
|
+
* Payload: {@link SpotterSearchRequest}.
|
|
7568
7968
|
* @param - Includes the following keys:
|
|
7569
7969
|
* - `query`: Text string in Natural Language format.
|
|
7570
7970
|
* - `executeSearch`: Boolean to execute search and update search query.
|
|
@@ -7589,6 +7989,7 @@ export enum HostEvent {
|
|
|
7589
7989
|
SpotterSearch = "SpotterSearch",
|
|
7590
7990
|
/**
|
|
7591
7991
|
* Edits the last prompt in spotter embed.
|
|
7992
|
+
* Payload: `string`.
|
|
7592
7993
|
* @param - `query`: Text string
|
|
7593
7994
|
* @example
|
|
7594
7995
|
* ```js
|
|
@@ -7605,6 +8006,7 @@ export enum HostEvent {
|
|
|
7605
8006
|
EditLastPrompt = "EditLastPrompt",
|
|
7606
8007
|
/**
|
|
7607
8008
|
* Opens the data source preview modal in Spotter Embed.
|
|
8009
|
+
* Payload: none.
|
|
7608
8010
|
* @example
|
|
7609
8011
|
* ```js
|
|
7610
8012
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
@@ -7640,6 +8042,7 @@ export enum HostEvent {
|
|
|
7640
8042
|
DataModelInstructions = "DataModelInstructions",
|
|
7641
8043
|
/**
|
|
7642
8044
|
* Resets the Spotter Embed Conversation.
|
|
8045
|
+
* Payload: none.
|
|
7643
8046
|
* @example
|
|
7644
8047
|
* ```js
|
|
7645
8048
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
@@ -7652,6 +8055,7 @@ export enum HostEvent {
|
|
|
7652
8055
|
* `conversationId` is **mandatory** — you must pass the id of the
|
|
7653
8056
|
* conversation to share. Also no-op when sharing is disabled
|
|
7654
8057
|
* (enableShareConversation off) or when already in the read-only shared view.
|
|
8058
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7655
8059
|
* @example
|
|
7656
8060
|
* ```js
|
|
7657
8061
|
* spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
|
|
@@ -7661,6 +8065,7 @@ export enum HostEvent {
|
|
|
7661
8065
|
ShareSpotterConversation = "ShareSpotterConversation",
|
|
7662
8066
|
/**
|
|
7663
8067
|
* Closes the Spotter share-conversation modal. No-op if none is open.
|
|
8068
|
+
* Payload: none.
|
|
7664
8069
|
* @example
|
|
7665
8070
|
* ```js
|
|
7666
8071
|
* spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
|
|
@@ -7670,6 +8075,7 @@ export enum HostEvent {
|
|
|
7670
8075
|
CloseSpotterShareConversation = "CloseSpotterShareConversation",
|
|
7671
8076
|
/**
|
|
7672
8077
|
* Exits the read-only shared-conversation view.
|
|
8078
|
+
* Payload: none.
|
|
7673
8079
|
* @example
|
|
7674
8080
|
* ```js
|
|
7675
8081
|
* spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
|
|
@@ -7679,6 +8085,7 @@ export enum HostEvent {
|
|
|
7679
8085
|
ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
|
|
7680
8086
|
/**
|
|
7681
8087
|
* Deletes the last prompt in spotter embed.
|
|
8088
|
+
* Payload: none.
|
|
7682
8089
|
* @example
|
|
7683
8090
|
* ```js
|
|
7684
8091
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
@@ -7688,6 +8095,7 @@ export enum HostEvent {
|
|
|
7688
8095
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
7689
8096
|
/**
|
|
7690
8097
|
* Toggle the visualization to chart or table view.
|
|
8098
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7691
8099
|
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
7692
8100
|
* @example
|
|
7693
8101
|
* ```js
|
|
@@ -7726,6 +8134,7 @@ export enum HostEvent {
|
|
|
7726
8134
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
7727
8135
|
/**
|
|
7728
8136
|
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
8137
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7729
8138
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
7730
8139
|
* @example
|
|
7731
8140
|
* ```js
|
|
@@ -7750,7 +8159,13 @@ export enum HostEvent {
|
|
|
7750
8159
|
*/
|
|
7751
8160
|
UpdateEmbedParams = "updateEmbedParams",
|
|
7752
8161
|
/**
|
|
7753
|
-
*
|
|
8162
|
+
* Notifies the embedded ThoughtSpot app that the embed is being torn down, so that
|
|
8163
|
+
* it can release any resources it holds before the iframe is removed from the DOM.
|
|
8164
|
+
*
|
|
8165
|
+
* This is triggered for you by `embed.destroy()`; you rarely need to trigger it
|
|
8166
|
+
* directly. If `waitForCleanupOnDestroy` is set in the embed config, `destroy()`
|
|
8167
|
+
* waits for the app to acknowledge this event (up to `cleanupTimeout`) before
|
|
8168
|
+
* removing the iframe.
|
|
7754
8169
|
* @example
|
|
7755
8170
|
* ```js
|
|
7756
8171
|
* liveboardEmbed.trigger(HostEvent.DestroyEmbed);
|
|
@@ -7781,6 +8196,7 @@ export enum HostEvent {
|
|
|
7781
8196
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
7782
8197
|
* instance.
|
|
7783
8198
|
*
|
|
8199
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7784
8200
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7785
8201
|
* @example
|
|
7786
8202
|
* ```js
|
|
@@ -7798,6 +8214,7 @@ export enum HostEvent {
|
|
|
7798
8214
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
7799
8215
|
* instance.
|
|
7800
8216
|
*
|
|
8217
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7801
8218
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7802
8219
|
* @example
|
|
7803
8220
|
* ```js
|
|
@@ -7822,6 +8239,7 @@ export enum HostEvent {
|
|
|
7822
8239
|
* Trigger the **Send Test Email** action in the Liveboard schedule modal.
|
|
7823
8240
|
* Sends a test schedule email to self or all recipients.
|
|
7824
8241
|
* Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
|
|
8242
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
7825
8243
|
* @example
|
|
7826
8244
|
* ```js
|
|
7827
8245
|
* liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
|
|
@@ -7840,6 +8258,7 @@ export enum HostEvent {
|
|
|
7840
8258
|
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
7841
8259
|
/**
|
|
7842
8260
|
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
8261
|
+
* Payload: `{ query: string }`.
|
|
7843
8262
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7844
8263
|
* @param query - the prompt text to send.
|
|
7845
8264
|
* @example
|
|
@@ -7852,6 +8271,7 @@ export enum HostEvent {
|
|
|
7852
8271
|
SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
|
|
7853
8272
|
/**
|
|
7854
8273
|
* Initializes a new SpotterViz conversation.
|
|
8274
|
+
* Payload: none.
|
|
7855
8275
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7856
8276
|
* @example
|
|
7857
8277
|
* ```js
|
|
@@ -7861,6 +8281,7 @@ export enum HostEvent {
|
|
|
7861
8281
|
InitSpotterVizConversation = "InitSpotterVizConversation",
|
|
7862
8282
|
/**
|
|
7863
8283
|
* Opens the SpotterViz panel.
|
|
8284
|
+
* Payload: none.
|
|
7864
8285
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7865
8286
|
* @example
|
|
7866
8287
|
* ```js
|
|
@@ -7870,6 +8291,7 @@ export enum HostEvent {
|
|
|
7870
8291
|
OpenSpotterVizPanel = "OpenSpotterVizPanel",
|
|
7871
8292
|
/**
|
|
7872
8293
|
* Closes the SpotterViz panel.
|
|
8294
|
+
* Payload: none.
|
|
7873
8295
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7874
8296
|
* @example
|
|
7875
8297
|
* ```js
|
|
@@ -7880,6 +8302,7 @@ export enum HostEvent {
|
|
|
7880
8302
|
/**
|
|
7881
8303
|
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
7882
8304
|
* Requires `enableLiveboardDataCache` to be enabled.
|
|
8305
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
7883
8306
|
* @example
|
|
7884
8307
|
* ```js
|
|
7885
8308
|
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
@@ -9700,7 +10123,7 @@ export enum Action {
|
|
|
9700
10123
|
* ```js
|
|
9701
10124
|
* hiddenActions: [Action.QuickSearchPill]
|
|
9702
10125
|
* ```
|
|
9703
|
-
* @version SDK: 1.
|
|
10126
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9704
10127
|
*/
|
|
9705
10128
|
QuickSearchPill = "quickSearchPill",
|
|
9706
10129
|
/**
|
|
@@ -9715,7 +10138,7 @@ export enum Action {
|
|
|
9715
10138
|
* ```js
|
|
9716
10139
|
* hiddenActions: [Action.DeepAnalysisPill]
|
|
9717
10140
|
* ```
|
|
9718
|
-
* @version SDK: 1.
|
|
10141
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9719
10142
|
*/
|
|
9720
10143
|
DeepAnalysisPill = "deepAnalysisPill",
|
|
9721
10144
|
/**
|
|
@@ -9730,7 +10153,7 @@ export enum Action {
|
|
|
9730
10153
|
* ```js
|
|
9731
10154
|
* hiddenActions: [Action.DataLiteracyPill]
|
|
9732
10155
|
* ```
|
|
9733
|
-
* @version SDK: 1.
|
|
10156
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
9734
10157
|
*/
|
|
9735
10158
|
DataLiteracyPill = "dataLiteracyPill",
|
|
9736
10159
|
/**
|
|
@@ -9912,79 +10335,340 @@ export enum Action {
|
|
|
9912
10335
|
* disabledActions: [Action.SpotterOnLiveboard]
|
|
9913
10336
|
* ```
|
|
9914
10337
|
*/
|
|
9915
|
-
SpotterOnLiveboard = "spotterOnLiveboard"
|
|
9916
|
-
|
|
9917
|
-
|
|
9918
|
-
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
|
|
9928
|
-
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
10338
|
+
SpotterOnLiveboard = "spotterOnLiveboard",
|
|
10339
|
+
/**
|
|
10340
|
+
* Controls the visibility and disabled state of the "Chart Type" menu item
|
|
10341
|
+
* in Chart Settings V2.
|
|
10342
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10343
|
+
* @example
|
|
10344
|
+
* ```js
|
|
10345
|
+
* {
|
|
10346
|
+
* hiddenActions: [Action.ChartTypeSettings],
|
|
10347
|
+
* disabledActions: [Action.ChartTypeSettings],
|
|
10348
|
+
* }
|
|
10349
|
+
* ```
|
|
10350
|
+
*/
|
|
10351
|
+
ChartTypeSettings = "CHART_TYPE",
|
|
10352
|
+
/**
|
|
10353
|
+
* Controls the visibility and disabled state of the "Layout" menu item
|
|
10354
|
+
* in Chart Settings V2.
|
|
10355
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10356
|
+
* @example
|
|
10357
|
+
* ```js
|
|
10358
|
+
* {
|
|
10359
|
+
* hiddenActions: [Action.LayoutSettings],
|
|
10360
|
+
* disabledActions: [Action.LayoutSettings],
|
|
10361
|
+
* }
|
|
10362
|
+
* ```
|
|
10363
|
+
*/
|
|
10364
|
+
LayoutSettings = "LAYOUT",
|
|
10365
|
+
/**
|
|
10366
|
+
* Controls the visibility and disabled state of the "Column" menu item
|
|
10367
|
+
* in Chart Settings V2.
|
|
10368
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10369
|
+
* @example
|
|
10370
|
+
* ```js
|
|
10371
|
+
* {
|
|
10372
|
+
* hiddenActions: [Action.ColumnSettings],
|
|
10373
|
+
* disabledActions: [Action.ColumnSettings],
|
|
10374
|
+
* }
|
|
10375
|
+
* ```
|
|
10376
|
+
*/
|
|
10377
|
+
ColumnSettings = "COLUMN",
|
|
10378
|
+
/**
|
|
10379
|
+
* Controls the visibility and disabled state of the "Axis" menu item
|
|
10380
|
+
* in Chart Settings V2.
|
|
10381
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10382
|
+
* @example
|
|
10383
|
+
* ```js
|
|
10384
|
+
* {
|
|
10385
|
+
* hiddenActions: [Action.AxisSettings],
|
|
10386
|
+
* disabledActions: [Action.AxisSettings],
|
|
10387
|
+
* }
|
|
10388
|
+
* ```
|
|
10389
|
+
*/
|
|
10390
|
+
AxisSettings = "AXIS",
|
|
10391
|
+
/**
|
|
10392
|
+
* Controls the visibility and disabled state of the "Data Label" menu item
|
|
10393
|
+
* in Chart Settings V2.
|
|
10394
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10395
|
+
* @example
|
|
10396
|
+
* ```js
|
|
10397
|
+
* {
|
|
10398
|
+
* hiddenActions: [Action.DataLabelSettings],
|
|
10399
|
+
* disabledActions: [Action.DataLabelSettings],
|
|
10400
|
+
* }
|
|
10401
|
+
* ```
|
|
10402
|
+
*/
|
|
10403
|
+
DataLabelSettings = "DATA_LABEL",
|
|
10404
|
+
/**
|
|
10405
|
+
* Controls the visibility and disabled state of the "Tooltip" menu item
|
|
10406
|
+
* in Chart Settings V2.
|
|
10407
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10408
|
+
* @example
|
|
10409
|
+
* ```js
|
|
10410
|
+
* {
|
|
10411
|
+
* hiddenActions: [Action.TooltipSettings],
|
|
10412
|
+
* disabledActions: [Action.TooltipSettings],
|
|
10413
|
+
* }
|
|
10414
|
+
* ```
|
|
10415
|
+
*/
|
|
10416
|
+
TooltipSettings = "TOOLTIP",
|
|
10417
|
+
/**
|
|
10418
|
+
* Controls the visibility and disabled state of the "Legend" menu item
|
|
10419
|
+
* in Chart Settings V2.
|
|
10420
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10421
|
+
* @example
|
|
10422
|
+
* ```js
|
|
10423
|
+
* {
|
|
10424
|
+
* hiddenActions: [Action.LegendSettings],
|
|
10425
|
+
* disabledActions: [Action.LegendSettings],
|
|
10426
|
+
* }
|
|
10427
|
+
* ```
|
|
10428
|
+
*/
|
|
10429
|
+
LegendSettings = "LEGEND",
|
|
10430
|
+
/**
|
|
10431
|
+
* Controls the visibility and disabled state of the "Display" menu item
|
|
10432
|
+
* in Chart Settings V2.
|
|
10433
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10434
|
+
* @example
|
|
10435
|
+
* ```js
|
|
10436
|
+
* {
|
|
10437
|
+
* hiddenActions: [Action.DisplaySettings],
|
|
10438
|
+
* disabledActions: [Action.DisplaySettings],
|
|
10439
|
+
* }
|
|
10440
|
+
* ```
|
|
10441
|
+
*/
|
|
10442
|
+
DisplaySettings = "DISPLAY",
|
|
10443
|
+
/**
|
|
10444
|
+
* Controls the visibility and disabled state of the "Query Details" menu
|
|
10445
|
+
* item in Chart Settings V2.
|
|
10446
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10447
|
+
* @example
|
|
10448
|
+
* ```js
|
|
10449
|
+
* {
|
|
10450
|
+
* hiddenActions: [Action.QuerySettings],
|
|
10451
|
+
* disabledActions: [Action.QuerySettings],
|
|
10452
|
+
* }
|
|
10453
|
+
* ```
|
|
10454
|
+
*/
|
|
10455
|
+
QuerySettings = "QUERY_DETAILS",
|
|
10456
|
+
/**
|
|
10457
|
+
* Controls the visibility and disabled state of the "Custom Action" menu
|
|
10458
|
+
* item in Chart Settings V2.
|
|
10459
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10460
|
+
* @example
|
|
10461
|
+
* ```js
|
|
10462
|
+
* {
|
|
10463
|
+
* hiddenActions: [Action.CustomSettings],
|
|
10464
|
+
* disabledActions: [Action.CustomSettings],
|
|
10465
|
+
* }
|
|
10466
|
+
* ```
|
|
10467
|
+
*/
|
|
10468
|
+
CustomSettings = "CUSTOM_ACTION",
|
|
10469
|
+
/**
|
|
10470
|
+
* Controls the visibility and disabled state of the "Muze AI" menu item
|
|
10471
|
+
* in Chart Settings V2.
|
|
10472
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10473
|
+
* @example
|
|
10474
|
+
* ```js
|
|
10475
|
+
* {
|
|
10476
|
+
* hiddenActions: [Action.MuzeAiSettings],
|
|
10477
|
+
* disabledActions: [Action.MuzeAiSettings],
|
|
10478
|
+
* }
|
|
10479
|
+
* ```
|
|
10480
|
+
*/
|
|
10481
|
+
MuzeAiSettings = "MUZE_AI",
|
|
10482
|
+
/**
|
|
10483
|
+
* Controls the visibility and disabled state of the "R Analysis" menu item
|
|
10484
|
+
* in Chart Settings V2.
|
|
10485
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10486
|
+
* @example
|
|
10487
|
+
* ```js
|
|
10488
|
+
* {
|
|
10489
|
+
* hiddenActions: [Action.RAnalysisSettings],
|
|
10490
|
+
* disabledActions: [Action.RAnalysisSettings],
|
|
10491
|
+
* }
|
|
10492
|
+
* ```
|
|
10493
|
+
*/
|
|
10494
|
+
RAnalysisSettings = "R_ANALYSIS",
|
|
10495
|
+
/**
|
|
10496
|
+
* Controls the visibility and disabled state of the "Add to Collection" menu item.
|
|
10497
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10498
|
+
* @example
|
|
10499
|
+
* ```js
|
|
10500
|
+
* {
|
|
10501
|
+
* hiddenActions: [Action.AddToCollection],
|
|
10502
|
+
* disabledActions: [Action.AddToCollection],
|
|
10503
|
+
* }
|
|
10504
|
+
* ```
|
|
10505
|
+
*/
|
|
10506
|
+
AddToCollection = "addToCollection",
|
|
10507
|
+
/**
|
|
10508
|
+
* Controls the visibility and disabled state of the "Create Collection" button.
|
|
10509
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10510
|
+
* @example
|
|
10511
|
+
* ```js
|
|
10512
|
+
* {
|
|
10513
|
+
* hiddenActions: [Action.CreateCollection],
|
|
10514
|
+
* disabledActions: [Action.CreateCollection],
|
|
10515
|
+
* }
|
|
10516
|
+
* ```
|
|
10517
|
+
*/
|
|
10518
|
+
CreateCollection = "createCollection",
|
|
10519
|
+
/**
|
|
10520
|
+
* Controls the visibility and disabled state of the "Move" menu item in a
|
|
10521
|
+
* Collection.
|
|
10522
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10523
|
+
* @example
|
|
10524
|
+
* ```js
|
|
10525
|
+
* {
|
|
10526
|
+
* hiddenActions: [Action.MoveToCollection],
|
|
10527
|
+
* disabledActions: [Action.MoveToCollection],
|
|
10528
|
+
* }
|
|
10529
|
+
* ```
|
|
10530
|
+
*/
|
|
10531
|
+
MoveToCollection = "moveToCollection",
|
|
10532
|
+
/**
|
|
10533
|
+
* Controls the visibility and disabled state of the "Remove" menu item in a
|
|
10534
|
+
* Collection.
|
|
10535
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10536
|
+
* @example
|
|
10537
|
+
* ```js
|
|
10538
|
+
* {
|
|
10539
|
+
* hiddenActions: [Action.RemoveFromCollection],
|
|
10540
|
+
* disabledActions: [Action.RemoveFromCollection],
|
|
10541
|
+
* }
|
|
10542
|
+
* ```
|
|
10543
|
+
*/
|
|
10544
|
+
RemoveFromCollection = "removeFromCollection",
|
|
10545
|
+
/**
|
|
10546
|
+
* Controls the visibility and disabled state of the "Delete" menu item for a
|
|
10547
|
+
* Collection.
|
|
10548
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10549
|
+
* @example
|
|
10550
|
+
* ```js
|
|
10551
|
+
* {
|
|
10552
|
+
* hiddenActions: [Action.DeleteCollection],
|
|
10553
|
+
* disabledActions: [Action.DeleteCollection],
|
|
10554
|
+
* }
|
|
10555
|
+
* ```
|
|
10556
|
+
*/
|
|
10557
|
+
DeleteCollection = "deleteCollection"
|
|
10558
|
+
}
|
|
10559
|
+
export enum PrefetchFeatures {
|
|
10560
|
+
FullApp = "FullApp",
|
|
10561
|
+
SearchEmbed = "SearchEmbed",
|
|
10562
|
+
LiveboardEmbed = "LiveboardEmbed",
|
|
10563
|
+
VizEmbed = "VizEmbed"
|
|
10564
|
+
}
|
|
10565
|
+
/**
|
|
10566
|
+
* Enum for options to change context trigger.
|
|
10567
|
+
* The `BOTH_CLICKS` option is available from 10.8.0.cl.
|
|
10568
|
+
*/
|
|
10569
|
+
export enum ContextMenuTriggerOptions {
|
|
10570
|
+
LEFT_CLICK = "left-click",
|
|
10571
|
+
RIGHT_CLICK = "right-click",
|
|
10572
|
+
BOTH_CLICKS = "both-clicks"
|
|
10573
|
+
}
|
|
10574
|
+
export interface ColumnValue {
|
|
10575
|
+
column: {
|
|
10576
|
+
id: string;
|
|
10577
|
+
name: string;
|
|
10578
|
+
dataType: string;
|
|
10579
|
+
[key: string]: any;
|
|
10580
|
+
};
|
|
10581
|
+
value: string | number | boolean | {
|
|
10582
|
+
v: {
|
|
10583
|
+
s: number;
|
|
10584
|
+
e: number;
|
|
10585
|
+
};
|
|
10586
|
+
};
|
|
10587
|
+
}
|
|
10588
|
+
export interface VizPoint {
|
|
10589
|
+
selectedAttributes: ColumnValue[];
|
|
10590
|
+
selectedMeasures: ColumnValue[];
|
|
10591
|
+
}
|
|
10592
|
+
/**
|
|
10593
|
+
* @group Events
|
|
10594
|
+
*/
|
|
10595
|
+
export interface CustomActionPayload {
|
|
10596
|
+
/**
|
|
10597
|
+
* Id of the custom action that was triggered. Matches the `id` you set on
|
|
10598
|
+
* the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
|
|
10599
|
+
*/
|
|
10600
|
+
id?: string;
|
|
10601
|
+
contextMenuPoints?: {
|
|
10602
|
+
clickedPoint: VizPoint;
|
|
10603
|
+
selectedPoints: VizPoint[];
|
|
10604
|
+
};
|
|
10605
|
+
embedAnswerData: {
|
|
10606
|
+
name: string;
|
|
10607
|
+
id: string;
|
|
10608
|
+
sources: {
|
|
10609
|
+
header: {
|
|
10610
|
+
guid: string;
|
|
10611
|
+
};
|
|
10612
|
+
};
|
|
10613
|
+
columns: any[];
|
|
10614
|
+
data: any[];
|
|
10615
|
+
[key: string]: any;
|
|
10616
|
+
};
|
|
10617
|
+
session: SessionInterface;
|
|
10618
|
+
vizId?: string;
|
|
10619
|
+
}
|
|
10620
|
+
/**
|
|
10621
|
+
* A code-based custom action to inject into the embedded ThoughtSpot UI.
|
|
10622
|
+
* Pass an array of these as `customActions` in the embed view config. When a
|
|
10623
|
+
* user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
|
|
10624
|
+
* a {@link CustomActionPayload} carrying the same `id`.
|
|
10625
|
+
*/
|
|
10626
|
+
export interface CustomAction {
|
|
10627
|
+
/**
|
|
10628
|
+
* Display label shown on the action's button or menu item.
|
|
10629
|
+
*/
|
|
10630
|
+
name: string;
|
|
10631
|
+
/**
|
|
10632
|
+
* Unique identifier for the action. Echoed back as `id` on the
|
|
10633
|
+
* {@link CustomActionPayload} when the action is invoked.
|
|
10634
|
+
*/
|
|
10635
|
+
id: string;
|
|
10636
|
+
/**
|
|
10637
|
+
* Where the action appears: a primary button, the "More" menu, or the
|
|
10638
|
+
* right-click context menu. See {@link CustomActionsPosition}.
|
|
10639
|
+
*/
|
|
10640
|
+
position: CustomActionsPosition;
|
|
10641
|
+
/**
|
|
10642
|
+
* The surface the action applies to (Liveboard, visualization, Answer, or
|
|
10643
|
+
* Spotter). See {@link CustomActionTarget}. The allowed `position` values
|
|
10644
|
+
* and scoping keys depend on the target.
|
|
10645
|
+
*/
|
|
10646
|
+
target: CustomActionTarget;
|
|
10647
|
+
/**
|
|
10648
|
+
* Scope the action to specific objects by GUID. Which keys are allowed
|
|
10649
|
+
* depends on `target` (for example, a `VIZ` action may use `answerIds`,
|
|
10650
|
+
* `liveboardIds`, and `vizIds`).
|
|
10651
|
+
*/
|
|
10652
|
+
metadataIds?: {
|
|
10653
|
+
answerIds?: string[];
|
|
10654
|
+
liveboardIds?: string[];
|
|
10655
|
+
vizIds?: string[];
|
|
10656
|
+
};
|
|
10657
|
+
/**
|
|
10658
|
+
* Scope the action by data model, using model GUIDs or column names.
|
|
10659
|
+
* Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
|
|
10660
|
+
*/
|
|
10661
|
+
dataModelIds?: {
|
|
10662
|
+
modelIds?: string[];
|
|
10663
|
+
modelColumnNames?: string[];
|
|
10664
|
+
};
|
|
10665
|
+
/**
|
|
10666
|
+
* Restrict the action to specific organizations by ID.
|
|
10667
|
+
*/
|
|
9987
10668
|
orgIds?: string[];
|
|
10669
|
+
/**
|
|
10670
|
+
* Restrict the action to specific user groups by ID.
|
|
10671
|
+
*/
|
|
9988
10672
|
groupIds?: string[];
|
|
9989
10673
|
}
|
|
9990
10674
|
/**
|
|
@@ -10311,9 +10995,40 @@ export interface EmbedErrorDetailsEvent {
|
|
|
10311
10995
|
message: string | string[];
|
|
10312
10996
|
/** Machine-readable error code for programmatic error handling */
|
|
10313
10997
|
code: EmbedErrorCodes;
|
|
10998
|
+
/** How badly the embed is affected. Defaults to {@link EmbedErrorSeverity.SEV3}. */
|
|
10999
|
+
severity?: EmbedErrorSeverity;
|
|
10314
11000
|
/** Additional context-specific for backward compatibility */
|
|
10315
11001
|
[key: string]: any;
|
|
10316
11002
|
}
|
|
11003
|
+
/**
|
|
11004
|
+
* How badly an error affects the embed, so the host can decide whether it is
|
|
11005
|
+
* worth surfacing to the end user.
|
|
11006
|
+
*
|
|
11007
|
+
* Mirrors the severity that ThoughtSpot itself stamps on errors raised inside
|
|
11008
|
+
* the embedded app, so a host can apply one rule to both sources.
|
|
11009
|
+
*
|
|
11010
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11011
|
+
* @group Error Handling
|
|
11012
|
+
*
|
|
11013
|
+
* @example
|
|
11014
|
+
* Only surface errors that took the embed down
|
|
11015
|
+
*
|
|
11016
|
+
* ```js
|
|
11017
|
+
* embed.on(EmbedEvent.Error, (error) => {
|
|
11018
|
+
* if (error.severity === EmbedErrorSeverity.SEV1) {
|
|
11019
|
+
* showBanner(error.message);
|
|
11020
|
+
* }
|
|
11021
|
+
* });
|
|
11022
|
+
* ```
|
|
11023
|
+
*/
|
|
11024
|
+
export enum EmbedErrorSeverity {
|
|
11025
|
+
/** The embed cannot render. Nothing usable is on screen. */
|
|
11026
|
+
SEV1 = 1,
|
|
11027
|
+
/** Something is degraded but the embed still works. */
|
|
11028
|
+
SEV2 = 2,
|
|
11029
|
+
/** Everything else, including validation of the embedder's own input. */
|
|
11030
|
+
SEV3 = 3
|
|
11031
|
+
}
|
|
10317
11032
|
/**
|
|
10318
11033
|
* Context types for specifying the page context when triggering host events.
|
|
10319
11034
|
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
@@ -10371,25 +11086,40 @@ export interface DefaultAppInitData {
|
|
|
10371
11086
|
useHostEventsV2?: boolean;
|
|
10372
11087
|
}
|
|
10373
11088
|
/**
|
|
10374
|
-
*
|
|
11089
|
+
* Named groups of ThoughtSpot APIs that can be intercepted, for use in
|
|
11090
|
+
* `interceptUrls`. Each group expands to the underlying request URLs, so you do
|
|
11091
|
+
* not have to list them individually.
|
|
10375
11092
|
*/
|
|
10376
11093
|
export enum InterceptedApiType {
|
|
10377
11094
|
/**
|
|
10378
|
-
* The
|
|
11095
|
+
* The APIs that fetch the data backing an Answer, including its chart,
|
|
11096
|
+
* table, and headline data.
|
|
10379
11097
|
*/
|
|
10380
11098
|
AnswerData = "AnswerData",
|
|
10381
11099
|
/**
|
|
10382
|
-
*
|
|
11100
|
+
* Intercepts every `fetch` request the embedded application makes, not only
|
|
11101
|
+
* the data APIs. This includes authentication, session, and metadata calls,
|
|
11102
|
+
* so the handler must respond to requests it does not recognize by passing
|
|
11103
|
+
* `execute: true`. Listing this alongside other entries in `interceptUrls`
|
|
11104
|
+
* supersedes them.
|
|
10383
11105
|
*/
|
|
10384
11106
|
ALL = "ALL",
|
|
10385
11107
|
/**
|
|
10386
|
-
* The
|
|
11108
|
+
* The APIs that fetch the data backing a Liveboard.
|
|
10387
11109
|
*/
|
|
10388
11110
|
LiveboardData = "LiveboardData"
|
|
10389
11111
|
}
|
|
10390
11112
|
export type ApiInterceptFlags = {
|
|
10391
11113
|
/**
|
|
10392
|
-
*
|
|
11114
|
+
* Emits `EmbedEvent.OnBeforeGetVizDataIntercept` before the Answer data
|
|
11115
|
+
* APIs are called. This is the earlier, narrower form of interception, kept
|
|
11116
|
+
* for backward compatibility and implemented on top of
|
|
11117
|
+
* `EmbedEvent.ApiIntercept`. Prefer `interceptUrls` with
|
|
11118
|
+
* `InterceptedApiType.AnswerData` in new code.
|
|
11119
|
+
*
|
|
11120
|
+
* Setting this also intercepts the Answer data APIs, so both
|
|
11121
|
+
* `EmbedEvent.OnBeforeGetVizDataIntercept` and `EmbedEvent.ApiIntercept`
|
|
11122
|
+
* are emitted for those requests.
|
|
10393
11123
|
*
|
|
10394
11124
|
* Can be used for Search and App Embed from SDK 1.29.0
|
|
10395
11125
|
*
|
|
@@ -10397,14 +11127,21 @@ export type ApiInterceptFlags = {
|
|
|
10397
11127
|
*/
|
|
10398
11128
|
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
10399
11129
|
/**
|
|
10400
|
-
*
|
|
10401
|
-
*
|
|
11130
|
+
* The requests to intercept, given as `InterceptedApiType` groups, absolute
|
|
11131
|
+
* URLs, or paths beginning with `/` that are resolved against the
|
|
11132
|
+
* ThoughtSpot host. Setting this is what turns interception on.
|
|
11133
|
+
*
|
|
11134
|
+
* A URL matches only on exact equality with the request's fully resolved
|
|
11135
|
+
* URL, query string included, so prefer an `InterceptedApiType` group where
|
|
11136
|
+
* one covers the API you need.
|
|
11137
|
+
*
|
|
11138
|
+
* Each intercepted request pauses and emits `EmbedEvent.ApiIntercept`, then
|
|
11139
|
+
* proceeds according to the response passed to that event's responder.
|
|
10402
11140
|
*
|
|
10403
11141
|
* @example
|
|
10404
11142
|
* ```js
|
|
10405
11143
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10406
11144
|
* ...viewConfig,
|
|
10407
|
-
* enableApiIntercept: true,
|
|
10408
11145
|
* interceptUrls: [InterceptedApiType.LiveboardData],
|
|
10409
11146
|
* })
|
|
10410
11147
|
* ```
|
|
@@ -10413,14 +11150,14 @@ export type ApiInterceptFlags = {
|
|
|
10413
11150
|
*/
|
|
10414
11151
|
interceptUrls?: (string | InterceptedApiType)[];
|
|
10415
11152
|
/**
|
|
10416
|
-
*
|
|
10417
|
-
*
|
|
11153
|
+
* How long, in milliseconds, an intercepted request waits for the
|
|
11154
|
+
* `EmbedEvent.ApiIntercept` responder before it is abandoned. Defaults to
|
|
11155
|
+
* 30000. On timeout the request fails and `EmbedEvent.Error` is emitted.
|
|
10418
11156
|
*
|
|
10419
11157
|
* @example
|
|
10420
11158
|
* ```js
|
|
10421
11159
|
* const embed = new LiveboardEmbed('#embed', {
|
|
10422
11160
|
* ...viewConfig,
|
|
10423
|
-
* enableApiIntercept: true,
|
|
10424
11161
|
* interceptUrls: [InterceptedApiType.ALL],
|
|
10425
11162
|
* interceptTimeout: 1000,
|
|
10426
11163
|
* })
|
|
@@ -10887,240 +11624,537 @@ export interface TableOverrides {
|
|
|
10887
11624
|
* });
|
|
10888
11625
|
* ```
|
|
10889
11626
|
*/
|
|
10890
|
-
export interface VisualizationOverrides {
|
|
10891
|
-
/** Chart visualization overrides */
|
|
10892
|
-
chart?: ChartOverrides;
|
|
10893
|
-
/** Table visualization overrides */
|
|
10894
|
-
table?: TableOverrides;
|
|
11627
|
+
export interface VisualizationOverrides {
|
|
11628
|
+
/** Chart visualization overrides */
|
|
11629
|
+
chart?: ChartOverrides;
|
|
11630
|
+
/** Table visualization overrides */
|
|
11631
|
+
table?: TableOverrides;
|
|
11632
|
+
}
|
|
11633
|
+
/**
|
|
11634
|
+
* The configuration object for the full-height behavior shared by the
|
|
11635
|
+
* Liveboard and app embeds.
|
|
11636
|
+
*
|
|
11637
|
+
* When `fullHeight` is enabled the SDK resizes the embed container to match the
|
|
11638
|
+
* height reported by the ThoughtSpot app, and — when lazy loading is also
|
|
11639
|
+
* enabled — keeps the app informed of the portion of the embed that is
|
|
11640
|
+
* currently visible so that visualizations load on demand.
|
|
11641
|
+
*/
|
|
11642
|
+
export interface FullHeightViewConfig {
|
|
11643
|
+
/**
|
|
11644
|
+
* If set to true, the embedded object container dynamically resizes
|
|
11645
|
+
* according to the height of the Liveboard.
|
|
11646
|
+
*
|
|
11647
|
+
* **Note**: Using fullHeight loads all visualizations on the
|
|
11648
|
+
* Liveboard simultaneously, which results in multiple warehouse
|
|
11649
|
+
* queries and potentially a longer wait for the topmost
|
|
11650
|
+
* visualizations to display on the screen.
|
|
11651
|
+
* Setting `fullHeight` to `false` fetches visualizations
|
|
11652
|
+
* incrementally as users scroll the page to view the charts and tables.
|
|
11653
|
+
*
|
|
11654
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
11655
|
+
* {@link lazyLoadingForFullHeight} and
|
|
11656
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
11657
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
11658
|
+
*
|
|
11659
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11660
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
11661
|
+
* @example
|
|
11662
|
+
* ```js
|
|
11663
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11664
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11665
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11666
|
+
* ... // other view config
|
|
11667
|
+
* fullHeight: true,
|
|
11668
|
+
* });
|
|
11669
|
+
* ```
|
|
11670
|
+
*/
|
|
11671
|
+
fullHeight?: boolean;
|
|
11672
|
+
/**
|
|
11673
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
11674
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
11675
|
+
* other screens navigable from a Liveboard.
|
|
11676
|
+
*
|
|
11677
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11678
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
11679
|
+
* @default 500
|
|
11680
|
+
* @example
|
|
11681
|
+
* ```js
|
|
11682
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11683
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11684
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11685
|
+
* ... // other view config
|
|
11686
|
+
* fullHeight: true,
|
|
11687
|
+
* minimumHeight: 600,
|
|
11688
|
+
* });
|
|
11689
|
+
* ```
|
|
11690
|
+
*/
|
|
11691
|
+
minimumHeight?: number;
|
|
11692
|
+
/**
|
|
11693
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
11694
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
11695
|
+
* other screens navigable from a Liveboard.
|
|
11696
|
+
*
|
|
11697
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11698
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
11699
|
+
* @deprecated Use `minimumHeight` instead.
|
|
11700
|
+
* @default 500
|
|
11701
|
+
* @example
|
|
11702
|
+
* ```js
|
|
11703
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11704
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11705
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11706
|
+
* ... // other view config
|
|
11707
|
+
* fullHeight: true,
|
|
11708
|
+
* defaultHeight: 600,
|
|
11709
|
+
* });
|
|
11710
|
+
* ```
|
|
11711
|
+
*/
|
|
11712
|
+
defaultHeight?: number;
|
|
11713
|
+
/**
|
|
11714
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
11715
|
+
* loading the whole full-height Liveboard at once.
|
|
11716
|
+
*
|
|
11717
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
11718
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
11719
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
11720
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
11721
|
+
*
|
|
11722
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11723
|
+
* @type {boolean}
|
|
11724
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
11725
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
11726
|
+
* @example
|
|
11727
|
+
* ```js
|
|
11728
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11729
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11730
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
11731
|
+
* // ...other options
|
|
11732
|
+
* fullHeight: true,
|
|
11733
|
+
* lazyLoadingForFullHeight: true,
|
|
11734
|
+
* })
|
|
11735
|
+
* ```
|
|
11736
|
+
*/
|
|
11737
|
+
lazyLoadingForFullHeight?: boolean;
|
|
11738
|
+
/**
|
|
11739
|
+
* How far outside the viewport a visualization starts loading, when
|
|
11740
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
11741
|
+
*
|
|
11742
|
+
* For example, if the margin is set to '10px',
|
|
11743
|
+
* the visualization will be loaded 10px before its top edge is visible in the
|
|
11744
|
+
* viewport.
|
|
11745
|
+
*
|
|
11746
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
11747
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
11748
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
11749
|
+
* `auto`; an invalid value is logged and ignored.
|
|
11750
|
+
*
|
|
11751
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
11752
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
11753
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
11754
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
11755
|
+
* only once it is actually visible.
|
|
11756
|
+
*
|
|
11757
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11758
|
+
* @type {string}
|
|
11759
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
11760
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
11761
|
+
* @example
|
|
11762
|
+
* ```js
|
|
11763
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11764
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11765
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
11766
|
+
* // ...other options
|
|
11767
|
+
* fullHeight: true,
|
|
11768
|
+
* lazyLoadingForFullHeight: true,
|
|
11769
|
+
* // With 0px, the visualization only starts loading once it is
|
|
11770
|
+
* // visible in the viewport.
|
|
11771
|
+
* lazyLoadingMargin: '0px',
|
|
11772
|
+
* })
|
|
11773
|
+
* ```
|
|
11774
|
+
*/
|
|
11775
|
+
lazyLoadingMargin?: string;
|
|
11776
|
+
/**
|
|
11777
|
+
* Computes the visible region of the embed against its scrollable and
|
|
11778
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
11779
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
11780
|
+
*
|
|
11781
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
11782
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
11783
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
11784
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
11785
|
+
* tracking.
|
|
11786
|
+
*
|
|
11787
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11788
|
+
* @type {boolean}
|
|
11789
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
11790
|
+
*/
|
|
11791
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
11792
|
+
}
|
|
11793
|
+
/**
|
|
11794
|
+
* Request for host events that MAY target a specific visualization.
|
|
11795
|
+
* Omitting vizId targets the current answer/liveboard as a whole.
|
|
11796
|
+
* (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
|
|
11797
|
+
*/
|
|
11798
|
+
export interface VizScopedRequest {
|
|
11799
|
+
vizId?: string;
|
|
11800
|
+
}
|
|
11801
|
+
/**
|
|
11802
|
+
* Request for host events that MUST target a specific visualization.
|
|
11803
|
+
*/
|
|
11804
|
+
export interface RequiredVizRequest {
|
|
11805
|
+
vizId: string;
|
|
11806
|
+
}
|
|
11807
|
+
/**
|
|
11808
|
+
* Request for Spotter conversation-scoped host events.
|
|
11809
|
+
*/
|
|
11810
|
+
export interface ConversationScopedRequest {
|
|
11811
|
+
conversationId: string;
|
|
11812
|
+
}
|
|
11813
|
+
/**
|
|
11814
|
+
* Request payload for {@link HostEvent.OpenFilter}. Field requirements
|
|
11815
|
+
* vary by context (Search requires columnId/type/dataType/name); the
|
|
11816
|
+
* contract is the cross-context superset — the app validates per context
|
|
11817
|
+
* at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
|
|
11818
|
+
* {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
|
|
11819
|
+
*/
|
|
11820
|
+
export interface OpenFilterRequest {
|
|
11821
|
+
column: {
|
|
11822
|
+
columnId?: string;
|
|
11823
|
+
columnName?: string;
|
|
11824
|
+
type?: string;
|
|
11825
|
+
dataType?: string;
|
|
11826
|
+
name?: string;
|
|
11827
|
+
isStrictDateColumn?: boolean;
|
|
11828
|
+
};
|
|
11829
|
+
applicability?: Applicability;
|
|
11830
|
+
visualizationId?: string;
|
|
11831
|
+
liveboardId?: string;
|
|
11832
|
+
}
|
|
11833
|
+
/**
|
|
11834
|
+
* `OpenFilter` in Liveboard context: full column plus scoping fields.
|
|
11835
|
+
* A per-context view of {@link OpenFilterRequest} (documentation only today;
|
|
11836
|
+
* `trigger()` accepts the superset).
|
|
11837
|
+
*/
|
|
11838
|
+
export interface OpenFilterLiveboardRequest {
|
|
11839
|
+
column: {
|
|
11840
|
+
columnId?: string;
|
|
11841
|
+
columnName?: string;
|
|
11842
|
+
};
|
|
11843
|
+
applicability?: Applicability;
|
|
11844
|
+
visualizationId?: string;
|
|
11845
|
+
liveboardId?: string;
|
|
11846
|
+
}
|
|
11847
|
+
/**
|
|
11848
|
+
* `OpenFilter` in Spotter context: only the column identity is accepted.
|
|
11849
|
+
*/
|
|
11850
|
+
export interface OpenFilterSpotterRequest {
|
|
11851
|
+
column: {
|
|
11852
|
+
columnId?: string;
|
|
11853
|
+
columnName?: string;
|
|
11854
|
+
};
|
|
11855
|
+
}
|
|
11856
|
+
/**
|
|
11857
|
+
* `OpenFilter` in Search/Answer context: column identity plus column metadata.
|
|
11858
|
+
*/
|
|
11859
|
+
export interface OpenFilterSearchRequest {
|
|
11860
|
+
column: {
|
|
11861
|
+
columnId?: string;
|
|
11862
|
+
columnName?: string;
|
|
11863
|
+
type?: string;
|
|
11864
|
+
dataType?: string;
|
|
11865
|
+
name?: string;
|
|
11866
|
+
isStrictDateColumn?: boolean;
|
|
11867
|
+
};
|
|
10895
11868
|
}
|
|
10896
|
-
|
|
10897
|
-
|
|
10898
|
-
|
|
10899
|
-
|
|
11869
|
+
/**
|
|
11870
|
+
* Request payload for {@link HostEvent.DrillDown}. Drills on selected or
|
|
11871
|
+
* clicked points of a visualization. In Liveboard context `vizId` is required
|
|
11872
|
+
* at runtime (documentation only today; `trigger()` is not yet type-enforced).
|
|
11873
|
+
*/
|
|
11874
|
+
export interface DrillDownRequest {
|
|
11875
|
+
points: {
|
|
11876
|
+
clickedPoint?: object;
|
|
11877
|
+
selectedPoints?: object[];
|
|
11878
|
+
};
|
|
11879
|
+
columnGuid?: string;
|
|
11880
|
+
autoDrillDown?: boolean;
|
|
11881
|
+
vizId?: string;
|
|
10900
11882
|
}
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
10904
|
-
|
|
11883
|
+
/**
|
|
11884
|
+
* Request payload for {@link HostEvent.OpenParameter}. One of parameterId
|
|
11885
|
+
* or parameterName must be provided (validated at runtime).
|
|
11886
|
+
*/
|
|
11887
|
+
export interface OpenParameterRequest {
|
|
11888
|
+
parameter: {
|
|
11889
|
+
parameterId?: string;
|
|
11890
|
+
parameterName?: string;
|
|
11891
|
+
};
|
|
11892
|
+
applicability?: Applicability;
|
|
10905
11893
|
}
|
|
10906
11894
|
/**
|
|
10907
|
-
*
|
|
11895
|
+
* Request payload for {@link HostEvent.Search}.
|
|
10908
11896
|
*/
|
|
10909
|
-
export
|
|
10910
|
-
|
|
10911
|
-
|
|
10912
|
-
|
|
11897
|
+
export interface SearchRequest {
|
|
11898
|
+
searchQuery: string;
|
|
11899
|
+
dataSources: string[];
|
|
11900
|
+
execute?: boolean;
|
|
10913
11901
|
}
|
|
10914
11902
|
/**
|
|
10915
|
-
*
|
|
10916
|
-
* At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
|
|
10917
|
-
* is not required.
|
|
11903
|
+
* Request payload for {@link HostEvent.SpotterSearch}.
|
|
10918
11904
|
*/
|
|
10919
|
-
export interface
|
|
10920
|
-
|
|
10921
|
-
|
|
11905
|
+
export interface SpotterSearchRequest {
|
|
11906
|
+
query: string;
|
|
11907
|
+
executeSearch: boolean;
|
|
10922
11908
|
}
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
11909
|
+
/**
|
|
11910
|
+
* A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
|
|
11911
|
+
*/
|
|
11912
|
+
export interface CrossFilterCondition {
|
|
11913
|
+
columnName?: string;
|
|
11914
|
+
operator?: string;
|
|
11915
|
+
values: Array<string | number | boolean>;
|
|
11916
|
+
}
|
|
11917
|
+
/**
|
|
11918
|
+
* Request payload for {@link HostEvent.UpdateCrossFilter}.
|
|
11919
|
+
*/
|
|
11920
|
+
export interface UpdateCrossFilterRequest {
|
|
11921
|
+
vizId: string;
|
|
11922
|
+
conditions: CrossFilterCondition[];
|
|
11923
|
+
}
|
|
11924
|
+
/**
|
|
11925
|
+
* A single filter entry for {@link HostEvent.UpdateFilters}. Supports both
|
|
11926
|
+
* the current (columnName/operator) and legacy (column/oper) field names.
|
|
11927
|
+
*/
|
|
11928
|
+
export interface HostFilterUpdate {
|
|
11929
|
+
columnName?: string;
|
|
11930
|
+
columnId?: string;
|
|
11931
|
+
operator?: string;
|
|
11932
|
+
values: Array<string | number | boolean>;
|
|
10927
11933
|
type?: string;
|
|
11934
|
+
datePeriod?: string;
|
|
11935
|
+
negate?: boolean;
|
|
11936
|
+
/** Legacy field name for columnName. */
|
|
11937
|
+
column?: string;
|
|
11938
|
+
/** Legacy field name for operator. */
|
|
11939
|
+
oper?: string;
|
|
10928
11940
|
applicability?: Applicability;
|
|
10929
11941
|
}
|
|
10930
|
-
|
|
10931
|
-
|
|
10932
|
-
|
|
11942
|
+
/**
|
|
11943
|
+
* Request payload for {@link HostEvent.UpdateFilters} (singular or plural
|
|
11944
|
+
* form).
|
|
11945
|
+
*/
|
|
11946
|
+
export interface UpdateFiltersRequest {
|
|
11947
|
+
filter?: HostFilterUpdate;
|
|
11948
|
+
filters?: HostFilterUpdate[];
|
|
11949
|
+
/**
|
|
11950
|
+
* Scope the update to a specific visualization on a Liveboard.
|
|
11951
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11952
|
+
*/
|
|
11953
|
+
visualizationId?: string;
|
|
11954
|
+
/**
|
|
11955
|
+
* Scope the update to a specific Liveboard.
|
|
11956
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11957
|
+
*/
|
|
11958
|
+
liveboardId?: string;
|
|
10933
11959
|
}
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
11960
|
+
/**
|
|
11961
|
+
* Request payload for personalised-view host events.
|
|
11962
|
+
*/
|
|
11963
|
+
export interface PersonalisedViewRequest {
|
|
11964
|
+
viewId?: string;
|
|
11965
|
+
viewName?: string;
|
|
10937
11966
|
}
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
GetAnswerConfig = "getAnswerPageConfig",
|
|
10944
|
-
GetLiveboardConfig = "getPinboardPageConfig",
|
|
10945
|
-
GetUnsavedAnswerTML = "getUnsavedAnswerTML",
|
|
10946
|
-
UpdateFilters = "updateFilters",
|
|
10947
|
-
Drilldown = "drillDown",
|
|
10948
|
-
GetAnswerSession = "getAnswerSession",
|
|
10949
|
-
GetFilters = "getFilters",
|
|
10950
|
-
GetIframeUrl = "getIframeUrl",
|
|
10951
|
-
GetParameters = "getParameters",
|
|
10952
|
-
GetTML = "getTML",
|
|
10953
|
-
GetTabs = "getTabs",
|
|
10954
|
-
GetGroups = "getGroups",
|
|
10955
|
-
GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
|
|
11967
|
+
/**
|
|
11968
|
+
* Request payload for schedule-email related host events.
|
|
11969
|
+
*/
|
|
11970
|
+
export interface ScheduleEmailRequest {
|
|
11971
|
+
sendToSelf?: boolean;
|
|
10956
11972
|
}
|
|
10957
|
-
|
|
10958
|
-
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
10962
|
-
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
10976
|
-
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
[
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
[
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
[
|
|
11011
|
-
|
|
11012
|
-
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
response: {
|
|
11016
|
-
tml: string;
|
|
11017
|
-
};
|
|
11018
|
-
};
|
|
11019
|
-
[UIPassthroughEvent.GetAnswerSession]: {
|
|
11020
|
-
request: {
|
|
11021
|
-
vizId?: string;
|
|
11022
|
-
};
|
|
11023
|
-
response: {
|
|
11024
|
-
session: SessionInterface;
|
|
11025
|
-
embedAnswerData?: Record<string, any>;
|
|
11026
|
-
};
|
|
11027
|
-
};
|
|
11028
|
-
[UIPassthroughEvent.GetFilters]: {
|
|
11029
|
-
request: {
|
|
11030
|
-
vizId?: string;
|
|
11031
|
-
};
|
|
11032
|
-
response: {
|
|
11033
|
-
liveboardFilters: LiveboardFilter[];
|
|
11034
|
-
runtimeFilters: RuntimeFilter[];
|
|
11035
|
-
};
|
|
11036
|
-
};
|
|
11037
|
-
[UIPassthroughEvent.GetIframeUrl]: {
|
|
11038
|
-
request: Record<string, never>;
|
|
11039
|
-
response: {
|
|
11040
|
-
iframeUrl: string;
|
|
11041
|
-
};
|
|
11042
|
-
};
|
|
11043
|
-
[UIPassthroughEvent.GetParameters]: {
|
|
11044
|
-
request: Record<string, never>;
|
|
11045
|
-
response: {
|
|
11046
|
-
parameters: LiveboardParameter[];
|
|
11047
|
-
};
|
|
11048
|
-
};
|
|
11049
|
-
[UIPassthroughEvent.GetTML]: {
|
|
11050
|
-
request: {
|
|
11051
|
-
vizId?: string;
|
|
11052
|
-
includeNonExecutedSearchTokens?: boolean;
|
|
11053
|
-
};
|
|
11054
|
-
response: Record<string, any>;
|
|
11055
|
-
};
|
|
11056
|
-
[UIPassthroughEvent.GetTabs]: {
|
|
11057
|
-
request: Record<string, never>;
|
|
11058
|
-
response: {
|
|
11059
|
-
orderedTabIds: string[];
|
|
11060
|
-
numberOfTabs: number;
|
|
11061
|
-
Tabs: LiveboardTab[];
|
|
11062
|
-
};
|
|
11973
|
+
/**
|
|
11974
|
+
* Object form of the {@link HostEvent.Navigate} payload.
|
|
11975
|
+
*/
|
|
11976
|
+
export interface NavigateRequest {
|
|
11977
|
+
/**
|
|
11978
|
+
* Route to navigate to, or a history delta such as `1` or `-1`.
|
|
11979
|
+
*/
|
|
11980
|
+
path: string | number;
|
|
11981
|
+
/**
|
|
11982
|
+
* When `true`, replaces the current history entry instead of pushing.
|
|
11983
|
+
*/
|
|
11984
|
+
replace?: boolean;
|
|
11985
|
+
}
|
|
11986
|
+
/**
|
|
11987
|
+
* Request payload for {@link HostEvent.SetActiveTab}.
|
|
11988
|
+
*/
|
|
11989
|
+
export interface SetActiveTabRequest {
|
|
11990
|
+
/**
|
|
11991
|
+
* Id of the liveboard tab to make active.
|
|
11992
|
+
*/
|
|
11993
|
+
tabId: string;
|
|
11994
|
+
}
|
|
11995
|
+
/**
|
|
11996
|
+
* Typed request payloads for host events that do not go through the UI
|
|
11997
|
+
* passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
|
|
11998
|
+
*
|
|
11999
|
+
* Shapes are transcribed from the host's runtime validation schemas
|
|
12000
|
+
* (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
|
|
12001
|
+
* flattened across contexts to the permissive superset (context-specific
|
|
12002
|
+
* requirements are validated at runtime).
|
|
12003
|
+
*
|
|
12004
|
+
* Responses are typed only for UI-passthrough-backed events today (see
|
|
12005
|
+
* {@link HostEventResponse}). Add a response map alongside this one when the
|
|
12006
|
+
* first explicit response shape is specified; tightening later is additive.
|
|
12007
|
+
*
|
|
12008
|
+
* Deliberately absent (do not add without an audit):
|
|
12009
|
+
* - DrillDown: the runtime schema (object-shaped points) and the UI
|
|
12010
|
+
* passthrough contract (string-shaped points) disagree — resolve the
|
|
12011
|
+
* drift first.
|
|
12012
|
+
* - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
|
|
12013
|
+
* mapping; their Spotter-context vizId requirement is runtime-only.
|
|
12014
|
+
*/
|
|
12015
|
+
export interface HostEventRequestMap {
|
|
12016
|
+
[HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
|
|
12017
|
+
[HostEvent.UpdateParameters]: RuntimeParameter[];
|
|
12018
|
+
[HostEvent.UpdateFilters]: UpdateFiltersRequest;
|
|
12019
|
+
[HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
|
|
12020
|
+
[HostEvent.OpenFilter]: OpenFilterRequest;
|
|
12021
|
+
[HostEvent.OpenParameter]: OpenParameterRequest;
|
|
12022
|
+
[HostEvent.SetVisibleVizs]: string[];
|
|
12023
|
+
[HostEvent.SetVisibleTabs]: string[];
|
|
12024
|
+
[HostEvent.SetHiddenTabs]: string[];
|
|
12025
|
+
[HostEvent.SetActiveTab]: SetActiveTabRequest;
|
|
12026
|
+
[HostEvent.Navigate]: string | number | NavigateRequest;
|
|
12027
|
+
[HostEvent.Search]: SearchRequest;
|
|
12028
|
+
[HostEvent.ResetSearch]: void;
|
|
12029
|
+
[HostEvent.AddColumns]: {
|
|
12030
|
+
columnIds: string[];
|
|
11063
12031
|
};
|
|
11064
|
-
[
|
|
11065
|
-
|
|
11066
|
-
response: {
|
|
11067
|
-
orderedGroupIds: string[];
|
|
11068
|
-
numberOfGroups: number;
|
|
11069
|
-
Groups: LiveboardGroup[];
|
|
11070
|
-
};
|
|
12032
|
+
[HostEvent.RemoveColumn]: {
|
|
12033
|
+
columnId: string;
|
|
11071
12034
|
};
|
|
11072
|
-
[
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
|
|
11077
|
-
|
|
11078
|
-
|
|
11079
|
-
|
|
12035
|
+
[HostEvent.Edit]: VizScopedRequest;
|
|
12036
|
+
[HostEvent.Save]: VizScopedRequest;
|
|
12037
|
+
[HostEvent.Delete]: VizScopedRequest;
|
|
12038
|
+
[HostEvent.Share]: VizScopedRequest;
|
|
12039
|
+
[HostEvent.Present]: VizScopedRequest;
|
|
12040
|
+
[HostEvent.CopyLink]: VizScopedRequest;
|
|
12041
|
+
[HostEvent.ExportTML]: VizScopedRequest;
|
|
12042
|
+
[HostEvent.EditTML]: VizScopedRequest;
|
|
12043
|
+
[HostEvent.UpdateTML]: VizScopedRequest;
|
|
12044
|
+
[HostEvent.SchedulesList]: VizScopedRequest;
|
|
12045
|
+
[HostEvent.Schedule]: VizScopedRequest;
|
|
12046
|
+
[HostEvent.SpotIQAnalyze]: VizScopedRequest;
|
|
12047
|
+
[HostEvent.ShowUnderlyingData]: VizScopedRequest;
|
|
12048
|
+
[HostEvent.CreateMonitor]: VizScopedRequest;
|
|
12049
|
+
[HostEvent.ManageMonitor]: VizScopedRequest;
|
|
12050
|
+
[HostEvent.SyncToSheets]: VizScopedRequest;
|
|
12051
|
+
[HostEvent.SyncToOtherApps]: VizScopedRequest;
|
|
12052
|
+
[HostEvent.ManagePipelines]: VizScopedRequest;
|
|
12053
|
+
[HostEvent.DownloadAsPng]: VizScopedRequest;
|
|
12054
|
+
[HostEvent.DownloadAsCsv]: VizScopedRequest;
|
|
12055
|
+
[HostEvent.DownloadAsXlsx]: VizScopedRequest;
|
|
12056
|
+
[HostEvent.DownloadAsPdf]: VizScopedRequest & {
|
|
12057
|
+
liveboardId?: string;
|
|
11080
12058
|
};
|
|
11081
|
-
[
|
|
11082
|
-
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
12059
|
+
[HostEvent.Explore]: RequiredVizRequest;
|
|
12060
|
+
[HostEvent.AskSage]: RequiredVizRequest;
|
|
12061
|
+
[HostEvent.AskSpotter]: RequiredVizRequest;
|
|
12062
|
+
[HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
|
|
12063
|
+
[HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
|
|
12064
|
+
[HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
|
|
12065
|
+
[HostEvent.ResetLiveboardPersonalisedView]: void;
|
|
12066
|
+
[HostEvent.AIHighlights]: void;
|
|
12067
|
+
[HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
|
|
12068
|
+
[HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
|
|
12069
|
+
[HostEvent.SpotterSearch]: SpotterSearchRequest;
|
|
12070
|
+
[HostEvent.ResetSpotterConversation]: void;
|
|
12071
|
+
[HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
|
|
12072
|
+
[HostEvent.CloseSpotterShareConversation]: void;
|
|
12073
|
+
[HostEvent.ExitSpotterSharedConversation]: void;
|
|
12074
|
+
[HostEvent.PinSpotterConversation]: ConversationScopedRequest;
|
|
12075
|
+
[HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
|
|
12076
|
+
[HostEvent.EditLastPrompt]: string;
|
|
12077
|
+
[HostEvent.DeleteLastPrompt]: void;
|
|
12078
|
+
[HostEvent.PreviewSpotterData]: void;
|
|
12079
|
+
[HostEvent.SpotterVizSendUserMessage]: {
|
|
12080
|
+
query: string;
|
|
11087
12081
|
};
|
|
11088
|
-
[
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
|
|
11097
|
-
|
|
11098
|
-
|
|
12082
|
+
[HostEvent.InitSpotterVizConversation]: void;
|
|
12083
|
+
[HostEvent.OpenSpotterVizPanel]: void;
|
|
12084
|
+
[HostEvent.CloseSpotterVizPanel]: void;
|
|
12085
|
+
}
|
|
12086
|
+
/**
|
|
12087
|
+
* Per-context request shapes for events whose payload varies by
|
|
12088
|
+
/**
|
|
12089
|
+
* Resolves the typed request payload for a host event.
|
|
12090
|
+
* Resolution order:
|
|
12091
|
+
* 1. Explicitly typed request in {@link HostEventRequestMap}
|
|
12092
|
+
* 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
|
|
12093
|
+
* 3. `any` (event not audited/typed yet — backward compatible)
|
|
12094
|
+
*
|
|
12095
|
+
* Requests are the cross-context superset today. The per-context `*Request`
|
|
12096
|
+
* interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
|
|
12097
|
+
* narrows by context; a later release may thread the caller's context to
|
|
12098
|
+
* enforce it.
|
|
12099
|
+
*/
|
|
12100
|
+
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
12101
|
+
/**
|
|
12102
|
+
* Resolves the typed response payload for a host event. Only UI passthrough
|
|
12103
|
+
* backed events have typed responses today; everything else resolves to `any`.
|
|
12104
|
+
*/
|
|
12105
|
+
export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
12106
|
+
/**
|
|
12107
|
+
* Payload type accepted by `embed.trigger()`. Keeps the historical
|
|
12108
|
+
* `PayloadT` escape hatch so untyped existing call sites keep compiling.
|
|
12109
|
+
*/
|
|
12110
|
+
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
12111
|
+
/**
|
|
12112
|
+
* Deep `Partial` of a request type: every field optional at every depth, with no
|
|
12113
|
+
* index signature — so object literals carrying unknown fields are flagged.
|
|
12114
|
+
*/
|
|
12115
|
+
export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
12116
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
12117
|
+
} : T;
|
|
12118
|
+
/**
|
|
12119
|
+
* `trigger()`'s `data` type: an all-optional view of the event's request type.
|
|
12120
|
+
* See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
|
|
12121
|
+
* No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
|
|
12122
|
+
*/
|
|
12123
|
+
export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
|
|
12124
|
+
/**
|
|
12125
|
+
* Response type returned by `embed.trigger()`.
|
|
12126
|
+
*/
|
|
12127
|
+
export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
|
|
12128
|
+
/**
|
|
12129
|
+
* Typed `data` field per embed event. Seed with audited events only.
|
|
12130
|
+
*/
|
|
12131
|
+
export interface EmbedEventDataExtension {
|
|
12132
|
+
[EmbedEvent.AuthInit]: {
|
|
12133
|
+
/**
|
|
12134
|
+
* Whether authentication was successful.
|
|
12135
|
+
*/
|
|
12136
|
+
isLoggedIn?: boolean;
|
|
12137
|
+
[key: string]: any;
|
|
11099
12138
|
};
|
|
12139
|
+
[EmbedEvent.EmbedListenerReady]: Record<string, any>;
|
|
12140
|
+
/**
|
|
12141
|
+
* Fired when a callback-type custom action is triggered. Use
|
|
12142
|
+
* `payload.data.id` to identify which action fired.
|
|
12143
|
+
*/
|
|
12144
|
+
[EmbedEvent.CustomAction]: CustomActionPayload;
|
|
12145
|
+
}
|
|
12146
|
+
/**
|
|
12147
|
+
* Resolves the typed `data` payload for an embed event; `any` when the
|
|
12148
|
+
* event has not been audited/typed yet.
|
|
12149
|
+
*/
|
|
12150
|
+
export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
|
|
12151
|
+
/**
|
|
12152
|
+
* Full envelope delivered to `embed.on()` callbacks for a given event:
|
|
12153
|
+
* the wire fields (`type`, `status`) plus the typed `data`.
|
|
12154
|
+
*/
|
|
12155
|
+
export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
|
|
12156
|
+
data: EmbedEventData<EmbedEventT>;
|
|
11100
12157
|
};
|
|
11101
|
-
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
11102
|
-
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
11103
|
-
export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
|
|
11104
|
-
refId?: string;
|
|
11105
|
-
value?: UIPassthroughResponse<ApiName>;
|
|
11106
|
-
error?: any;
|
|
11107
|
-
}>;
|
|
11108
|
-
export type EmbedApiHostEventMapping = {
|
|
11109
|
-
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
|
|
11110
|
-
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
11111
|
-
[HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
|
|
11112
|
-
[HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
|
|
11113
|
-
[HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
|
|
11114
|
-
[HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
|
|
11115
|
-
[HostEvent.GetTML]: UIPassthroughEvent.GetTML;
|
|
11116
|
-
[HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
|
|
11117
|
-
[HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
|
|
11118
|
-
[HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
11119
|
-
};
|
|
11120
|
-
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
11121
|
-
export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
11122
|
-
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
11123
|
-
export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
|
|
11124
12158
|
class HostEventClient {
|
|
11125
12159
|
iFrame: HTMLIFrameElement;
|
|
11126
12160
|
/** Cached list of available UI passthrough keys from the embedded app */
|
|
@@ -11170,7 +12204,7 @@ class HostEventClient {
|
|
|
11170
12204
|
* @param payload - Optional payload for the event
|
|
11171
12205
|
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
11172
12206
|
*/
|
|
11173
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT,
|
|
12207
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11174
12208
|
}
|
|
11175
12209
|
class TsEmbed {
|
|
11176
12210
|
/**
|
|
@@ -11188,6 +12222,7 @@ class TsEmbed {
|
|
|
11188
12222
|
* The key to store the embed instance in the DOM node
|
|
11189
12223
|
*/
|
|
11190
12224
|
protected embedNodeKey: string;
|
|
12225
|
+
protected embedContainerLoadedKey: string;
|
|
11191
12226
|
protected isAppInitialized: boolean;
|
|
11192
12227
|
/**
|
|
11193
12228
|
* A reference to the iframe within which the ThoughtSpot app
|
|
@@ -11357,10 +12392,10 @@ class TsEmbed {
|
|
|
11357
12392
|
*/
|
|
11358
12393
|
protected getEmbedBasePath(query: string): string;
|
|
11359
12394
|
protected getUpdateEmbedParamsObject(): Promise<{
|
|
11360
|
-
customisations: CustomisationsInterface;
|
|
11361
|
-
authToken: string;
|
|
11362
12395
|
runtimeFilterParams: string;
|
|
11363
12396
|
runtimeParameterParams: string;
|
|
12397
|
+
customisations: CustomisationsInterface;
|
|
12398
|
+
authToken: string;
|
|
11364
12399
|
hiddenHomepageModules: HomepageModule[];
|
|
11365
12400
|
reorderedHomepageModules: string[];
|
|
11366
12401
|
hostConfig: Record<string, any>;
|
|
@@ -11456,9 +12491,10 @@ class TsEmbed {
|
|
|
11456
12491
|
protected getRootIframeSrc(): string;
|
|
11457
12492
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
11458
12493
|
/**
|
|
11459
|
-
* Returns a merged {@link PreRenderConfig} object where each
|
|
11460
|
-
*
|
|
11461
|
-
*
|
|
12494
|
+
* Returns a merged {@link PreRenderConfig} object where each key prefers the
|
|
12495
|
+
* value from `preRenderConfig` over its deprecated top-level `viewConfig`
|
|
12496
|
+
* counterpart (`id`/`preRenderId`, `containerSelector`/`preRenderContainer`,
|
|
12497
|
+
* `doNotTrackSize`/`doNotTrackPreRenderSize`) for backward compatibility.
|
|
11462
12498
|
*/
|
|
11463
12499
|
protected getPreRenderConfig(): PreRenderConfig;
|
|
11464
12500
|
/**
|
|
@@ -11552,21 +12588,6 @@ class TsEmbed {
|
|
|
11552
12588
|
* or else the v2 event type itself
|
|
11553
12589
|
*/
|
|
11554
12590
|
protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
|
|
11555
|
-
/**
|
|
11556
|
-
* Calculates the iframe center for the current visible viewPort
|
|
11557
|
-
* of iframe using Scroll position of Host App, offsetTop for iframe
|
|
11558
|
-
* in Host app. ViewPort height of the tab.
|
|
11559
|
-
* @returns iframe Center in visible viewport,
|
|
11560
|
-
* Iframe height,
|
|
11561
|
-
* View port height.
|
|
11562
|
-
*/
|
|
11563
|
-
protected getIframeCenter(): {
|
|
11564
|
-
iframeCenter: number;
|
|
11565
|
-
iframeScrolled: number;
|
|
11566
|
-
iframeHeight: number;
|
|
11567
|
-
viewPortHeight: number;
|
|
11568
|
-
iframeVisibleViewPort: number;
|
|
11569
|
-
};
|
|
11570
12591
|
/**
|
|
11571
12592
|
* Registers an event listener to trigger an alert when the ThoughtSpot app
|
|
11572
12593
|
* sends an event of a particular message type to the host application.
|
|
@@ -11590,7 +12611,7 @@ class TsEmbed {
|
|
|
11590
12611
|
* });
|
|
11591
12612
|
* ```
|
|
11592
12613
|
*/
|
|
11593
|
-
on(messageType:
|
|
12614
|
+
on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
|
|
11594
12615
|
/**
|
|
11595
12616
|
* Removes an event listener for a particular event type.
|
|
11596
12617
|
* @param messageType The message type
|
|
@@ -11626,6 +12647,8 @@ class TsEmbed {
|
|
|
11626
12647
|
*/
|
|
11627
12648
|
private embedContainerReadyCallbacks;
|
|
11628
12649
|
protected getPreRenderObj<T extends TsEmbed>(): T;
|
|
12650
|
+
protected takeOverPreRender(): void;
|
|
12651
|
+
private markEmbedContainerLoaded;
|
|
11629
12652
|
private checkEmbedContainerLoaded;
|
|
11630
12653
|
private executeEmbedContainerReadyCallbacks;
|
|
11631
12654
|
/**
|
|
@@ -11636,8 +12659,12 @@ class TsEmbed {
|
|
|
11636
12659
|
protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
|
|
11637
12660
|
/**
|
|
11638
12661
|
* Triggers an event to the embedded app
|
|
12662
|
+
*
|
|
12663
|
+
* Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
|
|
12664
|
+
* on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
|
|
12665
|
+
* payload is checked strictly against the event contract — update call sites now.
|
|
11639
12666
|
* @param {HostEvent} messageType The event type
|
|
11640
|
-
* @param {
|
|
12667
|
+
* @param {TriggerData} data The payload, typed against the event's contract
|
|
11641
12668
|
* @param {ContextType} context Optional context type to specify the context from which the event is triggered.
|
|
11642
12669
|
* Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
|
|
11643
12670
|
* ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
|
|
@@ -11654,7 +12681,7 @@ class TsEmbed {
|
|
|
11654
12681
|
* ```
|
|
11655
12682
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
11656
12683
|
*/
|
|
11657
|
-
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?:
|
|
12684
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11658
12685
|
/**
|
|
11659
12686
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
11660
12687
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -11756,6 +12783,7 @@ class TsEmbed {
|
|
|
11756
12783
|
* @returns
|
|
11757
12784
|
*/
|
|
11758
12785
|
prerenderGeneric(): Promise<any>;
|
|
12786
|
+
protected preRenderParamsApplied: Promise<void>;
|
|
11759
12787
|
protected beforePrerenderVisible(): void;
|
|
11760
12788
|
/**
|
|
11761
12789
|
* Displays the pre-rendered component inside the host element.
|
|
@@ -11834,7 +12862,7 @@ class V1Embed extends TsEmbed {
|
|
|
11834
12862
|
* });
|
|
11835
12863
|
* ```
|
|
11836
12864
|
*/
|
|
11837
|
-
on(messageType:
|
|
12865
|
+
on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
11838
12866
|
/**
|
|
11839
12867
|
* Only for testing purposes.
|
|
11840
12868
|
* @hidden
|
|
@@ -12062,7 +13090,7 @@ export interface SpotterShareConversationConfig {
|
|
|
12062
13090
|
}
|
|
12063
13091
|
/**
|
|
12064
13092
|
* A single starter prompt question shown under a category pill.
|
|
12065
|
-
* @version SDK: 1.
|
|
13093
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12066
13094
|
* @group Embed components
|
|
12067
13095
|
*/
|
|
12068
13096
|
export interface StarterPromptQuestion {
|
|
@@ -12080,7 +13108,7 @@ export interface StarterPromptQuestion {
|
|
|
12080
13108
|
/**
|
|
12081
13109
|
* Configuration for a starter prompt category with questions
|
|
12082
13110
|
* (`quick` and `research`).
|
|
12083
|
-
* @version SDK: 1.
|
|
13111
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12084
13112
|
* @group Embed components
|
|
12085
13113
|
*/
|
|
12086
13114
|
export interface StarterPromptCategory {
|
|
@@ -12098,7 +13126,7 @@ export interface StarterPromptCategory {
|
|
|
12098
13126
|
/**
|
|
12099
13127
|
* Configuration for the Data Literacy starter prompt category.
|
|
12100
13128
|
* Only the label is customizable; the prompt text comes from the backend.
|
|
12101
|
-
* @version SDK: 1.
|
|
13129
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12102
13130
|
* @group Embed components
|
|
12103
13131
|
*/
|
|
12104
13132
|
export interface StarterPreviewDataCategory {
|
|
@@ -12116,7 +13144,7 @@ export interface StarterPreviewDataCategory {
|
|
|
12116
13144
|
* Note: this controls the Spotter chat interface only. The starter prompts on
|
|
12117
13145
|
* the Liveboard SpotterViz surface are configured separately through
|
|
12118
13146
|
* {@link SpotterVizConfig.customStarterPrompts}.
|
|
12119
|
-
* @version SDK: 1.
|
|
13147
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12120
13148
|
* @group Embed components
|
|
12121
13149
|
*/
|
|
12122
13150
|
export interface StarterPromptsConfig {
|
|
@@ -12196,7 +13224,7 @@ export interface SpotterChatViewConfig {
|
|
|
12196
13224
|
* `Action.DeepAnalysisPill` and `Action.DataLiteracyPill`.
|
|
12197
13225
|
*
|
|
12198
13226
|
* Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
|
|
12199
|
-
* @version SDK: 1.
|
|
13227
|
+
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
12200
13228
|
* @example
|
|
12201
13229
|
* ```js
|
|
12202
13230
|
* const embed = new SpotterEmbed('#tsEmbed', {
|
|
@@ -12966,7 +13994,7 @@ export interface DiscoveryExperience {
|
|
|
12966
13994
|
* The view configuration for full app embedding.
|
|
12967
13995
|
* @group Embed components
|
|
12968
13996
|
*/
|
|
12969
|
-
export interface AppViewConfig extends AllEmbedViewConfig {
|
|
13997
|
+
export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
|
|
12970
13998
|
/**
|
|
12971
13999
|
* If true, the top navigation bar within the ThoughtSpot app
|
|
12972
14000
|
* is displayed. By default, the navigation bar is hidden.
|
|
@@ -13234,51 +14262,23 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13234
14262
|
* Supported embed types: `AppEmbed`
|
|
13235
14263
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
|
|
13236
14264
|
* @hidden
|
|
13237
|
-
*/
|
|
13238
|
-
liveboardV2?: boolean;
|
|
13239
|
-
/**
|
|
13240
|
-
* If set to true, the Search Assist feature is enabled.
|
|
13241
|
-
*
|
|
13242
|
-
* Supported embed types: `AppEmbed`
|
|
13243
|
-
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
13244
|
-
* @default true
|
|
13245
|
-
* @example
|
|
13246
|
-
* ```js
|
|
13247
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
13248
|
-
* ... // other embed view config
|
|
13249
|
-
* enableSearchAssist: true,
|
|
13250
|
-
* })
|
|
13251
|
-
* ```
|
|
13252
|
-
*/
|
|
13253
|
-
enableSearchAssist?: boolean;
|
|
13254
|
-
/**
|
|
13255
|
-
* If set to true, the Liveboard container dynamically resizes
|
|
13256
|
-
* according to the height of the Liveboard.
|
|
13257
|
-
*
|
|
13258
|
-
* **Note**: Using fullHeight loads all visualizations
|
|
13259
|
-
* on the Liveboard simultaneously, which results in
|
|
13260
|
-
* multiple warehouse queries and potentially a
|
|
13261
|
-
* longer wait for the topmost visualizations to
|
|
13262
|
-
* display on the screen. Setting fullHeight to
|
|
13263
|
-
* `false` fetches visualizations incrementally as
|
|
13264
|
-
* users scroll the page to view the charts and tables.
|
|
13265
|
-
*
|
|
13266
|
-
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
13267
|
-
* {@link lazyLoadingForFullHeight} and
|
|
13268
|
-
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
13269
|
-
* they scroll into view. Set either flag to `false` to opt out.
|
|
14265
|
+
*/
|
|
14266
|
+
liveboardV2?: boolean;
|
|
14267
|
+
/**
|
|
14268
|
+
* If set to true, the Search Assist feature is enabled.
|
|
13270
14269
|
*
|
|
13271
14270
|
* Supported embed types: `AppEmbed`
|
|
13272
|
-
* @version SDK: 1.
|
|
14271
|
+
* @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
|
|
14272
|
+
* @default true
|
|
13273
14273
|
* @example
|
|
13274
14274
|
* ```js
|
|
13275
14275
|
* const embed = new AppEmbed('#tsEmbed', {
|
|
13276
14276
|
* ... // other embed view config
|
|
13277
|
-
*
|
|
14277
|
+
* enableSearchAssist: true,
|
|
13278
14278
|
* })
|
|
13279
14279
|
* ```
|
|
13280
14280
|
*/
|
|
13281
|
-
|
|
14281
|
+
enableSearchAssist?: boolean;
|
|
13282
14282
|
/**
|
|
13283
14283
|
* Enables the V2 navigation and modular home page experience.
|
|
13284
14284
|
* For more information,
|
|
@@ -13473,78 +14473,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13473
14473
|
* ```
|
|
13474
14474
|
*/
|
|
13475
14475
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
13476
|
-
/**
|
|
13477
|
-
* Loads visualizations only as they scroll into the viewport, instead of
|
|
13478
|
-
* loading the whole full-height Liveboard at once.
|
|
13479
|
-
*
|
|
13480
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13481
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13482
|
-
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
13483
|
-
* The flag has no effect unless `fullHeight` is enabled.
|
|
13484
|
-
*
|
|
13485
|
-
* @type {boolean}
|
|
13486
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13487
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13488
|
-
* @example
|
|
13489
|
-
* ```js
|
|
13490
|
-
* const embed = new AppEmbed('#embed-container', {
|
|
13491
|
-
* // ...other options
|
|
13492
|
-
* fullHeight: true,
|
|
13493
|
-
* lazyLoadingForFullHeight: true,
|
|
13494
|
-
* })
|
|
13495
|
-
* ```
|
|
13496
|
-
*/
|
|
13497
|
-
lazyLoadingForFullHeight?: boolean;
|
|
13498
|
-
/**
|
|
13499
|
-
* Computes the visible region of the embed against its scrollable and
|
|
13500
|
-
* clipping ancestors, instead of treating the browser window as the only
|
|
13501
|
-
* viewport, and tracks scroll and resize on those ancestors.
|
|
13502
|
-
*
|
|
13503
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13504
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13505
|
-
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
13506
|
-
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
13507
|
-
* tracking.
|
|
13508
|
-
*
|
|
13509
|
-
* @type {boolean}
|
|
13510
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13511
|
-
* @hidden
|
|
13512
|
-
*/
|
|
13513
|
-
enableScrollableContainerLazyLoading?: boolean;
|
|
13514
|
-
/**
|
|
13515
|
-
* How far outside the viewport a visualization starts loading, when
|
|
13516
|
-
* {@link lazyLoadingForFullHeight} is enabled.
|
|
13517
|
-
*
|
|
13518
|
-
* For example, if the margin is set to '10px',
|
|
13519
|
-
* the visualization will be loaded 10px before its top edge is visible in the
|
|
13520
|
-
* viewport.
|
|
13521
|
-
*
|
|
13522
|
-
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
13523
|
-
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
13524
|
-
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
13525
|
-
* `auto`; an invalid value is logged and ignored.
|
|
13526
|
-
*
|
|
13527
|
-
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
13528
|
-
* visualization ahead of the scroll position, so a chart has usually
|
|
13529
|
-
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
13530
|
-
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
13531
|
-
* only once it is actually visible.
|
|
13532
|
-
*
|
|
13533
|
-
* @type {string}
|
|
13534
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13535
|
-
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
13536
|
-
* @example
|
|
13537
|
-
* ```js
|
|
13538
|
-
* const embed = new AppEmbed('#embed-container', {
|
|
13539
|
-
* // ...other options
|
|
13540
|
-
* fullHeight: true,
|
|
13541
|
-
* lazyLoadingForFullHeight: true,
|
|
13542
|
-
* // Using 0px, the visualization will be only loaded when it's visible in the viewport.
|
|
13543
|
-
* lazyLoadingMargin: '0px',
|
|
13544
|
-
* })
|
|
13545
|
-
* ```
|
|
13546
|
-
*/
|
|
13547
|
-
lazyLoadingMargin?: string;
|
|
13548
14476
|
/**
|
|
13549
14477
|
* updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
|
|
13550
14478
|
*
|
|
@@ -13732,23 +14660,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13732
14660
|
* @default false
|
|
13733
14661
|
*/
|
|
13734
14662
|
enableStopAnswerGenerationEmbed?: boolean;
|
|
13735
|
-
/**
|
|
13736
|
-
* This is the minimum height (in pixels) for a full-height App.
|
|
13737
|
-
* Setting this height helps resolve issues with empty Apps and
|
|
13738
|
-
* other screens navigable from an App.
|
|
13739
|
-
*
|
|
13740
|
-
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
13741
|
-
* @default 500
|
|
13742
|
-
* @example
|
|
13743
|
-
* ```js
|
|
13744
|
-
* const embed = new AppEmbed('#embed', {
|
|
13745
|
-
* ... // other app view config
|
|
13746
|
-
* fullHeight: true,
|
|
13747
|
-
* minimumHeight: 600,
|
|
13748
|
-
* });
|
|
13749
|
-
* ```
|
|
13750
|
-
*/
|
|
13751
|
-
minimumHeight?: number;
|
|
13752
14663
|
/**
|
|
13753
14664
|
* To enable the homepage announcement banner.
|
|
13754
14665
|
* Controls the visibility of the announcement section
|
|
@@ -13798,6 +14709,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13798
14709
|
* ```
|
|
13799
14710
|
*/
|
|
13800
14711
|
updatedSpotterExperience?: boolean;
|
|
14712
|
+
/**
|
|
14713
|
+
* If set to `true`, the answer edit panel is hidden.
|
|
14714
|
+
*
|
|
14715
|
+
* Supported embed types: `AppEmbed`
|
|
14716
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
14717
|
+
* @example
|
|
14718
|
+
* ```js
|
|
14719
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
14720
|
+
* ... // other embed view config
|
|
14721
|
+
* hideAnswerEditPanel: true,
|
|
14722
|
+
* })
|
|
14723
|
+
* ```
|
|
14724
|
+
*/
|
|
14725
|
+
hideAnswerEditPanel?: boolean;
|
|
13801
14726
|
}
|
|
13802
14727
|
/**
|
|
13803
14728
|
* APP_INIT data shape for AppEmbed.
|
|
@@ -13817,9 +14742,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
13817
14742
|
*/
|
|
13818
14743
|
export class AppEmbed extends V1Embed {
|
|
13819
14744
|
protected viewConfig: AppViewConfig;
|
|
13820
|
-
private
|
|
13821
|
-
private lazyLoadScrollContainers;
|
|
13822
|
-
private lazyLoadResizeObserver;
|
|
14745
|
+
private readonly fullHeightController?;
|
|
13823
14746
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
13824
14747
|
/**
|
|
13825
14748
|
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
@@ -13840,27 +14763,11 @@ export class AppEmbed extends V1Embed {
|
|
|
13840
14763
|
*/
|
|
13841
14764
|
protected getEmbedParams(): string;
|
|
13842
14765
|
protected getEmbedParamsObject(): any;
|
|
13843
|
-
private sendFullHeightLazyLoadData;
|
|
13844
|
-
/**
|
|
13845
|
-
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
13846
|
-
* It is used to send the visible coordinates data to the host application.
|
|
13847
|
-
* @param data The event payload
|
|
13848
|
-
* @param responder The responder function
|
|
13849
|
-
*/
|
|
13850
|
-
private requestVisibleEmbedCoordinatesHandler;
|
|
13851
14766
|
/**
|
|
13852
14767
|
* Constructs the URL of the ThoughtSpot app page to be rendered.
|
|
13853
14768
|
* @param pageId The ID of the page to be embedded.
|
|
13854
14769
|
*/
|
|
13855
14770
|
getIFrameSrc(): string;
|
|
13856
|
-
/**
|
|
13857
|
-
* Set the iframe height as per the computed height received
|
|
13858
|
-
* from the ThoughtSpot app.
|
|
13859
|
-
* @param data The event payload
|
|
13860
|
-
*/
|
|
13861
|
-
protected updateIFrameHeight: (data: MessagePayload) => void;
|
|
13862
|
-
private embedIframeCenter;
|
|
13863
|
-
private setIframeHeightForNonEmbedLiveboard;
|
|
13864
14771
|
/**
|
|
13865
14772
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
13866
14773
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
@@ -13891,8 +14798,6 @@ export class AppEmbed extends V1Embed {
|
|
|
13891
14798
|
*/
|
|
13892
14799
|
destroy(): void;
|
|
13893
14800
|
private postRender;
|
|
13894
|
-
private registerLazyLoadEvents;
|
|
13895
|
-
private unregisterLazyLoadEvents;
|
|
13896
14801
|
/**
|
|
13897
14802
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
13898
14803
|
* @param renderOptions An object containing the page ID
|
|
@@ -14197,71 +15102,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
|
14197
15102
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
14198
15103
|
* @group Embed components
|
|
14199
15104
|
*/
|
|
14200
|
-
export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
|
|
14201
|
-
/**
|
|
14202
|
-
* If set to true, the embedded object container dynamically resizes
|
|
14203
|
-
* according to the height of the Liveboard.
|
|
14204
|
-
*
|
|
14205
|
-
* **Note**: Using fullHeight loads all visualizations on the
|
|
14206
|
-
* Liveboard simultaneously, which results in multiple warehouse
|
|
14207
|
-
* queries and potentially a longer wait for the topmost
|
|
14208
|
-
* visualizations to display on the screen.
|
|
14209
|
-
* Setting `fullHeight` to `false` fetches visualizations
|
|
14210
|
-
* incrementally as users scroll the page to view the charts and tables.
|
|
14211
|
-
*
|
|
14212
|
-
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
14213
|
-
* {@link lazyLoadingForFullHeight} and
|
|
14214
|
-
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
14215
|
-
* they scroll into view. Set either flag to `false` to opt out.
|
|
14216
|
-
*
|
|
14217
|
-
*
|
|
14218
|
-
* Supported embed types: `LiveboardEmbed`
|
|
14219
|
-
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
14220
|
-
* @example
|
|
14221
|
-
* ```js
|
|
14222
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14223
|
-
* ... // other liveboard view config
|
|
14224
|
-
* fullHeight: true,
|
|
14225
|
-
* });
|
|
14226
|
-
* ```
|
|
14227
|
-
*/
|
|
14228
|
-
fullHeight?: boolean;
|
|
14229
|
-
/**
|
|
14230
|
-
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
14231
|
-
* Setting this height helps resolve issues with empty Liveboards and
|
|
14232
|
-
* other screens navigable from a Liveboard.
|
|
14233
|
-
*
|
|
14234
|
-
* Supported embed types: `LiveboardEmbed`
|
|
14235
|
-
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
14236
|
-
* @deprecated Use `minimumHeight` instead.
|
|
14237
|
-
* @default 500
|
|
14238
|
-
* @example
|
|
14239
|
-
* ```js
|
|
14240
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14241
|
-
* ... // other liveboard view config
|
|
14242
|
-
* fullHeight: true,
|
|
14243
|
-
* defaultHeight: 600,
|
|
14244
|
-
* });
|
|
14245
|
-
* ```
|
|
14246
|
-
*/
|
|
14247
|
-
defaultHeight?: number;
|
|
14248
|
-
/**
|
|
14249
|
-
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
14250
|
-
* Setting this height helps resolve issues with empty Liveboards and
|
|
14251
|
-
* other screens navigable from a Liveboard.
|
|
14252
|
-
*
|
|
14253
|
-
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
14254
|
-
* @default 500
|
|
14255
|
-
* @example
|
|
14256
|
-
* ```js
|
|
14257
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14258
|
-
* ... // other liveboard view config
|
|
14259
|
-
* fullHeight: true,
|
|
14260
|
-
* minimumHeight: 600,
|
|
14261
|
-
* });
|
|
14262
|
-
* ```
|
|
14263
|
-
*/
|
|
14264
|
-
minimumHeight?: number;
|
|
15105
|
+
export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
|
|
14265
15106
|
/**
|
|
14266
15107
|
* If set to true, the context menu in visualizations will be enabled.
|
|
14267
15108
|
* @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
@@ -14605,77 +15446,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14605
15446
|
* ```
|
|
14606
15447
|
*/
|
|
14607
15448
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
14608
|
-
/**
|
|
14609
|
-
* Loads visualizations only as they scroll into the viewport, instead of
|
|
14610
|
-
* loading the whole full-height Liveboard at once.
|
|
14611
|
-
*
|
|
14612
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14613
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14614
|
-
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
14615
|
-
* The flag has no effect unless `fullHeight` is enabled.
|
|
14616
|
-
*
|
|
14617
|
-
* @type {boolean}
|
|
14618
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14619
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14620
|
-
* @example
|
|
14621
|
-
* ```js
|
|
14622
|
-
* const embed = new LiveboardEmbed('#embed-container', {
|
|
14623
|
-
* // ...other options
|
|
14624
|
-
* fullHeight: true,
|
|
14625
|
-
* lazyLoadingForFullHeight: true,
|
|
14626
|
-
* })
|
|
14627
|
-
* ```
|
|
14628
|
-
*/
|
|
14629
|
-
lazyLoadingForFullHeight?: boolean;
|
|
14630
|
-
/**
|
|
14631
|
-
* Computes the visible region of the embed against its scrollable and
|
|
14632
|
-
* clipping ancestors, instead of treating the browser window as the only
|
|
14633
|
-
* viewport, and tracks scroll and resize on those ancestors.
|
|
14634
|
-
*
|
|
14635
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14636
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14637
|
-
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
14638
|
-
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
14639
|
-
* tracking.
|
|
14640
|
-
*
|
|
14641
|
-
* @type {boolean}
|
|
14642
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14643
|
-
*/
|
|
14644
|
-
enableScrollableContainerLazyLoading?: boolean;
|
|
14645
|
-
/**
|
|
14646
|
-
* How far outside the viewport a visualization starts loading, when
|
|
14647
|
-
* {@link lazyLoadingForFullHeight} is enabled.
|
|
14648
|
-
*
|
|
14649
|
-
* For example, if the margin is set to '10px',
|
|
14650
|
-
* the visualization will be loaded 10px before its top edge is visible in the
|
|
14651
|
-
* viewport.
|
|
14652
|
-
*
|
|
14653
|
-
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
14654
|
-
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
14655
|
-
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
14656
|
-
* `auto`; an invalid value is logged and ignored.
|
|
14657
|
-
*
|
|
14658
|
-
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
14659
|
-
* visualization ahead of the scroll position, so a chart has usually
|
|
14660
|
-
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
14661
|
-
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
14662
|
-
* only once it is actually visible.
|
|
14663
|
-
*
|
|
14664
|
-
* @type {string}
|
|
14665
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14666
|
-
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
14667
|
-
* @example
|
|
14668
|
-
* ```js
|
|
14669
|
-
* const embed = new LiveboardEmbed('#embed-container', {
|
|
14670
|
-
* // ...other options
|
|
14671
|
-
* fullHeight: true,
|
|
14672
|
-
* lazyLoadingForFullHeight: true,
|
|
14673
|
-
* // Using 0px, the visualization will be only loaded when it's visible in the viewport.
|
|
14674
|
-
* lazyLoadingMargin: '0px',
|
|
14675
|
-
* })
|
|
14676
|
-
* ```
|
|
14677
|
-
*/
|
|
14678
|
-
lazyLoadingMargin?: string;
|
|
14679
15449
|
/**
|
|
14680
15450
|
* showSpotterLimitations : show limitation text
|
|
14681
15451
|
* of the spotter underneath the chat input.
|
|
@@ -14829,9 +15599,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14829
15599
|
*/
|
|
14830
15600
|
export class LiveboardEmbed extends V1Embed {
|
|
14831
15601
|
protected viewConfig: LiveboardViewConfig;
|
|
14832
|
-
private
|
|
14833
|
-
private lazyLoadScrollContainers;
|
|
14834
|
-
private lazyLoadResizeObserver;
|
|
15602
|
+
private readonly fullHeightController?;
|
|
14835
15603
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
14836
15604
|
protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
|
|
14837
15605
|
/**
|
|
@@ -14841,27 +15609,11 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
14841
15609
|
protected getEmbedParams(): string;
|
|
14842
15610
|
protected getEmbedParamsObject(): any;
|
|
14843
15611
|
private getIframeSuffixSrc;
|
|
14844
|
-
private sendFullHeightLazyLoadData;
|
|
14845
|
-
/**
|
|
14846
|
-
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
14847
|
-
* It is used to send the visible coordinates data to the host application.
|
|
14848
|
-
* @param data The event payload
|
|
14849
|
-
* @param responder The responder function
|
|
14850
|
-
*/
|
|
14851
|
-
private requestVisibleEmbedCoordinatesHandler;
|
|
14852
15612
|
/**
|
|
14853
15613
|
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
14854
15614
|
* to be loaded within the iFrame.
|
|
14855
15615
|
*/
|
|
14856
15616
|
private getIFrameSrc;
|
|
14857
|
-
/**
|
|
14858
|
-
* Set the iframe height as per the computed height received
|
|
14859
|
-
* from the ThoughtSpot app.
|
|
14860
|
-
* @param data The event payload
|
|
14861
|
-
*/
|
|
14862
|
-
private updateIFrameHeight;
|
|
14863
|
-
private embedIframeCenter;
|
|
14864
|
-
private setIframeHeightForNonEmbedLiveboard;
|
|
14865
15617
|
private setActiveTab;
|
|
14866
15618
|
private showPreviewLoader;
|
|
14867
15619
|
/**
|
|
@@ -14876,22 +15628,23 @@ export class LiveboardEmbed extends V1Embed {
|
|
|
14876
15628
|
personalizedViewId: string;
|
|
14877
15629
|
};
|
|
14878
15630
|
protected beforePrerenderVisible(): void;
|
|
15631
|
+
private isShowingLiveboardRoute;
|
|
14879
15632
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
14880
15633
|
/**
|
|
14881
15634
|
* Triggers an event to the embedded app
|
|
15635
|
+
* Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
|
|
15636
|
+
* from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
|
|
14882
15637
|
* @param {HostEvent} messageType The event type
|
|
14883
|
-
* @param {
|
|
15638
|
+
* @param {TriggerData} data The payload, typed against the event's contract
|
|
14884
15639
|
* @returns A promise that resolves with the response from the embedded app
|
|
14885
15640
|
*/
|
|
14886
|
-
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?:
|
|
15641
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
14887
15642
|
/**
|
|
14888
15643
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
14889
15644
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
14890
15645
|
*/
|
|
14891
15646
|
destroy(): void;
|
|
14892
15647
|
private postRender;
|
|
14893
|
-
private registerLazyLoadEvents;
|
|
14894
|
-
private unregisterLazyLoadEvents;
|
|
14895
15648
|
/**
|
|
14896
15649
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
14897
15650
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
@@ -15062,6 +15815,20 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
15062
15815
|
* ```
|
|
15063
15816
|
*/
|
|
15064
15817
|
dataSource?: string;
|
|
15818
|
+
/**
|
|
15819
|
+
* If set to `true`, the answer edit panel is hidden.
|
|
15820
|
+
*
|
|
15821
|
+
* Supported embed types: `SearchEmbed`
|
|
15822
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
15823
|
+
* @example
|
|
15824
|
+
* ```js
|
|
15825
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
15826
|
+
* ... // other embed view config
|
|
15827
|
+
* hideAnswerEditPanel: true,
|
|
15828
|
+
* })
|
|
15829
|
+
* ```
|
|
15830
|
+
*/
|
|
15831
|
+
hideAnswerEditPanel?: boolean;
|
|
15065
15832
|
/**
|
|
15066
15833
|
* The initial search query to load the answer with.
|
|
15067
15834
|
* Use {@link searchOptions} instead.
|