@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;
|
|
@@ -1541,7 +1545,7 @@ export interface FrameParams {
|
|
|
1541
1545
|
/**
|
|
1542
1546
|
* The common configuration object for an embedded view.
|
|
1543
1547
|
*/
|
|
1544
|
-
export interface BaseViewConfig {
|
|
1548
|
+
export interface BaseViewConfig extends ApiInterceptFlags {
|
|
1545
1549
|
/**
|
|
1546
1550
|
* @hidden
|
|
1547
1551
|
*/
|
|
@@ -2094,7 +2098,7 @@ export interface SearchLiveboardCommonViewConfig {
|
|
|
2094
2098
|
*
|
|
2095
2099
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
2096
2100
|
* @default true
|
|
2097
|
-
* @version SDK: 1.
|
|
2101
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
2098
2102
|
* @example
|
|
2099
2103
|
* ```js
|
|
2100
2104
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -2293,26 +2297,27 @@ export interface LiveboardAppEmbedViewConfig {
|
|
|
2293
2297
|
*/
|
|
2294
2298
|
enableAskSage?: boolean;
|
|
2295
2299
|
/**
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2300
|
+
* This flag is used to show or hide checkboxes for including or excluding
|
|
2301
|
+
* the cover and filters pages in the Liveboard PDF.
|
|
2302
|
+
*
|
|
2303
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2304
|
+
* @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
|
|
2305
|
+
* @example
|
|
2306
|
+
* ```js
|
|
2307
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
2308
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
2309
|
+
* ... // other embed view config
|
|
2310
|
+
* coverAndFilterOptionInPDF: false,
|
|
2311
|
+
* })
|
|
2312
|
+
* ```
|
|
2313
|
+
*/
|
|
2310
2314
|
coverAndFilterOptionInPDF?: boolean;
|
|
2311
2315
|
/**
|
|
2312
2316
|
* This flag is used to enable or disable the XLSX/CSV download option for Liveboards.
|
|
2317
|
+
* To enable this feature on your instance, contact ThoughtSpot Support.
|
|
2313
2318
|
*
|
|
2314
2319
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
2315
|
-
* @version SDK: 1.41.0 | ThoughtSpot:
|
|
2320
|
+
* @version SDK: 1.41.0 | ThoughtSpot: 26.3.0.cl
|
|
2316
2321
|
* @example
|
|
2317
2322
|
* ```js
|
|
2318
2323
|
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
@@ -2644,7 +2649,7 @@ export declare enum EmbedEvent {
|
|
|
2644
2649
|
*/
|
|
2645
2650
|
Load = "load",
|
|
2646
2651
|
/**
|
|
2647
|
-
* Data pertaining to an Answer or
|
|
2652
|
+
* Data pertaining to an Answer, Liveboard or Spotter visualization is received.
|
|
2648
2653
|
* The event payload includes the raw data of the object.
|
|
2649
2654
|
* @return data - Answer of Liveboard data
|
|
2650
2655
|
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
|
|
@@ -3063,6 +3068,17 @@ export declare enum EmbedEvent {
|
|
|
3063
3068
|
*```
|
|
3064
3069
|
*/
|
|
3065
3070
|
AnswerDelete = "answerDelete",
|
|
3071
|
+
/**
|
|
3072
|
+
* Emitted when the AI Highlights action is triggered on a Liveboard
|
|
3073
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
3074
|
+
* @example
|
|
3075
|
+
*```js
|
|
3076
|
+
* liveboardEmbed.on(EmbedEvent.AIHighlights, (payload) => {
|
|
3077
|
+
* console.log('AI Highlights', payload);
|
|
3078
|
+
* })
|
|
3079
|
+
*```
|
|
3080
|
+
*/
|
|
3081
|
+
AIHighlights = "AIHighlights",
|
|
3066
3082
|
/**
|
|
3067
3083
|
* Emitted when a user initiates the Pin action to
|
|
3068
3084
|
* add an Answer to a Liveboard.
|
|
@@ -3493,21 +3509,24 @@ export declare enum EmbedEvent {
|
|
|
3493
3509
|
|
|
3494
3510
|
* Prerequisite: Set `isOnBeforeGetVizDataInterceptEnabled` to `true`
|
|
3495
3511
|
* for this embed event to get emitted.
|
|
3496
|
-
* @param: payload
|
|
3497
|
-
* @param:
|
|
3512
|
+
* @param:payload The payload received from the embed related to the Data API call.
|
|
3513
|
+
* @param:responder
|
|
3498
3514
|
* Contains elements that lets developers define whether ThoughtSpot
|
|
3499
3515
|
* should run the search, and if not, what error message
|
|
3500
3516
|
* should be shown to the user.
|
|
3501
3517
|
*
|
|
3502
|
-
* execute
|
|
3518
|
+
* `execute` - When execute returns `true`, the search will be run.
|
|
3503
3519
|
* When execute returns `false`, the search will not be executed.
|
|
3504
3520
|
*
|
|
3505
|
-
* error
|
|
3506
|
-
*
|
|
3521
|
+
* `error` - Developers can customize the error message text when `execute`
|
|
3522
|
+
* is `false` using the `errorText` and `errorDescription` parameters in responder.
|
|
3523
|
+
*
|
|
3524
|
+
* `errorText` - The error message text to be shown to the user.
|
|
3525
|
+
* `errorDescription (ThoughtSpot: 10.15.0.cl and above)` - The error description to be shown to the user.
|
|
3507
3526
|
* @version SDK : 1.29.0 | ThoughtSpot: 10.3.0.cl
|
|
3508
3527
|
* @example
|
|
3509
3528
|
*```js
|
|
3510
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3529
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3511
3530
|
* (payload, responder) => {
|
|
3512
3531
|
* responder({
|
|
3513
3532
|
* data: {
|
|
@@ -3523,7 +3542,7 @@ export declare enum EmbedEvent {
|
|
|
3523
3542
|
* ```
|
|
3524
3543
|
*
|
|
3525
3544
|
*```js
|
|
3526
|
-
* .on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3545
|
+
* embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
|
|
3527
3546
|
* (payload, responder) => {
|
|
3528
3547
|
* const query = payload.data.data.answer.search_query
|
|
3529
3548
|
* responder({
|
|
@@ -3534,7 +3553,8 @@ export declare enum EmbedEvent {
|
|
|
3534
3553
|
* error: {
|
|
3535
3554
|
* //Provide a custom error message to explain to your end user
|
|
3536
3555
|
* // why their search did not run, and which searches are accepted by your custom logic.
|
|
3537
|
-
* errorText: "
|
|
3556
|
+
* errorText: "Error Occurred",
|
|
3557
|
+
* errorDescription: "You can't use this query :" + query + ".
|
|
3538
3558
|
* The 'sales' measures can never be used at the 'county' level.
|
|
3539
3559
|
* Please try another measure, or remove 'county' from your search."
|
|
3540
3560
|
* }
|
|
@@ -3598,17 +3618,17 @@ export declare enum EmbedEvent {
|
|
|
3598
3618
|
*/
|
|
3599
3619
|
TableVizRendered = "TableVizRendered",
|
|
3600
3620
|
/**
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3621
|
+
* Emitted when the liveboard is created from pin modal or Liveboard list page.
|
|
3622
|
+
* You can use this event as a hook to trigger
|
|
3623
|
+
* other events on liveboard creation.
|
|
3624
|
+
*
|
|
3625
|
+
* ```js
|
|
3626
|
+
* liveboardEmbed.on(EmbedEvent.CreateLiveboard, (payload) => {
|
|
3627
|
+
* console.log('payload', payload);
|
|
3628
|
+
* })
|
|
3629
|
+
*```
|
|
3630
|
+
* @version SDK : 1.37.0 | ThoughtSpot: 10.8.0.cl
|
|
3631
|
+
*/
|
|
3612
3632
|
CreateLiveboard = "createLiveboard",
|
|
3613
3633
|
/**
|
|
3614
3634
|
* Emitted when a user creates a Model.
|
|
@@ -3704,6 +3724,17 @@ export declare enum EmbedEvent {
|
|
|
3704
3724
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3705
3725
|
*/
|
|
3706
3726
|
SpotterInit = "spotterInit",
|
|
3727
|
+
/**
|
|
3728
|
+
* Emitted when a *Spotter* conversation has been successfully created.
|
|
3729
|
+
* @example
|
|
3730
|
+
* ```js
|
|
3731
|
+
* spotterEmbed.on(EmbedEvent.SpotterLoadComplete, (payload) => {
|
|
3732
|
+
* console.log('payload', payload);
|
|
3733
|
+
* })
|
|
3734
|
+
*```
|
|
3735
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 26.2.0.cl
|
|
3736
|
+
*/
|
|
3737
|
+
SpotterLoadComplete = "spotterLoadComplete",
|
|
3707
3738
|
/**
|
|
3708
3739
|
* @hidden
|
|
3709
3740
|
* Triggers when the embed listener is ready to receive events.
|
|
@@ -3726,7 +3757,73 @@ export declare enum EmbedEvent {
|
|
|
3726
3757
|
* ```
|
|
3727
3758
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
3728
3759
|
*/
|
|
3729
|
-
OrgSwitched = "orgSwitched"
|
|
3760
|
+
OrgSwitched = "orgSwitched",
|
|
3761
|
+
/**
|
|
3762
|
+
* Emitted when the user intercepts a URL.
|
|
3763
|
+
*
|
|
3764
|
+
* Supported on all embed types.
|
|
3765
|
+
*
|
|
3766
|
+
* @example
|
|
3767
|
+
*
|
|
3768
|
+
* ```js
|
|
3769
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3770
|
+
* console.log('payload', payload);
|
|
3771
|
+
* responder({
|
|
3772
|
+
* data: {
|
|
3773
|
+
* execute: false,
|
|
3774
|
+
* error: {
|
|
3775
|
+
* errorText: 'Error Occurred',
|
|
3776
|
+
* }
|
|
3777
|
+
* }
|
|
3778
|
+
* })
|
|
3779
|
+
* })
|
|
3780
|
+
* ```
|
|
3781
|
+
*
|
|
3782
|
+
* ```js
|
|
3783
|
+
* // We can also send a response for the intercepted api
|
|
3784
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3785
|
+
* console.log('payload', payload);
|
|
3786
|
+
* responder({
|
|
3787
|
+
* data: {
|
|
3788
|
+
* execute: false,
|
|
3789
|
+
* response: {
|
|
3790
|
+
* body: {
|
|
3791
|
+
* data: {
|
|
3792
|
+
* // Some api response
|
|
3793
|
+
* },
|
|
3794
|
+
* }
|
|
3795
|
+
* }
|
|
3796
|
+
* }
|
|
3797
|
+
* })
|
|
3798
|
+
* })
|
|
3799
|
+
*
|
|
3800
|
+
* // here embed will use the response from the responder as the response for the api
|
|
3801
|
+
* ```
|
|
3802
|
+
*
|
|
3803
|
+
* ```js
|
|
3804
|
+
* // We can also send error in response for the intercepted api
|
|
3805
|
+
* embed.on(EmbedEvent.ApiIntercept, (payload, responder) => {
|
|
3806
|
+
* console.log('payload', payload);
|
|
3807
|
+
* responder({
|
|
3808
|
+
* data: {
|
|
3809
|
+
* execute: false,
|
|
3810
|
+
* response: {
|
|
3811
|
+
* body: {
|
|
3812
|
+
* errors: [{
|
|
3813
|
+
* title: 'Error Occurred',
|
|
3814
|
+
* description: 'Error Description',
|
|
3815
|
+
* isUserError: true,
|
|
3816
|
+
* }],
|
|
3817
|
+
* data: {},
|
|
3818
|
+
* },
|
|
3819
|
+
* }
|
|
3820
|
+
* }
|
|
3821
|
+
* })
|
|
3822
|
+
* })
|
|
3823
|
+
* ```
|
|
3824
|
+
* @version SDK: 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
3825
|
+
*/
|
|
3826
|
+
ApiIntercept = "ApiIntercept"
|
|
3730
3827
|
}
|
|
3731
3828
|
/**
|
|
3732
3829
|
* Event types that can be triggered by the host application
|
|
@@ -4012,7 +4109,7 @@ export declare enum HostEvent {
|
|
|
4012
4109
|
* the following parameters:
|
|
4013
4110
|
*
|
|
4014
4111
|
* @param
|
|
4015
|
-
* `vizId`- GUID of the saved Answer or visualization to pin to a Liveboard.
|
|
4112
|
+
* `vizId`- GUID of the saved Answer or Spotter visualization ID to pin to a Liveboard.
|
|
4016
4113
|
* Optional when pinning a new chart or table generated from a Search query.
|
|
4017
4114
|
* **Required** in Spotter Embed.
|
|
4018
4115
|
* @param
|
|
@@ -4064,10 +4161,16 @@ export declare enum HostEvent {
|
|
|
4064
4161
|
* ```
|
|
4065
4162
|
* @example
|
|
4066
4163
|
* ```js
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4164
|
+
|
|
4165
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4166
|
+
* let latestSpotterVizId = '';
|
|
4167
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4168
|
+
* latestSpotterVizId = payload.data.id;
|
|
4169
|
+
* });
|
|
4170
|
+
*
|
|
4171
|
+
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
4172
|
+
* ```
|
|
4173
|
+
*
|
|
4071
4174
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4072
4175
|
*/
|
|
4073
4176
|
Pin = "pin",
|
|
@@ -4142,14 +4245,29 @@ export declare enum HostEvent {
|
|
|
4142
4245
|
* ```
|
|
4143
4246
|
* @example
|
|
4144
4247
|
* ```js
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4248
|
+
|
|
4249
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPdf host event.
|
|
4250
|
+
* let latestSpotterVizId = '';
|
|
4251
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4252
|
+
* latestSpotterVizId = payload.data.id;
|
|
4253
|
+
* });
|
|
4254
|
+
*
|
|
4255
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4256
|
+
* ```
|
|
4149
4257
|
*
|
|
4150
4258
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4151
4259
|
*/
|
|
4152
4260
|
DownloadAsPdf = "downloadAsPdf",
|
|
4261
|
+
/**
|
|
4262
|
+
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
4263
|
+
*
|
|
4264
|
+
* @example
|
|
4265
|
+
* ```js
|
|
4266
|
+
* liveboardEmbed.trigger(HostEvent.AIHighlights)
|
|
4267
|
+
* ```
|
|
4268
|
+
* @version SDK: 1.44.0 | ThoughtSpot: 10.15.0.cl
|
|
4269
|
+
*/
|
|
4270
|
+
AIHighlights = "AIHighlights",
|
|
4153
4271
|
/**
|
|
4154
4272
|
* Trigger the **Make a copy** action on a Liveboard,
|
|
4155
4273
|
* visualization, or Answer page.
|
|
@@ -4172,9 +4290,13 @@ export declare enum HostEvent {
|
|
|
4172
4290
|
* ```
|
|
4173
4291
|
* @example
|
|
4174
4292
|
* ```js
|
|
4175
|
-
*
|
|
4176
|
-
*
|
|
4177
|
-
*
|
|
4293
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in MakeACopy host event.
|
|
4294
|
+
* let latestSpotterVizId = '';
|
|
4295
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4296
|
+
* latestSpotterVizId = payload.data.id;
|
|
4297
|
+
* });
|
|
4298
|
+
*
|
|
4299
|
+
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4178
4300
|
* ```
|
|
4179
4301
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4180
4302
|
*/
|
|
@@ -4260,15 +4382,7 @@ export declare enum HostEvent {
|
|
|
4260
4382
|
* ```
|
|
4261
4383
|
* @example
|
|
4262
4384
|
* ```js
|
|
4263
|
-
*
|
|
4264
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4265
|
-
* });
|
|
4266
|
-
* ```
|
|
4267
|
-
* @example
|
|
4268
|
-
* ```js
|
|
4269
|
-
* const editResponse = await spotterEmbed.trigger(HostEvent.Edit, {
|
|
4270
|
-
* vizId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
4271
|
-
* });
|
|
4385
|
+
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4272
4386
|
* ```
|
|
4273
4387
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4274
4388
|
*/
|
|
@@ -4317,16 +4431,23 @@ export declare enum HostEvent {
|
|
|
4317
4431
|
* );
|
|
4318
4432
|
* })
|
|
4319
4433
|
* ```
|
|
4320
|
-
* @example
|
|
4434
|
+
* * @example
|
|
4321
4435
|
* ```js
|
|
4322
|
-
|
|
4323
|
-
|
|
4436
|
+
|
|
4437
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Pin host event.
|
|
4438
|
+
* let latestSpotterVizId = '';
|
|
4439
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4440
|
+
* latestSpotterVizId = payload.data.id;
|
|
4441
|
+
* });
|
|
4442
|
+
*
|
|
4443
|
+
* spotterEmbed.trigger(HostEvent.GetTML, {
|
|
4444
|
+
* vizId: latestSpotterVizId
|
|
4324
4445
|
* }).then((tml) => {
|
|
4325
4446
|
* console.log(
|
|
4326
4447
|
* tml.answer.search_query // TML representation of the search query
|
|
4327
4448
|
* );
|
|
4328
4449
|
* })
|
|
4329
|
-
|
|
4450
|
+
* ```
|
|
4330
4451
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4331
4452
|
* @important
|
|
4332
4453
|
*/
|
|
@@ -4390,7 +4511,7 @@ export declare enum HostEvent {
|
|
|
4390
4511
|
/**
|
|
4391
4512
|
* Trigger the **Download** action on charts in
|
|
4392
4513
|
* the embedded view.
|
|
4393
|
-
* @param - `vizId` refers to the
|
|
4514
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4394
4515
|
* @example
|
|
4395
4516
|
* ```js
|
|
4396
4517
|
* liveboardEmbed.trigger(HostEvent.Download, {vizId:
|
|
@@ -4400,9 +4521,13 @@ export declare enum HostEvent {
|
|
|
4400
4521
|
* embed.trigger(HostEvent.Download)
|
|
4401
4522
|
* ```
|
|
4402
4523
|
* ```js
|
|
4403
|
-
*
|
|
4404
|
-
*
|
|
4405
|
-
*
|
|
4524
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in Download host event.
|
|
4525
|
+
* let latestSpotterVizId = '';
|
|
4526
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4527
|
+
* latestSpotterVizId = payload.data.id;
|
|
4528
|
+
* });
|
|
4529
|
+
*
|
|
4530
|
+
* spotterEmbed.trigger(HostEvent.Download, { vizId: latestSpotterVizId });
|
|
4406
4531
|
* ```
|
|
4407
4532
|
* @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
|
|
4408
4533
|
* Use {@link DownloadAsPng}
|
|
@@ -4421,9 +4546,13 @@ export declare enum HostEvent {
|
|
|
4421
4546
|
*
|
|
4422
4547
|
* searchEmbed.trigger(HostEvent.DownloadAsPng)
|
|
4423
4548
|
*
|
|
4424
|
-
*
|
|
4425
|
-
*
|
|
4426
|
-
*
|
|
4549
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsPng host event.
|
|
4550
|
+
* let latestSpotterVizId = '';
|
|
4551
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4552
|
+
* latestSpotterVizId = payload.data.id;
|
|
4553
|
+
* });
|
|
4554
|
+
*
|
|
4555
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4427
4556
|
* ```
|
|
4428
4557
|
*
|
|
4429
4558
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
@@ -4432,7 +4561,7 @@ export declare enum HostEvent {
|
|
|
4432
4561
|
/**
|
|
4433
4562
|
* Trigger the **Download** > **CSV** action on tables in
|
|
4434
4563
|
* the embedded view.
|
|
4435
|
-
* @param - `vizId` refers to the
|
|
4564
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4436
4565
|
* @example
|
|
4437
4566
|
* ```js
|
|
4438
4567
|
* liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
|
|
@@ -4445,9 +4574,13 @@ export declare enum HostEvent {
|
|
|
4445
4574
|
* searchEmbed.trigger(HostEvent.DownloadAsCsv)
|
|
4446
4575
|
* ```
|
|
4447
4576
|
* ```js
|
|
4448
|
-
*
|
|
4449
|
-
*
|
|
4450
|
-
*
|
|
4577
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsCsv host event.
|
|
4578
|
+
* let latestSpotterVizId = '';
|
|
4579
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4580
|
+
* latestSpotterVizId = payload.data.id;
|
|
4581
|
+
* });
|
|
4582
|
+
*
|
|
4583
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4451
4584
|
* ```
|
|
4452
4585
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4453
4586
|
*/
|
|
@@ -4455,7 +4588,7 @@ export declare enum HostEvent {
|
|
|
4455
4588
|
/**
|
|
4456
4589
|
* Trigger the **Download** > **XLSX** action on tables
|
|
4457
4590
|
* in the embedded view.
|
|
4458
|
-
* @param - `vizId` refers to the
|
|
4591
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
|
|
4459
4592
|
* @example
|
|
4460
4593
|
* ```js
|
|
4461
4594
|
* liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
|
|
@@ -4468,9 +4601,13 @@ export declare enum HostEvent {
|
|
|
4468
4601
|
* searchEmbed.trigger(HostEvent.DownloadAsXlsx)
|
|
4469
4602
|
* ```
|
|
4470
4603
|
* ```js
|
|
4471
|
-
*
|
|
4472
|
-
*
|
|
4473
|
-
*
|
|
4604
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in DownloadAsXlsx host event.
|
|
4605
|
+
* let latestSpotterVizId = '';
|
|
4606
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4607
|
+
* latestSpotterVizId = payload.data.id;
|
|
4608
|
+
* });
|
|
4609
|
+
*
|
|
4610
|
+
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4474
4611
|
* ```
|
|
4475
4612
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4476
4613
|
*/
|
|
@@ -4507,7 +4644,7 @@ export declare enum HostEvent {
|
|
|
4507
4644
|
* ```
|
|
4508
4645
|
*
|
|
4509
4646
|
* ```js
|
|
4510
|
-
* // Save
|
|
4647
|
+
* // Save a Visualization in Spotter (requires vizId)
|
|
4511
4648
|
* spotterEmbed.trigger(HostEvent.Save, {
|
|
4512
4649
|
* vizId: "730496d6-6903-4601-937e-2c691821af3c"
|
|
4513
4650
|
* })
|
|
@@ -4808,15 +4945,21 @@ export declare enum HostEvent {
|
|
|
4808
4945
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
4809
4946
|
/**
|
|
4810
4947
|
* Triggers an action to update Parameter values on embedded
|
|
4811
|
-
* Answers, Liveboard and Spotter answer in Edit mode.
|
|
4948
|
+
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
4949
|
+
* @param - `name` - Name of the Parameter
|
|
4950
|
+
* @param - `value` - The value to set for the Parameter.
|
|
4951
|
+
*
|
|
4952
|
+
* Optionally, to control the visibility of the Parameter chip,
|
|
4953
|
+
* use the `isVisibleToUser` attribute when applying an override.
|
|
4812
4954
|
*
|
|
4813
4955
|
* @example
|
|
4814
4956
|
* ```js
|
|
4815
4957
|
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
4816
|
-
*
|
|
4817
|
-
*
|
|
4958
|
+
* name: "Integer Range Param",
|
|
4959
|
+
* value: 10,
|
|
4960
|
+
* isVisibleToUser: false
|
|
4818
4961
|
* }])
|
|
4819
|
-
*
|
|
4962
|
+
* ```
|
|
4820
4963
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4821
4964
|
*/
|
|
4822
4965
|
UpdateParameters = "UpdateParameters",
|
|
@@ -4829,11 +4972,13 @@ export declare enum HostEvent {
|
|
|
4829
4972
|
* });
|
|
4830
4973
|
*```
|
|
4831
4974
|
*```js
|
|
4832
|
-
*
|
|
4833
|
-
*
|
|
4834
|
-
*
|
|
4835
|
-
*
|
|
4975
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in GetParameters host event.
|
|
4976
|
+
* let latestSpotterVizId = '';
|
|
4977
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
4978
|
+
* latestSpotterVizId = payload.data.id;
|
|
4836
4979
|
* });
|
|
4980
|
+
*
|
|
4981
|
+
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
4837
4982
|
*```
|
|
4838
4983
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4839
4984
|
*/
|
|
@@ -4863,10 +5008,11 @@ export declare enum HostEvent {
|
|
|
4863
5008
|
* If no parameters are specified, the save action is
|
|
4864
5009
|
* triggered with a modal to prompt users to
|
|
4865
5010
|
* add a name and description for the Answer.
|
|
4866
|
-
* @param -
|
|
4867
|
-
*
|
|
4868
|
-
*
|
|
4869
|
-
* @param - `
|
|
5011
|
+
* @param - `vizId` refers to the Answer ID in Spotter embed
|
|
5012
|
+
* and is required in Spotter embed.
|
|
5013
|
+
* Optional attributes to set Answer properties include:
|
|
5014
|
+
* @param - `name` - Name string for the Answer.
|
|
5015
|
+
* @param - `description` - Description text for the Answer.
|
|
4870
5016
|
* @example
|
|
4871
5017
|
* ```js
|
|
4872
5018
|
* const saveAnswerResponse = await searchEmbed.trigger(HostEvent.SaveAnswer, {
|
|
@@ -4876,11 +5022,13 @@ export declare enum HostEvent {
|
|
|
4876
5022
|
* ```
|
|
4877
5023
|
* @example
|
|
4878
5024
|
* ```js
|
|
4879
|
-
*
|
|
4880
|
-
*
|
|
4881
|
-
*
|
|
4882
|
-
*
|
|
5025
|
+
* // You can use the Data event dispatched on each answer creation to get the vizId and use in SaveAnswer host event.
|
|
5026
|
+
* let latestSpotterVizId = '';
|
|
5027
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5028
|
+
* latestSpotterVizId = payload.data.id;
|
|
4883
5029
|
* });
|
|
5030
|
+
*
|
|
5031
|
+
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4884
5032
|
* ```
|
|
4885
5033
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4886
5034
|
*/
|
|
@@ -4964,12 +5112,15 @@ export declare enum HostEvent {
|
|
|
4964
5112
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
4965
5113
|
/**
|
|
4966
5114
|
* Toggle the visualization to chart or table view.
|
|
4967
|
-
* @param - `vizId ` refers to the
|
|
5115
|
+
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
4968
5116
|
* @example
|
|
4969
5117
|
* ```js
|
|
4970
|
-
*
|
|
4971
|
-
*
|
|
5118
|
+
* let latestSpotterVizId = '';
|
|
5119
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5120
|
+
* latestSpotterVizId = payload.data.id;
|
|
4972
5121
|
* });
|
|
5122
|
+
*
|
|
5123
|
+
* spotterEmbed.trigger(HostEvent.AnswerChartSwitcher, { vizId: latestSpotterVizId });
|
|
4973
5124
|
*```
|
|
4974
5125
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4975
5126
|
*/
|
|
@@ -4998,12 +5149,16 @@ export declare enum HostEvent {
|
|
|
4998
5149
|
*/
|
|
4999
5150
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
5000
5151
|
/**
|
|
5001
|
-
* Trigger the *
|
|
5002
|
-
* @param - `vizId` refers to the
|
|
5152
|
+
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
5153
|
+
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
5003
5154
|
* @example
|
|
5004
5155
|
* ```js
|
|
5005
|
-
*
|
|
5006
|
-
* {
|
|
5156
|
+
* let latestSpotterVizId = '';
|
|
5157
|
+
* spotterEmbed.on(EmbedEvent.Data, (payload) => {
|
|
5158
|
+
* latestSpotterVizId = payload.data.id;
|
|
5159
|
+
* });
|
|
5160
|
+
*
|
|
5161
|
+
* spotterEmbed.trigger(HostEvent.AskSpotter, { vizId: latestSpotterVizId });
|
|
5007
5162
|
* ```
|
|
5008
5163
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5009
5164
|
*/
|
|
@@ -5026,7 +5181,19 @@ export declare enum HostEvent {
|
|
|
5026
5181
|
* ```
|
|
5027
5182
|
* @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
|
|
5028
5183
|
*/
|
|
5029
|
-
DestroyEmbed = "EmbedDestroyed"
|
|
5184
|
+
DestroyEmbed = "EmbedDestroyed",
|
|
5185
|
+
/** Triggers a create new conversation operation in spotter embed.
|
|
5186
|
+
* @example
|
|
5187
|
+
* ```js
|
|
5188
|
+
* This feature is available only when chat history is enabled on your ThoughtSpot instance.
|
|
5189
|
+
* Contact your admin or ThoughtSpot Support to enable chat history on your instance.
|
|
5190
|
+
* @example
|
|
5191
|
+
* ```js
|
|
5192
|
+
* spotterEmbed.trigger(HostEvent.StartNewSpotterConversation);
|
|
5193
|
+
* ```
|
|
5194
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
5195
|
+
*/
|
|
5196
|
+
StartNewSpotterConversation = "StartNewSpotterConversation"
|
|
5030
5197
|
}
|
|
5031
5198
|
/**
|
|
5032
5199
|
* ThoughtSpot application pages include actions and menu commands
|
|
@@ -6491,7 +6658,66 @@ export interface DefaultAppInitData {
|
|
|
6491
6658
|
customVariablesForThirdPartyTools: Record<string, any>;
|
|
6492
6659
|
hiddenListColumns: ListPageColumns[];
|
|
6493
6660
|
customActions: CustomAction[];
|
|
6661
|
+
interceptTimeout: number | undefined;
|
|
6662
|
+
interceptUrls: (string | InterceptedApiType)[];
|
|
6663
|
+
}
|
|
6664
|
+
declare enum InterceptedApiType {
|
|
6665
|
+
/**
|
|
6666
|
+
* The apis that are use to get the data for the embed
|
|
6667
|
+
*/
|
|
6668
|
+
AnswerData = "AnswerData",
|
|
6669
|
+
/**
|
|
6670
|
+
* This will intercept all the apis
|
|
6671
|
+
*/
|
|
6672
|
+
ALL = "ALL",
|
|
6673
|
+
/**
|
|
6674
|
+
* The apis that are use to get the data for the liveboard
|
|
6675
|
+
*/
|
|
6676
|
+
LiveboardData = "LiveboardData"
|
|
6494
6677
|
}
|
|
6678
|
+
export type ApiInterceptFlags = {
|
|
6679
|
+
/**
|
|
6680
|
+
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
6681
|
+
*
|
|
6682
|
+
* Can be used for Serach and App Embed from SDK 1.29.0
|
|
6683
|
+
*
|
|
6684
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6685
|
+
*/
|
|
6686
|
+
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
6687
|
+
/**
|
|
6688
|
+
* This allows to intercept the urls passed, once intercepted the api will only
|
|
6689
|
+
* run based on the reponse from the responder of ApiIntercept event.
|
|
6690
|
+
*
|
|
6691
|
+
* @example
|
|
6692
|
+
* ```js
|
|
6693
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6694
|
+
* ...viewConfig,
|
|
6695
|
+
* enableApiIntercept: true,
|
|
6696
|
+
* interceptUrls: [InterceptedApiType.DATA],
|
|
6697
|
+
* })
|
|
6698
|
+
* ```
|
|
6699
|
+
*
|
|
6700
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6701
|
+
*/
|
|
6702
|
+
interceptUrls?: (string | InterceptedApiType)[];
|
|
6703
|
+
/**
|
|
6704
|
+
* The timeout for the intercept, default is 30000ms
|
|
6705
|
+
* the api will error out if the timeout is reached
|
|
6706
|
+
*
|
|
6707
|
+
* @example
|
|
6708
|
+
* ```js
|
|
6709
|
+
* const embed = new LiveboardEmbed('#embed', {
|
|
6710
|
+
* ...viewConfig,
|
|
6711
|
+
* enableApiIntercept: true,
|
|
6712
|
+
* interceptUrls: [InterceptedApiType.ALL],
|
|
6713
|
+
* interceptTimeout: 1000,
|
|
6714
|
+
* })
|
|
6715
|
+
* ```
|
|
6716
|
+
*
|
|
6717
|
+
* @version SDK : 1.43.0 | ThoughtSpot: 10.15.0.cl
|
|
6718
|
+
*/
|
|
6719
|
+
interceptTimeout?: number;
|
|
6720
|
+
};
|
|
6495
6721
|
declare enum AuthFailureType {
|
|
6496
6722
|
SDK = "SDK",
|
|
6497
6723
|
NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
|
|
@@ -6587,7 +6813,8 @@ declare enum UIPassthroughEvent {
|
|
|
6587
6813
|
GetDiscoverabilityStatus = "getDiscoverabilityStatus",
|
|
6588
6814
|
GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
|
|
6589
6815
|
GetAnswerConfig = "getAnswerPageConfig",
|
|
6590
|
-
GetLiveboardConfig = "getPinboardPageConfig"
|
|
6816
|
+
GetLiveboardConfig = "getPinboardPageConfig",
|
|
6817
|
+
GetUnsavedAnswerTML = "getUnsavedAnswerTML"
|
|
6591
6818
|
}
|
|
6592
6819
|
export type UIPassthroughContractBase = {
|
|
6593
6820
|
[UIPassthroughEvent.PinAnswerToLiveboard]: {
|
|
@@ -6642,6 +6869,15 @@ export type UIPassthroughContractBase = {
|
|
|
6642
6869
|
request: any;
|
|
6643
6870
|
response: any;
|
|
6644
6871
|
};
|
|
6872
|
+
[UIPassthroughEvent.GetUnsavedAnswerTML]: {
|
|
6873
|
+
request: {
|
|
6874
|
+
sessionId?: string;
|
|
6875
|
+
vizId?: string;
|
|
6876
|
+
};
|
|
6877
|
+
response: {
|
|
6878
|
+
tml: string;
|
|
6879
|
+
};
|
|
6880
|
+
};
|
|
6645
6881
|
};
|
|
6646
6882
|
export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
|
|
6647
6883
|
export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
|
|
@@ -6797,6 +7033,8 @@ declare class TsEmbed {
|
|
|
6797
7033
|
* work regardless of auth status
|
|
6798
7034
|
*/
|
|
6799
7035
|
private subscribeToNetworkEvents;
|
|
7036
|
+
private handleApiInterceptEvent;
|
|
7037
|
+
private messageEventListener;
|
|
6800
7038
|
/**
|
|
6801
7039
|
* Subscribe to message events that depend on successful iframe setup
|
|
6802
7040
|
*/
|
|
@@ -6883,6 +7121,14 @@ declare class TsEmbed {
|
|
|
6883
7121
|
* @param height The height in pixels
|
|
6884
7122
|
*/
|
|
6885
7123
|
protected setIFrameHeight(height: number | string): void;
|
|
7124
|
+
/**
|
|
7125
|
+
* We can process the customer given payload before sending it to the embed port
|
|
7126
|
+
* Embed event handler -> responder -> createEmbedEventResponder -> send response
|
|
7127
|
+
* @param eventPort The event port for a specific MessageChannel
|
|
7128
|
+
* @param eventType The event type
|
|
7129
|
+
* @returns
|
|
7130
|
+
*/
|
|
7131
|
+
protected createEmbedEventResponder: (eventPort: MessagePort | void, eventType: EmbedEvent) => (payload: any) => void;
|
|
6886
7132
|
/**
|
|
6887
7133
|
* Executes all registered event handlers for a particular event type
|
|
6888
7134
|
* @param eventType The event type
|
|
@@ -7361,13 +7607,6 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
7361
7607
|
* @deprecated Use {@link collapseSearchBar} instead
|
|
7362
7608
|
*/
|
|
7363
7609
|
collapseSearchBarInitially?: boolean;
|
|
7364
|
-
/**
|
|
7365
|
-
* Flag to enable onBeforeSearchExecute Embed Event
|
|
7366
|
-
*
|
|
7367
|
-
* Supported embed types: `SearchEmbed`
|
|
7368
|
-
* @version: SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl
|
|
7369
|
-
*/
|
|
7370
|
-
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
7371
7610
|
/**
|
|
7372
7611
|
* This controls the initial behaviour of custom column groups accordion.
|
|
7373
7612
|
* It takes DataPanelCustomColumnGroupsAccordionState enum values as input.
|
|
@@ -8170,11 +8409,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
8170
8409
|
* ```
|
|
8171
8410
|
*/
|
|
8172
8411
|
dataPanelCustomGroupsAccordionInitialState?: DataPanelCustomColumnGroupsAccordionState$1;
|
|
8173
|
-
/**
|
|
8174
|
-
* Flag that allows using `EmbedEvent.OnBeforeGetVizDataIntercept`.
|
|
8175
|
-
* @version SDK : 1.29.0 | ThoughtSpot: 10.1.0.cl
|
|
8176
|
-
*/
|
|
8177
|
-
isOnBeforeGetVizDataInterceptEnabled?: boolean;
|
|
8178
8412
|
/**
|
|
8179
8413
|
* Flag to use home page search bar mode
|
|
8180
8414
|
*
|
|
@@ -8868,7 +9102,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
8868
9102
|
*
|
|
8869
9103
|
* Supported embed types: `SageEmbed`, `AppEmbed`, `SearchBarEmbed`, `LiveboardEmbed`, `SearchEmbed`
|
|
8870
9104
|
* @default true
|
|
8871
|
-
* @version SDK: 1.
|
|
9105
|
+
* @version SDK: 1.41.1 | ThoughtSpot Cloud: 10.14.0.cl
|
|
8872
9106
|
* @example
|
|
8873
9107
|
* ```js
|
|
8874
9108
|
* // Replace <EmbedComponent> with embed component name. For example, SageEmbed, AppEmbed, or SearchBarEmbed
|
|
@@ -8983,7 +9217,7 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
|
|
|
8983
9217
|
* enablePastConversationsSidebar : true,
|
|
8984
9218
|
* })
|
|
8985
9219
|
* ```
|
|
8986
|
-
* @version SDK: 1.
|
|
9220
|
+
* @version SDK: 1.45.0 | ThoughtSpot: 26.2.0.cl
|
|
8987
9221
|
*/
|
|
8988
9222
|
enablePastConversationsSidebar?: boolean;
|
|
8989
9223
|
}
|