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