@thoughtspot/visual-embed-sdk 1.20.2 → 1.20.3

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 (368) hide show
  1. package/README.md +1 -1
  2. package/cjs/package.json +171 -0
  3. package/cjs/src/auth.d.ts +183 -0
  4. package/cjs/src/auth.d.ts.map +1 -0
  5. package/cjs/src/auth.js +457 -0
  6. package/cjs/src/auth.js.map +1 -0
  7. package/cjs/src/auth.spec.d.ts +13 -0
  8. package/cjs/src/auth.spec.d.ts.map +1 -0
  9. package/cjs/src/auth.spec.js +397 -0
  10. package/cjs/src/auth.spec.js.map +1 -0
  11. package/cjs/src/config.d.ts +22 -0
  12. package/cjs/src/config.d.ts.map +1 -0
  13. package/cjs/src/config.js +70 -0
  14. package/cjs/src/config.js.map +1 -0
  15. package/cjs/src/config.spec.d.ts +5 -0
  16. package/cjs/src/config.spec.d.ts.map +1 -0
  17. package/cjs/src/config.spec.js +65 -0
  18. package/cjs/src/config.spec.js.map +1 -0
  19. package/cjs/src/embed/app.d.ts +168 -0
  20. package/cjs/src/embed/app.d.ts.map +1 -0
  21. package/cjs/src/embed/app.js +215 -0
  22. package/cjs/src/embed/app.js.map +1 -0
  23. package/cjs/src/embed/app.spec.d.ts +2 -0
  24. package/cjs/src/embed/app.spec.d.ts.map +1 -0
  25. package/cjs/src/embed/app.spec.js +239 -0
  26. package/cjs/src/embed/app.spec.js.map +1 -0
  27. package/cjs/src/embed/base.d.ts +79 -0
  28. package/cjs/src/embed/base.d.ts.map +1 -0
  29. package/cjs/src/embed/base.js +229 -0
  30. package/cjs/src/embed/base.js.map +1 -0
  31. package/cjs/src/embed/base.spec.d.ts +2 -0
  32. package/cjs/src/embed/base.spec.d.ts.map +1 -0
  33. package/cjs/src/embed/base.spec.js +198 -0
  34. package/cjs/src/embed/base.spec.js.map +1 -0
  35. package/cjs/src/embed/embed.spec.d.ts +2 -0
  36. package/cjs/src/embed/embed.spec.d.ts.map +1 -0
  37. package/cjs/src/embed/embed.spec.js +74 -0
  38. package/cjs/src/embed/embed.spec.js.map +1 -0
  39. package/cjs/src/embed/events.spec.d.ts +2 -0
  40. package/cjs/src/embed/events.spec.d.ts.map +1 -0
  41. package/cjs/src/embed/events.spec.js +238 -0
  42. package/cjs/src/embed/events.spec.js.map +1 -0
  43. package/cjs/src/embed/liveboard.d.ts +150 -0
  44. package/cjs/src/embed/liveboard.d.ts.map +1 -0
  45. package/cjs/src/embed/liveboard.js +168 -0
  46. package/cjs/src/embed/liveboard.js.map +1 -0
  47. package/cjs/src/embed/liveboard.spec.d.ts +2 -0
  48. package/cjs/src/embed/liveboard.spec.d.ts.map +1 -0
  49. package/cjs/src/embed/liveboard.spec.js +229 -0
  50. package/cjs/src/embed/liveboard.spec.js.map +1 -0
  51. package/cjs/src/embed/pinboard.spec.d.ts +2 -0
  52. package/cjs/src/embed/pinboard.spec.d.ts.map +1 -0
  53. package/cjs/src/embed/pinboard.spec.js +148 -0
  54. package/cjs/src/embed/pinboard.spec.js.map +1 -0
  55. package/cjs/src/embed/search-bar.d.ts +50 -0
  56. package/cjs/src/embed/search-bar.d.ts.map +1 -0
  57. package/cjs/src/embed/search-bar.js +63 -0
  58. package/cjs/src/embed/search-bar.js.map +1 -0
  59. package/cjs/src/embed/search.d.ts +129 -0
  60. package/cjs/src/embed/search.d.ts.map +1 -0
  61. package/cjs/src/embed/search.js +121 -0
  62. package/cjs/src/embed/search.js.map +1 -0
  63. package/cjs/src/embed/search.spec.d.ts +2 -0
  64. package/cjs/src/embed/search.spec.d.ts.map +1 -0
  65. package/cjs/src/embed/search.spec.js +238 -0
  66. package/cjs/src/embed/search.spec.js.map +1 -0
  67. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts +2 -0
  68. package/cjs/src/embed/searchEmbed-basic-auth.spec.d.ts.map +1 -0
  69. package/cjs/src/embed/searchEmbed-basic-auth.spec.js +103 -0
  70. package/cjs/src/embed/searchEmbed-basic-auth.spec.js.map +1 -0
  71. package/cjs/src/embed/ts-embed.d.ts +323 -0
  72. package/cjs/src/embed/ts-embed.d.ts.map +1 -0
  73. package/cjs/src/embed/ts-embed.js +719 -0
  74. package/cjs/src/embed/ts-embed.js.map +1 -0
  75. package/cjs/src/embed/ts-embed.spec.d.ts +2 -0
  76. package/cjs/src/embed/ts-embed.spec.d.ts.map +1 -0
  77. package/cjs/src/embed/ts-embed.spec.js +771 -0
  78. package/cjs/src/embed/ts-embed.spec.js.map +1 -0
  79. package/cjs/src/errors.d.ts +7 -0
  80. package/cjs/src/errors.d.ts.map +1 -0
  81. package/cjs/src/errors.js +10 -0
  82. package/cjs/src/errors.js.map +1 -0
  83. package/cjs/src/index.d.ts +18 -0
  84. package/cjs/src/index.d.ts.map +1 -0
  85. package/cjs/src/index.js +42 -0
  86. package/cjs/src/index.js.map +1 -0
  87. package/cjs/src/mixpanel-service.d.ts +29 -0
  88. package/cjs/src/mixpanel-service.d.ts.map +1 -0
  89. package/cjs/src/mixpanel-service.js +76 -0
  90. package/cjs/src/mixpanel-service.js.map +1 -0
  91. package/cjs/src/mixpanel-service.spec.d.ts +2 -0
  92. package/cjs/src/mixpanel-service.spec.d.ts.map +1 -0
  93. package/cjs/src/mixpanel-service.spec.js +63 -0
  94. package/cjs/src/mixpanel-service.spec.js.map +1 -0
  95. package/cjs/src/react/all-types-export.d.ts +3 -0
  96. package/cjs/src/react/all-types-export.d.ts.map +1 -0
  97. package/cjs/src/react/all-types-export.js +29 -0
  98. package/cjs/src/react/all-types-export.js.map +1 -0
  99. package/cjs/src/react/all-types-export.spec.d.ts +2 -0
  100. package/cjs/src/react/all-types-export.spec.d.ts.map +1 -0
  101. package/cjs/src/react/all-types-export.spec.js +13 -0
  102. package/cjs/src/react/all-types-export.spec.js.map +1 -0
  103. package/cjs/src/react/index.d.ts +95 -0
  104. package/cjs/src/react/index.d.ts.map +1 -0
  105. package/cjs/src/react/index.js +121 -0
  106. package/cjs/src/react/index.js.map +1 -0
  107. package/cjs/src/react/index.spec.d.ts +3 -0
  108. package/cjs/src/react/index.spec.d.ts.map +1 -0
  109. package/cjs/src/react/index.spec.js +138 -0
  110. package/cjs/src/react/index.spec.js.map +1 -0
  111. package/cjs/src/react/util.d.ts +19 -0
  112. package/cjs/src/react/util.d.ts.map +1 -0
  113. package/cjs/src/react/util.js +25 -0
  114. package/cjs/src/react/util.js.map +1 -0
  115. package/cjs/src/test/test-utils.d.ts +48 -0
  116. package/cjs/src/test/test-utils.d.ts.map +1 -0
  117. package/cjs/src/test/test-utils.js +108 -0
  118. package/cjs/src/test/test-utils.js.map +1 -0
  119. package/cjs/src/types.d.ts +2020 -0
  120. package/cjs/src/types.d.ts.map +1 -0
  121. package/cjs/src/types.js +1543 -0
  122. package/cjs/src/types.js.map +1 -0
  123. package/cjs/src/utils/answerService.d.ts +10 -0
  124. package/cjs/src/utils/answerService.d.ts.map +1 -0
  125. package/cjs/src/utils/answerService.js +61 -0
  126. package/cjs/src/utils/answerService.js.map +1 -0
  127. package/cjs/src/utils/answerService.spec.d.ts +2 -0
  128. package/cjs/src/utils/answerService.spec.d.ts.map +1 -0
  129. package/cjs/src/utils/answerService.spec.js +31 -0
  130. package/cjs/src/utils/answerService.spec.js.map +1 -0
  131. package/cjs/src/utils/authService.d.ts +37 -0
  132. package/cjs/src/utils/authService.d.ts.map +1 -0
  133. package/cjs/src/utils/authService.js +106 -0
  134. package/cjs/src/utils/authService.js.map +1 -0
  135. package/cjs/src/utils/authService.spec.d.ts +2 -0
  136. package/cjs/src/utils/authService.spec.d.ts.map +1 -0
  137. package/cjs/src/utils/authService.spec.js +72 -0
  138. package/cjs/src/utils/authService.spec.js.map +1 -0
  139. package/cjs/src/utils/processData.d.ts +16 -0
  140. package/cjs/src/utils/processData.d.ts.map +1 -0
  141. package/cjs/src/utils/processData.js +110 -0
  142. package/cjs/src/utils/processData.js.map +1 -0
  143. package/cjs/src/utils/processData.spec.d.ts +2 -0
  144. package/cjs/src/utils/processData.spec.d.ts.map +1 -0
  145. package/cjs/src/utils/processData.spec.js +142 -0
  146. package/cjs/src/utils/processData.spec.js.map +1 -0
  147. package/cjs/src/utils/processTrigger.d.ts +10 -0
  148. package/cjs/src/utils/processTrigger.d.ts.map +1 -0
  149. package/cjs/src/utils/processTrigger.js +63 -0
  150. package/cjs/src/utils/processTrigger.js.map +1 -0
  151. package/cjs/src/utils/processTrigger.spec.d.ts +2 -0
  152. package/cjs/src/utils/processTrigger.spec.d.ts.map +1 -0
  153. package/cjs/src/utils/processTrigger.spec.js +58 -0
  154. package/cjs/src/utils/processTrigger.spec.js.map +1 -0
  155. package/cjs/src/utils.d.ts +68 -0
  156. package/cjs/src/utils.d.ts.map +1 -0
  157. package/cjs/src/utils.js +196 -0
  158. package/cjs/src/utils.js.map +1 -0
  159. package/cjs/src/utils.spec.d.ts +5 -0
  160. package/cjs/src/utils.spec.d.ts.map +1 -0
  161. package/cjs/src/utils.spec.js +98 -0
  162. package/cjs/src/utils.spec.js.map +1 -0
  163. package/dist/src/auth.d.ts +54 -5
  164. package/dist/src/auth.d.ts.map +1 -1
  165. package/dist/src/auth.spec.d.ts +3 -0
  166. package/dist/src/auth.spec.d.ts.map +1 -1
  167. package/dist/src/config.d.ts +1 -0
  168. package/dist/src/config.d.ts.map +1 -1
  169. package/dist/src/embed/app.d.ts +35 -6
  170. package/dist/src/embed/app.d.ts.map +1 -1
  171. package/dist/src/embed/base.d.ts +20 -9
  172. package/dist/src/embed/base.d.ts.map +1 -1
  173. package/dist/src/embed/liveboard.d.ts +17 -5
  174. package/dist/src/embed/liveboard.d.ts.map +1 -1
  175. package/dist/src/embed/search-bar.d.ts +3 -0
  176. package/dist/src/embed/search-bar.d.ts.map +1 -1
  177. package/dist/src/embed/search.d.ts +9 -1
  178. package/dist/src/embed/search.d.ts.map +1 -1
  179. package/dist/src/embed/ts-embed.d.ts +65 -7
  180. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  181. package/dist/src/errors.d.ts.map +1 -1
  182. package/dist/src/index.d.ts +2 -2
  183. package/dist/src/index.d.ts.map +1 -1
  184. package/dist/src/mixpanel-service.d.ts +8 -0
  185. package/dist/src/mixpanel-service.d.ts.map +1 -1
  186. package/dist/src/react/all-types-export.d.ts +3 -0
  187. package/dist/src/react/all-types-export.d.ts.map +1 -0
  188. package/dist/src/react/all-types-export.spec.d.ts +2 -0
  189. package/dist/src/react/all-types-export.spec.d.ts.map +1 -0
  190. package/dist/src/react/index.d.ts +72 -0
  191. package/dist/src/react/index.d.ts.map +1 -1
  192. package/dist/src/react/util.d.ts +4 -0
  193. package/dist/src/react/util.d.ts.map +1 -1
  194. package/dist/src/test/test-utils.d.ts +11 -2
  195. package/dist/src/test/test-utils.d.ts.map +1 -1
  196. package/dist/src/types.d.ts +499 -96
  197. package/dist/src/types.d.ts.map +1 -1
  198. package/dist/src/utils/answerService.d.ts +7 -0
  199. package/dist/src/utils/answerService.d.ts.map +1 -1
  200. package/dist/src/utils/authService.d.ts +30 -0
  201. package/dist/src/utils/authService.d.ts.map +1 -1
  202. package/dist/src/utils/processData.d.ts +12 -0
  203. package/dist/src/utils/processData.d.ts.map +1 -1
  204. package/dist/src/utils/processTrigger.d.ts +7 -0
  205. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  206. package/dist/src/utils.d.ts +12 -0
  207. package/dist/src/utils.d.ts.map +1 -1
  208. package/dist/tsembed-react.es.js +28024 -0
  209. package/dist/tsembed-react.js +27966 -0
  210. package/dist/tsembed.es.js +18114 -305
  211. package/dist/tsembed.js +18088 -327
  212. package/dist/visual-embed-sdk-react-full.d.ts +3092 -0
  213. package/dist/visual-embed-sdk-react.d.ts +2781 -0
  214. package/dist/visual-embed-sdk.d.ts +2944 -0
  215. package/lib/package.json +15 -14
  216. package/lib/src/auth.d.ts +54 -5
  217. package/lib/src/auth.d.ts.map +1 -1
  218. package/lib/src/auth.js +91 -31
  219. package/lib/src/auth.js.map +1 -1
  220. package/lib/src/auth.spec.d.ts +3 -0
  221. package/lib/src/auth.spec.d.ts.map +1 -1
  222. package/lib/src/auth.spec.js +37 -6
  223. package/lib/src/auth.spec.js.map +1 -1
  224. package/lib/src/config.d.ts +1 -0
  225. package/lib/src/config.d.ts.map +1 -1
  226. package/lib/src/config.js +5 -3
  227. package/lib/src/config.js.map +1 -1
  228. package/lib/src/config.spec.js.map +1 -1
  229. package/lib/src/embed/app.d.ts +35 -6
  230. package/lib/src/embed/app.d.ts.map +1 -1
  231. package/lib/src/embed/app.js +55 -16
  232. package/lib/src/embed/app.js.map +1 -1
  233. package/lib/src/embed/app.spec.js +41 -12
  234. package/lib/src/embed/app.spec.js.map +1 -1
  235. package/lib/src/embed/base.d.ts +20 -9
  236. package/lib/src/embed/base.d.ts.map +1 -1
  237. package/lib/src/embed/base.js +31 -15
  238. package/lib/src/embed/base.js.map +1 -1
  239. package/lib/src/embed/base.spec.js.map +1 -1
  240. package/lib/src/embed/embed.spec.js +1 -1
  241. package/lib/src/embed/embed.spec.js.map +1 -1
  242. package/lib/src/embed/liveboard.d.ts +17 -5
  243. package/lib/src/embed/liveboard.d.ts.map +1 -1
  244. package/lib/src/embed/liveboard.js +49 -37
  245. package/lib/src/embed/liveboard.js.map +1 -1
  246. package/lib/src/embed/liveboard.spec.js +37 -30
  247. package/lib/src/embed/liveboard.spec.js.map +1 -1
  248. package/lib/src/embed/pinboard.spec.js +14 -26
  249. package/lib/src/embed/pinboard.spec.js.map +1 -1
  250. package/lib/src/embed/search-bar.d.ts +3 -0
  251. package/lib/src/embed/search-bar.d.ts.map +1 -1
  252. package/lib/src/embed/search-bar.js +5 -6
  253. package/lib/src/embed/search-bar.js.map +1 -1
  254. package/lib/src/embed/search.d.ts +9 -1
  255. package/lib/src/embed/search.d.ts.map +1 -1
  256. package/lib/src/embed/search.js +18 -14
  257. package/lib/src/embed/search.js.map +1 -1
  258. package/lib/src/embed/search.spec.js +16 -19
  259. package/lib/src/embed/search.spec.js.map +1 -1
  260. package/lib/src/embed/searchEmbed-basic-auth.spec.js +4 -0
  261. package/lib/src/embed/searchEmbed-basic-auth.spec.js.map +1 -1
  262. package/lib/src/embed/ts-embed.d.ts +65 -7
  263. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  264. package/lib/src/embed/ts-embed.js +154 -77
  265. package/lib/src/embed/ts-embed.js.map +1 -1
  266. package/lib/src/embed/ts-embed.spec.js +46 -24
  267. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  268. package/lib/src/errors.d.ts.map +1 -1
  269. package/lib/src/errors.js.map +1 -1
  270. package/lib/src/index.d.ts +2 -2
  271. package/lib/src/index.d.ts.map +1 -1
  272. package/lib/src/index.js +4 -4
  273. package/lib/src/index.js.map +1 -1
  274. package/lib/src/mixpanel-service.d.ts +8 -0
  275. package/lib/src/mixpanel-service.d.ts.map +1 -1
  276. package/lib/src/mixpanel-service.js +13 -1
  277. package/lib/src/mixpanel-service.js.map +1 -1
  278. package/lib/src/mixpanel-service.spec.js.map +1 -1
  279. package/lib/src/react/all-types-export.d.ts +3 -0
  280. package/lib/src/react/all-types-export.d.ts.map +1 -0
  281. package/lib/src/react/all-types-export.js +5 -0
  282. package/lib/src/react/all-types-export.js.map +1 -0
  283. package/lib/src/react/all-types-export.spec.d.ts +2 -0
  284. package/lib/src/react/all-types-export.spec.d.ts.map +1 -0
  285. package/lib/src/react/all-types-export.spec.js +10 -0
  286. package/lib/src/react/all-types-export.spec.js.map +1 -0
  287. package/lib/src/react/index.d.ts +72 -0
  288. package/lib/src/react/index.d.ts.map +1 -1
  289. package/lib/src/react/index.js +79 -7
  290. package/lib/src/react/index.js.map +1 -1
  291. package/lib/src/react/index.spec.js +27 -6
  292. package/lib/src/react/index.spec.js.map +1 -1
  293. package/lib/src/react/util.d.ts +4 -0
  294. package/lib/src/react/util.d.ts.map +1 -1
  295. package/lib/src/react/util.js +4 -0
  296. package/lib/src/react/util.js.map +1 -1
  297. package/lib/src/test/test-utils.d.ts +11 -2
  298. package/lib/src/test/test-utils.d.ts.map +1 -1
  299. package/lib/src/test/test-utils.js +36 -25
  300. package/lib/src/test/test-utils.js.map +1 -1
  301. package/lib/src/types.d.ts +499 -96
  302. package/lib/src/types.d.ts.map +1 -1
  303. package/lib/src/types.js +374 -68
  304. package/lib/src/types.js.map +1 -1
  305. package/lib/src/utils/answerService.d.ts +7 -0
  306. package/lib/src/utils/answerService.d.ts.map +1 -1
  307. package/lib/src/utils/answerService.js +7 -0
  308. package/lib/src/utils/answerService.js.map +1 -1
  309. package/lib/src/utils/answerService.spec.js.map +1 -1
  310. package/lib/src/utils/authService.d.ts +30 -0
  311. package/lib/src/utils/authService.d.ts.map +1 -1
  312. package/lib/src/utils/authService.js +39 -2
  313. package/lib/src/utils/authService.js.map +1 -1
  314. package/lib/src/utils/authService.spec.js.map +1 -1
  315. package/lib/src/utils/processData.d.ts +12 -0
  316. package/lib/src/utils/processData.d.ts.map +1 -1
  317. package/lib/src/utils/processData.js +33 -5
  318. package/lib/src/utils/processData.js.map +1 -1
  319. package/lib/src/utils/processData.spec.js.map +1 -1
  320. package/lib/src/utils/processTrigger.d.ts +7 -0
  321. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  322. package/lib/src/utils/processTrigger.js +17 -3
  323. package/lib/src/utils/processTrigger.js.map +1 -1
  324. package/lib/src/utils/processTrigger.spec.js.map +1 -1
  325. package/lib/src/utils.d.ts +12 -0
  326. package/lib/src/utils.d.ts.map +1 -1
  327. package/lib/src/utils.js +24 -19
  328. package/lib/src/utils.js.map +1 -1
  329. package/lib/src/utils.spec.js.map +1 -1
  330. package/package.json +15 -14
  331. package/src/auth.spec.ts +83 -133
  332. package/src/auth.ts +148 -115
  333. package/src/config.spec.ts +2 -4
  334. package/src/config.ts +5 -3
  335. package/src/embed/app.spec.ts +57 -14
  336. package/src/embed/app.ts +91 -36
  337. package/src/embed/base.spec.ts +3 -9
  338. package/src/embed/base.ts +51 -53
  339. package/src/embed/embed.spec.ts +5 -6
  340. package/src/embed/liveboard.spec.ts +56 -37
  341. package/src/embed/liveboard.ts +66 -64
  342. package/src/embed/pinboard.spec.ts +26 -29
  343. package/src/embed/search-bar.tsx +10 -8
  344. package/src/embed/search.spec.ts +31 -21
  345. package/src/embed/search.ts +26 -20
  346. package/src/embed/searchEmbed-basic-auth.spec.ts +22 -28
  347. package/src/embed/ts-embed.spec.ts +99 -144
  348. package/src/embed/ts-embed.ts +188 -162
  349. package/src/errors.ts +3 -6
  350. package/src/index.ts +6 -10
  351. package/src/mixpanel-service.spec.ts +1 -3
  352. package/src/mixpanel-service.ts +13 -1
  353. package/src/react/index.spec.tsx +66 -13
  354. package/src/react/index.tsx +111 -62
  355. package/src/react/util.ts +8 -4
  356. package/src/test/test-utils.ts +43 -39
  357. package/src/types.ts +498 -98
  358. package/src/utils/answerService.spec.ts +3 -5
  359. package/src/utils/answerService.ts +21 -17
  360. package/src/utils/authService.spec.ts +26 -41
  361. package/src/utils/authService.ts +47 -21
  362. package/src/utils/processData.spec.ts +26 -59
  363. package/src/utils/processData.ts +36 -14
  364. package/src/utils/processTrigger.spec.ts +1 -6
  365. package/src/utils/processTrigger.ts +18 -9
  366. package/src/utils.spec.ts +8 -12
  367. package/src/utils.ts +25 -26
  368. package/lib/src/visual-embed-sdk.d.ts +0 -2419
@@ -9,27 +9,41 @@
9
9
  /**
10
10
  * The authentication mechanism for allowing access to the
11
11
  * the embedded app
12
+ *
12
13
  * @group Authentication / Init
13
14
  */
14
15
  export declare enum AuthType {
15
16
  /**
16
- * No authentication on the SDK. Passthrough to the embedded App. Alias for `Passthrough`.
17
+ * No authentication on the SDK. Passthrough to the embedded App. Alias for
18
+ * `Passthrough`.
19
+ *
20
+ * @example
21
+ * ```js
22
+ * init({
23
+ * // ...
24
+ * authType: AuthType.None,
25
+ * });
26
+ * ```
17
27
  */
18
28
  None = "None",
19
29
  /**
20
- * Passthrough SSO to the embedded App within the iframe. Requires least configuration, but may not
21
- * be supported by all IDPs. This will behave like `None` if SSO is not configured on ThoughtSpot.
30
+ * Passthrough SSO to the embedded App within the iframe. Requires least
31
+ * configuration, but may not be supported by all IDPs. This will behave like `None`
32
+ * if SSO is not configured on ThoughtSpot.
33
+ *
22
34
  * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
23
35
  */
24
36
  EmbeddedSSO = "EmbeddedSSO",
25
37
  /**
26
38
  * SSO using SAML
39
+ *
27
40
  * @deprecated Use {@link SAMLRedirect} instead
28
41
  * @hidden
29
42
  */
30
43
  SSO = "SSO_SAML",
31
44
  /**
32
45
  * SSO using SAML
46
+ *
33
47
  * @deprecated Use {@link SAMLRedirect} instead
34
48
  * @hidden
35
49
  */
@@ -41,6 +55,7 @@ export declare enum AuthType {
41
55
  *
42
56
  * This redirects the host application to the SAML Idp. The host application
43
57
  * will be redirected back to the ThoughtSpot app after authentication.
58
+ *
44
59
  * @example
45
60
  * ```js
46
61
  * init({
@@ -81,6 +96,7 @@ export declare enum AuthType {
81
96
  SAMLRedirect = "SSO_SAML",
82
97
  /**
83
98
  * SSO using OIDC
99
+ *
84
100
  * @hidden
85
101
  * @deprecated Use {@link OIDCRedirect} instead
86
102
  */
@@ -93,14 +109,15 @@ export declare enum AuthType {
93
109
  OIDCRedirect = "SSO_OIDC",
94
110
  /**
95
111
  * Trusted authentication server
112
+ *
96
113
  * @hidden
97
114
  * @deprecated Use {@link TrustedAuth} instead
98
115
  */
99
116
  AuthServer = "AuthServer",
100
117
  /**
101
118
  * Trusted authentication server, Use your own authentication server
102
- * which returns a bearer token, generated using the secret_key obtained from
103
- * ThoughtSpot.
119
+ * which returns a bearer token, generated using the secret_key obtained
120
+ * from ThoughtSpot.
104
121
  *
105
122
  * @example
106
123
  * ```js
@@ -116,10 +133,24 @@ export declare enum AuthType {
116
133
  */
117
134
  TrustedAuthToken = "AuthServer",
118
135
  /**
119
- * Trusted authentication server Cookieless, Use you own authentication server
120
- * which returns a bearer token, generated using the secret_key obtained from
121
- * ThoughtSpot. This uses a cookieless authentication approach, recommended
122
- * to by pass third-party cookie-blocking restriction implemented by some browsers
136
+ * Trusted authentication server Cookieless, Use you own authentication
137
+ * server which returns a bearer token, generated using the secret_key
138
+ * obtained from ThoughtSpot. This uses a cookieless authentication
139
+ * approach, recommended to by pass third-party cookie-blocking restriction
140
+ * implemented by some browsers
141
+ *
142
+ * @example
143
+ * ```js
144
+ * init({
145
+ * // ...
146
+ * authType: AuthType.TrustedAuthTokenCookieless,
147
+ * getAuthToken: () => {
148
+ * return fetch('https://my-backend.app/ts-token')
149
+ * .then((response) => response.json())
150
+ * .then((data) => data.token);
151
+ * }
152
+ * ```
153
+ * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1-sw
123
154
  */
124
155
  TrustedAuthTokenCookieless = "AuthServerCookieless",
125
156
  /**
@@ -222,8 +253,8 @@ export interface EmbedConfig {
222
253
  */
223
254
  getAuthToken?: () => Promise<string>;
224
255
  /**
225
- * [AuthServer / Basic] The user name of the ThoughtSpot user. This attribute is
226
- * required for trusted authentication.
256
+ * [AuthServer / Basic] The user name of the ThoughtSpot user. This
257
+ * attribute is required for trusted authentication.
227
258
  */
228
259
  username?: string;
229
260
  /**
@@ -234,16 +265,20 @@ export interface EmbedConfig {
234
265
  */
235
266
  password?: string;
236
267
  /**
237
- * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will open the SAML auth
238
- * flow in a popup, instead of redirecting browser in place.
268
+ * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
269
+ * open the SAML auth flow in a popup, instead of redirecting browser in
270
+ * place.
239
271
  *
240
272
  * @default false
241
273
  * @deprecated
242
274
  */
243
275
  noRedirect?: boolean;
244
276
  /**
245
- * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open the SAML auth
246
- * flow in a popup, instead of redirecting browser in place.
277
+ * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
278
+ * the SAML auth flow in a popup, instead of redirecting browser in place.
279
+ *
280
+ * Need to use this with authTriggerContainer. Or manually trigger
281
+ * the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
247
282
  *
248
283
  * @default false
249
284
  * @version SDK: 1.18.0
@@ -255,6 +290,7 @@ export interface EmbedConfig {
255
290
  * terminated.
256
291
  *
257
292
  * Eg: "/dashboard", "#/foo" [Do not include the host]
293
+ *
258
294
  * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw
259
295
  */
260
296
  redirectPath?: string;
@@ -264,43 +300,52 @@ export interface EmbedConfig {
264
300
  * Should we encode URL Query Params using base64 encoding which thoughtspot
265
301
  * will generate for embedding. This provides additional security to
266
302
  * thoughtspot clusters against Cross site scripting attacks.
303
+ *
267
304
  * @default false
268
305
  */
269
306
  shouldEncodeUrlQueryParams?: boolean;
270
307
  /**
271
- * Suppress cookie access alert when third party cookies are blocked by the user's browser.
272
- * Third party cookie blocking is the default behaviour on Safari and opt-in for Firefox/Chrome.
273
- * If you set this to `true`, you are encouraged to handle `noCookieAccess` event, to show your own treatment
308
+ * Suppress cookie access alert when third party cookies are blocked by the
309
+ * user's browser. Third party cookie blocking is the default behaviour on
310
+ * Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
311
+ * encouraged to handle `noCookieAccess` event, to show your own treatment
274
312
  * in this case.
313
+ *
275
314
  * @default false
276
315
  */
277
316
  suppressNoCookieAccessAlert?: boolean;
278
317
  /**
279
318
  * Re-login when session expires with the previous login options
319
+ *
280
320
  * @default false
281
321
  */
282
322
  autoLogin?: boolean;
283
323
  /**
284
324
  * Disable redirection to the login page when the embedded session expires
285
- * This flag is typically used alongside the combination of auth modes such as {@link AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
325
+ * This flag is typically used alongside the combination of auth modes such as {@link
326
+ * AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
327
+ *
286
328
  * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
287
329
  * @default false
288
330
  */
289
331
  disableLoginRedirect?: boolean;
290
332
  /**
291
333
  * This message is displayed on the embed view when the login fails.
334
+ *
292
335
  * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
293
336
  */
294
337
  loginFailedMessage?: string;
295
338
  /**
296
339
  * Calls the prefetch method internally when set to true
340
+ *
297
341
  * @default false
298
342
  */
299
343
  callPrefetch?: boolean;
300
344
  /**
301
345
  * When there are multiple embeds, queue the render of embed to start
302
- * after the previous embed's render is complete. This helps in the load performance
303
- * by decreasing the load on the browser.
346
+ * after the previous embed's render is complete. This helps in the load
347
+ * performance by decreasing the load on the browser.
348
+ *
304
349
  * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
305
350
  * @default false
306
351
  */
@@ -308,15 +353,19 @@ export interface EmbedConfig {
308
353
  /**
309
354
  * Dynamic CSS Url to be injected in the loaded application.
310
355
  * You would also need to set `style-src` in the CSP settings.
356
+ *
311
357
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
312
358
  * @default ''
313
359
  */
314
360
  customCssUrl?: string;
315
361
  /**
316
- * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an additional call. This is slower
317
- * and should be avoided. Listen to the NO_COOKIE_ACCESS event to handle the situation.
362
+ * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
363
+ * additional call. This is slower and should be avoided. Listen to the
364
+ * NO_COOKIE_ACCESS event to handle the situation.
365
+ *
366
+ * This is slightly slower than letting the browser handle the cookie check, as it
367
+ * involves an extra network call.
318
368
  *
319
- * This is slightly slower than letting the browser handle the cookie check, as it involves an extra network call.
320
369
  * @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
321
370
  */
322
371
  detectCookieAccessSlow?: boolean;
@@ -333,16 +382,32 @@ export interface EmbedConfig {
333
382
  */
334
383
  customizations?: CustomisationsInterface;
335
384
  /**
336
- * For noRedirect SSO Auth, we need a button which the user
385
+ * For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
337
386
  * click to trigger the flow. This is the containing element
338
387
  * for that button.
339
388
  *
389
+ * @example
390
+ * ```js
391
+ * init({
392
+ * authType: AuthType.SAMLRedirect,
393
+ * inPopup: true,
394
+ * authTriggerContainer: '#auth-trigger-container'
395
+ * })
396
+ * ```
340
397
  * @version SDK: 1.17.0 | ThoughtSpot: *
341
398
  */
342
399
  authTriggerContainer?: string | HTMLElement;
400
+ /**
401
+ * Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
402
+ * SAML popup. This is useful when you want to trigger the popup on a custom user
403
+ * action.
404
+ *
405
+ */
406
+ useEventForSAMLPopup?: boolean;
343
407
  /**
344
408
  * Text to show in the button which triggers the popup auth flow.
345
409
  * Default: "Authorize".
410
+ *
346
411
  * @version SDK: 1.17.0 | ThoughtSpot: *
347
412
  */
348
413
  authTriggerText?: string;
@@ -384,7 +449,8 @@ export interface ViewConfig {
384
449
  */
385
450
  layoutConfig?: LayoutConfig;
386
451
  /**
387
- * The <b>width</b> and <b>height</b> dimensions to render an embedded object inside your app. Specify the values in pixels or percentage.
452
+ * The <b>width</b> and <b>height</b> dimensions to render an embedded
453
+ * object inside your app. Specify the values in pixels or percentage.
388
454
  */
389
455
  frameParams?: FrameParams;
390
456
  /**
@@ -397,7 +463,17 @@ export interface ViewConfig {
397
463
  styleSheet__unstable?: string;
398
464
  /**
399
465
  * The list of actions to disable from the primary menu, more menu
400
- * (...), and the contextual menu.
466
+ * (...), and the contextual menu. These actions will be disabled
467
+ * for the user.
468
+ * Use this to disable actions.
469
+ *
470
+ * @example
471
+ * ```js
472
+ * const embed = new LiveboardEmbed('#embed', {
473
+ * ... // other liveboard view config
474
+ * disabledActions: [Action.Download, Action.Save]
475
+ * });
476
+ * ```
401
477
  */
402
478
  disabledActions?: Action[];
403
479
  /**
@@ -405,18 +481,35 @@ export interface ViewConfig {
405
481
  */
406
482
  disabledActionReason?: string;
407
483
  /**
408
- * The list of actions to hide from the primary menu, more menu
409
- * (...), and the contextual menu.
484
+ * The list of actions to hide from the embedded.
485
+ * This actions will be hidden from the user.
486
+ * Use this to hide an action.
487
+ *
488
+ * @example
489
+ * ```js
490
+ * const embed = new LiveboardEmbed('#embed', {
491
+ * ... // other liveboard view config
492
+ * hiddenActions: [Action.Download, Action.Export]
493
+ * });
494
+ * ```
495
+ * @important
410
496
  */
411
497
  hiddenActions?: Action[];
412
498
  /**
413
499
  * The list of actions to display from the primary menu, more menu
414
- * (...), and the contextual menu.
500
+ * (...), and the contextual menu. These will be only actions that
501
+ * are visible to the user.
502
+ * Use this to hide all actions except the ones you want to show.
503
+ *
504
+ * Use either this or hiddenActions.
505
+ *
415
506
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
507
+ * @important
416
508
  */
417
509
  visibleActions?: Action[];
418
510
  /**
419
511
  * Show alert messages and toast messages in the embedded view.
512
+ *
420
513
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
421
514
  */
422
515
  showAlerts?: boolean;
@@ -427,6 +520,7 @@ export interface ViewConfig {
427
520
  runtimeFilters?: RuntimeFilter[];
428
521
  /**
429
522
  * The locale/language to use for the embedded view.
523
+ *
430
524
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
431
525
  */
432
526
  locale?: string;
@@ -437,6 +531,7 @@ export interface ViewConfig {
437
531
  * Warning: This option is for advanced use only and is used internally
438
532
  * to control embed behavior in non-regular ways. We do not publish the
439
533
  * list of supported keys and values associated with each.
534
+ *
440
535
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
441
536
  */
442
537
  additionalFlags?: {
@@ -445,33 +540,49 @@ export interface ViewConfig {
445
540
  /**
446
541
  * Dynamic CSSUrl and customCSS to be injected in the loaded application.
447
542
  * You would also need to set `style-src` in the CSP settings.
543
+ *
448
544
  * @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
449
545
  * @default ''
450
546
  */
451
547
  customizations?: CustomisationsInterface;
452
548
  /**
453
- * Insert as a sibling of the target container, instead of appending to a child inside it.
549
+ * Insert as a sibling of the target container, instead of appending to a
550
+ * child inside it.
454
551
  */
455
552
  insertAsSibling?: boolean;
456
553
  /**
457
554
  * flag to set ContextMenu Trigger to either left or right click.
555
+ *
458
556
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
459
557
  */
460
558
  contextMenuTrigger?: ContextMenuTriggerOptions;
461
559
  /**
462
560
  * flag to override openNew tab context menu link
561
+ *
463
562
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
464
563
  */
465
564
  linkOverride?: boolean;
466
565
  /**
467
566
  * flag to enable insert into slides action
567
+ *
468
568
  * @hidden
469
569
  * @private
470
570
  */
471
571
  insertInToSlide?: boolean;
572
+ /**
573
+ * Use a pre-rendered iframe from a pool of pre-rendered iframes
574
+ * if available and matches the configuration.
575
+ *
576
+ * @version SDK: 1.22.0
577
+ * @hidden
578
+ *
579
+ * See [docs]() on how to create a prerender pool.
580
+ */
581
+ usePrerenderedIfAvailable?: boolean;
472
582
  }
473
583
  /**
474
584
  * MessagePayload: Embed event payload: message type, data and status (start/end)
585
+ *
475
586
  * @group Events
476
587
  */
477
588
  export type MessagePayload = {
@@ -480,21 +591,37 @@ export type MessagePayload = {
480
591
  status?: string;
481
592
  };
482
593
  /**
483
- * MessageOptions: By Providing options, getting specific event start / end based on option
594
+ * MessageOptions: By Providing options, getting specific event start / end based on
595
+ * option
596
+ *
484
597
  * @group Events
485
598
  */
486
599
  export type MessageOptions = {
600
+ /**
601
+ * A boolean value indicating that start status events of this type
602
+ * will be dispatched
603
+ */
487
604
  start?: boolean;
488
605
  };
489
606
  /**
490
607
  * MessageCallback: Embed event message callback
608
+ *
491
609
  * @group Events
492
610
  */
493
- export type MessageCallback = (payload: MessagePayload, responder?: (data: any) => void) => void;
611
+ export type MessageCallback = (payload: MessagePayload,
612
+ /**
613
+ * responder: Message callback function triggered when embed event
614
+ * initiated
615
+ */
616
+ responder?: (data: any) => void) => void;
494
617
  /**
495
618
  * MessageCallbackObj: contains message options & callback function
496
619
  */
497
620
  export type MessageCallbackObj = {
621
+ /**
622
+ * options: It contains start, A boolean value indicating that start
623
+ * status events of this type will be dispatched
624
+ */
498
625
  options: MessageOptions;
499
626
  callback: MessageCallback;
500
627
  };
@@ -578,7 +705,8 @@ export interface RuntimeFilter {
578
705
  operator: RuntimeFilterOp;
579
706
  /**
580
707
  * The list of operands. Some operators like EQ, LE accept
581
- * a single operand, whereas other operators like BW and IN accept multiple operands.
708
+ * a single operand, whereas other operators like BW and IN accept multiple
709
+ * operands.
582
710
  */
583
711
  values: (number | boolean | string)[];
584
712
  }
@@ -587,82 +715,122 @@ export interface RuntimeFilter {
587
715
  *
588
716
  * To add an event listener use the corresponding
589
717
  * {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
718
+ *
719
+ * @example
720
+ * ```js
721
+ * import { EmbedEvent } from '@thoughtspot/visual-embed-sdk';
722
+ * // Or
723
+ * // const { EmbedEvent } = window.tsembed;
724
+ *
725
+ * // create the liveboard embed.
726
+ *
727
+ * liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => {
728
+ * console.log('Drilldown event', drilldown);
729
+ * }));
730
+ * ```
590
731
  * @group Events
591
732
  */
592
733
  export declare enum EmbedEvent {
593
734
  /**
594
735
  * Rendering has initialized.
595
- * @return timestamp - The timestamp when the event was generated.
736
+ *
737
+ * @returns timestamp - The timestamp when the event was generated.
596
738
  */
597
739
  Init = "init",
598
740
  /**
599
741
  * Authentication has either succeeded or failed.
600
- * @return isLoggedIn - A Boolean specifying whether authentication was successful.
742
+ *
743
+ * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
601
744
  */
602
745
  AuthInit = "authInit",
603
746
  /**
604
747
  * The embed object container has loaded.
605
- * @return timestamp - The timestamp when the event was generated.
748
+ *
749
+ * @returns timestamp - The timestamp when the event was generated.
606
750
  */
607
751
  Load = "load",
608
752
  /**
609
753
  * Data pertaining to answer or Liveboard is received
754
+ *
610
755
  * @return data - The answer or Liveboard data
756
+ * @important
611
757
  */
612
758
  Data = "data",
613
759
  /**
614
- * Search/answer/Liveboard filters have been applied/updated
760
+ * Search/answer/Liveboard filters have been applied/updated by the user.
761
+ *
615
762
  * @hidden
616
763
  */
617
764
  FiltersChanged = "filtersChanged",
618
765
  /**
619
- * Search query has been updated
766
+ * Search query has been updated by the user.
620
767
  */
621
768
  QueryChanged = "queryChanged",
622
769
  /**
623
770
  * A drill down operation has been performed.
624
- * @return additionalFilters - Any additional filters applied
625
- * @return drillDownColumns - The columns on which drill down was performed
626
- * @return nonFilteredColumns - The columns that were not filtered
771
+ *
772
+ * @returns additionalFilters - Any additional filters applied
773
+ * @returns drillDownColumns - The columns on which drill down was performed
774
+ * @returns nonFilteredColumns - The columns that were not filtered
627
775
  */
628
776
  Drilldown = "drillDown",
629
777
  /**
630
778
  * One or more data sources have been selected.
631
- * @return dataSourceIds - the list of data sources
779
+ *
780
+ * @returns dataSourceIds - the list of data sources
632
781
  */
633
782
  DataSourceSelected = "dataSourceSelected",
634
783
  /**
635
784
  * One or more data columns have been selected.
636
- * @return columnIds - the list of columns
785
+ *
786
+ * @returns columnIds - the list of columns
637
787
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
638
788
  */
639
789
  AddRemoveColumns = "addRemoveColumns",
640
790
  /**
641
791
  * A custom action has been triggered
642
- * @return actionId - The id of the custom action
643
- * @return data - The answer or Liveboard data
792
+ *
793
+ * @returns actionId - The id of the custom action
794
+ * @returns data - The answer or Liveboard data
644
795
  */
645
796
  CustomAction = "customAction",
646
797
  /**
647
- * A double click has been triggered on table/chart
798
+ * Listen to double clicks on a visualization
799
+ *
648
800
  * @return ContextMenuInputPoints - data point that is double clicked
649
801
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
650
802
  */
651
803
  VizPointDoubleClick = "vizPointDoubleClick",
652
804
  /**
653
- * A click has been triggered on table/chart
654
- * @return ContextMenuInputPoints - data point that is clicked
805
+ * Listen to clicks on a visualization in a liveboard or Search result.
806
+ *
807
+ * @example
808
+ * ```js
809
+ * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
810
+ * console.log(
811
+ * data.vizId, // viz id
812
+ * data.clickedPoint.selectedAttributes[0].value,
813
+ * data.clickedPoint.selectedAttributes[0].column.name,
814
+ * data.clickedPoint.selectedMeasures[0].value,
815
+ * data.clickedPoint.selectedMeasures[0].column.name,
816
+ * )
817
+ * });
818
+ * ```
819
+ * @return viz, clickedPoint - metadata about point that is clicked
655
820
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
821
+ * @important
656
822
  */
657
823
  VizPointClick = "vizPointClick",
658
824
  /**
659
825
  * An error has occurred.
660
- * @return error - An error object or message
826
+ *
827
+ * @returns error - An error object or message
661
828
  */
662
829
  Error = "Error",
663
830
  /**
664
831
  * The embedded object has sent an alert
665
- * @return alert - An alert object
832
+ *
833
+ * @returns alert - An alert object
666
834
  */
667
835
  Alert = "alert",
668
836
  /**
@@ -671,29 +839,34 @@ export declare enum EmbedEvent {
671
839
  AuthExpire = "ThoughtspotAuthExpired",
672
840
  /**
673
841
  * ThoughtSpot failed to validate the auth session.
842
+ *
674
843
  * @hidden
675
844
  */
676
845
  AuthFailure = "ThoughtspotAuthFailure",
677
846
  /**
678
847
  * ThoughtSpot failed to validate the auth session.
848
+ *
679
849
  * @hidden
680
850
  */
681
851
  AuthLogout = "ThoughtspotAuthLogout",
682
852
  /**
683
853
  * The height of the embedded Liveboard or visualization has been computed.
684
- * @return data - The height of the embedded Liveboard or visualization
854
+ *
855
+ * @returns data - The height of the embedded Liveboard or visualization
685
856
  * @hidden
686
857
  */
687
858
  EmbedHeight = "EMBED_HEIGHT",
688
859
  /**
689
860
  * The center of visible iframe viewport is calculated.
690
- * @return data - The center of the visible Iframe viewport.
861
+ *
862
+ * @returns data - The center of the visible Iframe viewport.
691
863
  * @hidden
692
864
  */
693
865
  EmbedIframeCenter = "EmbedIframeCenter",
694
866
  /**
695
867
  * Emitted when the "Get Data" button in Search Bar embed
696
868
  * is clicked.
869
+ *
697
870
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
698
871
  */
699
872
  GetDataClick = "getDataClick",
@@ -703,6 +876,7 @@ export declare enum EmbedEvent {
703
876
  RouteChange = "ROUTE_CHANGE",
704
877
  /**
705
878
  * The v1 event type for Data
879
+ *
706
880
  * @hidden
707
881
  */
708
882
  V1Data = "exportVizDataToParent",
@@ -715,17 +889,20 @@ export declare enum EmbedEvent {
715
889
  NoCookieAccess = "noCookieAccess",
716
890
  /**
717
891
  * Emitted when SAML is complete
892
+ *
718
893
  * @private
719
894
  * @hidden
720
895
  */
721
896
  SAMLComplete = "samlComplete",
722
897
  /**
723
898
  * Emitted when any modal is opened in the app
899
+ *
724
900
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
725
901
  */
726
902
  DialogOpen = "dialog-open",
727
903
  /**
728
904
  * Emitted when any modal is closed in the app
905
+ *
729
906
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
730
907
  */
731
908
  DialogClose = "dialog-close",
@@ -733,22 +910,26 @@ export declare enum EmbedEvent {
733
910
  * Emitted when the Liveboard shell loads.
734
911
  * You can use this event as a hook to trigger
735
912
  * other events on the rendered Liveboard.
913
+ *
736
914
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
737
915
  */
738
916
  LiveboardRendered = "PinboardRendered",
739
917
  /**
740
918
  * This can be used to register an event listener which
741
919
  * is triggered on all events.
920
+ *
742
921
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
743
922
  */
744
923
  ALL = "*",
745
924
  /**
746
925
  * Emitted when answer is saved in the app
926
+ *
747
927
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
748
928
  */
749
929
  Save = "save",
750
930
  /**
751
931
  * Emitted when the download action is triggered on an answer
932
+ *
752
933
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
753
934
  */
754
935
  Download = "download",
@@ -760,171 +941,225 @@ export declare enum EmbedEvent {
760
941
  DownloadAsPng = "downloadAsPng",
761
942
  /**
762
943
  * Emitted when the Download as PDF action is triggered on an answer
944
+ *
763
945
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
764
946
  */
765
947
  DownloadAsPdf = "downloadAsPdf",
766
948
  /**
767
949
  * Emitted when the Download as CSV action is triggered on an answer
950
+ *
768
951
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
769
952
  */
770
953
  DownloadAsCsv = "downloadAsCsv",
771
954
  /**
772
955
  * Emitted when the Download as XLSX action is triggered on an answer
956
+ *
773
957
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
774
958
  */
775
959
  DownloadAsXlsx = "downloadAsXlsx",
776
960
  /**
777
961
  * Emitted when an answer is deleted in the app
962
+ *
778
963
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
779
964
  */
780
965
  AnswerDelete = "answerDelete",
781
966
  /**
782
967
  * Emitted when an answer is pinned to a Liveboard
968
+ *
783
969
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
784
970
  */
785
971
  Pin = "pin",
786
972
  /**
787
973
  * Emitted when SpotIQ analysis is triggered
974
+ *
788
975
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
789
976
  */
790
977
  SpotIQAnalyze = "spotIQAnalyze",
791
978
  /**
792
979
  * Emitted when a user shares an object with another user or group
980
+ *
793
981
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
794
982
  */
795
983
  Share = "share",
796
984
  /**
797
- * Emitted when a user clicks the Include action to include a specific value or data on a chart or table
985
+ * Emitted when a user clicks the Include action to include a specific value or data
986
+ * on a chart or table
987
+ *
798
988
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
799
989
  */
800
990
  DrillInclude = "context-menu-item-include",
801
991
  /**
802
- * Emitted when a user clicks the Exclude action to exclude a specific value or data on a chart or table
992
+ * Emitted when a user clicks the Exclude action to exclude a specific value or data
993
+ * on a chart or table
994
+ *
803
995
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
804
996
  */
805
997
  DrillExclude = "context-menu-item-exclude",
806
998
  /**
807
999
  * Emitted when copied column value on the app
1000
+ *
808
1001
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
809
1002
  */
810
1003
  CopyToClipboard = "context-menu-item-copy-to-clipboard",
811
1004
  /**
812
1005
  * Emitted when a user clicks the Update TML action
1006
+ *
813
1007
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
814
1008
  */
815
1009
  UpdateTML = "updateTSL",
816
1010
  /**
817
1011
  * Emitted when a user clicks the Edit TML action
1012
+ *
818
1013
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
819
1014
  */
820
1015
  EditTML = "editTSL",
821
1016
  /**
822
1017
  * Emitted when ExportTML trigger in answer on the app
1018
+ *
823
1019
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
824
1020
  */
825
1021
  ExportTML = "exportTSL",
826
1022
  /**
827
1023
  * Emitted when an answer is saved as a view
1024
+ *
828
1025
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
829
1026
  */
830
1027
  SaveAsView = "saveAsView",
831
1028
  /**
832
1029
  * Emitted when copy of existing answer on the app
1030
+ *
833
1031
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
834
1032
  */
835
1033
  CopyAEdit = "copyAEdit",
836
1034
  /**
837
1035
  * Emitted when a user clicks Show underlying data on an answe
1036
+ *
838
1037
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
839
1038
  */
840
1039
  ShowUnderlyingData = "showUnderlyingData",
841
1040
  /**
842
1041
  * Emitted when an answer is switched to a chart or table view
1042
+ *
843
1043
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
844
1044
  */
845
1045
  AnswerChartSwitcher = "answerChartSwitcher",
846
1046
  /**
847
1047
  * Internal event to communicate the initial settings back to the TS APP
1048
+ *
848
1049
  * @hidden
849
1050
  */
850
1051
  APP_INIT = "appInit",
851
1052
  /**
852
1053
  * Emitted when a user clicks Show Liveboard details on a Liveboard
1054
+ *
853
1055
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
854
1056
  */
855
1057
  LiveboardInfo = "pinboardInfo",
856
1058
  /**
857
1059
  * Emitted when a user clicks on the Favorite icon on a Liveboard
1060
+ *
858
1061
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
859
1062
  */
860
1063
  AddToFavorites = "addToFavorites",
861
1064
  /**
862
1065
  * Emitted when a user clicks Schedule on a Liveboard
1066
+ *
863
1067
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
864
1068
  */
865
1069
  Schedule = "subscription",
866
1070
  /**
867
1071
  * Emitted when a user clicks Edit on a Liveboard or visualization
1072
+ *
868
1073
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
869
1074
  */
870
1075
  Edit = "edit",
871
1076
  /**
872
1077
  * Emitted when a user clicks Make a copy on a Liveboard
1078
+ *
873
1079
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
874
1080
  */
875
1081
  MakeACopy = "makeACopy",
876
1082
  /**
877
1083
  * Emitted when a user clicks Present on a Liveboard or visualization
1084
+ *
878
1085
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
879
1086
  */
880
1087
  Present = "present",
881
1088
  /**
882
1089
  * Emitted when a user clicks Delete on a Liveboard
1090
+ *
883
1091
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
884
1092
  */
885
1093
  Delete = "delete",
886
1094
  /**
887
1095
  * Emitted when a user clicks Manage schedules on a Liveboard
1096
+ *
888
1097
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
889
1098
  */
890
1099
  SchedulesList = "schedule-list",
891
1100
  /**
892
1101
  * Emitted when a user clicks Cancel in edit mode on a Liveboard
1102
+ *
893
1103
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
894
1104
  */
895
1105
  Cancel = "cancel",
896
1106
  /**
897
1107
  * Emitted when a user clicks Explore on a visualization
1108
+ *
898
1109
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
899
1110
  */
900
1111
  Explore = "explore",
901
1112
  /**
902
1113
  * Emitted when a user clicks Copy link action on a visualization
1114
+ *
903
1115
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
904
1116
  */
905
1117
  CopyLink = "embedDocument",
906
1118
  /**
907
1119
  * Emitted when a user interacts with cross filters on a visualization or liveboard
1120
+ *
908
1121
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
909
1122
  */
910
1123
  CrossFilterChanged = "cross-filter-changed",
911
1124
  /**
912
- * Emitted when a user right clicks on chart or table
1125
+ * Emitted when a user right clicks on a visualization (chart or table)
1126
+ *
913
1127
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
914
1128
  */
915
- VizPointRightClick = "vizPointRightClick"
1129
+ VizPointRightClick = "vizPointRightClick",
1130
+ /**
1131
+ * Emitted when a user clicks on Insert to slide on a visualization
1132
+ *
1133
+ * @hidden
1134
+ */
1135
+ InsertIntoSlide = "insertInToSlide"
916
1136
  }
917
1137
  /**
918
1138
  * Event types that can be triggered by the host application
919
1139
  * to the embedded ThoughtSpot app
920
1140
  *
921
1141
  * To trigger an event use the corresponding
922
- * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link SearchEmbed.trigger} method.
1142
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
1143
+ * SearchEmbed.trigger} method.
1144
+ *
1145
+ * @example
1146
+ * ```js
1147
+ * import { HostEvent } from '@thoughtspot/visual-embed-sdk';
1148
+ * // Or
1149
+ * // const { HostEvent } = window.tsembed;
1150
+ *
1151
+ * // create the liveboard embed.
1152
+ *
1153
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
1154
+ * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
1155
+ * ]);
1156
+ * ```
923
1157
  * @group Events
924
1158
  */
925
1159
  export declare enum HostEvent {
926
1160
  /**
927
1161
  * Trigger a search
1162
+ *
928
1163
  * @param - dataSourceIds - The data source GUID to Search on
929
1164
  * - Although an array, only a single source
930
1165
  * is supported at this time.
@@ -934,7 +1169,7 @@ export declare enum HostEvent {
934
1169
  * ```js
935
1170
  * searchEmbed.trigger(HostEvent.Search, {
936
1171
  * searchQuery: "[sales] by [item type],
937
- * dataSourceIds: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
1172
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
938
1173
  * execute: true
939
1174
  * })
940
1175
  * ```
@@ -942,55 +1177,77 @@ export declare enum HostEvent {
942
1177
  Search = "search",
943
1178
  /**
944
1179
  * Trigger a drill on certain points by certain column
1180
+ *
945
1181
  * @param - points - an object containing selectedPoints/clickedPoints
946
1182
  * eg. { selectedPoints: []}
947
1183
  * @param - columnGuid - a string guid of the column to drill by. This is optional,
948
- * if not provided it will auto drill by the configured column.
1184
+ * if not provided it will auto drill by the configured
1185
+ * column.
949
1186
  * @example
950
1187
  * ```js
951
- * searchEmbed.trigger(HostEvent.DrillDown, {
952
- * points: clickedPointData,
953
- * autoDrillDown: true,
1188
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
1189
+ * console.log(payload);
1190
+ * const clickedPoint = payload.data.clickedPoint;
1191
+ * const selectedPoint = payload.data.selectedPoints;
1192
+ * console.log('>>> called', clickedPoint);
1193
+ * searchEmbed.trigger(HostEvent.DrillDown, {
1194
+ * points: {
1195
+ * clickedPoint,
1196
+ * selectedPoints: selectedPoint
1197
+ * },
1198
+ * autoDrillDown: true,
1199
+ * });
954
1200
  * })
955
1201
  * ```
956
- *
957
1202
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
958
1203
  */
959
1204
  DrillDown = "triggerDrillDown",
960
1205
  /**
961
1206
  * Apply filters
1207
+ *
962
1208
  * @hidden
963
1209
  */
964
1210
  Filter = "filter",
965
1211
  /**
966
1212
  * Reload the answer or visualization
1213
+ *
967
1214
  * @hidden
968
1215
  */
969
1216
  Reload = "reload",
970
1217
  /**
971
1218
  * Set the visible visualizations on a Liveboard.
1219
+ *
972
1220
  * @param - an array of ids of visualizations to show, the ids not passed
973
1221
  * will be hidden.
974
1222
  * @example
975
- * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, ['730496d6-6903-4601-937e-2c691821af3c', 'd547ec54-2a37-4516-a222-2b06719af726'])
1223
+ * ```js
1224
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
1225
+ * '730496d6-6903-4601-937e-2c691821af3c',
1226
+ * 'd547ec54-2a37-4516-a222-2b06719af726'])
1227
+ * ```
976
1228
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
977
1229
  */
978
1230
  SetVisibleVizs = "SetPinboardVisibleVizs",
979
1231
  /**
980
1232
  * Update the runtime filters. The runtime filters passed here are extended
981
1233
  * on to the existing runtime filters if they exist.
1234
+ *
982
1235
  * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
983
1236
  * @example
1237
+ * ```js
984
1238
  * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
985
- * {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
986
- * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
1239
+ * {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
1240
+ * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
987
1241
  * ])
1242
+ * ```
988
1243
  * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1244
+ * @important
989
1245
  */
990
1246
  UpdateRuntimeFilters = "UpdateRuntimeFilters",
991
1247
  /**
992
1248
  * Navigate to a specific page in App embed without any reload.
993
1249
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
1250
+ *
994
1251
  * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
995
1252
  * @example
996
1253
  * ```js
@@ -1002,16 +1259,22 @@ export declare enum HostEvent {
1002
1259
  /**
1003
1260
  * Opens the filter panel for a particular column.
1004
1261
  * Works with Search embed.
1005
- * @param - { columnId: string, name: string, type: INT64/CHAR/DATE, dataType: ATTRIBUTE/MEASURE }
1262
+ *
1263
+ * @param - { columnId: string,
1264
+ * name: string,
1265
+ * type: INT64/CHAR/DATE,
1266
+ * dataType: ATTRIBUTE/MEASURE }
1006
1267
  * @example
1007
1268
  * ```js
1008
- * searchEmbed.trigger(HostEvent.OpenFilter, { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
1269
+ * searchEmbed.trigger(HostEvent.OpenFilter,
1270
+ * { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
1009
1271
  * ```
1010
1272
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1011
1273
  */
1012
1274
  OpenFilter = "openFilter",
1013
1275
  /**
1014
1276
  * Adds the columns to the current Search.
1277
+ *
1015
1278
  * @param - { columnIds: string[] }
1016
1279
  * @example
1017
1280
  * ```js
@@ -1022,6 +1285,7 @@ export declare enum HostEvent {
1022
1285
  AddColumns = "addColumns",
1023
1286
  /**
1024
1287
  * Removes a column from the current Search.
1288
+ *
1025
1289
  * @param - { columnId: string }
1026
1290
  * @example
1027
1291
  * ```js
@@ -1032,6 +1296,7 @@ export declare enum HostEvent {
1032
1296
  RemoveColumn = "removeColumn",
1033
1297
  /**
1034
1298
  * Gets the current pinboard content.
1299
+ *
1035
1300
  * @example
1036
1301
  * ```js
1037
1302
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
@@ -1041,6 +1306,7 @@ export declare enum HostEvent {
1041
1306
  getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
1042
1307
  /**
1043
1308
  * Triggers the Pin action on an embedded object
1309
+ *
1044
1310
  * @param - incase of Liveboard embed, takes in an object with vizId as a key
1045
1311
  * can be left empty for search and visualization embeds
1046
1312
  * @example
@@ -1054,6 +1320,7 @@ export declare enum HostEvent {
1054
1320
  Pin = "pin",
1055
1321
  /**
1056
1322
  * Triggers the Show Liveboard details action on a Liveboard
1323
+ *
1057
1324
  * @example
1058
1325
  * ```js
1059
1326
  * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
@@ -1063,6 +1330,7 @@ export declare enum HostEvent {
1063
1330
  LiveboardInfo = "pinboardInfo",
1064
1331
  /**
1065
1332
  * Triggers the Schedule action on a Liveboard
1333
+ *
1066
1334
  * @example
1067
1335
  * ```js
1068
1336
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -1072,6 +1340,7 @@ export declare enum HostEvent {
1072
1340
  Schedule = "subscription",
1073
1341
  /**
1074
1342
  * Triggers the Manage schedule action on a Liveboard
1343
+ *
1075
1344
  * @example
1076
1345
  * ```js
1077
1346
  * liveboardEmbed.trigger(HostEvent.ScheduleList)
@@ -1081,6 +1350,7 @@ export declare enum HostEvent {
1081
1350
  SchedulesList = "schedule-list",
1082
1351
  /**
1083
1352
  * Triggers the Export TML action on a Liveboard
1353
+ *
1084
1354
  * @example
1085
1355
  * ```js
1086
1356
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -1090,6 +1360,7 @@ export declare enum HostEvent {
1090
1360
  ExportTML = "exportTSL",
1091
1361
  /**
1092
1362
  * Triggers the Edit TML action on a Liveboard
1363
+ *
1093
1364
  * @example
1094
1365
  * ```js
1095
1366
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -1099,6 +1370,7 @@ export declare enum HostEvent {
1099
1370
  EditTML = "editTSL",
1100
1371
  /**
1101
1372
  * Triggers the Update TML action on a Liveboard
1373
+ *
1102
1374
  * @example
1103
1375
  * ```js
1104
1376
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -1108,15 +1380,17 @@ export declare enum HostEvent {
1108
1380
  UpdateTML = "updateTSL",
1109
1381
  /**
1110
1382
  * Triggers the Download PDF action on a Liveboard
1383
+ *
1111
1384
  * @example
1112
1385
  * ```js
1113
- * liveboardEmbed.trigger(HostEvent.DownloadAsPDF)
1386
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
1114
1387
  * ```
1115
1388
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1116
1389
  */
1117
1390
  DownloadAsPdf = "downloadAsPdf",
1118
1391
  /**
1119
1392
  * Triggers the Make a copy action on a Liveboard, search or visualization
1393
+ *
1120
1394
  * @example
1121
1395
  * ```js
1122
1396
  * liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
@@ -1128,6 +1402,7 @@ export declare enum HostEvent {
1128
1402
  MakeACopy = "makeACopy",
1129
1403
  /**
1130
1404
  * Triggers the Delete action on a Liveboard
1405
+ *
1131
1406
  * @example
1132
1407
  * ```js
1133
1408
  * appEmbed.trigger(HostEvent.Remove)
@@ -1137,6 +1412,7 @@ export declare enum HostEvent {
1137
1412
  Remove = "delete",
1138
1413
  /**
1139
1414
  * Triggers the Explore action on a visualization
1415
+ *
1140
1416
  * @param - an object with vizId as a key
1141
1417
  * @example
1142
1418
  * ```js
@@ -1147,37 +1423,52 @@ export declare enum HostEvent {
1147
1423
  Explore = "explore",
1148
1424
  /**
1149
1425
  * Triggers the Create alert action on a visualization
1426
+ *
1150
1427
  * @param - an object with vizId as a key
1151
1428
  * @example
1152
1429
  * ```js
1153
- * liveboardEmbed.trigger(HostEvent.CreateMonitor {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1430
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor {
1431
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1432
+ * })
1154
1433
  * ```
1155
1434
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1156
1435
  */
1157
1436
  CreateMonitor = "createMonitor",
1158
1437
  /**
1159
1438
  * Triggers the Manage alert action on a visualization
1439
+ *
1160
1440
  * @param - an object with vizId as a key
1161
1441
  * @example
1162
1442
  * ```js
1163
- * liveboardEmbed.trigger(HostEvent.ManageMonitor, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1443
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
1444
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
1445
+ * })
1164
1446
  * ```
1165
1447
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1166
1448
  */
1167
1449
  ManageMonitor = "manageMonitor",
1168
1450
  /**
1169
1451
  * Triggers the Edit action on a Liveboard or visualization
1170
- * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1452
+ *
1453
+ * @param - object - to trigger the action for a specfic visualization
1454
+ * in Liveboard embed, pass in vizId as a key
1171
1455
  * @example
1456
+ * ```js
1172
1457
  * liveboardEmbed.trigger(HostEvent.Edit)
1173
- * liveboardEmbed.trigger(HostEvent.Edit, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1458
+ *
1459
+ * liveboardEmbed.trigger(HostEvent.Edit, {vizId:
1460
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1461
+ *
1174
1462
  * vizEmbed.trigger((HostEvent.Edit)
1463
+ * ```
1175
1464
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
1176
1465
  */
1177
1466
  Edit = "edit",
1178
1467
  /**
1179
1468
  * Triggers the Copy link action on a Liveboard or visualization
1180
- * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1469
+ *
1470
+ * @param - object - to trigger the action for a s
1471
+ * pecfic visualization in Liveboard embed, pass in vizId as a key
1181
1472
  * @example
1182
1473
  * ```js
1183
1474
  * liveboardEmbed.trigger(HostEvent.CopyLink)
@@ -1189,7 +1480,9 @@ export declare enum HostEvent {
1189
1480
  CopyLink = "embedDocument",
1190
1481
  /**
1191
1482
  * Triggers the Present action on a Liveboard or visualization
1192
- * @param - object - to trigger the action for a specfic visualization in Liveboard embed, pass in vizId as a key
1483
+ *
1484
+ * @param - object - to trigger the action for a specfic visualization
1485
+ * in Liveboard embed, pass in vizId as a key
1193
1486
  * @example
1194
1487
  * ```js
1195
1488
  * liveboardEmbed.trigger(HostEvent.Present)
@@ -1201,119 +1494,203 @@ export declare enum HostEvent {
1201
1494
  Present = "present",
1202
1495
  /**
1203
1496
  * Get TML for the current search.
1497
+ *
1204
1498
  * @example
1205
1499
  * ```js
1206
- * searchEmbed.trigger(HostEvent.GetTML)
1500
+ * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
1501
+ * console.log(
1502
+ * tml.search_query // TML representation of the search query
1503
+ * );
1504
+ * })
1207
1505
  * ```
1208
1506
  * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
1507
+ * @important
1209
1508
  */
1210
1509
  GetTML = "getTML",
1211
1510
  /**
1212
1511
  * Triggers the ShowUnderlyingData action on visualization or search
1512
+ *
1213
1513
  * @param - an object with vizId as a key
1214
1514
  * @example
1215
- * liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1515
+ * ```js
1516
+ * liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
1517
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1518
+ *
1216
1519
  * vizEmbed.trigger(HostEvent.ShowUnderlyingData)
1520
+ *
1217
1521
  * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
1522
+ * ```
1218
1523
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1219
1524
  */
1220
1525
  ShowUnderlyingData = "showUnderlyingData",
1221
1526
  /**
1222
1527
  * Triggers the Delete action on visualization or search
1528
+ *
1223
1529
  * @param - incase of Liveboard embed, takes in an object with vizId as a key
1224
1530
  * can be left empty for search and visualization embeds
1225
1531
  * @example
1226
- * liveboardEmbed.trigger(HostEvent.Delete, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1532
+ * ```js
1533
+ * liveboardEmbed.trigger(HostEvent.Delete, {vizId:
1534
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1535
+ *
1227
1536
  * vizEmbed.trigger(HostEvent.Delete)
1537
+ *
1228
1538
  * searchEmbed.trigger(HostEvent.Delete)
1539
+ * ```
1229
1540
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1230
1541
  */
1231
- Delete = "delete",
1542
+ Delete = "onDeleteAnswer",
1232
1543
  /**
1233
1544
  * Triggers the SpotIQAnalyze action on visualization or search
1545
+ *
1234
1546
  * @param - incase of Liveboard embed, takes in an object with vizId as a key
1235
1547
  * can be left empty for search and visualization embeds
1236
1548
  * @example
1237
- * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1549
+ * ```js
1550
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
1551
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1552
+ *
1238
1553
  * vizEmbed.trigger(HostEvent.SpotIQAnalyze)
1554
+ *
1239
1555
  * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
1556
+ * ```
1240
1557
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1241
1558
  */
1242
1559
  SpotIQAnalyze = "spotIQAnalyze",
1243
1560
  /**
1244
1561
  * Triggers the Download action on visualization or search when Displaymode is Chart
1562
+ *
1245
1563
  * @example
1246
- * liveboardEmbed.trigger(HostEvent.Download, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1564
+ * ```js
1565
+ * liveboardEmbed.trigger(HostEvent.Download, {vizId:
1566
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1567
+ *
1247
1568
  * vizEmbed.trigger(HostEvent.Download)
1569
+ *
1248
1570
  * searchEmbed.trigger(HostEvent.Download)
1571
+ * ```
1572
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1-sw ,Use {@link DownloadAsPng}
1249
1573
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1250
1574
  */
1251
- Download = "download",
1575
+ Download = "downloadAsPng",
1252
1576
  /**
1253
- * Triggers the downloadAsCSV action on visualization or search when Displaymode is Table
1577
+ * Triggers the Download action on visualization or search when Displaymode is Chart
1578
+ *
1254
1579
  * @example
1255
- * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1580
+ * ```js
1581
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
1582
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
1583
+ *
1584
+ * vizEmbed.trigger(HostEvent.DownloadAsPng)
1585
+ *
1586
+ * searchEmbed.trigger(HostEvent.DownloadAsPng)
1587
+ * ```
1588
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1-sw
1589
+ */
1590
+ DownloadAsPng = "downloadAsPng",
1591
+ /**
1592
+ * Triggers the downloadAsCSV action on visualization or search
1593
+ *
1594
+ * @example
1595
+ * ```js
1596
+ * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
1597
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1598
+ *
1256
1599
  * vizEmbed.trigger(HostEvent.DownloadAsCsv)
1600
+ *
1257
1601
  * searchEmbed.trigger(HostEvent.DownloadAsCsv)
1602
+ * ```
1258
1603
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1259
1604
  */
1260
1605
  DownloadAsCsv = "downloadAsCSV",
1261
1606
  /**
1262
- * Triggers the downloadAsXLSX action on visualization or search when Displaymode is Table
1607
+ * Triggers the downloadAsXLSX action on visualization or search
1608
+ *
1263
1609
  * @example
1264
- * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1610
+ * ```js
1611
+ * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
1612
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1613
+ *
1265
1614
  * vizEmbed.trigger(HostEvent.DownloadAsXlsx)
1615
+ *
1266
1616
  * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
1617
+ * ```
1267
1618
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1268
1619
  */
1269
1620
  DownloadAsXlsx = "downloadAsXLSX",
1270
1621
  /**
1271
1622
  * Triggers the Share action on a liveboard or answer
1623
+ *
1272
1624
  * @example
1625
+ * ```js
1273
1626
  * liveboardEmbed.trigger(HostEvent.Share)
1627
+ *
1274
1628
  * searchEmbed.trigger(HostEvent.Share)
1629
+ * ```
1275
1630
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1276
1631
  */
1277
1632
  Share = "share",
1278
1633
  /**
1279
1634
  * Trigger the Save action on a liveboard or answer
1635
+ *
1280
1636
  * @example
1637
+ * ```js
1281
1638
  * liveboardEmbed.trigger(HostEvent.Save)
1639
+ *
1282
1640
  * searchEmbed.trigger(HostEvent.Save)
1641
+ * ```
1283
1642
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1284
1643
  */
1285
1644
  Save = "save",
1286
1645
  /**
1287
1646
  * Triggers the SyncToSheets action on visualization
1647
+ *
1288
1648
  * @param - an object with vizId as a key
1289
1649
  * @example
1290
- * liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1650
+ * ```js
1651
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
1652
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1653
+ *
1291
1654
  * vizEmbed.trigger(HostEvent.SyncToSheets)
1655
+ * ```
1292
1656
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1293
1657
  */
1294
1658
  SyncToSheets = "sync-to-sheets",
1295
1659
  /**
1296
1660
  * Triggers the SyncToOtherApps action on visualization
1661
+ *
1297
1662
  * @param - an object with vizId as a key
1298
1663
  * @example
1299
- * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1664
+ * ```js
1665
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
1666
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1667
+ *
1300
1668
  * vizEmbed.trigger(HostEvent.SyncToOtherApps)
1669
+ * ```
1301
1670
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1302
1671
  */
1303
1672
  SyncToOtherApps = "sync-to-other-apps",
1304
1673
  /**
1305
1674
  * Triggers the ManagePipelines action on visualization
1675
+ *
1306
1676
  * @param - an object with vizId as a key
1307
1677
  * @example
1308
- * liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
1678
+ * ```js
1679
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
1680
+ * '730496d6-6903-4601-937e-2c691821af3c'})
1681
+ *
1309
1682
  * vizEmbed.trigger(HostEvent.ManagePipelines)
1683
+ * ```
1310
1684
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
1311
1685
  */
1312
1686
  ManagePipelines = "manage-pipeline",
1313
1687
  /**
1314
1688
  * Triggers the Reset search in answer
1689
+ *
1315
1690
  * @example
1316
- * searchEmbed.trigger(HostEvent.SearchReset
1691
+ * ```js
1692
+ * searchEmbed.trigger(HostEvent.ResetSearch)
1693
+ * ```
1317
1694
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
1318
1695
  */
1319
1696
  ResetSearch = "resetSearch"
@@ -1341,6 +1718,7 @@ export declare enum DataSourceVisualMode {
1341
1718
  * containing configuration and/or visual information.
1342
1719
  */
1343
1720
  export declare enum Param {
1721
+ EmbedApp = "embedApp",
1344
1722
  DataSources = "dataSources",
1345
1723
  DataSourceMode = "dataSourceMode",
1346
1724
  DisableActions = "disableAction",
@@ -1379,11 +1757,26 @@ export declare enum Param {
1379
1757
  cookieless = "cookieless",
1380
1758
  ContextMenuTrigger = "isContextMenuEnabledOnLeftClick",
1381
1759
  LinkOverride = "linkOverride",
1382
- ShowInsertToSlide = "insertInToSlide"
1760
+ ShowInsertToSlide = "insertInToSlide",
1761
+ PrimaryNavHidden = "primaryNavHidden",
1762
+ HideProfleAndHelp = "profileAndHelpInNavBarHidden"
1383
1763
  }
1384
1764
  /**
1385
1765
  * The list of actions that can be performed on visual ThoughtSpot
1386
1766
  * entities, such as answers and Liveboards.
1767
+ *
1768
+ * This enum is used to specify the actions that could be disabled,
1769
+ * hidden or made visible.
1770
+ *
1771
+ * @example
1772
+ * ```js
1773
+ * const embed = new LiveboardEmbed('#embed-container', {
1774
+ * ... // other options
1775
+ * visibleActions: [Action.Save, Action.Explore],
1776
+ * disableActions: [Action.Save],
1777
+ * hiddenActions: [Action.Download], // Set either this or visibleActions
1778
+ * })
1779
+ * ```
1387
1780
  */
1388
1781
  export declare enum Action {
1389
1782
  Save = "save",
@@ -1478,12 +1871,18 @@ export declare enum Action {
1478
1871
  * @hidden
1479
1872
  */
1480
1873
  DownloadEmbraceQueries = "downloadEmbraceQueries",
1874
+ /**
1875
+ * Pin action.
1876
+ */
1481
1877
  Pin = "pin",
1482
1878
  /**
1483
1879
  * @hidden
1484
1880
  */
1485
1881
  AnalysisInfo = "analysisInfo",
1486
1882
  Subscription = "subscription",
1883
+ /**
1884
+ * Explore action.
1885
+ */
1487
1886
  Explore = "explore",
1488
1887
  DrillInclude = "context-menu-item-include",
1489
1888
  DrillExclude = "context-menu-item-exclude",
@@ -1495,9 +1894,6 @@ export declare enum Action {
1495
1894
  DrillEdit = "context-menu-item-edit",
1496
1895
  EditMeasure = "context-menu-item-edit-measure",
1497
1896
  Separator = "context-menu-item-separator",
1498
- /**
1499
- * @hidden
1500
- */
1501
1897
  DrillDown = "DRILL",
1502
1898
  RequestAccess = "requestAccess",
1503
1899
  QueryDetailsButtons = "queryDetailsButtons",
@@ -1587,7 +1983,11 @@ export declare enum Action {
1587
1983
  /**
1588
1984
  * @hidden
1589
1985
  */
1590
- InsertInToSlide = "insertInToSlide"
1986
+ InsertInToSlide = "insertInToSlide",
1987
+ /**
1988
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
1989
+ */
1990
+ RenameModalTitleDescription = "renameModalTitleDescription"
1591
1991
  }
1592
1992
  export interface SessionInterface {
1593
1993
  sessionId: string;
@@ -1610,6 +2010,9 @@ export declare enum PrefetchFeatures {
1610
2010
  LiveboardEmbed = "LiveboardEmbed",
1611
2011
  VizEmbed = "VizEmbed"
1612
2012
  }
2013
+ /**
2014
+ * Enum for options to change context trigger
2015
+ */
1613
2016
  export declare enum ContextMenuTriggerOptions {
1614
2017
  LEFT_CLICK = "left-click",
1615
2018
  RIGHT_CLICK = "right-click"