@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.
Files changed (255) hide show
  1. package/cjs/package.json +3 -3
  2. package/cjs/src/auth.d.ts +2 -1
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +2 -1
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/authToken.d.ts.map +1 -1
  7. package/cjs/src/authToken.js.map +1 -1
  8. package/cjs/src/css-variables.d.ts +87 -17
  9. package/cjs/src/css-variables.d.ts.map +1 -1
  10. package/cjs/src/embed/app.d.ts +41 -1
  11. package/cjs/src/embed/app.d.ts.map +1 -1
  12. package/cjs/src/embed/app.js +25 -36
  13. package/cjs/src/embed/app.js.map +1 -1
  14. package/cjs/src/embed/app.spec.js +35 -23
  15. package/cjs/src/embed/app.spec.js.map +1 -1
  16. package/cjs/src/embed/base.d.ts.map +1 -1
  17. package/cjs/src/embed/base.js.map +1 -1
  18. package/cjs/src/embed/base.spec.js.map +1 -1
  19. package/cjs/src/embed/conversation.d.ts +23 -1
  20. package/cjs/src/embed/conversation.d.ts.map +1 -1
  21. package/cjs/src/embed/conversation.js +18 -33
  22. package/cjs/src/embed/conversation.js.map +1 -1
  23. package/cjs/src/embed/conversation.spec.js +129 -97
  24. package/cjs/src/embed/conversation.spec.js.map +1 -1
  25. package/cjs/src/embed/events.spec.js +72 -0
  26. package/cjs/src/embed/events.spec.js.map +1 -1
  27. package/cjs/src/embed/hostEventClient/contracts.d.ts +105 -3
  28. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  29. package/cjs/src/embed/hostEventClient/contracts.js +9 -0
  30. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  31. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +28 -0
  32. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  33. package/cjs/src/embed/hostEventClient/host-event-client.js +106 -9
  34. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  35. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +327 -6
  36. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  37. package/cjs/src/embed/hostEventClient/utils.d.ts +22 -0
  38. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -0
  39. package/cjs/src/embed/hostEventClient/utils.js +51 -0
  40. package/cjs/src/embed/hostEventClient/utils.js.map +1 -0
  41. package/cjs/src/embed/hostEventClient/utils.spec.d.ts +2 -0
  42. package/cjs/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
  43. package/cjs/src/embed/hostEventClient/utils.spec.js +115 -0
  44. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -0
  45. package/cjs/src/embed/liveboard.d.ts +18 -0
  46. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  47. package/cjs/src/embed/liveboard.js +10 -3
  48. package/cjs/src/embed/liveboard.js.map +1 -1
  49. package/cjs/src/embed/liveboard.spec.js +54 -2
  50. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  51. package/cjs/src/embed/sage.d.ts.map +1 -1
  52. package/cjs/src/embed/sage.js.map +1 -1
  53. package/cjs/src/embed/search.spec.js.map +1 -1
  54. package/cjs/src/embed/spotter-utils.d.ts +20 -0
  55. package/cjs/src/embed/spotter-utils.d.ts.map +1 -0
  56. package/cjs/src/embed/spotter-utils.js +52 -0
  57. package/cjs/src/embed/spotter-utils.js.map +1 -0
  58. package/cjs/src/embed/spotter-utils.spec.d.ts +2 -0
  59. package/cjs/src/embed/spotter-utils.spec.d.ts.map +1 -0
  60. package/cjs/src/embed/spotter-utils.spec.js +54 -0
  61. package/cjs/src/embed/spotter-utils.spec.js.map +1 -0
  62. package/cjs/src/embed/ts-embed.d.ts +41 -2
  63. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  64. package/cjs/src/embed/ts-embed.js +54 -3
  65. package/cjs/src/embed/ts-embed.js.map +1 -1
  66. package/cjs/src/errors.d.ts +2 -0
  67. package/cjs/src/errors.d.ts.map +1 -1
  68. package/cjs/src/errors.js +2 -0
  69. package/cjs/src/errors.js.map +1 -1
  70. package/cjs/src/react/index.d.ts.map +1 -1
  71. package/cjs/src/react/index.js +58 -53
  72. package/cjs/src/react/index.js.map +1 -1
  73. package/cjs/src/types.d.ts +832 -33
  74. package/cjs/src/types.d.ts.map +1 -1
  75. package/cjs/src/types.js +835 -3
  76. package/cjs/src/types.js.map +1 -1
  77. package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
  78. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  79. package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
  80. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  81. package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
  82. package/cjs/src/utils/graphql/preview-service.js.map +1 -1
  83. package/cjs/src/utils/processData.d.ts.map +1 -1
  84. package/cjs/src/utils/processData.js.map +1 -1
  85. package/cjs/src/utils.d.ts +0 -9
  86. package/cjs/src/utils.d.ts.map +1 -1
  87. package/cjs/src/utils.js +1 -10
  88. package/cjs/src/utils.js.map +1 -1
  89. package/dist/index-ChNydfIz.js +7371 -0
  90. package/dist/index-DW2wEHqy.js +7371 -0
  91. package/dist/src/auth.d.ts +2 -1
  92. package/dist/src/auth.d.ts.map +1 -1
  93. package/dist/src/authToken.d.ts.map +1 -1
  94. package/dist/src/css-variables.d.ts +87 -17
  95. package/dist/src/css-variables.d.ts.map +1 -1
  96. package/dist/src/embed/app.d.ts +41 -1
  97. package/dist/src/embed/app.d.ts.map +1 -1
  98. package/dist/src/embed/base.d.ts.map +1 -1
  99. package/dist/src/embed/conversation.d.ts +23 -1
  100. package/dist/src/embed/conversation.d.ts.map +1 -1
  101. package/dist/src/embed/hostEventClient/contracts.d.ts +105 -3
  102. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  103. package/dist/src/embed/hostEventClient/host-event-client.d.ts +28 -0
  104. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  105. package/dist/src/embed/hostEventClient/utils.d.ts +22 -0
  106. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -0
  107. package/dist/src/embed/hostEventClient/utils.spec.d.ts +2 -0
  108. package/dist/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
  109. package/dist/src/embed/liveboard.d.ts +18 -0
  110. package/dist/src/embed/liveboard.d.ts.map +1 -1
  111. package/dist/src/embed/sage.d.ts.map +1 -1
  112. package/dist/src/embed/spotter-utils.d.ts +20 -0
  113. package/dist/src/embed/spotter-utils.d.ts.map +1 -0
  114. package/dist/src/embed/spotter-utils.spec.d.ts +2 -0
  115. package/dist/src/embed/spotter-utils.spec.d.ts.map +1 -0
  116. package/dist/src/embed/ts-embed.d.ts +41 -2
  117. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  118. package/dist/src/errors.d.ts +2 -0
  119. package/dist/src/errors.d.ts.map +1 -1
  120. package/dist/src/react/index.d.ts.map +1 -1
  121. package/dist/src/types.d.ts +832 -33
  122. package/dist/src/types.d.ts.map +1 -1
  123. package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
  124. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  125. package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
  126. package/dist/src/utils/processData.d.ts.map +1 -1
  127. package/dist/src/utils.d.ts +0 -9
  128. package/dist/src/utils.d.ts.map +1 -1
  129. package/dist/tsembed-react.es.js +1208 -154
  130. package/dist/tsembed-react.js +1206 -152
  131. package/dist/tsembed.es.js +1150 -101
  132. package/dist/tsembed.js +1148 -99
  133. package/dist/visual-embed-sdk-react-full.d.ts +1156 -55
  134. package/dist/visual-embed-sdk-react.d.ts +1156 -55
  135. package/dist/visual-embed-sdk.d.ts +1179 -60
  136. package/lib/package.json +3 -3
  137. package/lib/src/auth.d.ts +2 -1
  138. package/lib/src/auth.d.ts.map +1 -1
  139. package/lib/src/auth.js +2 -1
  140. package/lib/src/auth.js.map +1 -1
  141. package/lib/src/authToken.d.ts.map +1 -1
  142. package/lib/src/authToken.js.map +1 -1
  143. package/lib/src/css-variables.d.ts +87 -17
  144. package/lib/src/css-variables.d.ts.map +1 -1
  145. package/lib/src/embed/app.d.ts +41 -1
  146. package/lib/src/embed/app.d.ts.map +1 -1
  147. package/lib/src/embed/app.js +27 -38
  148. package/lib/src/embed/app.js.map +1 -1
  149. package/lib/src/embed/app.spec.js +35 -23
  150. package/lib/src/embed/app.spec.js.map +1 -1
  151. package/lib/src/embed/base.d.ts.map +1 -1
  152. package/lib/src/embed/base.js.map +1 -1
  153. package/lib/src/embed/base.spec.js.map +1 -1
  154. package/lib/src/embed/conversation.d.ts +23 -1
  155. package/lib/src/embed/conversation.d.ts.map +1 -1
  156. package/lib/src/embed/conversation.js +19 -34
  157. package/lib/src/embed/conversation.js.map +1 -1
  158. package/lib/src/embed/conversation.spec.js +131 -99
  159. package/lib/src/embed/conversation.spec.js.map +1 -1
  160. package/lib/src/embed/events.spec.js +73 -1
  161. package/lib/src/embed/events.spec.js.map +1 -1
  162. package/lib/src/embed/hostEventClient/contracts.d.ts +105 -3
  163. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  164. package/lib/src/embed/hostEventClient/contracts.js +9 -0
  165. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  166. package/lib/src/embed/hostEventClient/host-event-client.d.ts +28 -0
  167. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  168. package/lib/src/embed/hostEventClient/host-event-client.js +106 -9
  169. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  170. package/lib/src/embed/hostEventClient/host-event-client.spec.js +327 -6
  171. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  172. package/lib/src/embed/hostEventClient/utils.d.ts +22 -0
  173. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -0
  174. package/lib/src/embed/hostEventClient/utils.js +43 -0
  175. package/lib/src/embed/hostEventClient/utils.js.map +1 -0
  176. package/lib/src/embed/hostEventClient/utils.spec.d.ts +2 -0
  177. package/lib/src/embed/hostEventClient/utils.spec.d.ts.map +1 -0
  178. package/lib/src/embed/hostEventClient/utils.spec.js +113 -0
  179. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -0
  180. package/lib/src/embed/liveboard.d.ts +18 -0
  181. package/lib/src/embed/liveboard.d.ts.map +1 -1
  182. package/lib/src/embed/liveboard.js +10 -3
  183. package/lib/src/embed/liveboard.js.map +1 -1
  184. package/lib/src/embed/liveboard.spec.js +54 -2
  185. package/lib/src/embed/liveboard.spec.js.map +1 -1
  186. package/lib/src/embed/sage.d.ts.map +1 -1
  187. package/lib/src/embed/sage.js.map +1 -1
  188. package/lib/src/embed/search.spec.js.map +1 -1
  189. package/lib/src/embed/spotter-utils.d.ts +20 -0
  190. package/lib/src/embed/spotter-utils.d.ts.map +1 -0
  191. package/lib/src/embed/spotter-utils.js +47 -0
  192. package/lib/src/embed/spotter-utils.js.map +1 -0
  193. package/lib/src/embed/spotter-utils.spec.d.ts +2 -0
  194. package/lib/src/embed/spotter-utils.spec.d.ts.map +1 -0
  195. package/lib/src/embed/spotter-utils.spec.js +52 -0
  196. package/lib/src/embed/spotter-utils.spec.js.map +1 -0
  197. package/lib/src/embed/ts-embed.d.ts +41 -2
  198. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  199. package/lib/src/embed/ts-embed.js +55 -4
  200. package/lib/src/embed/ts-embed.js.map +1 -1
  201. package/lib/src/errors.d.ts +2 -0
  202. package/lib/src/errors.d.ts.map +1 -1
  203. package/lib/src/errors.js +2 -0
  204. package/lib/src/errors.js.map +1 -1
  205. package/lib/src/react/index.d.ts.map +1 -1
  206. package/lib/src/react/index.js +58 -53
  207. package/lib/src/react/index.js.map +1 -1
  208. package/lib/src/types.d.ts +832 -33
  209. package/lib/src/types.d.ts.map +1 -1
  210. package/lib/src/types.js +835 -3
  211. package/lib/src/types.js.map +1 -1
  212. package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
  213. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  214. package/lib/src/utils/graphql/answerService/answerService.js +4 -2
  215. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  216. package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
  217. package/lib/src/utils/graphql/preview-service.js.map +1 -1
  218. package/lib/src/utils/processData.d.ts.map +1 -1
  219. package/lib/src/utils/processData.js.map +1 -1
  220. package/lib/src/utils.d.ts +0 -9
  221. package/lib/src/utils.d.ts.map +1 -1
  222. package/lib/src/utils.js +0 -8
  223. package/lib/src/utils.js.map +1 -1
  224. package/lib/src/visual-embed-sdk.d.ts +1179 -60
  225. package/package.json +3 -3
  226. package/src/auth.spec.ts +1 -1
  227. package/src/auth.ts +2 -1
  228. package/src/authToken.ts +0 -1
  229. package/src/css-variables.ts +96 -17
  230. package/src/embed/app.spec.ts +48 -30
  231. package/src/embed/app.ts +59 -54
  232. package/src/embed/base.spec.ts +1 -2
  233. package/src/embed/base.ts +1 -4
  234. package/src/embed/conversation.spec.ts +150 -119
  235. package/src/embed/conversation.ts +30 -54
  236. package/src/embed/events.spec.ts +88 -0
  237. package/src/embed/hostEventClient/contracts.ts +105 -2
  238. package/src/embed/hostEventClient/host-event-client.spec.ts +504 -6
  239. package/src/embed/hostEventClient/host-event-client.ts +146 -15
  240. package/src/embed/hostEventClient/utils.spec.ts +137 -0
  241. package/src/embed/hostEventClient/utils.ts +61 -0
  242. package/src/embed/liveboard.spec.ts +71 -2
  243. package/src/embed/liveboard.ts +29 -2
  244. package/src/embed/sage.ts +0 -1
  245. package/src/embed/search.spec.ts +0 -2
  246. package/src/embed/spotter-utils.spec.ts +56 -0
  247. package/src/embed/spotter-utils.ts +65 -0
  248. package/src/embed/ts-embed.ts +58 -4
  249. package/src/errors.ts +2 -0
  250. package/src/react/index.tsx +76 -72
  251. package/src/types.ts +843 -31
  252. package/src/utils/graphql/answerService/answerService.ts +4 -5
  253. package/src/utils/graphql/preview-service.ts +0 -1
  254. package/src/utils/processData.ts +0 -5
  255. package/src/utils.ts +0 -14
package/cjs/src/types.js CHANGED
@@ -56,6 +56,7 @@ var AuthType;
56
56
  * @deprecated This option is deprecated.
57
57
  * @hidden
58
58
  */
59
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
59
60
  AuthType["SAML"] = "SSO_SAML";
60
61
  /**
61
62
  * SSO using SAML
@@ -101,6 +102,7 @@ var AuthType;
101
102
  * });
102
103
  * ```
103
104
  */
105
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
104
106
  AuthType["SAMLRedirect"] = "SSO_SAML";
105
107
  /**
106
108
  * SSO using OIDC
@@ -114,6 +116,7 @@ var AuthType;
114
116
  * Will make the host application redirect to the OIDC IdP.
115
117
  * See code samples in {@link SAMLRedirect}.
116
118
  */
119
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
117
120
  AuthType["OIDCRedirect"] = "SSO_OIDC";
118
121
  /**
119
122
  * Trusted authentication server
@@ -139,6 +142,7 @@ var AuthType;
139
142
  * });
140
143
  * ```
141
144
  */
145
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
142
146
  AuthType["TrustedAuthToken"] = "AuthServer";
143
147
  /**
144
148
  * Trusted authentication server Cookieless, Use your own authentication
@@ -875,6 +879,17 @@ var EmbedEvent;
875
879
  * ```
876
880
  */
877
881
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
882
+ /**
883
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
884
+ * on a Liveboard.
885
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
886
+ * @example
887
+ * ```js
888
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
889
+ * console.log('download liveboard as continuous PDF', payload)})
890
+ * ```
891
+ */
892
+ EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
878
893
  /**
879
894
  * Emitted when an Answer is deleted in the app
880
895
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -1278,22 +1293,45 @@ var EmbedEvent;
1278
1293
  /**
1279
1294
  * Emitted when name, status (private or public) or filter values of a
1280
1295
  * Personalised view is updated.
1296
+ * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
1281
1297
  * @returns viewName: string
1282
1298
  * @returns viewId: string
1283
1299
  * @returns liveboardId: string
1284
1300
  * @returns isPublic: boolean
1285
1301
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1302
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1286
1303
  */
1287
1304
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1305
+ /**
1306
+ * Emitted when name, status (private or public) or filter values of a
1307
+ * Personalized view is updated.
1308
+ * @returns viewName: string
1309
+ * @returns viewId: string
1310
+ * @returns liveboardId: string
1311
+ * @returns isPublic: boolean
1312
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1313
+ */
1314
+ EmbedEvent["UpdatePersonalizedView"] = "updatePersonalisedView";
1288
1315
  /**
1289
1316
  * Emitted when a Personalised view is saved.
1317
+ * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
1290
1318
  * @returns viewName: string
1291
1319
  * @returns viewId: string
1292
1320
  * @returns liveboardId: string
1293
1321
  * @returns isPublic: boolean
1294
1322
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1323
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1295
1324
  */
1296
1325
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1326
+ /**
1327
+ * Emitted when a Personalized view is saved.
1328
+ * @returns viewName: string
1329
+ * @returns viewId: string
1330
+ * @returns liveboardId: string
1331
+ * @returns isPublic: boolean
1332
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1333
+ */
1334
+ EmbedEvent["SavePersonalizedView"] = "savePersonalisedView";
1297
1335
  /**
1298
1336
  * Emitted when a Liveboard is reset.
1299
1337
  * @returns viewName: string
@@ -1305,11 +1343,41 @@ var EmbedEvent;
1305
1343
  EmbedEvent["ResetLiveboard"] = "resetLiveboard";
1306
1344
  /**
1307
1345
  * Emitted when a PersonalisedView is deleted.
1346
+ * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
1308
1347
  * @returns views: string[]
1309
1348
  * @returns liveboardId: string
1310
1349
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1350
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1311
1351
  */
1312
1352
  EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
1353
+ /**
1354
+ * Emitted when a PersonalizedView is deleted.
1355
+ * @returns views: string[]
1356
+ * @returns liveboardId: string
1357
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1358
+ */
1359
+ EmbedEvent["DeletePersonalizedView"] = "deletePersonalisedView";
1360
+ /**
1361
+ * Emitted when a user selects a different Personalized View or
1362
+ * resets to the original/default view on a Liveboard.
1363
+ * @example
1364
+ * ```js
1365
+ * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
1366
+ * console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
1367
+ * console.log(data.viewId); // '2a021a12-...' or null (default)
1368
+ * console.log(data.liveboardId); // 'abc123...'
1369
+ * console.log(data.isPublic); // true | false
1370
+ * })
1371
+ * ```
1372
+ * @returns viewName: string - Name of the selected view,
1373
+ * or 'Original View' when reset to default.
1374
+ * @returns viewId: string | null - GUID of the selected view,
1375
+ * or null when reset to default.
1376
+ * @returns liveboardId: string
1377
+ * @returns isPublic: boolean
1378
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1379
+ */
1380
+ EmbedEvent["ChangePersonalizedView"] = "changePersonalisedView";
1313
1381
  /**
1314
1382
  * Emitted when a user creates a Worksheet.
1315
1383
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -1343,7 +1411,8 @@ var EmbedEvent;
1343
1411
  * @param - Includes the following parameters:
1344
1412
  * - `payload`: The payload received from the embed related to the Data API call.
1345
1413
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
1346
- * will run or block the search operation, and if blocked, which error message to provide.
1414
+ * will run or block the search operation, and if blocked, which error message to
1415
+ * provide.
1347
1416
  * - `execute` - When `execute` returns `true`, the search is run.
1348
1417
  * When `execute` returns `false`, the search is not executed.
1349
1418
  * - `error` - Developers can customize the user-facing error message when `execute`
@@ -1777,6 +1846,25 @@ var EmbedEvent;
1777
1846
  * );
1778
1847
  * }
1779
1848
  * ```
1849
+ *
1850
+ * **Context Parameter (SDK: 1.45.2+)**
1851
+ *
1852
+ * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
1853
+ * `ContextType` as the third parameter to the `trigger` method to specify the context
1854
+ * from which the event is triggered. This helps ThoughtSpot understand the current page
1855
+ * context (Search, Answer, Liveboard, or Spotter) for better event handling.
1856
+ *
1857
+ * @example
1858
+ * ```js
1859
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
1860
+ *
1861
+ * // Trigger Pin event with Search context
1862
+ * appEmbed.trigger(HostEvent.Pin, {
1863
+ * vizId: "123",
1864
+ * liveboardId: "456"
1865
+ * }, ContextType.Search);
1866
+ * ```
1867
+ *
1780
1868
  * @group Events
1781
1869
  */
1782
1870
  var HostEvent;
@@ -1799,6 +1887,16 @@ var HostEvent;
1799
1887
  execute: true
1800
1888
  });
1801
1889
  * ```
1890
+ * @example
1891
+ * ```js
1892
+ * // Trigger search from search context
1893
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1894
+ * appEmbed.trigger(HostEvent.Search, {
1895
+ * searchQuery: "[revenue] by [region]",
1896
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
1897
+ * execute: true
1898
+ * }, ContextType.Search);
1899
+ * ```
1802
1900
  */
1803
1901
  HostEvent["Search"] = "search";
1804
1902
  /**
@@ -1849,6 +1947,24 @@ var HostEvent;
1849
1947
  * });
1850
1948
  * })
1851
1949
  * ```
1950
+ * @example
1951
+ * ```js
1952
+ * // Drill down from answer context
1953
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1954
+ * appEmbed.trigger(HostEvent.DrillDown, {
1955
+ * points: { clickedPoint, selectedPoints },
1956
+ * autoDrillDown: true
1957
+ * }, ContextType.Answer);
1958
+ * ```
1959
+ * @example
1960
+ * ```js
1961
+ * // Drill down from search context
1962
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1963
+ * searchEmbed.trigger(HostEvent.DrillDown, {
1964
+ * points: { clickedPoint, selectedPoints },
1965
+ * columnGuid: "column-guid"
1966
+ * }, ContextType.Search);
1967
+ * ```
1852
1968
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1853
1969
  */
1854
1970
  HostEvent["DrillDown"] = "triggerDrillDown";
@@ -1869,6 +1985,13 @@ var HostEvent;
1869
1985
  * const url = embed.trigger(HostEvent.GetIframeUrl);
1870
1986
  * console.log("iFrameURL",url);
1871
1987
  * ```
1988
+ * @example
1989
+ * ```js
1990
+ * // Get iframe URL from specific context
1991
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1992
+ * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
1993
+ * console.log("iFrameURL", url);
1994
+ * ```
1872
1995
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
1873
1996
  */
1874
1997
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
@@ -1882,6 +2005,15 @@ var HostEvent;
1882
2005
  * '730496d6-6903-4601-937e-2c691821af3c',
1883
2006
  * 'd547ec54-2a37-4516-a222-2b06719af726'])
1884
2007
  * ```
2008
+ * @example
2009
+ * ```js
2010
+ * // Set visible vizs from liveboard context
2011
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2012
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
2013
+ * '730496d6-6903-4601-937e-2c691821af3c',
2014
+ * 'd547ec54-2a37-4516-a222-2b06719af726'
2015
+ * ], ContextType.Liveboard);
2016
+ * ```
1885
2017
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1886
2018
  */
1887
2019
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
@@ -1894,6 +2026,14 @@ var HostEvent;
1894
2026
  * tabId:'730496d6-6903-4601-937e-2c691821af3c'
1895
2027
  * })
1896
2028
  * ```
2029
+ * @example
2030
+ * ```js
2031
+ * // Set active tab from liveboard context
2032
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2033
+ * liveboardEmbed.trigger(HostEvent.SetActiveTab, {
2034
+ * tabId: '730496d6-6903-4601-937e-2c691821af3c'
2035
+ * }, ContextType.Liveboard);
2036
+ * ```
1897
2037
  * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
1898
2038
  */
1899
2039
  HostEvent["SetActiveTab"] = "SetActiveTab";
@@ -1927,6 +2067,15 @@ var HostEvent;
1927
2067
  * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
1928
2068
  * ])
1929
2069
  * ```
2070
+ * @example
2071
+ * ```js
2072
+ * // Update runtime filters from liveboard context
2073
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2074
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
2075
+ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
2076
+ * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
2077
+ * ], ContextType.Liveboard);
2078
+ * ```
1930
2079
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1931
2080
  * @important
1932
2081
  */
@@ -1960,6 +2109,14 @@ var HostEvent;
1960
2109
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
1961
2110
  * { column: {columnId: '<column-GUID>'}})
1962
2111
  * ```
2112
+ * @example
2113
+ * ```js
2114
+ * // Open filter from search context
2115
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2116
+ * searchEmbed.trigger(HostEvent.OpenFilter, {
2117
+ * column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
2118
+ * }, ContextType.Search);
2119
+ * ```
1963
2120
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1964
2121
  */
1965
2122
  HostEvent["OpenFilter"] = "openFilter";
@@ -1970,6 +2127,14 @@ var HostEvent;
1970
2127
  * ```js
1971
2128
  * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
1972
2129
  * ```
2130
+ * @example
2131
+ * ```js
2132
+ * // Add columns from search context
2133
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2134
+ * searchEmbed.trigger(HostEvent.AddColumns, {
2135
+ * columnIds: ['col-guid-1', 'col-guid-2']
2136
+ * }, ContextType.Search);
2137
+ * ```
1973
2138
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1974
2139
  */
1975
2140
  HostEvent["AddColumns"] = "addColumns";
@@ -1980,6 +2145,14 @@ var HostEvent;
1980
2145
  * ```js
1981
2146
  * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
1982
2147
  * ```
2148
+ * @example
2149
+ * ```js
2150
+ * // Remove column from search context
2151
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2152
+ * searchEmbed.trigger(HostEvent.RemoveColumn, {
2153
+ * columnId: 'column-guid'
2154
+ * }, ContextType.Search);
2155
+ * ```
1983
2156
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1984
2157
  */
1985
2158
  HostEvent["RemoveColumn"] = "removeColumn";
@@ -2066,6 +2239,37 @@ var HostEvent;
2066
2239
  *
2067
2240
  * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
2068
2241
  * ```
2242
+ * @example
2243
+ * ```js
2244
+ * // Using context parameter to specify the context type (SDK: 1.45.2+)
2245
+ * // Pin from a search answer context
2246
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2247
+ * appEmbed.trigger(HostEvent.Pin, {
2248
+ * vizId: "123",
2249
+ * newVizName: "Sales by region",
2250
+ * liveboardId: "456"
2251
+ * }, ContextType.Search);
2252
+ * ```
2253
+ * @example
2254
+ * ```js
2255
+ * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
2256
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2257
+ * appEmbed.trigger(HostEvent.Pin, {
2258
+ * vizId: "789",
2259
+ * newVizName: "Revenue trends",
2260
+ * liveboardId: "456"
2261
+ * }, ContextType.Answer);
2262
+ * ```
2263
+ * @example
2264
+ * ```js
2265
+ * // Pin from a spotter context (SDK: 1.45.2+)
2266
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2267
+ * appEmbed.trigger(HostEvent.Pin, {
2268
+ * vizId: latestSpotterVizId,
2269
+ * newVizName: "AI-generated insights",
2270
+ * liveboardId: "456"
2271
+ * }, ContextType.Spotter);
2272
+ * ```
2069
2273
  *
2070
2274
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2071
2275
  */
@@ -2076,6 +2280,12 @@ var HostEvent;
2076
2280
  * @example
2077
2281
  * ```js
2078
2282
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2283
+ *```
2284
+ * @example
2285
+ * ```js
2286
+ * // Show liveboard info from liveboard context
2287
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2288
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
2079
2289
  * ```
2080
2290
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2081
2291
  */
@@ -2086,6 +2296,12 @@ var HostEvent;
2086
2296
  * ```js
2087
2297
  * liveboardEmbed.trigger(HostEvent.Schedule)
2088
2298
  * ```
2299
+ * @example
2300
+ * ```js
2301
+ * // Schedule from liveboard context
2302
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2303
+ * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
2304
+ * ```
2089
2305
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2090
2306
  */
2091
2307
  HostEvent["Schedule"] = "subscription";
@@ -2095,6 +2311,12 @@ var HostEvent;
2095
2311
  * ```js
2096
2312
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
2097
2313
  * ```
2314
+ * @example
2315
+ * ```js
2316
+ * // Manage schedules from liveboard context
2317
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2318
+ * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
2319
+ * ```
2098
2320
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2099
2321
  */
2100
2322
  HostEvent["SchedulesList"] = "schedule-list";
@@ -2105,6 +2327,18 @@ var HostEvent;
2105
2327
  * ```js
2106
2328
  * liveboardEmbed.trigger(HostEvent.ExportTML)
2107
2329
  * ```
2330
+ * @example
2331
+ * ```js
2332
+ * // Export TML from liveboard context
2333
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2334
+ * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
2335
+ * ```
2336
+ * @example
2337
+ * ```js
2338
+ * // Export TML from search-answer context
2339
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2340
+ * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
2341
+ * ```
2108
2342
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2109
2343
  */
2110
2344
  HostEvent["ExportTML"] = "exportTSL";
@@ -2115,6 +2349,18 @@ var HostEvent;
2115
2349
  * ```js
2116
2350
  * liveboardEmbed.trigger(HostEvent.EditTML)
2117
2351
  * ```
2352
+ * @example
2353
+ * ```js
2354
+ * // Edit TML from liveboard context
2355
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2356
+ * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
2357
+ * ```
2358
+ * @example
2359
+ * ```js
2360
+ * // Edit TML from search-answer context
2361
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2362
+ * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
2363
+ * ```
2118
2364
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2119
2365
  */
2120
2366
  HostEvent["EditTML"] = "editTSL";
@@ -2124,6 +2370,12 @@ var HostEvent;
2124
2370
  * ```js
2125
2371
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
2126
2372
  * ```
2373
+ * @example
2374
+ * ```js
2375
+ * // Update TML from liveboard context
2376
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2377
+ * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
2378
+ * ```
2127
2379
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2128
2380
  */
2129
2381
  HostEvent["UpdateTML"] = "updateTSL";
@@ -2150,10 +2402,34 @@ var HostEvent;
2150
2402
  *
2151
2403
  * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
2152
2404
  * ```
2405
+ * @example
2406
+ * ```js
2407
+ * // Download as PDF from search-answer context
2408
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2409
+ * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
2410
+ * ```
2411
+ * @example
2412
+ * ```js
2413
+ * // Download as PDF from liveboard context
2414
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2415
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
2416
+ * ```
2153
2417
  *
2154
2418
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2155
2419
  */
2156
2420
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
2421
+ /**
2422
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
2423
+ * embedded Liveboard.
2424
+ *
2425
+ * @example
2426
+ * ```js
2427
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
2428
+ * ```
2429
+ *
2430
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2431
+ */
2432
+ HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
2157
2433
  /**
2158
2434
  * Trigger the **AI Highlights** action on an embedded Liveboard
2159
2435
  *
@@ -2194,6 +2470,18 @@ var HostEvent;
2194
2470
  *
2195
2471
  * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2196
2472
  * ```
2473
+ * @example
2474
+ * ```js
2475
+ * // Make a copy from answer context
2476
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2477
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
2478
+ * ```
2479
+ * @example
2480
+ * ```js
2481
+ * // Make a copy from search context
2482
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2483
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
2484
+ * ```
2197
2485
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2198
2486
  */
2199
2487
  HostEvent["MakeACopy"] = "makeACopy";
@@ -2218,6 +2506,14 @@ var HostEvent;
2218
2506
  * ```js
2219
2507
  * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2220
2508
  * ```
2509
+ * @example
2510
+ * ```js
2511
+ * // Explore from liveboard context
2512
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2513
+ * liveboardEmbed.trigger(HostEvent.Explore, {
2514
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2515
+ * }, ContextType.Liveboard);
2516
+ * ```
2221
2517
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2222
2518
  */
2223
2519
  HostEvent["Explore"] = "explore";
@@ -2235,6 +2531,20 @@ var HostEvent;
2235
2531
  * ```js
2236
2532
  * searchEmbed.trigger(HostEvent.CreateMonitor)
2237
2533
  * ```
2534
+ * @example
2535
+ * ```js
2536
+ * // Create monitor from answer context
2537
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2538
+ * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
2539
+ * ```
2540
+ * @example
2541
+ * ```js
2542
+ * // Create monitor from liveboard context
2543
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2544
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor, {
2545
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2546
+ * }, ContextType.Liveboard);
2547
+ * ```
2238
2548
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2239
2549
  */
2240
2550
  HostEvent["CreateMonitor"] = "createMonitor";
@@ -2256,6 +2566,20 @@ var HostEvent;
2256
2566
  * ```js
2257
2567
  * vizEmbed.trigger(HostEvent.ManageMonitor)
2258
2568
  * ```
2569
+ * @example
2570
+ * ```js
2571
+ * // Manage monitor from answer context
2572
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2573
+ * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
2574
+ * ```
2575
+ * @example
2576
+ * ```js
2577
+ * // Manage monitor from liveboard context
2578
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2579
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
2580
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2581
+ * }, ContextType.Liveboard);
2582
+ * ```
2259
2583
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2260
2584
  */
2261
2585
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2281,6 +2605,26 @@ var HostEvent;
2281
2605
  * ```js
2282
2606
  * spotterEmbed.trigger(HostEvent.Edit);
2283
2607
  * ```
2608
+ * @example
2609
+ * ```js
2610
+ * // Using context parameter to edit liveboard context
2611
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2612
+ * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
2613
+ * ```
2614
+ * @example
2615
+ * ```js
2616
+ * // Edit from search context
2617
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2618
+ * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
2619
+ * ```
2620
+ * * @example
2621
+ * ```js
2622
+ * // Edit from spotter context
2623
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2624
+ * appEmbed.trigger(HostEvent.Edit, {
2625
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2626
+ * }, ContextType.Spotter);
2627
+ * ```
2284
2628
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2285
2629
  */
2286
2630
  HostEvent["Edit"] = "edit";
@@ -2298,6 +2642,34 @@ var HostEvent;
2298
2642
  * ```js
2299
2643
  * vizEmbed.trigger(HostEvent.CopyLink)
2300
2644
  * ```
2645
+ * @example
2646
+ * ```js
2647
+ * // Copy link from liveboard context
2648
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2649
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2650
+ * ```
2651
+ * @example
2652
+ * ```js
2653
+ * // Copy link from liveboard visualization context
2654
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2655
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2656
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2657
+ * }, ContextType.Liveboard);
2658
+ * ```
2659
+ * @example
2660
+ * ```js
2661
+ * // Copy link from liveboard context
2662
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2663
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2664
+ * ```
2665
+ * @example
2666
+ * ```js
2667
+ * // Copy link from liveboard visualization context
2668
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2669
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2670
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2671
+ * }, ContextType.Liveboard);
2672
+ * ```
2301
2673
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2302
2674
  */
2303
2675
  HostEvent["CopyLink"] = "embedDocument";
@@ -2315,6 +2687,34 @@ var HostEvent;
2315
2687
  * ```js
2316
2688
  * vizEmbed.trigger(HostEvent.Present)
2317
2689
  * ```
2690
+ * @example
2691
+ * ```js
2692
+ * // Present from liveboard visualization context
2693
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2694
+ * liveboardEmbed.trigger(HostEvent.Present, {
2695
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2696
+ * }, ContextType.Liveboard);
2697
+ * ```
2698
+ * @example
2699
+ * ```js
2700
+ * // Present from liveboard context
2701
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2702
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2703
+ * ```
2704
+ * @example
2705
+ * ```js
2706
+ * // Present from liveboard visualization context
2707
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2708
+ * liveboardEmbed.trigger(HostEvent.Present, {
2709
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2710
+ * }, ContextType.Liveboard);
2711
+ * ```
2712
+ * @example
2713
+ * ```js
2714
+ * // Present from liveboard context
2715
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2716
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2717
+ * ```
2318
2718
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2319
2719
  */
2320
2720
  HostEvent["Present"] = "present";
@@ -2343,6 +2743,22 @@ var HostEvent;
2343
2743
  * tml.answer.search_query // TML representation of the search query
2344
2744
  * );
2345
2745
  * })
2746
+ * ```
2747
+ * @example
2748
+ * ```js
2749
+ * // Get TML from search context
2750
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2751
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
2752
+ * console.log(tml.answer.search_query);
2753
+ * });
2754
+ * ```
2755
+ * @example
2756
+ * ```js
2757
+ * // Get TML from search-answer context
2758
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2759
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
2760
+ * console.log(tml.answer);
2761
+ * });
2346
2762
  * ```
2347
2763
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
2348
2764
  * @important
@@ -2364,6 +2780,20 @@ var HostEvent;
2364
2780
  * ```js
2365
2781
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
2366
2782
  * ```
2783
+ * @example
2784
+ * ```js
2785
+ * // Show underlying data from liveboard visualization context
2786
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2787
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {
2788
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2789
+ * }, ContextType.Liveboard);
2790
+ * ```
2791
+ * @example
2792
+ * ```js
2793
+ * // Show underlying data from search context
2794
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2795
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
2796
+ * ```
2367
2797
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2368
2798
  */
2369
2799
  HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
@@ -2381,6 +2811,18 @@ var HostEvent;
2381
2811
  * ```js
2382
2812
  * searchEmbed.trigger(HostEvent.Delete)
2383
2813
  * ```
2814
+ * @example
2815
+ * ```js
2816
+ * // Delete from liveboard context
2817
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2818
+ * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
2819
+ * ```
2820
+ * @example
2821
+ * ```js
2822
+ * // Delete from search context
2823
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2824
+ * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
2825
+ * ```
2384
2826
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2385
2827
  */
2386
2828
  HostEvent["Delete"] = "onDeleteAnswer";
@@ -2401,6 +2843,20 @@ var HostEvent;
2401
2843
  * ```js
2402
2844
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
2403
2845
  * ```
2846
+ * @example
2847
+ * ```js
2848
+ * // SpotIQ analyze from search-answer context
2849
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2850
+ * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
2851
+ * ```
2852
+ * @example
2853
+ * ```js
2854
+ * // SpotIQ analyze from search context
2855
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2856
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
2857
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2858
+ * }, ContextType.Liveboard);
2859
+ * ```
2404
2860
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2405
2861
  */
2406
2862
  HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
@@ -2452,9 +2908,16 @@ var HostEvent;
2452
2908
  *
2453
2909
  * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2454
2910
  * ```
2911
+ * @example
2912
+ * ```js
2913
+ * // Download as PNG from search-answer context
2914
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2915
+ * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
2916
+ * ```
2455
2917
  *
2456
2918
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
2457
2919
  */
2920
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
2458
2921
  HostEvent["DownloadAsPng"] = "downloadAsPng";
2459
2922
  /**
2460
2923
  * Trigger the **Download** > **CSV** action on tables in
@@ -2480,6 +2943,18 @@ var HostEvent;
2480
2943
  *
2481
2944
  * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2482
2945
  * ```
2946
+ * @example
2947
+ * ```js
2948
+ * // Download as CSV from search-answer context
2949
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2950
+ * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
2951
+ * ```
2952
+ * @example
2953
+ * ```js
2954
+ * // Download as CSV from search context
2955
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2956
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
2957
+ * ```
2483
2958
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2484
2959
  */
2485
2960
  HostEvent["DownloadAsCsv"] = "downloadAsCSV";
@@ -2507,6 +2982,18 @@ var HostEvent;
2507
2982
  *
2508
2983
  * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2509
2984
  * ```
2985
+ * @example
2986
+ * ```js
2987
+ * // Download as XLSX from answer context
2988
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2989
+ * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
2990
+ * ```
2991
+ * @example
2992
+ * ```js
2993
+ * // Download as XLSX from search context
2994
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2995
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
2996
+ * ```
2510
2997
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2511
2998
  */
2512
2999
  HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
@@ -2520,6 +3007,18 @@ var HostEvent;
2520
3007
  * ```js
2521
3008
  * searchEmbed.trigger(HostEvent.Share)
2522
3009
  * ```
3010
+ * @example
3011
+ * ```js
3012
+ * // Share from Liveboard context
3013
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3014
+ * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
3015
+ * ```
3016
+ * @example
3017
+ * ```js
3018
+ * // Share from search-answer context
3019
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3020
+ * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
3021
+ * ```
2523
3022
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2524
3023
  */
2525
3024
  HostEvent["Share"] = "share";
@@ -2559,6 +3058,18 @@ var HostEvent;
2559
3058
  *
2560
3059
  * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2561
3060
  * ```
3061
+ * @example
3062
+ * ```js
3063
+ * // Save from answer context
3064
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3065
+ * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
3066
+ * ```
3067
+ * @example
3068
+ * ```js
3069
+ * // Save from search context
3070
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3071
+ * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
3072
+ * ```
2562
3073
  *
2563
3074
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2564
3075
  */
@@ -2575,6 +3086,20 @@ var HostEvent;
2575
3086
  * ```js
2576
3087
  * vizEmbed.trigger(HostEvent.SyncToSheets)
2577
3088
  * ```
3089
+ * @example
3090
+ * ```js
3091
+ * // Sync to sheets from answer context
3092
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3093
+ * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
3094
+ * ```
3095
+ * @example
3096
+ * ```js
3097
+ * // Sync to sheets from liveboard context
3098
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3099
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {
3100
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3101
+ * }, ContextType.Liveboard);
3102
+ * ```
2578
3103
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2579
3104
  */
2580
3105
  HostEvent["SyncToSheets"] = "sync-to-sheets";
@@ -2591,6 +3116,20 @@ var HostEvent;
2591
3116
  * ```js
2592
3117
  * vizEmbed.trigger(HostEvent.SyncToOtherApps)
2593
3118
  * ```
3119
+ * @example
3120
+ * ```js
3121
+ * // Sync to other apps from answer context
3122
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3123
+ * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
3124
+ * ```
3125
+ * @example
3126
+ * ```js
3127
+ * // Sync to other apps from liveboard context
3128
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3129
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
3130
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3131
+ * }, ContextType.Liveboard);
3132
+ * ```
2594
3133
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2595
3134
  */
2596
3135
  HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
@@ -2607,6 +3146,20 @@ var HostEvent;
2607
3146
  * ```js
2608
3147
  * vizEmbed.trigger(HostEvent.ManagePipelines)
2609
3148
  * ```
3149
+ * @example
3150
+ * ```js
3151
+ * // Manage pipelines from answer context
3152
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3153
+ * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
3154
+ * ```
3155
+ * @example
3156
+ * ```js
3157
+ * // Manage pipelines from liveboard context
3158
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3159
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {
3160
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3161
+ * }, ContextType.Liveboard);
3162
+ * ```
2610
3163
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2611
3164
  */
2612
3165
  HostEvent["ManagePipelines"] = "manage-pipeline";
@@ -2619,6 +3172,12 @@ var HostEvent;
2619
3172
  * ```js
2620
3173
  * appEmbed.trigger(HostEvent.ResetSearch)
2621
3174
  * ```
3175
+ * @example
3176
+ * ```js
3177
+ * // Reset search from search context
3178
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3179
+ * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
3180
+ * ```
2622
3181
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
2623
3182
  */
2624
3183
  HostEvent["ResetSearch"] = "resetSearch";
@@ -2630,6 +3189,13 @@ var HostEvent;
2630
3189
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
2631
3190
  * console.log('data', data);
2632
3191
  * ```
3192
+ * @example
3193
+ * ```js
3194
+ * // Get filters from liveboard context
3195
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3196
+ * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
3197
+ * console.log('filters', data);
3198
+ * ```
2633
3199
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2634
3200
  */
2635
3201
  HostEvent["GetFilters"] = "getFilters";
@@ -2637,7 +3203,8 @@ var HostEvent;
2637
3203
  * Update one or several filters applied on a Liveboard.
2638
3204
  * @param - Includes the following keys:
2639
3205
  * - `filter`: A single filter object containing column name, filter operator, and
2640
- * values. - `filters`: Multiple filter objects with column name, filter operator,
3206
+ * values.
3207
+ * - `filters`: Multiple filter objects with column name, filter operator,
2641
3208
  * and values for each.
2642
3209
  *
2643
3210
  * Each filter object must include the following attributes:
@@ -2720,6 +3287,18 @@ var HostEvent;
2720
3287
  * }]
2721
3288
  * });
2722
3289
  * ```
3290
+ * @example
3291
+ * ```js
3292
+ * // Update filters from liveboard context
3293
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3294
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3295
+ * filter: {
3296
+ * column: "item type",
3297
+ * oper: "IN",
3298
+ * values: ["shoes", "boots"]
3299
+ * }
3300
+ * }, ContextType.Liveboard);
3301
+ * ```
2723
3302
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2724
3303
  */
2725
3304
  HostEvent["UpdateFilters"] = "updateFilters";
@@ -2733,6 +3312,14 @@ var HostEvent;
2733
3312
  * );
2734
3313
  * })
2735
3314
  * ```
3315
+ * @example
3316
+ * ```js
3317
+ * // Get tabs from liveboard context
3318
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3319
+ * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
3320
+ * console.log('tabs', tabDetails);
3321
+ * });
3322
+ * ```
2736
3323
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
2737
3324
  */
2738
3325
  HostEvent["GetTabs"] = "getTabs";
@@ -2746,6 +3333,15 @@ var HostEvent;
2746
3333
  * '430496d6-6903-4601-937e-2c691821af3c',
2747
3334
  * 'f547ec54-2a37-4516-a222-2b06719af726'])
2748
3335
  * ```
3336
+ * @example
3337
+ * ```js
3338
+ * // Set visible tabs from liveboard context
3339
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3340
+ * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
3341
+ * '430496d6-6903-4601-937e-2c691821af3c',
3342
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
3343
+ * ], ContextType.Liveboard);
3344
+ * ```
2749
3345
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
2750
3346
  */
2751
3347
  HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
@@ -2759,6 +3355,15 @@ var HostEvent;
2759
3355
  * '630496d6-6903-4601-937e-2c691821af3c',
2760
3356
  * 'i547ec54-2a37-4516-a222-2b06719af726'])
2761
3357
  * ```
3358
+ * @example
3359
+ * ```js
3360
+ * // Set hidden tabs from liveboard context
3361
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3362
+ * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
3363
+ * '630496d6-6903-4601-937e-2c691821af3c',
3364
+ * 'i547ec54-2a37-4516-a222-2b06719af726'
3365
+ * ], ContextType.Liveboard);
3366
+ * ```
2762
3367
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
2763
3368
  */
2764
3369
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
@@ -2835,13 +3440,24 @@ var HostEvent;
2835
3440
  HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
2836
3441
  /**
2837
3442
  * Trigger reset action for a personalized Liveboard view.
3443
+ * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
2838
3444
  * @example
2839
3445
  * ```js
2840
3446
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
2841
3447
  * ```
2842
3448
  * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
3449
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2843
3450
  */
2844
3451
  HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
3452
+ /**
3453
+ * Trigger reset action for a personalized Liveboard view.
3454
+ * @example
3455
+ * ```js
3456
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
3457
+ * ```
3458
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3459
+ */
3460
+ HostEvent["ResetLiveboardPersonalizedView"] = "ResetLiveboardPersonalisedView";
2845
3461
  /**
2846
3462
  * Triggers an action to update Parameter values on embedded
2847
3463
  * Answers, Liveboard, and Spotter answer in Edit mode.
@@ -2858,6 +3474,16 @@ var HostEvent;
2858
3474
  * isVisibleToUser: false
2859
3475
  * }])
2860
3476
  * ```
3477
+ * @example
3478
+ * ```js
3479
+ * // Update parameters from liveboard context
3480
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3481
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
3482
+ * name: "Region Param",
3483
+ * value: "West",
3484
+ * isVisibleToUser: true
3485
+ * }], ContextType.Liveboard);
3486
+ * ```
2861
3487
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2862
3488
  */
2863
3489
  HostEvent["UpdateParameters"] = "UpdateParameters";
@@ -2877,18 +3503,77 @@ var HostEvent;
2877
3503
  * });
2878
3504
  *
2879
3505
  * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
3506
+ *```
3507
+ * @example
3508
+ * ```js
3509
+ * // Get parameters from liveboard context
3510
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3511
+ * liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
3512
+ * console.log('parameters', parameters);
3513
+ * });
2880
3514
  * ```
2881
3515
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2882
3516
  */
2883
3517
  HostEvent["GetParameters"] = "GetParameters";
2884
3518
  /**
2885
3519
  * Triggers an event to update a personalized view of a Liveboard.
3520
+ * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
2886
3521
  * ```js
2887
3522
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
2888
3523
  * ```
3524
+ * @example
3525
+ * ```js
3526
+ * // Update personalized view from liveboard context
3527
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3528
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
3529
+ * viewId: '1234'
3530
+ * }, ContextType.Liveboard);
3531
+ * ```
2889
3532
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
3533
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2890
3534
  */
2891
3535
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
3536
+ /**
3537
+ * Triggers an event to update a personalized view of a Liveboard.
3538
+ * ```js
3539
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
3540
+ * ```
3541
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3542
+ */
3543
+ HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
3544
+ /**
3545
+ * Triggers selection of a specific Personalized View on a
3546
+ * Liveboard without reloading the embed. Pass either a
3547
+ * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
3548
+ * If neither is provided, the Liveboard resets to the original/default view.
3549
+ * When a `viewName` is provided and multiple views share
3550
+ * the same name, the first match is selected.
3551
+ * @example
3552
+ * ```js
3553
+ * liveboardEmbed.trigger(
3554
+ * HostEvent.SelectPersonalizedView,
3555
+ * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
3556
+ * )
3557
+ * ```
3558
+ * @example
3559
+ * ```js
3560
+ * // Select by name
3561
+ * liveboardEmbed.trigger(
3562
+ * HostEvent.SelectPersonalizedView,
3563
+ * { viewName: 'Dr Smith Cardiology' },
3564
+ * )
3565
+ * ```
3566
+ * @example
3567
+ * ```js
3568
+ * // Reset to default view
3569
+ * liveboardEmbed.trigger(
3570
+ * HostEvent.SelectPersonalizedView,
3571
+ * {},
3572
+ * )
3573
+ * ```
3574
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3575
+ */
3576
+ HostEvent["SelectPersonalizedView"] = "SelectPersonalisedView";
2892
3577
  /**
2893
3578
  * @hidden
2894
3579
  * Notify when info call is completed successfully
@@ -2908,7 +3593,8 @@ var HostEvent;
2908
3593
  * add a name and description for the Answer.
2909
3594
  * @param - Includes the following keys:
2910
3595
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
2911
- * embed. - `name`: Optional. Name string for the Answer.
3596
+ * embed.
3597
+ * - `name`: Optional. Name string for the Answer.
2912
3598
  * - `description`: Optional. Description text for the Answer.
2913
3599
  * @example
2914
3600
  * ```js
@@ -2927,6 +3613,34 @@ var HostEvent;
2927
3613
  *
2928
3614
  * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
2929
3615
  * ```
3616
+ * @example
3617
+ * ```js
3618
+ * // Using context parameter to save answer from search context
3619
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3620
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3621
+ * name: "Regional sales analysis",
3622
+ * description: "Sales breakdown by region"
3623
+ * }, ContextType.Search);
3624
+ * ```
3625
+ * @example
3626
+ * ```js
3627
+ * // Save answer from answer context (explore modal)
3628
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3629
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3630
+ * name: "Modified analysis",
3631
+ * description: "Updated from explore view"
3632
+ * }, ContextType.Answer);
3633
+ * ```
3634
+ * @example
3635
+ * ```js
3636
+ * // Save answer from spotter context
3637
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3638
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3639
+ * vizId: latestSpotterVizId,
3640
+ * name: "AI insights",
3641
+ * description: "Generated from Spotter"
3642
+ * }, ContextType.Spotter);
3643
+ * ```
2930
3644
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2931
3645
  */
2932
3646
  HostEvent["SaveAnswer"] = "saveAnswer";
@@ -2968,6 +3682,15 @@ var HostEvent;
2968
3682
  * executeSearch: true,
2969
3683
  * })
2970
3684
  * ```
3685
+ * @example
3686
+ * ```js
3687
+ * // Spotter search from spotter context
3688
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3689
+ * spotterEmbed.trigger(HostEvent.SpotterSearch, {
3690
+ * query: 'sales by region',
3691
+ * executeSearch: true
3692
+ * }, ContextType.Spotter);
3693
+ * ```
2971
3694
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2972
3695
  */
2973
3696
  HostEvent["SpotterSearch"] = "SpotterSearch";
@@ -2978,6 +3701,12 @@ var HostEvent;
2978
3701
  * ```js
2979
3702
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
2980
3703
  * ```
3704
+ * @example
3705
+ * ```js
3706
+ * // Edit last prompt from spotter context
3707
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3708
+ * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
3709
+ * ```
2981
3710
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2982
3711
  */
2983
3712
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
@@ -2987,6 +3716,12 @@ var HostEvent;
2987
3716
  * ```js
2988
3717
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
2989
3718
  * ```
3719
+ * @example
3720
+ * ```js
3721
+ * // Preview spotter data from spotter context
3722
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3723
+ * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
3724
+ * ```
2990
3725
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2991
3726
  */
2992
3727
  HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
@@ -3277,6 +4012,7 @@ var Param;
3277
4012
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
3278
4013
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3279
4014
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
4015
+ Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
3280
4016
  Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
3281
4017
  Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
3282
4018
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
@@ -3621,6 +4357,16 @@ var Action;
3621
4357
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
3622
4358
  */
3623
4359
  Action["DownloadLiveboard"] = "downloadLiveboard";
4360
+ /**
4361
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
4362
+ * Allows downloading the entire Liveboard as a continuous PDF.
4363
+ * @example
4364
+ * ```js
4365
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
4366
+ * ```
4367
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4368
+ */
4369
+ Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
3624
4370
  /**
3625
4371
  * @hidden
3626
4372
  */
@@ -3745,6 +4491,7 @@ var Action;
3745
4491
  * disabledActions: [Action.LiveboardInfo]
3746
4492
  * ```
3747
4493
  */
4494
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
3748
4495
  Action["LiveboardInfo"] = "pinboardInfo";
3749
4496
  /**
3750
4497
  * @hidden
@@ -3775,6 +4522,7 @@ var Action;
3775
4522
  * disabledActions: [Action.Subscription]
3776
4523
  * ```
3777
4524
  */
4525
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
3778
4526
  Action["Subscription"] = "subscription";
3779
4527
  /**
3780
4528
  * The **Explore** action on Liveboard visualizations
@@ -4254,13 +5002,25 @@ var Action;
4254
5002
  /**
4255
5003
  * The Liveboard Personalised Views dropdown.
4256
5004
  * Allows navigating to a personalized Liveboard View.
5005
+ * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
4257
5006
  * @example
4258
5007
  * ```js
4259
5008
  * disabledActions: [Action.PersonalisedViewsDropdown]
4260
5009
  * ```
4261
5010
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
5011
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4262
5012
  */
4263
5013
  Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
5014
+ /**
5015
+ * The Liveboard Personalized Views dropdown.
5016
+ * Allows navigating to a personalized Liveboard View.
5017
+ * @example
5018
+ * ```js
5019
+ * disabledActions: [Action.PersonalizedViewsDropdown]
5020
+ * ```
5021
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5022
+ */
5023
+ Action["PersonalizedViewsDropdown"] = "personalisedViewsDropdown";
4264
5024
  /**
4265
5025
  * Action ID for show or hide the user details on a
4266
5026
  * Liveboard (Recently visited / social proof)
@@ -4348,14 +5108,27 @@ var Action;
4348
5108
  /**
4349
5109
  * The **Organize Favourites** action on Homepage
4350
5110
  * *Favorites* module.
5111
+ * This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
4351
5112
  *
4352
5113
  * @example
4353
5114
  * ```js
4354
5115
  * disabledActions: [Action.OrganiseFavourites]
4355
5116
  * ```
4356
5117
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
5118
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4357
5119
  */
4358
5120
  Action["OrganiseFavourites"] = "organiseFavourites";
5121
+ /**
5122
+ * The **Organize Favorites** action on Homepage
5123
+ * *Favorites* module.
5124
+ *
5125
+ * @example
5126
+ * ```js
5127
+ * disabledActions: [Action.OrganizeFavorites]
5128
+ * ```
5129
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5130
+ */
5131
+ Action["OrganizeFavorites"] = "organiseFavourites";
4359
5132
  /**
4360
5133
  * The **AI Highlights** action on a Liveboard.
4361
5134
  *
@@ -4811,6 +5584,39 @@ var Action;
4811
5584
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4812
5585
  */
4813
5586
  Action["SpotterDocs"] = "spotterDocs";
5587
+ /**
5588
+ * Controls visibility and disable state of the connector resources
5589
+ * section in the Spotter chat interface.
5590
+ * @example
5591
+ * ```js
5592
+ * hiddenActions: [Action.SpotterChatConnectorResources]
5593
+ * disabledActions: [Action.SpotterChatConnectorResources]
5594
+ * ```
5595
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5596
+ */
5597
+ Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
5598
+ /**
5599
+ * Controls visibility and disable state of the connectors
5600
+ * in the Spotter chat interface.
5601
+ * @example
5602
+ * ```js
5603
+ * hiddenActions: [Action.SpotterChatConnectors]
5604
+ * disabledActions: [Action.SpotterChatConnectors]
5605
+ * ```
5606
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5607
+ */
5608
+ Action["SpotterChatConnectors"] = "spotterChatConnectors";
5609
+ /**
5610
+ * Controls visibility and disable state of the mode switcher
5611
+ * in the Spotter chat interface.
5612
+ * @example
5613
+ * ```js
5614
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
5615
+ * disabledActions: [Action.SpotterChatModeSwitcher]
5616
+ * ```
5617
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5618
+ */
5619
+ Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
4814
5620
  /**
4815
5621
  * The **Include current period** checkbox for date filters.
4816
5622
  * Controls the visibility and availability of the option to include
@@ -5104,7 +5910,29 @@ var EmbedErrorCodes;
5104
5910
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5105
5911
  /** Invalid URL provided in configuration */
5106
5912
  EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5913
+ /** Host event payload validation failed */
5914
+ EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
5915
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
5916
+ EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
5917
+ /** DrillDown payload is invalid - missing or malformed points */
5918
+ EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
5107
5919
  })(EmbedErrorCodes = exports.EmbedErrorCodes || (exports.EmbedErrorCodes = {}));
5920
+ /**
5921
+ * Context types for specifying the page context when triggering host events.
5922
+ * Used as the third parameter in the `trigger` method to help ThoughtSpot
5923
+ * understand the current page context for better event handling.
5924
+ *
5925
+ * @example
5926
+ * ```js
5927
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
5928
+ *
5929
+ * // Trigger an event with specific context
5930
+ * embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
5931
+ * ```
5932
+ *
5933
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
5934
+ * @group Events
5935
+ */
5108
5936
  var ContextType;
5109
5937
  (function (ContextType) {
5110
5938
  /**
@@ -5123,6 +5951,10 @@ var ContextType;
5123
5951
  * Spotter context for spotter modal/page.
5124
5952
  */
5125
5953
  ContextType["Spotter"] = "spotter";
5954
+ /**
5955
+ * Other context for any other generic page.
5956
+ */
5957
+ ContextType["Other"] = "other";
5126
5958
  })(ContextType = exports.ContextType || (exports.ContextType = {}));
5127
5959
  /**
5128
5960
  * Enum for the type of API intercepted