@thoughtspot/visual-embed-sdk 1.46.4 → 1.46.5
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 +3 -3
- 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 +87 -17
- package/cjs/src/css-variables.d.ts.map +1 -1
- package/cjs/src/embed/app.d.ts +41 -1
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +25 -36
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +35 -23
- 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/conversation.d.ts +23 -1
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +18 -33
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +129 -97
- package/cjs/src/embed/conversation.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 +105 -3
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/contracts.js +9 -0
- package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +106 -9
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +327 -6
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +22 -0
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.js +51 -0
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/cjs/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js +115 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/cjs/src/embed/liveboard.d.ts +18 -0
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +10 -3
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +54 -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/spotter-utils.d.ts +20 -0
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.js +52 -0
- package/cjs/src/embed/spotter-utils.js.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts +2 -0
- package/cjs/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/cjs/src/embed/spotter-utils.spec.js +54 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -0
- 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 +54 -3
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/errors.d.ts +2 -0
- package/cjs/src/errors.d.ts.map +1 -1
- package/cjs/src/errors.js +2 -0
- package/cjs/src/errors.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 +832 -33
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +835 -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/cjs/src/utils.d.ts +0 -9
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +1 -10
- package/cjs/src/utils.js.map +1 -1
- package/dist/index-ChNydfIz.js +7371 -0
- package/dist/index-DW2wEHqy.js +7371 -0
- 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 +87 -17
- package/dist/src/css-variables.d.ts.map +1 -1
- package/dist/src/embed/app.d.ts +41 -1
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/base.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +23 -1
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +105 -3
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +22 -0
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/dist/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/dist/src/embed/liveboard.d.ts +18 -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/spotter-utils.d.ts +20 -0
- package/dist/src/embed/spotter-utils.d.ts.map +1 -0
- package/dist/src/embed/spotter-utils.spec.d.ts +2 -0
- package/dist/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/dist/src/embed/ts-embed.d.ts +41 -2
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/errors.d.ts +2 -0
- package/dist/src/errors.d.ts.map +1 -1
- package/dist/src/react/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +832 -33
- 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/src/utils.d.ts +0 -9
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1208 -154
- package/dist/tsembed-react.js +1206 -152
- package/dist/tsembed.es.js +1150 -101
- package/dist/tsembed.js +1148 -99
- package/dist/visual-embed-sdk-react-full.d.ts +1156 -55
- package/dist/visual-embed-sdk-react.d.ts +1156 -55
- package/dist/visual-embed-sdk.d.ts +1179 -60
- package/lib/package.json +3 -3
- 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 +87 -17
- package/lib/src/css-variables.d.ts.map +1 -1
- package/lib/src/embed/app.d.ts +41 -1
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +27 -38
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +35 -23
- 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/conversation.d.ts +23 -1
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +19 -34
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +131 -99
- package/lib/src/embed/conversation.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 +105 -3
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/contracts.js +9 -0
- package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +28 -0
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +106 -9
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +327 -6
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +22 -0
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.js +43 -0
- package/lib/src/embed/hostEventClient/utils.js.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts +2 -0
- package/lib/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
- package/lib/src/embed/hostEventClient/utils.spec.js +113 -0
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -0
- package/lib/src/embed/liveboard.d.ts +18 -0
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +10 -3
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +54 -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/spotter-utils.d.ts +20 -0
- package/lib/src/embed/spotter-utils.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.js +47 -0
- package/lib/src/embed/spotter-utils.js.map +1 -0
- package/lib/src/embed/spotter-utils.spec.d.ts +2 -0
- package/lib/src/embed/spotter-utils.spec.d.ts.map +1 -0
- package/lib/src/embed/spotter-utils.spec.js +52 -0
- package/lib/src/embed/spotter-utils.spec.js.map +1 -0
- 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 +55 -4
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/errors.d.ts +2 -0
- package/lib/src/errors.d.ts.map +1 -1
- package/lib/src/errors.js +2 -0
- package/lib/src/errors.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 +832 -33
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +835 -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/utils.d.ts +0 -9
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +0 -8
- package/lib/src/utils.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1179 -60
- package/package.json +3 -3
- package/src/auth.spec.ts +1 -1
- package/src/auth.ts +2 -1
- package/src/authToken.ts +0 -1
- package/src/css-variables.ts +96 -17
- package/src/embed/app.spec.ts +48 -30
- package/src/embed/app.ts +59 -54
- package/src/embed/base.spec.ts +1 -2
- package/src/embed/base.ts +1 -4
- package/src/embed/conversation.spec.ts +150 -119
- package/src/embed/conversation.ts +30 -54
- package/src/embed/events.spec.ts +88 -0
- package/src/embed/hostEventClient/contracts.ts +105 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +504 -6
- package/src/embed/hostEventClient/host-event-client.ts +146 -15
- package/src/embed/hostEventClient/utils.spec.ts +137 -0
- package/src/embed/hostEventClient/utils.ts +61 -0
- package/src/embed/liveboard.spec.ts +71 -2
- package/src/embed/liveboard.ts +29 -2
- package/src/embed/sage.ts +0 -1
- package/src/embed/search.spec.ts +0 -2
- package/src/embed/spotter-utils.spec.ts +56 -0
- package/src/embed/spotter-utils.ts +65 -0
- package/src/embed/ts-embed.ts +58 -4
- package/src/errors.ts +2 -0
- package/src/react/index.tsx +76 -72
- package/src/types.ts +843 -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/src/utils.ts +0 -14
package/src/types.ts
CHANGED
|
@@ -57,6 +57,7 @@ export enum AuthType {
|
|
|
57
57
|
* @deprecated This option is deprecated.
|
|
58
58
|
* @hidden
|
|
59
59
|
*/
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
60
61
|
SAML = 'SSO_SAML',
|
|
61
62
|
/**
|
|
62
63
|
* SSO using SAML
|
|
@@ -102,6 +103,7 @@ export enum AuthType {
|
|
|
102
103
|
* });
|
|
103
104
|
* ```
|
|
104
105
|
*/
|
|
106
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
105
107
|
SAMLRedirect = 'SSO_SAML',
|
|
106
108
|
/**
|
|
107
109
|
* SSO using OIDC
|
|
@@ -115,6 +117,7 @@ export enum AuthType {
|
|
|
115
117
|
* Will make the host application redirect to the OIDC IdP.
|
|
116
118
|
* See code samples in {@link SAMLRedirect}.
|
|
117
119
|
*/
|
|
120
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
118
121
|
OIDCRedirect = 'SSO_OIDC',
|
|
119
122
|
/**
|
|
120
123
|
* Trusted authentication server
|
|
@@ -140,6 +143,7 @@ export enum AuthType {
|
|
|
140
143
|
* });
|
|
141
144
|
* ```
|
|
142
145
|
*/
|
|
146
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
143
147
|
TrustedAuthToken = 'AuthServer',
|
|
144
148
|
/**
|
|
145
149
|
* Trusted authentication server Cookieless, Use your own authentication
|
|
@@ -2734,6 +2738,17 @@ export enum EmbedEvent {
|
|
|
2734
2738
|
* ```
|
|
2735
2739
|
*/
|
|
2736
2740
|
DownloadAsXlsx = 'downloadAsXlsx',
|
|
2741
|
+
/**
|
|
2742
|
+
* Emitted when the Download Liveboard as Continuous PDF action is triggered
|
|
2743
|
+
* on a Liveboard.
|
|
2744
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
2745
|
+
* @example
|
|
2746
|
+
* ```js
|
|
2747
|
+
* liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
|
|
2748
|
+
* console.log('download liveboard as continuous PDF', payload)})
|
|
2749
|
+
* ```
|
|
2750
|
+
*/
|
|
2751
|
+
DownloadLiveboardAsContinuousPDF = 'downloadLiveboardAsContinuousPDF',
|
|
2737
2752
|
/**
|
|
2738
2753
|
* Emitted when an Answer is deleted in the app
|
|
2739
2754
|
* Use start:true to subscribe to when delete is initiated, or end:true to subscribe
|
|
@@ -3137,22 +3152,45 @@ export enum EmbedEvent {
|
|
|
3137
3152
|
/**
|
|
3138
3153
|
* Emitted when name, status (private or public) or filter values of a
|
|
3139
3154
|
* Personalised view is updated.
|
|
3155
|
+
* This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
|
|
3140
3156
|
* @returns viewName: string
|
|
3141
3157
|
* @returns viewId: string
|
|
3142
3158
|
* @returns liveboardId: string
|
|
3143
3159
|
* @returns isPublic: boolean
|
|
3144
3160
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3161
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3145
3162
|
*/
|
|
3146
3163
|
UpdatePersonalisedView = 'updatePersonalisedView',
|
|
3164
|
+
/**
|
|
3165
|
+
* Emitted when name, status (private or public) or filter values of a
|
|
3166
|
+
* Personalized view is updated.
|
|
3167
|
+
* @returns viewName: string
|
|
3168
|
+
* @returns viewId: string
|
|
3169
|
+
* @returns liveboardId: string
|
|
3170
|
+
* @returns isPublic: boolean
|
|
3171
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3172
|
+
*/
|
|
3173
|
+
UpdatePersonalizedView = UpdatePersonalisedView,
|
|
3147
3174
|
/**
|
|
3148
3175
|
* Emitted when a Personalised view is saved.
|
|
3176
|
+
* This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
|
|
3149
3177
|
* @returns viewName: string
|
|
3150
3178
|
* @returns viewId: string
|
|
3151
3179
|
* @returns liveboardId: string
|
|
3152
3180
|
* @returns isPublic: boolean
|
|
3153
3181
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3182
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3154
3183
|
*/
|
|
3155
3184
|
SavePersonalisedView = 'savePersonalisedView',
|
|
3185
|
+
/**
|
|
3186
|
+
* Emitted when a Personalized view is saved.
|
|
3187
|
+
* @returns viewName: string
|
|
3188
|
+
* @returns viewId: string
|
|
3189
|
+
* @returns liveboardId: string
|
|
3190
|
+
* @returns isPublic: boolean
|
|
3191
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3192
|
+
*/
|
|
3193
|
+
SavePersonalizedView = SavePersonalisedView,
|
|
3156
3194
|
/**
|
|
3157
3195
|
* Emitted when a Liveboard is reset.
|
|
3158
3196
|
* @returns viewName: string
|
|
@@ -3164,11 +3202,41 @@ export enum EmbedEvent {
|
|
|
3164
3202
|
ResetLiveboard = 'resetLiveboard',
|
|
3165
3203
|
/**
|
|
3166
3204
|
* Emitted when a PersonalisedView is deleted.
|
|
3205
|
+
* This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
|
|
3167
3206
|
* @returns views: string[]
|
|
3168
3207
|
* @returns liveboardId: string
|
|
3169
3208
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
3209
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3170
3210
|
*/
|
|
3171
3211
|
DeletePersonalisedView = 'deletePersonalisedView',
|
|
3212
|
+
/**
|
|
3213
|
+
* Emitted when a PersonalizedView is deleted.
|
|
3214
|
+
* @returns views: string[]
|
|
3215
|
+
* @returns liveboardId: string
|
|
3216
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3217
|
+
*/
|
|
3218
|
+
DeletePersonalizedView = DeletePersonalisedView,
|
|
3219
|
+
/**
|
|
3220
|
+
* Emitted when a user selects a different Personalized View or
|
|
3221
|
+
* resets to the original/default view on a Liveboard.
|
|
3222
|
+
* @example
|
|
3223
|
+
* ```js
|
|
3224
|
+
* liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
|
|
3225
|
+
* console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
|
|
3226
|
+
* console.log(data.viewId); // '2a021a12-...' or null (default)
|
|
3227
|
+
* console.log(data.liveboardId); // 'abc123...'
|
|
3228
|
+
* console.log(data.isPublic); // true | false
|
|
3229
|
+
* })
|
|
3230
|
+
* ```
|
|
3231
|
+
* @returns viewName: string - Name of the selected view,
|
|
3232
|
+
* or 'Original View' when reset to default.
|
|
3233
|
+
* @returns viewId: string | null - GUID of the selected view,
|
|
3234
|
+
* or null when reset to default.
|
|
3235
|
+
* @returns liveboardId: string
|
|
3236
|
+
* @returns isPublic: boolean
|
|
3237
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
3238
|
+
*/
|
|
3239
|
+
ChangePersonalizedView = 'changePersonalisedView',
|
|
3172
3240
|
/**
|
|
3173
3241
|
* Emitted when a user creates a Worksheet.
|
|
3174
3242
|
* @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
|
|
@@ -3202,7 +3270,8 @@ export enum EmbedEvent {
|
|
|
3202
3270
|
* @param - Includes the following parameters:
|
|
3203
3271
|
* - `payload`: The payload received from the embed related to the Data API call.
|
|
3204
3272
|
* - `responder`: Contains elements that let developers define whether ThoughtSpot
|
|
3205
|
-
* will run or block the search operation, and if blocked, which error message to
|
|
3273
|
+
* will run or block the search operation, and if blocked, which error message to
|
|
3274
|
+
* provide.
|
|
3206
3275
|
* - `execute` - When `execute` returns `true`, the search is run.
|
|
3207
3276
|
* When `execute` returns `false`, the search is not executed.
|
|
3208
3277
|
* - `error` - Developers can customize the user-facing error message when `execute`
|
|
@@ -3638,6 +3707,25 @@ export enum EmbedEvent {
|
|
|
3638
3707
|
* );
|
|
3639
3708
|
* }
|
|
3640
3709
|
* ```
|
|
3710
|
+
*
|
|
3711
|
+
* **Context Parameter (SDK: 1.45.2+)**
|
|
3712
|
+
*
|
|
3713
|
+
* Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
|
|
3714
|
+
* `ContextType` as the third parameter to the `trigger` method to specify the context
|
|
3715
|
+
* from which the event is triggered. This helps ThoughtSpot understand the current page
|
|
3716
|
+
* context (Search, Answer, Liveboard, or Spotter) for better event handling.
|
|
3717
|
+
*
|
|
3718
|
+
* @example
|
|
3719
|
+
* ```js
|
|
3720
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3721
|
+
*
|
|
3722
|
+
* // Trigger Pin event with Search context
|
|
3723
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
3724
|
+
* vizId: "123",
|
|
3725
|
+
* liveboardId: "456"
|
|
3726
|
+
* }, ContextType.Search);
|
|
3727
|
+
* ```
|
|
3728
|
+
*
|
|
3641
3729
|
* @group Events
|
|
3642
3730
|
*/
|
|
3643
3731
|
|
|
@@ -3660,6 +3748,16 @@ export enum HostEvent {
|
|
|
3660
3748
|
execute: true
|
|
3661
3749
|
});
|
|
3662
3750
|
* ```
|
|
3751
|
+
* @example
|
|
3752
|
+
* ```js
|
|
3753
|
+
* // Trigger search from search context
|
|
3754
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3755
|
+
* appEmbed.trigger(HostEvent.Search, {
|
|
3756
|
+
* searchQuery: "[revenue] by [region]",
|
|
3757
|
+
* dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
|
|
3758
|
+
* execute: true
|
|
3759
|
+
* }, ContextType.Search);
|
|
3760
|
+
* ```
|
|
3663
3761
|
*/
|
|
3664
3762
|
Search = 'search',
|
|
3665
3763
|
/**
|
|
@@ -3710,6 +3808,24 @@ export enum HostEvent {
|
|
|
3710
3808
|
* });
|
|
3711
3809
|
* })
|
|
3712
3810
|
* ```
|
|
3811
|
+
* @example
|
|
3812
|
+
* ```js
|
|
3813
|
+
* // Drill down from answer context
|
|
3814
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3815
|
+
* appEmbed.trigger(HostEvent.DrillDown, {
|
|
3816
|
+
* points: { clickedPoint, selectedPoints },
|
|
3817
|
+
* autoDrillDown: true
|
|
3818
|
+
* }, ContextType.Answer);
|
|
3819
|
+
* ```
|
|
3820
|
+
* @example
|
|
3821
|
+
* ```js
|
|
3822
|
+
* // Drill down from search context
|
|
3823
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3824
|
+
* searchEmbed.trigger(HostEvent.DrillDown, {
|
|
3825
|
+
* points: { clickedPoint, selectedPoints },
|
|
3826
|
+
* columnGuid: "column-guid"
|
|
3827
|
+
* }, ContextType.Search);
|
|
3828
|
+
* ```
|
|
3713
3829
|
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
3714
3830
|
*/
|
|
3715
3831
|
DrillDown = 'triggerDrillDown',
|
|
@@ -3730,6 +3846,13 @@ export enum HostEvent {
|
|
|
3730
3846
|
* const url = embed.trigger(HostEvent.GetIframeUrl);
|
|
3731
3847
|
* console.log("iFrameURL",url);
|
|
3732
3848
|
* ```
|
|
3849
|
+
* @example
|
|
3850
|
+
* ```js
|
|
3851
|
+
* // Get iframe URL from specific context
|
|
3852
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3853
|
+
* const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
|
|
3854
|
+
* console.log("iFrameURL", url);
|
|
3855
|
+
* ```
|
|
3733
3856
|
* @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
|
|
3734
3857
|
*/
|
|
3735
3858
|
GetIframeUrl = 'GetIframeUrl',
|
|
@@ -3743,6 +3866,15 @@ export enum HostEvent {
|
|
|
3743
3866
|
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
3744
3867
|
* 'd547ec54-2a37-4516-a222-2b06719af726'])
|
|
3745
3868
|
* ```
|
|
3869
|
+
* @example
|
|
3870
|
+
* ```js
|
|
3871
|
+
* // Set visible vizs from liveboard context
|
|
3872
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3873
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
|
|
3874
|
+
* '730496d6-6903-4601-937e-2c691821af3c',
|
|
3875
|
+
* 'd547ec54-2a37-4516-a222-2b06719af726'
|
|
3876
|
+
* ], ContextType.Liveboard);
|
|
3877
|
+
* ```
|
|
3746
3878
|
* @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
|
|
3747
3879
|
*/
|
|
3748
3880
|
SetVisibleVizs = 'SetPinboardVisibleVizs',
|
|
@@ -3755,6 +3887,14 @@ export enum HostEvent {
|
|
|
3755
3887
|
* tabId:'730496d6-6903-4601-937e-2c691821af3c'
|
|
3756
3888
|
* })
|
|
3757
3889
|
* ```
|
|
3890
|
+
* @example
|
|
3891
|
+
* ```js
|
|
3892
|
+
* // Set active tab from liveboard context
|
|
3893
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3894
|
+
* liveboardEmbed.trigger(HostEvent.SetActiveTab, {
|
|
3895
|
+
* tabId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
3896
|
+
* }, ContextType.Liveboard);
|
|
3897
|
+
* ```
|
|
3758
3898
|
* @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
|
|
3759
3899
|
*/
|
|
3760
3900
|
SetActiveTab = 'SetActiveTab',
|
|
@@ -3788,6 +3928,15 @@ export enum HostEvent {
|
|
|
3788
3928
|
* {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
|
|
3789
3929
|
* ])
|
|
3790
3930
|
* ```
|
|
3931
|
+
* @example
|
|
3932
|
+
* ```js
|
|
3933
|
+
* // Update runtime filters from liveboard context
|
|
3934
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3935
|
+
* liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
|
|
3936
|
+
* {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
|
|
3937
|
+
* {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
|
|
3938
|
+
* ], ContextType.Liveboard);
|
|
3939
|
+
* ```
|
|
3791
3940
|
* @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
|
|
3792
3941
|
* @important
|
|
3793
3942
|
*/
|
|
@@ -3821,6 +3970,14 @@ export enum HostEvent {
|
|
|
3821
3970
|
* LiveboardEmbed.trigger(HostEvent.OpenFilter,
|
|
3822
3971
|
* { column: {columnId: '<column-GUID>'}})
|
|
3823
3972
|
* ```
|
|
3973
|
+
* @example
|
|
3974
|
+
* ```js
|
|
3975
|
+
* // Open filter from search context
|
|
3976
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3977
|
+
* searchEmbed.trigger(HostEvent.OpenFilter, {
|
|
3978
|
+
* column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
|
|
3979
|
+
* }, ContextType.Search);
|
|
3980
|
+
* ```
|
|
3824
3981
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3825
3982
|
*/
|
|
3826
3983
|
OpenFilter = 'openFilter',
|
|
@@ -3831,6 +3988,14 @@ export enum HostEvent {
|
|
|
3831
3988
|
* ```js
|
|
3832
3989
|
* searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
|
|
3833
3990
|
* ```
|
|
3991
|
+
* @example
|
|
3992
|
+
* ```js
|
|
3993
|
+
* // Add columns from search context
|
|
3994
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
3995
|
+
* searchEmbed.trigger(HostEvent.AddColumns, {
|
|
3996
|
+
* columnIds: ['col-guid-1', 'col-guid-2']
|
|
3997
|
+
* }, ContextType.Search);
|
|
3998
|
+
* ```
|
|
3834
3999
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3835
4000
|
*/
|
|
3836
4001
|
AddColumns = 'addColumns',
|
|
@@ -3841,6 +4006,14 @@ export enum HostEvent {
|
|
|
3841
4006
|
* ```js
|
|
3842
4007
|
* searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
|
|
3843
4008
|
* ```
|
|
4009
|
+
* @example
|
|
4010
|
+
* ```js
|
|
4011
|
+
* // Remove column from search context
|
|
4012
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4013
|
+
* searchEmbed.trigger(HostEvent.RemoveColumn, {
|
|
4014
|
+
* columnId: 'column-guid'
|
|
4015
|
+
* }, ContextType.Search);
|
|
4016
|
+
* ```
|
|
3844
4017
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
|
|
3845
4018
|
*/
|
|
3846
4019
|
RemoveColumn = 'removeColumn',
|
|
@@ -3927,6 +4100,37 @@ export enum HostEvent {
|
|
|
3927
4100
|
*
|
|
3928
4101
|
* spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
|
|
3929
4102
|
* ```
|
|
4103
|
+
* @example
|
|
4104
|
+
* ```js
|
|
4105
|
+
* // Using context parameter to specify the context type (SDK: 1.45.2+)
|
|
4106
|
+
* // Pin from a search answer context
|
|
4107
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4108
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4109
|
+
* vizId: "123",
|
|
4110
|
+
* newVizName: "Sales by region",
|
|
4111
|
+
* liveboardId: "456"
|
|
4112
|
+
* }, ContextType.Search);
|
|
4113
|
+
* ```
|
|
4114
|
+
* @example
|
|
4115
|
+
* ```js
|
|
4116
|
+
* // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
|
|
4117
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4118
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4119
|
+
* vizId: "789",
|
|
4120
|
+
* newVizName: "Revenue trends",
|
|
4121
|
+
* liveboardId: "456"
|
|
4122
|
+
* }, ContextType.Answer);
|
|
4123
|
+
* ```
|
|
4124
|
+
* @example
|
|
4125
|
+
* ```js
|
|
4126
|
+
* // Pin from a spotter context (SDK: 1.45.2+)
|
|
4127
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4128
|
+
* appEmbed.trigger(HostEvent.Pin, {
|
|
4129
|
+
* vizId: latestSpotterVizId,
|
|
4130
|
+
* newVizName: "AI-generated insights",
|
|
4131
|
+
* liveboardId: "456"
|
|
4132
|
+
* }, ContextType.Spotter);
|
|
4133
|
+
* ```
|
|
3930
4134
|
*
|
|
3931
4135
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3932
4136
|
*/
|
|
@@ -3937,6 +4141,12 @@ export enum HostEvent {
|
|
|
3937
4141
|
* @example
|
|
3938
4142
|
* ```js
|
|
3939
4143
|
* liveboardEmbed.trigger(HostEvent.LiveboardInfo)
|
|
4144
|
+
*```
|
|
4145
|
+
* @example
|
|
4146
|
+
* ```js
|
|
4147
|
+
* // Show liveboard info from liveboard context
|
|
4148
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4149
|
+
* liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
|
|
3940
4150
|
* ```
|
|
3941
4151
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3942
4152
|
*/
|
|
@@ -3947,6 +4157,12 @@ export enum HostEvent {
|
|
|
3947
4157
|
* ```js
|
|
3948
4158
|
* liveboardEmbed.trigger(HostEvent.Schedule)
|
|
3949
4159
|
* ```
|
|
4160
|
+
* @example
|
|
4161
|
+
* ```js
|
|
4162
|
+
* // Schedule from liveboard context
|
|
4163
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4164
|
+
* liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
|
|
4165
|
+
* ```
|
|
3950
4166
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3951
4167
|
*/
|
|
3952
4168
|
Schedule = 'subscription',
|
|
@@ -3956,6 +4172,12 @@ export enum HostEvent {
|
|
|
3956
4172
|
* ```js
|
|
3957
4173
|
* liveboardEmbed.trigger(HostEvent.ScheduleList)
|
|
3958
4174
|
* ```
|
|
4175
|
+
* @example
|
|
4176
|
+
* ```js
|
|
4177
|
+
* // Manage schedules from liveboard context
|
|
4178
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4179
|
+
* liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
|
|
4180
|
+
* ```
|
|
3959
4181
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3960
4182
|
*/
|
|
3961
4183
|
SchedulesList = 'schedule-list',
|
|
@@ -3966,6 +4188,18 @@ export enum HostEvent {
|
|
|
3966
4188
|
* ```js
|
|
3967
4189
|
* liveboardEmbed.trigger(HostEvent.ExportTML)
|
|
3968
4190
|
* ```
|
|
4191
|
+
* @example
|
|
4192
|
+
* ```js
|
|
4193
|
+
* // Export TML from liveboard context
|
|
4194
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4195
|
+
* liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
|
|
4196
|
+
* ```
|
|
4197
|
+
* @example
|
|
4198
|
+
* ```js
|
|
4199
|
+
* // Export TML from search-answer context
|
|
4200
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4201
|
+
* appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
|
|
4202
|
+
* ```
|
|
3969
4203
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3970
4204
|
*/
|
|
3971
4205
|
ExportTML = 'exportTSL',
|
|
@@ -3976,6 +4210,18 @@ export enum HostEvent {
|
|
|
3976
4210
|
* ```js
|
|
3977
4211
|
* liveboardEmbed.trigger(HostEvent.EditTML)
|
|
3978
4212
|
* ```
|
|
4213
|
+
* @example
|
|
4214
|
+
* ```js
|
|
4215
|
+
* // Edit TML from liveboard context
|
|
4216
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4217
|
+
* liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
|
|
4218
|
+
* ```
|
|
4219
|
+
* @example
|
|
4220
|
+
* ```js
|
|
4221
|
+
* // Edit TML from search-answer context
|
|
4222
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4223
|
+
* appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
|
|
4224
|
+
* ```
|
|
3979
4225
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3980
4226
|
*/
|
|
3981
4227
|
EditTML = 'editTSL',
|
|
@@ -3985,6 +4231,12 @@ export enum HostEvent {
|
|
|
3985
4231
|
* ```js
|
|
3986
4232
|
* liveboardEmbed.trigger(HostEvent.UpdateTML)
|
|
3987
4233
|
* ```
|
|
4234
|
+
* @example
|
|
4235
|
+
* ```js
|
|
4236
|
+
* // Update TML from liveboard context
|
|
4237
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4238
|
+
* liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
|
|
4239
|
+
* ```
|
|
3988
4240
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
3989
4241
|
*/
|
|
3990
4242
|
UpdateTML = 'updateTSL',
|
|
@@ -4011,10 +4263,34 @@ export enum HostEvent {
|
|
|
4011
4263
|
*
|
|
4012
4264
|
* spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
|
|
4013
4265
|
* ```
|
|
4266
|
+
* @example
|
|
4267
|
+
* ```js
|
|
4268
|
+
* // Download as PDF from search-answer context
|
|
4269
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4270
|
+
* appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
|
|
4271
|
+
* ```
|
|
4272
|
+
* @example
|
|
4273
|
+
* ```js
|
|
4274
|
+
* // Download as PDF from liveboard context
|
|
4275
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4276
|
+
* liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
|
|
4277
|
+
* ```
|
|
4014
4278
|
*
|
|
4015
4279
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4016
4280
|
*/
|
|
4017
4281
|
DownloadAsPdf = 'downloadAsPdf',
|
|
4282
|
+
/**
|
|
4283
|
+
* Trigger the **Download Liveboard as Continuous PDF** action on an
|
|
4284
|
+
* embedded Liveboard.
|
|
4285
|
+
*
|
|
4286
|
+
* @example
|
|
4287
|
+
* ```js
|
|
4288
|
+
* liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
|
|
4289
|
+
* ```
|
|
4290
|
+
*
|
|
4291
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4292
|
+
*/
|
|
4293
|
+
DownloadLiveboardAsContinuousPDF = 'downloadLiveboardAsContinuousPDF',
|
|
4018
4294
|
/**
|
|
4019
4295
|
* Trigger the **AI Highlights** action on an embedded Liveboard
|
|
4020
4296
|
*
|
|
@@ -4055,6 +4331,18 @@ export enum HostEvent {
|
|
|
4055
4331
|
*
|
|
4056
4332
|
* spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
|
|
4057
4333
|
* ```
|
|
4334
|
+
* @example
|
|
4335
|
+
* ```js
|
|
4336
|
+
* // Make a copy from answer context
|
|
4337
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4338
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
|
|
4339
|
+
* ```
|
|
4340
|
+
* @example
|
|
4341
|
+
* ```js
|
|
4342
|
+
* // Make a copy from search context
|
|
4343
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4344
|
+
* appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
|
|
4345
|
+
* ```
|
|
4058
4346
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4059
4347
|
*/
|
|
4060
4348
|
MakeACopy = 'makeACopy',
|
|
@@ -4079,6 +4367,14 @@ export enum HostEvent {
|
|
|
4079
4367
|
* ```js
|
|
4080
4368
|
* liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
|
|
4081
4369
|
* ```
|
|
4370
|
+
* @example
|
|
4371
|
+
* ```js
|
|
4372
|
+
* // Explore from liveboard context
|
|
4373
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4374
|
+
* liveboardEmbed.trigger(HostEvent.Explore, {
|
|
4375
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4376
|
+
* }, ContextType.Liveboard);
|
|
4377
|
+
* ```
|
|
4082
4378
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4083
4379
|
*/
|
|
4084
4380
|
Explore = 'explore',
|
|
@@ -4096,6 +4392,20 @@ export enum HostEvent {
|
|
|
4096
4392
|
* ```js
|
|
4097
4393
|
* searchEmbed.trigger(HostEvent.CreateMonitor)
|
|
4098
4394
|
* ```
|
|
4395
|
+
* @example
|
|
4396
|
+
* ```js
|
|
4397
|
+
* // Create monitor from answer context
|
|
4398
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4399
|
+
* appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
|
|
4400
|
+
* ```
|
|
4401
|
+
* @example
|
|
4402
|
+
* ```js
|
|
4403
|
+
* // Create monitor from liveboard context
|
|
4404
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4405
|
+
* liveboardEmbed.trigger(HostEvent.CreateMonitor, {
|
|
4406
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4407
|
+
* }, ContextType.Liveboard);
|
|
4408
|
+
* ```
|
|
4099
4409
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4100
4410
|
*/
|
|
4101
4411
|
CreateMonitor = 'createMonitor',
|
|
@@ -4117,6 +4427,20 @@ export enum HostEvent {
|
|
|
4117
4427
|
* ```js
|
|
4118
4428
|
* vizEmbed.trigger(HostEvent.ManageMonitor)
|
|
4119
4429
|
* ```
|
|
4430
|
+
* @example
|
|
4431
|
+
* ```js
|
|
4432
|
+
* // Manage monitor from answer context
|
|
4433
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4434
|
+
* appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
|
|
4435
|
+
* ```
|
|
4436
|
+
* @example
|
|
4437
|
+
* ```js
|
|
4438
|
+
* // Manage monitor from liveboard context
|
|
4439
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4440
|
+
* liveboardEmbed.trigger(HostEvent.ManageMonitor, {
|
|
4441
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4442
|
+
* }, ContextType.Liveboard);
|
|
4443
|
+
* ```
|
|
4120
4444
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4121
4445
|
*/
|
|
4122
4446
|
ManageMonitor = 'manageMonitor',
|
|
@@ -4142,6 +4466,26 @@ export enum HostEvent {
|
|
|
4142
4466
|
* ```js
|
|
4143
4467
|
* spotterEmbed.trigger(HostEvent.Edit);
|
|
4144
4468
|
* ```
|
|
4469
|
+
* @example
|
|
4470
|
+
* ```js
|
|
4471
|
+
* // Using context parameter to edit liveboard context
|
|
4472
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4473
|
+
* liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
|
|
4474
|
+
* ```
|
|
4475
|
+
* @example
|
|
4476
|
+
* ```js
|
|
4477
|
+
* // Edit from search context
|
|
4478
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4479
|
+
* appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
|
|
4480
|
+
* ```
|
|
4481
|
+
* * @example
|
|
4482
|
+
* ```js
|
|
4483
|
+
* // Edit from spotter context
|
|
4484
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4485
|
+
* appEmbed.trigger(HostEvent.Edit, {
|
|
4486
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4487
|
+
* }, ContextType.Spotter);
|
|
4488
|
+
* ```
|
|
4145
4489
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4146
4490
|
*/
|
|
4147
4491
|
Edit = 'edit',
|
|
@@ -4159,6 +4503,34 @@ export enum HostEvent {
|
|
|
4159
4503
|
* ```js
|
|
4160
4504
|
* vizEmbed.trigger(HostEvent.CopyLink)
|
|
4161
4505
|
* ```
|
|
4506
|
+
* @example
|
|
4507
|
+
* ```js
|
|
4508
|
+
* // Copy link from liveboard context
|
|
4509
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4510
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
4511
|
+
* ```
|
|
4512
|
+
* @example
|
|
4513
|
+
* ```js
|
|
4514
|
+
* // Copy link from liveboard visualization context
|
|
4515
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4516
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
4517
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4518
|
+
* }, ContextType.Liveboard);
|
|
4519
|
+
* ```
|
|
4520
|
+
* @example
|
|
4521
|
+
* ```js
|
|
4522
|
+
* // Copy link from liveboard context
|
|
4523
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4524
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
|
|
4525
|
+
* ```
|
|
4526
|
+
* @example
|
|
4527
|
+
* ```js
|
|
4528
|
+
* // Copy link from liveboard visualization context
|
|
4529
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4530
|
+
* liveboardEmbed.trigger(HostEvent.CopyLink, {
|
|
4531
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4532
|
+
* }, ContextType.Liveboard);
|
|
4533
|
+
* ```
|
|
4162
4534
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4163
4535
|
*/
|
|
4164
4536
|
CopyLink = 'embedDocument',
|
|
@@ -4176,6 +4548,34 @@ export enum HostEvent {
|
|
|
4176
4548
|
* ```js
|
|
4177
4549
|
* vizEmbed.trigger(HostEvent.Present)
|
|
4178
4550
|
* ```
|
|
4551
|
+
* @example
|
|
4552
|
+
* ```js
|
|
4553
|
+
* // Present from liveboard visualization context
|
|
4554
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4555
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
4556
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4557
|
+
* }, ContextType.Liveboard);
|
|
4558
|
+
* ```
|
|
4559
|
+
* @example
|
|
4560
|
+
* ```js
|
|
4561
|
+
* // Present from liveboard context
|
|
4562
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4563
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
4564
|
+
* ```
|
|
4565
|
+
* @example
|
|
4566
|
+
* ```js
|
|
4567
|
+
* // Present from liveboard visualization context
|
|
4568
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4569
|
+
* liveboardEmbed.trigger(HostEvent.Present, {
|
|
4570
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4571
|
+
* }, ContextType.Liveboard);
|
|
4572
|
+
* ```
|
|
4573
|
+
* @example
|
|
4574
|
+
* ```js
|
|
4575
|
+
* // Present from liveboard context
|
|
4576
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4577
|
+
* liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
|
|
4578
|
+
* ```
|
|
4179
4579
|
* @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
|
|
4180
4580
|
*/
|
|
4181
4581
|
Present = 'present',
|
|
@@ -4204,6 +4604,22 @@ export enum HostEvent {
|
|
|
4204
4604
|
* tml.answer.search_query // TML representation of the search query
|
|
4205
4605
|
* );
|
|
4206
4606
|
* })
|
|
4607
|
+
* ```
|
|
4608
|
+
* @example
|
|
4609
|
+
* ```js
|
|
4610
|
+
* // Get TML from search context
|
|
4611
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4612
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
4613
|
+
* console.log(tml.answer.search_query);
|
|
4614
|
+
* });
|
|
4615
|
+
* ```
|
|
4616
|
+
* @example
|
|
4617
|
+
* ```js
|
|
4618
|
+
* // Get TML from search-answer context
|
|
4619
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4620
|
+
* appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
|
|
4621
|
+
* console.log(tml.answer);
|
|
4622
|
+
* });
|
|
4207
4623
|
* ```
|
|
4208
4624
|
* @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
|
|
4209
4625
|
* @important
|
|
@@ -4225,6 +4641,20 @@ export enum HostEvent {
|
|
|
4225
4641
|
* ```js
|
|
4226
4642
|
* searchEmbed.trigger(HostEvent.ShowUnderlyingData)
|
|
4227
4643
|
* ```
|
|
4644
|
+
* @example
|
|
4645
|
+
* ```js
|
|
4646
|
+
* // Show underlying data from liveboard visualization context
|
|
4647
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4648
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {
|
|
4649
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4650
|
+
* }, ContextType.Liveboard);
|
|
4651
|
+
* ```
|
|
4652
|
+
* @example
|
|
4653
|
+
* ```js
|
|
4654
|
+
* // Show underlying data from search context
|
|
4655
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4656
|
+
* appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
|
|
4657
|
+
* ```
|
|
4228
4658
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4229
4659
|
*/
|
|
4230
4660
|
ShowUnderlyingData = 'showUnderlyingData',
|
|
@@ -4242,6 +4672,18 @@ export enum HostEvent {
|
|
|
4242
4672
|
* ```js
|
|
4243
4673
|
* searchEmbed.trigger(HostEvent.Delete)
|
|
4244
4674
|
* ```
|
|
4675
|
+
* @example
|
|
4676
|
+
* ```js
|
|
4677
|
+
* // Delete from liveboard context
|
|
4678
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4679
|
+
* liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
|
|
4680
|
+
* ```
|
|
4681
|
+
* @example
|
|
4682
|
+
* ```js
|
|
4683
|
+
* // Delete from search context
|
|
4684
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4685
|
+
* appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
|
|
4686
|
+
* ```
|
|
4245
4687
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4246
4688
|
*/
|
|
4247
4689
|
Delete = 'onDeleteAnswer',
|
|
@@ -4262,6 +4704,20 @@ export enum HostEvent {
|
|
|
4262
4704
|
* ```js
|
|
4263
4705
|
* searchEmbed.trigger(HostEvent.SpotIQAnalyze)
|
|
4264
4706
|
* ```
|
|
4707
|
+
* @example
|
|
4708
|
+
* ```js
|
|
4709
|
+
* // SpotIQ analyze from search-answer context
|
|
4710
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4711
|
+
* appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
|
|
4712
|
+
* ```
|
|
4713
|
+
* @example
|
|
4714
|
+
* ```js
|
|
4715
|
+
* // SpotIQ analyze from search context
|
|
4716
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4717
|
+
* liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
|
|
4718
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4719
|
+
* }, ContextType.Liveboard);
|
|
4720
|
+
* ```
|
|
4265
4721
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4266
4722
|
*/
|
|
4267
4723
|
SpotIQAnalyze = 'spotIQAnalyze',
|
|
@@ -4313,9 +4769,16 @@ export enum HostEvent {
|
|
|
4313
4769
|
*
|
|
4314
4770
|
* spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
|
|
4315
4771
|
* ```
|
|
4772
|
+
* @example
|
|
4773
|
+
* ```js
|
|
4774
|
+
* // Download as PNG from search-answer context
|
|
4775
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4776
|
+
* appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
|
|
4777
|
+
* ```
|
|
4316
4778
|
*
|
|
4317
4779
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
|
|
4318
4780
|
*/
|
|
4781
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
4319
4782
|
DownloadAsPng = 'downloadAsPng',
|
|
4320
4783
|
/**
|
|
4321
4784
|
* Trigger the **Download** > **CSV** action on tables in
|
|
@@ -4341,6 +4804,18 @@ export enum HostEvent {
|
|
|
4341
4804
|
*
|
|
4342
4805
|
* spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
|
|
4343
4806
|
* ```
|
|
4807
|
+
* @example
|
|
4808
|
+
* ```js
|
|
4809
|
+
* // Download as CSV from search-answer context
|
|
4810
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4811
|
+
* appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
4812
|
+
* ```
|
|
4813
|
+
* @example
|
|
4814
|
+
* ```js
|
|
4815
|
+
* // Download as CSV from search context
|
|
4816
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4817
|
+
* searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
|
|
4818
|
+
* ```
|
|
4344
4819
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4345
4820
|
*/
|
|
4346
4821
|
DownloadAsCsv = 'downloadAsCSV',
|
|
@@ -4368,6 +4843,18 @@ export enum HostEvent {
|
|
|
4368
4843
|
*
|
|
4369
4844
|
* spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
|
|
4370
4845
|
* ```
|
|
4846
|
+
* @example
|
|
4847
|
+
* ```js
|
|
4848
|
+
* // Download as XLSX from answer context
|
|
4849
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4850
|
+
* appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
|
|
4851
|
+
* ```
|
|
4852
|
+
* @example
|
|
4853
|
+
* ```js
|
|
4854
|
+
* // Download as XLSX from search context
|
|
4855
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4856
|
+
* searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
|
|
4857
|
+
* ```
|
|
4371
4858
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4372
4859
|
*/
|
|
4373
4860
|
DownloadAsXlsx = 'downloadAsXLSX',
|
|
@@ -4381,6 +4868,18 @@ export enum HostEvent {
|
|
|
4381
4868
|
* ```js
|
|
4382
4869
|
* searchEmbed.trigger(HostEvent.Share)
|
|
4383
4870
|
* ```
|
|
4871
|
+
* @example
|
|
4872
|
+
* ```js
|
|
4873
|
+
* // Share from Liveboard context
|
|
4874
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4875
|
+
* liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
|
|
4876
|
+
* ```
|
|
4877
|
+
* @example
|
|
4878
|
+
* ```js
|
|
4879
|
+
* // Share from search-answer context
|
|
4880
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4881
|
+
* appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
|
|
4882
|
+
* ```
|
|
4384
4883
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4385
4884
|
*/
|
|
4386
4885
|
Share = 'share',
|
|
@@ -4420,6 +4919,18 @@ export enum HostEvent {
|
|
|
4420
4919
|
*
|
|
4421
4920
|
* spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
|
|
4422
4921
|
* ```
|
|
4922
|
+
* @example
|
|
4923
|
+
* ```js
|
|
4924
|
+
* // Save from answer context
|
|
4925
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4926
|
+
* appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
|
|
4927
|
+
* ```
|
|
4928
|
+
* @example
|
|
4929
|
+
* ```js
|
|
4930
|
+
* // Save from search context
|
|
4931
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4932
|
+
* searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
|
|
4933
|
+
* ```
|
|
4423
4934
|
*
|
|
4424
4935
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4425
4936
|
*/
|
|
@@ -4436,6 +4947,20 @@ export enum HostEvent {
|
|
|
4436
4947
|
* ```js
|
|
4437
4948
|
* vizEmbed.trigger(HostEvent.SyncToSheets)
|
|
4438
4949
|
* ```
|
|
4950
|
+
* @example
|
|
4951
|
+
* ```js
|
|
4952
|
+
* // Sync to sheets from answer context
|
|
4953
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4954
|
+
* appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
|
|
4955
|
+
* ```
|
|
4956
|
+
* @example
|
|
4957
|
+
* ```js
|
|
4958
|
+
* // Sync to sheets from liveboard context
|
|
4959
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4960
|
+
* liveboardEmbed.trigger(HostEvent.SyncToSheets, {
|
|
4961
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4962
|
+
* }, ContextType.Liveboard);
|
|
4963
|
+
* ```
|
|
4439
4964
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4440
4965
|
*/
|
|
4441
4966
|
SyncToSheets = 'sync-to-sheets',
|
|
@@ -4452,6 +4977,20 @@ export enum HostEvent {
|
|
|
4452
4977
|
* ```js
|
|
4453
4978
|
* vizEmbed.trigger(HostEvent.SyncToOtherApps)
|
|
4454
4979
|
* ```
|
|
4980
|
+
* @example
|
|
4981
|
+
* ```js
|
|
4982
|
+
* // Sync to other apps from answer context
|
|
4983
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4984
|
+
* appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
|
|
4985
|
+
* ```
|
|
4986
|
+
* @example
|
|
4987
|
+
* ```js
|
|
4988
|
+
* // Sync to other apps from liveboard context
|
|
4989
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
4990
|
+
* liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
|
|
4991
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
4992
|
+
* }, ContextType.Liveboard);
|
|
4993
|
+
* ```
|
|
4455
4994
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4456
4995
|
*/
|
|
4457
4996
|
SyncToOtherApps = 'sync-to-other-apps',
|
|
@@ -4468,6 +5007,20 @@ export enum HostEvent {
|
|
|
4468
5007
|
* ```js
|
|
4469
5008
|
* vizEmbed.trigger(HostEvent.ManagePipelines)
|
|
4470
5009
|
* ```
|
|
5010
|
+
* @example
|
|
5011
|
+
* ```js
|
|
5012
|
+
* // Manage pipelines from answer context
|
|
5013
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5014
|
+
* appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
|
|
5015
|
+
* ```
|
|
5016
|
+
* @example
|
|
5017
|
+
* ```js
|
|
5018
|
+
* // Manage pipelines from liveboard context
|
|
5019
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5020
|
+
* liveboardEmbed.trigger(HostEvent.ManagePipelines, {
|
|
5021
|
+
* vizId: '730496d6-6903-4601-937e-2c691821af3c'
|
|
5022
|
+
* }, ContextType.Liveboard);
|
|
5023
|
+
* ```
|
|
4471
5024
|
* @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
|
|
4472
5025
|
*/
|
|
4473
5026
|
ManagePipelines = 'manage-pipeline',
|
|
@@ -4480,6 +5033,12 @@ export enum HostEvent {
|
|
|
4480
5033
|
* ```js
|
|
4481
5034
|
* appEmbed.trigger(HostEvent.ResetSearch)
|
|
4482
5035
|
* ```
|
|
5036
|
+
* @example
|
|
5037
|
+
* ```js
|
|
5038
|
+
* // Reset search from search context
|
|
5039
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5040
|
+
* searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
|
|
5041
|
+
* ```
|
|
4483
5042
|
* @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
|
|
4484
5043
|
*/
|
|
4485
5044
|
ResetSearch = 'resetSearch',
|
|
@@ -4491,6 +5050,13 @@ export enum HostEvent {
|
|
|
4491
5050
|
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
|
|
4492
5051
|
* console.log('data', data);
|
|
4493
5052
|
* ```
|
|
5053
|
+
* @example
|
|
5054
|
+
* ```js
|
|
5055
|
+
* // Get filters from liveboard context
|
|
5056
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5057
|
+
* const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
|
|
5058
|
+
* console.log('filters', data);
|
|
5059
|
+
* ```
|
|
4494
5060
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4495
5061
|
*/
|
|
4496
5062
|
GetFilters = 'getFilters',
|
|
@@ -4498,7 +5064,8 @@ export enum HostEvent {
|
|
|
4498
5064
|
* Update one or several filters applied on a Liveboard.
|
|
4499
5065
|
* @param - Includes the following keys:
|
|
4500
5066
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
4501
|
-
* values.
|
|
5067
|
+
* values.
|
|
5068
|
+
* - `filters`: Multiple filter objects with column name, filter operator,
|
|
4502
5069
|
* and values for each.
|
|
4503
5070
|
*
|
|
4504
5071
|
* Each filter object must include the following attributes:
|
|
@@ -4581,6 +5148,18 @@ export enum HostEvent {
|
|
|
4581
5148
|
* }]
|
|
4582
5149
|
* });
|
|
4583
5150
|
* ```
|
|
5151
|
+
* @example
|
|
5152
|
+
* ```js
|
|
5153
|
+
* // Update filters from liveboard context
|
|
5154
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5155
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
5156
|
+
* filter: {
|
|
5157
|
+
* column: "item type",
|
|
5158
|
+
* oper: "IN",
|
|
5159
|
+
* values: ["shoes", "boots"]
|
|
5160
|
+
* }
|
|
5161
|
+
* }, ContextType.Liveboard);
|
|
5162
|
+
* ```
|
|
4584
5163
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
4585
5164
|
*/
|
|
4586
5165
|
UpdateFilters = 'updateFilters',
|
|
@@ -4594,6 +5173,14 @@ export enum HostEvent {
|
|
|
4594
5173
|
* );
|
|
4595
5174
|
* })
|
|
4596
5175
|
* ```
|
|
5176
|
+
* @example
|
|
5177
|
+
* ```js
|
|
5178
|
+
* // Get tabs from liveboard context
|
|
5179
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5180
|
+
* liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
|
|
5181
|
+
* console.log('tabs', tabDetails);
|
|
5182
|
+
* });
|
|
5183
|
+
* ```
|
|
4597
5184
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
|
|
4598
5185
|
*/
|
|
4599
5186
|
GetTabs = 'getTabs',
|
|
@@ -4607,6 +5194,15 @@ export enum HostEvent {
|
|
|
4607
5194
|
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
4608
5195
|
* 'f547ec54-2a37-4516-a222-2b06719af726'])
|
|
4609
5196
|
* ```
|
|
5197
|
+
* @example
|
|
5198
|
+
* ```js
|
|
5199
|
+
* // Set visible tabs from liveboard context
|
|
5200
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5201
|
+
* liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
|
|
5202
|
+
* '430496d6-6903-4601-937e-2c691821af3c',
|
|
5203
|
+
* 'f547ec54-2a37-4516-a222-2b06719af726'
|
|
5204
|
+
* ], ContextType.Liveboard);
|
|
5205
|
+
* ```
|
|
4610
5206
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4611
5207
|
*/
|
|
4612
5208
|
SetVisibleTabs = 'SetPinboardVisibleTabs',
|
|
@@ -4620,6 +5216,15 @@ export enum HostEvent {
|
|
|
4620
5216
|
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
4621
5217
|
* 'i547ec54-2a37-4516-a222-2b06719af726'])
|
|
4622
5218
|
* ```
|
|
5219
|
+
* @example
|
|
5220
|
+
* ```js
|
|
5221
|
+
* // Set hidden tabs from liveboard context
|
|
5222
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5223
|
+
* liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
|
|
5224
|
+
* '630496d6-6903-4601-937e-2c691821af3c',
|
|
5225
|
+
* 'i547ec54-2a37-4516-a222-2b06719af726'
|
|
5226
|
+
* ], ContextType.Liveboard);
|
|
5227
|
+
* ```
|
|
4623
5228
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
|
|
4624
5229
|
*/
|
|
4625
5230
|
SetHiddenTabs = 'SetPinboardHiddenTabs',
|
|
@@ -4696,13 +5301,24 @@ export enum HostEvent {
|
|
|
4696
5301
|
UpdateCrossFilter = 'UpdateCrossFilter',
|
|
4697
5302
|
/**
|
|
4698
5303
|
* Trigger reset action for a personalized Liveboard view.
|
|
5304
|
+
* This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
4699
5305
|
* @example
|
|
4700
5306
|
* ```js
|
|
4701
5307
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
4702
5308
|
* ```
|
|
4703
5309
|
* @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
|
|
5310
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4704
5311
|
*/
|
|
4705
5312
|
ResetLiveboardPersonalisedView = 'ResetLiveboardPersonalisedView',
|
|
5313
|
+
/**
|
|
5314
|
+
* Trigger reset action for a personalized Liveboard view.
|
|
5315
|
+
* @example
|
|
5316
|
+
* ```js
|
|
5317
|
+
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
|
|
5318
|
+
* ```
|
|
5319
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5320
|
+
*/
|
|
5321
|
+
ResetLiveboardPersonalizedView = ResetLiveboardPersonalisedView,
|
|
4706
5322
|
/**
|
|
4707
5323
|
* Triggers an action to update Parameter values on embedded
|
|
4708
5324
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
@@ -4719,6 +5335,16 @@ export enum HostEvent {
|
|
|
4719
5335
|
* isVisibleToUser: false
|
|
4720
5336
|
* }])
|
|
4721
5337
|
* ```
|
|
5338
|
+
* @example
|
|
5339
|
+
* ```js
|
|
5340
|
+
* // Update parameters from liveboard context
|
|
5341
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5342
|
+
* liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
|
|
5343
|
+
* name: "Region Param",
|
|
5344
|
+
* value: "West",
|
|
5345
|
+
* isVisibleToUser: true
|
|
5346
|
+
* }], ContextType.Liveboard);
|
|
5347
|
+
* ```
|
|
4722
5348
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4723
5349
|
*/
|
|
4724
5350
|
UpdateParameters = 'UpdateParameters',
|
|
@@ -4738,18 +5364,77 @@ export enum HostEvent {
|
|
|
4738
5364
|
* });
|
|
4739
5365
|
*
|
|
4740
5366
|
* spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
|
|
5367
|
+
*```
|
|
5368
|
+
* @example
|
|
5369
|
+
* ```js
|
|
5370
|
+
* // Get parameters from liveboard context
|
|
5371
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5372
|
+
* liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
|
|
5373
|
+
* console.log('parameters', parameters);
|
|
5374
|
+
* });
|
|
4741
5375
|
* ```
|
|
4742
5376
|
* @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
|
|
4743
5377
|
*/
|
|
4744
5378
|
GetParameters = 'GetParameters',
|
|
4745
5379
|
/**
|
|
4746
5380
|
* Triggers an event to update a personalized view of a Liveboard.
|
|
5381
|
+
* This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
|
|
4747
5382
|
* ```js
|
|
4748
5383
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
4749
5384
|
* ```
|
|
5385
|
+
* @example
|
|
5386
|
+
* ```js
|
|
5387
|
+
* // Update personalized view from liveboard context
|
|
5388
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5389
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
|
|
5390
|
+
* viewId: '1234'
|
|
5391
|
+
* }, ContextType.Liveboard);
|
|
5392
|
+
* ```
|
|
4750
5393
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
5394
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
4751
5395
|
*/
|
|
4752
5396
|
UpdatePersonalisedView = 'UpdatePersonalisedView',
|
|
5397
|
+
/**
|
|
5398
|
+
* Triggers an event to update a personalized view of a Liveboard.
|
|
5399
|
+
* ```js
|
|
5400
|
+
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
5401
|
+
* ```
|
|
5402
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5403
|
+
*/
|
|
5404
|
+
UpdatePersonalizedView = UpdatePersonalisedView,
|
|
5405
|
+
/**
|
|
5406
|
+
* Triggers selection of a specific Personalized View on a
|
|
5407
|
+
* Liveboard without reloading the embed. Pass either a
|
|
5408
|
+
* `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
|
|
5409
|
+
* If neither is provided, the Liveboard resets to the original/default view.
|
|
5410
|
+
* When a `viewName` is provided and multiple views share
|
|
5411
|
+
* the same name, the first match is selected.
|
|
5412
|
+
* @example
|
|
5413
|
+
* ```js
|
|
5414
|
+
* liveboardEmbed.trigger(
|
|
5415
|
+
* HostEvent.SelectPersonalizedView,
|
|
5416
|
+
* { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
|
|
5417
|
+
* )
|
|
5418
|
+
* ```
|
|
5419
|
+
* @example
|
|
5420
|
+
* ```js
|
|
5421
|
+
* // Select by name
|
|
5422
|
+
* liveboardEmbed.trigger(
|
|
5423
|
+
* HostEvent.SelectPersonalizedView,
|
|
5424
|
+
* { viewName: 'Dr Smith Cardiology' },
|
|
5425
|
+
* )
|
|
5426
|
+
* ```
|
|
5427
|
+
* @example
|
|
5428
|
+
* ```js
|
|
5429
|
+
* // Reset to default view
|
|
5430
|
+
* liveboardEmbed.trigger(
|
|
5431
|
+
* HostEvent.SelectPersonalizedView,
|
|
5432
|
+
* {},
|
|
5433
|
+
* )
|
|
5434
|
+
* ```
|
|
5435
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
5436
|
+
*/
|
|
5437
|
+
SelectPersonalizedView = 'SelectPersonalisedView',
|
|
4753
5438
|
/**
|
|
4754
5439
|
* @hidden
|
|
4755
5440
|
* Notify when info call is completed successfully
|
|
@@ -4769,7 +5454,8 @@ export enum HostEvent {
|
|
|
4769
5454
|
* add a name and description for the Answer.
|
|
4770
5455
|
* @param - Includes the following keys:
|
|
4771
5456
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
4772
|
-
* embed.
|
|
5457
|
+
* embed.
|
|
5458
|
+
* - `name`: Optional. Name string for the Answer.
|
|
4773
5459
|
* - `description`: Optional. Description text for the Answer.
|
|
4774
5460
|
* @example
|
|
4775
5461
|
* ```js
|
|
@@ -4788,6 +5474,34 @@ export enum HostEvent {
|
|
|
4788
5474
|
*
|
|
4789
5475
|
* spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
|
|
4790
5476
|
* ```
|
|
5477
|
+
* @example
|
|
5478
|
+
* ```js
|
|
5479
|
+
* // Using context parameter to save answer from search context
|
|
5480
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5481
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5482
|
+
* name: "Regional sales analysis",
|
|
5483
|
+
* description: "Sales breakdown by region"
|
|
5484
|
+
* }, ContextType.Search);
|
|
5485
|
+
* ```
|
|
5486
|
+
* @example
|
|
5487
|
+
* ```js
|
|
5488
|
+
* // Save answer from answer context (explore modal)
|
|
5489
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5490
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5491
|
+
* name: "Modified analysis",
|
|
5492
|
+
* description: "Updated from explore view"
|
|
5493
|
+
* }, ContextType.Answer);
|
|
5494
|
+
* ```
|
|
5495
|
+
* @example
|
|
5496
|
+
* ```js
|
|
5497
|
+
* // Save answer from spotter context
|
|
5498
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5499
|
+
* const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
|
|
5500
|
+
* vizId: latestSpotterVizId,
|
|
5501
|
+
* name: "AI insights",
|
|
5502
|
+
* description: "Generated from Spotter"
|
|
5503
|
+
* }, ContextType.Spotter);
|
|
5504
|
+
* ```
|
|
4791
5505
|
* @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
|
|
4792
5506
|
*/
|
|
4793
5507
|
SaveAnswer = 'saveAnswer',
|
|
@@ -4829,6 +5543,15 @@ export enum HostEvent {
|
|
|
4829
5543
|
* executeSearch: true,
|
|
4830
5544
|
* })
|
|
4831
5545
|
* ```
|
|
5546
|
+
* @example
|
|
5547
|
+
* ```js
|
|
5548
|
+
* // Spotter search from spotter context
|
|
5549
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5550
|
+
* spotterEmbed.trigger(HostEvent.SpotterSearch, {
|
|
5551
|
+
* query: 'sales by region',
|
|
5552
|
+
* executeSearch: true
|
|
5553
|
+
* }, ContextType.Spotter);
|
|
5554
|
+
* ```
|
|
4832
5555
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4833
5556
|
*/
|
|
4834
5557
|
SpotterSearch = 'SpotterSearch',
|
|
@@ -4839,6 +5562,12 @@ export enum HostEvent {
|
|
|
4839
5562
|
* ```js
|
|
4840
5563
|
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
|
|
4841
5564
|
* ```
|
|
5565
|
+
* @example
|
|
5566
|
+
* ```js
|
|
5567
|
+
* // Edit last prompt from spotter context
|
|
5568
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5569
|
+
* spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
|
|
5570
|
+
* ```
|
|
4842
5571
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4843
5572
|
*/
|
|
4844
5573
|
EditLastPrompt = 'EditLastPrompt',
|
|
@@ -4848,6 +5577,12 @@ export enum HostEvent {
|
|
|
4848
5577
|
* ```js
|
|
4849
5578
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
4850
5579
|
* ```
|
|
5580
|
+
* @example
|
|
5581
|
+
* ```js
|
|
5582
|
+
* // Preview spotter data from spotter context
|
|
5583
|
+
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
5584
|
+
* spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
|
|
5585
|
+
* ```
|
|
4851
5586
|
* @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
|
|
4852
5587
|
*/
|
|
4853
5588
|
PreviewSpotterData = 'PreviewSpotterData',
|
|
@@ -5142,6 +5877,7 @@ export enum Param {
|
|
|
5142
5877
|
IsLazyLoadingForEmbedEnabled = 'isLazyLoadingForEmbedEnabled',
|
|
5143
5878
|
RootMarginForLazyLoad = 'rootMarginForLazyLoad',
|
|
5144
5879
|
isPNGInScheduledEmailsEnabled = 'isPNGInScheduledEmailsEnabled',
|
|
5880
|
+
IsWYSIWYGLiveboardPDFEnabled = 'isWYSIWYGLiveboardPDFEnabled',
|
|
5145
5881
|
isLiveboardXLSXCSVDownloadEnabled = 'isLiveboardXLSXCSVDownloadEnabled',
|
|
5146
5882
|
isGranularXLSXCSVSchedulesEnabled = 'isGranularXLSXCSVSchedulesEnabled',
|
|
5147
5883
|
isCentralizedLiveboardFilterUXEnabled = 'isCentralizedLiveboardFilterUXEnabled',
|
|
@@ -5487,6 +6223,16 @@ export enum Action {
|
|
|
5487
6223
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
5488
6224
|
*/
|
|
5489
6225
|
DownloadLiveboard = 'downloadLiveboard',
|
|
6226
|
+
/**
|
|
6227
|
+
* The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
|
|
6228
|
+
* Allows downloading the entire Liveboard as a continuous PDF.
|
|
6229
|
+
* @example
|
|
6230
|
+
* ```js
|
|
6231
|
+
* disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
|
|
6232
|
+
* ```
|
|
6233
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6234
|
+
*/
|
|
6235
|
+
DownloadLiveboardAsContinuousPDF = 'downloadLiveboardAsContinuousPDF',
|
|
5490
6236
|
/**
|
|
5491
6237
|
* @hidden
|
|
5492
6238
|
*/
|
|
@@ -5611,6 +6357,7 @@ export enum Action {
|
|
|
5611
6357
|
* disabledActions: [Action.LiveboardInfo]
|
|
5612
6358
|
* ```
|
|
5613
6359
|
*/
|
|
6360
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
5614
6361
|
LiveboardInfo = 'pinboardInfo',
|
|
5615
6362
|
/**
|
|
5616
6363
|
* @hidden
|
|
@@ -5641,6 +6388,7 @@ export enum Action {
|
|
|
5641
6388
|
* disabledActions: [Action.Subscription]
|
|
5642
6389
|
* ```
|
|
5643
6390
|
*/
|
|
6391
|
+
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
|
|
5644
6392
|
Subscription = 'subscription',
|
|
5645
6393
|
/**
|
|
5646
6394
|
* The **Explore** action on Liveboard visualizations
|
|
@@ -6121,13 +6869,25 @@ export enum Action {
|
|
|
6121
6869
|
/**
|
|
6122
6870
|
* The Liveboard Personalised Views dropdown.
|
|
6123
6871
|
* Allows navigating to a personalized Liveboard View.
|
|
6872
|
+
* This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
|
|
6124
6873
|
* @example
|
|
6125
6874
|
* ```js
|
|
6126
6875
|
* disabledActions: [Action.PersonalisedViewsDropdown]
|
|
6127
6876
|
* ```
|
|
6128
6877
|
* @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
|
|
6878
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6129
6879
|
*/
|
|
6130
6880
|
PersonalisedViewsDropdown = 'personalisedViewsDropdown',
|
|
6881
|
+
/**
|
|
6882
|
+
* The Liveboard Personalized Views dropdown.
|
|
6883
|
+
* Allows navigating to a personalized Liveboard View.
|
|
6884
|
+
* @example
|
|
6885
|
+
* ```js
|
|
6886
|
+
* disabledActions: [Action.PersonalizedViewsDropdown]
|
|
6887
|
+
* ```
|
|
6888
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6889
|
+
*/
|
|
6890
|
+
PersonalizedViewsDropdown = PersonalisedViewsDropdown,
|
|
6131
6891
|
/**
|
|
6132
6892
|
* Action ID for show or hide the user details on a
|
|
6133
6893
|
* Liveboard (Recently visited / social proof)
|
|
@@ -6220,15 +6980,29 @@ export enum Action {
|
|
|
6220
6980
|
/**
|
|
6221
6981
|
* The **Organize Favourites** action on Homepage
|
|
6222
6982
|
* *Favorites* module.
|
|
6983
|
+
* This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
|
|
6223
6984
|
*
|
|
6224
6985
|
* @example
|
|
6225
6986
|
* ```js
|
|
6226
6987
|
* disabledActions: [Action.OrganiseFavourites]
|
|
6227
6988
|
* ```
|
|
6228
6989
|
* @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
|
|
6990
|
+
* @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
6229
6991
|
*/
|
|
6230
6992
|
OrganiseFavourites = 'organiseFavourites',
|
|
6231
6993
|
|
|
6994
|
+
/**
|
|
6995
|
+
* The **Organize Favorites** action on Homepage
|
|
6996
|
+
* *Favorites* module.
|
|
6997
|
+
*
|
|
6998
|
+
* @example
|
|
6999
|
+
* ```js
|
|
7000
|
+
* disabledActions: [Action.OrganizeFavorites]
|
|
7001
|
+
* ```
|
|
7002
|
+
* @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
|
|
7003
|
+
*/
|
|
7004
|
+
OrganizeFavorites = OrganiseFavourites,
|
|
7005
|
+
|
|
6232
7006
|
/**
|
|
6233
7007
|
* The **AI Highlights** action on a Liveboard.
|
|
6234
7008
|
*
|
|
@@ -6695,6 +7469,39 @@ export enum Action {
|
|
|
6695
7469
|
* @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
|
|
6696
7470
|
*/
|
|
6697
7471
|
SpotterDocs = 'spotterDocs',
|
|
7472
|
+
/**
|
|
7473
|
+
* Controls visibility and disable state of the connector resources
|
|
7474
|
+
* section in the Spotter chat interface.
|
|
7475
|
+
* @example
|
|
7476
|
+
* ```js
|
|
7477
|
+
* hiddenActions: [Action.SpotterChatConnectorResources]
|
|
7478
|
+
* disabledActions: [Action.SpotterChatConnectorResources]
|
|
7479
|
+
* ```
|
|
7480
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
7481
|
+
*/
|
|
7482
|
+
SpotterChatConnectorResources = 'spotterChatConnectorResources',
|
|
7483
|
+
/**
|
|
7484
|
+
* Controls visibility and disable state of the connectors
|
|
7485
|
+
* in the Spotter chat interface.
|
|
7486
|
+
* @example
|
|
7487
|
+
* ```js
|
|
7488
|
+
* hiddenActions: [Action.SpotterChatConnectors]
|
|
7489
|
+
* disabledActions: [Action.SpotterChatConnectors]
|
|
7490
|
+
* ```
|
|
7491
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
7492
|
+
*/
|
|
7493
|
+
SpotterChatConnectors = 'spotterChatConnectors',
|
|
7494
|
+
/**
|
|
7495
|
+
* Controls visibility and disable state of the mode switcher
|
|
7496
|
+
* in the Spotter chat interface.
|
|
7497
|
+
* @example
|
|
7498
|
+
* ```js
|
|
7499
|
+
* hiddenActions: [Action.SpotterChatModeSwitcher]
|
|
7500
|
+
* disabledActions: [Action.SpotterChatModeSwitcher]
|
|
7501
|
+
* ```
|
|
7502
|
+
* @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
|
|
7503
|
+
*/
|
|
7504
|
+
SpotterChatModeSwitcher = 'spotterChatModeSwitcher',
|
|
6698
7505
|
/**
|
|
6699
7506
|
* The **Include current period** checkbox for date filters.
|
|
6700
7507
|
* Controls the visibility and availability of the option to include
|
|
@@ -7071,6 +7878,15 @@ export enum EmbedErrorCodes {
|
|
|
7071
7878
|
|
|
7072
7879
|
/** Invalid URL provided in configuration */
|
|
7073
7880
|
INVALID_URL = 'INVALID_URL',
|
|
7881
|
+
|
|
7882
|
+
/** Host event payload validation failed */
|
|
7883
|
+
HOST_EVENT_VALIDATION = 'HOST_EVENT_VALIDATION',
|
|
7884
|
+
|
|
7885
|
+
/** UpdateFilters payload is invalid - missing or malformed filter/filters */
|
|
7886
|
+
UPDATEFILTERS_INVALID_PAYLOAD = 'UPDATEFILTERS_INVALID_PAYLOAD',
|
|
7887
|
+
|
|
7888
|
+
/** DrillDown payload is invalid - missing or malformed points */
|
|
7889
|
+
DRILLDOWN_INVALID_PAYLOAD = 'DRILLDOWN_INVALID_PAYLOAD',
|
|
7074
7890
|
}
|
|
7075
7891
|
|
|
7076
7892
|
/**
|
|
@@ -7084,7 +7900,8 @@ export enum EmbedErrorCodes {
|
|
|
7084
7900
|
*
|
|
7085
7901
|
* - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
|
|
7086
7902
|
* - **message**: Human-readable error description (string or array of strings for
|
|
7087
|
-
* multiple errors)
|
|
7903
|
+
* multiple errors)
|
|
7904
|
+
* - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
|
|
7088
7905
|
* values
|
|
7089
7906
|
* - **[key: string]**: Additional context-specific for backward compatibility
|
|
7090
7907
|
*
|
|
@@ -7133,6 +7950,22 @@ export interface EmbedErrorDetailsEvent {
|
|
|
7133
7950
|
[key: string]: any;
|
|
7134
7951
|
}
|
|
7135
7952
|
|
|
7953
|
+
/**
|
|
7954
|
+
* Context types for specifying the page context when triggering host events.
|
|
7955
|
+
* Used as the third parameter in the `trigger` method to help ThoughtSpot
|
|
7956
|
+
* understand the current page context for better event handling.
|
|
7957
|
+
*
|
|
7958
|
+
* @example
|
|
7959
|
+
* ```js
|
|
7960
|
+
* import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
7961
|
+
*
|
|
7962
|
+
* // Trigger an event with specific context
|
|
7963
|
+
* embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
|
|
7964
|
+
* ```
|
|
7965
|
+
*
|
|
7966
|
+
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7967
|
+
* @group Events
|
|
7968
|
+
*/
|
|
7136
7969
|
export enum ContextType {
|
|
7137
7970
|
/**
|
|
7138
7971
|
* Search answer context for search page or edit viz dialog on liveboard page.
|
|
@@ -7150,6 +7983,11 @@ export enum ContextType {
|
|
|
7150
7983
|
* Spotter context for spotter modal/page.
|
|
7151
7984
|
*/
|
|
7152
7985
|
Spotter = 'spotter',
|
|
7986
|
+
|
|
7987
|
+
/**
|
|
7988
|
+
* Other context for any other generic page.
|
|
7989
|
+
*/
|
|
7990
|
+
Other = 'other',
|
|
7153
7991
|
}
|
|
7154
7992
|
|
|
7155
7993
|
export interface DefaultAppInitData {
|
|
@@ -7257,33 +8095,7 @@ export interface ObjectIds {
|
|
|
7257
8095
|
modalTitle?: string;
|
|
7258
8096
|
}
|
|
7259
8097
|
|
|
7260
|
-
|
|
7261
|
-
* Context object for the embedded component.
|
|
7262
|
-
* @example
|
|
7263
|
-
* ```js
|
|
7264
|
-
* const context = await embed.getCurrentContext();
|
|
7265
|
-
* console.log(context);
|
|
7266
|
-
* {
|
|
7267
|
-
* stack: [
|
|
7268
|
-
* {
|
|
7269
|
-
* name: 'Liveboard',
|
|
7270
|
-
* type: ContextType.Liveboard,
|
|
7271
|
-
* objectIds: {
|
|
7272
|
-
* liveboardId: '123',
|
|
7273
|
-
* },
|
|
7274
|
-
* },
|
|
7275
|
-
* ],
|
|
7276
|
-
* currentContext: {
|
|
7277
|
-
* name: 'Liveboard',
|
|
7278
|
-
* type: ContextType.Liveboard,
|
|
7279
|
-
* objectIds: {
|
|
7280
|
-
* liveboardId: '123',
|
|
7281
|
-
* },
|
|
7282
|
-
* },
|
|
7283
|
-
* }
|
|
7284
|
-
* ```
|
|
7285
|
-
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
|
|
7286
|
-
*/
|
|
8098
|
+
|
|
7287
8099
|
export interface ContextObject {
|
|
7288
8100
|
/**
|
|
7289
8101
|
* Stack of context objects.
|