@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
package/lib/src/types.js CHANGED
@@ -29,10 +29,14 @@ export var AuthType;
29
29
  */
30
30
  AuthType["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 var 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
  AuthType["EmbeddedSSO"] = "EmbeddedSSO";
51
50
  /**
@@ -64,10 +63,10 @@ export var AuthType;
64
63
  AuthType["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 var 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 var 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 var AuthType;
117
116
  AuthType["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
  AuthType["OIDCRedirect"] = "SSO_OIDC";
@@ -129,8 +128,8 @@ export var AuthType;
129
128
  */
130
129
  AuthType["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 var AuthType;
147
146
  */
148
147
  AuthType["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 var 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
  AuthType["TrustedAuthTokenCookieless"] = "AuthServerCookieless";
170
169
  /**
@@ -251,7 +250,7 @@ export var RuntimeFilterOp;
251
250
  RuntimeFilterOp["IN"] = "IN";
252
251
  })(RuntimeFilterOp || (RuntimeFilterOp = {}));
253
252
  /**
254
- * Home page module that can be hide
253
+ * Home page module that can be hidden
255
254
  */
256
255
  // eslint-disable-next-line no-shadow
257
256
  export var HomepageModule;
@@ -269,7 +268,7 @@ export var HomepageModule;
269
268
  */
270
269
  HomepageModule["Favorite"] = "FAVORITE";
271
270
  /**
272
- * List of answers and liveboards
271
+ * List of answers and Liveboards
273
272
  */
274
273
  HomepageModule["MyLibrary"] = "MY_LIBRARY";
275
274
  /**
@@ -307,12 +306,26 @@ export var EmbedEvent;
307
306
  /**
308
307
  * Rendering has initialized.
309
308
  *
309
+ * @example
310
+ *```js
311
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
312
+ * //show a loader
313
+ * function showLoader() {
314
+ * document.getElementById("loader");
315
+ * }
316
+ *```
310
317
  * @returns timestamp - The timestamp when the event was generated.
311
318
  */
312
319
  EmbedEvent["Init"] = "init";
313
320
  /**
314
321
  * Authentication has either succeeded or failed.
315
322
  *
323
+ * @example
324
+ *```js
325
+ * appEmbed.on(EmbedEvent.AuthInit, payload => {
326
+ * console.log('AuthInit', payload);
327
+ * })
328
+ *```
316
329
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
317
330
  */
318
331
  EmbedEvent["AuthInit"] = "authInit";
@@ -320,37 +333,91 @@ export var EmbedEvent;
320
333
  * The embed object container has loaded.
321
334
  *
322
335
  * @returns timestamp - The timestamp when the event was generated.
336
+ * @example
337
+ *```js
338
+ * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
339
+ * //hide loader
340
+ * function hideLoader() {
341
+ * document.getElementById("loader");
342
+ * }
343
+ *```
323
344
  */
324
345
  EmbedEvent["Load"] = "load";
325
346
  /**
326
347
  * Data pertaining to answer or Liveboard is received
327
348
  *
328
349
  * @return data - The answer or Liveboard data
350
+ * @example
351
+ *```js
352
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
353
+ * console.log('data', payload);
354
+ * })
355
+ *```
329
356
  * @important
330
357
  */
331
358
  EmbedEvent["Data"] = "data";
332
359
  /**
333
- * Search/answer/Liveboard filters have been applied/updated by the user.
360
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
334
361
  *
335
362
  * @hidden
336
363
  */
337
364
  EmbedEvent["FiltersChanged"] = "filtersChanged";
338
365
  /**
339
366
  * Search query has been updated by the user.
367
+ *
368
+ * @example
369
+ *```js
370
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
371
+ *```
340
372
  */
341
373
  EmbedEvent["QueryChanged"] = "queryChanged";
342
374
  /**
343
- * A drill down operation has been performed.
375
+ * A drill-down operation has been performed.
344
376
  *
345
377
  * @returns additionalFilters - Any additional filters applied
346
378
  * @returns drillDownColumns - The columns on which drill down was performed
347
379
  * @returns nonFilteredColumns - The columns that were not filtered
380
+ * @example
381
+ *```js
382
+ * searchEmbed.trigger(HostEvent.DrillDown, {
383
+ * points: {
384
+ * clickedPoint,
385
+ * selectedPoints: selectedPoint
386
+ * },
387
+ * autoDrillDown: true,
388
+ * })
389
+ *```
390
+ * In this example, `VizPointDoubleClick` event is used for
391
+ * triggering the `DrillDown` event when an area or specific
392
+ * data point on a table or chart is double-clicked.
393
+ * @example
394
+ *```js
395
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
396
+ * console.log(payload);
397
+ * const clickedPoint = payload.data.clickedPoint;
398
+ * const selectedPoint = payload.data.selectedPoints;
399
+ * console.log('>>> called', clickedPoint);
400
+ * embed.trigger(HostEvent.DrillDown, {
401
+ * points: {
402
+ * clickedPoint,
403
+ * selectedPoints: selectedPoint
404
+ * },
405
+ * autoDrillDown: true,
406
+ * })
407
+ * })
408
+ *```
348
409
  */
349
410
  EmbedEvent["Drilldown"] = "drillDown";
350
411
  /**
351
412
  * One or more data sources have been selected.
352
413
  *
353
414
  * @returns dataSourceIds - the list of data sources
415
+ * @example
416
+ * ```js
417
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
418
+ * console.log('DataSourceSelected', payload);
419
+ * })
420
+ * ```
354
421
  */
355
422
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
356
423
  /**
@@ -358,25 +425,49 @@ export var EmbedEvent;
358
425
  *
359
426
  * @returns columnIds - the list of columns
360
427
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
428
+ * @example
429
+ * ```js
430
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
431
+ * console.log('AddRemoveColumns', payload);
432
+ * })
433
+ * ```
361
434
  */
362
435
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
363
436
  /**
364
- * A custom action has been triggered
437
+ * A custom action has been triggered.
365
438
  *
366
- * @returns actionId - The id of the custom action
367
- * @returns data - The answer or Liveboard data
439
+ * @returns actionId - ID of the custom action
440
+ * @returns data - Response payload with the Answer or Liveboard data
441
+ * @example
442
+ * ```js
443
+ * appEmbed.on(EmbedEvent.customAction, payload => {
444
+ * const data = payload.data;
445
+ * if (data.id === 'insert Custom Action ID here') {
446
+ * console.log('Custom Action event:', data.embedAnswerData);
447
+ * }
448
+ * })
449
+ * ```
368
450
  */
369
451
  EmbedEvent["CustomAction"] = "customAction";
370
452
  /**
371
- * Listen to double clicks on a visualization
453
+ * Listen to double click actions on a visualization.
372
454
  *
373
- * @return ContextMenuInputPoints - data point that is double clicked
455
+ * @return ContextMenuInputPoints - Data point that is double-clicked
374
456
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
457
+ * @example
458
+ * ```js
459
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
460
+ * console.log('VizPointDoubleClick', payload)
461
+ * })
462
+ * ```
375
463
  */
376
464
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
377
465
  /**
378
- * Listen to clicks on a visualization in a liveboard or Search result.
466
+ * Listen to clicks on a visualization in a Liveboard or Search result.
379
467
  *
468
+ * @return viz, clickedPoint - metadata about the point that is clicked
469
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
470
+ * @important
380
471
  * @example
381
472
  * ```js
382
473
  * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
@@ -389,25 +480,42 @@ export var EmbedEvent;
389
480
  * )
390
481
  * });
391
482
  * ```
392
- * @return viz, clickedPoint - metadata about point that is clicked
393
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
394
- * @important
395
483
  */
396
484
  EmbedEvent["VizPointClick"] = "vizPointClick";
397
485
  /**
398
486
  * An error has occurred.
399
487
  *
400
488
  * @returns error - An error object or message
489
+ * @example
490
+ * ```js
491
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
492
+ * //show error messaage
493
+ * function showErrorMsg() {
494
+ * document.getElementById("error");
495
+ * ```
401
496
  */
402
497
  EmbedEvent["Error"] = "Error";
403
498
  /**
404
- * The embedded object has sent an alert
499
+ * The embedded object has sent an alert.
405
500
  *
406
501
  * @returns alert - An alert object
502
+ * @example
503
+ * ```js
504
+ * searchEmbed.on(EmbedEvent.Alert)
505
+ * ```
407
506
  */
408
507
  EmbedEvent["Alert"] = "alert";
409
508
  /**
410
509
  * The ThoughtSpot auth session has expired.
510
+ *
511
+ * @example
512
+ *```js
513
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
514
+ * //show auth expired banner
515
+ * function showAuthExpired() {
516
+ * document.getElementById("authExpiredBanner");
517
+ * }
518
+ *```
411
519
  */
412
520
  EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
413
521
  /**
@@ -437,14 +545,27 @@ export var EmbedEvent;
437
545
  */
438
546
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
439
547
  /**
440
- * Emitted when the "Get Data" button in Search Bar embed
441
- * is clicked.
548
+ * Emitted when the **Get Data** action is initiated.
549
+ * Applicable to `SearchBarEmbed` only.
442
550
  *
443
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
551
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
552
+ * @example
553
+ *```js
554
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
555
+ * .then(data => {
556
+ * console.log('Answer Data:', data);
557
+ * })
558
+ *```
444
559
  */
445
560
  EmbedEvent["GetDataClick"] = "getDataClick";
446
561
  /**
447
562
  * Detects the route change.
563
+ *
564
+ * @example
565
+ *```js
566
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
567
+ * console.log('data', payload))
568
+ *```
448
569
  */
449
570
  EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
450
571
  /**
@@ -454,10 +575,15 @@ export var EmbedEvent;
454
575
  */
455
576
  EmbedEvent["V1Data"] = "exportVizDataToParent";
456
577
  /**
457
- * Emitted when the embed does not have cookie access. This
458
- * happens on Safari where third-party cookies are blocked by default.
578
+ * Emitted when the embed does not have cookie access. This happens
579
+ * when Safari and other Web browsers block third-party cookies
580
+ * are blocked by default. `NoCookieAccess` can trigger
459
581
  *
460
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
582
+ * @example
583
+ *```js
584
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
585
+ *```
586
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
461
587
  */
462
588
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
463
589
  /**
@@ -471,12 +597,24 @@ export var EmbedEvent;
471
597
  * Emitted when any modal is opened in the app
472
598
  *
473
599
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
600
+ * @example
601
+ *```js
602
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
603
+ * console.log('dialog open', payload);
604
+ * })
605
+ *```
474
606
  */
475
607
  EmbedEvent["DialogOpen"] = "dialog-open";
476
608
  /**
477
609
  * Emitted when any modal is closed in the app
478
610
  *
479
611
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
612
+ * @example
613
+ *```js
614
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
615
+ * console.log('dialog close', payload);
616
+ * })
617
+ *```
480
618
  */
481
619
  EmbedEvent["DialogClose"] = "dialog-close";
482
620
  /**
@@ -485,6 +623,21 @@ export var EmbedEvent;
485
623
  * other events on the rendered Liveboard.
486
624
  *
487
625
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
626
+ * @example
627
+ *```js
628
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
629
+ console.log('Liveboard is rendered', payload);
630
+ })
631
+ *```
632
+ * The following example shows how to trigger
633
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
634
+ * @example
635
+ *```js
636
+ * const embedRef = useEmbedRef();
637
+ * const onLiveboardRendered = () => {
638
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
639
+ * };
640
+ *```
488
641
  */
489
642
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
490
643
  /**
@@ -492,216 +645,470 @@ export var EmbedEvent;
492
645
  * is triggered on all events.
493
646
  *
494
647
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
648
+ * @example
649
+ *```js
650
+ * appEmbed.on(EmbedEvent.ALL, payload => {
651
+ * console.log('Embed Events', payload)
652
+ * })
653
+ *```
495
654
  */
496
655
  EmbedEvent["ALL"] = "*";
497
656
  /**
498
657
  * Emitted when an Answer is saved in the app
499
658
  *
500
659
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
660
+ * @example
661
+ *```js
662
+ * //trigger when action starts
663
+ * searchEmbed.on(EmbedEvent.Save, payload => {
664
+ * console.log('Save', payload)
665
+ * }, {
666
+ * start: true
667
+ * })
668
+ * //trigger when action ends
669
+ * searchEmbed.on(EmbedEvent.Save, payload => {
670
+ * console.log('Save', payload)
671
+ * })
672
+ *```
501
673
  */
502
674
  EmbedEvent["Save"] = "save";
503
675
  /**
504
676
  * Emitted when the download action is triggered on an answer
505
677
  *
678
+ * **Note**: This event is deprecated in v1.21.0.
679
+ * To fire an event when a download action is initiated on a chart or table,
680
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
681
+ * or `EmbedEvent.DownloadAsXLSX`
682
+ *
506
683
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
684
+ * @example
685
+ *```js
686
+ * liveboardEmbed.trigger(HostEvent.Download, {
687
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
688
+ * })
689
+ *```
507
690
  */
508
691
  EmbedEvent["Download"] = "download";
509
692
  /**
510
693
  * Emitted when the download action is triggered on an answer
511
694
  *
512
695
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
696
+ * @example
697
+ *```js
698
+ * //trigger when action starts
699
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
700
+ * console.log('download PNG', payload)}, {start: true })
701
+ * //trigger when action ends
702
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
703
+ * console.log('download PNG', payload)})
704
+ *```
513
705
  */
514
706
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
515
707
  /**
516
708
  * Emitted when the Download as PDF action is triggered on an answer
517
709
  *
518
710
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
711
+ * @example
712
+ *```js
713
+ * //trigger when action starts
714
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
715
+ * console.log('download PDF', payload)}, {start: true })
716
+ * //trigger when action ends
717
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
718
+ * console.log('download PDF', payload)})
719
+ *```
519
720
  */
520
721
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
521
722
  /**
522
723
  * Emitted when the Download as CSV action is triggered on an answer
523
724
  *
524
725
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
726
+ * @example
727
+ *```js
728
+ * //trigger when action starts
729
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
730
+ * console.log('download CSV', payload)}, {start: true })
731
+ * //trigger when action ends
732
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
733
+ * console.log('download CSV', payload)})
734
+ *```
525
735
  */
526
736
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
527
737
  /**
528
738
  * Emitted when the Download as XLSX action is triggered on an answer
529
739
  *
530
740
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
741
+ * @example
742
+ *```js
743
+ * //trigger when action starts
744
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
745
+ * console.log('download Xlsx', payload)}, { start: true })
746
+ * //trigger when action ends
747
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
748
+ * console.log('download Xlsx', payload)})
749
+ *```
531
750
  */
532
751
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
533
752
  /**
534
- * Emitted when an answer is deleted in the app
753
+ * Emitted when an Answer is deleted in the app
535
754
  *
536
755
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
756
+ * @example
757
+ *```js
758
+ * //trigger when action starts
759
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
760
+ * console.log('delete answer', payload)}, {start: true })
761
+ * //trigger when action is completed
762
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
763
+ * console.log('delete answer', payload)})
764
+ *```
537
765
  */
538
766
  EmbedEvent["AnswerDelete"] = "answerDelete";
539
767
  /**
540
768
  * Emitted when an answer is pinned to a Liveboard
541
769
  *
542
770
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
771
+ * @example
772
+ *```js
773
+ * //trigger when action starts
774
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
775
+ * console.log('pin', payload)
776
+ * }, {
777
+ * start: true
778
+ * })
779
+ * //trigger when action ends
780
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
781
+ * console.log('pin', payload)
782
+ * })
783
+ *```
543
784
  */
544
785
  EmbedEvent["Pin"] = "pin";
545
786
  /**
546
787
  * Emitted when SpotIQ analysis is triggered
547
788
  *
548
789
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
790
+ * @example
791
+ *```js
792
+ * //trigger when action starts
793
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
794
+ * console.log('SpotIQAnalyze', payload)
795
+ * }, {
796
+ * start: true
797
+ * })
798
+ * //trigger when action ends
799
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
800
+ * console.log('SpotIQ analyze', payload)
801
+ * })
802
+ *```
549
803
  */
550
804
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
551
805
  /**
552
806
  * Emitted when a user shares an object with another user or group
553
807
  *
554
808
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
809
+ * @example
810
+ *```js
811
+ * //trigger when action starts
812
+ * searchEmbed.on(EmbedEvent.Share, payload => {
813
+ * console.log('Share', payload)
814
+ * }, {
815
+ * start: true
816
+ * })
817
+ * //trigger when action ends
818
+ * searchEmbed.on(EmbedEvent.Share, payload => {
819
+ * console.log('Share', payload)
820
+ * })
821
+ *```
555
822
  */
556
823
  EmbedEvent["Share"] = "share";
557
824
  /**
558
- * Emitted when a user clicks the Include action to include a specific value or data
559
- * on a chart or table
825
+ * Emitted when a user clicks the **Include** action to include a specific value or
826
+ * data on a chart or table.
560
827
  *
561
828
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
829
+ * @example
830
+ *```js
831
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
832
+ * console.log('Drill include', payload);
833
+ * })
834
+ *```
562
835
  */
563
836
  EmbedEvent["DrillInclude"] = "context-menu-item-include";
564
837
  /**
565
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
566
- * on a chart or table
838
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
839
+ * data on a chart or table
567
840
  *
568
841
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
842
+ * @example
843
+ *```js
844
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
845
+ * console.log('Drill exclude', payload);
846
+ * })
847
+ *```
569
848
  */
570
849
  EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
571
850
  /**
572
- * Emitted when copied column value on the app
851
+ * Emitted when a column value is copied in the embedded app.
573
852
  *
574
853
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
854
+ * @example
855
+ *```js
856
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
857
+ * console.log('copy to clipboard', payload);
858
+ * })
859
+ *```
575
860
  */
576
861
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
577
862
  /**
578
- * Emitted when a user clicks the Update TML action
863
+ * Emitted when a user clicks the **Update TML** action
579
864
  *
580
865
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
866
+ * @example
867
+ *```js
868
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
869
+ * })
870
+ *```
581
871
  */
582
872
  EmbedEvent["UpdateTML"] = "updateTSL";
583
873
  /**
584
- * Emitted when a user clicks the Edit TML action
874
+ * Emitted when a user clicks the **Edit TML** action
585
875
  *
586
876
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
877
+ * @example
878
+ *```js
879
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
880
+ * console.log('Edit TML', payload);
881
+ * })
882
+ *```
587
883
  */
588
884
  EmbedEvent["EditTML"] = "editTSL";
589
885
  /**
590
- * Emitted when ExportTML trigger in answer on the app
886
+ * Emitted when the **Export TML** action is triggered on an
887
+ * an embedded object in the app
591
888
  *
592
889
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
890
+ * @example
891
+ *```js
892
+ * //trigger when action starts
893
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
894
+ * console.log('Export TML', payload)}, { start: true })
895
+ * //trigger when action ends
896
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
897
+ * console.log('Export TML', payload)})
898
+ *```
593
899
  */
594
900
  EmbedEvent["ExportTML"] = "exportTSL";
595
901
  /**
596
- * Emitted when an answer is saved as a view
902
+ * Emitted when an Answer is saved as a View.
597
903
  *
598
904
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
905
+ * @example
906
+ *```js
907
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
908
+ * console.log('View', payload);
909
+ * })
910
+ *```
599
911
  */
600
912
  EmbedEvent["SaveAsView"] = "saveAsView";
601
913
  /**
602
- * Emitted when copy of existing answer on the app
914
+ * Emitted when the user creates a copy of an Answer
603
915
  *
604
916
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
917
+ * @example
918
+ *```js
919
+ * //trigger when action starts
920
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
921
+ * console.log('Copy and edit', payload)}, {start: true })
922
+ * //trigger when action ends
923
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
924
+ * console.log('Copy and edit', payload)})
925
+ *```
605
926
  */
606
927
  EmbedEvent["CopyAEdit"] = "copyAEdit";
607
928
  /**
608
- * Emitted when a user clicks Show underlying data on an answe
929
+ * Emitted when a user clicks Show underlying data on an Answer
609
930
  *
610
931
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
932
+ * @example
933
+ *```js
934
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
935
+ * console.log('show data', payload);
936
+ * })
937
+ *```
611
938
  */
612
939
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
613
940
  /**
614
- * Emitted when an answer is switched to a chart or table view
941
+ * Emitted when an answer is switched to a chart or table view.
615
942
  *
616
943
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
944
+ * @example
945
+ *```js
946
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
947
+ * console.log('switch view', payload);
948
+ * })
949
+ *```
617
950
  */
618
951
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
619
952
  /**
620
- * Internal event to communicate the initial settings back to the TS APP
953
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
621
954
  *
622
955
  * @hidden
623
956
  */
624
957
  EmbedEvent["APP_INIT"] = "appInit";
625
958
  /**
626
- * Emitted when a user clicks Show Liveboard details on a Liveboard
959
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
627
960
  *
628
961
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
962
+ * @example
963
+ *```js
964
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
965
+ * console.log('Liveboard details', payload);
966
+ * })
967
+ *```
629
968
  */
630
969
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
631
970
  /**
632
971
  * Emitted when a user clicks on the Favorite icon on a Liveboard
633
972
  *
634
973
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
974
+ * @example
975
+ *```js
976
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
977
+ * console.log('favorites', payload);
978
+ * })
979
+ *```
635
980
  */
636
981
  EmbedEvent["AddToFavorites"] = "addToFavorites";
637
982
  /**
638
- * Emitted when a user clicks Schedule on a Liveboard
983
+ * Emitted when a user clicks **Schedule** on a Liveboard
639
984
  *
640
985
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
986
+ * @example
987
+ *```js
988
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
989
+ * console.log(`Liveboard schedule', payload);
990
+ * })
991
+ *```
641
992
  */
642
993
  EmbedEvent["Schedule"] = "subscription";
643
994
  /**
644
- * Emitted when a user clicks Edit on a Liveboard or visualization
995
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
645
996
  *
646
997
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
998
+ * @example
999
+ *```js
1000
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
1001
+ * console.log(`Liveboard edit', payload);
1002
+ * })
1003
+ *```
647
1004
  */
648
1005
  EmbedEvent["Edit"] = "edit";
649
1006
  /**
650
- * Emitted when a user clicks Make a copy on a Liveboard
1007
+ * Emitted when a user clicks *Make a copy* on a Liveboard
651
1008
  *
652
1009
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1010
+ * @example
1011
+ *```js
1012
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
1013
+ * console.log(`Copy', payload);
1014
+ * })
1015
+ *```
653
1016
  */
654
1017
  EmbedEvent["MakeACopy"] = "makeACopy";
655
1018
  /**
656
- * Emitted when a user clicks Present on a Liveboard or visualization
1019
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
657
1020
  *
658
1021
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1022
+ * @example
1023
+ *```js
1024
+ * liveboardEmbed.trigger(HostEvent.Present)
1025
+ *```
1026
+ * @example
1027
+ *```js
1028
+ * liveboardEmbed.on(EmbedEvent.Present, {
1029
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1030
+ * })
1031
+ *```
659
1032
  */
660
1033
  EmbedEvent["Present"] = "present";
661
1034
  /**
662
- * Emitted when a user clicks Delete on a Liveboard
1035
+ * Emitted when a user clicks **Delete** on a visualization
663
1036
  *
664
1037
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1038
+ * @example
1039
+ *```js
1040
+ * liveboardEmbed.trigger(HostEvent.Delete,
1041
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1042
+ *```
665
1043
  */
666
1044
  EmbedEvent["Delete"] = "delete";
667
1045
  /**
668
1046
  * Emitted when a user clicks Manage schedules on a Liveboard
669
1047
  *
670
1048
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1049
+ * @example
1050
+ *```js
1051
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
1052
+ *```
671
1053
  */
672
1054
  EmbedEvent["SchedulesList"] = "schedule-list";
673
1055
  /**
674
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
1056
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
675
1057
  *
676
1058
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1059
+ * @example
1060
+ *```js
1061
+ * liveboardEmbed.trigger(HostEvent.Cancel)
1062
+ *```
677
1063
  */
678
1064
  EmbedEvent["Cancel"] = "cancel";
679
1065
  /**
680
- * Emitted when a user clicks Explore on a visualization
1066
+ * Emitted when a user clicks **Explore** on a visualization
681
1067
  *
682
1068
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1069
+ * @example
1070
+ *```js
1071
+ * liveboardEmbed.trigger(HostEvent.Explore, {
1072
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1073
+ *```
683
1074
  */
684
1075
  EmbedEvent["Explore"] = "explore";
685
1076
  /**
686
- * Emitted when a user clicks Copy link action on a visualization
1077
+ * Emitted when a user clicks **Copy link** action on a visualization
687
1078
  *
688
1079
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1080
+ * @example
1081
+ *```js
1082
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
1083
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1084
+ *```
689
1085
  */
690
1086
  EmbedEvent["CopyLink"] = "embedDocument";
691
1087
  /**
692
- * Emitted when a user interacts with cross filters on a visualization or liveboard
1088
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
693
1089
  *
694
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1090
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1091
+ * @example
1092
+ *```js
1093
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
1094
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1095
+ *```
695
1096
  */
696
1097
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
697
1098
  /**
698
1099
  * Emitted when a user right clicks on a visualization (chart or table)
699
1100
  *
700
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1101
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1102
+ * @example
1103
+ *```js
1104
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
1105
+ * console.log('VizPointClick', payload)
1106
+ * })
1107
+ *```
701
1108
  */
702
1109
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
703
1110
  /**
704
- * Emitted when a user clicks on Insert to slide on a visualization
1111
+ * Emitted when a user clicks **Insert to slide** on a visualization
705
1112
  *
706
1113
  * @hidden
707
1114
  */
@@ -709,52 +1116,52 @@ export var EmbedEvent;
709
1116
  /**
710
1117
  * @hidden
711
1118
  * Emitted when a user changes any filter on a Liveboard.
712
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1119
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
713
1120
  */
714
1121
  EmbedEvent["FilterChanged"] = "filterChanged";
715
1122
  /**
716
- * Emitted when a user click on Go button in Sage Embed
1123
+ * Emitted when a user clicks the **Go** button on the Search page
717
1124
  *
718
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1125
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
719
1126
  */
720
1127
  EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
721
1128
  /**
722
- * Emitten when a user select data source in Sage Embed
1129
+ * Emitted when a user selects a data source.
723
1130
  *
724
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1131
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
725
1132
  */
726
1133
  EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
727
1134
  /**
728
- * Emitted when a user updates a connection in Data tab
1135
+ * Emitted when a user updates a connection on the **Data** page
729
1136
  *
730
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1137
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
731
1138
  */
732
1139
  EmbedEvent["UpdateConnection"] = "updateConnection";
733
1140
  /**
734
- * Emitted when a user updates a connection in Data tab
1141
+ * Emitted when a user updates a connection on the **Data** page
735
1142
  *
736
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1143
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
737
1144
  */
738
1145
  EmbedEvent["CreateConnection"] = "createConnection";
739
1146
  /**
740
1147
  * Emitted when name, status (private or public) or filter values of a
741
- * PersonalisedView is updated.
1148
+ * Personalised view is updated.
742
1149
  *
743
1150
  * @returns viewName: string
744
1151
  * @returns viewId: string
745
1152
  * @returns liveboardId: string
746
1153
  * @returns isPublic: boolean
747
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1154
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
748
1155
  */
749
1156
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
750
1157
  /**
751
- * Emitted when a PersonalisedView is saved.
1158
+ * Emitted when a Personalised view is saved.
752
1159
  *
753
1160
  * @returns viewName: string
754
1161
  * @returns viewId: string
755
1162
  * @returns liveboardId: string
756
1163
  * @returns isPublic: boolean
757
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1164
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
758
1165
  */
759
1166
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
760
1167
  /**
@@ -764,7 +1171,7 @@ export var EmbedEvent;
764
1171
  * @returns viewId: string
765
1172
  * @returns liveboardId: string
766
1173
  * @returns isPublic: boolean
767
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1174
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
768
1175
  */
769
1176
  EmbedEvent["ResetLiveboard"] = "resetLiveboard";
770
1177
  /**
@@ -772,20 +1179,30 @@ export var EmbedEvent;
772
1179
  *
773
1180
  * @returns views: string[]
774
1181
  * @returns liveboardId: string
775
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1182
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
776
1183
  */
777
1184
  EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
778
1185
  /**
779
- * Emitten when a user creates a new worksheet
1186
+ * Emitted when a user creates a new worksheet
780
1187
  *
781
1188
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
782
1189
  */
783
1190
  EmbedEvent["CreateWorksheet"] = "createWorksheet";
784
1191
  /**
785
- * Emitted when a LB/viz is renamed
786
- *
787
- * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
788
- */
1192
+ * Emitted when Ask Sage is initialized.
1193
+ *
1194
+ * @returns viewName: string
1195
+ * @returns viewId: string
1196
+ * @returns liveboardId: string
1197
+ * @returns isPublic: boolean
1198
+ * @version SDK : 1.29.0 | Thoughtspot: 9.12.0.cl
1199
+ */
1200
+ EmbedEvent["AskSageInit"] = "AskSageInit";
1201
+ /**
1202
+ * Emitted when a LB/viz is renamed
1203
+ *
1204
+ * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
1205
+ */
789
1206
  EmbedEvent["Rename"] = "rename";
790
1207
  })(EmbedEvent || (EmbedEvent = {}));
791
1208
  /**
@@ -814,15 +1231,16 @@ export var EmbedEvent;
814
1231
  export var HostEvent;
815
1232
  (function (HostEvent) {
816
1233
  /**
817
- * Triggers a search query in AppEmbed and SearchEmbed
818
- * deployments.
1234
+ * Triggers a search operation with the search tokens specified in
1235
+ * the search query string.
1236
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
819
1237
  * Includes the following properties:
820
1238
  *
821
- * @param - dataSourceIds - The data source GUID to Search on
1239
+ * @param - `searchQuery` - query string with search tokens
1240
+ * @param - `dataSources` - Data source GUID to Search on
822
1241
  * - Although an array, only a single source
823
1242
  * is supported.
824
- * @param - searchQuery - Query string with search tokens
825
- * @param - execute - executes the existing / updated query
1243
+ * @param - `execute` - executes search and updates the existing query
826
1244
  * @example
827
1245
  * ```js
828
1246
  * searchembed.trigger(HostEvent.Search, {
@@ -842,6 +1260,10 @@ export var HostEvent;
842
1260
  * @param - columnGuid - Optional. GUID of the column to drill
843
1261
  * by. If not provided it will auto drill by the configured
844
1262
  * column.
1263
+ * @param - autoDrillDown - Optional. If true, the drill down will be
1264
+ * done automatically on the most popular column.
1265
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
1266
+ * in case of a liveboard.
845
1267
  * @example
846
1268
  * ```js
847
1269
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -858,6 +1280,25 @@ export var HostEvent;
858
1280
  * });
859
1281
  * })
860
1282
  * ```
1283
+ * @example
1284
+ * ```js
1285
+ * // Works with TS 9.8.0 and above
1286
+ *
1287
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1288
+ * console.log(payload);
1289
+ * const clickedPoint = payload.data.clickedPoint;
1290
+ * const selectedPoint = payload.data.selectedPoints;
1291
+ * console.log('>>> called', clickedPoint);
1292
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
1293
+ * points: {
1294
+ * clickedPoint,
1295
+ * selectedPoints: selectedPoint
1296
+ * },
1297
+ * autoDrillDown: true,
1298
+ * vizId: payload.data.vizId
1299
+ * });
1300
+ * })
1301
+ * ```
861
1302
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
862
1303
  */
863
1304
  HostEvent["DrillDown"] = "triggerDrillDown";
@@ -874,7 +1315,7 @@ export var HostEvent;
874
1315
  */
875
1316
  HostEvent["Reload"] = "reload";
876
1317
  /**
877
- * Sets the visible visualizations on a Liveboard.
1318
+ * Display specific visualizations on a Liveboard.
878
1319
  *
879
1320
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
880
1321
  * in this parameter will be hidden.
@@ -888,7 +1329,7 @@ export var HostEvent;
888
1329
  */
889
1330
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
890
1331
  /**
891
- * Set the Active Tab of a Liveboard.
1332
+ * Set a Liveboard tab as an active tab.
892
1333
  *
893
1334
  * @param - tabId - string of id of Tab to show
894
1335
  * @example
@@ -901,7 +1342,7 @@ export var HostEvent;
901
1342
  */
902
1343
  HostEvent["SetActiveTab"] = "SetActiveTab";
903
1344
  /**
904
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
1345
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
905
1346
  * runtime filters passed here are appended to the existing runtime
906
1347
  * filters.
907
1348
  * Pass an array of runtime filters with the following attributes:
@@ -927,10 +1368,11 @@ export var HostEvent;
927
1368
  */
928
1369
  HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
929
1370
  /**
930
- * Navigate to a specific page in the embedded application without reloading the page.
1371
+ * Navigate to a specific page in the embedded ThoughtSpot application.
931
1372
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
932
1373
  *
933
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
1374
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
1375
+ * be a number; for example, `1`, `-1`.
934
1376
  * @example
935
1377
  * ```js
936
1378
  * appEmbed.navigateToPage(-1)
@@ -939,7 +1381,7 @@ export var HostEvent;
939
1381
  */
940
1382
  HostEvent["Navigate"] = "Navigate";
941
1383
  /**
942
- * Opens the filter panel for a particular column.
1384
+ * Open the filter panel for a particular column.
943
1385
  * Works with Search and Liveboard embed.
944
1386
  *
945
1387
  * @param - { columnId: string,
@@ -957,7 +1399,7 @@ export var HostEvent;
957
1399
  */
958
1400
  HostEvent["OpenFilter"] = "openFilter";
959
1401
  /**
960
- * Adds columns to the current search query.
1402
+ * Add columns to the current search query.
961
1403
  *
962
1404
  * @param - { columnIds: string[] }
963
1405
  * @example
@@ -968,7 +1410,7 @@ export var HostEvent;
968
1410
  */
969
1411
  HostEvent["AddColumns"] = "addColumns";
970
1412
  /**
971
- * Removes a column from the current search query.
1413
+ * Remove a column from the current search query.
972
1414
  *
973
1415
  * @param - { columnId: string }
974
1416
  * @example
@@ -979,27 +1421,29 @@ export var HostEvent;
979
1421
  */
980
1422
  HostEvent["RemoveColumn"] = "removeColumn";
981
1423
  /**
982
- * Gets the current Liveboard content.
1424
+ * Get the transient state of a Liveboard as encoded content.
1425
+ * This includes unsaved and ad hoc changes such as
1426
+ * Liveboard filters, runtime filters applied on visualizations on a
1427
+ * Liveboard, and Liveboard layout, changes to visualizations such as
1428
+ * sorting, toggling of legends, and data drill down.
983
1429
  *
984
1430
  * @example
985
1431
  * ```js
986
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
1432
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
1433
+ * data=>console.log(data))
987
1434
  * ```
988
1435
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
989
1436
  */
990
1437
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
991
1438
  /**
992
- * Triggers the **Pin** action on an embedded object
1439
+ * Trigger the **Pin** action on an embedded object
993
1440
  *
994
1441
  * @param - Liveboard embed takes the `vizId` as a
995
- * key. Can be left undefined when embedding Search, full app or
1442
+ * key. Can be left undefined when embedding Search, full app, or
996
1443
  * a visualization.
997
1444
  * @example
998
1445
  * ```js
999
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1000
- * ```
1001
- * ```js
1002
- * vizEmbed.trigger(HostEvent.Pin)
1446
+ * appEmbed.trigger(HostEvent.Pin)
1003
1447
  * ```
1004
1448
  * ```js
1005
1449
  * searchEmbed.trigger(HostEvent.Pin)
@@ -1008,17 +1452,18 @@ export var HostEvent;
1008
1452
  */
1009
1453
  HostEvent["Pin"] = "pin";
1010
1454
  /**
1011
- * Triggers the **Show Liveboard details** action on a Liveboard
1455
+ * Trigger the **Show Liveboard details** action
1456
+ * on an embedded Liveboard.
1012
1457
  *
1013
1458
  * @example
1014
- * ```js
1015
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1016
- * ```
1459
+ *```js
1460
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1461
+ *```
1017
1462
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1018
1463
  */
1019
1464
  HostEvent["LiveboardInfo"] = "pinboardInfo";
1020
1465
  /**
1021
- * Triggers the **Schedule** action on a Liveboard
1466
+ * Trigger the **Schedule** action on an embedded Liveboard.
1022
1467
  *
1023
1468
  * @example
1024
1469
  * ```js
@@ -1028,7 +1473,7 @@ export var HostEvent;
1028
1473
  */
1029
1474
  HostEvent["Schedule"] = "subscription";
1030
1475
  /**
1031
- * Triggers the **Manage schedule** action on a Liveboard
1476
+ * Trigger the **Manage schedule** action on an embedded Liveboard
1032
1477
  *
1033
1478
  * @example
1034
1479
  * ```js
@@ -1038,7 +1483,7 @@ export var HostEvent;
1038
1483
  */
1039
1484
  HostEvent["SchedulesList"] = "schedule-list";
1040
1485
  /**
1041
- * Triggers the **Export TML** action on a Liveboard
1486
+ * Trigger the **Export TML** action on an embedded Liveboard.
1042
1487
  *
1043
1488
  * @example
1044
1489
  * ```js
@@ -1048,7 +1493,7 @@ export var HostEvent;
1048
1493
  */
1049
1494
  HostEvent["ExportTML"] = "exportTSL";
1050
1495
  /**
1051
- * Triggers the **Edit TML** action on a Liveboard
1496
+ * Trigger the **Edit TML** action on an embedded Liveboard.
1052
1497
  *
1053
1498
  * @example
1054
1499
  * ```js
@@ -1058,7 +1503,7 @@ export var HostEvent;
1058
1503
  */
1059
1504
  HostEvent["EditTML"] = "editTSL";
1060
1505
  /**
1061
- * Triggers the **Update TML** action on a Liveboard
1506
+ * Trigger the **Update TML** action on an embedded Liveboard.
1062
1507
  *
1063
1508
  * @example
1064
1509
  * ```js
@@ -1068,7 +1513,7 @@ export var HostEvent;
1068
1513
  */
1069
1514
  HostEvent["UpdateTML"] = "updateTSL";
1070
1515
  /**
1071
- * Triggers the **Download PDF** action on a Liveboard
1516
+ * Trigger the **Download PDF** action on an embedded Liveboard.
1072
1517
  *
1073
1518
  * @example
1074
1519
  * ```js
@@ -1078,8 +1523,8 @@ export var HostEvent;
1078
1523
  */
1079
1524
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
1080
1525
  /**
1081
- * Triggers the **Make a copy** action on a Liveboard, Search, or
1082
- * visualization page
1526
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
1527
+ * visualization page.
1083
1528
  *
1084
1529
  * @example
1085
1530
  * ```js
@@ -1095,7 +1540,7 @@ export var HostEvent;
1095
1540
  */
1096
1541
  HostEvent["MakeACopy"] = "makeACopy";
1097
1542
  /**
1098
- * Triggers the **Delete** action on a Liveboard
1543
+ * Trigger the **Delete** action for a Liveboard.
1099
1544
  *
1100
1545
  * @example
1101
1546
  * ```js
@@ -1105,7 +1550,7 @@ export var HostEvent;
1105
1550
  */
1106
1551
  HostEvent["Remove"] = "delete";
1107
1552
  /**
1108
- * Triggers the **Explore* action on a visualization
1553
+ * Trigger the **Explore** action on a visualization.
1109
1554
  *
1110
1555
  * @param - an object with `vizId` as a key
1111
1556
  * @example
@@ -1116,7 +1561,7 @@ export var HostEvent;
1116
1561
  */
1117
1562
  HostEvent["Explore"] = "explore";
1118
1563
  /**
1119
- * Triggers the **Create alert** action on a visualization
1564
+ * Trigger the **Create alert** action on a visualization
1120
1565
  *
1121
1566
  * @param - an object with `vizId` as a key
1122
1567
  * @example
@@ -1129,7 +1574,7 @@ export var HostEvent;
1129
1574
  */
1130
1575
  HostEvent["CreateMonitor"] = "createMonitor";
1131
1576
  /**
1132
- * Triggers the **Manage alerts** action on a visualization
1577
+ * Trigger the **Manage alerts** action on a visualization
1133
1578
  *
1134
1579
  * @param - an object with `vizId` as a key
1135
1580
  * @example
@@ -1142,7 +1587,7 @@ export var HostEvent;
1142
1587
  */
1143
1588
  HostEvent["ManageMonitor"] = "manageMonitor";
1144
1589
  /**
1145
- * Triggers the **Edit** action on a Liveboard or visualization
1590
+ * Trigger the **Edit** action on a Liveboard or visualization
1146
1591
  *
1147
1592
  * @param - object - To trigger the action for a specific visualization
1148
1593
  * in Liveboard embed, pass in `vizId` as a key.
@@ -1163,7 +1608,7 @@ export var HostEvent;
1163
1608
  */
1164
1609
  HostEvent["Edit"] = "edit";
1165
1610
  /**
1166
- * Triggers the **Copy link** action on a Liveboard or visualization
1611
+ * Trigger the **Copy link** action on a Liveboard or visualization
1167
1612
  *
1168
1613
  * @param - object - to trigger the action for a
1169
1614
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -1181,7 +1626,7 @@ export var HostEvent;
1181
1626
  */
1182
1627
  HostEvent["CopyLink"] = "embedDocument";
1183
1628
  /**
1184
- * Triggers the **Present** action on a Liveboard or visualization
1629
+ * Trigger the **Present** action on a Liveboard or visualization
1185
1630
  *
1186
1631
  * @param - object - to trigger the action for a specific visualization
1187
1632
  * in Liveboard embed, pass in `vizId` as a key
@@ -1199,7 +1644,7 @@ export var HostEvent;
1199
1644
  */
1200
1645
  HostEvent["Present"] = "present";
1201
1646
  /**
1202
- * Gets TML for the current search.
1647
+ * Get TML for the current search.
1203
1648
  *
1204
1649
  * @example
1205
1650
  * ```js
@@ -1214,7 +1659,7 @@ export var HostEvent;
1214
1659
  */
1215
1660
  HostEvent["GetTML"] = "getTML";
1216
1661
  /**
1217
- * Triggers the **Show underlying data** action on visualization or search
1662
+ * Trigger the **Show underlying data** action on visualization or search
1218
1663
  *
1219
1664
  * @param - an object with vizId as a key
1220
1665
  * @example
@@ -1232,7 +1677,9 @@ export var HostEvent;
1232
1677
  */
1233
1678
  HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
1234
1679
  /**
1235
- * Triggers the **Delete** action on visualization or search
1680
+ * Trigger the **Delete** action for a visualization
1681
+ * in an embedded Liveboard, or a chart or table
1682
+ * generated from Search.
1236
1683
  *
1237
1684
  * @param - Liveboard embed takes an object with `vizId` as a key.
1238
1685
  * Can be left empty if embedding Search or visualization.
@@ -1242,16 +1689,13 @@ export var HostEvent;
1242
1689
  * '730496d6-6903-4601-937e-2c691821af3c'})
1243
1690
  * ```
1244
1691
  * ```js
1245
- * vizEmbed.trigger(HostEvent.Delete)
1246
- * ```
1247
- * ```js
1248
1692
  * searchEmbed.trigger(HostEvent.Delete)
1249
1693
  * ```
1250
1694
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1251
1695
  */
1252
1696
  HostEvent["Delete"] = "onDeleteAnswer";
1253
1697
  /**
1254
- * Triggers the **SpotIQ analyze** action on visualization
1698
+ * Trigger the **SpotIQ analyze** action on visualization
1255
1699
  * or search.
1256
1700
  *
1257
1701
  * @param - Liveboard embed takes `vizId` as a
@@ -1272,7 +1716,7 @@ export var HostEvent;
1272
1716
  */
1273
1717
  HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1274
1718
  /**
1275
- * Triggers the **Download** action on charts in
1719
+ * Trigger the **Download** action on charts in
1276
1720
  * the embedded view.
1277
1721
  *
1278
1722
  * @example
@@ -1281,17 +1725,15 @@ export var HostEvent;
1281
1725
  * '730496d6-6903-4601-937e-2c691821af3c'})
1282
1726
  * ```
1283
1727
  * ```js
1284
- * vizEmbed.trigger(HostEvent.Download)
1285
- * ```
1286
- * ```js
1287
- * searchEmbed.trigger(HostEvent.Download)
1728
+ * embed.trigger(HostEvent.Download)
1288
1729
  * ```
1289
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
1730
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
1731
+ * Use {@link DownloadAsPng}
1290
1732
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1291
1733
  */
1292
1734
  HostEvent["Download"] = "downloadAsPng";
1293
1735
  /**
1294
- * Triggers the **Download** > **PNG** action on
1736
+ * Trigger the **Download** > **PNG** action on
1295
1737
  * charts in the embedded view.
1296
1738
  *
1297
1739
  * @example
@@ -1307,7 +1749,7 @@ export var HostEvent;
1307
1749
  */
1308
1750
  HostEvent["DownloadAsPng"] = "downloadAsPng";
1309
1751
  /**
1310
- * Triggers the **Download** > **CSV** action on tables in
1752
+ * Trigger the **Download** > **CSV** action on tables in
1311
1753
  * the embedded view.
1312
1754
  *
1313
1755
  * @example
@@ -1325,7 +1767,7 @@ export var HostEvent;
1325
1767
  */
1326
1768
  HostEvent["DownloadAsCsv"] = "downloadAsCSV";
1327
1769
  /**
1328
- * Triggers the **Download** > **XLSX** action on tables
1770
+ * Trigger the **Download** > **XLSX** action on tables
1329
1771
  * in the embedded view.
1330
1772
  *
1331
1773
  * @example
@@ -1343,7 +1785,7 @@ export var HostEvent;
1343
1785
  */
1344
1786
  HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
1345
1787
  /**
1346
- * Triggers the **Share** action on an embedded
1788
+ * Trigger the **Share** action on an embedded
1347
1789
  * Liveboard or Answer.
1348
1790
  *
1349
1791
  * @example
@@ -1357,7 +1799,7 @@ export var HostEvent;
1357
1799
  */
1358
1800
  HostEvent["Share"] = "share";
1359
1801
  /**
1360
- * Triggers the **Save** action on a Liveboard or Answer.
1802
+ * Trigger the **Save** action on a Liveboard or Answer.
1361
1803
  * Saves the changes.
1362
1804
  *
1363
1805
  * @example
@@ -1371,7 +1813,7 @@ export var HostEvent;
1371
1813
  */
1372
1814
  HostEvent["Save"] = "save";
1373
1815
  /**
1374
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
1816
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
1375
1817
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
1376
1818
  *
1377
1819
  * @param - an object with `vizId` as a key
@@ -1387,7 +1829,7 @@ export var HostEvent;
1387
1829
  */
1388
1830
  HostEvent["SyncToSheets"] = "sync-to-sheets";
1389
1831
  /**
1390
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
1832
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
1391
1833
  * Sends data from an Answer or Liveboard visualization to third-party apps such
1392
1834
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
1393
1835
  *
@@ -1404,7 +1846,7 @@ export var HostEvent;
1404
1846
  */
1405
1847
  HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
1406
1848
  /**
1407
- * Triggers the **Manage pipelines** action on an embedded
1849
+ * Trigger the **Manage pipelines** action on an embedded
1408
1850
  * visualization or Answer.
1409
1851
  * Allows users to manage ThoughtSpot Sync pipelines.
1410
1852
  *
@@ -1421,18 +1863,21 @@ export var HostEvent;
1421
1863
  */
1422
1864
  HostEvent["ManagePipelines"] = "manage-pipeline";
1423
1865
  /**
1424
- * Triggers the Reset search on the Search page
1866
+ * Reset search operation on the Search or Answer page.
1425
1867
  *
1426
1868
  * @example
1427
1869
  * ```js
1428
1870
  * searchEmbed.trigger(HostEvent.ResetSearch)
1429
1871
  * ```
1872
+ * ```js
1873
+ * appEmbed.trigger(HostEvent.ResetSearch)
1874
+ * ```
1430
1875
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
1431
1876
  */
1432
1877
  HostEvent["ResetSearch"] = "resetSearch";
1433
1878
  /**
1434
1879
  * @hidden
1435
- * Gets the currents visible and runtime filters applied on a Liveboard
1880
+ * Get the currents visible and runtime filters applied on a Liveboard
1436
1881
  * @example
1437
1882
  * liveboardEmbed.trigger(HostEvent.GetFilters)
1438
1883
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -1440,7 +1885,7 @@ export var HostEvent;
1440
1885
  HostEvent["GetFilters"] = "getFilters";
1441
1886
  /**
1442
1887
  * @hidden
1443
- * Updates the visible filters on the Liveboard.
1888
+ * Update the visible filters on the Liveboard.
1444
1889
  * @param - filter: filter object containing column name and filter operation and values
1445
1890
  * @example
1446
1891
  *
@@ -1453,7 +1898,7 @@ export var HostEvent;
1453
1898
  */
1454
1899
  HostEvent["UpdateFilters"] = "updateFilters";
1455
1900
  /**
1456
- * Get Tab for the current Liveboard.
1901
+ * Get tab details for the current Liveboard.
1457
1902
  *
1458
1903
  * @example
1459
1904
  * ```js
@@ -1467,9 +1912,9 @@ export var HostEvent;
1467
1912
  */
1468
1913
  HostEvent["GetTabs"] = "getTabs";
1469
1914
  /**
1470
- * Set the visible Tabs on a Liveboard.
1915
+ * Set the visible tabs on a Liveboard.
1471
1916
  *
1472
- * @param - an array of ids of Tabs to show, the ids not passed
1917
+ * @param - an array of ids of tabs to show, the IDs not passed
1473
1918
  * will be hidden.
1474
1919
  * @example
1475
1920
  * ```js
@@ -1483,8 +1928,8 @@ export var HostEvent;
1483
1928
  /**
1484
1929
  * Set the hidden tabs on a Liveboard.
1485
1930
  *
1486
- * @param - an array of ids of Tabs to hide, the ids not passed
1487
- * will be shown.
1931
+ * @param - an array of the IDs of the tabs to hide.
1932
+ * The IDs not passed will be shown.
1488
1933
  * @example
1489
1934
  * ```js
1490
1935
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -1495,9 +1940,10 @@ export var HostEvent;
1495
1940
  */
1496
1941
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
1497
1942
  /**
1498
- * Updates the search query for sage embed.
1943
+ * Updates the search query string for Natural Language Search operations.
1499
1944
  *
1500
- * @param - searchOptions: an object queryString and option to execute the query.
1945
+ * @param - `queryString`: Text string in Natural Language format
1946
+ * @param - `executeSearch`: Boolean to execute search and update search query
1501
1947
  * @example
1502
1948
  * ```js
1503
1949
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -1505,7 +1951,7 @@ export var HostEvent;
1505
1951
  * executeSearch: true,
1506
1952
  * })
1507
1953
  * ```
1508
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1954
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1509
1955
  */
1510
1956
  HostEvent["UpdateSageQuery"] = "updateSageQuery";
1511
1957
  /**
@@ -1518,26 +1964,38 @@ export var HostEvent;
1518
1964
  * vizId: '123', // For Liveboard Visualization.
1519
1965
  * })
1520
1966
  * ```
1967
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
1521
1968
  */
1522
1969
  HostEvent["GetAnswerSession"] = "getAnswerSession";
1970
+ /**
1971
+ * Trigger Ask Sage for viz
1972
+ *
1973
+ * @example
1974
+ * ```js
1975
+ * liveboardEmbed.trigger(HostEvent.AskSage,
1976
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
1977
+ * ```
1978
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
1979
+ */
1980
+ HostEvent["AskSage"] = "AskSage";
1523
1981
  })(HostEvent || (HostEvent = {}));
1524
1982
  /**
1525
1983
  * The different visual modes that the data sources panel within
1526
- * search could appear in, i.e., hidden, collapsed, or expanded.
1984
+ * search could appear in, such as hidden, collapsed, or expanded.
1527
1985
  */
1528
1986
  // eslint-disable-next-line no-shadow
1529
1987
  export var DataSourceVisualMode;
1530
1988
  (function (DataSourceVisualMode) {
1531
1989
  /**
1532
- * Data source panel is hidden.
1990
+ * The data source panel is hidden.
1533
1991
  */
1534
1992
  DataSourceVisualMode["Hidden"] = "hide";
1535
1993
  /**
1536
- * Data source panel is collapsed, but the user can manually expand it.
1994
+ * The data source panel is collapsed, but the user can manually expand it.
1537
1995
  */
1538
1996
  DataSourceVisualMode["Collapsed"] = "collapse";
1539
1997
  /**
1540
- * Data source panel is expanded, but the user can manually collapse it.
1998
+ * The data source panel is expanded, but the user can manually collapse it.
1541
1999
  */
1542
2000
  DataSourceVisualMode["Expanded"] = "expand";
1543
2001
  })(DataSourceVisualMode || (DataSourceVisualMode = {}));
@@ -1617,6 +2075,10 @@ export var Param;
1617
2075
  Param["IsProductTour"] = "isProductTour";
1618
2076
  Param["HideSearchBarTitle"] = "hideSearchBarTitle";
1619
2077
  Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
2078
+ Param["HideSearchBar"] = "hideSearchBar";
2079
+ Param["ClientLogLevel"] = "clientLogLevel";
2080
+ Param["OverrideNativeConsole"] = "overrideConsoleLogs";
2081
+ Param["enableAskSage"] = "enableAskSage";
1620
2082
  })(Param || (Param = {}));
1621
2083
  /**
1622
2084
  * ThoughtSpot application pages include actions and menu commands
@@ -1678,9 +2140,11 @@ export var Action;
1678
2140
  Action["SaveAsView"] = "saveAsView";
1679
2141
  /**
1680
2142
  * The **Make a copy** action on a Liveboard or Answer
1681
- * page.
1682
- * Creates a copy of the Liveboard, visualization,
1683
- * or Answer.
2143
+ * page. Creates a copy of the Liveboard.
2144
+ * In LiveboardEmbed, the **Make a copy** action is not available for
2145
+ * visualizations in the embedded Liveboard view.
2146
+ * In AppEmbed, the **Make a copy** action is available on both
2147
+ * Liveboards and visualizations.
1684
2148
  *
1685
2149
  * @example
1686
2150
  * ```js
@@ -1864,7 +2328,7 @@ export var Action;
1864
2328
  */
1865
2329
  Action["DownloadAsPdf"] = "downloadAsPdf";
1866
2330
  /**
1867
- * The **Download** > **CSV** menu action for tables on a Liveboard
2331
+ * The **Download** > **CSV** menu action for tables on a Liveboard
1868
2332
  * or Answer page.
1869
2333
  * Downloads a visualization or Answer in the XLSX format.
1870
2334
  *
@@ -2395,6 +2859,7 @@ export var Action;
2395
2859
  */
2396
2860
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
2397
2861
  /**
2862
+ *
2398
2863
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
2399
2864
  */
2400
2865
  Action["RequestVerification"] = "requestVerification";
@@ -2475,6 +2940,16 @@ export var Action;
2475
2940
  * @version SDK: 1.29.0 | Thoughtspot: 9.10.0.cl
2476
2941
  */
2477
2942
  Action["VerifiedLiveboard"] = "verifiedLiveboard";
2943
+ /**
2944
+ * Action ID for ask sage button
2945
+ *
2946
+ * @example
2947
+ * ```js
2948
+ * hiddenAction: [Action.AskAi]
2949
+ * ```
2950
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
2951
+ */
2952
+ Action["AskAi"] = "AskAi";
2478
2953
  })(Action || (Action = {}));
2479
2954
  export var PrefetchFeatures;
2480
2955
  (function (PrefetchFeatures) {
@@ -2491,4 +2966,13 @@ export var ContextMenuTriggerOptions;
2491
2966
  ContextMenuTriggerOptions["LEFT_CLICK"] = "left-click";
2492
2967
  ContextMenuTriggerOptions["RIGHT_CLICK"] = "right-click";
2493
2968
  })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
2969
+ export var LogLevel;
2970
+ (function (LogLevel) {
2971
+ LogLevel["SILENT"] = "SILENT";
2972
+ LogLevel["ERROR"] = "ERROR";
2973
+ LogLevel["WARN"] = "WARN";
2974
+ LogLevel["INFO"] = "INFO";
2975
+ LogLevel["DEBUG"] = "DEBUG";
2976
+ LogLevel["TRACE"] = "TRACE";
2977
+ })(LogLevel || (LogLevel = {}));
2494
2978
  //# sourceMappingURL=types.js.map