@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/lib/src/types.js CHANGED
@@ -53,6 +53,7 @@ export var AuthType;
53
53
  * @deprecated This option is deprecated.
54
54
  * @hidden
55
55
  */
56
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
56
57
  AuthType["SAML"] = "SSO_SAML";
57
58
  /**
58
59
  * SSO using SAML
@@ -98,6 +99,7 @@ export var AuthType;
98
99
  * });
99
100
  * ```
100
101
  */
102
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
101
103
  AuthType["SAMLRedirect"] = "SSO_SAML";
102
104
  /**
103
105
  * SSO using OIDC
@@ -111,6 +113,7 @@ export var AuthType;
111
113
  * Will make the host application redirect to the OIDC IdP.
112
114
  * See code samples in {@link SAMLRedirect}.
113
115
  */
116
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
114
117
  AuthType["OIDCRedirect"] = "SSO_OIDC";
115
118
  /**
116
119
  * Trusted authentication server
@@ -136,6 +139,7 @@ export var AuthType;
136
139
  * });
137
140
  * ```
138
141
  */
142
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
139
143
  AuthType["TrustedAuthToken"] = "AuthServer";
140
144
  /**
141
145
  * Trusted authentication server Cookieless, Use your own authentication
@@ -872,6 +876,17 @@ export var EmbedEvent;
872
876
  * ```
873
877
  */
874
878
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
879
+ /**
880
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
881
+ * on a Liveboard.
882
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
883
+ * @example
884
+ * ```js
885
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
886
+ * console.log('download liveboard as continuous PDF', payload)})
887
+ * ```
888
+ */
889
+ EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
875
890
  /**
876
891
  * Emitted when an Answer is deleted in the app
877
892
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -1275,22 +1290,45 @@ export var EmbedEvent;
1275
1290
  /**
1276
1291
  * Emitted when name, status (private or public) or filter values of a
1277
1292
  * Personalised view is updated.
1293
+ * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
1278
1294
  * @returns viewName: string
1279
1295
  * @returns viewId: string
1280
1296
  * @returns liveboardId: string
1281
1297
  * @returns isPublic: boolean
1282
1298
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1299
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1283
1300
  */
1284
1301
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1302
+ /**
1303
+ * Emitted when name, status (private or public) or filter values of a
1304
+ * Personalized view is updated.
1305
+ * @returns viewName: string
1306
+ * @returns viewId: string
1307
+ * @returns liveboardId: string
1308
+ * @returns isPublic: boolean
1309
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1310
+ */
1311
+ EmbedEvent["UpdatePersonalizedView"] = "updatePersonalisedView";
1285
1312
  /**
1286
1313
  * Emitted when a Personalised view is saved.
1314
+ * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
1287
1315
  * @returns viewName: string
1288
1316
  * @returns viewId: string
1289
1317
  * @returns liveboardId: string
1290
1318
  * @returns isPublic: boolean
1291
1319
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1320
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1292
1321
  */
1293
1322
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1323
+ /**
1324
+ * Emitted when a Personalized view is saved.
1325
+ * @returns viewName: string
1326
+ * @returns viewId: string
1327
+ * @returns liveboardId: string
1328
+ * @returns isPublic: boolean
1329
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1330
+ */
1331
+ EmbedEvent["SavePersonalizedView"] = "savePersonalisedView";
1294
1332
  /**
1295
1333
  * Emitted when a Liveboard is reset.
1296
1334
  * @returns viewName: string
@@ -1302,11 +1340,41 @@ export var EmbedEvent;
1302
1340
  EmbedEvent["ResetLiveboard"] = "resetLiveboard";
1303
1341
  /**
1304
1342
  * Emitted when a PersonalisedView is deleted.
1343
+ * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
1305
1344
  * @returns views: string[]
1306
1345
  * @returns liveboardId: string
1307
1346
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1347
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1308
1348
  */
1309
1349
  EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
1350
+ /**
1351
+ * Emitted when a PersonalizedView is deleted.
1352
+ * @returns views: string[]
1353
+ * @returns liveboardId: string
1354
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1355
+ */
1356
+ EmbedEvent["DeletePersonalizedView"] = "deletePersonalisedView";
1357
+ /**
1358
+ * Emitted when a user selects a different Personalized View or
1359
+ * resets to the original/default view on a Liveboard.
1360
+ * @example
1361
+ * ```js
1362
+ * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
1363
+ * console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
1364
+ * console.log(data.viewId); // '2a021a12-...' or null (default)
1365
+ * console.log(data.liveboardId); // 'abc123...'
1366
+ * console.log(data.isPublic); // true | false
1367
+ * })
1368
+ * ```
1369
+ * @returns viewName: string - Name of the selected view,
1370
+ * or 'Original View' when reset to default.
1371
+ * @returns viewId: string | null - GUID of the selected view,
1372
+ * or null when reset to default.
1373
+ * @returns liveboardId: string
1374
+ * @returns isPublic: boolean
1375
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1376
+ */
1377
+ EmbedEvent["ChangePersonalizedView"] = "changePersonalisedView";
1310
1378
  /**
1311
1379
  * Emitted when a user creates a Worksheet.
1312
1380
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -1340,7 +1408,8 @@ export var EmbedEvent;
1340
1408
  * @param - Includes the following parameters:
1341
1409
  * - `payload`: The payload received from the embed related to the Data API call.
1342
1410
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
1343
- * will run or block the search operation, and if blocked, which error message to provide.
1411
+ * will run or block the search operation, and if blocked, which error message to
1412
+ * provide.
1344
1413
  * - `execute` - When `execute` returns `true`, the search is run.
1345
1414
  * When `execute` returns `false`, the search is not executed.
1346
1415
  * - `error` - Developers can customize the user-facing error message when `execute`
@@ -1774,6 +1843,25 @@ export var EmbedEvent;
1774
1843
  * );
1775
1844
  * }
1776
1845
  * ```
1846
+ *
1847
+ * **Context Parameter (SDK: 1.45.2+)**
1848
+ *
1849
+ * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
1850
+ * `ContextType` as the third parameter to the `trigger` method to specify the context
1851
+ * from which the event is triggered. This helps ThoughtSpot understand the current page
1852
+ * context (Search, Answer, Liveboard, or Spotter) for better event handling.
1853
+ *
1854
+ * @example
1855
+ * ```js
1856
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
1857
+ *
1858
+ * // Trigger Pin event with Search context
1859
+ * appEmbed.trigger(HostEvent.Pin, {
1860
+ * vizId: "123",
1861
+ * liveboardId: "456"
1862
+ * }, ContextType.Search);
1863
+ * ```
1864
+ *
1777
1865
  * @group Events
1778
1866
  */
1779
1867
  export var HostEvent;
@@ -1796,6 +1884,16 @@ export var HostEvent;
1796
1884
  execute: true
1797
1885
  });
1798
1886
  * ```
1887
+ * @example
1888
+ * ```js
1889
+ * // Trigger search from search context
1890
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1891
+ * appEmbed.trigger(HostEvent.Search, {
1892
+ * searchQuery: "[revenue] by [region]",
1893
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
1894
+ * execute: true
1895
+ * }, ContextType.Search);
1896
+ * ```
1799
1897
  */
1800
1898
  HostEvent["Search"] = "search";
1801
1899
  /**
@@ -1846,6 +1944,24 @@ export var HostEvent;
1846
1944
  * });
1847
1945
  * })
1848
1946
  * ```
1947
+ * @example
1948
+ * ```js
1949
+ * // Drill down from answer context
1950
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1951
+ * appEmbed.trigger(HostEvent.DrillDown, {
1952
+ * points: { clickedPoint, selectedPoints },
1953
+ * autoDrillDown: true
1954
+ * }, ContextType.Answer);
1955
+ * ```
1956
+ * @example
1957
+ * ```js
1958
+ * // Drill down from search context
1959
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1960
+ * searchEmbed.trigger(HostEvent.DrillDown, {
1961
+ * points: { clickedPoint, selectedPoints },
1962
+ * columnGuid: "column-guid"
1963
+ * }, ContextType.Search);
1964
+ * ```
1849
1965
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1850
1966
  */
1851
1967
  HostEvent["DrillDown"] = "triggerDrillDown";
@@ -1866,6 +1982,13 @@ export var HostEvent;
1866
1982
  * const url = embed.trigger(HostEvent.GetIframeUrl);
1867
1983
  * console.log("iFrameURL",url);
1868
1984
  * ```
1985
+ * @example
1986
+ * ```js
1987
+ * // Get iframe URL from specific context
1988
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1989
+ * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
1990
+ * console.log("iFrameURL", url);
1991
+ * ```
1869
1992
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
1870
1993
  */
1871
1994
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
@@ -1879,6 +2002,15 @@ export var HostEvent;
1879
2002
  * '730496d6-6903-4601-937e-2c691821af3c',
1880
2003
  * 'd547ec54-2a37-4516-a222-2b06719af726'])
1881
2004
  * ```
2005
+ * @example
2006
+ * ```js
2007
+ * // Set visible vizs from liveboard context
2008
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2009
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
2010
+ * '730496d6-6903-4601-937e-2c691821af3c',
2011
+ * 'd547ec54-2a37-4516-a222-2b06719af726'
2012
+ * ], ContextType.Liveboard);
2013
+ * ```
1882
2014
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1883
2015
  */
1884
2016
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
@@ -1891,6 +2023,14 @@ export var HostEvent;
1891
2023
  * tabId:'730496d6-6903-4601-937e-2c691821af3c'
1892
2024
  * })
1893
2025
  * ```
2026
+ * @example
2027
+ * ```js
2028
+ * // Set active tab from liveboard context
2029
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2030
+ * liveboardEmbed.trigger(HostEvent.SetActiveTab, {
2031
+ * tabId: '730496d6-6903-4601-937e-2c691821af3c'
2032
+ * }, ContextType.Liveboard);
2033
+ * ```
1894
2034
  * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
1895
2035
  */
1896
2036
  HostEvent["SetActiveTab"] = "SetActiveTab";
@@ -1924,6 +2064,15 @@ export var HostEvent;
1924
2064
  * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
1925
2065
  * ])
1926
2066
  * ```
2067
+ * @example
2068
+ * ```js
2069
+ * // Update runtime filters from liveboard context
2070
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2071
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
2072
+ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
2073
+ * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
2074
+ * ], ContextType.Liveboard);
2075
+ * ```
1927
2076
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1928
2077
  * @important
1929
2078
  */
@@ -1957,6 +2106,14 @@ export var HostEvent;
1957
2106
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
1958
2107
  * { column: {columnId: '<column-GUID>'}})
1959
2108
  * ```
2109
+ * @example
2110
+ * ```js
2111
+ * // Open filter from search context
2112
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2113
+ * searchEmbed.trigger(HostEvent.OpenFilter, {
2114
+ * column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
2115
+ * }, ContextType.Search);
2116
+ * ```
1960
2117
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1961
2118
  */
1962
2119
  HostEvent["OpenFilter"] = "openFilter";
@@ -1967,6 +2124,14 @@ export var HostEvent;
1967
2124
  * ```js
1968
2125
  * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
1969
2126
  * ```
2127
+ * @example
2128
+ * ```js
2129
+ * // Add columns from search context
2130
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2131
+ * searchEmbed.trigger(HostEvent.AddColumns, {
2132
+ * columnIds: ['col-guid-1', 'col-guid-2']
2133
+ * }, ContextType.Search);
2134
+ * ```
1970
2135
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1971
2136
  */
1972
2137
  HostEvent["AddColumns"] = "addColumns";
@@ -1977,6 +2142,14 @@ export var HostEvent;
1977
2142
  * ```js
1978
2143
  * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
1979
2144
  * ```
2145
+ * @example
2146
+ * ```js
2147
+ * // Remove column from search context
2148
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2149
+ * searchEmbed.trigger(HostEvent.RemoveColumn, {
2150
+ * columnId: 'column-guid'
2151
+ * }, ContextType.Search);
2152
+ * ```
1980
2153
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1981
2154
  */
1982
2155
  HostEvent["RemoveColumn"] = "removeColumn";
@@ -2063,6 +2236,37 @@ export var HostEvent;
2063
2236
  *
2064
2237
  * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
2065
2238
  * ```
2239
+ * @example
2240
+ * ```js
2241
+ * // Using context parameter to specify the context type (SDK: 1.45.2+)
2242
+ * // Pin from a search answer context
2243
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2244
+ * appEmbed.trigger(HostEvent.Pin, {
2245
+ * vizId: "123",
2246
+ * newVizName: "Sales by region",
2247
+ * liveboardId: "456"
2248
+ * }, ContextType.Search);
2249
+ * ```
2250
+ * @example
2251
+ * ```js
2252
+ * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
2253
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2254
+ * appEmbed.trigger(HostEvent.Pin, {
2255
+ * vizId: "789",
2256
+ * newVizName: "Revenue trends",
2257
+ * liveboardId: "456"
2258
+ * }, ContextType.Answer);
2259
+ * ```
2260
+ * @example
2261
+ * ```js
2262
+ * // Pin from a spotter context (SDK: 1.45.2+)
2263
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2264
+ * appEmbed.trigger(HostEvent.Pin, {
2265
+ * vizId: latestSpotterVizId,
2266
+ * newVizName: "AI-generated insights",
2267
+ * liveboardId: "456"
2268
+ * }, ContextType.Spotter);
2269
+ * ```
2066
2270
  *
2067
2271
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2068
2272
  */
@@ -2073,6 +2277,12 @@ export var HostEvent;
2073
2277
  * @example
2074
2278
  * ```js
2075
2279
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2280
+ *```
2281
+ * @example
2282
+ * ```js
2283
+ * // Show liveboard info from liveboard context
2284
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2285
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
2076
2286
  * ```
2077
2287
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2078
2288
  */
@@ -2083,6 +2293,12 @@ export var HostEvent;
2083
2293
  * ```js
2084
2294
  * liveboardEmbed.trigger(HostEvent.Schedule)
2085
2295
  * ```
2296
+ * @example
2297
+ * ```js
2298
+ * // Schedule from liveboard context
2299
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2300
+ * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
2301
+ * ```
2086
2302
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2087
2303
  */
2088
2304
  HostEvent["Schedule"] = "subscription";
@@ -2092,6 +2308,12 @@ export var HostEvent;
2092
2308
  * ```js
2093
2309
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
2094
2310
  * ```
2311
+ * @example
2312
+ * ```js
2313
+ * // Manage schedules from liveboard context
2314
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2315
+ * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
2316
+ * ```
2095
2317
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2096
2318
  */
2097
2319
  HostEvent["SchedulesList"] = "schedule-list";
@@ -2102,6 +2324,18 @@ export var HostEvent;
2102
2324
  * ```js
2103
2325
  * liveboardEmbed.trigger(HostEvent.ExportTML)
2104
2326
  * ```
2327
+ * @example
2328
+ * ```js
2329
+ * // Export TML from liveboard context
2330
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2331
+ * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
2332
+ * ```
2333
+ * @example
2334
+ * ```js
2335
+ * // Export TML from search-answer context
2336
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2337
+ * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
2338
+ * ```
2105
2339
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2106
2340
  */
2107
2341
  HostEvent["ExportTML"] = "exportTSL";
@@ -2112,6 +2346,18 @@ export var HostEvent;
2112
2346
  * ```js
2113
2347
  * liveboardEmbed.trigger(HostEvent.EditTML)
2114
2348
  * ```
2349
+ * @example
2350
+ * ```js
2351
+ * // Edit TML from liveboard context
2352
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2353
+ * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
2354
+ * ```
2355
+ * @example
2356
+ * ```js
2357
+ * // Edit TML from search-answer context
2358
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2359
+ * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
2360
+ * ```
2115
2361
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2116
2362
  */
2117
2363
  HostEvent["EditTML"] = "editTSL";
@@ -2121,6 +2367,12 @@ export var HostEvent;
2121
2367
  * ```js
2122
2368
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
2123
2369
  * ```
2370
+ * @example
2371
+ * ```js
2372
+ * // Update TML from liveboard context
2373
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2374
+ * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
2375
+ * ```
2124
2376
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2125
2377
  */
2126
2378
  HostEvent["UpdateTML"] = "updateTSL";
@@ -2147,10 +2399,34 @@ export var HostEvent;
2147
2399
  *
2148
2400
  * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
2149
2401
  * ```
2402
+ * @example
2403
+ * ```js
2404
+ * // Download as PDF from search-answer context
2405
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2406
+ * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
2407
+ * ```
2408
+ * @example
2409
+ * ```js
2410
+ * // Download as PDF from liveboard context
2411
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2412
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
2413
+ * ```
2150
2414
  *
2151
2415
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2152
2416
  */
2153
2417
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
2418
+ /**
2419
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
2420
+ * embedded Liveboard.
2421
+ *
2422
+ * @example
2423
+ * ```js
2424
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
2425
+ * ```
2426
+ *
2427
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2428
+ */
2429
+ HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
2154
2430
  /**
2155
2431
  * Trigger the **AI Highlights** action on an embedded Liveboard
2156
2432
  *
@@ -2191,6 +2467,18 @@ export var HostEvent;
2191
2467
  *
2192
2468
  * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2193
2469
  * ```
2470
+ * @example
2471
+ * ```js
2472
+ * // Make a copy from answer context
2473
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2474
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
2475
+ * ```
2476
+ * @example
2477
+ * ```js
2478
+ * // Make a copy from search context
2479
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2480
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
2481
+ * ```
2194
2482
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2195
2483
  */
2196
2484
  HostEvent["MakeACopy"] = "makeACopy";
@@ -2215,6 +2503,14 @@ export var HostEvent;
2215
2503
  * ```js
2216
2504
  * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2217
2505
  * ```
2506
+ * @example
2507
+ * ```js
2508
+ * // Explore from liveboard context
2509
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2510
+ * liveboardEmbed.trigger(HostEvent.Explore, {
2511
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2512
+ * }, ContextType.Liveboard);
2513
+ * ```
2218
2514
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2219
2515
  */
2220
2516
  HostEvent["Explore"] = "explore";
@@ -2232,6 +2528,20 @@ export var HostEvent;
2232
2528
  * ```js
2233
2529
  * searchEmbed.trigger(HostEvent.CreateMonitor)
2234
2530
  * ```
2531
+ * @example
2532
+ * ```js
2533
+ * // Create monitor from answer context
2534
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2535
+ * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
2536
+ * ```
2537
+ * @example
2538
+ * ```js
2539
+ * // Create monitor from liveboard context
2540
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2541
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor, {
2542
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2543
+ * }, ContextType.Liveboard);
2544
+ * ```
2235
2545
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2236
2546
  */
2237
2547
  HostEvent["CreateMonitor"] = "createMonitor";
@@ -2253,6 +2563,20 @@ export var HostEvent;
2253
2563
  * ```js
2254
2564
  * vizEmbed.trigger(HostEvent.ManageMonitor)
2255
2565
  * ```
2566
+ * @example
2567
+ * ```js
2568
+ * // Manage monitor from answer context
2569
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2570
+ * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
2571
+ * ```
2572
+ * @example
2573
+ * ```js
2574
+ * // Manage monitor from liveboard context
2575
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2576
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
2577
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2578
+ * }, ContextType.Liveboard);
2579
+ * ```
2256
2580
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2257
2581
  */
2258
2582
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2278,6 +2602,26 @@ export var HostEvent;
2278
2602
  * ```js
2279
2603
  * spotterEmbed.trigger(HostEvent.Edit);
2280
2604
  * ```
2605
+ * @example
2606
+ * ```js
2607
+ * // Using context parameter to edit liveboard context
2608
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2609
+ * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
2610
+ * ```
2611
+ * @example
2612
+ * ```js
2613
+ * // Edit from search context
2614
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2615
+ * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
2616
+ * ```
2617
+ * * @example
2618
+ * ```js
2619
+ * // Edit from spotter context
2620
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2621
+ * appEmbed.trigger(HostEvent.Edit, {
2622
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2623
+ * }, ContextType.Spotter);
2624
+ * ```
2281
2625
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2282
2626
  */
2283
2627
  HostEvent["Edit"] = "edit";
@@ -2295,6 +2639,34 @@ export var HostEvent;
2295
2639
  * ```js
2296
2640
  * vizEmbed.trigger(HostEvent.CopyLink)
2297
2641
  * ```
2642
+ * @example
2643
+ * ```js
2644
+ * // Copy link from liveboard context
2645
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2646
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2647
+ * ```
2648
+ * @example
2649
+ * ```js
2650
+ * // Copy link from liveboard visualization context
2651
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2652
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2653
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2654
+ * }, ContextType.Liveboard);
2655
+ * ```
2656
+ * @example
2657
+ * ```js
2658
+ * // Copy link from liveboard context
2659
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2660
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2661
+ * ```
2662
+ * @example
2663
+ * ```js
2664
+ * // Copy link from liveboard visualization context
2665
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2666
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2667
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2668
+ * }, ContextType.Liveboard);
2669
+ * ```
2298
2670
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2299
2671
  */
2300
2672
  HostEvent["CopyLink"] = "embedDocument";
@@ -2312,6 +2684,34 @@ export var HostEvent;
2312
2684
  * ```js
2313
2685
  * vizEmbed.trigger(HostEvent.Present)
2314
2686
  * ```
2687
+ * @example
2688
+ * ```js
2689
+ * // Present from liveboard visualization context
2690
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2691
+ * liveboardEmbed.trigger(HostEvent.Present, {
2692
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2693
+ * }, ContextType.Liveboard);
2694
+ * ```
2695
+ * @example
2696
+ * ```js
2697
+ * // Present from liveboard context
2698
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2699
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2700
+ * ```
2701
+ * @example
2702
+ * ```js
2703
+ * // Present from liveboard visualization context
2704
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2705
+ * liveboardEmbed.trigger(HostEvent.Present, {
2706
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2707
+ * }, ContextType.Liveboard);
2708
+ * ```
2709
+ * @example
2710
+ * ```js
2711
+ * // Present from liveboard context
2712
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2713
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2714
+ * ```
2315
2715
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2316
2716
  */
2317
2717
  HostEvent["Present"] = "present";
@@ -2340,6 +2740,22 @@ export var HostEvent;
2340
2740
  * tml.answer.search_query // TML representation of the search query
2341
2741
  * );
2342
2742
  * })
2743
+ * ```
2744
+ * @example
2745
+ * ```js
2746
+ * // Get TML from search context
2747
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2748
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
2749
+ * console.log(tml.answer.search_query);
2750
+ * });
2751
+ * ```
2752
+ * @example
2753
+ * ```js
2754
+ * // Get TML from search-answer context
2755
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2756
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
2757
+ * console.log(tml.answer);
2758
+ * });
2343
2759
  * ```
2344
2760
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
2345
2761
  * @important
@@ -2361,6 +2777,20 @@ export var HostEvent;
2361
2777
  * ```js
2362
2778
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
2363
2779
  * ```
2780
+ * @example
2781
+ * ```js
2782
+ * // Show underlying data from liveboard visualization context
2783
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2784
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {
2785
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2786
+ * }, ContextType.Liveboard);
2787
+ * ```
2788
+ * @example
2789
+ * ```js
2790
+ * // Show underlying data from search context
2791
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2792
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
2793
+ * ```
2364
2794
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2365
2795
  */
2366
2796
  HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
@@ -2378,6 +2808,18 @@ export var HostEvent;
2378
2808
  * ```js
2379
2809
  * searchEmbed.trigger(HostEvent.Delete)
2380
2810
  * ```
2811
+ * @example
2812
+ * ```js
2813
+ * // Delete from liveboard context
2814
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2815
+ * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
2816
+ * ```
2817
+ * @example
2818
+ * ```js
2819
+ * // Delete from search context
2820
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2821
+ * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
2822
+ * ```
2381
2823
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2382
2824
  */
2383
2825
  HostEvent["Delete"] = "onDeleteAnswer";
@@ -2398,6 +2840,20 @@ export var HostEvent;
2398
2840
  * ```js
2399
2841
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
2400
2842
  * ```
2843
+ * @example
2844
+ * ```js
2845
+ * // SpotIQ analyze from search-answer context
2846
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2847
+ * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
2848
+ * ```
2849
+ * @example
2850
+ * ```js
2851
+ * // SpotIQ analyze from search context
2852
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2853
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
2854
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2855
+ * }, ContextType.Liveboard);
2856
+ * ```
2401
2857
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2402
2858
  */
2403
2859
  HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
@@ -2449,9 +2905,16 @@ export var HostEvent;
2449
2905
  *
2450
2906
  * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2451
2907
  * ```
2908
+ * @example
2909
+ * ```js
2910
+ * // Download as PNG from search-answer context
2911
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2912
+ * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
2913
+ * ```
2452
2914
  *
2453
2915
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
2454
2916
  */
2917
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
2455
2918
  HostEvent["DownloadAsPng"] = "downloadAsPng";
2456
2919
  /**
2457
2920
  * Trigger the **Download** > **CSV** action on tables in
@@ -2477,6 +2940,18 @@ export var HostEvent;
2477
2940
  *
2478
2941
  * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2479
2942
  * ```
2943
+ * @example
2944
+ * ```js
2945
+ * // Download as CSV from search-answer context
2946
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2947
+ * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
2948
+ * ```
2949
+ * @example
2950
+ * ```js
2951
+ * // Download as CSV from search context
2952
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2953
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
2954
+ * ```
2480
2955
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2481
2956
  */
2482
2957
  HostEvent["DownloadAsCsv"] = "downloadAsCSV";
@@ -2504,6 +2979,18 @@ export var HostEvent;
2504
2979
  *
2505
2980
  * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2506
2981
  * ```
2982
+ * @example
2983
+ * ```js
2984
+ * // Download as XLSX from answer context
2985
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2986
+ * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
2987
+ * ```
2988
+ * @example
2989
+ * ```js
2990
+ * // Download as XLSX from search context
2991
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2992
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
2993
+ * ```
2507
2994
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2508
2995
  */
2509
2996
  HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
@@ -2517,6 +3004,18 @@ export var HostEvent;
2517
3004
  * ```js
2518
3005
  * searchEmbed.trigger(HostEvent.Share)
2519
3006
  * ```
3007
+ * @example
3008
+ * ```js
3009
+ * // Share from Liveboard context
3010
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3011
+ * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
3012
+ * ```
3013
+ * @example
3014
+ * ```js
3015
+ * // Share from search-answer context
3016
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3017
+ * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
3018
+ * ```
2520
3019
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2521
3020
  */
2522
3021
  HostEvent["Share"] = "share";
@@ -2556,6 +3055,18 @@ export var HostEvent;
2556
3055
  *
2557
3056
  * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2558
3057
  * ```
3058
+ * @example
3059
+ * ```js
3060
+ * // Save from answer context
3061
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3062
+ * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
3063
+ * ```
3064
+ * @example
3065
+ * ```js
3066
+ * // Save from search context
3067
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3068
+ * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
3069
+ * ```
2559
3070
  *
2560
3071
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2561
3072
  */
@@ -2572,6 +3083,20 @@ export var HostEvent;
2572
3083
  * ```js
2573
3084
  * vizEmbed.trigger(HostEvent.SyncToSheets)
2574
3085
  * ```
3086
+ * @example
3087
+ * ```js
3088
+ * // Sync to sheets from answer context
3089
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3090
+ * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
3091
+ * ```
3092
+ * @example
3093
+ * ```js
3094
+ * // Sync to sheets from liveboard context
3095
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3096
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {
3097
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3098
+ * }, ContextType.Liveboard);
3099
+ * ```
2575
3100
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2576
3101
  */
2577
3102
  HostEvent["SyncToSheets"] = "sync-to-sheets";
@@ -2588,6 +3113,20 @@ export var HostEvent;
2588
3113
  * ```js
2589
3114
  * vizEmbed.trigger(HostEvent.SyncToOtherApps)
2590
3115
  * ```
3116
+ * @example
3117
+ * ```js
3118
+ * // Sync to other apps from answer context
3119
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3120
+ * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
3121
+ * ```
3122
+ * @example
3123
+ * ```js
3124
+ * // Sync to other apps from liveboard context
3125
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3126
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
3127
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3128
+ * }, ContextType.Liveboard);
3129
+ * ```
2591
3130
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2592
3131
  */
2593
3132
  HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
@@ -2604,6 +3143,20 @@ export var HostEvent;
2604
3143
  * ```js
2605
3144
  * vizEmbed.trigger(HostEvent.ManagePipelines)
2606
3145
  * ```
3146
+ * @example
3147
+ * ```js
3148
+ * // Manage pipelines from answer context
3149
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3150
+ * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
3151
+ * ```
3152
+ * @example
3153
+ * ```js
3154
+ * // Manage pipelines from liveboard context
3155
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3156
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {
3157
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3158
+ * }, ContextType.Liveboard);
3159
+ * ```
2607
3160
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2608
3161
  */
2609
3162
  HostEvent["ManagePipelines"] = "manage-pipeline";
@@ -2616,6 +3169,12 @@ export var HostEvent;
2616
3169
  * ```js
2617
3170
  * appEmbed.trigger(HostEvent.ResetSearch)
2618
3171
  * ```
3172
+ * @example
3173
+ * ```js
3174
+ * // Reset search from search context
3175
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3176
+ * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
3177
+ * ```
2619
3178
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
2620
3179
  */
2621
3180
  HostEvent["ResetSearch"] = "resetSearch";
@@ -2627,6 +3186,13 @@ export var HostEvent;
2627
3186
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
2628
3187
  * console.log('data', data);
2629
3188
  * ```
3189
+ * @example
3190
+ * ```js
3191
+ * // Get filters from liveboard context
3192
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3193
+ * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
3194
+ * console.log('filters', data);
3195
+ * ```
2630
3196
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2631
3197
  */
2632
3198
  HostEvent["GetFilters"] = "getFilters";
@@ -2634,7 +3200,8 @@ export var HostEvent;
2634
3200
  * Update one or several filters applied on a Liveboard.
2635
3201
  * @param - Includes the following keys:
2636
3202
  * - `filter`: A single filter object containing column name, filter operator, and
2637
- * values. - `filters`: Multiple filter objects with column name, filter operator,
3203
+ * values.
3204
+ * - `filters`: Multiple filter objects with column name, filter operator,
2638
3205
  * and values for each.
2639
3206
  *
2640
3207
  * Each filter object must include the following attributes:
@@ -2717,6 +3284,18 @@ export var HostEvent;
2717
3284
  * }]
2718
3285
  * });
2719
3286
  * ```
3287
+ * @example
3288
+ * ```js
3289
+ * // Update filters from liveboard context
3290
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3291
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3292
+ * filter: {
3293
+ * column: "item type",
3294
+ * oper: "IN",
3295
+ * values: ["shoes", "boots"]
3296
+ * }
3297
+ * }, ContextType.Liveboard);
3298
+ * ```
2720
3299
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2721
3300
  */
2722
3301
  HostEvent["UpdateFilters"] = "updateFilters";
@@ -2730,6 +3309,14 @@ export var HostEvent;
2730
3309
  * );
2731
3310
  * })
2732
3311
  * ```
3312
+ * @example
3313
+ * ```js
3314
+ * // Get tabs from liveboard context
3315
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3316
+ * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
3317
+ * console.log('tabs', tabDetails);
3318
+ * });
3319
+ * ```
2733
3320
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
2734
3321
  */
2735
3322
  HostEvent["GetTabs"] = "getTabs";
@@ -2743,6 +3330,15 @@ export var HostEvent;
2743
3330
  * '430496d6-6903-4601-937e-2c691821af3c',
2744
3331
  * 'f547ec54-2a37-4516-a222-2b06719af726'])
2745
3332
  * ```
3333
+ * @example
3334
+ * ```js
3335
+ * // Set visible tabs from liveboard context
3336
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3337
+ * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
3338
+ * '430496d6-6903-4601-937e-2c691821af3c',
3339
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
3340
+ * ], ContextType.Liveboard);
3341
+ * ```
2746
3342
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
2747
3343
  */
2748
3344
  HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
@@ -2756,6 +3352,15 @@ export var HostEvent;
2756
3352
  * '630496d6-6903-4601-937e-2c691821af3c',
2757
3353
  * 'i547ec54-2a37-4516-a222-2b06719af726'])
2758
3354
  * ```
3355
+ * @example
3356
+ * ```js
3357
+ * // Set hidden tabs from liveboard context
3358
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3359
+ * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
3360
+ * '630496d6-6903-4601-937e-2c691821af3c',
3361
+ * 'i547ec54-2a37-4516-a222-2b06719af726'
3362
+ * ], ContextType.Liveboard);
3363
+ * ```
2759
3364
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
2760
3365
  */
2761
3366
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
@@ -2832,13 +3437,24 @@ export var HostEvent;
2832
3437
  HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
2833
3438
  /**
2834
3439
  * Trigger reset action for a personalized Liveboard view.
3440
+ * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
2835
3441
  * @example
2836
3442
  * ```js
2837
3443
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
2838
3444
  * ```
2839
3445
  * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
3446
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2840
3447
  */
2841
3448
  HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
3449
+ /**
3450
+ * Trigger reset action for a personalized Liveboard view.
3451
+ * @example
3452
+ * ```js
3453
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
3454
+ * ```
3455
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3456
+ */
3457
+ HostEvent["ResetLiveboardPersonalizedView"] = "ResetLiveboardPersonalisedView";
2842
3458
  /**
2843
3459
  * Triggers an action to update Parameter values on embedded
2844
3460
  * Answers, Liveboard, and Spotter answer in Edit mode.
@@ -2855,6 +3471,16 @@ export var HostEvent;
2855
3471
  * isVisibleToUser: false
2856
3472
  * }])
2857
3473
  * ```
3474
+ * @example
3475
+ * ```js
3476
+ * // Update parameters from liveboard context
3477
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3478
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
3479
+ * name: "Region Param",
3480
+ * value: "West",
3481
+ * isVisibleToUser: true
3482
+ * }], ContextType.Liveboard);
3483
+ * ```
2858
3484
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2859
3485
  */
2860
3486
  HostEvent["UpdateParameters"] = "UpdateParameters";
@@ -2874,18 +3500,77 @@ export var HostEvent;
2874
3500
  * });
2875
3501
  *
2876
3502
  * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
3503
+ *```
3504
+ * @example
3505
+ * ```js
3506
+ * // Get parameters from liveboard context
3507
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3508
+ * liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
3509
+ * console.log('parameters', parameters);
3510
+ * });
2877
3511
  * ```
2878
3512
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2879
3513
  */
2880
3514
  HostEvent["GetParameters"] = "GetParameters";
2881
3515
  /**
2882
3516
  * Triggers an event to update a personalized view of a Liveboard.
3517
+ * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
2883
3518
  * ```js
2884
3519
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
2885
3520
  * ```
3521
+ * @example
3522
+ * ```js
3523
+ * // Update personalized view from liveboard context
3524
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3525
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
3526
+ * viewId: '1234'
3527
+ * }, ContextType.Liveboard);
3528
+ * ```
2886
3529
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
3530
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2887
3531
  */
2888
3532
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
3533
+ /**
3534
+ * Triggers an event to update a personalized view of a Liveboard.
3535
+ * ```js
3536
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
3537
+ * ```
3538
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3539
+ */
3540
+ HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
3541
+ /**
3542
+ * Triggers selection of a specific Personalized View on a
3543
+ * Liveboard without reloading the embed. Pass either a
3544
+ * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
3545
+ * If neither is provided, the Liveboard resets to the original/default view.
3546
+ * When a `viewName` is provided and multiple views share
3547
+ * the same name, the first match is selected.
3548
+ * @example
3549
+ * ```js
3550
+ * liveboardEmbed.trigger(
3551
+ * HostEvent.SelectPersonalizedView,
3552
+ * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
3553
+ * )
3554
+ * ```
3555
+ * @example
3556
+ * ```js
3557
+ * // Select by name
3558
+ * liveboardEmbed.trigger(
3559
+ * HostEvent.SelectPersonalizedView,
3560
+ * { viewName: 'Dr Smith Cardiology' },
3561
+ * )
3562
+ * ```
3563
+ * @example
3564
+ * ```js
3565
+ * // Reset to default view
3566
+ * liveboardEmbed.trigger(
3567
+ * HostEvent.SelectPersonalizedView,
3568
+ * {},
3569
+ * )
3570
+ * ```
3571
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3572
+ */
3573
+ HostEvent["SelectPersonalizedView"] = "SelectPersonalisedView";
2889
3574
  /**
2890
3575
  * @hidden
2891
3576
  * Notify when info call is completed successfully
@@ -2905,7 +3590,8 @@ export var HostEvent;
2905
3590
  * add a name and description for the Answer.
2906
3591
  * @param - Includes the following keys:
2907
3592
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
2908
- * embed. - `name`: Optional. Name string for the Answer.
3593
+ * embed.
3594
+ * - `name`: Optional. Name string for the Answer.
2909
3595
  * - `description`: Optional. Description text for the Answer.
2910
3596
  * @example
2911
3597
  * ```js
@@ -2924,6 +3610,34 @@ export var HostEvent;
2924
3610
  *
2925
3611
  * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
2926
3612
  * ```
3613
+ * @example
3614
+ * ```js
3615
+ * // Using context parameter to save answer from search context
3616
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3617
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3618
+ * name: "Regional sales analysis",
3619
+ * description: "Sales breakdown by region"
3620
+ * }, ContextType.Search);
3621
+ * ```
3622
+ * @example
3623
+ * ```js
3624
+ * // Save answer from answer context (explore modal)
3625
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3626
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3627
+ * name: "Modified analysis",
3628
+ * description: "Updated from explore view"
3629
+ * }, ContextType.Answer);
3630
+ * ```
3631
+ * @example
3632
+ * ```js
3633
+ * // Save answer from spotter context
3634
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3635
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3636
+ * vizId: latestSpotterVizId,
3637
+ * name: "AI insights",
3638
+ * description: "Generated from Spotter"
3639
+ * }, ContextType.Spotter);
3640
+ * ```
2927
3641
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2928
3642
  */
2929
3643
  HostEvent["SaveAnswer"] = "saveAnswer";
@@ -2965,6 +3679,15 @@ export var HostEvent;
2965
3679
  * executeSearch: true,
2966
3680
  * })
2967
3681
  * ```
3682
+ * @example
3683
+ * ```js
3684
+ * // Spotter search from spotter context
3685
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3686
+ * spotterEmbed.trigger(HostEvent.SpotterSearch, {
3687
+ * query: 'sales by region',
3688
+ * executeSearch: true
3689
+ * }, ContextType.Spotter);
3690
+ * ```
2968
3691
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2969
3692
  */
2970
3693
  HostEvent["SpotterSearch"] = "SpotterSearch";
@@ -2975,6 +3698,12 @@ export var HostEvent;
2975
3698
  * ```js
2976
3699
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
2977
3700
  * ```
3701
+ * @example
3702
+ * ```js
3703
+ * // Edit last prompt from spotter context
3704
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3705
+ * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
3706
+ * ```
2978
3707
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2979
3708
  */
2980
3709
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
@@ -2984,6 +3713,12 @@ export var HostEvent;
2984
3713
  * ```js
2985
3714
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
2986
3715
  * ```
3716
+ * @example
3717
+ * ```js
3718
+ * // Preview spotter data from spotter context
3719
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3720
+ * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
3721
+ * ```
2987
3722
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2988
3723
  */
2989
3724
  HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
@@ -3274,6 +4009,7 @@ export var Param;
3274
4009
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
3275
4010
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3276
4011
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
4012
+ Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
3277
4013
  Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
3278
4014
  Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
3279
4015
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
@@ -3618,6 +4354,16 @@ export var Action;
3618
4354
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
3619
4355
  */
3620
4356
  Action["DownloadLiveboard"] = "downloadLiveboard";
4357
+ /**
4358
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
4359
+ * Allows downloading the entire Liveboard as a continuous PDF.
4360
+ * @example
4361
+ * ```js
4362
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
4363
+ * ```
4364
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4365
+ */
4366
+ Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
3621
4367
  /**
3622
4368
  * @hidden
3623
4369
  */
@@ -3742,6 +4488,7 @@ export var Action;
3742
4488
  * disabledActions: [Action.LiveboardInfo]
3743
4489
  * ```
3744
4490
  */
4491
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
3745
4492
  Action["LiveboardInfo"] = "pinboardInfo";
3746
4493
  /**
3747
4494
  * @hidden
@@ -3772,6 +4519,7 @@ export var Action;
3772
4519
  * disabledActions: [Action.Subscription]
3773
4520
  * ```
3774
4521
  */
4522
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
3775
4523
  Action["Subscription"] = "subscription";
3776
4524
  /**
3777
4525
  * The **Explore** action on Liveboard visualizations
@@ -4251,13 +4999,25 @@ export var Action;
4251
4999
  /**
4252
5000
  * The Liveboard Personalised Views dropdown.
4253
5001
  * Allows navigating to a personalized Liveboard View.
5002
+ * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
4254
5003
  * @example
4255
5004
  * ```js
4256
5005
  * disabledActions: [Action.PersonalisedViewsDropdown]
4257
5006
  * ```
4258
5007
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
5008
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4259
5009
  */
4260
5010
  Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
5011
+ /**
5012
+ * The Liveboard Personalized Views dropdown.
5013
+ * Allows navigating to a personalized Liveboard View.
5014
+ * @example
5015
+ * ```js
5016
+ * disabledActions: [Action.PersonalizedViewsDropdown]
5017
+ * ```
5018
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5019
+ */
5020
+ Action["PersonalizedViewsDropdown"] = "personalisedViewsDropdown";
4261
5021
  /**
4262
5022
  * Action ID for show or hide the user details on a
4263
5023
  * Liveboard (Recently visited / social proof)
@@ -4345,14 +5105,27 @@ export var Action;
4345
5105
  /**
4346
5106
  * The **Organize Favourites** action on Homepage
4347
5107
  * *Favorites* module.
5108
+ * This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
4348
5109
  *
4349
5110
  * @example
4350
5111
  * ```js
4351
5112
  * disabledActions: [Action.OrganiseFavourites]
4352
5113
  * ```
4353
5114
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
5115
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4354
5116
  */
4355
5117
  Action["OrganiseFavourites"] = "organiseFavourites";
5118
+ /**
5119
+ * The **Organize Favorites** action on Homepage
5120
+ * *Favorites* module.
5121
+ *
5122
+ * @example
5123
+ * ```js
5124
+ * disabledActions: [Action.OrganizeFavorites]
5125
+ * ```
5126
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5127
+ */
5128
+ Action["OrganizeFavorites"] = "organiseFavourites";
4356
5129
  /**
4357
5130
  * The **AI Highlights** action on a Liveboard.
4358
5131
  *
@@ -4808,6 +5581,39 @@ export var Action;
4808
5581
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4809
5582
  */
4810
5583
  Action["SpotterDocs"] = "spotterDocs";
5584
+ /**
5585
+ * Controls visibility and disable state of the connector resources
5586
+ * section in the Spotter chat interface.
5587
+ * @example
5588
+ * ```js
5589
+ * hiddenActions: [Action.SpotterChatConnectorResources]
5590
+ * disabledActions: [Action.SpotterChatConnectorResources]
5591
+ * ```
5592
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5593
+ */
5594
+ Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
5595
+ /**
5596
+ * Controls visibility and disable state of the connectors
5597
+ * in the Spotter chat interface.
5598
+ * @example
5599
+ * ```js
5600
+ * hiddenActions: [Action.SpotterChatConnectors]
5601
+ * disabledActions: [Action.SpotterChatConnectors]
5602
+ * ```
5603
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5604
+ */
5605
+ Action["SpotterChatConnectors"] = "spotterChatConnectors";
5606
+ /**
5607
+ * Controls visibility and disable state of the mode switcher
5608
+ * in the Spotter chat interface.
5609
+ * @example
5610
+ * ```js
5611
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
5612
+ * disabledActions: [Action.SpotterChatModeSwitcher]
5613
+ * ```
5614
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5615
+ */
5616
+ Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
4811
5617
  /**
4812
5618
  * The **Include current period** checkbox for date filters.
4813
5619
  * Controls the visibility and availability of the option to include
@@ -5101,7 +5907,29 @@ export var EmbedErrorCodes;
5101
5907
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5102
5908
  /** Invalid URL provided in configuration */
5103
5909
  EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5910
+ /** Host event payload validation failed */
5911
+ EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
5912
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
5913
+ EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
5914
+ /** DrillDown payload is invalid - missing or malformed points */
5915
+ EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
5104
5916
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
5917
+ /**
5918
+ * Context types for specifying the page context when triggering host events.
5919
+ * Used as the third parameter in the `trigger` method to help ThoughtSpot
5920
+ * understand the current page context for better event handling.
5921
+ *
5922
+ * @example
5923
+ * ```js
5924
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
5925
+ *
5926
+ * // Trigger an event with specific context
5927
+ * embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
5928
+ * ```
5929
+ *
5930
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
5931
+ * @group Events
5932
+ */
5105
5933
  export var ContextType;
5106
5934
  (function (ContextType) {
5107
5935
  /**
@@ -5120,6 +5948,10 @@ export var ContextType;
5120
5948
  * Spotter context for spotter modal/page.
5121
5949
  */
5122
5950
  ContextType["Spotter"] = "spotter";
5951
+ /**
5952
+ * Other context for any other generic page.
5953
+ */
5954
+ ContextType["Other"] = "other";
5123
5955
  })(ContextType || (ContextType = {}));
5124
5956
  /**
5125
5957
  * Enum for the type of API intercepted