@thoughtspot/visual-embed-sdk 1.46.4 → 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 +2 -2
  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-DGV_zh53.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 +2 -2
  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 +912 -56
  150. package/package.json +2 -2
  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
  /**
@@ -3942,22 +3976,45 @@ export declare enum EmbedEvent {
3942
3976
  /**
3943
3977
  * Emitted when name, status (private or public) or filter values of a
3944
3978
  * Personalised view is updated.
3979
+ * This event is deprecated. Use {@link EmbedEvent.UpdatePersonalizedView} instead.
3945
3980
  * @returns viewName: string
3946
3981
  * @returns viewId: string
3947
3982
  * @returns liveboardId: string
3948
3983
  * @returns isPublic: boolean
3949
3984
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
3985
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3950
3986
  */
3951
3987
  UpdatePersonalisedView = "updatePersonalisedView",
3988
+ /**
3989
+ * Emitted when name, status (private or public) or filter values of a
3990
+ * Personalized view is updated.
3991
+ * @returns viewName: string
3992
+ * @returns viewId: string
3993
+ * @returns liveboardId: string
3994
+ * @returns isPublic: boolean
3995
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3996
+ */
3997
+ UpdatePersonalizedView = "updatePersonalisedView",
3952
3998
  /**
3953
3999
  * Emitted when a Personalised view is saved.
4000
+ * This event is deprecated. Use {@link EmbedEvent.SavePersonalizedView} instead.
3954
4001
  * @returns viewName: string
3955
4002
  * @returns viewId: string
3956
4003
  * @returns liveboardId: string
3957
4004
  * @returns isPublic: boolean
3958
4005
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
4006
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3959
4007
  */
3960
4008
  SavePersonalisedView = "savePersonalisedView",
4009
+ /**
4010
+ * Emitted when a Personalized view is saved.
4011
+ * @returns viewName: string
4012
+ * @returns viewId: string
4013
+ * @returns liveboardId: string
4014
+ * @returns isPublic: boolean
4015
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4016
+ */
4017
+ SavePersonalizedView = "savePersonalisedView",
3961
4018
  /**
3962
4019
  * Emitted when a Liveboard is reset.
3963
4020
  * @returns viewName: string
@@ -3969,11 +4026,41 @@ export declare enum EmbedEvent {
3969
4026
  ResetLiveboard = "resetLiveboard",
3970
4027
  /**
3971
4028
  * Emitted when a PersonalisedView is deleted.
4029
+ * This event is deprecated. Use {@link EmbedEvent.DeletePersonalizedView} instead.
3972
4030
  * @returns views: string[]
3973
4031
  * @returns liveboardId: string
3974
4032
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
4033
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
3975
4034
  */
3976
4035
  DeletePersonalisedView = "deletePersonalisedView",
4036
+ /**
4037
+ * Emitted when a PersonalizedView is deleted.
4038
+ * @returns views: string[]
4039
+ * @returns liveboardId: string
4040
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4041
+ */
4042
+ DeletePersonalizedView = "deletePersonalisedView",
4043
+ /**
4044
+ * Emitted when a user selects a different Personalized View or
4045
+ * resets to the original/default view on a Liveboard.
4046
+ * @example
4047
+ * ```js
4048
+ * liveboardEmbed.on(EmbedEvent.ChangePersonalizedView, (data) => {
4049
+ * console.log(data.viewName); // 'Q4 Revenue' or 'Original View'
4050
+ * console.log(data.viewId); // '2a021a12-...' or null (default)
4051
+ * console.log(data.liveboardId); // 'abc123...'
4052
+ * console.log(data.isPublic); // true | false
4053
+ * })
4054
+ * ```
4055
+ * @returns viewName: string - Name of the selected view,
4056
+ * or 'Original View' when reset to default.
4057
+ * @returns viewId: string | null - GUID of the selected view,
4058
+ * or null when reset to default.
4059
+ * @returns liveboardId: string
4060
+ * @returns isPublic: boolean
4061
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
4062
+ */
4063
+ ChangePersonalizedView = "changePersonalisedView",
3977
4064
  /**
3978
4065
  * Emitted when a user creates a Worksheet.
3979
4066
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
@@ -4007,7 +4094,8 @@ export declare enum EmbedEvent {
4007
4094
  * @param - Includes the following parameters:
4008
4095
  * - `payload`: The payload received from the embed related to the Data API call.
4009
4096
  * - `responder`: Contains elements that let developers define whether ThoughtSpot
4010
- * will run or block the search operation, and if blocked, which error message to provide.
4097
+ * will run or block the search operation, and if blocked, which error message to
4098
+ * provide.
4011
4099
  * - `execute` - When `execute` returns `true`, the search is run.
4012
4100
  * When `execute` returns `false`, the search is not executed.
4013
4101
  * - `error` - Developers can customize the user-facing error message when `execute`
@@ -4441,6 +4529,25 @@ export declare enum EmbedEvent {
4441
4529
  * );
4442
4530
  * }
4443
4531
  * ```
4532
+ *
4533
+ * **Context Parameter (SDK: 1.45.2+)**
4534
+ *
4535
+ * Starting from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl, you can optionally pass a
4536
+ * `ContextType` as the third parameter to the `trigger` method to specify the context
4537
+ * from which the event is triggered. This helps ThoughtSpot understand the current page
4538
+ * context (Search, Answer, Liveboard, or Spotter) for better event handling.
4539
+ *
4540
+ * @example
4541
+ * ```js
4542
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
4543
+ *
4544
+ * // Trigger Pin event with Search context
4545
+ * appEmbed.trigger(HostEvent.Pin, {
4546
+ * vizId: "123",
4547
+ * liveboardId: "456"
4548
+ * }, ContextType.Search);
4549
+ * ```
4550
+ *
4444
4551
  * @group Events
4445
4552
  */
4446
4553
  export declare enum HostEvent {
@@ -4462,6 +4569,16 @@ export declare enum HostEvent {
4462
4569
  execute: true
4463
4570
  });
4464
4571
  * ```
4572
+ * @example
4573
+ * ```js
4574
+ * // Trigger search from search context
4575
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4576
+ * appEmbed.trigger(HostEvent.Search, {
4577
+ * searchQuery: "[revenue] by [region]",
4578
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"],
4579
+ * execute: true
4580
+ * }, ContextType.Search);
4581
+ * ```
4465
4582
  */
4466
4583
  Search = "search",
4467
4584
  /**
@@ -4512,6 +4629,24 @@ export declare enum HostEvent {
4512
4629
  * });
4513
4630
  * })
4514
4631
  * ```
4632
+ * @example
4633
+ * ```js
4634
+ * // Drill down from answer context
4635
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4636
+ * appEmbed.trigger(HostEvent.DrillDown, {
4637
+ * points: { clickedPoint, selectedPoints },
4638
+ * autoDrillDown: true
4639
+ * }, ContextType.Answer);
4640
+ * ```
4641
+ * @example
4642
+ * ```js
4643
+ * // Drill down from search context
4644
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4645
+ * searchEmbed.trigger(HostEvent.DrillDown, {
4646
+ * points: { clickedPoint, selectedPoints },
4647
+ * columnGuid: "column-guid"
4648
+ * }, ContextType.Search);
4649
+ * ```
4515
4650
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
4516
4651
  */
4517
4652
  DrillDown = "triggerDrillDown",
@@ -4532,6 +4667,13 @@ export declare enum HostEvent {
4532
4667
  * const url = embed.trigger(HostEvent.GetIframeUrl);
4533
4668
  * console.log("iFrameURL",url);
4534
4669
  * ```
4670
+ * @example
4671
+ * ```js
4672
+ * // Get iframe URL from specific context
4673
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4674
+ * const url = await appEmbed.trigger(HostEvent.GetIframeUrl, {}, ContextType.Answer);
4675
+ * console.log("iFrameURL", url);
4676
+ * ```
4535
4677
  * @version SDK: 1.35.0 | ThoughtSpot: 10.4.0.cl
4536
4678
  */
4537
4679
  GetIframeUrl = "GetIframeUrl",
@@ -4545,6 +4687,15 @@ export declare enum HostEvent {
4545
4687
  * '730496d6-6903-4601-937e-2c691821af3c',
4546
4688
  * 'd547ec54-2a37-4516-a222-2b06719af726'])
4547
4689
  * ```
4690
+ * @example
4691
+ * ```js
4692
+ * // Set visible vizs from liveboard context
4693
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4694
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
4695
+ * '730496d6-6903-4601-937e-2c691821af3c',
4696
+ * 'd547ec54-2a37-4516-a222-2b06719af726'
4697
+ * ], ContextType.Liveboard);
4698
+ * ```
4548
4699
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
4549
4700
  */
4550
4701
  SetVisibleVizs = "SetPinboardVisibleVizs",
@@ -4557,6 +4708,14 @@ export declare enum HostEvent {
4557
4708
  * tabId:'730496d6-6903-4601-937e-2c691821af3c'
4558
4709
  * })
4559
4710
  * ```
4711
+ * @example
4712
+ * ```js
4713
+ * // Set active tab from liveboard context
4714
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4715
+ * liveboardEmbed.trigger(HostEvent.SetActiveTab, {
4716
+ * tabId: '730496d6-6903-4601-937e-2c691821af3c'
4717
+ * }, ContextType.Liveboard);
4718
+ * ```
4560
4719
  * @version SDK: 1.24.0 | ThoughtSpot: 9.5.0.cl, 9.5.1-sw
4561
4720
  */
4562
4721
  SetActiveTab = "SetActiveTab",
@@ -4590,6 +4749,15 @@ export declare enum HostEvent {
4590
4749
  * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
4591
4750
  * ])
4592
4751
  * ```
4752
+ * @example
4753
+ * ```js
4754
+ * // Update runtime filters from liveboard context
4755
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4756
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
4757
+ * {columnName: "region", operator: RuntimeFilterOp.EQ, values: ["west"]},
4758
+ * {columnName: "product", operator: RuntimeFilterOp.IN, values: ["shoes", "boots"]}
4759
+ * ], ContextType.Liveboard);
4760
+ * ```
4593
4761
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
4594
4762
  * @important
4595
4763
  */
@@ -4623,6 +4791,14 @@ export declare enum HostEvent {
4623
4791
  * LiveboardEmbed.trigger(HostEvent.OpenFilter,
4624
4792
  * { column: {columnId: '<column-GUID>'}})
4625
4793
  * ```
4794
+ * @example
4795
+ * ```js
4796
+ * // Open filter from search context
4797
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4798
+ * searchEmbed.trigger(HostEvent.OpenFilter, {
4799
+ * column: { columnId: '<column-GUID>', name: 'region', type: 'ATTRIBUTE', dataType: 'CHAR'}
4800
+ * }, ContextType.Search);
4801
+ * ```
4626
4802
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4627
4803
  */
4628
4804
  OpenFilter = "openFilter",
@@ -4633,6 +4809,14 @@ export declare enum HostEvent {
4633
4809
  * ```js
4634
4810
  * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['<column-GUID>','<column-GUID>'] })
4635
4811
  * ```
4812
+ * @example
4813
+ * ```js
4814
+ * // Add columns from search context
4815
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4816
+ * searchEmbed.trigger(HostEvent.AddColumns, {
4817
+ * columnIds: ['col-guid-1', 'col-guid-2']
4818
+ * }, ContextType.Search);
4819
+ * ```
4636
4820
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4637
4821
  */
4638
4822
  AddColumns = "addColumns",
@@ -4643,6 +4827,14 @@ export declare enum HostEvent {
4643
4827
  * ```js
4644
4828
  * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '<column-Guid>' })
4645
4829
  * ```
4830
+ * @example
4831
+ * ```js
4832
+ * // Remove column from search context
4833
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4834
+ * searchEmbed.trigger(HostEvent.RemoveColumn, {
4835
+ * columnId: 'column-guid'
4836
+ * }, ContextType.Search);
4837
+ * ```
4646
4838
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
4647
4839
  */
4648
4840
  RemoveColumn = "removeColumn",
@@ -4729,6 +4921,37 @@ export declare enum HostEvent {
4729
4921
  *
4730
4922
  * spotterEmbed.trigger(HostEvent.Pin, { vizId: latestSpotterVizId });
4731
4923
  * ```
4924
+ * @example
4925
+ * ```js
4926
+ * // Using context parameter to specify the context type (SDK: 1.45.2+)
4927
+ * // Pin from a search answer context
4928
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4929
+ * appEmbed.trigger(HostEvent.Pin, {
4930
+ * vizId: "123",
4931
+ * newVizName: "Sales by region",
4932
+ * liveboardId: "456"
4933
+ * }, ContextType.Search);
4934
+ * ```
4935
+ * @example
4936
+ * ```js
4937
+ * // Pin from an answer context (explore modal/page) (SDK: 1.45.2+)
4938
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4939
+ * appEmbed.trigger(HostEvent.Pin, {
4940
+ * vizId: "789",
4941
+ * newVizName: "Revenue trends",
4942
+ * liveboardId: "456"
4943
+ * }, ContextType.Answer);
4944
+ * ```
4945
+ * @example
4946
+ * ```js
4947
+ * // Pin from a spotter context (SDK: 1.45.2+)
4948
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4949
+ * appEmbed.trigger(HostEvent.Pin, {
4950
+ * vizId: latestSpotterVizId,
4951
+ * newVizName: "AI-generated insights",
4952
+ * liveboardId: "456"
4953
+ * }, ContextType.Spotter);
4954
+ * ```
4732
4955
  *
4733
4956
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4734
4957
  */
@@ -4739,6 +4962,12 @@ export declare enum HostEvent {
4739
4962
  * @example
4740
4963
  * ```js
4741
4964
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
4965
+ *```
4966
+ * @example
4967
+ * ```js
4968
+ * // Show liveboard info from liveboard context
4969
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4970
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo, {}, ContextType.Liveboard);
4742
4971
  * ```
4743
4972
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4744
4973
  */
@@ -4749,6 +4978,12 @@ export declare enum HostEvent {
4749
4978
  * ```js
4750
4979
  * liveboardEmbed.trigger(HostEvent.Schedule)
4751
4980
  * ```
4981
+ * @example
4982
+ * ```js
4983
+ * // Schedule from liveboard context
4984
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
4985
+ * liveboardEmbed.trigger(HostEvent.Schedule, {}, ContextType.Liveboard);
4986
+ * ```
4752
4987
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4753
4988
  */
4754
4989
  Schedule = "subscription",
@@ -4758,6 +4993,12 @@ export declare enum HostEvent {
4758
4993
  * ```js
4759
4994
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
4760
4995
  * ```
4996
+ * @example
4997
+ * ```js
4998
+ * // Manage schedules from liveboard context
4999
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5000
+ * liveboardEmbed.trigger(HostEvent.ScheduleList, {}, ContextType.Liveboard);
5001
+ * ```
4761
5002
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4762
5003
  */
4763
5004
  SchedulesList = "schedule-list",
@@ -4768,6 +5009,18 @@ export declare enum HostEvent {
4768
5009
  * ```js
4769
5010
  * liveboardEmbed.trigger(HostEvent.ExportTML)
4770
5011
  * ```
5012
+ * @example
5013
+ * ```js
5014
+ * // Export TML from liveboard context
5015
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5016
+ * liveboardEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Liveboard);
5017
+ * ```
5018
+ * @example
5019
+ * ```js
5020
+ * // Export TML from search-answer context
5021
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5022
+ * appEmbed.trigger(HostEvent.ExportTML, {}, ContextType.Search);
5023
+ * ```
4771
5024
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4772
5025
  */
4773
5026
  ExportTML = "exportTSL",
@@ -4778,6 +5031,18 @@ export declare enum HostEvent {
4778
5031
  * ```js
4779
5032
  * liveboardEmbed.trigger(HostEvent.EditTML)
4780
5033
  * ```
5034
+ * @example
5035
+ * ```js
5036
+ * // Edit TML from liveboard context
5037
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5038
+ * liveboardEmbed.trigger(HostEvent.EditTML, {}, ContextType.Liveboard);
5039
+ * ```
5040
+ * @example
5041
+ * ```js
5042
+ * // Edit TML from search-answer context
5043
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5044
+ * appEmbed.trigger(HostEvent.EditTML, {}, ContextType.Search);
5045
+ * ```
4781
5046
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4782
5047
  */
4783
5048
  EditTML = "editTSL",
@@ -4787,6 +5052,12 @@ export declare enum HostEvent {
4787
5052
  * ```js
4788
5053
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
4789
5054
  * ```
5055
+ * @example
5056
+ * ```js
5057
+ * // Update TML from liveboard context
5058
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5059
+ * liveboardEmbed.trigger(HostEvent.UpdateTML, {}, ContextType.Liveboard);
5060
+ * ```
4790
5061
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4791
5062
  */
4792
5063
  UpdateTML = "updateTSL",
@@ -4813,6 +5084,18 @@ export declare enum HostEvent {
4813
5084
  *
4814
5085
  * spotterEmbed.trigger(HostEvent.DownloadAsPdf, { vizId: latestSpotterVizId });
4815
5086
  * ```
5087
+ * @example
5088
+ * ```js
5089
+ * // Download as PDF from search-answer context
5090
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5091
+ * appEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Search);
5092
+ * ```
5093
+ * @example
5094
+ * ```js
5095
+ * // Download as PDF from liveboard context
5096
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5097
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf, {}, ContextType.Liveboard);
5098
+ * ```
4816
5099
  *
4817
5100
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4818
5101
  */
@@ -4857,6 +5140,18 @@ export declare enum HostEvent {
4857
5140
  *
4858
5141
  * spotterEmbed.trigger(HostEvent.MakeACopy, { vizId: latestSpotterVizId });
4859
5142
  * ```
5143
+ * @example
5144
+ * ```js
5145
+ * // Make a copy from answer context
5146
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5147
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Answer);
5148
+ * ```
5149
+ * @example
5150
+ * ```js
5151
+ * // Make a copy from search context
5152
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5153
+ * appEmbed.trigger(HostEvent.MakeACopy, {}, ContextType.Search);
5154
+ * ```
4860
5155
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4861
5156
  */
4862
5157
  MakeACopy = "makeACopy",
@@ -4881,6 +5176,14 @@ export declare enum HostEvent {
4881
5176
  * ```js
4882
5177
  * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
4883
5178
  * ```
5179
+ * @example
5180
+ * ```js
5181
+ * // Explore from liveboard context
5182
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5183
+ * liveboardEmbed.trigger(HostEvent.Explore, {
5184
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5185
+ * }, ContextType.Liveboard);
5186
+ * ```
4884
5187
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4885
5188
  */
4886
5189
  Explore = "explore",
@@ -4898,6 +5201,20 @@ export declare enum HostEvent {
4898
5201
  * ```js
4899
5202
  * searchEmbed.trigger(HostEvent.CreateMonitor)
4900
5203
  * ```
5204
+ * @example
5205
+ * ```js
5206
+ * // Create monitor from answer context
5207
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5208
+ * appEmbed.trigger(HostEvent.CreateMonitor, {}, ContextType.Answer);
5209
+ * ```
5210
+ * @example
5211
+ * ```js
5212
+ * // Create monitor from liveboard context
5213
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5214
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor, {
5215
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5216
+ * }, ContextType.Liveboard);
5217
+ * ```
4901
5218
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4902
5219
  */
4903
5220
  CreateMonitor = "createMonitor",
@@ -4919,6 +5236,20 @@ export declare enum HostEvent {
4919
5236
  * ```js
4920
5237
  * vizEmbed.trigger(HostEvent.ManageMonitor)
4921
5238
  * ```
5239
+ * @example
5240
+ * ```js
5241
+ * // Manage monitor from answer context
5242
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5243
+ * appEmbed.trigger(HostEvent.ManageMonitor, {}, ContextType.Answer);
5244
+ * ```
5245
+ * @example
5246
+ * ```js
5247
+ * // Manage monitor from liveboard context
5248
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5249
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
5250
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5251
+ * }, ContextType.Liveboard);
5252
+ * ```
4922
5253
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4923
5254
  */
4924
5255
  ManageMonitor = "manageMonitor",
@@ -4944,6 +5275,26 @@ export declare enum HostEvent {
4944
5275
  * ```js
4945
5276
  * spotterEmbed.trigger(HostEvent.Edit);
4946
5277
  * ```
5278
+ * @example
5279
+ * ```js
5280
+ * // Using context parameter to edit liveboard context
5281
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5282
+ * liveboardEmbed.trigger(HostEvent.Edit, {}, ContextType.Liveboard);
5283
+ * ```
5284
+ * @example
5285
+ * ```js
5286
+ * // Edit from search context
5287
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5288
+ * appEmbed.trigger(HostEvent.Edit, {}, ContextType.Search);
5289
+ * ```
5290
+ * * @example
5291
+ * ```js
5292
+ * // Edit from spotter context
5293
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5294
+ * appEmbed.trigger(HostEvent.Edit, {
5295
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5296
+ * }, ContextType.Spotter);
5297
+ * ```
4947
5298
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4948
5299
  */
4949
5300
  Edit = "edit",
@@ -4961,6 +5312,20 @@ export declare enum HostEvent {
4961
5312
  * ```js
4962
5313
  * vizEmbed.trigger(HostEvent.CopyLink)
4963
5314
  * ```
5315
+ * @example
5316
+ * ```js
5317
+ * // Copy link from liveboard context
5318
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5319
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {}, ContextType.Liveboard);
5320
+ * ```
5321
+ * @example
5322
+ * ```js
5323
+ * // Copy link from liveboard visualization context
5324
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5325
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
5326
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5327
+ * }, ContextType.Liveboard);
5328
+ * ```
4964
5329
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4965
5330
  */
4966
5331
  CopyLink = "embedDocument",
@@ -4978,6 +5343,20 @@ export declare enum HostEvent {
4978
5343
  * ```js
4979
5344
  * vizEmbed.trigger(HostEvent.Present)
4980
5345
  * ```
5346
+ * @example
5347
+ * ```js
5348
+ * // Present from liveboard visualization context
5349
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5350
+ * liveboardEmbed.trigger(HostEvent.Present, {
5351
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5352
+ * }, ContextType.Liveboard);
5353
+ * ```
5354
+ * @example
5355
+ * ```js
5356
+ * // Present from liveboard context
5357
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5358
+ * liveboardEmbed.trigger(HostEvent.Present, {}, ContextType.Liveboard);
5359
+ * ```
4981
5360
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4982
5361
  */
4983
5362
  Present = "present",
@@ -5006,6 +5385,22 @@ export declare enum HostEvent {
5006
5385
  * tml.answer.search_query // TML representation of the search query
5007
5386
  * );
5008
5387
  * })
5388
+ * ```
5389
+ * @example
5390
+ * ```js
5391
+ * // Get TML from search context
5392
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5393
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
5394
+ * console.log(tml.answer.search_query);
5395
+ * });
5396
+ * ```
5397
+ * @example
5398
+ * ```js
5399
+ * // Get TML from search-answer context
5400
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5401
+ * appEmbed.trigger(HostEvent.GetTML, {}, ContextType.Search).then((tml) => {
5402
+ * console.log(tml.answer);
5403
+ * });
5009
5404
  * ```
5010
5405
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1.sw
5011
5406
  * @important
@@ -5027,6 +5422,20 @@ export declare enum HostEvent {
5027
5422
  * ```js
5028
5423
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
5029
5424
  * ```
5425
+ * @example
5426
+ * ```js
5427
+ * // Show underlying data from liveboard visualization context
5428
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5429
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {
5430
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5431
+ * }, ContextType.Liveboard);
5432
+ * ```
5433
+ * @example
5434
+ * ```js
5435
+ * // Show underlying data from search context
5436
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5437
+ * appEmbed.trigger(HostEvent.ShowUnderlyingData, {}, ContextType.Search);
5438
+ * ```
5030
5439
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5031
5440
  */
5032
5441
  ShowUnderlyingData = "showUnderlyingData",
@@ -5044,6 +5453,18 @@ export declare enum HostEvent {
5044
5453
  * ```js
5045
5454
  * searchEmbed.trigger(HostEvent.Delete)
5046
5455
  * ```
5456
+ * @example
5457
+ * ```js
5458
+ * // Delete from liveboard context
5459
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5460
+ * liveboardEmbed.trigger(HostEvent.Delete, {}, ContextType.Liveboard);
5461
+ * ```
5462
+ * @example
5463
+ * ```js
5464
+ * // Delete from search context
5465
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5466
+ * appEmbed.trigger(HostEvent.Delete, {}, ContextType.Search);
5467
+ * ```
5047
5468
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5048
5469
  */
5049
5470
  Delete = "onDeleteAnswer",
@@ -5064,6 +5485,20 @@ export declare enum HostEvent {
5064
5485
  * ```js
5065
5486
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
5066
5487
  * ```
5488
+ * @example
5489
+ * ```js
5490
+ * // SpotIQ analyze from search-answer context
5491
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5492
+ * appEmbed.trigger(HostEvent.SpotIQAnalyze, { vizId: '730496d6-6903-4601-937e-2c691821af3c' }, ContextType.Search);
5493
+ * ```
5494
+ * @example
5495
+ * ```js
5496
+ * // SpotIQ analyze from search context
5497
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5498
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {
5499
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5500
+ * }, ContextType.Liveboard);
5501
+ * ```
5067
5502
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5068
5503
  */
5069
5504
  SpotIQAnalyze = "spotIQAnalyze",
@@ -5115,6 +5550,12 @@ export declare enum HostEvent {
5115
5550
  *
5116
5551
  * spotterEmbed.trigger(HostEvent.DownloadAsPng, { vizId: latestSpotterVizId });
5117
5552
  * ```
5553
+ * @example
5554
+ * ```js
5555
+ * // Download as PNG from search-answer context
5556
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5557
+ * appEmbed.trigger(HostEvent.DownloadAsPng, {}, ContextType.Search);
5558
+ * ```
5118
5559
  *
5119
5560
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1.sw
5120
5561
  */
@@ -5143,6 +5584,18 @@ export declare enum HostEvent {
5143
5584
  *
5144
5585
  * spotterEmbed.trigger(HostEvent.DownloadAsCsv, { vizId: latestSpotterVizId });
5145
5586
  * ```
5587
+ * @example
5588
+ * ```js
5589
+ * // Download as CSV from search-answer context
5590
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5591
+ * appEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
5592
+ * ```
5593
+ * @example
5594
+ * ```js
5595
+ * // Download as CSV from search context
5596
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5597
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv, {}, ContextType.Search);
5598
+ * ```
5146
5599
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5147
5600
  */
5148
5601
  DownloadAsCsv = "downloadAsCSV",
@@ -5170,6 +5623,18 @@ export declare enum HostEvent {
5170
5623
  *
5171
5624
  * spotterEmbed.trigger(HostEvent.DownloadAsXlsx, { vizId: latestSpotterVizId });
5172
5625
  * ```
5626
+ * @example
5627
+ * ```js
5628
+ * // Download as XLSX from answer context
5629
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5630
+ * appEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Answer);
5631
+ * ```
5632
+ * @example
5633
+ * ```js
5634
+ * // Download as XLSX from search context
5635
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5636
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx, {}, ContextType.Search);
5637
+ * ```
5173
5638
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5174
5639
  */
5175
5640
  DownloadAsXlsx = "downloadAsXLSX",
@@ -5183,6 +5648,18 @@ export declare enum HostEvent {
5183
5648
  * ```js
5184
5649
  * searchEmbed.trigger(HostEvent.Share)
5185
5650
  * ```
5651
+ * @example
5652
+ * ```js
5653
+ * // Share from Liveboard context
5654
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5655
+ * liveboardEmbed.trigger(HostEvent.Share, {}, ContextType.Liveboard);
5656
+ * ```
5657
+ * @example
5658
+ * ```js
5659
+ * // Share from search-answer context
5660
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5661
+ * appEmbed.trigger(HostEvent.Share, {}, ContextType.Search);
5662
+ * ```
5186
5663
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5187
5664
  */
5188
5665
  Share = "share",
@@ -5222,6 +5699,18 @@ export declare enum HostEvent {
5222
5699
  *
5223
5700
  * spotterEmbed.trigger(HostEvent.Save, { vizId: latestSpotterVizId });
5224
5701
  * ```
5702
+ * @example
5703
+ * ```js
5704
+ * // Save from answer context
5705
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5706
+ * appEmbed.trigger(HostEvent.Save, {}, ContextType.Answer);
5707
+ * ```
5708
+ * @example
5709
+ * ```js
5710
+ * // Save from search context
5711
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5712
+ * searchEmbed.trigger(HostEvent.Save, {}, ContextType.Search);
5713
+ * ```
5225
5714
  *
5226
5715
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5227
5716
  */
@@ -5238,6 +5727,20 @@ export declare enum HostEvent {
5238
5727
  * ```js
5239
5728
  * vizEmbed.trigger(HostEvent.SyncToSheets)
5240
5729
  * ```
5730
+ * @example
5731
+ * ```js
5732
+ * // Sync to sheets from answer context
5733
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5734
+ * appEmbed.trigger(HostEvent.SyncToSheets, {}, ContextType.Answer);
5735
+ * ```
5736
+ * @example
5737
+ * ```js
5738
+ * // Sync to sheets from liveboard context
5739
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5740
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {
5741
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5742
+ * }, ContextType.Liveboard);
5743
+ * ```
5241
5744
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5242
5745
  */
5243
5746
  SyncToSheets = "sync-to-sheets",
@@ -5254,6 +5757,20 @@ export declare enum HostEvent {
5254
5757
  * ```js
5255
5758
  * vizEmbed.trigger(HostEvent.SyncToOtherApps)
5256
5759
  * ```
5760
+ * @example
5761
+ * ```js
5762
+ * // Sync to other apps from answer context
5763
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5764
+ * appEmbed.trigger(HostEvent.SyncToOtherApps, {}, ContextType.Answer);
5765
+ * ```
5766
+ * @example
5767
+ * ```js
5768
+ * // Sync to other apps from liveboard context
5769
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5770
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {
5771
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5772
+ * }, ContextType.Liveboard);
5773
+ * ```
5257
5774
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5258
5775
  */
5259
5776
  SyncToOtherApps = "sync-to-other-apps",
@@ -5270,6 +5787,20 @@ export declare enum HostEvent {
5270
5787
  * ```js
5271
5788
  * vizEmbed.trigger(HostEvent.ManagePipelines)
5272
5789
  * ```
5790
+ * @example
5791
+ * ```js
5792
+ * // Manage pipelines from answer context
5793
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5794
+ * appEmbed.trigger(HostEvent.ManagePipelines, {}, ContextType.Answer);
5795
+ * ```
5796
+ * @example
5797
+ * ```js
5798
+ * // Manage pipelines from liveboard context
5799
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5800
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {
5801
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
5802
+ * }, ContextType.Liveboard);
5803
+ * ```
5273
5804
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
5274
5805
  */
5275
5806
  ManagePipelines = "manage-pipeline",
@@ -5282,6 +5813,12 @@ export declare enum HostEvent {
5282
5813
  * ```js
5283
5814
  * appEmbed.trigger(HostEvent.ResetSearch)
5284
5815
  * ```
5816
+ * @example
5817
+ * ```js
5818
+ * // Reset search from search context
5819
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5820
+ * searchEmbed.trigger(HostEvent.ResetSearch, {}, ContextType.Search);
5821
+ * ```
5285
5822
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
5286
5823
  */
5287
5824
  ResetSearch = "resetSearch",
@@ -5293,6 +5830,13 @@ export declare enum HostEvent {
5293
5830
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
5294
5831
  * console.log('data', data);
5295
5832
  * ```
5833
+ * @example
5834
+ * ```js
5835
+ * // Get filters from liveboard context
5836
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5837
+ * const data = await liveboardEmbed.trigger(HostEvent.GetFilters, {}, ContextType.Liveboard);
5838
+ * console.log('filters', data);
5839
+ * ```
5296
5840
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5297
5841
  */
5298
5842
  GetFilters = "getFilters",
@@ -5300,7 +5844,8 @@ export declare enum HostEvent {
5300
5844
  * Update one or several filters applied on a Liveboard.
5301
5845
  * @param - Includes the following keys:
5302
5846
  * - `filter`: A single filter object containing column name, filter operator, and
5303
- * values. - `filters`: Multiple filter objects with column name, filter operator,
5847
+ * values.
5848
+ * - `filters`: Multiple filter objects with column name, filter operator,
5304
5849
  * and values for each.
5305
5850
  *
5306
5851
  * Each filter object must include the following attributes:
@@ -5383,6 +5928,18 @@ export declare enum HostEvent {
5383
5928
  * }]
5384
5929
  * });
5385
5930
  * ```
5931
+ * @example
5932
+ * ```js
5933
+ * // Update filters from liveboard context
5934
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5935
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
5936
+ * filter: {
5937
+ * column: "item type",
5938
+ * oper: "IN",
5939
+ * values: ["shoes", "boots"]
5940
+ * }
5941
+ * }, ContextType.Liveboard);
5942
+ * ```
5386
5943
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
5387
5944
  */
5388
5945
  UpdateFilters = "updateFilters",
@@ -5396,6 +5953,14 @@ export declare enum HostEvent {
5396
5953
  * );
5397
5954
  * })
5398
5955
  * ```
5956
+ * @example
5957
+ * ```js
5958
+ * // Get tabs from liveboard context
5959
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5960
+ * liveboardEmbed.trigger(HostEvent.GetTabs, {}, ContextType.Liveboard).then((tabDetails) => {
5961
+ * console.log('tabs', tabDetails);
5962
+ * });
5963
+ * ```
5399
5964
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl
5400
5965
  */
5401
5966
  GetTabs = "getTabs",
@@ -5409,6 +5974,15 @@ export declare enum HostEvent {
5409
5974
  * '430496d6-6903-4601-937e-2c691821af3c',
5410
5975
  * 'f547ec54-2a37-4516-a222-2b06719af726'])
5411
5976
  * ```
5977
+ * @example
5978
+ * ```js
5979
+ * // Set visible tabs from liveboard context
5980
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
5981
+ * liveboardEmbed.trigger(HostEvent.SetVisibleTabs, [
5982
+ * '430496d6-6903-4601-937e-2c691821af3c',
5983
+ * 'f547ec54-2a37-4516-a222-2b06719af726'
5984
+ * ], ContextType.Liveboard);
5985
+ * ```
5412
5986
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
5413
5987
  */
5414
5988
  SetVisibleTabs = "SetPinboardVisibleTabs",
@@ -5422,6 +5996,15 @@ export declare enum HostEvent {
5422
5996
  * '630496d6-6903-4601-937e-2c691821af3c',
5423
5997
  * 'i547ec54-2a37-4516-a222-2b06719af726'])
5424
5998
  * ```
5999
+ * @example
6000
+ * ```js
6001
+ * // Set hidden tabs from liveboard context
6002
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6003
+ * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
6004
+ * '630496d6-6903-4601-937e-2c691821af3c',
6005
+ * 'i547ec54-2a37-4516-a222-2b06719af726'
6006
+ * ], ContextType.Liveboard);
6007
+ * ```
5425
6008
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 9.8.0.sw
5426
6009
  */
5427
6010
  SetHiddenTabs = "SetPinboardHiddenTabs",
@@ -5498,13 +6081,24 @@ export declare enum HostEvent {
5498
6081
  UpdateCrossFilter = "UpdateCrossFilter",
5499
6082
  /**
5500
6083
  * Trigger reset action for a personalized Liveboard view.
6084
+ * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
5501
6085
  * @example
5502
6086
  * ```js
5503
6087
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
5504
6088
  * ```
5505
6089
  * @version SDK: 1.29.0 | ThoughtSpot Cloud: 10.1.0.cl, 10.1.0.sw
6090
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5506
6091
  */
5507
6092
  ResetLiveboardPersonalisedView = "ResetLiveboardPersonalisedView",
6093
+ /**
6094
+ * Trigger reset action for a personalized Liveboard view.
6095
+ * @example
6096
+ * ```js
6097
+ * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalizedView);
6098
+ * ```
6099
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6100
+ */
6101
+ ResetLiveboardPersonalizedView = "ResetLiveboardPersonalisedView",
5508
6102
  /**
5509
6103
  * Triggers an action to update Parameter values on embedded
5510
6104
  * Answers, Liveboard, and Spotter answer in Edit mode.
@@ -5521,6 +6115,16 @@ export declare enum HostEvent {
5521
6115
  * isVisibleToUser: false
5522
6116
  * }])
5523
6117
  * ```
6118
+ * @example
6119
+ * ```js
6120
+ * // Update parameters from liveboard context
6121
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6122
+ * liveboardEmbed.trigger(HostEvent.UpdateParameters, [{
6123
+ * name: "Region Param",
6124
+ * value: "West",
6125
+ * isVisibleToUser: true
6126
+ * }], ContextType.Liveboard);
6127
+ * ```
5524
6128
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
5525
6129
  */
5526
6130
  UpdateParameters = "UpdateParameters",
@@ -5540,18 +6144,77 @@ export declare enum HostEvent {
5540
6144
  * });
5541
6145
  *
5542
6146
  * spotterEmbed.trigger(HostEvent.GetParameters, { vizId: latestSpotterVizId });
6147
+ *```
6148
+ * @example
6149
+ * ```js
6150
+ * // Get parameters from liveboard context
6151
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6152
+ * liveboardEmbed.trigger(HostEvent.GetParameters, {}, ContextType.Liveboard).then((parameters) => {
6153
+ * console.log('parameters', parameters);
6154
+ * });
5543
6155
  * ```
5544
6156
  * @version SDK: 1.29.0 | ThoughtSpot: 10.1.0.cl, 10.1.0.sw
5545
6157
  */
5546
6158
  GetParameters = "GetParameters",
5547
6159
  /**
5548
6160
  * Triggers an event to update a personalized view of a Liveboard.
6161
+ * This event is deprecated. Use {@link HostEvent.UpdatePersonalizedView} instead.
5549
6162
  * ```js
5550
6163
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
5551
6164
  * ```
6165
+ * @example
6166
+ * ```js
6167
+ * // Update personalized view from liveboard context
6168
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6169
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {
6170
+ * viewId: '1234'
6171
+ * }, ContextType.Liveboard);
6172
+ * ```
5552
6173
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
6174
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
5553
6175
  */
5554
6176
  UpdatePersonalisedView = "UpdatePersonalisedView",
6177
+ /**
6178
+ * Triggers an event to update a personalized view of a Liveboard.
6179
+ * ```js
6180
+ * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
6181
+ * ```
6182
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6183
+ */
6184
+ UpdatePersonalizedView = "UpdatePersonalisedView",
6185
+ /**
6186
+ * Triggers selection of a specific Personalized View on a
6187
+ * Liveboard without reloading the embed. Pass either a
6188
+ * `viewId` (GUID) or `viewName`. If both are provided, `viewId` takes precedence.
6189
+ * If neither is provided, the Liveboard resets to the original/default view.
6190
+ * When a `viewName` is provided and multiple views share
6191
+ * the same name, the first match is selected.
6192
+ * @example
6193
+ * ```js
6194
+ * liveboardEmbed.trigger(
6195
+ * HostEvent.SelectPersonalizedView,
6196
+ * { viewId: '2a021a12-1aed-425d-984b-141ee916ce72' },
6197
+ * )
6198
+ * ```
6199
+ * @example
6200
+ * ```js
6201
+ * // Select by name
6202
+ * liveboardEmbed.trigger(
6203
+ * HostEvent.SelectPersonalizedView,
6204
+ * { viewName: 'Dr Smith Cardiology' },
6205
+ * )
6206
+ * ```
6207
+ * @example
6208
+ * ```js
6209
+ * // Reset to default view
6210
+ * liveboardEmbed.trigger(
6211
+ * HostEvent.SelectPersonalizedView,
6212
+ * {},
6213
+ * )
6214
+ * ```
6215
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6216
+ */
6217
+ SelectPersonalizedView = "SelectPersonalisedView",
5555
6218
  /**
5556
6219
  * @hidden
5557
6220
  * Notify when info call is completed successfully
@@ -5571,7 +6234,8 @@ export declare enum HostEvent {
5571
6234
  * add a name and description for the Answer.
5572
6235
  * @param - Includes the following keys:
5573
6236
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
5574
- * embed. - `name`: Optional. Name string for the Answer.
6237
+ * embed.
6238
+ * - `name`: Optional. Name string for the Answer.
5575
6239
  * - `description`: Optional. Description text for the Answer.
5576
6240
  * @example
5577
6241
  * ```js
@@ -5590,6 +6254,34 @@ export declare enum HostEvent {
5590
6254
  *
5591
6255
  * spotterEmbed.trigger(HostEvent.SaveAnswer, { vizId: latestSpotterVizId });
5592
6256
  * ```
6257
+ * @example
6258
+ * ```js
6259
+ * // Using context parameter to save answer from search context
6260
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6261
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6262
+ * name: "Regional sales analysis",
6263
+ * description: "Sales breakdown by region"
6264
+ * }, ContextType.Search);
6265
+ * ```
6266
+ * @example
6267
+ * ```js
6268
+ * // Save answer from answer context (explore modal)
6269
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6270
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6271
+ * name: "Modified analysis",
6272
+ * description: "Updated from explore view"
6273
+ * }, ContextType.Answer);
6274
+ * ```
6275
+ * @example
6276
+ * ```js
6277
+ * // Save answer from spotter context
6278
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6279
+ * const saveAnswerResponse = await appEmbed.trigger(HostEvent.SaveAnswer, {
6280
+ * vizId: latestSpotterVizId,
6281
+ * name: "AI insights",
6282
+ * description: "Generated from Spotter"
6283
+ * }, ContextType.Spotter);
6284
+ * ```
5593
6285
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
5594
6286
  */
5595
6287
  SaveAnswer = "saveAnswer",
@@ -5631,6 +6323,15 @@ export declare enum HostEvent {
5631
6323
  * executeSearch: true,
5632
6324
  * })
5633
6325
  * ```
6326
+ * @example
6327
+ * ```js
6328
+ * // Spotter search from spotter context
6329
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6330
+ * spotterEmbed.trigger(HostEvent.SpotterSearch, {
6331
+ * query: 'sales by region',
6332
+ * executeSearch: true
6333
+ * }, ContextType.Spotter);
6334
+ * ```
5634
6335
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5635
6336
  */
5636
6337
  SpotterSearch = "SpotterSearch",
@@ -5641,6 +6342,12 @@ export declare enum HostEvent {
5641
6342
  * ```js
5642
6343
  * spotterEmbed.trigger(HostEvent.EditLastPrompt, "revenue per year");
5643
6344
  * ```
6345
+ * @example
6346
+ * ```js
6347
+ * // Edit last prompt from spotter context
6348
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6349
+ * spotterEmbed.trigger(HostEvent.EditLastPrompt, "sales by region", ContextType.Spotter);
6350
+ * ```
5644
6351
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5645
6352
  */
5646
6353
  EditLastPrompt = "EditLastPrompt",
@@ -5650,6 +6357,12 @@ export declare enum HostEvent {
5650
6357
  * ```js
5651
6358
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
5652
6359
  * ```
6360
+ * @example
6361
+ * ```js
6362
+ * // Preview spotter data from spotter context
6363
+ * import { ContextType } from '@thoughtspot/visual-embed-sdk';
6364
+ * spotterEmbed.trigger(HostEvent.PreviewSpotterData, {}, ContextType.Spotter);
6365
+ * ```
5653
6366
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5654
6367
  */
5655
6368
  PreviewSpotterData = "PreviewSpotterData",
@@ -6744,13 +7457,25 @@ export declare enum Action {
6744
7457
  /**
6745
7458
  * The Liveboard Personalised Views dropdown.
6746
7459
  * Allows navigating to a personalized Liveboard View.
7460
+ * This action is deprecated. Use {@link Action.PersonalizedViewsDropdown} instead.
6747
7461
  * @example
6748
7462
  * ```js
6749
7463
  * disabledActions: [Action.PersonalisedViewsDropdown]
6750
7464
  * ```
6751
7465
  * @version SDK: 1.26.0 | ThoughtSpot: 9.7.0.cl, 10.1.0.sw
7466
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6752
7467
  */
6753
7468
  PersonalisedViewsDropdown = "personalisedViewsDropdown",
7469
+ /**
7470
+ * The Liveboard Personalized Views dropdown.
7471
+ * Allows navigating to a personalized Liveboard View.
7472
+ * @example
7473
+ * ```js
7474
+ * disabledActions: [Action.PersonalizedViewsDropdown]
7475
+ * ```
7476
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7477
+ */
7478
+ PersonalizedViewsDropdown = "personalisedViewsDropdown",
6754
7479
  /**
6755
7480
  * Action ID for show or hide the user details on a
6756
7481
  * Liveboard (Recently visited / social proof)
@@ -6838,14 +7563,27 @@ export declare enum Action {
6838
7563
  /**
6839
7564
  * The **Organize Favourites** action on Homepage
6840
7565
  * *Favorites* module.
7566
+ * This action is deprecated. Use {@link Action.OrganizeFavorites} instead.
6841
7567
  *
6842
7568
  * @example
6843
7569
  * ```js
6844
7570
  * disabledActions: [Action.OrganiseFavourites]
6845
7571
  * ```
6846
7572
  * @version SDK: 1.32.0 | ThoughtSpot: 10.0.0.cl
7573
+ * @deprecated SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
6847
7574
  */
6848
7575
  OrganiseFavourites = "organiseFavourites",
7576
+ /**
7577
+ * The **Organize Favorites** action on Homepage
7578
+ * *Favorites* module.
7579
+ *
7580
+ * @example
7581
+ * ```js
7582
+ * disabledActions: [Action.OrganizeFavorites]
7583
+ * ```
7584
+ * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7585
+ */
7586
+ OrganizeFavorites = "organiseFavourites",
6849
7587
  /**
6850
7588
  * The **AI Highlights** action on a Liveboard.
6851
7589
  *
@@ -7558,7 +8296,8 @@ declare enum EmbedErrorCodes {
7558
8296
  *
7559
8297
  * - **errorType**: One of the predefined {@link ErrorDetailsTypes} values
7560
8298
  * - **message**: Human-readable error description (string or array of strings for
7561
- * multiple errors) - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
8299
+ * multiple errors)
8300
+ * - **code**: Machine-readable error identifier {@link EmbedErrorCodes}
7562
8301
  * values
7563
8302
  * - **[key: string]**: Additional context-specific for backward compatibility
7564
8303
  *
@@ -7622,7 +8361,11 @@ declare enum ContextType {
7622
8361
  /**
7623
8362
  * Spotter context for spotter modal/page.
7624
8363
  */
7625
- Spotter = "spotter"
8364
+ Spotter = "spotter",
8365
+ /**
8366
+ * Other context for any other generic page.
8367
+ */
8368
+ Other = "other"
7626
8369
  }
7627
8370
  export interface DefaultAppInitData {
7628
8371
  customisations: CustomisationsInterface;
@@ -7722,33 +8465,6 @@ export interface ObjectIds {
7722
8465
  */
7723
8466
  modalTitle?: string;
7724
8467
  }
7725
- /**
7726
- * Context object for the embedded component.
7727
- * @example
7728
- * ```js
7729
- * const context = await embed.getCurrentContext();
7730
- * console.log(context);
7731
- * {
7732
- * stack: [
7733
- * {
7734
- * name: 'Liveboard',
7735
- * type: ContextType.Liveboard,
7736
- * objectIds: {
7737
- * liveboardId: '123',
7738
- * },
7739
- * },
7740
- * ],
7741
- * currentContext: {
7742
- * name: 'Liveboard',
7743
- * type: ContextType.Liveboard,
7744
- * objectIds: {
7745
- * liveboardId: '123',
7746
- * },
7747
- * },
7748
- * }
7749
- * ```
7750
- * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
7751
- */
7752
8468
  export interface ContextObject {
7753
8469
  /**
7754
8470
  * Stack of context objects.
@@ -7798,7 +8514,8 @@ declare enum AuthFailureType {
7798
8514
  /**
7799
8515
  * The current authentication token or session has expired.
7800
8516
  *
7801
- * Emitted when the embed receives an auth-expiry signal and starts auth refresh handling.
8517
+ * Emitted when the embed receives an auth-expiry signal and starts auth refresh
8518
+ * handling.
7802
8519
  */
7803
8520
  EXPIRY = "EXPIRY",
7804
8521
  /**
@@ -7926,6 +8643,11 @@ declare enum AuthEvent {
7926
8643
  */
7927
8644
  TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
7928
8645
  }
8646
+ export interface LiveboardTab {
8647
+ id: string;
8648
+ name: string;
8649
+ [key: string]: any;
8650
+ }
7929
8651
  declare enum UIPassthroughEvent {
7930
8652
  PinAnswerToLiveboard = "addVizToPinboard",
7931
8653
  SaveAnswer = "saveAnswer",
@@ -7933,7 +8655,14 @@ declare enum UIPassthroughEvent {
7933
8655
  GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
7934
8656
  GetAnswerConfig = "getAnswerPageConfig",
7935
8657
  GetLiveboardConfig = "getPinboardPageConfig",
7936
- GetUnsavedAnswerTML = "getUnsavedAnswerTML"
8658
+ GetUnsavedAnswerTML = "getUnsavedAnswerTML",
8659
+ GetAnswerSession = "getAnswerSession",
8660
+ GetFilters = "getFilters",
8661
+ GetIframeUrl = "getIframeUrl",
8662
+ GetParameters = "getParameters",
8663
+ GetTML = "getTML",
8664
+ GetTabs = "getTabs",
8665
+ GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
7937
8666
  }
7938
8667
  export type UIPassthroughContractBase = {
7939
8668
  [UIPassthroughEvent.PinAnswerToLiveboard]: {
@@ -7997,17 +8726,75 @@ export type UIPassthroughContractBase = {
7997
8726
  tml: string;
7998
8727
  };
7999
8728
  };
8729
+ [UIPassthroughEvent.GetAnswerSession]: {
8730
+ request: {
8731
+ vizId?: string;
8732
+ };
8733
+ response: {
8734
+ session: SessionInterface;
8735
+ embedAnswerData?: Record<string, any>;
8736
+ };
8737
+ };
8738
+ [UIPassthroughEvent.GetFilters]: {
8739
+ request: {
8740
+ vizId?: string;
8741
+ };
8742
+ response: {
8743
+ liveboardFilters: Record<string, any>[];
8744
+ runtimeFilters: RuntimeFilter[];
8745
+ };
8746
+ };
8747
+ [UIPassthroughEvent.GetIframeUrl]: {
8748
+ request: Record<string, never>;
8749
+ response: {
8750
+ iframeUrl: string;
8751
+ };
8752
+ };
8753
+ [UIPassthroughEvent.GetParameters]: {
8754
+ request: Record<string, never>;
8755
+ response: {
8756
+ parameters: Record<string, any>[];
8757
+ };
8758
+ };
8759
+ [UIPassthroughEvent.GetTML]: {
8760
+ request: {
8761
+ vizId?: string;
8762
+ includeNonExecutedSearchTokens?: boolean;
8763
+ };
8764
+ response: Record<string, any>;
8765
+ };
8766
+ [UIPassthroughEvent.GetTabs]: {
8767
+ request: Record<string, never>;
8768
+ response: {
8769
+ orderedTabIds: string[];
8770
+ numberOfTabs: number;
8771
+ Tabs: LiveboardTab[];
8772
+ };
8773
+ };
8774
+ [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
8775
+ request: Record<string, never>;
8776
+ response: {
8777
+ v2Content: string;
8778
+ };
8779
+ };
8000
8780
  };
8001
8781
  export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
8002
8782
  export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
8003
8783
  export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
8004
- redId?: string;
8784
+ refId?: string;
8005
8785
  value?: UIPassthroughResponse<ApiName>;
8006
8786
  error?: any;
8007
8787
  }>;
8008
8788
  export type EmbedApiHostEventMapping = {
8009
8789
  [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
8010
8790
  [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
8791
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
8792
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
8793
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
8794
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
8795
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
8796
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
8797
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
8011
8798
  };
8012
8799
  export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
8013
8800
  export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
@@ -8015,6 +8802,10 @@ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT |
8015
8802
  export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
8016
8803
  declare class HostEventClient {
8017
8804
  iFrame: HTMLIFrameElement;
8805
+ /** Host events with custom handlers
8806
+ * (setters or special logic) -
8807
+ * bound to instance for protected method access */
8808
+ private readonly customHandlers;
8018
8809
  constructor(iFrame?: HTMLIFrameElement);
8019
8810
  /**
8020
8811
  * A wrapper over process trigger to
@@ -8025,6 +8816,12 @@ declare class HostEventClient {
8025
8816
  protected processTrigger(message: HostEvent, data: any, context?: ContextType): Promise<any>;
8026
8817
  handleHostEventWithParam<UIPassthroughEventT extends UIPassthroughEvent>(apiName: UIPassthroughEventT, parameters: UIPassthroughRequest<UIPassthroughEventT>, context?: ContextType): Promise<UIPassthroughResponse<UIPassthroughEventT>>;
8027
8818
  hostEventFallback(hostEvent: HostEvent, data: any, context?: ContextType): Promise<any>;
8819
+ /**
8820
+ * For getter events that return data. Tries UI passthrough first;
8821
+ * if the app doesn't support it (no response data), falls back to
8822
+ * the legacy host event channel. Real errors are thrown as-is.
8823
+ */
8824
+ private getDataWithPassthroughFallback;
8028
8825
  /**
8029
8826
  * Setter for the iframe element used for host events
8030
8827
  * @param {HTMLIFrameElement} iFrame - the iframe element to set
@@ -8368,7 +9165,21 @@ declare class TsEmbed {
8368
9165
  * Triggers an event to the embedded app
8369
9166
  * @param {HostEvent} messageType The event type
8370
9167
  * @param {any} data The payload to send with the message
9168
+ * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
9169
+ * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
9170
+ * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
9171
+ * Available from SDK version 1.45.2 | ThoughtSpot: 26.3.0.cl
8371
9172
  * @returns A promise that resolves with the response from the embedded app
9173
+ * @example
9174
+ * ```js
9175
+ * // Trigger Pin event with context (SDK: 1.45.2+)
9176
+ * import { HostEvent, ContextType } from '@thoughtspot/visual-embed-sdk';
9177
+ * embed.trigger(HostEvent.Pin, {
9178
+ * vizId: "123",
9179
+ * liveboardId: "456"
9180
+ * }, ContextType.Search);
9181
+ * ```
9182
+ * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
8372
9183
  */
8373
9184
  trigger<HostEventT extends HostEvent, PayloadT, ContextT extends ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
8374
9185
  /**
@@ -8389,8 +9200,33 @@ declare class TsEmbed {
8389
9200
  getIframeSrc(): string;
8390
9201
  protected handleRenderForPrerender(): Promise<TsEmbed>;
8391
9202
  /**
8392
- * Get the current context of the embedded TS component.
8393
- * @returns The current context object containing the page type and object ids.
9203
+ * Context object for the embedded component.
9204
+ * @returns {ContextObject} The current context object containing the page type and object ids.
9205
+ * @example
9206
+ * ```js
9207
+ * const context = await embed.getCurrentContext();
9208
+ * console.log(context);
9209
+ *
9210
+ * // Example output
9211
+ * {
9212
+ * stack: [
9213
+ * {
9214
+ * name: 'Liveboard',
9215
+ * type: ContextType.Liveboard,
9216
+ * objectIds: {
9217
+ * liveboardId: '123',
9218
+ * },
9219
+ * },
9220
+ * ],
9221
+ * currentContext: {
9222
+ * name: 'Liveboard',
9223
+ * type: ContextType.Liveboard,
9224
+ * objectIds: {
9225
+ * liveboardId: '123',
9226
+ * },
9227
+ * },
9228
+ * }
9229
+ * ```
8394
9230
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
8395
9231
  */
8396
9232
  getCurrentContext(): Promise<ContextObject>;
@@ -10152,6 +10988,7 @@ declare class AppEmbed extends V1Embed {
10152
10988
  * @param pageId The ID of the page to be embedded.
10153
10989
  */
10154
10990
  getIFrameSrc(): string;
10991
+ private HEIGHT_CHANAGE_THRESHOLD;
10155
10992
  /**
10156
10993
  * Set the iframe height as per the computed height received
10157
10994
  * from the ThoughtSpot app.
@@ -10696,6 +11533,7 @@ declare class LiveboardEmbed extends V1Embed {
10696
11533
  * to be loaded within the iFrame.
10697
11534
  */
10698
11535
  private getIFrameSrc;
11536
+ private HEIGHT_CHANAGE_THRESHOLD;
10699
11537
  /**
10700
11538
  * Set the iframe height as per the computed height received
10701
11539
  * from the ThoughtSpot app.