@thoughtspot/visual-embed-sdk 1.52.0 → 1.52.2-beta

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 (385) hide show
  1. package/cjs/package.json +19 -4
  2. package/cjs/src/contracts/contracts.spec.d.ts +2 -0
  3. package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
  4. package/cjs/src/contracts/contracts.spec.js +345 -0
  5. package/cjs/src/contracts/contracts.spec.js.map +1 -0
  6. package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
  7. package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
  8. package/cjs/src/contracts/embed-event-payloads.js +3 -0
  9. package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
  10. package/cjs/src/contracts/host-event-contracts.d.ts +416 -0
  11. package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
  12. package/cjs/src/contracts/host-event-contracts.js +3 -0
  13. package/cjs/src/contracts/host-event-contracts.js.map +1 -0
  14. package/cjs/src/contracts/index.d.ts +22 -0
  15. package/cjs/src/contracts/index.d.ts.map +1 -0
  16. package/cjs/src/contracts/index.js +33 -0
  17. package/cjs/src/contracts/index.js.map +1 -0
  18. package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  19. package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  20. package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  21. package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
  22. package/cjs/src/embed/app.d.ts +21 -143
  23. package/cjs/src/embed/app.d.ts.map +1 -1
  24. package/cjs/src/embed/app.js +21 -121
  25. package/cjs/src/embed/app.js.map +1 -1
  26. package/cjs/src/embed/app.spec.js +80 -26
  27. package/cjs/src/embed/app.spec.js.map +1 -1
  28. package/cjs/src/embed/auto-frame-renderer.js +1 -1
  29. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  30. package/cjs/src/embed/auto-frame-renderer.spec.js +24 -13
  31. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  32. package/cjs/src/embed/bodyless-conversation.js +1 -1
  33. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  34. package/cjs/src/embed/conversation.d.ts +1 -0
  35. package/cjs/src/embed/conversation.d.ts.map +1 -1
  36. package/cjs/src/embed/conversation.js +4 -4
  37. package/cjs/src/embed/conversation.js.map +1 -1
  38. package/cjs/src/embed/conversation.spec.js +35 -24
  39. package/cjs/src/embed/conversation.spec.js.map +1 -1
  40. package/cjs/src/embed/embedConfig.spec.js +2 -1
  41. package/cjs/src/embed/embedConfig.spec.js.map +1 -1
  42. package/cjs/src/embed/events.spec.js +12 -2
  43. package/cjs/src/embed/events.spec.js.map +1 -1
  44. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +5 -4
  45. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  46. package/cjs/src/embed/hostEventClient/host-event-client.js +34 -23
  47. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  48. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +50 -44
  49. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  50. package/cjs/src/embed/hostEventClient/utils.d.ts +10 -1
  51. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  52. package/cjs/src/embed/hostEventClient/utils.js +52 -6
  53. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  54. package/cjs/src/embed/hostEventClient/utils.spec.js +151 -0
  55. package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
  56. package/cjs/src/embed/liveboard.d.ts +13 -164
  57. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  58. package/cjs/src/embed/liveboard.js +72 -135
  59. package/cjs/src/embed/liveboard.js.map +1 -1
  60. package/cjs/src/embed/liveboard.spec.js +213 -29
  61. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  62. package/cjs/src/embed/search-bar.js +1 -1
  63. package/cjs/src/embed/search-bar.js.map +1 -1
  64. package/cjs/src/embed/search.d.ts +14 -0
  65. package/cjs/src/embed/search.d.ts.map +1 -1
  66. package/cjs/src/embed/search.js +5 -2
  67. package/cjs/src/embed/search.js.map +1 -1
  68. package/cjs/src/embed/search.spec.js +85 -0
  69. package/cjs/src/embed/search.spec.js.map +1 -1
  70. package/cjs/src/embed/spotter-utils.d.ts +8 -1
  71. package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
  72. package/cjs/src/embed/spotter-utils.js +14 -1
  73. package/cjs/src/embed/spotter-utils.js.map +1 -1
  74. package/cjs/src/embed/spotter-utils.spec.js +26 -0
  75. package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
  76. package/cjs/src/embed/ts-embed.d.ts +20 -22
  77. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  78. package/cjs/src/embed/ts-embed.js +171 -66
  79. package/cjs/src/embed/ts-embed.js.map +1 -1
  80. package/cjs/src/embed/ts-embed.spec.js +486 -38
  81. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  82. package/cjs/src/errors.js +1 -1
  83. package/cjs/src/errors.js.map +1 -1
  84. package/cjs/src/full-height.d.ts +137 -0
  85. package/cjs/src/full-height.d.ts.map +1 -0
  86. package/cjs/src/full-height.js +272 -0
  87. package/cjs/src/full-height.js.map +1 -0
  88. package/cjs/src/full-height.spec.d.ts +2 -0
  89. package/cjs/src/full-height.spec.d.ts.map +1 -0
  90. package/cjs/src/full-height.spec.js +835 -0
  91. package/cjs/src/full-height.spec.js.map +1 -0
  92. package/cjs/src/index.d.ts +5 -3
  93. package/cjs/src/index.d.ts.map +1 -1
  94. package/cjs/src/index.js +6 -4
  95. package/cjs/src/index.js.map +1 -1
  96. package/cjs/src/react/all-types-export.d.ts +1 -1
  97. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  98. package/cjs/src/react/all-types-export.js +2 -1
  99. package/cjs/src/react/all-types-export.js.map +1 -1
  100. package/cjs/src/react/all-types-export.parity.spec.js +55 -3
  101. package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
  102. package/cjs/src/types.d.ts +584 -24
  103. package/cjs/src/types.d.ts.map +1 -1
  104. package/cjs/src/types.js +370 -22
  105. package/cjs/src/types.js.map +1 -1
  106. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +2 -1
  107. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  108. package/cjs/src/utils/custom-actions.spec.js +4 -2
  109. package/cjs/src/utils/custom-actions.spec.js.map +1 -1
  110. package/cjs/src/utils/filterConverter.d.ts +106 -0
  111. package/cjs/src/utils/filterConverter.d.ts.map +1 -0
  112. package/cjs/src/utils/filterConverter.js +215 -0
  113. package/cjs/src/utils/filterConverter.js.map +1 -0
  114. package/cjs/src/utils/filterConverter.spec.d.ts +2 -0
  115. package/cjs/src/utils/filterConverter.spec.d.ts.map +1 -0
  116. package/cjs/src/utils/filterConverter.spec.js +709 -0
  117. package/cjs/src/utils/filterConverter.spec.js.map +1 -0
  118. package/cjs/src/utils/processData.spec.js +2 -1
  119. package/cjs/src/utils/processData.spec.js.map +1 -1
  120. package/cjs/src/utils/processTrigger.d.ts +3 -1
  121. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  122. package/cjs/src/utils/processTrigger.js +19 -51
  123. package/cjs/src/utils/processTrigger.js.map +1 -1
  124. package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
  125. package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
  126. package/cjs/src/utils/transport/iframe-transport.js +108 -0
  127. package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
  128. package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  129. package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  130. package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
  131. package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
  132. package/cjs/src/utils.d.ts +18 -0
  133. package/cjs/src/utils.d.ts.map +1 -1
  134. package/cjs/src/utils.js +39 -1
  135. package/cjs/src/utils.js.map +1 -1
  136. package/cjs/src/utils.spec.js +62 -0
  137. package/cjs/src/utils.spec.js.map +1 -1
  138. package/dist/{index-BMppCU63.js → index-CcBYlGo9.js} +1 -1
  139. package/dist/src/contracts/contracts.spec.d.ts +2 -0
  140. package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
  141. package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
  142. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
  143. package/dist/src/contracts/host-event-contracts.d.ts +416 -0
  144. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
  145. package/dist/src/contracts/index.d.ts +22 -0
  146. package/dist/src/contracts/index.d.ts.map +1 -0
  147. package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  148. package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  149. package/dist/src/embed/app.d.ts +21 -143
  150. package/dist/src/embed/app.d.ts.map +1 -1
  151. package/dist/src/embed/conversation.d.ts +1 -0
  152. package/dist/src/embed/conversation.d.ts.map +1 -1
  153. package/dist/src/embed/hostEventClient/host-event-client.d.ts +5 -4
  154. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  155. package/dist/src/embed/hostEventClient/utils.d.ts +10 -1
  156. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  157. package/dist/src/embed/liveboard.d.ts +13 -164
  158. package/dist/src/embed/liveboard.d.ts.map +1 -1
  159. package/dist/src/embed/search.d.ts +14 -0
  160. package/dist/src/embed/search.d.ts.map +1 -1
  161. package/dist/src/embed/spotter-utils.d.ts +8 -1
  162. package/dist/src/embed/spotter-utils.d.ts.map +1 -1
  163. package/dist/src/embed/ts-embed.d.ts +20 -22
  164. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  165. package/dist/src/full-height.d.ts +137 -0
  166. package/dist/src/full-height.d.ts.map +1 -0
  167. package/dist/src/full-height.spec.d.ts +2 -0
  168. package/dist/src/full-height.spec.d.ts.map +1 -0
  169. package/dist/src/index.d.ts +5 -3
  170. package/dist/src/index.d.ts.map +1 -1
  171. package/dist/src/react/all-types-export.d.ts +1 -1
  172. package/dist/src/react/all-types-export.d.ts.map +1 -1
  173. package/dist/src/types.d.ts +584 -24
  174. package/dist/src/types.d.ts.map +1 -1
  175. package/dist/src/utils/filterConverter.d.ts +106 -0
  176. package/dist/src/utils/filterConverter.d.ts.map +1 -0
  177. package/dist/src/utils/filterConverter.spec.d.ts +2 -0
  178. package/dist/src/utils/filterConverter.spec.d.ts.map +1 -0
  179. package/dist/src/utils/processTrigger.d.ts +3 -1
  180. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  181. package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
  182. package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
  183. package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  184. package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  185. package/dist/src/utils.d.ts +18 -0
  186. package/dist/src/utils.d.ts.map +1 -1
  187. package/dist/tsembed-react.es.js +1144 -412
  188. package/dist/tsembed-react.js +1143 -411
  189. package/dist/tsembed.es.js +1357 -418
  190. package/dist/tsembed.js +1352 -412
  191. package/dist/visual-embed-sdk-react-full.d.ts +1514 -651
  192. package/dist/visual-embed-sdk-react.d.ts +1351 -632
  193. package/dist/visual-embed-sdk.d.ts +1508 -668
  194. package/lib/package.json +19 -4
  195. package/lib/src/contracts/contracts.spec.d.ts +2 -0
  196. package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
  197. package/lib/src/contracts/contracts.spec.js +342 -0
  198. package/lib/src/contracts/contracts.spec.js.map +1 -0
  199. package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
  200. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
  201. package/lib/src/contracts/embed-event-payloads.js +2 -0
  202. package/lib/src/contracts/embed-event-payloads.js.map +1 -0
  203. package/lib/src/contracts/host-event-contracts.d.ts +416 -0
  204. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
  205. package/lib/src/contracts/host-event-contracts.js +2 -0
  206. package/lib/src/contracts/host-event-contracts.js.map +1 -0
  207. package/lib/src/contracts/index.d.ts +22 -0
  208. package/lib/src/contracts/index.d.ts.map +1 -0
  209. package/lib/src/contracts/index.js +22 -0
  210. package/lib/src/contracts/index.js.map +1 -0
  211. package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  212. package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  213. package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  214. package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
  215. package/lib/src/embed/app.d.ts +21 -143
  216. package/lib/src/embed/app.d.ts.map +1 -1
  217. package/lib/src/embed/app.js +23 -123
  218. package/lib/src/embed/app.js.map +1 -1
  219. package/lib/src/embed/app.spec.js +80 -26
  220. package/lib/src/embed/app.spec.js.map +1 -1
  221. package/lib/src/embed/auto-frame-renderer.js +1 -1
  222. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  223. package/lib/src/embed/auto-frame-renderer.spec.js +24 -13
  224. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  225. package/lib/src/embed/bodyless-conversation.js +1 -1
  226. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  227. package/lib/src/embed/conversation.d.ts +1 -0
  228. package/lib/src/embed/conversation.d.ts.map +1 -1
  229. package/lib/src/embed/conversation.js +5 -5
  230. package/lib/src/embed/conversation.js.map +1 -1
  231. package/lib/src/embed/conversation.spec.js +35 -24
  232. package/lib/src/embed/conversation.spec.js.map +1 -1
  233. package/lib/src/embed/embedConfig.spec.js +2 -1
  234. package/lib/src/embed/embedConfig.spec.js.map +1 -1
  235. package/lib/src/embed/events.spec.js +12 -2
  236. package/lib/src/embed/events.spec.js.map +1 -1
  237. package/lib/src/embed/hostEventClient/host-event-client.d.ts +5 -4
  238. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  239. package/lib/src/embed/hostEventClient/host-event-client.js +19 -8
  240. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  241. package/lib/src/embed/hostEventClient/host-event-client.spec.js +15 -9
  242. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  243. package/lib/src/embed/hostEventClient/utils.d.ts +10 -1
  244. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  245. package/lib/src/embed/hostEventClient/utils.js +48 -3
  246. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  247. package/lib/src/embed/hostEventClient/utils.spec.js +152 -1
  248. package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
  249. package/lib/src/embed/liveboard.d.ts +13 -164
  250. package/lib/src/embed/liveboard.d.ts.map +1 -1
  251. package/lib/src/embed/liveboard.js +73 -136
  252. package/lib/src/embed/liveboard.js.map +1 -1
  253. package/lib/src/embed/liveboard.spec.js +213 -29
  254. package/lib/src/embed/liveboard.spec.js.map +1 -1
  255. package/lib/src/embed/search-bar.js +1 -1
  256. package/lib/src/embed/search-bar.js.map +1 -1
  257. package/lib/src/embed/search.d.ts +14 -0
  258. package/lib/src/embed/search.d.ts.map +1 -1
  259. package/lib/src/embed/search.js +5 -2
  260. package/lib/src/embed/search.js.map +1 -1
  261. package/lib/src/embed/search.spec.js +85 -0
  262. package/lib/src/embed/search.spec.js.map +1 -1
  263. package/lib/src/embed/spotter-utils.d.ts +8 -1
  264. package/lib/src/embed/spotter-utils.d.ts.map +1 -1
  265. package/lib/src/embed/spotter-utils.js +12 -0
  266. package/lib/src/embed/spotter-utils.js.map +1 -1
  267. package/lib/src/embed/spotter-utils.spec.js +27 -1
  268. package/lib/src/embed/spotter-utils.spec.js.map +1 -1
  269. package/lib/src/embed/ts-embed.d.ts +20 -22
  270. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  271. package/lib/src/embed/ts-embed.js +171 -66
  272. package/lib/src/embed/ts-embed.js.map +1 -1
  273. package/lib/src/embed/ts-embed.spec.js +484 -36
  274. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  275. package/lib/src/errors.js +1 -1
  276. package/lib/src/errors.js.map +1 -1
  277. package/lib/src/full-height.d.ts +137 -0
  278. package/lib/src/full-height.d.ts.map +1 -0
  279. package/lib/src/full-height.js +268 -0
  280. package/lib/src/full-height.js.map +1 -0
  281. package/lib/src/full-height.spec.d.ts +2 -0
  282. package/lib/src/full-height.spec.d.ts.map +1 -0
  283. package/lib/src/full-height.spec.js +833 -0
  284. package/lib/src/full-height.spec.js.map +1 -0
  285. package/lib/src/index.d.ts +5 -3
  286. package/lib/src/index.d.ts.map +1 -1
  287. package/lib/src/index.js +3 -2
  288. package/lib/src/index.js.map +1 -1
  289. package/lib/src/react/all-types-export.d.ts +1 -1
  290. package/lib/src/react/all-types-export.d.ts.map +1 -1
  291. package/lib/src/react/all-types-export.js +1 -1
  292. package/lib/src/react/all-types-export.js.map +1 -1
  293. package/lib/src/react/all-types-export.parity.spec.js +55 -3
  294. package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
  295. package/lib/src/types.d.ts +584 -24
  296. package/lib/src/types.d.ts.map +1 -1
  297. package/lib/src/types.js +370 -22
  298. package/lib/src/types.js.map +1 -1
  299. package/lib/src/utils/authService/tokenizedAuthService.spec.js +2 -1
  300. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  301. package/lib/src/utils/custom-actions.spec.js +4 -2
  302. package/lib/src/utils/custom-actions.spec.js.map +1 -1
  303. package/lib/src/utils/filterConverter.d.ts +106 -0
  304. package/lib/src/utils/filterConverter.d.ts.map +1 -0
  305. package/lib/src/utils/filterConverter.js +210 -0
  306. package/lib/src/utils/filterConverter.js.map +1 -0
  307. package/lib/src/utils/filterConverter.spec.d.ts +2 -0
  308. package/lib/src/utils/filterConverter.spec.d.ts.map +1 -0
  309. package/lib/src/utils/filterConverter.spec.js +707 -0
  310. package/lib/src/utils/filterConverter.spec.js.map +1 -0
  311. package/lib/src/utils/processData.spec.js +2 -1
  312. package/lib/src/utils/processData.spec.js.map +1 -1
  313. package/lib/src/utils/processTrigger.d.ts +3 -1
  314. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  315. package/lib/src/utils/processTrigger.js +19 -51
  316. package/lib/src/utils/processTrigger.js.map +1 -1
  317. package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
  318. package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
  319. package/lib/src/utils/transport/iframe-transport.js +101 -0
  320. package/lib/src/utils/transport/iframe-transport.js.map +1 -0
  321. package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  322. package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  323. package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
  324. package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
  325. package/lib/src/utils.d.ts +18 -0
  326. package/lib/src/utils.d.ts.map +1 -1
  327. package/lib/src/utils.js +37 -0
  328. package/lib/src/utils.js.map +1 -1
  329. package/lib/src/utils.spec.js +63 -1
  330. package/lib/src/utils.spec.js.map +1 -1
  331. package/lib/src/visual-embed-sdk.d.ts +1508 -668
  332. package/package.json +19 -4
  333. package/src/contracts/contracts.spec.ts +392 -0
  334. package/src/contracts/embed-event-payloads.ts +83 -0
  335. package/src/contracts/host-event-contracts.ts +500 -0
  336. package/src/contracts/index.ts +53 -0
  337. package/src/contracts/ui-passthrough-contracts.ts +301 -0
  338. package/src/embed/app.spec.ts +101 -34
  339. package/src/embed/app.ts +42 -268
  340. package/src/embed/auto-frame-renderer.spec.ts +24 -13
  341. package/src/embed/auto-frame-renderer.ts +1 -1
  342. package/src/embed/bodyless-conversation.ts +1 -1
  343. package/src/embed/conversation.spec.ts +38 -27
  344. package/src/embed/conversation.ts +5 -5
  345. package/src/embed/embedConfig.spec.ts +2 -1
  346. package/src/embed/events.spec.ts +14 -2
  347. package/src/embed/hostEventClient/host-event-client.spec.ts +16 -10
  348. package/src/embed/hostEventClient/host-event-client.ts +31 -10
  349. package/src/embed/hostEventClient/utils.spec.ts +176 -1
  350. package/src/embed/hostEventClient/utils.ts +53 -3
  351. package/src/embed/liveboard.spec.ts +261 -41
  352. package/src/embed/liveboard.ts +85 -300
  353. package/src/embed/search-bar.tsx +1 -1
  354. package/src/embed/search.spec.ts +103 -0
  355. package/src/embed/search.ts +21 -1
  356. package/src/embed/spotter-utils.spec.ts +29 -0
  357. package/src/embed/spotter-utils.ts +16 -0
  358. package/src/embed/ts-embed.spec.ts +650 -36
  359. package/src/embed/ts-embed.ts +205 -76
  360. package/src/errors.ts +1 -1
  361. package/src/full-height.spec.ts +1008 -0
  362. package/src/full-height.ts +361 -0
  363. package/src/index.ts +103 -5
  364. package/src/react/all-types-export.parity.spec.ts +63 -3
  365. package/src/react/all-types-export.ts +49 -0
  366. package/src/types.ts +584 -22
  367. package/src/utils/authService/tokenizedAuthService.spec.ts +2 -1
  368. package/src/utils/custom-actions.spec.ts +4 -2
  369. package/src/utils/filterConverter.spec.ts +801 -0
  370. package/src/utils/filterConverter.ts +304 -0
  371. package/src/utils/processData.spec.ts +2 -1
  372. package/src/utils/processTrigger.ts +28 -58
  373. package/src/utils/transport/iframe-transport.spec.ts +177 -0
  374. package/src/utils/transport/iframe-transport.ts +122 -0
  375. package/src/utils.spec.ts +71 -0
  376. package/src/utils.ts +38 -0
  377. package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
  378. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  379. package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
  380. package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
  381. package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  382. package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
  383. package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  384. package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
  385. package/src/embed/hostEventClient/contracts.ts +0 -262
@@ -1250,6 +1250,277 @@ declare class AnswerService {
1250
1250
  addDisplayedVizToLiveboard(liveboardId: string): Promise<any>;
1251
1251
  setTMLOverride(override: any): void;
1252
1252
  }
1253
+ export interface LiveboardTab {
1254
+ id: string;
1255
+ name: string;
1256
+ [key: string]: any;
1257
+ }
1258
+ export interface LiveboardGroup {
1259
+ id: string;
1260
+ name: string;
1261
+ [key: string]: any;
1262
+ }
1263
+ declare enum ApplicabilityLevel {
1264
+ Liveboard = "LIVEBOARD",
1265
+ Tab = "TAB",
1266
+ Group = "GROUP"
1267
+ }
1268
+ /**
1269
+ * Scopes a filter or parameter to a specific target.
1270
+ * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
1271
+ * is not required. `level` accepts the enum or its string value, e.g. `'TAB'`.
1272
+ */
1273
+ export interface Applicability {
1274
+ level: ApplicabilityLevel | `${ApplicabilityLevel}`;
1275
+ targetId?: string;
1276
+ }
1277
+ export interface FilterUpdate {
1278
+ column: string;
1279
+ oper: string;
1280
+ values: string[];
1281
+ type?: string;
1282
+ applicability?: Applicability;
1283
+ }
1284
+ export interface LiveboardFilter {
1285
+ applicability?: Applicability;
1286
+ [key: string]: any;
1287
+ }
1288
+ export interface LiveboardParameter {
1289
+ applicability?: Applicability;
1290
+ [key: string]: any;
1291
+ }
1292
+ declare enum UIPassthroughEvent {
1293
+ PinAnswerToLiveboard = "addVizToPinboard",
1294
+ SaveAnswer = "saveAnswer",
1295
+ GetDiscoverabilityStatus = "getDiscoverabilityStatus",
1296
+ GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
1297
+ GetAnswerConfig = "getAnswerPageConfig",
1298
+ GetLiveboardConfig = "getPinboardPageConfig",
1299
+ GetUnsavedAnswerTML = "getUnsavedAnswerTML",
1300
+ UpdateFilters = "updateFilters",
1301
+ Drilldown = "drillDown",
1302
+ GetAnswerSession = "getAnswerSession",
1303
+ GetFilters = "getFilters",
1304
+ GetIframeUrl = "getIframeUrl",
1305
+ GetParameters = "getParameters",
1306
+ GetTML = "getTML",
1307
+ GetTabs = "getTabs",
1308
+ GetGroups = "getGroups",
1309
+ GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
1310
+ }
1311
+ /**
1312
+ * UI passthrough contract. Each event's request/response is a named interface so it
1313
+ * documents and imports cleanly; `UIPassthroughContractBase` maps events to the pairs.
1314
+ */
1315
+ /** Request for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
1316
+ export interface PinAnswerToLiveboardRequest {
1317
+ vizId?: string;
1318
+ newVizName: string;
1319
+ newVizDescription?: string;
1320
+ liveboardId?: string;
1321
+ tabId?: string;
1322
+ newLiveboardName?: string;
1323
+ newTabName?: string;
1324
+ }
1325
+ /** Response for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
1326
+ export interface PinAnswerToLiveboardResponse {
1327
+ liveboardId: string;
1328
+ tabId: string;
1329
+ vizId: string;
1330
+ }
1331
+ /** Request for {@link UIPassthroughEvent.SaveAnswer}. */
1332
+ export interface SaveAnswerRequest {
1333
+ name: string;
1334
+ description: string;
1335
+ vizId?: string;
1336
+ isDiscoverable?: boolean;
1337
+ }
1338
+ /** Response for {@link UIPassthroughEvent.SaveAnswer}. */
1339
+ export interface SaveAnswerResponse {
1340
+ answerId: string;
1341
+ saveResponse?: any;
1342
+ shareResponse?: any;
1343
+ }
1344
+ /** Response for {@link UIPassthroughEvent.GetDiscoverabilityStatus}. */
1345
+ export interface GetDiscoverabilityStatusResponse {
1346
+ shouldShowDiscoverability: boolean;
1347
+ isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
1348
+ }
1349
+ /** Response for {@link UIPassthroughEvent.GetAvailableUIPassthroughs}. */
1350
+ export interface GetAvailableUIPassthroughsResponse {
1351
+ keys: string[];
1352
+ }
1353
+ /** Request for {@link UIPassthroughEvent.GetAnswerConfig}. */
1354
+ export interface GetAnswerConfigRequest {
1355
+ vizId?: string;
1356
+ }
1357
+ /** Request for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
1358
+ export interface GetUnsavedAnswerTMLRequest {
1359
+ sessionId?: string;
1360
+ vizId?: string;
1361
+ }
1362
+ /** Response for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
1363
+ export interface GetUnsavedAnswerTMLResponse {
1364
+ tml: string;
1365
+ }
1366
+ /** Request for {@link UIPassthroughEvent.GetAnswerSession}. */
1367
+ export interface GetAnswerSessionRequest {
1368
+ vizId?: string;
1369
+ }
1370
+ /** Response for {@link UIPassthroughEvent.GetAnswerSession}. */
1371
+ export interface GetAnswerSessionResponse {
1372
+ session: SessionInterface;
1373
+ embedAnswerData?: Record<string, any>;
1374
+ }
1375
+ /** Request for {@link UIPassthroughEvent.GetFilters}. */
1376
+ export interface GetFiltersRequest {
1377
+ vizId?: string;
1378
+ }
1379
+ /** Response for {@link UIPassthroughEvent.GetFilters}. */
1380
+ export interface GetFiltersResponse {
1381
+ liveboardFilters: LiveboardFilter[];
1382
+ runtimeFilters: RuntimeFilter[];
1383
+ }
1384
+ /** Response for {@link UIPassthroughEvent.GetIframeUrl}. */
1385
+ export interface GetIframeUrlResponse {
1386
+ iframeUrl: string;
1387
+ }
1388
+ /** Response for {@link UIPassthroughEvent.GetParameters}. */
1389
+ export interface GetParametersResponse {
1390
+ parameters: LiveboardParameter[];
1391
+ }
1392
+ /** Request for {@link UIPassthroughEvent.GetTML}. */
1393
+ export interface GetTMLRequest {
1394
+ vizId?: string;
1395
+ includeNonExecutedSearchTokens?: boolean;
1396
+ }
1397
+ /** Response for {@link UIPassthroughEvent.GetTabs}. */
1398
+ export interface GetTabsResponse {
1399
+ orderedTabIds: string[];
1400
+ numberOfTabs: number;
1401
+ Tabs: LiveboardTab[];
1402
+ }
1403
+ /** Response for {@link UIPassthroughEvent.GetGroups}. */
1404
+ export interface GetGroupsResponse {
1405
+ orderedGroupIds: string[];
1406
+ numberOfGroups: number;
1407
+ Groups: LiveboardGroup[];
1408
+ }
1409
+ /** Response for {@link UIPassthroughEvent.GetExportRequestForCurrentPinboard}. */
1410
+ export interface GetExportRequestForCurrentPinboardResponse {
1411
+ data: {
1412
+ v2Content: string;
1413
+ };
1414
+ type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
1415
+ }
1416
+ /**
1417
+ * Request for {@link UIPassthroughEvent.UpdateFilters}. Not the host-event
1418
+ * `UpdateFiltersRequest` (host-event-contracts.ts), which has a different shape.
1419
+ */
1420
+ export interface UpdateFiltersPassthroughRequest {
1421
+ filter?: FilterUpdate;
1422
+ filters?: FilterUpdate[];
1423
+ }
1424
+ /** Request for {@link UIPassthroughEvent.Drilldown}. */
1425
+ export interface DrilldownRequest {
1426
+ points: {
1427
+ selectedPoints?: string[];
1428
+ clickedPoint?: string;
1429
+ };
1430
+ columnGuid?: string;
1431
+ autoDrillDown?: boolean;
1432
+ vizId?: string;
1433
+ }
1434
+ /** Maps each UI passthrough event to its request/response pair. */
1435
+ export type UIPassthroughContractBase = {
1436
+ [UIPassthroughEvent.PinAnswerToLiveboard]: {
1437
+ request: PinAnswerToLiveboardRequest;
1438
+ response: PinAnswerToLiveboardResponse;
1439
+ };
1440
+ [UIPassthroughEvent.SaveAnswer]: {
1441
+ request: SaveAnswerRequest;
1442
+ response: SaveAnswerResponse;
1443
+ };
1444
+ [UIPassthroughEvent.GetDiscoverabilityStatus]: {
1445
+ request: any;
1446
+ response: GetDiscoverabilityStatusResponse;
1447
+ };
1448
+ [UIPassthroughEvent.GetAvailableUIPassthroughs]: {
1449
+ request: any;
1450
+ response: GetAvailableUIPassthroughsResponse;
1451
+ };
1452
+ [UIPassthroughEvent.GetAnswerConfig]: {
1453
+ request: GetAnswerConfigRequest;
1454
+ response: any;
1455
+ };
1456
+ [UIPassthroughEvent.GetLiveboardConfig]: {
1457
+ request: any;
1458
+ response: any;
1459
+ };
1460
+ [UIPassthroughEvent.GetUnsavedAnswerTML]: {
1461
+ request: GetUnsavedAnswerTMLRequest;
1462
+ response: GetUnsavedAnswerTMLResponse;
1463
+ };
1464
+ [UIPassthroughEvent.GetAnswerSession]: {
1465
+ request: GetAnswerSessionRequest;
1466
+ response: GetAnswerSessionResponse;
1467
+ };
1468
+ [UIPassthroughEvent.GetFilters]: {
1469
+ request: GetFiltersRequest;
1470
+ response: GetFiltersResponse;
1471
+ };
1472
+ [UIPassthroughEvent.GetIframeUrl]: {
1473
+ request: Record<string, never>;
1474
+ response: GetIframeUrlResponse;
1475
+ };
1476
+ [UIPassthroughEvent.GetParameters]: {
1477
+ request: Record<string, never>;
1478
+ response: GetParametersResponse;
1479
+ };
1480
+ [UIPassthroughEvent.GetTML]: {
1481
+ request: GetTMLRequest;
1482
+ response: Record<string, any>;
1483
+ };
1484
+ [UIPassthroughEvent.GetTabs]: {
1485
+ request: Record<string, never>;
1486
+ response: GetTabsResponse;
1487
+ };
1488
+ [UIPassthroughEvent.GetGroups]: {
1489
+ request: Record<string, never>;
1490
+ response: GetGroupsResponse;
1491
+ };
1492
+ [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
1493
+ request: Record<string, never>;
1494
+ response: GetExportRequestForCurrentPinboardResponse;
1495
+ };
1496
+ [UIPassthroughEvent.UpdateFilters]: {
1497
+ request: UpdateFiltersPassthroughRequest;
1498
+ response: unknown;
1499
+ };
1500
+ [UIPassthroughEvent.Drilldown]: {
1501
+ request: DrilldownRequest;
1502
+ response: unknown;
1503
+ };
1504
+ };
1505
+ export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
1506
+ export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
1507
+ export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
1508
+ refId?: string;
1509
+ value?: UIPassthroughResponse<ApiName>;
1510
+ error?: any;
1511
+ }>;
1512
+ export type EmbedApiHostEventMapping = {
1513
+ [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
1514
+ [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
1515
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
1516
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
1517
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
1518
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
1519
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
1520
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
1521
+ [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
1522
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
1523
+ };
1253
1524
  declare enum AuthType {
1254
1525
  /**
1255
1526
  * No authentication on the SDK. Pass-through to the embedded App. Alias for
@@ -3664,6 +3935,15 @@ export interface RuntimeParameter {
3664
3935
  * Values
3665
3936
  */
3666
3937
  value: number | boolean | string;
3938
+ /**
3939
+ * Whether the parameter is visible to the user (`UpdateParameters` only).
3940
+ */
3941
+ isVisibleToUser?: boolean;
3942
+ /**
3943
+ * Scope of the update (`UpdateParameters` only). Omitting it, or `level`,
3944
+ * targets the Liveboard level.
3945
+ */
3946
+ applicability?: Applicability;
3667
3947
  }
3668
3948
  /**
3669
3949
  * Event types emitted by the embedded ThoughtSpot application.
@@ -4115,6 +4395,9 @@ export declare enum EmbedEvent {
4115
4395
  Download = "download",
4116
4396
  /**
4117
4397
  * Emitted when the download action is triggered on an Answer.
4398
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4399
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4400
+ * accepts the union now; per-context enforced next release.
4118
4401
  * Use start:true to subscribe to when download is initiated, or end:true to
4119
4402
  * subscribe to when download is completed. Default is end:true.
4120
4403
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
@@ -4131,6 +4414,9 @@ export declare enum EmbedEvent {
4131
4414
  DownloadAsPng = "downloadAsPng",
4132
4415
  /**
4133
4416
  * Emitted when the Download as PDF action is triggered on an Answer
4417
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
4418
+ * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
4419
+ * accepts the union now; per-context enforced next release.
4134
4420
  * Use start:true to subscribe to when download as PDF is initiated, or end:true to
4135
4421
  * subscribe to when download as PDF is completed. Default is end:true.
4136
4422
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4147,6 +4433,9 @@ export declare enum EmbedEvent {
4147
4433
  DownloadAsPdf = "downloadAsPdf",
4148
4434
  /**
4149
4435
  * Emitted when the Download as CSV action is triggered on an Answer.
4436
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4437
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4438
+ * accepts the union now; per-context enforced next release.
4150
4439
  * Use start:true to subscribe to when download as CSV is initiated, or end:true to
4151
4440
  * subscribe to when download as CSV is completed. Default is end:true.
4152
4441
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4163,6 +4452,9 @@ export declare enum EmbedEvent {
4163
4452
  DownloadAsCsv = "downloadAsCsv",
4164
4453
  /**
4165
4454
  * Emitted when the Download as XLSX action is triggered on an Answer.
4455
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4456
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4457
+ * accepts the union now; per-context enforced next release.
4166
4458
  * Use start:true to subscribe to when download as XLSX is initiated, or end:true to
4167
4459
  * subscribe to when download as XLSX is completed. Default is end:true.
4168
4460
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4441,6 +4733,9 @@ export declare enum EmbedEvent {
4441
4733
  Schedule = "subscription",
4442
4734
  /**
4443
4735
  * Emitted when a user clicks **Edit** on a Liveboard or visualization
4736
+ * Payload varies by context: {@link VizScopedRequest} (Liveboard),
4737
+ * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
4738
+ * union now; per-context enforced next release.
4444
4739
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4445
4740
  * @example
4446
4741
  * ```js
@@ -5519,6 +5814,7 @@ export declare enum HostEvent {
5519
5814
  * the search query string.
5520
5815
  * Supported in `AppEmbed` and `SearchEmbed` deployments.
5521
5816
  * Includes the following properties:
5817
+ * Payload: {@link SearchRequest}.
5522
5818
  * @param - Includes the following keys:
5523
5819
  * - `searchQuery`: Query string with search tokens.
5524
5820
  * - `dataSources`: Data source GUID to search on.
@@ -5546,6 +5842,9 @@ export declare enum HostEvent {
5546
5842
  Search = "search",
5547
5843
  /**
5548
5844
  * Triggers a drill on certain points of the specified column
5845
+ * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
5846
+ * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
5847
+ * enforced next release.
5549
5848
  * Includes the following properties:
5550
5849
  * @param - Includes the following keys:
5551
5850
  * - `points`: An object containing `selectedPoints` and/or `clickedPoint`
@@ -5625,6 +5924,8 @@ export declare enum HostEvent {
5625
5924
  Reload = "reload",
5626
5925
  /**
5627
5926
  * Get iframe URL for the current embed view.
5927
+ * Payload: none.
5928
+ * Response: {@link GetIframeUrlResponse}.
5628
5929
  * @example
5629
5930
  * ```js
5630
5931
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -5643,6 +5944,7 @@ export declare enum HostEvent {
5643
5944
  GetIframeUrl = "GetIframeUrl",
5644
5945
  /**
5645
5946
  * Display specific visualizations on a Liveboard.
5947
+ * Payload: `string[]`.
5646
5948
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
5647
5949
  * in this parameter will be hidden.
5648
5950
  * @example
@@ -5665,6 +5967,7 @@ export declare enum HostEvent {
5665
5967
  SetVisibleVizs = "SetPinboardVisibleVizs",
5666
5968
  /**
5667
5969
  * Set a Liveboard tab as an active tab.
5970
+ * Payload: {@link SetActiveTabRequest}.
5668
5971
  * @param - tabId - string of id of Tab to show
5669
5972
  * @example
5670
5973
  * ```js
@@ -5692,6 +5995,7 @@ export declare enum HostEvent {
5692
5995
  * and `AppEmbed` only. In full application embedding, this event updates
5693
5996
  * the runtime filters applied on the Liveboard and saved Answer objects.
5694
5997
  *
5998
+ * Payload: {@link RuntimeFilter}[].
5695
5999
  * @param - Array of {@link RuntimeFilter} objects. Each item includes:
5696
6000
  * - `columnName`: Name of the column to filter on.
5697
6001
  * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
@@ -5733,6 +6037,7 @@ export declare enum HostEvent {
5733
6037
  * Accepts either a plain value or an object with `path`
5734
6038
  * and an optional `replace` flag.
5735
6039
  *
6040
+ * Payload: `string` | `number` | {@link NavigateRequest}.
5736
6041
  * @param data - A string path, a numeric history delta, or an object
5737
6042
  * `{ path: string | number, replace?: boolean }`.
5738
6043
  * - `path` — the route to navigate to, or a history delta such as `1`
@@ -5760,6 +6065,9 @@ export declare enum HostEvent {
5760
6065
  /**
5761
6066
  * Open the filter panel for a particular column.
5762
6067
  * Works with Search and Liveboard embed.
6068
+ * Payload: {@link OpenFilterRequest} (the cross-context superset). The
6069
+ * accepted fields vary by context: {@link OpenFilterLiveboardRequest},
6070
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
5763
6071
  * @param - { columnId: string,
5764
6072
  * name: string,
5765
6073
  * type: ATTRIBUTE/MEASURE,
@@ -5842,6 +6150,7 @@ export declare enum HostEvent {
5842
6150
  /**
5843
6151
  * Open the parameter panel for a particular parameter on a Liveboard.
5844
6152
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
6153
+ * Payload: {@link OpenParameterRequest}.
5845
6154
  * @param - Includes the following keys:
5846
6155
  * - `parameter`: An object identifying the parameter to open, for
5847
6156
  * example, `{ parameterId: '<parameter-GUID>' }`.
@@ -5873,6 +6182,7 @@ export declare enum HostEvent {
5873
6182
  OpenParameter = "openParameter",
5874
6183
  /**
5875
6184
  * Add columns to the current search query.
6185
+ * Payload: `{ columnIds: string[] }`.
5876
6186
  * @param - { columnIds: string[] }
5877
6187
  * @example
5878
6188
  * ```js
@@ -5891,6 +6201,7 @@ export declare enum HostEvent {
5891
6201
  AddColumns = "addColumns",
5892
6202
  /**
5893
6203
  * Remove a column from the current search query.
6204
+ * Payload: `{ columnId: string }`.
5894
6205
  * @param - { columnId: string }
5895
6206
  * @example
5896
6207
  * ```js
@@ -5915,6 +6226,8 @@ export declare enum HostEvent {
5915
6226
  * sorting, toggling of legends, and data drill down.
5916
6227
  * For more information, see
5917
6228
  * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
6229
+ * Payload: none.
6230
+ * Response: {@link GetExportRequestForCurrentPinboardResponse}.
5918
6231
  * @example
5919
6232
  * ```js
5920
6233
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
@@ -5936,6 +6249,8 @@ export declare enum HostEvent {
5936
6249
  * requiring additional user input via the *Pin to Liveboard* modal, define
5937
6250
  * the following parameters:
5938
6251
  *
6252
+ * Payload: {@link PinAnswerToLiveboardRequest}.
6253
+ * Response: {@link PinAnswerToLiveboardResponse}.
5939
6254
  * @param - Includes the following keys:
5940
6255
  * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
5941
6256
  * Liveboard.
@@ -6050,6 +6365,7 @@ export declare enum HostEvent {
6050
6365
  LiveboardInfo = "pinboardInfo",
6051
6366
  /**
6052
6367
  * Trigger the **Schedule** action on an embedded Liveboard.
6368
+ * Payload: {@link VizScopedRequest}.
6053
6369
  * @example
6054
6370
  * ```js
6055
6371
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -6065,6 +6381,7 @@ export declare enum HostEvent {
6065
6381
  Schedule = "subscription",
6066
6382
  /**
6067
6383
  * Trigger the **Manage schedule** action on an embedded Liveboard
6384
+ * Payload: {@link VizScopedRequest}.
6068
6385
  * @example
6069
6386
  * ```js
6070
6387
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
@@ -6081,6 +6398,7 @@ export declare enum HostEvent {
6081
6398
  /**
6082
6399
  * Trigger the **Export TML** action on an embedded Liveboard or
6083
6400
  * Answer.
6401
+ * Payload: {@link VizScopedRequest}.
6084
6402
  * @example
6085
6403
  * ```js
6086
6404
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -6103,6 +6421,7 @@ export declare enum HostEvent {
6103
6421
  /**
6104
6422
  * Trigger the **Edit TML** action on an embedded Liveboard or
6105
6423
  * saved Answers in the full application embedding.
6424
+ * Payload: {@link VizScopedRequest}.
6106
6425
  * @example
6107
6426
  * ```js
6108
6427
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -6124,6 +6443,7 @@ export declare enum HostEvent {
6124
6443
  EditTML = "editTSL",
6125
6444
  /**
6126
6445
  * Trigger the **Update TML** action on an embedded Liveboard.
6446
+ * Payload: {@link VizScopedRequest}.
6127
6447
  * @example
6128
6448
  * ```js
6129
6449
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -6141,6 +6461,7 @@ export declare enum HostEvent {
6141
6461
  * Trigger the **Download PDF** action on an embedded Liveboard,
6142
6462
  * visualization or Answer.
6143
6463
  *
6464
+ * Payload: {@link VizScopedRequest} plus optional `liveboardId`.
6144
6465
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
6145
6466
  *
6146
6467
  * **NOTE**: The **Download** > **PDF** action is available on
@@ -6191,6 +6512,7 @@ export declare enum HostEvent {
6191
6512
  /**
6192
6513
  * Trigger the **AI Highlights** action on an embedded Liveboard
6193
6514
  *
6515
+ * Payload: none.
6194
6516
  * @example
6195
6517
  * ```js
6196
6518
  * liveboardEmbed.trigger(HostEvent.AIHighlights)
@@ -6245,6 +6567,9 @@ export declare enum HostEvent {
6245
6567
  MakeACopy = "makeACopy",
6246
6568
  /**
6247
6569
  * Trigger the **Delete** action for a Liveboard.
6570
+ * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
6571
+ * required), {@link VizScopedRequest} (Search). trigger() accepts the union
6572
+ * now; per-context enforced next release.
6248
6573
  * @example
6249
6574
  * ```js
6250
6575
  * appEmbed.trigger(HostEvent.Remove)
@@ -6259,6 +6584,7 @@ export declare enum HostEvent {
6259
6584
  Remove = "delete",
6260
6585
  /**
6261
6586
  * Trigger the **Explore** action on a visualization.
6587
+ * Payload: {@link RequiredVizRequest}.
6262
6588
  * @param - an object with `vizId` as a key
6263
6589
  * @example
6264
6590
  * ```js
@@ -6278,6 +6604,7 @@ export declare enum HostEvent {
6278
6604
  /**
6279
6605
  * Trigger the **Create alert** action on a KPI chart
6280
6606
  * in a Liveboard or saved Answer.
6607
+ * Payload: {@link VizScopedRequest}.
6281
6608
  * @param - an object with `vizId` as a key
6282
6609
  * @example
6283
6610
  * ```js
@@ -6309,6 +6636,7 @@ export declare enum HostEvent {
6309
6636
  /**
6310
6637
  * Trigger the **Manage alerts** action on a KPI chart
6311
6638
  * in a visualization or saved Answer.
6639
+ * Payload: {@link VizScopedRequest}.
6312
6640
  * @param - an object with `vizId` as a key
6313
6641
  * @example
6314
6642
  * ```js
@@ -6346,6 +6674,7 @@ export declare enum HostEvent {
6346
6674
  * on a Liveboard.
6347
6675
  *
6348
6676
  * This event is not supported in visualization embed and search embed.
6677
+ * Payload: {@link VizScopedRequest}.
6349
6678
  * @param - Object parameter. Includes the following keys:
6350
6679
  * - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
6351
6680
  * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
@@ -6388,6 +6717,7 @@ export declare enum HostEvent {
6388
6717
  Edit = "edit",
6389
6718
  /**
6390
6719
  * Trigger the **Copy link** action on a Liveboard or visualization
6720
+ * Payload: {@link VizScopedRequest}.
6391
6721
  * @param - object - to trigger the action for a
6392
6722
  * specific visualization in Liveboard embed, pass in `vizId` as a key
6393
6723
  * @example
@@ -6433,6 +6763,7 @@ export declare enum HostEvent {
6433
6763
  CopyLink = "embedDocument",
6434
6764
  /**
6435
6765
  * Trigger the **Present** action on a Liveboard or visualization
6766
+ * Payload: {@link VizScopedRequest}.
6436
6767
  * @param - object - to trigger the action for a specific visualization
6437
6768
  * in Liveboard embed, pass in `vizId` as a key
6438
6769
  * @example
@@ -6478,6 +6809,8 @@ export declare enum HostEvent {
6478
6809
  Present = "present",
6479
6810
  /**
6480
6811
  * Get TML for the current search.
6812
+ * Payload: {@link GetTMLRequest}.
6813
+ * Response: `Record<string, any>`.
6481
6814
  * @example
6482
6815
  * ```js
6483
6816
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
@@ -6527,6 +6860,7 @@ export declare enum HostEvent {
6527
6860
  * Trigger the **Show underlying data** action on a
6528
6861
  * chart or table.
6529
6862
  *
6863
+ * Payload: {@link VizScopedRequest}.
6530
6864
  * @param - an object with vizId as a key
6531
6865
  * @example
6532
6866
  * ```js
@@ -6560,6 +6894,7 @@ export declare enum HostEvent {
6560
6894
  * Trigger the **Delete** action for a visualization
6561
6895
  * in an embedded Liveboard, or a chart or table
6562
6896
  * generated from Search.
6897
+ * Payload: {@link VizScopedRequest}.
6563
6898
  * @param - Liveboard embed takes an object with `vizId` as a key.
6564
6899
  * Can be left empty if embedding Search or visualization.
6565
6900
  * @example
@@ -6588,6 +6923,7 @@ export declare enum HostEvent {
6588
6923
  /**
6589
6924
  * Trigger the **SpotIQ analyze** action on a
6590
6925
  * chart or table.
6926
+ * Payload: {@link VizScopedRequest}.
6591
6927
  * @param - Liveboard embed takes `vizId` as a
6592
6928
  * key. Can be left undefined when embedding Search or
6593
6929
  * visualization.
@@ -6650,6 +6986,7 @@ export declare enum HostEvent {
6650
6986
  /**
6651
6987
  * Trigger the **Download** > **PNG** action on
6652
6988
  * charts in the embedded view.
6989
+ * Payload: {@link VizScopedRequest}.
6653
6990
  * @example
6654
6991
  * ```js
6655
6992
  * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
@@ -6680,6 +7017,7 @@ export declare enum HostEvent {
6680
7017
  /**
6681
7018
  * Trigger the **Download** > **CSV** action on tables in
6682
7019
  * the embedded view.
7020
+ * Payload: {@link VizScopedRequest}.
6683
7021
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
6684
7022
  * @example
6685
7023
  * ```js
@@ -6719,6 +7057,7 @@ export declare enum HostEvent {
6719
7057
  /**
6720
7058
  * Trigger the **Download** > **XLSX** action on tables
6721
7059
  * in the embedded view.
7060
+ * Payload: {@link VizScopedRequest}.
6722
7061
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
6723
7062
  * @example
6724
7063
  * ```js
@@ -6758,6 +7097,7 @@ export declare enum HostEvent {
6758
7097
  /**
6759
7098
  * Trigger the **Share** action on an embedded
6760
7099
  * Liveboard or Answer.
7100
+ * Payload: {@link VizScopedRequest}.
6761
7101
  * @example
6762
7102
  * ```js
6763
7103
  * liveboardEmbed.trigger(HostEvent.Share)
@@ -6784,6 +7124,7 @@ export declare enum HostEvent {
6784
7124
  * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
6785
7125
  * Saves the changes.
6786
7126
  *
7127
+ * Payload: {@link VizScopedRequest}.
6787
7128
  * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
6788
7129
  * It is required and can be retrieved from the data embed event.
6789
7130
  *
@@ -6835,6 +7176,7 @@ export declare enum HostEvent {
6835
7176
  /**
6836
7177
  * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
6837
7178
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
7179
+ * Payload: {@link VizScopedRequest}.
6838
7180
  * @param - an object with `vizId` as a key
6839
7181
  * @example
6840
7182
  * ```js
@@ -6865,6 +7207,7 @@ export declare enum HostEvent {
6865
7207
  * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
6866
7208
  * Sends data from an Answer or Liveboard visualization to third-party apps such
6867
7209
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
7210
+ * Payload: {@link VizScopedRequest}.
6868
7211
  * @param - an object with vizId as a key
6869
7212
  * @example
6870
7213
  * ```js
@@ -6895,6 +7238,7 @@ export declare enum HostEvent {
6895
7238
  * Trigger the **Manage pipelines** action on an embedded
6896
7239
  * visualization or Answer.
6897
7240
  * Allows users to manage ThoughtSpot Sync pipelines.
7241
+ * Payload: {@link VizScopedRequest}.
6898
7242
  * @param - an object with `vizId` as a key
6899
7243
  * @example
6900
7244
  * ```js
@@ -6923,6 +7267,7 @@ export declare enum HostEvent {
6923
7267
  ManagePipelines = "manage-pipeline",
6924
7268
  /**
6925
7269
  * Reset search operation on the Search or Answer page.
7270
+ * Payload: none.
6926
7271
  * @example
6927
7272
  * ```js
6928
7273
  * searchEmbed.trigger(HostEvent.ResetSearch)
@@ -6950,10 +7295,18 @@ export declare enum HostEvent {
6950
7295
  * whole Liveboard.
6951
7296
  * The `applicability` attribute is available from SDK: 1.53.0 |
6952
7297
  * ThoughtSpot: 26.10.0.cl.
7298
+ * Payload: {@link GetFiltersRequest}.
7299
+ * Response: {@link GetFiltersResponse}.
6953
7300
  * @example
6954
7301
  * ```js
6955
7302
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
6956
7303
  * console.log('data', data);
7304
+ * // {
7305
+ * // liveboardFilters: [ ... ],
7306
+ * // runtimeFilters: [
7307
+ * // { columnName: "Region", operator: "IN", values: ["West"] }
7308
+ * // ]
7309
+ * // }
6957
7310
  * ```
6958
7311
  * @example
6959
7312
  * ```js
@@ -6969,6 +7322,7 @@ export declare enum HostEvent {
6969
7322
  GetFilters = "getFilters",
6970
7323
  /**
6971
7324
  * Update one or several filters applied on a Liveboard.
7325
+ * Payload: {@link UpdateFiltersRequest}.
6972
7326
  * @param - Includes the following keys:
6973
7327
  * - `filter`: A single filter object containing column name, filter operator, and
6974
7328
  * values.
@@ -6977,9 +7331,9 @@ export declare enum HostEvent {
6977
7331
  *
6978
7332
  * Each filter object must include the following attributes:
6979
7333
  *
6980
- * `column` - Name of the column to filter on.
7334
+ * `columnName` - Name of the column to filter on.
6981
7335
  *
6982
- * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
7336
+ * `operator` - Filter operator, for example, EQ, IN, CONTAINS.
6983
7337
  * For information about the supported filter operators,
6984
7338
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
6985
7339
  *
@@ -7006,8 +7360,8 @@ export declare enum HostEvent {
7006
7360
  *
7007
7361
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7008
7362
  * filter: {
7009
- * column: "item type",
7010
- * oper: "IN",
7363
+ * columnName: "item type",
7364
+ * operator: "IN",
7011
7365
  * values: ["bags","shirts"]
7012
7366
  * }
7013
7367
  * });
@@ -7017,8 +7371,8 @@ export declare enum HostEvent {
7017
7371
  *
7018
7372
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7019
7373
  * filter: {
7020
- * column: "date",
7021
- * oper: "EQ",
7374
+ * columnName: "date",
7375
+ * operator: "EQ",
7022
7376
  * values: ["JULY","2023"],
7023
7377
  * type: "MONTH_YEAR"
7024
7378
  * }
@@ -7029,18 +7383,18 @@ export declare enum HostEvent {
7029
7383
  * ```js
7030
7384
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7031
7385
  * filters: [{
7032
- * column: "Item Type",
7033
- * oper: 'IN',
7386
+ * columnName: "Item Type",
7387
+ * operator: 'IN',
7034
7388
  * values: ["bags","shirts"]
7035
7389
  * },
7036
7390
  * {
7037
- * column: "Region",
7038
- * oper: 'IN',
7391
+ * columnName: "Region",
7392
+ * operator: 'IN',
7039
7393
  * values: ["West","Midwest"]
7040
7394
  * },
7041
7395
  * {
7042
- * column: "Date",
7043
- * oper: 'EQ',
7396
+ * columnName: "Date",
7397
+ * operator: 'EQ',
7044
7398
  * values: ["2023-07-31"],
7045
7399
  * type: "EXACT_DATE"
7046
7400
  * }]
@@ -7054,13 +7408,13 @@ export declare enum HostEvent {
7054
7408
  * ```js
7055
7409
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7056
7410
  * filters: [{
7057
- * column: "(Sample) Retail - Apparel::city",
7058
- * oper: 'IN',
7411
+ * columnName: "(Sample) Retail - Apparel::city",
7412
+ * operator: 'IN',
7059
7413
  * values: ["atlanta"]
7060
7414
  * },
7061
7415
  * {
7062
- * column: "(Sample) Retail - Apparel::Region",
7063
- * oper: 'IN',
7416
+ * columnName: "(Sample) Retail - Apparel::Region",
7417
+ * operator: 'IN',
7064
7418
  * values: ["West","Midwest"]
7065
7419
  * }]
7066
7420
  * });
@@ -7071,8 +7425,8 @@ export declare enum HostEvent {
7071
7425
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
7072
7426
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7073
7427
  * filter: {
7074
- * column: "item type",
7075
- * oper: "IN",
7428
+ * columnName: "item type",
7429
+ * operator: "IN",
7076
7430
  * values: ["shoes", "boots"]
7077
7431
  * }
7078
7432
  * }, ContextType.Liveboard);
@@ -7082,8 +7436,8 @@ export declare enum HostEvent {
7082
7436
  * // Scope the filter to a specific Liveboard tab
7083
7437
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7084
7438
  * filter: {
7085
- * column: "item type",
7086
- * oper: "IN",
7439
+ * columnName: "item type",
7440
+ * operator: "IN",
7087
7441
  * values: ["bags", "shirts"],
7088
7442
  * applicability: {
7089
7443
  * level: "TAB",
@@ -7092,11 +7446,19 @@ export declare enum HostEvent {
7092
7446
  * }
7093
7447
  * });
7094
7448
  * ```
7449
+ * Use `columnName` and `operator` - the same spelling as
7450
+ * {@link RuntimeFilter}. The older `column` and `oper` spellings are
7451
+ * deprecated; they are still accepted, but pass only one spelling of each
7452
+ * field, never both. To reapply the filter state captured from
7453
+ * {@link EmbedEvent.FilterChanged}, use `convertFilterChangedToUpdateFiltersPayload`
7454
+ * to convert its payload into the shape expected here.
7095
7455
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
7096
7456
  */
7097
7457
  UpdateFilters = "updateFilters",
7098
7458
  /**
7099
7459
  * Get tab details for the current Liveboard.
7460
+ * Payload: none.
7461
+ * Response: {@link GetTabsResponse}.
7100
7462
  * @example
7101
7463
  * ```js
7102
7464
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -7122,6 +7484,8 @@ export declare enum HostEvent {
7122
7484
  /**
7123
7485
  * Get group details for the current Liveboard.
7124
7486
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
7487
+ * Payload: none.
7488
+ * Response: {@link GetGroupsResponse}.
7125
7489
  * @example
7126
7490
  * ```js
7127
7491
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -7146,6 +7510,7 @@ export declare enum HostEvent {
7146
7510
  GetGroups = "getGroups",
7147
7511
  /**
7148
7512
  * Set the visible tabs on a Liveboard.
7513
+ * Payload: `string[]`.
7149
7514
  * @param - an array of ids of tabs to show, the IDs not passed
7150
7515
  * will be hidden.
7151
7516
  * @example
@@ -7168,6 +7533,7 @@ export declare enum HostEvent {
7168
7533
  SetVisibleTabs = "SetPinboardVisibleTabs",
7169
7534
  /**
7170
7535
  * Set the hidden tabs on a Liveboard.
7536
+ * Payload: `string[]`.
7171
7537
  * @param - an array of the IDs of the tabs to hide.
7172
7538
  * The IDs not passed will be shown.
7173
7539
  * @example
@@ -7196,6 +7562,8 @@ export declare enum HostEvent {
7196
7562
  * `getAnswerService()` method on the embed instance to get an AnswerService
7197
7563
  * object that provides a more convenient interface for working with answers.
7198
7564
  *
7565
+ * Payload: {@link GetAnswerSessionRequest}.
7566
+ * Response: {@link GetAnswerSessionResponse}.
7199
7567
  * @example
7200
7568
  * ```js
7201
7569
  * // Preferred way to get an AnswerService
@@ -7223,6 +7591,7 @@ export declare enum HostEvent {
7223
7591
  GetAnswerSession = "getAnswerSession",
7224
7592
  /**
7225
7593
  * Trigger the *Ask Sage* action for visualizations
7594
+ * Payload: {@link RequiredVizRequest}.
7226
7595
  * @example
7227
7596
  * ```js
7228
7597
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -7234,6 +7603,7 @@ export declare enum HostEvent {
7234
7603
  /**
7235
7604
  * Trigger cross filter update action on a Liveboard.
7236
7605
  *
7606
+ * Payload: {@link UpdateCrossFilterRequest}.
7237
7607
  * @example
7238
7608
  * ```js
7239
7609
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -7249,7 +7619,9 @@ export declare enum HostEvent {
7249
7619
  UpdateCrossFilter = "UpdateCrossFilter",
7250
7620
  /**
7251
7621
  * Trigger reset action for a personalized Liveboard view.
7252
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7622
+ * This event is deprecated.
7623
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7624
+ * Payload: none.
7253
7625
  * @example
7254
7626
  * ```js
7255
7627
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -7270,6 +7642,7 @@ export declare enum HostEvent {
7270
7642
  /**
7271
7643
  * Triggers an action to update Parameter values on embedded
7272
7644
  * Answers, Liveboard, and Spotter answer in Edit mode.
7645
+ * Payload: {@link RuntimeParameter}[].
7273
7646
  * @param - Includes the following keys for each item:
7274
7647
  * - `name`: Name of the parameter.
7275
7648
  * - `value`: The value to set for the parameter.
@@ -7327,6 +7700,8 @@ export declare enum HostEvent {
7327
7700
  * whole Liveboard.
7328
7701
  * The `applicability` attribute is available from SDK: 1.53.0 |
7329
7702
  * ThoughtSpot: 26.10.0.cl.
7703
+ * Payload: none.
7704
+ * Response: {@link GetParametersResponse}.
7330
7705
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
7331
7706
  * ```js
7332
7707
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -7364,6 +7739,7 @@ export declare enum HostEvent {
7364
7739
  * ```js
7365
7740
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
7366
7741
  * ```
7742
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
7367
7743
  * @example
7368
7744
  * ```js
7369
7745
  * // Update personalized view from liveboard context
@@ -7396,6 +7772,7 @@ export declare enum HostEvent {
7396
7772
  * If neither is provided, the Liveboard resets to the original/default view.
7397
7773
  * When a `viewName` is provided and multiple views share
7398
7774
  * the same name, the first match is selected.
7775
+ * Payload: {@link PersonalisedViewRequest}.
7399
7776
  * @example
7400
7777
  * ```js
7401
7778
  * liveboardEmbed.trigger(
@@ -7439,6 +7816,8 @@ export declare enum HostEvent {
7439
7816
  * If no parameters are specified, the save action is
7440
7817
  * triggered with a modal to prompt users to
7441
7818
  * add a name and description for the Answer.
7819
+ * Payload: {@link SaveAnswerRequest}.
7820
+ * Response: {@link SaveAnswerResponse}.
7442
7821
  * @param - Includes the following keys:
7443
7822
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
7444
7823
  * embed.
@@ -7524,6 +7903,7 @@ export declare enum HostEvent {
7524
7903
  /**
7525
7904
  * Triggers a search operation with the search tokens specified in
7526
7905
  * the search query string in spotter embed.
7906
+ * Payload: {@link SpotterSearchRequest}.
7527
7907
  * @param - Includes the following keys:
7528
7908
  * - `query`: Text string in Natural Language format.
7529
7909
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -7548,6 +7928,7 @@ export declare enum HostEvent {
7548
7928
  SpotterSearch = "SpotterSearch",
7549
7929
  /**
7550
7930
  * Edits the last prompt in spotter embed.
7931
+ * Payload: `string`.
7551
7932
  * @param - `query`: Text string
7552
7933
  * @example
7553
7934
  * ```js
@@ -7564,6 +7945,7 @@ export declare enum HostEvent {
7564
7945
  EditLastPrompt = "EditLastPrompt",
7565
7946
  /**
7566
7947
  * Opens the data source preview modal in Spotter Embed.
7948
+ * Payload: none.
7567
7949
  * @example
7568
7950
  * ```js
7569
7951
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -7599,6 +7981,7 @@ export declare enum HostEvent {
7599
7981
  DataModelInstructions = "DataModelInstructions",
7600
7982
  /**
7601
7983
  * Resets the Spotter Embed Conversation.
7984
+ * Payload: none.
7602
7985
  * @example
7603
7986
  * ```js
7604
7987
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -7611,6 +7994,7 @@ export declare enum HostEvent {
7611
7994
  * `conversationId` is **mandatory** — you must pass the id of the
7612
7995
  * conversation to share. Also no-op when sharing is disabled
7613
7996
  * (enableShareConversation off) or when already in the read-only shared view.
7997
+ * Payload: {@link ConversationScopedRequest}.
7614
7998
  * @example
7615
7999
  * ```js
7616
8000
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -7620,6 +8004,7 @@ export declare enum HostEvent {
7620
8004
  ShareSpotterConversation = "ShareSpotterConversation",
7621
8005
  /**
7622
8006
  * Closes the Spotter share-conversation modal. No-op if none is open.
8007
+ * Payload: none.
7623
8008
  * @example
7624
8009
  * ```js
7625
8010
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -7629,6 +8014,7 @@ export declare enum HostEvent {
7629
8014
  CloseSpotterShareConversation = "CloseSpotterShareConversation",
7630
8015
  /**
7631
8016
  * Exits the read-only shared-conversation view.
8017
+ * Payload: none.
7632
8018
  * @example
7633
8019
  * ```js
7634
8020
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -7638,6 +8024,7 @@ export declare enum HostEvent {
7638
8024
  ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
7639
8025
  /**
7640
8026
  * Deletes the last prompt in spotter embed.
8027
+ * Payload: none.
7641
8028
  * @example
7642
8029
  * ```js
7643
8030
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -7647,6 +8034,7 @@ export declare enum HostEvent {
7647
8034
  DeleteLastPrompt = "DeleteLastPrompt",
7648
8035
  /**
7649
8036
  * Toggle the visualization to chart or table view.
8037
+ * Payload: {@link RequiredVizRequest}.
7650
8038
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
7651
8039
  * @example
7652
8040
  * ```js
@@ -7685,6 +8073,7 @@ export declare enum HostEvent {
7685
8073
  VisibleEmbedCoordinates = "visibleEmbedCoordinates",
7686
8074
  /**
7687
8075
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
8076
+ * Payload: {@link RequiredVizRequest}.
7688
8077
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
7689
8078
  * @example
7690
8079
  * ```js
@@ -7746,6 +8135,7 @@ export declare enum HostEvent {
7746
8135
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7747
8136
  * instance.
7748
8137
  *
8138
+ * Payload: {@link ConversationScopedRequest}.
7749
8139
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7750
8140
  * @example
7751
8141
  * ```js
@@ -7763,6 +8153,7 @@ export declare enum HostEvent {
7763
8153
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7764
8154
  * instance.
7765
8155
  *
8156
+ * Payload: {@link ConversationScopedRequest}.
7766
8157
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7767
8158
  * @example
7768
8159
  * ```js
@@ -7787,6 +8178,7 @@ export declare enum HostEvent {
7787
8178
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
7788
8179
  * Sends a test schedule email to self or all recipients.
7789
8180
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
8181
+ * Payload: {@link ScheduleEmailRequest}.
7790
8182
  * @example
7791
8183
  * ```js
7792
8184
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -7805,6 +8197,7 @@ export declare enum HostEvent {
7805
8197
  SendTestScheduleEmail = "sendTestScheduleEmail",
7806
8198
  /**
7807
8199
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
8200
+ * Payload: `{ query: string }`.
7808
8201
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7809
8202
  * @param query - the prompt text to send.
7810
8203
  * @example
@@ -7817,6 +8210,7 @@ export declare enum HostEvent {
7817
8210
  SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
7818
8211
  /**
7819
8212
  * Initializes a new SpotterViz conversation.
8213
+ * Payload: none.
7820
8214
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7821
8215
  * @example
7822
8216
  * ```js
@@ -7826,6 +8220,7 @@ export declare enum HostEvent {
7826
8220
  InitSpotterVizConversation = "InitSpotterVizConversation",
7827
8221
  /**
7828
8222
  * Opens the SpotterViz panel.
8223
+ * Payload: none.
7829
8224
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7830
8225
  * @example
7831
8226
  * ```js
@@ -7835,6 +8230,7 @@ export declare enum HostEvent {
7835
8230
  OpenSpotterVizPanel = "OpenSpotterVizPanel",
7836
8231
  /**
7837
8232
  * Closes the SpotterViz panel.
8233
+ * Payload: none.
7838
8234
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7839
8235
  * @example
7840
8236
  * ```js
@@ -7845,6 +8241,7 @@ export declare enum HostEvent {
7845
8241
  /**
7846
8242
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
7847
8243
  * Requires `enableLiveboardDataCache` to be enabled.
8244
+ * Payload: {@link ScheduleEmailRequest}.
7848
8245
  * @example
7849
8246
  * ```js
7850
8247
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -9859,92 +10256,388 @@ export declare enum Action {
9859
10256
  * disabledActions: [Action.SpotterOnLiveboard]
9860
10257
  * ```
9861
10258
  */
9862
- SpotterOnLiveboard = "spotterOnLiveboard"
9863
- }
9864
- declare enum ContextMenuTriggerOptions {
9865
- LEFT_CLICK = "left-click",
9866
- RIGHT_CLICK = "right-click",
9867
- BOTH_CLICKS = "both-clicks"
9868
- }
9869
- export interface ColumnValue {
9870
- column: {
9871
- id: string;
9872
- name: string;
9873
- dataType: string;
9874
- [key: string]: any;
9875
- };
9876
- value: string | number | boolean | {
9877
- v: {
9878
- s: number;
9879
- e: number;
9880
- };
9881
- };
9882
- }
9883
- export interface VizPoint {
9884
- selectedAttributes: ColumnValue[];
9885
- selectedMeasures: ColumnValue[];
9886
- }
9887
- export interface CustomAction {
9888
- name: string;
9889
- id: string;
9890
- position: CustomActionsPosition;
9891
- target: CustomActionTarget;
9892
- metadataIds?: {
9893
- answerIds?: string[];
9894
- liveboardIds?: string[];
9895
- vizIds?: string[];
9896
- };
9897
- dataModelIds?: {
9898
- modelIds?: string[];
9899
- modelColumnNames?: string[];
9900
- };
9901
- orgIds?: string[];
9902
- groupIds?: string[];
9903
- }
9904
- /**
9905
- * Enum options to show custom actions at different
9906
- * positions in the application.
9907
- */
9908
- export declare enum CustomActionsPosition {
10259
+ SpotterOnLiveboard = "spotterOnLiveboard",
9909
10260
  /**
9910
- * Shows the action as a primary button
9911
- * in the toolbar area of the embed.
10261
+ * Controls the visibility and disabled state of the "Chart Type" menu item
10262
+ * in Chart Settings V2.
10263
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10264
+ * @example
10265
+ * ```js
10266
+ * {
10267
+ * hiddenActions: [Action.ChartTypeSettings],
10268
+ * disabledActions: [Action.ChartTypeSettings],
10269
+ * }
10270
+ * ```
9912
10271
  */
9913
- PRIMARY = "PRIMARY",
10272
+ ChartTypeSettings = "CHART_TYPE",
9914
10273
  /**
9915
- * Shows the action inside the "More" menu
9916
- * (three-dot overflow menu).
10274
+ * Controls the visibility and disabled state of the "Layout" menu item
10275
+ * in Chart Settings V2.
10276
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10277
+ * @example
10278
+ * ```js
10279
+ * {
10280
+ * hiddenActions: [Action.LayoutSettings],
10281
+ * disabledActions: [Action.LayoutSettings],
10282
+ * }
10283
+ * ```
9917
10284
  */
9918
- MENU = "MENU",
10285
+ LayoutSettings = "LAYOUT",
9919
10286
  /**
9920
- * Shows the action in the right-click
9921
- * context menu. Only supported for
9922
- * {@link CustomActionTarget.VIZ},
9923
- * {@link CustomActionTarget.ANSWER}, and
9924
- * {@link CustomActionTarget.SPOTTER} targets.
10287
+ * Controls the visibility and disabled state of the "Column" menu item
10288
+ * in Chart Settings V2.
10289
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10290
+ * @example
10291
+ * ```js
10292
+ * {
10293
+ * hiddenActions: [Action.ColumnSettings],
10294
+ * disabledActions: [Action.ColumnSettings],
10295
+ * }
10296
+ * ```
9925
10297
  */
9926
- CONTEXTMENU = "CONTEXTMENU"
9927
- }
9928
- declare enum CustomActionTarget {
10298
+ ColumnSettings = "COLUMN",
9929
10299
  /**
9930
- * Action applies at the Liveboard level.
9931
- * Supported positions:
9932
- * {@link CustomActionsPosition.PRIMARY},
9933
- * {@link CustomActionsPosition.MENU}.
9934
- * Can be scoped with
9935
- * `metadataIds.liveboardIds`,
9936
- * `orgIds`, and `groupIds`.
10300
+ * Controls the visibility and disabled state of the "Axis" menu item
10301
+ * in Chart Settings V2.
10302
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10303
+ * @example
10304
+ * ```js
10305
+ * {
10306
+ * hiddenActions: [Action.AxisSettings],
10307
+ * disabledActions: [Action.AxisSettings],
10308
+ * }
10309
+ * ```
9937
10310
  */
9938
- LIVEBOARD = "LIVEBOARD",
10311
+ AxisSettings = "AXIS",
9939
10312
  /**
9940
- * Action applies to individual
9941
- * visualizations (charts/tables).
9942
- * Supported positions:
9943
- * {@link CustomActionsPosition.PRIMARY},
9944
- * {@link CustomActionsPosition.MENU},
9945
- * {@link CustomActionsPosition.CONTEXTMENU}.
9946
- * Can be scoped with `metadataIds`
9947
- * (answerIds, liveboardIds, vizIds),
10313
+ * Controls the visibility and disabled state of the "Data Label" menu item
10314
+ * in Chart Settings V2.
10315
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10316
+ * @example
10317
+ * ```js
10318
+ * {
10319
+ * hiddenActions: [Action.DataLabelSettings],
10320
+ * disabledActions: [Action.DataLabelSettings],
10321
+ * }
10322
+ * ```
10323
+ */
10324
+ DataLabelSettings = "DATA_LABEL",
10325
+ /**
10326
+ * Controls the visibility and disabled state of the "Tooltip" menu item
10327
+ * in Chart Settings V2.
10328
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10329
+ * @example
10330
+ * ```js
10331
+ * {
10332
+ * hiddenActions: [Action.TooltipSettings],
10333
+ * disabledActions: [Action.TooltipSettings],
10334
+ * }
10335
+ * ```
10336
+ */
10337
+ TooltipSettings = "TOOLTIP",
10338
+ /**
10339
+ * Controls the visibility and disabled state of the "Legend" menu item
10340
+ * in Chart Settings V2.
10341
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10342
+ * @example
10343
+ * ```js
10344
+ * {
10345
+ * hiddenActions: [Action.LegendSettings],
10346
+ * disabledActions: [Action.LegendSettings],
10347
+ * }
10348
+ * ```
10349
+ */
10350
+ LegendSettings = "LEGEND",
10351
+ /**
10352
+ * Controls the visibility and disabled state of the "Display" menu item
10353
+ * in Chart Settings V2.
10354
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10355
+ * @example
10356
+ * ```js
10357
+ * {
10358
+ * hiddenActions: [Action.DisplaySettings],
10359
+ * disabledActions: [Action.DisplaySettings],
10360
+ * }
10361
+ * ```
10362
+ */
10363
+ DisplaySettings = "DISPLAY",
10364
+ /**
10365
+ * Controls the visibility and disabled state of the "Query Details" menu
10366
+ * item in Chart Settings V2.
10367
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10368
+ * @example
10369
+ * ```js
10370
+ * {
10371
+ * hiddenActions: [Action.QuerySettings],
10372
+ * disabledActions: [Action.QuerySettings],
10373
+ * }
10374
+ * ```
10375
+ */
10376
+ QuerySettings = "QUERY_DETAILS",
10377
+ /**
10378
+ * Controls the visibility and disabled state of the "Custom Action" menu
10379
+ * item in Chart Settings V2.
10380
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10381
+ * @example
10382
+ * ```js
10383
+ * {
10384
+ * hiddenActions: [Action.CustomSettings],
10385
+ * disabledActions: [Action.CustomSettings],
10386
+ * }
10387
+ * ```
10388
+ */
10389
+ CustomSettings = "CUSTOM_ACTION",
10390
+ /**
10391
+ * Controls the visibility and disabled state of the "Muze AI" menu item
10392
+ * in Chart Settings V2.
10393
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10394
+ * @example
10395
+ * ```js
10396
+ * {
10397
+ * hiddenActions: [Action.MuzeAiSettings],
10398
+ * disabledActions: [Action.MuzeAiSettings],
10399
+ * }
10400
+ * ```
10401
+ */
10402
+ MuzeAiSettings = "MUZE_AI",
10403
+ /**
10404
+ * Controls the visibility and disabled state of the "R Analysis" menu item
10405
+ * in Chart Settings V2.
10406
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10407
+ * @example
10408
+ * ```js
10409
+ * {
10410
+ * hiddenActions: [Action.RAnalysisSettings],
10411
+ * disabledActions: [Action.RAnalysisSettings],
10412
+ * }
10413
+ * ```
10414
+ */
10415
+ RAnalysisSettings = "R_ANALYSIS",
10416
+ /**
10417
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
10418
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10419
+ * @example
10420
+ * ```js
10421
+ * {
10422
+ * hiddenActions: [Action.AddToCollection],
10423
+ * disabledActions: [Action.AddToCollection],
10424
+ * }
10425
+ * ```
10426
+ */
10427
+ AddToCollection = "addToCollection",
10428
+ /**
10429
+ * Controls the visibility and disabled state of the "Create Collection" button.
10430
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10431
+ * @example
10432
+ * ```js
10433
+ * {
10434
+ * hiddenActions: [Action.CreateCollection],
10435
+ * disabledActions: [Action.CreateCollection],
10436
+ * }
10437
+ * ```
10438
+ */
10439
+ CreateCollection = "createCollection",
10440
+ /**
10441
+ * Controls the visibility and disabled state of the "Move" menu item in a
10442
+ * Collection.
10443
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10444
+ * @example
10445
+ * ```js
10446
+ * {
10447
+ * hiddenActions: [Action.MoveToCollection],
10448
+ * disabledActions: [Action.MoveToCollection],
10449
+ * }
10450
+ * ```
10451
+ */
10452
+ MoveToCollection = "moveToCollection",
10453
+ /**
10454
+ * Controls the visibility and disabled state of the "Remove" menu item in a
10455
+ * Collection.
10456
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10457
+ * @example
10458
+ * ```js
10459
+ * {
10460
+ * hiddenActions: [Action.RemoveFromCollection],
10461
+ * disabledActions: [Action.RemoveFromCollection],
10462
+ * }
10463
+ * ```
10464
+ */
10465
+ RemoveFromCollection = "removeFromCollection",
10466
+ /**
10467
+ * Controls the visibility and disabled state of the "Delete" menu item for a
10468
+ * Collection.
10469
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10470
+ * @example
10471
+ * ```js
10472
+ * {
10473
+ * hiddenActions: [Action.DeleteCollection],
10474
+ * disabledActions: [Action.DeleteCollection],
10475
+ * }
10476
+ * ```
10477
+ */
10478
+ DeleteCollection = "deleteCollection",
10479
+ /**
10480
+ * Controls the visibility of the "Customize homepage" button on the
10481
+ * embedded home page.
10482
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
10483
+ * @example
10484
+ * ```js
10485
+ * {
10486
+ * hiddenActions: [Action.CustomizeHomepage],
10487
+ * }
10488
+ * ```
10489
+ */
10490
+ CustomizeHomepage = "customizeHomepage"
10491
+ }
10492
+ declare enum ContextMenuTriggerOptions {
10493
+ LEFT_CLICK = "left-click",
10494
+ RIGHT_CLICK = "right-click",
10495
+ BOTH_CLICKS = "both-clicks"
10496
+ }
10497
+ export interface ColumnValue {
10498
+ column: {
10499
+ id: string;
10500
+ name: string;
10501
+ dataType: string;
10502
+ [key: string]: any;
10503
+ };
10504
+ value: string | number | boolean | {
10505
+ v: {
10506
+ s: number;
10507
+ e: number;
10508
+ };
10509
+ };
10510
+ }
10511
+ export interface VizPoint {
10512
+ selectedAttributes: ColumnValue[];
10513
+ selectedMeasures: ColumnValue[];
10514
+ }
10515
+ /**
10516
+ * @group Events
10517
+ */
10518
+ export interface CustomActionPayload {
10519
+ /**
10520
+ * Id of the custom action that was triggered. Matches the `id` you set on
10521
+ * the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
10522
+ */
10523
+ id?: string;
10524
+ contextMenuPoints?: {
10525
+ clickedPoint: VizPoint;
10526
+ selectedPoints: VizPoint[];
10527
+ };
10528
+ embedAnswerData: {
10529
+ name: string;
10530
+ id: string;
10531
+ sources: {
10532
+ header: {
10533
+ guid: string;
10534
+ };
10535
+ };
10536
+ columns: any[];
10537
+ data: any[];
10538
+ [key: string]: any;
10539
+ };
10540
+ session: SessionInterface;
10541
+ vizId?: string;
10542
+ }
10543
+ /**
10544
+ * A code-based custom action to inject into the embedded ThoughtSpot UI.
10545
+ * Pass an array of these as `customActions` in the embed view config. When a
10546
+ * user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
10547
+ * a {@link CustomActionPayload} carrying the same `id`.
10548
+ */
10549
+ export interface CustomAction {
10550
+ /**
10551
+ * Display label shown on the action's button or menu item.
10552
+ */
10553
+ name: string;
10554
+ /**
10555
+ * Unique identifier for the action. Echoed back as `id` on the
10556
+ * {@link CustomActionPayload} when the action is invoked.
10557
+ */
10558
+ id: string;
10559
+ /**
10560
+ * Where the action appears: a primary button, the "More" menu, or the
10561
+ * right-click context menu. See {@link CustomActionsPosition}.
10562
+ */
10563
+ position: CustomActionsPosition;
10564
+ /**
10565
+ * The surface the action applies to (Liveboard, visualization, Answer, or
10566
+ * Spotter). See {@link CustomActionTarget}. The allowed `position` values
10567
+ * and scoping keys depend on the target.
10568
+ */
10569
+ target: CustomActionTarget;
10570
+ /**
10571
+ * Scope the action to specific objects by GUID. Which keys are allowed
10572
+ * depends on `target` (for example, a `VIZ` action may use `answerIds`,
10573
+ * `liveboardIds`, and `vizIds`).
10574
+ */
10575
+ metadataIds?: {
10576
+ answerIds?: string[];
10577
+ liveboardIds?: string[];
10578
+ vizIds?: string[];
10579
+ };
10580
+ /**
10581
+ * Scope the action by data model, using model GUIDs or column names.
10582
+ * Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
10583
+ */
10584
+ dataModelIds?: {
10585
+ modelIds?: string[];
10586
+ modelColumnNames?: string[];
10587
+ };
10588
+ /**
10589
+ * Restrict the action to specific organizations by ID.
10590
+ */
10591
+ orgIds?: string[];
10592
+ /**
10593
+ * Restrict the action to specific user groups by ID.
10594
+ */
10595
+ groupIds?: string[];
10596
+ }
10597
+ /**
10598
+ * Enum options to show custom actions at different
10599
+ * positions in the application.
10600
+ */
10601
+ export declare enum CustomActionsPosition {
10602
+ /**
10603
+ * Shows the action as a primary button
10604
+ * in the toolbar area of the embed.
10605
+ */
10606
+ PRIMARY = "PRIMARY",
10607
+ /**
10608
+ * Shows the action inside the "More" menu
10609
+ * (three-dot overflow menu).
10610
+ */
10611
+ MENU = "MENU",
10612
+ /**
10613
+ * Shows the action in the right-click
10614
+ * context menu. Only supported for
10615
+ * {@link CustomActionTarget.VIZ},
10616
+ * {@link CustomActionTarget.ANSWER}, and
10617
+ * {@link CustomActionTarget.SPOTTER} targets.
10618
+ */
10619
+ CONTEXTMENU = "CONTEXTMENU"
10620
+ }
10621
+ declare enum CustomActionTarget {
10622
+ /**
10623
+ * Action applies at the Liveboard level.
10624
+ * Supported positions:
10625
+ * {@link CustomActionsPosition.PRIMARY},
10626
+ * {@link CustomActionsPosition.MENU}.
10627
+ * Can be scoped with
10628
+ * `metadataIds.liveboardIds`,
10629
+ * `orgIds`, and `groupIds`.
10630
+ */
10631
+ LIVEBOARD = "LIVEBOARD",
10632
+ /**
10633
+ * Action applies to individual
10634
+ * visualizations (charts/tables).
10635
+ * Supported positions:
10636
+ * {@link CustomActionsPosition.PRIMARY},
10637
+ * {@link CustomActionsPosition.MENU},
10638
+ * {@link CustomActionsPosition.CONTEXTMENU}.
10639
+ * Can be scoped with `metadataIds`
10640
+ * (answerIds, liveboardIds, vizIds),
9948
10641
  * `dataModelIds` (modelIds,
9949
10642
  * modelColumnNames), `orgIds`,
9950
10643
  * and `groupIds`.
@@ -10724,6 +11417,166 @@ export interface VisualizationOverrides {
10724
11417
  /** Table visualization overrides */
10725
11418
  table?: TableOverrides;
10726
11419
  }
11420
+ /**
11421
+ * The configuration object for the full-height behavior shared by the
11422
+ * Liveboard and app embeds.
11423
+ *
11424
+ * When `fullHeight` is enabled the SDK resizes the embed container to match the
11425
+ * height reported by the ThoughtSpot app, and — when lazy loading is also
11426
+ * enabled — keeps the app informed of the portion of the embed that is
11427
+ * currently visible so that visualizations load on demand.
11428
+ */
11429
+ export interface FullHeightViewConfig {
11430
+ /**
11431
+ * If set to true, the embedded object container dynamically resizes
11432
+ * according to the height of the Liveboard.
11433
+ *
11434
+ * **Note**: Using fullHeight loads all visualizations on the
11435
+ * Liveboard simultaneously, which results in multiple warehouse
11436
+ * queries and potentially a longer wait for the topmost
11437
+ * visualizations to display on the screen.
11438
+ * Setting `fullHeight` to `false` fetches visualizations
11439
+ * incrementally as users scroll the page to view the charts and tables.
11440
+ *
11441
+ * From SDK 1.52.0, enabling `fullHeight` also turns on
11442
+ * {@link lazyLoadingForFullHeight} and
11443
+ * {@link enableScrollableContainerLazyLoading}, so visualizations load as
11444
+ * they scroll into view. Set either flag to `false` to opt out.
11445
+ *
11446
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11447
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
11448
+ * @example
11449
+ * ```js
11450
+ * // Replace <EmbedComponent> with the embed component name.
11451
+ * // For example, AppEmbed or LiveboardEmbed
11452
+ * const embed = new <EmbedComponent>('#embed', {
11453
+ * ... // other view config
11454
+ * fullHeight: true,
11455
+ * });
11456
+ * ```
11457
+ */
11458
+ fullHeight?: boolean;
11459
+ /**
11460
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11461
+ * Setting this height helps resolve issues with empty Liveboards and
11462
+ * other screens navigable from a Liveboard.
11463
+ *
11464
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11465
+ * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
11466
+ * @default 500
11467
+ * @example
11468
+ * ```js
11469
+ * // Replace <EmbedComponent> with the embed component name.
11470
+ * // For example, AppEmbed or LiveboardEmbed
11471
+ * const embed = new <EmbedComponent>('#embed', {
11472
+ * ... // other view config
11473
+ * fullHeight: true,
11474
+ * minimumHeight: 600,
11475
+ * });
11476
+ * ```
11477
+ */
11478
+ minimumHeight?: number;
11479
+ /**
11480
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11481
+ * Setting this height helps resolve issues with empty Liveboards and
11482
+ * other screens navigable from a Liveboard.
11483
+ *
11484
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11485
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
11486
+ * @deprecated Use `minimumHeight` instead.
11487
+ * @default 500
11488
+ * @example
11489
+ * ```js
11490
+ * // Replace <EmbedComponent> with the embed component name.
11491
+ * // For example, AppEmbed or LiveboardEmbed
11492
+ * const embed = new <EmbedComponent>('#embed', {
11493
+ * ... // other view config
11494
+ * fullHeight: true,
11495
+ * defaultHeight: 600,
11496
+ * });
11497
+ * ```
11498
+ */
11499
+ defaultHeight?: number;
11500
+ /**
11501
+ * Loads visualizations only as they scroll into the viewport, instead of
11502
+ * loading the whole full-height Liveboard at once.
11503
+ *
11504
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11505
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11506
+ * set explicitly. Set it to `false` to load every visualization upfront.
11507
+ * The flag has no effect unless `fullHeight` is enabled.
11508
+ *
11509
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11510
+ * @type {boolean}
11511
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11512
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11513
+ * @example
11514
+ * ```js
11515
+ * // Replace <EmbedComponent> with the embed component name.
11516
+ * // For example, AppEmbed or LiveboardEmbed
11517
+ * const embed = new <EmbedComponent>('#embed-container', {
11518
+ * // ...other options
11519
+ * fullHeight: true,
11520
+ * lazyLoadingForFullHeight: true,
11521
+ * })
11522
+ * ```
11523
+ */
11524
+ lazyLoadingForFullHeight?: boolean;
11525
+ /**
11526
+ * How far outside the viewport a visualization starts loading, when
11527
+ * {@link lazyLoadingForFullHeight} is enabled.
11528
+ *
11529
+ * For example, if the margin is set to '10px',
11530
+ * the visualization will be loaded 10px before its top edge is visible in the
11531
+ * viewport.
11532
+ *
11533
+ * The format is similar to CSS margin, so `'500px 0px'` extends the
11534
+ * prefetch 500px above and below the viewport and not sideways. Accepted
11535
+ * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
11536
+ * `auto`; an invalid value is logged and ignored.
11537
+ *
11538
+ * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
11539
+ * visualization ahead of the scroll position, so a chart has usually
11540
+ * finished loading by the time it scrolls into view. Use a smaller margin
11541
+ * to cut warehouse queries further, or `'0px'` to load a visualization
11542
+ * only once it is actually visible.
11543
+ *
11544
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11545
+ * @type {string}
11546
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11547
+ * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
11548
+ * @example
11549
+ * ```js
11550
+ * // Replace <EmbedComponent> with the embed component name.
11551
+ * // For example, AppEmbed or LiveboardEmbed
11552
+ * const embed = new <EmbedComponent>('#embed-container', {
11553
+ * // ...other options
11554
+ * fullHeight: true,
11555
+ * lazyLoadingForFullHeight: true,
11556
+ * // With 0px, the visualization only starts loading once it is
11557
+ * // visible in the viewport.
11558
+ * lazyLoadingMargin: '0px',
11559
+ * })
11560
+ * ```
11561
+ */
11562
+ lazyLoadingMargin?: string;
11563
+ /**
11564
+ * Computes the visible region of the embed against its scrollable and
11565
+ * clipping ancestors, instead of treating the browser window as the only
11566
+ * viewport, and tracks scroll and resize on those ancestors.
11567
+ *
11568
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11569
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11570
+ * set explicitly. Set it to `false` when the page scrolls with the window
11571
+ * and the embed has no clipping ancestor, to skip the extra ancestor
11572
+ * tracking.
11573
+ *
11574
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11575
+ * @type {boolean}
11576
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11577
+ */
11578
+ enableScrollableContainerLazyLoading?: boolean;
11579
+ }
10727
11580
  declare enum AuthFailureType {
10728
11581
  /**
10729
11582
  * Authentication failed in the SDK authentication flow.
@@ -10872,231 +11725,359 @@ declare enum AuthEvent {
10872
11725
  */
10873
11726
  TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
10874
11727
  }
10875
- export interface LiveboardTab {
10876
- id: string;
10877
- name: string;
10878
- [key: string]: any;
11728
+ /**
11729
+ * Request for host events that MAY target a specific visualization.
11730
+ * Omitting vizId targets the current answer/liveboard as a whole.
11731
+ * (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
11732
+ */
11733
+ export interface VizScopedRequest {
11734
+ vizId?: string;
10879
11735
  }
10880
- export interface LiveboardGroup {
10881
- id: string;
10882
- name: string;
10883
- [key: string]: any;
11736
+ /**
11737
+ * Request for host events that MUST target a specific visualization.
11738
+ */
11739
+ export interface RequiredVizRequest {
11740
+ vizId: string;
10884
11741
  }
10885
- declare enum ApplicabilityLevel {
10886
- Liveboard = "LIVEBOARD",
10887
- Tab = "TAB",
10888
- Group = "GROUP"
11742
+ /**
11743
+ * Request for Spotter conversation-scoped host events.
11744
+ */
11745
+ export interface ConversationScopedRequest {
11746
+ conversationId: string;
10889
11747
  }
10890
11748
  /**
10891
- * Scopes a filter or parameter to a specific target.
10892
- * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
10893
- * is not required.
11749
+ * Request payload for {@link HostEvent.OpenFilter}. Field requirements
11750
+ * vary by context (Search requires columnId/type/dataType/name); the
11751
+ * contract is the cross-context superset — the app validates per context
11752
+ * at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
11753
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
10894
11754
  */
10895
- export interface Applicability {
10896
- level: ApplicabilityLevel;
10897
- targetId?: string;
11755
+ export interface OpenFilterRequest {
11756
+ column: {
11757
+ columnId?: string;
11758
+ columnName?: string;
11759
+ type?: string;
11760
+ dataType?: string;
11761
+ name?: string;
11762
+ isStrictDateColumn?: boolean;
11763
+ };
11764
+ applicability?: Applicability;
11765
+ visualizationId?: string;
11766
+ liveboardId?: string;
10898
11767
  }
10899
- export interface FilterUpdate {
11768
+ /**
11769
+ * Request payload for {@link HostEvent.OpenParameter}. One of parameterId
11770
+ * or parameterName must be provided (validated at runtime).
11771
+ */
11772
+ export interface OpenParameterRequest {
11773
+ parameter: {
11774
+ parameterId?: string;
11775
+ parameterName?: string;
11776
+ };
11777
+ applicability?: Applicability;
11778
+ }
11779
+ /**
11780
+ * Request payload for {@link HostEvent.Search}.
11781
+ */
11782
+ export interface SearchRequest {
11783
+ searchQuery: string;
11784
+ dataSources: string[];
11785
+ execute?: boolean;
11786
+ }
11787
+ /**
11788
+ * Request payload for {@link HostEvent.SpotterSearch}.
11789
+ */
11790
+ export interface SpotterSearchRequest {
11791
+ query: string;
11792
+ executeSearch: boolean;
11793
+ }
11794
+ /**
11795
+ * A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
11796
+ */
11797
+ export interface CrossFilterCondition {
11798
+ columnName?: string;
11799
+ operator?: string;
11800
+ values: Array<string | number | boolean>;
11801
+ }
11802
+ /**
11803
+ * Request payload for {@link HostEvent.UpdateCrossFilter}.
11804
+ */
11805
+ export interface UpdateCrossFilterRequest {
11806
+ vizId: string;
11807
+ conditions: CrossFilterCondition[];
11808
+ }
11809
+ /**
11810
+ * The column to filter on. Supply `columnName`. A filter with no column is
11811
+ * rejected at runtime, and passing both spellings silently discards the
11812
+ * `column` one.
11813
+ *
11814
+ * When several columns share a name, qualify it as
11815
+ * `WORKSHEET_NAME::COLUMN_NAME`, for example
11816
+ * `"(Sample) Retail - Apparel::city"`.
11817
+ */
11818
+ export type HostFilterUpdateColumn = {
11819
+ /**
11820
+ * Name of the column to filter on, optionally qualified as
11821
+ * `WORKSHEET_NAME::COLUMN_NAME`.
11822
+ */
11823
+ columnName: string;
11824
+ column?: never;
11825
+ } | {
11826
+ /**
11827
+ * @deprecated Use `columnName`, which matches {@link RuntimeFilter} and
11828
+ * the rest of the SDK. Still accepted, but not alongside `columnName`.
11829
+ */
10900
11830
  column: string;
11831
+ columnName?: never;
11832
+ };
11833
+ /**
11834
+ * The filter operator. Supply `operator`. A filter with no operator is
11835
+ * rejected at runtime, and passing both spellings silently discards the
11836
+ * `oper` one.
11837
+ */
11838
+ export type HostFilterUpdateOperator = {
11839
+ /** Filter operator, for example EQ, IN, CONTAINS. */
11840
+ operator: string;
11841
+ oper?: never;
11842
+ } | {
11843
+ /**
11844
+ * @deprecated Use `operator`, which matches {@link RuntimeFilter} and
11845
+ * the rest of the SDK. Still accepted, but not alongside `operator`.
11846
+ */
10901
11847
  oper: string;
10902
- values: string[];
11848
+ operator?: never;
11849
+ };
11850
+ /**
11851
+ * A single filter entry for {@link HostEvent.UpdateFilters}.
11852
+ *
11853
+ * Use `columnName` and `operator` - the spelling used by
11854
+ * {@link RuntimeFilter} and by the payload
11855
+ * `convertFilterChangedToUpdateFiltersPayload` produces.
11856
+ */
11857
+ export type HostFilterUpdate = HostFilterUpdateColumn & HostFilterUpdateOperator & {
11858
+ columnId?: string;
11859
+ values: Array<string | number | boolean | bigint>;
10903
11860
  type?: string;
11861
+ datePeriod?: string;
11862
+ negate?: boolean;
10904
11863
  applicability?: Applicability;
11864
+ };
11865
+ /**
11866
+ * Request payload for {@link HostEvent.UpdateFilters} (singular or plural
11867
+ * form).
11868
+ */
11869
+ export interface UpdateFiltersRequest {
11870
+ filter?: HostFilterUpdate;
11871
+ filters?: HostFilterUpdate[];
11872
+ /**
11873
+ * Scope the update to a specific visualization on a Liveboard.
11874
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
11875
+ */
11876
+ visualizationId?: string;
11877
+ /**
11878
+ * Scope the update to a specific Liveboard.
11879
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
11880
+ */
11881
+ liveboardId?: string;
10905
11882
  }
10906
- export interface LiveboardFilter {
10907
- applicability?: Applicability;
10908
- [key: string]: any;
11883
+ /**
11884
+ * Request payload for personalised-view host events.
11885
+ */
11886
+ export interface PersonalisedViewRequest {
11887
+ viewId?: string;
11888
+ viewName?: string;
10909
11889
  }
10910
- export interface LiveboardParameter {
10911
- applicability?: Applicability;
10912
- [key: string]: any;
11890
+ /**
11891
+ * Request payload for schedule-email related host events.
11892
+ */
11893
+ export interface ScheduleEmailRequest {
11894
+ sendToSelf?: boolean;
10913
11895
  }
10914
- declare enum UIPassthroughEvent {
10915
- PinAnswerToLiveboard = "addVizToPinboard",
10916
- SaveAnswer = "saveAnswer",
10917
- GetDiscoverabilityStatus = "getDiscoverabilityStatus",
10918
- GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
10919
- GetAnswerConfig = "getAnswerPageConfig",
10920
- GetLiveboardConfig = "getPinboardPageConfig",
10921
- GetUnsavedAnswerTML = "getUnsavedAnswerTML",
10922
- UpdateFilters = "updateFilters",
10923
- Drilldown = "drillDown",
10924
- GetAnswerSession = "getAnswerSession",
10925
- GetFilters = "getFilters",
10926
- GetIframeUrl = "getIframeUrl",
10927
- GetParameters = "getParameters",
10928
- GetTML = "getTML",
10929
- GetTabs = "getTabs",
10930
- GetGroups = "getGroups",
10931
- GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
11896
+ /**
11897
+ * Object form of the {@link HostEvent.Navigate} payload.
11898
+ */
11899
+ export interface NavigateRequest {
11900
+ /**
11901
+ * Route to navigate to, or a history delta such as `1` or `-1`.
11902
+ */
11903
+ path: string | number;
11904
+ /**
11905
+ * When `true`, replaces the current history entry instead of pushing.
11906
+ */
11907
+ replace?: boolean;
10932
11908
  }
10933
- export type UIPassthroughContractBase = {
10934
- [UIPassthroughEvent.PinAnswerToLiveboard]: {
10935
- request: {
10936
- vizId?: string;
10937
- newVizName: string;
10938
- newVizDescription?: string;
10939
- liveboardId?: string;
10940
- tabId?: string;
10941
- newLiveboardName?: string;
10942
- newTabName?: string;
10943
- };
10944
- response: {
10945
- liveboardId: string;
10946
- tabId: string;
10947
- vizId: string;
10948
- };
10949
- };
10950
- [UIPassthroughEvent.SaveAnswer]: {
10951
- request: {
10952
- name: string;
10953
- description: string;
10954
- vizId?: string;
10955
- isDiscoverable?: boolean;
10956
- };
10957
- response: {
10958
- answerId: string;
10959
- saveResponse?: any;
10960
- shareResponse?: any;
10961
- };
10962
- };
10963
- [UIPassthroughEvent.GetDiscoverabilityStatus]: {
10964
- request: any;
10965
- response: {
10966
- shouldShowDiscoverability: boolean;
10967
- isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
10968
- };
10969
- };
10970
- [UIPassthroughEvent.GetAvailableUIPassthroughs]: {
10971
- request: any;
10972
- response: {
10973
- keys: string[];
10974
- };
10975
- };
10976
- [UIPassthroughEvent.GetAnswerConfig]: {
10977
- request: {
10978
- vizId?: string;
10979
- };
10980
- response: any;
10981
- };
10982
- [UIPassthroughEvent.GetLiveboardConfig]: {
10983
- request: any;
10984
- response: any;
10985
- };
10986
- [UIPassthroughEvent.GetUnsavedAnswerTML]: {
10987
- request: {
10988
- sessionId?: string;
10989
- vizId?: string;
10990
- };
10991
- response: {
10992
- tml: string;
10993
- };
10994
- };
10995
- [UIPassthroughEvent.GetAnswerSession]: {
10996
- request: {
10997
- vizId?: string;
10998
- };
10999
- response: {
11000
- session: SessionInterface;
11001
- embedAnswerData?: Record<string, any>;
11002
- };
11003
- };
11004
- [UIPassthroughEvent.GetFilters]: {
11005
- request: {
11006
- vizId?: string;
11007
- };
11008
- response: {
11009
- liveboardFilters: LiveboardFilter[];
11010
- runtimeFilters: RuntimeFilter[];
11011
- };
11012
- };
11013
- [UIPassthroughEvent.GetIframeUrl]: {
11014
- request: Record<string, never>;
11015
- response: {
11016
- iframeUrl: string;
11017
- };
11018
- };
11019
- [UIPassthroughEvent.GetParameters]: {
11020
- request: Record<string, never>;
11021
- response: {
11022
- parameters: LiveboardParameter[];
11023
- };
11024
- };
11025
- [UIPassthroughEvent.GetTML]: {
11026
- request: {
11027
- vizId?: string;
11028
- includeNonExecutedSearchTokens?: boolean;
11029
- };
11030
- response: Record<string, any>;
11031
- };
11032
- [UIPassthroughEvent.GetTabs]: {
11033
- request: Record<string, never>;
11034
- response: {
11035
- orderedTabIds: string[];
11036
- numberOfTabs: number;
11037
- Tabs: LiveboardTab[];
11038
- };
11909
+ /**
11910
+ * Request payload for {@link HostEvent.SetActiveTab}.
11911
+ */
11912
+ export interface SetActiveTabRequest {
11913
+ /**
11914
+ * Id of the liveboard tab to make active.
11915
+ */
11916
+ tabId: string;
11917
+ }
11918
+ /**
11919
+ * Typed request payloads for host events that do not go through the UI
11920
+ * passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
11921
+ *
11922
+ * Shapes are transcribed from the host's runtime validation schemas
11923
+ * (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
11924
+ * flattened across contexts to the permissive superset (context-specific
11925
+ * requirements are validated at runtime).
11926
+ *
11927
+ * Responses are typed only for UI-passthrough-backed events today (see
11928
+ * {@link HostEventResponse}). Add a response map alongside this one when the
11929
+ * first explicit response shape is specified; tightening later is additive.
11930
+ *
11931
+ * Deliberately absent (do not add without an audit):
11932
+ * - DrillDown: the runtime schema (object-shaped points) and the UI
11933
+ * passthrough contract (string-shaped points) disagree — resolve the
11934
+ * drift first.
11935
+ * - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
11936
+ * mapping; their Spotter-context vizId requirement is runtime-only.
11937
+ */
11938
+ export interface HostEventRequestMap {
11939
+ [HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
11940
+ [HostEvent.UpdateParameters]: RuntimeParameter[];
11941
+ [HostEvent.UpdateFilters]: UpdateFiltersRequest;
11942
+ [HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
11943
+ [HostEvent.OpenFilter]: OpenFilterRequest;
11944
+ [HostEvent.OpenParameter]: OpenParameterRequest;
11945
+ [HostEvent.SetVisibleVizs]: string[];
11946
+ [HostEvent.SetVisibleTabs]: string[];
11947
+ [HostEvent.SetHiddenTabs]: string[];
11948
+ [HostEvent.SetActiveTab]: SetActiveTabRequest;
11949
+ [HostEvent.Navigate]: string | number | NavigateRequest;
11950
+ [HostEvent.Search]: SearchRequest;
11951
+ [HostEvent.ResetSearch]: void;
11952
+ [HostEvent.AddColumns]: {
11953
+ columnIds: string[];
11039
11954
  };
11040
- [UIPassthroughEvent.GetGroups]: {
11041
- request: Record<string, never>;
11042
- response: {
11043
- orderedGroupIds: string[];
11044
- numberOfGroups: number;
11045
- Groups: LiveboardGroup[];
11046
- };
11955
+ [HostEvent.RemoveColumn]: {
11956
+ columnId: string;
11047
11957
  };
11048
- [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
11049
- request: Record<string, never>;
11050
- response: {
11051
- data: {
11052
- v2Content: string;
11053
- };
11054
- type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11055
- };
11958
+ [HostEvent.Edit]: VizScopedRequest;
11959
+ [HostEvent.Save]: VizScopedRequest;
11960
+ [HostEvent.Delete]: VizScopedRequest;
11961
+ [HostEvent.Share]: VizScopedRequest;
11962
+ [HostEvent.Present]: VizScopedRequest;
11963
+ [HostEvent.CopyLink]: VizScopedRequest;
11964
+ [HostEvent.ExportTML]: VizScopedRequest;
11965
+ [HostEvent.EditTML]: VizScopedRequest;
11966
+ [HostEvent.UpdateTML]: VizScopedRequest;
11967
+ [HostEvent.SchedulesList]: VizScopedRequest;
11968
+ [HostEvent.Schedule]: VizScopedRequest;
11969
+ [HostEvent.SpotIQAnalyze]: VizScopedRequest;
11970
+ [HostEvent.ShowUnderlyingData]: VizScopedRequest;
11971
+ [HostEvent.CreateMonitor]: VizScopedRequest;
11972
+ [HostEvent.ManageMonitor]: VizScopedRequest;
11973
+ [HostEvent.SyncToSheets]: VizScopedRequest;
11974
+ [HostEvent.SyncToOtherApps]: VizScopedRequest;
11975
+ [HostEvent.ManagePipelines]: VizScopedRequest;
11976
+ [HostEvent.DownloadAsPng]: VizScopedRequest;
11977
+ [HostEvent.DownloadAsCsv]: VizScopedRequest;
11978
+ [HostEvent.DownloadAsXlsx]: VizScopedRequest;
11979
+ [HostEvent.DownloadAsPdf]: VizScopedRequest & {
11980
+ liveboardId?: string;
11056
11981
  };
11057
- [UIPassthroughEvent.UpdateFilters]: {
11058
- request: {
11059
- filter?: FilterUpdate;
11060
- filters?: FilterUpdate[];
11061
- };
11062
- response: unknown;
11982
+ [HostEvent.Explore]: RequiredVizRequest;
11983
+ [HostEvent.AskSage]: RequiredVizRequest;
11984
+ [HostEvent.AskSpotter]: RequiredVizRequest;
11985
+ [HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
11986
+ [HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
11987
+ [HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
11988
+ [HostEvent.ResetLiveboardPersonalisedView]: void;
11989
+ [HostEvent.AIHighlights]: void;
11990
+ [HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
11991
+ [HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
11992
+ [HostEvent.SpotterSearch]: SpotterSearchRequest;
11993
+ [HostEvent.ResetSpotterConversation]: void;
11994
+ [HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
11995
+ [HostEvent.CloseSpotterShareConversation]: void;
11996
+ [HostEvent.ExitSpotterSharedConversation]: void;
11997
+ [HostEvent.PinSpotterConversation]: ConversationScopedRequest;
11998
+ [HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
11999
+ [HostEvent.EditLastPrompt]: string;
12000
+ [HostEvent.DeleteLastPrompt]: void;
12001
+ [HostEvent.PreviewSpotterData]: void;
12002
+ [HostEvent.SpotterVizSendUserMessage]: {
12003
+ query: string;
11063
12004
  };
11064
- [UIPassthroughEvent.Drilldown]: {
11065
- request: {
11066
- points: {
11067
- selectedPoints?: string[];
11068
- clickedPoint?: string;
11069
- };
11070
- columnGuid?: string;
11071
- autoDrillDown?: boolean;
11072
- vizId?: string;
11073
- };
11074
- response: unknown;
12005
+ [HostEvent.InitSpotterVizConversation]: void;
12006
+ [HostEvent.OpenSpotterVizPanel]: void;
12007
+ [HostEvent.CloseSpotterVizPanel]: void;
12008
+ }
12009
+ /**
12010
+ * Per-context request shapes for events whose payload varies by
12011
+ /**
12012
+ * Resolves the typed request payload for a host event.
12013
+ * Resolution order:
12014
+ * 1. Explicitly typed request in {@link HostEventRequestMap}
12015
+ * 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
12016
+ * 3. `any` (event not audited/typed yet — backward compatible)
12017
+ *
12018
+ * Requests are the cross-context superset today. The per-context `*Request`
12019
+ * interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
12020
+ * narrows by context; a later release may thread the caller's context to
12021
+ * enforce it.
12022
+ */
12023
+ export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
12024
+ /**
12025
+ * Resolves the typed response payload for a host event. Only UI passthrough
12026
+ * backed events have typed responses today; everything else resolves to `any`.
12027
+ */
12028
+ export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
12029
+ /**
12030
+ * Payload type accepted by `embed.trigger()`. Keeps the historical
12031
+ * `PayloadT` escape hatch so untyped existing call sites keep compiling.
12032
+ */
12033
+ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
12034
+ /**
12035
+ * Deep `Partial` of a request type: every field optional at every depth, with no
12036
+ * index signature — so object literals carrying unknown fields are flagged.
12037
+ */
12038
+ export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
12039
+ [K in keyof T]?: DeepPartial<T[K]>;
12040
+ } : T;
12041
+ /**
12042
+ * `trigger()`'s `data` type: an all-optional view of the event's request type.
12043
+ * See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
12044
+ * No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
12045
+ */
12046
+ export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
12047
+ /**
12048
+ * Response type returned by `embed.trigger()`.
12049
+ */
12050
+ export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
12051
+ /**
12052
+ * Typed `data` field per embed event. Seed with audited events only.
12053
+ */
12054
+ export interface EmbedEventDataExtension {
12055
+ [EmbedEvent.AuthInit]: {
12056
+ /**
12057
+ * Whether authentication was successful.
12058
+ */
12059
+ isLoggedIn?: boolean;
12060
+ [key: string]: any;
11075
12061
  };
12062
+ [EmbedEvent.EmbedListenerReady]: Record<string, any>;
12063
+ /**
12064
+ * Fired when a callback-type custom action is triggered. Use
12065
+ * `payload.data.id` to identify which action fired.
12066
+ */
12067
+ [EmbedEvent.CustomAction]: CustomActionPayload;
12068
+ }
12069
+ /**
12070
+ * Resolves the typed `data` payload for an embed event; `any` when the
12071
+ * event has not been audited/typed yet.
12072
+ */
12073
+ export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
12074
+ /**
12075
+ * Full envelope delivered to `embed.on()` callbacks for a given event:
12076
+ * the wire fields (`type`, `status`) plus the typed `data`.
12077
+ */
12078
+ export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
12079
+ data: EmbedEventData<EmbedEventT>;
11076
12080
  };
11077
- export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
11078
- export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
11079
- export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
11080
- refId?: string;
11081
- value?: UIPassthroughResponse<ApiName>;
11082
- error?: any;
11083
- }>;
11084
- export type EmbedApiHostEventMapping = {
11085
- [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
11086
- [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
11087
- [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
11088
- [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
11089
- [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
11090
- [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
11091
- [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
11092
- [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
11093
- [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
11094
- [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11095
- };
11096
- export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
11097
- export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
11098
- export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
11099
- export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
11100
12081
  declare class HostEventClient {
11101
12082
  iFrame: HTMLIFrameElement;
11102
12083
  /** Cached list of available UI passthrough keys from the embedded app */
@@ -11139,14 +12120,14 @@ declare class HostEventClient {
11139
12120
  protected handleDrillDownEvent(payload: HostEventRequest<HostEvent.DrillDown>, context?: ContextType): Promise<any>;
11140
12121
  /**
11141
12122
  * Dispatches a host event using the appropriate channel:
11142
- * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
11143
- * 2. Otherwise fall back to the legacy host event channel.
12123
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom
12124
+ * handler or getter). 2. Otherwise fall back to the legacy host event channel.
11144
12125
  *
11145
12126
  * @param hostEvent - The host event to trigger
11146
12127
  * @param payload - Optional payload for the event
11147
12128
  * @param context - Optional context (e.g. vizId) for scoped operations
11148
12129
  */
11149
- triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
12130
+ triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11150
12131
  }
11151
12132
  declare class TsEmbed {
11152
12133
  /**
@@ -11164,6 +12145,7 @@ declare class TsEmbed {
11164
12145
  * The key to store the embed instance in the DOM node
11165
12146
  */
11166
12147
  protected embedNodeKey: string;
12148
+ protected embedContainerLoadedKey: string;
11167
12149
  protected isAppInitialized: boolean;
11168
12150
  /**
11169
12151
  * A reference to the iframe within which the ThoughtSpot app
@@ -11333,10 +12315,10 @@ declare class TsEmbed {
11333
12315
  */
11334
12316
  protected getEmbedBasePath(query: string): string;
11335
12317
  protected getUpdateEmbedParamsObject(): Promise<{
11336
- customisations: CustomisationsInterface;
11337
- authToken: string;
11338
12318
  runtimeFilterParams: string;
11339
12319
  runtimeParameterParams: string;
12320
+ customisations: CustomisationsInterface;
12321
+ authToken: string;
11340
12322
  hiddenHomepageModules: HomepageModule[];
11341
12323
  reorderedHomepageModules: string[];
11342
12324
  hostConfig: Record<string, any>;
@@ -11429,6 +12411,7 @@ declare class TsEmbed {
11429
12411
  protected getV1EmbedBasePath(queryString: string): string;
11430
12412
  protected getEmbedParams(): string;
11431
12413
  protected getEmbedParamsObject(): Record<any, any>;
12414
+ protected getUrlQueryParamsObject(): Record<any, any>;
11432
12415
  protected getRootIframeSrc(): string;
11433
12416
  protected createIframeEl(frameSrc: string): HTMLIFrameElement;
11434
12417
  /**
@@ -11529,21 +12512,6 @@ declare class TsEmbed {
11529
12512
  * or else the v2 event type itself
11530
12513
  */
11531
12514
  protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
11532
- /**
11533
- * Calculates the iframe center for the current visible viewPort
11534
- * of iframe using Scroll position of Host App, offsetTop for iframe
11535
- * in Host app. ViewPort height of the tab.
11536
- * @returns iframe Center in visible viewport,
11537
- * Iframe height,
11538
- * View port height.
11539
- */
11540
- protected getIframeCenter(): {
11541
- iframeCenter: number;
11542
- iframeScrolled: number;
11543
- iframeHeight: number;
11544
- viewPortHeight: number;
11545
- iframeVisibleViewPort: number;
11546
- };
11547
12515
  /**
11548
12516
  * Registers an event listener to trigger an alert when the ThoughtSpot app
11549
12517
  * sends an event of a particular message type to the host application.
@@ -11567,7 +12535,7 @@ declare class TsEmbed {
11567
12535
  * });
11568
12536
  * ```
11569
12537
  */
11570
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
12538
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
11571
12539
  /**
11572
12540
  * Removes an event listener for a particular event type.
11573
12541
  * @param messageType The message type
@@ -11603,6 +12571,8 @@ declare class TsEmbed {
11603
12571
  */
11604
12572
  private embedContainerReadyCallbacks;
11605
12573
  protected getPreRenderObj<T extends TsEmbed>(): T;
12574
+ protected takeOverPreRender(): void;
12575
+ private markEmbedContainerLoaded;
11606
12576
  private checkEmbedContainerLoaded;
11607
12577
  private executeEmbedContainerReadyCallbacks;
11608
12578
  /**
@@ -11613,8 +12583,12 @@ declare class TsEmbed {
11613
12583
  protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
11614
12584
  /**
11615
12585
  * Triggers an event to the embedded app
12586
+ *
12587
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
12588
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
12589
+ * payload is checked strictly against the event contract — update call sites now.
11616
12590
  * @param {HostEvent} messageType The event type
11617
- * @param {any} data The payload to send with the message
12591
+ * @param {TriggerData} data The payload, typed against the event's contract
11618
12592
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
11619
12593
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
11620
12594
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -11631,7 +12605,7 @@ declare class TsEmbed {
11631
12605
  * ```
11632
12606
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
11633
12607
  */
11634
- trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
12608
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11635
12609
  /**
11636
12610
  * Triggers an event to the embedded app, skipping the UI flow.
11637
12611
  * @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
@@ -11733,6 +12707,9 @@ declare class TsEmbed {
11733
12707
  * @returns
11734
12708
  */
11735
12709
  prerenderGeneric(): Promise<any>;
12710
+ protected preRenderParamsApplied: Promise<void>;
12711
+ protected isConfigExcludedFromUrl(): boolean;
12712
+ protected triggerUpdateEmbedParams(): Promise<void>;
11736
12713
  protected beforePrerenderVisible(): void;
11737
12714
  /**
11738
12715
  * Displays the pre-rendered component inside the host element.
@@ -11811,7 +12788,7 @@ declare class V1Embed extends TsEmbed {
11811
12788
  * });
11812
12789
  * ```
11813
12790
  */
11814
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
12791
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
11815
12792
  /**
11816
12793
  * Only for testing purposes.
11817
12794
  * @hidden
@@ -11972,7 +12949,21 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
11972
12949
  * })
11973
12950
  * ```
11974
12951
  */
11975
- dataSource?: string;
12952
+ dataSource?: string;
12953
+ /**
12954
+ * If set to `true`, the answer edit panel is hidden.
12955
+ *
12956
+ * Supported embed types: `SearchEmbed`
12957
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
12958
+ * @example
12959
+ * ```js
12960
+ * const embed = new SearchEmbed('#tsEmbed', {
12961
+ * ... // other embed view config
12962
+ * hideAnswerEditPanel: true,
12963
+ * })
12964
+ * ```
12965
+ */
12966
+ hideAnswerEditPanel?: boolean;
11976
12967
  /**
11977
12968
  * The initial search query to load the answer with.
11978
12969
  * Use {@link searchOptions} instead.
@@ -13053,6 +14044,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
13053
14044
  spotterShareConversationConfig?: SpotterShareConversationConfig;
13054
14045
  visualOverridesParams?: VisualizationOverrides | null;
13055
14046
  starterPrompts?: StarterPromptsConfig;
14047
+ spotterAnalystConfig?: SpotterAnalystConfig;
13056
14048
  };
13057
14049
  }
13058
14050
  declare class SpotterEmbed extends TsEmbed {
@@ -13345,7 +14337,7 @@ export interface DiscoveryExperience {
13345
14337
  * The view configuration for full app embedding.
13346
14338
  * @group Embed components
13347
14339
  */
13348
- export interface AppViewConfig extends AllEmbedViewConfig {
14340
+ export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
13349
14341
  /**
13350
14342
  * If true, the top navigation bar within the ThoughtSpot app
13351
14343
  * is displayed. By default, the navigation bar is hidden.
@@ -13630,34 +14622,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13630
14622
  * ```
13631
14623
  */
13632
14624
  enableSearchAssist?: boolean;
13633
- /**
13634
- * If set to true, the Liveboard container dynamically resizes
13635
- * according to the height of the Liveboard.
13636
- *
13637
- * **Note**: Using fullHeight loads all visualizations
13638
- * on the Liveboard simultaneously, which results in
13639
- * multiple warehouse queries and potentially a
13640
- * longer wait for the topmost visualizations to
13641
- * display on the screen. Setting fullHeight to
13642
- * `false` fetches visualizations incrementally as
13643
- * users scroll the page to view the charts and tables.
13644
- *
13645
- * From SDK 1.52.0, enabling `fullHeight` also turns on
13646
- * {@link lazyLoadingForFullHeight} and
13647
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
13648
- * they scroll into view. Set either flag to `false` to opt out.
13649
- *
13650
- * Supported embed types: `AppEmbed`
13651
- * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
13652
- * @example
13653
- * ```js
13654
- * const embed = new AppEmbed('#tsEmbed', {
13655
- * ... // other embed view config
13656
- * fullHeight: true,
13657
- * })
13658
- * ```
13659
- */
13660
- fullHeight?: boolean;
13661
14625
  /**
13662
14626
  * Enables the V2 navigation and modular home page experience.
13663
14627
  * For more information,
@@ -13798,9 +14762,10 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13798
14762
  */
13799
14763
  isPNGInScheduledEmailsEnabled?: boolean;
13800
14764
  /**
13801
- * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
13802
- * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
13803
- * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl.
14765
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
14766
+ * rendered on a single page following the exact UI layout, instead of splitting
14767
+ * visualizations across multiple A4 pages. This feature is GA from SDK version
14768
+ * 1.51.0 and ThoughtSpot version 26.8.0.cl.
13804
14769
  *
13805
14770
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
13806
14771
  * @type {boolean}
@@ -13852,78 +14817,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13852
14817
  * ```
13853
14818
  */
13854
14819
  isGranularXLSXCSVSchedulesEnabled?: boolean;
13855
- /**
13856
- * Loads visualizations only as they scroll into the viewport, instead of
13857
- * loading the whole full-height Liveboard at once.
13858
- *
13859
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
13860
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
13861
- * set explicitly. Set it to `false` to load every visualization upfront.
13862
- * The flag has no effect unless `fullHeight` is enabled.
13863
- *
13864
- * @type {boolean}
13865
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
13866
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
13867
- * @example
13868
- * ```js
13869
- * const embed = new AppEmbed('#embed-container', {
13870
- * // ...other options
13871
- * fullHeight: true,
13872
- * lazyLoadingForFullHeight: true,
13873
- * })
13874
- * ```
13875
- */
13876
- lazyLoadingForFullHeight?: boolean;
13877
- /**
13878
- * Computes the visible region of the embed against its scrollable and
13879
- * clipping ancestors, instead of treating the browser window as the only
13880
- * viewport, and tracks scroll and resize on those ancestors.
13881
- *
13882
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
13883
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
13884
- * set explicitly. Set it to `false` when the page scrolls with the window
13885
- * and the embed has no clipping ancestor, to skip the extra ancestor
13886
- * tracking.
13887
- *
13888
- * @type {boolean}
13889
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
13890
- * @hidden
13891
- */
13892
- enableScrollableContainerLazyLoading?: boolean;
13893
- /**
13894
- * How far outside the viewport a visualization starts loading, when
13895
- * {@link lazyLoadingForFullHeight} is enabled.
13896
- *
13897
- * For example, if the margin is set to '10px',
13898
- * the visualization will be loaded 10px before its top edge is visible in the
13899
- * viewport.
13900
- *
13901
- * The format is similar to CSS margin, so `'500px 0px'` extends the
13902
- * prefetch 500px above and below the viewport and not sideways. Accepted
13903
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
13904
- * `auto`; an invalid value is logged and ignored.
13905
- *
13906
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
13907
- * visualization ahead of the scroll position, so a chart has usually
13908
- * finished loading by the time it scrolls into view. Use a smaller margin
13909
- * to cut warehouse queries further, or `'0px'` to load a visualization
13910
- * only once it is actually visible.
13911
- *
13912
- * @type {string}
13913
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
13914
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
13915
- * @example
13916
- * ```js
13917
- * const embed = new AppEmbed('#embed-container', {
13918
- * // ...other options
13919
- * fullHeight: true,
13920
- * lazyLoadingForFullHeight: true,
13921
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
13922
- * lazyLoadingMargin: '0px',
13923
- * })
13924
- * ```
13925
- */
13926
- lazyLoadingMargin?: string;
13927
14820
  /**
13928
14821
  * updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
13929
14822
  *
@@ -14111,23 +15004,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
14111
15004
  * @default false
14112
15005
  */
14113
15006
  enableStopAnswerGenerationEmbed?: boolean;
14114
- /**
14115
- * This is the minimum height (in pixels) for a full-height App.
14116
- * Setting this height helps resolve issues with empty Apps and
14117
- * other screens navigable from an App.
14118
- *
14119
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
14120
- * @default 500
14121
- * @example
14122
- * ```js
14123
- * const embed = new AppEmbed('#embed', {
14124
- * ... // other app view config
14125
- * fullHeight: true,
14126
- * minimumHeight: 600,
14127
- * });
14128
- * ```
14129
- */
14130
- minimumHeight?: number;
14131
15007
  /**
14132
15008
  * To enable the homepage announcement banner.
14133
15009
  * Controls the visibility of the announcement section
@@ -14177,6 +15053,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
14177
15053
  * ```
14178
15054
  */
14179
15055
  updatedSpotterExperience?: boolean;
15056
+ /**
15057
+ * If set to `true`, the answer edit panel is hidden.
15058
+ *
15059
+ * Supported embed types: `AppEmbed`
15060
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
15061
+ * @example
15062
+ * ```js
15063
+ * const embed = new AppEmbed('#tsEmbed', {
15064
+ * ... // other embed view config
15065
+ * hideAnswerEditPanel: true,
15066
+ * })
15067
+ * ```
15068
+ */
15069
+ hideAnswerEditPanel?: boolean;
14180
15070
  }
14181
15071
  /**
14182
15072
  * APP_INIT data shape for AppEmbed.
@@ -14192,9 +15082,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
14192
15082
  }
14193
15083
  declare class AppEmbed extends V1Embed {
14194
15084
  protected viewConfig: AppViewConfig;
14195
- private defaultHeight;
14196
- private lazyLoadScrollContainers;
14197
- private lazyLoadResizeObserver;
15085
+ private readonly fullHeightController?;
14198
15086
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
14199
15087
  /**
14200
15088
  * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
@@ -14215,27 +15103,11 @@ declare class AppEmbed extends V1Embed {
14215
15103
  */
14216
15104
  protected getEmbedParams(): string;
14217
15105
  protected getEmbedParamsObject(): any;
14218
- private sendFullHeightLazyLoadData;
14219
- /**
14220
- * This is a handler for the RequestVisibleEmbedCoordinates event.
14221
- * It is used to send the visible coordinates data to the host application.
14222
- * @param data The event payload
14223
- * @param responder The responder function
14224
- */
14225
- private requestVisibleEmbedCoordinatesHandler;
14226
15106
  /**
14227
15107
  * Constructs the URL of the ThoughtSpot app page to be rendered.
14228
15108
  * @param pageId The ID of the page to be embedded.
14229
15109
  */
14230
15110
  getIFrameSrc(): string;
14231
- /**
14232
- * Set the iframe height as per the computed height received
14233
- * from the ThoughtSpot app.
14234
- * @param data The event payload
14235
- */
14236
- protected updateIFrameHeight: (data: MessagePayload) => void;
14237
- private embedIframeCenter;
14238
- private setIframeHeightForNonEmbedLiveboard;
14239
15111
  /**
14240
15112
  * Gets the ThoughtSpot route of the page for a particular page ID.
14241
15113
  * @param pageId The identifier for a page in the ThoughtSpot app.
@@ -14266,8 +15138,6 @@ declare class AppEmbed extends V1Embed {
14266
15138
  */
14267
15139
  destroy(): void;
14268
15140
  private postRender;
14269
- private registerLazyLoadEvents;
14270
- private unregisterLazyLoadEvents;
14271
15141
  /**
14272
15142
  * Renders the embedded application pages in the ThoughtSpot app.
14273
15143
  * @param renderOptions An object containing the page ID
@@ -14289,71 +15159,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
14289
15159
  * The configuration for the embedded Liveboard or visualization page view.
14290
15160
  * @group Embed components
14291
15161
  */
14292
- export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14293
- /**
14294
- * If set to true, the embedded object container dynamically resizes
14295
- * according to the height of the Liveboard.
14296
- *
14297
- * **Note**: Using fullHeight loads all visualizations on the
14298
- * Liveboard simultaneously, which results in multiple warehouse
14299
- * queries and potentially a longer wait for the topmost
14300
- * visualizations to display on the screen.
14301
- * Setting `fullHeight` to `false` fetches visualizations
14302
- * incrementally as users scroll the page to view the charts and tables.
14303
- *
14304
- * From SDK 1.52.0, enabling `fullHeight` also turns on
14305
- * {@link lazyLoadingForFullHeight} and
14306
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
14307
- * they scroll into view. Set either flag to `false` to opt out.
14308
- *
14309
- *
14310
- * Supported embed types: `LiveboardEmbed`
14311
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
14312
- * @example
14313
- * ```js
14314
- * const embed = new LiveboardEmbed('#embed', {
14315
- * ... // other liveboard view config
14316
- * fullHeight: true,
14317
- * });
14318
- * ```
14319
- */
14320
- fullHeight?: boolean;
14321
- /**
14322
- * This is the minimum height (in pixels) for a full-height Liveboard.
14323
- * Setting this height helps resolve issues with empty Liveboards and
14324
- * other screens navigable from a Liveboard.
14325
- *
14326
- * Supported embed types: `LiveboardEmbed`
14327
- * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
14328
- * @deprecated Use `minimumHeight` instead.
14329
- * @default 500
14330
- * @example
14331
- * ```js
14332
- * const embed = new LiveboardEmbed('#embed', {
14333
- * ... // other liveboard view config
14334
- * fullHeight: true,
14335
- * defaultHeight: 600,
14336
- * });
14337
- * ```
14338
- */
14339
- defaultHeight?: number;
14340
- /**
14341
- * This is the minimum height (in pixels) for a full-height Liveboard.
14342
- * Setting this height helps resolve issues with empty Liveboards and
14343
- * other screens navigable from a Liveboard.
14344
- *
14345
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
14346
- * @default 500
14347
- * @example
14348
- * ```js
14349
- * const embed = new LiveboardEmbed('#embed', {
14350
- * ... // other liveboard view config
14351
- * fullHeight: true,
14352
- * minimumHeight: 600,
14353
- * });
14354
- * ```
14355
- */
14356
- minimumHeight?: number;
15162
+ export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14357
15163
  /**
14358
15164
  * If set to true, the context menu in visualizations will be enabled.
14359
15165
  * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
@@ -14643,9 +15449,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14643
15449
  */
14644
15450
  isPNGInScheduledEmailsEnabled?: boolean;
14645
15451
  /**
14646
- * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
14647
- * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
14648
- * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl.
15452
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
15453
+ * rendered on a single page following the exact UI layout, instead of splitting
15454
+ * visualizations across multiple A4 pages. This feature is GA from SDK version
15455
+ * 1.51.0 and ThoughtSpot version 26.8.0.cl.
14649
15456
  *
14650
15457
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
14651
15458
  * @type {boolean}
@@ -14697,77 +15504,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14697
15504
  * ```
14698
15505
  */
14699
15506
  isGranularXLSXCSVSchedulesEnabled?: boolean;
14700
- /**
14701
- * Loads visualizations only as they scroll into the viewport, instead of
14702
- * loading the whole full-height Liveboard at once.
14703
- *
14704
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
14705
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
14706
- * set explicitly. Set it to `false` to load every visualization upfront.
14707
- * The flag has no effect unless `fullHeight` is enabled.
14708
- *
14709
- * @type {boolean}
14710
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
14711
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
14712
- * @example
14713
- * ```js
14714
- * const embed = new LiveboardEmbed('#embed-container', {
14715
- * // ...other options
14716
- * fullHeight: true,
14717
- * lazyLoadingForFullHeight: true,
14718
- * })
14719
- * ```
14720
- */
14721
- lazyLoadingForFullHeight?: boolean;
14722
- /**
14723
- * Computes the visible region of the embed against its scrollable and
14724
- * clipping ancestors, instead of treating the browser window as the only
14725
- * viewport, and tracks scroll and resize on those ancestors.
14726
- *
14727
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
14728
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
14729
- * set explicitly. Set it to `false` when the page scrolls with the window
14730
- * and the embed has no clipping ancestor, to skip the extra ancestor
14731
- * tracking.
14732
- *
14733
- * @type {boolean}
14734
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
14735
- */
14736
- enableScrollableContainerLazyLoading?: boolean;
14737
- /**
14738
- * How far outside the viewport a visualization starts loading, when
14739
- * {@link lazyLoadingForFullHeight} is enabled.
14740
- *
14741
- * For example, if the margin is set to '10px',
14742
- * the visualization will be loaded 10px before its top edge is visible in the
14743
- * viewport.
14744
- *
14745
- * The format is similar to CSS margin, so `'500px 0px'` extends the
14746
- * prefetch 500px above and below the viewport and not sideways. Accepted
14747
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
14748
- * `auto`; an invalid value is logged and ignored.
14749
- *
14750
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
14751
- * visualization ahead of the scroll position, so a chart has usually
14752
- * finished loading by the time it scrolls into view. Use a smaller margin
14753
- * to cut warehouse queries further, or `'0px'` to load a visualization
14754
- * only once it is actually visible.
14755
- *
14756
- * @type {string}
14757
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
14758
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
14759
- * @example
14760
- * ```js
14761
- * const embed = new LiveboardEmbed('#embed-container', {
14762
- * // ...other options
14763
- * fullHeight: true,
14764
- * lazyLoadingForFullHeight: true,
14765
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
14766
- * lazyLoadingMargin: '0px',
14767
- * })
14768
- * ```
14769
- */
14770
- lazyLoadingMargin?: string;
14771
15507
  /**
14772
15508
  * showSpotterLimitations : show limitation text
14773
15509
  * of the spotter underneath the chat input.
@@ -14906,9 +15642,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14906
15642
  }
14907
15643
  declare class LiveboardEmbed extends V1Embed {
14908
15644
  protected viewConfig: LiveboardViewConfig;
14909
- private defaultHeight;
14910
- private lazyLoadScrollContainers;
14911
- private lazyLoadResizeObserver;
15645
+ private readonly fullHeightController?;
14912
15646
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
14913
15647
  protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
14914
15648
  /**
@@ -14918,27 +15652,11 @@ declare class LiveboardEmbed extends V1Embed {
14918
15652
  protected getEmbedParams(): string;
14919
15653
  protected getEmbedParamsObject(): any;
14920
15654
  private getIframeSuffixSrc;
14921
- private sendFullHeightLazyLoadData;
14922
- /**
14923
- * This is a handler for the RequestVisibleEmbedCoordinates event.
14924
- * It is used to send the visible coordinates data to the host application.
14925
- * @param data The event payload
14926
- * @param responder The responder function
14927
- */
14928
- private requestVisibleEmbedCoordinatesHandler;
14929
15655
  /**
14930
15656
  * Construct the URL of the embedded ThoughtSpot Liveboard or visualization
14931
15657
  * to be loaded within the iFrame.
14932
15658
  */
14933
15659
  private getIFrameSrc;
14934
- /**
14935
- * Set the iframe height as per the computed height received
14936
- * from the ThoughtSpot app.
14937
- * @param data The event payload
14938
- */
14939
- private updateIFrameHeight;
14940
- private embedIframeCenter;
14941
- private setIframeHeightForNonEmbedLiveboard;
14942
15660
  private setActiveTab;
14943
15661
  private showPreviewLoader;
14944
15662
  /**
@@ -14953,22 +15671,23 @@ declare class LiveboardEmbed extends V1Embed {
14953
15671
  personalizedViewId: string;
14954
15672
  };
14955
15673
  protected beforePrerenderVisible(): void;
15674
+ private isShowingLiveboardRoute;
14956
15675
  protected handleRenderForPrerender(): Promise<TsEmbed>;
14957
15676
  /**
14958
15677
  * Triggers an event to the embedded app
15678
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
15679
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
14959
15680
  * @param {HostEvent} messageType The event type
14960
- * @param {any} data The payload to send with the message
15681
+ * @param {TriggerData} data The payload, typed against the event's contract
14961
15682
  * @returns A promise that resolves with the response from the embedded app
14962
15683
  */
14963
- trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
15684
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
14964
15685
  /**
14965
15686
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
14966
15687
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
14967
15688
  */
14968
15689
  destroy(): void;
14969
15690
  private postRender;
14970
- private registerLazyLoadEvents;
14971
- private unregisterLazyLoadEvents;
14972
15691
  /**
14973
15692
  * Render an embedded ThoughtSpot Liveboard or visualization
14974
15693
  * @param renderOptions An object specifying the Liveboard ID,