@thoughtspot/visual-embed-sdk 1.46.3 → 1.46.5-beta.1

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 (172) 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 +51 -17
  9. package/cjs/src/css-variables.d.ts.map +1 -1
  10. package/cjs/src/embed/app.d.ts +1 -0
  11. package/cjs/src/embed/app.d.ts.map +1 -1
  12. package/cjs/src/embed/app.js +10 -1
  13. package/cjs/src/embed/app.js.map +1 -1
  14. package/cjs/src/embed/app.spec.js +46 -1
  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/events.spec.js +72 -0
  20. package/cjs/src/embed/events.spec.js.map +1 -1
  21. package/cjs/src/embed/hostEventClient/contracts.d.ts +74 -3
  22. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  23. package/cjs/src/embed/hostEventClient/contracts.js +7 -0
  24. package/cjs/src/embed/hostEventClient/contracts.js.map +1 -1
  25. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +10 -0
  26. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  27. package/cjs/src/embed/hostEventClient/host-event-client.js +46 -9
  28. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  29. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +155 -0
  30. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  31. package/cjs/src/embed/liveboard.d.ts +1 -0
  32. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  33. package/cjs/src/embed/liveboard.js +11 -2
  34. package/cjs/src/embed/liveboard.js.map +1 -1
  35. package/cjs/src/embed/liveboard.spec.js +96 -2
  36. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  37. package/cjs/src/embed/sage.d.ts.map +1 -1
  38. package/cjs/src/embed/sage.js.map +1 -1
  39. package/cjs/src/embed/search.spec.js.map +1 -1
  40. package/cjs/src/embed/ts-embed.d.ts +41 -2
  41. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  42. package/cjs/src/embed/ts-embed.js +41 -2
  43. package/cjs/src/embed/ts-embed.js.map +1 -1
  44. package/cjs/src/react/index.d.ts.map +1 -1
  45. package/cjs/src/react/index.js +58 -53
  46. package/cjs/src/react/index.js.map +1 -1
  47. package/cjs/src/types.d.ts +730 -32
  48. package/cjs/src/types.d.ts.map +1 -1
  49. package/cjs/src/types.js +734 -3
  50. package/cjs/src/types.js.map +1 -1
  51. package/cjs/src/utils/graphql/answerService/answerService.d.ts +4 -2
  52. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  53. package/cjs/src/utils/graphql/answerService/answerService.js +4 -2
  54. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  55. package/cjs/src/utils/graphql/preview-service.d.ts.map +1 -1
  56. package/cjs/src/utils/graphql/preview-service.js.map +1 -1
  57. package/cjs/src/utils/processData.d.ts.map +1 -1
  58. package/cjs/src/utils/processData.js.map +1 -1
  59. package/dist/{index-DyX-x6uN.js → index-DW2wEHqy.js} +1 -1
  60. package/dist/src/auth.d.ts +2 -1
  61. package/dist/src/auth.d.ts.map +1 -1
  62. package/dist/src/authToken.d.ts.map +1 -1
  63. package/dist/src/css-variables.d.ts +51 -17
  64. package/dist/src/css-variables.d.ts.map +1 -1
  65. package/dist/src/embed/app.d.ts +1 -0
  66. package/dist/src/embed/app.d.ts.map +1 -1
  67. package/dist/src/embed/base.d.ts.map +1 -1
  68. package/dist/src/embed/hostEventClient/contracts.d.ts +74 -3
  69. package/dist/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  70. package/dist/src/embed/hostEventClient/host-event-client.d.ts +10 -0
  71. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  72. package/dist/src/embed/liveboard.d.ts +1 -0
  73. package/dist/src/embed/liveboard.d.ts.map +1 -1
  74. package/dist/src/embed/sage.d.ts.map +1 -1
  75. package/dist/src/embed/ts-embed.d.ts +41 -2
  76. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  77. package/dist/src/react/index.d.ts.map +1 -1
  78. package/dist/src/types.d.ts +730 -32
  79. package/dist/src/types.d.ts.map +1 -1
  80. package/dist/src/utils/graphql/answerService/answerService.d.ts +4 -2
  81. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  82. package/dist/src/utils/graphql/preview-service.d.ts.map +1 -1
  83. package/dist/src/utils/processData.d.ts.map +1 -1
  84. package/dist/tsembed-react.es.js +917 -77
  85. package/dist/tsembed-react.js +915 -75
  86. package/dist/tsembed.es.js +859 -24
  87. package/dist/tsembed.js +857 -22
  88. package/dist/visual-embed-sdk-react-full.d.ts +892 -54
  89. package/dist/visual-embed-sdk-react.d.ts +892 -54
  90. package/dist/visual-embed-sdk.d.ts +912 -56
  91. package/lib/package.json +3 -3
  92. package/lib/src/auth.d.ts +2 -1
  93. package/lib/src/auth.d.ts.map +1 -1
  94. package/lib/src/auth.js +2 -1
  95. package/lib/src/auth.js.map +1 -1
  96. package/lib/src/authToken.d.ts.map +1 -1
  97. package/lib/src/authToken.js.map +1 -1
  98. package/lib/src/css-variables.d.ts +51 -17
  99. package/lib/src/css-variables.d.ts.map +1 -1
  100. package/lib/src/embed/app.d.ts +1 -0
  101. package/lib/src/embed/app.d.ts.map +1 -1
  102. package/lib/src/embed/app.js +10 -1
  103. package/lib/src/embed/app.js.map +1 -1
  104. package/lib/src/embed/app.spec.js +46 -1
  105. package/lib/src/embed/app.spec.js.map +1 -1
  106. package/lib/src/embed/base.d.ts.map +1 -1
  107. package/lib/src/embed/base.js.map +1 -1
  108. package/lib/src/embed/base.spec.js.map +1 -1
  109. package/lib/src/embed/events.spec.js +73 -1
  110. package/lib/src/embed/events.spec.js.map +1 -1
  111. package/lib/src/embed/hostEventClient/contracts.d.ts +74 -3
  112. package/lib/src/embed/hostEventClient/contracts.d.ts.map +1 -1
  113. package/lib/src/embed/hostEventClient/contracts.js +7 -0
  114. package/lib/src/embed/hostEventClient/contracts.js.map +1 -1
  115. package/lib/src/embed/hostEventClient/host-event-client.d.ts +10 -0
  116. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  117. package/lib/src/embed/hostEventClient/host-event-client.js +46 -9
  118. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  119. package/lib/src/embed/hostEventClient/host-event-client.spec.js +155 -0
  120. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  121. package/lib/src/embed/liveboard.d.ts +1 -0
  122. package/lib/src/embed/liveboard.d.ts.map +1 -1
  123. package/lib/src/embed/liveboard.js +11 -2
  124. package/lib/src/embed/liveboard.js.map +1 -1
  125. package/lib/src/embed/liveboard.spec.js +96 -2
  126. package/lib/src/embed/liveboard.spec.js.map +1 -1
  127. package/lib/src/embed/sage.d.ts.map +1 -1
  128. package/lib/src/embed/sage.js.map +1 -1
  129. package/lib/src/embed/search.spec.js.map +1 -1
  130. package/lib/src/embed/ts-embed.d.ts +41 -2
  131. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  132. package/lib/src/embed/ts-embed.js +42 -3
  133. package/lib/src/embed/ts-embed.js.map +1 -1
  134. package/lib/src/react/index.d.ts.map +1 -1
  135. package/lib/src/react/index.js +58 -53
  136. package/lib/src/react/index.js.map +1 -1
  137. package/lib/src/types.d.ts +730 -32
  138. package/lib/src/types.d.ts.map +1 -1
  139. package/lib/src/types.js +734 -3
  140. package/lib/src/types.js.map +1 -1
  141. package/lib/src/utils/graphql/answerService/answerService.d.ts +4 -2
  142. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  143. package/lib/src/utils/graphql/answerService/answerService.js +4 -2
  144. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  145. package/lib/src/utils/graphql/preview-service.d.ts.map +1 -1
  146. package/lib/src/utils/graphql/preview-service.js.map +1 -1
  147. package/lib/src/utils/processData.d.ts.map +1 -1
  148. package/lib/src/utils/processData.js.map +1 -1
  149. package/lib/src/visual-embed-sdk.d.ts +973 -116
  150. package/package.json +3 -3
  151. package/src/auth.spec.ts +1 -1
  152. package/src/auth.ts +2 -1
  153. package/src/authToken.ts +0 -1
  154. package/src/css-variables.ts +51 -17
  155. package/src/embed/app.spec.ts +62 -3
  156. package/src/embed/app.ts +10 -1
  157. package/src/embed/base.spec.ts +1 -2
  158. package/src/embed/base.ts +1 -4
  159. package/src/embed/events.spec.ts +88 -0
  160. package/src/embed/hostEventClient/contracts.ts +74 -2
  161. package/src/embed/hostEventClient/host-event-client.spec.ts +257 -0
  162. package/src/embed/hostEventClient/host-event-client.ts +70 -15
  163. package/src/embed/liveboard.spec.ts +126 -2
  164. package/src/embed/liveboard.ts +11 -2
  165. package/src/embed/sage.ts +0 -1
  166. package/src/embed/search.spec.ts +0 -2
  167. package/src/embed/ts-embed.ts +43 -3
  168. package/src/react/index.tsx +76 -72
  169. package/src/types.ts +739 -31
  170. package/src/utils/graphql/answerService/answerService.ts +4 -5
  171. package/src/utils/graphql/preview-service.ts +0 -1
  172. package/src/utils/processData.ts +0 -5
@@ -428,37 +428,49 @@ export interface CustomCssVariables {
428
428
  /**
429
429
  * Padding of the groups in the Liveboard.
430
430
  *
431
- * 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.
431
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
432
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
433
+ * this CSS variable.
432
434
  */
433
435
  "--ts-var-liveboard-group-padding"?: string;
434
436
  /**
435
437
  * Font size of the title of the groups in the Liveboard.
436
438
  *
437
- * 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.
439
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
440
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
441
+ * this CSS variable.
438
442
  */
439
443
  "--ts-var-liveboard-group-title-font-size"?: string;
440
444
  /**
441
445
  * Font weight of the title of the groups in the Liveboard.
442
446
  *
443
- * 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.
447
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
448
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
449
+ * this CSS variable.
444
450
  */
445
451
  "--ts-var-liveboard-group-title-font-weight"?: string;
446
452
  /**
447
453
  * Font size of the title of the tiles inside the groups in the Liveboard.
448
454
  *
449
- * 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.
455
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
456
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
457
+ * this CSS variable.
450
458
  */
451
459
  "--ts-var-liveboard-group-tile-title-font-size"?: string;
452
460
  /**
453
461
  * Font weight of the title of the tiles inside the groups in the Liveboard.
454
462
  *
455
- * 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.
463
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
464
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
465
+ * this CSS variable.
456
466
  */
457
467
  "--ts-var-liveboard-group-tile-title-font-weight"?: string;
458
468
  /**
459
469
  * Padding of the group tiles in the Liveboard.
460
470
  *
461
- * 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.
471
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
472
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
473
+ * this CSS variable.
462
474
  */
463
475
  "--ts-var-liveboard-group-tile-padding"?: string;
464
476
  /**
@@ -468,13 +480,17 @@ export interface CustomCssVariables {
468
480
  /**
469
481
  * Background color of the groups in the Liveboard.
470
482
  *
471
- * 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.
483
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
484
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
485
+ * this CSS variable.
472
486
  */
473
487
  "--ts-var-liveboard-group-background"?: string;
474
488
  /**
475
489
  * Border color of the groups in the Liveboard.
476
490
  *
477
- * 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.
491
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
492
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
493
+ * this CSS variable.
478
494
  */
479
495
  "--ts-var-liveboard-group-border-color"?: string;
480
496
  /**
@@ -488,55 +504,73 @@ export interface CustomCssVariables {
488
504
  /**
489
505
  * Font color of the title of the groups in the Liveboard.
490
506
  *
491
- * 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.
507
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
508
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
509
+ * this CSS variable.
492
510
  */
493
511
  "--ts-var-liveboard-group-title-font-color"?: string;
494
512
  /**
495
513
  * Font color of the description of the groups in the Liveboard.
496
514
  *
497
- * 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.
515
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
516
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
517
+ * this CSS variable.
498
518
  */
499
519
  "--ts-var-liveboard-group-description-font-color"?: string;
500
520
  /**
501
521
  * Font color of the title of the tiles inside the groups in the Liveboard.
502
522
  *
503
- * 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.
523
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
524
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
525
+ * this CSS variable.
504
526
  */
505
527
  "--ts-var-liveboard-group-tile-title-font-color"?: string;
506
528
  /**
507
529
  * Font color of the description of the tiles inside the groups in the Liveboard.
508
530
  *
509
- * 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.
531
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
532
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
533
+ * this CSS variable.
510
534
  */
511
535
  "--ts-var-liveboard-group-tile-description-font-color"?: string;
512
536
  /**
513
537
  * Background color of the tiles inside the groups in the Liveboard.
514
538
  *
515
- * 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.
539
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
540
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
541
+ * this CSS variable.
516
542
  */
517
543
  "--ts-var-liveboard-group-tile-background"?: string;
518
544
  /**
519
545
  * Background color of the filter chips in the Liveboard.
520
546
  *
521
- * 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.
547
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
548
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
549
+ * this CSS variable.
522
550
  */
523
551
  "--ts-var-liveboard-chip-background"?: string;
524
552
  /**
525
553
  * Font color of the filter chips in the Liveboard.
526
554
  *
527
- * 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.
555
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
556
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
557
+ * this CSS variable.
528
558
  */
529
559
  "--ts-var-liveboard-chip-color"?: string;
530
560
  /**
531
561
  * Background color of the filter chips in the Liveboard on hover.
532
562
  *
533
- * 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.
563
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
564
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
565
+ * this CSS variable.
534
566
  */
535
567
  "--ts-var-liveboard-chip--hover-background"?: string;
536
568
  /**
537
569
  * Background color of the filter chips in the Liveboard on active.
538
570
  *
539
- * 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.
571
+ * Please enable the Liveboard Masterpieces feature in your ThoughtSpot instance and
572
+ * then set the isLiveboardMasterpiecesEnabled SDK flag to true to start modifying
573
+ * this CSS variable.
540
574
  */
541
575
  "--ts-var-liveboard-chip--active-background"?: string;
542
576
  /**
@@ -3929,22 +3963,45 @@ export declare enum EmbedEvent {
3929
3963
  /**
3930
3964
  * Emitted when name, status (private or public) or filter values of a
3931
3965
  * Personalised view is updated.
3966
+ * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
3932
3967
  * @returns viewName: string
3933
3968
  * @returns viewId: string
3934
3969
  * @returns liveboardId: string
3935
3970
  * @returns isPublic: boolean
3936
3971
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
3972
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3937
3973
  */
3938
3974
  UpdatePersonalisedView = "updatePersonalisedView",
3975
+ /**
3976
+ * Emitted when name, status (private or public) or filter values of a
3977
+ * Personalized view is updated.
3978
+ * @returns viewName: string
3979
+ * @returns viewId: string
3980
+ * @returns liveboardId: string
3981
+ * @returns isPublic: boolean
3982
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3983
+ */
3984
+ UpdatePersonalizedView = "updatePersonalisedView",
3939
3985
  /**
3940
3986
  * Emitted when a Personalised view is saved.
3987
+ * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
3941
3988
  * @returns viewName: string
3942
3989
  * @returns viewId: string
3943
3990
  * @returns liveboardId: string
3944
3991
  * @returns isPublic: boolean
3945
3992
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
3993
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3946
3994
  */
3947
3995
  SavePersonalisedView = "savePersonalisedView",
3996
+ /**
3997
+ * Emitted when a Personalized view is saved.
3998
+ * @returns viewName: string
3999
+ * @returns viewId: string
4000
+ * @returns liveboardId: string
4001
+ * @returns isPublic: boolean
4002
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4003
+ */
4004
+ SavePersonalizedView = "savePersonalisedView",
3948
4005
  /**
3949
4006
  * Emitted when a Liveboard is reset.
3950
4007
  * @returns viewName: string
@@ -3956,11 +4013,41 @@ export declare enum EmbedEvent {
3956
4013
  ResetLiveboard = "resetLiveboard",
3957
4014
  /**
3958
4015
  * Emitted when a PersonalisedView is deleted.
4016
+ * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
3959
4017
  * @returns views: string[]
3960
4018
  * @returns liveboardId: string
3961
4019
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
4020
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3962
4021
  */
3963
4022
  DeletePersonalisedView = "deletePersonalisedView",
4023
+ /**
4024
+ * Emitted when a PersonalizedView is deleted.
4025
+ * @returns views: string[]
4026
+ * @returns liveboardId: string
4027
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4028
+ */
4029
+ DeletePersonalizedView = "deletePersonalisedView",
4030
+ /**
4031
+ * Emitted when a user selects a different Personalized View or
4032
+ * resets to the original/default view on a Liveboard.
4033
+ * @example
4034
+ * ```js
4035
+ * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
4036
+ * console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
4037
+ * console.log(data.viewId); // '2a021a12-...' or null (default)
4038
+ * console.log(data.liveboardId); // 'abc123...'
4039
+ * console.log(data.isPublic); // true | false
4040
+ * })
4041
+ * ```
4042
+ * @returns viewName: string - Name of the selected view,
4043
+ * or 'Original View' when reset to default.
4044
+ * @returns viewId: string | null - GUID of the selected view,
4045
+ * or null when reset to default.
4046
+ * @returns liveboardId: string
4047
+ * @returns isPublic: boolean
4048
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4049
+ */
4050
+ ChangePersonalizedView = "changePersonalisedView",
3964
4051
  /**
3965
4052
  * Emitted when a user creates a Worksheet.
3966
4053
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -3994,7 +4081,8 @@ export declare enum EmbedEvent {
3994
4081
  * @param - Includes the following parameters:
3995
4082
  * - `payload`: The payload received from the embed related to the Data API call.
3996
4083
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
3997
- * will run or block the search operation, and if blocked, which error message to provide.
4084
+ * will run or block the search operation, and if blocked, which error message to
4085
+ * provide.
3998
4086
  * - `execute` - When `execute` returns `true`, the search is run.
3999
4087
  * When `execute` returns `false`, the search is not executed.
4000
4088
  * - `error` - Developers can customize the user-facing error message when `execute`
@@ -4428,6 +4516,25 @@ export declare enum EmbedEvent {
4428
4516
  * );
4429
4517
  * }
4430
4518
  * ```
4519
+ *
4520
+ * **Context Parameter (SDK: 1.45.2+)**
4521
+ *
4522
+ * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
4523
+ * `ContextType` as the third parameter to the `trigger` method to specify the context
4524
+ * from which the event is triggered. This helps ThoughtSpot understand the current page
4525
+ * context (Search, Answer, Liveboard, or Spotter) for better event handling.
4526
+ *
4527
+ * @example
4528
+ * ```js
4529
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
4530
+ *
4531
+ * // Trigger Pin event with Search context
4532
+ * appEmbed.trigger(HostEvent.Pin, {
4533
+ * vizId: "123",
4534
+ * liveboardId: "456"
4535
+ * }, ContextType.Search);
4536
+ * ```
4537
+ *
4431
4538
  * @group Events
4432
4539
  */
4433
4540
  export declare enum HostEvent {
@@ -4449,6 +4556,16 @@ export declare enum HostEvent {
4449
4556
  execute: true
4450
4557
  });
4451
4558
  * ```
4559
+ * @example
4560
+ * ```js
4561
+ * // Trigger search from search context
4562
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4563
+ * appEmbed.trigger(HostEvent.Search, {
4564
+ * searchQuery: "[revenue] by [region]",
4565
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
4566
+ * execute: true
4567
+ * }, ContextType.Search);
4568
+ * ```
4452
4569
  */
4453
4570
  Search = "search",
4454
4571
  /**
@@ -4499,6 +4616,24 @@ export declare enum HostEvent {
4499
4616
  * });
4500
4617
  * })
4501
4618
  * ```
4619
+ * @example
4620
+ * ```js
4621
+ * // Drill down from answer context
4622
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4623
+ * appEmbed.trigger(HostEvent.DrillDown, {
4624
+ * points: { clickedPoint, selectedPoints },
4625
+ * autoDrillDown: true
4626
+ * }, ContextType.Answer);
4627
+ * ```
4628
+ * @example
4629
+ * ```js
4630
+ * // Drill down from search context
4631
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4632
+ * searchEmbed.trigger(HostEvent.DrillDown, {
4633
+ * points: { clickedPoint, selectedPoints },
4634
+ * columnGuid: "column-guid"
4635
+ * }, ContextType.Search);
4636
+ * ```
4502
4637
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
4503
4638
  */
4504
4639
  DrillDown = "triggerDrillDown",
@@ -4519,6 +4654,13 @@ export declare enum HostEvent {
4519
4654
  * const url = embed.trigger(HostEvent.GetIframeUrl);
4520
4655
  * console.log("iFrameURL",url);
4521
4656
  * ```
4657
+ * @example
4658
+ * ```js
4659
+ * // Get iframe URL from specific context
4660
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4661
+ * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
4662
+ * console.log("iFrameURL", url);
4663
+ * ```
4522
4664
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
4523
4665
  */
4524
4666
  GetIframeUrl = "GetIframeUrl",
@@ -4532,6 +4674,15 @@ export declare enum HostEvent {
4532
4674
  * '730496d6-6903-4601-937e-2c691821af3c',
4533
4675
  * 'd547ec54-2a37-4516-a222-2b06719af726'])
4534
4676
  * ```
4677
+ * @example
4678
+ * ```js
4679
+ * // Set visible vizs from liveboard context
4680
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4681
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
4682
+ * '730496d6-6903-4601-937e-2c691821af3c',
4683
+ * 'd547ec54-2a37-4516-a222-2b06719af726'
4684
+ * ], ContextType.Liveboard);
4685
+ * ```
4535
4686
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
4536
4687
  */
4537
4688
  SetVisibleVizs = "SetPinboardVisibleVizs",
@@ -4544,6 +4695,14 @@ export declare enum HostEvent {
4544
4695
  * tabId:'730496d6-6903-4601-937e-2c691821af3c'
4545
4696
  * })
4546
4697
  * ```
4698
+ * @example
4699
+ * ```js
4700
+ * // Set active tab from liveboard context
4701
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4702
+ * liveboardEmbed.trigger(HostEvent.SetActiveTab, {
4703
+ * tabId: '730496d6-6903-4601-937e-2c691821af3c'
4704
+ * }, ContextType.Liveboard);
4705
+ * ```
4547
4706
  * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
4548
4707
  */
4549
4708
  SetActiveTab = "SetActiveTab",
@@ -4577,6 +4736,15 @@ export declare enum HostEvent {
4577
4736
  * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
4578
4737
  * ])
4579
4738
  * ```
4739
+ * @example
4740
+ * ```js
4741
+ * // Update runtime filters from liveboard context
4742
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4743
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
4744
+ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
4745
+ * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
4746
+ * ], ContextType.Liveboard);
4747
+ * ```
4580
4748
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
4581
4749
  * @important
4582
4750
  */
@@ -4610,6 +4778,14 @@ export declare enum HostEvent {
4610
4778
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
4611
4779
  * { column: {columnId: '<column-GUID>'}})
4612
4780
  * ```
4781
+ * @example
4782
+ * ```js
4783
+ * // Open filter from search context
4784
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4785
+ * searchEmbed.trigger(HostEvent.OpenFilter, {
4786
+ * column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
4787
+ * }, ContextType.Search);
4788
+ * ```
4613
4789
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4614
4790
  */
4615
4791
  OpenFilter = "openFilter",
@@ -4620,6 +4796,14 @@ export declare enum HostEvent {
4620
4796
  * ```js
4621
4797
  * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
4622
4798
  * ```
4799
+ * @example
4800
+ * ```js
4801
+ * // Add columns from search context
4802
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4803
+ * searchEmbed.trigger(HostEvent.AddColumns, {
4804
+ * columnIds: ['col-guid-1', 'col-guid-2']
4805
+ * }, ContextType.Search);
4806
+ * ```
4623
4807
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4624
4808
  */
4625
4809
  AddColumns = "addColumns",
@@ -4630,6 +4814,14 @@ export declare enum HostEvent {
4630
4814
  * ```js
4631
4815
  * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
4632
4816
  * ```
4817
+ * @example
4818
+ * ```js
4819
+ * // Remove column from search context
4820
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4821
+ * searchEmbed.trigger(HostEvent.RemoveColumn, {
4822
+ * columnId: 'column-guid'
4823
+ * }, ContextType.Search);
4824
+ * ```
4633
4825
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4634
4826
  */
4635
4827
  RemoveColumn = "removeColumn",
@@ -4716,6 +4908,37 @@ export declare enum HostEvent {
4716
4908
  *
4717
4909
  * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
4718
4910
  * ```
4911
+ * @example
4912
+ * ```js
4913
+ * // Using context parameter to specify the context type (SDK: 1.45.2+)
4914
+ * // Pin from a search answer context
4915
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4916
+ * appEmbed.trigger(HostEvent.Pin, {
4917
+ * vizId: "123",
4918
+ * newVizName: "Sales by region",
4919
+ * liveboardId: "456"
4920
+ * }, ContextType.Search);
4921
+ * ```
4922
+ * @example
4923
+ * ```js
4924
+ * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
4925
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4926
+ * appEmbed.trigger(HostEvent.Pin, {
4927
+ * vizId: "789",
4928
+ * newVizName: "Revenue trends",
4929
+ * liveboardId: "456"
4930
+ * }, ContextType.Answer);
4931
+ * ```
4932
+ * @example
4933
+ * ```js
4934
+ * // Pin from a spotter context (SDK: 1.45.2+)
4935
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4936
+ * appEmbed.trigger(HostEvent.Pin, {
4937
+ * vizId: latestSpotterVizId,
4938
+ * newVizName: "AI-generated insights",
4939
+ * liveboardId: "456"
4940
+ * }, ContextType.Spotter);
4941
+ * ```
4719
4942
  *
4720
4943
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4721
4944
  */
@@ -4726,6 +4949,12 @@ export declare enum HostEvent {
4726
4949
  * @example
4727
4950
  * ```js
4728
4951
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
4952
+ *```
4953
+ * @example
4954
+ * ```js
4955
+ * // Show liveboard info from liveboard context
4956
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4957
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
4729
4958
  * ```
4730
4959
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4731
4960
  */
@@ -4736,6 +4965,12 @@ export declare enum HostEvent {
4736
4965
  * ```js
4737
4966
  * liveboardEmbed.trigger(HostEvent.Schedule)
4738
4967
  * ```
4968
+ * @example
4969
+ * ```js
4970
+ * // Schedule from liveboard context
4971
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4972
+ * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
4973
+ * ```
4739
4974
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4740
4975
  */
4741
4976
  Schedule = "subscription",
@@ -4745,6 +4980,12 @@ export declare enum HostEvent {
4745
4980
  * ```js
4746
4981
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
4747
4982
  * ```
4983
+ * @example
4984
+ * ```js
4985
+ * // Manage schedules from liveboard context
4986
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4987
+ * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
4988
+ * ```
4748
4989
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4749
4990
  */
4750
4991
  SchedulesList = "schedule-list",
@@ -4755,6 +4996,18 @@ export declare enum HostEvent {
4755
4996
  * ```js
4756
4997
  * liveboardEmbed.trigger(HostEvent.ExportTML)
4757
4998
  * ```
4999
+ * @example
5000
+ * ```js
5001
+ * // Export TML from liveboard context
5002
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5003
+ * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
5004
+ * ```
5005
+ * @example
5006
+ * ```js
5007
+ * // Export TML from search-answer context
5008
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5009
+ * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
5010
+ * ```
4758
5011
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4759
5012
  */
4760
5013
  ExportTML = "exportTSL",
@@ -4765,6 +5018,18 @@ export declare enum HostEvent {
4765
5018
  * ```js
4766
5019
  * liveboardEmbed.trigger(HostEvent.EditTML)
4767
5020
  * ```
5021
+ * @example
5022
+ * ```js
5023
+ * // Edit TML from liveboard context
5024
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5025
+ * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
5026
+ * ```
5027
+ * @example
5028
+ * ```js
5029
+ * // Edit TML from search-answer context
5030
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5031
+ * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
5032
+ * ```
4768
5033
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4769
5034
  */
4770
5035
  EditTML = "editTSL",
@@ -4774,6 +5039,12 @@ export declare enum HostEvent {
4774
5039
  * ```js
4775
5040
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
4776
5041
  * ```
5042
+ * @example
5043
+ * ```js
5044
+ * // Update TML from liveboard context
5045
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5046
+ * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
5047
+ * ```
4777
5048
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4778
5049
  */
4779
5050
  UpdateTML = "updateTSL",
@@ -4800,6 +5071,18 @@ export declare enum HostEvent {
4800
5071
  *
4801
5072
  * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
4802
5073
  * ```
5074
+ * @example
5075
+ * ```js
5076
+ * // Download as PDF from search-answer context
5077
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5078
+ * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
5079
+ * ```
5080
+ * @example
5081
+ * ```js
5082
+ * // Download as PDF from liveboard context
5083
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5084
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
5085
+ * ```
4803
5086
  *
4804
5087
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4805
5088
  */
@@ -4844,6 +5127,18 @@ export declare enum HostEvent {
4844
5127
  *
4845
5128
  * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
4846
5129
  * ```
5130
+ * @example
5131
+ * ```js
5132
+ * // Make a copy from answer context
5133
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5134
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
5135
+ * ```
5136
+ * @example
5137
+ * ```js
5138
+ * // Make a copy from search context
5139
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5140
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
5141
+ * ```
4847
5142
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4848
5143
  */
4849
5144
  MakeACopy = "makeACopy",
@@ -4868,6 +5163,14 @@ export declare enum HostEvent {
4868
5163
  * ```js
4869
5164
  * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
4870
5165
  * ```
5166
+ * @example
5167
+ * ```js
5168
+ * // Explore from liveboard context
5169
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5170
+ * liveboardEmbed.trigger(HostEvent.Explore, {
5171
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5172
+ * }, ContextType.Liveboard);
5173
+ * ```
4871
5174
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4872
5175
  */
4873
5176
  Explore = "explore",
@@ -4885,6 +5188,20 @@ export declare enum HostEvent {
4885
5188
  * ```js
4886
5189
  * searchEmbed.trigger(HostEvent.CreateMonitor)
4887
5190
  * ```
5191
+ * @example
5192
+ * ```js
5193
+ * // Create monitor from answer context
5194
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5195
+ * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
5196
+ * ```
5197
+ * @example
5198
+ * ```js
5199
+ * // Create monitor from liveboard context
5200
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5201
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor, {
5202
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5203
+ * }, ContextType.Liveboard);
5204
+ * ```
4888
5205
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4889
5206
  */
4890
5207
  CreateMonitor = "createMonitor",
@@ -4906,6 +5223,20 @@ export declare enum HostEvent {
4906
5223
  * ```js
4907
5224
  * vizEmbed.trigger(HostEvent.ManageMonitor)
4908
5225
  * ```
5226
+ * @example
5227
+ * ```js
5228
+ * // Manage monitor from answer context
5229
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5230
+ * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
5231
+ * ```
5232
+ * @example
5233
+ * ```js
5234
+ * // Manage monitor from liveboard context
5235
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5236
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
5237
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5238
+ * }, ContextType.Liveboard);
5239
+ * ```
4909
5240
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4910
5241
  */
4911
5242
  ManageMonitor = "manageMonitor",
@@ -4931,6 +5262,26 @@ export declare enum HostEvent {
4931
5262
  * ```js
4932
5263
  * spotterEmbed.trigger(HostEvent.Edit);
4933
5264
  * ```
5265
+ * @example
5266
+ * ```js
5267
+ * // Using context parameter to edit liveboard context
5268
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5269
+ * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
5270
+ * ```
5271
+ * @example
5272
+ * ```js
5273
+ * // Edit from search context
5274
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5275
+ * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
5276
+ * ```
5277
+ * * @example
5278
+ * ```js
5279
+ * // Edit from spotter context
5280
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5281
+ * appEmbed.trigger(HostEvent.Edit, {
5282
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5283
+ * }, ContextType.Spotter);
5284
+ * ```
4934
5285
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4935
5286
  */
4936
5287
  Edit = "edit",
@@ -4948,6 +5299,20 @@ export declare enum HostEvent {
4948
5299
  * ```js
4949
5300
  * vizEmbed.trigger(HostEvent.CopyLink)
4950
5301
  * ```
5302
+ * @example
5303
+ * ```js
5304
+ * // Copy link from liveboard context
5305
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5306
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
5307
+ * ```
5308
+ * @example
5309
+ * ```js
5310
+ * // Copy link from liveboard visualization context
5311
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5312
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
5313
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5314
+ * }, ContextType.Liveboard);
5315
+ * ```
4951
5316
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4952
5317
  */
4953
5318
  CopyLink = "embedDocument",
@@ -4965,6 +5330,20 @@ export declare enum HostEvent {
4965
5330
  * ```js
4966
5331
  * vizEmbed.trigger(HostEvent.Present)
4967
5332
  * ```
5333
+ * @example
5334
+ * ```js
5335
+ * // Present from liveboard visualization context
5336
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5337
+ * liveboardEmbed.trigger(HostEvent.Present, {
5338
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5339
+ * }, ContextType.Liveboard);
5340
+ * ```
5341
+ * @example
5342
+ * ```js
5343
+ * // Present from liveboard context
5344
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5345
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
5346
+ * ```
4968
5347
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4969
5348
  */
4970
5349
  Present = "present",
@@ -4993,6 +5372,22 @@ export declare enum HostEvent {
4993
5372
  * tml.answer.search_query // TML representation of the search query
4994
5373
  * );
4995
5374
  * })
5375
+ * ```
5376
+ * @example
5377
+ * ```js
5378
+ * // Get TML from search context
5379
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5380
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
5381
+ * console.log(tml.answer.search_query);
5382
+ * });
5383
+ * ```
5384
+ * @example
5385
+ * ```js
5386
+ * // Get TML from search-answer context
5387
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5388
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
5389
+ * console.log(tml.answer);
5390
+ * });
4996
5391
  * ```
4997
5392
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
4998
5393
  * @important
@@ -5014,6 +5409,20 @@ export declare enum HostEvent {
5014
5409
  * ```js
5015
5410
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
5016
5411
  * ```
5412
+ * @example
5413
+ * ```js
5414
+ * // Show underlying data from liveboard visualization context
5415
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5416
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {
5417
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5418
+ * }, ContextType.Liveboard);
5419
+ * ```
5420
+ * @example
5421
+ * ```js
5422
+ * // Show underlying data from search context
5423
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5424
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
5425
+ * ```
5017
5426
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5018
5427
  */
5019
5428
  ShowUnderlyingData = "showUnderlyingData",
@@ -5031,6 +5440,18 @@ export declare enum HostEvent {
5031
5440
  * ```js
5032
5441
  * searchEmbed.trigger(HostEvent.Delete)
5033
5442
  * ```
5443
+ * @example
5444
+ * ```js
5445
+ * // Delete from liveboard context
5446
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5447
+ * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
5448
+ * ```
5449
+ * @example
5450
+ * ```js
5451
+ * // Delete from search context
5452
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5453
+ * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
5454
+ * ```
5034
5455
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5035
5456
  */
5036
5457
  Delete = "onDeleteAnswer",
@@ -5051,6 +5472,20 @@ export declare enum HostEvent {
5051
5472
  * ```js
5052
5473
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
5053
5474
  * ```
5475
+ * @example
5476
+ * ```js
5477
+ * // SpotIQ analyze from search-answer context
5478
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5479
+ * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
5480
+ * ```
5481
+ * @example
5482
+ * ```js
5483
+ * // SpotIQ analyze from search context
5484
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5485
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
5486
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5487
+ * }, ContextType.Liveboard);
5488
+ * ```
5054
5489
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5055
5490
  */
5056
5491
  SpotIQAnalyze = "spotIQAnalyze",
@@ -5102,6 +5537,12 @@ export declare enum HostEvent {
5102
5537
  *
5103
5538
  * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
5104
5539
  * ```
5540
+ * @example
5541
+ * ```js
5542
+ * // Download as PNG from search-answer context
5543
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5544
+ * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
5545
+ * ```
5105
5546
  *
5106
5547
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
5107
5548
  */
@@ -5130,6 +5571,18 @@ export declare enum HostEvent {
5130
5571
  *
5131
5572
  * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
5132
5573
  * ```
5574
+ * @example
5575
+ * ```js
5576
+ * // Download as CSV from search-answer context
5577
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5578
+ * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
5579
+ * ```
5580
+ * @example
5581
+ * ```js
5582
+ * // Download as CSV from search context
5583
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5584
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
5585
+ * ```
5133
5586
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5134
5587
  */
5135
5588
  DownloadAsCsv = "downloadAsCSV",
@@ -5157,6 +5610,18 @@ export declare enum HostEvent {
5157
5610
  *
5158
5611
  * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
5159
5612
  * ```
5613
+ * @example
5614
+ * ```js
5615
+ * // Download as XLSX from answer context
5616
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5617
+ * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
5618
+ * ```
5619
+ * @example
5620
+ * ```js
5621
+ * // Download as XLSX from search context
5622
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5623
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
5624
+ * ```
5160
5625
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5161
5626
  */
5162
5627
  DownloadAsXlsx = "downloadAsXLSX",
@@ -5170,6 +5635,18 @@ export declare enum HostEvent {
5170
5635
  * ```js
5171
5636
  * searchEmbed.trigger(HostEvent.Share)
5172
5637
  * ```
5638
+ * @example
5639
+ * ```js
5640
+ * // Share from Liveboard context
5641
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5642
+ * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
5643
+ * ```
5644
+ * @example
5645
+ * ```js
5646
+ * // Share from search-answer context
5647
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5648
+ * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
5649
+ * ```
5173
5650
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5174
5651
  */
5175
5652
  Share = "share",
@@ -5209,6 +5686,18 @@ export declare enum HostEvent {
5209
5686
  *
5210
5687
  * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
5211
5688
  * ```
5689
+ * @example
5690
+ * ```js
5691
+ * // Save from answer context
5692
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5693
+ * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
5694
+ * ```
5695
+ * @example
5696
+ * ```js
5697
+ * // Save from search context
5698
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5699
+ * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
5700
+ * ```
5212
5701
  *
5213
5702
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5214
5703
  */
@@ -5225,6 +5714,20 @@ export declare enum HostEvent {
5225
5714
  * ```js
5226
5715
  * vizEmbed.trigger(HostEvent.SyncToSheets)
5227
5716
  * ```
5717
+ * @example
5718
+ * ```js
5719
+ * // Sync to sheets from answer context
5720
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5721
+ * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
5722
+ * ```
5723
+ * @example
5724
+ * ```js
5725
+ * // Sync to sheets from liveboard context
5726
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5727
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {
5728
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5729
+ * }, ContextType.Liveboard);
5730
+ * ```
5228
5731
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5229
5732
  */
5230
5733
  SyncToSheets = "sync-to-sheets",
@@ -5241,6 +5744,20 @@ export declare enum HostEvent {
5241
5744
  * ```js
5242
5745
  * vizEmbed.trigger(HostEvent.SyncToOtherApps)
5243
5746
  * ```
5747
+ * @example
5748
+ * ```js
5749
+ * // Sync to other apps from answer context
5750
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5751
+ * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
5752
+ * ```
5753
+ * @example
5754
+ * ```js
5755
+ * // Sync to other apps from liveboard context
5756
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5757
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
5758
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5759
+ * }, ContextType.Liveboard);
5760
+ * ```
5244
5761
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5245
5762
  */
5246
5763
  SyncToOtherApps = "sync-to-other-apps",
@@ -5257,6 +5774,20 @@ export declare enum HostEvent {
5257
5774
  * ```js
5258
5775
  * vizEmbed.trigger(HostEvent.ManagePipelines)
5259
5776
  * ```
5777
+ * @example
5778
+ * ```js
5779
+ * // Manage pipelines from answer context
5780
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5781
+ * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
5782
+ * ```
5783
+ * @example
5784
+ * ```js
5785
+ * // Manage pipelines from liveboard context
5786
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5787
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {
5788
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5789
+ * }, ContextType.Liveboard);
5790
+ * ```
5260
5791
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5261
5792
  */
5262
5793
  ManagePipelines = "manage-pipeline",
@@ -5269,6 +5800,12 @@ export declare enum HostEvent {
5269
5800
  * ```js
5270
5801
  * appEmbed.trigger(HostEvent.ResetSearch)
5271
5802
  * ```
5803
+ * @example
5804
+ * ```js
5805
+ * // Reset search from search context
5806
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5807
+ * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
5808
+ * ```
5272
5809
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
5273
5810
  */
5274
5811
  ResetSearch = "resetSearch",
@@ -5280,6 +5817,13 @@ export declare enum HostEvent {
5280
5817
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
5281
5818
  * console.log('data', data);
5282
5819
  * ```
5820
+ * @example
5821
+ * ```js
5822
+ * // Get filters from liveboard context
5823
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5824
+ * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
5825
+ * console.log('filters', data);
5826
+ * ```
5283
5827
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5284
5828
  */
5285
5829
  GetFilters = "getFilters",
@@ -5287,7 +5831,8 @@ export declare enum HostEvent {
5287
5831
  * Update one or several filters applied on a Liveboard.
5288
5832
  * @param - Includes the following keys:
5289
5833
  * - `filter`: A single filter object containing column name, filter operator, and
5290
- * values. - `filters`: Multiple filter objects with column name, filter operator,
5834
+ * values.
5835
+ * - `filters`: Multiple filter objects with column name, filter operator,
5291
5836
  * and values for each.
5292
5837
  *
5293
5838
  * Each filter object must include the following attributes:
@@ -5370,6 +5915,18 @@ export declare enum HostEvent {
5370
5915
  * }]
5371
5916
  * });
5372
5917
  * ```
5918
+ * @example
5919
+ * ```js
5920
+ * // Update filters from liveboard context
5921
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5922
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
5923
+ * filter: {
5924
+ * column: "item type",
5925
+ * oper: "IN",
5926
+ * values: ["shoes", "boots"]
5927
+ * }
5928
+ * }, ContextType.Liveboard);
5929
+ * ```
5373
5930
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5374
5931
  */
5375
5932
  UpdateFilters = "updateFilters",
@@ -5383,6 +5940,14 @@ export declare enum HostEvent {
5383
5940
  * );
5384
5941
  * })
5385
5942
  * ```
5943
+ * @example
5944
+ * ```js
5945
+ * // Get tabs from liveboard context
5946
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5947
+ * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
5948
+ * console.log('tabs', tabDetails);
5949
+ * });
5950
+ * ```
5386
5951
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
5387
5952
  */
5388
5953
  GetTabs = "getTabs",
@@ -5396,6 +5961,15 @@ export declare enum HostEvent {
5396
5961
  * '430496d6-6903-4601-937e-2c691821af3c',
5397
5962
  * 'f547ec54-2a37-4516-a222-2b06719af726'])
5398
5963
  * ```
5964
+ * @example
5965
+ * ```js
5966
+ * // Set visible tabs from liveboard context
5967
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5968
+ * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
5969
+ * '430496d6-6903-4601-937e-2c691821af3c',
5970
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
5971
+ * ], ContextType.Liveboard);
5972
+ * ```
5399
5973
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
5400
5974
  */
5401
5975
  SetVisibleTabs = "SetPinboardVisibleTabs",
@@ -5409,6 +5983,15 @@ export declare enum HostEvent {
5409
5983
  * '630496d6-6903-4601-937e-2c691821af3c',
5410
5984
  * 'i547ec54-2a37-4516-a222-2b06719af726'])
5411
5985
  * ```
5986
+ * @example
5987
+ * ```js
5988
+ * // Set hidden tabs from liveboard context
5989
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5990
+ * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
5991
+ * '630496d6-6903-4601-937e-2c691821af3c',
5992
+ * 'i547ec54-2a37-4516-a222-2b06719af726'
5993
+ * ], ContextType.Liveboard);
5994
+ * ```
5412
5995
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
5413
5996
  */
5414
5997
  SetHiddenTabs = "SetPinboardHiddenTabs",
@@ -5485,13 +6068,24 @@ export declare enum HostEvent {
5485
6068
  UpdateCrossFilter = "UpdateCrossFilter",
5486
6069
  /**
5487
6070
  * Trigger reset action for a personalized Liveboard view.
6071
+ * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
5488
6072
  * @example
5489
6073
  * ```js
5490
6074
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
5491
6075
  * ```
5492
6076
  * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
6077
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5493
6078
  */
5494
6079
  ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
6080
+ /**
6081
+ * Trigger reset action for a personalized Liveboard view.
6082
+ * @example
6083
+ * ```js
6084
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
6085
+ * ```
6086
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6087
+ */
6088
+ ResetLiveboardPersonalizedView = "ResetLiveboardPersonalisedView",
5495
6089
  /**
5496
6090
  * Triggers an action to update Parameter values on embedded
5497
6091
  * Answers, Liveboard, and Spotter answer in Edit mode.
@@ -5508,6 +6102,16 @@ export declare enum HostEvent {
5508
6102
  * isVisibleToUser: false
5509
6103
  * }])
5510
6104
  * ```
6105
+ * @example
6106
+ * ```js
6107
+ * // Update parameters from liveboard context
6108
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6109
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
6110
+ * name: "Region Param",
6111
+ * value: "West",
6112
+ * isVisibleToUser: true
6113
+ * }], ContextType.Liveboard);
6114
+ * ```
5511
6115
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
5512
6116
  */
5513
6117
  UpdateParameters = "UpdateParameters",
@@ -5527,18 +6131,77 @@ export declare enum HostEvent {
5527
6131
  * });
5528
6132
  *
5529
6133
  * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
6134
+ *```
6135
+ * @example
6136
+ * ```js
6137
+ * // Get parameters from liveboard context
6138
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6139
+ * liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
6140
+ * console.log('parameters', parameters);
6141
+ * });
5530
6142
  * ```
5531
6143
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
5532
6144
  */
5533
6145
  GetParameters = "GetParameters",
5534
6146
  /**
5535
6147
  * Triggers an event to update a personalized view of a Liveboard.
6148
+ * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
5536
6149
  * ```js
5537
6150
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
5538
6151
  * ```
6152
+ * @example
6153
+ * ```js
6154
+ * // Update personalized view from liveboard context
6155
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6156
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
6157
+ * viewId: '1234'
6158
+ * }, ContextType.Liveboard);
6159
+ * ```
5539
6160
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
6161
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5540
6162
  */
5541
6163
  UpdatePersonalisedView = "UpdatePersonalisedView",
6164
+ /**
6165
+ * Triggers an event to update a personalized view of a Liveboard.
6166
+ * ```js
6167
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
6168
+ * ```
6169
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6170
+ */
6171
+ UpdatePersonalizedView = "UpdatePersonalisedView",
6172
+ /**
6173
+ * Triggers selection of a specific Personalized View on a
6174
+ * Liveboard without reloading the embed. Pass either a
6175
+ * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
6176
+ * If neither is provided, the Liveboard resets to the original/default view.
6177
+ * When a `viewName` is provided and multiple views share
6178
+ * the same name, the first match is selected.
6179
+ * @example
6180
+ * ```js
6181
+ * liveboardEmbed.trigger(
6182
+ * HostEvent.SelectPersonalizedView,
6183
+ * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
6184
+ * )
6185
+ * ```
6186
+ * @example
6187
+ * ```js
6188
+ * // Select by name
6189
+ * liveboardEmbed.trigger(
6190
+ * HostEvent.SelectPersonalizedView,
6191
+ * { viewName: 'Dr Smith Cardiology' },
6192
+ * )
6193
+ * ```
6194
+ * @example
6195
+ * ```js
6196
+ * // Reset to default view
6197
+ * liveboardEmbed.trigger(
6198
+ * HostEvent.SelectPersonalizedView,
6199
+ * {},
6200
+ * )
6201
+ * ```
6202
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6203
+ */
6204
+ SelectPersonalizedView = "SelectPersonalisedView",
5542
6205
  /**
5543
6206
  * @hidden
5544
6207
  * Notify when info call is completed successfully
@@ -5558,7 +6221,8 @@ export declare enum HostEvent {
5558
6221
  * add a name and description for the Answer.
5559
6222
  * @param - Includes the following keys:
5560
6223
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
5561
- * embed. - `name`: Optional. Name string for the Answer.
6224
+ * embed.
6225
+ * - `name`: Optional. Name string for the Answer.
5562
6226
  * - `description`: Optional. Description text for the Answer.
5563
6227
  * @example
5564
6228
  * ```js
@@ -5577,6 +6241,34 @@ export declare enum HostEvent {
5577
6241
  *
5578
6242
  * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
5579
6243
  * ```
6244
+ * @example
6245
+ * ```js
6246
+ * // Using context parameter to save answer from search context
6247
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6248
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6249
+ * name: "Regional sales analysis",
6250
+ * description: "Sales breakdown by region"
6251
+ * }, ContextType.Search);
6252
+ * ```
6253
+ * @example
6254
+ * ```js
6255
+ * // Save answer from answer context (explore modal)
6256
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6257
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6258
+ * name: "Modified analysis",
6259
+ * description: "Updated from explore view"
6260
+ * }, ContextType.Answer);
6261
+ * ```
6262
+ * @example
6263
+ * ```js
6264
+ * // Save answer from spotter context
6265
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6266
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6267
+ * vizId: latestSpotterVizId,
6268
+ * name: "AI insights",
6269
+ * description: "Generated from Spotter"
6270
+ * }, ContextType.Spotter);
6271
+ * ```
5580
6272
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
5581
6273
  */
5582
6274
  SaveAnswer = "saveAnswer",
@@ -5618,6 +6310,15 @@ export declare enum HostEvent {
5618
6310
  * executeSearch: true,
5619
6311
  * })
5620
6312
  * ```
6313
+ * @example
6314
+ * ```js
6315
+ * // Spotter search from spotter context
6316
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6317
+ * spotterEmbed.trigger(HostEvent.SpotterSearch, {
6318
+ * query: 'sales by region',
6319
+ * executeSearch: true
6320
+ * }, ContextType.Spotter);
6321
+ * ```
5621
6322
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5622
6323
  */
5623
6324
  SpotterSearch = "SpotterSearch",
@@ -5628,6 +6329,12 @@ export declare enum HostEvent {
5628
6329
  * ```js
5629
6330
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
5630
6331
  * ```
6332
+ * @example
6333
+ * ```js
6334
+ * // Edit last prompt from spotter context
6335
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6336
+ * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
6337
+ * ```
5631
6338
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5632
6339
  */
5633
6340
  EditLastPrompt = "EditLastPrompt",
@@ -5637,6 +6344,12 @@ export declare enum HostEvent {
5637
6344
  * ```js
5638
6345
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
5639
6346
  * ```
6347
+ * @example
6348
+ * ```js
6349
+ * // Preview spotter data from spotter context
6350
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6351
+ * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
6352
+ * ```
5640
6353
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5641
6354
  */
5642
6355
  PreviewSpotterData = "PreviewSpotterData",
@@ -6749,13 +7462,25 @@ export declare enum Action {
6749
7462
  /**
6750
7463
  * The Liveboard Personalised Views dropdown.
6751
7464
  * Allows navigating to a personalized Liveboard View.
7465
+ * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
6752
7466
  * @example
6753
7467
  * ```js
6754
7468
  * disabledActions: [Action.PersonalisedViewsDropdown]
6755
7469
  * ```
6756
7470
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
7471
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6757
7472
  */
6758
7473
  PersonalisedViewsDropdown = "personalisedViewsDropdown",
7474
+ /**
7475
+ * The Liveboard Personalized Views dropdown.
7476
+ * Allows navigating to a personalized Liveboard View.
7477
+ * @example
7478
+ * ```js
7479
+ * disabledActions: [Action.PersonalizedViewsDropdown]
7480
+ * ```
7481
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7482
+ */
7483
+ PersonalizedViewsDropdown = "personalisedViewsDropdown",
6759
7484
  /**
6760
7485
  * Action ID for show or hide the user details on a
6761
7486
  * Liveboard (Recently visited / social proof)
@@ -6843,14 +7568,27 @@ export declare enum Action {
6843
7568
  /**
6844
7569
  * The **Organize Favourites** action on Homepage
6845
7570
  * *Favorites* module.
7571
+ * This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
6846
7572
  *
6847
7573
  * @example
6848
7574
  * ```js
6849
7575
  * disabledActions: [Action.OrganiseFavourites]
6850
7576
  * ```
6851
7577
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
7578
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6852
7579
  */
6853
7580
  OrganiseFavourites = "organiseFavourites",
7581
+ /**
7582
+ * The **Organize Favorites** action on Homepage
7583
+ * *Favorites* module.
7584
+ *
7585
+ * @example
7586
+ * ```js
7587
+ * disabledActions: [Action.OrganizeFavorites]
7588
+ * ```
7589
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7590
+ */
7591
+ OrganizeFavorites = "organiseFavourites",
6854
7592
  /**
6855
7593
  * The **AI Highlights** action on a Liveboard.
6856
7594
  *
@@ -7569,7 +8307,8 @@ declare enum EmbedErrorCodes {
7569
8307
  *
7570
8308
  * - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
7571
8309
  * - **message**: Human-readable error description (string or array of strings for
7572
- * multiple errors) - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
8310
+ * multiple errors)
8311
+ * - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
7573
8312
  * values
7574
8313
  * - **[key: string]**: Additional context-specific for backward compatibility
7575
8314
  *
@@ -7633,7 +8372,11 @@ declare enum ContextType {
7633
8372
  /**
7634
8373
  * Spotter context for spotter modal/page.
7635
8374
  */
7636
- Spotter = "spotter"
8375
+ Spotter = "spotter",
8376
+ /**
8377
+ * Other context for any other generic page.
8378
+ */
8379
+ Other = "other"
7637
8380
  }
7638
8381
  export interface DefaultAppInitData {
7639
8382
  customisations: CustomisationsInterface;
@@ -7736,33 +8479,6 @@ export interface ObjectIds {
7736
8479
  */
7737
8480
  modalTitle?: string;
7738
8481
  }
7739
- /**
7740
- * Context object for the embedded component.
7741
- * @example
7742
- * ```js
7743
- * const context = await embed.getCurrentContext();
7744
- * console.log(context);
7745
- * {
7746
- * stack: [
7747
- * {
7748
- * name: 'Liveboard',
7749
- * type: ContextType.Liveboard,
7750
- * objectIds: {
7751
- * liveboardId: '123',
7752
- * },
7753
- * },
7754
- * ],
7755
- * currentContext: {
7756
- * name: 'Liveboard',
7757
- * type: ContextType.Liveboard,
7758
- * objectIds: {
7759
- * liveboardId: '123',
7760
- * },
7761
- * },
7762
- * }
7763
- * ```
7764
- * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
7765
- */
7766
8482
  export interface ContextObject {
7767
8483
  /**
7768
8484
  * Stack of context objects.
@@ -7817,7 +8533,8 @@ export declare enum AuthFailureType {
7817
8533
  /**
7818
8534
  * The current authentication token or session has expired.
7819
8535
  *
7820
- * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
8536
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh
8537
+ * handling.
7821
8538
  */
7822
8539
  EXPIRY = "EXPIRY",
7823
8540
  /**
@@ -7953,6 +8670,11 @@ export declare enum AuthEvent {
7953
8670
  */
7954
8671
  TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
7955
8672
  }
8673
+ export interface LiveboardTab {
8674
+ id: string;
8675
+ name: string;
8676
+ [key: string]: any;
8677
+ }
7956
8678
  export declare enum UIPassthroughEvent {
7957
8679
  PinAnswerToLiveboard = "addVizToPinboard",
7958
8680
  SaveAnswer = "saveAnswer",
@@ -7960,7 +8682,14 @@ export declare enum UIPassthroughEvent {
7960
8682
  GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
7961
8683
  GetAnswerConfig = "getAnswerPageConfig",
7962
8684
  GetLiveboardConfig = "getPinboardPageConfig",
7963
- GetUnsavedAnswerTML = "getUnsavedAnswerTML"
8685
+ GetUnsavedAnswerTML = "getUnsavedAnswerTML",
8686
+ GetAnswerSession = "getAnswerSession",
8687
+ GetFilters = "getFilters",
8688
+ GetIframeUrl = "getIframeUrl",
8689
+ GetParameters = "getParameters",
8690
+ GetTML = "getTML",
8691
+ GetTabs = "getTabs",
8692
+ GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
7964
8693
  }
7965
8694
  export type UIPassthroughContractBase = {
7966
8695
  [UIPassthroughEvent.PinAnswerToLiveboard]: {
@@ -8024,17 +8753,75 @@ export type UIPassthroughContractBase = {
8024
8753
  tml: string;
8025
8754
  };
8026
8755
  };
8756
+ [UIPassthroughEvent.GetAnswerSession]: {
8757
+ request: {
8758
+ vizId?: string;
8759
+ };
8760
+ response: {
8761
+ session: SessionInterface;
8762
+ embedAnswerData?: Record<string, any>;
8763
+ };
8764
+ };
8765
+ [UIPassthroughEvent.GetFilters]: {
8766
+ request: {
8767
+ vizId?: string;
8768
+ };
8769
+ response: {
8770
+ liveboardFilters: Record<string, any>[];
8771
+ runtimeFilters: RuntimeFilter[];
8772
+ };
8773
+ };
8774
+ [UIPassthroughEvent.GetIframeUrl]: {
8775
+ request: Record<string, never>;
8776
+ response: {
8777
+ iframeUrl: string;
8778
+ };
8779
+ };
8780
+ [UIPassthroughEvent.GetParameters]: {
8781
+ request: Record<string, never>;
8782
+ response: {
8783
+ parameters: Record<string, any>[];
8784
+ };
8785
+ };
8786
+ [UIPassthroughEvent.GetTML]: {
8787
+ request: {
8788
+ vizId?: string;
8789
+ includeNonExecutedSearchTokens?: boolean;
8790
+ };
8791
+ response: Record<string, any>;
8792
+ };
8793
+ [UIPassthroughEvent.GetTabs]: {
8794
+ request: Record<string, never>;
8795
+ response: {
8796
+ orderedTabIds: string[];
8797
+ numberOfTabs: number;
8798
+ Tabs: LiveboardTab[];
8799
+ };
8800
+ };
8801
+ [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
8802
+ request: Record<string, never>;
8803
+ response: {
8804
+ v2Content: string;
8805
+ };
8806
+ };
8027
8807
  };
8028
8808
  export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
8029
8809
  export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
8030
8810
  export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
8031
- redId?: string;
8811
+ refId?: string;
8032
8812
  value?: UIPassthroughResponse<ApiName>;
8033
8813
  error?: any;
8034
8814
  }>;
8035
8815
  export type EmbedApiHostEventMapping = {
8036
8816
  [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
8037
8817
  [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
8818
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
8819
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
8820
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
8821
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
8822
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
8823
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
8824
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
8038
8825
  };
8039
8826
  export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
8040
8827
  export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
@@ -8042,6 +8829,10 @@ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT |
8042
8829
  export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
8043
8830
  declare class HostEventClient {
8044
8831
  iFrame: HTMLIFrameElement;
8832
+ /** Host events with custom handlers
8833
+ * (setters or special logic) -
8834
+ * bound to instance for protected method access */
8835
+ private readonly customHandlers;
8045
8836
  constructor(iFrame?: HTMLIFrameElement);
8046
8837
  /**
8047
8838
  * A wrapper over process trigger to
@@ -8052,6 +8843,12 @@ declare class HostEventClient {
8052
8843
  protected processTrigger(message: HostEvent, data: any, context?: ContextType): Promise<any>;
8053
8844
  handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>, context?: ContextType): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
8054
8845
  hostEventFallback(hostEvent: HostEvent, data: any, context?: ContextType): Promise<any>;
8846
+ /**
8847
+ * For getter events that return data. Tries UI passthrough first;
8848
+ * if the app doesn't support it (no response data), falls back to
8849
+ * the legacy host event channel. Real errors are thrown as-is.
8850
+ */
8851
+ private getDataWithPassthroughFallback;
8055
8852
  /**
8056
8853
  * Setter for the iframe element used for host events
8057
8854
  * @param {HTMLIFrameElement} iFrame - the iframe element to set
@@ -8395,7 +9192,21 @@ declare class TsEmbed {
8395
9192
  * Triggers an event to the embedded app
8396
9193
  * @param {HostEvent} messageType The event type
8397
9194
  * @param {any} data The payload to send with the message
9195
+ * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
9196
+ * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
9197
+ * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
9198
+ * Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
8398
9199
  * @returns A promise that resolves with the response from the embedded app
9200
+ * @example
9201
+ * ```js
9202
+ * // Trigger Pin event with context (SDK: 1.45.2+)
9203
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
9204
+ * embed.trigger(HostEvent.Pin, {
9205
+ * vizId: "123",
9206
+ * liveboardId: "456"
9207
+ * }, ContextType.Search);
9208
+ * ```
9209
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
8399
9210
  */
8400
9211
  trigger<HostEventT extends HostEvent, PayloadT, ContextT extends ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
8401
9212
  /**
@@ -8416,8 +9227,33 @@ declare class TsEmbed {
8416
9227
  getIframeSrc(): string;
8417
9228
  protected handleRenderForPrerender(): Promise<TsEmbed>;
8418
9229
  /**
8419
- * Get the current context of the embedded TS component.
8420
- * @returns The current context object containing the page type and object ids.
9230
+ * Context object for the embedded component.
9231
+ * @returns {ContextObject} The current context object containing the page type and object ids.
9232
+ * @example
9233
+ * ```js
9234
+ * const context = await embed.getCurrentContext();
9235
+ * console.log(context);
9236
+ *
9237
+ * // Example output
9238
+ * {
9239
+ * stack: [
9240
+ * {
9241
+ * name: 'Liveboard',
9242
+ * type: ContextType.Liveboard,
9243
+ * objectIds: {
9244
+ * liveboardId: '123',
9245
+ * },
9246
+ * },
9247
+ * ],
9248
+ * currentContext: {
9249
+ * name: 'Liveboard',
9250
+ * type: ContextType.Liveboard,
9251
+ * objectIds: {
9252
+ * liveboardId: '123',
9253
+ * },
9254
+ * },
9255
+ * }
9256
+ * ```
8421
9257
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
8422
9258
  */
8423
9259
  getCurrentContext(): Promise<ContextObject>;
@@ -10183,6 +11019,7 @@ declare class AppEmbed extends V1Embed {
10183
11019
  * @param pageId The ID of the page to be embedded.
10184
11020
  */
10185
11021
  getIFrameSrc(): string;
11022
+ private HEIGHT_CHANAGE_THRESHOLD;
10186
11023
  /**
10187
11024
  * Set the iframe height as per the computed height received
10188
11025
  * from the ThoughtSpot app.
@@ -10727,6 +11564,7 @@ declare class LiveboardEmbed extends V1Embed {
10727
11564
  * to be loaded within the iFrame.
10728
11565
  */
10729
11566
  private getIFrameSrc;
11567
+ private HEIGHT_CHANAGE_THRESHOLD;
10730
11568
  /**
10731
11569
  * Set the iframe height as per the computed height received
10732
11570
  * from the ThoughtSpot app.