@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
|
@@ -697,6 +697,10 @@ export interface CustomCssVariables {
|
|
|
697
697
|
* Background color of the summary header in the CCA modal.
|
|
698
698
|
*/
|
|
699
699
|
"--ts-var-cca-modal-summary-header-background"?: string;
|
|
700
|
+
/**
|
|
701
|
+
* Width of the Spotter chat window.
|
|
702
|
+
*/
|
|
703
|
+
"--ts-var-spotter-chat-width"?: string;
|
|
700
704
|
}
|
|
701
705
|
export interface SessionInterface {
|
|
702
706
|
sessionId: string;
|
|
@@ -1592,7 +1596,7 @@ export interface FrameParams {
|
|
|
1592
1596
|
/**
|
|
1593
1597
|
* The common configuration object for an embedded view.
|
|
1594
1598
|
*/
|
|
1595
|
-
export interface BaseViewConfig {
|
|
1599
|
+
export interface BaseViewConfig extends ApiInterceptFlags {
|
|
1596
1600
|
/**
|
|
1597
1601
|
* @hidden
|
|
1598
1602
|
*/
|
|
@@ -2145,7 +2149,7 @@ export interface SearchLiveboardCommonViewConfig {
|
|
|
2145
2149
|
*
|
|
2146
2150
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
2147
2151
|
* @default true
|
|
2148
|
-
* @version SDK: 1.
|
|
2152
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
2149
2153
|
* @example
|
|
2150
2154
|
* ```js
|
|
2151
2155
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -2344,26 +2348,27 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
2344
2348
|
*/
|
|
2345
2349
|
enableAskSage?: boolean;
|
|
2346
2350
|
/**
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2351
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
2352
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
2353
|
+
*
|
|
2354
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2355
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
2356
|
+
* @example
|
|
2357
|
+
* ```js
|
|
2358
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
2359
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2360
|
+
* ... // other embed view config
|
|
2361
|
+
* coverAndFilterOptionInPDF: false,
|
|
2362
|
+
* })
|
|
2363
|
+
* ```
|
|
2364
|
+
*/
|
|
2361
2365
|
coverAndFilterOptionInPDF?: boolean;
|
|
2362
2366
|
/**
|
|
2363
2367
|
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
2368
|
+
* To enable this feature on your instance, contact ThoughtSpot Support.
|
|
2364
2369
|
*
|
|
2365
2370
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2366
|
-
* @version SDK: 1.41.0 | ThoughtSpot:
|
|
2371
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 26.3.0.cl
|
|
2367
2372
|
* @example
|
|
2368
2373
|
* ```js
|
|
2369
2374
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -2695,7 +2700,7 @@ export declare enum EmbedEvent {
|
|
|
2695
2700
|
*/
|
|
2696
2701
|
Load = "load",
|
|
2697
2702
|
/**
|
|
2698
|
-
* Data pertaining to an Answer or
|
|
2703
|
+
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
|
|
2699
2704
|
* The event payload includes the raw data of the object.
|
|
2700
2705
|
* @return data - Answer of Liveboard data
|
|
2701
2706
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
@@ -3114,6 +3119,17 @@ export declare enum EmbedEvent {
|
|
|
3114
3119
|
*```
|
|
3115
3120
|
*/
|
|
3116
3121
|
AnswerDelete = "answerDelete",
|
|
3122
|
+
/**
|
|
3123
|
+
* Emitted when the AI Highlights action is triggered on a Liveboard
|
|
3124
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
3125
|
+
* @example
|
|
3126
|
+
*```js
|
|
3127
|
+
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
|
|
3128
|
+
* console.log('AI Highlights', payload);
|
|
3129
|
+
* })
|
|
3130
|
+
*```
|
|
3131
|
+
*/
|
|
3132
|
+
AIHighlights = "AIHighlights",
|
|
3117
3133
|
/**
|
|
3118
3134
|
* Emitted when a user initiates the Pin action to
|
|
3119
3135
|
* add an Answer to a Liveboard.
|
|
@@ -3544,21 +3560,24 @@ export declare enum EmbedEvent {
|
|
|
3544
3560
|
|
|
3545
3561
|
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3546
3562
|
* for this embed event to get emitted.
|
|
3547
|
-
* @param: payload
|
|
3548
|
-
* @param:
|
|
3563
|
+
* @param:payload The payload received from the embed related to the Data API call.
|
|
3564
|
+
* @param:responder
|
|
3549
3565
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3550
3566
|
* should run the search, and if not, what error message
|
|
3551
3567
|
* should be shown to the user.
|
|
3552
3568
|
*
|
|
3553
|
-
* execute
|
|
3569
|
+
* `execute` - When execute returns `true`, the search will be run.
|
|
3554
3570
|
* When execute returns `false`, the search will not be executed.
|
|
3555
3571
|
*
|
|
3556
|
-
* error
|
|
3557
|
-
*
|
|
3572
|
+
* `error` - Developers can customize the error message text when `execute`
|
|
3573
|
+
* is `false` using the `errorText` and `errorDescription` parameters in responder.
|
|
3574
|
+
*
|
|
3575
|
+
* `errorText` - The error message text to be shown to the user.
|
|
3576
|
+
* `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
|
|
3558
3577
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
3559
3578
|
* @example
|
|
3560
3579
|
*```js
|
|
3561
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3580
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3562
3581
|
* (payload, responder) => {
|
|
3563
3582
|
* responder({
|
|
3564
3583
|
* data: {
|
|
@@ -3574,7 +3593,7 @@ export declare enum EmbedEvent {
|
|
|
3574
3593
|
* ```
|
|
3575
3594
|
*
|
|
3576
3595
|
*```js
|
|
3577
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3596
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3578
3597
|
* (payload, responder) => {
|
|
3579
3598
|
* const query = payload.data.data.answer.search_query
|
|
3580
3599
|
* responder({
|
|
@@ -3585,7 +3604,8 @@ export declare enum EmbedEvent {
|
|
|
3585
3604
|
* error: {
|
|
3586
3605
|
* //Provide a custom error message to explain to your end user
|
|
3587
3606
|
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
3588
|
-
* errorText: "
|
|
3607
|
+
* errorText: "Error Occurred",
|
|
3608
|
+
* errorDescription: "You can't use this query :" + query + ".
|
|
3589
3609
|
* The 'sales' measures can never be used at the 'county' level.
|
|
3590
3610
|
* Please try another measure, or remove 'county' from your search."
|
|
3591
3611
|
* }
|
|
@@ -3649,17 +3669,17 @@ export declare enum EmbedEvent {
|
|
|
3649
3669
|
*/
|
|
3650
3670
|
TableVizRendered = "TableVizRendered",
|
|
3651
3671
|
/**
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3672
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
3673
|
+
* You can use this event as a hook to trigger
|
|
3674
|
+
* other events on liveboard creation.
|
|
3675
|
+
*
|
|
3676
|
+
* ```js
|
|
3677
|
+
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
3678
|
+
* console.log('payload', payload);
|
|
3679
|
+
* })
|
|
3680
|
+
*```
|
|
3681
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
3682
|
+
*/
|
|
3663
3683
|
CreateLiveboard = "createLiveboard",
|
|
3664
3684
|
/**
|
|
3665
3685
|
* Emitted when a user creates a Model.
|
|
@@ -3755,6 +3775,17 @@ export declare enum EmbedEvent {
|
|
|
3755
3775
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3756
3776
|
*/
|
|
3757
3777
|
SpotterInit = "spotterInit",
|
|
3778
|
+
/**
|
|
3779
|
+
* Emitted when a *Spotter* conversation has been successfully created.
|
|
3780
|
+
* @example
|
|
3781
|
+
* ```js
|
|
3782
|
+
* spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
|
|
3783
|
+
* console.log('payload', payload);
|
|
3784
|
+
* })
|
|
3785
|
+
*```
|
|
3786
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
|
|
3787
|
+
*/
|
|
3788
|
+
SpotterLoadComplete = "spotterLoadComplete",
|
|
3758
3789
|
/**
|
|
3759
3790
|
* @hidden
|
|
3760
3791
|
* Triggers when the embed listener is ready to receive events.
|
|
@@ -3777,7 +3808,73 @@ export declare enum EmbedEvent {
|
|
|
3777
3808
|
* ```
|
|
3778
3809
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3779
3810
|
*/
|
|
3780
|
-
OrgSwitched = "orgSwitched"
|
|
3811
|
+
OrgSwitched = "orgSwitched",
|
|
3812
|
+
/**
|
|
3813
|
+
* Emitted when the user intercepts a URL.
|
|
3814
|
+
*
|
|
3815
|
+
* Supported on all embed types.
|
|
3816
|
+
*
|
|
3817
|
+
* @example
|
|
3818
|
+
*
|
|
3819
|
+
* ```js
|
|
3820
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3821
|
+
* console.log('payload', payload);
|
|
3822
|
+
* responder({
|
|
3823
|
+
* data: {
|
|
3824
|
+
* execute: false,
|
|
3825
|
+
* error: {
|
|
3826
|
+
* errorText: 'Error Occurred',
|
|
3827
|
+
* }
|
|
3828
|
+
* }
|
|
3829
|
+
* })
|
|
3830
|
+
* })
|
|
3831
|
+
* ```
|
|
3832
|
+
*
|
|
3833
|
+
* ```js
|
|
3834
|
+
* // We can also send a response for the intercepted api
|
|
3835
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3836
|
+
* console.log('payload', payload);
|
|
3837
|
+
* responder({
|
|
3838
|
+
* data: {
|
|
3839
|
+
* execute: false,
|
|
3840
|
+
* response: {
|
|
3841
|
+
* body: {
|
|
3842
|
+
* data: {
|
|
3843
|
+
* // Some api response
|
|
3844
|
+
* },
|
|
3845
|
+
* }
|
|
3846
|
+
* }
|
|
3847
|
+
* }
|
|
3848
|
+
* })
|
|
3849
|
+
* })
|
|
3850
|
+
*
|
|
3851
|
+
* // here embed will use the response from the responder as the response for the api
|
|
3852
|
+
* ```
|
|
3853
|
+
*
|
|
3854
|
+
* ```js
|
|
3855
|
+
* // We can also send error in response for the intercepted api
|
|
3856
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3857
|
+
* console.log('payload', payload);
|
|
3858
|
+
* responder({
|
|
3859
|
+
* data: {
|
|
3860
|
+
* execute: false,
|
|
3861
|
+
* response: {
|
|
3862
|
+
* body: {
|
|
3863
|
+
* errors: [{
|
|
3864
|
+
* title: 'Error Occurred',
|
|
3865
|
+
* description: 'Error Description',
|
|
3866
|
+
* isUserError: true,
|
|
3867
|
+
* }],
|
|
3868
|
+
* data: {},
|
|
3869
|
+
* },
|
|
3870
|
+
* }
|
|
3871
|
+
* }
|
|
3872
|
+
* })
|
|
3873
|
+
* })
|
|
3874
|
+
* ```
|
|
3875
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
3876
|
+
*/
|
|
3877
|
+
ApiIntercept = "ApiIntercept"
|
|
3781
3878
|
}
|
|
3782
3879
|
/**
|
|
3783
3880
|
* Event types that can be triggered by the host application
|
|
@@ -4063,7 +4160,7 @@ export declare enum HostEvent {
|
|
|
4063
4160
|
* the following parameters:
|
|
4064
4161
|
*
|
|
4065
4162
|
* @param
|
|
4066
|
-
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
4163
|
+
* `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
|
|
4067
4164
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
4068
4165
|
* **Required** in Spotter Embed.
|
|
4069
4166
|
* @param
|
|
@@ -4115,10 +4212,16 @@ export declare enum HostEvent {
|
|
|
4115
4212
|
* ```
|
|
4116
4213
|
* @example
|
|
4117
4214
|
* ```js
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4215
|
+
|
|
4216
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4217
|
+
* let latestSpotterVizId = '';
|
|
4218
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4219
|
+
* latestSpotterVizId = payload.data.id;
|
|
4220
|
+
* });
|
|
4221
|
+
*
|
|
4222
|
+
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
4223
|
+
* ```
|
|
4224
|
+
*
|
|
4122
4225
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4123
4226
|
*/
|
|
4124
4227
|
Pin = "pin",
|
|
@@ -4193,14 +4296,29 @@ export declare enum HostEvent {
|
|
|
4193
4296
|
* ```
|
|
4194
4297
|
* @example
|
|
4195
4298
|
* ```js
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4299
|
+
|
|
4300
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
|
|
4301
|
+
* let latestSpotterVizId = '';
|
|
4302
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4303
|
+
* latestSpotterVizId = payload.data.id;
|
|
4304
|
+
* });
|
|
4305
|
+
*
|
|
4306
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4307
|
+
* ```
|
|
4200
4308
|
*
|
|
4201
4309
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4202
4310
|
*/
|
|
4203
4311
|
DownloadAsPdf = "downloadAsPdf",
|
|
4312
|
+
/**
|
|
4313
|
+
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
4314
|
+
*
|
|
4315
|
+
* @example
|
|
4316
|
+
* ```js
|
|
4317
|
+
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
4318
|
+
* ```
|
|
4319
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
4320
|
+
*/
|
|
4321
|
+
AIHighlights = "AIHighlights",
|
|
4204
4322
|
/**
|
|
4205
4323
|
* Trigger the **Make a copy** action on a Liveboard,
|
|
4206
4324
|
* visualization, or Answer page.
|
|
@@ -4223,9 +4341,13 @@ export declare enum HostEvent {
|
|
|
4223
4341
|
* ```
|
|
4224
4342
|
* @example
|
|
4225
4343
|
* ```js
|
|
4226
|
-
*
|
|
4227
|
-
*
|
|
4228
|
-
*
|
|
4344
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
4345
|
+
* let latestSpotterVizId = '';
|
|
4346
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4347
|
+
* latestSpotterVizId = payload.data.id;
|
|
4348
|
+
* });
|
|
4349
|
+
*
|
|
4350
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4229
4351
|
* ```
|
|
4230
4352
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4231
4353
|
*/
|
|
@@ -4311,15 +4433,7 @@ export declare enum HostEvent {
|
|
|
4311
4433
|
* ```
|
|
4312
4434
|
* @example
|
|
4313
4435
|
* ```js
|
|
4314
|
-
*
|
|
4315
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4316
|
-
* });
|
|
4317
|
-
* ```
|
|
4318
|
-
* @example
|
|
4319
|
-
* ```js
|
|
4320
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
4321
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4322
|
-
* });
|
|
4436
|
+
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4323
4437
|
* ```
|
|
4324
4438
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4325
4439
|
*/
|
|
@@ -4368,16 +4482,23 @@ export declare enum HostEvent {
|
|
|
4368
4482
|
* );
|
|
4369
4483
|
* })
|
|
4370
4484
|
* ```
|
|
4371
|
-
* @example
|
|
4485
|
+
* * @example
|
|
4372
4486
|
* ```js
|
|
4373
|
-
|
|
4374
|
-
|
|
4487
|
+
|
|
4488
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4489
|
+
* let latestSpotterVizId = '';
|
|
4490
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4491
|
+
* latestSpotterVizId = payload.data.id;
|
|
4492
|
+
* });
|
|
4493
|
+
*
|
|
4494
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
4495
|
+
* vizId: latestSpotterVizId
|
|
4375
4496
|
* }).then((tml) => {
|
|
4376
4497
|
* console.log(
|
|
4377
4498
|
* tml.answer.search_query // TML representation of the search query
|
|
4378
4499
|
* );
|
|
4379
4500
|
* })
|
|
4380
|
-
|
|
4501
|
+
* ```
|
|
4381
4502
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4382
4503
|
* @important
|
|
4383
4504
|
*/
|
|
@@ -4441,7 +4562,7 @@ export declare enum HostEvent {
|
|
|
4441
4562
|
/**
|
|
4442
4563
|
* Trigger the **Download** action on charts in
|
|
4443
4564
|
* the embedded view.
|
|
4444
|
-
* @param - `vizId` refers to the
|
|
4565
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4445
4566
|
* @example
|
|
4446
4567
|
* ```js
|
|
4447
4568
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -4451,9 +4572,13 @@ export declare enum HostEvent {
|
|
|
4451
4572
|
* embed.trigger(HostEvent.Download)
|
|
4452
4573
|
* ```
|
|
4453
4574
|
* ```js
|
|
4454
|
-
*
|
|
4455
|
-
*
|
|
4456
|
-
*
|
|
4575
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
4576
|
+
* let latestSpotterVizId = '';
|
|
4577
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4578
|
+
* latestSpotterVizId = payload.data.id;
|
|
4579
|
+
* });
|
|
4580
|
+
*
|
|
4581
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
4457
4582
|
* ```
|
|
4458
4583
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
4459
4584
|
* Use {@link DownloadAsPng}
|
|
@@ -4472,9 +4597,13 @@ export declare enum HostEvent {
|
|
|
4472
4597
|
*
|
|
4473
4598
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
4474
4599
|
*
|
|
4475
|
-
*
|
|
4476
|
-
*
|
|
4477
|
-
*
|
|
4600
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
4601
|
+
* let latestSpotterVizId = '';
|
|
4602
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4603
|
+
* latestSpotterVizId = payload.data.id;
|
|
4604
|
+
* });
|
|
4605
|
+
*
|
|
4606
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4478
4607
|
* ```
|
|
4479
4608
|
*
|
|
4480
4609
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
@@ -4483,7 +4612,7 @@ export declare enum HostEvent {
|
|
|
4483
4612
|
/**
|
|
4484
4613
|
* Trigger the **Download** > **CSV** action on tables in
|
|
4485
4614
|
* the embedded view.
|
|
4486
|
-
* @param - `vizId` refers to the
|
|
4615
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4487
4616
|
* @example
|
|
4488
4617
|
* ```js
|
|
4489
4618
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -4496,9 +4625,13 @@ export declare enum HostEvent {
|
|
|
4496
4625
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
4497
4626
|
* ```
|
|
4498
4627
|
* ```js
|
|
4499
|
-
*
|
|
4500
|
-
*
|
|
4501
|
-
*
|
|
4628
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
4629
|
+
* let latestSpotterVizId = '';
|
|
4630
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4631
|
+
* latestSpotterVizId = payload.data.id;
|
|
4632
|
+
* });
|
|
4633
|
+
*
|
|
4634
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4502
4635
|
* ```
|
|
4503
4636
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4504
4637
|
*/
|
|
@@ -4506,7 +4639,7 @@ export declare enum HostEvent {
|
|
|
4506
4639
|
/**
|
|
4507
4640
|
* Trigger the **Download** > **XLSX** action on tables
|
|
4508
4641
|
* in the embedded view.
|
|
4509
|
-
* @param - `vizId` refers to the
|
|
4642
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4510
4643
|
* @example
|
|
4511
4644
|
* ```js
|
|
4512
4645
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -4519,9 +4652,13 @@ export declare enum HostEvent {
|
|
|
4519
4652
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
4520
4653
|
* ```
|
|
4521
4654
|
* ```js
|
|
4522
|
-
*
|
|
4523
|
-
*
|
|
4524
|
-
*
|
|
4655
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
4656
|
+
* let latestSpotterVizId = '';
|
|
4657
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4658
|
+
* latestSpotterVizId = payload.data.id;
|
|
4659
|
+
* });
|
|
4660
|
+
*
|
|
4661
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4525
4662
|
* ```
|
|
4526
4663
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4527
4664
|
*/
|
|
@@ -4558,7 +4695,7 @@ export declare enum HostEvent {
|
|
|
4558
4695
|
* ```
|
|
4559
4696
|
*
|
|
4560
4697
|
* ```js
|
|
4561
|
-
* // Save
|
|
4698
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
4562
4699
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
4563
4700
|
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
4564
4701
|
* })
|
|
@@ -4859,15 +4996,21 @@ export declare enum HostEvent {
|
|
|
4859
4996
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
4860
4997
|
/**
|
|
4861
4998
|
* Triggers an action to update Parameter values on embedded
|
|
4862
|
-
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
4999
|
+
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
5000
|
+
* @param - `name` - Name of the Parameter
|
|
5001
|
+
* @param - `value` - The value to set for the Parameter.
|
|
5002
|
+
*
|
|
5003
|
+
* Optionally, to control the visibility of the Parameter chip,
|
|
5004
|
+
* use the `isVisibleToUser` attribute when applying an override.
|
|
4863
5005
|
*
|
|
4864
5006
|
* @example
|
|
4865
5007
|
* ```js
|
|
4866
5008
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
4867
|
-
*
|
|
4868
|
-
*
|
|
5009
|
+
* name: "Integer Range Param",
|
|
5010
|
+
* value: 10,
|
|
5011
|
+
* isVisibleToUser: false
|
|
4869
5012
|
* }])
|
|
4870
|
-
*
|
|
5013
|
+
* ```
|
|
4871
5014
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4872
5015
|
*/
|
|
4873
5016
|
UpdateParameters = "UpdateParameters",
|
|
@@ -4880,11 +5023,13 @@ export declare enum HostEvent {
|
|
|
4880
5023
|
* });
|
|
4881
5024
|
*```
|
|
4882
5025
|
*```js
|
|
4883
|
-
*
|
|
4884
|
-
*
|
|
4885
|
-
*
|
|
4886
|
-
*
|
|
5026
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
5027
|
+
* let latestSpotterVizId = '';
|
|
5028
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5029
|
+
* latestSpotterVizId = payload.data.id;
|
|
4887
5030
|
* });
|
|
5031
|
+
*
|
|
5032
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4888
5033
|
*```
|
|
4889
5034
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4890
5035
|
*/
|
|
@@ -4914,10 +5059,11 @@ export declare enum HostEvent {
|
|
|
4914
5059
|
* If no parameters are specified, the save action is
|
|
4915
5060
|
* triggered with a modal to prompt users to
|
|
4916
5061
|
* add a name and description for the Answer.
|
|
4917
|
-
* @param -
|
|
4918
|
-
*
|
|
4919
|
-
*
|
|
4920
|
-
* @param - `
|
|
5062
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed
|
|
5063
|
+
* and is required in Spotter embed.
|
|
5064
|
+
* Optional attributes to set Answer properties include:
|
|
5065
|
+
* @param - `name` - Name string for the Answer.
|
|
5066
|
+
* @param - `description` - Description text for the Answer.
|
|
4921
5067
|
* @example
|
|
4922
5068
|
* ```js
|
|
4923
5069
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -4927,11 +5073,13 @@ export declare enum HostEvent {
|
|
|
4927
5073
|
* ```
|
|
4928
5074
|
* @example
|
|
4929
5075
|
* ```js
|
|
4930
|
-
*
|
|
4931
|
-
*
|
|
4932
|
-
*
|
|
4933
|
-
*
|
|
5076
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
|
|
5077
|
+
* let latestSpotterVizId = '';
|
|
5078
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5079
|
+
* latestSpotterVizId = payload.data.id;
|
|
4934
5080
|
* });
|
|
5081
|
+
*
|
|
5082
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4935
5083
|
* ```
|
|
4936
5084
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4937
5085
|
*/
|
|
@@ -5015,12 +5163,15 @@ export declare enum HostEvent {
|
|
|
5015
5163
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
5016
5164
|
/**
|
|
5017
5165
|
* Toggle the visualization to chart or table view.
|
|
5018
|
-
* @param - `vizId ` refers to the
|
|
5166
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
5019
5167
|
* @example
|
|
5020
5168
|
* ```js
|
|
5021
|
-
*
|
|
5022
|
-
*
|
|
5169
|
+
* let latestSpotterVizId = '';
|
|
5170
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5171
|
+
* latestSpotterVizId = payload.data.id;
|
|
5023
5172
|
* });
|
|
5173
|
+
*
|
|
5174
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
5024
5175
|
*```
|
|
5025
5176
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
5026
5177
|
*/
|
|
@@ -5049,12 +5200,16 @@ export declare enum HostEvent {
|
|
|
5049
5200
|
*/
|
|
5050
5201
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
5051
5202
|
/**
|
|
5052
|
-
* Trigger the *
|
|
5053
|
-
* @param - `vizId` refers to the
|
|
5203
|
+
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
5204
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
5054
5205
|
* @example
|
|
5055
5206
|
* ```js
|
|
5056
|
-
*
|
|
5057
|
-
* {
|
|
5207
|
+
* let latestSpotterVizId = '';
|
|
5208
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5209
|
+
* latestSpotterVizId = payload.data.id;
|
|
5210
|
+
* });
|
|
5211
|
+
*
|
|
5212
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
5058
5213
|
* ```
|
|
5059
5214
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5060
5215
|
*/
|
|
@@ -5077,7 +5232,19 @@ export declare enum HostEvent {
|
|
|
5077
5232
|
* ```
|
|
5078
5233
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5079
5234
|
*/
|
|
5080
|
-
DestroyEmbed = "EmbedDestroyed"
|
|
5235
|
+
DestroyEmbed = "EmbedDestroyed",
|
|
5236
|
+
/** Triggers a create new conversation operation in spotter embed.
|
|
5237
|
+
* @example
|
|
5238
|
+
* ```js
|
|
5239
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot instance.
|
|
5240
|
+
* Contact your admin or ThoughtSpot Support to enable chat history on your instance.
|
|
5241
|
+
* @example
|
|
5242
|
+
* ```js
|
|
5243
|
+
* spotterEmbed.trigger(HostEvent.StartNewSpotterConversation);
|
|
5244
|
+
* ```
|
|
5245
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
5246
|
+
*/
|
|
5247
|
+
StartNewSpotterConversation = "StartNewSpotterConversation"
|
|
5081
5248
|
}
|
|
5082
5249
|
/**
|
|
5083
5250
|
* The different visual modes that the data sources panel within
|
|
@@ -6596,14 +6763,77 @@ export interface DefaultAppInitData {
|
|
|
6596
6763
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
6597
6764
|
hiddenListColumns: ListPageColumns[];
|
|
6598
6765
|
customActions: CustomAction[];
|
|
6766
|
+
interceptTimeout: number | undefined;
|
|
6767
|
+
interceptUrls: (string | InterceptedApiType)[];
|
|
6599
6768
|
}
|
|
6769
|
+
/**
|
|
6770
|
+
* Enum for the type of API intercepted
|
|
6771
|
+
*/
|
|
6772
|
+
export declare enum InterceptedApiType {
|
|
6773
|
+
/**
|
|
6774
|
+
* The apis that are use to get the data for the embed
|
|
6775
|
+
*/
|
|
6776
|
+
AnswerData = "AnswerData",
|
|
6777
|
+
/**
|
|
6778
|
+
* This will intercept all the apis
|
|
6779
|
+
*/
|
|
6780
|
+
ALL = "ALL",
|
|
6781
|
+
/**
|
|
6782
|
+
* The apis that are use to get the data for the liveboard
|
|
6783
|
+
*/
|
|
6784
|
+
LiveboardData = "LiveboardData"
|
|
6785
|
+
}
|
|
6786
|
+
export type ApiInterceptFlags = {
|
|
6787
|
+
/**
|
|
6788
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
6789
|
+
*
|
|
6790
|
+
* Can be used for Serach and App Embed from SDK 1.29.0
|
|
6791
|
+
*
|
|
6792
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6793
|
+
*/
|
|
6794
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
6795
|
+
/**
|
|
6796
|
+
* This allows to intercept the urls passed, once intercepted the api will only
|
|
6797
|
+
* run based on the reponse from the responder of ApiIntercept event.
|
|
6798
|
+
*
|
|
6799
|
+
* @example
|
|
6800
|
+
* ```js
|
|
6801
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6802
|
+
* ...viewConfig,
|
|
6803
|
+
* enableApiIntercept: true,
|
|
6804
|
+
* interceptUrls: [InterceptedApiType.DATA],
|
|
6805
|
+
* })
|
|
6806
|
+
* ```
|
|
6807
|
+
*
|
|
6808
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6809
|
+
*/
|
|
6810
|
+
interceptUrls?: (string | InterceptedApiType)[];
|
|
6811
|
+
/**
|
|
6812
|
+
* The timeout for the intercept, default is 30000ms
|
|
6813
|
+
* the api will error out if the timeout is reached
|
|
6814
|
+
*
|
|
6815
|
+
* @example
|
|
6816
|
+
* ```js
|
|
6817
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6818
|
+
* ...viewConfig,
|
|
6819
|
+
* enableApiIntercept: true,
|
|
6820
|
+
* interceptUrls: [InterceptedApiType.ALL],
|
|
6821
|
+
* interceptTimeout: 1000,
|
|
6822
|
+
* })
|
|
6823
|
+
* ```
|
|
6824
|
+
*
|
|
6825
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6826
|
+
*/
|
|
6827
|
+
interceptTimeout?: number;
|
|
6828
|
+
};
|
|
6600
6829
|
export declare enum UIPassthroughEvent {
|
|
6601
6830
|
PinAnswerToLiveboard = "addVizToPinboard",
|
|
6602
6831
|
SaveAnswer = "saveAnswer",
|
|
6603
6832
|
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
6604
6833
|
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
6605
6834
|
GetAnswerConfig = "getAnswerPageConfig",
|
|
6606
|
-
GetLiveboardConfig = "getPinboardPageConfig"
|
|
6835
|
+
GetLiveboardConfig = "getPinboardPageConfig",
|
|
6836
|
+
GetUnsavedAnswerTML = "getUnsavedAnswerTML"
|
|
6607
6837
|
}
|
|
6608
6838
|
export type UIPassthroughContractBase = {
|
|
6609
6839
|
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
@@ -6658,6 +6888,15 @@ export type UIPassthroughContractBase = {
|
|
|
6658
6888
|
request: any;
|
|
6659
6889
|
response: any;
|
|
6660
6890
|
};
|
|
6891
|
+
[UIPassthroughEvent.GetUnsavedAnswerTML]: {
|
|
6892
|
+
request: {
|
|
6893
|
+
sessionId?: string;
|
|
6894
|
+
vizId?: string;
|
|
6895
|
+
};
|
|
6896
|
+
response: {
|
|
6897
|
+
tml: string;
|
|
6898
|
+
};
|
|
6899
|
+
};
|
|
6661
6900
|
};
|
|
6662
6901
|
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
6663
6902
|
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
@@ -6813,6 +7052,8 @@ declare class TsEmbed {
|
|
|
6813
7052
|
* work regardless of auth status
|
|
6814
7053
|
*/
|
|
6815
7054
|
private subscribeToNetworkEvents;
|
|
7055
|
+
private handleApiInterceptEvent;
|
|
7056
|
+
private messageEventListener;
|
|
6816
7057
|
/**
|
|
6817
7058
|
* Subscribe to message events that depend on successful iframe setup
|
|
6818
7059
|
*/
|
|
@@ -6899,6 +7140,14 @@ declare class TsEmbed {
|
|
|
6899
7140
|
* @param height The height in pixels
|
|
6900
7141
|
*/
|
|
6901
7142
|
protected setIFrameHeight(height: number | string): void;
|
|
7143
|
+
/**
|
|
7144
|
+
* We can process the customer given payload before sending it to the embed port
|
|
7145
|
+
* Embed event handler -> responder -> createEmbedEventResponder -> send response
|
|
7146
|
+
* @param eventPort The event port for a specific MessageChannel
|
|
7147
|
+
* @param eventType The event type
|
|
7148
|
+
* @returns
|
|
7149
|
+
*/
|
|
7150
|
+
protected createEmbedEventResponder: (eventPort: MessagePort | void, eventType: EmbedEvent) => (payload: any) => void;
|
|
6902
7151
|
/**
|
|
6903
7152
|
* Executes all registered event handlers for a particular event type
|
|
6904
7153
|
* @param eventType The event type
|
|
@@ -7619,11 +7868,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
7619
7868
|
* ```
|
|
7620
7869
|
*/
|
|
7621
7870
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState;
|
|
7622
|
-
/**
|
|
7623
|
-
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
7624
|
-
* @version SDK : 1.29.0 | ThoughtSpot: 10.1.0.cl
|
|
7625
|
-
*/
|
|
7626
|
-
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
7627
7871
|
/**
|
|
7628
7872
|
* Flag to use home page search bar mode
|
|
7629
7873
|
*
|
|
@@ -8712,13 +8956,6 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
8712
8956
|
* @deprecated Use {@link collapseSearchBar} instead
|
|
8713
8957
|
*/
|
|
8714
8958
|
collapseSearchBarInitially?: boolean;
|
|
8715
|
-
/**
|
|
8716
|
-
* Flag to enable onBeforeSearchExecute Embed Event
|
|
8717
|
-
*
|
|
8718
|
-
* Supported embed types: `SearchEmbed`
|
|
8719
|
-
* @version: SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl
|
|
8720
|
-
*/
|
|
8721
|
-
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
8722
8959
|
/**
|
|
8723
8960
|
* This controls the initial behaviour of custom column groups accordion.
|
|
8724
8961
|
* It takes DataPanelCustomColumnGroupsAccordionState enum values as input.
|
|
@@ -9080,7 +9317,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
9080
9317
|
*
|
|
9081
9318
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
9082
9319
|
* @default true
|
|
9083
|
-
* @version SDK: 1.
|
|
9320
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
9084
9321
|
* @example
|
|
9085
9322
|
* ```js
|
|
9086
9323
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -9195,7 +9432,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
9195
9432
|
* enablePastConversationsSidebar : true,
|
|
9196
9433
|
* })
|
|
9197
9434
|
* ```
|
|
9198
|
-
* @version SDK: 1.
|
|
9435
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
9199
9436
|
*/
|
|
9200
9437
|
enablePastConversationsSidebar?: boolean;
|
|
9201
9438
|
}
|