@thoughtspot/visual-embed-sdk 1.52.0 → 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/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/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/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 +66 -134
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +211 -28
- 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 +17 -22
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +82 -56
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +325 -17
- 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 +3 -3
- 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.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/types.d.ts +540 -3
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +326 -1
- 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-BMppCU63.js → index-C1pmYb5H.js} +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/embed/app.d.ts +17 -140
- package/dist/src/embed/app.d.ts.map +1 -1
- 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 +17 -22
- package/dist/src/embed/ts-embed.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/types.d.ts +540 -3
- 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 +925 -363
- package/dist/tsembed-react.js +924 -362
- package/dist/tsembed.es.js +925 -363
- package/dist/tsembed.js +924 -362
- package/dist/visual-embed-sdk-react-full.d.ts +1357 -656
- package/dist/visual-embed-sdk-react.d.ts +1257 -606
- package/dist/visual-embed-sdk.d.ts +1320 -642
- package/lib/package.json +9 -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/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/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 +67 -135
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +211 -28
- 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 +17 -22
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +82 -56
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +322 -14
- 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 +1 -1
- 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.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/types.d.ts +540 -3
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +326 -1
- 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 +1320 -642
- package/package.json +9 -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/embed/app.spec.ts +86 -34
- package/src/embed/app.ts +37 -264
- 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 +257 -38
- package/src/embed/liveboard.ts +75 -296
- package/src/embed/search.spec.ts +80 -0
- package/src/embed/search.ts +20 -0
- package/src/embed/ts-embed.spec.ts +448 -15
- package/src/embed/ts-embed.ts +109 -66
- package/src/full-height.spec.ts +1008 -0
- package/src/full-height.ts +361 -0
- package/src/index.ts +93 -5
- package/src/react/all-types-export.parity.spec.ts +63 -3
- package/src/react/all-types-export.ts +45 -0
- package/src/types.ts +540 -1
- 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
|
@@ -1250,6 +1250,277 @@ declare class AnswerService {
|
|
|
1250
1250
|
addDisplayedVizToLiveboard(liveboardId: string): Promise<any>;
|
|
1251
1251
|
setTMLOverride(override: any): void;
|
|
1252
1252
|
}
|
|
1253
|
+
export interface LiveboardTab {
|
|
1254
|
+
id: string;
|
|
1255
|
+
name: string;
|
|
1256
|
+
[key: string]: any;
|
|
1257
|
+
}
|
|
1258
|
+
export interface LiveboardGroup {
|
|
1259
|
+
id: string;
|
|
1260
|
+
name: string;
|
|
1261
|
+
[key: string]: any;
|
|
1262
|
+
}
|
|
1263
|
+
declare enum ApplicabilityLevel {
|
|
1264
|
+
Liveboard = "LIVEBOARD",
|
|
1265
|
+
Tab = "TAB",
|
|
1266
|
+
Group = "GROUP"
|
|
1267
|
+
}
|
|
1268
|
+
/**
|
|
1269
|
+
* Scopes a filter or parameter to a specific target.
|
|
1270
|
+
* At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
|
|
1271
|
+
* is not required. `level` accepts the enum or its string value, e.g. `'TAB'`.
|
|
1272
|
+
*/
|
|
1273
|
+
export interface Applicability {
|
|
1274
|
+
level: ApplicabilityLevel | `${ApplicabilityLevel}`;
|
|
1275
|
+
targetId?: string;
|
|
1276
|
+
}
|
|
1277
|
+
export interface FilterUpdate {
|
|
1278
|
+
column: string;
|
|
1279
|
+
oper: string;
|
|
1280
|
+
values: string[];
|
|
1281
|
+
type?: string;
|
|
1282
|
+
applicability?: Applicability;
|
|
1283
|
+
}
|
|
1284
|
+
export interface LiveboardFilter {
|
|
1285
|
+
applicability?: Applicability;
|
|
1286
|
+
[key: string]: any;
|
|
1287
|
+
}
|
|
1288
|
+
export interface LiveboardParameter {
|
|
1289
|
+
applicability?: Applicability;
|
|
1290
|
+
[key: string]: any;
|
|
1291
|
+
}
|
|
1292
|
+
declare enum UIPassthroughEvent {
|
|
1293
|
+
PinAnswerToLiveboard = "addVizToPinboard",
|
|
1294
|
+
SaveAnswer = "saveAnswer",
|
|
1295
|
+
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
1296
|
+
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
1297
|
+
GetAnswerConfig = "getAnswerPageConfig",
|
|
1298
|
+
GetLiveboardConfig = "getPinboardPageConfig",
|
|
1299
|
+
GetUnsavedAnswerTML = "getUnsavedAnswerTML",
|
|
1300
|
+
UpdateFilters = "updateFilters",
|
|
1301
|
+
Drilldown = "drillDown",
|
|
1302
|
+
GetAnswerSession = "getAnswerSession",
|
|
1303
|
+
GetFilters = "getFilters",
|
|
1304
|
+
GetIframeUrl = "getIframeUrl",
|
|
1305
|
+
GetParameters = "getParameters",
|
|
1306
|
+
GetTML = "getTML",
|
|
1307
|
+
GetTabs = "getTabs",
|
|
1308
|
+
GetGroups = "getGroups",
|
|
1309
|
+
GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* UI passthrough contract. Each event's request/response is a named interface so it
|
|
1313
|
+
* documents and imports cleanly; `UIPassthroughContractBase` maps events to the pairs.
|
|
1314
|
+
*/
|
|
1315
|
+
/** Request for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
|
|
1316
|
+
export interface PinAnswerToLiveboardRequest {
|
|
1317
|
+
vizId?: string;
|
|
1318
|
+
newVizName: string;
|
|
1319
|
+
newVizDescription?: string;
|
|
1320
|
+
liveboardId?: string;
|
|
1321
|
+
tabId?: string;
|
|
1322
|
+
newLiveboardName?: string;
|
|
1323
|
+
newTabName?: string;
|
|
1324
|
+
}
|
|
1325
|
+
/** Response for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
|
|
1326
|
+
export interface PinAnswerToLiveboardResponse {
|
|
1327
|
+
liveboardId: string;
|
|
1328
|
+
tabId: string;
|
|
1329
|
+
vizId: string;
|
|
1330
|
+
}
|
|
1331
|
+
/** Request for {@link UIPassthroughEvent.SaveAnswer}. */
|
|
1332
|
+
export interface SaveAnswerRequest {
|
|
1333
|
+
name: string;
|
|
1334
|
+
description: string;
|
|
1335
|
+
vizId?: string;
|
|
1336
|
+
isDiscoverable?: boolean;
|
|
1337
|
+
}
|
|
1338
|
+
/** Response for {@link UIPassthroughEvent.SaveAnswer}. */
|
|
1339
|
+
export interface SaveAnswerResponse {
|
|
1340
|
+
answerId: string;
|
|
1341
|
+
saveResponse?: any;
|
|
1342
|
+
shareResponse?: any;
|
|
1343
|
+
}
|
|
1344
|
+
/** Response for {@link UIPassthroughEvent.GetDiscoverabilityStatus}. */
|
|
1345
|
+
export interface GetDiscoverabilityStatusResponse {
|
|
1346
|
+
shouldShowDiscoverability: boolean;
|
|
1347
|
+
isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
|
|
1348
|
+
}
|
|
1349
|
+
/** Response for {@link UIPassthroughEvent.GetAvailableUIPassthroughs}. */
|
|
1350
|
+
export interface GetAvailableUIPassthroughsResponse {
|
|
1351
|
+
keys: string[];
|
|
1352
|
+
}
|
|
1353
|
+
/** Request for {@link UIPassthroughEvent.GetAnswerConfig}. */
|
|
1354
|
+
export interface GetAnswerConfigRequest {
|
|
1355
|
+
vizId?: string;
|
|
1356
|
+
}
|
|
1357
|
+
/** Request for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
|
|
1358
|
+
export interface GetUnsavedAnswerTMLRequest {
|
|
1359
|
+
sessionId?: string;
|
|
1360
|
+
vizId?: string;
|
|
1361
|
+
}
|
|
1362
|
+
/** Response for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
|
|
1363
|
+
export interface GetUnsavedAnswerTMLResponse {
|
|
1364
|
+
tml: string;
|
|
1365
|
+
}
|
|
1366
|
+
/** Request for {@link UIPassthroughEvent.GetAnswerSession}. */
|
|
1367
|
+
export interface GetAnswerSessionRequest {
|
|
1368
|
+
vizId?: string;
|
|
1369
|
+
}
|
|
1370
|
+
/** Response for {@link UIPassthroughEvent.GetAnswerSession}. */
|
|
1371
|
+
export interface GetAnswerSessionResponse {
|
|
1372
|
+
session: SessionInterface;
|
|
1373
|
+
embedAnswerData?: Record<string, any>;
|
|
1374
|
+
}
|
|
1375
|
+
/** Request for {@link UIPassthroughEvent.GetFilters}. */
|
|
1376
|
+
export interface GetFiltersRequest {
|
|
1377
|
+
vizId?: string;
|
|
1378
|
+
}
|
|
1379
|
+
/** Response for {@link UIPassthroughEvent.GetFilters}. */
|
|
1380
|
+
export interface GetFiltersResponse {
|
|
1381
|
+
liveboardFilters: LiveboardFilter[];
|
|
1382
|
+
runtimeFilters: RuntimeFilter[];
|
|
1383
|
+
}
|
|
1384
|
+
/** Response for {@link UIPassthroughEvent.GetIframeUrl}. */
|
|
1385
|
+
export interface GetIframeUrlResponse {
|
|
1386
|
+
iframeUrl: string;
|
|
1387
|
+
}
|
|
1388
|
+
/** Response for {@link UIPassthroughEvent.GetParameters}. */
|
|
1389
|
+
export interface GetParametersResponse {
|
|
1390
|
+
parameters: LiveboardParameter[];
|
|
1391
|
+
}
|
|
1392
|
+
/** Request for {@link UIPassthroughEvent.GetTML}. */
|
|
1393
|
+
export interface GetTMLRequest {
|
|
1394
|
+
vizId?: string;
|
|
1395
|
+
includeNonExecutedSearchTokens?: boolean;
|
|
1396
|
+
}
|
|
1397
|
+
/** Response for {@link UIPassthroughEvent.GetTabs}. */
|
|
1398
|
+
export interface GetTabsResponse {
|
|
1399
|
+
orderedTabIds: string[];
|
|
1400
|
+
numberOfTabs: number;
|
|
1401
|
+
Tabs: LiveboardTab[];
|
|
1402
|
+
}
|
|
1403
|
+
/** Response for {@link UIPassthroughEvent.GetGroups}. */
|
|
1404
|
+
export interface GetGroupsResponse {
|
|
1405
|
+
orderedGroupIds: string[];
|
|
1406
|
+
numberOfGroups: number;
|
|
1407
|
+
Groups: LiveboardGroup[];
|
|
1408
|
+
}
|
|
1409
|
+
/** Response for {@link UIPassthroughEvent.GetExportRequestForCurrentPinboard}. */
|
|
1410
|
+
export interface GetExportRequestForCurrentPinboardResponse {
|
|
1411
|
+
data: {
|
|
1412
|
+
v2Content: string;
|
|
1413
|
+
};
|
|
1414
|
+
type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Request for {@link UIPassthroughEvent.UpdateFilters}. Not the host-event
|
|
1418
|
+
* `UpdateFiltersRequest` (host-event-contracts.ts), which has a different shape.
|
|
1419
|
+
*/
|
|
1420
|
+
export interface UpdateFiltersPassthroughRequest {
|
|
1421
|
+
filter?: FilterUpdate;
|
|
1422
|
+
filters?: FilterUpdate[];
|
|
1423
|
+
}
|
|
1424
|
+
/** Request for {@link UIPassthroughEvent.Drilldown}. */
|
|
1425
|
+
export interface DrilldownRequest {
|
|
1426
|
+
points: {
|
|
1427
|
+
selectedPoints?: string[];
|
|
1428
|
+
clickedPoint?: string;
|
|
1429
|
+
};
|
|
1430
|
+
columnGuid?: string;
|
|
1431
|
+
autoDrillDown?: boolean;
|
|
1432
|
+
vizId?: string;
|
|
1433
|
+
}
|
|
1434
|
+
/** Maps each UI passthrough event to its request/response pair. */
|
|
1435
|
+
export type UIPassthroughContractBase = {
|
|
1436
|
+
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
1437
|
+
request: PinAnswerToLiveboardRequest;
|
|
1438
|
+
response: PinAnswerToLiveboardResponse;
|
|
1439
|
+
};
|
|
1440
|
+
[UIPassthroughEvent.SaveAnswer]: {
|
|
1441
|
+
request: SaveAnswerRequest;
|
|
1442
|
+
response: SaveAnswerResponse;
|
|
1443
|
+
};
|
|
1444
|
+
[UIPassthroughEvent.GetDiscoverabilityStatus]: {
|
|
1445
|
+
request: any;
|
|
1446
|
+
response: GetDiscoverabilityStatusResponse;
|
|
1447
|
+
};
|
|
1448
|
+
[UIPassthroughEvent.GetAvailableUIPassthroughs]: {
|
|
1449
|
+
request: any;
|
|
1450
|
+
response: GetAvailableUIPassthroughsResponse;
|
|
1451
|
+
};
|
|
1452
|
+
[UIPassthroughEvent.GetAnswerConfig]: {
|
|
1453
|
+
request: GetAnswerConfigRequest;
|
|
1454
|
+
response: any;
|
|
1455
|
+
};
|
|
1456
|
+
[UIPassthroughEvent.GetLiveboardConfig]: {
|
|
1457
|
+
request: any;
|
|
1458
|
+
response: any;
|
|
1459
|
+
};
|
|
1460
|
+
[UIPassthroughEvent.GetUnsavedAnswerTML]: {
|
|
1461
|
+
request: GetUnsavedAnswerTMLRequest;
|
|
1462
|
+
response: GetUnsavedAnswerTMLResponse;
|
|
1463
|
+
};
|
|
1464
|
+
[UIPassthroughEvent.GetAnswerSession]: {
|
|
1465
|
+
request: GetAnswerSessionRequest;
|
|
1466
|
+
response: GetAnswerSessionResponse;
|
|
1467
|
+
};
|
|
1468
|
+
[UIPassthroughEvent.GetFilters]: {
|
|
1469
|
+
request: GetFiltersRequest;
|
|
1470
|
+
response: GetFiltersResponse;
|
|
1471
|
+
};
|
|
1472
|
+
[UIPassthroughEvent.GetIframeUrl]: {
|
|
1473
|
+
request: Record<string, never>;
|
|
1474
|
+
response: GetIframeUrlResponse;
|
|
1475
|
+
};
|
|
1476
|
+
[UIPassthroughEvent.GetParameters]: {
|
|
1477
|
+
request: Record<string, never>;
|
|
1478
|
+
response: GetParametersResponse;
|
|
1479
|
+
};
|
|
1480
|
+
[UIPassthroughEvent.GetTML]: {
|
|
1481
|
+
request: GetTMLRequest;
|
|
1482
|
+
response: Record<string, any>;
|
|
1483
|
+
};
|
|
1484
|
+
[UIPassthroughEvent.GetTabs]: {
|
|
1485
|
+
request: Record<string, never>;
|
|
1486
|
+
response: GetTabsResponse;
|
|
1487
|
+
};
|
|
1488
|
+
[UIPassthroughEvent.GetGroups]: {
|
|
1489
|
+
request: Record<string, never>;
|
|
1490
|
+
response: GetGroupsResponse;
|
|
1491
|
+
};
|
|
1492
|
+
[UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
|
|
1493
|
+
request: Record<string, never>;
|
|
1494
|
+
response: GetExportRequestForCurrentPinboardResponse;
|
|
1495
|
+
};
|
|
1496
|
+
[UIPassthroughEvent.UpdateFilters]: {
|
|
1497
|
+
request: UpdateFiltersPassthroughRequest;
|
|
1498
|
+
response: unknown;
|
|
1499
|
+
};
|
|
1500
|
+
[UIPassthroughEvent.Drilldown]: {
|
|
1501
|
+
request: DrilldownRequest;
|
|
1502
|
+
response: unknown;
|
|
1503
|
+
};
|
|
1504
|
+
};
|
|
1505
|
+
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
1506
|
+
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
1507
|
+
export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
|
|
1508
|
+
refId?: string;
|
|
1509
|
+
value?: UIPassthroughResponse<ApiName>;
|
|
1510
|
+
error?: any;
|
|
1511
|
+
}>;
|
|
1512
|
+
export type EmbedApiHostEventMapping = {
|
|
1513
|
+
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
|
|
1514
|
+
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
1515
|
+
[HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
|
|
1516
|
+
[HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
|
|
1517
|
+
[HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
|
|
1518
|
+
[HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
|
|
1519
|
+
[HostEvent.GetTML]: UIPassthroughEvent.GetTML;
|
|
1520
|
+
[HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
|
|
1521
|
+
[HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
|
|
1522
|
+
[HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
1523
|
+
};
|
|
1253
1524
|
declare enum AuthType {
|
|
1254
1525
|
/**
|
|
1255
1526
|
* No authentication on the SDK. Pass-through to the embedded App. Alias for
|
|
@@ -3664,6 +3935,15 @@ export interface RuntimeParameter {
|
|
|
3664
3935
|
* Values
|
|
3665
3936
|
*/
|
|
3666
3937
|
value: number | boolean | string;
|
|
3938
|
+
/**
|
|
3939
|
+
* Whether the parameter is visible to the user (`UpdateParameters` only).
|
|
3940
|
+
*/
|
|
3941
|
+
isVisibleToUser?: boolean;
|
|
3942
|
+
/**
|
|
3943
|
+
* Scope of the update (`UpdateParameters` only). Omitting it, or `level`,
|
|
3944
|
+
* targets the Liveboard level.
|
|
3945
|
+
*/
|
|
3946
|
+
applicability?: Applicability;
|
|
3667
3947
|
}
|
|
3668
3948
|
/**
|
|
3669
3949
|
* Event types emitted by the embedded ThoughtSpot application.
|
|
@@ -4115,6 +4395,9 @@ export declare enum EmbedEvent {
|
|
|
4115
4395
|
Download = "download",
|
|
4116
4396
|
/**
|
|
4117
4397
|
* Emitted when the download action is triggered on an Answer.
|
|
4398
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
4399
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
4400
|
+
* accepts the union now; per-context enforced next release.
|
|
4118
4401
|
* Use start:true to subscribe to when download is initiated, or end:true to
|
|
4119
4402
|
* subscribe to when download is completed. Default is end:true.
|
|
4120
4403
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
|
|
@@ -4131,6 +4414,9 @@ export declare enum EmbedEvent {
|
|
|
4131
4414
|
DownloadAsPng = "downloadAsPng",
|
|
4132
4415
|
/**
|
|
4133
4416
|
* Emitted when the Download as PDF action is triggered on an Answer
|
|
4417
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
|
|
4418
|
+
* liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
|
|
4419
|
+
* accepts the union now; per-context enforced next release.
|
|
4134
4420
|
* Use start:true to subscribe to when download as PDF is initiated, or end:true to
|
|
4135
4421
|
* subscribe to when download as PDF is completed. Default is end:true.
|
|
4136
4422
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -4147,6 +4433,9 @@ export declare enum EmbedEvent {
|
|
|
4147
4433
|
DownloadAsPdf = "downloadAsPdf",
|
|
4148
4434
|
/**
|
|
4149
4435
|
* Emitted when the Download as CSV action is triggered on an Answer.
|
|
4436
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
4437
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
4438
|
+
* accepts the union now; per-context enforced next release.
|
|
4150
4439
|
* Use start:true to subscribe to when download as CSV is initiated, or end:true to
|
|
4151
4440
|
* subscribe to when download as CSV is completed. Default is end:true.
|
|
4152
4441
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -4163,6 +4452,9 @@ export declare enum EmbedEvent {
|
|
|
4163
4452
|
DownloadAsCsv = "downloadAsCsv",
|
|
4164
4453
|
/**
|
|
4165
4454
|
* Emitted when the Download as XLSX action is triggered on an Answer.
|
|
4455
|
+
* Payload varies by context: {@link VizScopedRequest} (Search, Answer,
|
|
4456
|
+
* Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
|
|
4457
|
+
* accepts the union now; per-context enforced next release.
|
|
4166
4458
|
* Use start:true to subscribe to when download as XLSX is initiated, or end:true to
|
|
4167
4459
|
* subscribe to when download as XLSX is completed. Default is end:true.
|
|
4168
4460
|
* @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
|
|
@@ -4441,6 +4733,9 @@ export declare enum EmbedEvent {
|
|
|
4441
4733
|
Schedule = "subscription",
|
|
4442
4734
|
/**
|
|
4443
4735
|
* Emitted when a user clicks **Edit** on a Liveboard or visualization
|
|
4736
|
+
* Payload varies by context: {@link VizScopedRequest} (Liveboard),
|
|
4737
|
+
* {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
|
|
4738
|
+
* union now; per-context enforced next release.
|
|
4444
4739
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4445
4740
|
* @example
|
|
4446
4741
|
* ```js
|
|
@@ -5519,6 +5814,7 @@ export declare enum HostEvent {
|
|
|
5519
5814
|
* the search query string.
|
|
5520
5815
|
* Supported in `AppEmbed` and `SearchEmbed` deployments.
|
|
5521
5816
|
* Includes the following properties:
|
|
5817
|
+
* Payload: {@link SearchRequest}.
|
|
5522
5818
|
* @param - Includes the following keys:
|
|
5523
5819
|
* - `searchQuery`: Query string with search tokens.
|
|
5524
5820
|
* - `dataSources`: Data source GUID to search on.
|
|
@@ -5546,6 +5842,9 @@ export declare enum HostEvent {
|
|
|
5546
5842
|
Search = "search",
|
|
5547
5843
|
/**
|
|
5548
5844
|
* Triggers a drill on certain points of the specified column
|
|
5845
|
+
* Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
|
|
5846
|
+
* ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
|
|
5847
|
+
* enforced next release.
|
|
5549
5848
|
* Includes the following properties:
|
|
5550
5849
|
* @param - Includes the following keys:
|
|
5551
5850
|
* - `points`: An object containing `selectedPoints` and/or `clickedPoint`
|
|
@@ -5625,6 +5924,8 @@ export declare enum HostEvent {
|
|
|
5625
5924
|
Reload = "reload",
|
|
5626
5925
|
/**
|
|
5627
5926
|
* Get iframe URL for the current embed view.
|
|
5927
|
+
* Payload: none.
|
|
5928
|
+
* Response: {@link GetIframeUrlResponse}.
|
|
5628
5929
|
* @example
|
|
5629
5930
|
* ```js
|
|
5630
5931
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
@@ -5643,6 +5944,7 @@ export declare enum HostEvent {
|
|
|
5643
5944
|
GetIframeUrl = "GetIframeUrl",
|
|
5644
5945
|
/**
|
|
5645
5946
|
* Display specific visualizations on a Liveboard.
|
|
5947
|
+
* Payload: `string[]`.
|
|
5646
5948
|
* @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
|
|
5647
5949
|
* in this parameter will be hidden.
|
|
5648
5950
|
* @example
|
|
@@ -5665,6 +5967,7 @@ export declare enum HostEvent {
|
|
|
5665
5967
|
SetVisibleVizs = "SetPinboardVisibleVizs",
|
|
5666
5968
|
/**
|
|
5667
5969
|
* Set a Liveboard tab as an active tab.
|
|
5970
|
+
* Payload: {@link SetActiveTabRequest}.
|
|
5668
5971
|
* @param - tabId - string of id of Tab to show
|
|
5669
5972
|
* @example
|
|
5670
5973
|
* ```js
|
|
@@ -5692,6 +5995,7 @@ export declare enum HostEvent {
|
|
|
5692
5995
|
* and `AppEmbed` only. In full application embedding, this event updates
|
|
5693
5996
|
* the runtime filters applied on the Liveboard and saved Answer objects.
|
|
5694
5997
|
*
|
|
5998
|
+
* Payload: {@link RuntimeFilter}[].
|
|
5695
5999
|
* @param - Array of {@link RuntimeFilter} objects. Each item includes:
|
|
5696
6000
|
* - `columnName`: Name of the column to filter on.
|
|
5697
6001
|
* - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
|
|
@@ -5733,6 +6037,7 @@ export declare enum HostEvent {
|
|
|
5733
6037
|
* Accepts either a plain value or an object with `path`
|
|
5734
6038
|
* and an optional `replace` flag.
|
|
5735
6039
|
*
|
|
6040
|
+
* Payload: `string` | `number` | {@link NavigateRequest}.
|
|
5736
6041
|
* @param data - A string path, a numeric history delta, or an object
|
|
5737
6042
|
* `{ path: string | number, replace?: boolean }`.
|
|
5738
6043
|
* - `path` — the route to navigate to, or a history delta such as `1`
|
|
@@ -5760,6 +6065,9 @@ export declare enum HostEvent {
|
|
|
5760
6065
|
/**
|
|
5761
6066
|
* Open the filter panel for a particular column.
|
|
5762
6067
|
* Works with Search and Liveboard embed.
|
|
6068
|
+
* Payload: {@link OpenFilterRequest} (the cross-context superset). The
|
|
6069
|
+
* accepted fields vary by context: {@link OpenFilterLiveboardRequest},
|
|
6070
|
+
* {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
|
|
5763
6071
|
* @param - { columnId: string,
|
|
5764
6072
|
* name: string,
|
|
5765
6073
|
* type: ATTRIBUTE/MEASURE,
|
|
@@ -5842,6 +6150,7 @@ export declare enum HostEvent {
|
|
|
5842
6150
|
/**
|
|
5843
6151
|
* Open the parameter panel for a particular parameter on a Liveboard.
|
|
5844
6152
|
* Mirrors {@link HostEvent.OpenFilter} for parameters.
|
|
6153
|
+
* Payload: {@link OpenParameterRequest}.
|
|
5845
6154
|
* @param - Includes the following keys:
|
|
5846
6155
|
* - `parameter`: An object identifying the parameter to open, for
|
|
5847
6156
|
* example, `{ parameterId: '<parameter-GUID>' }`.
|
|
@@ -5873,6 +6182,7 @@ export declare enum HostEvent {
|
|
|
5873
6182
|
OpenParameter = "openParameter",
|
|
5874
6183
|
/**
|
|
5875
6184
|
* Add columns to the current search query.
|
|
6185
|
+
* Payload: `{ columnIds: string[] }`.
|
|
5876
6186
|
* @param - { columnIds: string[] }
|
|
5877
6187
|
* @example
|
|
5878
6188
|
* ```js
|
|
@@ -5891,6 +6201,7 @@ export declare enum HostEvent {
|
|
|
5891
6201
|
AddColumns = "addColumns",
|
|
5892
6202
|
/**
|
|
5893
6203
|
* Remove a column from the current search query.
|
|
6204
|
+
* Payload: `{ columnId: string }`.
|
|
5894
6205
|
* @param - { columnId: string }
|
|
5895
6206
|
* @example
|
|
5896
6207
|
* ```js
|
|
@@ -5915,6 +6226,8 @@ export declare enum HostEvent {
|
|
|
5915
6226
|
* sorting, toggling of legends, and data drill down.
|
|
5916
6227
|
* For more information, see
|
|
5917
6228
|
* link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
|
|
6229
|
+
* Payload: none.
|
|
6230
|
+
* Response: {@link GetExportRequestForCurrentPinboardResponse}.
|
|
5918
6231
|
* @example
|
|
5919
6232
|
* ```js
|
|
5920
6233
|
* liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
|
|
@@ -5936,6 +6249,8 @@ export declare enum HostEvent {
|
|
|
5936
6249
|
* requiring additional user input via the *Pin to Liveboard* modal, define
|
|
5937
6250
|
* the following parameters:
|
|
5938
6251
|
*
|
|
6252
|
+
* Payload: {@link PinAnswerToLiveboardRequest}.
|
|
6253
|
+
* Response: {@link PinAnswerToLiveboardResponse}.
|
|
5939
6254
|
* @param - Includes the following keys:
|
|
5940
6255
|
* - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
|
|
5941
6256
|
* Liveboard.
|
|
@@ -6050,6 +6365,7 @@ export declare enum HostEvent {
|
|
|
6050
6365
|
LiveboardInfo = "pinboardInfo",
|
|
6051
6366
|
/**
|
|
6052
6367
|
* Trigger the **Schedule** action on an embedded Liveboard.
|
|
6368
|
+
* Payload: {@link VizScopedRequest}.
|
|
6053
6369
|
* @example
|
|
6054
6370
|
* ```js
|
|
6055
6371
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
@@ -6065,6 +6381,7 @@ export declare enum HostEvent {
|
|
|
6065
6381
|
Schedule = "subscription",
|
|
6066
6382
|
/**
|
|
6067
6383
|
* Trigger the **Manage schedule** action on an embedded Liveboard
|
|
6384
|
+
* Payload: {@link VizScopedRequest}.
|
|
6068
6385
|
* @example
|
|
6069
6386
|
* ```js
|
|
6070
6387
|
* liveboardEmbed.trigger(HostEvent.SchedulesList)
|
|
@@ -6081,6 +6398,7 @@ export declare enum HostEvent {
|
|
|
6081
6398
|
/**
|
|
6082
6399
|
* Trigger the **Export TML** action on an embedded Liveboard or
|
|
6083
6400
|
* Answer.
|
|
6401
|
+
* Payload: {@link VizScopedRequest}.
|
|
6084
6402
|
* @example
|
|
6085
6403
|
* ```js
|
|
6086
6404
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
@@ -6103,6 +6421,7 @@ export declare enum HostEvent {
|
|
|
6103
6421
|
/**
|
|
6104
6422
|
* Trigger the **Edit TML** action on an embedded Liveboard or
|
|
6105
6423
|
* saved Answers in the full application embedding.
|
|
6424
|
+
* Payload: {@link VizScopedRequest}.
|
|
6106
6425
|
* @example
|
|
6107
6426
|
* ```js
|
|
6108
6427
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
@@ -6124,6 +6443,7 @@ export declare enum HostEvent {
|
|
|
6124
6443
|
EditTML = "editTSL",
|
|
6125
6444
|
/**
|
|
6126
6445
|
* Trigger the **Update TML** action on an embedded Liveboard.
|
|
6446
|
+
* Payload: {@link VizScopedRequest}.
|
|
6127
6447
|
* @example
|
|
6128
6448
|
* ```js
|
|
6129
6449
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
@@ -6141,6 +6461,7 @@ export declare enum HostEvent {
|
|
|
6141
6461
|
* Trigger the **Download PDF** action on an embedded Liveboard,
|
|
6142
6462
|
* visualization or Answer.
|
|
6143
6463
|
*
|
|
6464
|
+
* Payload: {@link VizScopedRequest} plus optional `liveboardId`.
|
|
6144
6465
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
6145
6466
|
*
|
|
6146
6467
|
* **NOTE**: The **Download** > **PDF** action is available on
|
|
@@ -6191,6 +6512,7 @@ export declare enum HostEvent {
|
|
|
6191
6512
|
/**
|
|
6192
6513
|
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
6193
6514
|
*
|
|
6515
|
+
* Payload: none.
|
|
6194
6516
|
* @example
|
|
6195
6517
|
* ```js
|
|
6196
6518
|
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
@@ -6245,6 +6567,9 @@ export declare enum HostEvent {
|
|
|
6245
6567
|
MakeACopy = "makeACopy",
|
|
6246
6568
|
/**
|
|
6247
6569
|
* Trigger the **Delete** action for a Liveboard.
|
|
6570
|
+
* Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
|
|
6571
|
+
* required), {@link VizScopedRequest} (Search). trigger() accepts the union
|
|
6572
|
+
* now; per-context enforced next release.
|
|
6248
6573
|
* @example
|
|
6249
6574
|
* ```js
|
|
6250
6575
|
* appEmbed.trigger(HostEvent.Remove)
|
|
@@ -6259,6 +6584,7 @@ export declare enum HostEvent {
|
|
|
6259
6584
|
Remove = "delete",
|
|
6260
6585
|
/**
|
|
6261
6586
|
* Trigger the **Explore** action on a visualization.
|
|
6587
|
+
* Payload: {@link RequiredVizRequest}.
|
|
6262
6588
|
* @param - an object with `vizId` as a key
|
|
6263
6589
|
* @example
|
|
6264
6590
|
* ```js
|
|
@@ -6278,6 +6604,7 @@ export declare enum HostEvent {
|
|
|
6278
6604
|
/**
|
|
6279
6605
|
* Trigger the **Create alert** action on a KPI chart
|
|
6280
6606
|
* in a Liveboard or saved Answer.
|
|
6607
|
+
* Payload: {@link VizScopedRequest}.
|
|
6281
6608
|
* @param - an object with `vizId` as a key
|
|
6282
6609
|
* @example
|
|
6283
6610
|
* ```js
|
|
@@ -6309,6 +6636,7 @@ export declare enum HostEvent {
|
|
|
6309
6636
|
/**
|
|
6310
6637
|
* Trigger the **Manage alerts** action on a KPI chart
|
|
6311
6638
|
* in a visualization or saved Answer.
|
|
6639
|
+
* Payload: {@link VizScopedRequest}.
|
|
6312
6640
|
* @param - an object with `vizId` as a key
|
|
6313
6641
|
* @example
|
|
6314
6642
|
* ```js
|
|
@@ -6346,6 +6674,7 @@ export declare enum HostEvent {
|
|
|
6346
6674
|
* on a Liveboard.
|
|
6347
6675
|
*
|
|
6348
6676
|
* This event is not supported in visualization embed and search embed.
|
|
6677
|
+
* Payload: {@link VizScopedRequest}.
|
|
6349
6678
|
* @param - Object parameter. Includes the following keys:
|
|
6350
6679
|
* - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
|
|
6351
6680
|
* pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
|
|
@@ -6388,6 +6717,7 @@ export declare enum HostEvent {
|
|
|
6388
6717
|
Edit = "edit",
|
|
6389
6718
|
/**
|
|
6390
6719
|
* Trigger the **Copy link** action on a Liveboard or visualization
|
|
6720
|
+
* Payload: {@link VizScopedRequest}.
|
|
6391
6721
|
* @param - object - to trigger the action for a
|
|
6392
6722
|
* specific visualization in Liveboard embed, pass in `vizId` as a key
|
|
6393
6723
|
* @example
|
|
@@ -6433,6 +6763,7 @@ export declare enum HostEvent {
|
|
|
6433
6763
|
CopyLink = "embedDocument",
|
|
6434
6764
|
/**
|
|
6435
6765
|
* Trigger the **Present** action on a Liveboard or visualization
|
|
6766
|
+
* Payload: {@link VizScopedRequest}.
|
|
6436
6767
|
* @param - object - to trigger the action for a specific visualization
|
|
6437
6768
|
* in Liveboard embed, pass in `vizId` as a key
|
|
6438
6769
|
* @example
|
|
@@ -6478,6 +6809,8 @@ export declare enum HostEvent {
|
|
|
6478
6809
|
Present = "present",
|
|
6479
6810
|
/**
|
|
6480
6811
|
* Get TML for the current search.
|
|
6812
|
+
* Payload: {@link GetTMLRequest}.
|
|
6813
|
+
* Response: `Record<string, any>`.
|
|
6481
6814
|
* @example
|
|
6482
6815
|
* ```js
|
|
6483
6816
|
* searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
|
|
@@ -6527,6 +6860,7 @@ export declare enum HostEvent {
|
|
|
6527
6860
|
* Trigger the **Show underlying data** action on a
|
|
6528
6861
|
* chart or table.
|
|
6529
6862
|
*
|
|
6863
|
+
* Payload: {@link VizScopedRequest}.
|
|
6530
6864
|
* @param - an object with vizId as a key
|
|
6531
6865
|
* @example
|
|
6532
6866
|
* ```js
|
|
@@ -6560,6 +6894,7 @@ export declare enum HostEvent {
|
|
|
6560
6894
|
* Trigger the **Delete** action for a visualization
|
|
6561
6895
|
* in an embedded Liveboard, or a chart or table
|
|
6562
6896
|
* generated from Search.
|
|
6897
|
+
* Payload: {@link VizScopedRequest}.
|
|
6563
6898
|
* @param - Liveboard embed takes an object with `vizId` as a key.
|
|
6564
6899
|
* Can be left empty if embedding Search or visualization.
|
|
6565
6900
|
* @example
|
|
@@ -6588,6 +6923,7 @@ export declare enum HostEvent {
|
|
|
6588
6923
|
/**
|
|
6589
6924
|
* Trigger the **SpotIQ analyze** action on a
|
|
6590
6925
|
* chart or table.
|
|
6926
|
+
* Payload: {@link VizScopedRequest}.
|
|
6591
6927
|
* @param - Liveboard embed takes `vizId` as a
|
|
6592
6928
|
* key. Can be left undefined when embedding Search or
|
|
6593
6929
|
* visualization.
|
|
@@ -6650,6 +6986,7 @@ export declare enum HostEvent {
|
|
|
6650
6986
|
/**
|
|
6651
6987
|
* Trigger the **Download** > **PNG** action on
|
|
6652
6988
|
* charts in the embedded view.
|
|
6989
|
+
* Payload: {@link VizScopedRequest}.
|
|
6653
6990
|
* @example
|
|
6654
6991
|
* ```js
|
|
6655
6992
|
* liveboardEmbed.trigger(HostEvent.DownloadAsPng,
|
|
@@ -6680,6 +7017,7 @@ export declare enum HostEvent {
|
|
|
6680
7017
|
/**
|
|
6681
7018
|
* Trigger the **Download** > **CSV** action on tables in
|
|
6682
7019
|
* the embedded view.
|
|
7020
|
+
* Payload: {@link VizScopedRequest}.
|
|
6683
7021
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
6684
7022
|
* @example
|
|
6685
7023
|
* ```js
|
|
@@ -6719,6 +7057,7 @@ export declare enum HostEvent {
|
|
|
6719
7057
|
/**
|
|
6720
7058
|
* Trigger the **Download** > **XLSX** action on tables
|
|
6721
7059
|
* in the embedded view.
|
|
7060
|
+
* Payload: {@link VizScopedRequest}.
|
|
6722
7061
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
6723
7062
|
* @example
|
|
6724
7063
|
* ```js
|
|
@@ -6758,6 +7097,7 @@ export declare enum HostEvent {
|
|
|
6758
7097
|
/**
|
|
6759
7098
|
* Trigger the **Share** action on an embedded
|
|
6760
7099
|
* Liveboard or Answer.
|
|
7100
|
+
* Payload: {@link VizScopedRequest}.
|
|
6761
7101
|
* @example
|
|
6762
7102
|
* ```js
|
|
6763
7103
|
* liveboardEmbed.trigger(HostEvent.Share)
|
|
@@ -6784,6 +7124,7 @@ export declare enum HostEvent {
|
|
|
6784
7124
|
* Trigger the **Save** action on a Liveboard, Answer, or Spotter.
|
|
6785
7125
|
* Saves the changes.
|
|
6786
7126
|
*
|
|
7127
|
+
* Payload: {@link VizScopedRequest}.
|
|
6787
7128
|
* @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
|
|
6788
7129
|
* It is required and can be retrieved from the data embed event.
|
|
6789
7130
|
*
|
|
@@ -6835,6 +7176,7 @@ export declare enum HostEvent {
|
|
|
6835
7176
|
/**
|
|
6836
7177
|
* Trigger the **Sync to Sheets** action on an embedded visualization or Answer
|
|
6837
7178
|
* Sends data from an Answer or Liveboard visualization to a Google sheet.
|
|
7179
|
+
* Payload: {@link VizScopedRequest}.
|
|
6838
7180
|
* @param - an object with `vizId` as a key
|
|
6839
7181
|
* @example
|
|
6840
7182
|
* ```js
|
|
@@ -6865,6 +7207,7 @@ export declare enum HostEvent {
|
|
|
6865
7207
|
* Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
|
|
6866
7208
|
* Sends data from an Answer or Liveboard visualization to third-party apps such
|
|
6867
7209
|
* as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
|
|
7210
|
+
* Payload: {@link VizScopedRequest}.
|
|
6868
7211
|
* @param - an object with vizId as a key
|
|
6869
7212
|
* @example
|
|
6870
7213
|
* ```js
|
|
@@ -6895,6 +7238,7 @@ export declare enum HostEvent {
|
|
|
6895
7238
|
* Trigger the **Manage pipelines** action on an embedded
|
|
6896
7239
|
* visualization or Answer.
|
|
6897
7240
|
* Allows users to manage ThoughtSpot Sync pipelines.
|
|
7241
|
+
* Payload: {@link VizScopedRequest}.
|
|
6898
7242
|
* @param - an object with `vizId` as a key
|
|
6899
7243
|
* @example
|
|
6900
7244
|
* ```js
|
|
@@ -6923,6 +7267,7 @@ export declare enum HostEvent {
|
|
|
6923
7267
|
ManagePipelines = "manage-pipeline",
|
|
6924
7268
|
/**
|
|
6925
7269
|
* Reset search operation on the Search or Answer page.
|
|
7270
|
+
* Payload: none.
|
|
6926
7271
|
* @example
|
|
6927
7272
|
* ```js
|
|
6928
7273
|
* searchEmbed.trigger(HostEvent.ResetSearch)
|
|
@@ -6950,6 +7295,8 @@ export declare enum HostEvent {
|
|
|
6950
7295
|
* whole Liveboard.
|
|
6951
7296
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
6952
7297
|
* ThoughtSpot: 26.10.0.cl.
|
|
7298
|
+
* Payload: {@link GetFiltersRequest}.
|
|
7299
|
+
* Response: {@link GetFiltersResponse}.
|
|
6953
7300
|
* @example
|
|
6954
7301
|
* ```js
|
|
6955
7302
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
@@ -6969,6 +7316,7 @@ export declare enum HostEvent {
|
|
|
6969
7316
|
GetFilters = "getFilters",
|
|
6970
7317
|
/**
|
|
6971
7318
|
* Update one or several filters applied on a Liveboard.
|
|
7319
|
+
* Payload: {@link UpdateFiltersRequest}.
|
|
6972
7320
|
* @param - Includes the following keys:
|
|
6973
7321
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
6974
7322
|
* values.
|
|
@@ -7097,6 +7445,8 @@ export declare enum HostEvent {
|
|
|
7097
7445
|
UpdateFilters = "updateFilters",
|
|
7098
7446
|
/**
|
|
7099
7447
|
* Get tab details for the current Liveboard.
|
|
7448
|
+
* Payload: none.
|
|
7449
|
+
* Response: {@link GetTabsResponse}.
|
|
7100
7450
|
* @example
|
|
7101
7451
|
* ```js
|
|
7102
7452
|
* liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
|
|
@@ -7122,6 +7472,8 @@ export declare enum HostEvent {
|
|
|
7122
7472
|
/**
|
|
7123
7473
|
* Get group details for the current Liveboard.
|
|
7124
7474
|
* Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
|
|
7475
|
+
* Payload: none.
|
|
7476
|
+
* Response: {@link GetGroupsResponse}.
|
|
7125
7477
|
* @example
|
|
7126
7478
|
* ```js
|
|
7127
7479
|
* liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
|
|
@@ -7146,6 +7498,7 @@ export declare enum HostEvent {
|
|
|
7146
7498
|
GetGroups = "getGroups",
|
|
7147
7499
|
/**
|
|
7148
7500
|
* Set the visible tabs on a Liveboard.
|
|
7501
|
+
* Payload: `string[]`.
|
|
7149
7502
|
* @param - an array of ids of tabs to show, the IDs not passed
|
|
7150
7503
|
* will be hidden.
|
|
7151
7504
|
* @example
|
|
@@ -7168,6 +7521,7 @@ export declare enum HostEvent {
|
|
|
7168
7521
|
SetVisibleTabs = "SetPinboardVisibleTabs",
|
|
7169
7522
|
/**
|
|
7170
7523
|
* Set the hidden tabs on a Liveboard.
|
|
7524
|
+
* Payload: `string[]`.
|
|
7171
7525
|
* @param - an array of the IDs of the tabs to hide.
|
|
7172
7526
|
* The IDs not passed will be shown.
|
|
7173
7527
|
* @example
|
|
@@ -7196,6 +7550,8 @@ export declare enum HostEvent {
|
|
|
7196
7550
|
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
7197
7551
|
* object that provides a more convenient interface for working with answers.
|
|
7198
7552
|
*
|
|
7553
|
+
* Payload: {@link GetAnswerSessionRequest}.
|
|
7554
|
+
* Response: {@link GetAnswerSessionResponse}.
|
|
7199
7555
|
* @example
|
|
7200
7556
|
* ```js
|
|
7201
7557
|
* // Preferred way to get an AnswerService
|
|
@@ -7223,6 +7579,7 @@ export declare enum HostEvent {
|
|
|
7223
7579
|
GetAnswerSession = "getAnswerSession",
|
|
7224
7580
|
/**
|
|
7225
7581
|
* Trigger the *Ask Sage* action for visualizations
|
|
7582
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7226
7583
|
* @example
|
|
7227
7584
|
* ```js
|
|
7228
7585
|
* liveboardEmbed.trigger(HostEvent.AskSage,
|
|
@@ -7234,6 +7591,7 @@ export declare enum HostEvent {
|
|
|
7234
7591
|
/**
|
|
7235
7592
|
* Trigger cross filter update action on a Liveboard.
|
|
7236
7593
|
*
|
|
7594
|
+
* Payload: {@link UpdateCrossFilterRequest}.
|
|
7237
7595
|
* @example
|
|
7238
7596
|
* ```js
|
|
7239
7597
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -7249,7 +7607,9 @@ export declare enum HostEvent {
|
|
|
7249
7607
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
7250
7608
|
/**
|
|
7251
7609
|
* Trigger reset action for a personalized Liveboard view.
|
|
7252
|
-
* This event is deprecated.
|
|
7610
|
+
* This event is deprecated.
|
|
7611
|
+
* Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
7612
|
+
* Payload: none.
|
|
7253
7613
|
* @example
|
|
7254
7614
|
* ```js
|
|
7255
7615
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -7270,6 +7630,7 @@ export declare enum HostEvent {
|
|
|
7270
7630
|
/**
|
|
7271
7631
|
* Triggers an action to update Parameter values on embedded
|
|
7272
7632
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
7633
|
+
* Payload: {@link RuntimeParameter}[].
|
|
7273
7634
|
* @param - Includes the following keys for each item:
|
|
7274
7635
|
* - `name`: Name of the parameter.
|
|
7275
7636
|
* - `value`: The value to set for the parameter.
|
|
@@ -7327,6 +7688,8 @@ export declare enum HostEvent {
|
|
|
7327
7688
|
* whole Liveboard.
|
|
7328
7689
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
7329
7690
|
* ThoughtSpot: 26.10.0.cl.
|
|
7691
|
+
* Payload: none.
|
|
7692
|
+
* Response: {@link GetParametersResponse}.
|
|
7330
7693
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
7331
7694
|
* ```js
|
|
7332
7695
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
@@ -7364,6 +7727,7 @@ export declare enum HostEvent {
|
|
|
7364
7727
|
* ```js
|
|
7365
7728
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7366
7729
|
* ```
|
|
7730
|
+
* Payload: {@link PersonalisedViewRequest} (`viewId` only).
|
|
7367
7731
|
* @example
|
|
7368
7732
|
* ```js
|
|
7369
7733
|
* // Update personalized view from liveboard context
|
|
@@ -7396,6 +7760,7 @@ export declare enum HostEvent {
|
|
|
7396
7760
|
* If neither is provided, the Liveboard resets to the original/default view.
|
|
7397
7761
|
* When a `viewName` is provided and multiple views share
|
|
7398
7762
|
* the same name, the first match is selected.
|
|
7763
|
+
* Payload: {@link PersonalisedViewRequest}.
|
|
7399
7764
|
* @example
|
|
7400
7765
|
* ```js
|
|
7401
7766
|
* liveboardEmbed.trigger(
|
|
@@ -7439,6 +7804,8 @@ export declare enum HostEvent {
|
|
|
7439
7804
|
* If no parameters are specified, the save action is
|
|
7440
7805
|
* triggered with a modal to prompt users to
|
|
7441
7806
|
* add a name and description for the Answer.
|
|
7807
|
+
* Payload: {@link SaveAnswerRequest}.
|
|
7808
|
+
* Response: {@link SaveAnswerResponse}.
|
|
7442
7809
|
* @param - Includes the following keys:
|
|
7443
7810
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
7444
7811
|
* embed.
|
|
@@ -7524,6 +7891,7 @@ export declare enum HostEvent {
|
|
|
7524
7891
|
/**
|
|
7525
7892
|
* Triggers a search operation with the search tokens specified in
|
|
7526
7893
|
* the search query string in spotter embed.
|
|
7894
|
+
* Payload: {@link SpotterSearchRequest}.
|
|
7527
7895
|
* @param - Includes the following keys:
|
|
7528
7896
|
* - `query`: Text string in Natural Language format.
|
|
7529
7897
|
* - `executeSearch`: Boolean to execute search and update search query.
|
|
@@ -7548,6 +7916,7 @@ export declare enum HostEvent {
|
|
|
7548
7916
|
SpotterSearch = "SpotterSearch",
|
|
7549
7917
|
/**
|
|
7550
7918
|
* Edits the last prompt in spotter embed.
|
|
7919
|
+
* Payload: `string`.
|
|
7551
7920
|
* @param - `query`: Text string
|
|
7552
7921
|
* @example
|
|
7553
7922
|
* ```js
|
|
@@ -7564,6 +7933,7 @@ export declare enum HostEvent {
|
|
|
7564
7933
|
EditLastPrompt = "EditLastPrompt",
|
|
7565
7934
|
/**
|
|
7566
7935
|
* Opens the data source preview modal in Spotter Embed.
|
|
7936
|
+
* Payload: none.
|
|
7567
7937
|
* @example
|
|
7568
7938
|
* ```js
|
|
7569
7939
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
@@ -7599,6 +7969,7 @@ export declare enum HostEvent {
|
|
|
7599
7969
|
DataModelInstructions = "DataModelInstructions",
|
|
7600
7970
|
/**
|
|
7601
7971
|
* Resets the Spotter Embed Conversation.
|
|
7972
|
+
* Payload: none.
|
|
7602
7973
|
* @example
|
|
7603
7974
|
* ```js
|
|
7604
7975
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
@@ -7611,6 +7982,7 @@ export declare enum HostEvent {
|
|
|
7611
7982
|
* `conversationId` is **mandatory** — you must pass the id of the
|
|
7612
7983
|
* conversation to share. Also no-op when sharing is disabled
|
|
7613
7984
|
* (enableShareConversation off) or when already in the read-only shared view.
|
|
7985
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7614
7986
|
* @example
|
|
7615
7987
|
* ```js
|
|
7616
7988
|
* spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
|
|
@@ -7620,6 +7992,7 @@ export declare enum HostEvent {
|
|
|
7620
7992
|
ShareSpotterConversation = "ShareSpotterConversation",
|
|
7621
7993
|
/**
|
|
7622
7994
|
* Closes the Spotter share-conversation modal. No-op if none is open.
|
|
7995
|
+
* Payload: none.
|
|
7623
7996
|
* @example
|
|
7624
7997
|
* ```js
|
|
7625
7998
|
* spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
|
|
@@ -7629,6 +8002,7 @@ export declare enum HostEvent {
|
|
|
7629
8002
|
CloseSpotterShareConversation = "CloseSpotterShareConversation",
|
|
7630
8003
|
/**
|
|
7631
8004
|
* Exits the read-only shared-conversation view.
|
|
8005
|
+
* Payload: none.
|
|
7632
8006
|
* @example
|
|
7633
8007
|
* ```js
|
|
7634
8008
|
* spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
|
|
@@ -7638,6 +8012,7 @@ export declare enum HostEvent {
|
|
|
7638
8012
|
ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
|
|
7639
8013
|
/**
|
|
7640
8014
|
* Deletes the last prompt in spotter embed.
|
|
8015
|
+
* Payload: none.
|
|
7641
8016
|
* @example
|
|
7642
8017
|
* ```js
|
|
7643
8018
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
@@ -7647,6 +8022,7 @@ export declare enum HostEvent {
|
|
|
7647
8022
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
7648
8023
|
/**
|
|
7649
8024
|
* Toggle the visualization to chart or table view.
|
|
8025
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7650
8026
|
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
7651
8027
|
* @example
|
|
7652
8028
|
* ```js
|
|
@@ -7685,6 +8061,7 @@ export declare enum HostEvent {
|
|
|
7685
8061
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
7686
8062
|
/**
|
|
7687
8063
|
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
8064
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7688
8065
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
7689
8066
|
* @example
|
|
7690
8067
|
* ```js
|
|
@@ -7746,6 +8123,7 @@ export declare enum HostEvent {
|
|
|
7746
8123
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
7747
8124
|
* instance.
|
|
7748
8125
|
*
|
|
8126
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7749
8127
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7750
8128
|
* @example
|
|
7751
8129
|
* ```js
|
|
@@ -7763,6 +8141,7 @@ export declare enum HostEvent {
|
|
|
7763
8141
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
7764
8142
|
* instance.
|
|
7765
8143
|
*
|
|
8144
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7766
8145
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7767
8146
|
* @example
|
|
7768
8147
|
* ```js
|
|
@@ -7787,6 +8166,7 @@ export declare enum HostEvent {
|
|
|
7787
8166
|
* Trigger the **Send Test Email** action in the Liveboard schedule modal.
|
|
7788
8167
|
* Sends a test schedule email to self or all recipients.
|
|
7789
8168
|
* Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
|
|
8169
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
7790
8170
|
* @example
|
|
7791
8171
|
* ```js
|
|
7792
8172
|
* liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
|
|
@@ -7805,6 +8185,7 @@ export declare enum HostEvent {
|
|
|
7805
8185
|
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
7806
8186
|
/**
|
|
7807
8187
|
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
8188
|
+
* Payload: `{ query: string }`.
|
|
7808
8189
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7809
8190
|
* @param query - the prompt text to send.
|
|
7810
8191
|
* @example
|
|
@@ -7817,6 +8198,7 @@ export declare enum HostEvent {
|
|
|
7817
8198
|
SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
|
|
7818
8199
|
/**
|
|
7819
8200
|
* Initializes a new SpotterViz conversation.
|
|
8201
|
+
* Payload: none.
|
|
7820
8202
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7821
8203
|
* @example
|
|
7822
8204
|
* ```js
|
|
@@ -7826,6 +8208,7 @@ export declare enum HostEvent {
|
|
|
7826
8208
|
InitSpotterVizConversation = "InitSpotterVizConversation",
|
|
7827
8209
|
/**
|
|
7828
8210
|
* Opens the SpotterViz panel.
|
|
8211
|
+
* Payload: none.
|
|
7829
8212
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7830
8213
|
* @example
|
|
7831
8214
|
* ```js
|
|
@@ -7835,6 +8218,7 @@ export declare enum HostEvent {
|
|
|
7835
8218
|
OpenSpotterVizPanel = "OpenSpotterVizPanel",
|
|
7836
8219
|
/**
|
|
7837
8220
|
* Closes the SpotterViz panel.
|
|
8221
|
+
* Payload: none.
|
|
7838
8222
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7839
8223
|
* @example
|
|
7840
8224
|
* ```js
|
|
@@ -7845,6 +8229,7 @@ export declare enum HostEvent {
|
|
|
7845
8229
|
/**
|
|
7846
8230
|
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
7847
8231
|
* Requires `enableLiveboardDataCache` to be enabled.
|
|
8232
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
7848
8233
|
* @example
|
|
7849
8234
|
* ```js
|
|
7850
8235
|
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
@@ -9859,92 +10244,376 @@ export declare enum Action {
|
|
|
9859
10244
|
* disabledActions: [Action.SpotterOnLiveboard]
|
|
9860
10245
|
* ```
|
|
9861
10246
|
*/
|
|
9862
|
-
SpotterOnLiveboard = "spotterOnLiveboard"
|
|
9863
|
-
}
|
|
9864
|
-
declare enum ContextMenuTriggerOptions {
|
|
9865
|
-
LEFT_CLICK = "left-click",
|
|
9866
|
-
RIGHT_CLICK = "right-click",
|
|
9867
|
-
BOTH_CLICKS = "both-clicks"
|
|
9868
|
-
}
|
|
9869
|
-
export interface ColumnValue {
|
|
9870
|
-
column: {
|
|
9871
|
-
id: string;
|
|
9872
|
-
name: string;
|
|
9873
|
-
dataType: string;
|
|
9874
|
-
[key: string]: any;
|
|
9875
|
-
};
|
|
9876
|
-
value: string | number | boolean | {
|
|
9877
|
-
v: {
|
|
9878
|
-
s: number;
|
|
9879
|
-
e: number;
|
|
9880
|
-
};
|
|
9881
|
-
};
|
|
9882
|
-
}
|
|
9883
|
-
export interface VizPoint {
|
|
9884
|
-
selectedAttributes: ColumnValue[];
|
|
9885
|
-
selectedMeasures: ColumnValue[];
|
|
9886
|
-
}
|
|
9887
|
-
export interface CustomAction {
|
|
9888
|
-
name: string;
|
|
9889
|
-
id: string;
|
|
9890
|
-
position: CustomActionsPosition;
|
|
9891
|
-
target: CustomActionTarget;
|
|
9892
|
-
metadataIds?: {
|
|
9893
|
-
answerIds?: string[];
|
|
9894
|
-
liveboardIds?: string[];
|
|
9895
|
-
vizIds?: string[];
|
|
9896
|
-
};
|
|
9897
|
-
dataModelIds?: {
|
|
9898
|
-
modelIds?: string[];
|
|
9899
|
-
modelColumnNames?: string[];
|
|
9900
|
-
};
|
|
9901
|
-
orgIds?: string[];
|
|
9902
|
-
groupIds?: string[];
|
|
9903
|
-
}
|
|
9904
|
-
/**
|
|
9905
|
-
* Enum options to show custom actions at different
|
|
9906
|
-
* positions in the application.
|
|
9907
|
-
*/
|
|
9908
|
-
export declare enum CustomActionsPosition {
|
|
10247
|
+
SpotterOnLiveboard = "spotterOnLiveboard",
|
|
9909
10248
|
/**
|
|
9910
|
-
*
|
|
9911
|
-
* in
|
|
10249
|
+
* Controls the visibility and disabled state of the "Chart Type" menu item
|
|
10250
|
+
* in Chart Settings V2.
|
|
10251
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10252
|
+
* @example
|
|
10253
|
+
* ```js
|
|
10254
|
+
* {
|
|
10255
|
+
* hiddenActions: [Action.ChartTypeSettings],
|
|
10256
|
+
* disabledActions: [Action.ChartTypeSettings],
|
|
10257
|
+
* }
|
|
10258
|
+
* ```
|
|
9912
10259
|
*/
|
|
9913
|
-
|
|
10260
|
+
ChartTypeSettings = "CHART_TYPE",
|
|
9914
10261
|
/**
|
|
9915
|
-
*
|
|
9916
|
-
*
|
|
10262
|
+
* Controls the visibility and disabled state of the "Layout" menu item
|
|
10263
|
+
* in Chart Settings V2.
|
|
10264
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10265
|
+
* @example
|
|
10266
|
+
* ```js
|
|
10267
|
+
* {
|
|
10268
|
+
* hiddenActions: [Action.LayoutSettings],
|
|
10269
|
+
* disabledActions: [Action.LayoutSettings],
|
|
10270
|
+
* }
|
|
10271
|
+
* ```
|
|
9917
10272
|
*/
|
|
9918
|
-
|
|
10273
|
+
LayoutSettings = "LAYOUT",
|
|
9919
10274
|
/**
|
|
9920
|
-
*
|
|
9921
|
-
*
|
|
9922
|
-
*
|
|
9923
|
-
*
|
|
9924
|
-
*
|
|
10275
|
+
* Controls the visibility and disabled state of the "Column" menu item
|
|
10276
|
+
* in Chart Settings V2.
|
|
10277
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10278
|
+
* @example
|
|
10279
|
+
* ```js
|
|
10280
|
+
* {
|
|
10281
|
+
* hiddenActions: [Action.ColumnSettings],
|
|
10282
|
+
* disabledActions: [Action.ColumnSettings],
|
|
10283
|
+
* }
|
|
10284
|
+
* ```
|
|
9925
10285
|
*/
|
|
9926
|
-
|
|
9927
|
-
}
|
|
9928
|
-
declare enum CustomActionTarget {
|
|
10286
|
+
ColumnSettings = "COLUMN",
|
|
9929
10287
|
/**
|
|
9930
|
-
*
|
|
9931
|
-
*
|
|
9932
|
-
*
|
|
9933
|
-
*
|
|
9934
|
-
*
|
|
9935
|
-
*
|
|
9936
|
-
*
|
|
10288
|
+
* Controls the visibility and disabled state of the "Axis" menu item
|
|
10289
|
+
* in Chart Settings V2.
|
|
10290
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10291
|
+
* @example
|
|
10292
|
+
* ```js
|
|
10293
|
+
* {
|
|
10294
|
+
* hiddenActions: [Action.AxisSettings],
|
|
10295
|
+
* disabledActions: [Action.AxisSettings],
|
|
10296
|
+
* }
|
|
10297
|
+
* ```
|
|
9937
10298
|
*/
|
|
9938
|
-
|
|
10299
|
+
AxisSettings = "AXIS",
|
|
9939
10300
|
/**
|
|
9940
|
-
*
|
|
9941
|
-
*
|
|
9942
|
-
*
|
|
9943
|
-
*
|
|
9944
|
-
*
|
|
9945
|
-
* {
|
|
9946
|
-
*
|
|
9947
|
-
*
|
|
10301
|
+
* Controls the visibility and disabled state of the "Data Label" menu item
|
|
10302
|
+
* in Chart Settings V2.
|
|
10303
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10304
|
+
* @example
|
|
10305
|
+
* ```js
|
|
10306
|
+
* {
|
|
10307
|
+
* hiddenActions: [Action.DataLabelSettings],
|
|
10308
|
+
* disabledActions: [Action.DataLabelSettings],
|
|
10309
|
+
* }
|
|
10310
|
+
* ```
|
|
10311
|
+
*/
|
|
10312
|
+
DataLabelSettings = "DATA_LABEL",
|
|
10313
|
+
/**
|
|
10314
|
+
* Controls the visibility and disabled state of the "Tooltip" menu item
|
|
10315
|
+
* in Chart Settings V2.
|
|
10316
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10317
|
+
* @example
|
|
10318
|
+
* ```js
|
|
10319
|
+
* {
|
|
10320
|
+
* hiddenActions: [Action.TooltipSettings],
|
|
10321
|
+
* disabledActions: [Action.TooltipSettings],
|
|
10322
|
+
* }
|
|
10323
|
+
* ```
|
|
10324
|
+
*/
|
|
10325
|
+
TooltipSettings = "TOOLTIP",
|
|
10326
|
+
/**
|
|
10327
|
+
* Controls the visibility and disabled state of the "Legend" menu item
|
|
10328
|
+
* in Chart Settings V2.
|
|
10329
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10330
|
+
* @example
|
|
10331
|
+
* ```js
|
|
10332
|
+
* {
|
|
10333
|
+
* hiddenActions: [Action.LegendSettings],
|
|
10334
|
+
* disabledActions: [Action.LegendSettings],
|
|
10335
|
+
* }
|
|
10336
|
+
* ```
|
|
10337
|
+
*/
|
|
10338
|
+
LegendSettings = "LEGEND",
|
|
10339
|
+
/**
|
|
10340
|
+
* Controls the visibility and disabled state of the "Display" menu item
|
|
10341
|
+
* in Chart Settings V2.
|
|
10342
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10343
|
+
* @example
|
|
10344
|
+
* ```js
|
|
10345
|
+
* {
|
|
10346
|
+
* hiddenActions: [Action.DisplaySettings],
|
|
10347
|
+
* disabledActions: [Action.DisplaySettings],
|
|
10348
|
+
* }
|
|
10349
|
+
* ```
|
|
10350
|
+
*/
|
|
10351
|
+
DisplaySettings = "DISPLAY",
|
|
10352
|
+
/**
|
|
10353
|
+
* Controls the visibility and disabled state of the "Query Details" menu
|
|
10354
|
+
* item in Chart Settings V2.
|
|
10355
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10356
|
+
* @example
|
|
10357
|
+
* ```js
|
|
10358
|
+
* {
|
|
10359
|
+
* hiddenActions: [Action.QuerySettings],
|
|
10360
|
+
* disabledActions: [Action.QuerySettings],
|
|
10361
|
+
* }
|
|
10362
|
+
* ```
|
|
10363
|
+
*/
|
|
10364
|
+
QuerySettings = "QUERY_DETAILS",
|
|
10365
|
+
/**
|
|
10366
|
+
* Controls the visibility and disabled state of the "Custom Action" menu
|
|
10367
|
+
* item in Chart Settings V2.
|
|
10368
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10369
|
+
* @example
|
|
10370
|
+
* ```js
|
|
10371
|
+
* {
|
|
10372
|
+
* hiddenActions: [Action.CustomSettings],
|
|
10373
|
+
* disabledActions: [Action.CustomSettings],
|
|
10374
|
+
* }
|
|
10375
|
+
* ```
|
|
10376
|
+
*/
|
|
10377
|
+
CustomSettings = "CUSTOM_ACTION",
|
|
10378
|
+
/**
|
|
10379
|
+
* Controls the visibility and disabled state of the "Muze AI" menu item
|
|
10380
|
+
* in Chart Settings V2.
|
|
10381
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10382
|
+
* @example
|
|
10383
|
+
* ```js
|
|
10384
|
+
* {
|
|
10385
|
+
* hiddenActions: [Action.MuzeAiSettings],
|
|
10386
|
+
* disabledActions: [Action.MuzeAiSettings],
|
|
10387
|
+
* }
|
|
10388
|
+
* ```
|
|
10389
|
+
*/
|
|
10390
|
+
MuzeAiSettings = "MUZE_AI",
|
|
10391
|
+
/**
|
|
10392
|
+
* Controls the visibility and disabled state of the "R Analysis" menu item
|
|
10393
|
+
* in Chart Settings V2.
|
|
10394
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10395
|
+
* @example
|
|
10396
|
+
* ```js
|
|
10397
|
+
* {
|
|
10398
|
+
* hiddenActions: [Action.RAnalysisSettings],
|
|
10399
|
+
* disabledActions: [Action.RAnalysisSettings],
|
|
10400
|
+
* }
|
|
10401
|
+
* ```
|
|
10402
|
+
*/
|
|
10403
|
+
RAnalysisSettings = "R_ANALYSIS",
|
|
10404
|
+
/**
|
|
10405
|
+
* Controls the visibility and disabled state of the "Add to Collection" menu item.
|
|
10406
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10407
|
+
* @example
|
|
10408
|
+
* ```js
|
|
10409
|
+
* {
|
|
10410
|
+
* hiddenActions: [Action.AddToCollection],
|
|
10411
|
+
* disabledActions: [Action.AddToCollection],
|
|
10412
|
+
* }
|
|
10413
|
+
* ```
|
|
10414
|
+
*/
|
|
10415
|
+
AddToCollection = "addToCollection",
|
|
10416
|
+
/**
|
|
10417
|
+
* Controls the visibility and disabled state of the "Create Collection" button.
|
|
10418
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10419
|
+
* @example
|
|
10420
|
+
* ```js
|
|
10421
|
+
* {
|
|
10422
|
+
* hiddenActions: [Action.CreateCollection],
|
|
10423
|
+
* disabledActions: [Action.CreateCollection],
|
|
10424
|
+
* }
|
|
10425
|
+
* ```
|
|
10426
|
+
*/
|
|
10427
|
+
CreateCollection = "createCollection",
|
|
10428
|
+
/**
|
|
10429
|
+
* Controls the visibility and disabled state of the "Move" menu item in a
|
|
10430
|
+
* Collection.
|
|
10431
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10432
|
+
* @example
|
|
10433
|
+
* ```js
|
|
10434
|
+
* {
|
|
10435
|
+
* hiddenActions: [Action.MoveToCollection],
|
|
10436
|
+
* disabledActions: [Action.MoveToCollection],
|
|
10437
|
+
* }
|
|
10438
|
+
* ```
|
|
10439
|
+
*/
|
|
10440
|
+
MoveToCollection = "moveToCollection",
|
|
10441
|
+
/**
|
|
10442
|
+
* Controls the visibility and disabled state of the "Remove" menu item in a
|
|
10443
|
+
* Collection.
|
|
10444
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10445
|
+
* @example
|
|
10446
|
+
* ```js
|
|
10447
|
+
* {
|
|
10448
|
+
* hiddenActions: [Action.RemoveFromCollection],
|
|
10449
|
+
* disabledActions: [Action.RemoveFromCollection],
|
|
10450
|
+
* }
|
|
10451
|
+
* ```
|
|
10452
|
+
*/
|
|
10453
|
+
RemoveFromCollection = "removeFromCollection",
|
|
10454
|
+
/**
|
|
10455
|
+
* Controls the visibility and disabled state of the "Delete" menu item for a
|
|
10456
|
+
* Collection.
|
|
10457
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10458
|
+
* @example
|
|
10459
|
+
* ```js
|
|
10460
|
+
* {
|
|
10461
|
+
* hiddenActions: [Action.DeleteCollection],
|
|
10462
|
+
* disabledActions: [Action.DeleteCollection],
|
|
10463
|
+
* }
|
|
10464
|
+
* ```
|
|
10465
|
+
*/
|
|
10466
|
+
DeleteCollection = "deleteCollection"
|
|
10467
|
+
}
|
|
10468
|
+
declare enum ContextMenuTriggerOptions {
|
|
10469
|
+
LEFT_CLICK = "left-click",
|
|
10470
|
+
RIGHT_CLICK = "right-click",
|
|
10471
|
+
BOTH_CLICKS = "both-clicks"
|
|
10472
|
+
}
|
|
10473
|
+
export interface ColumnValue {
|
|
10474
|
+
column: {
|
|
10475
|
+
id: string;
|
|
10476
|
+
name: string;
|
|
10477
|
+
dataType: string;
|
|
10478
|
+
[key: string]: any;
|
|
10479
|
+
};
|
|
10480
|
+
value: string | number | boolean | {
|
|
10481
|
+
v: {
|
|
10482
|
+
s: number;
|
|
10483
|
+
e: number;
|
|
10484
|
+
};
|
|
10485
|
+
};
|
|
10486
|
+
}
|
|
10487
|
+
export interface VizPoint {
|
|
10488
|
+
selectedAttributes: ColumnValue[];
|
|
10489
|
+
selectedMeasures: ColumnValue[];
|
|
10490
|
+
}
|
|
10491
|
+
/**
|
|
10492
|
+
* @group Events
|
|
10493
|
+
*/
|
|
10494
|
+
export interface CustomActionPayload {
|
|
10495
|
+
/**
|
|
10496
|
+
* Id of the custom action that was triggered. Matches the `id` you set on
|
|
10497
|
+
* the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
|
|
10498
|
+
*/
|
|
10499
|
+
id?: string;
|
|
10500
|
+
contextMenuPoints?: {
|
|
10501
|
+
clickedPoint: VizPoint;
|
|
10502
|
+
selectedPoints: VizPoint[];
|
|
10503
|
+
};
|
|
10504
|
+
embedAnswerData: {
|
|
10505
|
+
name: string;
|
|
10506
|
+
id: string;
|
|
10507
|
+
sources: {
|
|
10508
|
+
header: {
|
|
10509
|
+
guid: string;
|
|
10510
|
+
};
|
|
10511
|
+
};
|
|
10512
|
+
columns: any[];
|
|
10513
|
+
data: any[];
|
|
10514
|
+
[key: string]: any;
|
|
10515
|
+
};
|
|
10516
|
+
session: SessionInterface;
|
|
10517
|
+
vizId?: string;
|
|
10518
|
+
}
|
|
10519
|
+
/**
|
|
10520
|
+
* A code-based custom action to inject into the embedded ThoughtSpot UI.
|
|
10521
|
+
* Pass an array of these as `customActions` in the embed view config. When a
|
|
10522
|
+
* user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
|
|
10523
|
+
* a {@link CustomActionPayload} carrying the same `id`.
|
|
10524
|
+
*/
|
|
10525
|
+
export interface CustomAction {
|
|
10526
|
+
/**
|
|
10527
|
+
* Display label shown on the action's button or menu item.
|
|
10528
|
+
*/
|
|
10529
|
+
name: string;
|
|
10530
|
+
/**
|
|
10531
|
+
* Unique identifier for the action. Echoed back as `id` on the
|
|
10532
|
+
* {@link CustomActionPayload} when the action is invoked.
|
|
10533
|
+
*/
|
|
10534
|
+
id: string;
|
|
10535
|
+
/**
|
|
10536
|
+
* Where the action appears: a primary button, the "More" menu, or the
|
|
10537
|
+
* right-click context menu. See {@link CustomActionsPosition}.
|
|
10538
|
+
*/
|
|
10539
|
+
position: CustomActionsPosition;
|
|
10540
|
+
/**
|
|
10541
|
+
* The surface the action applies to (Liveboard, visualization, Answer, or
|
|
10542
|
+
* Spotter). See {@link CustomActionTarget}. The allowed `position` values
|
|
10543
|
+
* and scoping keys depend on the target.
|
|
10544
|
+
*/
|
|
10545
|
+
target: CustomActionTarget;
|
|
10546
|
+
/**
|
|
10547
|
+
* Scope the action to specific objects by GUID. Which keys are allowed
|
|
10548
|
+
* depends on `target` (for example, a `VIZ` action may use `answerIds`,
|
|
10549
|
+
* `liveboardIds`, and `vizIds`).
|
|
10550
|
+
*/
|
|
10551
|
+
metadataIds?: {
|
|
10552
|
+
answerIds?: string[];
|
|
10553
|
+
liveboardIds?: string[];
|
|
10554
|
+
vizIds?: string[];
|
|
10555
|
+
};
|
|
10556
|
+
/**
|
|
10557
|
+
* Scope the action by data model, using model GUIDs or column names.
|
|
10558
|
+
* Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
|
|
10559
|
+
*/
|
|
10560
|
+
dataModelIds?: {
|
|
10561
|
+
modelIds?: string[];
|
|
10562
|
+
modelColumnNames?: string[];
|
|
10563
|
+
};
|
|
10564
|
+
/**
|
|
10565
|
+
* Restrict the action to specific organizations by ID.
|
|
10566
|
+
*/
|
|
10567
|
+
orgIds?: string[];
|
|
10568
|
+
/**
|
|
10569
|
+
* Restrict the action to specific user groups by ID.
|
|
10570
|
+
*/
|
|
10571
|
+
groupIds?: string[];
|
|
10572
|
+
}
|
|
10573
|
+
/**
|
|
10574
|
+
* Enum options to show custom actions at different
|
|
10575
|
+
* positions in the application.
|
|
10576
|
+
*/
|
|
10577
|
+
export declare enum CustomActionsPosition {
|
|
10578
|
+
/**
|
|
10579
|
+
* Shows the action as a primary button
|
|
10580
|
+
* in the toolbar area of the embed.
|
|
10581
|
+
*/
|
|
10582
|
+
PRIMARY = "PRIMARY",
|
|
10583
|
+
/**
|
|
10584
|
+
* Shows the action inside the "More" menu
|
|
10585
|
+
* (three-dot overflow menu).
|
|
10586
|
+
*/
|
|
10587
|
+
MENU = "MENU",
|
|
10588
|
+
/**
|
|
10589
|
+
* Shows the action in the right-click
|
|
10590
|
+
* context menu. Only supported for
|
|
10591
|
+
* {@link CustomActionTarget.VIZ},
|
|
10592
|
+
* {@link CustomActionTarget.ANSWER}, and
|
|
10593
|
+
* {@link CustomActionTarget.SPOTTER} targets.
|
|
10594
|
+
*/
|
|
10595
|
+
CONTEXTMENU = "CONTEXTMENU"
|
|
10596
|
+
}
|
|
10597
|
+
declare enum CustomActionTarget {
|
|
10598
|
+
/**
|
|
10599
|
+
* Action applies at the Liveboard level.
|
|
10600
|
+
* Supported positions:
|
|
10601
|
+
* {@link CustomActionsPosition.PRIMARY},
|
|
10602
|
+
* {@link CustomActionsPosition.MENU}.
|
|
10603
|
+
* Can be scoped with
|
|
10604
|
+
* `metadataIds.liveboardIds`,
|
|
10605
|
+
* `orgIds`, and `groupIds`.
|
|
10606
|
+
*/
|
|
10607
|
+
LIVEBOARD = "LIVEBOARD",
|
|
10608
|
+
/**
|
|
10609
|
+
* Action applies to individual
|
|
10610
|
+
* visualizations (charts/tables).
|
|
10611
|
+
* Supported positions:
|
|
10612
|
+
* {@link CustomActionsPosition.PRIMARY},
|
|
10613
|
+
* {@link CustomActionsPosition.MENU},
|
|
10614
|
+
* {@link CustomActionsPosition.CONTEXTMENU}.
|
|
10615
|
+
* Can be scoped with `metadataIds`
|
|
10616
|
+
* (answerIds, liveboardIds, vizIds),
|
|
9948
10617
|
* `dataModelIds` (modelIds,
|
|
9949
10618
|
* modelColumnNames), `orgIds`,
|
|
9950
10619
|
* and `groupIds`.
|
|
@@ -10724,6 +11393,166 @@ export interface VisualizationOverrides {
|
|
|
10724
11393
|
/** Table visualization overrides */
|
|
10725
11394
|
table?: TableOverrides;
|
|
10726
11395
|
}
|
|
11396
|
+
/**
|
|
11397
|
+
* The configuration object for the full-height behavior shared by the
|
|
11398
|
+
* Liveboard and app embeds.
|
|
11399
|
+
*
|
|
11400
|
+
* When `fullHeight` is enabled the SDK resizes the embed container to match the
|
|
11401
|
+
* height reported by the ThoughtSpot app, and — when lazy loading is also
|
|
11402
|
+
* enabled — keeps the app informed of the portion of the embed that is
|
|
11403
|
+
* currently visible so that visualizations load on demand.
|
|
11404
|
+
*/
|
|
11405
|
+
export interface FullHeightViewConfig {
|
|
11406
|
+
/**
|
|
11407
|
+
* If set to true, the embedded object container dynamically resizes
|
|
11408
|
+
* according to the height of the Liveboard.
|
|
11409
|
+
*
|
|
11410
|
+
* **Note**: Using fullHeight loads all visualizations on the
|
|
11411
|
+
* Liveboard simultaneously, which results in multiple warehouse
|
|
11412
|
+
* queries and potentially a longer wait for the topmost
|
|
11413
|
+
* visualizations to display on the screen.
|
|
11414
|
+
* Setting `fullHeight` to `false` fetches visualizations
|
|
11415
|
+
* incrementally as users scroll the page to view the charts and tables.
|
|
11416
|
+
*
|
|
11417
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
11418
|
+
* {@link lazyLoadingForFullHeight} and
|
|
11419
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
11420
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
11421
|
+
*
|
|
11422
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11423
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
11424
|
+
* @example
|
|
11425
|
+
* ```js
|
|
11426
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11427
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11428
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11429
|
+
* ... // other view config
|
|
11430
|
+
* fullHeight: true,
|
|
11431
|
+
* });
|
|
11432
|
+
* ```
|
|
11433
|
+
*/
|
|
11434
|
+
fullHeight?: boolean;
|
|
11435
|
+
/**
|
|
11436
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
11437
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
11438
|
+
* other screens navigable from a Liveboard.
|
|
11439
|
+
*
|
|
11440
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11441
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
11442
|
+
* @default 500
|
|
11443
|
+
* @example
|
|
11444
|
+
* ```js
|
|
11445
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11446
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11447
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11448
|
+
* ... // other view config
|
|
11449
|
+
* fullHeight: true,
|
|
11450
|
+
* minimumHeight: 600,
|
|
11451
|
+
* });
|
|
11452
|
+
* ```
|
|
11453
|
+
*/
|
|
11454
|
+
minimumHeight?: number;
|
|
11455
|
+
/**
|
|
11456
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
11457
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
11458
|
+
* other screens navigable from a Liveboard.
|
|
11459
|
+
*
|
|
11460
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11461
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
11462
|
+
* @deprecated Use `minimumHeight` instead.
|
|
11463
|
+
* @default 500
|
|
11464
|
+
* @example
|
|
11465
|
+
* ```js
|
|
11466
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11467
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11468
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11469
|
+
* ... // other view config
|
|
11470
|
+
* fullHeight: true,
|
|
11471
|
+
* defaultHeight: 600,
|
|
11472
|
+
* });
|
|
11473
|
+
* ```
|
|
11474
|
+
*/
|
|
11475
|
+
defaultHeight?: number;
|
|
11476
|
+
/**
|
|
11477
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
11478
|
+
* loading the whole full-height Liveboard at once.
|
|
11479
|
+
*
|
|
11480
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
11481
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
11482
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
11483
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
11484
|
+
*
|
|
11485
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11486
|
+
* @type {boolean}
|
|
11487
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
11488
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
11489
|
+
* @example
|
|
11490
|
+
* ```js
|
|
11491
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11492
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11493
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
11494
|
+
* // ...other options
|
|
11495
|
+
* fullHeight: true,
|
|
11496
|
+
* lazyLoadingForFullHeight: true,
|
|
11497
|
+
* })
|
|
11498
|
+
* ```
|
|
11499
|
+
*/
|
|
11500
|
+
lazyLoadingForFullHeight?: boolean;
|
|
11501
|
+
/**
|
|
11502
|
+
* How far outside the viewport a visualization starts loading, when
|
|
11503
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
11504
|
+
*
|
|
11505
|
+
* For example, if the margin is set to '10px',
|
|
11506
|
+
* the visualization will be loaded 10px before its top edge is visible in the
|
|
11507
|
+
* viewport.
|
|
11508
|
+
*
|
|
11509
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
11510
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
11511
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
11512
|
+
* `auto`; an invalid value is logged and ignored.
|
|
11513
|
+
*
|
|
11514
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
11515
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
11516
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
11517
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
11518
|
+
* only once it is actually visible.
|
|
11519
|
+
*
|
|
11520
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11521
|
+
* @type {string}
|
|
11522
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
11523
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
11524
|
+
* @example
|
|
11525
|
+
* ```js
|
|
11526
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11527
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11528
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
11529
|
+
* // ...other options
|
|
11530
|
+
* fullHeight: true,
|
|
11531
|
+
* lazyLoadingForFullHeight: true,
|
|
11532
|
+
* // With 0px, the visualization only starts loading once it is
|
|
11533
|
+
* // visible in the viewport.
|
|
11534
|
+
* lazyLoadingMargin: '0px',
|
|
11535
|
+
* })
|
|
11536
|
+
* ```
|
|
11537
|
+
*/
|
|
11538
|
+
lazyLoadingMargin?: string;
|
|
11539
|
+
/**
|
|
11540
|
+
* Computes the visible region of the embed against its scrollable and
|
|
11541
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
11542
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
11543
|
+
*
|
|
11544
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
11545
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
11546
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
11547
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
11548
|
+
* tracking.
|
|
11549
|
+
*
|
|
11550
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11551
|
+
* @type {boolean}
|
|
11552
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
11553
|
+
*/
|
|
11554
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
11555
|
+
}
|
|
10727
11556
|
declare enum AuthFailureType {
|
|
10728
11557
|
/**
|
|
10729
11558
|
* Authentication failed in the SDK authentication flow.
|
|
@@ -10872,231 +11701,321 @@ declare enum AuthEvent {
|
|
|
10872
11701
|
*/
|
|
10873
11702
|
TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
|
|
10874
11703
|
}
|
|
10875
|
-
|
|
10876
|
-
|
|
10877
|
-
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
export interface
|
|
10881
|
-
|
|
10882
|
-
name: string;
|
|
10883
|
-
[key: string]: any;
|
|
11704
|
+
/**
|
|
11705
|
+
* Request for host events that MAY target a specific visualization.
|
|
11706
|
+
* Omitting vizId targets the current answer/liveboard as a whole.
|
|
11707
|
+
* (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
|
|
11708
|
+
*/
|
|
11709
|
+
export interface VizScopedRequest {
|
|
11710
|
+
vizId?: string;
|
|
10884
11711
|
}
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
|
|
10888
|
-
|
|
11712
|
+
/**
|
|
11713
|
+
* Request for host events that MUST target a specific visualization.
|
|
11714
|
+
*/
|
|
11715
|
+
export interface RequiredVizRequest {
|
|
11716
|
+
vizId: string;
|
|
10889
11717
|
}
|
|
10890
11718
|
/**
|
|
10891
|
-
*
|
|
10892
|
-
* At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
|
|
10893
|
-
* is not required.
|
|
11719
|
+
* Request for Spotter conversation-scoped host events.
|
|
10894
11720
|
*/
|
|
10895
|
-
export interface
|
|
10896
|
-
|
|
10897
|
-
targetId?: string;
|
|
11721
|
+
export interface ConversationScopedRequest {
|
|
11722
|
+
conversationId: string;
|
|
10898
11723
|
}
|
|
10899
|
-
|
|
10900
|
-
|
|
10901
|
-
|
|
10902
|
-
|
|
10903
|
-
|
|
11724
|
+
/**
|
|
11725
|
+
* Request payload for {@link HostEvent.OpenFilter}. Field requirements
|
|
11726
|
+
* vary by context (Search requires columnId/type/dataType/name); the
|
|
11727
|
+
* contract is the cross-context superset — the app validates per context
|
|
11728
|
+
* at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
|
|
11729
|
+
* {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
|
|
11730
|
+
*/
|
|
11731
|
+
export interface OpenFilterRequest {
|
|
11732
|
+
column: {
|
|
11733
|
+
columnId?: string;
|
|
11734
|
+
columnName?: string;
|
|
11735
|
+
type?: string;
|
|
11736
|
+
dataType?: string;
|
|
11737
|
+
name?: string;
|
|
11738
|
+
isStrictDateColumn?: boolean;
|
|
11739
|
+
};
|
|
10904
11740
|
applicability?: Applicability;
|
|
11741
|
+
visualizationId?: string;
|
|
11742
|
+
liveboardId?: string;
|
|
10905
11743
|
}
|
|
10906
|
-
|
|
11744
|
+
/**
|
|
11745
|
+
* Request payload for {@link HostEvent.OpenParameter}. One of parameterId
|
|
11746
|
+
* or parameterName must be provided (validated at runtime).
|
|
11747
|
+
*/
|
|
11748
|
+
export interface OpenParameterRequest {
|
|
11749
|
+
parameter: {
|
|
11750
|
+
parameterId?: string;
|
|
11751
|
+
parameterName?: string;
|
|
11752
|
+
};
|
|
10907
11753
|
applicability?: Applicability;
|
|
10908
|
-
[key: string]: any;
|
|
10909
11754
|
}
|
|
10910
|
-
|
|
11755
|
+
/**
|
|
11756
|
+
* Request payload for {@link HostEvent.Search}.
|
|
11757
|
+
*/
|
|
11758
|
+
export interface SearchRequest {
|
|
11759
|
+
searchQuery: string;
|
|
11760
|
+
dataSources: string[];
|
|
11761
|
+
execute?: boolean;
|
|
11762
|
+
}
|
|
11763
|
+
/**
|
|
11764
|
+
* Request payload for {@link HostEvent.SpotterSearch}.
|
|
11765
|
+
*/
|
|
11766
|
+
export interface SpotterSearchRequest {
|
|
11767
|
+
query: string;
|
|
11768
|
+
executeSearch: boolean;
|
|
11769
|
+
}
|
|
11770
|
+
/**
|
|
11771
|
+
* A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
|
|
11772
|
+
*/
|
|
11773
|
+
export interface CrossFilterCondition {
|
|
11774
|
+
columnName?: string;
|
|
11775
|
+
operator?: string;
|
|
11776
|
+
values: Array<string | number | boolean>;
|
|
11777
|
+
}
|
|
11778
|
+
/**
|
|
11779
|
+
* Request payload for {@link HostEvent.UpdateCrossFilter}.
|
|
11780
|
+
*/
|
|
11781
|
+
export interface UpdateCrossFilterRequest {
|
|
11782
|
+
vizId: string;
|
|
11783
|
+
conditions: CrossFilterCondition[];
|
|
11784
|
+
}
|
|
11785
|
+
/**
|
|
11786
|
+
* A single filter entry for {@link HostEvent.UpdateFilters}. Supports both
|
|
11787
|
+
* the current (columnName/operator) and legacy (column/oper) field names.
|
|
11788
|
+
*/
|
|
11789
|
+
export interface HostFilterUpdate {
|
|
11790
|
+
columnName?: string;
|
|
11791
|
+
columnId?: string;
|
|
11792
|
+
operator?: string;
|
|
11793
|
+
values: Array<string | number | boolean>;
|
|
11794
|
+
type?: string;
|
|
11795
|
+
datePeriod?: string;
|
|
11796
|
+
negate?: boolean;
|
|
11797
|
+
/** Legacy field name for columnName. */
|
|
11798
|
+
column?: string;
|
|
11799
|
+
/** Legacy field name for operator. */
|
|
11800
|
+
oper?: string;
|
|
10911
11801
|
applicability?: Applicability;
|
|
10912
|
-
[key: string]: any;
|
|
10913
11802
|
}
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10931
|
-
GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
|
|
11803
|
+
/**
|
|
11804
|
+
* Request payload for {@link HostEvent.UpdateFilters} (singular or plural
|
|
11805
|
+
* form).
|
|
11806
|
+
*/
|
|
11807
|
+
export interface UpdateFiltersRequest {
|
|
11808
|
+
filter?: HostFilterUpdate;
|
|
11809
|
+
filters?: HostFilterUpdate[];
|
|
11810
|
+
/**
|
|
11811
|
+
* Scope the update to a specific visualization on a Liveboard.
|
|
11812
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11813
|
+
*/
|
|
11814
|
+
visualizationId?: string;
|
|
11815
|
+
/**
|
|
11816
|
+
* Scope the update to a specific Liveboard.
|
|
11817
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11818
|
+
*/
|
|
11819
|
+
liveboardId?: string;
|
|
10932
11820
|
}
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
|
|
10938
|
-
|
|
10939
|
-
|
|
10940
|
-
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
10946
|
-
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
|
|
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
|
-
[UIPassthroughEvent.GetFilters]: {
|
|
11005
|
-
request: {
|
|
11006
|
-
vizId?: string;
|
|
11007
|
-
};
|
|
11008
|
-
response: {
|
|
11009
|
-
liveboardFilters: LiveboardFilter[];
|
|
11010
|
-
runtimeFilters: RuntimeFilter[];
|
|
11011
|
-
};
|
|
11012
|
-
};
|
|
11013
|
-
[UIPassthroughEvent.GetIframeUrl]: {
|
|
11014
|
-
request: Record<string, never>;
|
|
11015
|
-
response: {
|
|
11016
|
-
iframeUrl: string;
|
|
11017
|
-
};
|
|
11018
|
-
};
|
|
11019
|
-
[UIPassthroughEvent.GetParameters]: {
|
|
11020
|
-
request: Record<string, never>;
|
|
11021
|
-
response: {
|
|
11022
|
-
parameters: LiveboardParameter[];
|
|
11023
|
-
};
|
|
11024
|
-
};
|
|
11025
|
-
[UIPassthroughEvent.GetTML]: {
|
|
11026
|
-
request: {
|
|
11027
|
-
vizId?: string;
|
|
11028
|
-
includeNonExecutedSearchTokens?: boolean;
|
|
11029
|
-
};
|
|
11030
|
-
response: Record<string, any>;
|
|
11031
|
-
};
|
|
11032
|
-
[UIPassthroughEvent.GetTabs]: {
|
|
11033
|
-
request: Record<string, never>;
|
|
11034
|
-
response: {
|
|
11035
|
-
orderedTabIds: string[];
|
|
11036
|
-
numberOfTabs: number;
|
|
11037
|
-
Tabs: LiveboardTab[];
|
|
11038
|
-
};
|
|
11821
|
+
/**
|
|
11822
|
+
* Request payload for personalised-view host events.
|
|
11823
|
+
*/
|
|
11824
|
+
export interface PersonalisedViewRequest {
|
|
11825
|
+
viewId?: string;
|
|
11826
|
+
viewName?: string;
|
|
11827
|
+
}
|
|
11828
|
+
/**
|
|
11829
|
+
* Request payload for schedule-email related host events.
|
|
11830
|
+
*/
|
|
11831
|
+
export interface ScheduleEmailRequest {
|
|
11832
|
+
sendToSelf?: boolean;
|
|
11833
|
+
}
|
|
11834
|
+
/**
|
|
11835
|
+
* Object form of the {@link HostEvent.Navigate} payload.
|
|
11836
|
+
*/
|
|
11837
|
+
export interface NavigateRequest {
|
|
11838
|
+
/**
|
|
11839
|
+
* Route to navigate to, or a history delta such as `1` or `-1`.
|
|
11840
|
+
*/
|
|
11841
|
+
path: string | number;
|
|
11842
|
+
/**
|
|
11843
|
+
* When `true`, replaces the current history entry instead of pushing.
|
|
11844
|
+
*/
|
|
11845
|
+
replace?: boolean;
|
|
11846
|
+
}
|
|
11847
|
+
/**
|
|
11848
|
+
* Request payload for {@link HostEvent.SetActiveTab}.
|
|
11849
|
+
*/
|
|
11850
|
+
export interface SetActiveTabRequest {
|
|
11851
|
+
/**
|
|
11852
|
+
* Id of the liveboard tab to make active.
|
|
11853
|
+
*/
|
|
11854
|
+
tabId: string;
|
|
11855
|
+
}
|
|
11856
|
+
/**
|
|
11857
|
+
* Typed request payloads for host events that do not go through the UI
|
|
11858
|
+
* passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
|
|
11859
|
+
*
|
|
11860
|
+
* Shapes are transcribed from the host's runtime validation schemas
|
|
11861
|
+
* (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
|
|
11862
|
+
* flattened across contexts to the permissive superset (context-specific
|
|
11863
|
+
* requirements are validated at runtime).
|
|
11864
|
+
*
|
|
11865
|
+
* Responses are typed only for UI-passthrough-backed events today (see
|
|
11866
|
+
* {@link HostEventResponse}). Add a response map alongside this one when the
|
|
11867
|
+
* first explicit response shape is specified; tightening later is additive.
|
|
11868
|
+
*
|
|
11869
|
+
* Deliberately absent (do not add without an audit):
|
|
11870
|
+
* - DrillDown: the runtime schema (object-shaped points) and the UI
|
|
11871
|
+
* passthrough contract (string-shaped points) disagree — resolve the
|
|
11872
|
+
* drift first.
|
|
11873
|
+
* - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
|
|
11874
|
+
* mapping; their Spotter-context vizId requirement is runtime-only.
|
|
11875
|
+
*/
|
|
11876
|
+
export interface HostEventRequestMap {
|
|
11877
|
+
[HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
|
|
11878
|
+
[HostEvent.UpdateParameters]: RuntimeParameter[];
|
|
11879
|
+
[HostEvent.UpdateFilters]: UpdateFiltersRequest;
|
|
11880
|
+
[HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
|
|
11881
|
+
[HostEvent.OpenFilter]: OpenFilterRequest;
|
|
11882
|
+
[HostEvent.OpenParameter]: OpenParameterRequest;
|
|
11883
|
+
[HostEvent.SetVisibleVizs]: string[];
|
|
11884
|
+
[HostEvent.SetVisibleTabs]: string[];
|
|
11885
|
+
[HostEvent.SetHiddenTabs]: string[];
|
|
11886
|
+
[HostEvent.SetActiveTab]: SetActiveTabRequest;
|
|
11887
|
+
[HostEvent.Navigate]: string | number | NavigateRequest;
|
|
11888
|
+
[HostEvent.Search]: SearchRequest;
|
|
11889
|
+
[HostEvent.ResetSearch]: void;
|
|
11890
|
+
[HostEvent.AddColumns]: {
|
|
11891
|
+
columnIds: string[];
|
|
11039
11892
|
};
|
|
11040
|
-
[
|
|
11041
|
-
|
|
11042
|
-
response: {
|
|
11043
|
-
orderedGroupIds: string[];
|
|
11044
|
-
numberOfGroups: number;
|
|
11045
|
-
Groups: LiveboardGroup[];
|
|
11046
|
-
};
|
|
11893
|
+
[HostEvent.RemoveColumn]: {
|
|
11894
|
+
columnId: string;
|
|
11047
11895
|
};
|
|
11048
|
-
[
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11053
|
-
|
|
11054
|
-
|
|
11055
|
-
|
|
11896
|
+
[HostEvent.Edit]: VizScopedRequest;
|
|
11897
|
+
[HostEvent.Save]: VizScopedRequest;
|
|
11898
|
+
[HostEvent.Delete]: VizScopedRequest;
|
|
11899
|
+
[HostEvent.Share]: VizScopedRequest;
|
|
11900
|
+
[HostEvent.Present]: VizScopedRequest;
|
|
11901
|
+
[HostEvent.CopyLink]: VizScopedRequest;
|
|
11902
|
+
[HostEvent.ExportTML]: VizScopedRequest;
|
|
11903
|
+
[HostEvent.EditTML]: VizScopedRequest;
|
|
11904
|
+
[HostEvent.UpdateTML]: VizScopedRequest;
|
|
11905
|
+
[HostEvent.SchedulesList]: VizScopedRequest;
|
|
11906
|
+
[HostEvent.Schedule]: VizScopedRequest;
|
|
11907
|
+
[HostEvent.SpotIQAnalyze]: VizScopedRequest;
|
|
11908
|
+
[HostEvent.ShowUnderlyingData]: VizScopedRequest;
|
|
11909
|
+
[HostEvent.CreateMonitor]: VizScopedRequest;
|
|
11910
|
+
[HostEvent.ManageMonitor]: VizScopedRequest;
|
|
11911
|
+
[HostEvent.SyncToSheets]: VizScopedRequest;
|
|
11912
|
+
[HostEvent.SyncToOtherApps]: VizScopedRequest;
|
|
11913
|
+
[HostEvent.ManagePipelines]: VizScopedRequest;
|
|
11914
|
+
[HostEvent.DownloadAsPng]: VizScopedRequest;
|
|
11915
|
+
[HostEvent.DownloadAsCsv]: VizScopedRequest;
|
|
11916
|
+
[HostEvent.DownloadAsXlsx]: VizScopedRequest;
|
|
11917
|
+
[HostEvent.DownloadAsPdf]: VizScopedRequest & {
|
|
11918
|
+
liveboardId?: string;
|
|
11056
11919
|
};
|
|
11057
|
-
[
|
|
11058
|
-
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11920
|
+
[HostEvent.Explore]: RequiredVizRequest;
|
|
11921
|
+
[HostEvent.AskSage]: RequiredVizRequest;
|
|
11922
|
+
[HostEvent.AskSpotter]: RequiredVizRequest;
|
|
11923
|
+
[HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
|
|
11924
|
+
[HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
|
|
11925
|
+
[HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
|
|
11926
|
+
[HostEvent.ResetLiveboardPersonalisedView]: void;
|
|
11927
|
+
[HostEvent.AIHighlights]: void;
|
|
11928
|
+
[HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
|
|
11929
|
+
[HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
|
|
11930
|
+
[HostEvent.SpotterSearch]: SpotterSearchRequest;
|
|
11931
|
+
[HostEvent.ResetSpotterConversation]: void;
|
|
11932
|
+
[HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
|
|
11933
|
+
[HostEvent.CloseSpotterShareConversation]: void;
|
|
11934
|
+
[HostEvent.ExitSpotterSharedConversation]: void;
|
|
11935
|
+
[HostEvent.PinSpotterConversation]: ConversationScopedRequest;
|
|
11936
|
+
[HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
|
|
11937
|
+
[HostEvent.EditLastPrompt]: string;
|
|
11938
|
+
[HostEvent.DeleteLastPrompt]: void;
|
|
11939
|
+
[HostEvent.PreviewSpotterData]: void;
|
|
11940
|
+
[HostEvent.SpotterVizSendUserMessage]: {
|
|
11941
|
+
query: string;
|
|
11063
11942
|
};
|
|
11064
|
-
[
|
|
11065
|
-
|
|
11066
|
-
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11943
|
+
[HostEvent.InitSpotterVizConversation]: void;
|
|
11944
|
+
[HostEvent.OpenSpotterVizPanel]: void;
|
|
11945
|
+
[HostEvent.CloseSpotterVizPanel]: void;
|
|
11946
|
+
}
|
|
11947
|
+
/**
|
|
11948
|
+
* Per-context request shapes for events whose payload varies by
|
|
11949
|
+
/**
|
|
11950
|
+
* Resolves the typed request payload for a host event.
|
|
11951
|
+
* Resolution order:
|
|
11952
|
+
* 1. Explicitly typed request in {@link HostEventRequestMap}
|
|
11953
|
+
* 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
|
|
11954
|
+
* 3. `any` (event not audited/typed yet — backward compatible)
|
|
11955
|
+
*
|
|
11956
|
+
* Requests are the cross-context superset today. The per-context `*Request`
|
|
11957
|
+
* interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
|
|
11958
|
+
* narrows by context; a later release may thread the caller's context to
|
|
11959
|
+
* enforce it.
|
|
11960
|
+
*/
|
|
11961
|
+
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
11962
|
+
/**
|
|
11963
|
+
* Resolves the typed response payload for a host event. Only UI passthrough
|
|
11964
|
+
* backed events have typed responses today; everything else resolves to `any`.
|
|
11965
|
+
*/
|
|
11966
|
+
export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
11967
|
+
/**
|
|
11968
|
+
* Payload type accepted by `embed.trigger()`. Keeps the historical
|
|
11969
|
+
* `PayloadT` escape hatch so untyped existing call sites keep compiling.
|
|
11970
|
+
*/
|
|
11971
|
+
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
11972
|
+
/**
|
|
11973
|
+
* Deep `Partial` of a request type: every field optional at every depth, with no
|
|
11974
|
+
* index signature — so object literals carrying unknown fields are flagged.
|
|
11975
|
+
*/
|
|
11976
|
+
export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
11977
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
11978
|
+
} : T;
|
|
11979
|
+
/**
|
|
11980
|
+
* `trigger()`'s `data` type: an all-optional view of the event's request type.
|
|
11981
|
+
* See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
|
|
11982
|
+
* No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
|
|
11983
|
+
*/
|
|
11984
|
+
export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
|
|
11985
|
+
/**
|
|
11986
|
+
* Response type returned by `embed.trigger()`.
|
|
11987
|
+
*/
|
|
11988
|
+
export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
|
|
11989
|
+
/**
|
|
11990
|
+
* Typed `data` field per embed event. Seed with audited events only.
|
|
11991
|
+
*/
|
|
11992
|
+
export interface EmbedEventDataExtension {
|
|
11993
|
+
[EmbedEvent.AuthInit]: {
|
|
11994
|
+
/**
|
|
11995
|
+
* Whether authentication was successful.
|
|
11996
|
+
*/
|
|
11997
|
+
isLoggedIn?: boolean;
|
|
11998
|
+
[key: string]: any;
|
|
11075
11999
|
};
|
|
12000
|
+
[EmbedEvent.EmbedListenerReady]: Record<string, any>;
|
|
12001
|
+
/**
|
|
12002
|
+
* Fired when a callback-type custom action is triggered. Use
|
|
12003
|
+
* `payload.data.id` to identify which action fired.
|
|
12004
|
+
*/
|
|
12005
|
+
[EmbedEvent.CustomAction]: CustomActionPayload;
|
|
12006
|
+
}
|
|
12007
|
+
/**
|
|
12008
|
+
* Resolves the typed `data` payload for an embed event; `any` when the
|
|
12009
|
+
* event has not been audited/typed yet.
|
|
12010
|
+
*/
|
|
12011
|
+
export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
|
|
12012
|
+
/**
|
|
12013
|
+
* Full envelope delivered to `embed.on()` callbacks for a given event:
|
|
12014
|
+
* the wire fields (`type`, `status`) plus the typed `data`.
|
|
12015
|
+
*/
|
|
12016
|
+
export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
|
|
12017
|
+
data: EmbedEventData<EmbedEventT>;
|
|
11076
12018
|
};
|
|
11077
|
-
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
11078
|
-
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
11079
|
-
export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
|
|
11080
|
-
refId?: string;
|
|
11081
|
-
value?: UIPassthroughResponse<ApiName>;
|
|
11082
|
-
error?: any;
|
|
11083
|
-
}>;
|
|
11084
|
-
export type EmbedApiHostEventMapping = {
|
|
11085
|
-
[HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
|
|
11086
|
-
[HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
|
|
11087
|
-
[HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
|
|
11088
|
-
[HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
|
|
11089
|
-
[HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
|
|
11090
|
-
[HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
|
|
11091
|
-
[HostEvent.GetTML]: UIPassthroughEvent.GetTML;
|
|
11092
|
-
[HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
|
|
11093
|
-
[HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
|
|
11094
|
-
[HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
|
|
11095
|
-
};
|
|
11096
|
-
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
11097
|
-
export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
11098
|
-
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
11099
|
-
export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
|
|
11100
12019
|
declare class HostEventClient {
|
|
11101
12020
|
iFrame: HTMLIFrameElement;
|
|
11102
12021
|
/** Cached list of available UI passthrough keys from the embedded app */
|
|
@@ -11146,7 +12065,7 @@ declare class HostEventClient {
|
|
|
11146
12065
|
* @param payload - Optional payload for the event
|
|
11147
12066
|
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
11148
12067
|
*/
|
|
11149
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT,
|
|
12068
|
+
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11150
12069
|
}
|
|
11151
12070
|
declare class TsEmbed {
|
|
11152
12071
|
/**
|
|
@@ -11164,6 +12083,7 @@ declare class TsEmbed {
|
|
|
11164
12083
|
* The key to store the embed instance in the DOM node
|
|
11165
12084
|
*/
|
|
11166
12085
|
protected embedNodeKey: string;
|
|
12086
|
+
protected embedContainerLoadedKey: string;
|
|
11167
12087
|
protected isAppInitialized: boolean;
|
|
11168
12088
|
/**
|
|
11169
12089
|
* A reference to the iframe within which the ThoughtSpot app
|
|
@@ -11333,10 +12253,10 @@ declare class TsEmbed {
|
|
|
11333
12253
|
*/
|
|
11334
12254
|
protected getEmbedBasePath(query: string): string;
|
|
11335
12255
|
protected getUpdateEmbedParamsObject(): Promise<{
|
|
11336
|
-
customisations: CustomisationsInterface;
|
|
11337
|
-
authToken: string;
|
|
11338
12256
|
runtimeFilterParams: string;
|
|
11339
12257
|
runtimeParameterParams: string;
|
|
12258
|
+
customisations: CustomisationsInterface;
|
|
12259
|
+
authToken: string;
|
|
11340
12260
|
hiddenHomepageModules: HomepageModule[];
|
|
11341
12261
|
reorderedHomepageModules: string[];
|
|
11342
12262
|
hostConfig: Record<string, any>;
|
|
@@ -11529,21 +12449,6 @@ declare class TsEmbed {
|
|
|
11529
12449
|
* or else the v2 event type itself
|
|
11530
12450
|
*/
|
|
11531
12451
|
protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
|
|
11532
|
-
/**
|
|
11533
|
-
* Calculates the iframe center for the current visible viewPort
|
|
11534
|
-
* of iframe using Scroll position of Host App, offsetTop for iframe
|
|
11535
|
-
* in Host app. ViewPort height of the tab.
|
|
11536
|
-
* @returns iframe Center in visible viewport,
|
|
11537
|
-
* Iframe height,
|
|
11538
|
-
* View port height.
|
|
11539
|
-
*/
|
|
11540
|
-
protected getIframeCenter(): {
|
|
11541
|
-
iframeCenter: number;
|
|
11542
|
-
iframeScrolled: number;
|
|
11543
|
-
iframeHeight: number;
|
|
11544
|
-
viewPortHeight: number;
|
|
11545
|
-
iframeVisibleViewPort: number;
|
|
11546
|
-
};
|
|
11547
12452
|
/**
|
|
11548
12453
|
* Registers an event listener to trigger an alert when the ThoughtSpot app
|
|
11549
12454
|
* sends an event of a particular message type to the host application.
|
|
@@ -11567,7 +12472,7 @@ declare class TsEmbed {
|
|
|
11567
12472
|
* });
|
|
11568
12473
|
* ```
|
|
11569
12474
|
*/
|
|
11570
|
-
on(messageType:
|
|
12475
|
+
on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
|
|
11571
12476
|
/**
|
|
11572
12477
|
* Removes an event listener for a particular event type.
|
|
11573
12478
|
* @param messageType The message type
|
|
@@ -11603,6 +12508,8 @@ declare class TsEmbed {
|
|
|
11603
12508
|
*/
|
|
11604
12509
|
private embedContainerReadyCallbacks;
|
|
11605
12510
|
protected getPreRenderObj<T extends TsEmbed>(): T;
|
|
12511
|
+
protected takeOverPreRender(): void;
|
|
12512
|
+
private markEmbedContainerLoaded;
|
|
11606
12513
|
private checkEmbedContainerLoaded;
|
|
11607
12514
|
private executeEmbedContainerReadyCallbacks;
|
|
11608
12515
|
/**
|
|
@@ -11613,8 +12520,12 @@ declare class TsEmbed {
|
|
|
11613
12520
|
protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
|
|
11614
12521
|
/**
|
|
11615
12522
|
* Triggers an event to the embedded app
|
|
12523
|
+
*
|
|
12524
|
+
* Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
|
|
12525
|
+
* on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
|
|
12526
|
+
* payload is checked strictly against the event contract — update call sites now.
|
|
11616
12527
|
* @param {HostEvent} messageType The event type
|
|
11617
|
-
* @param {
|
|
12528
|
+
* @param {TriggerData} data The payload, typed against the event's contract
|
|
11618
12529
|
* @param {ContextType} context Optional context type to specify the context from which the event is triggered.
|
|
11619
12530
|
* Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
|
|
11620
12531
|
* ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
|
|
@@ -11631,7 +12542,7 @@ declare class TsEmbed {
|
|
|
11631
12542
|
* ```
|
|
11632
12543
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
11633
12544
|
*/
|
|
11634
|
-
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?:
|
|
12545
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11635
12546
|
/**
|
|
11636
12547
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
11637
12548
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -11733,6 +12644,7 @@ declare class TsEmbed {
|
|
|
11733
12644
|
* @returns
|
|
11734
12645
|
*/
|
|
11735
12646
|
prerenderGeneric(): Promise<any>;
|
|
12647
|
+
protected preRenderParamsApplied: Promise<void>;
|
|
11736
12648
|
protected beforePrerenderVisible(): void;
|
|
11737
12649
|
/**
|
|
11738
12650
|
* Displays the pre-rendered component inside the host element.
|
|
@@ -11811,7 +12723,7 @@ declare class V1Embed extends TsEmbed {
|
|
|
11811
12723
|
* });
|
|
11812
12724
|
* ```
|
|
11813
12725
|
*/
|
|
11814
|
-
on(messageType:
|
|
12726
|
+
on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
11815
12727
|
/**
|
|
11816
12728
|
* Only for testing purposes.
|
|
11817
12729
|
* @hidden
|
|
@@ -11972,7 +12884,21 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
11972
12884
|
* })
|
|
11973
12885
|
* ```
|
|
11974
12886
|
*/
|
|
11975
|
-
dataSource?: string;
|
|
12887
|
+
dataSource?: string;
|
|
12888
|
+
/**
|
|
12889
|
+
* If set to `true`, the answer edit panel is hidden.
|
|
12890
|
+
*
|
|
12891
|
+
* Supported embed types: `SearchEmbed`
|
|
12892
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
12893
|
+
* @example
|
|
12894
|
+
* ```js
|
|
12895
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
12896
|
+
* ... // other embed view config
|
|
12897
|
+
* hideAnswerEditPanel: true,
|
|
12898
|
+
* })
|
|
12899
|
+
* ```
|
|
12900
|
+
*/
|
|
12901
|
+
hideAnswerEditPanel?: boolean;
|
|
11976
12902
|
/**
|
|
11977
12903
|
* The initial search query to load the answer with.
|
|
11978
12904
|
* Use {@link searchOptions} instead.
|
|
@@ -13345,7 +14271,7 @@ export interface DiscoveryExperience {
|
|
|
13345
14271
|
* The view configuration for full app embedding.
|
|
13346
14272
|
* @group Embed components
|
|
13347
14273
|
*/
|
|
13348
|
-
export interface AppViewConfig extends AllEmbedViewConfig {
|
|
14274
|
+
export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
|
|
13349
14275
|
/**
|
|
13350
14276
|
* If true, the top navigation bar within the ThoughtSpot app
|
|
13351
14277
|
* is displayed. By default, the navigation bar is hidden.
|
|
@@ -13630,34 +14556,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13630
14556
|
* ```
|
|
13631
14557
|
*/
|
|
13632
14558
|
enableSearchAssist?: boolean;
|
|
13633
|
-
/**
|
|
13634
|
-
* If set to true, the Liveboard container dynamically resizes
|
|
13635
|
-
* according to the height of the Liveboard.
|
|
13636
|
-
*
|
|
13637
|
-
* **Note**: Using fullHeight loads all visualizations
|
|
13638
|
-
* on the Liveboard simultaneously, which results in
|
|
13639
|
-
* multiple warehouse queries and potentially a
|
|
13640
|
-
* longer wait for the topmost visualizations to
|
|
13641
|
-
* display on the screen. Setting fullHeight to
|
|
13642
|
-
* `false` fetches visualizations incrementally as
|
|
13643
|
-
* users scroll the page to view the charts and tables.
|
|
13644
|
-
*
|
|
13645
|
-
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
13646
|
-
* {@link lazyLoadingForFullHeight} and
|
|
13647
|
-
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
13648
|
-
* they scroll into view. Set either flag to `false` to opt out.
|
|
13649
|
-
*
|
|
13650
|
-
* Supported embed types: `AppEmbed`
|
|
13651
|
-
* @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
|
|
13652
|
-
* @example
|
|
13653
|
-
* ```js
|
|
13654
|
-
* const embed = new AppEmbed('#tsEmbed', {
|
|
13655
|
-
* ... // other embed view config
|
|
13656
|
-
* fullHeight: true,
|
|
13657
|
-
* })
|
|
13658
|
-
* ```
|
|
13659
|
-
*/
|
|
13660
|
-
fullHeight?: boolean;
|
|
13661
14559
|
/**
|
|
13662
14560
|
* Enables the V2 navigation and modular home page experience.
|
|
13663
14561
|
* For more information,
|
|
@@ -13852,78 +14750,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13852
14750
|
* ```
|
|
13853
14751
|
*/
|
|
13854
14752
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
13855
|
-
/**
|
|
13856
|
-
* Loads visualizations only as they scroll into the viewport, instead of
|
|
13857
|
-
* loading the whole full-height Liveboard at once.
|
|
13858
|
-
*
|
|
13859
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13860
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13861
|
-
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
13862
|
-
* The flag has no effect unless `fullHeight` is enabled.
|
|
13863
|
-
*
|
|
13864
|
-
* @type {boolean}
|
|
13865
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13866
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13867
|
-
* @example
|
|
13868
|
-
* ```js
|
|
13869
|
-
* const embed = new AppEmbed('#embed-container', {
|
|
13870
|
-
* // ...other options
|
|
13871
|
-
* fullHeight: true,
|
|
13872
|
-
* lazyLoadingForFullHeight: true,
|
|
13873
|
-
* })
|
|
13874
|
-
* ```
|
|
13875
|
-
*/
|
|
13876
|
-
lazyLoadingForFullHeight?: boolean;
|
|
13877
|
-
/**
|
|
13878
|
-
* Computes the visible region of the embed against its scrollable and
|
|
13879
|
-
* clipping ancestors, instead of treating the browser window as the only
|
|
13880
|
-
* viewport, and tracks scroll and resize on those ancestors.
|
|
13881
|
-
*
|
|
13882
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
13883
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
13884
|
-
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
13885
|
-
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
13886
|
-
* tracking.
|
|
13887
|
-
*
|
|
13888
|
-
* @type {boolean}
|
|
13889
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
13890
|
-
* @hidden
|
|
13891
|
-
*/
|
|
13892
|
-
enableScrollableContainerLazyLoading?: boolean;
|
|
13893
|
-
/**
|
|
13894
|
-
* How far outside the viewport a visualization starts loading, when
|
|
13895
|
-
* {@link lazyLoadingForFullHeight} is enabled.
|
|
13896
|
-
*
|
|
13897
|
-
* For example, if the margin is set to '10px',
|
|
13898
|
-
* the visualization will be loaded 10px before its top edge is visible in the
|
|
13899
|
-
* viewport.
|
|
13900
|
-
*
|
|
13901
|
-
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
13902
|
-
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
13903
|
-
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
13904
|
-
* `auto`; an invalid value is logged and ignored.
|
|
13905
|
-
*
|
|
13906
|
-
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
13907
|
-
* visualization ahead of the scroll position, so a chart has usually
|
|
13908
|
-
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
13909
|
-
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
13910
|
-
* only once it is actually visible.
|
|
13911
|
-
*
|
|
13912
|
-
* @type {string}
|
|
13913
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
13914
|
-
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
13915
|
-
* @example
|
|
13916
|
-
* ```js
|
|
13917
|
-
* const embed = new AppEmbed('#embed-container', {
|
|
13918
|
-
* // ...other options
|
|
13919
|
-
* fullHeight: true,
|
|
13920
|
-
* lazyLoadingForFullHeight: true,
|
|
13921
|
-
* // Using 0px, the visualization will be only loaded when it's visible in the viewport.
|
|
13922
|
-
* lazyLoadingMargin: '0px',
|
|
13923
|
-
* })
|
|
13924
|
-
* ```
|
|
13925
|
-
*/
|
|
13926
|
-
lazyLoadingMargin?: string;
|
|
13927
14753
|
/**
|
|
13928
14754
|
* updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
|
|
13929
14755
|
*
|
|
@@ -14111,23 +14937,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
14111
14937
|
* @default false
|
|
14112
14938
|
*/
|
|
14113
14939
|
enableStopAnswerGenerationEmbed?: boolean;
|
|
14114
|
-
/**
|
|
14115
|
-
* This is the minimum height (in pixels) for a full-height App.
|
|
14116
|
-
* Setting this height helps resolve issues with empty Apps and
|
|
14117
|
-
* other screens navigable from an App.
|
|
14118
|
-
*
|
|
14119
|
-
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
14120
|
-
* @default 500
|
|
14121
|
-
* @example
|
|
14122
|
-
* ```js
|
|
14123
|
-
* const embed = new AppEmbed('#embed', {
|
|
14124
|
-
* ... // other app view config
|
|
14125
|
-
* fullHeight: true,
|
|
14126
|
-
* minimumHeight: 600,
|
|
14127
|
-
* });
|
|
14128
|
-
* ```
|
|
14129
|
-
*/
|
|
14130
|
-
minimumHeight?: number;
|
|
14131
14940
|
/**
|
|
14132
14941
|
* To enable the homepage announcement banner.
|
|
14133
14942
|
* Controls the visibility of the announcement section
|
|
@@ -14177,6 +14986,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
14177
14986
|
* ```
|
|
14178
14987
|
*/
|
|
14179
14988
|
updatedSpotterExperience?: boolean;
|
|
14989
|
+
/**
|
|
14990
|
+
* If set to `true`, the answer edit panel is hidden.
|
|
14991
|
+
*
|
|
14992
|
+
* Supported embed types: `AppEmbed`
|
|
14993
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
14994
|
+
* @example
|
|
14995
|
+
* ```js
|
|
14996
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
14997
|
+
* ... // other embed view config
|
|
14998
|
+
* hideAnswerEditPanel: true,
|
|
14999
|
+
* })
|
|
15000
|
+
* ```
|
|
15001
|
+
*/
|
|
15002
|
+
hideAnswerEditPanel?: boolean;
|
|
14180
15003
|
}
|
|
14181
15004
|
/**
|
|
14182
15005
|
* APP_INIT data shape for AppEmbed.
|
|
@@ -14192,9 +15015,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
14192
15015
|
}
|
|
14193
15016
|
declare class AppEmbed extends V1Embed {
|
|
14194
15017
|
protected viewConfig: AppViewConfig;
|
|
14195
|
-
private
|
|
14196
|
-
private lazyLoadScrollContainers;
|
|
14197
|
-
private lazyLoadResizeObserver;
|
|
15018
|
+
private readonly fullHeightController?;
|
|
14198
15019
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
14199
15020
|
/**
|
|
14200
15021
|
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
@@ -14215,27 +15036,11 @@ declare class AppEmbed extends V1Embed {
|
|
|
14215
15036
|
*/
|
|
14216
15037
|
protected getEmbedParams(): string;
|
|
14217
15038
|
protected getEmbedParamsObject(): any;
|
|
14218
|
-
private sendFullHeightLazyLoadData;
|
|
14219
|
-
/**
|
|
14220
|
-
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
14221
|
-
* It is used to send the visible coordinates data to the host application.
|
|
14222
|
-
* @param data The event payload
|
|
14223
|
-
* @param responder The responder function
|
|
14224
|
-
*/
|
|
14225
|
-
private requestVisibleEmbedCoordinatesHandler;
|
|
14226
15039
|
/**
|
|
14227
15040
|
* Constructs the URL of the ThoughtSpot app page to be rendered.
|
|
14228
15041
|
* @param pageId The ID of the page to be embedded.
|
|
14229
15042
|
*/
|
|
14230
15043
|
getIFrameSrc(): string;
|
|
14231
|
-
/**
|
|
14232
|
-
* Set the iframe height as per the computed height received
|
|
14233
|
-
* from the ThoughtSpot app.
|
|
14234
|
-
* @param data The event payload
|
|
14235
|
-
*/
|
|
14236
|
-
protected updateIFrameHeight: (data: MessagePayload) => void;
|
|
14237
|
-
private embedIframeCenter;
|
|
14238
|
-
private setIframeHeightForNonEmbedLiveboard;
|
|
14239
15044
|
/**
|
|
14240
15045
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
14241
15046
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
@@ -14266,8 +15071,6 @@ declare class AppEmbed extends V1Embed {
|
|
|
14266
15071
|
*/
|
|
14267
15072
|
destroy(): void;
|
|
14268
15073
|
private postRender;
|
|
14269
|
-
private registerLazyLoadEvents;
|
|
14270
|
-
private unregisterLazyLoadEvents;
|
|
14271
15074
|
/**
|
|
14272
15075
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
14273
15076
|
* @param renderOptions An object containing the page ID
|
|
@@ -14289,71 +15092,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
|
14289
15092
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
14290
15093
|
* @group Embed components
|
|
14291
15094
|
*/
|
|
14292
|
-
export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
|
|
14293
|
-
/**
|
|
14294
|
-
* If set to true, the embedded object container dynamically resizes
|
|
14295
|
-
* according to the height of the Liveboard.
|
|
14296
|
-
*
|
|
14297
|
-
* **Note**: Using fullHeight loads all visualizations on the
|
|
14298
|
-
* Liveboard simultaneously, which results in multiple warehouse
|
|
14299
|
-
* queries and potentially a longer wait for the topmost
|
|
14300
|
-
* visualizations to display on the screen.
|
|
14301
|
-
* Setting `fullHeight` to `false` fetches visualizations
|
|
14302
|
-
* incrementally as users scroll the page to view the charts and tables.
|
|
14303
|
-
*
|
|
14304
|
-
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
14305
|
-
* {@link lazyLoadingForFullHeight} and
|
|
14306
|
-
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
14307
|
-
* they scroll into view. Set either flag to `false` to opt out.
|
|
14308
|
-
*
|
|
14309
|
-
*
|
|
14310
|
-
* Supported embed types: `LiveboardEmbed`
|
|
14311
|
-
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
14312
|
-
* @example
|
|
14313
|
-
* ```js
|
|
14314
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14315
|
-
* ... // other liveboard view config
|
|
14316
|
-
* fullHeight: true,
|
|
14317
|
-
* });
|
|
14318
|
-
* ```
|
|
14319
|
-
*/
|
|
14320
|
-
fullHeight?: boolean;
|
|
14321
|
-
/**
|
|
14322
|
-
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
14323
|
-
* Setting this height helps resolve issues with empty Liveboards and
|
|
14324
|
-
* other screens navigable from a Liveboard.
|
|
14325
|
-
*
|
|
14326
|
-
* Supported embed types: `LiveboardEmbed`
|
|
14327
|
-
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
14328
|
-
* @deprecated Use `minimumHeight` instead.
|
|
14329
|
-
* @default 500
|
|
14330
|
-
* @example
|
|
14331
|
-
* ```js
|
|
14332
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14333
|
-
* ... // other liveboard view config
|
|
14334
|
-
* fullHeight: true,
|
|
14335
|
-
* defaultHeight: 600,
|
|
14336
|
-
* });
|
|
14337
|
-
* ```
|
|
14338
|
-
*/
|
|
14339
|
-
defaultHeight?: number;
|
|
14340
|
-
/**
|
|
14341
|
-
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
14342
|
-
* Setting this height helps resolve issues with empty Liveboards and
|
|
14343
|
-
* other screens navigable from a Liveboard.
|
|
14344
|
-
*
|
|
14345
|
-
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
14346
|
-
* @default 500
|
|
14347
|
-
* @example
|
|
14348
|
-
* ```js
|
|
14349
|
-
* const embed = new LiveboardEmbed('#embed', {
|
|
14350
|
-
* ... // other liveboard view config
|
|
14351
|
-
* fullHeight: true,
|
|
14352
|
-
* minimumHeight: 600,
|
|
14353
|
-
* });
|
|
14354
|
-
* ```
|
|
14355
|
-
*/
|
|
14356
|
-
minimumHeight?: number;
|
|
15095
|
+
export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
|
|
14357
15096
|
/**
|
|
14358
15097
|
* If set to true, the context menu in visualizations will be enabled.
|
|
14359
15098
|
* @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
@@ -14697,77 +15436,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14697
15436
|
* ```
|
|
14698
15437
|
*/
|
|
14699
15438
|
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
14700
|
-
/**
|
|
14701
|
-
* Loads visualizations only as they scroll into the viewport, instead of
|
|
14702
|
-
* loading the whole full-height Liveboard at once.
|
|
14703
|
-
*
|
|
14704
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14705
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14706
|
-
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
14707
|
-
* The flag has no effect unless `fullHeight` is enabled.
|
|
14708
|
-
*
|
|
14709
|
-
* @type {boolean}
|
|
14710
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14711
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14712
|
-
* @example
|
|
14713
|
-
* ```js
|
|
14714
|
-
* const embed = new LiveboardEmbed('#embed-container', {
|
|
14715
|
-
* // ...other options
|
|
14716
|
-
* fullHeight: true,
|
|
14717
|
-
* lazyLoadingForFullHeight: true,
|
|
14718
|
-
* })
|
|
14719
|
-
* ```
|
|
14720
|
-
*/
|
|
14721
|
-
lazyLoadingForFullHeight?: boolean;
|
|
14722
|
-
/**
|
|
14723
|
-
* Computes the visible region of the embed against its scrollable and
|
|
14724
|
-
* clipping ancestors, instead of treating the browser window as the only
|
|
14725
|
-
* viewport, and tracks scroll and resize on those ancestors.
|
|
14726
|
-
*
|
|
14727
|
-
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
14728
|
-
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
14729
|
-
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
14730
|
-
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
14731
|
-
* tracking.
|
|
14732
|
-
*
|
|
14733
|
-
* @type {boolean}
|
|
14734
|
-
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
14735
|
-
*/
|
|
14736
|
-
enableScrollableContainerLazyLoading?: boolean;
|
|
14737
|
-
/**
|
|
14738
|
-
* How far outside the viewport a visualization starts loading, when
|
|
14739
|
-
* {@link lazyLoadingForFullHeight} is enabled.
|
|
14740
|
-
*
|
|
14741
|
-
* For example, if the margin is set to '10px',
|
|
14742
|
-
* the visualization will be loaded 10px before its top edge is visible in the
|
|
14743
|
-
* viewport.
|
|
14744
|
-
*
|
|
14745
|
-
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
14746
|
-
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
14747
|
-
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
14748
|
-
* `auto`; an invalid value is logged and ignored.
|
|
14749
|
-
*
|
|
14750
|
-
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
14751
|
-
* visualization ahead of the scroll position, so a chart has usually
|
|
14752
|
-
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
14753
|
-
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
14754
|
-
* only once it is actually visible.
|
|
14755
|
-
*
|
|
14756
|
-
* @type {string}
|
|
14757
|
-
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
14758
|
-
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
14759
|
-
* @example
|
|
14760
|
-
* ```js
|
|
14761
|
-
* const embed = new LiveboardEmbed('#embed-container', {
|
|
14762
|
-
* // ...other options
|
|
14763
|
-
* fullHeight: true,
|
|
14764
|
-
* lazyLoadingForFullHeight: true,
|
|
14765
|
-
* // Using 0px, the visualization will be only loaded when it's visible in the viewport.
|
|
14766
|
-
* lazyLoadingMargin: '0px',
|
|
14767
|
-
* })
|
|
14768
|
-
* ```
|
|
14769
|
-
*/
|
|
14770
|
-
lazyLoadingMargin?: string;
|
|
14771
15439
|
/**
|
|
14772
15440
|
* showSpotterLimitations : show limitation text
|
|
14773
15441
|
* of the spotter underneath the chat input.
|
|
@@ -14906,9 +15574,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14906
15574
|
}
|
|
14907
15575
|
declare class LiveboardEmbed extends V1Embed {
|
|
14908
15576
|
protected viewConfig: LiveboardViewConfig;
|
|
14909
|
-
private
|
|
14910
|
-
private lazyLoadScrollContainers;
|
|
14911
|
-
private lazyLoadResizeObserver;
|
|
15577
|
+
private readonly fullHeightController?;
|
|
14912
15578
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
14913
15579
|
protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
|
|
14914
15580
|
/**
|
|
@@ -14918,27 +15584,11 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
14918
15584
|
protected getEmbedParams(): string;
|
|
14919
15585
|
protected getEmbedParamsObject(): any;
|
|
14920
15586
|
private getIframeSuffixSrc;
|
|
14921
|
-
private sendFullHeightLazyLoadData;
|
|
14922
|
-
/**
|
|
14923
|
-
* This is a handler for the RequestVisibleEmbedCoordinates event.
|
|
14924
|
-
* It is used to send the visible coordinates data to the host application.
|
|
14925
|
-
* @param data The event payload
|
|
14926
|
-
* @param responder The responder function
|
|
14927
|
-
*/
|
|
14928
|
-
private requestVisibleEmbedCoordinatesHandler;
|
|
14929
15587
|
/**
|
|
14930
15588
|
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
14931
15589
|
* to be loaded within the iFrame.
|
|
14932
15590
|
*/
|
|
14933
15591
|
private getIFrameSrc;
|
|
14934
|
-
/**
|
|
14935
|
-
* Set the iframe height as per the computed height received
|
|
14936
|
-
* from the ThoughtSpot app.
|
|
14937
|
-
* @param data The event payload
|
|
14938
|
-
*/
|
|
14939
|
-
private updateIFrameHeight;
|
|
14940
|
-
private embedIframeCenter;
|
|
14941
|
-
private setIframeHeightForNonEmbedLiveboard;
|
|
14942
15592
|
private setActiveTab;
|
|
14943
15593
|
private showPreviewLoader;
|
|
14944
15594
|
/**
|
|
@@ -14953,22 +15603,23 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
14953
15603
|
personalizedViewId: string;
|
|
14954
15604
|
};
|
|
14955
15605
|
protected beforePrerenderVisible(): void;
|
|
15606
|
+
private isShowingLiveboardRoute;
|
|
14956
15607
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
14957
15608
|
/**
|
|
14958
15609
|
* Triggers an event to the embedded app
|
|
15610
|
+
* Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
|
|
15611
|
+
* from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
|
|
14959
15612
|
* @param {HostEvent} messageType The event type
|
|
14960
|
-
* @param {
|
|
15613
|
+
* @param {TriggerData} data The payload, typed against the event's contract
|
|
14961
15614
|
* @returns A promise that resolves with the response from the embedded app
|
|
14962
15615
|
*/
|
|
14963
|
-
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?:
|
|
15616
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
14964
15617
|
/**
|
|
14965
15618
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
14966
15619
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
14967
15620
|
*/
|
|
14968
15621
|
destroy(): void;
|
|
14969
15622
|
private postRender;
|
|
14970
|
-
private registerLazyLoadEvents;
|
|
14971
|
-
private unregisterLazyLoadEvents;
|
|
14972
15623
|
/**
|
|
14973
15624
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
14974
15625
|
* @param renderOptions An object specifying the Liveboard ID,
|