@thoughtspot/visual-embed-sdk 1.42.3 → 1.43.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 +1 -1
- package/cjs/src/api-intercept.d.ts +51 -0
- package/cjs/src/api-intercept.d.ts.map +1 -0
- package/cjs/src/api-intercept.js +180 -0
- package/cjs/src/api-intercept.js.map +1 -0
- package/cjs/src/api-intercept.spec.d.ts +2 -0
- package/cjs/src/api-intercept.spec.d.ts.map +1 -0
- package/cjs/src/api-intercept.spec.js +672 -0
- package/cjs/src/api-intercept.spec.js.map +1 -0
- package/cjs/src/css-variables.d.ts +4 -0
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +0 -5
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +4 -5
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +10 -0
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +2 -2
- package/cjs/src/embed/conversation.js +1 -1
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +17 -0
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +1 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +4 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +11 -0
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search.d.ts +0 -7
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +1 -4
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +10 -0
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +56 -15
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +412 -238
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/index.d.ts +2 -2
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +2 -1
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/types.d.ts +328 -103
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +265 -85
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/logger.d.ts.map +1 -1
- package/cjs/src/utils/logger.js +1 -2
- package/cjs/src/utils/logger.js.map +1 -1
- package/cjs/src/utils/processData.d.ts +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js +8 -8
- package/cjs/src/utils/processData.js.map +1 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/dist/{index-SVcLgSqi.js → index-CpkMygsc.js} +1 -1
- package/dist/src/api-intercept.d.ts +51 -0
- package/dist/src/api-intercept.d.ts.map +1 -0
- package/dist/src/api-intercept.spec.d.ts +2 -0
- package/dist/src/api-intercept.spec.d.ts.map +1 -0
- package/dist/src/css-variables.d.ts +4 -0
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +0 -5
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +2 -2
- package/dist/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +0 -7
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +10 -0
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/dist/src/index.d.ts +2 -2
- 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 +328 -103
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/logger.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +519 -133
- package/dist/tsembed-react.js +518 -132
- package/dist/tsembed.es.js +2642 -2256
- package/dist/tsembed.js +2640 -2254
- package/dist/visual-embed-sdk-react-full.d.ts +355 -118
- package/dist/visual-embed-sdk-react.d.ts +352 -118
- package/dist/visual-embed-sdk.d.ts +355 -118
- package/lib/package.json +1 -1
- package/lib/src/api-intercept.d.ts +51 -0
- package/lib/src/api-intercept.d.ts.map +1 -0
- package/lib/src/api-intercept.js +173 -0
- package/lib/src/api-intercept.js.map +1 -0
- package/lib/src/api-intercept.spec.d.ts +2 -0
- package/lib/src/api-intercept.spec.d.ts.map +1 -0
- package/lib/src/api-intercept.spec.js +669 -0
- package/lib/src/api-intercept.spec.js.map +1 -0
- package/lib/src/css-variables.d.ts +4 -0
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +0 -5
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +4 -5
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +10 -0
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +2 -2
- package/lib/src/embed/conversation.js +1 -1
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +17 -0
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +11 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +1 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +4 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +11 -0
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search.d.ts +0 -7
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +1 -4
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +10 -0
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +56 -15
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +412 -238
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/index.d.ts +2 -2
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +2 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/types.d.ts +328 -103
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +264 -84
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/logger.d.ts.map +1 -1
- package/lib/src/utils/logger.js +1 -2
- package/lib/src/utils/logger.js.map +1 -1
- package/lib/src/utils/processData.d.ts +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js +8 -8
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/package.json +1 -1
- package/src/api-intercept.spec.ts +856 -0
- package/src/api-intercept.ts +204 -0
- package/src/css-variables.ts +5 -0
- package/src/embed/app.spec.ts +11 -0
- package/src/embed/app.ts +5 -16
- package/src/embed/conversation.spec.ts +22 -0
- package/src/embed/conversation.ts +3 -3
- package/src/embed/hostEventClient/contracts.ts +10 -0
- package/src/embed/liveboard.spec.ts +12 -0
- package/src/embed/liveboard.ts +6 -2
- package/src/embed/search.ts +1 -14
- package/src/embed/ts-embed.spec.ts +498 -250
- package/src/embed/ts-embed.ts +80 -32
- package/src/index.ts +2 -0
- package/src/react/all-types-export.ts +1 -0
- package/src/types.ts +410 -179
- package/src/utils/logger.ts +1 -2
- package/src/utils/processData.spec.ts +0 -1
- package/src/utils/processData.ts +10 -11
|
@@ -699,6 +699,10 @@ export interface CustomCssVariables {
|
|
|
699
699
|
* Background color of the summary header in the CCA modal.
|
|
700
700
|
*/
|
|
701
701
|
"--ts-var-cca-modal-summary-header-background"?: string;
|
|
702
|
+
/**
|
|
703
|
+
* Width of the Spotter chat window.
|
|
704
|
+
*/
|
|
705
|
+
"--ts-var-spotter-chat-width"?: string;
|
|
702
706
|
}
|
|
703
707
|
export interface SessionInterface {
|
|
704
708
|
sessionId: string;
|
|
@@ -1538,7 +1542,7 @@ export interface FrameParams {
|
|
|
1538
1542
|
/**
|
|
1539
1543
|
* The common configuration object for an embedded view.
|
|
1540
1544
|
*/
|
|
1541
|
-
export interface BaseViewConfig {
|
|
1545
|
+
export interface BaseViewConfig extends ApiInterceptFlags {
|
|
1542
1546
|
/**
|
|
1543
1547
|
* @hidden
|
|
1544
1548
|
*/
|
|
@@ -2091,7 +2095,7 @@ export interface SearchLiveboardCommonViewConfig {
|
|
|
2091
2095
|
*
|
|
2092
2096
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
2093
2097
|
* @default true
|
|
2094
|
-
* @version SDK: 1.
|
|
2098
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
2095
2099
|
* @example
|
|
2096
2100
|
* ```js
|
|
2097
2101
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -2290,26 +2294,27 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
2290
2294
|
*/
|
|
2291
2295
|
enableAskSage?: boolean;
|
|
2292
2296
|
/**
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2297
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
2298
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
2299
|
+
*
|
|
2300
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2301
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
2302
|
+
* @example
|
|
2303
|
+
* ```js
|
|
2304
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
2305
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2306
|
+
* ... // other embed view config
|
|
2307
|
+
* coverAndFilterOptionInPDF: false,
|
|
2308
|
+
* })
|
|
2309
|
+
* ```
|
|
2310
|
+
*/
|
|
2307
2311
|
coverAndFilterOptionInPDF?: boolean;
|
|
2308
2312
|
/**
|
|
2309
2313
|
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
2314
|
+
* To enable this feature on your instance, contact ThoughtSpot Support.
|
|
2310
2315
|
*
|
|
2311
2316
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2312
|
-
* @version SDK: 1.41.0 | ThoughtSpot:
|
|
2317
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 26.3.0.cl
|
|
2313
2318
|
* @example
|
|
2314
2319
|
* ```js
|
|
2315
2320
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -2629,7 +2634,7 @@ export declare enum EmbedEvent {
|
|
|
2629
2634
|
*/
|
|
2630
2635
|
Load = "load",
|
|
2631
2636
|
/**
|
|
2632
|
-
* Data pertaining to an Answer or
|
|
2637
|
+
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
|
|
2633
2638
|
* The event payload includes the raw data of the object.
|
|
2634
2639
|
* @return data - Answer of Liveboard data
|
|
2635
2640
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
@@ -3048,6 +3053,17 @@ export declare enum EmbedEvent {
|
|
|
3048
3053
|
*```
|
|
3049
3054
|
*/
|
|
3050
3055
|
AnswerDelete = "answerDelete",
|
|
3056
|
+
/**
|
|
3057
|
+
* Emitted when the AI Highlights action is triggered on a Liveboard
|
|
3058
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
3059
|
+
* @example
|
|
3060
|
+
*```js
|
|
3061
|
+
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
|
|
3062
|
+
* console.log('AI Highlights', payload);
|
|
3063
|
+
* })
|
|
3064
|
+
*```
|
|
3065
|
+
*/
|
|
3066
|
+
AIHighlights = "AIHighlights",
|
|
3051
3067
|
/**
|
|
3052
3068
|
* Emitted when a user initiates the Pin action to
|
|
3053
3069
|
* add an Answer to a Liveboard.
|
|
@@ -3478,21 +3494,24 @@ export declare enum EmbedEvent {
|
|
|
3478
3494
|
|
|
3479
3495
|
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3480
3496
|
* for this embed event to get emitted.
|
|
3481
|
-
* @param: payload
|
|
3482
|
-
* @param:
|
|
3497
|
+
* @param:payload The payload received from the embed related to the Data API call.
|
|
3498
|
+
* @param:responder
|
|
3483
3499
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3484
3500
|
* should run the search, and if not, what error message
|
|
3485
3501
|
* should be shown to the user.
|
|
3486
3502
|
*
|
|
3487
|
-
* execute
|
|
3503
|
+
* `execute` - When execute returns `true`, the search will be run.
|
|
3488
3504
|
* When execute returns `false`, the search will not be executed.
|
|
3489
3505
|
*
|
|
3490
|
-
* error
|
|
3491
|
-
*
|
|
3506
|
+
* `error` - Developers can customize the error message text when `execute`
|
|
3507
|
+
* is `false` using the `errorText` and `errorDescription` parameters in responder.
|
|
3508
|
+
*
|
|
3509
|
+
* `errorText` - The error message text to be shown to the user.
|
|
3510
|
+
* `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
|
|
3492
3511
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
3493
3512
|
* @example
|
|
3494
3513
|
*```js
|
|
3495
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3514
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3496
3515
|
* (payload, responder) => {
|
|
3497
3516
|
* responder({
|
|
3498
3517
|
* data: {
|
|
@@ -3508,7 +3527,7 @@ export declare enum EmbedEvent {
|
|
|
3508
3527
|
* ```
|
|
3509
3528
|
*
|
|
3510
3529
|
*```js
|
|
3511
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3530
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3512
3531
|
* (payload, responder) => {
|
|
3513
3532
|
* const query = payload.data.data.answer.search_query
|
|
3514
3533
|
* responder({
|
|
@@ -3519,7 +3538,8 @@ export declare enum EmbedEvent {
|
|
|
3519
3538
|
* error: {
|
|
3520
3539
|
* //Provide a custom error message to explain to your end user
|
|
3521
3540
|
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
3522
|
-
* errorText: "
|
|
3541
|
+
* errorText: "Error Occurred",
|
|
3542
|
+
* errorDescription: "You can't use this query :" + query + ".
|
|
3523
3543
|
* The 'sales' measures can never be used at the 'county' level.
|
|
3524
3544
|
* Please try another measure, or remove 'county' from your search."
|
|
3525
3545
|
* }
|
|
@@ -3583,17 +3603,17 @@ export declare enum EmbedEvent {
|
|
|
3583
3603
|
*/
|
|
3584
3604
|
TableVizRendered = "TableVizRendered",
|
|
3585
3605
|
/**
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3606
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
3607
|
+
* You can use this event as a hook to trigger
|
|
3608
|
+
* other events on liveboard creation.
|
|
3609
|
+
*
|
|
3610
|
+
* ```js
|
|
3611
|
+
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
3612
|
+
* console.log('payload', payload);
|
|
3613
|
+
* })
|
|
3614
|
+
*```
|
|
3615
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
3616
|
+
*/
|
|
3597
3617
|
CreateLiveboard = "createLiveboard",
|
|
3598
3618
|
/**
|
|
3599
3619
|
* Emitted when a user creates a Model.
|
|
@@ -3689,6 +3709,17 @@ export declare enum EmbedEvent {
|
|
|
3689
3709
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3690
3710
|
*/
|
|
3691
3711
|
SpotterInit = "spotterInit",
|
|
3712
|
+
/**
|
|
3713
|
+
* Emitted when a *Spotter* conversation has been successfully created.
|
|
3714
|
+
* @example
|
|
3715
|
+
* ```js
|
|
3716
|
+
* spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
|
|
3717
|
+
* console.log('payload', payload);
|
|
3718
|
+
* })
|
|
3719
|
+
*```
|
|
3720
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
|
|
3721
|
+
*/
|
|
3722
|
+
SpotterLoadComplete = "spotterLoadComplete",
|
|
3692
3723
|
/**
|
|
3693
3724
|
* @hidden
|
|
3694
3725
|
* Triggers when the embed listener is ready to receive events.
|
|
@@ -3711,7 +3742,73 @@ export declare enum EmbedEvent {
|
|
|
3711
3742
|
* ```
|
|
3712
3743
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3713
3744
|
*/
|
|
3714
|
-
OrgSwitched = "orgSwitched"
|
|
3745
|
+
OrgSwitched = "orgSwitched",
|
|
3746
|
+
/**
|
|
3747
|
+
* Emitted when the user intercepts a URL.
|
|
3748
|
+
*
|
|
3749
|
+
* Supported on all embed types.
|
|
3750
|
+
*
|
|
3751
|
+
* @example
|
|
3752
|
+
*
|
|
3753
|
+
* ```js
|
|
3754
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3755
|
+
* console.log('payload', payload);
|
|
3756
|
+
* responder({
|
|
3757
|
+
* data: {
|
|
3758
|
+
* execute: false,
|
|
3759
|
+
* error: {
|
|
3760
|
+
* errorText: 'Error Occurred',
|
|
3761
|
+
* }
|
|
3762
|
+
* }
|
|
3763
|
+
* })
|
|
3764
|
+
* })
|
|
3765
|
+
* ```
|
|
3766
|
+
*
|
|
3767
|
+
* ```js
|
|
3768
|
+
* // We can also send a response for the intercepted api
|
|
3769
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3770
|
+
* console.log('payload', payload);
|
|
3771
|
+
* responder({
|
|
3772
|
+
* data: {
|
|
3773
|
+
* execute: false,
|
|
3774
|
+
* response: {
|
|
3775
|
+
* body: {
|
|
3776
|
+
* data: {
|
|
3777
|
+
* // Some api response
|
|
3778
|
+
* },
|
|
3779
|
+
* }
|
|
3780
|
+
* }
|
|
3781
|
+
* }
|
|
3782
|
+
* })
|
|
3783
|
+
* })
|
|
3784
|
+
*
|
|
3785
|
+
* // here embed will use the response from the responder as the response for the api
|
|
3786
|
+
* ```
|
|
3787
|
+
*
|
|
3788
|
+
* ```js
|
|
3789
|
+
* // We can also send error in response for the intercepted api
|
|
3790
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3791
|
+
* console.log('payload', payload);
|
|
3792
|
+
* responder({
|
|
3793
|
+
* data: {
|
|
3794
|
+
* execute: false,
|
|
3795
|
+
* response: {
|
|
3796
|
+
* body: {
|
|
3797
|
+
* errors: [{
|
|
3798
|
+
* title: 'Error Occurred',
|
|
3799
|
+
* description: 'Error Description',
|
|
3800
|
+
* isUserError: true,
|
|
3801
|
+
* }],
|
|
3802
|
+
* data: {},
|
|
3803
|
+
* },
|
|
3804
|
+
* }
|
|
3805
|
+
* }
|
|
3806
|
+
* })
|
|
3807
|
+
* })
|
|
3808
|
+
* ```
|
|
3809
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
3810
|
+
*/
|
|
3811
|
+
ApiIntercept = "ApiIntercept"
|
|
3715
3812
|
}
|
|
3716
3813
|
/**
|
|
3717
3814
|
* Event types that can be triggered by the host application
|
|
@@ -3997,7 +4094,7 @@ export declare enum HostEvent {
|
|
|
3997
4094
|
* the following parameters:
|
|
3998
4095
|
*
|
|
3999
4096
|
* @param
|
|
4000
|
-
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
4097
|
+
* `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
|
|
4001
4098
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
4002
4099
|
* **Required** in Spotter Embed.
|
|
4003
4100
|
* @param
|
|
@@ -4049,10 +4146,16 @@ export declare enum HostEvent {
|
|
|
4049
4146
|
* ```
|
|
4050
4147
|
* @example
|
|
4051
4148
|
* ```js
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4149
|
+
|
|
4150
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4151
|
+
* let latestSpotterVizId = '';
|
|
4152
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4153
|
+
* latestSpotterVizId = payload.data.id;
|
|
4154
|
+
* });
|
|
4155
|
+
*
|
|
4156
|
+
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
4157
|
+
* ```
|
|
4158
|
+
*
|
|
4056
4159
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4057
4160
|
*/
|
|
4058
4161
|
Pin = "pin",
|
|
@@ -4127,14 +4230,29 @@ export declare enum HostEvent {
|
|
|
4127
4230
|
* ```
|
|
4128
4231
|
* @example
|
|
4129
4232
|
* ```js
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4233
|
+
|
|
4234
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
|
|
4235
|
+
* let latestSpotterVizId = '';
|
|
4236
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4237
|
+
* latestSpotterVizId = payload.data.id;
|
|
4238
|
+
* });
|
|
4239
|
+
*
|
|
4240
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4241
|
+
* ```
|
|
4134
4242
|
*
|
|
4135
4243
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4136
4244
|
*/
|
|
4137
4245
|
DownloadAsPdf = "downloadAsPdf",
|
|
4246
|
+
/**
|
|
4247
|
+
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
4248
|
+
*
|
|
4249
|
+
* @example
|
|
4250
|
+
* ```js
|
|
4251
|
+
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
4252
|
+
* ```
|
|
4253
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
4254
|
+
*/
|
|
4255
|
+
AIHighlights = "AIHighlights",
|
|
4138
4256
|
/**
|
|
4139
4257
|
* Trigger the **Make a copy** action on a Liveboard,
|
|
4140
4258
|
* visualization, or Answer page.
|
|
@@ -4157,9 +4275,13 @@ export declare enum HostEvent {
|
|
|
4157
4275
|
* ```
|
|
4158
4276
|
* @example
|
|
4159
4277
|
* ```js
|
|
4160
|
-
*
|
|
4161
|
-
*
|
|
4162
|
-
*
|
|
4278
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
4279
|
+
* let latestSpotterVizId = '';
|
|
4280
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4281
|
+
* latestSpotterVizId = payload.data.id;
|
|
4282
|
+
* });
|
|
4283
|
+
*
|
|
4284
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4163
4285
|
* ```
|
|
4164
4286
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4165
4287
|
*/
|
|
@@ -4245,15 +4367,7 @@ export declare enum HostEvent {
|
|
|
4245
4367
|
* ```
|
|
4246
4368
|
* @example
|
|
4247
4369
|
* ```js
|
|
4248
|
-
*
|
|
4249
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4250
|
-
* });
|
|
4251
|
-
* ```
|
|
4252
|
-
* @example
|
|
4253
|
-
* ```js
|
|
4254
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
4255
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4256
|
-
* });
|
|
4370
|
+
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4257
4371
|
* ```
|
|
4258
4372
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4259
4373
|
*/
|
|
@@ -4302,16 +4416,23 @@ export declare enum HostEvent {
|
|
|
4302
4416
|
* );
|
|
4303
4417
|
* })
|
|
4304
4418
|
* ```
|
|
4305
|
-
* @example
|
|
4419
|
+
* * @example
|
|
4306
4420
|
* ```js
|
|
4307
|
-
|
|
4308
|
-
|
|
4421
|
+
|
|
4422
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4423
|
+
* let latestSpotterVizId = '';
|
|
4424
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4425
|
+
* latestSpotterVizId = payload.data.id;
|
|
4426
|
+
* });
|
|
4427
|
+
*
|
|
4428
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
4429
|
+
* vizId: latestSpotterVizId
|
|
4309
4430
|
* }).then((tml) => {
|
|
4310
4431
|
* console.log(
|
|
4311
4432
|
* tml.answer.search_query // TML representation of the search query
|
|
4312
4433
|
* );
|
|
4313
4434
|
* })
|
|
4314
|
-
|
|
4435
|
+
* ```
|
|
4315
4436
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4316
4437
|
* @important
|
|
4317
4438
|
*/
|
|
@@ -4375,7 +4496,7 @@ export declare enum HostEvent {
|
|
|
4375
4496
|
/**
|
|
4376
4497
|
* Trigger the **Download** action on charts in
|
|
4377
4498
|
* the embedded view.
|
|
4378
|
-
* @param - `vizId` refers to the
|
|
4499
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4379
4500
|
* @example
|
|
4380
4501
|
* ```js
|
|
4381
4502
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -4385,9 +4506,13 @@ export declare enum HostEvent {
|
|
|
4385
4506
|
* embed.trigger(HostEvent.Download)
|
|
4386
4507
|
* ```
|
|
4387
4508
|
* ```js
|
|
4388
|
-
*
|
|
4389
|
-
*
|
|
4390
|
-
*
|
|
4509
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
4510
|
+
* let latestSpotterVizId = '';
|
|
4511
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4512
|
+
* latestSpotterVizId = payload.data.id;
|
|
4513
|
+
* });
|
|
4514
|
+
*
|
|
4515
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
4391
4516
|
* ```
|
|
4392
4517
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
4393
4518
|
* Use {@link DownloadAsPng}
|
|
@@ -4406,9 +4531,13 @@ export declare enum HostEvent {
|
|
|
4406
4531
|
*
|
|
4407
4532
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
4408
4533
|
*
|
|
4409
|
-
*
|
|
4410
|
-
*
|
|
4411
|
-
*
|
|
4534
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
4535
|
+
* let latestSpotterVizId = '';
|
|
4536
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4537
|
+
* latestSpotterVizId = payload.data.id;
|
|
4538
|
+
* });
|
|
4539
|
+
*
|
|
4540
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4412
4541
|
* ```
|
|
4413
4542
|
*
|
|
4414
4543
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
@@ -4417,7 +4546,7 @@ export declare enum HostEvent {
|
|
|
4417
4546
|
/**
|
|
4418
4547
|
* Trigger the **Download** > **CSV** action on tables in
|
|
4419
4548
|
* the embedded view.
|
|
4420
|
-
* @param - `vizId` refers to the
|
|
4549
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4421
4550
|
* @example
|
|
4422
4551
|
* ```js
|
|
4423
4552
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -4430,9 +4559,13 @@ export declare enum HostEvent {
|
|
|
4430
4559
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
4431
4560
|
* ```
|
|
4432
4561
|
* ```js
|
|
4433
|
-
*
|
|
4434
|
-
*
|
|
4435
|
-
*
|
|
4562
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
4563
|
+
* let latestSpotterVizId = '';
|
|
4564
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4565
|
+
* latestSpotterVizId = payload.data.id;
|
|
4566
|
+
* });
|
|
4567
|
+
*
|
|
4568
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4436
4569
|
* ```
|
|
4437
4570
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4438
4571
|
*/
|
|
@@ -4440,7 +4573,7 @@ export declare enum HostEvent {
|
|
|
4440
4573
|
/**
|
|
4441
4574
|
* Trigger the **Download** > **XLSX** action on tables
|
|
4442
4575
|
* in the embedded view.
|
|
4443
|
-
* @param - `vizId` refers to the
|
|
4576
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4444
4577
|
* @example
|
|
4445
4578
|
* ```js
|
|
4446
4579
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -4453,9 +4586,13 @@ export declare enum HostEvent {
|
|
|
4453
4586
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
4454
4587
|
* ```
|
|
4455
4588
|
* ```js
|
|
4456
|
-
*
|
|
4457
|
-
*
|
|
4458
|
-
*
|
|
4589
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
4590
|
+
* let latestSpotterVizId = '';
|
|
4591
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4592
|
+
* latestSpotterVizId = payload.data.id;
|
|
4593
|
+
* });
|
|
4594
|
+
*
|
|
4595
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4459
4596
|
* ```
|
|
4460
4597
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4461
4598
|
*/
|
|
@@ -4492,7 +4629,7 @@ export declare enum HostEvent {
|
|
|
4492
4629
|
* ```
|
|
4493
4630
|
*
|
|
4494
4631
|
* ```js
|
|
4495
|
-
* // Save
|
|
4632
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
4496
4633
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
4497
4634
|
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
4498
4635
|
* })
|
|
@@ -4793,15 +4930,21 @@ export declare enum HostEvent {
|
|
|
4793
4930
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
4794
4931
|
/**
|
|
4795
4932
|
* Triggers an action to update Parameter values on embedded
|
|
4796
|
-
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
4933
|
+
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
4934
|
+
* @param - `name` - Name of the Parameter
|
|
4935
|
+
* @param - `value` - The value to set for the Parameter.
|
|
4936
|
+
*
|
|
4937
|
+
* Optionally, to control the visibility of the Parameter chip,
|
|
4938
|
+
* use the `isVisibleToUser` attribute when applying an override.
|
|
4797
4939
|
*
|
|
4798
4940
|
* @example
|
|
4799
4941
|
* ```js
|
|
4800
4942
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
4801
|
-
*
|
|
4802
|
-
*
|
|
4943
|
+
* name: "Integer Range Param",
|
|
4944
|
+
* value: 10,
|
|
4945
|
+
* isVisibleToUser: false
|
|
4803
4946
|
* }])
|
|
4804
|
-
*
|
|
4947
|
+
* ```
|
|
4805
4948
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4806
4949
|
*/
|
|
4807
4950
|
UpdateParameters = "UpdateParameters",
|
|
@@ -4814,11 +4957,13 @@ export declare enum HostEvent {
|
|
|
4814
4957
|
* });
|
|
4815
4958
|
*```
|
|
4816
4959
|
*```js
|
|
4817
|
-
*
|
|
4818
|
-
*
|
|
4819
|
-
*
|
|
4820
|
-
*
|
|
4960
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
4961
|
+
* let latestSpotterVizId = '';
|
|
4962
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4963
|
+
* latestSpotterVizId = payload.data.id;
|
|
4821
4964
|
* });
|
|
4965
|
+
*
|
|
4966
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4822
4967
|
*```
|
|
4823
4968
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4824
4969
|
*/
|
|
@@ -4848,10 +4993,11 @@ export declare enum HostEvent {
|
|
|
4848
4993
|
* If no parameters are specified, the save action is
|
|
4849
4994
|
* triggered with a modal to prompt users to
|
|
4850
4995
|
* add a name and description for the Answer.
|
|
4851
|
-
* @param -
|
|
4852
|
-
*
|
|
4853
|
-
*
|
|
4854
|
-
* @param - `
|
|
4996
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed
|
|
4997
|
+
* and is required in Spotter embed.
|
|
4998
|
+
* Optional attributes to set Answer properties include:
|
|
4999
|
+
* @param - `name` - Name string for the Answer.
|
|
5000
|
+
* @param - `description` - Description text for the Answer.
|
|
4855
5001
|
* @example
|
|
4856
5002
|
* ```js
|
|
4857
5003
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -4861,11 +5007,13 @@ export declare enum HostEvent {
|
|
|
4861
5007
|
* ```
|
|
4862
5008
|
* @example
|
|
4863
5009
|
* ```js
|
|
4864
|
-
*
|
|
4865
|
-
*
|
|
4866
|
-
*
|
|
4867
|
-
*
|
|
5010
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
|
|
5011
|
+
* let latestSpotterVizId = '';
|
|
5012
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5013
|
+
* latestSpotterVizId = payload.data.id;
|
|
4868
5014
|
* });
|
|
5015
|
+
*
|
|
5016
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4869
5017
|
* ```
|
|
4870
5018
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4871
5019
|
*/
|
|
@@ -4949,12 +5097,15 @@ export declare enum HostEvent {
|
|
|
4949
5097
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
4950
5098
|
/**
|
|
4951
5099
|
* Toggle the visualization to chart or table view.
|
|
4952
|
-
* @param - `vizId ` refers to the
|
|
5100
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
4953
5101
|
* @example
|
|
4954
5102
|
* ```js
|
|
4955
|
-
*
|
|
4956
|
-
*
|
|
5103
|
+
* let latestSpotterVizId = '';
|
|
5104
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5105
|
+
* latestSpotterVizId = payload.data.id;
|
|
4957
5106
|
* });
|
|
5107
|
+
*
|
|
5108
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
4958
5109
|
*```
|
|
4959
5110
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4960
5111
|
*/
|
|
@@ -4983,12 +5134,16 @@ export declare enum HostEvent {
|
|
|
4983
5134
|
*/
|
|
4984
5135
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
4985
5136
|
/**
|
|
4986
|
-
* Trigger the *
|
|
4987
|
-
* @param - `vizId` refers to the
|
|
5137
|
+
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
5138
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
4988
5139
|
* @example
|
|
4989
5140
|
* ```js
|
|
4990
|
-
*
|
|
4991
|
-
* {
|
|
5141
|
+
* let latestSpotterVizId = '';
|
|
5142
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5143
|
+
* latestSpotterVizId = payload.data.id;
|
|
5144
|
+
* });
|
|
5145
|
+
*
|
|
5146
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
4992
5147
|
* ```
|
|
4993
5148
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
4994
5149
|
*/
|
|
@@ -5011,7 +5166,19 @@ export declare enum HostEvent {
|
|
|
5011
5166
|
* ```
|
|
5012
5167
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5013
5168
|
*/
|
|
5014
|
-
DestroyEmbed = "EmbedDestroyed"
|
|
5169
|
+
DestroyEmbed = "EmbedDestroyed",
|
|
5170
|
+
/** Triggers a create new conversation operation in spotter embed.
|
|
5171
|
+
* @example
|
|
5172
|
+
* ```js
|
|
5173
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot instance.
|
|
5174
|
+
* Contact your admin or ThoughtSpot Support to enable chat history on your instance.
|
|
5175
|
+
* @example
|
|
5176
|
+
* ```js
|
|
5177
|
+
* spotterEmbed.trigger(HostEvent.StartNewSpotterConversation);
|
|
5178
|
+
* ```
|
|
5179
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
5180
|
+
*/
|
|
5181
|
+
StartNewSpotterConversation = "StartNewSpotterConversation"
|
|
5015
5182
|
}
|
|
5016
5183
|
/**
|
|
5017
5184
|
* The different visual modes that the data sources panel within
|
|
@@ -6497,7 +6664,69 @@ export interface DefaultAppInitData {
|
|
|
6497
6664
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
6498
6665
|
hiddenListColumns: ListPageColumns[];
|
|
6499
6666
|
customActions: CustomAction[];
|
|
6667
|
+
interceptTimeout: number | undefined;
|
|
6668
|
+
interceptUrls: (string | InterceptedApiType)[];
|
|
6500
6669
|
}
|
|
6670
|
+
/**
|
|
6671
|
+
* Enum for the type of API intercepted
|
|
6672
|
+
*/
|
|
6673
|
+
export declare enum InterceptedApiType {
|
|
6674
|
+
/**
|
|
6675
|
+
* The apis that are use to get the data for the embed
|
|
6676
|
+
*/
|
|
6677
|
+
AnswerData = "AnswerData",
|
|
6678
|
+
/**
|
|
6679
|
+
* This will intercept all the apis
|
|
6680
|
+
*/
|
|
6681
|
+
ALL = "ALL",
|
|
6682
|
+
/**
|
|
6683
|
+
* The apis that are use to get the data for the liveboard
|
|
6684
|
+
*/
|
|
6685
|
+
LiveboardData = "LiveboardData"
|
|
6686
|
+
}
|
|
6687
|
+
export type ApiInterceptFlags = {
|
|
6688
|
+
/**
|
|
6689
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
6690
|
+
*
|
|
6691
|
+
* Can be used for Serach and App Embed from SDK 1.29.0
|
|
6692
|
+
*
|
|
6693
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6694
|
+
*/
|
|
6695
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
6696
|
+
/**
|
|
6697
|
+
* This allows to intercept the urls passed, once intercepted the api will only
|
|
6698
|
+
* run based on the reponse from the responder of ApiIntercept event.
|
|
6699
|
+
*
|
|
6700
|
+
* @example
|
|
6701
|
+
* ```js
|
|
6702
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6703
|
+
* ...viewConfig,
|
|
6704
|
+
* enableApiIntercept: true,
|
|
6705
|
+
* interceptUrls: [InterceptedApiType.DATA],
|
|
6706
|
+
* })
|
|
6707
|
+
* ```
|
|
6708
|
+
*
|
|
6709
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6710
|
+
*/
|
|
6711
|
+
interceptUrls?: (string | InterceptedApiType)[];
|
|
6712
|
+
/**
|
|
6713
|
+
* The timeout for the intercept, default is 30000ms
|
|
6714
|
+
* the api will error out if the timeout is reached
|
|
6715
|
+
*
|
|
6716
|
+
* @example
|
|
6717
|
+
* ```js
|
|
6718
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6719
|
+
* ...viewConfig,
|
|
6720
|
+
* enableApiIntercept: true,
|
|
6721
|
+
* interceptUrls: [InterceptedApiType.ALL],
|
|
6722
|
+
* interceptTimeout: 1000,
|
|
6723
|
+
* })
|
|
6724
|
+
* ```
|
|
6725
|
+
*
|
|
6726
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6727
|
+
*/
|
|
6728
|
+
interceptTimeout?: number;
|
|
6729
|
+
};
|
|
6501
6730
|
/**
|
|
6502
6731
|
* Enum for auth failure types. This is the parameter passed to the listner
|
|
6503
6732
|
* of {@link AuthStatus.FAILURE}.
|
|
@@ -6606,7 +6835,8 @@ export declare enum UIPassthroughEvent {
|
|
|
6606
6835
|
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
6607
6836
|
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
6608
6837
|
GetAnswerConfig = "getAnswerPageConfig",
|
|
6609
|
-
GetLiveboardConfig = "getPinboardPageConfig"
|
|
6838
|
+
GetLiveboardConfig = "getPinboardPageConfig",
|
|
6839
|
+
GetUnsavedAnswerTML = "getUnsavedAnswerTML"
|
|
6610
6840
|
}
|
|
6611
6841
|
export type UIPassthroughContractBase = {
|
|
6612
6842
|
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
@@ -6661,6 +6891,15 @@ export type UIPassthroughContractBase = {
|
|
|
6661
6891
|
request: any;
|
|
6662
6892
|
response: any;
|
|
6663
6893
|
};
|
|
6894
|
+
[UIPassthroughEvent.GetUnsavedAnswerTML]: {
|
|
6895
|
+
request: {
|
|
6896
|
+
sessionId?: string;
|
|
6897
|
+
vizId?: string;
|
|
6898
|
+
};
|
|
6899
|
+
response: {
|
|
6900
|
+
tml: string;
|
|
6901
|
+
};
|
|
6902
|
+
};
|
|
6664
6903
|
};
|
|
6665
6904
|
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
6666
6905
|
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
@@ -6816,6 +7055,8 @@ declare class TsEmbed {
|
|
|
6816
7055
|
* work regardless of auth status
|
|
6817
7056
|
*/
|
|
6818
7057
|
private subscribeToNetworkEvents;
|
|
7058
|
+
private handleApiInterceptEvent;
|
|
7059
|
+
private messageEventListener;
|
|
6819
7060
|
/**
|
|
6820
7061
|
* Subscribe to message events that depend on successful iframe setup
|
|
6821
7062
|
*/
|
|
@@ -6902,6 +7143,14 @@ declare class TsEmbed {
|
|
|
6902
7143
|
* @param height The height in pixels
|
|
6903
7144
|
*/
|
|
6904
7145
|
protected setIFrameHeight(height: number | string): void;
|
|
7146
|
+
/**
|
|
7147
|
+
* We can process the customer given payload before sending it to the embed port
|
|
7148
|
+
* Embed event handler -> responder -> createEmbedEventResponder -> send response
|
|
7149
|
+
* @param eventPort The event port for a specific MessageChannel
|
|
7150
|
+
* @param eventType The event type
|
|
7151
|
+
* @returns
|
|
7152
|
+
*/
|
|
7153
|
+
protected createEmbedEventResponder: (eventPort: MessagePort | void, eventType: EmbedEvent) => (payload: any) => void;
|
|
6905
7154
|
/**
|
|
6906
7155
|
* Executes all registered event handlers for a particular event type
|
|
6907
7156
|
* @param eventType The event type
|
|
@@ -7380,13 +7629,6 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
7380
7629
|
* @deprecated Use {@link collapseSearchBar} instead
|
|
7381
7630
|
*/
|
|
7382
7631
|
collapseSearchBarInitially?: boolean;
|
|
7383
|
-
/**
|
|
7384
|
-
* Flag to enable onBeforeSearchExecute Embed Event
|
|
7385
|
-
*
|
|
7386
|
-
* Supported embed types: `SearchEmbed`
|
|
7387
|
-
* @version: SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl
|
|
7388
|
-
*/
|
|
7389
|
-
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
7390
7632
|
/**
|
|
7391
7633
|
* This controls the initial behaviour of custom column groups accordion.
|
|
7392
7634
|
* It takes DataPanelCustomColumnGroupsAccordionState enum values as input.
|
|
@@ -8193,11 +8435,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
8193
8435
|
* ```
|
|
8194
8436
|
*/
|
|
8195
8437
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState$1;
|
|
8196
|
-
/**
|
|
8197
|
-
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
8198
|
-
* @version SDK : 1.29.0 | ThoughtSpot: 10.1.0.cl
|
|
8199
|
-
*/
|
|
8200
|
-
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
8201
8438
|
/**
|
|
8202
8439
|
* Flag to use home page search bar mode
|
|
8203
8440
|
*
|
|
@@ -8896,7 +9133,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
8896
9133
|
*
|
|
8897
9134
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
8898
9135
|
* @default true
|
|
8899
|
-
* @version SDK: 1.
|
|
9136
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
8900
9137
|
* @example
|
|
8901
9138
|
* ```js
|
|
8902
9139
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -9011,7 +9248,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
9011
9248
|
* enablePastConversationsSidebar : true,
|
|
9012
9249
|
* })
|
|
9013
9250
|
* ```
|
|
9014
|
-
* @version SDK: 1.
|
|
9251
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
9015
9252
|
*/
|
|
9016
9253
|
enablePastConversationsSidebar?: boolean;
|
|
9017
9254
|
}
|