@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5-beta.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 +2 -2
- package/cjs/src/auth.d.ts +2 -1
- package/cjs/src/auth.d.ts.map +1 -1
- package/cjs/src/auth.js +2 -1
- package/cjs/src/auth.js.map +1 -1
- package/cjs/src/authToken.d.ts.map +1 -1
- package/cjs/src/authToken.js.map +1 -1
- package/cjs/src/css-variables.d.ts +51 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +1 -0
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +10 -1
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +46 -1
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/base.d.ts.map +1 -1
- package/cjs/src/embed/base.js.map +1 -1
- package/cjs/src/embed/base.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +72 -0
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +7 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +46 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +1 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +11 -2
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +96 -2
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/sage.d.ts.map +1 -1
- package/cjs/src/embed/sage.js.map +1 -1
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +41 -2
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +41 -2
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/react/index.d.ts.map +1 -1
- package/cjs/src/react/index.js +58 -53
- package/cjs/src/react/index.js.map +1 -1
- package/cjs/src/types.d.ts +730 -32
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +734 -3
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
- package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/cjs/src/utils/graphql/preview-service.js.map +1 -1
- package/cjs/src/utils/processData.d.ts.map +1 -1
- package/cjs/src/utils/processData.js.map +1 -1
- package/dist/{index-DGV_zh53.js → index-DW2wEHqy.js} +1 -1
- package/dist/src/auth.d.ts +2 -1
- package/dist/src/auth.d.ts.map +1 -1
- package/dist/src/authToken.d.ts.map +1 -1
- package/dist/src/css-variables.d.ts +51 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +1 -0
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +1 -0
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/sage.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +730 -32
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/dist/src/utils/processData.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +917 -77
- package/dist/tsembed-react.js +915 -75
- package/dist/tsembed.es.js +859 -24
- package/dist/tsembed.js +857 -22
- package/dist/visual-embed-sdk-react-full.d.ts +892 -54
- package/dist/visual-embed-sdk-react.d.ts +892 -54
- package/dist/visual-embed-sdk.d.ts +912 -56
- package/lib/package.json +2 -2
- package/lib/src/auth.d.ts +2 -1
- package/lib/src/auth.d.ts.map +1 -1
- package/lib/src/auth.js +2 -1
- package/lib/src/auth.js.map +1 -1
- package/lib/src/authToken.d.ts.map +1 -1
- package/lib/src/authToken.js.map +1 -1
- package/lib/src/css-variables.d.ts +51 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +1 -0
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +10 -1
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +46 -1
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/base.d.ts.map +1 -1
- package/lib/src/embed/base.js.map +1 -1
- package/lib/src/embed/base.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +73 -1
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +74 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +7 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +10 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +46 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +155 -0
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +1 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +11 -2
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +96 -2
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/sage.d.ts.map +1 -1
- package/lib/src/embed/sage.js.map +1 -1
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +41 -2
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +42 -3
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/react/index.d.ts.map +1 -1
- package/lib/src/react/index.js +58 -53
- package/lib/src/react/index.js.map +1 -1
- package/lib/src/types.d.ts +730 -32
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +734 -3
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
- package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
- package/lib/src/utils/graphql/answerService/answerService.js +4 -2
- package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
- package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
- package/lib/src/utils/graphql/preview-service.js.map +1 -1
- package/lib/src/utils/processData.d.ts.map +1 -1
- package/lib/src/utils/processData.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +912 -56
- package/package.json +2 -2
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +51 -17
- package/src/embed/app.spec.ts +62 -3
- package/src/embed/app.ts +10 -1
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +74 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +257 -0
- package/src/embed/hostEventClient/host-event-client.ts +70 -15
- package/src/embed/liveboard.spec.ts +126 -2
- package/src/embed/liveboard.ts +11 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/ts-embed.ts +43 -3
- package/src/react/index.tsx +76 -72
- package/src/types.ts +739 -31
- package/src/utils/graphql/answerService/answerService.ts +4 -5
- package/src/utils/graphql/preview-service.ts +0 -1
- package/src/utils/processData.ts +0 -5
package/lib/src/types.d.ts
CHANGED
|
@@ -3070,22 +3070,45 @@ export declare enum EmbedEvent {
|
|
|
3070
3070
|
/**
|
|
3071
3071
|
* Emitted when name, status (private or public) or filter values of a
|
|
3072
3072
|
* Personalised view is updated.
|
|
3073
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
3073
3074
|
* @returns viewName: string
|
|
3074
3075
|
* @returns viewId: string
|
|
3075
3076
|
* @returns liveboardId: string
|
|
3076
3077
|
* @returns isPublic: boolean
|
|
3077
3078
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3079
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3078
3080
|
*/
|
|
3079
3081
|
UpdatePersonalisedView = "updatePersonalisedView",
|
|
3082
|
+
/**
|
|
3083
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
3084
|
+
* Personalized view is updated.
|
|
3085
|
+
* @returns viewName: string
|
|
3086
|
+
* @returns viewId: string
|
|
3087
|
+
* @returns liveboardId: string
|
|
3088
|
+
* @returns isPublic: boolean
|
|
3089
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3090
|
+
*/
|
|
3091
|
+
UpdatePersonalizedView = "updatePersonalisedView",
|
|
3080
3092
|
/**
|
|
3081
3093
|
* Emitted when a Personalised view is saved.
|
|
3094
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
3082
3095
|
* @returns viewName: string
|
|
3083
3096
|
* @returns viewId: string
|
|
3084
3097
|
* @returns liveboardId: string
|
|
3085
3098
|
* @returns isPublic: boolean
|
|
3086
3099
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3100
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3087
3101
|
*/
|
|
3088
3102
|
SavePersonalisedView = "savePersonalisedView",
|
|
3103
|
+
/**
|
|
3104
|
+
* Emitted when a Personalized view is saved.
|
|
3105
|
+
* @returns viewName: string
|
|
3106
|
+
* @returns viewId: string
|
|
3107
|
+
* @returns liveboardId: string
|
|
3108
|
+
* @returns isPublic: boolean
|
|
3109
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3110
|
+
*/
|
|
3111
|
+
SavePersonalizedView = "savePersonalisedView",
|
|
3089
3112
|
/**
|
|
3090
3113
|
* Emitted when a Liveboard is reset.
|
|
3091
3114
|
* @returns viewName: string
|
|
@@ -3097,11 +3120,41 @@ export declare enum EmbedEvent {
|
|
|
3097
3120
|
ResetLiveboard = "resetLiveboard",
|
|
3098
3121
|
/**
|
|
3099
3122
|
* Emitted when a PersonalisedView is deleted.
|
|
3123
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
3100
3124
|
* @returns views: string[]
|
|
3101
3125
|
* @returns liveboardId: string
|
|
3102
3126
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3127
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3103
3128
|
*/
|
|
3104
3129
|
DeletePersonalisedView = "deletePersonalisedView",
|
|
3130
|
+
/**
|
|
3131
|
+
* Emitted when a PersonalizedView is deleted.
|
|
3132
|
+
* @returns views: string[]
|
|
3133
|
+
* @returns liveboardId: string
|
|
3134
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3135
|
+
*/
|
|
3136
|
+
DeletePersonalizedView = "deletePersonalisedView",
|
|
3137
|
+
/**
|
|
3138
|
+
* Emitted when a user selects a different Personalized View or
|
|
3139
|
+
* resets to the original/default view on a Liveboard.
|
|
3140
|
+
* @example
|
|
3141
|
+
* ```js
|
|
3142
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
3143
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
3144
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
3145
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
3146
|
+
* console.log(data.isPublic); // true | false
|
|
3147
|
+
* })
|
|
3148
|
+
* ```
|
|
3149
|
+
* @returns viewName: string - Name of the selected view,
|
|
3150
|
+
* or 'Original View' when reset to default.
|
|
3151
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
3152
|
+
* or null when reset to default.
|
|
3153
|
+
* @returns liveboardId: string
|
|
3154
|
+
* @returns isPublic: boolean
|
|
3155
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3156
|
+
*/
|
|
3157
|
+
ChangePersonalizedView = "changePersonalisedView",
|
|
3105
3158
|
/**
|
|
3106
3159
|
* Emitted when a user creates a Worksheet.
|
|
3107
3160
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -3135,7 +3188,8 @@ export declare enum EmbedEvent {
|
|
|
3135
3188
|
* @param - Includes the following parameters:
|
|
3136
3189
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
3137
3190
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
3138
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
3191
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
3192
|
+
* provide.
|
|
3139
3193
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
3140
3194
|
* When `execute` returns `false`, the search is not executed.
|
|
3141
3195
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -3569,6 +3623,25 @@ export declare enum EmbedEvent {
|
|
|
3569
3623
|
* );
|
|
3570
3624
|
* }
|
|
3571
3625
|
* ```
|
|
3626
|
+
*
|
|
3627
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
3628
|
+
*
|
|
3629
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
3630
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
3631
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
3632
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
3633
|
+
*
|
|
3634
|
+
* @example
|
|
3635
|
+
* ```js
|
|
3636
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3637
|
+
*
|
|
3638
|
+
* // Trigger Pin event with Search context
|
|
3639
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
3640
|
+
* vizId: "123",
|
|
3641
|
+
* liveboardId: "456"
|
|
3642
|
+
* }, ContextType.Search);
|
|
3643
|
+
* ```
|
|
3644
|
+
*
|
|
3572
3645
|
* @group Events
|
|
3573
3646
|
*/
|
|
3574
3647
|
export declare enum HostEvent {
|
|
@@ -3590,6 +3663,16 @@ export declare enum HostEvent {
|
|
|
3590
3663
|
execute: true
|
|
3591
3664
|
});
|
|
3592
3665
|
* ```
|
|
3666
|
+
* @example
|
|
3667
|
+
* ```js
|
|
3668
|
+
* // Trigger search from search context
|
|
3669
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3670
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
3671
|
+
* searchQuery: "[revenue] by [region]",
|
|
3672
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
3673
|
+
* execute: true
|
|
3674
|
+
* }, ContextType.Search);
|
|
3675
|
+
* ```
|
|
3593
3676
|
*/
|
|
3594
3677
|
Search = "search",
|
|
3595
3678
|
/**
|
|
@@ -3640,6 +3723,24 @@ export declare enum HostEvent {
|
|
|
3640
3723
|
* });
|
|
3641
3724
|
* })
|
|
3642
3725
|
* ```
|
|
3726
|
+
* @example
|
|
3727
|
+
* ```js
|
|
3728
|
+
* // Drill down from answer context
|
|
3729
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3730
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
3731
|
+
* points: { clickedPoint, selectedPoints },
|
|
3732
|
+
* autoDrillDown: true
|
|
3733
|
+
* }, ContextType.Answer);
|
|
3734
|
+
* ```
|
|
3735
|
+
* @example
|
|
3736
|
+
* ```js
|
|
3737
|
+
* // Drill down from search context
|
|
3738
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3739
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
3740
|
+
* points: { clickedPoint, selectedPoints },
|
|
3741
|
+
* columnGuid: "column-guid"
|
|
3742
|
+
* }, ContextType.Search);
|
|
3743
|
+
* ```
|
|
3643
3744
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
3644
3745
|
*/
|
|
3645
3746
|
DrillDown = "triggerDrillDown",
|
|
@@ -3660,6 +3761,13 @@ export declare enum HostEvent {
|
|
|
3660
3761
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
3661
3762
|
* console.log("iFrameURL",url);
|
|
3662
3763
|
* ```
|
|
3764
|
+
* @example
|
|
3765
|
+
* ```js
|
|
3766
|
+
* // Get iframe URL from specific context
|
|
3767
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3768
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
3769
|
+
* console.log("iFrameURL", url);
|
|
3770
|
+
* ```
|
|
3663
3771
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
3664
3772
|
*/
|
|
3665
3773
|
GetIframeUrl = "GetIframeUrl",
|
|
@@ -3673,6 +3781,15 @@ export declare enum HostEvent {
|
|
|
3673
3781
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
3674
3782
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
3675
3783
|
* ```
|
|
3784
|
+
* @example
|
|
3785
|
+
* ```js
|
|
3786
|
+
* // Set visible vizs from liveboard context
|
|
3787
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3788
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
3789
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
3790
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
3791
|
+
* ], ContextType.Liveboard);
|
|
3792
|
+
* ```
|
|
3676
3793
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
3677
3794
|
*/
|
|
3678
3795
|
SetVisibleVizs = "SetPinboardVisibleVizs",
|
|
@@ -3685,6 +3802,14 @@ export declare enum HostEvent {
|
|
|
3685
3802
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
3686
3803
|
* })
|
|
3687
3804
|
* ```
|
|
3805
|
+
* @example
|
|
3806
|
+
* ```js
|
|
3807
|
+
* // Set active tab from liveboard context
|
|
3808
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3809
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
3810
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3811
|
+
* }, ContextType.Liveboard);
|
|
3812
|
+
* ```
|
|
3688
3813
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
3689
3814
|
*/
|
|
3690
3815
|
SetActiveTab = "SetActiveTab",
|
|
@@ -3718,6 +3843,15 @@ export declare enum HostEvent {
|
|
|
3718
3843
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
3719
3844
|
* ])
|
|
3720
3845
|
* ```
|
|
3846
|
+
* @example
|
|
3847
|
+
* ```js
|
|
3848
|
+
* // Update runtime filters from liveboard context
|
|
3849
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3850
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
3851
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
3852
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
3853
|
+
* ], ContextType.Liveboard);
|
|
3854
|
+
* ```
|
|
3721
3855
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
3722
3856
|
* @important
|
|
3723
3857
|
*/
|
|
@@ -3751,6 +3885,14 @@ export declare enum HostEvent {
|
|
|
3751
3885
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
3752
3886
|
* { column: {columnId: '<column-GUID>'}})
|
|
3753
3887
|
* ```
|
|
3888
|
+
* @example
|
|
3889
|
+
* ```js
|
|
3890
|
+
* // Open filter from search context
|
|
3891
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3892
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
3893
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
3894
|
+
* }, ContextType.Search);
|
|
3895
|
+
* ```
|
|
3754
3896
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3755
3897
|
*/
|
|
3756
3898
|
OpenFilter = "openFilter",
|
|
@@ -3761,6 +3903,14 @@ export declare enum HostEvent {
|
|
|
3761
3903
|
* ```js
|
|
3762
3904
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
3763
3905
|
* ```
|
|
3906
|
+
* @example
|
|
3907
|
+
* ```js
|
|
3908
|
+
* // Add columns from search context
|
|
3909
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3910
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
3911
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
3912
|
+
* }, ContextType.Search);
|
|
3913
|
+
* ```
|
|
3764
3914
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3765
3915
|
*/
|
|
3766
3916
|
AddColumns = "addColumns",
|
|
@@ -3771,6 +3921,14 @@ export declare enum HostEvent {
|
|
|
3771
3921
|
* ```js
|
|
3772
3922
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
3773
3923
|
* ```
|
|
3924
|
+
* @example
|
|
3925
|
+
* ```js
|
|
3926
|
+
* // Remove column from search context
|
|
3927
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3928
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
3929
|
+
* columnId: 'column-guid'
|
|
3930
|
+
* }, ContextType.Search);
|
|
3931
|
+
* ```
|
|
3774
3932
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3775
3933
|
*/
|
|
3776
3934
|
RemoveColumn = "removeColumn",
|
|
@@ -3857,6 +4015,37 @@ export declare enum HostEvent {
|
|
|
3857
4015
|
*
|
|
3858
4016
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
3859
4017
|
* ```
|
|
4018
|
+
* @example
|
|
4019
|
+
* ```js
|
|
4020
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
4021
|
+
* // Pin from a search answer context
|
|
4022
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4023
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4024
|
+
* vizId: "123",
|
|
4025
|
+
* newVizName: "Sales by region",
|
|
4026
|
+
* liveboardId: "456"
|
|
4027
|
+
* }, ContextType.Search);
|
|
4028
|
+
* ```
|
|
4029
|
+
* @example
|
|
4030
|
+
* ```js
|
|
4031
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
4032
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4033
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4034
|
+
* vizId: "789",
|
|
4035
|
+
* newVizName: "Revenue trends",
|
|
4036
|
+
* liveboardId: "456"
|
|
4037
|
+
* }, ContextType.Answer);
|
|
4038
|
+
* ```
|
|
4039
|
+
* @example
|
|
4040
|
+
* ```js
|
|
4041
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
4042
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4043
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4044
|
+
* vizId: latestSpotterVizId,
|
|
4045
|
+
* newVizName: "AI-generated insights",
|
|
4046
|
+
* liveboardId: "456"
|
|
4047
|
+
* }, ContextType.Spotter);
|
|
4048
|
+
* ```
|
|
3860
4049
|
*
|
|
3861
4050
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3862
4051
|
*/
|
|
@@ -3867,6 +4056,12 @@ export declare enum HostEvent {
|
|
|
3867
4056
|
* @example
|
|
3868
4057
|
* ```js
|
|
3869
4058
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
4059
|
+
*```
|
|
4060
|
+
* @example
|
|
4061
|
+
* ```js
|
|
4062
|
+
* // Show liveboard info from liveboard context
|
|
4063
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4064
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
3870
4065
|
* ```
|
|
3871
4066
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3872
4067
|
*/
|
|
@@ -3877,6 +4072,12 @@ export declare enum HostEvent {
|
|
|
3877
4072
|
* ```js
|
|
3878
4073
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
3879
4074
|
* ```
|
|
4075
|
+
* @example
|
|
4076
|
+
* ```js
|
|
4077
|
+
* // Schedule from liveboard context
|
|
4078
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4079
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
4080
|
+
* ```
|
|
3880
4081
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3881
4082
|
*/
|
|
3882
4083
|
Schedule = "subscription",
|
|
@@ -3886,6 +4087,12 @@ export declare enum HostEvent {
|
|
|
3886
4087
|
* ```js
|
|
3887
4088
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
3888
4089
|
* ```
|
|
4090
|
+
* @example
|
|
4091
|
+
* ```js
|
|
4092
|
+
* // Manage schedules from liveboard context
|
|
4093
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4094
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
4095
|
+
* ```
|
|
3889
4096
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3890
4097
|
*/
|
|
3891
4098
|
SchedulesList = "schedule-list",
|
|
@@ -3896,6 +4103,18 @@ export declare enum HostEvent {
|
|
|
3896
4103
|
* ```js
|
|
3897
4104
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
3898
4105
|
* ```
|
|
4106
|
+
* @example
|
|
4107
|
+
* ```js
|
|
4108
|
+
* // Export TML from liveboard context
|
|
4109
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4110
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
4111
|
+
* ```
|
|
4112
|
+
* @example
|
|
4113
|
+
* ```js
|
|
4114
|
+
* // Export TML from search-answer context
|
|
4115
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4116
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
4117
|
+
* ```
|
|
3899
4118
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3900
4119
|
*/
|
|
3901
4120
|
ExportTML = "exportTSL",
|
|
@@ -3906,6 +4125,18 @@ export declare enum HostEvent {
|
|
|
3906
4125
|
* ```js
|
|
3907
4126
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
3908
4127
|
* ```
|
|
4128
|
+
* @example
|
|
4129
|
+
* ```js
|
|
4130
|
+
* // Edit TML from liveboard context
|
|
4131
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4132
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
4133
|
+
* ```
|
|
4134
|
+
* @example
|
|
4135
|
+
* ```js
|
|
4136
|
+
* // Edit TML from search-answer context
|
|
4137
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4138
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
4139
|
+
* ```
|
|
3909
4140
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3910
4141
|
*/
|
|
3911
4142
|
EditTML = "editTSL",
|
|
@@ -3915,6 +4146,12 @@ export declare enum HostEvent {
|
|
|
3915
4146
|
* ```js
|
|
3916
4147
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
3917
4148
|
* ```
|
|
4149
|
+
* @example
|
|
4150
|
+
* ```js
|
|
4151
|
+
* // Update TML from liveboard context
|
|
4152
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4153
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
4154
|
+
* ```
|
|
3918
4155
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3919
4156
|
*/
|
|
3920
4157
|
UpdateTML = "updateTSL",
|
|
@@ -3941,6 +4178,18 @@ export declare enum HostEvent {
|
|
|
3941
4178
|
*
|
|
3942
4179
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
3943
4180
|
* ```
|
|
4181
|
+
* @example
|
|
4182
|
+
* ```js
|
|
4183
|
+
* // Download as PDF from search-answer context
|
|
4184
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4185
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
4186
|
+
* ```
|
|
4187
|
+
* @example
|
|
4188
|
+
* ```js
|
|
4189
|
+
* // Download as PDF from liveboard context
|
|
4190
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4191
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
4192
|
+
* ```
|
|
3944
4193
|
*
|
|
3945
4194
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3946
4195
|
*/
|
|
@@ -3985,6 +4234,18 @@ export declare enum HostEvent {
|
|
|
3985
4234
|
*
|
|
3986
4235
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
3987
4236
|
* ```
|
|
4237
|
+
* @example
|
|
4238
|
+
* ```js
|
|
4239
|
+
* // Make a copy from answer context
|
|
4240
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4241
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
4242
|
+
* ```
|
|
4243
|
+
* @example
|
|
4244
|
+
* ```js
|
|
4245
|
+
* // Make a copy from search context
|
|
4246
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4247
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
4248
|
+
* ```
|
|
3988
4249
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3989
4250
|
*/
|
|
3990
4251
|
MakeACopy = "makeACopy",
|
|
@@ -4009,6 +4270,14 @@ export declare enum HostEvent {
|
|
|
4009
4270
|
* ```js
|
|
4010
4271
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
4011
4272
|
* ```
|
|
4273
|
+
* @example
|
|
4274
|
+
* ```js
|
|
4275
|
+
* // Explore from liveboard context
|
|
4276
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4277
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
4278
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4279
|
+
* }, ContextType.Liveboard);
|
|
4280
|
+
* ```
|
|
4012
4281
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4013
4282
|
*/
|
|
4014
4283
|
Explore = "explore",
|
|
@@ -4026,6 +4295,20 @@ export declare enum HostEvent {
|
|
|
4026
4295
|
* ```js
|
|
4027
4296
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
4028
4297
|
* ```
|
|
4298
|
+
* @example
|
|
4299
|
+
* ```js
|
|
4300
|
+
* // Create monitor from answer context
|
|
4301
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4302
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
4303
|
+
* ```
|
|
4304
|
+
* @example
|
|
4305
|
+
* ```js
|
|
4306
|
+
* // Create monitor from liveboard context
|
|
4307
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4308
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
4309
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4310
|
+
* }, ContextType.Liveboard);
|
|
4311
|
+
* ```
|
|
4029
4312
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4030
4313
|
*/
|
|
4031
4314
|
CreateMonitor = "createMonitor",
|
|
@@ -4047,6 +4330,20 @@ export declare enum HostEvent {
|
|
|
4047
4330
|
* ```js
|
|
4048
4331
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
4049
4332
|
* ```
|
|
4333
|
+
* @example
|
|
4334
|
+
* ```js
|
|
4335
|
+
* // Manage monitor from answer context
|
|
4336
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4337
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
4338
|
+
* ```
|
|
4339
|
+
* @example
|
|
4340
|
+
* ```js
|
|
4341
|
+
* // Manage monitor from liveboard context
|
|
4342
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4343
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
4344
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4345
|
+
* }, ContextType.Liveboard);
|
|
4346
|
+
* ```
|
|
4050
4347
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4051
4348
|
*/
|
|
4052
4349
|
ManageMonitor = "manageMonitor",
|
|
@@ -4072,6 +4369,26 @@ export declare enum HostEvent {
|
|
|
4072
4369
|
* ```js
|
|
4073
4370
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4074
4371
|
* ```
|
|
4372
|
+
* @example
|
|
4373
|
+
* ```js
|
|
4374
|
+
* // Using context parameter to edit liveboard context
|
|
4375
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4376
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
4377
|
+
* ```
|
|
4378
|
+
* @example
|
|
4379
|
+
* ```js
|
|
4380
|
+
* // Edit from search context
|
|
4381
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4382
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
4383
|
+
* ```
|
|
4384
|
+
* * @example
|
|
4385
|
+
* ```js
|
|
4386
|
+
* // Edit from spotter context
|
|
4387
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4388
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
4389
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4390
|
+
* }, ContextType.Spotter);
|
|
4391
|
+
* ```
|
|
4075
4392
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4076
4393
|
*/
|
|
4077
4394
|
Edit = "edit",
|
|
@@ -4089,6 +4406,20 @@ export declare enum HostEvent {
|
|
|
4089
4406
|
* ```js
|
|
4090
4407
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
4091
4408
|
* ```
|
|
4409
|
+
* @example
|
|
4410
|
+
* ```js
|
|
4411
|
+
* // Copy link from liveboard context
|
|
4412
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4413
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
4414
|
+
* ```
|
|
4415
|
+
* @example
|
|
4416
|
+
* ```js
|
|
4417
|
+
* // Copy link from liveboard visualization context
|
|
4418
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4419
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
4420
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4421
|
+
* }, ContextType.Liveboard);
|
|
4422
|
+
* ```
|
|
4092
4423
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4093
4424
|
*/
|
|
4094
4425
|
CopyLink = "embedDocument",
|
|
@@ -4106,6 +4437,20 @@ export declare enum HostEvent {
|
|
|
4106
4437
|
* ```js
|
|
4107
4438
|
* vizEmbed.trigger(HostEvent.Present)
|
|
4108
4439
|
* ```
|
|
4440
|
+
* @example
|
|
4441
|
+
* ```js
|
|
4442
|
+
* // Present from liveboard visualization context
|
|
4443
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4444
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
4445
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4446
|
+
* }, ContextType.Liveboard);
|
|
4447
|
+
* ```
|
|
4448
|
+
* @example
|
|
4449
|
+
* ```js
|
|
4450
|
+
* // Present from liveboard context
|
|
4451
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4452
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
4453
|
+
* ```
|
|
4109
4454
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4110
4455
|
*/
|
|
4111
4456
|
Present = "present",
|
|
@@ -4134,6 +4479,22 @@ export declare enum HostEvent {
|
|
|
4134
4479
|
* tml.answer.search_query // TML representation of the search query
|
|
4135
4480
|
* );
|
|
4136
4481
|
* })
|
|
4482
|
+
* ```
|
|
4483
|
+
* @example
|
|
4484
|
+
* ```js
|
|
4485
|
+
* // Get TML from search context
|
|
4486
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4487
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
4488
|
+
* console.log(tml.answer.search_query);
|
|
4489
|
+
* });
|
|
4490
|
+
* ```
|
|
4491
|
+
* @example
|
|
4492
|
+
* ```js
|
|
4493
|
+
* // Get TML from search-answer context
|
|
4494
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4495
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
4496
|
+
* console.log(tml.answer);
|
|
4497
|
+
* });
|
|
4137
4498
|
* ```
|
|
4138
4499
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4139
4500
|
* @important
|
|
@@ -4155,6 +4516,20 @@ export declare enum HostEvent {
|
|
|
4155
4516
|
* ```js
|
|
4156
4517
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
4157
4518
|
* ```
|
|
4519
|
+
* @example
|
|
4520
|
+
* ```js
|
|
4521
|
+
* // Show underlying data from liveboard visualization context
|
|
4522
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4523
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
4524
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4525
|
+
* }, ContextType.Liveboard);
|
|
4526
|
+
* ```
|
|
4527
|
+
* @example
|
|
4528
|
+
* ```js
|
|
4529
|
+
* // Show underlying data from search context
|
|
4530
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4531
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
4532
|
+
* ```
|
|
4158
4533
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4159
4534
|
*/
|
|
4160
4535
|
ShowUnderlyingData = "showUnderlyingData",
|
|
@@ -4172,6 +4547,18 @@ export declare enum HostEvent {
|
|
|
4172
4547
|
* ```js
|
|
4173
4548
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
4174
4549
|
* ```
|
|
4550
|
+
* @example
|
|
4551
|
+
* ```js
|
|
4552
|
+
* // Delete from liveboard context
|
|
4553
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4554
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
4555
|
+
* ```
|
|
4556
|
+
* @example
|
|
4557
|
+
* ```js
|
|
4558
|
+
* // Delete from search context
|
|
4559
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4560
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
4561
|
+
* ```
|
|
4175
4562
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4176
4563
|
*/
|
|
4177
4564
|
Delete = "onDeleteAnswer",
|
|
@@ -4192,6 +4579,20 @@ export declare enum HostEvent {
|
|
|
4192
4579
|
* ```js
|
|
4193
4580
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
4194
4581
|
* ```
|
|
4582
|
+
* @example
|
|
4583
|
+
* ```js
|
|
4584
|
+
* // SpotIQ analyze from search-answer context
|
|
4585
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4586
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
4587
|
+
* ```
|
|
4588
|
+
* @example
|
|
4589
|
+
* ```js
|
|
4590
|
+
* // SpotIQ analyze from search context
|
|
4591
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4592
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
4593
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4594
|
+
* }, ContextType.Liveboard);
|
|
4595
|
+
* ```
|
|
4195
4596
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4196
4597
|
*/
|
|
4197
4598
|
SpotIQAnalyze = "spotIQAnalyze",
|
|
@@ -4243,6 +4644,12 @@ export declare enum HostEvent {
|
|
|
4243
4644
|
*
|
|
4244
4645
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4245
4646
|
* ```
|
|
4647
|
+
* @example
|
|
4648
|
+
* ```js
|
|
4649
|
+
* // Download as PNG from search-answer context
|
|
4650
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4651
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
4652
|
+
* ```
|
|
4246
4653
|
*
|
|
4247
4654
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
4248
4655
|
*/
|
|
@@ -4271,6 +4678,18 @@ export declare enum HostEvent {
|
|
|
4271
4678
|
*
|
|
4272
4679
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4273
4680
|
* ```
|
|
4681
|
+
* @example
|
|
4682
|
+
* ```js
|
|
4683
|
+
* // Download as CSV from search-answer context
|
|
4684
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4685
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
4686
|
+
* ```
|
|
4687
|
+
* @example
|
|
4688
|
+
* ```js
|
|
4689
|
+
* // Download as CSV from search context
|
|
4690
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4691
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
4692
|
+
* ```
|
|
4274
4693
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4275
4694
|
*/
|
|
4276
4695
|
DownloadAsCsv = "downloadAsCSV",
|
|
@@ -4298,6 +4717,18 @@ export declare enum HostEvent {
|
|
|
4298
4717
|
*
|
|
4299
4718
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4300
4719
|
* ```
|
|
4720
|
+
* @example
|
|
4721
|
+
* ```js
|
|
4722
|
+
* // Download as XLSX from answer context
|
|
4723
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4724
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
4725
|
+
* ```
|
|
4726
|
+
* @example
|
|
4727
|
+
* ```js
|
|
4728
|
+
* // Download as XLSX from search context
|
|
4729
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4730
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
4731
|
+
* ```
|
|
4301
4732
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4302
4733
|
*/
|
|
4303
4734
|
DownloadAsXlsx = "downloadAsXLSX",
|
|
@@ -4311,6 +4742,18 @@ export declare enum HostEvent {
|
|
|
4311
4742
|
* ```js
|
|
4312
4743
|
* searchEmbed.trigger(HostEvent.Share)
|
|
4313
4744
|
* ```
|
|
4745
|
+
* @example
|
|
4746
|
+
* ```js
|
|
4747
|
+
* // Share from Liveboard context
|
|
4748
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4749
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
4750
|
+
* ```
|
|
4751
|
+
* @example
|
|
4752
|
+
* ```js
|
|
4753
|
+
* // Share from search-answer context
|
|
4754
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4755
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
4756
|
+
* ```
|
|
4314
4757
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4315
4758
|
*/
|
|
4316
4759
|
Share = "share",
|
|
@@ -4350,6 +4793,18 @@ export declare enum HostEvent {
|
|
|
4350
4793
|
*
|
|
4351
4794
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
4352
4795
|
* ```
|
|
4796
|
+
* @example
|
|
4797
|
+
* ```js
|
|
4798
|
+
* // Save from answer context
|
|
4799
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4800
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
4801
|
+
* ```
|
|
4802
|
+
* @example
|
|
4803
|
+
* ```js
|
|
4804
|
+
* // Save from search context
|
|
4805
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4806
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
4807
|
+
* ```
|
|
4353
4808
|
*
|
|
4354
4809
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4355
4810
|
*/
|
|
@@ -4366,6 +4821,20 @@ export declare enum HostEvent {
|
|
|
4366
4821
|
* ```js
|
|
4367
4822
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
4368
4823
|
* ```
|
|
4824
|
+
* @example
|
|
4825
|
+
* ```js
|
|
4826
|
+
* // Sync to sheets from answer context
|
|
4827
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4828
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
4829
|
+
* ```
|
|
4830
|
+
* @example
|
|
4831
|
+
* ```js
|
|
4832
|
+
* // Sync to sheets from liveboard context
|
|
4833
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4834
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
4835
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4836
|
+
* }, ContextType.Liveboard);
|
|
4837
|
+
* ```
|
|
4369
4838
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4370
4839
|
*/
|
|
4371
4840
|
SyncToSheets = "sync-to-sheets",
|
|
@@ -4382,6 +4851,20 @@ export declare enum HostEvent {
|
|
|
4382
4851
|
* ```js
|
|
4383
4852
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
4384
4853
|
* ```
|
|
4854
|
+
* @example
|
|
4855
|
+
* ```js
|
|
4856
|
+
* // Sync to other apps from answer context
|
|
4857
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4858
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
4859
|
+
* ```
|
|
4860
|
+
* @example
|
|
4861
|
+
* ```js
|
|
4862
|
+
* // Sync to other apps from liveboard context
|
|
4863
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4864
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
4865
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4866
|
+
* }, ContextType.Liveboard);
|
|
4867
|
+
* ```
|
|
4385
4868
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4386
4869
|
*/
|
|
4387
4870
|
SyncToOtherApps = "sync-to-other-apps",
|
|
@@ -4398,6 +4881,20 @@ export declare enum HostEvent {
|
|
|
4398
4881
|
* ```js
|
|
4399
4882
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
4400
4883
|
* ```
|
|
4884
|
+
* @example
|
|
4885
|
+
* ```js
|
|
4886
|
+
* // Manage pipelines from answer context
|
|
4887
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4888
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
4889
|
+
* ```
|
|
4890
|
+
* @example
|
|
4891
|
+
* ```js
|
|
4892
|
+
* // Manage pipelines from liveboard context
|
|
4893
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4894
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
4895
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4896
|
+
* }, ContextType.Liveboard);
|
|
4897
|
+
* ```
|
|
4401
4898
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4402
4899
|
*/
|
|
4403
4900
|
ManagePipelines = "manage-pipeline",
|
|
@@ -4410,6 +4907,12 @@ export declare enum HostEvent {
|
|
|
4410
4907
|
* ```js
|
|
4411
4908
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
4412
4909
|
* ```
|
|
4910
|
+
* @example
|
|
4911
|
+
* ```js
|
|
4912
|
+
* // Reset search from search context
|
|
4913
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4914
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
4915
|
+
* ```
|
|
4413
4916
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
4414
4917
|
*/
|
|
4415
4918
|
ResetSearch = "resetSearch",
|
|
@@ -4421,6 +4924,13 @@ export declare enum HostEvent {
|
|
|
4421
4924
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
4422
4925
|
* console.log('data', data);
|
|
4423
4926
|
* ```
|
|
4927
|
+
* @example
|
|
4928
|
+
* ```js
|
|
4929
|
+
* // Get filters from liveboard context
|
|
4930
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4931
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
4932
|
+
* console.log('filters', data);
|
|
4933
|
+
* ```
|
|
4424
4934
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4425
4935
|
*/
|
|
4426
4936
|
GetFilters = "getFilters",
|
|
@@ -4428,7 +4938,8 @@ export declare enum HostEvent {
|
|
|
4428
4938
|
* Update one or several filters applied on a Liveboard.
|
|
4429
4939
|
* @param - Includes the following keys:
|
|
4430
4940
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
4431
|
-
* values.
|
|
4941
|
+
* values.
|
|
4942
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
4432
4943
|
* and values for each.
|
|
4433
4944
|
*
|
|
4434
4945
|
* Each filter object must include the following attributes:
|
|
@@ -4511,6 +5022,18 @@ export declare enum HostEvent {
|
|
|
4511
5022
|
* }]
|
|
4512
5023
|
* });
|
|
4513
5024
|
* ```
|
|
5025
|
+
* @example
|
|
5026
|
+
* ```js
|
|
5027
|
+
* // Update filters from liveboard context
|
|
5028
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5029
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
5030
|
+
* filter: {
|
|
5031
|
+
* column: "item type",
|
|
5032
|
+
* oper: "IN",
|
|
5033
|
+
* values: ["shoes", "boots"]
|
|
5034
|
+
* }
|
|
5035
|
+
* }, ContextType.Liveboard);
|
|
5036
|
+
* ```
|
|
4514
5037
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4515
5038
|
*/
|
|
4516
5039
|
UpdateFilters = "updateFilters",
|
|
@@ -4524,6 +5047,14 @@ export declare enum HostEvent {
|
|
|
4524
5047
|
* );
|
|
4525
5048
|
* })
|
|
4526
5049
|
* ```
|
|
5050
|
+
* @example
|
|
5051
|
+
* ```js
|
|
5052
|
+
* // Get tabs from liveboard context
|
|
5053
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5054
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
5055
|
+
* console.log('tabs', tabDetails);
|
|
5056
|
+
* });
|
|
5057
|
+
* ```
|
|
4527
5058
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
4528
5059
|
*/
|
|
4529
5060
|
GetTabs = "getTabs",
|
|
@@ -4537,6 +5068,15 @@ export declare enum HostEvent {
|
|
|
4537
5068
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
4538
5069
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
4539
5070
|
* ```
|
|
5071
|
+
* @example
|
|
5072
|
+
* ```js
|
|
5073
|
+
* // Set visible tabs from liveboard context
|
|
5074
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5075
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
5076
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
5077
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
5078
|
+
* ], ContextType.Liveboard);
|
|
5079
|
+
* ```
|
|
4540
5080
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4541
5081
|
*/
|
|
4542
5082
|
SetVisibleTabs = "SetPinboardVisibleTabs",
|
|
@@ -4550,6 +5090,15 @@ export declare enum HostEvent {
|
|
|
4550
5090
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
4551
5091
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
4552
5092
|
* ```
|
|
5093
|
+
* @example
|
|
5094
|
+
* ```js
|
|
5095
|
+
* // Set hidden tabs from liveboard context
|
|
5096
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5097
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
5098
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
5099
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
5100
|
+
* ], ContextType.Liveboard);
|
|
5101
|
+
* ```
|
|
4553
5102
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4554
5103
|
*/
|
|
4555
5104
|
SetHiddenTabs = "SetPinboardHiddenTabs",
|
|
@@ -4626,13 +5175,24 @@ export declare enum HostEvent {
|
|
|
4626
5175
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
4627
5176
|
/**
|
|
4628
5177
|
* Trigger reset action for a personalized Liveboard view.
|
|
5178
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
4629
5179
|
* @example
|
|
4630
5180
|
* ```js
|
|
4631
5181
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
4632
5182
|
* ```
|
|
4633
5183
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
5184
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4634
5185
|
*/
|
|
4635
5186
|
ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
|
|
5187
|
+
/**
|
|
5188
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
5189
|
+
* @example
|
|
5190
|
+
* ```js
|
|
5191
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
5192
|
+
* ```
|
|
5193
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5194
|
+
*/
|
|
5195
|
+
ResetLiveboardPersonalizedView = "ResetLiveboardPersonalisedView",
|
|
4636
5196
|
/**
|
|
4637
5197
|
* Triggers an action to update Parameter values on embedded
|
|
4638
5198
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -4649,6 +5209,16 @@ export declare enum HostEvent {
|
|
|
4649
5209
|
* isVisibleToUser: false
|
|
4650
5210
|
* }])
|
|
4651
5211
|
* ```
|
|
5212
|
+
* @example
|
|
5213
|
+
* ```js
|
|
5214
|
+
* // Update parameters from liveboard context
|
|
5215
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5216
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
5217
|
+
* name: "Region Param",
|
|
5218
|
+
* value: "West",
|
|
5219
|
+
* isVisibleToUser: true
|
|
5220
|
+
* }], ContextType.Liveboard);
|
|
5221
|
+
* ```
|
|
4652
5222
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4653
5223
|
*/
|
|
4654
5224
|
UpdateParameters = "UpdateParameters",
|
|
@@ -4668,18 +5238,77 @@ export declare enum HostEvent {
|
|
|
4668
5238
|
* });
|
|
4669
5239
|
*
|
|
4670
5240
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
5241
|
+
*```
|
|
5242
|
+
* @example
|
|
5243
|
+
* ```js
|
|
5244
|
+
* // Get parameters from liveboard context
|
|
5245
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5246
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
5247
|
+
* console.log('parameters', parameters);
|
|
5248
|
+
* });
|
|
4671
5249
|
* ```
|
|
4672
5250
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4673
5251
|
*/
|
|
4674
5252
|
GetParameters = "GetParameters",
|
|
4675
5253
|
/**
|
|
4676
5254
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
5255
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
4677
5256
|
* ```js
|
|
4678
5257
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4679
5258
|
* ```
|
|
5259
|
+
* @example
|
|
5260
|
+
* ```js
|
|
5261
|
+
* // Update personalized view from liveboard context
|
|
5262
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5263
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
5264
|
+
* viewId: '1234'
|
|
5265
|
+
* }, ContextType.Liveboard);
|
|
5266
|
+
* ```
|
|
4680
5267
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
5268
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4681
5269
|
*/
|
|
4682
5270
|
UpdatePersonalisedView = "UpdatePersonalisedView",
|
|
5271
|
+
/**
|
|
5272
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
5273
|
+
* ```js
|
|
5274
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
5275
|
+
* ```
|
|
5276
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5277
|
+
*/
|
|
5278
|
+
UpdatePersonalizedView = "UpdatePersonalisedView",
|
|
5279
|
+
/**
|
|
5280
|
+
* Triggers selection of a specific Personalized View on a
|
|
5281
|
+
* Liveboard without reloading the embed. Pass either a
|
|
5282
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
5283
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
5284
|
+
* When a `viewName` is provided and multiple views share
|
|
5285
|
+
* the same name, the first match is selected.
|
|
5286
|
+
* @example
|
|
5287
|
+
* ```js
|
|
5288
|
+
* liveboardEmbed.trigger(
|
|
5289
|
+
* HostEvent.SelectPersonalizedView,
|
|
5290
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
5291
|
+
* )
|
|
5292
|
+
* ```
|
|
5293
|
+
* @example
|
|
5294
|
+
* ```js
|
|
5295
|
+
* // Select by name
|
|
5296
|
+
* liveboardEmbed.trigger(
|
|
5297
|
+
* HostEvent.SelectPersonalizedView,
|
|
5298
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
5299
|
+
* )
|
|
5300
|
+
* ```
|
|
5301
|
+
* @example
|
|
5302
|
+
* ```js
|
|
5303
|
+
* // Reset to default view
|
|
5304
|
+
* liveboardEmbed.trigger(
|
|
5305
|
+
* HostEvent.SelectPersonalizedView,
|
|
5306
|
+
* {},
|
|
5307
|
+
* )
|
|
5308
|
+
* ```
|
|
5309
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5310
|
+
*/
|
|
5311
|
+
SelectPersonalizedView = "SelectPersonalisedView",
|
|
4683
5312
|
/**
|
|
4684
5313
|
* @hidden
|
|
4685
5314
|
* Notify when info call is completed successfully
|
|
@@ -4699,7 +5328,8 @@ export declare enum HostEvent {
|
|
|
4699
5328
|
* add a name and description for the Answer.
|
|
4700
5329
|
* @param - Includes the following keys:
|
|
4701
5330
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
4702
|
-
* embed.
|
|
5331
|
+
* embed.
|
|
5332
|
+
* - `name`: Optional. Name string for the Answer.
|
|
4703
5333
|
* - `description`: Optional. Description text for the Answer.
|
|
4704
5334
|
* @example
|
|
4705
5335
|
* ```js
|
|
@@ -4718,6 +5348,34 @@ export declare enum HostEvent {
|
|
|
4718
5348
|
*
|
|
4719
5349
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4720
5350
|
* ```
|
|
5351
|
+
* @example
|
|
5352
|
+
* ```js
|
|
5353
|
+
* // Using context parameter to save answer from search context
|
|
5354
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5355
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5356
|
+
* name: "Regional sales analysis",
|
|
5357
|
+
* description: "Sales breakdown by region"
|
|
5358
|
+
* }, ContextType.Search);
|
|
5359
|
+
* ```
|
|
5360
|
+
* @example
|
|
5361
|
+
* ```js
|
|
5362
|
+
* // Save answer from answer context (explore modal)
|
|
5363
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5364
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5365
|
+
* name: "Modified analysis",
|
|
5366
|
+
* description: "Updated from explore view"
|
|
5367
|
+
* }, ContextType.Answer);
|
|
5368
|
+
* ```
|
|
5369
|
+
* @example
|
|
5370
|
+
* ```js
|
|
5371
|
+
* // Save answer from spotter context
|
|
5372
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5373
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5374
|
+
* vizId: latestSpotterVizId,
|
|
5375
|
+
* name: "AI insights",
|
|
5376
|
+
* description: "Generated from Spotter"
|
|
5377
|
+
* }, ContextType.Spotter);
|
|
5378
|
+
* ```
|
|
4721
5379
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4722
5380
|
*/
|
|
4723
5381
|
SaveAnswer = "saveAnswer",
|
|
@@ -4759,6 +5417,15 @@ export declare enum HostEvent {
|
|
|
4759
5417
|
* executeSearch: true,
|
|
4760
5418
|
* })
|
|
4761
5419
|
* ```
|
|
5420
|
+
* @example
|
|
5421
|
+
* ```js
|
|
5422
|
+
* // Spotter search from spotter context
|
|
5423
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5424
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
5425
|
+
* query: 'sales by region',
|
|
5426
|
+
* executeSearch: true
|
|
5427
|
+
* }, ContextType.Spotter);
|
|
5428
|
+
* ```
|
|
4762
5429
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4763
5430
|
*/
|
|
4764
5431
|
SpotterSearch = "SpotterSearch",
|
|
@@ -4769,6 +5436,12 @@ export declare enum HostEvent {
|
|
|
4769
5436
|
* ```js
|
|
4770
5437
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
4771
5438
|
* ```
|
|
5439
|
+
* @example
|
|
5440
|
+
* ```js
|
|
5441
|
+
* // Edit last prompt from spotter context
|
|
5442
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5443
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
5444
|
+
* ```
|
|
4772
5445
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4773
5446
|
*/
|
|
4774
5447
|
EditLastPrompt = "EditLastPrompt",
|
|
@@ -4778,6 +5451,12 @@ export declare enum HostEvent {
|
|
|
4778
5451
|
* ```js
|
|
4779
5452
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
4780
5453
|
* ```
|
|
5454
|
+
* @example
|
|
5455
|
+
* ```js
|
|
5456
|
+
* // Preview spotter data from spotter context
|
|
5457
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5458
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
5459
|
+
* ```
|
|
4781
5460
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4782
5461
|
*/
|
|
4783
5462
|
PreviewSpotterData = "PreviewSpotterData",
|
|
@@ -6036,13 +6715,25 @@ export declare enum Action {
|
|
|
6036
6715
|
/**
|
|
6037
6716
|
* The Liveboard Personalised Views dropdown.
|
|
6038
6717
|
* Allows navigating to a personalized Liveboard View.
|
|
6718
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
6039
6719
|
* @example
|
|
6040
6720
|
* ```js
|
|
6041
6721
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
6042
6722
|
* ```
|
|
6043
6723
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
6724
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6044
6725
|
*/
|
|
6045
6726
|
PersonalisedViewsDropdown = "personalisedViewsDropdown",
|
|
6727
|
+
/**
|
|
6728
|
+
* The Liveboard Personalized Views dropdown.
|
|
6729
|
+
* Allows navigating to a personalized Liveboard View.
|
|
6730
|
+
* @example
|
|
6731
|
+
* ```js
|
|
6732
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
6733
|
+
* ```
|
|
6734
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6735
|
+
*/
|
|
6736
|
+
PersonalizedViewsDropdown = "personalisedViewsDropdown",
|
|
6046
6737
|
/**
|
|
6047
6738
|
* Action ID for show or hide the user details on a
|
|
6048
6739
|
* Liveboard (Recently visited / social proof)
|
|
@@ -6130,14 +6821,27 @@ export declare enum Action {
|
|
|
6130
6821
|
/**
|
|
6131
6822
|
* The **Organize Favourites** action on Homepage
|
|
6132
6823
|
* *Favorites* module.
|
|
6824
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
6133
6825
|
*
|
|
6134
6826
|
* @example
|
|
6135
6827
|
* ```js
|
|
6136
6828
|
* disabledActions: [Action.OrganiseFavourites]
|
|
6137
6829
|
* ```
|
|
6138
6830
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
6831
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6139
6832
|
*/
|
|
6140
6833
|
OrganiseFavourites = "organiseFavourites",
|
|
6834
|
+
/**
|
|
6835
|
+
* The **Organize Favorites** action on Homepage
|
|
6836
|
+
* *Favorites* module.
|
|
6837
|
+
*
|
|
6838
|
+
* @example
|
|
6839
|
+
* ```js
|
|
6840
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
6841
|
+
* ```
|
|
6842
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6843
|
+
*/
|
|
6844
|
+
OrganizeFavorites = "organiseFavourites",
|
|
6141
6845
|
/**
|
|
6142
6846
|
* The **AI Highlights** action on a Liveboard.
|
|
6143
6847
|
*
|
|
@@ -6952,7 +7656,8 @@ export declare enum EmbedErrorCodes {
|
|
|
6952
7656
|
*
|
|
6953
7657
|
* - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
|
|
6954
7658
|
* - **message**: Human-readable error description (string or array of strings for
|
|
6955
|
-
* multiple errors)
|
|
7659
|
+
* multiple errors)
|
|
7660
|
+
* - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
|
|
6956
7661
|
* values
|
|
6957
7662
|
* - **[key: string]**: Additional context-specific for backward compatibility
|
|
6958
7663
|
*
|
|
@@ -7000,6 +7705,22 @@ export interface EmbedErrorDetailsEvent {
|
|
|
7000
7705
|
/** Additional context-specific for backward compatibility */
|
|
7001
7706
|
[key: string]: any;
|
|
7002
7707
|
}
|
|
7708
|
+
/**
|
|
7709
|
+
* Context types for specifying the page context when triggering host events.
|
|
7710
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
7711
|
+
* understand the current page context for better event handling.
|
|
7712
|
+
*
|
|
7713
|
+
* @example
|
|
7714
|
+
* ```js
|
|
7715
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
7716
|
+
*
|
|
7717
|
+
* // Trigger an event with specific context
|
|
7718
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
7719
|
+
* ```
|
|
7720
|
+
*
|
|
7721
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7722
|
+
* @group Events
|
|
7723
|
+
*/
|
|
7003
7724
|
export declare enum ContextType {
|
|
7004
7725
|
/**
|
|
7005
7726
|
* Search answer context for search page or edit viz dialog on liveboard page.
|
|
@@ -7016,7 +7737,11 @@ export declare enum ContextType {
|
|
|
7016
7737
|
/**
|
|
7017
7738
|
* Spotter context for spotter modal/page.
|
|
7018
7739
|
*/
|
|
7019
|
-
Spotter = "spotter"
|
|
7740
|
+
Spotter = "spotter",
|
|
7741
|
+
/**
|
|
7742
|
+
* Other context for any other generic page.
|
|
7743
|
+
*/
|
|
7744
|
+
Other = "other"
|
|
7020
7745
|
}
|
|
7021
7746
|
export interface DefaultAppInitData {
|
|
7022
7747
|
customisations: CustomisationsInterface;
|
|
@@ -7119,33 +7844,6 @@ export interface ObjectIds {
|
|
|
7119
7844
|
*/
|
|
7120
7845
|
modalTitle?: string;
|
|
7121
7846
|
}
|
|
7122
|
-
/**
|
|
7123
|
-
* Context object for the embedded component.
|
|
7124
|
-
* @example
|
|
7125
|
-
* ```js
|
|
7126
|
-
* const context = await embed.getCurrentContext();
|
|
7127
|
-
* console.log(context);
|
|
7128
|
-
* {
|
|
7129
|
-
* stack: [
|
|
7130
|
-
* {
|
|
7131
|
-
* name: 'Liveboard',
|
|
7132
|
-
* type: ContextType.Liveboard,
|
|
7133
|
-
* objectIds: {
|
|
7134
|
-
* liveboardId: '123',
|
|
7135
|
-
* },
|
|
7136
|
-
* },
|
|
7137
|
-
* ],
|
|
7138
|
-
* currentContext: {
|
|
7139
|
-
* name: 'Liveboard',
|
|
7140
|
-
* type: ContextType.Liveboard,
|
|
7141
|
-
* objectIds: {
|
|
7142
|
-
* liveboardId: '123',
|
|
7143
|
-
* },
|
|
7144
|
-
* },
|
|
7145
|
-
* }
|
|
7146
|
-
* ```
|
|
7147
|
-
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7148
|
-
*/
|
|
7149
7847
|
export interface ContextObject {
|
|
7150
7848
|
/**
|
|
7151
7849
|
* Stack of context objects.
|