@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
@@ -427,37 +427,49 @@ export interface CustomCssVariables {
427
427
  /**
428
428
  * Padding of the groups in the Liveboard.
429
429
  *
430
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
430
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
431
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
432
+ * this CSS variable.
431
433
  */
432
434
  "--ts-var-liveboard-group-padding"?: string;
433
435
  /**
434
436
  * Font size of the title of the groups in the Liveboard.
435
437
  *
436
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
438
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
439
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
440
+ * this CSS variable.
437
441
  */
438
442
  "--ts-var-liveboard-group-title-font-size"?: string;
439
443
  /**
440
444
  * Font weight of the title of the groups in the Liveboard.
441
445
  *
442
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
446
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
447
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
448
+ * this CSS variable.
443
449
  */
444
450
  "--ts-var-liveboard-group-title-font-weight"?: string;
445
451
  /**
446
452
  * Font size of the title of the tiles inside the groups in the Liveboard.
447
453
  *
448
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
454
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
455
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
456
+ * this CSS variable.
449
457
  */
450
458
  "--ts-var-liveboard-group-tile-title-font-size"?: string;
451
459
  /**
452
460
  * Font weight of the title of the tiles inside the groups in the Liveboard.
453
461
  *
454
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
462
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
463
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
464
+ * this CSS variable.
455
465
  */
456
466
  "--ts-var-liveboard-group-tile-title-font-weight"?: string;
457
467
  /**
458
468
  * Padding of the group tiles in the Liveboard.
459
469
  *
460
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
470
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
471
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
472
+ * this CSS variable.
461
473
  */
462
474
  "--ts-var-liveboard-group-tile-padding"?: string;
463
475
  /**
@@ -467,13 +479,17 @@ export interface CustomCssVariables {
467
479
  /**
468
480
  * Background color of the groups in the Liveboard.
469
481
  *
470
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
482
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
483
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
484
+ * this CSS variable.
471
485
  */
472
486
  "--ts-var-liveboard-group-background"?: string;
473
487
  /**
474
488
  * Border color of the groups in the Liveboard.
475
489
  *
476
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
490
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
491
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
492
+ * this CSS variable.
477
493
  */
478
494
  "--ts-var-liveboard-group-border-color"?: string;
479
495
  /**
@@ -487,55 +503,73 @@ export interface CustomCssVariables {
487
503
  /**
488
504
  * Font color of the title of the groups in the Liveboard.
489
505
  *
490
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
506
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
507
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
508
+ * this CSS variable.
491
509
  */
492
510
  "--ts-var-liveboard-group-title-font-color"?: string;
493
511
  /**
494
512
  * Font color of the description of the groups in the Liveboard.
495
513
  *
496
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
514
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
515
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
516
+ * this CSS variable.
497
517
  */
498
518
  "--ts-var-liveboard-group-description-font-color"?: string;
499
519
  /**
500
520
  * Font color of the title of the tiles inside the groups in the Liveboard.
501
521
  *
502
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
522
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
523
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
524
+ * this CSS variable.
503
525
  */
504
526
  "--ts-var-liveboard-group-tile-title-font-color"?: string;
505
527
  /**
506
528
  * Font color of the description of the tiles inside the groups in the Liveboard.
507
529
  *
508
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
530
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
531
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
532
+ * this CSS variable.
509
533
  */
510
534
  "--ts-var-liveboard-group-tile-description-font-color"?: string;
511
535
  /**
512
536
  * Background color of the tiles inside the groups in the Liveboard.
513
537
  *
514
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
538
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
539
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
540
+ * this CSS variable.
515
541
  */
516
542
  "--ts-var-liveboard-group-tile-background"?: string;
517
543
  /**
518
544
  * Background color of the filter chips in the Liveboard.
519
545
  *
520
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
546
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
547
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
548
+ * this CSS variable.
521
549
  */
522
550
  "--ts-var-liveboard-chip-background"?: string;
523
551
  /**
524
552
  * Font color of the filter chips in the Liveboard.
525
553
  *
526
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
554
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
555
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
556
+ * this CSS variable.
527
557
  */
528
558
  "--ts-var-liveboard-chip-color"?: string;
529
559
  /**
530
560
  * Background color of the filter chips in the Liveboard on hover.
531
561
  *
532
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
562
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
563
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
564
+ * this CSS variable.
533
565
  */
534
566
  "--ts-var-liveboard-chip--hover-background"?: string;
535
567
  /**
536
568
  * Background color of the filter chips in the Liveboard on active.
537
569
  *
538
- * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying this CSS variable.
570
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
571
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
572
+ * this CSS variable.
539
573
  */
540
574
  "--ts-var-liveboard-chip--active-background"?: string;
541
575
  /**
@@ -750,6 +784,42 @@ export interface CustomCssVariables {
750
784
  * Color for section title text (e.g., "Recent", "Older") in the saved chats sidebar.
751
785
  */
752
786
  "--ts-var-saved-chats-section-title-color"?: string;
787
+ /**
788
+ * Text color of the styling panel in the Liveboard.
789
+ */
790
+ "--ts-var-liveboard-styling-panel-text-color"?: string;
791
+ /**
792
+ * Border color of the styling panel in the Liveboard.
793
+ */
794
+ "--ts-var-liveboard-styling-panel-border-color"?: string;
795
+ /**
796
+ * Background color of the styling button in the Liveboard.
797
+ */
798
+ "--ts-var-liveboard-styling-button-background"?: string;
799
+ /**
800
+ * Text color of the styling button in the Liveboard.
801
+ */
802
+ "--ts-var-liveboard-styling-button-text-color"?: string;
803
+ /**
804
+ * Background color of the styling button in the Liveboard on hover.
805
+ */
806
+ "--ts-var-liveboard-styling-button-hover-background"?: string;
807
+ /**
808
+ * Background color of the styling button in the Liveboard when active.
809
+ */
810
+ "--ts-var-liveboard-styling-button-active-background"?: string;
811
+ /**
812
+ * Text color of the styling button in the Liveboard on hover.
813
+ */
814
+ "--ts-var-liveboard-styling-button-hover-text-color"?: string;
815
+ /**
816
+ * Box shadow of the styling button in the Liveboard.
817
+ */
818
+ "--ts-var-liveboard-styling-button-shadow"?: string;
819
+ /**
820
+ * Background color of the color palette in the Liveboard styling panel.
821
+ */
822
+ "--ts-var-liveboard-styling-color-palette-background"?: string;
753
823
  }
754
824
  export interface SessionInterface {
755
825
  sessionId: string;
@@ -773,9 +843,11 @@ export interface UnderlyingDataPoint {
773
843
  * You can use this service to:
774
844
  *
775
845
  * - Add or remove columns from Answers (`addColumns`, `removeColumns`,
776
- * `addColumnsByName`) - Apply filters to Answers (`addFilter`)
846
+ * `addColumnsByName`)
847
+ * - Apply filters to Answers (`addFilter`)
777
848
  * - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`,
778
- * `fetchCSVBlob`, `fetchPNGBlob`) - Get data for specific points in visualizations
849
+ * `fetchCSVBlob`, `fetchPNGBlob`)
850
+ * - Get data for specific points in visualizations
779
851
  * (`getUnderlyingDataForPoint`)
780
852
  * - Run custom queries (`executeQuery`)
781
853
  * - Add visualizations to Liveboards (`addDisplayedVizToLiveboard`)
@@ -3594,6 +3666,17 @@ export enum EmbedEvent {
3594
3666
  * ```
3595
3667
  */
3596
3668
  DownloadAsXlsx = "downloadAsXlsx",
3669
+ /**
3670
+ * Emitted when the Download Liveboard as Continuous PDF action is triggered
3671
+ * on a Liveboard.
3672
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3673
+ * @example
3674
+ * ```js
3675
+ * liveboardEmbed.on(EmbedEvent.DownloadLiveboardAsContinuousPDF, payload => {
3676
+ * console.log('download liveboard as continuous PDF', payload)})
3677
+ * ```
3678
+ */
3679
+ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
3597
3680
  /**
3598
3681
  * Emitted when an Answer is deleted in the app
3599
3682
  * Use start:true to subscribe to when delete is initiated, or end:true to subscribe
@@ -3997,22 +4080,45 @@ export enum EmbedEvent {
3997
4080
  /**
3998
4081
  * Emitted when name, status (private or public) or filter values of a
3999
4082
  * Personalised view is updated.
4083
+ * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
4000
4084
  * @returns viewName: string
4001
4085
  * @returns viewId: string
4002
4086
  * @returns liveboardId: string
4003
4087
  * @returns isPublic: boolean
4004
4088
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
4089
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4005
4090
  */
4006
4091
  UpdatePersonalisedView = "updatePersonalisedView",
4092
+ /**
4093
+ * Emitted when name, status (private or public) or filter values of a
4094
+ * Personalized view is updated.
4095
+ * @returns viewName: string
4096
+ * @returns viewId: string
4097
+ * @returns liveboardId: string
4098
+ * @returns isPublic: boolean
4099
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4100
+ */
4101
+ UpdatePersonalizedView = "updatePersonalisedView",
4007
4102
  /**
4008
4103
  * Emitted when a Personalised view is saved.
4104
+ * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
4009
4105
  * @returns viewName: string
4010
4106
  * @returns viewId: string
4011
4107
  * @returns liveboardId: string
4012
4108
  * @returns isPublic: boolean
4013
4109
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
4110
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4014
4111
  */
4015
4112
  SavePersonalisedView = "savePersonalisedView",
4113
+ /**
4114
+ * Emitted when a Personalized view is saved.
4115
+ * @returns viewName: string
4116
+ * @returns viewId: string
4117
+ * @returns liveboardId: string
4118
+ * @returns isPublic: boolean
4119
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4120
+ */
4121
+ SavePersonalizedView = "savePersonalisedView",
4016
4122
  /**
4017
4123
  * Emitted when a Liveboard is reset.
4018
4124
  * @returns viewName: string
@@ -4024,11 +4130,41 @@ export enum EmbedEvent {
4024
4130
  ResetLiveboard = "resetLiveboard",
4025
4131
  /**
4026
4132
  * Emitted when a PersonalisedView is deleted.
4133
+ * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
4027
4134
  * @returns views: string[]
4028
4135
  * @returns liveboardId: string
4029
4136
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
4137
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4030
4138
  */
4031
4139
  DeletePersonalisedView = "deletePersonalisedView",
4140
+ /**
4141
+ * Emitted when a PersonalizedView is deleted.
4142
+ * @returns views: string[]
4143
+ * @returns liveboardId: string
4144
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4145
+ */
4146
+ DeletePersonalizedView = "deletePersonalisedView",
4147
+ /**
4148
+ * Emitted when a user selects a different Personalized View or
4149
+ * resets to the original/default view on a Liveboard.
4150
+ * @example
4151
+ * ```js
4152
+ * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
4153
+ * console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
4154
+ * console.log(data.viewId); // '2a021a12-...' or null (default)
4155
+ * console.log(data.liveboardId); // 'abc123...'
4156
+ * console.log(data.isPublic); // true | false
4157
+ * })
4158
+ * ```
4159
+ * @returns viewName: string - Name of the selected view,
4160
+ * or 'Original View' when reset to default.
4161
+ * @returns viewId: string | null - GUID of the selected view,
4162
+ * or null when reset to default.
4163
+ * @returns liveboardId: string
4164
+ * @returns isPublic: boolean
4165
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4166
+ */
4167
+ ChangePersonalizedView = "changePersonalisedView",
4032
4168
  /**
4033
4169
  * Emitted when a user creates a Worksheet.
4034
4170
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -4062,7 +4198,8 @@ export enum EmbedEvent {
4062
4198
  * @param - Includes the following parameters:
4063
4199
  * - `payload`: The payload received from the embed related to the Data API call.
4064
4200
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
4065
- * will run or block the search operation, and if blocked, which error message to provide.
4201
+ * will run or block the search operation, and if blocked, which error message to
4202
+ * provide.
4066
4203
  * - `execute` - When `execute` returns `true`, the search is run.
4067
4204
  * When `execute` returns `false`, the search is not executed.
4068
4205
  * - `error` - Developers can customize the user-facing error message when `execute`
@@ -4496,6 +4633,25 @@ export enum EmbedEvent {
4496
4633
  * );
4497
4634
  * }
4498
4635
  * ```
4636
+ *
4637
+ * **Context Parameter (SDK: 1.45.2+)**
4638
+ *
4639
+ * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
4640
+ * `ContextType` as the third parameter to the `trigger` method to specify the context
4641
+ * from which the event is triggered. This helps ThoughtSpot understand the current page
4642
+ * context (Search, Answer, Liveboard, or Spotter) for better event handling.
4643
+ *
4644
+ * @example
4645
+ * ```js
4646
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
4647
+ *
4648
+ * // Trigger Pin event with Search context
4649
+ * appEmbed.trigger(HostEvent.Pin, {
4650
+ * vizId: "123",
4651
+ * liveboardId: "456"
4652
+ * }, ContextType.Search);
4653
+ * ```
4654
+ *
4499
4655
  * @group Events
4500
4656
  */
4501
4657
  export enum HostEvent {
@@ -4517,6 +4673,16 @@ export enum HostEvent {
4517
4673
  execute: true
4518
4674
  });
4519
4675
  * ```
4676
+ * @example
4677
+ * ```js
4678
+ * // Trigger search from search context
4679
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4680
+ * appEmbed.trigger(HostEvent.Search, {
4681
+ * searchQuery: "[revenue] by [region]",
4682
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
4683
+ * execute: true
4684
+ * }, ContextType.Search);
4685
+ * ```
4520
4686
  */
4521
4687
  Search = "search",
4522
4688
  /**
@@ -4567,6 +4733,24 @@ export enum HostEvent {
4567
4733
  * });
4568
4734
  * })
4569
4735
  * ```
4736
+ * @example
4737
+ * ```js
4738
+ * // Drill down from answer context
4739
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4740
+ * appEmbed.trigger(HostEvent.DrillDown, {
4741
+ * points: { clickedPoint, selectedPoints },
4742
+ * autoDrillDown: true
4743
+ * }, ContextType.Answer);
4744
+ * ```
4745
+ * @example
4746
+ * ```js
4747
+ * // Drill down from search context
4748
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4749
+ * searchEmbed.trigger(HostEvent.DrillDown, {
4750
+ * points: { clickedPoint, selectedPoints },
4751
+ * columnGuid: "column-guid"
4752
+ * }, ContextType.Search);
4753
+ * ```
4570
4754
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
4571
4755
  */
4572
4756
  DrillDown = "triggerDrillDown",
@@ -4587,6 +4771,13 @@ export enum HostEvent {
4587
4771
  * const url = embed.trigger(HostEvent.GetIframeUrl);
4588
4772
  * console.log("iFrameURL",url);
4589
4773
  * ```
4774
+ * @example
4775
+ * ```js
4776
+ * // Get iframe URL from specific context
4777
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4778
+ * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
4779
+ * console.log("iFrameURL", url);
4780
+ * ```
4590
4781
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
4591
4782
  */
4592
4783
  GetIframeUrl = "GetIframeUrl",
@@ -4600,6 +4791,15 @@ export enum HostEvent {
4600
4791
  * '730496d6-6903-4601-937e-2c691821af3c',
4601
4792
  * 'd547ec54-2a37-4516-a222-2b06719af726'])
4602
4793
  * ```
4794
+ * @example
4795
+ * ```js
4796
+ * // Set visible vizs from liveboard context
4797
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4798
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
4799
+ * '730496d6-6903-4601-937e-2c691821af3c',
4800
+ * 'd547ec54-2a37-4516-a222-2b06719af726'
4801
+ * ], ContextType.Liveboard);
4802
+ * ```
4603
4803
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
4604
4804
  */
4605
4805
  SetVisibleVizs = "SetPinboardVisibleVizs",
@@ -4612,6 +4812,14 @@ export enum HostEvent {
4612
4812
  * tabId:'730496d6-6903-4601-937e-2c691821af3c'
4613
4813
  * })
4614
4814
  * ```
4815
+ * @example
4816
+ * ```js
4817
+ * // Set active tab from liveboard context
4818
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4819
+ * liveboardEmbed.trigger(HostEvent.SetActiveTab, {
4820
+ * tabId: '730496d6-6903-4601-937e-2c691821af3c'
4821
+ * }, ContextType.Liveboard);
4822
+ * ```
4615
4823
  * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
4616
4824
  */
4617
4825
  SetActiveTab = "SetActiveTab",
@@ -4645,6 +4853,15 @@ export enum HostEvent {
4645
4853
  * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
4646
4854
  * ])
4647
4855
  * ```
4856
+ * @example
4857
+ * ```js
4858
+ * // Update runtime filters from liveboard context
4859
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4860
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
4861
+ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
4862
+ * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
4863
+ * ], ContextType.Liveboard);
4864
+ * ```
4648
4865
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
4649
4866
  * @important
4650
4867
  */
@@ -4678,6 +4895,14 @@ export enum HostEvent {
4678
4895
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
4679
4896
  * { column: {columnId: '<column-GUID>'}})
4680
4897
  * ```
4898
+ * @example
4899
+ * ```js
4900
+ * // Open filter from search context
4901
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4902
+ * searchEmbed.trigger(HostEvent.OpenFilter, {
4903
+ * column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
4904
+ * }, ContextType.Search);
4905
+ * ```
4681
4906
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4682
4907
  */
4683
4908
  OpenFilter = "openFilter",
@@ -4688,6 +4913,14 @@ export enum HostEvent {
4688
4913
  * ```js
4689
4914
  * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
4690
4915
  * ```
4916
+ * @example
4917
+ * ```js
4918
+ * // Add columns from search context
4919
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4920
+ * searchEmbed.trigger(HostEvent.AddColumns, {
4921
+ * columnIds: ['col-guid-1', 'col-guid-2']
4922
+ * }, ContextType.Search);
4923
+ * ```
4691
4924
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4692
4925
  */
4693
4926
  AddColumns = "addColumns",
@@ -4698,6 +4931,14 @@ export enum HostEvent {
4698
4931
  * ```js
4699
4932
  * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
4700
4933
  * ```
4934
+ * @example
4935
+ * ```js
4936
+ * // Remove column from search context
4937
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4938
+ * searchEmbed.trigger(HostEvent.RemoveColumn, {
4939
+ * columnId: 'column-guid'
4940
+ * }, ContextType.Search);
4941
+ * ```
4701
4942
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4702
4943
  */
4703
4944
  RemoveColumn = "removeColumn",
@@ -4784,6 +5025,37 @@ export enum HostEvent {
4784
5025
  *
4785
5026
  * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
4786
5027
  * ```
5028
+ * @example
5029
+ * ```js
5030
+ * // Using context parameter to specify the context type (SDK: 1.45.2+)
5031
+ * // Pin from a search answer context
5032
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5033
+ * appEmbed.trigger(HostEvent.Pin, {
5034
+ * vizId: "123",
5035
+ * newVizName: "Sales by region",
5036
+ * liveboardId: "456"
5037
+ * }, ContextType.Search);
5038
+ * ```
5039
+ * @example
5040
+ * ```js
5041
+ * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
5042
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5043
+ * appEmbed.trigger(HostEvent.Pin, {
5044
+ * vizId: "789",
5045
+ * newVizName: "Revenue trends",
5046
+ * liveboardId: "456"
5047
+ * }, ContextType.Answer);
5048
+ * ```
5049
+ * @example
5050
+ * ```js
5051
+ * // Pin from a spotter context (SDK: 1.45.2+)
5052
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5053
+ * appEmbed.trigger(HostEvent.Pin, {
5054
+ * vizId: latestSpotterVizId,
5055
+ * newVizName: "AI-generated insights",
5056
+ * liveboardId: "456"
5057
+ * }, ContextType.Spotter);
5058
+ * ```
4787
5059
  *
4788
5060
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4789
5061
  */
@@ -4794,6 +5066,12 @@ export enum HostEvent {
4794
5066
  * @example
4795
5067
  * ```js
4796
5068
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
5069
+ *```
5070
+ * @example
5071
+ * ```js
5072
+ * // Show liveboard info from liveboard context
5073
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5074
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
4797
5075
  * ```
4798
5076
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4799
5077
  */
@@ -4804,6 +5082,12 @@ export enum HostEvent {
4804
5082
  * ```js
4805
5083
  * liveboardEmbed.trigger(HostEvent.Schedule)
4806
5084
  * ```
5085
+ * @example
5086
+ * ```js
5087
+ * // Schedule from liveboard context
5088
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5089
+ * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
5090
+ * ```
4807
5091
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4808
5092
  */
4809
5093
  Schedule = "subscription",
@@ -4813,6 +5097,12 @@ export enum HostEvent {
4813
5097
  * ```js
4814
5098
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
4815
5099
  * ```
5100
+ * @example
5101
+ * ```js
5102
+ * // Manage schedules from liveboard context
5103
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5104
+ * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
5105
+ * ```
4816
5106
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4817
5107
  */
4818
5108
  SchedulesList = "schedule-list",
@@ -4823,6 +5113,18 @@ export enum HostEvent {
4823
5113
  * ```js
4824
5114
  * liveboardEmbed.trigger(HostEvent.ExportTML)
4825
5115
  * ```
5116
+ * @example
5117
+ * ```js
5118
+ * // Export TML from liveboard context
5119
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5120
+ * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
5121
+ * ```
5122
+ * @example
5123
+ * ```js
5124
+ * // Export TML from search-answer context
5125
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5126
+ * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
5127
+ * ```
4826
5128
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4827
5129
  */
4828
5130
  ExportTML = "exportTSL",
@@ -4833,6 +5135,18 @@ export enum HostEvent {
4833
5135
  * ```js
4834
5136
  * liveboardEmbed.trigger(HostEvent.EditTML)
4835
5137
  * ```
5138
+ * @example
5139
+ * ```js
5140
+ * // Edit TML from liveboard context
5141
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5142
+ * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
5143
+ * ```
5144
+ * @example
5145
+ * ```js
5146
+ * // Edit TML from search-answer context
5147
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5148
+ * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
5149
+ * ```
4836
5150
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4837
5151
  */
4838
5152
  EditTML = "editTSL",
@@ -4842,6 +5156,12 @@ export enum HostEvent {
4842
5156
  * ```js
4843
5157
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
4844
5158
  * ```
5159
+ * @example
5160
+ * ```js
5161
+ * // Update TML from liveboard context
5162
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5163
+ * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
5164
+ * ```
4845
5165
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4846
5166
  */
4847
5167
  UpdateTML = "updateTSL",
@@ -4868,10 +5188,34 @@ export enum HostEvent {
4868
5188
  *
4869
5189
  * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
4870
5190
  * ```
5191
+ * @example
5192
+ * ```js
5193
+ * // Download as PDF from search-answer context
5194
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5195
+ * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
5196
+ * ```
5197
+ * @example
5198
+ * ```js
5199
+ * // Download as PDF from liveboard context
5200
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5201
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
5202
+ * ```
4871
5203
  *
4872
5204
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4873
5205
  */
4874
5206
  DownloadAsPdf = "downloadAsPdf",
5207
+ /**
5208
+ * Trigger the **Download Liveboard as Continuous PDF** action on an
5209
+ * embedded Liveboard.
5210
+ *
5211
+ * @example
5212
+ * ```js
5213
+ * liveboardEmbed.trigger(HostEvent.DownloadLiveboardAsContinuousPDF)
5214
+ * ```
5215
+ *
5216
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5217
+ */
5218
+ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
4875
5219
  /**
4876
5220
  * Trigger the **AI Highlights** action on an embedded Liveboard
4877
5221
  *
@@ -4912,6 +5256,18 @@ export enum HostEvent {
4912
5256
  *
4913
5257
  * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
4914
5258
  * ```
5259
+ * @example
5260
+ * ```js
5261
+ * // Make a copy from answer context
5262
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5263
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
5264
+ * ```
5265
+ * @example
5266
+ * ```js
5267
+ * // Make a copy from search context
5268
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5269
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
5270
+ * ```
4915
5271
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4916
5272
  */
4917
5273
  MakeACopy = "makeACopy",
@@ -4936,6 +5292,14 @@ export enum HostEvent {
4936
5292
  * ```js
4937
5293
  * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
4938
5294
  * ```
5295
+ * @example
5296
+ * ```js
5297
+ * // Explore from liveboard context
5298
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5299
+ * liveboardEmbed.trigger(HostEvent.Explore, {
5300
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5301
+ * }, ContextType.Liveboard);
5302
+ * ```
4939
5303
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4940
5304
  */
4941
5305
  Explore = "explore",
@@ -4953,6 +5317,20 @@ export enum HostEvent {
4953
5317
  * ```js
4954
5318
  * searchEmbed.trigger(HostEvent.CreateMonitor)
4955
5319
  * ```
5320
+ * @example
5321
+ * ```js
5322
+ * // Create monitor from answer context
5323
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5324
+ * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
5325
+ * ```
5326
+ * @example
5327
+ * ```js
5328
+ * // Create monitor from liveboard context
5329
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5330
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor, {
5331
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5332
+ * }, ContextType.Liveboard);
5333
+ * ```
4956
5334
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4957
5335
  */
4958
5336
  CreateMonitor = "createMonitor",
@@ -4974,6 +5352,20 @@ export enum HostEvent {
4974
5352
  * ```js
4975
5353
  * vizEmbed.trigger(HostEvent.ManageMonitor)
4976
5354
  * ```
5355
+ * @example
5356
+ * ```js
5357
+ * // Manage monitor from answer context
5358
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5359
+ * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
5360
+ * ```
5361
+ * @example
5362
+ * ```js
5363
+ * // Manage monitor from liveboard context
5364
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5365
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
5366
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5367
+ * }, ContextType.Liveboard);
5368
+ * ```
4977
5369
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4978
5370
  */
4979
5371
  ManageMonitor = "manageMonitor",
@@ -4999,6 +5391,26 @@ export enum HostEvent {
4999
5391
  * ```js
5000
5392
  * spotterEmbed.trigger(HostEvent.Edit);
5001
5393
  * ```
5394
+ * @example
5395
+ * ```js
5396
+ * // Using context parameter to edit liveboard context
5397
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5398
+ * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
5399
+ * ```
5400
+ * @example
5401
+ * ```js
5402
+ * // Edit from search context
5403
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5404
+ * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
5405
+ * ```
5406
+ * * @example
5407
+ * ```js
5408
+ * // Edit from spotter context
5409
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5410
+ * appEmbed.trigger(HostEvent.Edit, {
5411
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5412
+ * }, ContextType.Spotter);
5413
+ * ```
5002
5414
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5003
5415
  */
5004
5416
  Edit = "edit",
@@ -5016,6 +5428,34 @@ export enum HostEvent {
5016
5428
  * ```js
5017
5429
  * vizEmbed.trigger(HostEvent.CopyLink)
5018
5430
  * ```
5431
+ * @example
5432
+ * ```js
5433
+ * // Copy link from liveboard context
5434
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5435
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
5436
+ * ```
5437
+ * @example
5438
+ * ```js
5439
+ * // Copy link from liveboard visualization context
5440
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5441
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
5442
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5443
+ * }, ContextType.Liveboard);
5444
+ * ```
5445
+ * @example
5446
+ * ```js
5447
+ * // Copy link from liveboard context
5448
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5449
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
5450
+ * ```
5451
+ * @example
5452
+ * ```js
5453
+ * // Copy link from liveboard visualization context
5454
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5455
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
5456
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5457
+ * }, ContextType.Liveboard);
5458
+ * ```
5019
5459
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5020
5460
  */
5021
5461
  CopyLink = "embedDocument",
@@ -5033,6 +5473,34 @@ export enum HostEvent {
5033
5473
  * ```js
5034
5474
  * vizEmbed.trigger(HostEvent.Present)
5035
5475
  * ```
5476
+ * @example
5477
+ * ```js
5478
+ * // Present from liveboard visualization context
5479
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5480
+ * liveboardEmbed.trigger(HostEvent.Present, {
5481
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5482
+ * }, ContextType.Liveboard);
5483
+ * ```
5484
+ * @example
5485
+ * ```js
5486
+ * // Present from liveboard context
5487
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5488
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
5489
+ * ```
5490
+ * @example
5491
+ * ```js
5492
+ * // Present from liveboard visualization context
5493
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5494
+ * liveboardEmbed.trigger(HostEvent.Present, {
5495
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5496
+ * }, ContextType.Liveboard);
5497
+ * ```
5498
+ * @example
5499
+ * ```js
5500
+ * // Present from liveboard context
5501
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5502
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
5503
+ * ```
5036
5504
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
5037
5505
  */
5038
5506
  Present = "present",
@@ -5061,6 +5529,22 @@ export enum HostEvent {
5061
5529
  * tml.answer.search_query // TML representation of the search query
5062
5530
  * );
5063
5531
  * })
5532
+ * ```
5533
+ * @example
5534
+ * ```js
5535
+ * // Get TML from search context
5536
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5537
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
5538
+ * console.log(tml.answer.search_query);
5539
+ * });
5540
+ * ```
5541
+ * @example
5542
+ * ```js
5543
+ * // Get TML from search-answer context
5544
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5545
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
5546
+ * console.log(tml.answer);
5547
+ * });
5064
5548
  * ```
5065
5549
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
5066
5550
  * @important
@@ -5082,6 +5566,20 @@ export enum HostEvent {
5082
5566
  * ```js
5083
5567
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
5084
5568
  * ```
5569
+ * @example
5570
+ * ```js
5571
+ * // Show underlying data from liveboard visualization context
5572
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5573
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {
5574
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5575
+ * }, ContextType.Liveboard);
5576
+ * ```
5577
+ * @example
5578
+ * ```js
5579
+ * // Show underlying data from search context
5580
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5581
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
5582
+ * ```
5085
5583
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5086
5584
  */
5087
5585
  ShowUnderlyingData = "showUnderlyingData",
@@ -5099,6 +5597,18 @@ export enum HostEvent {
5099
5597
  * ```js
5100
5598
  * searchEmbed.trigger(HostEvent.Delete)
5101
5599
  * ```
5600
+ * @example
5601
+ * ```js
5602
+ * // Delete from liveboard context
5603
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5604
+ * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
5605
+ * ```
5606
+ * @example
5607
+ * ```js
5608
+ * // Delete from search context
5609
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5610
+ * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
5611
+ * ```
5102
5612
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5103
5613
  */
5104
5614
  Delete = "onDeleteAnswer",
@@ -5119,6 +5629,20 @@ export enum HostEvent {
5119
5629
  * ```js
5120
5630
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
5121
5631
  * ```
5632
+ * @example
5633
+ * ```js
5634
+ * // SpotIQ analyze from search-answer context
5635
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5636
+ * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
5637
+ * ```
5638
+ * @example
5639
+ * ```js
5640
+ * // SpotIQ analyze from search context
5641
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5642
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
5643
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5644
+ * }, ContextType.Liveboard);
5645
+ * ```
5122
5646
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5123
5647
  */
5124
5648
  SpotIQAnalyze = "spotIQAnalyze",
@@ -5170,6 +5694,12 @@ export enum HostEvent {
5170
5694
  *
5171
5695
  * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
5172
5696
  * ```
5697
+ * @example
5698
+ * ```js
5699
+ * // Download as PNG from search-answer context
5700
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5701
+ * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
5702
+ * ```
5173
5703
  *
5174
5704
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
5175
5705
  */
@@ -5198,6 +5728,18 @@ export enum HostEvent {
5198
5728
  *
5199
5729
  * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
5200
5730
  * ```
5731
+ * @example
5732
+ * ```js
5733
+ * // Download as CSV from search-answer context
5734
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5735
+ * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
5736
+ * ```
5737
+ * @example
5738
+ * ```js
5739
+ * // Download as CSV from search context
5740
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5741
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
5742
+ * ```
5201
5743
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5202
5744
  */
5203
5745
  DownloadAsCsv = "downloadAsCSV",
@@ -5225,6 +5767,18 @@ export enum HostEvent {
5225
5767
  *
5226
5768
  * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
5227
5769
  * ```
5770
+ * @example
5771
+ * ```js
5772
+ * // Download as XLSX from answer context
5773
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5774
+ * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
5775
+ * ```
5776
+ * @example
5777
+ * ```js
5778
+ * // Download as XLSX from search context
5779
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5780
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
5781
+ * ```
5228
5782
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5229
5783
  */
5230
5784
  DownloadAsXlsx = "downloadAsXLSX",
@@ -5238,6 +5792,18 @@ export enum HostEvent {
5238
5792
  * ```js
5239
5793
  * searchEmbed.trigger(HostEvent.Share)
5240
5794
  * ```
5795
+ * @example
5796
+ * ```js
5797
+ * // Share from Liveboard context
5798
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5799
+ * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
5800
+ * ```
5801
+ * @example
5802
+ * ```js
5803
+ * // Share from search-answer context
5804
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5805
+ * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
5806
+ * ```
5241
5807
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5242
5808
  */
5243
5809
  Share = "share",
@@ -5277,6 +5843,18 @@ export enum HostEvent {
5277
5843
  *
5278
5844
  * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
5279
5845
  * ```
5846
+ * @example
5847
+ * ```js
5848
+ * // Save from answer context
5849
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5850
+ * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
5851
+ * ```
5852
+ * @example
5853
+ * ```js
5854
+ * // Save from search context
5855
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5856
+ * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
5857
+ * ```
5280
5858
  *
5281
5859
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5282
5860
  */
@@ -5293,6 +5871,20 @@ export enum HostEvent {
5293
5871
  * ```js
5294
5872
  * vizEmbed.trigger(HostEvent.SyncToSheets)
5295
5873
  * ```
5874
+ * @example
5875
+ * ```js
5876
+ * // Sync to sheets from answer context
5877
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5878
+ * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
5879
+ * ```
5880
+ * @example
5881
+ * ```js
5882
+ * // Sync to sheets from liveboard context
5883
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5884
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {
5885
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5886
+ * }, ContextType.Liveboard);
5887
+ * ```
5296
5888
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5297
5889
  */
5298
5890
  SyncToSheets = "sync-to-sheets",
@@ -5303,11 +5895,25 @@ export enum HostEvent {
5303
5895
  * @param - an object with vizId as a key
5304
5896
  * @example
5305
5897
  * ```js
5306
- * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
5307
- * '730496d6-6903-4601-937e-2c691821af3c'})
5898
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
5899
+ * '730496d6-6903-4601-937e-2c691821af3c'})
5900
+ * ```
5901
+ * ```js
5902
+ * vizEmbed.trigger(HostEvent.SyncToOtherApps)
5903
+ * ```
5904
+ * @example
5905
+ * ```js
5906
+ * // Sync to other apps from answer context
5907
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5908
+ * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
5308
5909
  * ```
5910
+ * @example
5309
5911
  * ```js
5310
- * vizEmbed.trigger(HostEvent.SyncToOtherApps)
5912
+ * // Sync to other apps from liveboard context
5913
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5914
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
5915
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5916
+ * }, ContextType.Liveboard);
5311
5917
  * ```
5312
5918
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5313
5919
  */
@@ -5325,6 +5931,20 @@ export enum HostEvent {
5325
5931
  * ```js
5326
5932
  * vizEmbed.trigger(HostEvent.ManagePipelines)
5327
5933
  * ```
5934
+ * @example
5935
+ * ```js
5936
+ * // Manage pipelines from answer context
5937
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5938
+ * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
5939
+ * ```
5940
+ * @example
5941
+ * ```js
5942
+ * // Manage pipelines from liveboard context
5943
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5944
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {
5945
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5946
+ * }, ContextType.Liveboard);
5947
+ * ```
5328
5948
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5329
5949
  */
5330
5950
  ManagePipelines = "manage-pipeline",
@@ -5337,6 +5957,12 @@ export enum HostEvent {
5337
5957
  * ```js
5338
5958
  * appEmbed.trigger(HostEvent.ResetSearch)
5339
5959
  * ```
5960
+ * @example
5961
+ * ```js
5962
+ * // Reset search from search context
5963
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5964
+ * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
5965
+ * ```
5340
5966
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
5341
5967
  */
5342
5968
  ResetSearch = "resetSearch",
@@ -5348,6 +5974,13 @@ export enum HostEvent {
5348
5974
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
5349
5975
  * console.log('data', data);
5350
5976
  * ```
5977
+ * @example
5978
+ * ```js
5979
+ * // Get filters from liveboard context
5980
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5981
+ * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
5982
+ * console.log('filters', data);
5983
+ * ```
5351
5984
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5352
5985
  */
5353
5986
  GetFilters = "getFilters",
@@ -5355,7 +5988,8 @@ export enum HostEvent {
5355
5988
  * Update one or several filters applied on a Liveboard.
5356
5989
  * @param - Includes the following keys:
5357
5990
  * - `filter`: A single filter object containing column name, filter operator, and
5358
- * values. - `filters`: Multiple filter objects with column name, filter operator,
5991
+ * values.
5992
+ * - `filters`: Multiple filter objects with column name, filter operator,
5359
5993
  * and values for each.
5360
5994
  *
5361
5995
  * Each filter object must include the following attributes:
@@ -5438,6 +6072,18 @@ export enum HostEvent {
5438
6072
  * }]
5439
6073
  * });
5440
6074
  * ```
6075
+ * @example
6076
+ * ```js
6077
+ * // Update filters from liveboard context
6078
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6079
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
6080
+ * filter: {
6081
+ * column: "item type",
6082
+ * oper: "IN",
6083
+ * values: ["shoes", "boots"]
6084
+ * }
6085
+ * }, ContextType.Liveboard);
6086
+ * ```
5441
6087
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5442
6088
  */
5443
6089
  UpdateFilters = "updateFilters",
@@ -5451,6 +6097,14 @@ export enum HostEvent {
5451
6097
  * );
5452
6098
  * })
5453
6099
  * ```
6100
+ * @example
6101
+ * ```js
6102
+ * // Get tabs from liveboard context
6103
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6104
+ * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
6105
+ * console.log('tabs', tabDetails);
6106
+ * });
6107
+ * ```
5454
6108
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
5455
6109
  */
5456
6110
  GetTabs = "getTabs",
@@ -5464,6 +6118,15 @@ export enum HostEvent {
5464
6118
  * '430496d6-6903-4601-937e-2c691821af3c',
5465
6119
  * 'f547ec54-2a37-4516-a222-2b06719af726'])
5466
6120
  * ```
6121
+ * @example
6122
+ * ```js
6123
+ * // Set visible tabs from liveboard context
6124
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6125
+ * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
6126
+ * '430496d6-6903-4601-937e-2c691821af3c',
6127
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
6128
+ * ], ContextType.Liveboard);
6129
+ * ```
5467
6130
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
5468
6131
  */
5469
6132
  SetVisibleTabs = "SetPinboardVisibleTabs",
@@ -5477,6 +6140,15 @@ export enum HostEvent {
5477
6140
  * '630496d6-6903-4601-937e-2c691821af3c',
5478
6141
  * 'i547ec54-2a37-4516-a222-2b06719af726'])
5479
6142
  * ```
6143
+ * @example
6144
+ * ```js
6145
+ * // Set hidden tabs from liveboard context
6146
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6147
+ * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
6148
+ * '630496d6-6903-4601-937e-2c691821af3c',
6149
+ * 'i547ec54-2a37-4516-a222-2b06719af726'
6150
+ * ], ContextType.Liveboard);
6151
+ * ```
5480
6152
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
5481
6153
  */
5482
6154
  SetHiddenTabs = "SetPinboardHiddenTabs",
@@ -5553,13 +6225,24 @@ export enum HostEvent {
5553
6225
  UpdateCrossFilter = "UpdateCrossFilter",
5554
6226
  /**
5555
6227
  * Trigger reset action for a personalized Liveboard view.
6228
+ * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
5556
6229
  * @example
5557
6230
  * ```js
5558
6231
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
5559
6232
  * ```
5560
6233
  * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
6234
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5561
6235
  */
5562
6236
  ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
6237
+ /**
6238
+ * Trigger reset action for a personalized Liveboard view.
6239
+ * @example
6240
+ * ```js
6241
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
6242
+ * ```
6243
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6244
+ */
6245
+ ResetLiveboardPersonalizedView = "ResetLiveboardPersonalisedView",
5563
6246
  /**
5564
6247
  * Triggers an action to update Parameter values on embedded
5565
6248
  * Answers, Liveboard, and Spotter answer in Edit mode.
@@ -5576,6 +6259,16 @@ export enum HostEvent {
5576
6259
  * isVisibleToUser: false
5577
6260
  * }])
5578
6261
  * ```
6262
+ * @example
6263
+ * ```js
6264
+ * // Update parameters from liveboard context
6265
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6266
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
6267
+ * name: "Region Param",
6268
+ * value: "West",
6269
+ * isVisibleToUser: true
6270
+ * }], ContextType.Liveboard);
6271
+ * ```
5579
6272
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
5580
6273
  */
5581
6274
  UpdateParameters = "UpdateParameters",
@@ -5595,18 +6288,77 @@ export enum HostEvent {
5595
6288
  * });
5596
6289
  *
5597
6290
  * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
6291
+ *```
6292
+ * @example
6293
+ * ```js
6294
+ * // Get parameters from liveboard context
6295
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6296
+ * liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
6297
+ * console.log('parameters', parameters);
6298
+ * });
5598
6299
  * ```
5599
6300
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
5600
6301
  */
5601
6302
  GetParameters = "GetParameters",
5602
6303
  /**
5603
6304
  * Triggers an event to update a personalized view of a Liveboard.
6305
+ * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
5604
6306
  * ```js
5605
6307
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
5606
6308
  * ```
6309
+ * @example
6310
+ * ```js
6311
+ * // Update personalized view from liveboard context
6312
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6313
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
6314
+ * viewId: '1234'
6315
+ * }, ContextType.Liveboard);
6316
+ * ```
5607
6317
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
6318
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5608
6319
  */
5609
6320
  UpdatePersonalisedView = "UpdatePersonalisedView",
6321
+ /**
6322
+ * Triggers an event to update a personalized view of a Liveboard.
6323
+ * ```js
6324
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
6325
+ * ```
6326
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6327
+ */
6328
+ UpdatePersonalizedView = "UpdatePersonalisedView",
6329
+ /**
6330
+ * Triggers selection of a specific Personalized View on a
6331
+ * Liveboard without reloading the embed. Pass either a
6332
+ * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
6333
+ * If neither is provided, the Liveboard resets to the original/default view.
6334
+ * When a `viewName` is provided and multiple views share
6335
+ * the same name, the first match is selected.
6336
+ * @example
6337
+ * ```js
6338
+ * liveboardEmbed.trigger(
6339
+ * HostEvent.SelectPersonalizedView,
6340
+ * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
6341
+ * )
6342
+ * ```
6343
+ * @example
6344
+ * ```js
6345
+ * // Select by name
6346
+ * liveboardEmbed.trigger(
6347
+ * HostEvent.SelectPersonalizedView,
6348
+ * { viewName: 'Dr Smith Cardiology' },
6349
+ * )
6350
+ * ```
6351
+ * @example
6352
+ * ```js
6353
+ * // Reset to default view
6354
+ * liveboardEmbed.trigger(
6355
+ * HostEvent.SelectPersonalizedView,
6356
+ * {},
6357
+ * )
6358
+ * ```
6359
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6360
+ */
6361
+ SelectPersonalizedView = "SelectPersonalisedView",
5610
6362
  /**
5611
6363
  * @hidden
5612
6364
  * Notify when info call is completed successfully
@@ -5626,7 +6378,8 @@ export enum HostEvent {
5626
6378
  * add a name and description for the Answer.
5627
6379
  * @param - Includes the following keys:
5628
6380
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
5629
- * embed. - `name`: Optional. Name string for the Answer.
6381
+ * embed.
6382
+ * - `name`: Optional. Name string for the Answer.
5630
6383
  * - `description`: Optional. Description text for the Answer.
5631
6384
  * @example
5632
6385
  * ```js
@@ -5645,6 +6398,34 @@ export enum HostEvent {
5645
6398
  *
5646
6399
  * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
5647
6400
  * ```
6401
+ * @example
6402
+ * ```js
6403
+ * // Using context parameter to save answer from search context
6404
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6405
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6406
+ * name: "Regional sales analysis",
6407
+ * description: "Sales breakdown by region"
6408
+ * }, ContextType.Search);
6409
+ * ```
6410
+ * @example
6411
+ * ```js
6412
+ * // Save answer from answer context (explore modal)
6413
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6414
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6415
+ * name: "Modified analysis",
6416
+ * description: "Updated from explore view"
6417
+ * }, ContextType.Answer);
6418
+ * ```
6419
+ * @example
6420
+ * ```js
6421
+ * // Save answer from spotter context
6422
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6423
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6424
+ * vizId: latestSpotterVizId,
6425
+ * name: "AI insights",
6426
+ * description: "Generated from Spotter"
6427
+ * }, ContextType.Spotter);
6428
+ * ```
5648
6429
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
5649
6430
  */
5650
6431
  SaveAnswer = "saveAnswer",
@@ -5686,6 +6467,15 @@ export enum HostEvent {
5686
6467
  * executeSearch: true,
5687
6468
  * })
5688
6469
  * ```
6470
+ * @example
6471
+ * ```js
6472
+ * // Spotter search from spotter context
6473
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6474
+ * spotterEmbed.trigger(HostEvent.SpotterSearch, {
6475
+ * query: 'sales by region',
6476
+ * executeSearch: true
6477
+ * }, ContextType.Spotter);
6478
+ * ```
5689
6479
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5690
6480
  */
5691
6481
  SpotterSearch = "SpotterSearch",
@@ -5696,6 +6486,12 @@ export enum HostEvent {
5696
6486
  * ```js
5697
6487
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
5698
6488
  * ```
6489
+ * @example
6490
+ * ```js
6491
+ * // Edit last prompt from spotter context
6492
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6493
+ * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
6494
+ * ```
5699
6495
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5700
6496
  */
5701
6497
  EditLastPrompt = "EditLastPrompt",
@@ -5705,6 +6501,12 @@ export enum HostEvent {
5705
6501
  * ```js
5706
6502
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
5707
6503
  * ```
6504
+ * @example
6505
+ * ```js
6506
+ * // Preview spotter data from spotter context
6507
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6508
+ * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
6509
+ * ```
5708
6510
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5709
6511
  */
5710
6512
  PreviewSpotterData = "PreviewSpotterData",
@@ -6184,6 +6986,16 @@ export enum Action {
6184
6986
  * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
6185
6987
  */
6186
6988
  DownloadLiveboard = "downloadLiveboard",
6989
+ /**
6990
+ * The **Download Liveboard as Continuous PDF** menu action on a Liveboard.
6991
+ * Allows downloading the entire Liveboard as a continuous PDF.
6992
+ * @example
6993
+ * ```js
6994
+ * disabledActions: [Action.DownloadLiveboardAsContinuousPDF]
6995
+ * ```
6996
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6997
+ */
6998
+ DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
6187
6999
  /**
6188
7000
  * @hidden
6189
7001
  */
@@ -6817,13 +7629,25 @@ export enum Action {
6817
7629
  /**
6818
7630
  * The Liveboard Personalised Views dropdown.
6819
7631
  * Allows navigating to a personalized Liveboard View.
7632
+ * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
6820
7633
  * @example
6821
7634
  * ```js
6822
7635
  * disabledActions: [Action.PersonalisedViewsDropdown]
6823
7636
  * ```
6824
7637
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
7638
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6825
7639
  */
6826
7640
  PersonalisedViewsDropdown = "personalisedViewsDropdown",
7641
+ /**
7642
+ * The Liveboard Personalized Views dropdown.
7643
+ * Allows navigating to a personalized Liveboard View.
7644
+ * @example
7645
+ * ```js
7646
+ * disabledActions: [Action.PersonalizedViewsDropdown]
7647
+ * ```
7648
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7649
+ */
7650
+ PersonalizedViewsDropdown = "personalisedViewsDropdown",
6827
7651
  /**
6828
7652
  * Action ID for show or hide the user details on a
6829
7653
  * Liveboard (Recently visited / social proof)
@@ -6911,14 +7735,27 @@ export enum Action {
6911
7735
  /**
6912
7736
  * The **Organize Favourites** action on Homepage
6913
7737
  * *Favorites* module.
7738
+ * This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
6914
7739
  *
6915
7740
  * @example
6916
7741
  * ```js
6917
7742
  * disabledActions: [Action.OrganiseFavourites]
6918
7743
  * ```
6919
7744
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
7745
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6920
7746
  */
6921
7747
  OrganiseFavourites = "organiseFavourites",
7748
+ /**
7749
+ * The **Organize Favorites** action on Homepage
7750
+ * *Favorites* module.
7751
+ *
7752
+ * @example
7753
+ * ```js
7754
+ * disabledActions: [Action.OrganizeFavorites]
7755
+ * ```
7756
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7757
+ */
7758
+ OrganizeFavorites = "organiseFavourites",
6922
7759
  /**
6923
7760
  * The **AI Highlights** action on a Liveboard.
6924
7761
  *
@@ -7374,6 +8211,39 @@ export enum Action {
7374
8211
  * @version SDK: 1.46.0 | ThoughtSpot Cloud: 26.3.0.cl
7375
8212
  */
7376
8213
  SpotterDocs = "spotterDocs",
8214
+ /**
8215
+ * Controls visibility and disable state of the connector resources
8216
+ * section in the Spotter chat interface.
8217
+ * @example
8218
+ * ```js
8219
+ * hiddenActions: [Action.SpotterChatConnectorResources]
8220
+ * disabledActions: [Action.SpotterChatConnectorResources]
8221
+ * ```
8222
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8223
+ */
8224
+ SpotterChatConnectorResources = "spotterChatConnectorResources",
8225
+ /**
8226
+ * Controls visibility and disable state of the connectors
8227
+ * in the Spotter chat interface.
8228
+ * @example
8229
+ * ```js
8230
+ * hiddenActions: [Action.SpotterChatConnectors]
8231
+ * disabledActions: [Action.SpotterChatConnectors]
8232
+ * ```
8233
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8234
+ */
8235
+ SpotterChatConnectors = "spotterChatConnectors",
8236
+ /**
8237
+ * Controls visibility and disable state of the mode switcher
8238
+ * in the Spotter chat interface.
8239
+ * @example
8240
+ * ```js
8241
+ * hiddenActions: [Action.SpotterChatModeSwitcher]
8242
+ * disabledActions: [Action.SpotterChatModeSwitcher]
8243
+ * ```
8244
+ * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8245
+ */
8246
+ SpotterChatModeSwitcher = "spotterChatModeSwitcher",
7377
8247
  /**
7378
8248
  * The **Include current period** checkbox for date filters.
7379
8249
  * Controls the visibility and availability of the option to include
@@ -7717,7 +8587,13 @@ export enum EmbedErrorCodes {
7717
8587
  /** Failed to update embed parameters during pre-render */
7718
8588
  UPDATE_PARAMS_FAILED = "UPDATE_PARAMS_FAILED",
7719
8589
  /** Invalid URL provided in configuration */
7720
- INVALID_URL = "INVALID_URL"
8590
+ INVALID_URL = "INVALID_URL",
8591
+ /** Host event payload validation failed */
8592
+ HOST_EVENT_VALIDATION = "HOST_EVENT_VALIDATION",
8593
+ /** UpdateFilters payload is invalid - missing or malformed filter/filters */
8594
+ UPDATEFILTERS_INVALID_PAYLOAD = "UPDATEFILTERS_INVALID_PAYLOAD",
8595
+ /** DrillDown payload is invalid - missing or malformed points */
8596
+ DRILLDOWN_INVALID_PAYLOAD = "DRILLDOWN_INVALID_PAYLOAD"
7721
8597
  }
7722
8598
  /**
7723
8599
  * Error event object emitted when an error occurs in an embedded component.
@@ -7730,7 +8606,8 @@ export enum EmbedErrorCodes {
7730
8606
  *
7731
8607
  * - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
7732
8608
  * - **message**: Human-readable error description (string or array of strings for
7733
- * multiple errors) - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
8609
+ * multiple errors)
8610
+ * - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
7734
8611
  * values
7735
8612
  * - **[key: string]**: Additional context-specific for backward compatibility
7736
8613
  *
@@ -7778,6 +8655,22 @@ export interface EmbedErrorDetailsEvent {
7778
8655
  /** Additional context-specific for backward compatibility */
7779
8656
  [key: string]: any;
7780
8657
  }
8658
+ /**
8659
+ * Context types for specifying the page context when triggering host events.
8660
+ * Used as the third parameter in the `trigger` method to help ThoughtSpot
8661
+ * understand the current page context for better event handling.
8662
+ *
8663
+ * @example
8664
+ * ```js
8665
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
8666
+ *
8667
+ * // Trigger an event with specific context
8668
+ * embed.trigger(HostEvent.Pin, { vizId: "123", liveboardId: "456" }, ContextType.Search);
8669
+ * ```
8670
+ *
8671
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
8672
+ * @group Events
8673
+ */
7781
8674
  export enum ContextType {
7782
8675
  /**
7783
8676
  * Search answer context for search page or edit viz dialog on liveboard page.
@@ -7794,7 +8687,11 @@ export enum ContextType {
7794
8687
  /**
7795
8688
  * Spotter context for spotter modal/page.
7796
8689
  */
7797
- Spotter = "spotter"
8690
+ Spotter = "spotter",
8691
+ /**
8692
+ * Other context for any other generic page.
8693
+ */
8694
+ Other = "other"
7798
8695
  }
7799
8696
  export interface DefaultAppInitData {
7800
8697
  customisations: CustomisationsInterface;
@@ -7897,33 +8794,6 @@ export interface ObjectIds {
7897
8794
  */
7898
8795
  modalTitle?: string;
7899
8796
  }
7900
- /**
7901
- * Context object for the embedded component.
7902
- * @example
7903
- * ```js
7904
- * const context = await embed.getCurrentContext();
7905
- * console.log(context);
7906
- * {
7907
- * stack: [
7908
- * {
7909
- * name: 'Liveboard',
7910
- * type: ContextType.Liveboard,
7911
- * objectIds: {
7912
- * liveboardId: '123',
7913
- * },
7914
- * },
7915
- * ],
7916
- * currentContext: {
7917
- * name: 'Liveboard',
7918
- * type: ContextType.Liveboard,
7919
- * objectIds: {
7920
- * liveboardId: '123',
7921
- * },
7922
- * },
7923
- * }
7924
- * ```
7925
- * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
7926
- */
7927
8797
  export interface ContextObject {
7928
8798
  /**
7929
8799
  * Stack of context objects.
@@ -7954,6 +8824,11 @@ export interface ContextObject {
7954
8824
  objectIds: ObjectIds;
7955
8825
  };
7956
8826
  }
8827
+ export interface LiveboardTab {
8828
+ id: string;
8829
+ name: string;
8830
+ [key: string]: any;
8831
+ }
7957
8832
  export enum UIPassthroughEvent {
7958
8833
  PinAnswerToLiveboard = "addVizToPinboard",
7959
8834
  SaveAnswer = "saveAnswer",
@@ -7961,7 +8836,16 @@ export enum UIPassthroughEvent {
7961
8836
  GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
7962
8837
  GetAnswerConfig = "getAnswerPageConfig",
7963
8838
  GetLiveboardConfig = "getPinboardPageConfig",
7964
- GetUnsavedAnswerTML = "getUnsavedAnswerTML"
8839
+ GetUnsavedAnswerTML = "getUnsavedAnswerTML",
8840
+ UpdateFilters = "updateFilters",
8841
+ Drilldown = "drillDown",
8842
+ GetAnswerSession = "getAnswerSession",
8843
+ GetFilters = "getFilters",
8844
+ GetIframeUrl = "getIframeUrl",
8845
+ GetParameters = "getParameters",
8846
+ GetTML = "getTML",
8847
+ GetTabs = "getTabs",
8848
+ GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
7965
8849
  }
7966
8850
  export type UIPassthroughContractBase = {
7967
8851
  [UIPassthroughEvent.PinAnswerToLiveboard]: {
@@ -8025,17 +8909,104 @@ export type UIPassthroughContractBase = {
8025
8909
  tml: string;
8026
8910
  };
8027
8911
  };
8912
+ [UIPassthroughEvent.GetAnswerSession]: {
8913
+ request: {
8914
+ vizId?: string;
8915
+ };
8916
+ response: {
8917
+ session: SessionInterface;
8918
+ embedAnswerData?: Record<string, any>;
8919
+ };
8920
+ };
8921
+ [UIPassthroughEvent.GetFilters]: {
8922
+ request: {
8923
+ vizId?: string;
8924
+ };
8925
+ response: {
8926
+ liveboardFilters: Record<string, any>[];
8927
+ runtimeFilters: RuntimeFilter[];
8928
+ };
8929
+ };
8930
+ [UIPassthroughEvent.GetIframeUrl]: {
8931
+ request: Record<string, never>;
8932
+ response: {
8933
+ iframeUrl: string;
8934
+ };
8935
+ };
8936
+ [UIPassthroughEvent.GetParameters]: {
8937
+ request: Record<string, never>;
8938
+ response: {
8939
+ parameters: Record<string, any>[];
8940
+ };
8941
+ };
8942
+ [UIPassthroughEvent.GetTML]: {
8943
+ request: {
8944
+ vizId?: string;
8945
+ includeNonExecutedSearchTokens?: boolean;
8946
+ };
8947
+ response: Record<string, any>;
8948
+ };
8949
+ [UIPassthroughEvent.GetTabs]: {
8950
+ request: Record<string, never>;
8951
+ response: {
8952
+ orderedTabIds: string[];
8953
+ numberOfTabs: number;
8954
+ Tabs: LiveboardTab[];
8955
+ };
8956
+ };
8957
+ [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
8958
+ request: Record<string, never>;
8959
+ response: {
8960
+ v2Content: string;
8961
+ };
8962
+ };
8963
+ [UIPassthroughEvent.UpdateFilters]: {
8964
+ request: {
8965
+ filter?: {
8966
+ column: string;
8967
+ oper: string;
8968
+ values: string[];
8969
+ type?: string;
8970
+ };
8971
+ filters?: {
8972
+ column: string;
8973
+ oper: string;
8974
+ values: string[];
8975
+ type?: string;
8976
+ }[];
8977
+ };
8978
+ response: unknown;
8979
+ };
8980
+ [UIPassthroughEvent.Drilldown]: {
8981
+ request: {
8982
+ points: {
8983
+ selectedPoints?: string[];
8984
+ clickedPoint?: string;
8985
+ };
8986
+ columnGuid?: string;
8987
+ autoDrillDown?: boolean;
8988
+ vizId?: string;
8989
+ };
8990
+ response: unknown;
8991
+ };
8028
8992
  };
8029
8993
  export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
8030
8994
  export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
8031
8995
  export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
8032
- redId?: string;
8996
+ refId?: string;
8033
8997
  value?: UIPassthroughResponse<ApiName>;
8034
8998
  error?: any;
8035
8999
  }>;
8036
9000
  export type EmbedApiHostEventMapping = {
8037
9001
  [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
8038
9002
  [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
9003
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
9004
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
9005
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
9006
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
9007
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
9008
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
9009
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
8039
9010
  };
8040
9011
  export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
8041
9012
  export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
@@ -8043,6 +9014,12 @@ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT |
8043
9014
  export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
8044
9015
  class HostEventClient {
8045
9016
  iFrame: HTMLIFrameElement;
9017
+ /** Cached list of available UI passthrough keys from the embedded app */
9018
+ private availablePassthroughKeysCache;
9019
+ /** Host events with custom handlers
9020
+ * (setters or special logic) -
9021
+ * bound to instance for protected method access */
9022
+ private readonly customHandlers;
8046
9023
  constructor(iFrame?: HTMLIFrameElement);
8047
9024
  /**
8048
9025
  * A wrapper over process trigger to
@@ -8053,14 +9030,36 @@ class HostEventClient {
8053
9030
  protected processTrigger(message: HostEvent, data: any, context?: ContextType): Promise<any>;
8054
9031
  handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>, context?: ContextType): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
8055
9032
  hostEventFallback(hostEvent: HostEvent, data: any, context?: ContextType): Promise<any>;
9033
+ /**
9034
+ * For getter events that return data. Tries UI passthrough first;
9035
+ * if the app doesn't support it (no response data), falls back to
9036
+ * the legacy host event channel. Real errors are thrown as-is.
9037
+ */
9038
+ private getDataWithPassthroughFallback;
8056
9039
  /**
8057
9040
  * Setter for the iframe element used for host events
8058
9041
  * @param {HTMLIFrameElement} iFrame - the iframe element to set
8059
9042
  */
8060
9043
  setIframeElement(iFrame: HTMLIFrameElement): void;
9044
+ /**
9045
+ * Fetches the list of available UI passthrough keys from the embedded app.
9046
+ * Result is cached for the session. Returns empty array on failure.
9047
+ */
9048
+ private getAvailableUIPassthroughKeys;
8061
9049
  triggerUIPassthroughApi<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>, context?: ContextType): Promise<UIPassthroughArrayResponse<UIPassthroughEventT>>;
8062
9050
  protected handlePinEvent(payload: HostEventRequest<HostEvent.Pin>, context?: ContextType): Promise<HostEventResponse<HostEvent.Pin, ContextType>>;
8063
9051
  protected handleSaveAnswerEvent(payload: HostEventRequest<HostEvent.SaveAnswer>, context?: ContextType): Promise<any>;
9052
+ protected handleUpdateFiltersEvent(payload: HostEventRequest<HostEvent.UpdateFilters>, context?: ContextType): Promise<any>;
9053
+ protected handleDrillDownEvent(payload: HostEventRequest<HostEvent.DrillDown>, context?: ContextType): Promise<any>;
9054
+ /**
9055
+ * Dispatches a host event using the appropriate channel:
9056
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
9057
+ * 2. Otherwise fall back to the legacy host event channel.
9058
+ *
9059
+ * @param hostEvent - The host event to trigger
9060
+ * @param payload - Optional payload for the event
9061
+ * @param context - Optional context (e.g. vizId) for scoped operations
9062
+ */
8064
9063
  triggerHostEvent<HostEventT extends HostEvent, PayloadT, ContextT extends ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
8065
9064
  }
8066
9065
  class TsEmbed {
@@ -8396,7 +9395,21 @@ class TsEmbed {
8396
9395
  * Triggers an event to the embedded app
8397
9396
  * @param {HostEvent} messageType The event type
8398
9397
  * @param {any} data The payload to send with the message
9398
+ * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
9399
+ * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
9400
+ * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
9401
+ * Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
8399
9402
  * @returns A promise that resolves with the response from the embedded app
9403
+ * @example
9404
+ * ```js
9405
+ * // Trigger Pin event with context (SDK: 1.45.2+)
9406
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
9407
+ * embed.trigger(HostEvent.Pin, {
9408
+ * vizId: "123",
9409
+ * liveboardId: "456"
9410
+ * }, ContextType.Search);
9411
+ * ```
9412
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
8400
9413
  */
8401
9414
  trigger<HostEventT extends HostEvent, PayloadT, ContextT extends ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
8402
9415
  /**
@@ -8417,8 +9430,33 @@ class TsEmbed {
8417
9430
  getIframeSrc(): string;
8418
9431
  protected handleRenderForPrerender(): Promise<TsEmbed>;
8419
9432
  /**
8420
- * Get the current context of the embedded TS component.
8421
- * @returns The current context object containing the page type and object ids.
9433
+ * Context object for the embedded component.
9434
+ * @returns {ContextObject} The current context object containing the page type and object ids.
9435
+ * @example
9436
+ * ```js
9437
+ * const context = await embed.getCurrentContext();
9438
+ * console.log(context);
9439
+ *
9440
+ * // Example output
9441
+ * {
9442
+ * stack: [
9443
+ * {
9444
+ * name: 'Liveboard',
9445
+ * type: ContextType.Liveboard,
9446
+ * objectIds: {
9447
+ * liveboardId: '123',
9448
+ * },
9449
+ * },
9450
+ * ],
9451
+ * currentContext: {
9452
+ * name: 'Liveboard',
9453
+ * type: ContextType.Liveboard,
9454
+ * objectIds: {
9455
+ * liveboardId: '123',
9456
+ * },
9457
+ * },
9458
+ * }
9459
+ * ```
8422
9460
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
8423
9461
  */
8424
9462
  getCurrentContext(): Promise<ContextObject>;
@@ -8868,6 +9906,15 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, "primaryAct
8868
9906
  */
8869
9907
  export interface ConversationViewConfig extends SpotterEmbedViewConfig {
8870
9908
  }
9909
+ /**
9910
+ * APP_INIT data shape for SpotterEmbed.
9911
+ * @internal
9912
+ */
9913
+ export interface SpotterAppInitData extends DefaultAppInitData {
9914
+ embedParams?: {
9915
+ spotterSidebarConfig?: SpotterSidebarViewConfig;
9916
+ };
9917
+ }
8871
9918
  /**
8872
9919
  * Embed ThoughtSpot AI Conversation.
8873
9920
  * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
@@ -8886,6 +9933,19 @@ export interface ConversationViewConfig extends SpotterEmbedViewConfig {
8886
9933
  export class SpotterEmbed extends TsEmbed {
8887
9934
  protected viewConfig: SpotterEmbedViewConfig;
8888
9935
  constructor(container: HTMLElement, viewConfig: SpotterEmbedViewConfig);
9936
+ /**
9937
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
9938
+ * so the conv-assist app can read sidebar configuration on initialisation.
9939
+ *
9940
+ * Precedence for `enablePastConversationsSidebar`:
9941
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
9942
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
9943
+ * is absent the latter is used as a fallback.
9944
+ *
9945
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
9946
+ * excluded from the payload rather than forwarded to the app.
9947
+ */
9948
+ protected getAppInitData(): Promise<SpotterAppInitData>;
8889
9949
  protected getEmbedParamsObject(): Record<any, any>;
8890
9950
  getIframeSrc(): string;
8891
9951
  render(): Promise<SpotterEmbed>;
@@ -9463,6 +10523,24 @@ export interface AppViewConfig extends AllEmbedViewConfig {
9463
10523
  * ```
9464
10524
  */
9465
10525
  isPNGInScheduledEmailsEnabled?: boolean;
10526
+ /**
10527
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
10528
+ * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
10529
+ * This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
10530
+ *
10531
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
10532
+ * @type {boolean}
10533
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
10534
+ * @example
10535
+ * ```js
10536
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
10537
+ * const embed = new <EmbedComponent>('#tsEmbed', {
10538
+ * ... // other embed view config
10539
+ * isContinuousLiveboardPDFEnabled: true,
10540
+ * })
10541
+ * ```
10542
+ */
10543
+ isContinuousLiveboardPDFEnabled?: boolean;
9466
10544
  /**
9467
10545
  * This flag is used to enable/disable the XLSX/CSV download option for Liveboards
9468
10546
  *
@@ -9631,6 +10709,15 @@ export interface AppViewConfig extends AllEmbedViewConfig {
9631
10709
  */
9632
10710
  enableHomepageAnnouncement?: boolean;
9633
10711
  }
10712
+ /**
10713
+ * APP_INIT data shape for AppEmbed.
10714
+ * @internal
10715
+ */
10716
+ export interface AppEmbedAppInitData extends DefaultAppInitData {
10717
+ embedParams?: {
10718
+ spotterSidebarConfig?: SpotterSidebarViewConfig;
10719
+ };
10720
+ }
9634
10721
  /**
9635
10722
  * Embeds full ThoughtSpot experience in a host application.
9636
10723
  * @group Embed components
@@ -9639,6 +10726,19 @@ export class AppEmbed extends V1Embed {
9639
10726
  protected viewConfig: AppViewConfig;
9640
10727
  private defaultHeight;
9641
10728
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
10729
+ /**
10730
+ * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
10731
+ * so the conv-assist app can read sidebar configuration on initialisation.
10732
+ *
10733
+ * Precedence for `enablePastConversationsSidebar`:
10734
+ * `spotterSidebarConfig.enablePastConversationsSidebar` wins over the
10735
+ * deprecated top-level `enablePastConversationsSidebar` flag; if the former
10736
+ * is absent the latter is used as a fallback.
10737
+ *
10738
+ * An invalid `spotterDocumentationUrl` triggers a validation error and is
10739
+ * excluded from the payload rather than forwarded to the app.
10740
+ */
10741
+ protected getAppInitData(): Promise<AppEmbedAppInitData>;
9642
10742
  /**
9643
10743
  * Constructs a map of parameters to be passed on to the
9644
10744
  * embedded Liveboard or visualization.
@@ -9728,7 +10828,8 @@ export enum AuthFailureType {
9728
10828
  /**
9729
10829
  * The current authentication token or session has expired.
9730
10830
  *
9731
- * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
10831
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh
10832
+ * handling.
9732
10833
  */
9733
10834
  EXPIRY = "EXPIRY",
9734
10835
  /**
@@ -10338,6 +11439,24 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
10338
11439
  * ```
10339
11440
  */
10340
11441
  isPNGInScheduledEmailsEnabled?: boolean;
11442
+ /**
11443
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
11444
+ * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
11445
+ * This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
11446
+ *
11447
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
11448
+ * @type {boolean}
11449
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
11450
+ * @example
11451
+ * ```js
11452
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
11453
+ * const embed = new <EmbedComponent>('#tsEmbed', {
11454
+ * ... // other embed view config
11455
+ * isContinuousLiveboardPDFEnabled: true,
11456
+ * })
11457
+ * ```
11458
+ */
11459
+ isContinuousLiveboardPDFEnabled?: boolean;
10341
11460
  /**
10342
11461
  * This flag is used to enable/disable the XLSX/CSV download option for Liveboards
10343
11462
  *