@thoughtspot/visual-embed-sdk 1.26.2 → 1.27.0-alpha.0

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 (216) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +1 -1
  3. package/cjs/src/auth.d.ts +4 -4
  4. package/cjs/src/auth.d.ts.map +1 -1
  5. package/cjs/src/auth.js +10 -4
  6. package/cjs/src/auth.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +15 -15
  8. package/cjs/src/embed/app.d.ts.map +1 -1
  9. package/cjs/src/embed/app.js +1 -1
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/liveboard.d.ts +28 -23
  12. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  13. package/cjs/src/embed/liveboard.js +4 -3
  14. package/cjs/src/embed/liveboard.js.map +1 -1
  15. package/cjs/src/embed/sage.d.ts +48 -30
  16. package/cjs/src/embed/sage.d.ts.map +1 -1
  17. package/cjs/src/embed/sage.js +1 -1
  18. package/cjs/src/embed/sage.js.map +1 -1
  19. package/cjs/src/embed/search-bar.d.ts +22 -6
  20. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  21. package/cjs/src/embed/search-bar.js.map +1 -1
  22. package/cjs/src/embed/search.d.ts +34 -19
  23. package/cjs/src/embed/search.d.ts.map +1 -1
  24. package/cjs/src/embed/search.js +7 -3
  25. package/cjs/src/embed/search.js.map +1 -1
  26. package/cjs/src/embed/search.spec.js +10 -0
  27. package/cjs/src/embed/search.spec.js.map +1 -1
  28. package/cjs/src/embed/ts-embed.d.ts +1 -0
  29. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  30. package/cjs/src/embed/ts-embed.js +27 -7
  31. package/cjs/src/embed/ts-embed.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +114 -0
  33. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  34. package/cjs/src/react/index.spec.js +0 -12
  35. package/cjs/src/react/index.spec.js.map +1 -1
  36. package/cjs/src/types.d.ts +727 -242
  37. package/cjs/src/types.d.ts.map +1 -1
  38. package/cjs/src/types.js +653 -175
  39. package/cjs/src/types.js.map +1 -1
  40. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
  41. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  42. package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
  43. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  44. package/cjs/src/utils/processData.d.ts +6 -0
  45. package/cjs/src/utils/processData.d.ts.map +1 -1
  46. package/cjs/src/utils/processData.js +5 -1
  47. package/cjs/src/utils/processData.js.map +1 -1
  48. package/cjs/src/utils/processTrigger.js +1 -1
  49. package/dist/src/auth.d.ts +4 -4
  50. package/dist/src/auth.d.ts.map +1 -1
  51. package/dist/src/embed/app.d.ts +15 -15
  52. package/dist/src/embed/app.d.ts.map +1 -1
  53. package/dist/src/embed/liveboard.d.ts +28 -23
  54. package/dist/src/embed/liveboard.d.ts.map +1 -1
  55. package/dist/src/embed/sage.d.ts +48 -30
  56. package/dist/src/embed/sage.d.ts.map +1 -1
  57. package/dist/src/embed/search-bar.d.ts +22 -6
  58. package/dist/src/embed/search-bar.d.ts.map +1 -1
  59. package/dist/src/embed/search.d.ts +34 -19
  60. package/dist/src/embed/search.d.ts.map +1 -1
  61. package/dist/src/embed/ts-embed.d.ts +1 -0
  62. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  63. package/dist/src/types.d.ts +727 -242
  64. package/dist/src/types.d.ts.map +1 -1
  65. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
  66. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  67. package/dist/src/utils/processData.d.ts +6 -0
  68. package/dist/src/utils/processData.d.ts.map +1 -1
  69. package/dist/tsembed-react.es.js +706 -200
  70. package/dist/tsembed-react.js +705 -199
  71. package/dist/tsembed.es.js +709 -200
  72. package/dist/tsembed.js +707 -198
  73. package/dist/visual-embed-sdk-react-full.d.ts +898 -339
  74. package/dist/visual-embed-sdk-react.d.ts +898 -339
  75. package/dist/visual-embed-sdk.d.ts +898 -339
  76. package/lib/package.json +1 -1
  77. package/lib/src/auth.d.ts +4 -4
  78. package/lib/src/auth.d.ts.map +1 -1
  79. package/lib/src/auth.js +10 -4
  80. package/lib/src/auth.js.map +1 -1
  81. package/lib/src/embed/app.d.ts +15 -15
  82. package/lib/src/embed/app.d.ts.map +1 -1
  83. package/lib/src/embed/app.js +1 -1
  84. package/lib/src/embed/app.js.map +1 -1
  85. package/lib/src/embed/liveboard.d.ts +28 -23
  86. package/lib/src/embed/liveboard.d.ts.map +1 -1
  87. package/lib/src/embed/liveboard.js +4 -3
  88. package/lib/src/embed/liveboard.js.map +1 -1
  89. package/lib/src/embed/sage.d.ts +48 -30
  90. package/lib/src/embed/sage.d.ts.map +1 -1
  91. package/lib/src/embed/sage.js +1 -1
  92. package/lib/src/embed/sage.js.map +1 -1
  93. package/lib/src/embed/search-bar.d.ts +22 -6
  94. package/lib/src/embed/search-bar.d.ts.map +1 -1
  95. package/lib/src/embed/search-bar.js.map +1 -1
  96. package/lib/src/embed/search.d.ts +34 -19
  97. package/lib/src/embed/search.d.ts.map +1 -1
  98. package/lib/src/embed/search.js +7 -3
  99. package/lib/src/embed/search.js.map +1 -1
  100. package/lib/src/embed/search.spec.js +10 -0
  101. package/lib/src/embed/search.spec.js.map +1 -1
  102. package/lib/src/embed/ts-embed.d.ts +1 -0
  103. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  104. package/lib/src/embed/ts-embed.js +28 -8
  105. package/lib/src/embed/ts-embed.js.map +1 -1
  106. package/lib/src/embed/ts-embed.spec.js +114 -0
  107. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  108. package/lib/src/react/index.spec.js +0 -12
  109. package/lib/src/react/index.spec.js.map +1 -1
  110. package/lib/src/types.d.ts +727 -242
  111. package/lib/src/types.d.ts.map +1 -1
  112. package/lib/src/types.js +653 -175
  113. package/lib/src/types.js.map +1 -1
  114. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
  115. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  116. package/lib/src/utils/graphql/answerService/answerService.js +2 -4
  117. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  118. package/lib/src/utils/processData.d.ts +6 -0
  119. package/lib/src/utils/processData.d.ts.map +1 -1
  120. package/lib/src/utils/processData.js +4 -1
  121. package/lib/src/utils/processData.js.map +1 -1
  122. package/lib/src/utils/processTrigger.js +1 -1
  123. package/lib/src/visual-embed-sdk.d.ts +898 -339
  124. package/package.json +1 -1
  125. package/src/auth.ts +10 -4
  126. package/src/embed/app.ts +20 -20
  127. package/src/embed/liveboard.ts +32 -27
  128. package/src/embed/sage.ts +48 -30
  129. package/src/embed/search-bar.tsx +22 -6
  130. package/src/embed/search.spec.ts +13 -0
  131. package/src/embed/search.ts +42 -22
  132. package/src/embed/ts-embed.spec.ts +132 -0
  133. package/src/embed/ts-embed.ts +32 -14
  134. package/src/react/index.spec.tsx +0 -29
  135. package/src/types.ts +727 -243
  136. package/src/utils/graphql/answerService/answerService.ts +2 -4
  137. package/src/utils/processData.ts +4 -1
  138. package/src/utils/processTrigger.ts +1 -1
  139. package/cjs/src/embed/TsEmbed.d.ts +0 -302
  140. package/cjs/src/embed/TsEmbed.d.ts.map +0 -1
  141. package/cjs/src/embed/TsEmbed.js +0 -851
  142. package/cjs/src/embed/TsEmbed.js.map +0 -1
  143. package/cjs/src/utils/answerService.d.ts +0 -10
  144. package/cjs/src/utils/answerService.d.ts.map +0 -1
  145. package/cjs/src/utils/answerService.js +0 -61
  146. package/cjs/src/utils/answerService.js.map +0 -1
  147. package/cjs/src/utils/answerService.spec.d.ts +0 -2
  148. package/cjs/src/utils/answerService.spec.d.ts.map +0 -1
  149. package/cjs/src/utils/answerService.spec.js +0 -31
  150. package/cjs/src/utils/answerService.spec.js.map +0 -1
  151. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  152. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  153. package/cjs/src/utils/authService/tokenisedAuthSerice.js +0 -44
  154. package/cjs/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  155. package/cjs/src/utils/authService.d.ts +0 -55
  156. package/cjs/src/utils/authService.d.ts.map +0 -1
  157. package/cjs/src/utils/authService.js +0 -139
  158. package/cjs/src/utils/authService.js.map +0 -1
  159. package/cjs/src/utils/authService.spec.d.ts +0 -2
  160. package/cjs/src/utils/authService.spec.d.ts.map +0 -1
  161. package/cjs/src/utils/authService.spec.js +0 -82
  162. package/cjs/src/utils/authService.spec.js.map +0 -1
  163. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  164. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  165. package/cjs/src/utils/graphql/graphql-request.spec.js +0 -39
  166. package/cjs/src/utils/graphql/graphql-request.spec.js.map +0 -1
  167. package/cjs/src/utils/logger.d.ts +0 -28
  168. package/cjs/src/utils/logger.d.ts.map +0 -1
  169. package/cjs/src/utils/logger.js +0 -82
  170. package/cjs/src/utils/logger.js.map +0 -1
  171. package/dist/src/utils/answerService.d.ts +0 -10
  172. package/dist/src/utils/answerService.d.ts.map +0 -1
  173. package/dist/src/utils/answerService.spec.d.ts +0 -2
  174. package/dist/src/utils/answerService.spec.d.ts.map +0 -1
  175. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  176. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  177. package/dist/src/utils/authService.d.ts +0 -55
  178. package/dist/src/utils/authService.d.ts.map +0 -1
  179. package/dist/src/utils/authService.spec.d.ts +0 -2
  180. package/dist/src/utils/authService.spec.d.ts.map +0 -1
  181. package/dist/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  182. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  183. package/dist/src/utils/logger.d.ts +0 -28
  184. package/dist/src/utils/logger.d.ts.map +0 -1
  185. package/lib/src/embed/TsEmbed.d.ts +0 -302
  186. package/lib/src/embed/TsEmbed.d.ts.map +0 -1
  187. package/lib/src/embed/TsEmbed.js +0 -847
  188. package/lib/src/embed/TsEmbed.js.map +0 -1
  189. package/lib/src/utils/answerService.d.ts +0 -10
  190. package/lib/src/utils/answerService.d.ts.map +0 -1
  191. package/lib/src/utils/answerService.js +0 -57
  192. package/lib/src/utils/answerService.js.map +0 -1
  193. package/lib/src/utils/answerService.spec.d.ts +0 -2
  194. package/lib/src/utils/answerService.spec.d.ts.map +0 -1
  195. package/lib/src/utils/answerService.spec.js +0 -29
  196. package/lib/src/utils/answerService.spec.js.map +0 -1
  197. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  198. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  199. package/lib/src/utils/authService/tokenisedAuthSerice.js +0 -39
  200. package/lib/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  201. package/lib/src/utils/authService.d.ts +0 -55
  202. package/lib/src/utils/authService.d.ts.map +0 -1
  203. package/lib/src/utils/authService.js +0 -129
  204. package/lib/src/utils/authService.js.map +0 -1
  205. package/lib/src/utils/authService.spec.d.ts +0 -2
  206. package/lib/src/utils/authService.spec.d.ts.map +0 -1
  207. package/lib/src/utils/authService.spec.js +0 -80
  208. package/lib/src/utils/authService.spec.js.map +0 -1
  209. package/lib/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  210. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  211. package/lib/src/utils/graphql/graphql-request.spec.js +0 -36
  212. package/lib/src/utils/graphql/graphql-request.spec.js.map +0 -1
  213. package/lib/src/utils/logger.d.ts +0 -28
  214. package/lib/src/utils/logger.d.ts.map +0 -1
  215. package/lib/src/utils/logger.js +0 -75
  216. package/lib/src/utils/logger.js.map +0 -1
@@ -79,43 +79,43 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
79
79
  */
80
80
  export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
81
81
  /**
82
- * If true, the main navigation bar within the ThoughtSpot app
82
+ * If true, the top navigation bar within the ThoughtSpot app
83
83
  * is displayed. By default, the navigation bar is hidden.
84
- * This flag also control the homepage left nav-bar.
84
+ * This flag also controls the homepage left navigation bar.
85
85
  */
86
86
  showPrimaryNavbar?: boolean;
87
87
  /**
88
- * Flag to control Homepage Left Nav Bar
89
- * If showPrimaryNavbar is true, ie navigation bar(Global nav-bar) and Homepage left
90
- * nav-bar is visible, this flag will only hide the homepage left nav.
91
- * Precedence of showPrimaryNavbar flag > hideHomepageLeftNav flag.
88
+ * Control the visibility of the left navigation bar on the Homepage.
89
+ * If showPrimaryNavbar is true, that is, if the Global and Homepage
90
+ * nav-bars are visible, this flag will only hide the homepage left nav-bar.
91
+ * The showPrimaryNavbar flag takes precedence over the hideHomepageLeftNav.
92
92
  *
93
93
  * @default false
94
94
  * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
95
95
  */
96
96
  hideHomepageLeftNav?: boolean;
97
97
  /**
98
- * If true, help and profile buttons will hide on NavBar. By default,
99
- * they are shown.
98
+ * Control the visibility of the help (?) and profile buttons on the
99
+ * Global nav-bar. By default, these buttons are visible on the nav-bar.
100
100
  */
101
101
  disableProfileAndHelp?: boolean;
102
102
  /**
103
- * If true, application switcher button will hide on NavBar. By default,
104
- * they are shown.
103
+ * Control the visibility of the application switcher button on the nav-bar.
104
+ * By default, the application switcher is shown.
105
105
  */
106
106
  hideApplicationSwitcher?: boolean;
107
107
  /**
108
- * If true, org switcher button will hide on NavBar. By default,
109
- * they are shown.
108
+ * Control the visibility of the Org switcher button on the nav-bar.
109
+ * By default, the Org switcher button is shown.
110
110
  */
111
111
  hideOrgSwitcher?: boolean;
112
112
  /**
113
- * A URL path within the app that is to be embedded.
113
+ * A URL path to the embedded application page
114
114
  * If both path and pageId attributes are defined, the path definition
115
115
  * takes precedence. This is the path post the `#/` in the URL of the standalone
116
116
  * ThoughtSpot app. Use this to open the embedded view to a specific path.
117
117
  *
118
- * For eg, if you want the component to open to a specific liveboard
118
+ * For eg, if you want the component to open to a specific Liveboard
119
119
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
120
120
  *
121
121
  * @example
@@ -227,6 +227,12 @@ declare module '@thoughtspot/visual-embed-sdk/embed/app' {
227
227
  * embedded Liveboard or visualization.
228
228
  */
229
229
  protected getEmbedParams(): string;
230
+ /**
231
+ * Constructs the URL of the ThoughtSpot app page to be rendered.
232
+ *
233
+ * @param pageId The ID of the page to be embedded.
234
+ */
235
+ getIFrameSrc(): string;
230
236
  /**
231
237
  * Set the iframe height as per the computed height received
232
238
  * from the ThoughtSpot app.
@@ -426,8 +432,8 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
426
432
  */
427
433
  fullHeight?: boolean;
428
434
  /**
429
- * This is the minimum height(in pixels) for a full height Liveboard.
430
- * Setting this height helps resolves issues with empty Liveboards and
435
+ * This is the minimum height(in pixels) for a full-height Liveboard.
436
+ * Setting this height helps resolve issues with empty Liveboards and
431
437
  * other screens navigable from a Liveboard.
432
438
  *
433
439
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
@@ -440,7 +446,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
440
446
  enableVizTransformations?: boolean;
441
447
  /**
442
448
  * The Liveboard to display in the embedded view.
443
- * Use either of liveboardId or pinboardId to reference the Liveboard to embed.
449
+ * Use either liveboardId or pinboardId to reference the Liveboard to embed.
444
450
  *
445
451
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
446
452
  */
@@ -459,79 +465,84 @@ declare module '@thoughtspot/visual-embed-sdk/embed/liveboard' {
459
465
  * If set to true, all filter chips from a
460
466
  * Liveboard page will be read-only (no X buttons)
461
467
  *
462
- * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
468
+ * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1.sw
463
469
  */
464
470
  preventLiveboardFilterRemoval?: boolean;
465
471
  /**
466
- * Array of viz ids which should be visible when the liveboard
467
- * first renders. This can be changed by triggering the "SetVisibleVizs"
472
+ * Array of visualization IDs which should be visible when the Liveboard
473
+ * renders. This can be changed by triggering the `SetVisibleVizs`
468
474
  * event.
469
475
  *
470
476
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
471
477
  */
472
478
  visibleVizs?: string[];
473
479
  /**
474
- * To support backward compatibilty
480
+ * To support backward compatibility
475
481
  *
476
482
  * @hidden
477
483
  */
478
484
  preventPinboardFilterRemoval?: boolean;
479
485
  /**
480
- * Render embedded Liveboards and visualizations in the new Liveboard experience mode
486
+ * Render embedded Liveboards and visualizations in the
487
+ * new Liveboard experience mode.
481
488
  *
482
489
  * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
483
490
  */
484
491
  liveboardV2?: boolean;
485
492
  /**
486
- * Tab ID of the Liveboard that is supposed to be active
493
+ * Set a Liveboard tab as an active tab.
494
+ * Specify the tab ID.
487
495
  *
488
496
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
489
497
  */
490
498
  activeTabId?: string;
491
499
  /**
492
- * Hide tab Panel of embedded LB
500
+ * Show or hide the tab panel of the embedded Liveboard.
493
501
  *
494
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
502
+ * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
495
503
  */
496
504
  hideTabPanel?: boolean;
497
505
  /**
498
- * Show or hide Liveboard header
506
+ * Show or hide the Liveboard header.
499
507
  *
500
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
508
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
501
509
  * @default false
502
510
  */
503
511
  hideLiveboardHeader?: boolean;
504
512
  /**
505
- * Show or hide Liveboard title
513
+ * Show or hide the Liveboard title.
506
514
  *
507
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
515
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
508
516
  * @default false
509
517
  */
510
518
  showLiveboardTitle?: boolean;
511
519
  /**
512
- * Show or hide Liveboard description
520
+ * Show or hide the Liveboard description.
513
521
  *
514
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
522
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
515
523
  * @default false
516
524
  */
517
525
  showLiveboardDescription?: boolean;
518
526
  /**
519
- * Boolean for sticky Liveboard header.
527
+ * Control the position and visibility of
528
+ * the Liveboard header as the users scroll down the
529
+ * embedded Liveboard page.
520
530
  *
521
531
  * @example
522
532
  * ```js
523
533
  * const embed = new LiveboardEmbed('#embed', {
524
- * ... // other liveboard view config
534
+ * ... // other Liveboard view config
525
535
  * isLiveboardHeaderSticky: true,
526
536
  * });
527
537
  * ```
528
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
538
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
529
539
  */
530
540
  isLiveboardHeaderSticky?: boolean;
531
541
  }
532
542
  /**
533
- * Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already
534
- * waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS.
543
+ * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
544
+ * waits for the authentication to complete, so you need not wait for
545
+ * `AuthStatus.SUCCESS`.
535
546
  *
536
547
  * @example
537
548
  * ```js
@@ -590,18 +601,19 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
590
601
  import { DOMSelector, Action, ViewConfig } from '@thoughtspot/visual-embed-sdk/types';
591
602
  import { TsEmbed } from '@thoughtspot/visual-embed-sdk/embed/ts-embed';
592
603
  /**
593
- * Configuration for search options
604
+ * Configuration for search options.
605
+ *
594
606
  */
595
607
  export interface SearchOptions {
596
608
  /**
597
- * The tml string to load the answer
609
+ * Search tokens to pass in the query.
598
610
  */
599
611
  searchTokenString: string;
600
612
  /**
601
- * Boolean to determine if the search should be executed or not.
602
- * if it is executed, put the focus on the results.
603
- * if it’s not executed, put the focus in the search bar - at the end of
604
- * the tokens
613
+ * Boolean to define if the search should be executed or not.
614
+ * If it is executed, the focus is placed on the results.
615
+ * If it’s not executed, the focus is placed at the end of
616
+ * the token string in the search bar.
605
617
  */
606
618
  executeSearch?: boolean;
607
619
  }
@@ -617,19 +629,15 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
617
629
  */
618
630
  collapseDataSources?: boolean;
619
631
  /**
620
- * If set to true, hides the data sources panel.
632
+ * Show or hide the data sources panel.
621
633
  */
622
634
  hideDataSources?: boolean;
623
635
  /**
624
- * If set to true, hides the charts and tables in search answers.
636
+ * Show or hide the charts and tables in search answers.
625
637
  * This attribute can be used to create a custom visualization
626
638
  * using raw answer data.
627
639
  */
628
640
  hideResults?: boolean;
629
- /**
630
- * If set to true, expands all the data sources panel.
631
- */
632
- expandAllDataSource?: boolean;
633
641
  /**
634
642
  * If set to true, the Search Assist feature is enabled.
635
643
  *
@@ -643,9 +651,9 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
643
651
  forceTable?: boolean;
644
652
  /**
645
653
  * The array of data source GUIDs to set on load.
646
- * Only a single dataSource supported currently.
654
+ * Only a single data source is supported currently.
647
655
  *
648
- * @deprecated Use dataSource instead
656
+ * @deprecated Use `dataSource` instead.
649
657
  */
650
658
  dataSources?: string[];
651
659
  /**
@@ -657,11 +665,29 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
657
665
  /**
658
666
  * The initial search query to load the answer with.
659
667
  *
660
- * @deprecated Use {@link searchOptions} instead
668
+ * @deprecated
669
+ *
670
+ * Use {@link searchOptions} instead.
661
671
  */
662
672
  searchQuery?: string;
663
673
  /**
664
- * Configuration for search options
674
+ * Configuration for search options.
675
+ * Includes the following properties:
676
+ *
677
+ * `searchTokenString`: Search tokens to pass in the query.
678
+ *
679
+ * `executeSearch`: Boolean to define if the search should be executed or not.
680
+ * If it is executed, the focus is placed on the results.
681
+ * If it’s not executed, the focus is placed at the end of
682
+ * the token string in the search bar.
683
+ *
684
+ * @example
685
+ * ```js
686
+ * searchOptions: {
687
+ * searchTokenString: '[quantity purchased] [region]',
688
+ * executeSearch: true,
689
+ * }
690
+ * ```
665
691
  */
666
692
  searchOptions?: SearchOptions;
667
693
  /**
@@ -669,10 +695,10 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
669
695
  */
670
696
  answerId?: string;
671
697
  /**
672
- * If set to true, search page will render without the Search Bar
698
+ * If set to true, the search page will render without the Search Bar
673
699
  * The chart/table should still be visible.
674
700
  *
675
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
701
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
676
702
  */
677
703
  hideSearchBar?: boolean;
678
704
  /**
@@ -703,6 +729,14 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search' {
703
729
  protected embedComponentType: string;
704
730
  constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
705
731
  protected getEmbedParams(): string;
732
+ /**
733
+ * Construct the URL of the embedded ThoughtSpot search to be
734
+ * loaded in the iframe
735
+ *
736
+ * @param answerId The GUID of a saved answer
737
+ * @param dataSources A list of data source GUIDs
738
+ */
739
+ getIFrameSrc(): string;
706
740
  /**
707
741
  * Render the embedded ThoughtSpot search
708
742
  */
@@ -720,25 +754,41 @@ declare module '@thoughtspot/visual-embed-sdk/embed/search-bar' {
720
754
  export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts' | 'dataPanelV2' | 'hiddenHomepageModules' | 'hiddenHomeLeftNavItems' | 'hiddenTabs' | 'visibleTabs' | 'reorderedHomepageModules'> {
721
755
  /**
722
756
  * The array of data source GUIDs to set on load.
723
- * Only a single dataSource supported currently.
757
+ * Only a single data source is supported currently.
724
758
  *
725
- * @deprecated Use dataSource instead
759
+ * @deprecated Use `dataSource` instead
726
760
  */
727
761
  dataSources?: string[];
728
762
  /**
729
763
  * The array of data source GUIDs to set on load.
730
764
  *
731
- * @version: SDK: 1.19.0
765
+ * @version: SDK: 1.19.0, ThoughtSpot 9.0.0.cl, 9.0.1.sw
732
766
  */
733
767
  dataSource?: string;
734
768
  /**
735
- * Flag to set if last selected dataSource should be used
769
+ * Boolean to define if the last selected data source should be used
736
770
  *
737
- * @version: SDK: 1.24.0
771
+ * @version: SDK: 1.24.0, ThoughtSpot 9.5.0.cl, 9.5.0.sw
738
772
  */
739
773
  useLastSelectedSources?: boolean;
740
774
  /**
741
- * Configuration for search options
775
+ * Configuration for search options.
776
+ * Includes the following properties:
777
+ *
778
+ * `searchTokenString`: Search tokens to pass in the query.
779
+ *
780
+ * `executeSearch`: Boolean to define if the search should be executed or not.
781
+ * If it is executed, the focus is placed on the results.
782
+ * If it’s not executed, the focus is placed at the end of
783
+ * the token string in the search bar.
784
+ *
785
+ * @example
786
+ * ```js
787
+ * searchOptions: {
788
+ * searchTokenString: '[quantity purchased] [region]',
789
+ * executeSearch: true,
790
+ * }
791
+ * ```
742
792
  */
743
793
  searchOptions?: SearchOptions;
744
794
  }
@@ -810,8 +860,8 @@ declare module '@thoughtspot/visual-embed-sdk/auth' {
810
860
  */
811
861
  LOGOUT = "LOGOUT",
812
862
  /**
813
- * Emitted when inPopup: true in the SAMLRedirect flow.
814
- * And, we are waiting for popup to be triggered either programatically
863
+ * Emitted when inPopup is true in the SAMLRedirect flow and the
864
+ * popup is waiting to be triggered either programmatically
815
865
  * or by the trigger button.
816
866
  *
817
867
  * @version SDK: 1.19.0
@@ -856,8 +906,8 @@ declare module '@thoughtspot/visual-embed-sdk/auth' {
856
906
  */
857
907
  export enum AuthEvent {
858
908
  /**
859
- * Manually trigger the SSO popup. This is useful with
860
- * authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
909
+ * Manually trigger the SSO popup. This is useful when
910
+ * authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
861
911
  */
862
912
  TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
863
913
  }
@@ -970,10 +1020,14 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
970
1020
  */
971
1021
  None = "None",
972
1022
  /**
973
- * Passthrough SSO to the embedded App within the iframe. Requires least
1023
+ * Passthrough SSO to the embedded application within the iframe. Requires least
974
1024
  * configuration, but may not be supported by all IDPs. This will behave like `None`
975
1025
  * if SSO is not configured on ThoughtSpot.
976
1026
  *
1027
+ * To use this:
1028
+ * Your SAML or OpenID provider must allow iframe redirects.
1029
+ * For example, if you are using Okta as IdP, you can enable iframe embedding.
1030
+ *
977
1031
  * @example
978
1032
  * ```js
979
1033
  * init({
@@ -981,12 +1035,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
981
1035
  * authType: AuthType.EmbeddedSSO,
982
1036
  * });
983
1037
  * ```
984
- * Set authentication type as Embedded SSO.
985
- *
986
- * To use this:
987
- * Your SAML or OpenID provider must allow iframe redirects.
988
- * eg. If you are using okta as IdP, you can enable iFrame embedding.
989
- * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
1038
+ * @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
990
1039
  */
991
1040
  EmbeddedSSO = "EmbeddedSSO",
992
1041
  /**
@@ -1005,10 +1054,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1005
1054
  SAML = "SSO_SAML",
1006
1055
  /**
1007
1056
  * SSO using SAML
1008
- * Will make the host application redirect to the SAML Idp. Use this
1009
- * when the idp does not allow itself to be embedded.
1057
+ * Makes the host application redirect to the SAML IdP. Use this
1058
+ * if your IdP does not allow itself to be embedded.
1010
1059
  *
1011
- * This redirects the host application to the SAML Idp. The host application
1060
+ * This redirects the host application to the SAML IdP. The host application
1012
1061
  * will be redirected back to the ThoughtSpot app after authentication.
1013
1062
  *
1014
1063
  * @example
@@ -1019,7 +1068,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1019
1068
  * });
1020
1069
  * ```
1021
1070
  *
1022
- * This opens the SAML Idp in a popup window. The popup is triggered
1071
+ * This opens the SAML IdP in a popup window. The popup is triggered
1023
1072
  * when the user clicks the trigger button. The popup window will be
1024
1073
  * closed automatically after authentication.
1025
1074
  * @example
@@ -1033,8 +1082,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1033
1082
  * });
1034
1083
  * ```
1035
1084
  *
1036
- * Can also use event to trigger the popup flow. Works the same
1037
- * as above example.
1085
+ * Can also use the event to trigger the popup flow. Works the same
1086
+ * as the above example.
1038
1087
  * @example
1039
1088
  * ```js
1040
1089
  * const authEE = init({
@@ -1058,7 +1107,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1058
1107
  OIDC = "SSO_OIDC",
1059
1108
  /**
1060
1109
  * SSO using OIDC
1061
- * Will make the host application redirect to the OIDC Idp.
1110
+ * Will make the host application redirect to the OIDC IdP.
1062
1111
  * See code samples in {@link SAMLRedirect}.
1063
1112
  */
1064
1113
  OIDCRedirect = "SSO_OIDC",
@@ -1070,8 +1119,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1070
1119
  */
1071
1120
  AuthServer = "AuthServer",
1072
1121
  /**
1073
- * Trusted authentication server, Use your own authentication server
1074
- * which returns a bearer token, generated using the secret_key obtained
1122
+ * Trusted authentication server. Use your own authentication server
1123
+ * which returns a bearer token, generated using the `secret_key` obtained
1075
1124
  * from ThoughtSpot.
1076
1125
  *
1077
1126
  * @example
@@ -1088,11 +1137,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1088
1137
  */
1089
1138
  TrustedAuthToken = "AuthServer",
1090
1139
  /**
1091
- * Trusted authentication server Cookieless, Use you own authentication
1092
- * server which returns a bearer token, generated using the secret_key
1140
+ * Trusted authentication server Cookieless, Use your own authentication
1141
+ * server which returns a bearer token, generated using the `secret_key`
1093
1142
  * obtained from ThoughtSpot. This uses a cookieless authentication
1094
- * approach, recommended to by pass third-party cookie-blocking restriction
1095
- * implemented by some browsers
1143
+ * approach, recommended to bypass the third-party cookie-blocking restriction
1144
+ * implemented by some browsers.
1096
1145
  *
1097
1146
  * @example
1098
1147
  * ```js
@@ -1105,7 +1154,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1105
1154
  * .then((data) => data.token);
1106
1155
  * }
1107
1156
  * ```
1108
- * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1.sw
1157
+ * @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
1109
1158
  */
1110
1159
  TrustedAuthTokenCookieless = "AuthServerCookieless",
1111
1160
  /**
@@ -1227,13 +1276,19 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1227
1276
  * The ThoughtSpot cluster hostname or IP address.
1228
1277
  */
1229
1278
  thoughtSpotHost: string;
1279
+ /**
1280
+ * If true, all the iframe links will have /v2 added automatically.
1281
+ * If false, all the iframe links will have /v1 added automatically.
1282
+ * If undefined, nothing will be added
1283
+ */
1284
+ enableReactShell?: boolean | undefined;
1230
1285
  /**
1231
1286
  * The authentication mechanism to use.
1232
1287
  */
1233
1288
  authType: AuthType;
1234
1289
  /**
1235
1290
  * [AuthServer] The trusted authentication endpoint to use to get the
1236
- * authentication token. A GET request is made to the
1291
+ * authentication token. A `GET` request is made to the
1237
1292
  * authentication API endpoint, which returns the token
1238
1293
  * as a plaintext response. For trusted authentication,
1239
1294
  * the `authEndpoint` or `getAuthToken` attribute is required.
@@ -1246,8 +1301,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1246
1301
  * attribute is required.
1247
1302
  *
1248
1303
  * It is advisable to fetch a new token inside this method and not
1249
- * reuse and older issued token, as because when auth expires this is
1250
- * called again and if it is called with an older token the authentication
1304
+ * reuse the old issued token. When auth expires this method is
1305
+ * called again and if it is called with an older token, the authentication
1251
1306
  * will not succeed.
1252
1307
  */
1253
1308
  getAuthToken?: () => Promise<string>;
@@ -1257,7 +1312,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1257
1312
  */
1258
1313
  username?: string;
1259
1314
  /**
1260
- * [Basic] The ThoughtSpot login password corresponding to the user name
1315
+ * [Basic] The ThoughtSpot login password corresponding to the username
1261
1316
  *
1262
1317
  * Warning: This feature is primarily intended for developer testing. It is
1263
1318
  * strongly advised not to use this authentication method in production.
@@ -1265,7 +1320,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1265
1320
  password?: string;
1266
1321
  /**
1267
1322
  * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
1268
- * open the SAML auth flow in a popup, instead of redirecting browser in
1323
+ * open the SAML auth flow in a popup, instead of redirecting the browser in
1269
1324
  * place.
1270
1325
  *
1271
1326
  * @default false
@@ -1274,91 +1329,93 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1274
1329
  noRedirect?: boolean;
1275
1330
  /**
1276
1331
  * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
1277
- * the SAML auth flow in a popup, instead of redirecting browser in place.
1332
+ * the SAML auth flow in a popup, instead of redirecting the browser in place.
1278
1333
  *
1279
- * Need to use this with authTriggerContainer. Or manually trigger
1280
- * the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
1334
+ * Need to use this with `authTriggerContainer`. Or manually trigger
1335
+ * the `AuthEvent.TRIGGER_SSO_POPUP` event on a user interaction.
1281
1336
  *
1282
1337
  * @default false
1283
1338
  * @version SDK: 1.18.0
1284
1339
  */
1285
1340
  inPopup?: boolean;
1286
1341
  /**
1287
- * [SSO] For SSO Authentication, one can supply an optional path param,
1288
- * this will be the path on the host origin where the SAML flow will be
1342
+ * [SSO] For SSO Authentication, one can supply an optional path param;
1343
+ * This will be the path on the host origin where the SAML flow will be
1289
1344
  * terminated.
1290
1345
  *
1291
1346
  * Eg: "/dashboard", "#/foo" [Do not include the host]
1292
1347
  *
1293
- * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1.sw
1348
+ * @version SDK: 1.10.2 | ThoughtSpot 8.2.0.cl, 8.4.1.sw
1294
1349
  */
1295
1350
  redirectPath?: string;
1296
1351
  /** @internal */
1297
1352
  basepath?: string;
1298
1353
  /**
1299
- * Should we encode URL Query Params using base64 encoding which thoughtspot
1300
- * will generate for embedding. This provides additional security to
1301
- * thoughtspot clusters against Cross site scripting attacks.
1354
+ * Boolean to define if the query parameters in the ThoughtSpot URL
1355
+ * should be encoded in base64. This provides additional security to
1356
+ * Thoughtspot clusters against cross-site scripting attacks.
1302
1357
  *
1303
1358
  * @default false
1304
1359
  */
1305
1360
  shouldEncodeUrlQueryParams?: boolean;
1306
1361
  /**
1307
- * Suppress cookie access alert when third party cookies are blocked by the
1308
- * user's browser. Third party cookie blocking is the default behaviour on
1309
- * Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
1310
- * encouraged to handle `noCookieAccess` event, to show your own treatment
1362
+ * Suppress cookie access alert when third-party cookies are blocked by the
1363
+ * user's browser. Third-party cookie blocking is the default behaviour on
1364
+ * some web browsers like Safari. If you set this attribute to `true`,
1365
+ * you are encouraged to handle `noCookieAccess` event, to show your own treatment
1311
1366
  * in this case.
1312
1367
  *
1313
1368
  * @default false
1314
1369
  */
1315
1370
  suppressNoCookieAccessAlert?: boolean;
1316
1371
  /**
1317
- * Ignore cookie access alert when third party cookies are blocked by the
1372
+ * Ignore the cookie access alert when third-party cookies are blocked by the
1318
1373
  * user's browser. If you set this to `true`, the embedded iframe behaviour
1319
- * persist even in case of non logged in user.
1374
+ * persists even in the case of a non-logged-in user.
1320
1375
  *
1321
1376
  * @default false
1322
1377
  */
1323
1378
  ignoreNoCookieAccess?: boolean;
1324
1379
  /**
1325
- * Re-login when session expires with the previous login options
1380
+ * Re-login a user with the previous login options
1381
+ * when a user session expires.
1326
1382
  *
1327
1383
  * @default false
1328
1384
  */
1329
1385
  autoLogin?: boolean;
1330
1386
  /**
1331
1387
  * Disable redirection to the login page when the embedded session expires
1332
- * This flag is typically used alongside the combination of auth modes such as {@link
1333
- * AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
1388
+ * This flag is typically used alongside the combination of authentication modes such
1389
+ * as {@link AuthType.AuthServer} and auto-login behavior {@link
1390
+ * EmbedConfig.autoLogin}
1334
1391
  *
1335
1392
  * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1336
1393
  * @default false
1337
1394
  */
1338
1395
  disableLoginRedirect?: boolean;
1339
1396
  /**
1340
- * This message is displayed on the embed view when the login fails.
1397
+ * This message is displayed in the embedded view when a user login fails.
1341
1398
  *
1342
1399
  * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1343
1400
  */
1344
1401
  loginFailedMessage?: string;
1345
1402
  /**
1346
- * Calls the prefetch method internally when set to true
1403
+ * Calls the prefetch method internally when set to `true`
1347
1404
  *
1348
1405
  * @default false
1349
1406
  */
1350
1407
  callPrefetch?: boolean;
1351
1408
  /**
1352
- * When there are multiple embeds, queue the render of embed to start
1353
- * after the previous embed's render is complete. This helps in the load
1354
- * performance by decreasing the load on the browser.
1409
+ * When there are multiple objects embedded, queue the rendering of embedded objects
1410
+ * to start after the previous embed's render is complete. This helps improve
1411
+ * performance by decreasing the load on the browser.
1355
1412
  *
1356
1413
  * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1357
1414
  * @default false
1358
1415
  */
1359
1416
  queueMultiRenders?: boolean;
1360
1417
  /**
1361
- * Dynamic CSS Url to be injected in the loaded application.
1418
+ * Dynamic CSS URL to be injected in the loaded application.
1362
1419
  * You would also need to set `style-src` in the CSP settings.
1363
1420
  *
1364
1421
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -1366,9 +1423,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1366
1423
  */
1367
1424
  customCssUrl?: string;
1368
1425
  /**
1369
- * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
1426
+ * [AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
1370
1427
  * additional call. This is slower and should be avoided. Listen to the
1371
- * NO_COOKIE_ACCESS event to handle the situation.
1428
+ * `NO_COOKIE_ACCESS` event to handle the situation.
1372
1429
  *
1373
1430
  * This is slightly slower than letting the browser handle the cookie check, as it
1374
1431
  * involves an extra network call.
@@ -1377,26 +1434,26 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1377
1434
  */
1378
1435
  detectCookieAccessSlow?: boolean;
1379
1436
  /**
1380
- * Hide beta alert warning message for SearchEmbed.
1437
+ * Hide the `beta` alert warning message for SearchEmbed.
1381
1438
  *
1382
1439
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
1383
1440
  */
1384
1441
  suppressSearchEmbedBetaWarning?: boolean;
1385
1442
  /**
1386
- * Hide beta alert warning message for SageEmbed.
1443
+ * Hide `beta` alert warning message for SageEmbed.
1387
1444
  *
1388
1445
  */
1389
1446
  suppressSageEmbedBetaWarning?: boolean;
1390
1447
  /**
1391
1448
  * Custom style params for embed Config.
1392
1449
  *
1393
- * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
1450
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
1394
1451
  */
1395
1452
  customizations?: CustomisationsInterface;
1396
1453
  /**
1397
- * For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
1398
- * click to trigger the flow. This is the containing element
1399
- * for that button.
1454
+ * For `inPopup` SAMLRedirect or OIDCRedirect authentication, we need a
1455
+ * button that the user can click to trigger the flow.
1456
+ * This attribute sets a containing element for that button.
1400
1457
  *
1401
1458
  * @example
1402
1459
  * ```js
@@ -1406,11 +1463,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1406
1463
  * authTriggerContainer: '#auth-trigger-container'
1407
1464
  * })
1408
1465
  * ```
1409
- * @version SDK: 1.17.0 | ThoughtSpot: *
1466
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
1410
1467
  */
1411
1468
  authTriggerContainer?: string | HTMLElement;
1412
1469
  /**
1413
- * Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
1470
+ * Specify that we want to use the `AuthEvent.TRIGGER_SSO_POPUP` event to trigger
1414
1471
  * SAML popup. This is useful when you want to trigger the popup on a custom user
1415
1472
  * action.
1416
1473
  *
@@ -1418,20 +1475,22 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1418
1475
  useEventForSAMLPopup?: boolean;
1419
1476
  /**
1420
1477
  * Text to show in the button which triggers the popup auth flow.
1421
- * Default: "Authorize".
1478
+ * Default: `Authorize`.
1422
1479
  *
1423
- * @version SDK: 1.17.0 | ThoughtSpot: *
1480
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
1424
1481
  */
1425
1482
  authTriggerText?: string;
1426
1483
  /**
1427
- * Disable Full App access of Embedded app outside of the iFrame.
1484
+ * Prevent users from accessing the full application or ThoughtSpot application pages
1485
+ * access to the embedded application users
1486
+ * outside of the iframe.
1428
1487
  *
1429
1488
  * @default true
1430
1489
  * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw
1431
1490
  */
1432
1491
  blockNonEmbedFullAppAccess?: boolean;
1433
1492
  /**
1434
- * Host config incase embedded app is inside TS app itself
1493
+ * Host config in case embedded app is inside TS app itself
1435
1494
  *
1436
1495
  * @hidden
1437
1496
  */
@@ -1457,17 +1516,17 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1457
1516
  export interface LayoutConfig {
1458
1517
  }
1459
1518
  /**
1460
- * Embedded iFrame configuration
1519
+ * Embedded iframe configuration
1461
1520
  *
1462
1521
  * @group Embed components
1463
1522
  */
1464
1523
  export interface FrameParams {
1465
1524
  /**
1466
- * The width of the iFrame (unit is pixels if numeric).
1525
+ * The width of the iframe (unit is pixels if numeric).
1467
1526
  */
1468
1527
  width?: number | string;
1469
1528
  /**
1470
- * The height of the iFrame (unit is pixels if numeric).
1529
+ * The height of the iframe (unit is pixels if numeric).
1471
1530
  */
1472
1531
  height?: number | string;
1473
1532
  /**
@@ -1568,7 +1627,6 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1568
1627
  */
1569
1628
  runtimeParameters?: RuntimeParameter[];
1570
1629
  /**
1571
- /**
1572
1630
  * The locale/language to use for the embedded view.
1573
1631
  *
1574
1632
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
@@ -1668,31 +1726,29 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1668
1726
  */
1669
1727
  reorderedHomepageModules?: HomepageModule[];
1670
1728
  /**
1671
- * The list of tab IDs to show in the embedded.
1672
- * Only this Tabs will be shown in their respective LBs.
1673
- * Use this to show an tabID.
1729
+ * The list of tab IDs to show in the embedded Liveboard.
1730
+ * Only the tabs specified in the array will be shown in the Liveboard.
1674
1731
  *
1675
- * Use either this or hiddenTabs.
1732
+ * Use either `visibleTabs` or `hiddenTabs`.
1676
1733
  *
1677
1734
  * @example
1678
1735
  * ```js
1679
- * const embed = new LiveboardEmbed('#embed', {
1680
- * ... // other liveboard view config
1681
- * visibleTabs: [
1736
+ * visibleTabs: [
1682
1737
  * '430496d6-6903-4601-937e-2c691821af3c',
1683
- * 'f547ec54-2a37-4516-a222-2b06719af726']
1684
- * });
1738
+ * 'f547ec54-2a37-4516-a222-2b06719af726']
1685
1739
  * ```
1686
1740
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1687
1741
  */
1688
1742
  visibleTabs?: string[];
1689
1743
  /**
1690
- * homepageLeftNavItems : show/hide Homeapage Left Nav Bar Items
1691
- * There are 8 home nav list items, we will send those item as list
1692
- * which we want to hide for TSE.
1693
- * eg: hiddenHomeLeftNavItems = [HomeLeftNavItem.Home] to hide home.
1744
+ * homepageLeftNavItems : Show or hide the left navigation bar items.
1745
+ * There are 8 eight home navigation list items.
1746
+ * To hide these items, specify the string in the array.
1694
1747
  *
1695
- * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
1748
+ * ```js
1749
+ * hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
1750
+ * ```
1751
+ * @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
1696
1752
  */
1697
1753
  hiddenHomeLeftNavItems?: HomeLeftNavItem[];
1698
1754
  /**
@@ -1708,7 +1764,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1708
1764
  * });
1709
1765
  * embed.showPreRender();
1710
1766
  * ```
1711
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
1767
+ * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
1712
1768
  */
1713
1769
  preRenderId?: string;
1714
1770
  /**
@@ -1741,7 +1797,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1741
1797
  status?: string;
1742
1798
  };
1743
1799
  /**
1744
- * MessageOptions: By Providing options, getting specific event start / end based on
1800
+ * MessageOptions: By providing options, getting specific event start / end based on
1745
1801
  * option
1746
1802
  *
1747
1803
  * @group Events
@@ -1749,7 +1805,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1749
1805
  export type MessageOptions = {
1750
1806
  /**
1751
1807
  * A boolean value indicating that start status events of this type
1752
- * will be dispatched
1808
+ * will be dispatched.
1753
1809
  */
1754
1810
  start?: boolean;
1755
1811
  };
@@ -1769,7 +1825,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1769
1825
  */
1770
1826
  export type MessageCallbackObj = {
1771
1827
  /**
1772
- * options: It contains start, A boolean value indicating that start
1828
+ * options: It contains start, a boolean value indicating that start
1773
1829
  * status events of this type will be dispatched
1774
1830
  */
1775
1831
  options: MessageOptions;
@@ -1841,7 +1897,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1841
1897
  IN = "IN"
1842
1898
  }
1843
1899
  /**
1844
- * Home page module that can be hide
1900
+ * Home page module that can be hidden
1845
1901
  */
1846
1902
  export enum HomepageModule {
1847
1903
  /**
@@ -1857,7 +1913,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1857
1913
  */
1858
1914
  Favorite = "FAVORITE",
1859
1915
  /**
1860
- * List of answers and liveboards
1916
+ * List of answers and Liveboards
1861
1917
  */
1862
1918
  MyLibrary = "MY_LIBRARY",
1863
1919
  /**
@@ -1890,7 +1946,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1890
1946
  values: (number | boolean | string)[];
1891
1947
  }
1892
1948
  /**
1893
- * A filter that can be applied to ThoughtSpot answers, Liveboards, or
1949
+ * A filter that can be applied to ThoughtSpot Answers, Liveboards, or
1894
1950
  * visualizations at runtime.
1895
1951
  */
1896
1952
  export interface RuntimeParameter {
@@ -1926,6 +1982,14 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1926
1982
  export enum EmbedEvent {
1927
1983
  /**
1928
1984
  * Rendering has initialized.
1985
+ * @example
1986
+ *```js
1987
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
1988
+ * //show a loader
1989
+ * function showLoader() {
1990
+ * document.getElementById("loader");
1991
+ * }
1992
+ *```
1929
1993
  *
1930
1994
  * @returns timestamp - The timestamp when the event was generated.
1931
1995
  */
@@ -1933,69 +1997,162 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1933
1997
  /**
1934
1998
  * Authentication has either succeeded or failed.
1935
1999
  *
2000
+ * @example
2001
+ *```js
2002
+ * appEmbed.on(EmbedEvent.AuthInit, payload => {
2003
+ * console.log('AuthInit', payload);
2004
+ * })
2005
+ *```
2006
+ *
1936
2007
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
1937
2008
  */
1938
2009
  AuthInit = "authInit",
1939
2010
  /**
1940
2011
  * The embed object container has loaded.
1941
- *
1942
2012
  * @returns timestamp - The timestamp when the event was generated.
2013
+ * @example
2014
+ *```js
2015
+ * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
2016
+ * //hide loader
2017
+ * function hideLoader() {
2018
+ * document.getElementById("loader");
2019
+ * }
2020
+ *```
1943
2021
  */
1944
2022
  Load = "load",
1945
2023
  /**
1946
2024
  * Data pertaining to answer or Liveboard is received
1947
- *
1948
2025
  * @return data - The answer or Liveboard data
2026
+ * @example
2027
+ *```js
2028
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
2029
+ * console.log('data', payload);
2030
+ * })
2031
+ *```
1949
2032
  * @important
1950
2033
  */
1951
2034
  Data = "data",
1952
2035
  /**
1953
- * Search/answer/Liveboard filters have been applied/updated by the user.
2036
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
1954
2037
  *
1955
2038
  * @hidden
1956
2039
  */
1957
2040
  FiltersChanged = "filtersChanged",
1958
2041
  /**
1959
2042
  * Search query has been updated by the user.
2043
+ *
2044
+ * @example
2045
+ *```js
2046
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
2047
+ *```
2048
+ *
1960
2049
  */
1961
2050
  QueryChanged = "queryChanged",
1962
2051
  /**
1963
- * A drill down operation has been performed.
2052
+ * A drill-down operation has been performed.
1964
2053
  *
1965
2054
  * @returns additionalFilters - Any additional filters applied
1966
2055
  * @returns drillDownColumns - The columns on which drill down was performed
1967
2056
  * @returns nonFilteredColumns - The columns that were not filtered
2057
+ *
2058
+ * @example
2059
+ *```js
2060
+ * searchEmbed.trigger(HostEvent.DrillDown, {
2061
+ * points: {
2062
+ * clickedPoint,
2063
+ * selectedPoints: selectedPoint
2064
+ * },
2065
+ * autoDrillDown: true,
2066
+ * })
2067
+ *```
2068
+ * In this example, `VizPointDoubleClick` event is used for
2069
+ * triggering the `DrillDown` event when an area or specific
2070
+ * data point on a table or chart is double-clicked.
2071
+ *
2072
+ * @example
2073
+ *```js
2074
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
2075
+ * console.log(payload);
2076
+ * const clickedPoint = payload.data.clickedPoint;
2077
+ * const selectedPoint = payload.data.selectedPoints;
2078
+ * console.log('>>> called', clickedPoint);
2079
+ * embed.trigger(HostEvent.DrillDown, {
2080
+ * points: {
2081
+ * clickedPoint,
2082
+ * selectedPoints: selectedPoint
2083
+ * },
2084
+ * autoDrillDown: true,
2085
+ * })
2086
+ * })
2087
+ *```
2088
+ *
1968
2089
  */
1969
2090
  Drilldown = "drillDown",
1970
2091
  /**
1971
2092
  * One or more data sources have been selected.
1972
- *
1973
2093
  * @returns dataSourceIds - the list of data sources
2094
+ *
2095
+ * @example
2096
+ * ```js
2097
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
2098
+ * console.log('DataSourceSelected', payload);
2099
+ * })
2100
+ * ```
2101
+ *
1974
2102
  */
1975
2103
  DataSourceSelected = "dataSourceSelected",
1976
2104
  /**
1977
2105
  * One or more data columns have been selected.
1978
- *
1979
2106
  * @returns columnIds - the list of columns
1980
2107
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
2108
+ *
2109
+ * @example
2110
+ * ```js
2111
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
2112
+ * console.log('AddRemoveColumns', payload);
2113
+ * })
2114
+ * ```
2115
+ *
1981
2116
  */
1982
2117
  AddRemoveColumns = "addRemoveColumns",
1983
2118
  /**
1984
- * A custom action has been triggered
2119
+ * A custom action has been triggered.
1985
2120
  *
1986
- * @returns actionId - The id of the custom action
1987
- * @returns data - The answer or Liveboard data
2121
+ * @returns actionId - ID of the custom action
2122
+ * @returns data - Response payload with the Answer or Liveboard data
2123
+ *
2124
+ * @example
2125
+ * ```js
2126
+ * appEmbed.on(EmbedEvent.customAction, payload => {
2127
+ * const data = payload.data;
2128
+ * if (data.id === 'insert Custom Action ID here') {
2129
+ * console.log('Custom Action event:', data.embedAnswerData);
2130
+ * }
2131
+ * })
2132
+ * ```
1988
2133
  */
1989
2134
  CustomAction = "customAction",
1990
2135
  /**
1991
- * Listen to double clicks on a visualization
2136
+ * Listen to double click actions on a visualization.
2137
+ *
2138
+ * @return ContextMenuInputPoints - Data point that is double-clicked
1992
2139
  *
1993
- * @return ContextMenuInputPoints - data point that is double clicked
1994
2140
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
2141
+ *
2142
+ * @example
2143
+ * ```js
2144
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
2145
+ * console.log('VizPointDoubleClick', payload)
2146
+ * })
2147
+ * ```
1995
2148
  */
1996
2149
  VizPointDoubleClick = "vizPointDoubleClick",
1997
2150
  /**
1998
- * Listen to clicks on a visualization in a liveboard or Search result.
2151
+ * Listen to clicks on a visualization in a Liveboard or Search result.
2152
+ *
2153
+ * @return viz, clickedPoint - metadata about the point that is clicked
2154
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2155
+ * @important
1999
2156
  *
2000
2157
  * @example
2001
2158
  * ```js
@@ -2009,25 +2166,46 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2009
2166
  * )
2010
2167
  * });
2011
2168
  * ```
2012
- * @return viz, clickedPoint - metadata about point that is clicked
2013
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2014
- * @important
2015
2169
  */
2016
2170
  VizPointClick = "vizPointClick",
2017
2171
  /**
2018
2172
  * An error has occurred.
2019
2173
  *
2020
2174
  * @returns error - An error object or message
2175
+ *
2176
+ * @example
2177
+ * ```js
2178
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
2179
+ * //show error messaage
2180
+ * function showErrorMsg() {
2181
+ * document.getElementById("error");
2182
+ * ```
2183
+ *
2021
2184
  */
2022
2185
  Error = "Error",
2023
2186
  /**
2024
- * The embedded object has sent an alert
2187
+ * The embedded object has sent an alert.
2025
2188
  *
2026
2189
  * @returns alert - An alert object
2190
+ *
2191
+ * @example
2192
+ * ```js
2193
+ * searchEmbed.on(EmbedEvent.Alert)
2194
+ * ```
2195
+ *
2027
2196
  */
2028
2197
  Alert = "alert",
2029
2198
  /**
2030
2199
  * The ThoughtSpot auth session has expired.
2200
+ *
2201
+ * @example
2202
+ *```js
2203
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
2204
+ * //show auth expired banner
2205
+ * function showAuthExpired() {
2206
+ * document.getElementById("authExpiredBanner");
2207
+ * }
2208
+ *```
2031
2209
  */
2032
2210
  AuthExpire = "ThoughtspotAuthExpired",
2033
2211
  /**
@@ -2057,14 +2235,28 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2057
2235
  */
2058
2236
  EmbedIframeCenter = "EmbedIframeCenter",
2059
2237
  /**
2060
- * Emitted when the "Get Data" button in Search Bar embed
2061
- * is clicked.
2238
+ * Emitted when the **Get Data** action is initiated.
2239
+ * Applicable to `SearchBarEmbed` only.
2240
+ *
2241
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2062
2242
  *
2063
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
2243
+ * @example
2244
+ *```js
2245
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
2246
+ * .then(data => {
2247
+ * console.log('Answer Data:', data);
2248
+ * })
2249
+ *```
2064
2250
  */
2065
2251
  GetDataClick = "getDataClick",
2066
2252
  /**
2067
2253
  * Detects the route change.
2254
+ *
2255
+ * @example
2256
+ *```js
2257
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
2258
+ * console.log('data', payload))
2259
+ *```
2068
2260
  */
2069
2261
  RouteChange = "ROUTE_CHANGE",
2070
2262
  /**
@@ -2074,10 +2266,15 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2074
2266
  */
2075
2267
  V1Data = "exportVizDataToParent",
2076
2268
  /**
2077
- * Emitted when the embed does not have cookie access. This
2078
- * happens on Safari where third-party cookies are blocked by default.
2269
+ * Emitted when the embed does not have cookie access. This happens
2270
+ * when Safari and other Web browsers block third-party cookies
2271
+ * are blocked by default. `NoCookieAccess` can trigger
2079
2272
  *
2080
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
2273
+ * @example
2274
+ *```js
2275
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
2276
+ *```
2277
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
2081
2278
  */
2082
2279
  NoCookieAccess = "noCookieAccess",
2083
2280
  /**
@@ -2089,239 +2286,539 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2089
2286
  SAMLComplete = "samlComplete",
2090
2287
  /**
2091
2288
  * Emitted when any modal is opened in the app
2092
- *
2093
2289
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2290
+ *
2291
+ * @example
2292
+ *```js
2293
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
2294
+ * console.log('dialog open', payload);
2295
+ * })
2296
+ *```
2094
2297
  */
2095
2298
  DialogOpen = "dialog-open",
2096
2299
  /**
2097
2300
  * Emitted when any modal is closed in the app
2098
- *
2099
2301
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2302
+ *
2303
+ * @example
2304
+ *```js
2305
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
2306
+ * console.log('dialog close', payload);
2307
+ * })
2308
+ *```
2100
2309
  */
2101
2310
  DialogClose = "dialog-close",
2102
2311
  /**
2103
2312
  * Emitted when the Liveboard shell loads.
2104
2313
  * You can use this event as a hook to trigger
2105
2314
  * other events on the rendered Liveboard.
2106
- *
2107
2315
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
2316
+ *
2317
+ * @example
2318
+ *```js
2319
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
2320
+ console.log('Liveboard is rendered', payload);
2321
+ })
2322
+ *```
2323
+ * The following example shows how to trigger
2324
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
2325
+ *
2326
+ * @example
2327
+ *```js
2328
+ * const embedRef = useEmbedRef();
2329
+ * const onLiveboardRendered = () => {
2330
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
2331
+ * };
2332
+ *```
2108
2333
  */
2109
2334
  LiveboardRendered = "PinboardRendered",
2110
2335
  /**
2111
2336
  * This can be used to register an event listener which
2112
2337
  * is triggered on all events.
2113
- *
2114
2338
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
2339
+ *
2340
+ * @example
2341
+ *```js
2342
+ * appEmbed.on(EmbedEvent.ALL, payload => {
2343
+ * console.log('Embed Events', payload)
2344
+ * })
2345
+ *```
2115
2346
  */
2116
2347
  ALL = "*",
2117
2348
  /**
2118
2349
  * Emitted when an Answer is saved in the app
2119
- *
2120
2350
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2351
+ * @example
2352
+ *```js
2353
+ * //trigger when action starts
2354
+ * searchEmbed.on(EmbedEvent.Save, payload => {
2355
+ * console.log('Save', payload)
2356
+ * }, {
2357
+ * start: true
2358
+ * })
2359
+ * //trigger when action ends
2360
+ * searchEmbed.on(EmbedEvent.Save, payload => {
2361
+ * console.log('Save', payload)
2362
+ * })
2363
+ *```
2121
2364
  */
2122
2365
  Save = "save",
2123
2366
  /**
2124
2367
  * Emitted when the download action is triggered on an answer
2125
2368
  *
2369
+ * **Note**: This event is deprecated in v1.21.0.
2370
+ * To fire an event when a download action is initiated on a chart or table,
2371
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
2372
+ * or `EmbedEvent.DownloadAsXLSX`
2373
+ *
2126
2374
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2375
+ *
2376
+ * @example
2377
+ *```js
2378
+ * liveboardEmbed.trigger(HostEvent.Download, {
2379
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2380
+ * })
2381
+ *```
2127
2382
  */
2128
2383
  Download = "download",
2129
2384
  /**
2130
2385
  * Emitted when the download action is triggered on an answer
2131
- *
2132
2386
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
2387
+ *
2388
+ * @example
2389
+ *```js
2390
+ * //trigger when action starts
2391
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
2392
+ * console.log('download PNG', payload)}, {start: true })
2393
+ * //trigger when action ends
2394
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
2395
+ * console.log('download PNG', payload)})
2396
+ *```
2397
+ *
2133
2398
  */
2134
2399
  DownloadAsPng = "downloadAsPng",
2135
2400
  /**
2136
2401
  * Emitted when the Download as PDF action is triggered on an answer
2137
2402
  *
2138
2403
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2404
+ *
2405
+ * @example
2406
+ *```js
2407
+ * //trigger when action starts
2408
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
2409
+ * console.log('download PDF', payload)}, {start: true })
2410
+ * //trigger when action ends
2411
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
2412
+ * console.log('download PDF', payload)})
2413
+ *```
2414
+ *
2139
2415
  */
2140
2416
  DownloadAsPdf = "downloadAsPdf",
2141
2417
  /**
2142
2418
  * Emitted when the Download as CSV action is triggered on an answer
2143
2419
  *
2144
2420
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2421
+ * @example
2422
+ *```js
2423
+ * //trigger when action starts
2424
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
2425
+ * console.log('download CSV', payload)}, {start: true })
2426
+ * //trigger when action ends
2427
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
2428
+ * console.log('download CSV', payload)})
2429
+ *```
2145
2430
  */
2146
2431
  DownloadAsCsv = "downloadAsCsv",
2147
2432
  /**
2148
2433
  * Emitted when the Download as XLSX action is triggered on an answer
2149
2434
  *
2150
2435
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2436
+ *
2437
+ * @example
2438
+ *```js
2439
+ * //trigger when action starts
2440
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
2441
+ * console.log('download Xlsx', payload)}, { start: true })
2442
+ * //trigger when action ends
2443
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
2444
+ * console.log('download Xlsx', payload)})
2445
+ *```
2151
2446
  */
2152
2447
  DownloadAsXlsx = "downloadAsXlsx",
2153
2448
  /**
2154
- * Emitted when an answer is deleted in the app
2449
+ * Emitted when an Answer is deleted in the app
2155
2450
  *
2156
2451
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2452
+ *
2453
+ * @example
2454
+ *```js
2455
+ * //trigger when action starts
2456
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
2457
+ * console.log('delete answer', payload)}, {start: true })
2458
+ * //trigger when action is completed
2459
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
2460
+ * console.log('delete answer', payload)})
2461
+ *```
2157
2462
  */
2158
2463
  AnswerDelete = "answerDelete",
2159
2464
  /**
2160
2465
  * Emitted when an answer is pinned to a Liveboard
2161
2466
  *
2162
2467
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2468
+ * @example
2469
+ *```js
2470
+ * //trigger when action starts
2471
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
2472
+ * console.log('pin', payload)
2473
+ * }, {
2474
+ * start: true
2475
+ * })
2476
+ * //trigger when action ends
2477
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
2478
+ * console.log('pin', payload)
2479
+ * })
2480
+ *```
2163
2481
  */
2164
2482
  Pin = "pin",
2165
2483
  /**
2166
2484
  * Emitted when SpotIQ analysis is triggered
2167
2485
  *
2168
2486
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2487
+ * @example
2488
+ *```js
2489
+ * //trigger when action starts
2490
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
2491
+ * console.log('SpotIQAnalyze', payload)
2492
+ * }, {
2493
+ * start: true
2494
+ * })
2495
+ * //trigger when action ends
2496
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
2497
+ * console.log('SpotIQ analyze', payload)
2498
+ * })
2499
+ *```
2169
2500
  */
2170
2501
  SpotIQAnalyze = "spotIQAnalyze",
2171
2502
  /**
2172
2503
  * Emitted when a user shares an object with another user or group
2173
2504
  *
2174
2505
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2506
+ *
2507
+ * @example
2508
+ *```js
2509
+ * //trigger when action starts
2510
+ * searchEmbed.on(EmbedEvent.Share, payload => {
2511
+ * console.log('Share', payload)
2512
+ * }, {
2513
+ * start: true
2514
+ * })
2515
+ * //trigger when action ends
2516
+ * searchEmbed.on(EmbedEvent.Share, payload => {
2517
+ * console.log('Share', payload)
2518
+ * })
2519
+ *```
2175
2520
  */
2176
2521
  Share = "share",
2177
2522
  /**
2178
- * Emitted when a user clicks the Include action to include a specific value or data
2179
- * on a chart or table
2523
+ * Emitted when a user clicks the **Include** action to include a specific value or
2524
+ * data on a chart or table.
2180
2525
  *
2181
2526
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2527
+ * @example
2528
+ *```js
2529
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
2530
+ * console.log('Drill include', payload);
2531
+ * })
2532
+ *```
2182
2533
  */
2183
2534
  DrillInclude = "context-menu-item-include",
2184
2535
  /**
2185
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
2186
- * on a chart or table
2536
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
2537
+ * data on a chart or table
2187
2538
  *
2188
2539
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2540
+ * @example
2541
+ *```js
2542
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
2543
+ * console.log('Drill exclude', payload);
2544
+ * })
2545
+ *```
2189
2546
  */
2190
2547
  DrillExclude = "context-menu-item-exclude",
2191
2548
  /**
2192
- * Emitted when copied column value on the app
2549
+ * Emitted when a column value is copied in the embedded app.
2193
2550
  *
2194
2551
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2552
+ * @example
2553
+ *```js
2554
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
2555
+ * console.log('copy to clipboard', payload);
2556
+ * })
2557
+ *```
2195
2558
  */
2196
2559
  CopyToClipboard = "context-menu-item-copy-to-clipboard",
2197
2560
  /**
2198
- * Emitted when a user clicks the Update TML action
2561
+ * Emitted when a user clicks the **Update TML** action
2199
2562
  *
2200
2563
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2564
+ * @example
2565
+ *```js
2566
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
2567
+ * })
2568
+ *```
2201
2569
  */
2202
2570
  UpdateTML = "updateTSL",
2203
2571
  /**
2204
- * Emitted when a user clicks the Edit TML action
2572
+ * Emitted when a user clicks the **Edit TML** action
2205
2573
  *
2206
2574
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2575
+ * @example
2576
+ *```js
2577
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
2578
+ * console.log('Edit TML', payload);
2579
+ * })
2580
+ *```
2207
2581
  */
2208
2582
  EditTML = "editTSL",
2209
2583
  /**
2210
- * Emitted when ExportTML trigger in answer on the app
2211
- *
2584
+ * Emitted when the **Export TML** action is triggered on an
2585
+ * an embedded object in the app
2212
2586
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2587
+ * @example
2588
+ *```js
2589
+ * //trigger when action starts
2590
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
2591
+ * console.log('Export TML', payload)}, { start: true })
2592
+ * //trigger when action ends
2593
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
2594
+ * console.log('Export TML', payload)})
2595
+ *```
2213
2596
  */
2214
2597
  ExportTML = "exportTSL",
2215
2598
  /**
2216
- * Emitted when an answer is saved as a view
2599
+ * Emitted when an Answer is saved as a View.
2217
2600
  *
2218
2601
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2602
+ * @example
2603
+ *```js
2604
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
2605
+ * console.log('View', payload);
2606
+ * })
2607
+ *```
2219
2608
  */
2220
2609
  SaveAsView = "saveAsView",
2221
2610
  /**
2222
- * Emitted when copy of existing answer on the app
2611
+ * Emitted when the user creates a copy of an Answer
2223
2612
  *
2224
2613
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2614
+ * @example
2615
+ *```js
2616
+ * //trigger when action starts
2617
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
2618
+ * console.log('Copy and edit', payload)}, {start: true })
2619
+ * //trigger when action ends
2620
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
2621
+ * console.log('Copy and edit', payload)})
2622
+ *```
2225
2623
  */
2226
2624
  CopyAEdit = "copyAEdit",
2227
2625
  /**
2228
- * Emitted when a user clicks Show underlying data on an answe
2626
+ * Emitted when a user clicks Show underlying data on an Answer
2229
2627
  *
2230
2628
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2629
+ * @example
2630
+ *```js
2631
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
2632
+ * console.log('show data', payload);
2633
+ * })
2634
+ *```
2231
2635
  */
2232
2636
  ShowUnderlyingData = "showUnderlyingData",
2233
2637
  /**
2234
- * Emitted when an answer is switched to a chart or table view
2638
+ * Emitted when an answer is switched to a chart or table view.
2235
2639
  *
2236
2640
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2641
+ * @example
2642
+ *```js
2643
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
2644
+ * console.log('switch view', payload);
2645
+ * })
2646
+ *```
2237
2647
  */
2238
2648
  AnswerChartSwitcher = "answerChartSwitcher",
2239
2649
  /**
2240
- * Internal event to communicate the initial settings back to the TS APP
2650
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
2241
2651
  *
2242
2652
  * @hidden
2243
2653
  */
2244
2654
  APP_INIT = "appInit",
2245
2655
  /**
2246
- * Emitted when a user clicks Show Liveboard details on a Liveboard
2656
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
2247
2657
  *
2248
2658
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2659
+ * @example
2660
+ *```js
2661
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
2662
+ * console.log('Liveboard details', payload);
2663
+ * })
2664
+ *```
2249
2665
  */
2250
2666
  LiveboardInfo = "pinboardInfo",
2251
2667
  /**
2252
2668
  * Emitted when a user clicks on the Favorite icon on a Liveboard
2253
2669
  *
2254
2670
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2671
+ * @example
2672
+ *```js
2673
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
2674
+ * console.log('favorites', payload);
2675
+ * })
2676
+ *```
2255
2677
  */
2256
2678
  AddToFavorites = "addToFavorites",
2257
2679
  /**
2258
- * Emitted when a user clicks Schedule on a Liveboard
2680
+ * Emitted when a user clicks **Schedule** on a Liveboard
2259
2681
  *
2260
2682
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2683
+ * @example
2684
+ *```js
2685
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
2686
+ * console.log(`Liveboard schedule', payload);
2687
+ * })
2688
+ *```
2261
2689
  */
2262
2690
  Schedule = "subscription",
2263
2691
  /**
2264
- * Emitted when a user clicks Edit on a Liveboard or visualization
2692
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
2265
2693
  *
2266
2694
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2695
+ * @example
2696
+ *```js
2697
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
2698
+ * console.log(`Liveboard edit', payload);
2699
+ * })
2700
+ *```
2267
2701
  */
2268
2702
  Edit = "edit",
2269
2703
  /**
2270
- * Emitted when a user clicks Make a copy on a Liveboard
2704
+ * Emitted when a user clicks *Make a copy* on a Liveboard
2271
2705
  *
2272
2706
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2707
+ * @example
2708
+ *```js
2709
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
2710
+ * console.log(`Copy', payload);
2711
+ * })
2712
+ *```
2273
2713
  */
2274
2714
  MakeACopy = "makeACopy",
2275
2715
  /**
2276
- * Emitted when a user clicks Present on a Liveboard or visualization
2716
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
2277
2717
  *
2278
2718
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2719
+ * @example
2720
+ *```js
2721
+ * liveboardEmbed.trigger(HostEvent.Present)
2722
+ *```
2723
+ *
2724
+ * @example
2725
+ *```js
2726
+ * liveboardEmbed.on(EmbedEvent.Present, {
2727
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2728
+ * })
2729
+ *```
2279
2730
  */
2280
2731
  Present = "present",
2281
2732
  /**
2282
- * Emitted when a user clicks Delete on a Liveboard
2733
+ * Emitted when a user clicks **Delete** on a visualization
2283
2734
  *
2284
2735
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2736
+ * @example
2737
+ *```js
2738
+ * liveboardEmbed.trigger(HostEvent.Delete,
2739
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2740
+ *```
2741
+ *
2285
2742
  */
2286
2743
  Delete = "delete",
2287
2744
  /**
2288
2745
  * Emitted when a user clicks Manage schedules on a Liveboard
2289
2746
  *
2290
2747
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2748
+ *
2749
+ * @example
2750
+ *```js
2751
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
2752
+ *```
2753
+ *
2291
2754
  */
2292
2755
  SchedulesList = "schedule-list",
2293
2756
  /**
2294
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
2757
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
2295
2758
  *
2296
2759
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2760
+ *
2761
+ * @example
2762
+ *```js
2763
+ * liveboardEmbed.trigger(HostEvent.Cancel)
2764
+ *```
2765
+ *
2297
2766
  */
2298
2767
  Cancel = "cancel",
2299
2768
  /**
2300
- * Emitted when a user clicks Explore on a visualization
2769
+ * Emitted when a user clicks **Explore** on a visualization
2301
2770
  *
2302
2771
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2772
+ *
2773
+ * @example
2774
+ *```js
2775
+ * liveboardEmbed.trigger(HostEvent.Explore, {
2776
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2777
+ *```
2778
+ *
2303
2779
  */
2304
2780
  Explore = "explore",
2305
2781
  /**
2306
- * Emitted when a user clicks Copy link action on a visualization
2782
+ * Emitted when a user clicks **Copy link** action on a visualization
2307
2783
  *
2308
2784
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2785
+ *
2786
+ * @example
2787
+ *```js
2788
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
2789
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2790
+ *```
2791
+ *
2309
2792
  */
2310
2793
  CopyLink = "embedDocument",
2311
2794
  /**
2312
- * Emitted when a user interacts with cross filters on a visualization or liveboard
2795
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
2796
+ *
2797
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
2798
+ *
2799
+ * @example
2800
+ *```js
2801
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
2802
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2803
+ *```
2313
2804
  *
2314
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2315
2805
  */
2316
2806
  CrossFilterChanged = "cross-filter-changed",
2317
2807
  /**
2318
2808
  * Emitted when a user right clicks on a visualization (chart or table)
2319
2809
  *
2320
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2810
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
2811
+ *
2812
+ * @example
2813
+ *```js
2814
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
2815
+ * console.log('VizPointClick', payload)
2816
+ * })
2817
+ *```
2321
2818
  */
2322
2819
  VizPointRightClick = "vizPointRightClick",
2323
2820
  /**
2324
- * Emitted when a user clicks on Insert to slide on a visualization
2821
+ * Emitted when a user clicks **Insert to slide** on a visualization
2325
2822
  *
2326
2823
  * @hidden
2327
2824
  */
@@ -2329,52 +2826,53 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2329
2826
  /**
2330
2827
  * @hidden
2331
2828
  * Emitted when a user changes any filter on a Liveboard.
2332
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
2829
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
2333
2830
  */
2334
2831
  FilterChanged = "filterChanged",
2335
2832
  /**
2336
- * Emitted when a user click on Go button in Sage Embed
2833
+ * Emitted when a user clicks the **Go** button on the Search page
2337
2834
  *
2338
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2835
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2339
2836
  */
2340
2837
  SageEmbedQuery = "sageEmbedQuery",
2341
2838
  /**
2342
- * Emitten when a user select data source in Sage Embed
2839
+ * Emitted when a user selects a data source.
2840
+ *
2841
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2343
2842
  *
2344
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2345
2843
  */
2346
2844
  SageWorksheetUpdated = "sageWorksheetUpdated",
2347
2845
  /**
2348
- * Emitted when a user updates a connection in Data tab
2846
+ * Emitted when a user updates a connection on the **Data** page
2349
2847
  *
2350
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
2848
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
2351
2849
  */
2352
2850
  UpdateConnection = "updateConnection",
2353
2851
  /**
2354
- * Emitted when a user updates a connection in Data tab
2852
+ * Emitted when a user updates a connection on the **Data** page
2355
2853
  *
2356
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
2854
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
2357
2855
  */
2358
2856
  CreateConnection = "createConnection",
2359
2857
  /**
2360
2858
  * Emitted when name, status (private or public) or filter values of a
2361
- * PersonalisedView is updated.
2859
+ * Personalised view is updated.
2362
2860
  *
2363
2861
  * @returns viewName: string
2364
2862
  * @returns viewId: string
2365
2863
  * @returns liveboardId: string
2366
2864
  * @returns isPublic: boolean
2367
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2865
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2368
2866
  */
2369
2867
  UpdatePersonalisedView = "updatePersonalisedView",
2370
2868
  /**
2371
- * Emitted when a PersonalisedView is saved.
2869
+ * Emitted when a Personalised view is saved.
2372
2870
  *
2373
2871
  * @returns viewName: string
2374
2872
  * @returns viewId: string
2375
2873
  * @returns liveboardId: string
2376
2874
  * @returns isPublic: boolean
2377
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2875
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2378
2876
  */
2379
2877
  SavePersonalisedView = "savePersonalisedView",
2380
2878
  /**
@@ -2384,7 +2882,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2384
2882
  * @returns viewId: string
2385
2883
  * @returns liveboardId: string
2386
2884
  * @returns isPublic: boolean
2387
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2885
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2388
2886
  */
2389
2887
  ResetLiveboard = "resetLiveboard",
2390
2888
  /**
@@ -2392,11 +2890,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2392
2890
  *
2393
2891
  * @returns views: string[]
2394
2892
  * @returns liveboardId: string
2395
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
2893
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2396
2894
  */
2397
2895
  DeletePersonalisedView = "deletePersonalisedView",
2398
2896
  /**
2399
- * Emitten when a user creates a new worksheet
2897
+ * Emitted when a user creates a new worksheet
2400
2898
  *
2401
2899
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
2402
2900
  */
@@ -2426,15 +2924,16 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2426
2924
  */
2427
2925
  export enum HostEvent {
2428
2926
  /**
2429
- * Triggers a search query in AppEmbed and SearchEmbed
2430
- * deployments.
2927
+ * Triggers a search operation with the search tokens specified in
2928
+ * the search query string.
2929
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
2431
2930
  * Includes the following properties:
2432
2931
  *
2433
- * @param - dataSourceIds - The data source GUID to Search on
2932
+ * @param - `searchQuery` - query string with search tokens
2933
+ * @param - `dataSources` - Data source GUID to Search on
2434
2934
  * - Although an array, only a single source
2435
2935
  * is supported.
2436
- * @param - searchQuery - Query string with search tokens
2437
- * @param - execute - executes the existing / updated query
2936
+ * @param - `execute` - executes search and updates the existing query
2438
2937
  * @example
2439
2938
  * ```js
2440
2939
  * searchembed.trigger(HostEvent.Search, {
@@ -2454,6 +2953,10 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2454
2953
  * @param - columnGuid - Optional. GUID of the column to drill
2455
2954
  * by. If not provided it will auto drill by the configured
2456
2955
  * column.
2956
+ * @param - autoDrillDown - Optional. If true, the drill down will be
2957
+ * done automatically on the most popular column.
2958
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
2959
+ * in case of a liveboard.
2457
2960
  * @example
2458
2961
  * ```js
2459
2962
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -2470,6 +2973,25 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2470
2973
  * });
2471
2974
  * })
2472
2975
  * ```
2976
+ * @example
2977
+ * ```js
2978
+ * // Works with TS 9.8.0 and above
2979
+ *
2980
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
2981
+ * console.log(payload);
2982
+ * const clickedPoint = payload.data.clickedPoint;
2983
+ * const selectedPoint = payload.data.selectedPoints;
2984
+ * console.log('>>> called', clickedPoint);
2985
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
2986
+ * points: {
2987
+ * clickedPoint,
2988
+ * selectedPoints: selectedPoint
2989
+ * },
2990
+ * autoDrillDown: true,
2991
+ * vizId: payload.data.vizId
2992
+ * });
2993
+ * })
2994
+ * ```
2473
2995
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
2474
2996
  */
2475
2997
  DrillDown = "triggerDrillDown",
@@ -2486,7 +3008,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2486
3008
  */
2487
3009
  Reload = "reload",
2488
3010
  /**
2489
- * Sets the visible visualizations on a Liveboard.
3011
+ * Display specific visualizations on a Liveboard.
2490
3012
  *
2491
3013
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
2492
3014
  * in this parameter will be hidden.
@@ -2500,7 +3022,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2500
3022
  */
2501
3023
  SetVisibleVizs = "SetPinboardVisibleVizs",
2502
3024
  /**
2503
- * Set the Active Tab of a Liveboard.
3025
+ * Set a Liveboard tab as an active tab.
2504
3026
  *
2505
3027
  * @param - tabId - string of id of Tab to show
2506
3028
  * @example
@@ -2513,7 +3035,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2513
3035
  */
2514
3036
  SetActiveTab = "SetActiveTab",
2515
3037
  /**
2516
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
3038
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
2517
3039
  * runtime filters passed here are appended to the existing runtime
2518
3040
  * filters.
2519
3041
  * Pass an array of runtime filters with the following attributes:
@@ -2539,10 +3061,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2539
3061
  */
2540
3062
  UpdateRuntimeFilters = "UpdateRuntimeFilters",
2541
3063
  /**
2542
- * Navigate to a specific page in the embedded application without reloading the page.
3064
+ * Navigate to a specific page in the embedded ThoughtSpot application.
2543
3065
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
2544
3066
  *
2545
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
3067
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
3068
+ * be a number; for example, `1`, `-1`.
3069
+ *
2546
3070
  * @example
2547
3071
  * ```js
2548
3072
  * appEmbed.navigateToPage(-1)
@@ -2551,7 +3075,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2551
3075
  */
2552
3076
  Navigate = "Navigate",
2553
3077
  /**
2554
- * Opens the filter panel for a particular column.
3078
+ * Open the filter panel for a particular column.
2555
3079
  * Works with Search and Liveboard embed.
2556
3080
  *
2557
3081
  * @param - { columnId: string,
@@ -2569,7 +3093,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2569
3093
  */
2570
3094
  OpenFilter = "openFilter",
2571
3095
  /**
2572
- * Adds columns to the current search query.
3096
+ * Add columns to the current search query.
2573
3097
  *
2574
3098
  * @param - { columnIds: string[] }
2575
3099
  * @example
@@ -2580,7 +3104,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2580
3104
  */
2581
3105
  AddColumns = "addColumns",
2582
3106
  /**
2583
- * Removes a column from the current search query.
3107
+ * Remove a column from the current search query.
2584
3108
  *
2585
3109
  * @param - { columnId: string }
2586
3110
  * @example
@@ -2591,27 +3115,29 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2591
3115
  */
2592
3116
  RemoveColumn = "removeColumn",
2593
3117
  /**
2594
- * Gets the current Liveboard content.
3118
+ * Get the transient state of a Liveboard as encoded content.
3119
+ * This includes unsaved and ad hoc changes such as
3120
+ * Liveboard filters, runtime filters applied on visualizations on a
3121
+ * Liveboard, and Liveboard layout, changes to visualizations such as
3122
+ * sorting, toggling of legends, and data drill down.
2595
3123
  *
2596
3124
  * @example
2597
3125
  * ```js
2598
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
3126
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
3127
+ * data=>console.log(data))
2599
3128
  * ```
2600
3129
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
2601
3130
  */
2602
3131
  getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
2603
3132
  /**
2604
- * Triggers the **Pin** action on an embedded object
3133
+ * Trigger the **Pin** action on an embedded object
2605
3134
  *
2606
3135
  * @param - Liveboard embed takes the `vizId` as a
2607
- * key. Can be left undefined when embedding Search, full app or
3136
+ * key. Can be left undefined when embedding Search, full app, or
2608
3137
  * a visualization.
2609
3138
  * @example
2610
3139
  * ```js
2611
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2612
- * ```
2613
- * ```js
2614
- * vizEmbed.trigger(HostEvent.Pin)
3140
+ * appEmbed.trigger(HostEvent.Pin)
2615
3141
  * ```
2616
3142
  * ```js
2617
3143
  * searchEmbed.trigger(HostEvent.Pin)
@@ -2620,17 +3146,18 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2620
3146
  */
2621
3147
  Pin = "pin",
2622
3148
  /**
2623
- * Triggers the **Show Liveboard details** action on a Liveboard
3149
+ * Trigger the **Show Liveboard details** action
3150
+ * on an embedded Liveboard.
2624
3151
  *
2625
3152
  * @example
2626
- * ```js
2627
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2628
- * ```
3153
+ *```js
3154
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
3155
+ *```
2629
3156
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2630
3157
  */
2631
3158
  LiveboardInfo = "pinboardInfo",
2632
3159
  /**
2633
- * Triggers the **Schedule** action on a Liveboard
3160
+ * Trigger the **Schedule** action on an embedded Liveboard.
2634
3161
  *
2635
3162
  * @example
2636
3163
  * ```js
@@ -2640,7 +3167,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2640
3167
  */
2641
3168
  Schedule = "subscription",
2642
3169
  /**
2643
- * Triggers the **Manage schedule** action on a Liveboard
3170
+ * Trigger the **Manage schedule** action on an embedded Liveboard
2644
3171
  *
2645
3172
  * @example
2646
3173
  * ```js
@@ -2650,7 +3177,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2650
3177
  */
2651
3178
  SchedulesList = "schedule-list",
2652
3179
  /**
2653
- * Triggers the **Export TML** action on a Liveboard
3180
+ * Trigger the **Export TML** action on an embedded Liveboard.
2654
3181
  *
2655
3182
  * @example
2656
3183
  * ```js
@@ -2660,7 +3187,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2660
3187
  */
2661
3188
  ExportTML = "exportTSL",
2662
3189
  /**
2663
- * Triggers the **Edit TML** action on a Liveboard
3190
+ * Trigger the **Edit TML** action on an embedded Liveboard.
2664
3191
  *
2665
3192
  * @example
2666
3193
  * ```js
@@ -2670,7 +3197,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2670
3197
  */
2671
3198
  EditTML = "editTSL",
2672
3199
  /**
2673
- * Triggers the **Update TML** action on a Liveboard
3200
+ * Trigger the **Update TML** action on an embedded Liveboard.
2674
3201
  *
2675
3202
  * @example
2676
3203
  * ```js
@@ -2680,7 +3207,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2680
3207
  */
2681
3208
  UpdateTML = "updateTSL",
2682
3209
  /**
2683
- * Triggers the **Download PDF** action on a Liveboard
3210
+ * Trigger the **Download PDF** action on an embedded Liveboard.
2684
3211
  *
2685
3212
  * @example
2686
3213
  * ```js
@@ -2690,8 +3217,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2690
3217
  */
2691
3218
  DownloadAsPdf = "downloadAsPdf",
2692
3219
  /**
2693
- * Triggers the **Make a copy** action on a Liveboard, Search, or
2694
- * visualization page
3220
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
3221
+ * visualization page.
2695
3222
  *
2696
3223
  * @example
2697
3224
  * ```js
@@ -2707,7 +3234,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2707
3234
  */
2708
3235
  MakeACopy = "makeACopy",
2709
3236
  /**
2710
- * Triggers the **Delete** action on a Liveboard
3237
+ * Trigger the **Delete** action for a Liveboard.
2711
3238
  *
2712
3239
  * @example
2713
3240
  * ```js
@@ -2717,7 +3244,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2717
3244
  */
2718
3245
  Remove = "delete",
2719
3246
  /**
2720
- * Triggers the **Explore* action on a visualization
3247
+ * Trigger the **Explore** action on a visualization.
2721
3248
  *
2722
3249
  * @param - an object with `vizId` as a key
2723
3250
  * @example
@@ -2728,7 +3255,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2728
3255
  */
2729
3256
  Explore = "explore",
2730
3257
  /**
2731
- * Triggers the **Create alert** action on a visualization
3258
+ * Trigger the **Create alert** action on a visualization
2732
3259
  *
2733
3260
  * @param - an object with `vizId` as a key
2734
3261
  * @example
@@ -2741,7 +3268,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2741
3268
  */
2742
3269
  CreateMonitor = "createMonitor",
2743
3270
  /**
2744
- * Triggers the **Manage alerts** action on a visualization
3271
+ * Trigger the **Manage alerts** action on a visualization
2745
3272
  *
2746
3273
  * @param - an object with `vizId` as a key
2747
3274
  * @example
@@ -2754,7 +3281,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2754
3281
  */
2755
3282
  ManageMonitor = "manageMonitor",
2756
3283
  /**
2757
- * Triggers the **Edit** action on a Liveboard or visualization
3284
+ * Trigger the **Edit** action on a Liveboard or visualization
2758
3285
  *
2759
3286
  * @param - object - To trigger the action for a specific visualization
2760
3287
  * in Liveboard embed, pass in `vizId` as a key.
@@ -2775,7 +3302,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2775
3302
  */
2776
3303
  Edit = "edit",
2777
3304
  /**
2778
- * Triggers the **Copy link** action on a Liveboard or visualization
3305
+ * Trigger the **Copy link** action on a Liveboard or visualization
2779
3306
  *
2780
3307
  * @param - object - to trigger the action for a
2781
3308
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -2793,7 +3320,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2793
3320
  */
2794
3321
  CopyLink = "embedDocument",
2795
3322
  /**
2796
- * Triggers the **Present** action on a Liveboard or visualization
3323
+ * Trigger the **Present** action on a Liveboard or visualization
2797
3324
  *
2798
3325
  * @param - object - to trigger the action for a specific visualization
2799
3326
  * in Liveboard embed, pass in `vizId` as a key
@@ -2811,7 +3338,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2811
3338
  */
2812
3339
  Present = "present",
2813
3340
  /**
2814
- * Gets TML for the current search.
3341
+ * Get TML for the current search.
2815
3342
  *
2816
3343
  * @example
2817
3344
  * ```js
@@ -2826,7 +3353,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2826
3353
  */
2827
3354
  GetTML = "getTML",
2828
3355
  /**
2829
- * Triggers the **Show underlying data** action on visualization or search
3356
+ * Trigger the **Show underlying data** action on visualization or search
2830
3357
  *
2831
3358
  * @param - an object with vizId as a key
2832
3359
  * @example
@@ -2844,7 +3371,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2844
3371
  */
2845
3372
  ShowUnderlyingData = "showUnderlyingData",
2846
3373
  /**
2847
- * Triggers the **Delete** action on visualization or search
3374
+ * Trigger the **Delete** action for a visualization
3375
+ * in an embedded Liveboard, or a chart or table
3376
+ * generated from Search.
2848
3377
  *
2849
3378
  * @param - Liveboard embed takes an object with `vizId` as a key.
2850
3379
  * Can be left empty if embedding Search or visualization.
@@ -2854,16 +3383,13 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2854
3383
  * '730496d6-6903-4601-937e-2c691821af3c'})
2855
3384
  * ```
2856
3385
  * ```js
2857
- * vizEmbed.trigger(HostEvent.Delete)
2858
- * ```
2859
- * ```js
2860
3386
  * searchEmbed.trigger(HostEvent.Delete)
2861
3387
  * ```
2862
3388
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2863
3389
  */
2864
3390
  Delete = "onDeleteAnswer",
2865
3391
  /**
2866
- * Triggers the **SpotIQ analyze** action on visualization
3392
+ * Trigger the **SpotIQ analyze** action on visualization
2867
3393
  * or search.
2868
3394
  *
2869
3395
  * @param - Liveboard embed takes `vizId` as a
@@ -2884,7 +3410,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2884
3410
  */
2885
3411
  SpotIQAnalyze = "spotIQAnalyze",
2886
3412
  /**
2887
- * Triggers the **Download** action on charts in
3413
+ * Trigger the **Download** action on charts in
2888
3414
  * the embedded view.
2889
3415
  *
2890
3416
  * @example
@@ -2893,17 +3419,15 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2893
3419
  * '730496d6-6903-4601-937e-2c691821af3c'})
2894
3420
  * ```
2895
3421
  * ```js
2896
- * vizEmbed.trigger(HostEvent.Download)
3422
+ * embed.trigger(HostEvent.Download)
2897
3423
  * ```
2898
- * ```js
2899
- * searchEmbed.trigger(HostEvent.Download)
2900
- * ```
2901
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
3424
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
3425
+ * Use {@link DownloadAsPng}
2902
3426
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2903
3427
  */
2904
3428
  Download = "downloadAsPng",
2905
3429
  /**
2906
- * Triggers the **Download** > **PNG** action on
3430
+ * Trigger the **Download** > **PNG** action on
2907
3431
  * charts in the embedded view.
2908
3432
  *
2909
3433
  * @example
@@ -2919,7 +3443,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2919
3443
  */
2920
3444
  DownloadAsPng = "downloadAsPng",
2921
3445
  /**
2922
- * Triggers the **Download** > **CSV** action on tables in
3446
+ * Trigger the **Download** > **CSV** action on tables in
2923
3447
  * the embedded view.
2924
3448
  *
2925
3449
  * @example
@@ -2937,7 +3461,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2937
3461
  */
2938
3462
  DownloadAsCsv = "downloadAsCSV",
2939
3463
  /**
2940
- * Triggers the **Download** > **XLSX** action on tables
3464
+ * Trigger the **Download** > **XLSX** action on tables
2941
3465
  * in the embedded view.
2942
3466
  *
2943
3467
  * @example
@@ -2955,7 +3479,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2955
3479
  */
2956
3480
  DownloadAsXlsx = "downloadAsXLSX",
2957
3481
  /**
2958
- * Triggers the **Share** action on an embedded
3482
+ * Trigger the **Share** action on an embedded
2959
3483
  * Liveboard or Answer.
2960
3484
  *
2961
3485
  * @example
@@ -2969,7 +3493,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2969
3493
  */
2970
3494
  Share = "share",
2971
3495
  /**
2972
- * Triggers the **Save** action on a Liveboard or Answer.
3496
+ * Trigger the **Save** action on a Liveboard or Answer.
2973
3497
  * Saves the changes.
2974
3498
  *
2975
3499
  * @example
@@ -2983,7 +3507,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2983
3507
  */
2984
3508
  Save = "save",
2985
3509
  /**
2986
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
3510
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
2987
3511
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
2988
3512
  *
2989
3513
  * @param - an object with `vizId` as a key
@@ -2999,7 +3523,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
2999
3523
  */
3000
3524
  SyncToSheets = "sync-to-sheets",
3001
3525
  /**
3002
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
3526
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
3003
3527
  * Sends data from an Answer or Liveboard visualization to third-party apps such
3004
3528
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
3005
3529
  *
@@ -3016,7 +3540,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3016
3540
  */
3017
3541
  SyncToOtherApps = "sync-to-other-apps",
3018
3542
  /**
3019
- * Triggers the **Manage pipelines** action on an embedded
3543
+ * Trigger the **Manage pipelines** action on an embedded
3020
3544
  * visualization or Answer.
3021
3545
  * Allows users to manage ThoughtSpot Sync pipelines.
3022
3546
  *
@@ -3033,18 +3557,21 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3033
3557
  */
3034
3558
  ManagePipelines = "manage-pipeline",
3035
3559
  /**
3036
- * Triggers the Reset search on the Search page
3560
+ * Reset search operation on the Search or Answer page.
3037
3561
  *
3038
3562
  * @example
3039
3563
  * ```js
3040
3564
  * searchEmbed.trigger(HostEvent.ResetSearch)
3041
3565
  * ```
3566
+ * ```js
3567
+ * appEmbed.trigger(HostEvent.ResetSearch)
3568
+ * ```
3042
3569
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
3043
3570
  */
3044
3571
  ResetSearch = "resetSearch",
3045
3572
  /**
3046
3573
  * @hidden
3047
- * Gets the currents visible and runtime filters applied on a Liveboard
3574
+ * Get the currents visible and runtime filters applied on a Liveboard
3048
3575
  * @example
3049
3576
  * liveboardEmbed.trigger(HostEvent.GetFilters)
3050
3577
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -3052,7 +3579,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3052
3579
  GetFilters = "getFilters",
3053
3580
  /**
3054
3581
  * @hidden
3055
- * Updates the visible filters on the Liveboard.
3582
+ * Update the visible filters on the Liveboard.
3056
3583
  * @param - filter: filter object containing column name and filter operation and values
3057
3584
  * @example
3058
3585
  *
@@ -3065,7 +3592,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3065
3592
  */
3066
3593
  UpdateFilters = "updateFilters",
3067
3594
  /**
3068
- * Get Tab for the current Liveboard.
3595
+ * Get tab details for the current Liveboard.
3069
3596
  *
3070
3597
  * @example
3071
3598
  * ```js
@@ -3079,9 +3606,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3079
3606
  */
3080
3607
  GetTabs = "getTabs",
3081
3608
  /**
3082
- * Set the visible Tabs on a Liveboard.
3609
+ * Set the visible tabs on a Liveboard.
3083
3610
  *
3084
- * @param - an array of ids of Tabs to show, the ids not passed
3611
+ * @param - an array of ids of tabs to show, the IDs not passed
3085
3612
  * will be hidden.
3086
3613
  * @example
3087
3614
  * ```js
@@ -3095,8 +3622,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3095
3622
  /**
3096
3623
  * Set the hidden tabs on a Liveboard.
3097
3624
  *
3098
- * @param - an array of ids of Tabs to hide, the ids not passed
3099
- * will be shown.
3625
+ * @param - an array of the IDs of the tabs to hide.
3626
+ * The IDs not passed will be shown.
3100
3627
  * @example
3101
3628
  * ```js
3102
3629
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -3107,9 +3634,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3107
3634
  */
3108
3635
  SetHiddenTabs = "SetPinboardHiddenTabs",
3109
3636
  /**
3110
- * Updates the search query for sage embed.
3637
+ * Updates the search query string for Natural Language Search operations.
3638
+ *
3639
+ * @param - `queryString`: Text string in Natural Language format
3640
+ *
3641
+ * @param - `executeSearch`: Boolean to execute search and update search query
3111
3642
  *
3112
- * @param - searchOptions: an object queryString and option to execute the query.
3113
3643
  * @example
3114
3644
  * ```js
3115
3645
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -3117,7 +3647,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3117
3647
  * executeSearch: true,
3118
3648
  * })
3119
3649
  * ```
3120
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
3650
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
3121
3651
  */
3122
3652
  UpdateSageQuery = "updateSageQuery",
3123
3653
  /**
@@ -3130,24 +3660,25 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3130
3660
  * vizId: '123', // For Liveboard Visualization.
3131
3661
  * })
3132
3662
  * ```
3663
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
3133
3664
  */
3134
3665
  GetAnswerSession = "getAnswerSession"
3135
3666
  }
3136
3667
  /**
3137
3668
  * The different visual modes that the data sources panel within
3138
- * search could appear in, i.e., hidden, collapsed, or expanded.
3669
+ * search could appear in, such as hidden, collapsed, or expanded.
3139
3670
  */
3140
3671
  export enum DataSourceVisualMode {
3141
3672
  /**
3142
- * Data source panel is hidden.
3673
+ * The data source panel is hidden.
3143
3674
  */
3144
3675
  Hidden = "hide",
3145
3676
  /**
3146
- * Data source panel is collapsed, but the user can manually expand it.
3677
+ * The data source panel is collapsed, but the user can manually expand it.
3147
3678
  */
3148
3679
  Collapsed = "collapse",
3149
3680
  /**
3150
- * Data source panel is expanded, but the user can manually collapse it.
3681
+ * The data source panel is expanded, but the user can manually collapse it.
3151
3682
  */
3152
3683
  Expanded = "expand"
3153
3684
  }
@@ -3223,7 +3754,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3223
3754
  LiveboardHeaderSticky = "isLiveboardHeaderSticky",
3224
3755
  IsProductTour = "isProductTour",
3225
3756
  HideSearchBarTitle = "hideSearchBarTitle",
3226
- HideSageAnswerHeader = "hideSageAnswerHeader"
3757
+ HideSageAnswerHeader = "hideSageAnswerHeader",
3758
+ HideSearchBar = "hideSearchBar"
3227
3759
  }
3228
3760
  /**
3229
3761
  * ThoughtSpot application pages include actions and menu commands
@@ -3283,9 +3815,11 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3283
3815
  SaveAsView = "saveAsView",
3284
3816
  /**
3285
3817
  * The **Make a copy** action on a Liveboard or Answer
3286
- * page.
3287
- * Creates a copy of the Liveboard, visualization,
3288
- * or Answer.
3818
+ * page. Creates a copy of the Liveboard.
3819
+ * In LiveboardEmbed, the **Make a copy** action is not available for
3820
+ * visualizations in the embedded Liveboard view.
3821
+ * In AppEmbed, the **Make a copy** action is available on both
3822
+ * Liveboards and visualizations.
3289
3823
  *
3290
3824
  * @example
3291
3825
  * ```js
@@ -3469,7 +4003,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3469
4003
  */
3470
4004
  DownloadAsPdf = "downloadAsPdf",
3471
4005
  /**
3472
- * The **Download** > **CSV** menu action for tables on a Liveboard
4006
+ * The **Download** > **CSV** menu action for tables on a Liveboard
3473
4007
  * or Answer page.
3474
4008
  * Downloads a visualization or Answer in the XLSX format.
3475
4009
  *
@@ -4000,6 +4534,7 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4000
4534
  */
4001
4535
  RenameModalTitleDescription = "renameModalTitleDescription",
4002
4536
  /**
4537
+ *
4003
4538
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
4004
4539
  */
4005
4540
  RequestVerification = "requestVerification",
@@ -4496,14 +5031,14 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
4496
5031
  */
4497
5032
  export interface SearchOptions {
4498
5033
  /**
4499
- * The query string to pre-fill in natual language search bar
5034
+ * The query string to pass for Natural Language Search.
4500
5035
  */
4501
5036
  searchQuery: string;
4502
5037
  /**
4503
- * Boolean to determine if the search should be executed or not.
4504
- * if it is executed, put the focus on the results.
4505
- * if it’s not executed, put the focus in the search bar - at the end of
4506
- * the tokens
5038
+ * Boolean to define if the search should be executed or not.
5039
+ * If it is executed, the focus is placed on the results.
5040
+ * If it’s not executed, the focus is placed at the end of
5041
+ * the token string in the search bar.
4507
5042
  */
4508
5043
  executeSearch?: boolean;
4509
5044
  }
@@ -4511,16 +5046,16 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
4511
5046
  * The configuration attributes for the embedded Natural language search view. Based on
4512
5047
  * GPT and LLM.
4513
5048
  *
4514
- * @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
5049
+ * @version: SDK: 1.23.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
4515
5050
  * @group Embed components
4516
5051
  */
4517
5052
  export interface SageViewConfig extends Omit<ViewConfig, 'hiddenHomepageModules' | 'hiddenHomeLeftNavItems' | 'hiddenTabs' | 'visibleTabs' | 'reorderedHomepageModules'> {
4518
5053
  /**
4519
- * If set to true, a list of liveboard and answers related
5054
+ * If set to true, a list of Liveboard and Answers related
4520
5055
  * to the natural language search will be shown below the
4521
5056
  * AI generated answer.
4522
5057
  *
4523
- * @deprecated Currently liveboard and answers related
5058
+ * @deprecated Currently Liveboard and Answers related
4524
5059
  * to the natural language search will not be shown for sage
4525
5060
  * embed
4526
5061
  */
@@ -4537,63 +5072,81 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
4537
5072
  */
4538
5073
  isProductTour?: boolean;
4539
5074
  /**
4540
- * flag to hide search bar title. default false.
5075
+ * Show or hide the search bar title.
4541
5076
  *
4542
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl
5077
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
4543
5078
  */
4544
5079
  hideSearchBarTitle?: boolean;
4545
5080
  /**
4546
- * flag to disable Sage Answer header(`AI Answer` title section on top of the Sage
4547
- * answer). default false.
5081
+ * Show or hide the Answer header, that is, the `AI Answer` title
5082
+ * at the top of the Answer page.
4548
5083
  *
4549
- * @version SDK: 1.26.0 | Thoughtspot: 9.9.0.cl
5084
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
4550
5085
  */
4551
5086
  hideSageAnswerHeader?: boolean;
4552
5087
  /**
4553
- * flag to disable changing worksheet. default false.
5088
+ * Disable the worksheet selection option.
4554
5089
  *
4555
- * @version SDK: 1.26.0 | Thoughtspot: 9.9.0.cl
5090
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
4556
5091
  */
4557
5092
  disableWorksheetChange?: boolean;
4558
5093
  /**
4559
- * flag to hide worksheet selector. default false.
5094
+ * Hide the worksheet selection panel.
5095
+ *
5096
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
4560
5097
  */
4561
5098
  hideWorksheetSelector?: boolean;
4562
5099
  /**
4563
- * If set to true, the search bar auto complete search suggestions will not be shown.
4564
- * default false
5100
+ * Show or hide autocomplete suggestions for the search query string.
4565
5101
  *
4566
- * @version SDK: 1.26.0 | Thoughtspot: 9.9.0.cl
5102
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
4567
5103
  */
4568
5104
  hideAutocompleteSuggestions?: boolean;
4569
5105
  /**
4570
- * If set to false, the auto complete search suggestions not be shown
5106
+ * Show or hide autocomplete suggestions for the search query string.
4571
5107
  *
4572
- * @deprecated currently, object suggestions will not be shown for sage embed
4573
- * earlier this flag was used to show Auto complete suggestions
5108
+ * @deprecated
5109
+ * Currently, the object suggestions will not be shown for Natural Language Search.
5110
+ * You can use {@link hideAutocompleteSuggestions} instead.
4574
5111
  */
4575
5112
  showObjectSuggestions?: boolean;
4576
5113
  /**
4577
- * If set to true, sample questions would be hidden to user.
4578
- * These sample questions are autogenerated based on selected datasource.
5114
+ * Show or hide sample questions.
5115
+ * The sample questions are autogenerated based on the worksheet
5116
+ * selected for the search operation.
4579
5117
  *
4580
- * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
5118
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
4581
5119
  */
4582
5120
  hideSampleQuestions?: boolean;
4583
5121
  /**
4584
- * The data source GUID to set on load.
5122
+ * The data source GUID (Worksheet GUID) to set on load.
4585
5123
  */
4586
5124
  dataSource?: string;
4587
5125
  /**
4588
- * Configuration for search options
5126
+ * Includes the following properties:
4589
5127
  *
4590
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl
5128
+ * `searchQuery`: The search query string to pass in the search bar.
5129
+ * Supports Natural Language Search queries.
5130
+ *
5131
+ * `executeSearch`: Boolean to define if the search should be executed or not.
5132
+ * If it is executed, the focus is placed on the results.
5133
+ * If it’s not executed, the focus is placed at the end of
5134
+ * the token string in the search bar.
5135
+ *
5136
+ * @example
5137
+ * ```js
5138
+ * searchOptions: {
5139
+ * searchQuery: 'average sales by country and product type',
5140
+ * executeSearch: true,
5141
+ * }
5142
+ * ```
5143
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
4591
5144
  */
4592
5145
  searchOptions?: SearchOptions;
4593
5146
  }
4594
5147
  export const HiddenActionItemByDefaultForSageEmbed: Action[];
4595
5148
  /**
4596
- * Embed ThoughtSpot LLM and GPT based natural language search component.
5149
+ * Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
4597
5150
  *
4598
5151
  * @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
4599
5152
  * @group Embed components
@@ -4613,6 +5166,13 @@ declare module '@thoughtspot/visual-embed-sdk/embed/sage' {
4613
5166
  * @returns {string} query string
4614
5167
  */
4615
5168
  protected getEmbedParams(): string;
5169
+ /**
5170
+ * Construct the URL of the embedded ThoughtSpot sage to be
5171
+ * loaded in the iframe
5172
+ *
5173
+ * @returns {string} iframe url
5174
+ */
5175
+ getIFrameSrc(): string;
4616
5176
  /**
4617
5177
  * Render the embedded ThoughtSpot Sage
4618
5178
  *
@@ -4655,8 +5215,7 @@ declare module '@thoughtspot/visual-embed-sdk/utils/graphql/answerService/answer
4655
5215
  * const data = await underlying.fetchData(0, 100);
4656
5216
  * })
4657
5217
  * ```
4658
- * @version
4659
- * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
5218
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
4660
5219
  * @group Events
4661
5220
  */
4662
5221
  export class AnswerService {
@@ -4690,8 +5249,7 @@ declare module '@thoughtspot/visual-embed-sdk/utils/graphql/answerService/answer
4690
5249
  * const data = await underlying.fetchData(0, 100);
4691
5250
  * })
4692
5251
  * ```
4693
- * @version
4694
- * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
5252
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
4695
5253
  */
4696
5254
  getUnderlyingDataForPoint(outputColumnNames: string[], selectedPoints?: UnderlyingDataPoint[]): Promise<AnswerService>;
4697
5255
  executeQuery(query: string, variables: any): Promise<any>;
@@ -4917,6 +5475,7 @@ declare module '@thoughtspot/visual-embed-sdk/embed/ts-embed' {
4917
5475
  * @param args
4918
5476
  */
4919
5477
  render(): TsEmbed;
5478
+ getIframeSrc(): string;
4920
5479
  protected handleRenderForPrerender(): void;
4921
5480
  /**
4922
5481
  * Creates the preRender shell