@thoughtspot/visual-embed-sdk 1.26.6 → 1.26.7

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 (263) hide show
  1. package/README.md +2 -2
  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 +16 -9
  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 +4 -3
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/app.spec.js +5 -4
  12. package/cjs/src/embed/app.spec.js.map +1 -1
  13. package/cjs/src/embed/base.d.ts +1 -1
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js +9 -6
  16. package/cjs/src/embed/base.js.map +1 -1
  17. package/cjs/src/embed/base.spec.js +4 -3
  18. package/cjs/src/embed/base.spec.js.map +1 -1
  19. package/cjs/src/embed/embed.spec.js +2 -1
  20. package/cjs/src/embed/embed.spec.js.map +1 -1
  21. package/cjs/src/embed/embedConfig.d.ts +2 -1
  22. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  23. package/cjs/src/embed/embedConfig.js +2 -0
  24. package/cjs/src/embed/embedConfig.js.map +1 -1
  25. package/cjs/src/embed/events.spec.js +3 -2
  26. package/cjs/src/embed/events.spec.js.map +1 -1
  27. package/cjs/src/embed/liveboard.d.ts +35 -23
  28. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  29. package/cjs/src/embed/liveboard.js +8 -4
  30. package/cjs/src/embed/liveboard.js.map +1 -1
  31. package/cjs/src/embed/liveboard.spec.js +2 -1
  32. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  33. package/cjs/src/embed/sage.d.ts +48 -30
  34. package/cjs/src/embed/sage.d.ts.map +1 -1
  35. package/cjs/src/embed/sage.js +7 -6
  36. package/cjs/src/embed/sage.js.map +1 -1
  37. package/cjs/src/embed/sage.spec.js +3 -3
  38. package/cjs/src/embed/sage.spec.js.map +1 -1
  39. package/cjs/src/embed/search-bar.d.ts +22 -6
  40. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  41. package/cjs/src/embed/search-bar.js.map +1 -1
  42. package/cjs/src/embed/search.d.ts +35 -16
  43. package/cjs/src/embed/search.d.ts.map +1 -1
  44. package/cjs/src/embed/search.js +10 -6
  45. package/cjs/src/embed/search.js.map +1 -1
  46. package/cjs/src/embed/search.spec.js +10 -0
  47. package/cjs/src/embed/search.spec.js.map +1 -1
  48. package/cjs/src/embed/ts-embed.d.ts +2 -1
  49. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  50. package/cjs/src/embed/ts-embed.js +45 -22
  51. package/cjs/src/embed/ts-embed.js.map +1 -1
  52. package/cjs/src/embed/ts-embed.spec.js +153 -32
  53. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  54. package/cjs/src/index.d.ts +2 -2
  55. package/cjs/src/index.d.ts.map +1 -1
  56. package/cjs/src/index.js +2 -1
  57. package/cjs/src/index.js.map +1 -1
  58. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  59. package/cjs/src/mixpanel-service.js +2 -1
  60. package/cjs/src/mixpanel-service.js.map +1 -1
  61. package/cjs/src/react/index.d.ts +1 -1
  62. package/cjs/src/react/index.d.ts.map +1 -1
  63. package/cjs/src/react/index.js +2 -1
  64. package/cjs/src/react/index.js.map +1 -1
  65. package/cjs/src/react/index.spec.js +2 -2
  66. package/cjs/src/react/index.spec.js.map +1 -1
  67. package/cjs/src/types.d.ts +742 -237
  68. package/cjs/src/types.d.ts.map +1 -1
  69. package/cjs/src/types.js +653 -169
  70. package/cjs/src/types.js.map +1 -1
  71. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  72. package/cjs/src/utils/authService/authService.js +3 -2
  73. package/cjs/src/utils/authService/authService.js.map +1 -1
  74. package/cjs/src/utils/authService/authService.spec.js +3 -2
  75. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  76. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  77. package/cjs/src/utils/authService/tokenizedAuthService.js +2 -1
  78. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  79. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
  80. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  81. package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
  82. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  83. package/cjs/src/utils/logger.d.ts +18 -0
  84. package/cjs/src/utils/logger.d.ts.map +1 -0
  85. package/cjs/src/utils/logger.js +80 -0
  86. package/cjs/src/utils/logger.js.map +1 -0
  87. package/cjs/src/utils/logger.spec.d.ts +25 -0
  88. package/cjs/src/utils/logger.spec.d.ts.map +1 -0
  89. package/cjs/src/utils/logger.spec.js +116 -0
  90. package/cjs/src/utils/logger.spec.js.map +1 -0
  91. package/cjs/src/utils/processData.d.ts +6 -0
  92. package/cjs/src/utils/processData.d.ts.map +1 -1
  93. package/cjs/src/utils/processData.js +5 -1
  94. package/cjs/src/utils/processData.js.map +1 -1
  95. package/cjs/src/utils/processTrigger.js +1 -1
  96. package/dist/src/auth.d.ts +4 -4
  97. package/dist/src/auth.d.ts.map +1 -1
  98. package/dist/src/embed/app.d.ts +15 -15
  99. package/dist/src/embed/app.d.ts.map +1 -1
  100. package/dist/src/embed/base.d.ts +1 -1
  101. package/dist/src/embed/base.d.ts.map +1 -1
  102. package/dist/src/embed/embedConfig.d.ts +2 -1
  103. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  104. package/dist/src/embed/liveboard.d.ts +35 -23
  105. package/dist/src/embed/liveboard.d.ts.map +1 -1
  106. package/dist/src/embed/sage.d.ts +48 -30
  107. package/dist/src/embed/sage.d.ts.map +1 -1
  108. package/dist/src/embed/search-bar.d.ts +22 -6
  109. package/dist/src/embed/search-bar.d.ts.map +1 -1
  110. package/dist/src/embed/search.d.ts +35 -16
  111. package/dist/src/embed/search.d.ts.map +1 -1
  112. package/dist/src/embed/ts-embed.d.ts +2 -1
  113. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  114. package/dist/src/index.d.ts +2 -2
  115. package/dist/src/index.d.ts.map +1 -1
  116. package/dist/src/mixpanel-service.d.ts.map +1 -1
  117. package/dist/src/react/index.d.ts +1 -1
  118. package/dist/src/react/index.d.ts.map +1 -1
  119. package/dist/src/types.d.ts +742 -237
  120. package/dist/src/types.d.ts.map +1 -1
  121. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  122. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  123. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
  124. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  125. package/dist/src/utils/logger.d.ts +18 -0
  126. package/dist/src/utils/logger.d.ts.map +1 -0
  127. package/dist/src/utils/logger.spec.d.ts +25 -0
  128. package/dist/src/utils/logger.spec.d.ts.map +1 -0
  129. package/dist/src/utils/processData.d.ts +6 -0
  130. package/dist/src/utils/processData.d.ts.map +1 -1
  131. package/dist/tsembed-react.es.js +3716 -3107
  132. package/dist/tsembed-react.js +3620 -3012
  133. package/dist/tsembed.es.js +9830 -9212
  134. package/dist/tsembed.js +15079 -14462
  135. package/dist/visual-embed-sdk-react-full.d.ts +923 -332
  136. package/dist/visual-embed-sdk-react.d.ts +923 -332
  137. package/dist/visual-embed-sdk.d.ts +923 -332
  138. package/lib/package.json +1 -1
  139. package/lib/src/auth.d.ts +4 -4
  140. package/lib/src/auth.d.ts.map +1 -1
  141. package/lib/src/auth.js +17 -10
  142. package/lib/src/auth.js.map +1 -1
  143. package/lib/src/embed/app.d.ts +15 -15
  144. package/lib/src/embed/app.d.ts.map +1 -1
  145. package/lib/src/embed/app.js +4 -3
  146. package/lib/src/embed/app.js.map +1 -1
  147. package/lib/src/embed/app.spec.js +5 -4
  148. package/lib/src/embed/app.spec.js.map +1 -1
  149. package/lib/src/embed/base.d.ts +1 -1
  150. package/lib/src/embed/base.d.ts.map +1 -1
  151. package/lib/src/embed/base.js +9 -6
  152. package/lib/src/embed/base.js.map +1 -1
  153. package/lib/src/embed/base.spec.js +5 -4
  154. package/lib/src/embed/base.spec.js.map +1 -1
  155. package/lib/src/embed/embed.spec.js +2 -1
  156. package/lib/src/embed/embed.spec.js.map +1 -1
  157. package/lib/src/embed/embedConfig.d.ts +2 -1
  158. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  159. package/lib/src/embed/embedConfig.js +2 -0
  160. package/lib/src/embed/embedConfig.js.map +1 -1
  161. package/lib/src/embed/events.spec.js +3 -2
  162. package/lib/src/embed/events.spec.js.map +1 -1
  163. package/lib/src/embed/liveboard.d.ts +35 -23
  164. package/lib/src/embed/liveboard.d.ts.map +1 -1
  165. package/lib/src/embed/liveboard.js +8 -4
  166. package/lib/src/embed/liveboard.js.map +1 -1
  167. package/lib/src/embed/liveboard.spec.js +2 -1
  168. package/lib/src/embed/liveboard.spec.js.map +1 -1
  169. package/lib/src/embed/sage.d.ts +48 -30
  170. package/lib/src/embed/sage.d.ts.map +1 -1
  171. package/lib/src/embed/sage.js +7 -6
  172. package/lib/src/embed/sage.js.map +1 -1
  173. package/lib/src/embed/sage.spec.js +3 -3
  174. package/lib/src/embed/sage.spec.js.map +1 -1
  175. package/lib/src/embed/search-bar.d.ts +22 -6
  176. package/lib/src/embed/search-bar.d.ts.map +1 -1
  177. package/lib/src/embed/search-bar.js.map +1 -1
  178. package/lib/src/embed/search.d.ts +35 -16
  179. package/lib/src/embed/search.d.ts.map +1 -1
  180. package/lib/src/embed/search.js +11 -7
  181. package/lib/src/embed/search.js.map +1 -1
  182. package/lib/src/embed/search.spec.js +10 -0
  183. package/lib/src/embed/search.spec.js.map +1 -1
  184. package/lib/src/embed/ts-embed.d.ts +2 -1
  185. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  186. package/lib/src/embed/ts-embed.js +48 -25
  187. package/lib/src/embed/ts-embed.js.map +1 -1
  188. package/lib/src/embed/ts-embed.spec.js +153 -32
  189. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  190. package/lib/src/index.d.ts +2 -2
  191. package/lib/src/index.d.ts.map +1 -1
  192. package/lib/src/index.js +2 -2
  193. package/lib/src/index.js.map +1 -1
  194. package/lib/src/mixpanel-service.d.ts.map +1 -1
  195. package/lib/src/mixpanel-service.js +2 -1
  196. package/lib/src/mixpanel-service.js.map +1 -1
  197. package/lib/src/react/index.d.ts +1 -1
  198. package/lib/src/react/index.d.ts.map +1 -1
  199. package/lib/src/react/index.js +1 -1
  200. package/lib/src/react/index.js.map +1 -1
  201. package/lib/src/react/index.spec.js +2 -2
  202. package/lib/src/react/index.spec.js.map +1 -1
  203. package/lib/src/types.d.ts +742 -237
  204. package/lib/src/types.d.ts.map +1 -1
  205. package/lib/src/types.js +652 -168
  206. package/lib/src/types.js.map +1 -1
  207. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  208. package/lib/src/utils/authService/authService.js +3 -2
  209. package/lib/src/utils/authService/authService.js.map +1 -1
  210. package/lib/src/utils/authService/authService.spec.js +4 -3
  211. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  212. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  213. package/lib/src/utils/authService/tokenizedAuthService.js +2 -1
  214. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  215. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
  216. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  217. package/lib/src/utils/graphql/answerService/answerService.js +2 -4
  218. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  219. package/lib/src/utils/logger.d.ts +18 -0
  220. package/lib/src/utils/logger.d.ts.map +1 -0
  221. package/lib/src/utils/logger.js +74 -0
  222. package/lib/src/utils/logger.js.map +1 -0
  223. package/lib/src/utils/logger.spec.d.ts +25 -0
  224. package/lib/src/utils/logger.spec.d.ts.map +1 -0
  225. package/lib/src/utils/logger.spec.js +93 -0
  226. package/lib/src/utils/logger.spec.js.map +1 -0
  227. package/lib/src/utils/processData.d.ts +6 -0
  228. package/lib/src/utils/processData.d.ts.map +1 -1
  229. package/lib/src/utils/processData.js +4 -1
  230. package/lib/src/utils/processData.js.map +1 -1
  231. package/lib/src/utils/processTrigger.js +1 -1
  232. package/lib/src/visual-embed-sdk.d.ts +927 -336
  233. package/package.json +1 -1
  234. package/src/auth.ts +20 -13
  235. package/src/embed/app.spec.ts +5 -4
  236. package/src/embed/app.ts +23 -22
  237. package/src/embed/base.spec.ts +6 -5
  238. package/src/embed/base.ts +18 -11
  239. package/src/embed/embed.spec.ts +2 -1
  240. package/src/embed/embedConfig.ts +2 -0
  241. package/src/embed/events.spec.ts +3 -2
  242. package/src/embed/liveboard.spec.ts +2 -1
  243. package/src/embed/liveboard.ts +43 -27
  244. package/src/embed/sage.spec.ts +3 -3
  245. package/src/embed/sage.ts +54 -36
  246. package/src/embed/search-bar.tsx +22 -6
  247. package/src/embed/search.spec.ts +13 -0
  248. package/src/embed/search.ts +46 -21
  249. package/src/embed/ts-embed.spec.ts +182 -43
  250. package/src/embed/ts-embed.ts +78 -59
  251. package/src/index.ts +2 -0
  252. package/src/mixpanel-service.ts +2 -1
  253. package/src/react/index.spec.tsx +2 -2
  254. package/src/react/index.tsx +1 -0
  255. package/src/types.ts +753 -245
  256. package/src/utils/authService/authService.spec.ts +7 -6
  257. package/src/utils/authService/authService.ts +4 -2
  258. package/src/utils/authService/tokenizedAuthService.ts +2 -1
  259. package/src/utils/graphql/answerService/answerService.ts +2 -4
  260. package/src/utils/logger.spec.ts +108 -0
  261. package/src/utils/logger.ts +88 -0
  262. package/src/utils/processData.ts +4 -1
  263. package/src/utils/processTrigger.ts +1 -1
@@ -29,10 +29,14 @@ export declare enum AuthType {
29
29
  */
30
30
  None = "None",
31
31
  /**
32
- * Passthrough SSO to the embedded App within the iframe. Requires least
32
+ * Passthrough SSO to the embedded application within the iframe. Requires least
33
33
  * configuration, but may not be supported by all IDPs. This will behave like `None`
34
34
  * if SSO is not configured on ThoughtSpot.
35
35
  *
36
+ * To use this:
37
+ * Your SAML or OpenID provider must allow iframe redirects.
38
+ * For example, if you are using Okta as IdP, you can enable iframe embedding.
39
+ *
36
40
  * @example
37
41
  * ```js
38
42
  * init({
@@ -40,12 +44,7 @@ export declare enum AuthType {
40
44
  * authType: AuthType.EmbeddedSSO,
41
45
  * });
42
46
  * ```
43
- * Set authentication type as Embedded SSO.
44
- *
45
- * To use this:
46
- * Your SAML or OpenID provider must allow iframe redirects.
47
- * eg. If you are using okta as IdP, you can enable iFrame embedding.
48
- * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
47
+ * @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
49
48
  */
50
49
  EmbeddedSSO = "EmbeddedSSO",
51
50
  /**
@@ -64,10 +63,10 @@ export declare enum AuthType {
64
63
  SAML = "SSO_SAML",
65
64
  /**
66
65
  * SSO using SAML
67
- * Will make the host application redirect to the SAML Idp. Use this
68
- * when the idp does not allow itself to be embedded.
66
+ * Makes the host application redirect to the SAML IdP. Use this
67
+ * if your IdP does not allow itself to be embedded.
69
68
  *
70
- * This redirects the host application to the SAML Idp. The host application
69
+ * This redirects the host application to the SAML IdP. The host application
71
70
  * will be redirected back to the ThoughtSpot app after authentication.
72
71
  *
73
72
  * @example
@@ -78,7 +77,7 @@ export declare enum AuthType {
78
77
  * });
79
78
  * ```
80
79
  *
81
- * This opens the SAML Idp in a popup window. The popup is triggered
80
+ * This opens the SAML IdP in a popup window. The popup is triggered
82
81
  * when the user clicks the trigger button. The popup window will be
83
82
  * closed automatically after authentication.
84
83
  * @example
@@ -92,8 +91,8 @@ export declare enum AuthType {
92
91
  * });
93
92
  * ```
94
93
  *
95
- * Can also use event to trigger the popup flow. Works the same
96
- * as above example.
94
+ * Can also use the event to trigger the popup flow. Works the same
95
+ * as the above example.
97
96
  * @example
98
97
  * ```js
99
98
  * const authEE = init({
@@ -117,7 +116,7 @@ export declare enum AuthType {
117
116
  OIDC = "SSO_OIDC",
118
117
  /**
119
118
  * SSO using OIDC
120
- * Will make the host application redirect to the OIDC Idp.
119
+ * Will make the host application redirect to the OIDC IdP.
121
120
  * See code samples in {@link SAMLRedirect}.
122
121
  */
123
122
  OIDCRedirect = "SSO_OIDC",
@@ -129,8 +128,8 @@ export declare enum AuthType {
129
128
  */
130
129
  AuthServer = "AuthServer",
131
130
  /**
132
- * Trusted authentication server, Use your own authentication server
133
- * which returns a bearer token, generated using the secret_key obtained
131
+ * Trusted authentication server. Use your own authentication server
132
+ * which returns a bearer token, generated using the `secret_key` obtained
134
133
  * from ThoughtSpot.
135
134
  *
136
135
  * @example
@@ -147,11 +146,11 @@ export declare enum AuthType {
147
146
  */
148
147
  TrustedAuthToken = "AuthServer",
149
148
  /**
150
- * Trusted authentication server Cookieless, Use you own authentication
151
- * server which returns a bearer token, generated using the secret_key
149
+ * Trusted authentication server Cookieless, Use your own authentication
150
+ * server which returns a bearer token, generated using the `secret_key`
152
151
  * obtained from ThoughtSpot. This uses a cookieless authentication
153
- * approach, recommended to by pass third-party cookie-blocking restriction
154
- * implemented by some browsers
152
+ * approach, recommended to bypass the third-party cookie-blocking restriction
153
+ * implemented by some browsers.
155
154
  *
156
155
  * @example
157
156
  * ```js
@@ -164,7 +163,7 @@ export declare enum AuthType {
164
163
  * .then((data) => data.token);
165
164
  * }
166
165
  * ```
167
- * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1.sw
166
+ * @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
168
167
  */
169
168
  TrustedAuthTokenCookieless = "AuthServerCookieless",
170
169
  /**
@@ -286,13 +285,19 @@ export interface EmbedConfig {
286
285
  * The ThoughtSpot cluster hostname or IP address.
287
286
  */
288
287
  thoughtSpotHost: string;
288
+ /**
289
+ * If true, all the iframe links will have /v2 added automatically.
290
+ * If false, all the iframe links will have /v1 added automatically.
291
+ * If undefined, nothing will be added
292
+ */
293
+ enableReactShell?: boolean | undefined;
289
294
  /**
290
295
  * The authentication mechanism to use.
291
296
  */
292
297
  authType: AuthType;
293
298
  /**
294
299
  * [AuthServer] The trusted authentication endpoint to use to get the
295
- * authentication token. A GET request is made to the
300
+ * authentication token. A `GET` request is made to the
296
301
  * authentication API endpoint, which returns the token
297
302
  * as a plaintext response. For trusted authentication,
298
303
  * the `authEndpoint` or `getAuthToken` attribute is required.
@@ -305,8 +310,8 @@ export interface EmbedConfig {
305
310
  * attribute is required.
306
311
  *
307
312
  * It is advisable to fetch a new token inside this method and not
308
- * reuse and older issued token, as because when auth expires this is
309
- * called again and if it is called with an older token the authentication
313
+ * reuse the old issued token. When auth expires this method is
314
+ * called again and if it is called with an older token, the authentication
310
315
  * will not succeed.
311
316
  */
312
317
  getAuthToken?: () => Promise<string>;
@@ -316,7 +321,7 @@ export interface EmbedConfig {
316
321
  */
317
322
  username?: string;
318
323
  /**
319
- * [Basic] The ThoughtSpot login password corresponding to the user name
324
+ * [Basic] The ThoughtSpot login password corresponding to the username
320
325
  *
321
326
  * Warning: This feature is primarily intended for developer testing. It is
322
327
  * strongly advised not to use this authentication method in production.
@@ -324,7 +329,7 @@ export interface EmbedConfig {
324
329
  password?: string;
325
330
  /**
326
331
  * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
327
- * open the SAML auth flow in a popup, instead of redirecting browser in
332
+ * open the SAML auth flow in a popup, instead of redirecting the browser in
328
333
  * place.
329
334
  *
330
335
  * @default false
@@ -333,91 +338,93 @@ export interface EmbedConfig {
333
338
  noRedirect?: boolean;
334
339
  /**
335
340
  * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
336
- * the SAML auth flow in a popup, instead of redirecting browser in place.
341
+ * the SAML auth flow in a popup, instead of redirecting the browser in place.
337
342
  *
338
- * Need to use this with authTriggerContainer. Or manually trigger
339
- * the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
343
+ * Need to use this with `authTriggerContainer`. Or manually trigger
344
+ * the `AuthEvent.TRIGGER_SSO_POPUP` event on a user interaction.
340
345
  *
341
346
  * @default false
342
347
  * @version SDK: 1.18.0
343
348
  */
344
349
  inPopup?: boolean;
345
350
  /**
346
- * [SSO] For SSO Authentication, one can supply an optional path param,
347
- * this will be the path on the host origin where the SAML flow will be
351
+ * [SSO] For SSO Authentication, one can supply an optional path param;
352
+ * This will be the path on the host origin where the SAML flow will be
348
353
  * terminated.
349
354
  *
350
355
  * Eg: "/dashboard", "#/foo" [Do not include the host]
351
356
  *
352
- * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1.sw
357
+ * @version SDK: 1.10.2 | ThoughtSpot 8.2.0.cl, 8.4.1.sw
353
358
  */
354
359
  redirectPath?: string;
355
360
  /** @internal */
356
361
  basepath?: string;
357
362
  /**
358
- * Should we encode URL Query Params using base64 encoding which thoughtspot
359
- * will generate for embedding. This provides additional security to
360
- * thoughtspot clusters against Cross site scripting attacks.
363
+ * Boolean to define if the query parameters in the ThoughtSpot URL
364
+ * should be encoded in base64. This provides additional security to
365
+ * Thoughtspot clusters against cross-site scripting attacks.
361
366
  *
362
367
  * @default false
363
368
  */
364
369
  shouldEncodeUrlQueryParams?: boolean;
365
370
  /**
366
- * Suppress cookie access alert when third party cookies are blocked by the
367
- * user's browser. Third party cookie blocking is the default behaviour on
368
- * Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
369
- * encouraged to handle `noCookieAccess` event, to show your own treatment
371
+ * Suppress cookie access alert when third-party cookies are blocked by the
372
+ * user's browser. Third-party cookie blocking is the default behaviour on
373
+ * some web browsers like Safari. If you set this attribute to `true`,
374
+ * you are encouraged to handle `noCookieAccess` event, to show your own treatment
370
375
  * in this case.
371
376
  *
372
377
  * @default false
373
378
  */
374
379
  suppressNoCookieAccessAlert?: boolean;
375
380
  /**
376
- * Ignore cookie access alert when third party cookies are blocked by the
381
+ * Ignore the cookie access alert when third-party cookies are blocked by the
377
382
  * user's browser. If you set this to `true`, the embedded iframe behaviour
378
- * persist even in case of non logged in user.
383
+ * persists even in the case of a non-logged-in user.
379
384
  *
380
385
  * @default false
381
386
  */
382
387
  ignoreNoCookieAccess?: boolean;
383
388
  /**
384
- * Re-login when session expires with the previous login options
389
+ * Re-login a user with the previous login options
390
+ * when a user session expires.
385
391
  *
386
392
  * @default false
387
393
  */
388
394
  autoLogin?: boolean;
389
395
  /**
390
396
  * Disable redirection to the login page when the embedded session expires
391
- * This flag is typically used alongside the combination of auth modes such as {@link
392
- * AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
397
+ * This flag is typically used alongside the combination of authentication modes such
398
+ * as {@link AuthType.AuthServer} and auto-login behavior {@link
399
+ * EmbedConfig.autoLogin}
393
400
  *
394
401
  * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
395
402
  * @default false
396
403
  */
397
404
  disableLoginRedirect?: boolean;
398
405
  /**
399
- * This message is displayed on the embed view when the login fails.
406
+ * This message is displayed in the embedded view when a user login fails.
400
407
  *
401
408
  * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
402
409
  */
403
410
  loginFailedMessage?: string;
404
411
  /**
405
- * Calls the prefetch method internally when set to true
412
+ * Calls the prefetch method internally when set to `true`
406
413
  *
407
414
  * @default false
408
415
  */
409
416
  callPrefetch?: boolean;
410
417
  /**
411
- * When there are multiple embeds, queue the render of embed to start
412
- * after the previous embed's render is complete. This helps in the load
413
- * performance by decreasing the load on the browser.
418
+ * When there are multiple objects embedded, queue the rendering of embedded objects
419
+ * to start after the previous embed's render is complete. This helps improve
420
+ * performance by decreasing the load on the browser.
414
421
  *
415
422
  * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
416
423
  * @default false
417
424
  */
418
425
  queueMultiRenders?: boolean;
419
426
  /**
420
- * Dynamic CSS Url to be injected in the loaded application.
427
+ * Dynamic CSS URL to be injected in the loaded application.
421
428
  * You would also need to set `style-src` in the CSP settings.
422
429
  *
423
430
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -425,9 +432,9 @@ export interface EmbedConfig {
425
432
  */
426
433
  customCssUrl?: string;
427
434
  /**
428
- * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
435
+ * [AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
429
436
  * additional call. This is slower and should be avoided. Listen to the
430
- * NO_COOKIE_ACCESS event to handle the situation.
437
+ * `NO_COOKIE_ACCESS` event to handle the situation.
431
438
  *
432
439
  * This is slightly slower than letting the browser handle the cookie check, as it
433
440
  * involves an extra network call.
@@ -436,26 +443,26 @@ export interface EmbedConfig {
436
443
  */
437
444
  detectCookieAccessSlow?: boolean;
438
445
  /**
439
- * Hide beta alert warning message for SearchEmbed.
446
+ * Hide the `beta` alert warning message for SearchEmbed.
440
447
  *
441
448
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
442
449
  */
443
450
  suppressSearchEmbedBetaWarning?: boolean;
444
451
  /**
445
- * Hide beta alert warning message for SageEmbed.
452
+ * Hide `beta` alert warning message for SageEmbed.
446
453
  *
447
454
  */
448
455
  suppressSageEmbedBetaWarning?: boolean;
449
456
  /**
450
457
  * Custom style params for embed Config.
451
458
  *
452
- * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
459
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
453
460
  */
454
461
  customizations?: CustomisationsInterface;
455
462
  /**
456
- * For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
457
- * click to trigger the flow. This is the containing element
458
- * for that button.
463
+ * For `inPopup` SAMLRedirect or OIDCRedirect authentication, we need a
464
+ * button that the user can click to trigger the flow.
465
+ * This attribute sets a containing element for that button.
459
466
  *
460
467
  * @example
461
468
  * ```js
@@ -465,11 +472,11 @@ export interface EmbedConfig {
465
472
  * authTriggerContainer: '#auth-trigger-container'
466
473
  * })
467
474
  * ```
468
- * @version SDK: 1.17.0 | ThoughtSpot: *
475
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
469
476
  */
470
477
  authTriggerContainer?: string | HTMLElement;
471
478
  /**
472
- * Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
479
+ * Specify that we want to use the `AuthEvent.TRIGGER_SSO_POPUP` event to trigger
473
480
  * SAML popup. This is useful when you want to trigger the popup on a custom user
474
481
  * action.
475
482
  *
@@ -477,20 +484,22 @@ export interface EmbedConfig {
477
484
  useEventForSAMLPopup?: boolean;
478
485
  /**
479
486
  * Text to show in the button which triggers the popup auth flow.
480
- * Default: "Authorize".
487
+ * Default: `Authorize`.
481
488
  *
482
- * @version SDK: 1.17.0 | ThoughtSpot: *
489
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
483
490
  */
484
491
  authTriggerText?: string;
485
492
  /**
486
- * Disable Full App access of Embedded app outside of the iFrame.
493
+ * Prevent users from accessing the full application or ThoughtSpot application pages
494
+ * access to the embedded application users
495
+ * outside of the iframe.
487
496
  *
488
497
  * @default true
489
498
  * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw
490
499
  */
491
500
  blockNonEmbedFullAppAccess?: boolean;
492
501
  /**
493
- * Host config incase embedded app is inside TS app itself
502
+ * Host config in case embedded app is inside TS app itself
494
503
  *
495
504
  * @hidden
496
505
  */
@@ -512,21 +521,35 @@ export interface EmbedConfig {
512
521
  * @version SDK: 1.26.2 | ThoughtSpot: *
513
522
  */
514
523
  suppressErrorAlerts?: boolean;
524
+ /**
525
+ * Log level for the SDK.
526
+ *
527
+ * @default LogLevel.ERROR
528
+ * @example
529
+ * ```js
530
+ * init({
531
+ * ...embedConfig,
532
+ * logLevel: LogLevel.SILENT
533
+ * })
534
+ * ```
535
+ * @version SDK: 1.26.5 | ThoughtSpot: 9.10.0.cl
536
+ */
537
+ logLevel?: LogLevel;
515
538
  }
516
539
  export interface LayoutConfig {
517
540
  }
518
541
  /**
519
- * Embedded iFrame configuration
542
+ * Embedded iframe configuration
520
543
  *
521
544
  * @group Embed components
522
545
  */
523
546
  export interface FrameParams {
524
547
  /**
525
- * The width of the iFrame (unit is pixels if numeric).
548
+ * The width of the iframe (unit is pixels if numeric).
526
549
  */
527
550
  width?: number | string;
528
551
  /**
529
- * The height of the iFrame (unit is pixels if numeric).
552
+ * The height of the iframe (unit is pixels if numeric).
530
553
  */
531
554
  height?: number | string;
532
555
  /**
@@ -627,7 +650,6 @@ export interface ViewConfig {
627
650
  */
628
651
  runtimeParameters?: RuntimeParameter[];
629
652
  /**
630
- /**
631
653
  * The locale/language to use for the embedded view.
632
654
  *
633
655
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
@@ -727,31 +749,30 @@ export interface ViewConfig {
727
749
  */
728
750
  reorderedHomepageModules?: HomepageModule[];
729
751
  /**
730
- * The list of tab IDs to show in the embedded.
731
- * Only this Tabs will be shown in their respective LBs.
732
- * Use this to show an tabID.
752
+ * The list of tab IDs to show in the embedded Liveboard.
753
+ * Only the tabs specified in the array will be shown in the Liveboard.
733
754
  *
734
- * Use either this or hiddenTabs.
755
+ * Use either `visibleTabs` or `hiddenTabs`.
735
756
  *
736
757
  * @example
737
758
  * ```js
738
- * const embed = new LiveboardEmbed('#embed', {
739
- * ... // other liveboard view config
740
- * visibleTabs: [
759
+ * visibleTabs: [
741
760
  * '430496d6-6903-4601-937e-2c691821af3c',
742
- * 'f547ec54-2a37-4516-a222-2b06719af726']
743
- * });
761
+ * 'f547ec54-2a37-4516-a222-2b06719af726']
744
762
  * ```
745
763
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
746
764
  */
747
765
  visibleTabs?: string[];
748
766
  /**
749
- * homepageLeftNavItems : show/hide Homeapage Left Nav Bar Items
750
- * There are 8 home nav list items, we will send those item as list
751
- * which we want to hide for TSE.
752
- * eg: hiddenHomeLeftNavItems = [HomeLeftNavItem.Home] to hide home.
767
+ * homepageLeftNavItems : Show or hide the left navigation bar items.
768
+ * There are 8 eight home navigation list items.
769
+ * To hide these items, specify the string in the array.
753
770
  *
754
- * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
771
+ * ```js
772
+ * hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
773
+ * ```
774
+ *
775
+ * @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
755
776
  */
756
777
  hiddenHomeLeftNavItems?: HomeLeftNavItem[];
757
778
  /**
@@ -767,7 +788,7 @@ export interface ViewConfig {
767
788
  * });
768
789
  * embed.showPreRender();
769
790
  * ```
770
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
791
+ * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
771
792
  */
772
793
  preRenderId?: string;
773
794
  /**
@@ -806,7 +827,7 @@ export type MessagePayload = {
806
827
  status?: string;
807
828
  };
808
829
  /**
809
- * MessageOptions: By Providing options, getting specific event start / end based on
830
+ * MessageOptions: By providing options, getting specific event start / end based on
810
831
  * option
811
832
  *
812
833
  * @group Events
@@ -814,7 +835,7 @@ export type MessagePayload = {
814
835
  export type MessageOptions = {
815
836
  /**
816
837
  * A boolean value indicating that start status events of this type
817
- * will be dispatched
838
+ * will be dispatched.
818
839
  */
819
840
  start?: boolean;
820
841
  };
@@ -834,7 +855,7 @@ responder?: (data: any) => void) => void;
834
855
  */
835
856
  export type MessageCallbackObj = {
836
857
  /**
837
- * options: It contains start, A boolean value indicating that start
858
+ * options: It contains start, a boolean value indicating that start
838
859
  * status events of this type will be dispatched
839
860
  */
840
861
  options: MessageOptions;
@@ -906,7 +927,7 @@ export declare enum RuntimeFilterOp {
906
927
  IN = "IN"
907
928
  }
908
929
  /**
909
- * Home page module that can be hide
930
+ * Home page module that can be hidden
910
931
  */
911
932
  export declare enum HomepageModule {
912
933
  /**
@@ -922,7 +943,7 @@ export declare enum HomepageModule {
922
943
  */
923
944
  Favorite = "FAVORITE",
924
945
  /**
925
- * List of answers and liveboards
946
+ * List of answers and Liveboards
926
947
  */
927
948
  MyLibrary = "MY_LIBRARY",
928
949
  /**
@@ -955,7 +976,7 @@ export interface RuntimeFilter {
955
976
  values: (number | boolean | string)[];
956
977
  }
957
978
  /**
958
- * A filter that can be applied to ThoughtSpot answers, Liveboards, or
979
+ * A filter that can be applied to ThoughtSpot Answers, Liveboards, or
959
980
  * visualizations at runtime.
960
981
  */
961
982
  export interface RuntimeParameter {
@@ -992,12 +1013,26 @@ export declare enum EmbedEvent {
992
1013
  /**
993
1014
  * Rendering has initialized.
994
1015
  *
1016
+ * @example
1017
+ *```js
1018
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
1019
+ * //show a loader
1020
+ * function showLoader() {
1021
+ * document.getElementById("loader");
1022
+ * }
1023
+ *```
995
1024
  * @returns timestamp - The timestamp when the event was generated.
996
1025
  */
997
1026
  Init = "init",
998
1027
  /**
999
1028
  * Authentication has either succeeded or failed.
1000
1029
  *
1030
+ * @example
1031
+ *```js
1032
+ * appEmbed.on(EmbedEvent.AuthInit, payload => {
1033
+ * console.log('AuthInit', payload);
1034
+ * })
1035
+ *```
1001
1036
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
1002
1037
  */
1003
1038
  AuthInit = "authInit",
@@ -1005,37 +1040,91 @@ export declare enum EmbedEvent {
1005
1040
  * The embed object container has loaded.
1006
1041
  *
1007
1042
  * @returns timestamp - The timestamp when the event was generated.
1043
+ * @example
1044
+ *```js
1045
+ * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
1046
+ * //hide loader
1047
+ * function hideLoader() {
1048
+ * document.getElementById("loader");
1049
+ * }
1050
+ *```
1008
1051
  */
1009
1052
  Load = "load",
1010
1053
  /**
1011
1054
  * Data pertaining to answer or Liveboard is received
1012
1055
  *
1013
1056
  * @return data - The answer or Liveboard data
1057
+ * @example
1058
+ *```js
1059
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
1060
+ * console.log('data', payload);
1061
+ * })
1062
+ *```
1014
1063
  * @important
1015
1064
  */
1016
1065
  Data = "data",
1017
1066
  /**
1018
- * Search/answer/Liveboard filters have been applied/updated by the user.
1067
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
1019
1068
  *
1020
1069
  * @hidden
1021
1070
  */
1022
1071
  FiltersChanged = "filtersChanged",
1023
1072
  /**
1024
1073
  * Search query has been updated by the user.
1074
+ *
1075
+ * @example
1076
+ *```js
1077
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
1078
+ *```
1025
1079
  */
1026
1080
  QueryChanged = "queryChanged",
1027
1081
  /**
1028
- * A drill down operation has been performed.
1082
+ * A drill-down operation has been performed.
1029
1083
  *
1030
1084
  * @returns additionalFilters - Any additional filters applied
1031
1085
  * @returns drillDownColumns - The columns on which drill down was performed
1032
1086
  * @returns nonFilteredColumns - The columns that were not filtered
1087
+ * @example
1088
+ *```js
1089
+ * searchEmbed.trigger(HostEvent.DrillDown, {
1090
+ * points: {
1091
+ * clickedPoint,
1092
+ * selectedPoints: selectedPoint
1093
+ * },
1094
+ * autoDrillDown: true,
1095
+ * })
1096
+ *```
1097
+ * In this example, `VizPointDoubleClick` event is used for
1098
+ * triggering the `DrillDown` event when an area or specific
1099
+ * data point on a table or chart is double-clicked.
1100
+ * @example
1101
+ *```js
1102
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1103
+ * console.log(payload);
1104
+ * const clickedPoint = payload.data.clickedPoint;
1105
+ * const selectedPoint = payload.data.selectedPoints;
1106
+ * console.log('>>> called', clickedPoint);
1107
+ * embed.trigger(HostEvent.DrillDown, {
1108
+ * points: {
1109
+ * clickedPoint,
1110
+ * selectedPoints: selectedPoint
1111
+ * },
1112
+ * autoDrillDown: true,
1113
+ * })
1114
+ * })
1115
+ *```
1033
1116
  */
1034
1117
  Drilldown = "drillDown",
1035
1118
  /**
1036
1119
  * One or more data sources have been selected.
1037
1120
  *
1038
1121
  * @returns dataSourceIds - the list of data sources
1122
+ * @example
1123
+ * ```js
1124
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
1125
+ * console.log('DataSourceSelected', payload);
1126
+ * })
1127
+ * ```
1039
1128
  */
1040
1129
  DataSourceSelected = "dataSourceSelected",
1041
1130
  /**
@@ -1043,25 +1132,49 @@ export declare enum EmbedEvent {
1043
1132
  *
1044
1133
  * @returns columnIds - the list of columns
1045
1134
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1135
+ * @example
1136
+ * ```js
1137
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
1138
+ * console.log('AddRemoveColumns', payload);
1139
+ * })
1140
+ * ```
1046
1141
  */
1047
1142
  AddRemoveColumns = "addRemoveColumns",
1048
1143
  /**
1049
- * A custom action has been triggered
1144
+ * A custom action has been triggered.
1050
1145
  *
1051
- * @returns actionId - The id of the custom action
1052
- * @returns data - The answer or Liveboard data
1146
+ * @returns actionId - ID of the custom action
1147
+ * @returns data - Response payload with the Answer or Liveboard data
1148
+ * @example
1149
+ * ```js
1150
+ * appEmbed.on(EmbedEvent.customAction, payload => {
1151
+ * const data = payload.data;
1152
+ * if (data.id === 'insert Custom Action ID here') {
1153
+ * console.log('Custom Action event:', data.embedAnswerData);
1154
+ * }
1155
+ * })
1156
+ * ```
1053
1157
  */
1054
1158
  CustomAction = "customAction",
1055
1159
  /**
1056
- * Listen to double clicks on a visualization
1160
+ * Listen to double click actions on a visualization.
1057
1161
  *
1058
- * @return ContextMenuInputPoints - data point that is double clicked
1162
+ * @return ContextMenuInputPoints - Data point that is double-clicked
1059
1163
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1164
+ * @example
1165
+ * ```js
1166
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
1167
+ * console.log('VizPointDoubleClick', payload)
1168
+ * })
1169
+ * ```
1060
1170
  */
1061
1171
  VizPointDoubleClick = "vizPointDoubleClick",
1062
1172
  /**
1063
- * Listen to clicks on a visualization in a liveboard or Search result.
1173
+ * Listen to clicks on a visualization in a Liveboard or Search result.
1064
1174
  *
1175
+ * @return viz, clickedPoint - metadata about the point that is clicked
1176
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1177
+ * @important
1065
1178
  * @example
1066
1179
  * ```js
1067
1180
  * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
@@ -1074,25 +1187,42 @@ export declare enum EmbedEvent {
1074
1187
  * )
1075
1188
  * });
1076
1189
  * ```
1077
- * @return viz, clickedPoint - metadata about point that is clicked
1078
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1079
- * @important
1080
1190
  */
1081
1191
  VizPointClick = "vizPointClick",
1082
1192
  /**
1083
1193
  * An error has occurred.
1084
1194
  *
1085
1195
  * @returns error - An error object or message
1196
+ * @example
1197
+ * ```js
1198
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
1199
+ * //show error messaage
1200
+ * function showErrorMsg() {
1201
+ * document.getElementById("error");
1202
+ * ```
1086
1203
  */
1087
1204
  Error = "Error",
1088
1205
  /**
1089
- * The embedded object has sent an alert
1206
+ * The embedded object has sent an alert.
1090
1207
  *
1091
1208
  * @returns alert - An alert object
1209
+ * @example
1210
+ * ```js
1211
+ * searchEmbed.on(EmbedEvent.Alert)
1212
+ * ```
1092
1213
  */
1093
1214
  Alert = "alert",
1094
1215
  /**
1095
1216
  * The ThoughtSpot auth session has expired.
1217
+ *
1218
+ * @example
1219
+ *```js
1220
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
1221
+ * //show auth expired banner
1222
+ * function showAuthExpired() {
1223
+ * document.getElementById("authExpiredBanner");
1224
+ * }
1225
+ *```
1096
1226
  */
1097
1227
  AuthExpire = "ThoughtspotAuthExpired",
1098
1228
  /**
@@ -1122,14 +1252,27 @@ export declare enum EmbedEvent {
1122
1252
  */
1123
1253
  EmbedIframeCenter = "EmbedIframeCenter",
1124
1254
  /**
1125
- * Emitted when the "Get Data" button in Search Bar embed
1126
- * is clicked.
1255
+ * Emitted when the **Get Data** action is initiated.
1256
+ * Applicable to `SearchBarEmbed` only.
1127
1257
  *
1128
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
1258
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1259
+ * @example
1260
+ *```js
1261
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
1262
+ * .then(data => {
1263
+ * console.log('Answer Data:', data);
1264
+ * })
1265
+ *```
1129
1266
  */
1130
1267
  GetDataClick = "getDataClick",
1131
1268
  /**
1132
1269
  * Detects the route change.
1270
+ *
1271
+ * @example
1272
+ *```js
1273
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
1274
+ * console.log('data', payload))
1275
+ *```
1133
1276
  */
1134
1277
  RouteChange = "ROUTE_CHANGE",
1135
1278
  /**
@@ -1139,10 +1282,15 @@ export declare enum EmbedEvent {
1139
1282
  */
1140
1283
  V1Data = "exportVizDataToParent",
1141
1284
  /**
1142
- * Emitted when the embed does not have cookie access. This
1143
- * happens on Safari where third-party cookies are blocked by default.
1285
+ * Emitted when the embed does not have cookie access. This happens
1286
+ * when Safari and other Web browsers block third-party cookies
1287
+ * are blocked by default. `NoCookieAccess` can trigger
1144
1288
  *
1145
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1289
+ * @example
1290
+ *```js
1291
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
1292
+ *```
1293
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
1146
1294
  */
1147
1295
  NoCookieAccess = "noCookieAccess",
1148
1296
  /**
@@ -1156,12 +1304,24 @@ export declare enum EmbedEvent {
1156
1304
  * Emitted when any modal is opened in the app
1157
1305
  *
1158
1306
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1307
+ * @example
1308
+ *```js
1309
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
1310
+ * console.log('dialog open', payload);
1311
+ * })
1312
+ *```
1159
1313
  */
1160
1314
  DialogOpen = "dialog-open",
1161
1315
  /**
1162
1316
  * Emitted when any modal is closed in the app
1163
1317
  *
1164
1318
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
1319
+ * @example
1320
+ *```js
1321
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
1322
+ * console.log('dialog close', payload);
1323
+ * })
1324
+ *```
1165
1325
  */
1166
1326
  DialogClose = "dialog-close",
1167
1327
  /**
@@ -1170,6 +1330,21 @@ export declare enum EmbedEvent {
1170
1330
  * other events on the rendered Liveboard.
1171
1331
  *
1172
1332
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1333
+ * @example
1334
+ *```js
1335
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
1336
+ console.log('Liveboard is rendered', payload);
1337
+ })
1338
+ *```
1339
+ * The following example shows how to trigger
1340
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
1341
+ * @example
1342
+ *```js
1343
+ * const embedRef = useEmbedRef();
1344
+ * const onLiveboardRendered = () => {
1345
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
1346
+ * };
1347
+ *```
1173
1348
  */
1174
1349
  LiveboardRendered = "PinboardRendered",
1175
1350
  /**
@@ -1177,216 +1352,470 @@ export declare enum EmbedEvent {
1177
1352
  * is triggered on all events.
1178
1353
  *
1179
1354
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1355
+ * @example
1356
+ *```js
1357
+ * appEmbed.on(EmbedEvent.ALL, payload => {
1358
+ * console.log('Embed Events', payload)
1359
+ * })
1360
+ *```
1180
1361
  */
1181
1362
  ALL = "*",
1182
1363
  /**
1183
1364
  * Emitted when an Answer is saved in the app
1184
1365
  *
1185
1366
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1367
+ * @example
1368
+ *```js
1369
+ * //trigger when action starts
1370
+ * searchEmbed.on(EmbedEvent.Save, payload => {
1371
+ * console.log('Save', payload)
1372
+ * }, {
1373
+ * start: true
1374
+ * })
1375
+ * //trigger when action ends
1376
+ * searchEmbed.on(EmbedEvent.Save, payload => {
1377
+ * console.log('Save', payload)
1378
+ * })
1379
+ *```
1186
1380
  */
1187
1381
  Save = "save",
1188
1382
  /**
1189
1383
  * Emitted when the download action is triggered on an answer
1190
1384
  *
1385
+ * **Note**: This event is deprecated in v1.21.0.
1386
+ * To fire an event when a download action is initiated on a chart or table,
1387
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
1388
+ * or `EmbedEvent.DownloadAsXLSX`
1389
+ *
1191
1390
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1391
+ * @example
1392
+ *```js
1393
+ * liveboardEmbed.trigger(HostEvent.Download, {
1394
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1395
+ * })
1396
+ *```
1192
1397
  */
1193
1398
  Download = "download",
1194
1399
  /**
1195
1400
  * Emitted when the download action is triggered on an answer
1196
1401
  *
1197
1402
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
1403
+ * @example
1404
+ *```js
1405
+ * //trigger when action starts
1406
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1407
+ * console.log('download PNG', payload)}, {start: true })
1408
+ * //trigger when action ends
1409
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
1410
+ * console.log('download PNG', payload)})
1411
+ *```
1198
1412
  */
1199
1413
  DownloadAsPng = "downloadAsPng",
1200
1414
  /**
1201
1415
  * Emitted when the Download as PDF action is triggered on an answer
1202
1416
  *
1203
1417
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1418
+ * @example
1419
+ *```js
1420
+ * //trigger when action starts
1421
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1422
+ * console.log('download PDF', payload)}, {start: true })
1423
+ * //trigger when action ends
1424
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
1425
+ * console.log('download PDF', payload)})
1426
+ *```
1204
1427
  */
1205
1428
  DownloadAsPdf = "downloadAsPdf",
1206
1429
  /**
1207
1430
  * Emitted when the Download as CSV action is triggered on an answer
1208
1431
  *
1209
1432
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1433
+ * @example
1434
+ *```js
1435
+ * //trigger when action starts
1436
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1437
+ * console.log('download CSV', payload)}, {start: true })
1438
+ * //trigger when action ends
1439
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
1440
+ * console.log('download CSV', payload)})
1441
+ *```
1210
1442
  */
1211
1443
  DownloadAsCsv = "downloadAsCsv",
1212
1444
  /**
1213
1445
  * Emitted when the Download as XLSX action is triggered on an answer
1214
1446
  *
1215
1447
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1448
+ * @example
1449
+ *```js
1450
+ * //trigger when action starts
1451
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1452
+ * console.log('download Xlsx', payload)}, { start: true })
1453
+ * //trigger when action ends
1454
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
1455
+ * console.log('download Xlsx', payload)})
1456
+ *```
1216
1457
  */
1217
1458
  DownloadAsXlsx = "downloadAsXlsx",
1218
1459
  /**
1219
- * Emitted when an answer is deleted in the app
1460
+ * Emitted when an Answer is deleted in the app
1220
1461
  *
1221
1462
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1463
+ * @example
1464
+ *```js
1465
+ * //trigger when action starts
1466
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1467
+ * console.log('delete answer', payload)}, {start: true })
1468
+ * //trigger when action is completed
1469
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
1470
+ * console.log('delete answer', payload)})
1471
+ *```
1222
1472
  */
1223
1473
  AnswerDelete = "answerDelete",
1224
1474
  /**
1225
1475
  * Emitted when an answer is pinned to a Liveboard
1226
1476
  *
1227
1477
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1478
+ * @example
1479
+ *```js
1480
+ * //trigger when action starts
1481
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
1482
+ * console.log('pin', payload)
1483
+ * }, {
1484
+ * start: true
1485
+ * })
1486
+ * //trigger when action ends
1487
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
1488
+ * console.log('pin', payload)
1489
+ * })
1490
+ *```
1228
1491
  */
1229
1492
  Pin = "pin",
1230
1493
  /**
1231
1494
  * Emitted when SpotIQ analysis is triggered
1232
1495
  *
1233
1496
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1497
+ * @example
1498
+ *```js
1499
+ * //trigger when action starts
1500
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1501
+ * console.log('SpotIQAnalyze', payload)
1502
+ * }, {
1503
+ * start: true
1504
+ * })
1505
+ * //trigger when action ends
1506
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
1507
+ * console.log('SpotIQ analyze', payload)
1508
+ * })
1509
+ *```
1234
1510
  */
1235
1511
  SpotIQAnalyze = "spotIQAnalyze",
1236
1512
  /**
1237
1513
  * Emitted when a user shares an object with another user or group
1238
1514
  *
1239
1515
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1516
+ * @example
1517
+ *```js
1518
+ * //trigger when action starts
1519
+ * searchEmbed.on(EmbedEvent.Share, payload => {
1520
+ * console.log('Share', payload)
1521
+ * }, {
1522
+ * start: true
1523
+ * })
1524
+ * //trigger when action ends
1525
+ * searchEmbed.on(EmbedEvent.Share, payload => {
1526
+ * console.log('Share', payload)
1527
+ * })
1528
+ *```
1240
1529
  */
1241
1530
  Share = "share",
1242
1531
  /**
1243
- * Emitted when a user clicks the Include action to include a specific value or data
1244
- * on a chart or table
1532
+ * Emitted when a user clicks the **Include** action to include a specific value or
1533
+ * data on a chart or table.
1245
1534
  *
1246
1535
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1536
+ * @example
1537
+ *```js
1538
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
1539
+ * console.log('Drill include', payload);
1540
+ * })
1541
+ *```
1247
1542
  */
1248
1543
  DrillInclude = "context-menu-item-include",
1249
1544
  /**
1250
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
1251
- * on a chart or table
1545
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
1546
+ * data on a chart or table
1252
1547
  *
1253
1548
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1549
+ * @example
1550
+ *```js
1551
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
1552
+ * console.log('Drill exclude', payload);
1553
+ * })
1554
+ *```
1254
1555
  */
1255
1556
  DrillExclude = "context-menu-item-exclude",
1256
1557
  /**
1257
- * Emitted when copied column value on the app
1558
+ * Emitted when a column value is copied in the embedded app.
1258
1559
  *
1259
1560
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1561
+ * @example
1562
+ *```js
1563
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
1564
+ * console.log('copy to clipboard', payload);
1565
+ * })
1566
+ *```
1260
1567
  */
1261
1568
  CopyToClipboard = "context-menu-item-copy-to-clipboard",
1262
1569
  /**
1263
- * Emitted when a user clicks the Update TML action
1570
+ * Emitted when a user clicks the **Update TML** action
1264
1571
  *
1265
1572
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1573
+ * @example
1574
+ *```js
1575
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
1576
+ * })
1577
+ *```
1266
1578
  */
1267
1579
  UpdateTML = "updateTSL",
1268
1580
  /**
1269
- * Emitted when a user clicks the Edit TML action
1581
+ * Emitted when a user clicks the **Edit TML** action
1270
1582
  *
1271
1583
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1584
+ * @example
1585
+ *```js
1586
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
1587
+ * console.log('Edit TML', payload);
1588
+ * })
1589
+ *```
1272
1590
  */
1273
1591
  EditTML = "editTSL",
1274
1592
  /**
1275
- * Emitted when ExportTML trigger in answer on the app
1593
+ * Emitted when the **Export TML** action is triggered on an
1594
+ * an embedded object in the app
1276
1595
  *
1277
1596
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1597
+ * @example
1598
+ *```js
1599
+ * //trigger when action starts
1600
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1601
+ * console.log('Export TML', payload)}, { start: true })
1602
+ * //trigger when action ends
1603
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
1604
+ * console.log('Export TML', payload)})
1605
+ *```
1278
1606
  */
1279
1607
  ExportTML = "exportTSL",
1280
1608
  /**
1281
- * Emitted when an answer is saved as a view
1609
+ * Emitted when an Answer is saved as a View.
1282
1610
  *
1283
1611
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1612
+ * @example
1613
+ *```js
1614
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
1615
+ * console.log('View', payload);
1616
+ * })
1617
+ *```
1284
1618
  */
1285
1619
  SaveAsView = "saveAsView",
1286
1620
  /**
1287
- * Emitted when copy of existing answer on the app
1621
+ * Emitted when the user creates a copy of an Answer
1288
1622
  *
1289
1623
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1624
+ * @example
1625
+ *```js
1626
+ * //trigger when action starts
1627
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1628
+ * console.log('Copy and edit', payload)}, {start: true })
1629
+ * //trigger when action ends
1630
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
1631
+ * console.log('Copy and edit', payload)})
1632
+ *```
1290
1633
  */
1291
1634
  CopyAEdit = "copyAEdit",
1292
1635
  /**
1293
- * Emitted when a user clicks Show underlying data on an answe
1636
+ * Emitted when a user clicks Show underlying data on an Answer
1294
1637
  *
1295
1638
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1639
+ * @example
1640
+ *```js
1641
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
1642
+ * console.log('show data', payload);
1643
+ * })
1644
+ *```
1296
1645
  */
1297
1646
  ShowUnderlyingData = "showUnderlyingData",
1298
1647
  /**
1299
- * Emitted when an answer is switched to a chart or table view
1648
+ * Emitted when an answer is switched to a chart or table view.
1300
1649
  *
1301
1650
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1651
+ * @example
1652
+ *```js
1653
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1654
+ * console.log('switch view', payload);
1655
+ * })
1656
+ *```
1302
1657
  */
1303
1658
  AnswerChartSwitcher = "answerChartSwitcher",
1304
1659
  /**
1305
- * Internal event to communicate the initial settings back to the TS APP
1660
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
1306
1661
  *
1307
1662
  * @hidden
1308
1663
  */
1309
1664
  APP_INIT = "appInit",
1310
1665
  /**
1311
- * Emitted when a user clicks Show Liveboard details on a Liveboard
1666
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
1312
1667
  *
1313
1668
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1669
+ * @example
1670
+ *```js
1671
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
1672
+ * console.log('Liveboard details', payload);
1673
+ * })
1674
+ *```
1314
1675
  */
1315
1676
  LiveboardInfo = "pinboardInfo",
1316
1677
  /**
1317
1678
  * Emitted when a user clicks on the Favorite icon on a Liveboard
1318
1679
  *
1319
1680
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1681
+ * @example
1682
+ *```js
1683
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
1684
+ * console.log('favorites', payload);
1685
+ * })
1686
+ *```
1320
1687
  */
1321
1688
  AddToFavorites = "addToFavorites",
1322
1689
  /**
1323
- * Emitted when a user clicks Schedule on a Liveboard
1690
+ * Emitted when a user clicks **Schedule** on a Liveboard
1324
1691
  *
1325
1692
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1693
+ * @example
1694
+ *```js
1695
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
1696
+ * console.log(`Liveboard schedule', payload);
1697
+ * })
1698
+ *```
1326
1699
  */
1327
1700
  Schedule = "subscription",
1328
1701
  /**
1329
- * Emitted when a user clicks Edit on a Liveboard or visualization
1702
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
1330
1703
  *
1331
1704
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1705
+ * @example
1706
+ *```js
1707
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
1708
+ * console.log(`Liveboard edit', payload);
1709
+ * })
1710
+ *```
1332
1711
  */
1333
1712
  Edit = "edit",
1334
1713
  /**
1335
- * Emitted when a user clicks Make a copy on a Liveboard
1714
+ * Emitted when a user clicks *Make a copy* on a Liveboard
1336
1715
  *
1337
1716
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1717
+ * @example
1718
+ *```js
1719
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
1720
+ * console.log(`Copy', payload);
1721
+ * })
1722
+ *```
1338
1723
  */
1339
1724
  MakeACopy = "makeACopy",
1340
1725
  /**
1341
- * Emitted when a user clicks Present on a Liveboard or visualization
1726
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
1342
1727
  *
1343
1728
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1729
+ * @example
1730
+ *```js
1731
+ * liveboardEmbed.trigger(HostEvent.Present)
1732
+ *```
1733
+ * @example
1734
+ *```js
1735
+ * liveboardEmbed.on(EmbedEvent.Present, {
1736
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1737
+ * })
1738
+ *```
1344
1739
  */
1345
1740
  Present = "present",
1346
1741
  /**
1347
- * Emitted when a user clicks Delete on a Liveboard
1742
+ * Emitted when a user clicks **Delete** on a visualization
1348
1743
  *
1349
1744
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1745
+ * @example
1746
+ *```js
1747
+ * liveboardEmbed.trigger(HostEvent.Delete,
1748
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1749
+ *```
1350
1750
  */
1351
1751
  Delete = "delete",
1352
1752
  /**
1353
1753
  * Emitted when a user clicks Manage schedules on a Liveboard
1354
1754
  *
1355
1755
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1756
+ * @example
1757
+ *```js
1758
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
1759
+ *```
1356
1760
  */
1357
1761
  SchedulesList = "schedule-list",
1358
1762
  /**
1359
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
1763
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
1360
1764
  *
1361
1765
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1766
+ * @example
1767
+ *```js
1768
+ * liveboardEmbed.trigger(HostEvent.Cancel)
1769
+ *```
1362
1770
  */
1363
1771
  Cancel = "cancel",
1364
1772
  /**
1365
- * Emitted when a user clicks Explore on a visualization
1773
+ * Emitted when a user clicks **Explore** on a visualization
1366
1774
  *
1367
1775
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1776
+ * @example
1777
+ *```js
1778
+ * liveboardEmbed.trigger(HostEvent.Explore, {
1779
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1780
+ *```
1368
1781
  */
1369
1782
  Explore = "explore",
1370
1783
  /**
1371
- * Emitted when a user clicks Copy link action on a visualization
1784
+ * Emitted when a user clicks **Copy link** action on a visualization
1372
1785
  *
1373
1786
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1787
+ * @example
1788
+ *```js
1789
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
1790
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1791
+ *```
1374
1792
  */
1375
1793
  CopyLink = "embedDocument",
1376
1794
  /**
1377
- * Emitted when a user interacts with cross filters on a visualization or liveboard
1795
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
1378
1796
  *
1379
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1797
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1798
+ * @example
1799
+ *```js
1800
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
1801
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1802
+ *```
1380
1803
  */
1381
1804
  CrossFilterChanged = "cross-filter-changed",
1382
1805
  /**
1383
1806
  * Emitted when a user right clicks on a visualization (chart or table)
1384
1807
  *
1385
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1808
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1809
+ * @example
1810
+ *```js
1811
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
1812
+ * console.log('VizPointClick', payload)
1813
+ * })
1814
+ *```
1386
1815
  */
1387
1816
  VizPointRightClick = "vizPointRightClick",
1388
1817
  /**
1389
- * Emitted when a user clicks on Insert to slide on a visualization
1818
+ * Emitted when a user clicks **Insert to slide** on a visualization
1390
1819
  *
1391
1820
  * @hidden
1392
1821
  */
@@ -1394,52 +1823,52 @@ export declare enum EmbedEvent {
1394
1823
  /**
1395
1824
  * @hidden
1396
1825
  * Emitted when a user changes any filter on a Liveboard.
1397
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1826
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
1398
1827
  */
1399
1828
  FilterChanged = "filterChanged",
1400
1829
  /**
1401
- * Emitted when a user click on Go button in Sage Embed
1830
+ * Emitted when a user clicks the **Go** button on the Search page
1402
1831
  *
1403
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1832
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1404
1833
  */
1405
1834
  SageEmbedQuery = "sageEmbedQuery",
1406
1835
  /**
1407
- * Emitten when a user select data source in Sage Embed
1836
+ * Emitted when a user selects a data source.
1408
1837
  *
1409
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1838
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1410
1839
  */
1411
1840
  SageWorksheetUpdated = "sageWorksheetUpdated",
1412
1841
  /**
1413
- * Emitted when a user updates a connection in Data tab
1842
+ * Emitted when a user updates a connection on the **Data** page
1414
1843
  *
1415
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1844
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1416
1845
  */
1417
1846
  UpdateConnection = "updateConnection",
1418
1847
  /**
1419
- * Emitted when a user updates a connection in Data tab
1848
+ * Emitted when a user updates a connection on the **Data** page
1420
1849
  *
1421
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1850
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1422
1851
  */
1423
1852
  CreateConnection = "createConnection",
1424
1853
  /**
1425
1854
  * Emitted when name, status (private or public) or filter values of a
1426
- * PersonalisedView is updated.
1855
+ * Personalised view is updated.
1427
1856
  *
1428
1857
  * @returns viewName: string
1429
1858
  * @returns viewId: string
1430
1859
  * @returns liveboardId: string
1431
1860
  * @returns isPublic: boolean
1432
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1861
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1433
1862
  */
1434
1863
  UpdatePersonalisedView = "updatePersonalisedView",
1435
1864
  /**
1436
- * Emitted when a PersonalisedView is saved.
1865
+ * Emitted when a Personalised view is saved.
1437
1866
  *
1438
1867
  * @returns viewName: string
1439
1868
  * @returns viewId: string
1440
1869
  * @returns liveboardId: string
1441
1870
  * @returns isPublic: boolean
1442
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1871
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1443
1872
  */
1444
1873
  SavePersonalisedView = "savePersonalisedView",
1445
1874
  /**
@@ -1449,7 +1878,7 @@ export declare enum EmbedEvent {
1449
1878
  * @returns viewId: string
1450
1879
  * @returns liveboardId: string
1451
1880
  * @returns isPublic: boolean
1452
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1881
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1453
1882
  */
1454
1883
  ResetLiveboard = "resetLiveboard",
1455
1884
  /**
@@ -1457,20 +1886,30 @@ export declare enum EmbedEvent {
1457
1886
  *
1458
1887
  * @returns views: string[]
1459
1888
  * @returns liveboardId: string
1460
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1889
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
1461
1890
  */
1462
1891
  DeletePersonalisedView = "deletePersonalisedView",
1463
1892
  /**
1464
- * Emitten when a user creates a new worksheet
1893
+ * Emitted when a user creates a new worksheet
1465
1894
  *
1466
1895
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1467
1896
  */
1468
1897
  CreateWorksheet = "createWorksheet",
1469
1898
  /**
1470
- * Emitted when a LB/viz is renamed
1471
- *
1472
- * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
1473
- */
1899
+ * Emitted when Ask Sage is initialized.
1900
+ *
1901
+ * @returns viewName: string
1902
+ * @returns viewId: string
1903
+ * @returns liveboardId: string
1904
+ * @returns isPublic: boolean
1905
+ * @version SDK : 1.29.0 | Thoughtspot: 9.12.0.cl
1906
+ */
1907
+ AskSageInit = "AskSageInit",
1908
+ /**
1909
+ * Emitted when a LB/viz is renamed
1910
+ *
1911
+ * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
1912
+ */
1474
1913
  Rename = "rename"
1475
1914
  }
1476
1915
  /**
@@ -1497,15 +1936,16 @@ export declare enum EmbedEvent {
1497
1936
  */
1498
1937
  export declare enum HostEvent {
1499
1938
  /**
1500
- * Triggers a search query in AppEmbed and SearchEmbed
1501
- * deployments.
1939
+ * Triggers a search operation with the search tokens specified in
1940
+ * the search query string.
1941
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
1502
1942
  * Includes the following properties:
1503
1943
  *
1504
- * @param - dataSourceIds - The data source GUID to Search on
1944
+ * @param - `searchQuery` - query string with search tokens
1945
+ * @param - `dataSources` - Data source GUID to Search on
1505
1946
  * - Although an array, only a single source
1506
1947
  * is supported.
1507
- * @param - searchQuery - Query string with search tokens
1508
- * @param - execute - executes the existing / updated query
1948
+ * @param - `execute` - executes search and updates the existing query
1509
1949
  * @example
1510
1950
  * ```js
1511
1951
  * searchembed.trigger(HostEvent.Search, {
@@ -1525,6 +1965,10 @@ export declare enum HostEvent {
1525
1965
  * @param - columnGuid - Optional. GUID of the column to drill
1526
1966
  * by. If not provided it will auto drill by the configured
1527
1967
  * column.
1968
+ * @param - autoDrillDown - Optional. If true, the drill down will be
1969
+ * done automatically on the most popular column.
1970
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
1971
+ * in case of a liveboard.
1528
1972
  * @example
1529
1973
  * ```js
1530
1974
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -1541,6 +1985,25 @@ export declare enum HostEvent {
1541
1985
  * });
1542
1986
  * })
1543
1987
  * ```
1988
+ * @example
1989
+ * ```js
1990
+ * // Works with TS 9.8.0 and above
1991
+ *
1992
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1993
+ * console.log(payload);
1994
+ * const clickedPoint = payload.data.clickedPoint;
1995
+ * const selectedPoint = payload.data.selectedPoints;
1996
+ * console.log('>>> called', clickedPoint);
1997
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
1998
+ * points: {
1999
+ * clickedPoint,
2000
+ * selectedPoints: selectedPoint
2001
+ * },
2002
+ * autoDrillDown: true,
2003
+ * vizId: payload.data.vizId
2004
+ * });
2005
+ * })
2006
+ * ```
1544
2007
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1545
2008
  */
1546
2009
  DrillDown = "triggerDrillDown",
@@ -1557,7 +2020,7 @@ export declare enum HostEvent {
1557
2020
  */
1558
2021
  Reload = "reload",
1559
2022
  /**
1560
- * Sets the visible visualizations on a Liveboard.
2023
+ * Display specific visualizations on a Liveboard.
1561
2024
  *
1562
2025
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
1563
2026
  * in this parameter will be hidden.
@@ -1571,7 +2034,7 @@ export declare enum HostEvent {
1571
2034
  */
1572
2035
  SetVisibleVizs = "SetPinboardVisibleVizs",
1573
2036
  /**
1574
- * Set the Active Tab of a Liveboard.
2037
+ * Set a Liveboard tab as an active tab.
1575
2038
  *
1576
2039
  * @param - tabId - string of id of Tab to show
1577
2040
  * @example
@@ -1584,7 +2047,7 @@ export declare enum HostEvent {
1584
2047
  */
1585
2048
  SetActiveTab = "SetActiveTab",
1586
2049
  /**
1587
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
2050
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
1588
2051
  * runtime filters passed here are appended to the existing runtime
1589
2052
  * filters.
1590
2053
  * Pass an array of runtime filters with the following attributes:
@@ -1610,10 +2073,11 @@ export declare enum HostEvent {
1610
2073
  */
1611
2074
  UpdateRuntimeFilters = "UpdateRuntimeFilters",
1612
2075
  /**
1613
- * Navigate to a specific page in the embedded application without reloading the page.
2076
+ * Navigate to a specific page in the embedded ThoughtSpot application.
1614
2077
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
1615
2078
  *
1616
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
2079
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
2080
+ * be a number; for example, `1`, `-1`.
1617
2081
  * @example
1618
2082
  * ```js
1619
2083
  * appEmbed.navigateToPage(-1)
@@ -1622,7 +2086,7 @@ export declare enum HostEvent {
1622
2086
  */
1623
2087
  Navigate = "Navigate",
1624
2088
  /**
1625
- * Opens the filter panel for a particular column.
2089
+ * Open the filter panel for a particular column.
1626
2090
  * Works with Search and Liveboard embed.
1627
2091
  *
1628
2092
  * @param - { columnId: string,
@@ -1640,7 +2104,7 @@ export declare enum HostEvent {
1640
2104
  */
1641
2105
  OpenFilter = "openFilter",
1642
2106
  /**
1643
- * Adds columns to the current search query.
2107
+ * Add columns to the current search query.
1644
2108
  *
1645
2109
  * @param - { columnIds: string[] }
1646
2110
  * @example
@@ -1651,7 +2115,7 @@ export declare enum HostEvent {
1651
2115
  */
1652
2116
  AddColumns = "addColumns",
1653
2117
  /**
1654
- * Removes a column from the current search query.
2118
+ * Remove a column from the current search query.
1655
2119
  *
1656
2120
  * @param - { columnId: string }
1657
2121
  * @example
@@ -1662,27 +2126,29 @@ export declare enum HostEvent {
1662
2126
  */
1663
2127
  RemoveColumn = "removeColumn",
1664
2128
  /**
1665
- * Gets the current Liveboard content.
2129
+ * Get the transient state of a Liveboard as encoded content.
2130
+ * This includes unsaved and ad hoc changes such as
2131
+ * Liveboard filters, runtime filters applied on visualizations on a
2132
+ * Liveboard, and Liveboard layout, changes to visualizations such as
2133
+ * sorting, toggling of legends, and data drill down.
1666
2134
  *
1667
2135
  * @example
1668
2136
  * ```js
1669
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
2137
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
2138
+ * data=>console.log(data))
1670
2139
  * ```
1671
2140
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
1672
2141
  */
1673
2142
  getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
1674
2143
  /**
1675
- * Triggers the **Pin** action on an embedded object
2144
+ * Trigger the **Pin** action on an embedded object
1676
2145
  *
1677
2146
  * @param - Liveboard embed takes the `vizId` as a
1678
- * key. Can be left undefined when embedding Search, full app or
2147
+ * key. Can be left undefined when embedding Search, full app, or
1679
2148
  * a visualization.
1680
2149
  * @example
1681
2150
  * ```js
1682
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1683
- * ```
1684
- * ```js
1685
- * vizEmbed.trigger(HostEvent.Pin)
2151
+ * appEmbed.trigger(HostEvent.Pin)
1686
2152
  * ```
1687
2153
  * ```js
1688
2154
  * searchEmbed.trigger(HostEvent.Pin)
@@ -1691,17 +2157,18 @@ export declare enum HostEvent {
1691
2157
  */
1692
2158
  Pin = "pin",
1693
2159
  /**
1694
- * Triggers the **Show Liveboard details** action on a Liveboard
2160
+ * Trigger the **Show Liveboard details** action
2161
+ * on an embedded Liveboard.
1695
2162
  *
1696
2163
  * @example
1697
- * ```js
1698
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1699
- * ```
2164
+ *```js
2165
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2166
+ *```
1700
2167
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1701
2168
  */
1702
2169
  LiveboardInfo = "pinboardInfo",
1703
2170
  /**
1704
- * Triggers the **Schedule** action on a Liveboard
2171
+ * Trigger the **Schedule** action on an embedded Liveboard.
1705
2172
  *
1706
2173
  * @example
1707
2174
  * ```js
@@ -1711,7 +2178,7 @@ export declare enum HostEvent {
1711
2178
  */
1712
2179
  Schedule = "subscription",
1713
2180
  /**
1714
- * Triggers the **Manage schedule** action on a Liveboard
2181
+ * Trigger the **Manage schedule** action on an embedded Liveboard
1715
2182
  *
1716
2183
  * @example
1717
2184
  * ```js
@@ -1721,7 +2188,7 @@ export declare enum HostEvent {
1721
2188
  */
1722
2189
  SchedulesList = "schedule-list",
1723
2190
  /**
1724
- * Triggers the **Export TML** action on a Liveboard
2191
+ * Trigger the **Export TML** action on an embedded Liveboard.
1725
2192
  *
1726
2193
  * @example
1727
2194
  * ```js
@@ -1731,7 +2198,7 @@ export declare enum HostEvent {
1731
2198
  */
1732
2199
  ExportTML = "exportTSL",
1733
2200
  /**
1734
- * Triggers the **Edit TML** action on a Liveboard
2201
+ * Trigger the **Edit TML** action on an embedded Liveboard.
1735
2202
  *
1736
2203
  * @example
1737
2204
  * ```js
@@ -1741,7 +2208,7 @@ export declare enum HostEvent {
1741
2208
  */
1742
2209
  EditTML = "editTSL",
1743
2210
  /**
1744
- * Triggers the **Update TML** action on a Liveboard
2211
+ * Trigger the **Update TML** action on an embedded Liveboard.
1745
2212
  *
1746
2213
  * @example
1747
2214
  * ```js
@@ -1751,7 +2218,7 @@ export declare enum HostEvent {
1751
2218
  */
1752
2219
  UpdateTML = "updateTSL",
1753
2220
  /**
1754
- * Triggers the **Download PDF** action on a Liveboard
2221
+ * Trigger the **Download PDF** action on an embedded Liveboard.
1755
2222
  *
1756
2223
  * @example
1757
2224
  * ```js
@@ -1761,8 +2228,8 @@ export declare enum HostEvent {
1761
2228
  */
1762
2229
  DownloadAsPdf = "downloadAsPdf",
1763
2230
  /**
1764
- * Triggers the **Make a copy** action on a Liveboard, Search, or
1765
- * visualization page
2231
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
2232
+ * visualization page.
1766
2233
  *
1767
2234
  * @example
1768
2235
  * ```js
@@ -1778,7 +2245,7 @@ export declare enum HostEvent {
1778
2245
  */
1779
2246
  MakeACopy = "makeACopy",
1780
2247
  /**
1781
- * Triggers the **Delete** action on a Liveboard
2248
+ * Trigger the **Delete** action for a Liveboard.
1782
2249
  *
1783
2250
  * @example
1784
2251
  * ```js
@@ -1788,7 +2255,7 @@ export declare enum HostEvent {
1788
2255
  */
1789
2256
  Remove = "delete",
1790
2257
  /**
1791
- * Triggers the **Explore* action on a visualization
2258
+ * Trigger the **Explore** action on a visualization.
1792
2259
  *
1793
2260
  * @param - an object with `vizId` as a key
1794
2261
  * @example
@@ -1799,7 +2266,7 @@ export declare enum HostEvent {
1799
2266
  */
1800
2267
  Explore = "explore",
1801
2268
  /**
1802
- * Triggers the **Create alert** action on a visualization
2269
+ * Trigger the **Create alert** action on a visualization
1803
2270
  *
1804
2271
  * @param - an object with `vizId` as a key
1805
2272
  * @example
@@ -1812,7 +2279,7 @@ export declare enum HostEvent {
1812
2279
  */
1813
2280
  CreateMonitor = "createMonitor",
1814
2281
  /**
1815
- * Triggers the **Manage alerts** action on a visualization
2282
+ * Trigger the **Manage alerts** action on a visualization
1816
2283
  *
1817
2284
  * @param - an object with `vizId` as a key
1818
2285
  * @example
@@ -1825,7 +2292,7 @@ export declare enum HostEvent {
1825
2292
  */
1826
2293
  ManageMonitor = "manageMonitor",
1827
2294
  /**
1828
- * Triggers the **Edit** action on a Liveboard or visualization
2295
+ * Trigger the **Edit** action on a Liveboard or visualization
1829
2296
  *
1830
2297
  * @param - object - To trigger the action for a specific visualization
1831
2298
  * in Liveboard embed, pass in `vizId` as a key.
@@ -1846,7 +2313,7 @@ export declare enum HostEvent {
1846
2313
  */
1847
2314
  Edit = "edit",
1848
2315
  /**
1849
- * Triggers the **Copy link** action on a Liveboard or visualization
2316
+ * Trigger the **Copy link** action on a Liveboard or visualization
1850
2317
  *
1851
2318
  * @param - object - to trigger the action for a
1852
2319
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -1864,7 +2331,7 @@ export declare enum HostEvent {
1864
2331
  */
1865
2332
  CopyLink = "embedDocument",
1866
2333
  /**
1867
- * Triggers the **Present** action on a Liveboard or visualization
2334
+ * Trigger the **Present** action on a Liveboard or visualization
1868
2335
  *
1869
2336
  * @param - object - to trigger the action for a specific visualization
1870
2337
  * in Liveboard embed, pass in `vizId` as a key
@@ -1882,7 +2349,7 @@ export declare enum HostEvent {
1882
2349
  */
1883
2350
  Present = "present",
1884
2351
  /**
1885
- * Gets TML for the current search.
2352
+ * Get TML for the current search.
1886
2353
  *
1887
2354
  * @example
1888
2355
  * ```js
@@ -1897,7 +2364,7 @@ export declare enum HostEvent {
1897
2364
  */
1898
2365
  GetTML = "getTML",
1899
2366
  /**
1900
- * Triggers the **Show underlying data** action on visualization or search
2367
+ * Trigger the **Show underlying data** action on visualization or search
1901
2368
  *
1902
2369
  * @param - an object with vizId as a key
1903
2370
  * @example
@@ -1915,7 +2382,9 @@ export declare enum HostEvent {
1915
2382
  */
1916
2383
  ShowUnderlyingData = "showUnderlyingData",
1917
2384
  /**
1918
- * Triggers the **Delete** action on visualization or search
2385
+ * Trigger the **Delete** action for a visualization
2386
+ * in an embedded Liveboard, or a chart or table
2387
+ * generated from Search.
1919
2388
  *
1920
2389
  * @param - Liveboard embed takes an object with `vizId` as a key.
1921
2390
  * Can be left empty if embedding Search or visualization.
@@ -1925,16 +2394,13 @@ export declare enum HostEvent {
1925
2394
  * '730496d6-6903-4601-937e-2c691821af3c'})
1926
2395
  * ```
1927
2396
  * ```js
1928
- * vizEmbed.trigger(HostEvent.Delete)
1929
- * ```
1930
- * ```js
1931
2397
  * searchEmbed.trigger(HostEvent.Delete)
1932
2398
  * ```
1933
2399
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1934
2400
  */
1935
2401
  Delete = "onDeleteAnswer",
1936
2402
  /**
1937
- * Triggers the **SpotIQ analyze** action on visualization
2403
+ * Trigger the **SpotIQ analyze** action on visualization
1938
2404
  * or search.
1939
2405
  *
1940
2406
  * @param - Liveboard embed takes `vizId` as a
@@ -1955,7 +2421,7 @@ export declare enum HostEvent {
1955
2421
  */
1956
2422
  SpotIQAnalyze = "spotIQAnalyze",
1957
2423
  /**
1958
- * Triggers the **Download** action on charts in
2424
+ * Trigger the **Download** action on charts in
1959
2425
  * the embedded view.
1960
2426
  *
1961
2427
  * @example
@@ -1964,17 +2430,15 @@ export declare enum HostEvent {
1964
2430
  * '730496d6-6903-4601-937e-2c691821af3c'})
1965
2431
  * ```
1966
2432
  * ```js
1967
- * vizEmbed.trigger(HostEvent.Download)
2433
+ * embed.trigger(HostEvent.Download)
1968
2434
  * ```
1969
- * ```js
1970
- * searchEmbed.trigger(HostEvent.Download)
1971
- * ```
1972
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
2435
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
2436
+ * Use {@link DownloadAsPng}
1973
2437
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1974
2438
  */
1975
2439
  Download = "downloadAsPng",
1976
2440
  /**
1977
- * Triggers the **Download** > **PNG** action on
2441
+ * Trigger the **Download** > **PNG** action on
1978
2442
  * charts in the embedded view.
1979
2443
  *
1980
2444
  * @example
@@ -1990,7 +2454,7 @@ export declare enum HostEvent {
1990
2454
  */
1991
2455
  DownloadAsPng = "downloadAsPng",
1992
2456
  /**
1993
- * Triggers the **Download** > **CSV** action on tables in
2457
+ * Trigger the **Download** > **CSV** action on tables in
1994
2458
  * the embedded view.
1995
2459
  *
1996
2460
  * @example
@@ -2008,7 +2472,7 @@ export declare enum HostEvent {
2008
2472
  */
2009
2473
  DownloadAsCsv = "downloadAsCSV",
2010
2474
  /**
2011
- * Triggers the **Download** > **XLSX** action on tables
2475
+ * Trigger the **Download** > **XLSX** action on tables
2012
2476
  * in the embedded view.
2013
2477
  *
2014
2478
  * @example
@@ -2026,7 +2490,7 @@ export declare enum HostEvent {
2026
2490
  */
2027
2491
  DownloadAsXlsx = "downloadAsXLSX",
2028
2492
  /**
2029
- * Triggers the **Share** action on an embedded
2493
+ * Trigger the **Share** action on an embedded
2030
2494
  * Liveboard or Answer.
2031
2495
  *
2032
2496
  * @example
@@ -2040,7 +2504,7 @@ export declare enum HostEvent {
2040
2504
  */
2041
2505
  Share = "share",
2042
2506
  /**
2043
- * Triggers the **Save** action on a Liveboard or Answer.
2507
+ * Trigger the **Save** action on a Liveboard or Answer.
2044
2508
  * Saves the changes.
2045
2509
  *
2046
2510
  * @example
@@ -2054,7 +2518,7 @@ export declare enum HostEvent {
2054
2518
  */
2055
2519
  Save = "save",
2056
2520
  /**
2057
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
2521
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
2058
2522
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
2059
2523
  *
2060
2524
  * @param - an object with `vizId` as a key
@@ -2070,7 +2534,7 @@ export declare enum HostEvent {
2070
2534
  */
2071
2535
  SyncToSheets = "sync-to-sheets",
2072
2536
  /**
2073
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
2537
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
2074
2538
  * Sends data from an Answer or Liveboard visualization to third-party apps such
2075
2539
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
2076
2540
  *
@@ -2087,7 +2551,7 @@ export declare enum HostEvent {
2087
2551
  */
2088
2552
  SyncToOtherApps = "sync-to-other-apps",
2089
2553
  /**
2090
- * Triggers the **Manage pipelines** action on an embedded
2554
+ * Trigger the **Manage pipelines** action on an embedded
2091
2555
  * visualization or Answer.
2092
2556
  * Allows users to manage ThoughtSpot Sync pipelines.
2093
2557
  *
@@ -2104,18 +2568,21 @@ export declare enum HostEvent {
2104
2568
  */
2105
2569
  ManagePipelines = "manage-pipeline",
2106
2570
  /**
2107
- * Triggers the Reset search on the Search page
2571
+ * Reset search operation on the Search or Answer page.
2108
2572
  *
2109
2573
  * @example
2110
2574
  * ```js
2111
2575
  * searchEmbed.trigger(HostEvent.ResetSearch)
2112
2576
  * ```
2577
+ * ```js
2578
+ * appEmbed.trigger(HostEvent.ResetSearch)
2579
+ * ```
2113
2580
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
2114
2581
  */
2115
2582
  ResetSearch = "resetSearch",
2116
2583
  /**
2117
2584
  * @hidden
2118
- * Gets the currents visible and runtime filters applied on a Liveboard
2585
+ * Get the currents visible and runtime filters applied on a Liveboard
2119
2586
  * @example
2120
2587
  * liveboardEmbed.trigger(HostEvent.GetFilters)
2121
2588
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -2123,7 +2590,7 @@ export declare enum HostEvent {
2123
2590
  GetFilters = "getFilters",
2124
2591
  /**
2125
2592
  * @hidden
2126
- * Updates the visible filters on the Liveboard.
2593
+ * Update the visible filters on the Liveboard.
2127
2594
  * @param - filter: filter object containing column name and filter operation and values
2128
2595
  * @example
2129
2596
  *
@@ -2136,7 +2603,7 @@ export declare enum HostEvent {
2136
2603
  */
2137
2604
  UpdateFilters = "updateFilters",
2138
2605
  /**
2139
- * Get Tab for the current Liveboard.
2606
+ * Get tab details for the current Liveboard.
2140
2607
  *
2141
2608
  * @example
2142
2609
  * ```js
@@ -2150,9 +2617,9 @@ export declare enum HostEvent {
2150
2617
  */
2151
2618
  GetTabs = "getTabs",
2152
2619
  /**
2153
- * Set the visible Tabs on a Liveboard.
2620
+ * Set the visible tabs on a Liveboard.
2154
2621
  *
2155
- * @param - an array of ids of Tabs to show, the ids not passed
2622
+ * @param - an array of ids of tabs to show, the IDs not passed
2156
2623
  * will be hidden.
2157
2624
  * @example
2158
2625
  * ```js
@@ -2166,8 +2633,8 @@ export declare enum HostEvent {
2166
2633
  /**
2167
2634
  * Set the hidden tabs on a Liveboard.
2168
2635
  *
2169
- * @param - an array of ids of Tabs to hide, the ids not passed
2170
- * will be shown.
2636
+ * @param - an array of the IDs of the tabs to hide.
2637
+ * The IDs not passed will be shown.
2171
2638
  * @example
2172
2639
  * ```js
2173
2640
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -2178,9 +2645,10 @@ export declare enum HostEvent {
2178
2645
  */
2179
2646
  SetHiddenTabs = "SetPinboardHiddenTabs",
2180
2647
  /**
2181
- * Updates the search query for sage embed.
2648
+ * Updates the search query string for Natural Language Search operations.
2182
2649
  *
2183
- * @param - searchOptions: an object queryString and option to execute the query.
2650
+ * @param - `queryString`: Text string in Natural Language format
2651
+ * @param - `executeSearch`: Boolean to execute search and update search query
2184
2652
  * @example
2185
2653
  * ```js
2186
2654
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -2188,7 +2656,7 @@ export declare enum HostEvent {
2188
2656
  * executeSearch: true,
2189
2657
  * })
2190
2658
  * ```
2191
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2659
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
2192
2660
  */
2193
2661
  UpdateSageQuery = "updateSageQuery",
2194
2662
  /**
@@ -2201,24 +2669,36 @@ export declare enum HostEvent {
2201
2669
  * vizId: '123', // For Liveboard Visualization.
2202
2670
  * })
2203
2671
  * ```
2672
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
2204
2673
  */
2205
- GetAnswerSession = "getAnswerSession"
2674
+ GetAnswerSession = "getAnswerSession",
2675
+ /**
2676
+ * Trigger Ask Sage for viz
2677
+ *
2678
+ * @example
2679
+ * ```js
2680
+ * liveboardEmbed.trigger(HostEvent.AskSage,
2681
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
2682
+ * ```
2683
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
2684
+ */
2685
+ AskSage = "AskSage"
2206
2686
  }
2207
2687
  /**
2208
2688
  * The different visual modes that the data sources panel within
2209
- * search could appear in, i.e., hidden, collapsed, or expanded.
2689
+ * search could appear in, such as hidden, collapsed, or expanded.
2210
2690
  */
2211
2691
  export declare enum DataSourceVisualMode {
2212
2692
  /**
2213
- * Data source panel is hidden.
2693
+ * The data source panel is hidden.
2214
2694
  */
2215
2695
  Hidden = "hide",
2216
2696
  /**
2217
- * Data source panel is collapsed, but the user can manually expand it.
2697
+ * The data source panel is collapsed, but the user can manually expand it.
2218
2698
  */
2219
2699
  Collapsed = "collapse",
2220
2700
  /**
2221
- * Data source panel is expanded, but the user can manually collapse it.
2701
+ * The data source panel is expanded, but the user can manually collapse it.
2222
2702
  */
2223
2703
  Expanded = "expand"
2224
2704
  }
@@ -2294,7 +2774,11 @@ export declare enum Param {
2294
2774
  LiveboardHeaderSticky = "isLiveboardHeaderSticky",
2295
2775
  IsProductTour = "isProductTour",
2296
2776
  HideSearchBarTitle = "hideSearchBarTitle",
2297
- HideSageAnswerHeader = "hideSageAnswerHeader"
2777
+ HideSageAnswerHeader = "hideSageAnswerHeader",
2778
+ HideSearchBar = "hideSearchBar",
2779
+ ClientLogLevel = "clientLogLevel",
2780
+ OverrideNativeConsole = "overrideConsoleLogs",
2781
+ enableAskSage = "enableAskSage"
2298
2782
  }
2299
2783
  /**
2300
2784
  * ThoughtSpot application pages include actions and menu commands
@@ -2354,9 +2838,11 @@ export declare enum Action {
2354
2838
  SaveAsView = "saveAsView",
2355
2839
  /**
2356
2840
  * The **Make a copy** action on a Liveboard or Answer
2357
- * page.
2358
- * Creates a copy of the Liveboard, visualization,
2359
- * or Answer.
2841
+ * page. Creates a copy of the Liveboard.
2842
+ * In LiveboardEmbed, the **Make a copy** action is not available for
2843
+ * visualizations in the embedded Liveboard view.
2844
+ * In AppEmbed, the **Make a copy** action is available on both
2845
+ * Liveboards and visualizations.
2360
2846
  *
2361
2847
  * @example
2362
2848
  * ```js
@@ -2540,7 +3026,7 @@ export declare enum Action {
2540
3026
  */
2541
3027
  DownloadAsPdf = "downloadAsPdf",
2542
3028
  /**
2543
- * The **Download** > **CSV** menu action for tables on a Liveboard
3029
+ * The **Download** > **CSV** menu action for tables on a Liveboard
2544
3030
  * or Answer page.
2545
3031
  * Downloads a visualization or Answer in the XLSX format.
2546
3032
  *
@@ -3071,6 +3557,7 @@ export declare enum Action {
3071
3557
  */
3072
3558
  RenameModalTitleDescription = "renameModalTitleDescription",
3073
3559
  /**
3560
+ *
3074
3561
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
3075
3562
  */
3076
3563
  RequestVerification = "requestVerification",
@@ -3150,7 +3637,17 @@ export declare enum Action {
3150
3637
  * ```
3151
3638
  * @version SDK: 1.29.0 | Thoughtspot: 9.10.0.cl
3152
3639
  */
3153
- VerifiedLiveboard = "verifiedLiveboard"
3640
+ VerifiedLiveboard = "verifiedLiveboard",
3641
+ /**
3642
+ * Action ID for ask sage button
3643
+ *
3644
+ * @example
3645
+ * ```js
3646
+ * hiddenAction: [Action.AskAi]
3647
+ * ```
3648
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
3649
+ */
3650
+ AskAi = "AskAi"
3154
3651
  }
3155
3652
  export interface AnswerServiceType {
3156
3653
  getAnswer?: (offset: number, batchSize: number) => any;
@@ -3206,4 +3703,12 @@ export interface CustomActionPayload {
3206
3703
  session: SessionInterface;
3207
3704
  vizId?: string;
3208
3705
  }
3706
+ export declare enum LogLevel {
3707
+ SILENT = "SILENT",
3708
+ ERROR = "ERROR",
3709
+ WARN = "WARN",
3710
+ INFO = "INFO",
3711
+ DEBUG = "DEBUG",
3712
+ TRACE = "TRACE"
3713
+ }
3209
3714
  //# sourceMappingURL=types.d.ts.map