@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
@@ -1,4 +1,4 @@
1
- /* @thoughtspot/visual-embed-sdk version 1.46.4 */
1
+ /* @thoughtspot/visual-embed-sdk version 1.46.5 */
2
2
  'use client';
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
@@ -70,6 +70,7 @@ var AuthType;
70
70
  * @deprecated This option is deprecated.
71
71
  * @hidden
72
72
  */
73
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
73
74
  AuthType["SAML"] = "SSO_SAML";
74
75
  /**
75
76
  * SSO using SAML
@@ -115,6 +116,7 @@ var AuthType;
115
116
  * });
116
117
  * ```
117
118
  */
119
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
118
120
  AuthType["SAMLRedirect"] = "SSO_SAML";
119
121
  /**
120
122
  * SSO using OIDC
@@ -128,6 +130,7 @@ var AuthType;
128
130
  * Will make the host application redirect to the OIDC IdP.
129
131
  * See code samples in {@link SAMLRedirect}.
130
132
  */
133
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
131
134
  AuthType["OIDCRedirect"] = "SSO_OIDC";
132
135
  /**
133
136
  * Trusted authentication server
@@ -153,6 +156,7 @@ var AuthType;
153
156
  * });
154
157
  * ```
155
158
  */
159
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
156
160
  AuthType["TrustedAuthToken"] = "AuthServer";
157
161
  /**
158
162
  * Trusted authentication server Cookieless, Use your own authentication
@@ -889,6 +893,17 @@ var EmbedEvent;
889
893
  * ```
890
894
  */
891
895
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
896
+ /**
897
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
898
+ * on a Liveboard.
899
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
900
+ * @example
901
+ * ```js
902
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
903
+ * console.log('download liveboard as continuous PDF', payload)})
904
+ * ```
905
+ */
906
+ EmbedEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
892
907
  /**
893
908
  * Emitted when an Answer is deleted in the app
894
909
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -1292,22 +1307,45 @@ var EmbedEvent;
1292
1307
  /**
1293
1308
  * Emitted when name, status (private or public) or filter values of a
1294
1309
  * Personalised view is updated.
1310
+ * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
1295
1311
  * @returns viewName: string
1296
1312
  * @returns viewId: string
1297
1313
  * @returns liveboardId: string
1298
1314
  * @returns isPublic: boolean
1299
1315
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1316
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1300
1317
  */
1301
1318
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
1319
+ /**
1320
+ * Emitted when name, status (private or public) or filter values of a
1321
+ * Personalized view is updated.
1322
+ * @returns viewName: string
1323
+ * @returns viewId: string
1324
+ * @returns liveboardId: string
1325
+ * @returns isPublic: boolean
1326
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1327
+ */
1328
+ EmbedEvent["UpdatePersonalizedView"] = "updatePersonalisedView";
1302
1329
  /**
1303
1330
  * Emitted when a Personalised view is saved.
1331
+ * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
1304
1332
  * @returns viewName: string
1305
1333
  * @returns viewId: string
1306
1334
  * @returns liveboardId: string
1307
1335
  * @returns isPublic: boolean
1308
1336
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1337
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1309
1338
  */
1310
1339
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
1340
+ /**
1341
+ * Emitted when a Personalized view is saved.
1342
+ * @returns viewName: string
1343
+ * @returns viewId: string
1344
+ * @returns liveboardId: string
1345
+ * @returns isPublic: boolean
1346
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1347
+ */
1348
+ EmbedEvent["SavePersonalizedView"] = "savePersonalisedView";
1311
1349
  /**
1312
1350
  * Emitted when a Liveboard is reset.
1313
1351
  * @returns viewName: string
@@ -1319,11 +1357,41 @@ var EmbedEvent;
1319
1357
  EmbedEvent["ResetLiveboard"] = "resetLiveboard";
1320
1358
  /**
1321
1359
  * Emitted when a PersonalisedView is deleted.
1360
+ * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
1322
1361
  * @returns views: string[]
1323
1362
  * @returns liveboardId: string
1324
1363
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
1364
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1325
1365
  */
1326
1366
  EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
1367
+ /**
1368
+ * Emitted when a PersonalizedView is deleted.
1369
+ * @returns views: string[]
1370
+ * @returns liveboardId: string
1371
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1372
+ */
1373
+ EmbedEvent["DeletePersonalizedView"] = "deletePersonalisedView";
1374
+ /**
1375
+ * Emitted when a user selects a different Personalized View or
1376
+ * resets to the original/default view on a Liveboard.
1377
+ * @example
1378
+ * ```js
1379
+ * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
1380
+ * console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
1381
+ * console.log(data.viewId); // '2a021a12-...' or null (default)
1382
+ * console.log(data.liveboardId); // 'abc123...'
1383
+ * console.log(data.isPublic); // true | false
1384
+ * })
1385
+ * ```
1386
+ * @returns viewName: string - Name of the selected view,
1387
+ * or 'Original View' when reset to default.
1388
+ * @returns viewId: string | null - GUID of the selected view,
1389
+ * or null when reset to default.
1390
+ * @returns liveboardId: string
1391
+ * @returns isPublic: boolean
1392
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
1393
+ */
1394
+ EmbedEvent["ChangePersonalizedView"] = "changePersonalisedView";
1327
1395
  /**
1328
1396
  * Emitted when a user creates a Worksheet.
1329
1397
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -1357,7 +1425,8 @@ var EmbedEvent;
1357
1425
  * @param - Includes the following parameters:
1358
1426
  * - `payload`: The payload received from the embed related to the Data API call.
1359
1427
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
1360
- * will run or block the search operation, and if blocked, which error message to provide.
1428
+ * will run or block the search operation, and if blocked, which error message to
1429
+ * provide.
1361
1430
  * - `execute` - When `execute` returns `true`, the search is run.
1362
1431
  * When `execute` returns `false`, the search is not executed.
1363
1432
  * - `error` - Developers can customize the user-facing error message when `execute`
@@ -1791,6 +1860,25 @@ var EmbedEvent;
1791
1860
  * );
1792
1861
  * }
1793
1862
  * ```
1863
+ *
1864
+ * **Context Parameter (SDK: 1.45.2+)**
1865
+ *
1866
+ * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
1867
+ * `ContextType` as the third parameter to the `trigger` method to specify the context
1868
+ * from which the event is triggered. This helps ThoughtSpot understand the current page
1869
+ * context (Search, Answer, Liveboard, or Spotter) for better event handling.
1870
+ *
1871
+ * @example
1872
+ * ```js
1873
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
1874
+ *
1875
+ * // Trigger Pin event with Search context
1876
+ * appEmbed.trigger(HostEvent.Pin, {
1877
+ * vizId: "123",
1878
+ * liveboardId: "456"
1879
+ * }, ContextType.Search);
1880
+ * ```
1881
+ *
1794
1882
  * @group Events
1795
1883
  */
1796
1884
  var HostEvent;
@@ -1813,6 +1901,16 @@ var HostEvent;
1813
1901
  execute: true
1814
1902
  });
1815
1903
  * ```
1904
+ * @example
1905
+ * ```js
1906
+ * // Trigger search from search context
1907
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1908
+ * appEmbed.trigger(HostEvent.Search, {
1909
+ * searchQuery: "[revenue] by [region]",
1910
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
1911
+ * execute: true
1912
+ * }, ContextType.Search);
1913
+ * ```
1816
1914
  */
1817
1915
  HostEvent["Search"] = "search";
1818
1916
  /**
@@ -1863,6 +1961,24 @@ var HostEvent;
1863
1961
  * });
1864
1962
  * })
1865
1963
  * ```
1964
+ * @example
1965
+ * ```js
1966
+ * // Drill down from answer context
1967
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1968
+ * appEmbed.trigger(HostEvent.DrillDown, {
1969
+ * points: { clickedPoint, selectedPoints },
1970
+ * autoDrillDown: true
1971
+ * }, ContextType.Answer);
1972
+ * ```
1973
+ * @example
1974
+ * ```js
1975
+ * // Drill down from search context
1976
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
1977
+ * searchEmbed.trigger(HostEvent.DrillDown, {
1978
+ * points: { clickedPoint, selectedPoints },
1979
+ * columnGuid: "column-guid"
1980
+ * }, ContextType.Search);
1981
+ * ```
1866
1982
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1867
1983
  */
1868
1984
  HostEvent["DrillDown"] = "triggerDrillDown";
@@ -1883,6 +1999,13 @@ var HostEvent;
1883
1999
  * const url = embed.trigger(HostEvent.GetIframeUrl);
1884
2000
  * console.log("iFrameURL",url);
1885
2001
  * ```
2002
+ * @example
2003
+ * ```js
2004
+ * // Get iframe URL from specific context
2005
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2006
+ * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
2007
+ * console.log("iFrameURL", url);
2008
+ * ```
1886
2009
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
1887
2010
  */
1888
2011
  HostEvent["GetIframeUrl"] = "GetIframeUrl";
@@ -1896,6 +2019,15 @@ var HostEvent;
1896
2019
  * '730496d6-6903-4601-937e-2c691821af3c',
1897
2020
  * 'd547ec54-2a37-4516-a222-2b06719af726'])
1898
2021
  * ```
2022
+ * @example
2023
+ * ```js
2024
+ * // Set visible vizs from liveboard context
2025
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2026
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
2027
+ * '730496d6-6903-4601-937e-2c691821af3c',
2028
+ * 'd547ec54-2a37-4516-a222-2b06719af726'
2029
+ * ], ContextType.Liveboard);
2030
+ * ```
1899
2031
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1900
2032
  */
1901
2033
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
@@ -1908,6 +2040,14 @@ var HostEvent;
1908
2040
  * tabId:'730496d6-6903-4601-937e-2c691821af3c'
1909
2041
  * })
1910
2042
  * ```
2043
+ * @example
2044
+ * ```js
2045
+ * // Set active tab from liveboard context
2046
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2047
+ * liveboardEmbed.trigger(HostEvent.SetActiveTab, {
2048
+ * tabId: '730496d6-6903-4601-937e-2c691821af3c'
2049
+ * }, ContextType.Liveboard);
2050
+ * ```
1911
2051
  * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
1912
2052
  */
1913
2053
  HostEvent["SetActiveTab"] = "SetActiveTab";
@@ -1941,6 +2081,15 @@ var HostEvent;
1941
2081
  * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
1942
2082
  * ])
1943
2083
  * ```
2084
+ * @example
2085
+ * ```js
2086
+ * // Update runtime filters from liveboard context
2087
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2088
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
2089
+ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
2090
+ * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
2091
+ * ], ContextType.Liveboard);
2092
+ * ```
1944
2093
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1945
2094
  * @important
1946
2095
  */
@@ -1974,6 +2123,14 @@ var HostEvent;
1974
2123
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
1975
2124
  * { column: {columnId: '<column-GUID>'}})
1976
2125
  * ```
2126
+ * @example
2127
+ * ```js
2128
+ * // Open filter from search context
2129
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2130
+ * searchEmbed.trigger(HostEvent.OpenFilter, {
2131
+ * column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
2132
+ * }, ContextType.Search);
2133
+ * ```
1977
2134
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1978
2135
  */
1979
2136
  HostEvent["OpenFilter"] = "openFilter";
@@ -1984,6 +2141,14 @@ var HostEvent;
1984
2141
  * ```js
1985
2142
  * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
1986
2143
  * ```
2144
+ * @example
2145
+ * ```js
2146
+ * // Add columns from search context
2147
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2148
+ * searchEmbed.trigger(HostEvent.AddColumns, {
2149
+ * columnIds: ['col-guid-1', 'col-guid-2']
2150
+ * }, ContextType.Search);
2151
+ * ```
1987
2152
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1988
2153
  */
1989
2154
  HostEvent["AddColumns"] = "addColumns";
@@ -1994,6 +2159,14 @@ var HostEvent;
1994
2159
  * ```js
1995
2160
  * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
1996
2161
  * ```
2162
+ * @example
2163
+ * ```js
2164
+ * // Remove column from search context
2165
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2166
+ * searchEmbed.trigger(HostEvent.RemoveColumn, {
2167
+ * columnId: 'column-guid'
2168
+ * }, ContextType.Search);
2169
+ * ```
1997
2170
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1998
2171
  */
1999
2172
  HostEvent["RemoveColumn"] = "removeColumn";
@@ -2080,6 +2253,37 @@ var HostEvent;
2080
2253
  *
2081
2254
  * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
2082
2255
  * ```
2256
+ * @example
2257
+ * ```js
2258
+ * // Using context parameter to specify the context type (SDK: 1.45.2+)
2259
+ * // Pin from a search answer context
2260
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2261
+ * appEmbed.trigger(HostEvent.Pin, {
2262
+ * vizId: "123",
2263
+ * newVizName: "Sales by region",
2264
+ * liveboardId: "456"
2265
+ * }, ContextType.Search);
2266
+ * ```
2267
+ * @example
2268
+ * ```js
2269
+ * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
2270
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2271
+ * appEmbed.trigger(HostEvent.Pin, {
2272
+ * vizId: "789",
2273
+ * newVizName: "Revenue trends",
2274
+ * liveboardId: "456"
2275
+ * }, ContextType.Answer);
2276
+ * ```
2277
+ * @example
2278
+ * ```js
2279
+ * // Pin from a spotter context (SDK: 1.45.2+)
2280
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2281
+ * appEmbed.trigger(HostEvent.Pin, {
2282
+ * vizId: latestSpotterVizId,
2283
+ * newVizName: "AI-generated insights",
2284
+ * liveboardId: "456"
2285
+ * }, ContextType.Spotter);
2286
+ * ```
2083
2287
  *
2084
2288
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2085
2289
  */
@@ -2090,6 +2294,12 @@ var HostEvent;
2090
2294
  * @example
2091
2295
  * ```js
2092
2296
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2297
+ *```
2298
+ * @example
2299
+ * ```js
2300
+ * // Show liveboard info from liveboard context
2301
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2302
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
2093
2303
  * ```
2094
2304
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2095
2305
  */
@@ -2100,6 +2310,12 @@ var HostEvent;
2100
2310
  * ```js
2101
2311
  * liveboardEmbed.trigger(HostEvent.Schedule)
2102
2312
  * ```
2313
+ * @example
2314
+ * ```js
2315
+ * // Schedule from liveboard context
2316
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2317
+ * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
2318
+ * ```
2103
2319
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2104
2320
  */
2105
2321
  HostEvent["Schedule"] = "subscription";
@@ -2109,6 +2325,12 @@ var HostEvent;
2109
2325
  * ```js
2110
2326
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
2111
2327
  * ```
2328
+ * @example
2329
+ * ```js
2330
+ * // Manage schedules from liveboard context
2331
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2332
+ * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
2333
+ * ```
2112
2334
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2113
2335
  */
2114
2336
  HostEvent["SchedulesList"] = "schedule-list";
@@ -2119,6 +2341,18 @@ var HostEvent;
2119
2341
  * ```js
2120
2342
  * liveboardEmbed.trigger(HostEvent.ExportTML)
2121
2343
  * ```
2344
+ * @example
2345
+ * ```js
2346
+ * // Export TML from liveboard context
2347
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2348
+ * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
2349
+ * ```
2350
+ * @example
2351
+ * ```js
2352
+ * // Export TML from search-answer context
2353
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2354
+ * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
2355
+ * ```
2122
2356
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2123
2357
  */
2124
2358
  HostEvent["ExportTML"] = "exportTSL";
@@ -2129,6 +2363,18 @@ var HostEvent;
2129
2363
  * ```js
2130
2364
  * liveboardEmbed.trigger(HostEvent.EditTML)
2131
2365
  * ```
2366
+ * @example
2367
+ * ```js
2368
+ * // Edit TML from liveboard context
2369
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2370
+ * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
2371
+ * ```
2372
+ * @example
2373
+ * ```js
2374
+ * // Edit TML from search-answer context
2375
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2376
+ * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
2377
+ * ```
2132
2378
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2133
2379
  */
2134
2380
  HostEvent["EditTML"] = "editTSL";
@@ -2138,6 +2384,12 @@ var HostEvent;
2138
2384
  * ```js
2139
2385
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
2140
2386
  * ```
2387
+ * @example
2388
+ * ```js
2389
+ * // Update TML from liveboard context
2390
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2391
+ * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
2392
+ * ```
2141
2393
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2142
2394
  */
2143
2395
  HostEvent["UpdateTML"] = "updateTSL";
@@ -2164,10 +2416,34 @@ var HostEvent;
2164
2416
  *
2165
2417
  * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
2166
2418
  * ```
2419
+ * @example
2420
+ * ```js
2421
+ * // Download as PDF from search-answer context
2422
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2423
+ * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
2424
+ * ```
2425
+ * @example
2426
+ * ```js
2427
+ * // Download as PDF from liveboard context
2428
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2429
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
2430
+ * ```
2167
2431
  *
2168
2432
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2169
2433
  */
2170
2434
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
2435
+ /**
2436
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
2437
+ * embedded Liveboard.
2438
+ *
2439
+ * @example
2440
+ * ```js
2441
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
2442
+ * ```
2443
+ *
2444
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2445
+ */
2446
+ HostEvent["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
2171
2447
  /**
2172
2448
  * Trigger the **AI Highlights** action on an embedded Liveboard
2173
2449
  *
@@ -2208,6 +2484,18 @@ var HostEvent;
2208
2484
  *
2209
2485
  * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
2210
2486
  * ```
2487
+ * @example
2488
+ * ```js
2489
+ * // Make a copy from answer context
2490
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2491
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
2492
+ * ```
2493
+ * @example
2494
+ * ```js
2495
+ * // Make a copy from search context
2496
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2497
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
2498
+ * ```
2211
2499
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2212
2500
  */
2213
2501
  HostEvent["MakeACopy"] = "makeACopy";
@@ -2232,6 +2520,14 @@ var HostEvent;
2232
2520
  * ```js
2233
2521
  * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2234
2522
  * ```
2523
+ * @example
2524
+ * ```js
2525
+ * // Explore from liveboard context
2526
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2527
+ * liveboardEmbed.trigger(HostEvent.Explore, {
2528
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2529
+ * }, ContextType.Liveboard);
2530
+ * ```
2235
2531
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2236
2532
  */
2237
2533
  HostEvent["Explore"] = "explore";
@@ -2249,6 +2545,20 @@ var HostEvent;
2249
2545
  * ```js
2250
2546
  * searchEmbed.trigger(HostEvent.CreateMonitor)
2251
2547
  * ```
2548
+ * @example
2549
+ * ```js
2550
+ * // Create monitor from answer context
2551
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2552
+ * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
2553
+ * ```
2554
+ * @example
2555
+ * ```js
2556
+ * // Create monitor from liveboard context
2557
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2558
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor, {
2559
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2560
+ * }, ContextType.Liveboard);
2561
+ * ```
2252
2562
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2253
2563
  */
2254
2564
  HostEvent["CreateMonitor"] = "createMonitor";
@@ -2270,6 +2580,20 @@ var HostEvent;
2270
2580
  * ```js
2271
2581
  * vizEmbed.trigger(HostEvent.ManageMonitor)
2272
2582
  * ```
2583
+ * @example
2584
+ * ```js
2585
+ * // Manage monitor from answer context
2586
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2587
+ * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
2588
+ * ```
2589
+ * @example
2590
+ * ```js
2591
+ * // Manage monitor from liveboard context
2592
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2593
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
2594
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2595
+ * }, ContextType.Liveboard);
2596
+ * ```
2273
2597
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2274
2598
  */
2275
2599
  HostEvent["ManageMonitor"] = "manageMonitor";
@@ -2295,6 +2619,26 @@ var HostEvent;
2295
2619
  * ```js
2296
2620
  * spotterEmbed.trigger(HostEvent.Edit);
2297
2621
  * ```
2622
+ * @example
2623
+ * ```js
2624
+ * // Using context parameter to edit liveboard context
2625
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2626
+ * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
2627
+ * ```
2628
+ * @example
2629
+ * ```js
2630
+ * // Edit from search context
2631
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2632
+ * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
2633
+ * ```
2634
+ * * @example
2635
+ * ```js
2636
+ * // Edit from spotter context
2637
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2638
+ * appEmbed.trigger(HostEvent.Edit, {
2639
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2640
+ * }, ContextType.Spotter);
2641
+ * ```
2298
2642
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2299
2643
  */
2300
2644
  HostEvent["Edit"] = "edit";
@@ -2312,6 +2656,34 @@ var HostEvent;
2312
2656
  * ```js
2313
2657
  * vizEmbed.trigger(HostEvent.CopyLink)
2314
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
+ * ```
2673
+ * @example
2674
+ * ```js
2675
+ * // Copy link from liveboard context
2676
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2677
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
2678
+ * ```
2679
+ * @example
2680
+ * ```js
2681
+ * // Copy link from liveboard visualization context
2682
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2683
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2684
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2685
+ * }, ContextType.Liveboard);
2686
+ * ```
2315
2687
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2316
2688
  */
2317
2689
  HostEvent["CopyLink"] = "embedDocument";
@@ -2329,6 +2701,34 @@ var HostEvent;
2329
2701
  * ```js
2330
2702
  * vizEmbed.trigger(HostEvent.Present)
2331
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
+ * ```
2718
+ * @example
2719
+ * ```js
2720
+ * // Present from liveboard visualization context
2721
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2722
+ * liveboardEmbed.trigger(HostEvent.Present, {
2723
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2724
+ * }, ContextType.Liveboard);
2725
+ * ```
2726
+ * @example
2727
+ * ```js
2728
+ * // Present from liveboard context
2729
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2730
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
2731
+ * ```
2332
2732
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2333
2733
  */
2334
2734
  HostEvent["Present"] = "present";
@@ -2357,6 +2757,22 @@ var HostEvent;
2357
2757
  * tml.answer.search_query // TML representation of the search query
2358
2758
  * );
2359
2759
  * })
2760
+ * ```
2761
+ * @example
2762
+ * ```js
2763
+ * // Get TML from search context
2764
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2765
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
2766
+ * console.log(tml.answer.search_query);
2767
+ * });
2768
+ * ```
2769
+ * @example
2770
+ * ```js
2771
+ * // Get TML from search-answer context
2772
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2773
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
2774
+ * console.log(tml.answer);
2775
+ * });
2360
2776
  * ```
2361
2777
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
2362
2778
  * @important
@@ -2378,6 +2794,20 @@ var HostEvent;
2378
2794
  * ```js
2379
2795
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
2380
2796
  * ```
2797
+ * @example
2798
+ * ```js
2799
+ * // Show underlying data from liveboard visualization context
2800
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2801
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {
2802
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2803
+ * }, ContextType.Liveboard);
2804
+ * ```
2805
+ * @example
2806
+ * ```js
2807
+ * // Show underlying data from search context
2808
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2809
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
2810
+ * ```
2381
2811
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2382
2812
  */
2383
2813
  HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
@@ -2395,6 +2825,18 @@ var HostEvent;
2395
2825
  * ```js
2396
2826
  * searchEmbed.trigger(HostEvent.Delete)
2397
2827
  * ```
2828
+ * @example
2829
+ * ```js
2830
+ * // Delete from liveboard context
2831
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2832
+ * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
2833
+ * ```
2834
+ * @example
2835
+ * ```js
2836
+ * // Delete from search context
2837
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2838
+ * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
2839
+ * ```
2398
2840
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2399
2841
  */
2400
2842
  HostEvent["Delete"] = "onDeleteAnswer";
@@ -2415,6 +2857,20 @@ var HostEvent;
2415
2857
  * ```js
2416
2858
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
2417
2859
  * ```
2860
+ * @example
2861
+ * ```js
2862
+ * // SpotIQ analyze from search-answer context
2863
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2864
+ * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
2865
+ * ```
2866
+ * @example
2867
+ * ```js
2868
+ * // SpotIQ analyze from search context
2869
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2870
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
2871
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2872
+ * }, ContextType.Liveboard);
2873
+ * ```
2418
2874
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2419
2875
  */
2420
2876
  HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
@@ -2466,9 +2922,16 @@ var HostEvent;
2466
2922
  *
2467
2923
  * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
2468
2924
  * ```
2925
+ * @example
2926
+ * ```js
2927
+ * // Download as PNG from search-answer context
2928
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2929
+ * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
2930
+ * ```
2469
2931
  *
2470
2932
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
2471
2933
  */
2934
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
2472
2935
  HostEvent["DownloadAsPng"] = "downloadAsPng";
2473
2936
  /**
2474
2937
  * Trigger the **Download** > **CSV** action on tables in
@@ -2494,6 +2957,18 @@ var HostEvent;
2494
2957
  *
2495
2958
  * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
2496
2959
  * ```
2960
+ * @example
2961
+ * ```js
2962
+ * // Download as CSV from search-answer context
2963
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2964
+ * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
2965
+ * ```
2966
+ * @example
2967
+ * ```js
2968
+ * // Download as CSV from search context
2969
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
2970
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
2971
+ * ```
2497
2972
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2498
2973
  */
2499
2974
  HostEvent["DownloadAsCsv"] = "downloadAsCSV";
@@ -2521,6 +2996,18 @@ var HostEvent;
2521
2996
  *
2522
2997
  * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
2523
2998
  * ```
2999
+ * @example
3000
+ * ```js
3001
+ * // Download as XLSX from answer context
3002
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3003
+ * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
3004
+ * ```
3005
+ * @example
3006
+ * ```js
3007
+ * // Download as XLSX from search context
3008
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3009
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
3010
+ * ```
2524
3011
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2525
3012
  */
2526
3013
  HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
@@ -2534,6 +3021,18 @@ var HostEvent;
2534
3021
  * ```js
2535
3022
  * searchEmbed.trigger(HostEvent.Share)
2536
3023
  * ```
3024
+ * @example
3025
+ * ```js
3026
+ * // Share from Liveboard context
3027
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3028
+ * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
3029
+ * ```
3030
+ * @example
3031
+ * ```js
3032
+ * // Share from search-answer context
3033
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3034
+ * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
3035
+ * ```
2537
3036
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2538
3037
  */
2539
3038
  HostEvent["Share"] = "share";
@@ -2573,6 +3072,18 @@ var HostEvent;
2573
3072
  *
2574
3073
  * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
2575
3074
  * ```
3075
+ * @example
3076
+ * ```js
3077
+ * // Save from answer context
3078
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3079
+ * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
3080
+ * ```
3081
+ * @example
3082
+ * ```js
3083
+ * // Save from search context
3084
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3085
+ * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
3086
+ * ```
2576
3087
  *
2577
3088
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2578
3089
  */
@@ -2589,6 +3100,20 @@ var HostEvent;
2589
3100
  * ```js
2590
3101
  * vizEmbed.trigger(HostEvent.SyncToSheets)
2591
3102
  * ```
3103
+ * @example
3104
+ * ```js
3105
+ * // Sync to sheets from answer context
3106
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3107
+ * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
3108
+ * ```
3109
+ * @example
3110
+ * ```js
3111
+ * // Sync to sheets from liveboard context
3112
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3113
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {
3114
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3115
+ * }, ContextType.Liveboard);
3116
+ * ```
2592
3117
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2593
3118
  */
2594
3119
  HostEvent["SyncToSheets"] = "sync-to-sheets";
@@ -2605,6 +3130,20 @@ var HostEvent;
2605
3130
  * ```js
2606
3131
  * vizEmbed.trigger(HostEvent.SyncToOtherApps)
2607
3132
  * ```
3133
+ * @example
3134
+ * ```js
3135
+ * // Sync to other apps from answer context
3136
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3137
+ * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
3138
+ * ```
3139
+ * @example
3140
+ * ```js
3141
+ * // Sync to other apps from liveboard context
3142
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3143
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
3144
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3145
+ * }, ContextType.Liveboard);
3146
+ * ```
2608
3147
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2609
3148
  */
2610
3149
  HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
@@ -2621,6 +3160,20 @@ var HostEvent;
2621
3160
  * ```js
2622
3161
  * vizEmbed.trigger(HostEvent.ManagePipelines)
2623
3162
  * ```
3163
+ * @example
3164
+ * ```js
3165
+ * // Manage pipelines from answer context
3166
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3167
+ * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
3168
+ * ```
3169
+ * @example
3170
+ * ```js
3171
+ * // Manage pipelines from liveboard context
3172
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3173
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {
3174
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
3175
+ * }, ContextType.Liveboard);
3176
+ * ```
2624
3177
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2625
3178
  */
2626
3179
  HostEvent["ManagePipelines"] = "manage-pipeline";
@@ -2633,6 +3186,12 @@ var HostEvent;
2633
3186
  * ```js
2634
3187
  * appEmbed.trigger(HostEvent.ResetSearch)
2635
3188
  * ```
3189
+ * @example
3190
+ * ```js
3191
+ * // Reset search from search context
3192
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3193
+ * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
3194
+ * ```
2636
3195
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
2637
3196
  */
2638
3197
  HostEvent["ResetSearch"] = "resetSearch";
@@ -2644,6 +3203,13 @@ var HostEvent;
2644
3203
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
2645
3204
  * console.log('data', data);
2646
3205
  * ```
3206
+ * @example
3207
+ * ```js
3208
+ * // Get filters from liveboard context
3209
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3210
+ * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
3211
+ * console.log('filters', data);
3212
+ * ```
2647
3213
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2648
3214
  */
2649
3215
  HostEvent["GetFilters"] = "getFilters";
@@ -2651,7 +3217,8 @@ var HostEvent;
2651
3217
  * Update one or several filters applied on a Liveboard.
2652
3218
  * @param - Includes the following keys:
2653
3219
  * - `filter`: A single filter object containing column name, filter operator, and
2654
- * values. - `filters`: Multiple filter objects with column name, filter operator,
3220
+ * values.
3221
+ * - `filters`: Multiple filter objects with column name, filter operator,
2655
3222
  * and values for each.
2656
3223
  *
2657
3224
  * Each filter object must include the following attributes:
@@ -2734,6 +3301,18 @@ var HostEvent;
2734
3301
  * }]
2735
3302
  * });
2736
3303
  * ```
3304
+ * @example
3305
+ * ```js
3306
+ * // Update filters from liveboard context
3307
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3308
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
3309
+ * filter: {
3310
+ * column: "item type",
3311
+ * oper: "IN",
3312
+ * values: ["shoes", "boots"]
3313
+ * }
3314
+ * }, ContextType.Liveboard);
3315
+ * ```
2737
3316
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2738
3317
  */
2739
3318
  HostEvent["UpdateFilters"] = "updateFilters";
@@ -2747,6 +3326,14 @@ var HostEvent;
2747
3326
  * );
2748
3327
  * })
2749
3328
  * ```
3329
+ * @example
3330
+ * ```js
3331
+ * // Get tabs from liveboard context
3332
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3333
+ * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
3334
+ * console.log('tabs', tabDetails);
3335
+ * });
3336
+ * ```
2750
3337
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
2751
3338
  */
2752
3339
  HostEvent["GetTabs"] = "getTabs";
@@ -2760,6 +3347,15 @@ var HostEvent;
2760
3347
  * '430496d6-6903-4601-937e-2c691821af3c',
2761
3348
  * 'f547ec54-2a37-4516-a222-2b06719af726'])
2762
3349
  * ```
3350
+ * @example
3351
+ * ```js
3352
+ * // Set visible tabs from liveboard context
3353
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3354
+ * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
3355
+ * '430496d6-6903-4601-937e-2c691821af3c',
3356
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
3357
+ * ], ContextType.Liveboard);
3358
+ * ```
2763
3359
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
2764
3360
  */
2765
3361
  HostEvent["SetVisibleTabs"] = "SetPinboardVisibleTabs";
@@ -2773,6 +3369,15 @@ var HostEvent;
2773
3369
  * '630496d6-6903-4601-937e-2c691821af3c',
2774
3370
  * 'i547ec54-2a37-4516-a222-2b06719af726'])
2775
3371
  * ```
3372
+ * @example
3373
+ * ```js
3374
+ * // Set hidden tabs from liveboard context
3375
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3376
+ * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
3377
+ * '630496d6-6903-4601-937e-2c691821af3c',
3378
+ * 'i547ec54-2a37-4516-a222-2b06719af726'
3379
+ * ], ContextType.Liveboard);
3380
+ * ```
2776
3381
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
2777
3382
  */
2778
3383
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
@@ -2849,13 +3454,24 @@ var HostEvent;
2849
3454
  HostEvent["UpdateCrossFilter"] = "UpdateCrossFilter";
2850
3455
  /**
2851
3456
  * Trigger reset action for a personalized Liveboard view.
3457
+ * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
2852
3458
  * @example
2853
3459
  * ```js
2854
3460
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
2855
3461
  * ```
2856
3462
  * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
3463
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2857
3464
  */
2858
3465
  HostEvent["ResetLiveboardPersonalisedView"] = "ResetLiveboardPersonalisedView";
3466
+ /**
3467
+ * Trigger reset action for a personalized Liveboard view.
3468
+ * @example
3469
+ * ```js
3470
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
3471
+ * ```
3472
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3473
+ */
3474
+ HostEvent["ResetLiveboardPersonalizedView"] = "ResetLiveboardPersonalisedView";
2859
3475
  /**
2860
3476
  * Triggers an action to update Parameter values on embedded
2861
3477
  * Answers, Liveboard, and Spotter answer in Edit mode.
@@ -2872,6 +3488,16 @@ var HostEvent;
2872
3488
  * isVisibleToUser: false
2873
3489
  * }])
2874
3490
  * ```
3491
+ * @example
3492
+ * ```js
3493
+ * // Update parameters from liveboard context
3494
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3495
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
3496
+ * name: "Region Param",
3497
+ * value: "West",
3498
+ * isVisibleToUser: true
3499
+ * }], ContextType.Liveboard);
3500
+ * ```
2875
3501
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2876
3502
  */
2877
3503
  HostEvent["UpdateParameters"] = "UpdateParameters";
@@ -2891,18 +3517,77 @@ var HostEvent;
2891
3517
  * });
2892
3518
  *
2893
3519
  * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
3520
+ *```
3521
+ * @example
3522
+ * ```js
3523
+ * // Get parameters from liveboard context
3524
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3525
+ * liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
3526
+ * console.log('parameters', parameters);
3527
+ * });
2894
3528
  * ```
2895
3529
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
2896
3530
  */
2897
3531
  HostEvent["GetParameters"] = "GetParameters";
2898
3532
  /**
2899
3533
  * Triggers an event to update a personalized view of a Liveboard.
3534
+ * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
2900
3535
  * ```js
2901
3536
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
2902
3537
  * ```
3538
+ * @example
3539
+ * ```js
3540
+ * // Update personalized view from liveboard context
3541
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3542
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
3543
+ * viewId: '1234'
3544
+ * }, ContextType.Liveboard);
3545
+ * ```
2903
3546
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
3547
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
2904
3548
  */
2905
3549
  HostEvent["UpdatePersonalisedView"] = "UpdatePersonalisedView";
3550
+ /**
3551
+ * Triggers an event to update a personalized view of a Liveboard.
3552
+ * ```js
3553
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
3554
+ * ```
3555
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3556
+ */
3557
+ HostEvent["UpdatePersonalizedView"] = "UpdatePersonalisedView";
3558
+ /**
3559
+ * Triggers selection of a specific Personalized View on a
3560
+ * Liveboard without reloading the embed. Pass either a
3561
+ * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
3562
+ * If neither is provided, the Liveboard resets to the original/default view.
3563
+ * When a `viewName` is provided and multiple views share
3564
+ * the same name, the first match is selected.
3565
+ * @example
3566
+ * ```js
3567
+ * liveboardEmbed.trigger(
3568
+ * HostEvent.SelectPersonalizedView,
3569
+ * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
3570
+ * )
3571
+ * ```
3572
+ * @example
3573
+ * ```js
3574
+ * // Select by name
3575
+ * liveboardEmbed.trigger(
3576
+ * HostEvent.SelectPersonalizedView,
3577
+ * { viewName: 'Dr Smith Cardiology' },
3578
+ * )
3579
+ * ```
3580
+ * @example
3581
+ * ```js
3582
+ * // Reset to default view
3583
+ * liveboardEmbed.trigger(
3584
+ * HostEvent.SelectPersonalizedView,
3585
+ * {},
3586
+ * )
3587
+ * ```
3588
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3589
+ */
3590
+ HostEvent["SelectPersonalizedView"] = "SelectPersonalisedView";
2906
3591
  /**
2907
3592
  * @hidden
2908
3593
  * Notify when info call is completed successfully
@@ -2922,7 +3607,8 @@ var HostEvent;
2922
3607
  * add a name and description for the Answer.
2923
3608
  * @param - Includes the following keys:
2924
3609
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
2925
- * embed. - `name`: Optional. Name string for the Answer.
3610
+ * embed.
3611
+ * - `name`: Optional. Name string for the Answer.
2926
3612
  * - `description`: Optional. Description text for the Answer.
2927
3613
  * @example
2928
3614
  * ```js
@@ -2941,6 +3627,34 @@ var HostEvent;
2941
3627
  *
2942
3628
  * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
2943
3629
  * ```
3630
+ * @example
3631
+ * ```js
3632
+ * // Using context parameter to save answer from search context
3633
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3634
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3635
+ * name: "Regional sales analysis",
3636
+ * description: "Sales breakdown by region"
3637
+ * }, ContextType.Search);
3638
+ * ```
3639
+ * @example
3640
+ * ```js
3641
+ * // Save answer from answer context (explore modal)
3642
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3643
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3644
+ * name: "Modified analysis",
3645
+ * description: "Updated from explore view"
3646
+ * }, ContextType.Answer);
3647
+ * ```
3648
+ * @example
3649
+ * ```js
3650
+ * // Save answer from spotter context
3651
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3652
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
3653
+ * vizId: latestSpotterVizId,
3654
+ * name: "AI insights",
3655
+ * description: "Generated from Spotter"
3656
+ * }, ContextType.Spotter);
3657
+ * ```
2944
3658
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
2945
3659
  */
2946
3660
  HostEvent["SaveAnswer"] = "saveAnswer";
@@ -2982,6 +3696,15 @@ var HostEvent;
2982
3696
  * executeSearch: true,
2983
3697
  * })
2984
3698
  * ```
3699
+ * @example
3700
+ * ```js
3701
+ * // Spotter search from spotter context
3702
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3703
+ * spotterEmbed.trigger(HostEvent.SpotterSearch, {
3704
+ * query: 'sales by region',
3705
+ * executeSearch: true
3706
+ * }, ContextType.Spotter);
3707
+ * ```
2985
3708
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2986
3709
  */
2987
3710
  HostEvent["SpotterSearch"] = "SpotterSearch";
@@ -2992,6 +3715,12 @@ var HostEvent;
2992
3715
  * ```js
2993
3716
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
2994
3717
  * ```
3718
+ * @example
3719
+ * ```js
3720
+ * // Edit last prompt from spotter context
3721
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3722
+ * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
3723
+ * ```
2995
3724
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2996
3725
  */
2997
3726
  HostEvent["EditLastPrompt"] = "EditLastPrompt";
@@ -3001,6 +3730,12 @@ var HostEvent;
3001
3730
  * ```js
3002
3731
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
3003
3732
  * ```
3733
+ * @example
3734
+ * ```js
3735
+ * // Preview spotter data from spotter context
3736
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
3737
+ * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
3738
+ * ```
3004
3739
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
3005
3740
  */
3006
3741
  HostEvent["PreviewSpotterData"] = "PreviewSpotterData";
@@ -3291,6 +4026,7 @@ var Param;
3291
4026
  Param["IsLazyLoadingForEmbedEnabled"] = "isLazyLoadingForEmbedEnabled";
3292
4027
  Param["RootMarginForLazyLoad"] = "rootMarginForLazyLoad";
3293
4028
  Param["isPNGInScheduledEmailsEnabled"] = "isPNGInScheduledEmailsEnabled";
4029
+ Param["IsWYSIWYGLiveboardPDFEnabled"] = "isWYSIWYGLiveboardPDFEnabled";
3294
4030
  Param["isLiveboardXLSXCSVDownloadEnabled"] = "isLiveboardXLSXCSVDownloadEnabled";
3295
4031
  Param["isGranularXLSXCSVSchedulesEnabled"] = "isGranularXLSXCSVSchedulesEnabled";
3296
4032
  Param["isCentralizedLiveboardFilterUXEnabled"] = "isCentralizedLiveboardFilterUXEnabled";
@@ -3635,6 +4371,16 @@ var Action;
3635
4371
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
3636
4372
  */
3637
4373
  Action["DownloadLiveboard"] = "downloadLiveboard";
4374
+ /**
4375
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
4376
+ * Allows downloading the entire Liveboard as a continuous PDF.
4377
+ * @example
4378
+ * ```js
4379
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
4380
+ * ```
4381
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4382
+ */
4383
+ Action["DownloadLiveboardAsContinuousPDF"] = "downloadLiveboardAsContinuousPDF";
3638
4384
  /**
3639
4385
  * @hidden
3640
4386
  */
@@ -3759,6 +4505,7 @@ var Action;
3759
4505
  * disabledActions: [Action.LiveboardInfo]
3760
4506
  * ```
3761
4507
  */
4508
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
3762
4509
  Action["LiveboardInfo"] = "pinboardInfo";
3763
4510
  /**
3764
4511
  * @hidden
@@ -3789,6 +4536,7 @@ var Action;
3789
4536
  * disabledActions: [Action.Subscription]
3790
4537
  * ```
3791
4538
  */
4539
+ // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
3792
4540
  Action["Subscription"] = "subscription";
3793
4541
  /**
3794
4542
  * The **Explore** action on Liveboard visualizations
@@ -4268,13 +5016,25 @@ var Action;
4268
5016
  /**
4269
5017
  * The Liveboard Personalised Views dropdown.
4270
5018
  * Allows navigating to a personalized Liveboard View.
5019
+ * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
4271
5020
  * @example
4272
5021
  * ```js
4273
5022
  * disabledActions: [Action.PersonalisedViewsDropdown]
4274
5023
  * ```
4275
5024
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
5025
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4276
5026
  */
4277
5027
  Action["PersonalisedViewsDropdown"] = "personalisedViewsDropdown";
5028
+ /**
5029
+ * The Liveboard Personalized Views dropdown.
5030
+ * Allows navigating to a personalized Liveboard View.
5031
+ * @example
5032
+ * ```js
5033
+ * disabledActions: [Action.PersonalizedViewsDropdown]
5034
+ * ```
5035
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5036
+ */
5037
+ Action["PersonalizedViewsDropdown"] = "personalisedViewsDropdown";
4278
5038
  /**
4279
5039
  * Action ID for show or hide the user details on a
4280
5040
  * Liveboard (Recently visited / social proof)
@@ -4362,14 +5122,27 @@ var Action;
4362
5122
  /**
4363
5123
  * The **Organize Favourites** action on Homepage
4364
5124
  * *Favorites* module.
5125
+ * This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
4365
5126
  *
4366
5127
  * @example
4367
5128
  * ```js
4368
5129
  * disabledActions: [Action.OrganiseFavourites]
4369
5130
  * ```
4370
5131
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
5132
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4371
5133
  */
4372
5134
  Action["OrganiseFavourites"] = "organiseFavourites";
5135
+ /**
5136
+ * The **Organize Favorites** action on Homepage
5137
+ * *Favorites* module.
5138
+ *
5139
+ * @example
5140
+ * ```js
5141
+ * disabledActions: [Action.OrganizeFavorites]
5142
+ * ```
5143
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5144
+ */
5145
+ Action["OrganizeFavorites"] = "organiseFavourites";
4373
5146
  /**
4374
5147
  * The **AI Highlights** action on a Liveboard.
4375
5148
  *
@@ -4825,6 +5598,39 @@ var Action;
4825
5598
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
4826
5599
  */
4827
5600
  Action["SpotterDocs"] = "spotterDocs";
5601
+ /**
5602
+ * Controls visibility and disable state of the connector resources
5603
+ * section in the Spotter chat interface.
5604
+ * @example
5605
+ * ```js
5606
+ * hiddenActions: [Action.SpotterChatConnectorResources]
5607
+ * disabledActions: [Action.SpotterChatConnectorResources]
5608
+ * ```
5609
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5610
+ */
5611
+ Action["SpotterChatConnectorResources"] = "spotterChatConnectorResources";
5612
+ /**
5613
+ * Controls visibility and disable state of the connectors
5614
+ * in the Spotter chat interface.
5615
+ * @example
5616
+ * ```js
5617
+ * hiddenActions: [Action.SpotterChatConnectors]
5618
+ * disabledActions: [Action.SpotterChatConnectors]
5619
+ * ```
5620
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5621
+ */
5622
+ Action["SpotterChatConnectors"] = "spotterChatConnectors";
5623
+ /**
5624
+ * Controls visibility and disable state of the mode switcher
5625
+ * in the Spotter chat interface.
5626
+ * @example
5627
+ * ```js
5628
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
5629
+ * disabledActions: [Action.SpotterChatModeSwitcher]
5630
+ * ```
5631
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
5632
+ */
5633
+ Action["SpotterChatModeSwitcher"] = "spotterChatModeSwitcher";
4828
5634
  /**
4829
5635
  * The **Include current period** checkbox for date filters.
4830
5636
  * Controls the visibility and availability of the option to include
@@ -5118,7 +5924,29 @@ var EmbedErrorCodes;
5118
5924
  EmbedErrorCodes["UPDATE_PARAMS_FAILED"] = "UPDATE_PARAMS_FAILED";
5119
5925
  /** Invalid URL provided in configuration */
5120
5926
  EmbedErrorCodes["INVALID_URL"] = "INVALID_URL";
5927
+ /** Host event payload validation failed */
5928
+ EmbedErrorCodes["HOST_EVENT_VALIDATION"] = "HOST_EVENT_VALIDATION";
5929
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
5930
+ EmbedErrorCodes["UPDATEFILTERS_INVALID_PAYLOAD"] = "UPDATEFILTERS_INVALID_PAYLOAD";
5931
+ /** DrillDown payload is invalid - missing or malformed points */
5932
+ EmbedErrorCodes["DRILLDOWN_INVALID_PAYLOAD"] = "DRILLDOWN_INVALID_PAYLOAD";
5121
5933
  })(EmbedErrorCodes || (EmbedErrorCodes = {}));
5934
+ /**
5935
+ * Context types for specifying the page context when triggering host events.
5936
+ * Used as the third parameter in the `trigger` method to help ThoughtSpot
5937
+ * understand the current page context for better event handling.
5938
+ *
5939
+ * @example
5940
+ * ```js
5941
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
5942
+ *
5943
+ * // Trigger an event with specific context
5944
+ * embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
5945
+ * ```
5946
+ *
5947
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
5948
+ * @group Events
5949
+ */
5122
5950
  var ContextType;
5123
5951
  (function (ContextType) {
5124
5952
  /**
@@ -5137,6 +5965,10 @@ var ContextType;
5137
5965
  * Spotter context for spotter modal/page.
5138
5966
  */
5139
5967
  ContextType["Spotter"] = "spotter";
5968
+ /**
5969
+ * Other context for any other generic page.
5970
+ */
5971
+ ContextType["Other"] = "other";
5140
5972
  })(ContextType || (ContextType = {}));
5141
5973
  /**
5142
5974
  * Enum for the type of API intercepted
@@ -5312,6 +6144,8 @@ const ERROR_MESSAGE = {
5312
6144
  SSR_ENVIRONMENT_ERROR: 'SSR environment detected. This function cannot be called in SSR environment.',
5313
6145
  UPDATE_PARAMS_FAILED: 'Failed to update embed parameters',
5314
6146
  INVALID_SPOTTER_DOCUMENTATION_URL: 'Invalid spotterDocumentationUrl. Please provide a valid http or https URL.',
6147
+ UPDATEFILTERS_INVALID_PAYLOAD: 'UpdateFilters requires a valid filter or filters array. Expected: { filter: { column, oper, values } } or { filters: [{ column, oper, values }, ...] }',
6148
+ DRILLDOWN_INVALID_PAYLOAD: 'DrillDown requires a valid points object. Expected: { points: { clickedPoint?, selectedPoints? }, autoDrillDown?, vizId? }',
5315
6149
  };
5316
6150
  const CUSTOM_ACTIONS_ERROR_MESSAGE = {
5317
6151
  INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided',
@@ -5815,14 +6649,6 @@ const validateHttpUrl = (url) => {
5815
6649
  return [false, error instanceof Error ? error : new Error(String(error))];
5816
6650
  }
5817
6651
  };
5818
- /**
5819
- * Resolves enablePastConversationsSidebar with
5820
- * spotterSidebarConfig taking precedence over the
5821
- * standalone flag.
5822
- */
5823
- const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
5824
- ? params.spotterSidebarConfigValue
5825
- : params.standaloneValue);
5826
6652
  /**
5827
6653
  * Sets a query parameter if the value is defined.
5828
6654
  * @param queryParams - The query params object to modify
@@ -8119,6 +8945,15 @@ var UIPassthroughEvent;
8119
8945
  UIPassthroughEvent["GetAnswerConfig"] = "getAnswerPageConfig";
8120
8946
  UIPassthroughEvent["GetLiveboardConfig"] = "getPinboardPageConfig";
8121
8947
  UIPassthroughEvent["GetUnsavedAnswerTML"] = "getUnsavedAnswerTML";
8948
+ UIPassthroughEvent["UpdateFilters"] = "updateFilters";
8949
+ UIPassthroughEvent["Drilldown"] = "drillDown";
8950
+ UIPassthroughEvent["GetAnswerSession"] = "getAnswerSession";
8951
+ UIPassthroughEvent["GetFilters"] = "getFilters";
8952
+ UIPassthroughEvent["GetIframeUrl"] = "getIframeUrl";
8953
+ UIPassthroughEvent["GetParameters"] = "getParameters";
8954
+ UIPassthroughEvent["GetTML"] = "getTML";
8955
+ UIPassthroughEvent["GetTabs"] = "getTabs";
8956
+ UIPassthroughEvent["GetExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
8122
8957
  })(UIPassthroughEvent || (UIPassthroughEvent = {}));
8123
8958
 
8124
8959
  const EndPoints = {
@@ -8752,9 +9587,11 @@ const DATA_TYPES = ['DATE', 'DATE_TIME', 'TIME'];
8752
9587
  * You can use this service to:
8753
9588
  *
8754
9589
  * - Add or remove columns from Answers (`addColumns`, `removeColumns`,
8755
- * `addColumnsByName`) - Apply filters to Answers (`addFilter`)
9590
+ * `addColumnsByName`)
9591
+ * - Apply filters to Answers (`addFilter`)
8756
9592
  * - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
8757
- * `fetchCSVBlob`, `fetchPNGBlob`) - Get data for specific points in visualizations
9593
+ * `fetchCSVBlob`, `fetchPNGBlob`)
9594
+ * - Get data for specific points in visualizations
8758
9595
  * (`getUnderlyingDataForPoint`)
8759
9596
  * - Run custom queries (`executeQuery`)
8760
9597
  * - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
@@ -9048,7 +9885,7 @@ class AnswerService {
9048
9885
  async getTML() {
9049
9886
  const { object } = await this.executeQuery(getAnswerTML, {});
9050
9887
  const edoc = object[0].edoc;
9051
- const YAML = await import('./index-DGV_zh53.js');
9888
+ const YAML = await import('./index-ChNydfIz.js');
9052
9889
  const parsedDoc = YAML.parse(edoc);
9053
9890
  return {
9054
9891
  answer: {
@@ -17516,7 +18353,8 @@ var AuthFailureType;
17516
18353
  /**
17517
18354
  * The current authentication token or session has expired.
17518
18355
  *
17519
- * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
18356
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh
18357
+ * handling.
17520
18358
  */
17521
18359
  AuthFailureType["EXPIRY"] = "EXPIRY";
17522
18360
  /**
@@ -18529,11 +19367,79 @@ function processEventData(type, eventData, thoughtSpotHost, containerEl) {
18529
19367
  return eventData;
18530
19368
  }
18531
19369
 
18532
- var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.4";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js && node dts-config/wrap-ambient-module.mjs","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.24.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"32 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
19370
+ var name="@thoughtspot/visual-embed-sdk";var version$1="1.46.5";var description="ThoughtSpot Embed SDK";var module="lib/src/index.js";var main="dist/tsembed.js";var types="lib/src/index.d.ts";var files=["dist/**","lib/**","src/**","cjs/**"];var exports={".":{"import":"./lib/src/index.js",require:"./cjs/src/index.js",types:"./lib/src/index.d.ts"},"./react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"},"./lib/src/react":{"import":"./lib/src/react/all-types-export.js",require:"./cjs/src/react/all-types-export.js",types:"./lib/src/react/all-types-export.d.ts"}};var typesVersions={"*":{react:["./lib/src/react/all-types-export.d.ts"]}};var scripts={lint:"eslint 'src/**'","lint:fix":"eslint 'src/**/*.*' --fix",tsc:"tsc -p tsconfig.build.json --incremental false; tsc -p tsconfig.build.json --incremental false --module commonjs --outDir cjs","build-and-publish":"npm run build:gatsby && npm run publish","bundle-dts-file":"dts-bundle-generator --config ./dts-config/dts-bundle-file.config.js && node dts-config/wrap-ambient-module.mjs","bundle-dts":"dts-bundle-generator --config ./dts-config/dts-bundle.config.js","bundle-dts-react":"dts-bundle-generator --config ./dts-config/dts-bundle-react.config.js","bundle-dts-react-full":"dts-bundle-generator --config ./dts-config/dts-bundle-react-full.config.js",build:"rollup -c",watch:"rollup -cw",docgen:"typedoc --tsconfig tsconfig.build.json --theme typedoc-theme --json static/typedoc/typedoc.json --disableOutputCheck","test-sdk":"jest -c jest.config.sdk.js --runInBand",test:"npm run test-sdk",posttest:"cat ./coverage/sdk/lcov.info | npx coveralls-next || echo 'Warning: Coveralls upload failed but not breaking the build.'","is-publish-allowed":"node scripts/is-publish-allowed.js",prepublishOnly:"npm run is-publish-allowed && npm run test && npm run tsc && npm run bundle-dts-file && npm run bundle-dts && npm run bundle-dts-react && npm run bundle-dts-react-full && npm run build","check-size":"npm run build && size-limit","publish-dev":"npm publish --tag dev","publish-prod":"npm publish --tag latest",dev:"vite -c vite.local.config.ts"};var peerDependencies={react:"> 16.8.0","react-dom":"> 16.8.0"};var dependencies={classnames:"^2.3.1",eventemitter3:"^4.0.7",lodash:"^4.17.23","mixpanel-browser":"2.47.0","ts-deepmerge":"^6.0.2",tslib:"^2.5.3","use-deep-compare-effect":"^1.8.1",yaml:"^2.5.1"};var devDependencies={"@mdx-js/mdx":"^1.6.22","@mdx-js/react":"^1.6.22","@react-icons/all-files":"^4.1.0","@rollup/plugin-commonjs":"^18.0.0","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^11.2.1","@rollup/plugin-replace":"^5.0.2","@size-limit/preset-big-lib":"^11.2.0","@testing-library/dom":"^7.31.0","@testing-library/jest-dom":"^5.14.1","@testing-library/react":"^11.2.7","@testing-library/user-event":"^13.1.8","@types/jest":"^30.0.0","@types/lodash":"^4.17.0","@types/mixpanel-browser":"^2.35.6","@types/react-test-renderer":"^17.0.1","@typescript-eslint/eslint-plugin":"^8.28.0","@typescript-eslint/parser":"^8.28.0",ajv:"^8.17.1",asciidoctor:"^2.2.1","babel-jest":"^30.2.0","babel-preset-gatsby":"^1.10.0","command-line-args":"^5.1.1","coveralls-next":"^5.0.0",crypto:"^1.0.1","current-git-branch":"^1.1.0","dts-bundle-generator":"^9.5.1",eslint:"^9.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-prettier":"^10.1.1","eslint-import-resolver-typescript":"^4.2.5","eslint-plugin-comment-length":"2.2.1","eslint-plugin-import":"^2.31.0","eslint-plugin-jsdoc":"^50.6.9","eslint-plugin-prettier":"^5.2.5","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","fs-extra":"^10.0.0","gh-pages":"6.3.0",globals:"^16.0.0","highlight.js":"^10.6.0","html-to-text":"^8.0.0","identity-obj-proxy":"^3.0.0","istanbul-merge":"^2.0.0",jest:"^30.2.0","jest-environment-jsdom":"^29.7.0","jest-fetch-mock":"^3.0.3",jsdom:"^17.0.0",prettier:"2.1.2",react:"^16.14.0","react-dom":"^16.14.0","react-resizable":"^1.11.0","react-resize-detector":"^6.6.0","react-test-renderer":"^17.0.2","react-use-flexsearch":"^0.1.1",rollup:"4.59.0","rollup-plugin-typescript2":"0.27.3","ts-jest":"^29.4.6","ts-loader":"8.0.4",typedoc:"0.21.6","typedoc-plugin-toc-group":"thoughtspot/typedoc-plugin-toc-group",typescript:"^4.9.4","typescript-eslint":"^8.29.1","url-search-params-polyfill":"^8.1.0",util:"^0.12.4",vite:"^6.3.5"};var author="ThoughtSpot";var email="support@thoughtspot.com";var license="ThoughtSpot Development Tools End User License Agreement";var directories={lib:"lib"};var repository={type:"git",url:"git+https://github.com/thoughtspot/visual-embed-sdk.git"};var publishConfig={registry:"https://registry.npmjs.org"};var keywords=["thoughtspot","everywhere","embedded","embed","sdk","analytics"];var bugs={url:"https://github.com/thoughtspot/visual-embed-sdk/issues"};var homepage="https://github.com/thoughtspot/visual-embed-sdk#readme";var globals={window:{}};var pkgInfo = {name:name,version:version$1,description:description,module:module,main:main,types:types,files:files,exports:exports,typesVersions:typesVersions,"size-limit":[{path:"dist/tsembed.es.js",limit:"34 kB"}],scripts:scripts,peerDependencies:peerDependencies,dependencies:dependencies,devDependencies:devDependencies,author:author,email:email,license:license,directories:directories,repository:repository,publishConfig:publishConfig,keywords:keywords,bugs:bugs,homepage:homepage,globals:globals};
19371
+
19372
+ function isValidUpdateFiltersPayload(payload) {
19373
+ if (!payload)
19374
+ return false;
19375
+ const isValidFilter = (f) => !!f && typeof f.column === 'string' && typeof f.oper === 'string' && Array.isArray(f.values);
19376
+ const hasValidFilter = payload.filter && isValidFilter(payload.filter);
19377
+ const hasValidFilters = Array.isArray(payload.filters) && payload.filters.length > 0 && payload.filters.every(isValidFilter);
19378
+ return !!(hasValidFilter || hasValidFilters);
19379
+ }
19380
+ function isValidDrillDownPayload(payload) {
19381
+ if (!payload)
19382
+ return false;
19383
+ const points = payload.points;
19384
+ if (!points || typeof points !== 'object')
19385
+ return false;
19386
+ const hasClickedPoint = 'clickedPoint' in points && points.clickedPoint != null;
19387
+ const hasSelectedPoints = Array.isArray(points.selectedPoints) && points.selectedPoints.length > 0;
19388
+ return hasClickedPoint || hasSelectedPoints;
19389
+ }
19390
+ function createValidationError(message) {
19391
+ const err = new Error(message);
19392
+ err.isValidationError = true;
19393
+ err.embedErrorDetails = {
19394
+ type: EmbedEvent.Error,
19395
+ data: {
19396
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
19397
+ message,
19398
+ code: EmbedErrorCodes.HOST_EVENT_VALIDATION,
19399
+ error: message
19400
+ },
19401
+ status: embedEventStatus.END
19402
+ };
19403
+ throw err;
19404
+ }
19405
+ function throwUpdateFiltersValidationError() {
19406
+ createValidationError(ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD);
19407
+ }
19408
+ function throwDrillDownValidationError() {
19409
+ createValidationError(ERROR_MESSAGE.DRILLDOWN_INVALID_PAYLOAD);
19410
+ }
18533
19411
 
19412
+ /**
19413
+ * Maps HostEvent to its corresponding UIPassthroughEvent.
19414
+ * Includes both custom-handler events (Pin, SaveAnswer, UpdateFilters, DrillDown)
19415
+ * and getter events (GetAnswerSession, GetFilters, etc.) that use getDataWithPassthroughFallback.
19416
+ */
19417
+ const PASSTHROUGH_MAP = {
19418
+ // Custom handlers (setters with special logic)
19419
+ [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard,
19420
+ [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer,
19421
+ [HostEvent.UpdateFilters]: UIPassthroughEvent.UpdateFilters,
19422
+ [HostEvent.DrillDown]: UIPassthroughEvent.Drilldown,
19423
+ // Getters (use getDataWithPassthroughFallback)
19424
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession,
19425
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters,
19426
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl,
19427
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters,
19428
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML,
19429
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs,
19430
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard,
19431
+ };
18534
19432
  class HostEventClient {
18535
19433
  constructor(iFrame) {
19434
+ /** Cached list of available UI passthrough keys from the embedded app */
19435
+ this.availablePassthroughKeysCache = null;
18536
19436
  this.iFrame = iFrame;
19437
+ this.customHandlers = {
19438
+ [HostEvent.Pin]: (p, c) => this.handlePinEvent(p, c),
19439
+ [HostEvent.SaveAnswer]: (p, c) => this.handleSaveAnswerEvent(p, c),
19440
+ [HostEvent.UpdateFilters]: (p, c) => this.handleUpdateFiltersEvent(p, c),
19441
+ [HostEvent.DrillDown]: (p, c) => this.handleDrillDownEvent(p, c),
19442
+ };
18537
19443
  }
18538
19444
  /**
18539
19445
  * A wrapper over process trigger to
@@ -18550,7 +19456,7 @@ class HostEventClient {
18550
19456
  }
18551
19457
  async handleHostEventWithParam(apiName, parameters, context) {
18552
19458
  var _a, _b, _c, _d;
18553
- const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value)[0];
19459
+ const response = (_b = (_a = (await this.triggerUIPassthroughApi(apiName, parameters, context))) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (r) => r.error || r.value);
18554
19460
  if (!response) {
18555
19461
  const error = `No answer found${parameters.vizId ? ` for vizId: ${parameters.vizId}` : ''}.`;
18556
19462
  throw { error };
@@ -18559,13 +19465,35 @@ class HostEventClient {
18559
19465
  || ((_c = response.value) === null || _c === void 0 ? void 0 : _c.errors)
18560
19466
  || ((_d = response.value) === null || _d === void 0 ? void 0 : _d.error);
18561
19467
  if (errors) {
18562
- throw { error: response.error };
19468
+ const message = typeof errors === 'string' ? errors : JSON.stringify(errors);
19469
+ throw { error: message };
18563
19470
  }
18564
19471
  return { ...response.value };
18565
19472
  }
18566
19473
  async hostEventFallback(hostEvent, data, context) {
18567
19474
  return this.processTrigger(hostEvent, data, context);
18568
19475
  }
19476
+ /**
19477
+ * For getter events that return data. Tries UI passthrough first;
19478
+ * if the app doesn't support it (no response data), falls back to
19479
+ * the legacy host event channel. Real errors are thrown as-is.
19480
+ */
19481
+ async getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context) {
19482
+ var _a, _b, _c;
19483
+ const response = await this.triggerUIPassthroughApi(passthroughEvent, payload || {}, context);
19484
+ const matched = (_a = response === null || response === void 0 ? void 0 : response.find) === null || _a === void 0 ? void 0 : _a.call(response, (r) => r.error || r.value);
19485
+ if (!matched) {
19486
+ return this.hostEventFallback(hostEvent, payload, context);
19487
+ }
19488
+ const errors = matched.error
19489
+ || ((_b = matched.value) === null || _b === void 0 ? void 0 : _b.errors)
19490
+ || ((_c = matched.value) === null || _c === void 0 ? void 0 : _c.error);
19491
+ if (errors) {
19492
+ const message = typeof errors === 'string' ? errors : JSON.stringify(errors);
19493
+ throw new Error(message);
19494
+ }
19495
+ return { ...matched.value };
19496
+ }
18569
19497
  /**
18570
19498
  * Setter for the iframe element used for host events
18571
19499
  * @param {HTMLIFrameElement} iFrame - the iframe element to set
@@ -18573,6 +19501,26 @@ class HostEventClient {
18573
19501
  setIframeElement(iFrame) {
18574
19502
  this.iFrame = iFrame;
18575
19503
  }
19504
+ /**
19505
+ * Fetches the list of available UI passthrough keys from the embedded app.
19506
+ * Result is cached for the session. Returns empty array on failure.
19507
+ */
19508
+ async getAvailableUIPassthroughKeys(context) {
19509
+ var _a, _b;
19510
+ if (this.availablePassthroughKeysCache !== null) {
19511
+ return this.availablePassthroughKeysCache;
19512
+ }
19513
+ try {
19514
+ const response = await this.triggerUIPassthroughApi(UIPassthroughEvent.GetAvailableUIPassthroughs, {}, context);
19515
+ const matched = (_a = response === null || response === void 0 ? void 0 : response.find) === null || _a === void 0 ? void 0 : _a.call(response, (r) => r.value && !r.error);
19516
+ const keys = (_b = matched === null || matched === void 0 ? void 0 : matched.value) === null || _b === void 0 ? void 0 : _b.keys;
19517
+ this.availablePassthroughKeysCache = Array.isArray(keys) ? keys : [];
19518
+ return this.availablePassthroughKeysCache;
19519
+ }
19520
+ catch {
19521
+ return [];
19522
+ }
19523
+ }
18576
19524
  async triggerUIPassthroughApi(apiName, parameters, context) {
18577
19525
  const res = await this.processTrigger(HostEvent.UIPassthrough, {
18578
19526
  type: apiName,
@@ -18608,15 +19556,41 @@ class HostEventClient {
18608
19556
  answerId: (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.saveResponse) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.Answer__save) === null || _c === void 0 ? void 0 : _c.answer) === null || _d === void 0 ? void 0 : _d.id,
18609
19557
  };
18610
19558
  }
18611
- async triggerHostEvent(hostEvent, payload, context) {
18612
- switch (hostEvent) {
18613
- case HostEvent.Pin:
18614
- return this.handlePinEvent(payload, context);
18615
- case HostEvent.SaveAnswer:
18616
- return this.handleSaveAnswerEvent(payload, context);
18617
- default:
18618
- return this.hostEventFallback(hostEvent, payload, context);
19559
+ handleUpdateFiltersEvent(payload, context) {
19560
+ if (!isValidUpdateFiltersPayload(payload)) {
19561
+ throwUpdateFiltersValidationError();
19562
+ }
19563
+ return this.handleHostEventWithParam(UIPassthroughEvent.UpdateFilters, payload, context);
19564
+ }
19565
+ handleDrillDownEvent(payload, context) {
19566
+ if (!isValidDrillDownPayload(payload)) {
19567
+ throwDrillDownValidationError();
18619
19568
  }
19569
+ return this.handleHostEventWithParam(UIPassthroughEvent.Drilldown, payload, context);
19570
+ }
19571
+ /**
19572
+ * Dispatches a host event using the appropriate channel:
19573
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
19574
+ * 2. Otherwise fall back to the legacy host event channel.
19575
+ *
19576
+ * @param hostEvent - The host event to trigger
19577
+ * @param payload - Optional payload for the event
19578
+ * @param context - Optional context (e.g. vizId) for scoped operations
19579
+ */
19580
+ async triggerHostEvent(hostEvent, payload, context) {
19581
+ const customHandler = this.customHandlers[hostEvent];
19582
+ const passthroughEvent = PASSTHROUGH_MAP[hostEvent];
19583
+ // If embedded app supports passthrough but not this event, use legacy channel
19584
+ const keys = passthroughEvent ? await this.getAvailableUIPassthroughKeys(context) : [];
19585
+ if (passthroughEvent && keys.length > 0 && !keys.includes(passthroughEvent)) {
19586
+ return this.hostEventFallback(hostEvent, payload, context);
19587
+ }
19588
+ // Custom handler (setters) > getter passthrough > legacy fallback
19589
+ return (customHandler
19590
+ ? customHandler(payload, context)
19591
+ : passthroughEvent
19592
+ ? this.getDataWithPassthroughFallback(passthroughEvent, hostEvent, payload, context)
19593
+ : this.hostEventFallback(hostEvent, payload, context));
18620
19594
  }
18621
19595
  }
18622
19596
 
@@ -19907,7 +20881,21 @@ class TsEmbed {
19907
20881
  * Triggers an event to the embedded app
19908
20882
  * @param {HostEvent} messageType The event type
19909
20883
  * @param {any} data The payload to send with the message
20884
+ * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
20885
+ * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
20886
+ * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
20887
+ * Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
19910
20888
  * @returns A promise that resolves with the response from the embedded app
20889
+ * @example
20890
+ * ```js
20891
+ * // Trigger Pin event with context (SDK: 1.45.2+)
20892
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
20893
+ * embed.trigger(HostEvent.Pin, {
20894
+ * vizId: "123",
20895
+ * liveboardId: "456"
20896
+ * }, ContextType.Search);
20897
+ * ```
20898
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
19911
20899
  */
19912
20900
  async trigger(messageType, data = {}, context) {
19913
20901
  uploadMixpanelEvent(`${MIXPANEL_EVENT.VISUAL_SDK_TRIGGER}-${messageType}`);
@@ -19936,7 +20924,19 @@ class TsEmbed {
19936
20924
  return null;
19937
20925
  }
19938
20926
  // send an empty object, this is needed for liveboard default handlers
19939
- return this.hostEventClient.triggerHostEvent(messageType, data, context);
20927
+ return this.hostEventClient.triggerHostEvent(messageType, data, context).catch((err) => {
20928
+ var _a;
20929
+ if (err === null || err === void 0 ? void 0 : err.isValidationError) {
20930
+ const errorDetails = (_a = err.embedErrorDetails) !== null && _a !== void 0 ? _a : {
20931
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20932
+ message: err.message || ERROR_MESSAGE.UPDATEFILTERS_INVALID_PAYLOAD,
20933
+ code: EmbedErrorCodes.UPDATEFILTERS_INVALID_PAYLOAD,
20934
+ error: err.message,
20935
+ };
20936
+ this.handleError(errorDetails);
20937
+ }
20938
+ throw err;
20939
+ });
19940
20940
  }
19941
20941
  /**
19942
20942
  * Triggers an event to the embedded app, skipping the UI flow.
@@ -19970,8 +20970,33 @@ class TsEmbed {
19970
20970
  return this.render();
19971
20971
  }
19972
20972
  /**
19973
- * Get the current context of the embedded TS component.
19974
- * @returns The current context object containing the page type and object ids.
20973
+ * Context object for the embedded component.
20974
+ * @returns {ContextObject} The current context object containing the page type and object ids.
20975
+ * @example
20976
+ * ```js
20977
+ * const context = await embed.getCurrentContext();
20978
+ * console.log(context);
20979
+ *
20980
+ * // Example output
20981
+ * {
20982
+ * stack: [
20983
+ * {
20984
+ * name: 'Liveboard',
20985
+ * type: ContextType.Liveboard,
20986
+ * objectIds: {
20987
+ * liveboardId: '123',
20988
+ * },
20989
+ * },
20990
+ * ],
20991
+ * currentContext: {
20992
+ * name: 'Liveboard',
20993
+ * type: ContextType.Liveboard,
20994
+ * objectIds: {
20995
+ * liveboardId: '123',
20996
+ * },
20997
+ * },
20998
+ * }
20999
+ * ```
19975
21000
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
19976
21001
  */
19977
21002
  async getCurrentContext() {
@@ -20313,6 +21338,50 @@ class V1Embed extends TsEmbed {
20313
21338
  }
20314
21339
  }
20315
21340
 
21341
+ /**
21342
+ * Resolves enablePastConversationsSidebar with
21343
+ * spotterSidebarConfig taking precedence over the
21344
+ * standalone flag.
21345
+ */
21346
+ const resolveEnablePastConversationsSidebar = (params) => (params.spotterSidebarConfigValue !== undefined
21347
+ ? params.spotterSidebarConfigValue
21348
+ : params.standaloneValue);
21349
+ function buildSpotterSidebarAppInitData(defaultAppInitData, viewConfig, handleError) {
21350
+ const { spotterSidebarConfig, enablePastConversationsSidebar } = viewConfig;
21351
+ const resolvedEnablePastConversations = resolveEnablePastConversationsSidebar({
21352
+ spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
21353
+ standaloneValue: enablePastConversationsSidebar,
21354
+ });
21355
+ const hasConfig = spotterSidebarConfig || resolvedEnablePastConversations !== undefined;
21356
+ if (!hasConfig)
21357
+ return defaultAppInitData;
21358
+ const resolvedSidebarConfig = {
21359
+ ...spotterSidebarConfig,
21360
+ ...(resolvedEnablePastConversations !== undefined && {
21361
+ enablePastConversationsSidebar: resolvedEnablePastConversations,
21362
+ }),
21363
+ };
21364
+ if (resolvedSidebarConfig.spotterDocumentationUrl !== undefined) {
21365
+ const [isValid, validationError] = validateHttpUrl(resolvedSidebarConfig.spotterDocumentationUrl);
21366
+ if (!isValid) {
21367
+ handleError({
21368
+ errorType: ErrorDetailsTypes.VALIDATION_ERROR,
21369
+ message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21370
+ code: EmbedErrorCodes.INVALID_URL,
21371
+ error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
21372
+ });
21373
+ delete resolvedSidebarConfig.spotterDocumentationUrl;
21374
+ }
21375
+ }
21376
+ return {
21377
+ ...defaultAppInitData,
21378
+ embedParams: {
21379
+ ...(defaultAppInitData.embedParams || {}),
21380
+ spotterSidebarConfig: resolvedSidebarConfig,
21381
+ },
21382
+ };
21383
+ }
21384
+
20316
21385
  /**
20317
21386
  * Copyright (c) 2022
20318
21387
  *
@@ -20442,7 +21511,10 @@ class AppEmbed extends V1Embed {
20442
21511
  this.defaultHeight = 500;
20443
21512
  this.sendFullHeightLazyLoadData = () => {
20444
21513
  const data = calculateVisibleElementData(this.iFrame);
20445
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
21514
+ // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
21515
+ if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
21516
+ this.trigger(HostEvent.VisibleEmbedCoordinates, data);
21517
+ }
20446
21518
  };
20447
21519
  /**
20448
21520
  * This is a handler for the RequestVisibleEmbedCoordinates event.
@@ -20495,12 +21567,28 @@ class AppEmbed extends V1Embed {
20495
21567
  this.on(EmbedEvent.RequestVisibleEmbedCoordinates, this.requestVisibleEmbedCoordinatesHandler);
20496
21568
  }
20497
21569
  }
21570
+ /**
21571
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
21572
+ * so the conv-assist app can read sidebar configuration on initialisation.
21573
+ *
21574
+ * Precedence for `enablePastConversationsSidebar`:
21575
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
21576
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
21577
+ * is absent the latter is used as a fallback.
21578
+ *
21579
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
21580
+ * excluded from the payload rather than forwarded to the app.
21581
+ */
21582
+ async getAppInitData() {
21583
+ const defaultAppInitData = await super.getAppInitData();
21584
+ return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
21585
+ }
20498
21586
  /**
20499
21587
  * Constructs a map of parameters to be passed on to the
20500
21588
  * embedded Liveboard or visualization.
20501
21589
  */
20502
21590
  getEmbedParams() {
20503
- const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement, } = this.viewConfig;
21591
+ const { tag, hideTagFilterChips, hideObjects, liveboardV2, showPrimaryNavbar, disableProfileAndHelp, hideHamburger, hideObjectSearch, hideNotification, hideApplicationSwitcher, hideOrgSwitcher, enableSearchAssist, fullHeight, dataPanelV2 = true, hideLiveboardHeader = false, showLiveboardTitle = true, showLiveboardDescription = true, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, hideHomepageLeftNav = false, modularHomeExperience = false, isLiveboardHeaderSticky = true, enableAskSage, collapseSearchBarInitially = false, enable2ColumnLayout, enableCustomColumnGroups = false, dataPanelCustomGroupsAccordionInitialState = DataPanelCustomColumnGroupsAccordionState$1.EXPAND_ALL, collapseSearchBar = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, isEnhancedFilterInteractivityEnabled = false, homePageSearchBarMode, isUnifiedSearchExperienceEnabled = true, enablePendoHelp = true, discoveryExperience, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, minimumHeight, isThisPeriodInDateFiltersEnabled, enableHomepageAnnouncement = false, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
20504
21592
  let params = {};
20505
21593
  params[Param.PrimaryNavHidden] = !showPrimaryNavbar;
20506
21594
  params[Param.HideProfleAndHelp] = !!disableProfileAndHelp;
@@ -20524,39 +21612,6 @@ class AppEmbed extends V1Embed {
20524
21612
  if (!isUndefined(updatedSpotterChatPrompt)) {
20525
21613
  params[Param.UpdatedSpotterChatPrompt] = !!updatedSpotterChatPrompt;
20526
21614
  }
20527
- const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
20528
- spotterSidebarConfigValue: spotterSidebarConfig === null || spotterSidebarConfig === void 0 ? void 0 : spotterSidebarConfig.enablePastConversationsSidebar,
20529
- standaloneValue: this.viewConfig.enablePastConversationsSidebar,
20530
- });
20531
- setParamIfDefined(params, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
20532
- // Handle spotterSidebarConfig params
20533
- if (spotterSidebarConfig) {
20534
- const { spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig;
20535
- setParamIfDefined(params, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
20536
- setParamIfDefined(params, Param.SpotterSidebarTitle, spotterSidebarTitle);
20537
- setParamIfDefined(params, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
20538
- setParamIfDefined(params, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
20539
- setParamIfDefined(params, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
20540
- setParamIfDefined(params, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
20541
- setParamIfDefined(params, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
20542
- setParamIfDefined(params, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
20543
- setParamIfDefined(params, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
20544
- // URL param with validation
20545
- if (spotterDocumentationUrl !== undefined) {
20546
- const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
20547
- if (isValid) {
20548
- params[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
20549
- }
20550
- else {
20551
- this.handleError({
20552
- errorType: ErrorDetailsTypes.VALIDATION_ERROR,
20553
- message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20554
- code: EmbedErrorCodes.INVALID_URL,
20555
- error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
20556
- });
20557
- }
20558
- }
20559
- }
20560
21615
  // Handle spotterChatConfig params
20561
21616
  if (spotterChatConfig) {
20562
21617
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;
@@ -20632,6 +21687,9 @@ class AppEmbed extends V1Embed {
20632
21687
  if (enableHomepageAnnouncement !== undefined) {
20633
21688
  params[Param.EnableHomepageAnnouncement] = enableHomepageAnnouncement;
20634
21689
  }
21690
+ if (isContinuousLiveboardPDFEnabled !== undefined) {
21691
+ params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
21692
+ }
20635
21693
  this.defaultHeight = minimumHeight || this.defaultHeight;
20636
21694
  params[Param.DataPanelV2Enabled] = dataPanelV2;
20637
21695
  params[Param.HideHomepageLeftNav] = hideHomepageLeftNav;
@@ -20907,7 +21965,10 @@ class LiveboardEmbed extends V1Embed {
20907
21965
  this.defaultHeight = 500;
20908
21966
  this.sendFullHeightLazyLoadData = () => {
20909
21967
  const data = calculateVisibleElementData(this.iFrame);
20910
- this.trigger(HostEvent.VisibleEmbedCoordinates, data);
21968
+ // this should be fired only if the lazyLoadingForFullHeight and fullHeight are true
21969
+ if (this.viewConfig.lazyLoadingForFullHeight && this.viewConfig.fullHeight) {
21970
+ this.trigger(HostEvent.VisibleEmbedCoordinates, data);
21971
+ }
20911
21972
  };
20912
21973
  /**
20913
21974
  * This is a handler for the RequestVisibleEmbedCoordinates event.
@@ -20987,7 +22048,7 @@ class LiveboardEmbed extends V1Embed {
20987
22048
  getEmbedParamsObject() {
20988
22049
  let params = {};
20989
22050
  params = this.getBaseQueryParams(params);
20990
- const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, } = this.viewConfig;
22051
+ const { enableVizTransformations, fullHeight, defaultHeight, minimumHeight, visibleVizs, liveboardV2, vizId, hideTabPanel, activeTabId, hideLiveboardHeader, showLiveboardDescription, showLiveboardTitle, isLiveboardHeaderSticky = true, isLiveboardCompactHeaderEnabled = false, showLiveboardVerifiedBadge = true, showLiveboardReverifyBanner = true, hideIrrelevantChipsInLiveboardTabs = false, showMaskedFilterChip = false, isLiveboardMasterpiecesEnabled = false, isEnhancedFilterInteractivityEnabled = false, enableAskSage, enable2ColumnLayout, dataPanelV2 = true, enableCustomColumnGroups = false, oAuthPollingInterval, isForceRedirect, dataSourceId, coverAndFilterOptionInPDF = false, isLiveboardStylingAndGroupingEnabled, isPNGInScheduledEmailsEnabled = false, isLiveboardXLSXCSVDownloadEnabled = false, isGranularXLSXCSVSchedulesEnabled = false, showSpotterLimitations, isCentralizedLiveboardFilterUXEnabled = false, isLinkParametersEnabled, updatedSpotterChatPrompt, spotterChatConfig, isThisPeriodInDateFiltersEnabled, isContinuousLiveboardPDFEnabled, } = this.viewConfig;
20991
22052
  const preventLiveboardFilterRemoval = this.viewConfig.preventLiveboardFilterRemoval
20992
22053
  || this.viewConfig.preventPinboardFilterRemoval;
20993
22054
  if (fullHeight === true) {
@@ -21076,6 +22137,9 @@ class LiveboardEmbed extends V1Embed {
21076
22137
  if (isThisPeriodInDateFiltersEnabled !== undefined) {
21077
22138
  params[Param.IsThisPeriodInDateFiltersEnabled] = isThisPeriodInDateFiltersEnabled;
21078
22139
  }
22140
+ if (isContinuousLiveboardPDFEnabled !== undefined) {
22141
+ params[Param.IsWYSIWYGLiveboardPDFEnabled] = isContinuousLiveboardPDFEnabled;
22142
+ }
21079
22143
  params[Param.LiveboardHeaderSticky] = isLiveboardHeaderSticky;
21080
22144
  params[Param.LiveboardHeaderV2] = isLiveboardCompactHeaderEnabled;
21081
22145
  params[Param.ShowLiveboardVerifiedBadge] = showLiveboardVerifiedBadge;
@@ -21092,7 +22156,8 @@ class LiveboardEmbed extends V1Embed {
21092
22156
  }
21093
22157
  getIframeSuffixSrc(liveboardId, vizId, activeTabId, personalizedViewId) {
21094
22158
  // Extract view from liveboardId if passed along with it (legacy
21095
- // approach) View must be appended as query param at the end, not
22159
+ // approach)
22160
+ // View must be appended as query param at the end, not
21096
22161
  // embedded in path
21097
22162
  let liveboardGuid = liveboardId;
21098
22163
  let legacyViewId;
@@ -22091,14 +23156,24 @@ class SpotterEmbed extends TsEmbed {
22091
23156
  super(container, viewConfig);
22092
23157
  this.viewConfig = viewConfig;
22093
23158
  }
23159
+ /**
23160
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
23161
+ * so the conv-assist app can read sidebar configuration on initialisation.
23162
+ *
23163
+ * Precedence for `enablePastConversationsSidebar`:
23164
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
23165
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
23166
+ * is absent the latter is used as a fallback.
23167
+ *
23168
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
23169
+ * excluded from the payload rather than forwarded to the app.
23170
+ */
23171
+ async getAppInitData() {
23172
+ const defaultAppInitData = await super.getAppInitData();
23173
+ return buildSpotterSidebarAppInitData(defaultAppInitData, this.viewConfig, this.handleError.bind(this));
23174
+ }
22094
23175
  getEmbedParamsObject() {
22095
- const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterSidebarConfig, spotterChatConfig, } = this.viewConfig;
22096
- // Extract sidebar config properties
22097
- const { enablePastConversationsSidebar: sidebarEnablePastConversationsSidebar, spotterSidebarTitle, spotterSidebarDefaultExpanded, spotterChatRenameLabel, spotterChatDeleteLabel, spotterDeleteConversationModalTitle, spotterPastConversationAlertMessage, spotterDocumentationUrl, spotterBestPracticesLabel, spotterConversationsBatchSize, spotterNewChatButtonTitle, } = spotterSidebarConfig || {};
22098
- const resolvedEnablePastConversationsSidebar = resolveEnablePastConversationsSidebar({
22099
- spotterSidebarConfigValue: sidebarEnablePastConversationsSidebar,
22100
- standaloneValue: this.viewConfig.enablePastConversationsSidebar,
22101
- });
23176
+ const { worksheetId, searchOptions, disableSourceSelection, hideSourceSelection, dataPanelV2, showSpotterLimitations, hideSampleQuestions, runtimeFilters, excludeRuntimeFiltersfromURL, runtimeParameters, excludeRuntimeParametersfromURL, updatedSpotterChatPrompt, spotterChatConfig, } = this.viewConfig;
22102
23177
  if (!worksheetId) {
22103
23178
  this.handleError({
22104
23179
  errorType: ErrorDetailsTypes.VALIDATION_ERROR,
@@ -22116,32 +23191,6 @@ class SpotterEmbed extends TsEmbed {
22116
23191
  setParamIfDefined(queryParams, Param.ShowSpotterLimitations, showSpotterLimitations, true);
22117
23192
  setParamIfDefined(queryParams, Param.HideSampleQuestions, hideSampleQuestions, true);
22118
23193
  setParamIfDefined(queryParams, Param.UpdatedSpotterChatPrompt, updatedSpotterChatPrompt, true);
22119
- setParamIfDefined(queryParams, Param.EnablePastConversationsSidebar, resolvedEnablePastConversationsSidebar, true);
22120
- setParamIfDefined(queryParams, Param.SpotterSidebarDefaultExpanded, spotterSidebarDefaultExpanded, true);
22121
- // String params
22122
- setParamIfDefined(queryParams, Param.SpotterSidebarTitle, spotterSidebarTitle);
22123
- setParamIfDefined(queryParams, Param.SpotterChatRenameLabel, spotterChatRenameLabel);
22124
- setParamIfDefined(queryParams, Param.SpotterChatDeleteLabel, spotterChatDeleteLabel);
22125
- setParamIfDefined(queryParams, Param.SpotterDeleteConversationModalTitle, spotterDeleteConversationModalTitle);
22126
- setParamIfDefined(queryParams, Param.SpotterPastConversationAlertMessage, spotterPastConversationAlertMessage);
22127
- setParamIfDefined(queryParams, Param.SpotterBestPracticesLabel, spotterBestPracticesLabel);
22128
- setParamIfDefined(queryParams, Param.SpotterConversationsBatchSize, spotterConversationsBatchSize);
22129
- setParamIfDefined(queryParams, Param.SpotterNewChatButtonTitle, spotterNewChatButtonTitle);
22130
- // URL param with validation
22131
- if (spotterDocumentationUrl !== undefined) {
22132
- const [isValid, validationError] = validateHttpUrl(spotterDocumentationUrl);
22133
- if (isValid) {
22134
- queryParams[Param.SpotterDocumentationUrl] = spotterDocumentationUrl;
22135
- }
22136
- else {
22137
- this.handleError({
22138
- errorType: ErrorDetailsTypes.VALIDATION_ERROR,
22139
- message: ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22140
- code: EmbedErrorCodes.INVALID_URL,
22141
- error: (validationError === null || validationError === void 0 ? void 0 : validationError.message) || ERROR_MESSAGE.INVALID_SPOTTER_DOCUMENTATION_URL,
22142
- });
22143
- }
22144
- }
22145
23194
  // Handle spotterChatConfig params
22146
23195
  if (spotterChatConfig) {
22147
23196
  const { hideToolResponseCardBranding, toolResponseCardBrandingLabel, } = spotterChatConfig;