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