@thoughtspot/visual-embed-sdk 1.26.2 → 1.27.0-logger

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 (304) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +1 -1
  3. package/cjs/src/auth.d.ts +4 -4
  4. package/cjs/src/auth.d.ts.map +1 -1
  5. package/cjs/src/auth.js +15 -8
  6. package/cjs/src/auth.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +14 -14
  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.map +1 -1
  14. package/cjs/src/embed/base.js +5 -2
  15. package/cjs/src/embed/base.js.map +1 -1
  16. package/cjs/src/embed/base.spec.js +3 -2
  17. package/cjs/src/embed/base.spec.js.map +1 -1
  18. package/cjs/src/embed/embed.spec.js +2 -1
  19. package/cjs/src/embed/embed.spec.js.map +1 -1
  20. package/cjs/src/embed/embedConfig.d.ts +2 -1
  21. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  22. package/cjs/src/embed/embedConfig.js +2 -0
  23. package/cjs/src/embed/embedConfig.js.map +1 -1
  24. package/cjs/src/embed/events.spec.js +3 -2
  25. package/cjs/src/embed/events.spec.js.map +1 -1
  26. package/cjs/src/embed/liveboard.d.ts +28 -23
  27. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  28. package/cjs/src/embed/liveboard.js +4 -3
  29. package/cjs/src/embed/liveboard.js.map +1 -1
  30. package/cjs/src/embed/sage.d.ts +47 -29
  31. package/cjs/src/embed/sage.d.ts.map +1 -1
  32. package/cjs/src/embed/sage.js +1 -1
  33. package/cjs/src/embed/sage.js.map +1 -1
  34. package/cjs/src/embed/search-bar.d.ts +22 -6
  35. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  36. package/cjs/src/embed/search-bar.js.map +1 -1
  37. package/cjs/src/embed/search.d.ts +33 -18
  38. package/cjs/src/embed/search.d.ts.map +1 -1
  39. package/cjs/src/embed/search.js +4 -1
  40. package/cjs/src/embed/search.js.map +1 -1
  41. package/cjs/src/embed/search.spec.js +10 -0
  42. package/cjs/src/embed/search.spec.js.map +1 -1
  43. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  44. package/cjs/src/embed/ts-embed.js +37 -17
  45. package/cjs/src/embed/ts-embed.js.map +1 -1
  46. package/cjs/src/embed/ts-embed.spec.js +141 -26
  47. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  48. package/cjs/src/index.d.ts +2 -2
  49. package/cjs/src/index.d.ts.map +1 -1
  50. package/cjs/src/index.js +2 -1
  51. package/cjs/src/index.js.map +1 -1
  52. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  53. package/cjs/src/mixpanel-service.js +2 -1
  54. package/cjs/src/mixpanel-service.js.map +1 -1
  55. package/cjs/src/react/index.spec.js +2 -14
  56. package/cjs/src/react/index.spec.js.map +1 -1
  57. package/cjs/src/types.d.ts +751 -242
  58. package/cjs/src/types.d.ts.map +1 -1
  59. package/cjs/src/types.js +665 -176
  60. package/cjs/src/types.js.map +1 -1
  61. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  62. package/cjs/src/utils/authService/authService.js +3 -2
  63. package/cjs/src/utils/authService/authService.js.map +1 -1
  64. package/cjs/src/utils/authService/authService.spec.js +3 -2
  65. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  66. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  67. package/cjs/src/utils/authService/tokenizedAuthService.js +2 -1
  68. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  69. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
  70. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  71. package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
  72. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  73. package/cjs/src/utils/logger.d.ts +4 -14
  74. package/cjs/src/utils/logger.d.ts.map +1 -1
  75. package/cjs/src/utils/logger.js +37 -41
  76. package/cjs/src/utils/logger.js.map +1 -1
  77. package/cjs/src/utils/logger.spec.d.ts +25 -0
  78. package/cjs/src/utils/logger.spec.d.ts.map +1 -0
  79. package/cjs/src/utils/logger.spec.js +80 -0
  80. package/cjs/src/utils/logger.spec.js.map +1 -0
  81. package/cjs/src/utils/processData.d.ts +6 -0
  82. package/cjs/src/utils/processData.d.ts.map +1 -1
  83. package/cjs/src/utils/processData.js +5 -1
  84. package/cjs/src/utils/processData.js.map +1 -1
  85. package/cjs/src/utils/processTrigger.js +1 -1
  86. package/dist/src/auth.d.ts +4 -4
  87. package/dist/src/auth.d.ts.map +1 -1
  88. package/dist/src/embed/app.d.ts +14 -14
  89. package/dist/src/embed/app.d.ts.map +1 -1
  90. package/dist/src/embed/base.d.ts.map +1 -1
  91. package/dist/src/embed/embedConfig.d.ts +2 -1
  92. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  93. package/dist/src/embed/liveboard.d.ts +28 -23
  94. package/dist/src/embed/liveboard.d.ts.map +1 -1
  95. package/dist/src/embed/sage.d.ts +47 -29
  96. package/dist/src/embed/sage.d.ts.map +1 -1
  97. package/dist/src/embed/search-bar.d.ts +22 -6
  98. package/dist/src/embed/search-bar.d.ts.map +1 -1
  99. package/dist/src/embed/search.d.ts +33 -18
  100. package/dist/src/embed/search.d.ts.map +1 -1
  101. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  102. package/dist/src/index.d.ts +2 -2
  103. package/dist/src/index.d.ts.map +1 -1
  104. package/dist/src/mixpanel-service.d.ts.map +1 -1
  105. package/dist/src/types.d.ts +751 -242
  106. package/dist/src/types.d.ts.map +1 -1
  107. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  108. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  109. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
  110. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  111. package/dist/src/utils/logger.d.ts +4 -14
  112. package/dist/src/utils/logger.d.ts.map +1 -1
  113. package/dist/src/utils/logger.spec.d.ts +25 -0
  114. package/dist/src/utils/logger.spec.d.ts.map +1 -0
  115. package/dist/src/utils/processData.d.ts +6 -0
  116. package/dist/src/utils/processData.d.ts.map +1 -1
  117. package/dist/tsembed-react.es.js +18186 -404
  118. package/dist/tsembed-react.js +18185 -403
  119. package/dist/tsembed.es.js +18336 -545
  120. package/dist/tsembed.js +32457 -14667
  121. package/dist/visual-embed-sdk-react-full.d.ts +903 -341
  122. package/dist/visual-embed-sdk-react.d.ts +903 -341
  123. package/dist/visual-embed-sdk.d.ts +903 -341
  124. package/lib/package.json +1 -1
  125. package/lib/src/auth.d.ts +4 -4
  126. package/lib/src/auth.d.ts.map +1 -1
  127. package/lib/src/auth.js +15 -8
  128. package/lib/src/auth.js.map +1 -1
  129. package/lib/src/embed/app.d.ts +14 -14
  130. package/lib/src/embed/app.d.ts.map +1 -1
  131. package/lib/src/embed/app.js +4 -3
  132. package/lib/src/embed/app.js.map +1 -1
  133. package/lib/src/embed/app.spec.js +5 -4
  134. package/lib/src/embed/app.spec.js.map +1 -1
  135. package/lib/src/embed/base.d.ts.map +1 -1
  136. package/lib/src/embed/base.js +6 -3
  137. package/lib/src/embed/base.js.map +1 -1
  138. package/lib/src/embed/base.spec.js +3 -2
  139. package/lib/src/embed/base.spec.js.map +1 -1
  140. package/lib/src/embed/embed.spec.js +2 -1
  141. package/lib/src/embed/embed.spec.js.map +1 -1
  142. package/lib/src/embed/embedConfig.d.ts +2 -1
  143. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  144. package/lib/src/embed/embedConfig.js +2 -0
  145. package/lib/src/embed/embedConfig.js.map +1 -1
  146. package/lib/src/embed/events.spec.js +3 -2
  147. package/lib/src/embed/events.spec.js.map +1 -1
  148. package/lib/src/embed/liveboard.d.ts +28 -23
  149. package/lib/src/embed/liveboard.d.ts.map +1 -1
  150. package/lib/src/embed/liveboard.js +4 -3
  151. package/lib/src/embed/liveboard.js.map +1 -1
  152. package/lib/src/embed/sage.d.ts +47 -29
  153. package/lib/src/embed/sage.d.ts.map +1 -1
  154. package/lib/src/embed/sage.js +1 -1
  155. package/lib/src/embed/sage.js.map +1 -1
  156. package/lib/src/embed/search-bar.d.ts +22 -6
  157. package/lib/src/embed/search-bar.d.ts.map +1 -1
  158. package/lib/src/embed/search-bar.js.map +1 -1
  159. package/lib/src/embed/search.d.ts +33 -18
  160. package/lib/src/embed/search.d.ts.map +1 -1
  161. package/lib/src/embed/search.js +4 -1
  162. package/lib/src/embed/search.js.map +1 -1
  163. package/lib/src/embed/search.spec.js +10 -0
  164. package/lib/src/embed/search.spec.js.map +1 -1
  165. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  166. package/lib/src/embed/ts-embed.js +38 -18
  167. package/lib/src/embed/ts-embed.js.map +1 -1
  168. package/lib/src/embed/ts-embed.spec.js +141 -26
  169. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  170. package/lib/src/index.d.ts +2 -2
  171. package/lib/src/index.d.ts.map +1 -1
  172. package/lib/src/index.js +2 -2
  173. package/lib/src/index.js.map +1 -1
  174. package/lib/src/mixpanel-service.d.ts.map +1 -1
  175. package/lib/src/mixpanel-service.js +2 -1
  176. package/lib/src/mixpanel-service.js.map +1 -1
  177. package/lib/src/react/index.spec.js +2 -14
  178. package/lib/src/react/index.spec.js.map +1 -1
  179. package/lib/src/types.d.ts +751 -242
  180. package/lib/src/types.d.ts.map +1 -1
  181. package/lib/src/types.js +664 -175
  182. package/lib/src/types.js.map +1 -1
  183. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  184. package/lib/src/utils/authService/authService.js +3 -2
  185. package/lib/src/utils/authService/authService.js.map +1 -1
  186. package/lib/src/utils/authService/authService.spec.js +3 -2
  187. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  188. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  189. package/lib/src/utils/authService/tokenizedAuthService.js +2 -1
  190. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  191. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
  192. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  193. package/lib/src/utils/graphql/answerService/answerService.js +2 -4
  194. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  195. package/lib/src/utils/logger.d.ts +4 -14
  196. package/lib/src/utils/logger.d.ts.map +1 -1
  197. package/lib/src/utils/logger.js +23 -25
  198. package/lib/src/utils/logger.js.map +1 -1
  199. package/lib/src/utils/logger.spec.d.ts +25 -0
  200. package/lib/src/utils/logger.spec.d.ts.map +1 -0
  201. package/lib/src/utils/logger.spec.js +57 -0
  202. package/lib/src/utils/logger.spec.js.map +1 -0
  203. package/lib/src/utils/processData.d.ts +6 -0
  204. package/lib/src/utils/processData.d.ts.map +1 -1
  205. package/lib/src/utils/processData.js +4 -1
  206. package/lib/src/utils/processData.js.map +1 -1
  207. package/lib/src/utils/processTrigger.js +1 -1
  208. package/lib/src/visual-embed-sdk.d.ts +904 -342
  209. package/package.json +1 -1
  210. package/src/auth.ts +15 -8
  211. package/src/embed/app.spec.ts +5 -4
  212. package/src/embed/app.ts +22 -21
  213. package/src/embed/base.spec.ts +3 -2
  214. package/src/embed/base.ts +10 -3
  215. package/src/embed/embed.spec.ts +2 -1
  216. package/src/embed/embedConfig.ts +2 -0
  217. package/src/embed/events.spec.ts +3 -2
  218. package/src/embed/liveboard.ts +28 -23
  219. package/src/embed/sage.ts +47 -29
  220. package/src/embed/search-bar.tsx +22 -6
  221. package/src/embed/search.spec.ts +13 -0
  222. package/src/embed/search.ts +38 -19
  223. package/src/embed/ts-embed.spec.ts +159 -26
  224. package/src/embed/ts-embed.ts +37 -19
  225. package/src/index.ts +2 -0
  226. package/src/mixpanel-service.ts +2 -1
  227. package/src/react/index.spec.tsx +2 -31
  228. package/src/types.ts +753 -243
  229. package/src/utils/authService/authService.spec.ts +3 -2
  230. package/src/utils/authService/authService.ts +4 -2
  231. package/src/utils/authService/tokenizedAuthService.ts +2 -1
  232. package/src/utils/graphql/answerService/answerService.ts +2 -4
  233. package/src/utils/logger.spec.ts +67 -0
  234. package/src/utils/logger.ts +87 -0
  235. package/src/utils/processData.ts +4 -1
  236. package/src/utils/processTrigger.ts +1 -1
  237. package/cjs/src/embed/TsEmbed.d.ts +0 -302
  238. package/cjs/src/embed/TsEmbed.d.ts.map +0 -1
  239. package/cjs/src/embed/TsEmbed.js +0 -851
  240. package/cjs/src/embed/TsEmbed.js.map +0 -1
  241. package/cjs/src/utils/answerService.d.ts +0 -10
  242. package/cjs/src/utils/answerService.d.ts.map +0 -1
  243. package/cjs/src/utils/answerService.js +0 -61
  244. package/cjs/src/utils/answerService.js.map +0 -1
  245. package/cjs/src/utils/answerService.spec.d.ts +0 -2
  246. package/cjs/src/utils/answerService.spec.d.ts.map +0 -1
  247. package/cjs/src/utils/answerService.spec.js +0 -31
  248. package/cjs/src/utils/answerService.spec.js.map +0 -1
  249. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  250. package/cjs/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  251. package/cjs/src/utils/authService/tokenisedAuthSerice.js +0 -44
  252. package/cjs/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  253. package/cjs/src/utils/authService.d.ts +0 -55
  254. package/cjs/src/utils/authService.d.ts.map +0 -1
  255. package/cjs/src/utils/authService.js +0 -139
  256. package/cjs/src/utils/authService.js.map +0 -1
  257. package/cjs/src/utils/authService.spec.d.ts +0 -2
  258. package/cjs/src/utils/authService.spec.d.ts.map +0 -1
  259. package/cjs/src/utils/authService.spec.js +0 -82
  260. package/cjs/src/utils/authService.spec.js.map +0 -1
  261. package/cjs/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  262. package/cjs/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  263. package/cjs/src/utils/graphql/graphql-request.spec.js +0 -39
  264. package/cjs/src/utils/graphql/graphql-request.spec.js.map +0 -1
  265. package/dist/src/utils/answerService.d.ts +0 -10
  266. package/dist/src/utils/answerService.d.ts.map +0 -1
  267. package/dist/src/utils/answerService.spec.d.ts +0 -2
  268. package/dist/src/utils/answerService.spec.d.ts.map +0 -1
  269. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  270. package/dist/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  271. package/dist/src/utils/authService.d.ts +0 -55
  272. package/dist/src/utils/authService.d.ts.map +0 -1
  273. package/dist/src/utils/authService.spec.d.ts +0 -2
  274. package/dist/src/utils/authService.spec.d.ts.map +0 -1
  275. package/dist/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  276. package/dist/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  277. package/lib/src/embed/TsEmbed.d.ts +0 -302
  278. package/lib/src/embed/TsEmbed.d.ts.map +0 -1
  279. package/lib/src/embed/TsEmbed.js +0 -847
  280. package/lib/src/embed/TsEmbed.js.map +0 -1
  281. package/lib/src/utils/answerService.d.ts +0 -10
  282. package/lib/src/utils/answerService.d.ts.map +0 -1
  283. package/lib/src/utils/answerService.js +0 -57
  284. package/lib/src/utils/answerService.js.map +0 -1
  285. package/lib/src/utils/answerService.spec.d.ts +0 -2
  286. package/lib/src/utils/answerService.spec.d.ts.map +0 -1
  287. package/lib/src/utils/answerService.spec.js +0 -29
  288. package/lib/src/utils/answerService.spec.js.map +0 -1
  289. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts +0 -11
  290. package/lib/src/utils/authService/tokenisedAuthSerice.d.ts.map +0 -1
  291. package/lib/src/utils/authService/tokenisedAuthSerice.js +0 -39
  292. package/lib/src/utils/authService/tokenisedAuthSerice.js.map +0 -1
  293. package/lib/src/utils/authService.d.ts +0 -55
  294. package/lib/src/utils/authService.d.ts.map +0 -1
  295. package/lib/src/utils/authService.js +0 -129
  296. package/lib/src/utils/authService.js.map +0 -1
  297. package/lib/src/utils/authService.spec.d.ts +0 -2
  298. package/lib/src/utils/authService.spec.d.ts.map +0 -1
  299. package/lib/src/utils/authService.spec.js +0 -80
  300. package/lib/src/utils/authService.spec.js.map +0 -1
  301. package/lib/src/utils/graphql/graphql-request.spec.d.ts +0 -2
  302. package/lib/src/utils/graphql/graphql-request.spec.d.ts.map +0 -1
  303. package/lib/src/utils/graphql/graphql-request.spec.js +0 -36
  304. package/lib/src/utils/graphql/graphql-request.spec.js.map +0 -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
  /**
@@ -306,6 +305,14 @@ export var EmbedEvent;
306
305
  (function (EmbedEvent) {
307
306
  /**
308
307
  * Rendering has initialized.
308
+ * @example
309
+ *```js
310
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
311
+ * //show a loader
312
+ * function showLoader() {
313
+ * document.getElementById("loader");
314
+ * }
315
+ *```
309
316
  *
310
317
  * @returns timestamp - The timestamp when the event was generated.
311
318
  */
@@ -313,69 +320,162 @@ export var EmbedEvent;
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
+ *```
329
+ *
316
330
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
317
331
  */
318
332
  EmbedEvent["AuthInit"] = "authInit";
319
333
  /**
320
334
  * The embed object container has loaded.
321
- *
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
- *
328
348
  * @return data - The answer or Liveboard data
349
+ * @example
350
+ *```js
351
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
352
+ * console.log('data', payload);
353
+ * })
354
+ *```
329
355
  * @important
330
356
  */
331
357
  EmbedEvent["Data"] = "data";
332
358
  /**
333
- * Search/answer/Liveboard filters have been applied/updated by the user.
359
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
334
360
  *
335
361
  * @hidden
336
362
  */
337
363
  EmbedEvent["FiltersChanged"] = "filtersChanged";
338
364
  /**
339
365
  * Search query has been updated by the user.
366
+ *
367
+ * @example
368
+ *```js
369
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
370
+ *```
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
+ *
381
+ * @example
382
+ *```js
383
+ * searchEmbed.trigger(HostEvent.DrillDown, {
384
+ * points: {
385
+ * clickedPoint,
386
+ * selectedPoints: selectedPoint
387
+ * },
388
+ * autoDrillDown: true,
389
+ * })
390
+ *```
391
+ * In this example, `VizPointDoubleClick` event is used for
392
+ * triggering the `DrillDown` event when an area or specific
393
+ * data point on a table or chart is double-clicked.
394
+ *
395
+ * @example
396
+ *```js
397
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
398
+ * console.log(payload);
399
+ * const clickedPoint = payload.data.clickedPoint;
400
+ * const selectedPoint = payload.data.selectedPoints;
401
+ * console.log('>>> called', clickedPoint);
402
+ * embed.trigger(HostEvent.DrillDown, {
403
+ * points: {
404
+ * clickedPoint,
405
+ * selectedPoints: selectedPoint
406
+ * },
407
+ * autoDrillDown: true,
408
+ * })
409
+ * })
410
+ *```
411
+ *
348
412
  */
349
413
  EmbedEvent["Drilldown"] = "drillDown";
350
414
  /**
351
415
  * One or more data sources have been selected.
352
- *
353
416
  * @returns dataSourceIds - the list of data sources
417
+ *
418
+ * @example
419
+ * ```js
420
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
421
+ * console.log('DataSourceSelected', payload);
422
+ * })
423
+ * ```
424
+ *
354
425
  */
355
426
  EmbedEvent["DataSourceSelected"] = "dataSourceSelected";
356
427
  /**
357
428
  * One or more data columns have been selected.
358
- *
359
429
  * @returns columnIds - the list of columns
360
430
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
431
+ *
432
+ * @example
433
+ * ```js
434
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
435
+ * console.log('AddRemoveColumns', payload);
436
+ * })
437
+ * ```
438
+ *
361
439
  */
362
440
  EmbedEvent["AddRemoveColumns"] = "addRemoveColumns";
363
441
  /**
364
- * A custom action has been triggered
442
+ * A custom action has been triggered.
443
+ *
444
+ * @returns actionId - ID of the custom action
445
+ * @returns data - Response payload with the Answer or Liveboard data
365
446
  *
366
- * @returns actionId - The id of the custom action
367
- * @returns data - The answer or Liveboard data
447
+ * @example
448
+ * ```js
449
+ * appEmbed.on(EmbedEvent.customAction, payload => {
450
+ * const data = payload.data;
451
+ * if (data.id === 'insert Custom Action ID here') {
452
+ * console.log('Custom Action event:', data.embedAnswerData);
453
+ * }
454
+ * })
455
+ * ```
368
456
  */
369
457
  EmbedEvent["CustomAction"] = "customAction";
370
458
  /**
371
- * Listen to double clicks on a visualization
459
+ * Listen to double click actions on a visualization.
460
+ *
461
+ * @return ContextMenuInputPoints - Data point that is double-clicked
372
462
  *
373
- * @return ContextMenuInputPoints - data point that is double clicked
374
463
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
464
+ *
465
+ * @example
466
+ * ```js
467
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
468
+ * console.log('VizPointDoubleClick', payload)
469
+ * })
470
+ * ```
375
471
  */
376
472
  EmbedEvent["VizPointDoubleClick"] = "vizPointDoubleClick";
377
473
  /**
378
- * Listen to clicks on a visualization in a liveboard or Search result.
474
+ * Listen to clicks on a visualization in a Liveboard or Search result.
475
+ *
476
+ * @return viz, clickedPoint - metadata about the point that is clicked
477
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
478
+ * @important
379
479
  *
380
480
  * @example
381
481
  * ```js
@@ -389,25 +489,46 @@ export var EmbedEvent;
389
489
  * )
390
490
  * });
391
491
  * ```
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
492
  */
396
493
  EmbedEvent["VizPointClick"] = "vizPointClick";
397
494
  /**
398
495
  * An error has occurred.
399
496
  *
400
497
  * @returns error - An error object or message
498
+ *
499
+ * @example
500
+ * ```js
501
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
502
+ * //show error messaage
503
+ * function showErrorMsg() {
504
+ * document.getElementById("error");
505
+ * ```
506
+ *
401
507
  */
402
508
  EmbedEvent["Error"] = "Error";
403
509
  /**
404
- * The embedded object has sent an alert
510
+ * The embedded object has sent an alert.
405
511
  *
406
512
  * @returns alert - An alert object
513
+ *
514
+ * @example
515
+ * ```js
516
+ * searchEmbed.on(EmbedEvent.Alert)
517
+ * ```
518
+ *
407
519
  */
408
520
  EmbedEvent["Alert"] = "alert";
409
521
  /**
410
522
  * The ThoughtSpot auth session has expired.
523
+ *
524
+ * @example
525
+ *```js
526
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
527
+ * //show auth expired banner
528
+ * function showAuthExpired() {
529
+ * document.getElementById("authExpiredBanner");
530
+ * }
531
+ *```
411
532
  */
412
533
  EmbedEvent["AuthExpire"] = "ThoughtspotAuthExpired";
413
534
  /**
@@ -437,14 +558,28 @@ export var EmbedEvent;
437
558
  */
438
559
  EmbedEvent["EmbedIframeCenter"] = "EmbedIframeCenter";
439
560
  /**
440
- * Emitted when the "Get Data" button in Search Bar embed
441
- * is clicked.
561
+ * Emitted when the **Get Data** action is initiated.
562
+ * Applicable to `SearchBarEmbed` only.
563
+ *
564
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
442
565
  *
443
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
566
+ * @example
567
+ *```js
568
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
569
+ * .then(data => {
570
+ * console.log('Answer Data:', data);
571
+ * })
572
+ *```
444
573
  */
445
574
  EmbedEvent["GetDataClick"] = "getDataClick";
446
575
  /**
447
576
  * Detects the route change.
577
+ *
578
+ * @example
579
+ *```js
580
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
581
+ * console.log('data', payload))
582
+ *```
448
583
  */
449
584
  EmbedEvent["RouteChange"] = "ROUTE_CHANGE";
450
585
  /**
@@ -454,10 +589,15 @@ export var EmbedEvent;
454
589
  */
455
590
  EmbedEvent["V1Data"] = "exportVizDataToParent";
456
591
  /**
457
- * Emitted when the embed does not have cookie access. This
458
- * happens on Safari where third-party cookies are blocked by default.
592
+ * Emitted when the embed does not have cookie access. This happens
593
+ * when Safari and other Web browsers block third-party cookies
594
+ * are blocked by default. `NoCookieAccess` can trigger
459
595
  *
460
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
596
+ * @example
597
+ *```js
598
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
599
+ *```
600
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
461
601
  */
462
602
  EmbedEvent["NoCookieAccess"] = "noCookieAccess";
463
603
  /**
@@ -469,239 +609,539 @@ export var EmbedEvent;
469
609
  EmbedEvent["SAMLComplete"] = "samlComplete";
470
610
  /**
471
611
  * Emitted when any modal is opened in the app
472
- *
473
612
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
613
+ *
614
+ * @example
615
+ *```js
616
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
617
+ * console.log('dialog open', payload);
618
+ * })
619
+ *```
474
620
  */
475
621
  EmbedEvent["DialogOpen"] = "dialog-open";
476
622
  /**
477
623
  * Emitted when any modal is closed in the app
478
- *
479
624
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
625
+ *
626
+ * @example
627
+ *```js
628
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
629
+ * console.log('dialog close', payload);
630
+ * })
631
+ *```
480
632
  */
481
633
  EmbedEvent["DialogClose"] = "dialog-close";
482
634
  /**
483
635
  * Emitted when the Liveboard shell loads.
484
636
  * You can use this event as a hook to trigger
485
637
  * other events on the rendered Liveboard.
486
- *
487
638
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
639
+ *
640
+ * @example
641
+ *```js
642
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
643
+ console.log('Liveboard is rendered', payload);
644
+ })
645
+ *```
646
+ * The following example shows how to trigger
647
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
648
+ *
649
+ * @example
650
+ *```js
651
+ * const embedRef = useEmbedRef();
652
+ * const onLiveboardRendered = () => {
653
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
654
+ * };
655
+ *```
488
656
  */
489
657
  EmbedEvent["LiveboardRendered"] = "PinboardRendered";
490
658
  /**
491
659
  * This can be used to register an event listener which
492
660
  * is triggered on all events.
493
- *
494
661
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
662
+ *
663
+ * @example
664
+ *```js
665
+ * appEmbed.on(EmbedEvent.ALL, payload => {
666
+ * console.log('Embed Events', payload)
667
+ * })
668
+ *```
495
669
  */
496
670
  EmbedEvent["ALL"] = "*";
497
671
  /**
498
672
  * Emitted when an Answer is saved in the app
499
- *
500
673
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
674
+ * @example
675
+ *```js
676
+ * //trigger when action starts
677
+ * searchEmbed.on(EmbedEvent.Save, payload => {
678
+ * console.log('Save', payload)
679
+ * }, {
680
+ * start: true
681
+ * })
682
+ * //trigger when action ends
683
+ * searchEmbed.on(EmbedEvent.Save, payload => {
684
+ * console.log('Save', payload)
685
+ * })
686
+ *```
501
687
  */
502
688
  EmbedEvent["Save"] = "save";
503
689
  /**
504
690
  * Emitted when the download action is triggered on an answer
505
691
  *
692
+ * **Note**: This event is deprecated in v1.21.0.
693
+ * To fire an event when a download action is initiated on a chart or table,
694
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
695
+ * or `EmbedEvent.DownloadAsXLSX`
696
+ *
506
697
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
698
+ *
699
+ * @example
700
+ *```js
701
+ * liveboardEmbed.trigger(HostEvent.Download, {
702
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
703
+ * })
704
+ *```
507
705
  */
508
706
  EmbedEvent["Download"] = "download";
509
707
  /**
510
708
  * Emitted when the download action is triggered on an answer
511
- *
512
709
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
710
+ *
711
+ * @example
712
+ *```js
713
+ * //trigger when action starts
714
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
715
+ * console.log('download PNG', payload)}, {start: true })
716
+ * //trigger when action ends
717
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
718
+ * console.log('download PNG', payload)})
719
+ *```
720
+ *
513
721
  */
514
722
  EmbedEvent["DownloadAsPng"] = "downloadAsPng";
515
723
  /**
516
724
  * Emitted when the Download as PDF action is triggered on an answer
517
725
  *
518
726
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
727
+ *
728
+ * @example
729
+ *```js
730
+ * //trigger when action starts
731
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
732
+ * console.log('download PDF', payload)}, {start: true })
733
+ * //trigger when action ends
734
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
735
+ * console.log('download PDF', payload)})
736
+ *```
737
+ *
519
738
  */
520
739
  EmbedEvent["DownloadAsPdf"] = "downloadAsPdf";
521
740
  /**
522
741
  * Emitted when the Download as CSV action is triggered on an answer
523
742
  *
524
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.DownloadAsCSV, payload => {
748
+ * console.log('download CSV', payload)}, {start: true })
749
+ * //trigger when action ends
750
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
751
+ * console.log('download CSV', payload)})
752
+ *```
525
753
  */
526
754
  EmbedEvent["DownloadAsCsv"] = "downloadAsCsv";
527
755
  /**
528
756
  * Emitted when the Download as XLSX action is triggered on an answer
529
757
  *
530
758
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
759
+ *
760
+ * @example
761
+ *```js
762
+ * //trigger when action starts
763
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
764
+ * console.log('download Xlsx', payload)}, { start: true })
765
+ * //trigger when action ends
766
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
767
+ * console.log('download Xlsx', payload)})
768
+ *```
531
769
  */
532
770
  EmbedEvent["DownloadAsXlsx"] = "downloadAsXlsx";
533
771
  /**
534
- * Emitted when an answer is deleted in the app
772
+ * Emitted when an Answer is deleted in the app
535
773
  *
536
774
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
775
+ *
776
+ * @example
777
+ *```js
778
+ * //trigger when action starts
779
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
780
+ * console.log('delete answer', payload)}, {start: true })
781
+ * //trigger when action is completed
782
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
783
+ * console.log('delete answer', payload)})
784
+ *```
537
785
  */
538
786
  EmbedEvent["AnswerDelete"] = "answerDelete";
539
787
  /**
540
788
  * Emitted when an answer is pinned to a Liveboard
541
789
  *
542
790
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
791
+ * @example
792
+ *```js
793
+ * //trigger when action starts
794
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
795
+ * console.log('pin', payload)
796
+ * }, {
797
+ * start: true
798
+ * })
799
+ * //trigger when action ends
800
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
801
+ * console.log('pin', payload)
802
+ * })
803
+ *```
543
804
  */
544
805
  EmbedEvent["Pin"] = "pin";
545
806
  /**
546
807
  * Emitted when SpotIQ analysis is triggered
547
808
  *
548
809
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
810
+ * @example
811
+ *```js
812
+ * //trigger when action starts
813
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
814
+ * console.log('SpotIQAnalyze', payload)
815
+ * }, {
816
+ * start: true
817
+ * })
818
+ * //trigger when action ends
819
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
820
+ * console.log('SpotIQ analyze', payload)
821
+ * })
822
+ *```
549
823
  */
550
824
  EmbedEvent["SpotIQAnalyze"] = "spotIQAnalyze";
551
825
  /**
552
826
  * Emitted when a user shares an object with another user or group
553
827
  *
554
828
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
829
+ *
830
+ * @example
831
+ *```js
832
+ * //trigger when action starts
833
+ * searchEmbed.on(EmbedEvent.Share, payload => {
834
+ * console.log('Share', payload)
835
+ * }, {
836
+ * start: true
837
+ * })
838
+ * //trigger when action ends
839
+ * searchEmbed.on(EmbedEvent.Share, payload => {
840
+ * console.log('Share', payload)
841
+ * })
842
+ *```
555
843
  */
556
844
  EmbedEvent["Share"] = "share";
557
845
  /**
558
- * Emitted when a user clicks the Include action to include a specific value or data
559
- * on a chart or table
846
+ * Emitted when a user clicks the **Include** action to include a specific value or
847
+ * data on a chart or table.
560
848
  *
561
849
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
850
+ * @example
851
+ *```js
852
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
853
+ * console.log('Drill include', payload);
854
+ * })
855
+ *```
562
856
  */
563
857
  EmbedEvent["DrillInclude"] = "context-menu-item-include";
564
858
  /**
565
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
566
- * on a chart or table
859
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
860
+ * data on a chart or table
567
861
  *
568
862
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
863
+ * @example
864
+ *```js
865
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
866
+ * console.log('Drill exclude', payload);
867
+ * })
868
+ *```
569
869
  */
570
870
  EmbedEvent["DrillExclude"] = "context-menu-item-exclude";
571
871
  /**
572
- * Emitted when copied column value on the app
872
+ * Emitted when a column value is copied in the embedded app.
573
873
  *
574
874
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
875
+ * @example
876
+ *```js
877
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
878
+ * console.log('copy to clipboard', payload);
879
+ * })
880
+ *```
575
881
  */
576
882
  EmbedEvent["CopyToClipboard"] = "context-menu-item-copy-to-clipboard";
577
883
  /**
578
- * Emitted when a user clicks the Update TML action
884
+ * Emitted when a user clicks the **Update TML** action
579
885
  *
580
886
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
887
+ * @example
888
+ *```js
889
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
890
+ * })
891
+ *```
581
892
  */
582
893
  EmbedEvent["UpdateTML"] = "updateTSL";
583
894
  /**
584
- * Emitted when a user clicks the Edit TML action
895
+ * Emitted when a user clicks the **Edit TML** action
585
896
  *
586
897
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
898
+ * @example
899
+ *```js
900
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
901
+ * console.log('Edit TML', payload);
902
+ * })
903
+ *```
587
904
  */
588
905
  EmbedEvent["EditTML"] = "editTSL";
589
906
  /**
590
- * Emitted when ExportTML trigger in answer on the app
591
- *
907
+ * Emitted when the **Export TML** action is triggered on an
908
+ * an embedded object in the app
592
909
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
910
+ * @example
911
+ *```js
912
+ * //trigger when action starts
913
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
914
+ * console.log('Export TML', payload)}, { start: true })
915
+ * //trigger when action ends
916
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
917
+ * console.log('Export TML', payload)})
918
+ *```
593
919
  */
594
920
  EmbedEvent["ExportTML"] = "exportTSL";
595
921
  /**
596
- * Emitted when an answer is saved as a view
922
+ * Emitted when an Answer is saved as a View.
597
923
  *
598
924
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
925
+ * @example
926
+ *```js
927
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
928
+ * console.log('View', payload);
929
+ * })
930
+ *```
599
931
  */
600
932
  EmbedEvent["SaveAsView"] = "saveAsView";
601
933
  /**
602
- * Emitted when copy of existing answer on the app
934
+ * Emitted when the user creates a copy of an Answer
603
935
  *
604
936
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
937
+ * @example
938
+ *```js
939
+ * //trigger when action starts
940
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
941
+ * console.log('Copy and edit', payload)}, {start: true })
942
+ * //trigger when action ends
943
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
944
+ * console.log('Copy and edit', payload)})
945
+ *```
605
946
  */
606
947
  EmbedEvent["CopyAEdit"] = "copyAEdit";
607
948
  /**
608
- * Emitted when a user clicks Show underlying data on an answe
949
+ * Emitted when a user clicks Show underlying data on an Answer
609
950
  *
610
951
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
952
+ * @example
953
+ *```js
954
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
955
+ * console.log('show data', payload);
956
+ * })
957
+ *```
611
958
  */
612
959
  EmbedEvent["ShowUnderlyingData"] = "showUnderlyingData";
613
960
  /**
614
- * Emitted when an answer is switched to a chart or table view
961
+ * Emitted when an answer is switched to a chart or table view.
615
962
  *
616
963
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
964
+ * @example
965
+ *```js
966
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
967
+ * console.log('switch view', payload);
968
+ * })
969
+ *```
617
970
  */
618
971
  EmbedEvent["AnswerChartSwitcher"] = "answerChartSwitcher";
619
972
  /**
620
- * Internal event to communicate the initial settings back to the TS APP
973
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
621
974
  *
622
975
  * @hidden
623
976
  */
624
977
  EmbedEvent["APP_INIT"] = "appInit";
625
978
  /**
626
- * Emitted when a user clicks Show Liveboard details on a Liveboard
979
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
627
980
  *
628
981
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
982
+ * @example
983
+ *```js
984
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
985
+ * console.log('Liveboard details', payload);
986
+ * })
987
+ *```
629
988
  */
630
989
  EmbedEvent["LiveboardInfo"] = "pinboardInfo";
631
990
  /**
632
991
  * Emitted when a user clicks on the Favorite icon on a Liveboard
633
992
  *
634
993
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
994
+ * @example
995
+ *```js
996
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
997
+ * console.log('favorites', payload);
998
+ * })
999
+ *```
635
1000
  */
636
1001
  EmbedEvent["AddToFavorites"] = "addToFavorites";
637
1002
  /**
638
- * Emitted when a user clicks Schedule on a Liveboard
1003
+ * Emitted when a user clicks **Schedule** on a Liveboard
639
1004
  *
640
1005
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1006
+ * @example
1007
+ *```js
1008
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
1009
+ * console.log(`Liveboard schedule', payload);
1010
+ * })
1011
+ *```
641
1012
  */
642
1013
  EmbedEvent["Schedule"] = "subscription";
643
1014
  /**
644
- * Emitted when a user clicks Edit on a Liveboard or visualization
1015
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
645
1016
  *
646
1017
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1018
+ * @example
1019
+ *```js
1020
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
1021
+ * console.log(`Liveboard edit', payload);
1022
+ * })
1023
+ *```
647
1024
  */
648
1025
  EmbedEvent["Edit"] = "edit";
649
1026
  /**
650
- * Emitted when a user clicks Make a copy on a Liveboard
1027
+ * Emitted when a user clicks *Make a copy* on a Liveboard
651
1028
  *
652
1029
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1030
+ * @example
1031
+ *```js
1032
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
1033
+ * console.log(`Copy', payload);
1034
+ * })
1035
+ *```
653
1036
  */
654
1037
  EmbedEvent["MakeACopy"] = "makeACopy";
655
1038
  /**
656
- * Emitted when a user clicks Present on a Liveboard or visualization
1039
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
657
1040
  *
658
1041
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1042
+ * @example
1043
+ *```js
1044
+ * liveboardEmbed.trigger(HostEvent.Present)
1045
+ *```
1046
+ *
1047
+ * @example
1048
+ *```js
1049
+ * liveboardEmbed.on(EmbedEvent.Present, {
1050
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1051
+ * })
1052
+ *```
659
1053
  */
660
1054
  EmbedEvent["Present"] = "present";
661
1055
  /**
662
- * Emitted when a user clicks Delete on a Liveboard
1056
+ * Emitted when a user clicks **Delete** on a visualization
663
1057
  *
664
1058
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1059
+ * @example
1060
+ *```js
1061
+ * liveboardEmbed.trigger(HostEvent.Delete,
1062
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1063
+ *```
1064
+ *
665
1065
  */
666
1066
  EmbedEvent["Delete"] = "delete";
667
1067
  /**
668
1068
  * Emitted when a user clicks Manage schedules on a Liveboard
669
1069
  *
670
1070
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1071
+ *
1072
+ * @example
1073
+ *```js
1074
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
1075
+ *```
1076
+ *
671
1077
  */
672
1078
  EmbedEvent["SchedulesList"] = "schedule-list";
673
1079
  /**
674
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
1080
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
675
1081
  *
676
1082
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1083
+ *
1084
+ * @example
1085
+ *```js
1086
+ * liveboardEmbed.trigger(HostEvent.Cancel)
1087
+ *```
1088
+ *
677
1089
  */
678
1090
  EmbedEvent["Cancel"] = "cancel";
679
1091
  /**
680
- * Emitted when a user clicks Explore on a visualization
1092
+ * Emitted when a user clicks **Explore** on a visualization
681
1093
  *
682
1094
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1095
+ *
1096
+ * @example
1097
+ *```js
1098
+ * liveboardEmbed.trigger(HostEvent.Explore, {
1099
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1100
+ *```
1101
+ *
683
1102
  */
684
1103
  EmbedEvent["Explore"] = "explore";
685
1104
  /**
686
- * Emitted when a user clicks Copy link action on a visualization
1105
+ * Emitted when a user clicks **Copy link** action on a visualization
687
1106
  *
688
1107
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1108
+ *
1109
+ * @example
1110
+ *```js
1111
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
1112
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1113
+ *```
1114
+ *
689
1115
  */
690
1116
  EmbedEvent["CopyLink"] = "embedDocument";
691
1117
  /**
692
- * Emitted when a user interacts with cross filters on a visualization or liveboard
1118
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
1119
+ *
1120
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1121
+ *
1122
+ * @example
1123
+ *```js
1124
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
1125
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1126
+ *```
693
1127
  *
694
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
695
1128
  */
696
1129
  EmbedEvent["CrossFilterChanged"] = "cross-filter-changed";
697
1130
  /**
698
1131
  * Emitted when a user right clicks on a visualization (chart or table)
699
1132
  *
700
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1133
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
1134
+ *
1135
+ * @example
1136
+ *```js
1137
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
1138
+ * console.log('VizPointClick', payload)
1139
+ * })
1140
+ *```
701
1141
  */
702
1142
  EmbedEvent["VizPointRightClick"] = "vizPointRightClick";
703
1143
  /**
704
- * Emitted when a user clicks on Insert to slide on a visualization
1144
+ * Emitted when a user clicks **Insert to slide** on a visualization
705
1145
  *
706
1146
  * @hidden
707
1147
  */
@@ -709,52 +1149,53 @@ export var EmbedEvent;
709
1149
  /**
710
1150
  * @hidden
711
1151
  * Emitted when a user changes any filter on a Liveboard.
712
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1152
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
713
1153
  */
714
1154
  EmbedEvent["FilterChanged"] = "filterChanged";
715
1155
  /**
716
- * Emitted when a user click on Go button in Sage Embed
1156
+ * Emitted when a user clicks the **Go** button on the Search page
717
1157
  *
718
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1158
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
719
1159
  */
720
1160
  EmbedEvent["SageEmbedQuery"] = "sageEmbedQuery";
721
1161
  /**
722
- * Emitten when a user select data source in Sage Embed
1162
+ * Emitted when a user selects a data source.
1163
+ *
1164
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
723
1165
  *
724
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
725
1166
  */
726
1167
  EmbedEvent["SageWorksheetUpdated"] = "sageWorksheetUpdated";
727
1168
  /**
728
- * Emitted when a user updates a connection in Data tab
1169
+ * Emitted when a user updates a connection on the **Data** page
729
1170
  *
730
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1171
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
731
1172
  */
732
1173
  EmbedEvent["UpdateConnection"] = "updateConnection";
733
1174
  /**
734
- * Emitted when a user updates a connection in Data tab
1175
+ * Emitted when a user updates a connection on the **Data** page
735
1176
  *
736
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
1177
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
737
1178
  */
738
1179
  EmbedEvent["CreateConnection"] = "createConnection";
739
1180
  /**
740
1181
  * Emitted when name, status (private or public) or filter values of a
741
- * PersonalisedView is updated.
1182
+ * Personalised view is updated.
742
1183
  *
743
1184
  * @returns viewName: string
744
1185
  * @returns viewId: string
745
1186
  * @returns liveboardId: string
746
1187
  * @returns isPublic: boolean
747
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1188
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
748
1189
  */
749
1190
  EmbedEvent["UpdatePersonalisedView"] = "updatePersonalisedView";
750
1191
  /**
751
- * Emitted when a PersonalisedView is saved.
1192
+ * Emitted when a Personalised view is saved.
752
1193
  *
753
1194
  * @returns viewName: string
754
1195
  * @returns viewId: string
755
1196
  * @returns liveboardId: string
756
1197
  * @returns isPublic: boolean
757
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1198
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
758
1199
  */
759
1200
  EmbedEvent["SavePersonalisedView"] = "savePersonalisedView";
760
1201
  /**
@@ -764,7 +1205,7 @@ export var EmbedEvent;
764
1205
  * @returns viewId: string
765
1206
  * @returns liveboardId: string
766
1207
  * @returns isPublic: boolean
767
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1208
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
768
1209
  */
769
1210
  EmbedEvent["ResetLiveboard"] = "resetLiveboard";
770
1211
  /**
@@ -772,11 +1213,11 @@ export var EmbedEvent;
772
1213
  *
773
1214
  * @returns views: string[]
774
1215
  * @returns liveboardId: string
775
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
1216
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
776
1217
  */
777
1218
  EmbedEvent["DeletePersonalisedView"] = "deletePersonalisedView";
778
1219
  /**
779
- * Emitten when a user creates a new worksheet
1220
+ * Emitted when a user creates a new worksheet
780
1221
  *
781
1222
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
782
1223
  */
@@ -808,15 +1249,16 @@ export var EmbedEvent;
808
1249
  export var HostEvent;
809
1250
  (function (HostEvent) {
810
1251
  /**
811
- * Triggers a search query in AppEmbed and SearchEmbed
812
- * deployments.
1252
+ * Triggers a search operation with the search tokens specified in
1253
+ * the search query string.
1254
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
813
1255
  * Includes the following properties:
814
1256
  *
815
- * @param - dataSourceIds - The data source GUID to Search on
1257
+ * @param - `searchQuery` - query string with search tokens
1258
+ * @param - `dataSources` - Data source GUID to Search on
816
1259
  * - Although an array, only a single source
817
1260
  * is supported.
818
- * @param - searchQuery - Query string with search tokens
819
- * @param - execute - executes the existing / updated query
1261
+ * @param - `execute` - executes search and updates the existing query
820
1262
  * @example
821
1263
  * ```js
822
1264
  * searchembed.trigger(HostEvent.Search, {
@@ -836,6 +1278,10 @@ export var HostEvent;
836
1278
  * @param - columnGuid - Optional. GUID of the column to drill
837
1279
  * by. If not provided it will auto drill by the configured
838
1280
  * column.
1281
+ * @param - autoDrillDown - Optional. If true, the drill down will be
1282
+ * done automatically on the most popular column.
1283
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
1284
+ * in case of a liveboard.
839
1285
  * @example
840
1286
  * ```js
841
1287
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -852,6 +1298,25 @@ export var HostEvent;
852
1298
  * });
853
1299
  * })
854
1300
  * ```
1301
+ * @example
1302
+ * ```js
1303
+ * // Works with TS 9.8.0 and above
1304
+ *
1305
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1306
+ * console.log(payload);
1307
+ * const clickedPoint = payload.data.clickedPoint;
1308
+ * const selectedPoint = payload.data.selectedPoints;
1309
+ * console.log('>>> called', clickedPoint);
1310
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
1311
+ * points: {
1312
+ * clickedPoint,
1313
+ * selectedPoints: selectedPoint
1314
+ * },
1315
+ * autoDrillDown: true,
1316
+ * vizId: payload.data.vizId
1317
+ * });
1318
+ * })
1319
+ * ```
855
1320
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
856
1321
  */
857
1322
  HostEvent["DrillDown"] = "triggerDrillDown";
@@ -868,7 +1333,7 @@ export var HostEvent;
868
1333
  */
869
1334
  HostEvent["Reload"] = "reload";
870
1335
  /**
871
- * Sets the visible visualizations on a Liveboard.
1336
+ * Display specific visualizations on a Liveboard.
872
1337
  *
873
1338
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
874
1339
  * in this parameter will be hidden.
@@ -882,7 +1347,7 @@ export var HostEvent;
882
1347
  */
883
1348
  HostEvent["SetVisibleVizs"] = "SetPinboardVisibleVizs";
884
1349
  /**
885
- * Set the Active Tab of a Liveboard.
1350
+ * Set a Liveboard tab as an active tab.
886
1351
  *
887
1352
  * @param - tabId - string of id of Tab to show
888
1353
  * @example
@@ -895,7 +1360,7 @@ export var HostEvent;
895
1360
  */
896
1361
  HostEvent["SetActiveTab"] = "SetActiveTab";
897
1362
  /**
898
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
1363
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
899
1364
  * runtime filters passed here are appended to the existing runtime
900
1365
  * filters.
901
1366
  * Pass an array of runtime filters with the following attributes:
@@ -921,10 +1386,12 @@ export var HostEvent;
921
1386
  */
922
1387
  HostEvent["UpdateRuntimeFilters"] = "UpdateRuntimeFilters";
923
1388
  /**
924
- * Navigate to a specific page in the embedded application without reloading the page.
1389
+ * Navigate to a specific page in the embedded ThoughtSpot application.
925
1390
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
926
1391
  *
927
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
1392
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
1393
+ * be a number; for example, `1`, `-1`.
1394
+ *
928
1395
  * @example
929
1396
  * ```js
930
1397
  * appEmbed.navigateToPage(-1)
@@ -933,7 +1400,7 @@ export var HostEvent;
933
1400
  */
934
1401
  HostEvent["Navigate"] = "Navigate";
935
1402
  /**
936
- * Opens the filter panel for a particular column.
1403
+ * Open the filter panel for a particular column.
937
1404
  * Works with Search and Liveboard embed.
938
1405
  *
939
1406
  * @param - { columnId: string,
@@ -951,7 +1418,7 @@ export var HostEvent;
951
1418
  */
952
1419
  HostEvent["OpenFilter"] = "openFilter";
953
1420
  /**
954
- * Adds columns to the current search query.
1421
+ * Add columns to the current search query.
955
1422
  *
956
1423
  * @param - { columnIds: string[] }
957
1424
  * @example
@@ -962,7 +1429,7 @@ export var HostEvent;
962
1429
  */
963
1430
  HostEvent["AddColumns"] = "addColumns";
964
1431
  /**
965
- * Removes a column from the current search query.
1432
+ * Remove a column from the current search query.
966
1433
  *
967
1434
  * @param - { columnId: string }
968
1435
  * @example
@@ -973,27 +1440,29 @@ export var HostEvent;
973
1440
  */
974
1441
  HostEvent["RemoveColumn"] = "removeColumn";
975
1442
  /**
976
- * Gets the current Liveboard content.
1443
+ * Get the transient state of a Liveboard as encoded content.
1444
+ * This includes unsaved and ad hoc changes such as
1445
+ * Liveboard filters, runtime filters applied on visualizations on a
1446
+ * Liveboard, and Liveboard layout, changes to visualizations such as
1447
+ * sorting, toggling of legends, and data drill down.
977
1448
  *
978
1449
  * @example
979
1450
  * ```js
980
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
1451
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
1452
+ * data=>console.log(data))
981
1453
  * ```
982
1454
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
983
1455
  */
984
1456
  HostEvent["getExportRequestForCurrentPinboard"] = "getExportRequestForCurrentPinboard";
985
1457
  /**
986
- * Triggers the **Pin** action on an embedded object
1458
+ * Trigger the **Pin** action on an embedded object
987
1459
  *
988
1460
  * @param - Liveboard embed takes the `vizId` as a
989
- * key. Can be left undefined when embedding Search, full app or
1461
+ * key. Can be left undefined when embedding Search, full app, or
990
1462
  * a visualization.
991
1463
  * @example
992
1464
  * ```js
993
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
994
- * ```
995
- * ```js
996
- * vizEmbed.trigger(HostEvent.Pin)
1465
+ * appEmbed.trigger(HostEvent.Pin)
997
1466
  * ```
998
1467
  * ```js
999
1468
  * searchEmbed.trigger(HostEvent.Pin)
@@ -1002,17 +1471,18 @@ export var HostEvent;
1002
1471
  */
1003
1472
  HostEvent["Pin"] = "pin";
1004
1473
  /**
1005
- * Triggers the **Show Liveboard details** action on a Liveboard
1474
+ * Trigger the **Show Liveboard details** action
1475
+ * on an embedded Liveboard.
1006
1476
  *
1007
1477
  * @example
1008
- * ```js
1009
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1010
- * ```
1478
+ *```js
1479
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
1480
+ *```
1011
1481
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
1012
1482
  */
1013
1483
  HostEvent["LiveboardInfo"] = "pinboardInfo";
1014
1484
  /**
1015
- * Triggers the **Schedule** action on a Liveboard
1485
+ * Trigger the **Schedule** action on an embedded Liveboard.
1016
1486
  *
1017
1487
  * @example
1018
1488
  * ```js
@@ -1022,7 +1492,7 @@ export var HostEvent;
1022
1492
  */
1023
1493
  HostEvent["Schedule"] = "subscription";
1024
1494
  /**
1025
- * Triggers the **Manage schedule** action on a Liveboard
1495
+ * Trigger the **Manage schedule** action on an embedded Liveboard
1026
1496
  *
1027
1497
  * @example
1028
1498
  * ```js
@@ -1032,7 +1502,7 @@ export var HostEvent;
1032
1502
  */
1033
1503
  HostEvent["SchedulesList"] = "schedule-list";
1034
1504
  /**
1035
- * Triggers the **Export TML** action on a Liveboard
1505
+ * Trigger the **Export TML** action on an embedded Liveboard.
1036
1506
  *
1037
1507
  * @example
1038
1508
  * ```js
@@ -1042,7 +1512,7 @@ export var HostEvent;
1042
1512
  */
1043
1513
  HostEvent["ExportTML"] = "exportTSL";
1044
1514
  /**
1045
- * Triggers the **Edit TML** action on a Liveboard
1515
+ * Trigger the **Edit TML** action on an embedded Liveboard.
1046
1516
  *
1047
1517
  * @example
1048
1518
  * ```js
@@ -1052,7 +1522,7 @@ export var HostEvent;
1052
1522
  */
1053
1523
  HostEvent["EditTML"] = "editTSL";
1054
1524
  /**
1055
- * Triggers the **Update TML** action on a Liveboard
1525
+ * Trigger the **Update TML** action on an embedded Liveboard.
1056
1526
  *
1057
1527
  * @example
1058
1528
  * ```js
@@ -1062,7 +1532,7 @@ export var HostEvent;
1062
1532
  */
1063
1533
  HostEvent["UpdateTML"] = "updateTSL";
1064
1534
  /**
1065
- * Triggers the **Download PDF** action on a Liveboard
1535
+ * Trigger the **Download PDF** action on an embedded Liveboard.
1066
1536
  *
1067
1537
  * @example
1068
1538
  * ```js
@@ -1072,8 +1542,8 @@ export var HostEvent;
1072
1542
  */
1073
1543
  HostEvent["DownloadAsPdf"] = "downloadAsPdf";
1074
1544
  /**
1075
- * Triggers the **Make a copy** action on a Liveboard, Search, or
1076
- * visualization page
1545
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
1546
+ * visualization page.
1077
1547
  *
1078
1548
  * @example
1079
1549
  * ```js
@@ -1089,7 +1559,7 @@ export var HostEvent;
1089
1559
  */
1090
1560
  HostEvent["MakeACopy"] = "makeACopy";
1091
1561
  /**
1092
- * Triggers the **Delete** action on a Liveboard
1562
+ * Trigger the **Delete** action for a Liveboard.
1093
1563
  *
1094
1564
  * @example
1095
1565
  * ```js
@@ -1099,7 +1569,7 @@ export var HostEvent;
1099
1569
  */
1100
1570
  HostEvent["Remove"] = "delete";
1101
1571
  /**
1102
- * Triggers the **Explore* action on a visualization
1572
+ * Trigger the **Explore** action on a visualization.
1103
1573
  *
1104
1574
  * @param - an object with `vizId` as a key
1105
1575
  * @example
@@ -1110,7 +1580,7 @@ export var HostEvent;
1110
1580
  */
1111
1581
  HostEvent["Explore"] = "explore";
1112
1582
  /**
1113
- * Triggers the **Create alert** action on a visualization
1583
+ * Trigger the **Create alert** action on a visualization
1114
1584
  *
1115
1585
  * @param - an object with `vizId` as a key
1116
1586
  * @example
@@ -1123,7 +1593,7 @@ export var HostEvent;
1123
1593
  */
1124
1594
  HostEvent["CreateMonitor"] = "createMonitor";
1125
1595
  /**
1126
- * Triggers the **Manage alerts** action on a visualization
1596
+ * Trigger the **Manage alerts** action on a visualization
1127
1597
  *
1128
1598
  * @param - an object with `vizId` as a key
1129
1599
  * @example
@@ -1136,7 +1606,7 @@ export var HostEvent;
1136
1606
  */
1137
1607
  HostEvent["ManageMonitor"] = "manageMonitor";
1138
1608
  /**
1139
- * Triggers the **Edit** action on a Liveboard or visualization
1609
+ * Trigger the **Edit** action on a Liveboard or visualization
1140
1610
  *
1141
1611
  * @param - object - To trigger the action for a specific visualization
1142
1612
  * in Liveboard embed, pass in `vizId` as a key.
@@ -1157,7 +1627,7 @@ export var HostEvent;
1157
1627
  */
1158
1628
  HostEvent["Edit"] = "edit";
1159
1629
  /**
1160
- * Triggers the **Copy link** action on a Liveboard or visualization
1630
+ * Trigger the **Copy link** action on a Liveboard or visualization
1161
1631
  *
1162
1632
  * @param - object - to trigger the action for a
1163
1633
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -1175,7 +1645,7 @@ export var HostEvent;
1175
1645
  */
1176
1646
  HostEvent["CopyLink"] = "embedDocument";
1177
1647
  /**
1178
- * Triggers the **Present** action on a Liveboard or visualization
1648
+ * Trigger the **Present** action on a Liveboard or visualization
1179
1649
  *
1180
1650
  * @param - object - to trigger the action for a specific visualization
1181
1651
  * in Liveboard embed, pass in `vizId` as a key
@@ -1193,7 +1663,7 @@ export var HostEvent;
1193
1663
  */
1194
1664
  HostEvent["Present"] = "present";
1195
1665
  /**
1196
- * Gets TML for the current search.
1666
+ * Get TML for the current search.
1197
1667
  *
1198
1668
  * @example
1199
1669
  * ```js
@@ -1208,7 +1678,7 @@ export var HostEvent;
1208
1678
  */
1209
1679
  HostEvent["GetTML"] = "getTML";
1210
1680
  /**
1211
- * Triggers the **Show underlying data** action on visualization or search
1681
+ * Trigger the **Show underlying data** action on visualization or search
1212
1682
  *
1213
1683
  * @param - an object with vizId as a key
1214
1684
  * @example
@@ -1226,7 +1696,9 @@ export var HostEvent;
1226
1696
  */
1227
1697
  HostEvent["ShowUnderlyingData"] = "showUnderlyingData";
1228
1698
  /**
1229
- * Triggers the **Delete** action on visualization or search
1699
+ * Trigger the **Delete** action for a visualization
1700
+ * in an embedded Liveboard, or a chart or table
1701
+ * generated from Search.
1230
1702
  *
1231
1703
  * @param - Liveboard embed takes an object with `vizId` as a key.
1232
1704
  * Can be left empty if embedding Search or visualization.
@@ -1236,16 +1708,13 @@ export var HostEvent;
1236
1708
  * '730496d6-6903-4601-937e-2c691821af3c'})
1237
1709
  * ```
1238
1710
  * ```js
1239
- * vizEmbed.trigger(HostEvent.Delete)
1240
- * ```
1241
- * ```js
1242
1711
  * searchEmbed.trigger(HostEvent.Delete)
1243
1712
  * ```
1244
1713
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1245
1714
  */
1246
1715
  HostEvent["Delete"] = "onDeleteAnswer";
1247
1716
  /**
1248
- * Triggers the **SpotIQ analyze** action on visualization
1717
+ * Trigger the **SpotIQ analyze** action on visualization
1249
1718
  * or search.
1250
1719
  *
1251
1720
  * @param - Liveboard embed takes `vizId` as a
@@ -1266,7 +1735,7 @@ export var HostEvent;
1266
1735
  */
1267
1736
  HostEvent["SpotIQAnalyze"] = "spotIQAnalyze";
1268
1737
  /**
1269
- * Triggers the **Download** action on charts in
1738
+ * Trigger the **Download** action on charts in
1270
1739
  * the embedded view.
1271
1740
  *
1272
1741
  * @example
@@ -1275,17 +1744,15 @@ export var HostEvent;
1275
1744
  * '730496d6-6903-4601-937e-2c691821af3c'})
1276
1745
  * ```
1277
1746
  * ```js
1278
- * vizEmbed.trigger(HostEvent.Download)
1279
- * ```
1280
- * ```js
1281
- * searchEmbed.trigger(HostEvent.Download)
1747
+ * embed.trigger(HostEvent.Download)
1282
1748
  * ```
1283
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
1749
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
1750
+ * Use {@link DownloadAsPng}
1284
1751
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
1285
1752
  */
1286
1753
  HostEvent["Download"] = "downloadAsPng";
1287
1754
  /**
1288
- * Triggers the **Download** > **PNG** action on
1755
+ * Trigger the **Download** > **PNG** action on
1289
1756
  * charts in the embedded view.
1290
1757
  *
1291
1758
  * @example
@@ -1301,7 +1768,7 @@ export var HostEvent;
1301
1768
  */
1302
1769
  HostEvent["DownloadAsPng"] = "downloadAsPng";
1303
1770
  /**
1304
- * Triggers the **Download** > **CSV** action on tables in
1771
+ * Trigger the **Download** > **CSV** action on tables in
1305
1772
  * the embedded view.
1306
1773
  *
1307
1774
  * @example
@@ -1319,7 +1786,7 @@ export var HostEvent;
1319
1786
  */
1320
1787
  HostEvent["DownloadAsCsv"] = "downloadAsCSV";
1321
1788
  /**
1322
- * Triggers the **Download** > **XLSX** action on tables
1789
+ * Trigger the **Download** > **XLSX** action on tables
1323
1790
  * in the embedded view.
1324
1791
  *
1325
1792
  * @example
@@ -1337,7 +1804,7 @@ export var HostEvent;
1337
1804
  */
1338
1805
  HostEvent["DownloadAsXlsx"] = "downloadAsXLSX";
1339
1806
  /**
1340
- * Triggers the **Share** action on an embedded
1807
+ * Trigger the **Share** action on an embedded
1341
1808
  * Liveboard or Answer.
1342
1809
  *
1343
1810
  * @example
@@ -1351,7 +1818,7 @@ export var HostEvent;
1351
1818
  */
1352
1819
  HostEvent["Share"] = "share";
1353
1820
  /**
1354
- * Triggers the **Save** action on a Liveboard or Answer.
1821
+ * Trigger the **Save** action on a Liveboard or Answer.
1355
1822
  * Saves the changes.
1356
1823
  *
1357
1824
  * @example
@@ -1365,7 +1832,7 @@ export var HostEvent;
1365
1832
  */
1366
1833
  HostEvent["Save"] = "save";
1367
1834
  /**
1368
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
1835
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
1369
1836
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
1370
1837
  *
1371
1838
  * @param - an object with `vizId` as a key
@@ -1381,7 +1848,7 @@ export var HostEvent;
1381
1848
  */
1382
1849
  HostEvent["SyncToSheets"] = "sync-to-sheets";
1383
1850
  /**
1384
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
1851
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
1385
1852
  * Sends data from an Answer or Liveboard visualization to third-party apps such
1386
1853
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
1387
1854
  *
@@ -1398,7 +1865,7 @@ export var HostEvent;
1398
1865
  */
1399
1866
  HostEvent["SyncToOtherApps"] = "sync-to-other-apps";
1400
1867
  /**
1401
- * Triggers the **Manage pipelines** action on an embedded
1868
+ * Trigger the **Manage pipelines** action on an embedded
1402
1869
  * visualization or Answer.
1403
1870
  * Allows users to manage ThoughtSpot Sync pipelines.
1404
1871
  *
@@ -1415,18 +1882,21 @@ export var HostEvent;
1415
1882
  */
1416
1883
  HostEvent["ManagePipelines"] = "manage-pipeline";
1417
1884
  /**
1418
- * Triggers the Reset search on the Search page
1885
+ * Reset search operation on the Search or Answer page.
1419
1886
  *
1420
1887
  * @example
1421
1888
  * ```js
1422
1889
  * searchEmbed.trigger(HostEvent.ResetSearch)
1423
1890
  * ```
1891
+ * ```js
1892
+ * appEmbed.trigger(HostEvent.ResetSearch)
1893
+ * ```
1424
1894
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
1425
1895
  */
1426
1896
  HostEvent["ResetSearch"] = "resetSearch";
1427
1897
  /**
1428
1898
  * @hidden
1429
- * Gets the currents visible and runtime filters applied on a Liveboard
1899
+ * Get the currents visible and runtime filters applied on a Liveboard
1430
1900
  * @example
1431
1901
  * liveboardEmbed.trigger(HostEvent.GetFilters)
1432
1902
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -1434,7 +1904,7 @@ export var HostEvent;
1434
1904
  HostEvent["GetFilters"] = "getFilters";
1435
1905
  /**
1436
1906
  * @hidden
1437
- * Updates the visible filters on the Liveboard.
1907
+ * Update the visible filters on the Liveboard.
1438
1908
  * @param - filter: filter object containing column name and filter operation and values
1439
1909
  * @example
1440
1910
  *
@@ -1447,7 +1917,7 @@ export var HostEvent;
1447
1917
  */
1448
1918
  HostEvent["UpdateFilters"] = "updateFilters";
1449
1919
  /**
1450
- * Get Tab for the current Liveboard.
1920
+ * Get tab details for the current Liveboard.
1451
1921
  *
1452
1922
  * @example
1453
1923
  * ```js
@@ -1461,9 +1931,9 @@ export var HostEvent;
1461
1931
  */
1462
1932
  HostEvent["GetTabs"] = "getTabs";
1463
1933
  /**
1464
- * Set the visible Tabs on a Liveboard.
1934
+ * Set the visible tabs on a Liveboard.
1465
1935
  *
1466
- * @param - an array of ids of Tabs to show, the ids not passed
1936
+ * @param - an array of ids of tabs to show, the IDs not passed
1467
1937
  * will be hidden.
1468
1938
  * @example
1469
1939
  * ```js
@@ -1477,8 +1947,8 @@ export var HostEvent;
1477
1947
  /**
1478
1948
  * Set the hidden tabs on a Liveboard.
1479
1949
  *
1480
- * @param - an array of ids of Tabs to hide, the ids not passed
1481
- * will be shown.
1950
+ * @param - an array of the IDs of the tabs to hide.
1951
+ * The IDs not passed will be shown.
1482
1952
  * @example
1483
1953
  * ```js
1484
1954
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -1489,9 +1959,12 @@ export var HostEvent;
1489
1959
  */
1490
1960
  HostEvent["SetHiddenTabs"] = "SetPinboardHiddenTabs";
1491
1961
  /**
1492
- * Updates the search query for sage embed.
1962
+ * Updates the search query string for Natural Language Search operations.
1963
+ *
1964
+ * @param - `queryString`: Text string in Natural Language format
1965
+ *
1966
+ * @param - `executeSearch`: Boolean to execute search and update search query
1493
1967
  *
1494
- * @param - searchOptions: an object queryString and option to execute the query.
1495
1968
  * @example
1496
1969
  * ```js
1497
1970
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -1499,7 +1972,7 @@ export var HostEvent;
1499
1972
  * executeSearch: true,
1500
1973
  * })
1501
1974
  * ```
1502
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
1975
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
1503
1976
  */
1504
1977
  HostEvent["UpdateSageQuery"] = "updateSageQuery";
1505
1978
  /**
@@ -1512,26 +1985,27 @@ export var HostEvent;
1512
1985
  * vizId: '123', // For Liveboard Visualization.
1513
1986
  * })
1514
1987
  * ```
1988
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
1515
1989
  */
1516
1990
  HostEvent["GetAnswerSession"] = "getAnswerSession";
1517
1991
  })(HostEvent || (HostEvent = {}));
1518
1992
  /**
1519
1993
  * The different visual modes that the data sources panel within
1520
- * search could appear in, i.e., hidden, collapsed, or expanded.
1994
+ * search could appear in, such as hidden, collapsed, or expanded.
1521
1995
  */
1522
1996
  // eslint-disable-next-line no-shadow
1523
1997
  export var DataSourceVisualMode;
1524
1998
  (function (DataSourceVisualMode) {
1525
1999
  /**
1526
- * Data source panel is hidden.
2000
+ * The data source panel is hidden.
1527
2001
  */
1528
2002
  DataSourceVisualMode["Hidden"] = "hide";
1529
2003
  /**
1530
- * Data source panel is collapsed, but the user can manually expand it.
2004
+ * The data source panel is collapsed, but the user can manually expand it.
1531
2005
  */
1532
2006
  DataSourceVisualMode["Collapsed"] = "collapse";
1533
2007
  /**
1534
- * Data source panel is expanded, but the user can manually collapse it.
2008
+ * The data source panel is expanded, but the user can manually collapse it.
1535
2009
  */
1536
2010
  DataSourceVisualMode["Expanded"] = "expand";
1537
2011
  })(DataSourceVisualMode || (DataSourceVisualMode = {}));
@@ -1611,6 +2085,9 @@ export var Param;
1611
2085
  Param["IsProductTour"] = "isProductTour";
1612
2086
  Param["HideSearchBarTitle"] = "hideSearchBarTitle";
1613
2087
  Param["HideSageAnswerHeader"] = "hideSageAnswerHeader";
2088
+ Param["HideSearchBar"] = "hideSearchBar";
2089
+ Param["ClientLogLevel"] = "clientLogLevel";
2090
+ Param["OverrideNativeConsole"] = "overrideConsoleLogs";
1614
2091
  })(Param || (Param = {}));
1615
2092
  /**
1616
2093
  * ThoughtSpot application pages include actions and menu commands
@@ -1672,9 +2149,11 @@ export var Action;
1672
2149
  Action["SaveAsView"] = "saveAsView";
1673
2150
  /**
1674
2151
  * The **Make a copy** action on a Liveboard or Answer
1675
- * page.
1676
- * Creates a copy of the Liveboard, visualization,
1677
- * or Answer.
2152
+ * page. Creates a copy of the Liveboard.
2153
+ * In LiveboardEmbed, the **Make a copy** action is not available for
2154
+ * visualizations in the embedded Liveboard view.
2155
+ * In AppEmbed, the **Make a copy** action is available on both
2156
+ * Liveboards and visualizations.
1678
2157
  *
1679
2158
  * @example
1680
2159
  * ```js
@@ -1858,7 +2337,7 @@ export var Action;
1858
2337
  */
1859
2338
  Action["DownloadAsPdf"] = "downloadAsPdf";
1860
2339
  /**
1861
- * The **Download** > **CSV** menu action for tables on a Liveboard
2340
+ * The **Download** > **CSV** menu action for tables on a Liveboard
1862
2341
  * or Answer page.
1863
2342
  * Downloads a visualization or Answer in the XLSX format.
1864
2343
  *
@@ -2389,6 +2868,7 @@ export var Action;
2389
2868
  */
2390
2869
  Action["RenameModalTitleDescription"] = "renameModalTitleDescription";
2391
2870
  /**
2871
+ *
2392
2872
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
2393
2873
  */
2394
2874
  Action["RequestVerification"] = "requestVerification";
@@ -2485,4 +2965,13 @@ export var ContextMenuTriggerOptions;
2485
2965
  ContextMenuTriggerOptions["LEFT_CLICK"] = "left-click";
2486
2966
  ContextMenuTriggerOptions["RIGHT_CLICK"] = "right-click";
2487
2967
  })(ContextMenuTriggerOptions || (ContextMenuTriggerOptions = {}));
2968
+ export var LogLevel;
2969
+ (function (LogLevel) {
2970
+ LogLevel["SILENT"] = "SILENT";
2971
+ LogLevel["ERROR"] = "ERROR";
2972
+ LogLevel["WARN"] = "WARN";
2973
+ LogLevel["INFO"] = "INFO";
2974
+ LogLevel["DEBUG"] = "DEBUG";
2975
+ LogLevel["TRACE"] = "TRACE";
2976
+ })(LogLevel || (LogLevel = {}));
2488
2977
  //# sourceMappingURL=types.js.map