@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
@@ -0,0 +1,3092 @@
1
+ // Generated by dts-bundle v0.7.3
2
+ // Dependencies for this module:
3
+ // ../../../react
4
+ // ../../../eventemitter3
5
+
6
+ import React from 'react';
7
+ import EventEmitter from 'eventemitter3';
8
+
9
+ interface SearchProps extends EmbedProps, SearchViewConfig {
10
+ }
11
+ /**
12
+ * React component for Search Embed.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * function Search() {
17
+ * return <SearchEmbed
18
+ * dataSource="dataSourceId"
19
+ * searchOptions={{ searchTokenString: "[revenue]" }}
20
+ * />
21
+ * }
22
+ * ```
23
+ */
24
+ export const SearchEmbed: React.ForwardRefExoticComponent<SearchProps & React.RefAttributes<TsEmbed>>;
25
+ interface AppProps extends EmbedProps, AppViewConfig {
26
+ }
27
+ /**
28
+ * React component for Full app Embed.
29
+ *
30
+ * @example
31
+ * ```tsx
32
+ * function Search() {
33
+ * return <AppEmbed
34
+ * showPrimaryNavbar={false}
35
+ * pageId={Page.Liveboards}
36
+ * onError={(error) => console.error(error)}
37
+ * />
38
+ * }
39
+ * ```
40
+ */
41
+ export const AppEmbed: React.ForwardRefExoticComponent<AppProps & React.RefAttributes<TsEmbed>>;
42
+ interface LiveboardProps extends EmbedProps, LiveboardViewConfig {
43
+ }
44
+ /**
45
+ * React component for Liveboard embed.
46
+ *
47
+ * @example
48
+ * ```tsx
49
+ * function Liveboard() {
50
+ * return <LiveboardEmbed
51
+ * liveboardId="liveboardId"
52
+ * fullHeight={true} {/* default false *\/}
53
+ * onLiveboardRendered={() => console.log('Liveboard rendered')}
54
+ * vizId="vizId" {/* if doing viz embed *\/}
55
+ * />
56
+ * }
57
+ * ```
58
+ */
59
+ export const LiveboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
60
+ export const PinboardEmbed: React.ForwardRefExoticComponent<LiveboardProps & React.RefAttributes<TsEmbed>>;
61
+ interface SearchBarEmbedProps extends EmbedProps, SearchBarViewConfig {
62
+ }
63
+ /**
64
+ * React component for Search bar embed.
65
+ *
66
+ * @example
67
+ * ```tsx
68
+ * function SearchBar() {
69
+ * return <SearchBarEmbed
70
+ * dataSource="dataSourceId"
71
+ * searchOptions={{ searchTokenString: "[revenue]" }}
72
+ * />
73
+ * }
74
+ * ```
75
+ */
76
+ export const SearchBarEmbed: React.ForwardRefExoticComponent<SearchBarEmbedProps & React.RefAttributes<TsEmbed>>;
77
+ /**
78
+ * Get a reference to the embed component to trigger events on the component.
79
+ *
80
+ * @example
81
+ * ```
82
+ * function Component() {
83
+ * const ref = useEmbedRef();
84
+ * useEffect(() => {
85
+ * ref.current.trigger(
86
+ * EmbedEvent.UpdateRuntimeFilter,
87
+ * [{ columnName: 'name', operator: 'EQ', values: ['value']}]);
88
+ * }, [])
89
+ * return <LiveboardEmbed ref={ref} liveboardId={<id>} />
90
+ * }
91
+ * ```
92
+ * @returns {React.MutableRefObject<TsEmbed>} ref
93
+ */
94
+ export const useEmbedRef: () => React.MutableRefObject<TsEmbed>;
95
+
96
+ /**
97
+ * Copyright (c) 2023
98
+ *
99
+ * ThoughtSpot Visual Embed SDK for embedding ThoughtSpot analytics
100
+ * in other web applications.
101
+ *
102
+ * @summary ThoughtSpot Visual Embed SDK
103
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
104
+ */
105
+ export { init, logout, prefetch, executeTML, exportTML, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, };
106
+
107
+ /**
108
+ * @group Embed components
109
+ */
110
+ export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts'> {
111
+ /**
112
+ * The array of data source GUIDs to set on load.
113
+ * Only a single dataSource supported currently.
114
+ *
115
+ * @deprecated Use dataSource instead
116
+ */
117
+ dataSources?: string[];
118
+ /**
119
+ * The array of data source GUIDs to set on load.
120
+ *
121
+ * @version: SDK: 1.19.0
122
+ */
123
+ dataSource?: string;
124
+ /**
125
+ * Configuration for search options
126
+ */
127
+ searchOptions?: SearchOptions;
128
+ }
129
+ /**
130
+ * Embed ThoughtSpot search bar
131
+ *
132
+ * @version: SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
133
+ * @group Embed components
134
+ */
135
+ export declare class SearchBarEmbed extends TsEmbed {
136
+ /**
137
+ * The view configuration for the embedded ThoughtSpot search bar.
138
+ */
139
+ protected viewConfig: SearchBarViewConfig;
140
+ constructor(domSelector: string, viewConfig: SearchBarViewConfig);
141
+ /**
142
+ * Render the embedded ThoughtSpot search
143
+ */
144
+ render(): SearchBarEmbed;
145
+ }
146
+
147
+ /**
148
+ * Copyright (c) 2022
149
+ *
150
+ * Embed ThoughtSpot search or a saved answer
151
+ *
152
+ * @summary Search embed
153
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
154
+ */
155
+ /**
156
+ * Configuration for search options
157
+ */
158
+ export interface SearchOptions {
159
+ /**
160
+ * The tml string to load the answer
161
+ */
162
+ searchTokenString: string;
163
+ /**
164
+ * Boolean to determine if the search should be executed or not.
165
+ * if it is executed, put the focus on the results.
166
+ * if it’s not executed, put the focus in the search bar - at the end of
167
+ * the tokens
168
+ */
169
+ executeSearch?: boolean;
170
+ }
171
+ /**
172
+ * The configuration attributes for the embedded search view.
173
+ *
174
+ * @group Embed components
175
+ */
176
+ export interface SearchViewConfig extends ViewConfig {
177
+ /**
178
+ * If set to true, the data sources panel is collapsed on load,
179
+ * but can be expanded manually.
180
+ */
181
+ collapseDataSources?: boolean;
182
+ /**
183
+ * If set to true, hides the data sources panel.
184
+ */
185
+ hideDataSources?: boolean;
186
+ /**
187
+ * If set to true, hides the charts and tables in search answers.
188
+ * This attribute can be used to create a custom visualization
189
+ * using raw answer data.
190
+ */
191
+ hideResults?: boolean;
192
+ /**
193
+ * If set to true, the Search Assist feature is enabled.
194
+ *
195
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
196
+ */
197
+ enableSearchAssist?: boolean;
198
+ /**
199
+ * If set to true, the tabular view is set as the default
200
+ * format for presenting search data.
201
+ */
202
+ forceTable?: boolean;
203
+ /**
204
+ * The array of data source GUIDs to set on load.
205
+ * Only a single dataSource supported currently.
206
+ *
207
+ * @deprecated Use dataSource instead
208
+ */
209
+ dataSources?: string[];
210
+ /**
211
+ * The array of data source GUIDs to set on load.
212
+ *
213
+ * @version: SDK: 1.19.0
214
+ */
215
+ dataSource?: string;
216
+ /**
217
+ * The initial search query to load the answer with.
218
+ *
219
+ * @deprecated Use {@link searchOptions} instead
220
+ */
221
+ searchQuery?: string;
222
+ /**
223
+ * Configuration for search options
224
+ */
225
+ searchOptions?: SearchOptions;
226
+ /**
227
+ * The GUID of a saved answer to load initially.
228
+ */
229
+ answerId?: string;
230
+ /**
231
+ * If set to true, search page will render without the Search Bar
232
+ * The chart/table should still be visible.
233
+ *
234
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
235
+ */
236
+ hideSearchBar?: boolean;
237
+ }
238
+ export declare const HiddenActionItemByDefaultForSearchEmbed: Action[];
239
+ /**
240
+ * Embed ThoughtSpot search
241
+ *
242
+ * @group Embed components
243
+ */
244
+ export declare class SearchEmbed extends TsEmbed {
245
+ /**
246
+ * The view configuration for the embedded ThoughtSpot search.
247
+ */
248
+ protected viewConfig: SearchViewConfig;
249
+ constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
250
+ protected getEmbedParams(): string;
251
+ /**
252
+ * Render the embedded ThoughtSpot search
253
+ */
254
+ render(): SearchEmbed;
255
+ }
256
+
257
+ /**
258
+ * Copyright (c) 2022
259
+ *
260
+ * Full application embedding
261
+ * https://developers.thoughtspot.com/docs/?pageid=full-embed
262
+ *
263
+ * @summary Full app embed
264
+ * @module
265
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
266
+ */
267
+ /**
268
+ * Pages within the ThoughtSpot app that can be embedded.
269
+ */
270
+ export declare enum Page {
271
+ /**
272
+ * Home page
273
+ */
274
+ Home = "home",
275
+ /**
276
+ * Search page
277
+ */
278
+ Search = "search",
279
+ /**
280
+ * Saved answers listing page
281
+ */
282
+ Answers = "answers",
283
+ /**
284
+ * Liveboards listing page
285
+ */
286
+ Liveboards = "liveboards",
287
+ /**
288
+ * @hidden
289
+ */
290
+ Pinboards = "pinboards",
291
+ /**
292
+ * Data management page
293
+ */
294
+ Data = "data",
295
+ /**
296
+ * SpotIQ listing page
297
+ */
298
+ SpotIQ = "spotiq"
299
+ }
300
+ /**
301
+ * The view configuration for full app embedding.
302
+ *
303
+ * @group Embed components
304
+ */
305
+ export interface AppViewConfig extends ViewConfig {
306
+ /**
307
+ * If true, the main navigation bar within the ThoughtSpot app
308
+ * is displayed. By default, the navigation bar is hidden.
309
+ */
310
+ showPrimaryNavbar?: boolean;
311
+ /**
312
+ * If true, help and profile buttons will hide on NavBar. By default,
313
+ * they are shown.
314
+ */
315
+ disableProfileAndHelp?: boolean;
316
+ /**
317
+ * A URL path within the app that is to be embedded.
318
+ * If both path and pageId attributes are defined, the path definition
319
+ * takes precedence.
320
+ */
321
+ path?: string;
322
+ /**
323
+ * The application page to set as the start page
324
+ * in the embedded view.
325
+ */
326
+ pageId?: Page;
327
+ /**
328
+ * This puts a filter tag on the application. All metadata lists in the
329
+ * application, such as Liveboards and answers, would be filtered by this
330
+ * tag.
331
+ */
332
+ tag?: string;
333
+ /**
334
+ * The array of GUIDs to be hidden
335
+ */
336
+ hideObjects?: string[];
337
+ /**
338
+ * Render liveboards using the new v2 rendering mode
339
+ * This is a transient flag which is primarily meant for internal use
340
+ *
341
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
342
+ * @hidden
343
+ */
344
+ liveboardV2?: boolean;
345
+ /**
346
+ * If set to true, the Search Assist feature is enabled.
347
+ *
348
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
349
+ */
350
+ enableSearchAssist?: boolean;
351
+ /**
352
+ * If set to true, the embedded object container dynamically resizes
353
+ * according to the height of the pages which support fullHeight mode.
354
+ *
355
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
356
+ */
357
+ fullHeight?: boolean;
358
+ }
359
+ /**
360
+ * Embeds full ThoughtSpot experience in a host application.
361
+ *
362
+ * @group Embed components
363
+ */
364
+ export declare class AppEmbed extends V1Embed {
365
+ protected viewConfig: AppViewConfig;
366
+ constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
367
+ /**
368
+ * Constructs a map of parameters to be passed on to the
369
+ * embedded Liveboard or visualization.
370
+ */
371
+ protected getEmbedParams(): string;
372
+ /**
373
+ * Set the iframe height as per the computed height received
374
+ * from the ThoughtSpot app.
375
+ *
376
+ * @param data The event payload
377
+ */
378
+ protected updateIFrameHeight: (data: MessagePayload) => void;
379
+ /**
380
+ * Navigate to particular page for app embed. eg:answers/pinboards/home
381
+ * This is used for embedding answers, pinboards, visualizations and full application
382
+ * only.
383
+ *
384
+ * @param path string | number The string, set to iframe src and navigate to new page
385
+ * eg: appEmbed.navigateToPage('pinboards')
386
+ * When used with `noReload` (default: true) this can also be a number
387
+ * like 1/-1 to go forward/back.
388
+ * @param noReload boolean Trigger the navigation without reloading the page
389
+ * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
390
+ */
391
+ navigateToPage(path: string | number, noReload?: boolean): void;
392
+ /**
393
+ * Renders the embedded application pages in the ThoughtSpot app.
394
+ *
395
+ * @param renderOptions An object containing the page ID
396
+ * to be embedded.
397
+ */
398
+ render(): AppEmbed;
399
+ }
400
+
401
+ /**
402
+ * Copyright (c) 2022
403
+ *
404
+ * Embed a ThoughtSpot Liveboard or visualization
405
+ * https://developers.thoughtspot.com/docs/?pageid=embed-pinboard
406
+ * https://developers.thoughtspot.com/docs/?pageid=embed-a-viz
407
+ *
408
+ * @summary Liveboard & visualization embed
409
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
410
+ */
411
+ /**
412
+ * The configuration for the embedded Liveboard or visualization page view.
413
+ *
414
+ * @group Embed components
415
+ */
416
+ export interface LiveboardViewConfig extends ViewConfig {
417
+ /**
418
+ * If set to true, the embedded object container dynamically resizes
419
+ * according to the height of the Liveboard.
420
+ *
421
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
422
+ */
423
+ fullHeight?: boolean;
424
+ /**
425
+ * This is the minimum height(in pixels) for a full height Liveboard.
426
+ * Setting this height helps resolves issues with empty Liveboards and
427
+ * other screens navigable from a Liveboard.
428
+ *
429
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
430
+ * @default 500
431
+ */
432
+ defaultHeight?: number;
433
+ /**
434
+ * @Deprecated If set to true, the context menu in visualizations will be enabled.
435
+ */
436
+ enableVizTransformations?: boolean;
437
+ /**
438
+ * The Liveboard to display in the embedded view.
439
+ * Use either of liveboardId or pinboardId to reference the Liveboard to embed.
440
+ *
441
+ * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
442
+ */
443
+ liveboardId?: string;
444
+ /**
445
+ * To support backward compatibility
446
+ *
447
+ * @hidden
448
+ */
449
+ pinboardId?: string;
450
+ /**
451
+ * The visualization within the Liveboard to display.
452
+ */
453
+ vizId?: string;
454
+ /**
455
+ * If set to true, all filter chips from a
456
+ * Liveboard page will be read-only (no X buttons)
457
+ *
458
+ * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
459
+ */
460
+ preventLiveboardFilterRemoval?: boolean;
461
+ /**
462
+ * Array of viz ids which should be visible when the liveboard
463
+ * first renders. This can be changed by triggering the "SetVisibleVizs"
464
+ * event.
465
+ *
466
+ * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
467
+ */
468
+ visibleVizs?: string[];
469
+ /**
470
+ * To support backward compatibilty
471
+ *
472
+ * @hidden
473
+ */
474
+ preventPinboardFilterRemoval?: boolean;
475
+ /**
476
+ * Render embedded Liveboards and visualizations in the new Liveboard experience mode
477
+ *
478
+ * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
479
+ */
480
+ liveboardV2?: boolean;
481
+ /**
482
+ * Tab Id of the Liveboard that is supposed to be active
483
+ *
484
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
485
+ */
486
+ activeTabId?: string;
487
+ }
488
+ /**
489
+ * Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already
490
+ * waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS.
491
+ *
492
+ * @example
493
+ * ```js
494
+ * import { .. } from '@thoughtspot/visual-embed-sdk';
495
+ * init({ ... });
496
+ * const embed = new LiveboardEmbed("#container", {
497
+ * liveboardId: <your-id-here>,
498
+ * // .. other params here.
499
+ * })
500
+ * ```
501
+ * @group Embed components
502
+ */
503
+ export declare class LiveboardEmbed extends V1Embed {
504
+ protected viewConfig: LiveboardViewConfig;
505
+ constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
506
+ /**
507
+ * Construct a map of params to be passed on to the
508
+ * embedded Liveboard or visualization.
509
+ */
510
+ protected getEmbedParams(): string;
511
+ /**
512
+ * Triggers an event to the embedded app
513
+ *
514
+ * @param messageType The event type
515
+ * @param data The payload to send with the message
516
+ */
517
+ trigger(messageType: HostEvent, data?: any): Promise<any>;
518
+ /**
519
+ * Render an embedded ThoughtSpot Liveboard or visualization
520
+ *
521
+ * @param renderOptions An object specifying the Liveboard ID,
522
+ * visualization ID and the runtime filters.
523
+ */
524
+ render(): LiveboardEmbed;
525
+ navigateToLiveboard(liveboardId: string, vizId?: string, activeTabId?: string): void;
526
+ }
527
+ /**
528
+ * @hidden
529
+ */
530
+ export declare class PinboardEmbed extends LiveboardEmbed {
531
+ }
532
+
533
+ /**
534
+ * Copyright (c) 2022
535
+ *
536
+ * Base classes
537
+ *
538
+ * @summary Base classes
539
+ * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
540
+ */
541
+ /**
542
+ * Global prefix for all Thoughtspot postHash Params.
543
+ */
544
+ export declare const THOUGHTSPOT_PARAM_PREFIX = "ts-";
545
+ /**
546
+ * Base class for embedding v2 experience
547
+ * Note: the v2 version of ThoughtSpot Blink is built on the new stack:
548
+ * React+GraphQL
549
+ */
550
+ export declare class TsEmbed {
551
+ protected isAppInitialized: boolean;
552
+ /**
553
+ * A reference to the iframe within which the ThoughtSpot app
554
+ * will be rendered.
555
+ */
556
+ protected iFrame: HTMLIFrameElement;
557
+ protected viewConfig: ViewConfig;
558
+ protected embedConfig: EmbedConfig;
559
+ /**
560
+ * The ThoughtSpot hostname or IP address
561
+ */
562
+ protected thoughtSpotHost: string;
563
+ protected thoughtSpotV2Base: string;
564
+ constructor(domSelector: DOMSelector, viewConfig?: ViewConfig);
565
+ /**
566
+ * Handles errors within the SDK
567
+ *
568
+ * @param error The error message or object
569
+ */
570
+ protected handleError(error: string | Record<string, unknown>): void;
571
+ /**
572
+ * Constructs the base URL string to load the ThoughtSpot app.
573
+ *
574
+ * @param query
575
+ */
576
+ protected getEmbedBasePath(query: string): string;
577
+ /**
578
+ * Common query params set for all the embed modes.
579
+ *
580
+ * @param queryParams
581
+ * @returns queryParams
582
+ */
583
+ protected getBaseQueryParams(queryParams?: {}): {};
584
+ /**
585
+ * Constructs the base URL string to load v1 of the ThoughtSpot app.
586
+ * This is used for embedding Liveboards, visualizations, and full application.
587
+ *
588
+ * @param queryString The query string to append to the URL.
589
+ * @param isAppEmbed A Boolean parameter to specify if you are embedding
590
+ * the full application.
591
+ */
592
+ protected getV1EmbedBasePath(queryString: string): string;
593
+ protected getEmbedParams(): string;
594
+ protected getRootIframeSrc(): string;
595
+ protected createIframeEl(frameSrc: string): HTMLIFrameElement;
596
+ /**
597
+ * Renders the embedded ThoughtSpot app in an iframe and sets up
598
+ * event listeners.
599
+ *
600
+ * @param url
601
+ * @param frameOptions
602
+ */
603
+ protected renderIFrame(url: string): Promise<any>;
604
+ protected insertIntoDOM(child: string | Node): void;
605
+ /**
606
+ * Sets the height of the iframe
607
+ *
608
+ * @param height The height in pixels
609
+ */
610
+ protected setIFrameHeight(height: number | string): void;
611
+ /**
612
+ * Executes all registered event handlers for a particular event type
613
+ *
614
+ * @param eventType The event type
615
+ * @param data The payload invoked with the event handler
616
+ * @param eventPort The event Port for a specific MessageChannel
617
+ */
618
+ protected executeCallbacks(eventType: EmbedEvent, data: any, eventPort?: MessagePort | void): void;
619
+ /**
620
+ * Returns the ThoughtSpot hostname or IP address.
621
+ */
622
+ protected getThoughtSpotHost(): string;
623
+ /**
624
+ * Gets the v1 event type (if applicable) for the EmbedEvent type
625
+ *
626
+ * @param eventType The v2 event type
627
+ * @returns The corresponding v1 event type if one exists
628
+ * or else the v2 event type itself
629
+ */
630
+ protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
631
+ /**
632
+ * Calculates the iframe center for the current visible viewPort
633
+ * of iframe using Scroll position of Host App, offsetTop for iframe
634
+ * in Host app. ViewPort height of the tab.
635
+ *
636
+ * @returns iframe Center in visible viewport,
637
+ * Iframe height,
638
+ * View port height.
639
+ */
640
+ protected getIframeCenter(): {
641
+ iframeCenter: number;
642
+ iframeScrolled: number;
643
+ iframeHeight: number;
644
+ viewPortHeight: number;
645
+ iframeVisibleViewPort: number;
646
+ };
647
+ /**
648
+ * Registers an event listener to trigger an alert when the ThoughtSpot app
649
+ * sends an event of a particular message type to the host application.
650
+ *
651
+ * @param messageType The message type
652
+ * @param callback A callback as a function
653
+ * @param options The message options
654
+ * @example
655
+ * ```js
656
+ * tsEmbed.on(EmbedEvent.Error, (data) => {
657
+ * console.error(data);
658
+ * });
659
+ * ```
660
+ * @example
661
+ * ```js
662
+ * tsEmbed.on(EmbedEvent.Save, (data) => {
663
+ * console.log("Answer save clicked", data);
664
+ * }, {
665
+ * start: true // This will trigger the callback on start of save
666
+ * });
667
+ * ```
668
+ */
669
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
670
+ /**
671
+ * Removes an event listener for a particular event type.
672
+ *
673
+ * @param messageType The message type
674
+ * @param callback The callback to remove
675
+ * @example
676
+ * ```js
677
+ * const errorHandler = (data) => { console.error(data); };
678
+ * tsEmbed.on(EmbedEvent.Error, errorHandler);
679
+ * tsEmbed.off(EmbedEvent.Error, errorHandler);
680
+ * ```
681
+ */
682
+ off(messageType: EmbedEvent, callback: MessageCallback): typeof TsEmbed.prototype;
683
+ /**
684
+ * Triggers an event to the embedded app
685
+ *
686
+ * @param messageType The event type
687
+ * @param data The payload to send with the message
688
+ */
689
+ trigger(messageType: HostEvent, data?: any): Promise<any>;
690
+ /**
691
+ * Marks the ThoughtSpot object to have been rendered
692
+ * Needs to be overridden by subclasses to do the actual
693
+ * rendering of the iframe.
694
+ *
695
+ * @param args
696
+ */
697
+ render(): TsEmbed;
698
+ /**
699
+ * Get the Post Url Params for THOUGHTSPOT from the current
700
+ * host app URL.
701
+ * THOUGHTSPOT URL params starts with a prefix "ts-"
702
+ *
703
+ * @version SDK: 1.14.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
704
+ */
705
+ getThoughtSpotPostUrlParams(): string;
706
+ /**
707
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
708
+ *
709
+ * @version SDK: 1.19.1 | ThoughtSpot: *
710
+ */
711
+ destroy(): void;
712
+ getUnderlyingFrameElement(): HTMLIFrameElement;
713
+ /**
714
+ * Prerenders a generic instance of the TS component.
715
+ * This means without the path but with the flags already applied.
716
+ * This is useful for prerendering the component in the background.
717
+ *
718
+ * @version SDK: 1.22.0
719
+ * @returns
720
+ */
721
+ prerenderGeneric(): Promise<any>;
722
+ }
723
+ /**
724
+ * Base class for embedding v1 experience
725
+ * Note: The v1 version of ThoughtSpot Blink works on the AngularJS stack
726
+ * which is currently under migration to v2
727
+ *
728
+ * @inheritdoc
729
+ */
730
+ export declare class V1Embed extends TsEmbed {
731
+ protected viewConfig: ViewConfig;
732
+ constructor(domSelector: DOMSelector, viewConfig: ViewConfig);
733
+ /**
734
+ * Render the app in an iframe and set up event handlers
735
+ *
736
+ * @param iframeSrc
737
+ */
738
+ protected renderV1Embed(iframeSrc: string): any;
739
+ protected getRootIframeSrc(): string;
740
+ /**
741
+ * @inheritdoc
742
+ * @example
743
+ * ```js
744
+ * tsEmbed.on(EmbedEvent.Error, (data) => {
745
+ * console.error(data);
746
+ * });
747
+ * ```
748
+ * @example
749
+ * ```js
750
+ * tsEmbed.on(EmbedEvent.Save, (data) => {
751
+ * console.log("Answer save clicked", data);
752
+ * }, {
753
+ * start: true // This will trigger the callback on start of save
754
+ * });
755
+ * ```
756
+ */
757
+ on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
758
+ }
759
+
760
+ export type EmbedEventHandlers = {
761
+ [key in keyof typeof EmbedEvent as `on${Capitalize<key>}`]?: MessageCallback;
762
+ };
763
+ export interface EmbedProps extends ViewConfig, EmbedEventHandlers {
764
+ className?: string;
765
+ }
766
+ export interface ViewConfigAndListeners<T extends ViewConfig> {
767
+ viewConfig: T;
768
+ listeners: {
769
+ [key in EmbedEvent]?: MessageCallback;
770
+ };
771
+ }
772
+ /**
773
+ *
774
+ * @param props
775
+ */
776
+ export function getViewPropsAndListeners<T extends EmbedProps, U extends ViewConfig>(props: T): ViewConfigAndListeners<U>;
777
+
778
+ export interface executeTMLInput {
779
+ metadata_tmls: string[];
780
+ import_policy?: 'PARTIAL' | 'ALL_OR_NONE' | 'VALIDATE_ONLY';
781
+ create_new?: boolean;
782
+ }
783
+ export interface exportTMLInput {
784
+ metadata: {
785
+ identifier: string;
786
+ type?: 'LIVEBOARD' | 'ANSWER' | 'LOGICAL_TABLE' | 'CONNECTION';
787
+ }[];
788
+ export_associated?: boolean;
789
+ export_fqn?: boolean;
790
+ edoc_format?: 'YAML' | 'JSON';
791
+ }
792
+ export declare let authPromise: Promise<boolean>;
793
+ /**
794
+ * Gets the configuration embed was initialized with.
795
+ *
796
+ * @returns {@link EmbedConfig} The configuration embed was initialized with.
797
+ * @version SDK: 1.19.0 | ThoughtSpot: *
798
+ * @group Global methods
799
+ */
800
+ export declare const getEmbedConfig: () => EmbedConfig;
801
+ export declare const getAuthPromise: () => Promise<boolean>;
802
+ export { notifyAuthFailure, notifyAuthSDKSuccess, notifyAuthSuccess, notifyLogout, };
803
+ /**
804
+ * Perform authentication on the ThoughtSpot app as applicable.
805
+ */
806
+ export declare const handleAuth: () => Promise<boolean>;
807
+ /**
808
+ * Prefetches static resources from the specified URL. Web browsers can then cache the
809
+ * prefetched resources and serve them from the user's local disk to provide faster access
810
+ * to your app.
811
+ *
812
+ * @param url The URL provided for prefetch
813
+ * @param prefetchFeatures Specify features which needs to be prefetched.
814
+ * @version SDK: 1.4.0 | ThoughtSpot: ts7.sep.cl, 7.2.1
815
+ * @group Global methods
816
+ */
817
+ export declare const prefetch: (url?: string, prefetchFeatures?: PrefetchFeatures[]) => void;
818
+ /**
819
+ * Initializes the Visual Embed SDK globally and perform
820
+ * authentication if applicable. This function needs to be called before any ThoughtSpot
821
+ * component like liveboard etc can be embedded. But need not wait for AuthEvent.SUCCESS
822
+ * to actually embed. That is handled internally.
823
+ *
824
+ * @param embedConfig The configuration object containing ThoughtSpot host,
825
+ * authentication mechanism and so on.
826
+ * @example
827
+ * ```js
828
+ * const authStatus = init({
829
+ * thoughtSpotHost: 'https://my.thoughtspot.cloud',
830
+ * authType: AuthType.None,
831
+ * });
832
+ * authStatus.on(AuthStatus.FAILURE, (reason) => { // do something here });
833
+ * ```
834
+ * @returns {@link AuthEventEmitter} event emitter which emits events on authentication success,
835
+ * failure and logout. See {@link AuthStatus}
836
+ * @version SDK: 1.0.0 | ThoughtSpot ts7.april.cl, 7.2.1
837
+ * @group Authentication / Init
838
+ */
839
+ export declare const init: (embedConfig: EmbedConfig) => AuthEventEmitter;
840
+ /**
841
+ *
842
+ */
843
+ export declare function disableAutoLogin(): void;
844
+ /**
845
+ * Logs out from ThoughtSpot. This also sets the autoLogin flag to false, to
846
+ * prevent the SDK from automatically logging in again.
847
+ *
848
+ * You can call the `init` method again to re login, if autoLogin is set to
849
+ * true in this second call it will be honored.
850
+ *
851
+ * @param doNotDisableAutoLogin This flag when passed will not disable autoLogin
852
+ * @returns Promise which resolves when logout completes.
853
+ * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
854
+ * @group Global methods
855
+ */
856
+ export declare const logout: (doNotDisableAutoLogin?: boolean) => Promise<boolean>;
857
+ /**
858
+ * Renders functions in a queue, resolves to next function only after the callback next
859
+ * is called
860
+ *
861
+ * @param fn The function being registered
862
+ */
863
+ export declare const renderInQueue: (fn: (next?: (val?: any) => void) => Promise<any>) => Promise<any>;
864
+ export declare const executeTML: (data: executeTMLInput) => Promise<any>;
865
+ export declare const exportTML: (data: exportTMLInput) => Promise<any>;
866
+ /**
867
+ *
868
+ */
869
+ export declare function reset(): void;
870
+
871
+ export declare let loggedInStatus: boolean;
872
+ export declare let samlAuthWindow: Window;
873
+ export declare let samlCompletionPromise: Promise<void>;
874
+ export declare const SSO_REDIRECTION_MARKER_GUID = "5e16222e-ef02-43e9-9fbd-24226bf3ce5b";
875
+ export declare const EndPoints: {
876
+ AUTH_VERIFICATION: string;
877
+ SAML_LOGIN_TEMPLATE: (targetUrl: string) => string;
878
+ OIDC_LOGIN_TEMPLATE: (targetUrl: string) => string;
879
+ TOKEN_LOGIN: string;
880
+ BASIC_LOGIN: string;
881
+ LOGOUT: string;
882
+ EXECUTE_TML: string;
883
+ EXPORT_TML: string;
884
+ };
885
+ interface sessionInfoInterface {
886
+ userGUID: any;
887
+ isPublicUser: any;
888
+ mixpanelToken: any;
889
+ [key: string]: any;
890
+ }
891
+ /**
892
+ * Enum for auth failure types. This is the parameter passed to the listner
893
+ * of {@link AuthStatus.FAILURE}.
894
+ *
895
+ * @group Authentication / Init
896
+ */
897
+ export declare enum AuthFailureType {
898
+ SDK = "SDK",
899
+ NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
900
+ EXPIRY = "EXPIRY",
901
+ OTHER = "OTHER"
902
+ }
903
+ /**
904
+ * Enum for auth status emitted by the emitter returned from {@link init}.
905
+ *
906
+ * @group Authentication / Init
907
+ */
908
+ export declare enum AuthStatus {
909
+ /**
910
+ * Emits when the SDK fails to authenticate
911
+ */
912
+ FAILURE = "FAILURE",
913
+ /**
914
+ * Emits when the SDK authenticates successfully
915
+ */
916
+ SDK_SUCCESS = "SDK_SUCCESS",
917
+ /**
918
+ * Emits when the app sends an authentication success message
919
+ */
920
+ SUCCESS = "SUCCESS",
921
+ /**
922
+ * Emits when a user logs out
923
+ */
924
+ LOGOUT = "LOGOUT",
925
+ /**
926
+ * Emitted when inPopup: true in the SAMLRedirect flow.
927
+ * And, we are waiting for popup to be triggered either programatically
928
+ * or by the trigger button.
929
+ *
930
+ * @version SDK: 1.19.0
931
+ */
932
+ WAITING_FOR_POPUP = "WAITING_FOR_POPUP"
933
+ }
934
+ /**
935
+ * Event emitter returned from {@link init}.
936
+ *
937
+ * @group Authentication / Init
938
+ */
939
+ export interface AuthEventEmitter {
940
+ /**
941
+ * Register a listener on Auth failure.
942
+ *
943
+ * @param event
944
+ * @param listener
945
+ */
946
+ on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
947
+ /**
948
+ * Register a listener on Auth SDK success.
949
+ *
950
+ * @param event
951
+ * @param listener
952
+ */
953
+ on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
954
+ on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
955
+ once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
956
+ once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP, listener: () => void): this;
957
+ once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
958
+ /**
959
+ * Trigger an event on the emitter returned from init.
960
+ *
961
+ * @param {@link AuthEvent}
962
+ */
963
+ emit(event: AuthEvent): void;
964
+ }
965
+ /**
966
+ * Events which can be triggered on the emitter returned from {@link init}.
967
+ *
968
+ * @group Authentication / Init
969
+ */
970
+ export declare enum AuthEvent {
971
+ /**
972
+ * Manually trigger the SSO popup. This is useful with
973
+ * authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
974
+ */
975
+ TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
976
+ }
977
+ /**
978
+ *
979
+ */
980
+ export declare function getAuthEE(): EventEmitter<AuthStatus | AuthEvent>;
981
+ /**
982
+ *
983
+ * @param eventEmitter
984
+ */
985
+ export declare function setAuthEE(eventEmitter: EventEmitter<AuthStatus | AuthEvent>): void;
986
+ /**
987
+ *
988
+ */
989
+ export declare function notifyAuthSDKSuccess(): void;
990
+ /**
991
+ *
992
+ */
993
+ export declare function notifyAuthSuccess(): void;
994
+ /**
995
+ *
996
+ * @param failureType
997
+ */
998
+ export declare function notifyAuthFailure(failureType: AuthFailureType): void;
999
+ /**
1000
+ *
1001
+ */
1002
+ export declare function notifyLogout(): void;
1003
+ export declare const initSession: (sessionDetails: sessionInfoInterface) => void;
1004
+ export declare const getSessionDetails: (sessionInfoResp: any) => sessionInfoInterface;
1005
+ /**
1006
+ * Return releaseVersion if available
1007
+ */
1008
+ export declare function getReleaseVersion(): string;
1009
+ /**
1010
+ * Return a promise that resolves with the session information when
1011
+ * authentication is successful. And info is available.
1012
+ *
1013
+ * @group Global methods
1014
+ */
1015
+ export declare function getSessionInfo(): Promise<sessionInfoInterface>;
1016
+ export declare const getAuthenticaionToken: (embedConfig: EmbedConfig) => Promise<any>;
1017
+ /**
1018
+ * Perform token based authentication
1019
+ *
1020
+ * @param embedConfig The embed configuration
1021
+ */
1022
+ export declare const doTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
1023
+ /**
1024
+ * Validate embedConfig parameters required for cookielessTokenAuth
1025
+ *
1026
+ * @param embedConfig The embed configuration
1027
+ */
1028
+ export declare const doCookielessTokenAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
1029
+ /**
1030
+ * Perform basic authentication to the ThoughtSpot cluster using the cluster
1031
+ * credentials.
1032
+ *
1033
+ * Warning: This feature is primarily intended for developer testing. It is
1034
+ * strongly advised not to use this authentication method in production.
1035
+ *
1036
+ * @param embedConfig The embed configuration
1037
+ */
1038
+ export declare const doBasicAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
1039
+ export declare const doSamlAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
1040
+ export declare const doOIDCAuth: (embedConfig: EmbedConfig) => Promise<boolean>;
1041
+ export declare const logout: (embedConfig: EmbedConfig) => Promise<boolean>;
1042
+ /**
1043
+ * Perform authentication on the ThoughtSpot cluster
1044
+ *
1045
+ * @param embedConfig The embed configuration
1046
+ */
1047
+ export declare const authenticate: (embedConfig: EmbedConfig) => Promise<boolean>;
1048
+ /**
1049
+ * Check if we are authenticated to the ThoughtSpot cluster
1050
+ */
1051
+ export declare const isAuthenticated: () => boolean;
1052
+ export {};
1053
+
1054
+ /**
1055
+ * The authentication mechanism for allowing access to the
1056
+ * the embedded app
1057
+ *
1058
+ * @group Authentication / Init
1059
+ */
1060
+ export declare enum AuthType {
1061
+ /**
1062
+ * No authentication on the SDK. Passthrough to the embedded App. Alias for
1063
+ * `Passthrough`.
1064
+ *
1065
+ * @example
1066
+ * ```js
1067
+ * init({
1068
+ * // ...
1069
+ * authType: AuthType.None,
1070
+ * });
1071
+ * ```
1072
+ */
1073
+ None = "None",
1074
+ /**
1075
+ * Passthrough SSO to the embedded App within the iframe. Requires least
1076
+ * configuration, but may not be supported by all IDPs. This will behave like `None`
1077
+ * if SSO is not configured on ThoughtSpot.
1078
+ *
1079
+ * @example
1080
+ * ```js
1081
+ * init({
1082
+ * // ...
1083
+ * authType: AuthType.EmbeddedSSO,
1084
+ * });
1085
+ * ```
1086
+ * Set authentication type as Embedded SSO.
1087
+ *
1088
+ * To use this:
1089
+ * Your SAML or OpenID provider must allow iframe redirects.
1090
+ * eg. If you are using okta as IdP, you can enable iFrame embedding.
1091
+ * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
1092
+ */
1093
+ EmbeddedSSO = "EmbeddedSSO",
1094
+ /**
1095
+ * SSO using SAML
1096
+ *
1097
+ * @deprecated Use {@link SAMLRedirect} instead
1098
+ * @hidden
1099
+ */
1100
+ SSO = "SSO_SAML",
1101
+ /**
1102
+ * SSO using SAML
1103
+ *
1104
+ * @deprecated Use {@link SAMLRedirect} instead
1105
+ * @hidden
1106
+ */
1107
+ SAML = "SSO_SAML",
1108
+ /**
1109
+ * SSO using SAML
1110
+ * Will make the host application redirect to the SAML Idp. Use this
1111
+ * when the idp does not allow itself to be embedded.
1112
+ *
1113
+ * This redirects the host application to the SAML Idp. The host application
1114
+ * will be redirected back to the ThoughtSpot app after authentication.
1115
+ *
1116
+ * @example
1117
+ * ```js
1118
+ * init({
1119
+ * // ...
1120
+ * authType: AuthType.SAMLRedirect,
1121
+ * });
1122
+ * ```
1123
+ *
1124
+ * This opens the SAML Idp in a popup window. The popup is triggered
1125
+ * when the user clicks the trigger button. The popup window will be
1126
+ * closed automatically after authentication.
1127
+ * @example
1128
+ * ```js
1129
+ * init({
1130
+ * // ...
1131
+ * authType: AuthType.SAMLRedirect,
1132
+ * authTriggerText: 'Login with SAML',
1133
+ * authTriggerContainer: '#embed-container',
1134
+ * inPopup: true,
1135
+ * });
1136
+ * ```
1137
+ *
1138
+ * Can also use event to trigger the popup flow. Works the same
1139
+ * as above example.
1140
+ * @example
1141
+ * ```js
1142
+ * const authEE = init({
1143
+ * // ...
1144
+ * authType: AuthType.SAMLRedirect,
1145
+ * inPopup: true,
1146
+ * });
1147
+ *
1148
+ * someButtonOnYourPage.addEventListener('click', () => {
1149
+ * authEE.emit(AuthEvent.TRIGGER_SSO_POPUP);
1150
+ * });
1151
+ * ```
1152
+ */
1153
+ SAMLRedirect = "SSO_SAML",
1154
+ /**
1155
+ * SSO using OIDC
1156
+ *
1157
+ * @hidden
1158
+ * @deprecated Use {@link OIDCRedirect} instead
1159
+ */
1160
+ OIDC = "SSO_OIDC",
1161
+ /**
1162
+ * SSO using OIDC
1163
+ * Will make the host application redirect to the OIDC Idp.
1164
+ * See code samples in {@link SAMLRedirect}.
1165
+ */
1166
+ OIDCRedirect = "SSO_OIDC",
1167
+ /**
1168
+ * Trusted authentication server
1169
+ *
1170
+ * @hidden
1171
+ * @deprecated Use {@link TrustedAuth} instead
1172
+ */
1173
+ AuthServer = "AuthServer",
1174
+ /**
1175
+ * Trusted authentication server, Use your own authentication server
1176
+ * which returns a bearer token, generated using the secret_key obtained
1177
+ * from ThoughtSpot.
1178
+ *
1179
+ * @example
1180
+ * ```js
1181
+ * init({
1182
+ * // ...
1183
+ * authType: AuthType.TrustedAuthToken,
1184
+ * getAuthToken: () => {
1185
+ * return fetch('https://my-backend.app/ts-token')
1186
+ * .then((response) => response.json())
1187
+ * .then((data) => data.token);
1188
+ * }
1189
+ * ```
1190
+ */
1191
+ TrustedAuthToken = "AuthServer",
1192
+ /**
1193
+ * Trusted authentication server Cookieless, Use you own authentication
1194
+ * server which returns a bearer token, generated using the secret_key
1195
+ * obtained from ThoughtSpot. This uses a cookieless authentication
1196
+ * approach, recommended to by pass third-party cookie-blocking restriction
1197
+ * implemented by some browsers
1198
+ *
1199
+ * @example
1200
+ * ```js
1201
+ * init({
1202
+ * // ...
1203
+ * authType: AuthType.TrustedAuthTokenCookieless,
1204
+ * getAuthToken: () => {
1205
+ * return fetch('https://my-backend.app/ts-token')
1206
+ * .then((response) => response.json())
1207
+ * .then((data) => data.token);
1208
+ * }
1209
+ * ```
1210
+ * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1-sw
1211
+ */
1212
+ TrustedAuthTokenCookieless = "AuthServerCookieless",
1213
+ /**
1214
+ * Use the ThoughtSpot login API to authenticate to the cluster directly.
1215
+ *
1216
+ * Warning: This feature is primarily intended for developer testing. It is
1217
+ * strongly advised not to use this authentication method in production.
1218
+ */
1219
+ Basic = "Basic"
1220
+ }
1221
+ export type DOMSelector = string | HTMLElement;
1222
+ /**
1223
+ * inline customCSS within the {@link CustomisationsInterface}.
1224
+ */
1225
+ export interface customCssInterface {
1226
+ variables?: {
1227
+ [variableName: string]: string;
1228
+ };
1229
+ rules_UNSTABLE?: {
1230
+ [selector: string]: {
1231
+ [declaration: string]: string;
1232
+ };
1233
+ };
1234
+ }
1235
+ /**
1236
+ * Styles within the {@link CustomisationsInterface}.
1237
+ */
1238
+ export interface CustomStyles {
1239
+ customCSSUrl?: string;
1240
+ customCSS?: customCssInterface;
1241
+ }
1242
+ /**
1243
+ * Configuration to define the customization on the Embedded
1244
+ * Thoughtspot components.
1245
+ *
1246
+ * @example
1247
+ * ```js
1248
+ * init({
1249
+ * // ...
1250
+ * customizations: {
1251
+ * style: {
1252
+ * customCSS: {
1253
+ * variables: {},
1254
+ * rules_UNSTABLE: {}
1255
+ * }
1256
+ * },
1257
+ * content: {
1258
+ * strings: {
1259
+ * 'LIVEBOARDS': 'Dashboards'
1260
+ * }
1261
+ * },
1262
+ * iconSpriteUrl: 'https://my-custom-icon-sprite.svg'
1263
+ * }
1264
+ * })
1265
+ * ```
1266
+ */
1267
+ export interface CustomisationsInterface {
1268
+ style?: CustomStyles;
1269
+ content?: {
1270
+ strings?: Record<string, any>;
1271
+ [key: string]: any;
1272
+ };
1273
+ iconSpriteUrl?: string;
1274
+ }
1275
+ /**
1276
+ * The configuration object for embedding ThoughtSpot content.
1277
+ * It includes the ThoughtSpot hostname or IP address,
1278
+ * the type of authentication, and the authentication endpoint
1279
+ * if a trusted authentication server is used.
1280
+ *
1281
+ * @group Authentication / Init
1282
+ */
1283
+ export interface EmbedConfig {
1284
+ /**
1285
+ * The ThoughtSpot cluster hostname or IP address.
1286
+ */
1287
+ thoughtSpotHost: string;
1288
+ /**
1289
+ * The authentication mechanism to use.
1290
+ */
1291
+ authType: AuthType;
1292
+ /**
1293
+ * [AuthServer] The trusted authentication endpoint to use to get the
1294
+ * authentication token. A GET request is made to the
1295
+ * authentication API endpoint, which returns the token
1296
+ * as a plaintext response. For trusted authentication,
1297
+ * the `authEndpoint` or `getAuthToken` attribute is required.
1298
+ */
1299
+ authEndpoint?: string;
1300
+ /**
1301
+ * [AuthServer] A function that invokes the trusted authentication endpoint
1302
+ * and returns a Promise that resolves to the `auth token` string.
1303
+ * For trusted authentication, the `authEndpoint` or `getAuthToken`
1304
+ * attribute is required.
1305
+ *
1306
+ * It is advisable to fetch a new token inside this method and not
1307
+ * reuse and older issued token, as because when auth expires this is
1308
+ * called again and if it is called with an older token the authentication
1309
+ * will not succeed.
1310
+ */
1311
+ getAuthToken?: () => Promise<string>;
1312
+ /**
1313
+ * [AuthServer / Basic] The user name of the ThoughtSpot user. This
1314
+ * attribute is required for trusted authentication.
1315
+ */
1316
+ username?: string;
1317
+ /**
1318
+ * [Basic] The ThoughtSpot login password corresponding to the user name
1319
+ *
1320
+ * Warning: This feature is primarily intended for developer testing. It is
1321
+ * strongly advised not to use this authentication method in production.
1322
+ */
1323
+ password?: string;
1324
+ /**
1325
+ * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
1326
+ * open the SAML auth flow in a popup, instead of redirecting browser in
1327
+ * place.
1328
+ *
1329
+ * @default false
1330
+ * @deprecated
1331
+ */
1332
+ noRedirect?: boolean;
1333
+ /**
1334
+ * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
1335
+ * the SAML auth flow in a popup, instead of redirecting browser in place.
1336
+ *
1337
+ * Need to use this with authTriggerContainer. Or manually trigger
1338
+ * the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
1339
+ *
1340
+ * @default false
1341
+ * @version SDK: 1.18.0
1342
+ */
1343
+ inPopup?: boolean;
1344
+ /**
1345
+ * [SSO] For SSO Authentication, one can supply an optional path param,
1346
+ * this will be the path on the host origin where the SAML flow will be
1347
+ * terminated.
1348
+ *
1349
+ * Eg: "/dashboard", "#/foo" [Do not include the host]
1350
+ *
1351
+ * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1-sw
1352
+ */
1353
+ redirectPath?: string;
1354
+ /** @internal */
1355
+ basepath?: string;
1356
+ /**
1357
+ * Should we encode URL Query Params using base64 encoding which thoughtspot
1358
+ * will generate for embedding. This provides additional security to
1359
+ * thoughtspot clusters against Cross site scripting attacks.
1360
+ *
1361
+ * @default false
1362
+ */
1363
+ shouldEncodeUrlQueryParams?: boolean;
1364
+ /**
1365
+ * Suppress cookie access alert when third party cookies are blocked by the
1366
+ * user's browser. Third party cookie blocking is the default behaviour on
1367
+ * Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
1368
+ * encouraged to handle `noCookieAccess` event, to show your own treatment
1369
+ * in this case.
1370
+ *
1371
+ * @default false
1372
+ */
1373
+ suppressNoCookieAccessAlert?: boolean;
1374
+ /**
1375
+ * Re-login when session expires with the previous login options
1376
+ *
1377
+ * @default false
1378
+ */
1379
+ autoLogin?: boolean;
1380
+ /**
1381
+ * Disable redirection to the login page when the embedded session expires
1382
+ * This flag is typically used alongside the combination of auth modes such as {@link
1383
+ * AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
1384
+ *
1385
+ * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1386
+ * @default false
1387
+ */
1388
+ disableLoginRedirect?: boolean;
1389
+ /**
1390
+ * This message is displayed on the embed view when the login fails.
1391
+ *
1392
+ * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
1393
+ */
1394
+ loginFailedMessage?: string;
1395
+ /**
1396
+ * Calls the prefetch method internally when set to true
1397
+ *
1398
+ * @default false
1399
+ */
1400
+ callPrefetch?: boolean;
1401
+ /**
1402
+ * When there are multiple embeds, queue the render of embed to start
1403
+ * after the previous embed's render is complete. This helps in the load
1404
+ * performance by decreasing the load on the browser.
1405
+ *
1406
+ * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1407
+ * @default false
1408
+ */
1409
+ queueMultiRenders?: boolean;
1410
+ /**
1411
+ * Dynamic CSS Url to be injected in the loaded application.
1412
+ * You would also need to set `style-src` in the CSP settings.
1413
+ *
1414
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1415
+ * @default ''
1416
+ */
1417
+ customCssUrl?: string;
1418
+ /**
1419
+ * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
1420
+ * additional call. This is slower and should be avoided. Listen to the
1421
+ * NO_COOKIE_ACCESS event to handle the situation.
1422
+ *
1423
+ * This is slightly slower than letting the browser handle the cookie check, as it
1424
+ * involves an extra network call.
1425
+ *
1426
+ * @version SDK: 1.10.4 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
1427
+ */
1428
+ detectCookieAccessSlow?: boolean;
1429
+ /**
1430
+ * Hide beta alert warning message for SearchEmbed.
1431
+ *
1432
+ * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw*
1433
+ */
1434
+ suppressSearchEmbedBetaWarning?: boolean;
1435
+ /**
1436
+ * Custom style params for embed Config.
1437
+ *
1438
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
1439
+ */
1440
+ customizations?: CustomisationsInterface;
1441
+ /**
1442
+ * For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
1443
+ * click to trigger the flow. This is the containing element
1444
+ * for that button.
1445
+ *
1446
+ * @example
1447
+ * ```js
1448
+ * init({
1449
+ * authType: AuthType.SAMLRedirect,
1450
+ * inPopup: true,
1451
+ * authTriggerContainer: '#auth-trigger-container'
1452
+ * })
1453
+ * ```
1454
+ * @version SDK: 1.17.0 | ThoughtSpot: *
1455
+ */
1456
+ authTriggerContainer?: string | HTMLElement;
1457
+ /**
1458
+ * Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
1459
+ * SAML popup. This is useful when you want to trigger the popup on a custom user
1460
+ * action.
1461
+ *
1462
+ */
1463
+ useEventForSAMLPopup?: boolean;
1464
+ /**
1465
+ * Text to show in the button which triggers the popup auth flow.
1466
+ * Default: "Authorize".
1467
+ *
1468
+ * @version SDK: 1.17.0 | ThoughtSpot: *
1469
+ */
1470
+ authTriggerText?: string;
1471
+ /**
1472
+ * Disable Full App access of Embedded app outside of the iFrame.
1473
+ *
1474
+ * @default true
1475
+ * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1-sw
1476
+ */
1477
+ blockNonEmbedFullAppAccess?: boolean;
1478
+ }
1479
+ export interface LayoutConfig {
1480
+ }
1481
+ /**
1482
+ * Embedded iFrame configuration
1483
+ *
1484
+ * @group Embed components
1485
+ */
1486
+ export interface FrameParams {
1487
+ /**
1488
+ * The width of the iFrame (unit is pixels if numeric).
1489
+ */
1490
+ width?: number | string;
1491
+ /**
1492
+ * The height of the iFrame (unit is pixels if numeric).
1493
+ */
1494
+ height?: number | string;
1495
+ /**
1496
+ * Set to 'lazy' to enable lazy loading of the embedded TS frame.
1497
+ * This will defer loading of the frame until it comes into the
1498
+ * viewport. This is useful for performance optimization.
1499
+ */
1500
+ loading?: 'lazy' | 'eager' | 'auto';
1501
+ /**
1502
+ * This parameters will be passed on the iframe
1503
+ * as is.
1504
+ */
1505
+ [key: string]: string | number | boolean | undefined;
1506
+ }
1507
+ /**
1508
+ * The configuration object for an embedded view.
1509
+ */
1510
+ export interface ViewConfig {
1511
+ /**
1512
+ * @hidden
1513
+ */
1514
+ layoutConfig?: LayoutConfig;
1515
+ /**
1516
+ * The <b>width</b> and <b>height</b> dimensions to render an embedded
1517
+ * object inside your app. Specify the values in pixels or percentage.
1518
+ */
1519
+ frameParams?: FrameParams;
1520
+ /**
1521
+ * @hidden
1522
+ */
1523
+ theme?: string;
1524
+ /**
1525
+ * @hidden
1526
+ */
1527
+ styleSheet__unstable?: string;
1528
+ /**
1529
+ * The list of actions to disable from the primary menu, more menu
1530
+ * (...), and the contextual menu. These actions will be disabled
1531
+ * for the user.
1532
+ * Use this to disable actions.
1533
+ *
1534
+ * @example
1535
+ * ```js
1536
+ * const embed = new LiveboardEmbed('#embed', {
1537
+ * ... // other liveboard view config
1538
+ * disabledActions: [Action.Download, Action.Save]
1539
+ * });
1540
+ * ```
1541
+ */
1542
+ disabledActions?: Action[];
1543
+ /**
1544
+ * The tooltip to display for disabled actions.
1545
+ */
1546
+ disabledActionReason?: string;
1547
+ /**
1548
+ * The list of actions to hide from the embedded.
1549
+ * This actions will be hidden from the user.
1550
+ * Use this to hide an action.
1551
+ *
1552
+ * @example
1553
+ * ```js
1554
+ * const embed = new LiveboardEmbed('#embed', {
1555
+ * ... // other liveboard view config
1556
+ * hiddenActions: [Action.Download, Action.Export]
1557
+ * });
1558
+ * ```
1559
+ * @important
1560
+ */
1561
+ hiddenActions?: Action[];
1562
+ /**
1563
+ * The list of actions to display from the primary menu, more menu
1564
+ * (...), and the contextual menu. These will be only actions that
1565
+ * are visible to the user.
1566
+ * Use this to hide all actions except the ones you want to show.
1567
+ *
1568
+ * Use either this or hiddenActions.
1569
+ *
1570
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1571
+ * @important
1572
+ */
1573
+ visibleActions?: Action[];
1574
+ /**
1575
+ * Show alert messages and toast messages in the embedded view.
1576
+ *
1577
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1578
+ */
1579
+ showAlerts?: boolean;
1580
+ /**
1581
+ * The list of runtime filters to apply to a search answer,
1582
+ * visualization, or Liveboard.
1583
+ */
1584
+ runtimeFilters?: RuntimeFilter[];
1585
+ /**
1586
+ * The locale/language to use for the embedded view.
1587
+ *
1588
+ * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1-sw
1589
+ */
1590
+ locale?: string;
1591
+ /**
1592
+ * This is an object (key/val) of override flags which will be applied
1593
+ * to the internal embedded object. This can be used to add any
1594
+ * URL flag.
1595
+ * Warning: This option is for advanced use only and is used internally
1596
+ * to control embed behavior in non-regular ways. We do not publish the
1597
+ * list of supported keys and values associated with each.
1598
+ *
1599
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1600
+ */
1601
+ additionalFlags?: {
1602
+ [key: string]: string | number | boolean;
1603
+ };
1604
+ /**
1605
+ * Dynamic CSSUrl and customCSS to be injected in the loaded application.
1606
+ * You would also need to set `style-src` in the CSP settings.
1607
+ *
1608
+ * @version SDK: 1.17.2 | ThoughtSpot: 8.4.1-sw, 8.4.0.cl
1609
+ * @default ''
1610
+ */
1611
+ customizations?: CustomisationsInterface;
1612
+ /**
1613
+ * Insert as a sibling of the target container, instead of appending to a
1614
+ * child inside it.
1615
+ */
1616
+ insertAsSibling?: boolean;
1617
+ /**
1618
+ * flag to set ContextMenu Trigger to either left or right click.
1619
+ *
1620
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1621
+ */
1622
+ contextMenuTrigger?: ContextMenuTriggerOptions;
1623
+ /**
1624
+ * flag to override openNew tab context menu link
1625
+ *
1626
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
1627
+ */
1628
+ linkOverride?: boolean;
1629
+ /**
1630
+ * flag to enable insert into slides action
1631
+ *
1632
+ * @hidden
1633
+ * @private
1634
+ */
1635
+ insertInToSlide?: boolean;
1636
+ /**
1637
+ * Use a pre-rendered iframe from a pool of pre-rendered iframes
1638
+ * if available and matches the configuration.
1639
+ *
1640
+ * @version SDK: 1.22.0
1641
+ * @hidden
1642
+ *
1643
+ * See [docs]() on how to create a prerender pool.
1644
+ */
1645
+ usePrerenderedIfAvailable?: boolean;
1646
+ /**
1647
+ * Boolean to exclude runtimeFilters in the URL
1648
+ *
1649
+ * @default false
1650
+ * @hidden
1651
+ */
1652
+ excludeRuntimeFiltersfromURL?: boolean;
1653
+ }
1654
+ /**
1655
+ * MessagePayload: Embed event payload: message type, data and status (start/end)
1656
+ *
1657
+ * @group Events
1658
+ */
1659
+ export type MessagePayload = {
1660
+ type: string;
1661
+ data: any;
1662
+ status?: string;
1663
+ };
1664
+ /**
1665
+ * MessageOptions: By Providing options, getting specific event start / end based on
1666
+ * option
1667
+ *
1668
+ * @group Events
1669
+ */
1670
+ export type MessageOptions = {
1671
+ /**
1672
+ * A boolean value indicating that start status events of this type
1673
+ * will be dispatched
1674
+ */
1675
+ start?: boolean;
1676
+ };
1677
+ /**
1678
+ * MessageCallback: Embed event message callback
1679
+ *
1680
+ * @group Events
1681
+ */
1682
+ export type MessageCallback = (payload: MessagePayload,
1683
+ /**
1684
+ * responder: Message callback function triggered when embed event
1685
+ * initiated
1686
+ */
1687
+ responder?: (data: any) => void) => void;
1688
+ /**
1689
+ * MessageCallbackObj: contains message options & callback function
1690
+ */
1691
+ export type MessageCallbackObj = {
1692
+ /**
1693
+ * options: It contains start, A boolean value indicating that start
1694
+ * status events of this type will be dispatched
1695
+ */
1696
+ options: MessageOptions;
1697
+ callback: MessageCallback;
1698
+ };
1699
+ export type GenericCallbackFn = (...args: any[]) => any;
1700
+ export type QueryParams = {
1701
+ [key: string]: string;
1702
+ };
1703
+ /**
1704
+ * A map of the supported runtime filter operations
1705
+ */
1706
+ export declare enum RuntimeFilterOp {
1707
+ /**
1708
+ * Equals
1709
+ */
1710
+ EQ = "EQ",
1711
+ /**
1712
+ * Does not equal
1713
+ */
1714
+ NE = "NE",
1715
+ /**
1716
+ * Less than
1717
+ */
1718
+ LT = "LT",
1719
+ /**
1720
+ * Less than or equal to
1721
+ */
1722
+ LE = "LE",
1723
+ /**
1724
+ * Greater than
1725
+ */
1726
+ GT = "GT",
1727
+ /**
1728
+ * Greater than or equal to
1729
+ */
1730
+ GE = "GE",
1731
+ /**
1732
+ * Contains
1733
+ */
1734
+ CONTAINS = "CONTAINS",
1735
+ /**
1736
+ * Begins with
1737
+ */
1738
+ BEGINS_WITH = "BEGINS_WITH",
1739
+ /**
1740
+ * Ends with
1741
+ */
1742
+ ENDS_WITH = "ENDS_WITH",
1743
+ /**
1744
+ * Between, inclusive of higher value
1745
+ */
1746
+ BW_INC_MAX = "BW_INC_MAX",
1747
+ /**
1748
+ * Between, inclusive of lower value
1749
+ */
1750
+ BW_INC_MIN = "BW_INC_MIN",
1751
+ /**
1752
+ * Between, inclusive of both higher and lower value
1753
+ */
1754
+ BW_INC = "BW_INC",
1755
+ /**
1756
+ * Between, non-inclusive
1757
+ */
1758
+ BW = "BW",
1759
+ /**
1760
+ * Is included in this list of values
1761
+ */
1762
+ IN = "IN"
1763
+ }
1764
+ /**
1765
+ * A filter that can be applied to ThoughtSpot answers, Liveboards, or
1766
+ * visualizations at runtime.
1767
+ */
1768
+ export interface RuntimeFilter {
1769
+ /**
1770
+ * The name of the column to filter on (case-sensitive)
1771
+ */
1772
+ columnName: string;
1773
+ /**
1774
+ * The operator to apply
1775
+ */
1776
+ operator: RuntimeFilterOp;
1777
+ /**
1778
+ * The list of operands. Some operators like EQ, LE accept
1779
+ * a single operand, whereas other operators like BW and IN accept multiple
1780
+ * operands.
1781
+ */
1782
+ values: (number | boolean | string)[];
1783
+ }
1784
+ /**
1785
+ * Event types emitted by the embedded ThoughtSpot application.
1786
+ *
1787
+ * To add an event listener use the corresponding
1788
+ * {@link LiveboardEmbed.on} or {@link AppEmbed.on} or {@link SearchEmbed.on} method.
1789
+ *
1790
+ * @example
1791
+ * ```js
1792
+ * import { EmbedEvent } from '@thoughtspot/visual-embed-sdk';
1793
+ * // Or
1794
+ * // const { EmbedEvent } = window.tsembed;
1795
+ *
1796
+ * // create the liveboard embed.
1797
+ *
1798
+ * liveboardEmbed.on(EmbedEvent.Drilldown, (drilldown) => {
1799
+ * console.log('Drilldown event', drilldown);
1800
+ * }));
1801
+ * ```
1802
+ * @group Events
1803
+ */
1804
+ export declare enum EmbedEvent {
1805
+ /**
1806
+ * Rendering has initialized.
1807
+ *
1808
+ * @returns timestamp - The timestamp when the event was generated.
1809
+ */
1810
+ Init = "init",
1811
+ /**
1812
+ * Authentication has either succeeded or failed.
1813
+ *
1814
+ * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
1815
+ */
1816
+ AuthInit = "authInit",
1817
+ /**
1818
+ * The embed object container has loaded.
1819
+ *
1820
+ * @returns timestamp - The timestamp when the event was generated.
1821
+ */
1822
+ Load = "load",
1823
+ /**
1824
+ * Data pertaining to answer or Liveboard is received
1825
+ *
1826
+ * @return data - The answer or Liveboard data
1827
+ * @important
1828
+ */
1829
+ Data = "data",
1830
+ /**
1831
+ * Search/answer/Liveboard filters have been applied/updated by the user.
1832
+ *
1833
+ * @hidden
1834
+ */
1835
+ FiltersChanged = "filtersChanged",
1836
+ /**
1837
+ * Search query has been updated by the user.
1838
+ */
1839
+ QueryChanged = "queryChanged",
1840
+ /**
1841
+ * A drill down operation has been performed.
1842
+ *
1843
+ * @returns additionalFilters - Any additional filters applied
1844
+ * @returns drillDownColumns - The columns on which drill down was performed
1845
+ * @returns nonFilteredColumns - The columns that were not filtered
1846
+ */
1847
+ Drilldown = "drillDown",
1848
+ /**
1849
+ * One or more data sources have been selected.
1850
+ *
1851
+ * @returns dataSourceIds - the list of data sources
1852
+ */
1853
+ DataSourceSelected = "dataSourceSelected",
1854
+ /**
1855
+ * One or more data columns have been selected.
1856
+ *
1857
+ * @returns columnIds - the list of columns
1858
+ * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
1859
+ */
1860
+ AddRemoveColumns = "addRemoveColumns",
1861
+ /**
1862
+ * A custom action has been triggered
1863
+ *
1864
+ * @returns actionId - The id of the custom action
1865
+ * @returns data - The answer or Liveboard data
1866
+ */
1867
+ CustomAction = "customAction",
1868
+ /**
1869
+ * Listen to double clicks on a visualization
1870
+ *
1871
+ * @return ContextMenuInputPoints - data point that is double clicked
1872
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1873
+ */
1874
+ VizPointDoubleClick = "vizPointDoubleClick",
1875
+ /**
1876
+ * Listen to clicks on a visualization in a liveboard or Search result.
1877
+ *
1878
+ * @example
1879
+ * ```js
1880
+ * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
1881
+ * console.log(
1882
+ * data.vizId, // viz id
1883
+ * data.clickedPoint.selectedAttributes[0].value,
1884
+ * data.clickedPoint.selectedAttributes[0].column.name,
1885
+ * data.clickedPoint.selectedMeasures[0].value,
1886
+ * data.clickedPoint.selectedMeasures[0].column.name,
1887
+ * )
1888
+ * });
1889
+ * ```
1890
+ * @return viz, clickedPoint - metadata about point that is clicked
1891
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1892
+ * @important
1893
+ */
1894
+ VizPointClick = "vizPointClick",
1895
+ /**
1896
+ * An error has occurred.
1897
+ *
1898
+ * @returns error - An error object or message
1899
+ */
1900
+ Error = "Error",
1901
+ /**
1902
+ * The embedded object has sent an alert
1903
+ *
1904
+ * @returns alert - An alert object
1905
+ */
1906
+ Alert = "alert",
1907
+ /**
1908
+ * The ThoughtSpot auth session has expired.
1909
+ */
1910
+ AuthExpire = "ThoughtspotAuthExpired",
1911
+ /**
1912
+ * ThoughtSpot failed to validate the auth session.
1913
+ *
1914
+ * @hidden
1915
+ */
1916
+ AuthFailure = "ThoughtspotAuthFailure",
1917
+ /**
1918
+ * ThoughtSpot failed to validate the auth session.
1919
+ *
1920
+ * @hidden
1921
+ */
1922
+ AuthLogout = "ThoughtspotAuthLogout",
1923
+ /**
1924
+ * The height of the embedded Liveboard or visualization has been computed.
1925
+ *
1926
+ * @returns data - The height of the embedded Liveboard or visualization
1927
+ * @hidden
1928
+ */
1929
+ EmbedHeight = "EMBED_HEIGHT",
1930
+ /**
1931
+ * The center of visible iframe viewport is calculated.
1932
+ *
1933
+ * @returns data - The center of the visible Iframe viewport.
1934
+ * @hidden
1935
+ */
1936
+ EmbedIframeCenter = "EmbedIframeCenter",
1937
+ /**
1938
+ * Emitted when the "Get Data" button in Search Bar embed
1939
+ * is clicked.
1940
+ *
1941
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0-sw
1942
+ */
1943
+ GetDataClick = "getDataClick",
1944
+ /**
1945
+ * Detects the route change.
1946
+ */
1947
+ RouteChange = "ROUTE_CHANGE",
1948
+ /**
1949
+ * The v1 event type for Data
1950
+ *
1951
+ * @hidden
1952
+ */
1953
+ V1Data = "exportVizDataToParent",
1954
+ /**
1955
+ * Emitted when the embed does not have cookie access. This
1956
+ * happens on Safari where third-party cookies are blocked by default.
1957
+ *
1958
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
1959
+ */
1960
+ NoCookieAccess = "noCookieAccess",
1961
+ /**
1962
+ * Emitted when SAML is complete
1963
+ *
1964
+ * @private
1965
+ * @hidden
1966
+ */
1967
+ SAMLComplete = "samlComplete",
1968
+ /**
1969
+ * Emitted when any modal is opened in the app
1970
+ *
1971
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1972
+ */
1973
+ DialogOpen = "dialog-open",
1974
+ /**
1975
+ * Emitted when any modal is closed in the app
1976
+ *
1977
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
1978
+ */
1979
+ DialogClose = "dialog-close",
1980
+ /**
1981
+ * Emitted when the Liveboard shell loads.
1982
+ * You can use this event as a hook to trigger
1983
+ * other events on the rendered Liveboard.
1984
+ *
1985
+ * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
1986
+ */
1987
+ LiveboardRendered = "PinboardRendered",
1988
+ /**
1989
+ * This can be used to register an event listener which
1990
+ * is triggered on all events.
1991
+ *
1992
+ * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1-sw
1993
+ */
1994
+ ALL = "*",
1995
+ /**
1996
+ * Emitted when answer is saved in the app
1997
+ *
1998
+ * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
1999
+ */
2000
+ Save = "save",
2001
+ /**
2002
+ * Emitted when the download action is triggered on an answer
2003
+ *
2004
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2005
+ */
2006
+ Download = "download",
2007
+ /**
2008
+ * Emitted when the download action is triggered on an answer
2009
+ *
2010
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0-sw
2011
+ */
2012
+ DownloadAsPng = "downloadAsPng",
2013
+ /**
2014
+ * Emitted when the Download as PDF action is triggered on an answer
2015
+ *
2016
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2017
+ */
2018
+ DownloadAsPdf = "downloadAsPdf",
2019
+ /**
2020
+ * Emitted when the Download as CSV action is triggered on an answer
2021
+ *
2022
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2023
+ */
2024
+ DownloadAsCsv = "downloadAsCsv",
2025
+ /**
2026
+ * Emitted when the Download as XLSX action is triggered on an answer
2027
+ *
2028
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2029
+ */
2030
+ DownloadAsXlsx = "downloadAsXlsx",
2031
+ /**
2032
+ * Emitted when an answer is deleted in the app
2033
+ *
2034
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2035
+ */
2036
+ AnswerDelete = "answerDelete",
2037
+ /**
2038
+ * Emitted when an answer is pinned to a Liveboard
2039
+ *
2040
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2041
+ */
2042
+ Pin = "pin",
2043
+ /**
2044
+ * Emitted when SpotIQ analysis is triggered
2045
+ *
2046
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2047
+ */
2048
+ SpotIQAnalyze = "spotIQAnalyze",
2049
+ /**
2050
+ * Emitted when a user shares an object with another user or group
2051
+ *
2052
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2053
+ */
2054
+ Share = "share",
2055
+ /**
2056
+ * Emitted when a user clicks the Include action to include a specific value or data
2057
+ * on a chart or table
2058
+ *
2059
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2060
+ */
2061
+ DrillInclude = "context-menu-item-include",
2062
+ /**
2063
+ * Emitted when a user clicks the Exclude action to exclude a specific value or data
2064
+ * on a chart or table
2065
+ *
2066
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2067
+ */
2068
+ DrillExclude = "context-menu-item-exclude",
2069
+ /**
2070
+ * Emitted when copied column value on the app
2071
+ *
2072
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2073
+ */
2074
+ CopyToClipboard = "context-menu-item-copy-to-clipboard",
2075
+ /**
2076
+ * Emitted when a user clicks the Update TML action
2077
+ *
2078
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2079
+ */
2080
+ UpdateTML = "updateTSL",
2081
+ /**
2082
+ * Emitted when a user clicks the Edit TML action
2083
+ *
2084
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2085
+ */
2086
+ EditTML = "editTSL",
2087
+ /**
2088
+ * Emitted when ExportTML trigger in answer on the app
2089
+ *
2090
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2091
+ */
2092
+ ExportTML = "exportTSL",
2093
+ /**
2094
+ * Emitted when an answer is saved as a view
2095
+ *
2096
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2097
+ */
2098
+ SaveAsView = "saveAsView",
2099
+ /**
2100
+ * Emitted when copy of existing answer on the app
2101
+ *
2102
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2103
+ */
2104
+ CopyAEdit = "copyAEdit",
2105
+ /**
2106
+ * Emitted when a user clicks Show underlying data on an answe
2107
+ *
2108
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2109
+ */
2110
+ ShowUnderlyingData = "showUnderlyingData",
2111
+ /**
2112
+ * Emitted when an answer is switched to a chart or table view
2113
+ *
2114
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2115
+ */
2116
+ AnswerChartSwitcher = "answerChartSwitcher",
2117
+ /**
2118
+ * Internal event to communicate the initial settings back to the TS APP
2119
+ *
2120
+ * @hidden
2121
+ */
2122
+ APP_INIT = "appInit",
2123
+ /**
2124
+ * Emitted when a user clicks Show Liveboard details on a Liveboard
2125
+ *
2126
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2127
+ */
2128
+ LiveboardInfo = "pinboardInfo",
2129
+ /**
2130
+ * Emitted when a user clicks on the Favorite icon on a Liveboard
2131
+ *
2132
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2133
+ */
2134
+ AddToFavorites = "addToFavorites",
2135
+ /**
2136
+ * Emitted when a user clicks Schedule on a Liveboard
2137
+ *
2138
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2139
+ */
2140
+ Schedule = "subscription",
2141
+ /**
2142
+ * Emitted when a user clicks Edit on a Liveboard or visualization
2143
+ *
2144
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2145
+ */
2146
+ Edit = "edit",
2147
+ /**
2148
+ * Emitted when a user clicks Make a copy on a Liveboard
2149
+ *
2150
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2151
+ */
2152
+ MakeACopy = "makeACopy",
2153
+ /**
2154
+ * Emitted when a user clicks Present on a Liveboard or visualization
2155
+ *
2156
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2157
+ */
2158
+ Present = "present",
2159
+ /**
2160
+ * Emitted when a user clicks Delete on a Liveboard
2161
+ *
2162
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2163
+ */
2164
+ Delete = "delete",
2165
+ /**
2166
+ * Emitted when a user clicks Manage schedules on a Liveboard
2167
+ *
2168
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2169
+ */
2170
+ SchedulesList = "schedule-list",
2171
+ /**
2172
+ * Emitted when a user clicks Cancel in edit mode on a Liveboard
2173
+ *
2174
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2175
+ */
2176
+ Cancel = "cancel",
2177
+ /**
2178
+ * Emitted when a user clicks Explore on a visualization
2179
+ *
2180
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2181
+ */
2182
+ Explore = "explore",
2183
+ /**
2184
+ * Emitted when a user clicks Copy link action on a visualization
2185
+ *
2186
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2187
+ */
2188
+ CopyLink = "embedDocument",
2189
+ /**
2190
+ * Emitted when a user interacts with cross filters on a visualization or liveboard
2191
+ *
2192
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2193
+ */
2194
+ CrossFilterChanged = "cross-filter-changed",
2195
+ /**
2196
+ * Emitted when a user right clicks on a visualization (chart or table)
2197
+ *
2198
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2199
+ */
2200
+ VizPointRightClick = "vizPointRightClick",
2201
+ /**
2202
+ * Emitted when a user clicks on Insert to slide on a visualization
2203
+ *
2204
+ * @hidden
2205
+ */
2206
+ InsertIntoSlide = "insertInToSlide"
2207
+ }
2208
+ /**
2209
+ * Event types that can be triggered by the host application
2210
+ * to the embedded ThoughtSpot app
2211
+ *
2212
+ * To trigger an event use the corresponding
2213
+ * {@link LiveboardEmbed.trigger} or {@link AppEmbed.trigger} or {@link
2214
+ * SearchEmbed.trigger} method.
2215
+ *
2216
+ * @example
2217
+ * ```js
2218
+ * import { HostEvent } from '@thoughtspot/visual-embed-sdk';
2219
+ * // Or
2220
+ * // const { HostEvent } = window.tsembed;
2221
+ *
2222
+ * // create the liveboard embed.
2223
+ *
2224
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
2225
+ * { columnName: 'state, operator: RuntimeFilterOp.EQ, values: ['california']}
2226
+ * ]);
2227
+ * ```
2228
+ * @group Events
2229
+ */
2230
+ export declare enum HostEvent {
2231
+ /**
2232
+ * Trigger a search
2233
+ *
2234
+ * @param - dataSourceIds - The data source GUID to Search on
2235
+ * - Although an array, only a single source
2236
+ * is supported at this time.
2237
+ * @param - searchQuery - The search query
2238
+ * @param - execute - execute the existing / updated query
2239
+ * @example
2240
+ * ```js
2241
+ * searchEmbed.trigger(HostEvent.Search, {
2242
+ * searchQuery: "[sales] by [item type],
2243
+ * dataSources: ["cd252e5c-b552-49a8-821d-3eadaa049cca"]
2244
+ * execute: true
2245
+ * })
2246
+ * ```
2247
+ */
2248
+ Search = "search",
2249
+ /**
2250
+ * Trigger a drill on certain points by certain column
2251
+ *
2252
+ * @param - points - an object containing selectedPoints/clickedPoints
2253
+ * eg. { selectedPoints: []}
2254
+ * @param - columnGuid - a string guid of the column to drill by. This is optional,
2255
+ * if not provided it will auto drill by the configured
2256
+ * column.
2257
+ * @example
2258
+ * ```js
2259
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
2260
+ * console.log(payload);
2261
+ * const clickedPoint = payload.data.clickedPoint;
2262
+ * const selectedPoint = payload.data.selectedPoints;
2263
+ * console.log('>>> called', clickedPoint);
2264
+ * searchEmbed.trigger(HostEvent.DrillDown, {
2265
+ * points: {
2266
+ * clickedPoint,
2267
+ * selectedPoints: selectedPoint
2268
+ * },
2269
+ * autoDrillDown: true,
2270
+ * });
2271
+ * })
2272
+ * ```
2273
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
2274
+ */
2275
+ DrillDown = "triggerDrillDown",
2276
+ /**
2277
+ * Apply filters
2278
+ *
2279
+ * @hidden
2280
+ */
2281
+ Filter = "filter",
2282
+ /**
2283
+ * Reload the answer or visualization
2284
+ *
2285
+ * @hidden
2286
+ */
2287
+ Reload = "reload",
2288
+ /**
2289
+ * Set the visible visualizations on a Liveboard.
2290
+ *
2291
+ * @param - an array of ids of visualizations to show, the ids not passed
2292
+ * will be hidden.
2293
+ * @example
2294
+ * ```js
2295
+ * liveboardEmbed.trigger(HostEvent.SetVisibleVizs, [
2296
+ * '730496d6-6903-4601-937e-2c691821af3c',
2297
+ * 'd547ec54-2a37-4516-a222-2b06719af726'])
2298
+ * ```
2299
+ * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1-sw
2300
+ */
2301
+ SetVisibleVizs = "SetPinboardVisibleVizs",
2302
+ /**
2303
+ * Update the runtime filters. The runtime filters passed here are extended
2304
+ * on to the existing runtime filters if they exist.
2305
+ *
2306
+ * @param - {@link RuntimeFilter}[] an array of {@link RuntimeFilter} Types.
2307
+ * @example
2308
+ * ```js
2309
+ * liveboardEmbed.trigger(HostEvent.UpdateRuntimeFilters, [
2310
+ * {columnName: "state",operator: RuntimeFilterOp.EQ,values: ["michigan"]},
2311
+ * {columnName: "item type",operator: RuntimeFilterOp.EQ,values: ["Jackets"]}
2312
+ * ])
2313
+ * ```
2314
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2315
+ * @important
2316
+ */
2317
+ UpdateRuntimeFilters = "UpdateRuntimeFilters",
2318
+ /**
2319
+ * Navigate to a specific page in App embed without any reload.
2320
+ * This is the same as calling `appEmbed.navigateToPage(path, true)`
2321
+ *
2322
+ * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
2323
+ * @example
2324
+ * ```js
2325
+ * appEmbed.navigateToPage(-1)
2326
+ * ```
2327
+ * @version SDK: 1.12.0 | ThoughtSpot 8.4.0.cl, 8.4.1-sw
2328
+ */
2329
+ Navigate = "Navigate",
2330
+ /**
2331
+ * Opens the filter panel for a particular column.
2332
+ * Works with Search embed.
2333
+ *
2334
+ * @param - { columnId: string,
2335
+ * name: string,
2336
+ * type: INT64/CHAR/DATE,
2337
+ * dataType: ATTRIBUTE/MEASURE }
2338
+ * @example
2339
+ * ```js
2340
+ * searchEmbed.trigger(HostEvent.OpenFilter,
2341
+ * { columnId: '123', name: 'column name', type: 'INT64', dataType: 'ATTRIBUTE' })
2342
+ * ```
2343
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2344
+ */
2345
+ OpenFilter = "openFilter",
2346
+ /**
2347
+ * Adds the columns to the current Search.
2348
+ *
2349
+ * @param - { columnIds: string[] }
2350
+ * @example
2351
+ * ```js
2352
+ * searchEmbed.trigger(HostEvent.AddColumns, { columnIds: ['123', '456'] })
2353
+ * ```
2354
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2355
+ */
2356
+ AddColumns = "addColumns",
2357
+ /**
2358
+ * Removes a column from the current Search.
2359
+ *
2360
+ * @param - { columnId: string }
2361
+ * @example
2362
+ * ```js
2363
+ * searchEmbed.trigger(HostEvent.RemoveColumn, { columnId: '123' })
2364
+ * ```
2365
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
2366
+ */
2367
+ RemoveColumn = "removeColumn",
2368
+ /**
2369
+ * Gets the current pinboard content.
2370
+ *
2371
+ * @example
2372
+ * ```js
2373
+ * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
2374
+ * ```
2375
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
2376
+ */
2377
+ getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
2378
+ /**
2379
+ * Triggers the Pin action on an embedded object
2380
+ *
2381
+ * @param - incase of Liveboard embed, takes in an object with vizId as a key
2382
+ * can be left empty for search and visualization embeds
2383
+ * @example
2384
+ * ```js
2385
+ * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2386
+ * vizEmbed.trigger(HostEvent.Pin)
2387
+ * searchEmbed.trigger(HostEvent.Pin)
2388
+ * ```
2389
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2390
+ */
2391
+ Pin = "pin",
2392
+ /**
2393
+ * Triggers the Show Liveboard details action on a Liveboard
2394
+ *
2395
+ * @example
2396
+ * ```js
2397
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2398
+ * ```
2399
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2400
+ */
2401
+ LiveboardInfo = "pinboardInfo",
2402
+ /**
2403
+ * Triggers the Schedule action on a Liveboard
2404
+ *
2405
+ * @example
2406
+ * ```js
2407
+ * liveboardEmbed.trigger(HostEvent.Schedule)
2408
+ * ```
2409
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2410
+ */
2411
+ Schedule = "subscription",
2412
+ /**
2413
+ * Triggers the Manage schedule action on a Liveboard
2414
+ *
2415
+ * @example
2416
+ * ```js
2417
+ * liveboardEmbed.trigger(HostEvent.ScheduleList)
2418
+ * ```
2419
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2420
+ */
2421
+ SchedulesList = "schedule-list",
2422
+ /**
2423
+ * Triggers the Export TML action on a Liveboard
2424
+ *
2425
+ * @example
2426
+ * ```js
2427
+ * liveboardEmbed.trigger(HostEvent.ExportTML)
2428
+ * ```
2429
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2430
+ */
2431
+ ExportTML = "exportTSL",
2432
+ /**
2433
+ * Triggers the Edit TML action on a Liveboard
2434
+ *
2435
+ * @example
2436
+ * ```js
2437
+ * liveboardEmbed.trigger(HostEvent.EditTML)
2438
+ * ```
2439
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2440
+ */
2441
+ EditTML = "editTSL",
2442
+ /**
2443
+ * Triggers the Update TML action on a Liveboard
2444
+ *
2445
+ * @example
2446
+ * ```js
2447
+ * liveboardEmbed.trigger(HostEvent.UpdateTML)
2448
+ * ```
2449
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2450
+ */
2451
+ UpdateTML = "updateTSL",
2452
+ /**
2453
+ * Triggers the Download PDF action on a Liveboard
2454
+ *
2455
+ * @example
2456
+ * ```js
2457
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
2458
+ * ```
2459
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2460
+ */
2461
+ DownloadAsPdf = "downloadAsPdf",
2462
+ /**
2463
+ * Triggers the Make a copy action on a Liveboard, search or visualization
2464
+ *
2465
+ * @example
2466
+ * ```js
2467
+ * liveboardEmbed.trigger(HostEvent.MakeACopy, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2468
+ * vizEmbed.trigger(HostEvent.MakeACopy)
2469
+ * searchEmbed.trigger(HostEvent.MakeACopy)
2470
+ * ```
2471
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2472
+ */
2473
+ MakeACopy = "makeACopy",
2474
+ /**
2475
+ * Triggers the Delete action on a Liveboard
2476
+ *
2477
+ * @example
2478
+ * ```js
2479
+ * appEmbed.trigger(HostEvent.Remove)
2480
+ * ```
2481
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2482
+ */
2483
+ Remove = "delete",
2484
+ /**
2485
+ * Triggers the Explore action on a visualization
2486
+ *
2487
+ * @param - an object with vizId as a key
2488
+ * @example
2489
+ * ```js
2490
+ * liveboardEmbed.trigger(HostEvent.Explore, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2491
+ * ```
2492
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2493
+ */
2494
+ Explore = "explore",
2495
+ /**
2496
+ * Triggers the Create alert action on a visualization
2497
+ *
2498
+ * @param - an object with vizId as a key
2499
+ * @example
2500
+ * ```js
2501
+ * liveboardEmbed.trigger(HostEvent.CreateMonitor {
2502
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2503
+ * })
2504
+ * ```
2505
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2506
+ */
2507
+ CreateMonitor = "createMonitor",
2508
+ /**
2509
+ * Triggers the Manage alert action on a visualization
2510
+ *
2511
+ * @param - an object with vizId as a key
2512
+ * @example
2513
+ * ```js
2514
+ * liveboardEmbed.trigger(HostEvent.ManageMonitor, {
2515
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2516
+ * })
2517
+ * ```
2518
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2519
+ */
2520
+ ManageMonitor = "manageMonitor",
2521
+ /**
2522
+ * Triggers the Edit action on a Liveboard or visualization
2523
+ *
2524
+ * @param - object - to trigger the action for a specfic visualization
2525
+ * in Liveboard embed, pass in vizId as a key
2526
+ * @example
2527
+ * ```js
2528
+ * liveboardEmbed.trigger(HostEvent.Edit)
2529
+ *
2530
+ * liveboardEmbed.trigger(HostEvent.Edit, {vizId:
2531
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2532
+ *
2533
+ * vizEmbed.trigger((HostEvent.Edit)
2534
+ * ```
2535
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2536
+ */
2537
+ Edit = "edit",
2538
+ /**
2539
+ * Triggers the Copy link action on a Liveboard or visualization
2540
+ *
2541
+ * @param - object - to trigger the action for a s
2542
+ * pecfic visualization in Liveboard embed, pass in vizId as a key
2543
+ * @example
2544
+ * ```js
2545
+ * liveboardEmbed.trigger(HostEvent.CopyLink)
2546
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2547
+ * vizEmbed.trigger((HostEvent.CopyLink)
2548
+ * ```
2549
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2550
+ */
2551
+ CopyLink = "embedDocument",
2552
+ /**
2553
+ * Triggers the Present action on a Liveboard or visualization
2554
+ *
2555
+ * @param - object - to trigger the action for a specfic visualization
2556
+ * in Liveboard embed, pass in vizId as a key
2557
+ * @example
2558
+ * ```js
2559
+ * liveboardEmbed.trigger(HostEvent.Present)
2560
+ * liveboardEmbed.trigger(HostEvent.Present, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2561
+ * vizEmbed.trigger((HostEvent.Present)
2562
+ * ```
2563
+ * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
2564
+ */
2565
+ Present = "present",
2566
+ /**
2567
+ * Get TML for the current search.
2568
+ *
2569
+ * @example
2570
+ * ```js
2571
+ * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
2572
+ * console.log(
2573
+ * tml.search_query // TML representation of the search query
2574
+ * );
2575
+ * })
2576
+ * ```
2577
+ * @version SDK: 1.18.0 | ThoughtSpot: 8.10.0.cl, 9.0.1-sw
2578
+ * @important
2579
+ */
2580
+ GetTML = "getTML",
2581
+ /**
2582
+ * Triggers the ShowUnderlyingData action on visualization or search
2583
+ *
2584
+ * @param - an object with vizId as a key
2585
+ * @example
2586
+ * ```js
2587
+ * liveboardEmbed.trigger(HostEvent.ShowUnderlyingData, {vizId:
2588
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2589
+ *
2590
+ * vizEmbed.trigger(HostEvent.ShowUnderlyingData)
2591
+ *
2592
+ * searchEmbed.trigger(HostEvent.ShowUnderlyingData)
2593
+ * ```
2594
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2595
+ */
2596
+ ShowUnderlyingData = "showUnderlyingData",
2597
+ /**
2598
+ * Triggers the Delete action on visualization or search
2599
+ *
2600
+ * @param - incase of Liveboard embed, takes in an object with vizId as a key
2601
+ * can be left empty for search and visualization embeds
2602
+ * @example
2603
+ * ```js
2604
+ * liveboardEmbed.trigger(HostEvent.Delete, {vizId:
2605
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2606
+ *
2607
+ * vizEmbed.trigger(HostEvent.Delete)
2608
+ *
2609
+ * searchEmbed.trigger(HostEvent.Delete)
2610
+ * ```
2611
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2612
+ */
2613
+ Delete = "onDeleteAnswer",
2614
+ /**
2615
+ * Triggers the SpotIQAnalyze action on visualization or search
2616
+ *
2617
+ * @param - incase of Liveboard embed, takes in an object with vizId as a key
2618
+ * can be left empty for search and visualization embeds
2619
+ * @example
2620
+ * ```js
2621
+ * liveboardEmbed.trigger(HostEvent.SpotIQAnalyze, {vizId:
2622
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2623
+ *
2624
+ * vizEmbed.trigger(HostEvent.SpotIQAnalyze)
2625
+ *
2626
+ * searchEmbed.trigger(HostEvent.SpotIQAnalyze)
2627
+ * ```
2628
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2629
+ */
2630
+ SpotIQAnalyze = "spotIQAnalyze",
2631
+ /**
2632
+ * Triggers the Download action on visualization or search when Displaymode is Chart
2633
+ *
2634
+ * @example
2635
+ * ```js
2636
+ * liveboardEmbed.trigger(HostEvent.Download, {vizId:
2637
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2638
+ *
2639
+ * vizEmbed.trigger(HostEvent.Download)
2640
+ *
2641
+ * searchEmbed.trigger(HostEvent.Download)
2642
+ * ```
2643
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1-sw ,Use {@link DownloadAsPng}
2644
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2645
+ */
2646
+ Download = "downloadAsPng",
2647
+ /**
2648
+ * Triggers the Download action on visualization or search when Displaymode is Chart
2649
+ *
2650
+ * @example
2651
+ * ```js
2652
+ * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
2653
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
2654
+ *
2655
+ * vizEmbed.trigger(HostEvent.DownloadAsPng)
2656
+ *
2657
+ * searchEmbed.trigger(HostEvent.DownloadAsPng)
2658
+ * ```
2659
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.1-sw
2660
+ */
2661
+ DownloadAsPng = "downloadAsPng",
2662
+ /**
2663
+ * Triggers the downloadAsCSV action on visualization or search
2664
+ *
2665
+ * @example
2666
+ * ```js
2667
+ * liveboardEmbed.trigger(HostEvent.DownloadAsCsv, {vizId:
2668
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2669
+ *
2670
+ * vizEmbed.trigger(HostEvent.DownloadAsCsv)
2671
+ *
2672
+ * searchEmbed.trigger(HostEvent.DownloadAsCsv)
2673
+ * ```
2674
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2675
+ */
2676
+ DownloadAsCsv = "downloadAsCSV",
2677
+ /**
2678
+ * Triggers the downloadAsXLSX action on visualization or search
2679
+ *
2680
+ * @example
2681
+ * ```js
2682
+ * liveboardEmbed.trigger(HostEvent.DownloadAsXlsx, {vizId:
2683
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2684
+ *
2685
+ * vizEmbed.trigger(HostEvent.DownloadAsXlsx)
2686
+ *
2687
+ * searchEmbed.trigger(HostEvent.DownloadAsXlsx)
2688
+ * ```
2689
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2690
+ */
2691
+ DownloadAsXlsx = "downloadAsXLSX",
2692
+ /**
2693
+ * Triggers the Share action on a liveboard or answer
2694
+ *
2695
+ * @example
2696
+ * ```js
2697
+ * liveboardEmbed.trigger(HostEvent.Share)
2698
+ *
2699
+ * searchEmbed.trigger(HostEvent.Share)
2700
+ * ```
2701
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2702
+ */
2703
+ Share = "share",
2704
+ /**
2705
+ * Trigger the Save action on a liveboard or answer
2706
+ *
2707
+ * @example
2708
+ * ```js
2709
+ * liveboardEmbed.trigger(HostEvent.Save)
2710
+ *
2711
+ * searchEmbed.trigger(HostEvent.Save)
2712
+ * ```
2713
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2714
+ */
2715
+ Save = "save",
2716
+ /**
2717
+ * Triggers the SyncToSheets action on visualization
2718
+ *
2719
+ * @param - an object with vizId as a key
2720
+ * @example
2721
+ * ```js
2722
+ * liveboardEmbed.trigger(HostEvent.SyncToSheets, {vizId:
2723
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2724
+ *
2725
+ * vizEmbed.trigger(HostEvent.SyncToSheets)
2726
+ * ```
2727
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2728
+ */
2729
+ SyncToSheets = "sync-to-sheets",
2730
+ /**
2731
+ * Triggers the SyncToOtherApps action on visualization
2732
+ *
2733
+ * @param - an object with vizId as a key
2734
+ * @example
2735
+ * ```js
2736
+ * liveboardEmbed.trigger(HostEvent.SyncToOtherApps, {vizId:
2737
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2738
+ *
2739
+ * vizEmbed.trigger(HostEvent.SyncToOtherApps)
2740
+ * ```
2741
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2742
+ */
2743
+ SyncToOtherApps = "sync-to-other-apps",
2744
+ /**
2745
+ * Triggers the ManagePipelines action on visualization
2746
+ *
2747
+ * @param - an object with vizId as a key
2748
+ * @example
2749
+ * ```js
2750
+ * liveboardEmbed.trigger(HostEvent.ManagePipelines, {vizId:
2751
+ * '730496d6-6903-4601-937e-2c691821af3c'})
2752
+ *
2753
+ * vizEmbed.trigger(HostEvent.ManagePipelines)
2754
+ * ```
2755
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1-sw
2756
+ */
2757
+ ManagePipelines = "manage-pipeline",
2758
+ /**
2759
+ * Triggers the Reset search in answer
2760
+ *
2761
+ * @example
2762
+ * ```js
2763
+ * searchEmbed.trigger(HostEvent.ResetSearch)
2764
+ * ```
2765
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1-sw
2766
+ */
2767
+ ResetSearch = "resetSearch"
2768
+ }
2769
+ /**
2770
+ * The different visual modes that the data sources panel within
2771
+ * search could appear in, i.e., hidden, collapsed, or expanded.
2772
+ */
2773
+ export declare enum DataSourceVisualMode {
2774
+ /**
2775
+ * Data source panel is hidden.
2776
+ */
2777
+ Hidden = "hide",
2778
+ /**
2779
+ * Data source panel is collapsed, but the user can manually expand it.
2780
+ */
2781
+ Collapsed = "collapse",
2782
+ /**
2783
+ * Data source panel is expanded, but the user can manually collapse it.
2784
+ */
2785
+ Expanded = "expand"
2786
+ }
2787
+ /**
2788
+ * The query params passed down to the embedded ThoughtSpot app
2789
+ * containing configuration and/or visual information.
2790
+ */
2791
+ export declare enum Param {
2792
+ EmbedApp = "embedApp",
2793
+ DataSources = "dataSources",
2794
+ DataSourceMode = "dataSourceMode",
2795
+ DisableActions = "disableAction",
2796
+ DisableActionReason = "disableHint",
2797
+ ForceTable = "forceTable",
2798
+ preventLiveboardFilterRemoval = "preventPinboardFilterRemoval",
2799
+ SearchQuery = "searchQuery",
2800
+ HideActions = "hideAction",
2801
+ HideObjects = "hideObjects",
2802
+ HostAppUrl = "hostAppUrl",
2803
+ EnableVizTransformations = "enableVizTransform",
2804
+ EnableSearchAssist = "enableSearchAssist",
2805
+ HideResult = "hideResult",
2806
+ UseLastSelectedDataSource = "useLastSelectedSources",
2807
+ Tag = "tag",
2808
+ searchTokenString = "searchTokenString",
2809
+ executeSearch = "executeSearch",
2810
+ fullHeight = "isFullHeightPinboard",
2811
+ livedBoardEmbed = "isLiveboardEmbed",
2812
+ searchEmbed = "isSearchEmbed",
2813
+ vizEmbed = "isVizEmbed",
2814
+ Version = "sdkVersion",
2815
+ ViewPortHeight = "viewPortHeight",
2816
+ ViewPortWidth = "viewPortWidth",
2817
+ VisibleActions = "visibleAction",
2818
+ CustomCSSUrl = "customCssUrl",
2819
+ DisableLoginRedirect = "disableLoginRedirect",
2820
+ visibleVizs = "pinboardVisibleVizs",
2821
+ LiveboardV2Enabled = "isPinboardV2Enabled",
2822
+ ShowAlerts = "showAlerts",
2823
+ Locale = "locale",
2824
+ CustomStyle = "customStyle",
2825
+ ForceSAMLAutoRedirect = "forceSAMLAutoRedirect",
2826
+ AuthType = "authType",
2827
+ IconSpriteUrl = "iconSprite",
2828
+ cookieless = "cookieless",
2829
+ ContextMenuTrigger = "isContextMenuEnabledOnLeftClick",
2830
+ LinkOverride = "linkOverride",
2831
+ blockNonEmbedFullAppAccess = "blockNonEmbedFullAppAccess",
2832
+ ShowInsertToSlide = "insertInToSlide",
2833
+ PrimaryNavHidden = "primaryNavHidden",
2834
+ HideProfleAndHelp = "profileAndHelpInNavBarHidden"
2835
+ }
2836
+ /**
2837
+ * The list of actions that can be performed on visual ThoughtSpot
2838
+ * entities, such as answers and Liveboards.
2839
+ *
2840
+ * This enum is used to specify the actions that could be disabled,
2841
+ * hidden or made visible.
2842
+ *
2843
+ * @example
2844
+ * ```js
2845
+ * const embed = new LiveboardEmbed('#embed-container', {
2846
+ * ... // other options
2847
+ * visibleActions: [Action.Save, Action.Explore],
2848
+ * disableActions: [Action.Save],
2849
+ * hiddenActions: [Action.Download], // Set either this or visibleActions
2850
+ * })
2851
+ * ```
2852
+ */
2853
+ export declare enum Action {
2854
+ Save = "save",
2855
+ /**
2856
+ * @hidden
2857
+ */
2858
+ Update = "update",
2859
+ /**
2860
+ * @hidden
2861
+ */
2862
+ SaveUntitled = "saveUntitled",
2863
+ SaveAsView = "saveAsView",
2864
+ MakeACopy = "makeACopy",
2865
+ EditACopy = "editACopy",
2866
+ CopyLink = "embedDocument",
2867
+ /**
2868
+ * @hidden
2869
+ */
2870
+ ResetLayout = "resetLayout",
2871
+ Schedule = "subscription",
2872
+ SchedulesList = "schedule-list",
2873
+ Share = "share",
2874
+ AddFilter = "addFilter",
2875
+ ConfigureFilter = "configureFilter",
2876
+ CollapseDataSources = "collapseDataSources",
2877
+ ChooseDataSources = "chooseDataSources",
2878
+ AddFormula = "addFormula",
2879
+ AddParameter = "addParameter",
2880
+ /**
2881
+ * @hidden
2882
+ */
2883
+ SearchOnTop = "searchOnTop",
2884
+ SpotIQAnalyze = "spotIQAnalyze",
2885
+ /**
2886
+ * @hidden
2887
+ */
2888
+ ExplainInsight = "explainInsight",
2889
+ /**
2890
+ * @hidden
2891
+ */
2892
+ SpotIQFollow = "spotIQFollow",
2893
+ ShareViz = "shareViz",
2894
+ /**
2895
+ * @hidden
2896
+ */
2897
+ ReplaySearch = "replaySearch",
2898
+ ShowUnderlyingData = "showUnderlyingData",
2899
+ Download = "download",
2900
+ DownloadAsPng = "downloadAsPng",
2901
+ DownloadAsPdf = "downloadAsPdf",
2902
+ DownloadAsCsv = "downloadAsCSV",
2903
+ DownloadAsXlsx = "downloadAsXLSX",
2904
+ /**
2905
+ * @hidden
2906
+ */
2907
+ DownloadTrace = "downloadTrace",
2908
+ ExportTML = "exportTSL",
2909
+ ImportTML = "importTSL",
2910
+ UpdateTML = "updateTSL",
2911
+ EditTML = "editTSL",
2912
+ Present = "present",
2913
+ ToggleSize = "toggleSize",
2914
+ Edit = "edit",
2915
+ EditTitle = "editTitle",
2916
+ Remove = "delete",
2917
+ /**
2918
+ * @hidden
2919
+ */
2920
+ Ungroup = "ungroup",
2921
+ /**
2922
+ * @hidden
2923
+ */
2924
+ Describe = "describe",
2925
+ /**
2926
+ * @hidden
2927
+ */
2928
+ Relate = "relate",
2929
+ /**
2930
+ * @hidden
2931
+ */
2932
+ CustomizeHeadlines = "customizeHeadlines",
2933
+ /**
2934
+ * @hidden
2935
+ */
2936
+ PinboardInfo = "pinboardInfo",
2937
+ LiveboardInfo = "pinboardInfo",
2938
+ /**
2939
+ * @hidden
2940
+ */
2941
+ SendAnswerFeedback = "sendFeedback",
2942
+ /**
2943
+ * @hidden
2944
+ */
2945
+ DownloadEmbraceQueries = "downloadEmbraceQueries",
2946
+ /**
2947
+ * Pin action.
2948
+ */
2949
+ Pin = "pin",
2950
+ /**
2951
+ * @hidden
2952
+ */
2953
+ AnalysisInfo = "analysisInfo",
2954
+ Subscription = "subscription",
2955
+ /**
2956
+ * Explore action.
2957
+ */
2958
+ Explore = "explore",
2959
+ DrillInclude = "context-menu-item-include",
2960
+ DrillExclude = "context-menu-item-exclude",
2961
+ CopyToClipboard = "context-menu-item-copy-to-clipboard",
2962
+ CopyAndEdit = "context-menu-item-copy-and-edit",
2963
+ /**
2964
+ * @hidden
2965
+ */
2966
+ DrillEdit = "context-menu-item-edit",
2967
+ EditMeasure = "context-menu-item-edit-measure",
2968
+ Separator = "context-menu-item-separator",
2969
+ DrillDown = "DRILL",
2970
+ RequestAccess = "requestAccess",
2971
+ QueryDetailsButtons = "queryDetailsButtons",
2972
+ /**
2973
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2974
+ */
2975
+ AnswerDelete = "onDeleteAnswer",
2976
+ /**
2977
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2978
+ */
2979
+ AnswerChartSwitcher = "answerChartSwitcher",
2980
+ /**
2981
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2982
+ */
2983
+ AddToFavorites = "addToFavorites",
2984
+ /**
2985
+ * @version SDK: 1.9.0 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
2986
+ */
2987
+ EditDetails = "editDetails",
2988
+ /**
2989
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2990
+ */
2991
+ CreateMonitor = "createMonitor",
2992
+ /**
2993
+ * @version SDK: 1.11.1 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
2994
+ */
2995
+ ReportError = "reportError",
2996
+ SyncToSheets = "sync-to-sheets",
2997
+ SyncToOtherApps = "sync-to-other-apps",
2998
+ ManagePipelines = "manage-pipeline",
2999
+ /**
3000
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3001
+ */
3002
+ CrossFilter = "context-menu-item-cross-filter",
3003
+ /**
3004
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3005
+ */
3006
+ RemoveCrossFilter = "context-menu-item-remove-cross-filter",
3007
+ /**
3008
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3009
+ */
3010
+ AxisMenuAggregate = "axisMenuAggregate",
3011
+ /**
3012
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3013
+ */
3014
+ AxisMenuTimeBucket = "axisMenuTimeBucket",
3015
+ /**
3016
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3017
+ */
3018
+ AxisMenuFilter = "axisMenuFilter",
3019
+ /**
3020
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3021
+ */
3022
+ AxisMenuConditionalFormat = "axisMenuConditionalFormat",
3023
+ /**
3024
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3025
+ */
3026
+ AxisMenuSort = "axisMenuSort",
3027
+ /**
3028
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3029
+ */
3030
+ AxisMenuGroup = "axisMenuGroup",
3031
+ /**
3032
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3033
+ */
3034
+ AxisMenuPosition = "axisMenuPosition",
3035
+ /**
3036
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3037
+ */
3038
+ AxisMenuRename = "axisMenuRename",
3039
+ /**
3040
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3041
+ */
3042
+ AxisMenuEdit = "axisMenuEdit",
3043
+ /**
3044
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3045
+ */
3046
+ AxisMenuNumberFormat = "axisMenuNumberFormat",
3047
+ /**
3048
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3049
+ */
3050
+ AxisMenuTextWrapping = "axisMenuTextWrapping",
3051
+ /**
3052
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3053
+ */
3054
+ AxisMenuRemove = "axisMenuRemove",
3055
+ /**
3056
+ * @hidden
3057
+ */
3058
+ InsertInToSlide = "insertInToSlide",
3059
+ /**
3060
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
3061
+ */
3062
+ RenameModalTitleDescription = "renameModalTitleDescription"
3063
+ }
3064
+ export interface SessionInterface {
3065
+ sessionId: string;
3066
+ genNo: number;
3067
+ acSession: {
3068
+ sessionId: string;
3069
+ genNo: number;
3070
+ };
3071
+ }
3072
+ export declare enum OperationType {
3073
+ GetChartWithData = "GetChartWithData",
3074
+ GetTableWithHeadlineData = "GetTableWithHeadlineData"
3075
+ }
3076
+ export interface AnswerServiceType {
3077
+ getAnswer?: (offset: number, batchSize: number) => any;
3078
+ }
3079
+ export declare enum PrefetchFeatures {
3080
+ FullApp = "FullApp",
3081
+ SearchEmbed = "SearchEmbed",
3082
+ LiveboardEmbed = "LiveboardEmbed",
3083
+ VizEmbed = "VizEmbed"
3084
+ }
3085
+ /**
3086
+ * Enum for options to change context trigger
3087
+ */
3088
+ export declare enum ContextMenuTriggerOptions {
3089
+ LEFT_CLICK = "left-click",
3090
+ RIGHT_CLICK = "right-click"
3091
+ }
3092
+