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