@thoughtspot/visual-embed-sdk 1.26.3 → 1.27.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +3 -3
  2. package/cjs/.DS_Store +0 -0
  3. package/cjs/package.json +1 -1
  4. package/cjs/src/.DS_Store +0 -0
  5. package/cjs/src/auth.d.ts +4 -4
  6. package/cjs/src/auth.d.ts.map +1 -1
  7. package/cjs/src/auth.js +10 -4
  8. package/cjs/src/auth.js.map +1 -1
  9. package/cjs/src/embed/app.d.ts +15 -15
  10. package/cjs/src/embed/app.d.ts.map +1 -1
  11. package/cjs/src/embed/app.js +1 -1
  12. package/cjs/src/embed/app.js.map +1 -1
  13. package/cjs/src/embed/liveboard.d.ts +28 -23
  14. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  15. package/cjs/src/embed/liveboard.js +4 -3
  16. package/cjs/src/embed/liveboard.js.map +1 -1
  17. package/cjs/src/embed/sage.d.ts +48 -30
  18. package/cjs/src/embed/sage.d.ts.map +1 -1
  19. package/cjs/src/embed/sage.js +7 -6
  20. package/cjs/src/embed/sage.js.map +1 -1
  21. package/cjs/src/embed/sage.spec.js +3 -3
  22. package/cjs/src/embed/sage.spec.js.map +1 -1
  23. package/cjs/src/embed/search-bar.d.ts +22 -6
  24. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  25. package/cjs/src/embed/search-bar.js.map +1 -1
  26. package/cjs/src/embed/search.d.ts +34 -19
  27. package/cjs/src/embed/search.d.ts.map +1 -1
  28. package/cjs/src/embed/search.js +7 -3
  29. package/cjs/src/embed/search.js.map +1 -1
  30. package/cjs/src/embed/search.spec.js +10 -0
  31. package/cjs/src/embed/search.spec.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.d.ts +1 -0
  33. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  34. package/cjs/src/embed/ts-embed.js +27 -7
  35. package/cjs/src/embed/ts-embed.js.map +1 -1
  36. package/cjs/src/embed/ts-embed.spec.js +114 -0
  37. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  38. package/cjs/src/react/index.spec.js +0 -12
  39. package/cjs/src/react/index.spec.js.map +1 -1
  40. package/cjs/src/types.d.ts +680 -231
  41. package/cjs/src/types.d.ts.map +1 -1
  42. package/cjs/src/types.js +605 -164
  43. package/cjs/src/types.js.map +1 -1
  44. package/cjs/src/utils/answerService.d.ts +10 -0
  45. package/cjs/src/utils/answerService.d.ts.map +1 -0
  46. package/cjs/src/utils/answerService.js +61 -0
  47. package/cjs/src/utils/answerService.js.map +1 -0
  48. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  49. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  50. package/cjs/src/utils/answerService.spec.js +31 -0
  51. package/cjs/src/utils/answerService.spec.js.map +1 -0
  52. package/cjs/src/utils/authService.d.ts +37 -0
  53. package/cjs/src/utils/authService.d.ts.map +1 -0
  54. package/cjs/src/utils/authService.js +106 -0
  55. package/cjs/src/utils/authService.js.map +1 -0
  56. package/cjs/src/utils/authService.spec.d.ts +2 -0
  57. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  58. package/cjs/src/utils/authService.spec.js +72 -0
  59. package/cjs/src/utils/authService.spec.js.map +1 -0
  60. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
  61. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  62. package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
  63. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  64. package/cjs/src/utils/processData.d.ts +6 -0
  65. package/cjs/src/utils/processData.d.ts.map +1 -1
  66. package/cjs/src/utils/processData.js +5 -1
  67. package/cjs/src/utils/processData.js.map +1 -1
  68. package/cjs/src/utils/processTrigger.js +1 -1
  69. package/dist/src/auth.d.ts +4 -4
  70. package/dist/src/auth.d.ts.map +1 -1
  71. package/dist/src/embed/app.d.ts +15 -15
  72. package/dist/src/embed/app.d.ts.map +1 -1
  73. package/dist/src/embed/liveboard.d.ts +28 -23
  74. package/dist/src/embed/liveboard.d.ts.map +1 -1
  75. package/dist/src/embed/sage.d.ts +48 -30
  76. package/dist/src/embed/sage.d.ts.map +1 -1
  77. package/dist/src/embed/search-bar.d.ts +22 -6
  78. package/dist/src/embed/search-bar.d.ts.map +1 -1
  79. package/dist/src/embed/search.d.ts +34 -19
  80. package/dist/src/embed/search.d.ts.map +1 -1
  81. package/dist/src/embed/ts-embed.d.ts +1 -0
  82. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  83. package/dist/src/types.d.ts +680 -231
  84. package/dist/src/types.d.ts.map +1 -1
  85. package/dist/src/utils/answerService.d.ts +10 -0
  86. package/dist/src/utils/answerService.d.ts.map +1 -0
  87. package/dist/src/utils/answerService.spec.d.ts +2 -0
  88. package/dist/src/utils/answerService.spec.d.ts.map +1 -0
  89. package/dist/src/utils/authService.d.ts +37 -0
  90. package/dist/src/utils/authService.d.ts.map +1 -0
  91. package/dist/src/utils/authService.spec.d.ts +2 -0
  92. package/dist/src/utils/authService.spec.d.ts.map +1 -0
  93. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
  94. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  95. package/dist/src/utils/processData.d.ts +6 -0
  96. package/dist/src/utils/processData.d.ts.map +1 -1
  97. package/dist/tsembed-react.es.js +664 -194
  98. package/dist/tsembed-react.js +663 -193
  99. package/dist/tsembed.es.js +667 -194
  100. package/dist/tsembed.js +665 -192
  101. package/dist/visual-embed-sdk-react-full.d.ts +851 -328
  102. package/dist/visual-embed-sdk-react.d.ts +851 -328
  103. package/dist/visual-embed-sdk.d.ts +851 -328
  104. package/lib/.DS_Store +0 -0
  105. package/lib/package.json +1 -1
  106. package/lib/src/.DS_Store +0 -0
  107. package/lib/src/auth.d.ts +4 -4
  108. package/lib/src/auth.d.ts.map +1 -1
  109. package/lib/src/auth.js +10 -4
  110. package/lib/src/auth.js.map +1 -1
  111. package/lib/src/embed/app.d.ts +15 -15
  112. package/lib/src/embed/app.d.ts.map +1 -1
  113. package/lib/src/embed/app.js +1 -1
  114. package/lib/src/embed/app.js.map +1 -1
  115. package/lib/src/embed/liveboard.d.ts +28 -23
  116. package/lib/src/embed/liveboard.d.ts.map +1 -1
  117. package/lib/src/embed/liveboard.js +4 -3
  118. package/lib/src/embed/liveboard.js.map +1 -1
  119. package/lib/src/embed/sage.d.ts +48 -30
  120. package/lib/src/embed/sage.d.ts.map +1 -1
  121. package/lib/src/embed/sage.js +7 -6
  122. package/lib/src/embed/sage.js.map +1 -1
  123. package/lib/src/embed/sage.spec.js +3 -3
  124. package/lib/src/embed/sage.spec.js.map +1 -1
  125. package/lib/src/embed/search-bar.d.ts +22 -6
  126. package/lib/src/embed/search-bar.d.ts.map +1 -1
  127. package/lib/src/embed/search-bar.js.map +1 -1
  128. package/lib/src/embed/search.d.ts +34 -19
  129. package/lib/src/embed/search.d.ts.map +1 -1
  130. package/lib/src/embed/search.js +7 -3
  131. package/lib/src/embed/search.js.map +1 -1
  132. package/lib/src/embed/search.spec.js +10 -0
  133. package/lib/src/embed/search.spec.js.map +1 -1
  134. package/lib/src/embed/ts-embed.d.ts +1 -0
  135. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  136. package/lib/src/embed/ts-embed.js +28 -8
  137. package/lib/src/embed/ts-embed.js.map +1 -1
  138. package/lib/src/embed/ts-embed.spec.js +114 -0
  139. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  140. package/lib/src/react/index.spec.js +0 -12
  141. package/lib/src/react/index.spec.js.map +1 -1
  142. package/lib/src/types.d.ts +680 -231
  143. package/lib/src/types.d.ts.map +1 -1
  144. package/lib/src/types.js +605 -164
  145. package/lib/src/types.js.map +1 -1
  146. package/lib/src/utils/answerService.d.ts +10 -0
  147. package/lib/src/utils/answerService.d.ts.map +1 -0
  148. package/lib/src/utils/answerService.js +57 -0
  149. package/lib/src/utils/answerService.js.map +1 -0
  150. package/lib/src/utils/answerService.spec.d.ts +2 -0
  151. package/lib/src/utils/answerService.spec.d.ts.map +1 -0
  152. package/lib/src/utils/answerService.spec.js +29 -0
  153. package/lib/src/utils/answerService.spec.js.map +1 -0
  154. package/lib/src/utils/authService.d.ts +37 -0
  155. package/lib/src/utils/authService.d.ts.map +1 -0
  156. package/lib/src/utils/authService.js +97 -0
  157. package/lib/src/utils/authService.js.map +1 -0
  158. package/lib/src/utils/authService.spec.d.ts +2 -0
  159. package/lib/src/utils/authService.spec.d.ts.map +1 -0
  160. package/lib/src/utils/authService.spec.js +70 -0
  161. package/lib/src/utils/authService.spec.js.map +1 -0
  162. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
  163. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  164. package/lib/src/utils/graphql/answerService/answerService.js +2 -4
  165. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  166. package/lib/src/utils/processData.d.ts +6 -0
  167. package/lib/src/utils/processData.d.ts.map +1 -1
  168. package/lib/src/utils/processData.js +4 -1
  169. package/lib/src/utils/processData.js.map +1 -1
  170. package/lib/src/utils/processTrigger.js +1 -1
  171. package/lib/src/visual-embed-sdk.d.ts +851 -328
  172. package/package.json +1 -1
  173. package/src/.DS_Store +0 -0
  174. package/src/auth.ts +10 -4
  175. package/src/embed/app.ts +20 -20
  176. package/src/embed/liveboard.ts +32 -27
  177. package/src/embed/sage.spec.ts +3 -3
  178. package/src/embed/sage.ts +54 -36
  179. package/src/embed/search-bar.tsx +22 -6
  180. package/src/embed/search.spec.ts +13 -0
  181. package/src/embed/search.ts +42 -22
  182. package/src/embed/ts-embed.spec.ts +132 -0
  183. package/src/embed/ts-embed.ts +27 -9
  184. package/src/react/index.spec.tsx +0 -29
  185. package/src/types.ts +680 -232
  186. package/src/utils/graphql/answerService/answerService.ts +2 -4
  187. package/src/utils/processData.ts +4 -1
  188. package/src/utils/processTrigger.ts +1 -1
package/src/types.ts CHANGED
@@ -32,10 +32,14 @@ export enum AuthType {
32
32
  */
33
33
  None = 'None',
34
34
  /**
35
- * Passthrough SSO to the embedded App within the iframe. Requires least
35
+ * Passthrough SSO to the embedded application within the iframe. Requires least
36
36
  * configuration, but may not be supported by all IDPs. This will behave like `None`
37
37
  * if SSO is not configured on ThoughtSpot.
38
38
  *
39
+ * To use this:
40
+ * Your SAML or OpenID provider must allow iframe redirects.
41
+ * For example, if you are using Okta as IdP, you can enable iframe embedding.
42
+ *
39
43
  * @example
40
44
  * ```js
41
45
  * init({
@@ -43,12 +47,7 @@ export enum AuthType {
43
47
  * authType: AuthType.EmbeddedSSO,
44
48
  * });
45
49
  * ```
46
- * Set authentication type as Embedded SSO.
47
- *
48
- * To use this:
49
- * Your SAML or OpenID provider must allow iframe redirects.
50
- * eg. If you are using okta as IdP, you can enable iFrame embedding.
51
- * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
50
+ * @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
52
51
  */
53
52
  EmbeddedSSO = 'EmbeddedSSO',
54
53
  /**
@@ -67,10 +66,10 @@ export enum AuthType {
67
66
  SAML = 'SSO_SAML',
68
67
  /**
69
68
  * SSO using SAML
70
- * Will make the host application redirect to the SAML Idp. Use this
71
- * when the idp does not allow itself to be embedded.
69
+ * Makes the host application redirect to the SAML IdP. Use this
70
+ * if your IdP does not allow itself to be embedded.
72
71
  *
73
- * This redirects the host application to the SAML Idp. The host application
72
+ * This redirects the host application to the SAML IdP. The host application
74
73
  * will be redirected back to the ThoughtSpot app after authentication.
75
74
  *
76
75
  * @example
@@ -81,7 +80,7 @@ export enum AuthType {
81
80
  * });
82
81
  * ```
83
82
  *
84
- * This opens the SAML Idp in a popup window. The popup is triggered
83
+ * This opens the SAML IdP in a popup window. The popup is triggered
85
84
  * when the user clicks the trigger button. The popup window will be
86
85
  * closed automatically after authentication.
87
86
  * @example
@@ -95,8 +94,8 @@ export enum AuthType {
95
94
  * });
96
95
  * ```
97
96
  *
98
- * Can also use event to trigger the popup flow. Works the same
99
- * as above example.
97
+ * Can also use the event to trigger the popup flow. Works the same
98
+ * as the above example.
100
99
  * @example
101
100
  * ```js
102
101
  * const authEE = init({
@@ -120,7 +119,7 @@ export enum AuthType {
120
119
  OIDC = 'SSO_OIDC',
121
120
  /**
122
121
  * SSO using OIDC
123
- * Will make the host application redirect to the OIDC Idp.
122
+ * Will make the host application redirect to the OIDC IdP.
124
123
  * See code samples in {@link SAMLRedirect}.
125
124
  */
126
125
  OIDCRedirect = 'SSO_OIDC',
@@ -132,8 +131,8 @@ export enum AuthType {
132
131
  */
133
132
  AuthServer = 'AuthServer',
134
133
  /**
135
- * Trusted authentication server, Use your own authentication server
136
- * which returns a bearer token, generated using the secret_key obtained
134
+ * Trusted authentication server. Use your own authentication server
135
+ * which returns a bearer token, generated using the `secret_key` obtained
137
136
  * from ThoughtSpot.
138
137
  *
139
138
  * @example
@@ -150,11 +149,11 @@ export enum AuthType {
150
149
  */
151
150
  TrustedAuthToken = 'AuthServer',
152
151
  /**
153
- * Trusted authentication server Cookieless, Use you own authentication
154
- * server which returns a bearer token, generated using the secret_key
152
+ * Trusted authentication server Cookieless, Use your own authentication
153
+ * server which returns a bearer token, generated using the `secret_key`
155
154
  * obtained from ThoughtSpot. This uses a cookieless authentication
156
- * approach, recommended to by pass third-party cookie-blocking restriction
157
- * implemented by some browsers
155
+ * approach, recommended to bypass the third-party cookie-blocking restriction
156
+ * implemented by some browsers.
158
157
  *
159
158
  * @example
160
159
  * ```js
@@ -167,7 +166,7 @@ export enum AuthType {
167
166
  * .then((data) => data.token);
168
167
  * }
169
168
  * ```
170
- * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1.sw
169
+ * @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
171
170
  */
172
171
  TrustedAuthTokenCookieless = 'AuthServerCookieless',
173
172
  /**
@@ -294,13 +293,19 @@ export interface EmbedConfig {
294
293
  * The ThoughtSpot cluster hostname or IP address.
295
294
  */
296
295
  thoughtSpotHost: string;
296
+ /**
297
+ * If true, all the iframe links will have /v2 added automatically.
298
+ * If false, all the iframe links will have /v1 added automatically.
299
+ * If undefined, nothing will be added
300
+ */
301
+ enableReactShell?: boolean | undefined;
297
302
  /**
298
303
  * The authentication mechanism to use.
299
304
  */
300
305
  authType: AuthType;
301
306
  /**
302
307
  * [AuthServer] The trusted authentication endpoint to use to get the
303
- * authentication token. A GET request is made to the
308
+ * authentication token. A `GET` request is made to the
304
309
  * authentication API endpoint, which returns the token
305
310
  * as a plaintext response. For trusted authentication,
306
311
  * the `authEndpoint` or `getAuthToken` attribute is required.
@@ -313,8 +318,8 @@ export interface EmbedConfig {
313
318
  * attribute is required.
314
319
  *
315
320
  * It is advisable to fetch a new token inside this method and not
316
- * reuse and older issued token, as because when auth expires this is
317
- * called again and if it is called with an older token the authentication
321
+ * reuse the old issued token. When auth expires this method is
322
+ * called again and if it is called with an older token, the authentication
318
323
  * will not succeed.
319
324
  */
320
325
  getAuthToken?: () => Promise<string>;
@@ -325,7 +330,7 @@ export interface EmbedConfig {
325
330
  username?: string;
326
331
 
327
332
  /**
328
- * [Basic] The ThoughtSpot login password corresponding to the user name
333
+ * [Basic] The ThoughtSpot login password corresponding to the username
329
334
  *
330
335
  * Warning: This feature is primarily intended for developer testing. It is
331
336
  * strongly advised not to use this authentication method in production.
@@ -334,7 +339,7 @@ export interface EmbedConfig {
334
339
 
335
340
  /**
336
341
  * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
337
- * open the SAML auth flow in a popup, instead of redirecting browser in
342
+ * open the SAML auth flow in a popup, instead of redirecting the browser in
338
343
  * place.
339
344
  *
340
345
  * @default false
@@ -344,10 +349,10 @@ export interface EmbedConfig {
344
349
 
345
350
  /**
346
351
  * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
347
- * the SAML auth flow in a popup, instead of redirecting browser in place.
352
+ * the SAML auth flow in a popup, instead of redirecting the browser in place.
348
353
  *
349
- * Need to use this with authTriggerContainer. Or manually trigger
350
- * the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
354
+ * Need to use this with `authTriggerContainer`. Or manually trigger
355
+ * the `AuthEvent.TRIGGER_SSO_POPUP` event on a user interaction.
351
356
  *
352
357
  * @default false
353
358
  * @version SDK: 1.18.0
@@ -355,13 +360,13 @@ export interface EmbedConfig {
355
360
  inPopup?: boolean;
356
361
 
357
362
  /**
358
- * [SSO] For SSO Authentication, one can supply an optional path param,
359
- * this will be the path on the host origin where the SAML flow will be
363
+ * [SSO] For SSO Authentication, one can supply an optional path param;
364
+ * This will be the path on the host origin where the SAML flow will be
360
365
  * terminated.
361
366
  *
362
367
  * Eg: "/dashboard", "#/foo" [Do not include the host]
363
368
  *
364
- * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1.sw
369
+ * @version SDK: 1.10.2 | ThoughtSpot 8.2.0.cl, 8.4.1.sw
365
370
  */
366
371
  redirectPath?: string;
367
372
 
@@ -369,19 +374,19 @@ export interface EmbedConfig {
369
374
  basepath?: string;
370
375
 
371
376
  /**
372
- * Should we encode URL Query Params using base64 encoding which thoughtspot
373
- * will generate for embedding. This provides additional security to
374
- * thoughtspot clusters against Cross site scripting attacks.
377
+ * Boolean to define if the query parameters in the ThoughtSpot URL
378
+ * should be encoded in base64. This provides additional security to
379
+ * Thoughtspot clusters against cross-site scripting attacks.
375
380
  *
376
381
  * @default false
377
382
  */
378
383
  shouldEncodeUrlQueryParams?: boolean;
379
384
 
380
385
  /**
381
- * Suppress cookie access alert when third party cookies are blocked by the
382
- * user's browser. Third party cookie blocking is the default behaviour on
383
- * Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
384
- * encouraged to handle `noCookieAccess` event, to show your own treatment
386
+ * Suppress cookie access alert when third-party cookies are blocked by the
387
+ * user's browser. Third-party cookie blocking is the default behaviour on
388
+ * some web browsers like Safari. If you set this attribute to `true`,
389
+ * you are encouraged to handle `noCookieAccess` event, to show your own treatment
385
390
  * in this case.
386
391
  *
387
392
  * @default false
@@ -389,16 +394,17 @@ export interface EmbedConfig {
389
394
  suppressNoCookieAccessAlert?: boolean;
390
395
 
391
396
  /**
392
- * Ignore cookie access alert when third party cookies are blocked by the
397
+ * Ignore the cookie access alert when third-party cookies are blocked by the
393
398
  * user's browser. If you set this to `true`, the embedded iframe behaviour
394
- * persist even in case of non logged in user.
399
+ * persists even in the case of a non-logged-in user.
395
400
  *
396
401
  * @default false
397
402
  */
398
403
  ignoreNoCookieAccess?: boolean;
399
404
 
400
405
  /**
401
- * Re-login when session expires with the previous login options
406
+ * Re-login a user with the previous login options
407
+ * when a user session expires.
402
408
  *
403
409
  * @default false
404
410
  */
@@ -406,8 +412,9 @@ export interface EmbedConfig {
406
412
 
407
413
  /**
408
414
  * Disable redirection to the login page when the embedded session expires
409
- * This flag is typically used alongside the combination of auth modes such as {@link
410
- * AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
415
+ * This flag is typically used alongside the combination of authentication modes such
416
+ * as {@link AuthType.AuthServer} and auto-login behavior {@link
417
+ * EmbedConfig.autoLogin}
411
418
  *
412
419
  * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
413
420
  * @default false
@@ -415,23 +422,23 @@ export interface EmbedConfig {
415
422
  disableLoginRedirect?: boolean;
416
423
 
417
424
  /**
418
- * This message is displayed on the embed view when the login fails.
425
+ * This message is displayed in the embedded view when a user login fails.
419
426
  *
420
427
  * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
421
428
  */
422
429
  loginFailedMessage?: string;
423
430
 
424
431
  /**
425
- * Calls the prefetch method internally when set to true
432
+ * Calls the prefetch method internally when set to `true`
426
433
  *
427
434
  * @default false
428
435
  */
429
436
  callPrefetch?: boolean;
430
437
 
431
438
  /**
432
- * When there are multiple embeds, queue the render of embed to start
433
- * after the previous embed's render is complete. This helps in the load
434
- * performance by decreasing the load on the browser.
439
+ * When there are multiple objects embedded, queue the rendering of embedded objects
440
+ * to start after the previous embed's render is complete. This helps improve
441
+ * performance by decreasing the load on the browser.
435
442
  *
436
443
  * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
437
444
  * @default false
@@ -439,7 +446,7 @@ export interface EmbedConfig {
439
446
  queueMultiRenders?: boolean;
440
447
 
441
448
  /**
442
- * Dynamic CSS Url to be injected in the loaded application.
449
+ * Dynamic CSS URL to be injected in the loaded application.
443
450
  * You would also need to set `style-src` in the CSP settings.
444
451
  *
445
452
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -447,9 +454,9 @@ export interface EmbedConfig {
447
454
  */
448
455
  customCssUrl?: string;
449
456
  /**
450
- * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
457
+ * [AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
451
458
  * additional call. This is slower and should be avoided. Listen to the
452
- * NO_COOKIE_ACCESS event to handle the situation.
459
+ * `NO_COOKIE_ACCESS` event to handle the situation.
453
460
  *
454
461
  * This is slightly slower than letting the browser handle the cookie check, as it
455
462
  * involves an extra network call.
@@ -458,27 +465,26 @@ export interface EmbedConfig {
458
465
  */
459
466
  detectCookieAccessSlow?: boolean;
460
467
  /**
461
- * Hide beta alert warning message for SearchEmbed.
468
+ * Hide the `beta` alert warning message for SearchEmbed.
462
469
  *
463
470
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
464
471
  */
465
472
  suppressSearchEmbedBetaWarning?: boolean;
466
-
467
473
  /**
468
- * Hide beta alert warning message for SageEmbed.
474
+ * Hide `beta` alert warning message for SageEmbed.
469
475
  *
470
476
  */
471
477
  suppressSageEmbedBetaWarning?: boolean;
472
478
  /**
473
479
  * Custom style params for embed Config.
474
480
  *
475
- * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
481
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
476
482
  */
477
483
  customizations?: CustomisationsInterface;
478
484
  /**
479
- * For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
480
- * click to trigger the flow. This is the containing element
481
- * for that button.
485
+ * For `inPopup` SAMLRedirect or OIDCRedirect authentication, we need a
486
+ * button that the user can click to trigger the flow.
487
+ * This attribute sets a containing element for that button.
482
488
  *
483
489
  * @example
484
490
  * ```js
@@ -488,11 +494,11 @@ export interface EmbedConfig {
488
494
  * authTriggerContainer: '#auth-trigger-container'
489
495
  * })
490
496
  * ```
491
- * @version SDK: 1.17.0 | ThoughtSpot: *
497
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
492
498
  */
493
499
  authTriggerContainer?: string | HTMLElement;
494
500
  /**
495
- * Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
501
+ * Specify that we want to use the `AuthEvent.TRIGGER_SSO_POPUP` event to trigger
496
502
  * SAML popup. This is useful when you want to trigger the popup on a custom user
497
503
  * action.
498
504
  *
@@ -500,13 +506,15 @@ export interface EmbedConfig {
500
506
  useEventForSAMLPopup?: boolean;
501
507
  /**
502
508
  * Text to show in the button which triggers the popup auth flow.
503
- * Default: "Authorize".
509
+ * Default: `Authorize`.
504
510
  *
505
- * @version SDK: 1.17.0 | ThoughtSpot: *
511
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
506
512
  */
507
513
  authTriggerText?: string;
508
514
  /**
509
- * Disable Full App access of Embedded app outside of the iFrame.
515
+ * Prevent users from accessing the full application or ThoughtSpot application pages
516
+ * access to the embedded application users
517
+ * outside of the iframe.
510
518
  *
511
519
  * @default true
512
520
  * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw
@@ -514,7 +522,7 @@ export interface EmbedConfig {
514
522
  blockNonEmbedFullAppAccess?: boolean;
515
523
 
516
524
  /**
517
- * Host config incase embedded app is inside TS app itself
525
+ * Host config in case embedded app is inside TS app itself
518
526
  *
519
527
  * @hidden
520
528
  */
@@ -544,17 +552,17 @@ export interface EmbedConfig {
544
552
  export interface LayoutConfig { }
545
553
 
546
554
  /**
547
- * Embedded iFrame configuration
555
+ * Embedded iframe configuration
548
556
  *
549
557
  * @group Embed components
550
558
  */
551
559
  export interface FrameParams {
552
560
  /**
553
- * The width of the iFrame (unit is pixels if numeric).
561
+ * The width of the iframe (unit is pixels if numeric).
554
562
  */
555
563
  width?: number | string;
556
564
  /**
557
- * The height of the iFrame (unit is pixels if numeric).
565
+ * The height of the iframe (unit is pixels if numeric).
558
566
  */
559
567
  height?: number | string;
560
568
  /**
@@ -657,7 +665,6 @@ export interface ViewConfig {
657
665
  */
658
666
  runtimeParameters?: RuntimeParameter[];
659
667
  /**
660
- /**
661
668
  * The locale/language to use for the embedded view.
662
669
  *
663
670
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
@@ -755,31 +762,30 @@ export interface ViewConfig {
755
762
  */
756
763
  reorderedHomepageModules?: HomepageModule[];
757
764
  /**
758
- * The list of tab IDs to show in the embedded.
759
- * Only this Tabs will be shown in their respective LBs.
760
- * Use this to show an tabID.
765
+ * The list of tab IDs to show in the embedded Liveboard.
766
+ * Only the tabs specified in the array will be shown in the Liveboard.
761
767
  *
762
- * Use either this or hiddenTabs.
768
+ * Use either `visibleTabs` or `hiddenTabs`.
763
769
  *
764
770
  * @example
765
771
  * ```js
766
- * const embed = new LiveboardEmbed('#embed', {
767
- * ... // other liveboard view config
768
- * visibleTabs: [
772
+ * visibleTabs: [
769
773
  * '430496d6-6903-4601-937e-2c691821af3c',
770
- * 'f547ec54-2a37-4516-a222-2b06719af726']
771
- * });
774
+ * 'f547ec54-2a37-4516-a222-2b06719af726']
772
775
  * ```
773
776
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
774
777
  */
775
778
  visibleTabs?: string[];
776
779
  /**
777
- * homepageLeftNavItems : show/hide Homeapage Left Nav Bar Items
778
- * There are 8 home nav list items, we will send those item as list
779
- * which we want to hide for TSE.
780
- * eg: hiddenHomeLeftNavItems = [HomeLeftNavItem.Home] to hide home.
780
+ * homepageLeftNavItems : Show or hide the left navigation bar items.
781
+ * There are 8 eight home navigation list items.
782
+ * To hide these items, specify the string in the array.
781
783
  *
782
- * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
784
+ * ```js
785
+ * hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
786
+ * ```
787
+ *
788
+ * @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
783
789
  */
784
790
  hiddenHomeLeftNavItems?: HomeLeftNavItem[];
785
791
  /**
@@ -795,7 +801,7 @@ export interface ViewConfig {
795
801
  * });
796
802
  * embed.showPreRender();
797
803
  * ```
798
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
804
+ * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
799
805
  */
800
806
  preRenderId?: string;
801
807
 
@@ -839,7 +845,7 @@ export type MessagePayload = {
839
845
  status?: string;
840
846
  };
841
847
  /**
842
- * MessageOptions: By Providing options, getting specific event start / end based on
848
+ * MessageOptions: By providing options, getting specific event start / end based on
843
849
  * option
844
850
  *
845
851
  * @group Events
@@ -847,7 +853,7 @@ export type MessagePayload = {
847
853
  export type MessageOptions = {
848
854
  /**
849
855
  * A boolean value indicating that start status events of this type
850
- * will be dispatched
856
+ * will be dispatched.
851
857
  */
852
858
  start?: boolean;
853
859
  };
@@ -857,7 +863,7 @@ export type MessageOptions = {
857
863
  * @group Events
858
864
  */
859
865
  export type MessageCallback = (
860
- /* payload: Message payload contain type, data and status */
866
+ /* payload: Message payload contains type, data, and status */
861
867
  payload: MessagePayload,
862
868
  /**
863
869
  * responder: Message callback function triggered when embed event
@@ -870,7 +876,7 @@ export type MessageCallback = (
870
876
  */
871
877
  export type MessageCallbackObj = {
872
878
  /**
873
- * options: It contains start, A boolean value indicating that start
879
+ * options: It contains start, a boolean value indicating that start
874
880
  * status events of this type will be dispatched
875
881
  */
876
882
  /* callback: Embed event message callback */
@@ -948,7 +954,7 @@ export enum RuntimeFilterOp {
948
954
  }
949
955
 
950
956
  /**
951
- * Home page module that can be hide
957
+ * Home page module that can be hidden
952
958
  */
953
959
  // eslint-disable-next-line no-shadow
954
960
  export enum HomepageModule {
@@ -965,7 +971,7 @@ export enum HomepageModule {
965
971
  */
966
972
  Favorite = 'FAVORITE',
967
973
  /**
968
- * List of answers and liveboards
974
+ * List of answers and Liveboards
969
975
  */
970
976
  MyLibrary = 'MY_LIBRARY',
971
977
  /**
@@ -999,7 +1005,7 @@ export interface RuntimeFilter {
999
1005
  values: (number | boolean | string)[];
1000
1006
  }
1001
1007
  /**
1002
- * A filter that can be applied to ThoughtSpot answers, Liveboards, or
1008
+ * A filter that can be applied to ThoughtSpot Answers, Liveboards, or
1003
1009
  * visualizations at runtime.
1004
1010
  */
1005
1011
  export interface RuntimeParameter {
@@ -1038,12 +1044,26 @@ export enum EmbedEvent {
1038
1044
  /**
1039
1045
  * Rendering has initialized.
1040
1046
  *
1047
+ * @example
1048
+ *```js
1049
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
1050
+ * //show a loader
1051
+ * function showLoader() {
1052
+ * document.getElementById("loader");
1053
+ * }
1054
+ *```
1041
1055
  * @returns timestamp - The timestamp when the event was generated.
1042
1056
  */
1043
1057
  Init = 'init',
1044
1058
  /**
1045
1059
  * Authentication has either succeeded or failed.
1046
1060
  *
1061
+ * @example
1062
+ *```js
1063
+ * appEmbed.on(EmbedEvent.AuthInit, payload => {
1064
+ * console.log('AuthInit', payload);
1065
+ * })
1066
+ *```
1047
1067
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
1048
1068
  */
1049
1069
  AuthInit = 'authInit',
@@ -1051,37 +1071,91 @@ export enum EmbedEvent {
1051
1071
  * The embed object container has loaded.
1052
1072
  *
1053
1073
  * @returns timestamp - The timestamp when the event was generated.
1074
+ * @example
1075
+ *```js
1076
+ * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
1077
+ * //hide loader
1078
+ * function hideLoader() {
1079
+ * document.getElementById("loader");
1080
+ * }
1081
+ *```
1054
1082
  */
1055
1083
  Load = 'load',
1056
1084
  /**
1057
1085
  * Data pertaining to answer or Liveboard is received
1058
1086
  *
1059
1087
  * @return data - The answer or Liveboard data
1088
+ * @example
1089
+ *```js
1090
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
1091
+ * console.log('data', payload);
1092
+ * })
1093
+ *```
1060
1094
  * @important
1061
1095
  */
1062
1096
  Data = 'data',
1063
1097
  /**
1064
- * Search/answer/Liveboard filters have been applied/updated by the user.
1098
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
1065
1099
  *
1066
1100
  * @hidden
1067
1101
  */
1068
1102
  FiltersChanged = 'filtersChanged',
1069
1103
  /**
1070
1104
  * Search query has been updated by the user.
1105
+ *
1106
+ * @example
1107
+ *```js
1108
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
1109
+ *```
1071
1110
  */
1072
1111
  QueryChanged = 'queryChanged',
1073
1112
  /**
1074
- * A drill down operation has been performed.
1113
+ * A drill-down operation has been performed.
1075
1114
  *
1076
1115
  * @returns additionalFilters - Any additional filters applied
1077
1116
  * @returns drillDownColumns - The columns on which drill down was performed
1078
1117
  * @returns nonFilteredColumns - The columns that were not filtered
1118
+ * @example
1119
+ *```js
1120
+ * searchEmbed.trigger(HostEvent.DrillDown, {
1121
+ * points: {
1122
+ * clickedPoint,
1123
+ * selectedPoints: selectedPoint
1124
+ * },
1125
+ * autoDrillDown: true,
1126
+ * })
1127
+ *```
1128
+ * In this example, `VizPointDoubleClick` event is used for
1129
+ * triggering the `DrillDown` event when an area or specific
1130
+ * data point on a table or chart is double-clicked.
1131
+ * @example
1132
+ *```js
1133
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1134
+ * console.log(payload);
1135
+ * const clickedPoint = payload.data.clickedPoint;
1136
+ * const selectedPoint = payload.data.selectedPoints;
1137
+ * console.log('>>> called', clickedPoint);
1138
+ * embed.trigger(HostEvent.DrillDown, {
1139
+ * points: {
1140
+ * clickedPoint,
1141
+ * selectedPoints: selectedPoint
1142
+ * },
1143
+ * autoDrillDown: true,
1144
+ * })
1145
+ * })
1146
+ *```
1079
1147
  */
1080
1148
  Drilldown = 'drillDown',
1081
1149
  /**
1082
1150
  * One or more data sources have been selected.
1083
1151
  *
1084
1152
  * @returns dataSourceIds - the list of data sources
1153
+ * @example
1154
+ * ```js
1155
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
1156
+ * console.log('DataSourceSelected', payload);
1157
+ * })
1158
+ * ```
1085
1159
  */
1086
1160
  DataSourceSelected = 'dataSourceSelected',
1087
1161
  /**
@@ -1089,25 +1163,49 @@ export enum EmbedEvent {
1089
1163
  *
1090
1164
  * @returns columnIds - the list of columns
1091
1165
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1166
+ * @example
1167
+ * ```js
1168
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
1169
+ * console.log('AddRemoveColumns', payload);
1170
+ * })
1171
+ * ```
1092
1172
  */
1093
1173
  AddRemoveColumns = 'addRemoveColumns',
1094
1174
  /**
1095
- * A custom action has been triggered
1175
+ * A custom action has been triggered.
1096
1176
  *
1097
- * @returns actionId - The id of the custom action
1098
- * @returns data - The answer or Liveboard data
1177
+ * @returns actionId - ID of the custom action
1178
+ * @returns data - Response payload with the Answer or Liveboard data
1179
+ * @example
1180
+ * ```js
1181
+ * appEmbed.on(EmbedEvent.customAction, payload => {
1182
+ * const data = payload.data;
1183
+ * if (data.id === 'insert Custom Action ID here') {
1184
+ * console.log('Custom Action event:', data.embedAnswerData);
1185
+ * }
1186
+ * })
1187
+ * ```
1099
1188
  */
1100
1189
  CustomAction = 'customAction',
1101
1190
  /**
1102
- * Listen to double clicks on a visualization
1191
+ * Listen to double click actions on a visualization.
1103
1192
  *
1104
- * @return ContextMenuInputPoints - data point that is double clicked
1193
+ * @return ContextMenuInputPoints - Data point that is double-clicked
1105
1194
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1195
+ * @example
1196
+ * ```js
1197
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
1198
+ * console.log('VizPointDoubleClick', payload)
1199
+ * })
1200
+ * ```
1106
1201
  */
1107
1202
  VizPointDoubleClick = 'vizPointDoubleClick',
1108
1203
  /**
1109
- * Listen to clicks on a visualization in a liveboard or Search result.
1204
+ * Listen to clicks on a visualization in a Liveboard or Search result.
1110
1205
  *
1206
+ * @return viz, clickedPoint - metadata about the point that is clicked
1207
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1208
+ * @important
1111
1209
  * @example
1112
1210
  * ```js
1113
1211
  * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
@@ -1120,25 +1218,42 @@ export enum EmbedEvent {
1120
1218
  * )
1121
1219
  * });
1122
1220
  * ```
1123
- * @return viz, clickedPoint - metadata about point that is clicked
1124
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1125
- * @important
1126
1221
  */
1127
1222
  VizPointClick = 'vizPointClick',
1128
1223
  /**
1129
1224
  * An error has occurred.
1130
1225
  *
1131
1226
  * @returns error - An error object or message
1227
+ * @example
1228
+ * ```js
1229
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
1230
+ * //show error messaage
1231
+ * function showErrorMsg() {
1232
+ * document.getElementById("error");
1233
+ * ```
1132
1234
  */
1133
1235
  Error = 'Error',
1134
1236
  /**
1135
- * The embedded object has sent an alert
1237
+ * The embedded object has sent an alert.
1136
1238
  *
1137
1239
  * @returns alert - An alert object
1240
+ * @example
1241
+ * ```js
1242
+ * searchEmbed.on(EmbedEvent.Alert)
1243
+ * ```
1138
1244
  */
1139
1245
  Alert = 'alert',
1140
1246
  /**
1141
1247
  * The ThoughtSpot auth session has expired.
1248
+ *
1249
+ * @example
1250
+ *```js
1251
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
1252
+ * //show auth expired banner
1253
+ * function showAuthExpired() {
1254
+ * document.getElementById("authExpiredBanner");
1255
+ * }
1256
+ *```
1142
1257
  */
1143
1258
  AuthExpire = 'ThoughtspotAuthExpired',
1144
1259
  /**
@@ -1168,14 +1283,27 @@ export enum EmbedEvent {
1168
1283
  */
1169
1284
  EmbedIframeCenter = 'EmbedIframeCenter',
1170
1285
  /**
1171
- * Emitted when the "Get Data" button in Search Bar embed
1172
- * is clicked.
1286
+ * Emitted when the **Get Data** action is initiated.
1287
+ * Applicable to `SearchBarEmbed` only.
1173
1288
  *
1174
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
1289
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1290
+ * @example
1291
+ *```js
1292
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
1293
+ * .then(data => {
1294
+ * console.log('Answer Data:', data);
1295
+ * })
1296
+ *```
1175
1297
  */
1176
1298
  GetDataClick = 'getDataClick',
1177
1299
  /**
1178
1300
  * Detects the route change.
1301
+ *
1302
+ * @example
1303
+ *```js
1304
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
1305
+ * console.log('data', payload))
1306
+ *```
1179
1307
  */
1180
1308
  RouteChange = 'ROUTE_CHANGE',
1181
1309
  /**
@@ -1185,10 +1313,15 @@ export enum EmbedEvent {
1185
1313
  */
1186
1314
  V1Data = 'exportVizDataToParent',
1187
1315
  /**
1188
- * Emitted when the embed does not have cookie access. This
1189
- * happens on Safari where third-party cookies are blocked by default.
1316
+ * Emitted when the embed does not have cookie access. This happens
1317
+ * when Safari and other Web browsers block third-party cookies
1318
+ * are blocked by default. `NoCookieAccess` can trigger
1190
1319
  *
1191
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1320
+ * @example
1321
+ *```js
1322
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
1323
+ *```
1324
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
1192
1325
  */
1193
1326
  NoCookieAccess = 'noCookieAccess',
1194
1327
  /**
@@ -1202,12 +1335,24 @@ export enum EmbedEvent {
1202
1335
  * Emitted when any modal is opened in the app
1203
1336
  *
1204
1337
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1338
+ * @example
1339
+ *```js
1340
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
1341
+ * console.log('dialog open', payload);
1342
+ * })
1343
+ *```
1205
1344
  */
1206
1345
  DialogOpen = 'dialog-open',
1207
1346
  /**
1208
1347
  * Emitted when any modal is closed in the app
1209
1348
  *
1210
1349
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1350
+ * @example
1351
+ *```js
1352
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
1353
+ * console.log('dialog close', payload);
1354
+ * })
1355
+ *```
1211
1356
  */
1212
1357
  DialogClose = 'dialog-close',
1213
1358
  /**
@@ -1216,6 +1361,21 @@ export enum EmbedEvent {
1216
1361
  * other events on the rendered Liveboard.
1217
1362
  *
1218
1363
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1364
+ * @example
1365
+ *```js
1366
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
1367
+ console.log('Liveboard is rendered', payload);
1368
+ })
1369
+ *```
1370
+ * The following example shows how to trigger
1371
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
1372
+ * @example
1373
+ *```js
1374
+ * const embedRef = useEmbedRef();
1375
+ * const onLiveboardRendered = () => {
1376
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
1377
+ * };
1378
+ *```
1219
1379
  */
1220
1380
  LiveboardRendered = 'PinboardRendered',
1221
1381
  /**
@@ -1223,216 +1383,470 @@ export enum EmbedEvent {
1223
1383
  * is triggered on all events.
1224
1384
  *
1225
1385
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1386
+ * @example
1387
+ *```js
1388
+ * appEmbed.on(EmbedEvent.ALL, payload => {
1389
+ * console.log('Embed Events', payload)
1390
+ * })
1391
+ *```
1226
1392
  */
1227
1393
  ALL = '*',
1228
1394
  /**
1229
1395
  * Emitted when an Answer is saved in the app
1230
1396
  *
1231
1397
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1398
+ * @example
1399
+ *```js
1400
+ * //trigger when action starts
1401
+ * searchEmbed.on(EmbedEvent.Save, payload => {
1402
+ * console.log('Save', payload)
1403
+ * }, {
1404
+ * start: true
1405
+ * })
1406
+ * //trigger when action ends
1407
+ * searchEmbed.on(EmbedEvent.Save, payload => {
1408
+ * console.log('Save', payload)
1409
+ * })
1410
+ *```
1232
1411
  */
1233
1412
  Save = 'save',
1234
1413
  /**
1235
1414
  * Emitted when the download action is triggered on an answer
1236
1415
  *
1416
+ * **Note**: This event is deprecated in v1.21.0.
1417
+ * To fire an event when a download action is initiated on a chart or table,
1418
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
1419
+ * or `EmbedEvent.DownloadAsXLSX`
1420
+ *
1237
1421
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1422
+ * @example
1423
+ *```js
1424
+ * liveboardEmbed.trigger(HostEvent.Download, {
1425
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1426
+ * })
1427
+ *```
1238
1428
  */
1239
1429
  Download = 'download',
1240
1430
  /**
1241
1431
  * Emitted when the download action is triggered on an answer
1242
1432
  *
1243
1433
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1434
+ * @example
1435
+ *```js
1436
+ * //trigger when action starts
1437
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1438
+ * console.log('download PNG', payload)}, {start: true })
1439
+ * //trigger when action ends
1440
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1441
+ * console.log('download PNG', payload)})
1442
+ *```
1244
1443
  */
1245
1444
  DownloadAsPng = 'downloadAsPng',
1246
1445
  /**
1247
1446
  * Emitted when the Download as PDF action is triggered on an answer
1248
1447
  *
1249
1448
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1449
+ * @example
1450
+ *```js
1451
+ * //trigger when action starts
1452
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1453
+ * console.log('download PDF', payload)}, {start: true })
1454
+ * //trigger when action ends
1455
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1456
+ * console.log('download PDF', payload)})
1457
+ *```
1250
1458
  */
1251
1459
  DownloadAsPdf = 'downloadAsPdf',
1252
1460
  /**
1253
1461
  * Emitted when the Download as CSV action is triggered on an answer
1254
1462
  *
1255
1463
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1464
+ * @example
1465
+ *```js
1466
+ * //trigger when action starts
1467
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1468
+ * console.log('download CSV', payload)}, {start: true })
1469
+ * //trigger when action ends
1470
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1471
+ * console.log('download CSV', payload)})
1472
+ *```
1256
1473
  */
1257
1474
  DownloadAsCsv = 'downloadAsCsv',
1258
1475
  /**
1259
1476
  * Emitted when the Download as XLSX action is triggered on an answer
1260
1477
  *
1261
1478
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1479
+ * @example
1480
+ *```js
1481
+ * //trigger when action starts
1482
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1483
+ * console.log('download Xlsx', payload)}, { start: true })
1484
+ * //trigger when action ends
1485
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1486
+ * console.log('download Xlsx', payload)})
1487
+ *```
1262
1488
  */
1263
1489
  DownloadAsXlsx = 'downloadAsXlsx',
1264
1490
  /**
1265
- * Emitted when an answer is deleted in the app
1491
+ * Emitted when an Answer is deleted in the app
1266
1492
  *
1267
1493
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1494
+ * @example
1495
+ *```js
1496
+ * //trigger when action starts
1497
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1498
+ * console.log('delete answer', payload)}, {start: true })
1499
+ * //trigger when action is completed
1500
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1501
+ * console.log('delete answer', payload)})
1502
+ *```
1268
1503
  */
1269
1504
  AnswerDelete = 'answerDelete',
1270
1505
  /**
1271
1506
  * Emitted when an answer is pinned to a Liveboard
1272
1507
  *
1273
1508
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1509
+ * @example
1510
+ *```js
1511
+ * //trigger when action starts
1512
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
1513
+ * console.log('pin', payload)
1514
+ * }, {
1515
+ * start: true
1516
+ * })
1517
+ * //trigger when action ends
1518
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
1519
+ * console.log('pin', payload)
1520
+ * })
1521
+ *```
1274
1522
  */
1275
1523
  Pin = 'pin',
1276
1524
  /**
1277
1525
  * Emitted when SpotIQ analysis is triggered
1278
1526
  *
1279
1527
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1528
+ * @example
1529
+ *```js
1530
+ * //trigger when action starts
1531
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1532
+ * console.log('SpotIQAnalyze', payload)
1533
+ * }, {
1534
+ * start: true
1535
+ * })
1536
+ * //trigger when action ends
1537
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1538
+ * console.log('SpotIQ analyze', payload)
1539
+ * })
1540
+ *```
1280
1541
  */
1281
1542
  SpotIQAnalyze = 'spotIQAnalyze',
1282
1543
  /**
1283
1544
  * Emitted when a user shares an object with another user or group
1284
1545
  *
1285
1546
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1547
+ * @example
1548
+ *```js
1549
+ * //trigger when action starts
1550
+ * searchEmbed.on(EmbedEvent.Share, payload => {
1551
+ * console.log('Share', payload)
1552
+ * }, {
1553
+ * start: true
1554
+ * })
1555
+ * //trigger when action ends
1556
+ * searchEmbed.on(EmbedEvent.Share, payload => {
1557
+ * console.log('Share', payload)
1558
+ * })
1559
+ *```
1286
1560
  */
1287
1561
  Share = 'share',
1288
1562
  /**
1289
- * Emitted when a user clicks the Include action to include a specific value or data
1290
- * on a chart or table
1563
+ * Emitted when a user clicks the **Include** action to include a specific value or
1564
+ * data on a chart or table.
1291
1565
  *
1292
1566
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1567
+ * @example
1568
+ *```js
1569
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
1570
+ * console.log('Drill include', payload);
1571
+ * })
1572
+ *```
1293
1573
  */
1294
1574
  DrillInclude = 'context-menu-item-include',
1295
1575
  /**
1296
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
1297
- * on a chart or table
1576
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
1577
+ * data on a chart or table
1298
1578
  *
1299
1579
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1580
+ * @example
1581
+ *```js
1582
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
1583
+ * console.log('Drill exclude', payload);
1584
+ * })
1585
+ *```
1300
1586
  */
1301
1587
  DrillExclude = 'context-menu-item-exclude',
1302
1588
  /**
1303
- * Emitted when copied column value on the app
1589
+ * Emitted when a column value is copied in the embedded app.
1304
1590
  *
1305
1591
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1592
+ * @example
1593
+ *```js
1594
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
1595
+ * console.log('copy to clipboard', payload);
1596
+ * })
1597
+ *```
1306
1598
  */
1307
1599
  CopyToClipboard = 'context-menu-item-copy-to-clipboard',
1308
1600
  /**
1309
- * Emitted when a user clicks the Update TML action
1601
+ * Emitted when a user clicks the **Update TML** action
1310
1602
  *
1311
1603
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1604
+ * @example
1605
+ *```js
1606
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
1607
+ * })
1608
+ *```
1312
1609
  */
1313
1610
  UpdateTML = 'updateTSL',
1314
1611
  /**
1315
- * Emitted when a user clicks the Edit TML action
1612
+ * Emitted when a user clicks the **Edit TML** action
1316
1613
  *
1317
1614
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1615
+ * @example
1616
+ *```js
1617
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
1618
+ * console.log('Edit TML', payload);
1619
+ * })
1620
+ *```
1318
1621
  */
1319
1622
  EditTML = 'editTSL',
1320
1623
  /**
1321
- * Emitted when ExportTML trigger in answer on the app
1624
+ * Emitted when the **Export TML** action is triggered on an
1625
+ * an embedded object in the app
1322
1626
  *
1323
1627
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1628
+ * @example
1629
+ *```js
1630
+ * //trigger when action starts
1631
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1632
+ * console.log('Export TML', payload)}, { start: true })
1633
+ * //trigger when action ends
1634
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1635
+ * console.log('Export TML', payload)})
1636
+ *```
1324
1637
  */
1325
1638
  ExportTML = 'exportTSL',
1326
1639
  /**
1327
- * Emitted when an answer is saved as a view
1640
+ * Emitted when an Answer is saved as a View.
1328
1641
  *
1329
1642
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1643
+ * @example
1644
+ *```js
1645
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
1646
+ * console.log('View', payload);
1647
+ * })
1648
+ *```
1330
1649
  */
1331
1650
  SaveAsView = 'saveAsView',
1332
1651
  /**
1333
- * Emitted when copy of existing answer on the app
1652
+ * Emitted when the user creates a copy of an Answer
1334
1653
  *
1335
1654
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1655
+ * @example
1656
+ *```js
1657
+ * //trigger when action starts
1658
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1659
+ * console.log('Copy and edit', payload)}, {start: true })
1660
+ * //trigger when action ends
1661
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1662
+ * console.log('Copy and edit', payload)})
1663
+ *```
1336
1664
  */
1337
1665
  CopyAEdit = 'copyAEdit',
1338
1666
  /**
1339
- * Emitted when a user clicks Show underlying data on an answe
1667
+ * Emitted when a user clicks Show underlying data on an Answer
1340
1668
  *
1341
1669
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1670
+ * @example
1671
+ *```js
1672
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
1673
+ * console.log('show data', payload);
1674
+ * })
1675
+ *```
1342
1676
  */
1343
1677
  ShowUnderlyingData = 'showUnderlyingData',
1344
1678
  /**
1345
- * Emitted when an answer is switched to a chart or table view
1679
+ * Emitted when an answer is switched to a chart or table view.
1346
1680
  *
1347
1681
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1682
+ * @example
1683
+ *```js
1684
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1685
+ * console.log('switch view', payload);
1686
+ * })
1687
+ *```
1348
1688
  */
1349
1689
  AnswerChartSwitcher = 'answerChartSwitcher',
1350
1690
  /**
1351
- * Internal event to communicate the initial settings back to the TS APP
1691
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
1352
1692
  *
1353
1693
  * @hidden
1354
1694
  */
1355
1695
  APP_INIT = 'appInit',
1356
1696
  /**
1357
- * Emitted when a user clicks Show Liveboard details on a Liveboard
1697
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
1358
1698
  *
1359
1699
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1700
+ * @example
1701
+ *```js
1702
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1703
+ * console.log('Liveboard details', payload);
1704
+ * })
1705
+ *```
1360
1706
  */
1361
1707
  LiveboardInfo = 'pinboardInfo',
1362
1708
  /**
1363
1709
  * Emitted when a user clicks on the Favorite icon on a Liveboard
1364
1710
  *
1365
1711
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1712
+ * @example
1713
+ *```js
1714
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
1715
+ * console.log('favorites', payload);
1716
+ * })
1717
+ *```
1366
1718
  */
1367
1719
  AddToFavorites = 'addToFavorites',
1368
1720
  /**
1369
- * Emitted when a user clicks Schedule on a Liveboard
1721
+ * Emitted when a user clicks **Schedule** on a Liveboard
1370
1722
  *
1371
1723
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1724
+ * @example
1725
+ *```js
1726
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
1727
+ * console.log(`Liveboard schedule', payload);
1728
+ * })
1729
+ *```
1372
1730
  */
1373
1731
  Schedule = 'subscription',
1374
1732
  /**
1375
- * Emitted when a user clicks Edit on a Liveboard or visualization
1733
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
1376
1734
  *
1377
1735
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1736
+ * @example
1737
+ *```js
1738
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
1739
+ * console.log(`Liveboard edit', payload);
1740
+ * })
1741
+ *```
1378
1742
  */
1379
1743
  Edit = 'edit',
1380
1744
  /**
1381
- * Emitted when a user clicks Make a copy on a Liveboard
1745
+ * Emitted when a user clicks *Make a copy* on a Liveboard
1382
1746
  *
1383
1747
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1748
+ * @example
1749
+ *```js
1750
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
1751
+ * console.log(`Copy', payload);
1752
+ * })
1753
+ *```
1384
1754
  */
1385
1755
  MakeACopy = 'makeACopy',
1386
1756
  /**
1387
- * Emitted when a user clicks Present on a Liveboard or visualization
1757
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
1388
1758
  *
1389
1759
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1760
+ * @example
1761
+ *```js
1762
+ * liveboardEmbed.trigger(HostEvent.Present)
1763
+ *```
1764
+ * @example
1765
+ *```js
1766
+ * liveboardEmbed.on(EmbedEvent.Present, {
1767
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1768
+ * })
1769
+ *```
1390
1770
  */
1391
1771
  Present = 'present',
1392
1772
  /**
1393
- * Emitted when a user clicks Delete on a Liveboard
1773
+ * Emitted when a user clicks **Delete** on a visualization
1394
1774
  *
1395
1775
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1776
+ * @example
1777
+ *```js
1778
+ * liveboardEmbed.trigger(HostEvent.Delete,
1779
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1780
+ *```
1396
1781
  */
1397
1782
  Delete = 'delete',
1398
1783
  /**
1399
1784
  * Emitted when a user clicks Manage schedules on a Liveboard
1400
1785
  *
1401
1786
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1787
+ * @example
1788
+ *```js
1789
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
1790
+ *```
1402
1791
  */
1403
1792
  SchedulesList = 'schedule-list',
1404
1793
  /**
1405
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
1794
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
1406
1795
  *
1407
1796
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1797
+ * @example
1798
+ *```js
1799
+ * liveboardEmbed.trigger(HostEvent.Cancel)
1800
+ *```
1408
1801
  */
1409
1802
  Cancel = 'cancel',
1410
1803
  /**
1411
- * Emitted when a user clicks Explore on a visualization
1804
+ * Emitted when a user clicks **Explore** on a visualization
1412
1805
  *
1413
1806
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1807
+ * @example
1808
+ *```js
1809
+ * liveboardEmbed.trigger(HostEvent.Explore, {
1810
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1811
+ *```
1414
1812
  */
1415
1813
  Explore = 'explore',
1416
1814
  /**
1417
- * Emitted when a user clicks Copy link action on a visualization
1815
+ * Emitted when a user clicks **Copy link** action on a visualization
1418
1816
  *
1419
1817
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1818
+ * @example
1819
+ *```js
1820
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
1821
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1822
+ *```
1420
1823
  */
1421
1824
  CopyLink = 'embedDocument',
1422
1825
  /**
1423
- * Emitted when a user interacts with cross filters on a visualization or liveboard
1826
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
1424
1827
  *
1425
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1828
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1829
+ * @example
1830
+ *```js
1831
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
1832
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1833
+ *```
1426
1834
  */
1427
1835
  CrossFilterChanged = 'cross-filter-changed',
1428
1836
  /**
1429
1837
  * Emitted when a user right clicks on a visualization (chart or table)
1430
1838
  *
1431
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1839
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1840
+ * @example
1841
+ *```js
1842
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
1843
+ * console.log('VizPointClick', payload)
1844
+ * })
1845
+ *```
1432
1846
  */
1433
1847
  VizPointRightClick = 'vizPointRightClick',
1434
1848
  /**
1435
- * Emitted when a user clicks on Insert to slide on a visualization
1849
+ * Emitted when a user clicks **Insert to slide** on a visualization
1436
1850
  *
1437
1851
  * @hidden
1438
1852
  */
@@ -1440,52 +1854,52 @@ export enum EmbedEvent {
1440
1854
  /**
1441
1855
  * @hidden
1442
1856
  * Emitted when a user changes any filter on a Liveboard.
1443
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1857
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1444
1858
  */
1445
1859
  FilterChanged = 'filterChanged',
1446
1860
  /**
1447
- * Emitted when a user click on Go button in Sage Embed
1861
+ * Emitted when a user clicks the **Go** button on the Search page
1448
1862
  *
1449
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1863
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1450
1864
  */
1451
1865
  SageEmbedQuery = 'sageEmbedQuery',
1452
1866
  /**
1453
- * Emitten when a user select data source in Sage Embed
1867
+ * Emitted when a user selects a data source.
1454
1868
  *
1455
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1869
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1456
1870
  */
1457
1871
  SageWorksheetUpdated = 'sageWorksheetUpdated',
1458
1872
  /**
1459
- * Emitted when a user updates a connection in Data tab
1873
+ * Emitted when a user updates a connection on the **Data** page
1460
1874
  *
1461
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1875
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1462
1876
  */
1463
1877
  UpdateConnection = 'updateConnection',
1464
1878
  /**
1465
- * Emitted when a user updates a connection in Data tab
1879
+ * Emitted when a user updates a connection on the **Data** page
1466
1880
  *
1467
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1881
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1468
1882
  */
1469
1883
  CreateConnection = 'createConnection',
1470
1884
  /**
1471
1885
  * Emitted when name, status (private or public) or filter values of a
1472
- * PersonalisedView is updated.
1886
+ * Personalised view is updated.
1473
1887
  *
1474
1888
  * @returns viewName: string
1475
1889
  * @returns viewId: string
1476
1890
  * @returns liveboardId: string
1477
1891
  * @returns isPublic: boolean
1478
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1892
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1479
1893
  */
1480
1894
  UpdatePersonalisedView = 'updatePersonalisedView',
1481
1895
  /**
1482
- * Emitted when a PersonalisedView is saved.
1896
+ * Emitted when a Personalised view is saved.
1483
1897
  *
1484
1898
  * @returns viewName: string
1485
1899
  * @returns viewId: string
1486
1900
  * @returns liveboardId: string
1487
1901
  * @returns isPublic: boolean
1488
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1902
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1489
1903
  */
1490
1904
  SavePersonalisedView = 'savePersonalisedView',
1491
1905
  /**
@@ -1495,7 +1909,7 @@ export enum EmbedEvent {
1495
1909
  * @returns viewId: string
1496
1910
  * @returns liveboardId: string
1497
1911
  * @returns isPublic: boolean
1498
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1912
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1499
1913
  */
1500
1914
  ResetLiveboard = 'resetLiveboard',
1501
1915
  /**
@@ -1503,11 +1917,11 @@ export enum EmbedEvent {
1503
1917
  *
1504
1918
  * @returns views: string[]
1505
1919
  * @returns liveboardId: string
1506
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1920
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1507
1921
  */
1508
1922
  DeletePersonalisedView = 'deletePersonalisedView',
1509
1923
  /**
1510
- * Emitten when a user creates a new worksheet
1924
+ * Emitted when a user creates a new worksheet
1511
1925
  *
1512
1926
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1513
1927
  */
@@ -1539,15 +1953,16 @@ export enum EmbedEvent {
1539
1953
  // eslint-disable-next-line no-shadow
1540
1954
  export enum HostEvent {
1541
1955
  /**
1542
- * Triggers a search query in AppEmbed and SearchEmbed
1543
- * deployments.
1956
+ * Triggers a search operation with the search tokens specified in
1957
+ * the search query string.
1958
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
1544
1959
  * Includes the following properties:
1545
1960
  *
1546
- * @param - dataSourceIds - The data source GUID to Search on
1961
+ * @param - `searchQuery` - query string with search tokens
1962
+ * @param - `dataSources` - Data source GUID to Search on
1547
1963
  * - Although an array, only a single source
1548
1964
  * is supported.
1549
- * @param - searchQuery - Query string with search tokens
1550
- * @param - execute - executes the existing / updated query
1965
+ * @param - `execute` - executes search and updates the existing query
1551
1966
  * @example
1552
1967
  * ```js
1553
1968
  * searchembed.trigger(HostEvent.Search, {
@@ -1567,6 +1982,10 @@ export enum HostEvent {
1567
1982
  * @param - columnGuid - Optional. GUID of the column to drill
1568
1983
  * by. If not provided it will auto drill by the configured
1569
1984
  * column.
1985
+ * @param - autoDrillDown - Optional. If true, the drill down will be
1986
+ * done automatically on the most popular column.
1987
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
1988
+ * in case of a liveboard.
1570
1989
  * @example
1571
1990
  * ```js
1572
1991
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -1583,6 +2002,25 @@ export enum HostEvent {
1583
2002
  * });
1584
2003
  * })
1585
2004
  * ```
2005
+ * @example
2006
+ * ```js
2007
+ * // Works with TS 9.8.0 and above
2008
+ *
2009
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
2010
+ * console.log(payload);
2011
+ * const clickedPoint = payload.data.clickedPoint;
2012
+ * const selectedPoint = payload.data.selectedPoints;
2013
+ * console.log('>>> called', clickedPoint);
2014
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
2015
+ * points: {
2016
+ * clickedPoint,
2017
+ * selectedPoints: selectedPoint
2018
+ * },
2019
+ * autoDrillDown: true,
2020
+ * vizId: payload.data.vizId
2021
+ * });
2022
+ * })
2023
+ * ```
1586
2024
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1587
2025
  */
1588
2026
  DrillDown = 'triggerDrillDown',
@@ -1599,7 +2037,7 @@ export enum HostEvent {
1599
2037
  */
1600
2038
  Reload = 'reload',
1601
2039
  /**
1602
- * Sets the visible visualizations on a Liveboard.
2040
+ * Display specific visualizations on a Liveboard.
1603
2041
  *
1604
2042
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
1605
2043
  * in this parameter will be hidden.
@@ -1613,7 +2051,7 @@ export enum HostEvent {
1613
2051
  */
1614
2052
  SetVisibleVizs = 'SetPinboardVisibleVizs',
1615
2053
  /**
1616
- * Set the Active Tab of a Liveboard.
2054
+ * Set a Liveboard tab as an active tab.
1617
2055
  *
1618
2056
  * @param - tabId - string of id of Tab to show
1619
2057
  * @example
@@ -1626,7 +2064,7 @@ export enum HostEvent {
1626
2064
  */
1627
2065
  SetActiveTab = 'SetActiveTab',
1628
2066
  /**
1629
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
2067
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
1630
2068
  * runtime filters passed here are appended to the existing runtime
1631
2069
  * filters.
1632
2070
  * Pass an array of runtime filters with the following attributes:
@@ -1652,10 +2090,11 @@ export enum HostEvent {
1652
2090
  */
1653
2091
  UpdateRuntimeFilters = 'UpdateRuntimeFilters',
1654
2092
  /**
1655
- * Navigate to a specific page in the embedded application without reloading the page.
2093
+ * Navigate to a specific page in the embedded ThoughtSpot application.
1656
2094
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
1657
2095
  *
1658
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
2096
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
2097
+ * be a number; for example, `1`, `-1`.
1659
2098
  * @example
1660
2099
  * ```js
1661
2100
  * appEmbed.navigateToPage(-1)
@@ -1664,7 +2103,7 @@ export enum HostEvent {
1664
2103
  */
1665
2104
  Navigate = 'Navigate',
1666
2105
  /**
1667
- * Opens the filter panel for a particular column.
2106
+ * Open the filter panel for a particular column.
1668
2107
  * Works with Search and Liveboard embed.
1669
2108
  *
1670
2109
  * @param - { columnId: string,
@@ -1682,7 +2121,7 @@ export enum HostEvent {
1682
2121
  */
1683
2122
  OpenFilter = 'openFilter',
1684
2123
  /**
1685
- * Adds columns to the current search query.
2124
+ * Add columns to the current search query.
1686
2125
  *
1687
2126
  * @param - { columnIds: string[] }
1688
2127
  * @example
@@ -1693,7 +2132,7 @@ export enum HostEvent {
1693
2132
  */
1694
2133
  AddColumns = 'addColumns',
1695
2134
  /**
1696
- * Removes a column from the current search query.
2135
+ * Remove a column from the current search query.
1697
2136
  *
1698
2137
  * @param - { columnId: string }
1699
2138
  * @example
@@ -1704,27 +2143,29 @@ export enum HostEvent {
1704
2143
  */
1705
2144
  RemoveColumn = 'removeColumn',
1706
2145
  /**
1707
- * Gets the current Liveboard content.
2146
+ * Get the transient state of a Liveboard as encoded content.
2147
+ * This includes unsaved and ad hoc changes such as
2148
+ * Liveboard filters, runtime filters applied on visualizations on a
2149
+ * Liveboard, and Liveboard layout, changes to visualizations such as
2150
+ * sorting, toggling of legends, and data drill down.
1708
2151
  *
1709
2152
  * @example
1710
2153
  * ```js
1711
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
2154
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
2155
+ * data=>console.log(data))
1712
2156
  * ```
1713
2157
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
1714
2158
  */
1715
2159
  getExportRequestForCurrentPinboard = 'getExportRequestForCurrentPinboard',
1716
2160
  /**
1717
- * Triggers the **Pin** action on an embedded object
2161
+ * Trigger the **Pin** action on an embedded object
1718
2162
  *
1719
2163
  * @param - Liveboard embed takes the `vizId` as a
1720
- * key. Can be left undefined when embedding Search, full app or
2164
+ * key. Can be left undefined when embedding Search, full app, or
1721
2165
  * a visualization.
1722
2166
  * @example
1723
2167
  * ```js
1724
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1725
- * ```
1726
- * ```js
1727
- * vizEmbed.trigger(HostEvent.Pin)
2168
+ * appEmbed.trigger(HostEvent.Pin)
1728
2169
  * ```
1729
2170
  * ```js
1730
2171
  * searchEmbed.trigger(HostEvent.Pin)
@@ -1733,17 +2174,18 @@ export enum HostEvent {
1733
2174
  */
1734
2175
  Pin = 'pin',
1735
2176
  /**
1736
- * Triggers the **Show Liveboard details** action on a Liveboard
2177
+ * Trigger the **Show Liveboard details** action
2178
+ * on an embedded Liveboard.
1737
2179
  *
1738
2180
  * @example
1739
- * ```js
1740
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1741
- * ```
2181
+ *```js
2182
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2183
+ *```
1742
2184
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1743
2185
  */
1744
2186
  LiveboardInfo = 'pinboardInfo',
1745
2187
  /**
1746
- * Triggers the **Schedule** action on a Liveboard
2188
+ * Trigger the **Schedule** action on an embedded Liveboard.
1747
2189
  *
1748
2190
  * @example
1749
2191
  * ```js
@@ -1753,7 +2195,7 @@ export enum HostEvent {
1753
2195
  */
1754
2196
  Schedule = 'subscription',
1755
2197
  /**
1756
- * Triggers the **Manage schedule** action on a Liveboard
2198
+ * Trigger the **Manage schedule** action on an embedded Liveboard
1757
2199
  *
1758
2200
  * @example
1759
2201
  * ```js
@@ -1763,7 +2205,7 @@ export enum HostEvent {
1763
2205
  */
1764
2206
  SchedulesList = 'schedule-list',
1765
2207
  /**
1766
- * Triggers the **Export TML** action on a Liveboard
2208
+ * Trigger the **Export TML** action on an embedded Liveboard.
1767
2209
  *
1768
2210
  * @example
1769
2211
  * ```js
@@ -1773,7 +2215,7 @@ export enum HostEvent {
1773
2215
  */
1774
2216
  ExportTML = 'exportTSL',
1775
2217
  /**
1776
- * Triggers the **Edit TML** action on a Liveboard
2218
+ * Trigger the **Edit TML** action on an embedded Liveboard.
1777
2219
  *
1778
2220
  * @example
1779
2221
  * ```js
@@ -1783,7 +2225,7 @@ export enum HostEvent {
1783
2225
  */
1784
2226
  EditTML = 'editTSL',
1785
2227
  /**
1786
- * Triggers the **Update TML** action on a Liveboard
2228
+ * Trigger the **Update TML** action on an embedded Liveboard.
1787
2229
  *
1788
2230
  * @example
1789
2231
  * ```js
@@ -1793,7 +2235,7 @@ export enum HostEvent {
1793
2235
  */
1794
2236
  UpdateTML = 'updateTSL',
1795
2237
  /**
1796
- * Triggers the **Download PDF** action on a Liveboard
2238
+ * Trigger the **Download PDF** action on an embedded Liveboard.
1797
2239
  *
1798
2240
  * @example
1799
2241
  * ```js
@@ -1803,8 +2245,8 @@ export enum HostEvent {
1803
2245
  */
1804
2246
  DownloadAsPdf = 'downloadAsPdf',
1805
2247
  /**
1806
- * Triggers the **Make a copy** action on a Liveboard, Search, or
1807
- * visualization page
2248
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
2249
+ * visualization page.
1808
2250
  *
1809
2251
  * @example
1810
2252
  * ```js
@@ -1820,7 +2262,7 @@ export enum HostEvent {
1820
2262
  */
1821
2263
  MakeACopy = 'makeACopy',
1822
2264
  /**
1823
- * Triggers the **Delete** action on a Liveboard
2265
+ * Trigger the **Delete** action for a Liveboard.
1824
2266
  *
1825
2267
  * @example
1826
2268
  * ```js
@@ -1830,7 +2272,7 @@ export enum HostEvent {
1830
2272
  */
1831
2273
  Remove = 'delete',
1832
2274
  /**
1833
- * Triggers the **Explore* action on a visualization
2275
+ * Trigger the **Explore** action on a visualization.
1834
2276
  *
1835
2277
  * @param - an object with `vizId` as a key
1836
2278
  * @example
@@ -1841,7 +2283,7 @@ export enum HostEvent {
1841
2283
  */
1842
2284
  Explore = 'explore',
1843
2285
  /**
1844
- * Triggers the **Create alert** action on a visualization
2286
+ * Trigger the **Create alert** action on a visualization
1845
2287
  *
1846
2288
  * @param - an object with `vizId` as a key
1847
2289
  * @example
@@ -1854,7 +2296,7 @@ export enum HostEvent {
1854
2296
  */
1855
2297
  CreateMonitor = 'createMonitor',
1856
2298
  /**
1857
- * Triggers the **Manage alerts** action on a visualization
2299
+ * Trigger the **Manage alerts** action on a visualization
1858
2300
  *
1859
2301
  * @param - an object with `vizId` as a key
1860
2302
  * @example
@@ -1867,7 +2309,7 @@ export enum HostEvent {
1867
2309
  */
1868
2310
  ManageMonitor = 'manageMonitor',
1869
2311
  /**
1870
- * Triggers the **Edit** action on a Liveboard or visualization
2312
+ * Trigger the **Edit** action on a Liveboard or visualization
1871
2313
  *
1872
2314
  * @param - object - To trigger the action for a specific visualization
1873
2315
  * in Liveboard embed, pass in `vizId` as a key.
@@ -1888,7 +2330,7 @@ export enum HostEvent {
1888
2330
  */
1889
2331
  Edit = 'edit',
1890
2332
  /**
1891
- * Triggers the **Copy link** action on a Liveboard or visualization
2333
+ * Trigger the **Copy link** action on a Liveboard or visualization
1892
2334
  *
1893
2335
  * @param - object - to trigger the action for a
1894
2336
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -1906,7 +2348,7 @@ export enum HostEvent {
1906
2348
  */
1907
2349
  CopyLink = 'embedDocument',
1908
2350
  /**
1909
- * Triggers the **Present** action on a Liveboard or visualization
2351
+ * Trigger the **Present** action on a Liveboard or visualization
1910
2352
  *
1911
2353
  * @param - object - to trigger the action for a specific visualization
1912
2354
  * in Liveboard embed, pass in `vizId` as a key
@@ -1924,7 +2366,7 @@ export enum HostEvent {
1924
2366
  */
1925
2367
  Present = 'present',
1926
2368
  /**
1927
- * Gets TML for the current search.
2369
+ * Get TML for the current search.
1928
2370
  *
1929
2371
  * @example
1930
2372
  * ```js
@@ -1939,7 +2381,7 @@ export enum HostEvent {
1939
2381
  */
1940
2382
  GetTML = 'getTML',
1941
2383
  /**
1942
- * Triggers the **Show underlying data** action on visualization or search
2384
+ * Trigger the **Show underlying data** action on visualization or search
1943
2385
  *
1944
2386
  * @param - an object with vizId as a key
1945
2387
  * @example
@@ -1957,7 +2399,9 @@ export enum HostEvent {
1957
2399
  */
1958
2400
  ShowUnderlyingData = 'showUnderlyingData',
1959
2401
  /**
1960
- * Triggers the **Delete** action on visualization or search
2402
+ * Trigger the **Delete** action for a visualization
2403
+ * in an embedded Liveboard, or a chart or table
2404
+ * generated from Search.
1961
2405
  *
1962
2406
  * @param - Liveboard embed takes an object with `vizId` as a key.
1963
2407
  * Can be left empty if embedding Search or visualization.
@@ -1967,16 +2411,13 @@ export enum HostEvent {
1967
2411
  * '730496d6-6903-4601-937e-2c691821af3c'})
1968
2412
  * ```
1969
2413
  * ```js
1970
- * vizEmbed.trigger(HostEvent.Delete)
1971
- * ```
1972
- * ```js
1973
2414
  * searchEmbed.trigger(HostEvent.Delete)
1974
2415
  * ```
1975
2416
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1976
2417
  */
1977
2418
  Delete = 'onDeleteAnswer',
1978
2419
  /**
1979
- * Triggers the **SpotIQ analyze** action on visualization
2420
+ * Trigger the **SpotIQ analyze** action on visualization
1980
2421
  * or search.
1981
2422
  *
1982
2423
  * @param - Liveboard embed takes `vizId` as a
@@ -1997,7 +2438,7 @@ export enum HostEvent {
1997
2438
  */
1998
2439
  SpotIQAnalyze = 'spotIQAnalyze',
1999
2440
  /**
2000
- * Triggers the **Download** action on charts in
2441
+ * Trigger the **Download** action on charts in
2001
2442
  * the embedded view.
2002
2443
  *
2003
2444
  * @example
@@ -2006,17 +2447,15 @@ export enum HostEvent {
2006
2447
  * '730496d6-6903-4601-937e-2c691821af3c'})
2007
2448
  * ```
2008
2449
  * ```js
2009
- * vizEmbed.trigger(HostEvent.Download)
2010
- * ```
2011
- * ```js
2012
- * searchEmbed.trigger(HostEvent.Download)
2450
+ * embed.trigger(HostEvent.Download)
2013
2451
  * ```
2014
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
2452
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2453
+ * Use {@link DownloadAsPng}
2015
2454
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2016
2455
  */
2017
2456
  Download = 'downloadAsPng',
2018
2457
  /**
2019
- * Triggers the **Download** > **PNG** action on
2458
+ * Trigger the **Download** > **PNG** action on
2020
2459
  * charts in the embedded view.
2021
2460
  *
2022
2461
  * @example
@@ -2032,7 +2471,7 @@ export enum HostEvent {
2032
2471
  */
2033
2472
  DownloadAsPng = 'downloadAsPng',
2034
2473
  /**
2035
- * Triggers the **Download** > **CSV** action on tables in
2474
+ * Trigger the **Download** > **CSV** action on tables in
2036
2475
  * the embedded view.
2037
2476
  *
2038
2477
  * @example
@@ -2050,7 +2489,7 @@ export enum HostEvent {
2050
2489
  */
2051
2490
  DownloadAsCsv = 'downloadAsCSV',
2052
2491
  /**
2053
- * Triggers the **Download** > **XLSX** action on tables
2492
+ * Trigger the **Download** > **XLSX** action on tables
2054
2493
  * in the embedded view.
2055
2494
  *
2056
2495
  * @example
@@ -2068,7 +2507,7 @@ export enum HostEvent {
2068
2507
  */
2069
2508
  DownloadAsXlsx = 'downloadAsXLSX',
2070
2509
  /**
2071
- * Triggers the **Share** action on an embedded
2510
+ * Trigger the **Share** action on an embedded
2072
2511
  * Liveboard or Answer.
2073
2512
  *
2074
2513
  * @example
@@ -2082,7 +2521,7 @@ export enum HostEvent {
2082
2521
  */
2083
2522
  Share = 'share',
2084
2523
  /**
2085
- * Triggers the **Save** action on a Liveboard or Answer.
2524
+ * Trigger the **Save** action on a Liveboard or Answer.
2086
2525
  * Saves the changes.
2087
2526
  *
2088
2527
  * @example
@@ -2096,7 +2535,7 @@ export enum HostEvent {
2096
2535
  */
2097
2536
  Save = 'save',
2098
2537
  /**
2099
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
2538
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
2100
2539
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
2101
2540
  *
2102
2541
  * @param - an object with `vizId` as a key
@@ -2112,7 +2551,7 @@ export enum HostEvent {
2112
2551
  */
2113
2552
  SyncToSheets = 'sync-to-sheets',
2114
2553
  /**
2115
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
2554
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
2116
2555
  * Sends data from an Answer or Liveboard visualization to third-party apps such
2117
2556
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
2118
2557
  *
@@ -2129,7 +2568,7 @@ export enum HostEvent {
2129
2568
  */
2130
2569
  SyncToOtherApps = 'sync-to-other-apps',
2131
2570
  /**
2132
- * Triggers the **Manage pipelines** action on an embedded
2571
+ * Trigger the **Manage pipelines** action on an embedded
2133
2572
  * visualization or Answer.
2134
2573
  * Allows users to manage ThoughtSpot Sync pipelines.
2135
2574
  *
@@ -2146,18 +2585,21 @@ export enum HostEvent {
2146
2585
  */
2147
2586
  ManagePipelines = 'manage-pipeline',
2148
2587
  /**
2149
- * Triggers the Reset search on the Search page
2588
+ * Reset search operation on the Search or Answer page.
2150
2589
  *
2151
2590
  * @example
2152
2591
  * ```js
2153
2592
  * searchEmbed.trigger(HostEvent.ResetSearch)
2154
2593
  * ```
2594
+ * ```js
2595
+ * appEmbed.trigger(HostEvent.ResetSearch)
2596
+ * ```
2155
2597
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
2156
2598
  */
2157
2599
  ResetSearch = 'resetSearch',
2158
2600
  /**
2159
2601
  * @hidden
2160
- * Gets the currents visible and runtime filters applied on a Liveboard
2602
+ * Get the currents visible and runtime filters applied on a Liveboard
2161
2603
  * @example
2162
2604
  * liveboardEmbed.trigger(HostEvent.GetFilters)
2163
2605
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -2165,7 +2607,7 @@ export enum HostEvent {
2165
2607
  GetFilters = 'getFilters',
2166
2608
  /**
2167
2609
  * @hidden
2168
- * Updates the visible filters on the Liveboard.
2610
+ * Update the visible filters on the Liveboard.
2169
2611
  * @param - filter: filter object containing column name and filter operation and values
2170
2612
  * @example
2171
2613
  *
@@ -2178,7 +2620,7 @@ export enum HostEvent {
2178
2620
  */
2179
2621
  UpdateFilters = 'updateFilters',
2180
2622
  /**
2181
- * Get Tab for the current Liveboard.
2623
+ * Get tab details for the current Liveboard.
2182
2624
  *
2183
2625
  * @example
2184
2626
  * ```js
@@ -2192,9 +2634,9 @@ export enum HostEvent {
2192
2634
  */
2193
2635
  GetTabs = 'getTabs',
2194
2636
  /**
2195
- * Set the visible Tabs on a Liveboard.
2637
+ * Set the visible tabs on a Liveboard.
2196
2638
  *
2197
- * @param - an array of ids of Tabs to show, the ids not passed
2639
+ * @param - an array of ids of tabs to show, the IDs not passed
2198
2640
  * will be hidden.
2199
2641
  * @example
2200
2642
  * ```js
@@ -2208,8 +2650,8 @@ export enum HostEvent {
2208
2650
  /**
2209
2651
  * Set the hidden tabs on a Liveboard.
2210
2652
  *
2211
- * @param - an array of ids of Tabs to hide, the ids not passed
2212
- * will be shown.
2653
+ * @param - an array of the IDs of the tabs to hide.
2654
+ * The IDs not passed will be shown.
2213
2655
  * @example
2214
2656
  * ```js
2215
2657
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -2220,9 +2662,10 @@ export enum HostEvent {
2220
2662
  */
2221
2663
  SetHiddenTabs = 'SetPinboardHiddenTabs',
2222
2664
  /**
2223
- * Updates the search query for sage embed.
2665
+ * Updates the search query string for Natural Language Search operations.
2224
2666
  *
2225
- * @param - searchOptions: an object queryString and option to execute the query.
2667
+ * @param - `queryString`: Text string in Natural Language format
2668
+ * @param - `executeSearch`: Boolean to execute search and update search query
2226
2669
  * @example
2227
2670
  * ```js
2228
2671
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -2230,7 +2673,7 @@ export enum HostEvent {
2230
2673
  * executeSearch: true,
2231
2674
  * })
2232
2675
  * ```
2233
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2676
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
2234
2677
  */
2235
2678
  UpdateSageQuery = 'updateSageQuery',
2236
2679
  /**
@@ -2243,26 +2686,27 @@ export enum HostEvent {
2243
2686
  * vizId: '123', // For Liveboard Visualization.
2244
2687
  * })
2245
2688
  * ```
2689
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
2246
2690
  */
2247
2691
  GetAnswerSession = 'getAnswerSession',
2248
2692
  }
2249
2693
 
2250
2694
  /**
2251
2695
  * The different visual modes that the data sources panel within
2252
- * search could appear in, i.e., hidden, collapsed, or expanded.
2696
+ * search could appear in, such as hidden, collapsed, or expanded.
2253
2697
  */
2254
2698
  // eslint-disable-next-line no-shadow
2255
2699
  export enum DataSourceVisualMode {
2256
2700
  /**
2257
- * Data source panel is hidden.
2701
+ * The data source panel is hidden.
2258
2702
  */
2259
2703
  Hidden = 'hide',
2260
2704
  /**
2261
- * Data source panel is collapsed, but the user can manually expand it.
2705
+ * The data source panel is collapsed, but the user can manually expand it.
2262
2706
  */
2263
2707
  Collapsed = 'collapse',
2264
2708
  /**
2265
- * Data source panel is expanded, but the user can manually collapse it.
2709
+ * The data source panel is expanded, but the user can manually collapse it.
2266
2710
  */
2267
2711
  Expanded = 'expand',
2268
2712
  }
@@ -2342,6 +2786,7 @@ export enum Param {
2342
2786
  IsProductTour = 'isProductTour',
2343
2787
  HideSearchBarTitle = 'hideSearchBarTitle',
2344
2788
  HideSageAnswerHeader = 'hideSageAnswerHeader',
2789
+ HideSearchBar = 'hideSearchBar',
2345
2790
  }
2346
2791
 
2347
2792
  /**
@@ -2403,9 +2848,11 @@ export enum Action {
2403
2848
  SaveAsView = 'saveAsView',
2404
2849
  /**
2405
2850
  * The **Make a copy** action on a Liveboard or Answer
2406
- * page.
2407
- * Creates a copy of the Liveboard, visualization,
2408
- * or Answer.
2851
+ * page. Creates a copy of the Liveboard.
2852
+ * In LiveboardEmbed, the **Make a copy** action is not available for
2853
+ * visualizations in the embedded Liveboard view.
2854
+ * In AppEmbed, the **Make a copy** action is available on both
2855
+ * Liveboards and visualizations.
2409
2856
  *
2410
2857
  * @example
2411
2858
  * ```js
@@ -2589,7 +3036,7 @@ export enum Action {
2589
3036
  */
2590
3037
  DownloadAsPdf = 'downloadAsPdf',
2591
3038
  /**
2592
- * The **Download** > **CSV** menu action for tables on a Liveboard
3039
+ * The **Download** > **CSV** menu action for tables on a Liveboard
2593
3040
  * or Answer page.
2594
3041
  * Downloads a visualization or Answer in the XLSX format.
2595
3042
  *
@@ -3121,6 +3568,7 @@ export enum Action {
3121
3568
  */
3122
3569
  RenameModalTitleDescription = 'renameModalTitleDescription',
3123
3570
  /**
3571
+ *
3124
3572
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3125
3573
  */
3126
3574
  RequestVerification = 'requestVerification',