@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
@@ -1300,6 +1300,280 @@ export class AnswerService {
1300
1300
  addDisplayedVizToLiveboard(liveboardId: string): Promise<any>;
1301
1301
  setTMLOverride(override: any): void;
1302
1302
  }
1303
+ export interface LiveboardTab {
1304
+ id: string;
1305
+ name: string;
1306
+ [key: string]: any;
1307
+ }
1308
+ export interface LiveboardGroup {
1309
+ id: string;
1310
+ name: string;
1311
+ [key: string]: any;
1312
+ }
1313
+ /**
1314
+ * Levels at which a filter or parameter can be applied.
1315
+ */
1316
+ export enum ApplicabilityLevel {
1317
+ Liveboard = "LIVEBOARD",
1318
+ Tab = "TAB",
1319
+ Group = "GROUP"
1320
+ }
1321
+ /**
1322
+ * Scopes a filter or parameter to a specific target.
1323
+ * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
1324
+ * is not required. `level` accepts the enum or its string value, e.g. `'TAB'`.
1325
+ */
1326
+ export interface Applicability {
1327
+ level: ApplicabilityLevel | `${ApplicabilityLevel}`;
1328
+ targetId?: string;
1329
+ }
1330
+ export interface FilterUpdate {
1331
+ column: string;
1332
+ oper: string;
1333
+ values: string[];
1334
+ type?: string;
1335
+ applicability?: Applicability;
1336
+ }
1337
+ export interface LiveboardFilter {
1338
+ applicability?: Applicability;
1339
+ [key: string]: any;
1340
+ }
1341
+ export interface LiveboardParameter {
1342
+ applicability?: Applicability;
1343
+ [key: string]: any;
1344
+ }
1345
+ export enum UIPassthroughEvent {
1346
+ PinAnswerToLiveboard = "addVizToPinboard",
1347
+ SaveAnswer = "saveAnswer",
1348
+ GetDiscoverabilityStatus = "getDiscoverabilityStatus",
1349
+ GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
1350
+ GetAnswerConfig = "getAnswerPageConfig",
1351
+ GetLiveboardConfig = "getPinboardPageConfig",
1352
+ GetUnsavedAnswerTML = "getUnsavedAnswerTML",
1353
+ UpdateFilters = "updateFilters",
1354
+ Drilldown = "drillDown",
1355
+ GetAnswerSession = "getAnswerSession",
1356
+ GetFilters = "getFilters",
1357
+ GetIframeUrl = "getIframeUrl",
1358
+ GetParameters = "getParameters",
1359
+ GetTML = "getTML",
1360
+ GetTabs = "getTabs",
1361
+ GetGroups = "getGroups",
1362
+ GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
1363
+ }
1364
+ /**
1365
+ * UI passthrough contract. Each event's request/response is a named interface so it
1366
+ * documents and imports cleanly; `UIPassthroughContractBase` maps events to the pairs.
1367
+ */
1368
+ /** Request for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
1369
+ export interface PinAnswerToLiveboardRequest {
1370
+ vizId?: string;
1371
+ newVizName: string;
1372
+ newVizDescription?: string;
1373
+ liveboardId?: string;
1374
+ tabId?: string;
1375
+ newLiveboardName?: string;
1376
+ newTabName?: string;
1377
+ }
1378
+ /** Response for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
1379
+ export interface PinAnswerToLiveboardResponse {
1380
+ liveboardId: string;
1381
+ tabId: string;
1382
+ vizId: string;
1383
+ }
1384
+ /** Request for {@link UIPassthroughEvent.SaveAnswer}. */
1385
+ export interface SaveAnswerRequest {
1386
+ name: string;
1387
+ description: string;
1388
+ vizId?: string;
1389
+ isDiscoverable?: boolean;
1390
+ }
1391
+ /** Response for {@link UIPassthroughEvent.SaveAnswer}. */
1392
+ export interface SaveAnswerResponse {
1393
+ answerId: string;
1394
+ saveResponse?: any;
1395
+ shareResponse?: any;
1396
+ }
1397
+ /** Response for {@link UIPassthroughEvent.GetDiscoverabilityStatus}. */
1398
+ export interface GetDiscoverabilityStatusResponse {
1399
+ shouldShowDiscoverability: boolean;
1400
+ isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
1401
+ }
1402
+ /** Response for {@link UIPassthroughEvent.GetAvailableUIPassthroughs}. */
1403
+ export interface GetAvailableUIPassthroughsResponse {
1404
+ keys: string[];
1405
+ }
1406
+ /** Request for {@link UIPassthroughEvent.GetAnswerConfig}. */
1407
+ export interface GetAnswerConfigRequest {
1408
+ vizId?: string;
1409
+ }
1410
+ /** Request for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
1411
+ export interface GetUnsavedAnswerTMLRequest {
1412
+ sessionId?: string;
1413
+ vizId?: string;
1414
+ }
1415
+ /** Response for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
1416
+ export interface GetUnsavedAnswerTMLResponse {
1417
+ tml: string;
1418
+ }
1419
+ /** Request for {@link UIPassthroughEvent.GetAnswerSession}. */
1420
+ export interface GetAnswerSessionRequest {
1421
+ vizId?: string;
1422
+ }
1423
+ /** Response for {@link UIPassthroughEvent.GetAnswerSession}. */
1424
+ export interface GetAnswerSessionResponse {
1425
+ session: SessionInterface;
1426
+ embedAnswerData?: Record<string, any>;
1427
+ }
1428
+ /** Request for {@link UIPassthroughEvent.GetFilters}. */
1429
+ export interface GetFiltersRequest {
1430
+ vizId?: string;
1431
+ }
1432
+ /** Response for {@link UIPassthroughEvent.GetFilters}. */
1433
+ export interface GetFiltersResponse {
1434
+ liveboardFilters: LiveboardFilter[];
1435
+ runtimeFilters: RuntimeFilter[];
1436
+ }
1437
+ /** Response for {@link UIPassthroughEvent.GetIframeUrl}. */
1438
+ export interface GetIframeUrlResponse {
1439
+ iframeUrl: string;
1440
+ }
1441
+ /** Response for {@link UIPassthroughEvent.GetParameters}. */
1442
+ export interface GetParametersResponse {
1443
+ parameters: LiveboardParameter[];
1444
+ }
1445
+ /** Request for {@link UIPassthroughEvent.GetTML}. */
1446
+ export interface GetTMLRequest {
1447
+ vizId?: string;
1448
+ includeNonExecutedSearchTokens?: boolean;
1449
+ }
1450
+ /** Response for {@link UIPassthroughEvent.GetTabs}. */
1451
+ export interface GetTabsResponse {
1452
+ orderedTabIds: string[];
1453
+ numberOfTabs: number;
1454
+ Tabs: LiveboardTab[];
1455
+ }
1456
+ /** Response for {@link UIPassthroughEvent.GetGroups}. */
1457
+ export interface GetGroupsResponse {
1458
+ orderedGroupIds: string[];
1459
+ numberOfGroups: number;
1460
+ Groups: LiveboardGroup[];
1461
+ }
1462
+ /** Response for {@link UIPassthroughEvent.GetExportRequestForCurrentPinboard}. */
1463
+ export interface GetExportRequestForCurrentPinboardResponse {
1464
+ data: {
1465
+ v2Content: string;
1466
+ };
1467
+ type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
1468
+ }
1469
+ /**
1470
+ * Request for {@link UIPassthroughEvent.UpdateFilters}. Not the host-event
1471
+ * `UpdateFiltersRequest` (host-event-contracts.ts), which has a different shape.
1472
+ */
1473
+ export interface UpdateFiltersPassthroughRequest {
1474
+ filter?: FilterUpdate;
1475
+ filters?: FilterUpdate[];
1476
+ }
1477
+ /** Request for {@link UIPassthroughEvent.Drilldown}. */
1478
+ export interface DrilldownRequest {
1479
+ points: {
1480
+ selectedPoints?: string[];
1481
+ clickedPoint?: string;
1482
+ };
1483
+ columnGuid?: string;
1484
+ autoDrillDown?: boolean;
1485
+ vizId?: string;
1486
+ }
1487
+ /** Maps each UI passthrough event to its request/response pair. */
1488
+ export type UIPassthroughContractBase = {
1489
+ [UIPassthroughEvent.PinAnswerToLiveboard]: {
1490
+ request: PinAnswerToLiveboardRequest;
1491
+ response: PinAnswerToLiveboardResponse;
1492
+ };
1493
+ [UIPassthroughEvent.SaveAnswer]: {
1494
+ request: SaveAnswerRequest;
1495
+ response: SaveAnswerResponse;
1496
+ };
1497
+ [UIPassthroughEvent.GetDiscoverabilityStatus]: {
1498
+ request: any;
1499
+ response: GetDiscoverabilityStatusResponse;
1500
+ };
1501
+ [UIPassthroughEvent.GetAvailableUIPassthroughs]: {
1502
+ request: any;
1503
+ response: GetAvailableUIPassthroughsResponse;
1504
+ };
1505
+ [UIPassthroughEvent.GetAnswerConfig]: {
1506
+ request: GetAnswerConfigRequest;
1507
+ response: any;
1508
+ };
1509
+ [UIPassthroughEvent.GetLiveboardConfig]: {
1510
+ request: any;
1511
+ response: any;
1512
+ };
1513
+ [UIPassthroughEvent.GetUnsavedAnswerTML]: {
1514
+ request: GetUnsavedAnswerTMLRequest;
1515
+ response: GetUnsavedAnswerTMLResponse;
1516
+ };
1517
+ [UIPassthroughEvent.GetAnswerSession]: {
1518
+ request: GetAnswerSessionRequest;
1519
+ response: GetAnswerSessionResponse;
1520
+ };
1521
+ [UIPassthroughEvent.GetFilters]: {
1522
+ request: GetFiltersRequest;
1523
+ response: GetFiltersResponse;
1524
+ };
1525
+ [UIPassthroughEvent.GetIframeUrl]: {
1526
+ request: Record<string, never>;
1527
+ response: GetIframeUrlResponse;
1528
+ };
1529
+ [UIPassthroughEvent.GetParameters]: {
1530
+ request: Record<string, never>;
1531
+ response: GetParametersResponse;
1532
+ };
1533
+ [UIPassthroughEvent.GetTML]: {
1534
+ request: GetTMLRequest;
1535
+ response: Record<string, any>;
1536
+ };
1537
+ [UIPassthroughEvent.GetTabs]: {
1538
+ request: Record<string, never>;
1539
+ response: GetTabsResponse;
1540
+ };
1541
+ [UIPassthroughEvent.GetGroups]: {
1542
+ request: Record<string, never>;
1543
+ response: GetGroupsResponse;
1544
+ };
1545
+ [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
1546
+ request: Record<string, never>;
1547
+ response: GetExportRequestForCurrentPinboardResponse;
1548
+ };
1549
+ [UIPassthroughEvent.UpdateFilters]: {
1550
+ request: UpdateFiltersPassthroughRequest;
1551
+ response: unknown;
1552
+ };
1553
+ [UIPassthroughEvent.Drilldown]: {
1554
+ request: DrilldownRequest;
1555
+ response: unknown;
1556
+ };
1557
+ };
1558
+ export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
1559
+ export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
1560
+ export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
1561
+ refId?: string;
1562
+ value?: UIPassthroughResponse<ApiName>;
1563
+ error?: any;
1564
+ }>;
1565
+ export type EmbedApiHostEventMapping = {
1566
+ [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
1567
+ [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
1568
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
1569
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
1570
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
1571
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
1572
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
1573
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
1574
+ [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
1575
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
1576
+ };
1303
1577
  /**
1304
1578
  * The authentication mechanism for allowing access to
1305
1579
  * the embedded app
@@ -3734,6 +4008,15 @@ export interface RuntimeParameter {
3734
4008
  * Values
3735
4009
  */
3736
4010
  value: number | boolean | string;
4011
+ /**
4012
+ * Whether the parameter is visible to the user (`UpdateParameters` only).
4013
+ */
4014
+ isVisibleToUser?: boolean;
4015
+ /**
4016
+ * Scope of the update (`UpdateParameters` only). Omitting it, or `level`,
4017
+ * targets the Liveboard level.
4018
+ */
4019
+ applicability?: Applicability;
3737
4020
  }
3738
4021
  /**
3739
4022
  * Event types emitted by the embedded ThoughtSpot application.
@@ -4185,6 +4468,9 @@ export enum EmbedEvent {
4185
4468
  Download = "download",
4186
4469
  /**
4187
4470
  * Emitted when the download action is triggered on an Answer.
4471
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4472
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4473
+ * accepts the union now; per-context enforced next release.
4188
4474
  * Use start:true to subscribe to when download is initiated, or end:true to
4189
4475
  * subscribe to when download is completed. Default is end:true.
4190
4476
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
@@ -4201,6 +4487,9 @@ export enum EmbedEvent {
4201
4487
  DownloadAsPng = "downloadAsPng",
4202
4488
  /**
4203
4489
  * Emitted when the Download as PDF action is triggered on an Answer
4490
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
4491
+ * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
4492
+ * accepts the union now; per-context enforced next release.
4204
4493
  * Use start:true to subscribe to when download as PDF is initiated, or end:true to
4205
4494
  * subscribe to when download as PDF is completed. Default is end:true.
4206
4495
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4217,6 +4506,9 @@ export enum EmbedEvent {
4217
4506
  DownloadAsPdf = "downloadAsPdf",
4218
4507
  /**
4219
4508
  * Emitted when the Download as CSV action is triggered on an Answer.
4509
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4510
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4511
+ * accepts the union now; per-context enforced next release.
4220
4512
  * Use start:true to subscribe to when download as CSV is initiated, or end:true to
4221
4513
  * subscribe to when download as CSV is completed. Default is end:true.
4222
4514
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4233,6 +4525,9 @@ export enum EmbedEvent {
4233
4525
  DownloadAsCsv = "downloadAsCsv",
4234
4526
  /**
4235
4527
  * Emitted when the Download as XLSX action is triggered on an Answer.
4528
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4529
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4530
+ * accepts the union now; per-context enforced next release.
4236
4531
  * Use start:true to subscribe to when download as XLSX is initiated, or end:true to
4237
4532
  * subscribe to when download as XLSX is completed. Default is end:true.
4238
4533
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4511,6 +4806,9 @@ export enum EmbedEvent {
4511
4806
  Schedule = "subscription",
4512
4807
  /**
4513
4808
  * Emitted when a user clicks **Edit** on a Liveboard or visualization
4809
+ * Payload varies by context: {@link VizScopedRequest} (Liveboard),
4810
+ * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
4811
+ * union now; per-context enforced next release.
4514
4812
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4515
4813
  * @example
4516
4814
  * ```js
@@ -5589,6 +5887,7 @@ export enum HostEvent {
5589
5887
  * the search query string.
5590
5888
  * Supported in `AppEmbed` and `SearchEmbed` deployments.
5591
5889
  * Includes the following properties:
5890
+ * Payload: {@link SearchRequest}.
5592
5891
  * @param - Includes the following keys:
5593
5892
  * - `searchQuery`: Query string with search tokens.
5594
5893
  * - `dataSources`: Data source GUID to search on.
@@ -5616,6 +5915,9 @@ export enum HostEvent {
5616
5915
  Search = "search",
5617
5916
  /**
5618
5917
  * Triggers a drill on certain points of the specified column
5918
+ * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
5919
+ * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
5920
+ * enforced next release.
5619
5921
  * Includes the following properties:
5620
5922
  * @param - Includes the following keys:
5621
5923
  * - `points`: An object containing `selectedPoints` and/or `clickedPoint`
@@ -5695,6 +5997,8 @@ export enum HostEvent {
5695
5997
  Reload = "reload",
5696
5998
  /**
5697
5999
  * Get iframe URL for the current embed view.
6000
+ * Payload: none.
6001
+ * Response: {@link GetIframeUrlResponse}.
5698
6002
  * @example
5699
6003
  * ```js
5700
6004
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -5713,6 +6017,7 @@ export enum HostEvent {
5713
6017
  GetIframeUrl = "GetIframeUrl",
5714
6018
  /**
5715
6019
  * Display specific visualizations on a Liveboard.
6020
+ * Payload: `string[]`.
5716
6021
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
5717
6022
  * in this parameter will be hidden.
5718
6023
  * @example
@@ -5735,6 +6040,7 @@ export enum HostEvent {
5735
6040
  SetVisibleVizs = "SetPinboardVisibleVizs",
5736
6041
  /**
5737
6042
  * Set a Liveboard tab as an active tab.
6043
+ * Payload: {@link SetActiveTabRequest}.
5738
6044
  * @param - tabId - string of id of Tab to show
5739
6045
  * @example
5740
6046
  * ```js
@@ -5762,6 +6068,7 @@ export enum HostEvent {
5762
6068
  * and `AppEmbed` only. In full application embedding, this event updates
5763
6069
  * the runtime filters applied on the Liveboard and saved Answer objects.
5764
6070
  *
6071
+ * Payload: {@link RuntimeFilter}[].
5765
6072
  * @param - Array of {@link RuntimeFilter} objects. Each item includes:
5766
6073
  * - `columnName`: Name of the column to filter on.
5767
6074
  * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
@@ -5803,6 +6110,7 @@ export enum HostEvent {
5803
6110
  * Accepts either a plain value or an object with `path`
5804
6111
  * and an optional `replace` flag.
5805
6112
  *
6113
+ * Payload: `string` | `number` | {@link NavigateRequest}.
5806
6114
  * @param data - A string path, a numeric history delta, or an object
5807
6115
  * `{ path: string | number, replace?: boolean }`.
5808
6116
  * - `path` — the route to navigate to, or a history delta such as `1`
@@ -5830,6 +6138,9 @@ export enum HostEvent {
5830
6138
  /**
5831
6139
  * Open the filter panel for a particular column.
5832
6140
  * Works with Search and Liveboard embed.
6141
+ * Payload: {@link OpenFilterRequest} (the cross-context superset). The
6142
+ * accepted fields vary by context: {@link OpenFilterLiveboardRequest},
6143
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
5833
6144
  * @param - { columnId: string,
5834
6145
  * name: string,
5835
6146
  * type: ATTRIBUTE/MEASURE,
@@ -5912,6 +6223,7 @@ export enum HostEvent {
5912
6223
  /**
5913
6224
  * Open the parameter panel for a particular parameter on a Liveboard.
5914
6225
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
6226
+ * Payload: {@link OpenParameterRequest}.
5915
6227
  * @param - Includes the following keys:
5916
6228
  * - `parameter`: An object identifying the parameter to open, for
5917
6229
  * example, `{ parameterId: '<parameter-GUID>' }`.
@@ -5943,6 +6255,7 @@ export enum HostEvent {
5943
6255
  OpenParameter = "openParameter",
5944
6256
  /**
5945
6257
  * Add columns to the current search query.
6258
+ * Payload: `{ columnIds: string[] }`.
5946
6259
  * @param - { columnIds: string[] }
5947
6260
  * @example
5948
6261
  * ```js
@@ -5961,6 +6274,7 @@ export enum HostEvent {
5961
6274
  AddColumns = "addColumns",
5962
6275
  /**
5963
6276
  * Remove a column from the current search query.
6277
+ * Payload: `{ columnId: string }`.
5964
6278
  * @param - { columnId: string }
5965
6279
  * @example
5966
6280
  * ```js
@@ -5985,6 +6299,8 @@ export enum HostEvent {
5985
6299
  * sorting, toggling of legends, and data drill down.
5986
6300
  * For more information, see
5987
6301
  * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
6302
+ * Payload: none.
6303
+ * Response: {@link GetExportRequestForCurrentPinboardResponse}.
5988
6304
  * @example
5989
6305
  * ```js
5990
6306
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
@@ -6006,6 +6322,8 @@ export enum HostEvent {
6006
6322
  * requiring additional user input via the *Pin to Liveboard* modal, define
6007
6323
  * the following parameters:
6008
6324
  *
6325
+ * Payload: {@link PinAnswerToLiveboardRequest}.
6326
+ * Response: {@link PinAnswerToLiveboardResponse}.
6009
6327
  * @param - Includes the following keys:
6010
6328
  * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
6011
6329
  * Liveboard.
@@ -6120,6 +6438,7 @@ export enum HostEvent {
6120
6438
  LiveboardInfo = "pinboardInfo",
6121
6439
  /**
6122
6440
  * Trigger the **Schedule** action on an embedded Liveboard.
6441
+ * Payload: {@link VizScopedRequest}.
6123
6442
  * @example
6124
6443
  * ```js
6125
6444
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -6135,6 +6454,7 @@ export enum HostEvent {
6135
6454
  Schedule = "subscription",
6136
6455
  /**
6137
6456
  * Trigger the **Manage schedule** action on an embedded Liveboard
6457
+ * Payload: {@link VizScopedRequest}.
6138
6458
  * @example
6139
6459
  * ```js
6140
6460
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
@@ -6151,6 +6471,7 @@ export enum HostEvent {
6151
6471
  /**
6152
6472
  * Trigger the **Export TML** action on an embedded Liveboard or
6153
6473
  * Answer.
6474
+ * Payload: {@link VizScopedRequest}.
6154
6475
  * @example
6155
6476
  * ```js
6156
6477
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -6173,6 +6494,7 @@ export enum HostEvent {
6173
6494
  /**
6174
6495
  * Trigger the **Edit TML** action on an embedded Liveboard or
6175
6496
  * saved Answers in the full application embedding.
6497
+ * Payload: {@link VizScopedRequest}.
6176
6498
  * @example
6177
6499
  * ```js
6178
6500
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -6194,6 +6516,7 @@ export enum HostEvent {
6194
6516
  EditTML = "editTSL",
6195
6517
  /**
6196
6518
  * Trigger the **Update TML** action on an embedded Liveboard.
6519
+ * Payload: {@link VizScopedRequest}.
6197
6520
  * @example
6198
6521
  * ```js
6199
6522
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -6211,6 +6534,7 @@ export enum HostEvent {
6211
6534
  * Trigger the **Download PDF** action on an embedded Liveboard,
6212
6535
  * visualization or Answer.
6213
6536
  *
6537
+ * Payload: {@link VizScopedRequest} plus optional `liveboardId`.
6214
6538
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
6215
6539
  *
6216
6540
  * **NOTE**: The **Download** > **PDF** action is available on
@@ -6261,6 +6585,7 @@ export enum HostEvent {
6261
6585
  /**
6262
6586
  * Trigger the **AI Highlights** action on an embedded Liveboard
6263
6587
  *
6588
+ * Payload: none.
6264
6589
  * @example
6265
6590
  * ```js
6266
6591
  * liveboardEmbed.trigger(HostEvent.AIHighlights)
@@ -6315,6 +6640,9 @@ export enum HostEvent {
6315
6640
  MakeACopy = "makeACopy",
6316
6641
  /**
6317
6642
  * Trigger the **Delete** action for a Liveboard.
6643
+ * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
6644
+ * required), {@link VizScopedRequest} (Search). trigger() accepts the union
6645
+ * now; per-context enforced next release.
6318
6646
  * @example
6319
6647
  * ```js
6320
6648
  * appEmbed.trigger(HostEvent.Remove)
@@ -6329,6 +6657,7 @@ export enum HostEvent {
6329
6657
  Remove = "delete",
6330
6658
  /**
6331
6659
  * Trigger the **Explore** action on a visualization.
6660
+ * Payload: {@link RequiredVizRequest}.
6332
6661
  * @param - an object with `vizId` as a key
6333
6662
  * @example
6334
6663
  * ```js
@@ -6348,6 +6677,7 @@ export enum HostEvent {
6348
6677
  /**
6349
6678
  * Trigger the **Create alert** action on a KPI chart
6350
6679
  * in a Liveboard or saved Answer.
6680
+ * Payload: {@link VizScopedRequest}.
6351
6681
  * @param - an object with `vizId` as a key
6352
6682
  * @example
6353
6683
  * ```js
@@ -6379,6 +6709,7 @@ export enum HostEvent {
6379
6709
  /**
6380
6710
  * Trigger the **Manage alerts** action on a KPI chart
6381
6711
  * in a visualization or saved Answer.
6712
+ * Payload: {@link VizScopedRequest}.
6382
6713
  * @param - an object with `vizId` as a key
6383
6714
  * @example
6384
6715
  * ```js
@@ -6416,6 +6747,7 @@ export enum HostEvent {
6416
6747
  * on a Liveboard.
6417
6748
  *
6418
6749
  * This event is not supported in visualization embed and search embed.
6750
+ * Payload: {@link VizScopedRequest}.
6419
6751
  * @param - Object parameter. Includes the following keys:
6420
6752
  * - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
6421
6753
  * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
@@ -6458,6 +6790,7 @@ export enum HostEvent {
6458
6790
  Edit = "edit",
6459
6791
  /**
6460
6792
  * Trigger the **Copy link** action on a Liveboard or visualization
6793
+ * Payload: {@link VizScopedRequest}.
6461
6794
  * @param - object - to trigger the action for a
6462
6795
  * specific visualization in Liveboard embed, pass in `vizId` as a key
6463
6796
  * @example
@@ -6503,6 +6836,7 @@ export enum HostEvent {
6503
6836
  CopyLink = "embedDocument",
6504
6837
  /**
6505
6838
  * Trigger the **Present** action on a Liveboard or visualization
6839
+ * Payload: {@link VizScopedRequest}.
6506
6840
  * @param - object - to trigger the action for a specific visualization
6507
6841
  * in Liveboard embed, pass in `vizId` as a key
6508
6842
  * @example
@@ -6548,6 +6882,8 @@ export enum HostEvent {
6548
6882
  Present = "present",
6549
6883
  /**
6550
6884
  * Get TML for the current search.
6885
+ * Payload: {@link GetTMLRequest}.
6886
+ * Response: `Record<string, any>`.
6551
6887
  * @example
6552
6888
  * ```js
6553
6889
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
@@ -6597,6 +6933,7 @@ export enum HostEvent {
6597
6933
  * Trigger the **Show underlying data** action on a
6598
6934
  * chart or table.
6599
6935
  *
6936
+ * Payload: {@link VizScopedRequest}.
6600
6937
  * @param - an object with vizId as a key
6601
6938
  * @example
6602
6939
  * ```js
@@ -6630,6 +6967,7 @@ export enum HostEvent {
6630
6967
  * Trigger the **Delete** action for a visualization
6631
6968
  * in an embedded Liveboard, or a chart or table
6632
6969
  * generated from Search.
6970
+ * Payload: {@link VizScopedRequest}.
6633
6971
  * @param - Liveboard embed takes an object with `vizId` as a key.
6634
6972
  * Can be left empty if embedding Search or visualization.
6635
6973
  * @example
@@ -6658,6 +6996,7 @@ export enum HostEvent {
6658
6996
  /**
6659
6997
  * Trigger the **SpotIQ analyze** action on a
6660
6998
  * chart or table.
6999
+ * Payload: {@link VizScopedRequest}.
6661
7000
  * @param - Liveboard embed takes `vizId` as a
6662
7001
  * key. Can be left undefined when embedding Search or
6663
7002
  * visualization.
@@ -6720,6 +7059,7 @@ export enum HostEvent {
6720
7059
  /**
6721
7060
  * Trigger the **Download** > **PNG** action on
6722
7061
  * charts in the embedded view.
7062
+ * Payload: {@link VizScopedRequest}.
6723
7063
  * @example
6724
7064
  * ```js
6725
7065
  * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
@@ -6750,6 +7090,7 @@ export enum HostEvent {
6750
7090
  /**
6751
7091
  * Trigger the **Download** > **CSV** action on tables in
6752
7092
  * the embedded view.
7093
+ * Payload: {@link VizScopedRequest}.
6753
7094
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
6754
7095
  * @example
6755
7096
  * ```js
@@ -6789,6 +7130,7 @@ export enum HostEvent {
6789
7130
  /**
6790
7131
  * Trigger the **Download** > **XLSX** action on tables
6791
7132
  * in the embedded view.
7133
+ * Payload: {@link VizScopedRequest}.
6792
7134
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
6793
7135
  * @example
6794
7136
  * ```js
@@ -6828,6 +7170,7 @@ export enum HostEvent {
6828
7170
  /**
6829
7171
  * Trigger the **Share** action on an embedded
6830
7172
  * Liveboard or Answer.
7173
+ * Payload: {@link VizScopedRequest}.
6831
7174
  * @example
6832
7175
  * ```js
6833
7176
  * liveboardEmbed.trigger(HostEvent.Share)
@@ -6854,6 +7197,7 @@ export enum HostEvent {
6854
7197
  * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
6855
7198
  * Saves the changes.
6856
7199
  *
7200
+ * Payload: {@link VizScopedRequest}.
6857
7201
  * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
6858
7202
  * It is required and can be retrieved from the data embed event.
6859
7203
  *
@@ -6905,6 +7249,7 @@ export enum HostEvent {
6905
7249
  /**
6906
7250
  * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
6907
7251
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
7252
+ * Payload: {@link VizScopedRequest}.
6908
7253
  * @param - an object with `vizId` as a key
6909
7254
  * @example
6910
7255
  * ```js
@@ -6935,6 +7280,7 @@ export enum HostEvent {
6935
7280
  * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
6936
7281
  * Sends data from an Answer or Liveboard visualization to third-party apps such
6937
7282
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
7283
+ * Payload: {@link VizScopedRequest}.
6938
7284
  * @param - an object with vizId as a key
6939
7285
  * @example
6940
7286
  * ```js
@@ -6965,6 +7311,7 @@ export enum HostEvent {
6965
7311
  * Trigger the **Manage pipelines** action on an embedded
6966
7312
  * visualization or Answer.
6967
7313
  * Allows users to manage ThoughtSpot Sync pipelines.
7314
+ * Payload: {@link VizScopedRequest}.
6968
7315
  * @param - an object with `vizId` as a key
6969
7316
  * @example
6970
7317
  * ```js
@@ -6993,6 +7340,7 @@ export enum HostEvent {
6993
7340
  ManagePipelines = "manage-pipeline",
6994
7341
  /**
6995
7342
  * Reset search operation on the Search or Answer page.
7343
+ * Payload: none.
6996
7344
  * @example
6997
7345
  * ```js
6998
7346
  * searchEmbed.trigger(HostEvent.ResetSearch)
@@ -7020,10 +7368,18 @@ export enum HostEvent {
7020
7368
  * whole Liveboard.
7021
7369
  * The `applicability` attribute is available from SDK: 1.53.0 |
7022
7370
  * ThoughtSpot: 26.10.0.cl.
7371
+ * Payload: {@link GetFiltersRequest}.
7372
+ * Response: {@link GetFiltersResponse}.
7023
7373
  * @example
7024
7374
  * ```js
7025
7375
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
7026
7376
  * console.log('data', data);
7377
+ * // {
7378
+ * // liveboardFilters: [ ... ],
7379
+ * // runtimeFilters: [
7380
+ * // { columnName: "Region", operator: "IN", values: ["West"] }
7381
+ * // ]
7382
+ * // }
7027
7383
  * ```
7028
7384
  * @example
7029
7385
  * ```js
@@ -7039,6 +7395,7 @@ export enum HostEvent {
7039
7395
  GetFilters = "getFilters",
7040
7396
  /**
7041
7397
  * Update one or several filters applied on a Liveboard.
7398
+ * Payload: {@link UpdateFiltersRequest}.
7042
7399
  * @param - Includes the following keys:
7043
7400
  * - `filter`: A single filter object containing column name, filter operator, and
7044
7401
  * values.
@@ -7047,9 +7404,9 @@ export enum HostEvent {
7047
7404
  *
7048
7405
  * Each filter object must include the following attributes:
7049
7406
  *
7050
- * `column` - Name of the column to filter on.
7407
+ * `columnName` - Name of the column to filter on.
7051
7408
  *
7052
- * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
7409
+ * `operator` - Filter operator, for example, EQ, IN, CONTAINS.
7053
7410
  * For information about the supported filter operators,
7054
7411
  * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
7055
7412
  *
@@ -7076,8 +7433,8 @@ export enum HostEvent {
7076
7433
  *
7077
7434
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7078
7435
  * filter: {
7079
- * column: "item type",
7080
- * oper: "IN",
7436
+ * columnName: "item type",
7437
+ * operator: "IN",
7081
7438
  * values: ["bags","shirts"]
7082
7439
  * }
7083
7440
  * });
@@ -7087,8 +7444,8 @@ export enum HostEvent {
7087
7444
  *
7088
7445
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7089
7446
  * filter: {
7090
- * column: "date",
7091
- * oper: "EQ",
7447
+ * columnName: "date",
7448
+ * operator: "EQ",
7092
7449
  * values: ["JULY","2023"],
7093
7450
  * type: "MONTH_YEAR"
7094
7451
  * }
@@ -7099,18 +7456,18 @@ export enum HostEvent {
7099
7456
  * ```js
7100
7457
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7101
7458
  * filters: [{
7102
- * column: "Item Type",
7103
- * oper: 'IN',
7459
+ * columnName: "Item Type",
7460
+ * operator: 'IN',
7104
7461
  * values: ["bags","shirts"]
7105
7462
  * },
7106
7463
  * {
7107
- * column: "Region",
7108
- * oper: 'IN',
7464
+ * columnName: "Region",
7465
+ * operator: 'IN',
7109
7466
  * values: ["West","Midwest"]
7110
7467
  * },
7111
7468
  * {
7112
- * column: "Date",
7113
- * oper: 'EQ',
7469
+ * columnName: "Date",
7470
+ * operator: 'EQ',
7114
7471
  * values: ["2023-07-31"],
7115
7472
  * type: "EXACT_DATE"
7116
7473
  * }]
@@ -7124,13 +7481,13 @@ export enum HostEvent {
7124
7481
  * ```js
7125
7482
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7126
7483
  * filters: [{
7127
- * column: "(Sample) Retail - Apparel::city",
7128
- * oper: 'IN',
7484
+ * columnName: "(Sample) Retail - Apparel::city",
7485
+ * operator: 'IN',
7129
7486
  * values: ["atlanta"]
7130
7487
  * },
7131
7488
  * {
7132
- * column: "(Sample) Retail - Apparel::Region",
7133
- * oper: 'IN',
7489
+ * columnName: "(Sample) Retail - Apparel::Region",
7490
+ * operator: 'IN',
7134
7491
  * values: ["West","Midwest"]
7135
7492
  * }]
7136
7493
  * });
@@ -7141,8 +7498,8 @@ export enum HostEvent {
7141
7498
  * import { ContextType } from '@thoughtspot/visual-embed-sdk';
7142
7499
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7143
7500
  * filter: {
7144
- * column: "item type",
7145
- * oper: "IN",
7501
+ * columnName: "item type",
7502
+ * operator: "IN",
7146
7503
  * values: ["shoes", "boots"]
7147
7504
  * }
7148
7505
  * }, ContextType.Liveboard);
@@ -7152,8 +7509,8 @@ export enum HostEvent {
7152
7509
  * // Scope the filter to a specific Liveboard tab
7153
7510
  * liveboardEmbed.trigger(HostEvent.UpdateFilters, {
7154
7511
  * filter: {
7155
- * column: "item type",
7156
- * oper: "IN",
7512
+ * columnName: "item type",
7513
+ * operator: "IN",
7157
7514
  * values: ["bags", "shirts"],
7158
7515
  * applicability: {
7159
7516
  * level: "TAB",
@@ -7162,11 +7519,19 @@ export enum HostEvent {
7162
7519
  * }
7163
7520
  * });
7164
7521
  * ```
7522
+ * Use `columnName` and `operator` - the same spelling as
7523
+ * {@link RuntimeFilter}. The older `column` and `oper` spellings are
7524
+ * deprecated; they are still accepted, but pass only one spelling of each
7525
+ * field, never both. To reapply the filter state captured from
7526
+ * {@link EmbedEvent.FilterChanged}, use `convertFilterChangedToUpdateFiltersPayload`
7527
+ * to convert its payload into the shape expected here.
7165
7528
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
7166
7529
  */
7167
7530
  UpdateFilters = "updateFilters",
7168
7531
  /**
7169
7532
  * Get tab details for the current Liveboard.
7533
+ * Payload: none.
7534
+ * Response: {@link GetTabsResponse}.
7170
7535
  * @example
7171
7536
  * ```js
7172
7537
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -7192,6 +7557,8 @@ export enum HostEvent {
7192
7557
  /**
7193
7558
  * Get group details for the current Liveboard.
7194
7559
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
7560
+ * Payload: none.
7561
+ * Response: {@link GetGroupsResponse}.
7195
7562
  * @example
7196
7563
  * ```js
7197
7564
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -7216,6 +7583,7 @@ export enum HostEvent {
7216
7583
  GetGroups = "getGroups",
7217
7584
  /**
7218
7585
  * Set the visible tabs on a Liveboard.
7586
+ * Payload: `string[]`.
7219
7587
  * @param - an array of ids of tabs to show, the IDs not passed
7220
7588
  * will be hidden.
7221
7589
  * @example
@@ -7238,6 +7606,7 @@ export enum HostEvent {
7238
7606
  SetVisibleTabs = "SetPinboardVisibleTabs",
7239
7607
  /**
7240
7608
  * Set the hidden tabs on a Liveboard.
7609
+ * Payload: `string[]`.
7241
7610
  * @param - an array of the IDs of the tabs to hide.
7242
7611
  * The IDs not passed will be shown.
7243
7612
  * @example
@@ -7266,6 +7635,8 @@ export enum HostEvent {
7266
7635
  * `getAnswerService()` method on the embed instance to get an AnswerService
7267
7636
  * object that provides a more convenient interface for working with answers.
7268
7637
  *
7638
+ * Payload: {@link GetAnswerSessionRequest}.
7639
+ * Response: {@link GetAnswerSessionResponse}.
7269
7640
  * @example
7270
7641
  * ```js
7271
7642
  * // Preferred way to get an AnswerService
@@ -7293,6 +7664,7 @@ export enum HostEvent {
7293
7664
  GetAnswerSession = "getAnswerSession",
7294
7665
  /**
7295
7666
  * Trigger the *Ask Sage* action for visualizations
7667
+ * Payload: {@link RequiredVizRequest}.
7296
7668
  * @example
7297
7669
  * ```js
7298
7670
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -7304,6 +7676,7 @@ export enum HostEvent {
7304
7676
  /**
7305
7677
  * Trigger cross filter update action on a Liveboard.
7306
7678
  *
7679
+ * Payload: {@link UpdateCrossFilterRequest}.
7307
7680
  * @example
7308
7681
  * ```js
7309
7682
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -7319,7 +7692,9 @@ export enum HostEvent {
7319
7692
  UpdateCrossFilter = "UpdateCrossFilter",
7320
7693
  /**
7321
7694
  * Trigger reset action for a personalized Liveboard view.
7322
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7695
+ * This event is deprecated.
7696
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7697
+ * Payload: none.
7323
7698
  * @example
7324
7699
  * ```js
7325
7700
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -7340,6 +7715,7 @@ export enum HostEvent {
7340
7715
  /**
7341
7716
  * Triggers an action to update Parameter values on embedded
7342
7717
  * Answers, Liveboard, and Spotter answer in Edit mode.
7718
+ * Payload: {@link RuntimeParameter}[].
7343
7719
  * @param - Includes the following keys for each item:
7344
7720
  * - `name`: Name of the parameter.
7345
7721
  * - `value`: The value to set for the parameter.
@@ -7397,6 +7773,8 @@ export enum HostEvent {
7397
7773
  * whole Liveboard.
7398
7774
  * The `applicability` attribute is available from SDK: 1.53.0 |
7399
7775
  * ThoughtSpot: 26.10.0.cl.
7776
+ * Payload: none.
7777
+ * Response: {@link GetParametersResponse}.
7400
7778
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
7401
7779
  * ```js
7402
7780
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -7434,6 +7812,7 @@ export enum HostEvent {
7434
7812
  * ```js
7435
7813
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
7436
7814
  * ```
7815
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
7437
7816
  * @example
7438
7817
  * ```js
7439
7818
  * // Update personalized view from liveboard context
@@ -7466,6 +7845,7 @@ export enum HostEvent {
7466
7845
  * If neither is provided, the Liveboard resets to the original/default view.
7467
7846
  * When a `viewName` is provided and multiple views share
7468
7847
  * the same name, the first match is selected.
7848
+ * Payload: {@link PersonalisedViewRequest}.
7469
7849
  * @example
7470
7850
  * ```js
7471
7851
  * liveboardEmbed.trigger(
@@ -7509,6 +7889,8 @@ export enum HostEvent {
7509
7889
  * If no parameters are specified, the save action is
7510
7890
  * triggered with a modal to prompt users to
7511
7891
  * add a name and description for the Answer.
7892
+ * Payload: {@link SaveAnswerRequest}.
7893
+ * Response: {@link SaveAnswerResponse}.
7512
7894
  * @param - Includes the following keys:
7513
7895
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
7514
7896
  * embed.
@@ -7594,6 +7976,7 @@ export enum HostEvent {
7594
7976
  /**
7595
7977
  * Triggers a search operation with the search tokens specified in
7596
7978
  * the search query string in spotter embed.
7979
+ * Payload: {@link SpotterSearchRequest}.
7597
7980
  * @param - Includes the following keys:
7598
7981
  * - `query`: Text string in Natural Language format.
7599
7982
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -7618,6 +8001,7 @@ export enum HostEvent {
7618
8001
  SpotterSearch = "SpotterSearch",
7619
8002
  /**
7620
8003
  * Edits the last prompt in spotter embed.
8004
+ * Payload: `string`.
7621
8005
  * @param - `query`: Text string
7622
8006
  * @example
7623
8007
  * ```js
@@ -7634,6 +8018,7 @@ export enum HostEvent {
7634
8018
  EditLastPrompt = "EditLastPrompt",
7635
8019
  /**
7636
8020
  * Opens the data source preview modal in Spotter Embed.
8021
+ * Payload: none.
7637
8022
  * @example
7638
8023
  * ```js
7639
8024
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -7669,6 +8054,7 @@ export enum HostEvent {
7669
8054
  DataModelInstructions = "DataModelInstructions",
7670
8055
  /**
7671
8056
  * Resets the Spotter Embed Conversation.
8057
+ * Payload: none.
7672
8058
  * @example
7673
8059
  * ```js
7674
8060
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -7681,6 +8067,7 @@ export enum HostEvent {
7681
8067
  * `conversationId` is **mandatory** — you must pass the id of the
7682
8068
  * conversation to share. Also no-op when sharing is disabled
7683
8069
  * (enableShareConversation off) or when already in the read-only shared view.
8070
+ * Payload: {@link ConversationScopedRequest}.
7684
8071
  * @example
7685
8072
  * ```js
7686
8073
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -7690,6 +8077,7 @@ export enum HostEvent {
7690
8077
  ShareSpotterConversation = "ShareSpotterConversation",
7691
8078
  /**
7692
8079
  * Closes the Spotter share-conversation modal. No-op if none is open.
8080
+ * Payload: none.
7693
8081
  * @example
7694
8082
  * ```js
7695
8083
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -7699,6 +8087,7 @@ export enum HostEvent {
7699
8087
  CloseSpotterShareConversation = "CloseSpotterShareConversation",
7700
8088
  /**
7701
8089
  * Exits the read-only shared-conversation view.
8090
+ * Payload: none.
7702
8091
  * @example
7703
8092
  * ```js
7704
8093
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -7708,6 +8097,7 @@ export enum HostEvent {
7708
8097
  ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
7709
8098
  /**
7710
8099
  * Deletes the last prompt in spotter embed.
8100
+ * Payload: none.
7711
8101
  * @example
7712
8102
  * ```js
7713
8103
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -7717,6 +8107,7 @@ export enum HostEvent {
7717
8107
  DeleteLastPrompt = "DeleteLastPrompt",
7718
8108
  /**
7719
8109
  * Toggle the visualization to chart or table view.
8110
+ * Payload: {@link RequiredVizRequest}.
7720
8111
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
7721
8112
  * @example
7722
8113
  * ```js
@@ -7755,6 +8146,7 @@ export enum HostEvent {
7755
8146
  VisibleEmbedCoordinates = "visibleEmbedCoordinates",
7756
8147
  /**
7757
8148
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
8149
+ * Payload: {@link RequiredVizRequest}.
7758
8150
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
7759
8151
  * @example
7760
8152
  * ```js
@@ -7816,6 +8208,7 @@ export enum HostEvent {
7816
8208
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7817
8209
  * instance.
7818
8210
  *
8211
+ * Payload: {@link ConversationScopedRequest}.
7819
8212
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7820
8213
  * @example
7821
8214
  * ```js
@@ -7833,6 +8226,7 @@ export enum HostEvent {
7833
8226
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7834
8227
  * instance.
7835
8228
  *
8229
+ * Payload: {@link ConversationScopedRequest}.
7836
8230
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7837
8231
  * @example
7838
8232
  * ```js
@@ -7857,6 +8251,7 @@ export enum HostEvent {
7857
8251
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
7858
8252
  * Sends a test schedule email to self or all recipients.
7859
8253
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
8254
+ * Payload: {@link ScheduleEmailRequest}.
7860
8255
  * @example
7861
8256
  * ```js
7862
8257
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -7875,6 +8270,7 @@ export enum HostEvent {
7875
8270
  SendTestScheduleEmail = "sendTestScheduleEmail",
7876
8271
  /**
7877
8272
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
8273
+ * Payload: `{ query: string }`.
7878
8274
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7879
8275
  * @param query - the prompt text to send.
7880
8276
  * @example
@@ -7887,6 +8283,7 @@ export enum HostEvent {
7887
8283
  SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
7888
8284
  /**
7889
8285
  * Initializes a new SpotterViz conversation.
8286
+ * Payload: none.
7890
8287
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7891
8288
  * @example
7892
8289
  * ```js
@@ -7896,6 +8293,7 @@ export enum HostEvent {
7896
8293
  InitSpotterVizConversation = "InitSpotterVizConversation",
7897
8294
  /**
7898
8295
  * Opens the SpotterViz panel.
8296
+ * Payload: none.
7899
8297
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7900
8298
  * @example
7901
8299
  * ```js
@@ -7905,6 +8303,7 @@ export enum HostEvent {
7905
8303
  OpenSpotterVizPanel = "OpenSpotterVizPanel",
7906
8304
  /**
7907
8305
  * Closes the SpotterViz panel.
8306
+ * Payload: none.
7908
8307
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7909
8308
  * @example
7910
8309
  * ```js
@@ -7915,6 +8314,7 @@ export enum HostEvent {
7915
8314
  /**
7916
8315
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
7917
8316
  * Requires `enableLiveboardDataCache` to be enabled.
8317
+ * Payload: {@link ScheduleEmailRequest}.
7918
8318
  * @example
7919
8319
  * ```js
7920
8320
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -9947,89 +10347,362 @@ export enum Action {
9947
10347
  * disabledActions: [Action.SpotterOnLiveboard]
9948
10348
  * ```
9949
10349
  */
9950
- SpotterOnLiveboard = "spotterOnLiveboard"
9951
- }
9952
- export enum PrefetchFeatures {
9953
- FullApp = "FullApp",
9954
- SearchEmbed = "SearchEmbed",
9955
- LiveboardEmbed = "LiveboardEmbed",
9956
- VizEmbed = "VizEmbed"
9957
- }
9958
- /**
9959
- * Enum for options to change context trigger.
9960
- * The `BOTH_CLICKS` option is available from 10.8.0.cl.
9961
- */
9962
- export enum ContextMenuTriggerOptions {
9963
- LEFT_CLICK = "left-click",
9964
- RIGHT_CLICK = "right-click",
9965
- BOTH_CLICKS = "both-clicks"
9966
- }
9967
- export interface ColumnValue {
9968
- column: {
9969
- id: string;
9970
- name: string;
9971
- dataType: string;
9972
- [key: string]: any;
9973
- };
9974
- value: string | number | boolean | {
9975
- v: {
9976
- s: number;
9977
- e: number;
9978
- };
9979
- };
9980
- }
9981
- export interface VizPoint {
9982
- selectedAttributes: ColumnValue[];
9983
- selectedMeasures: ColumnValue[];
9984
- }
9985
- /**
9986
- * @group Events
9987
- */
9988
- export interface CustomActionPayload {
9989
- contextMenuPoints?: {
9990
- clickedPoint: VizPoint;
9991
- selectedPoints: VizPoint[];
9992
- };
9993
- embedAnswerData: {
9994
- name: string;
9995
- id: string;
9996
- sources: {
9997
- header: {
9998
- guid: string;
9999
- };
10000
- };
10001
- columns: any[];
10002
- data: any[];
10003
- [key: string]: any;
10004
- };
10005
- session: SessionInterface;
10006
- vizId?: string;
10007
- }
10008
- export interface CustomAction {
10009
- name: string;
10010
- id: string;
10011
- position: CustomActionsPosition;
10012
- target: CustomActionTarget;
10013
- metadataIds?: {
10014
- answerIds?: string[];
10015
- liveboardIds?: string[];
10016
- vizIds?: string[];
10017
- };
10018
- dataModelIds?: {
10019
- modelIds?: string[];
10020
- modelColumnNames?: string[];
10021
- };
10022
- orgIds?: string[];
10023
- groupIds?: string[];
10024
- }
10025
- /**
10026
- * Enum options to show custom actions at different
10027
- * positions in the application.
10028
- */
10029
- export enum CustomActionsPosition {
10350
+ SpotterOnLiveboard = "spotterOnLiveboard",
10030
10351
  /**
10031
- * Shows the action as a primary button
10032
- * in the toolbar area of the embed.
10352
+ * Controls the visibility and disabled state of the "Chart Type" 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.ChartTypeSettings],
10359
+ * disabledActions: [Action.ChartTypeSettings],
10360
+ * }
10361
+ * ```
10362
+ */
10363
+ ChartTypeSettings = "CHART_TYPE",
10364
+ /**
10365
+ * Controls the visibility and disabled state of the "Layout" menu item
10366
+ * in Chart Settings V2.
10367
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10368
+ * @example
10369
+ * ```js
10370
+ * {
10371
+ * hiddenActions: [Action.LayoutSettings],
10372
+ * disabledActions: [Action.LayoutSettings],
10373
+ * }
10374
+ * ```
10375
+ */
10376
+ LayoutSettings = "LAYOUT",
10377
+ /**
10378
+ * Controls the visibility and disabled state of the "Column" menu item
10379
+ * in Chart Settings V2.
10380
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10381
+ * @example
10382
+ * ```js
10383
+ * {
10384
+ * hiddenActions: [Action.ColumnSettings],
10385
+ * disabledActions: [Action.ColumnSettings],
10386
+ * }
10387
+ * ```
10388
+ */
10389
+ ColumnSettings = "COLUMN",
10390
+ /**
10391
+ * Controls the visibility and disabled state of the "Axis" 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.AxisSettings],
10398
+ * disabledActions: [Action.AxisSettings],
10399
+ * }
10400
+ * ```
10401
+ */
10402
+ AxisSettings = "AXIS",
10403
+ /**
10404
+ * Controls the visibility and disabled state of the "Data Label" 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.DataLabelSettings],
10411
+ * disabledActions: [Action.DataLabelSettings],
10412
+ * }
10413
+ * ```
10414
+ */
10415
+ DataLabelSettings = "DATA_LABEL",
10416
+ /**
10417
+ * Controls the visibility and disabled state of the "Tooltip" menu item
10418
+ * in Chart Settings V2.
10419
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10420
+ * @example
10421
+ * ```js
10422
+ * {
10423
+ * hiddenActions: [Action.TooltipSettings],
10424
+ * disabledActions: [Action.TooltipSettings],
10425
+ * }
10426
+ * ```
10427
+ */
10428
+ TooltipSettings = "TOOLTIP",
10429
+ /**
10430
+ * Controls the visibility and disabled state of the "Legend" menu item
10431
+ * in Chart Settings V2.
10432
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10433
+ * @example
10434
+ * ```js
10435
+ * {
10436
+ * hiddenActions: [Action.LegendSettings],
10437
+ * disabledActions: [Action.LegendSettings],
10438
+ * }
10439
+ * ```
10440
+ */
10441
+ LegendSettings = "LEGEND",
10442
+ /**
10443
+ * Controls the visibility and disabled state of the "Display" menu item
10444
+ * in Chart Settings V2.
10445
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10446
+ * @example
10447
+ * ```js
10448
+ * {
10449
+ * hiddenActions: [Action.DisplaySettings],
10450
+ * disabledActions: [Action.DisplaySettings],
10451
+ * }
10452
+ * ```
10453
+ */
10454
+ DisplaySettings = "DISPLAY",
10455
+ /**
10456
+ * Controls the visibility and disabled state of the "Query Details" menu
10457
+ * item in Chart Settings V2.
10458
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10459
+ * @example
10460
+ * ```js
10461
+ * {
10462
+ * hiddenActions: [Action.QuerySettings],
10463
+ * disabledActions: [Action.QuerySettings],
10464
+ * }
10465
+ * ```
10466
+ */
10467
+ QuerySettings = "QUERY_DETAILS",
10468
+ /**
10469
+ * Controls the visibility and disabled state of the "Custom Action" menu
10470
+ * item in Chart Settings V2.
10471
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10472
+ * @example
10473
+ * ```js
10474
+ * {
10475
+ * hiddenActions: [Action.CustomSettings],
10476
+ * disabledActions: [Action.CustomSettings],
10477
+ * }
10478
+ * ```
10479
+ */
10480
+ CustomSettings = "CUSTOM_ACTION",
10481
+ /**
10482
+ * Controls the visibility and disabled state of the "Muze AI" menu item
10483
+ * in Chart Settings V2.
10484
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10485
+ * @example
10486
+ * ```js
10487
+ * {
10488
+ * hiddenActions: [Action.MuzeAiSettings],
10489
+ * disabledActions: [Action.MuzeAiSettings],
10490
+ * }
10491
+ * ```
10492
+ */
10493
+ MuzeAiSettings = "MUZE_AI",
10494
+ /**
10495
+ * Controls the visibility and disabled state of the "R Analysis" menu item
10496
+ * in Chart Settings V2.
10497
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10498
+ * @example
10499
+ * ```js
10500
+ * {
10501
+ * hiddenActions: [Action.RAnalysisSettings],
10502
+ * disabledActions: [Action.RAnalysisSettings],
10503
+ * }
10504
+ * ```
10505
+ */
10506
+ RAnalysisSettings = "R_ANALYSIS",
10507
+ /**
10508
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
10509
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10510
+ * @example
10511
+ * ```js
10512
+ * {
10513
+ * hiddenActions: [Action.AddToCollection],
10514
+ * disabledActions: [Action.AddToCollection],
10515
+ * }
10516
+ * ```
10517
+ */
10518
+ AddToCollection = "addToCollection",
10519
+ /**
10520
+ * Controls the visibility and disabled state of the "Create Collection" button.
10521
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10522
+ * @example
10523
+ * ```js
10524
+ * {
10525
+ * hiddenActions: [Action.CreateCollection],
10526
+ * disabledActions: [Action.CreateCollection],
10527
+ * }
10528
+ * ```
10529
+ */
10530
+ CreateCollection = "createCollection",
10531
+ /**
10532
+ * Controls the visibility and disabled state of the "Move" menu item in a
10533
+ * Collection.
10534
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10535
+ * @example
10536
+ * ```js
10537
+ * {
10538
+ * hiddenActions: [Action.MoveToCollection],
10539
+ * disabledActions: [Action.MoveToCollection],
10540
+ * }
10541
+ * ```
10542
+ */
10543
+ MoveToCollection = "moveToCollection",
10544
+ /**
10545
+ * Controls the visibility and disabled state of the "Remove" menu item in a
10546
+ * Collection.
10547
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10548
+ * @example
10549
+ * ```js
10550
+ * {
10551
+ * hiddenActions: [Action.RemoveFromCollection],
10552
+ * disabledActions: [Action.RemoveFromCollection],
10553
+ * }
10554
+ * ```
10555
+ */
10556
+ RemoveFromCollection = "removeFromCollection",
10557
+ /**
10558
+ * Controls the visibility and disabled state of the "Delete" menu item for a
10559
+ * Collection.
10560
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10561
+ * @example
10562
+ * ```js
10563
+ * {
10564
+ * hiddenActions: [Action.DeleteCollection],
10565
+ * disabledActions: [Action.DeleteCollection],
10566
+ * }
10567
+ * ```
10568
+ */
10569
+ DeleteCollection = "deleteCollection",
10570
+ /**
10571
+ * Controls the visibility of the "Customize homepage" button on the
10572
+ * embedded home page.
10573
+ * @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
10574
+ * @example
10575
+ * ```js
10576
+ * {
10577
+ * hiddenActions: [Action.CustomizeHomepage],
10578
+ * }
10579
+ * ```
10580
+ */
10581
+ CustomizeHomepage = "customizeHomepage"
10582
+ }
10583
+ export enum PrefetchFeatures {
10584
+ FullApp = "FullApp",
10585
+ SearchEmbed = "SearchEmbed",
10586
+ LiveboardEmbed = "LiveboardEmbed",
10587
+ VizEmbed = "VizEmbed"
10588
+ }
10589
+ /**
10590
+ * Enum for options to change context trigger.
10591
+ * The `BOTH_CLICKS` option is available from 10.8.0.cl.
10592
+ */
10593
+ export enum ContextMenuTriggerOptions {
10594
+ LEFT_CLICK = "left-click",
10595
+ RIGHT_CLICK = "right-click",
10596
+ BOTH_CLICKS = "both-clicks"
10597
+ }
10598
+ export interface ColumnValue {
10599
+ column: {
10600
+ id: string;
10601
+ name: string;
10602
+ dataType: string;
10603
+ [key: string]: any;
10604
+ };
10605
+ value: string | number | boolean | {
10606
+ v: {
10607
+ s: number;
10608
+ e: number;
10609
+ };
10610
+ };
10611
+ }
10612
+ export interface VizPoint {
10613
+ selectedAttributes: ColumnValue[];
10614
+ selectedMeasures: ColumnValue[];
10615
+ }
10616
+ /**
10617
+ * @group Events
10618
+ */
10619
+ export interface CustomActionPayload {
10620
+ /**
10621
+ * Id of the custom action that was triggered. Matches the `id` you set on
10622
+ * the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
10623
+ */
10624
+ id?: string;
10625
+ contextMenuPoints?: {
10626
+ clickedPoint: VizPoint;
10627
+ selectedPoints: VizPoint[];
10628
+ };
10629
+ embedAnswerData: {
10630
+ name: string;
10631
+ id: string;
10632
+ sources: {
10633
+ header: {
10634
+ guid: string;
10635
+ };
10636
+ };
10637
+ columns: any[];
10638
+ data: any[];
10639
+ [key: string]: any;
10640
+ };
10641
+ session: SessionInterface;
10642
+ vizId?: string;
10643
+ }
10644
+ /**
10645
+ * A code-based custom action to inject into the embedded ThoughtSpot UI.
10646
+ * Pass an array of these as `customActions` in the embed view config. When a
10647
+ * user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
10648
+ * a {@link CustomActionPayload} carrying the same `id`.
10649
+ */
10650
+ export interface CustomAction {
10651
+ /**
10652
+ * Display label shown on the action's button or menu item.
10653
+ */
10654
+ name: string;
10655
+ /**
10656
+ * Unique identifier for the action. Echoed back as `id` on the
10657
+ * {@link CustomActionPayload} when the action is invoked.
10658
+ */
10659
+ id: string;
10660
+ /**
10661
+ * Where the action appears: a primary button, the "More" menu, or the
10662
+ * right-click context menu. See {@link CustomActionsPosition}.
10663
+ */
10664
+ position: CustomActionsPosition;
10665
+ /**
10666
+ * The surface the action applies to (Liveboard, visualization, Answer, or
10667
+ * Spotter). See {@link CustomActionTarget}. The allowed `position` values
10668
+ * and scoping keys depend on the target.
10669
+ */
10670
+ target: CustomActionTarget;
10671
+ /**
10672
+ * Scope the action to specific objects by GUID. Which keys are allowed
10673
+ * depends on `target` (for example, a `VIZ` action may use `answerIds`,
10674
+ * `liveboardIds`, and `vizIds`).
10675
+ */
10676
+ metadataIds?: {
10677
+ answerIds?: string[];
10678
+ liveboardIds?: string[];
10679
+ vizIds?: string[];
10680
+ };
10681
+ /**
10682
+ * Scope the action by data model, using model GUIDs or column names.
10683
+ * Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
10684
+ */
10685
+ dataModelIds?: {
10686
+ modelIds?: string[];
10687
+ modelColumnNames?: string[];
10688
+ };
10689
+ /**
10690
+ * Restrict the action to specific organizations by ID.
10691
+ */
10692
+ orgIds?: string[];
10693
+ /**
10694
+ * Restrict the action to specific user groups by ID.
10695
+ */
10696
+ groupIds?: string[];
10697
+ }
10698
+ /**
10699
+ * Enum options to show custom actions at different
10700
+ * positions in the application.
10701
+ */
10702
+ export enum CustomActionsPosition {
10703
+ /**
10704
+ * Shows the action as a primary button
10705
+ * in the toolbar area of the embed.
10033
10706
  */
10034
10707
  PRIMARY = "PRIMARY",
10035
10708
  /**
@@ -10981,234 +11654,569 @@ export interface VisualizationOverrides {
10981
11654
  /** Table visualization overrides */
10982
11655
  table?: TableOverrides;
10983
11656
  }
10984
- export interface LiveboardTab {
10985
- id: string;
10986
- name: string;
10987
- [key: string]: any;
11657
+ /**
11658
+ * The configuration object for the full-height behavior shared by the
11659
+ * Liveboard and app embeds.
11660
+ *
11661
+ * When `fullHeight` is enabled the SDK resizes the embed container to match the
11662
+ * height reported by the ThoughtSpot app, and — when lazy loading is also
11663
+ * enabled — keeps the app informed of the portion of the embed that is
11664
+ * currently visible so that visualizations load on demand.
11665
+ */
11666
+ export interface FullHeightViewConfig {
11667
+ /**
11668
+ * If set to true, the embedded object container dynamically resizes
11669
+ * according to the height of the Liveboard.
11670
+ *
11671
+ * **Note**: Using fullHeight loads all visualizations on the
11672
+ * Liveboard simultaneously, which results in multiple warehouse
11673
+ * queries and potentially a longer wait for the topmost
11674
+ * visualizations to display on the screen.
11675
+ * Setting `fullHeight` to `false` fetches visualizations
11676
+ * incrementally as users scroll the page to view the charts and tables.
11677
+ *
11678
+ * From SDK 1.52.0, enabling `fullHeight` also turns on
11679
+ * {@link lazyLoadingForFullHeight} and
11680
+ * {@link enableScrollableContainerLazyLoading}, so visualizations load as
11681
+ * they scroll into view. Set either flag to `false` to opt out.
11682
+ *
11683
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11684
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
11685
+ * @example
11686
+ * ```js
11687
+ * // Replace <EmbedComponent> with the embed component name.
11688
+ * // For example, AppEmbed or LiveboardEmbed
11689
+ * const embed = new <EmbedComponent>('#embed', {
11690
+ * ... // other view config
11691
+ * fullHeight: true,
11692
+ * });
11693
+ * ```
11694
+ */
11695
+ fullHeight?: boolean;
11696
+ /**
11697
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11698
+ * Setting this height helps resolve issues with empty Liveboards and
11699
+ * other screens navigable from a Liveboard.
11700
+ *
11701
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11702
+ * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
11703
+ * @default 500
11704
+ * @example
11705
+ * ```js
11706
+ * // Replace <EmbedComponent> with the embed component name.
11707
+ * // For example, AppEmbed or LiveboardEmbed
11708
+ * const embed = new <EmbedComponent>('#embed', {
11709
+ * ... // other view config
11710
+ * fullHeight: true,
11711
+ * minimumHeight: 600,
11712
+ * });
11713
+ * ```
11714
+ */
11715
+ minimumHeight?: number;
11716
+ /**
11717
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11718
+ * Setting this height helps resolve issues with empty Liveboards and
11719
+ * other screens navigable from a Liveboard.
11720
+ *
11721
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11722
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
11723
+ * @deprecated Use `minimumHeight` instead.
11724
+ * @default 500
11725
+ * @example
11726
+ * ```js
11727
+ * // Replace <EmbedComponent> with the embed component name.
11728
+ * // For example, AppEmbed or LiveboardEmbed
11729
+ * const embed = new <EmbedComponent>('#embed', {
11730
+ * ... // other view config
11731
+ * fullHeight: true,
11732
+ * defaultHeight: 600,
11733
+ * });
11734
+ * ```
11735
+ */
11736
+ defaultHeight?: number;
11737
+ /**
11738
+ * Loads visualizations only as they scroll into the viewport, instead of
11739
+ * loading the whole full-height Liveboard at once.
11740
+ *
11741
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11742
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11743
+ * set explicitly. Set it to `false` to load every visualization upfront.
11744
+ * The flag has no effect unless `fullHeight` is enabled.
11745
+ *
11746
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11747
+ * @type {boolean}
11748
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11749
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11750
+ * @example
11751
+ * ```js
11752
+ * // Replace <EmbedComponent> with the embed component name.
11753
+ * // For example, AppEmbed or LiveboardEmbed
11754
+ * const embed = new <EmbedComponent>('#embed-container', {
11755
+ * // ...other options
11756
+ * fullHeight: true,
11757
+ * lazyLoadingForFullHeight: true,
11758
+ * })
11759
+ * ```
11760
+ */
11761
+ lazyLoadingForFullHeight?: boolean;
11762
+ /**
11763
+ * How far outside the viewport a visualization starts loading, when
11764
+ * {@link lazyLoadingForFullHeight} is enabled.
11765
+ *
11766
+ * For example, if the margin is set to '10px',
11767
+ * the visualization will be loaded 10px before its top edge is visible in the
11768
+ * viewport.
11769
+ *
11770
+ * The format is similar to CSS margin, so `'500px 0px'` extends the
11771
+ * prefetch 500px above and below the viewport and not sideways. Accepted
11772
+ * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
11773
+ * `auto`; an invalid value is logged and ignored.
11774
+ *
11775
+ * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
11776
+ * visualization ahead of the scroll position, so a chart has usually
11777
+ * finished loading by the time it scrolls into view. Use a smaller margin
11778
+ * to cut warehouse queries further, or `'0px'` to load a visualization
11779
+ * only once it is actually visible.
11780
+ *
11781
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11782
+ * @type {string}
11783
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11784
+ * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
11785
+ * @example
11786
+ * ```js
11787
+ * // Replace <EmbedComponent> with the embed component name.
11788
+ * // For example, AppEmbed or LiveboardEmbed
11789
+ * const embed = new <EmbedComponent>('#embed-container', {
11790
+ * // ...other options
11791
+ * fullHeight: true,
11792
+ * lazyLoadingForFullHeight: true,
11793
+ * // With 0px, the visualization only starts loading once it is
11794
+ * // visible in the viewport.
11795
+ * lazyLoadingMargin: '0px',
11796
+ * })
11797
+ * ```
11798
+ */
11799
+ lazyLoadingMargin?: string;
11800
+ /**
11801
+ * Computes the visible region of the embed against its scrollable and
11802
+ * clipping ancestors, instead of treating the browser window as the only
11803
+ * viewport, and tracks scroll and resize on those ancestors.
11804
+ *
11805
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11806
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11807
+ * set explicitly. Set it to `false` when the page scrolls with the window
11808
+ * and the embed has no clipping ancestor, to skip the extra ancestor
11809
+ * tracking.
11810
+ *
11811
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11812
+ * @type {boolean}
11813
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11814
+ */
11815
+ enableScrollableContainerLazyLoading?: boolean;
10988
11816
  }
10989
- export interface LiveboardGroup {
10990
- id: string;
10991
- name: string;
10992
- [key: string]: any;
11817
+ /**
11818
+ * Request for host events that MAY target a specific visualization.
11819
+ * Omitting vizId targets the current answer/liveboard as a whole.
11820
+ * (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
11821
+ */
11822
+ export interface VizScopedRequest {
11823
+ vizId?: string;
11824
+ }
11825
+ /**
11826
+ * Request for host events that MUST target a specific visualization.
11827
+ */
11828
+ export interface RequiredVizRequest {
11829
+ vizId: string;
11830
+ }
11831
+ /**
11832
+ * Request for Spotter conversation-scoped host events.
11833
+ */
11834
+ export interface ConversationScopedRequest {
11835
+ conversationId: string;
11836
+ }
11837
+ /**
11838
+ * Request payload for {@link HostEvent.OpenFilter}. Field requirements
11839
+ * vary by context (Search requires columnId/type/dataType/name); the
11840
+ * contract is the cross-context superset — the app validates per context
11841
+ * at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
11842
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
11843
+ */
11844
+ export interface OpenFilterRequest {
11845
+ column: {
11846
+ columnId?: string;
11847
+ columnName?: string;
11848
+ type?: string;
11849
+ dataType?: string;
11850
+ name?: string;
11851
+ isStrictDateColumn?: boolean;
11852
+ };
11853
+ applicability?: Applicability;
11854
+ visualizationId?: string;
11855
+ liveboardId?: string;
11856
+ }
11857
+ /**
11858
+ * `OpenFilter` in Liveboard context: full column plus scoping fields.
11859
+ * A per-context view of {@link OpenFilterRequest} (documentation only today;
11860
+ * `trigger()` accepts the superset).
11861
+ */
11862
+ export interface OpenFilterLiveboardRequest {
11863
+ column: {
11864
+ columnId?: string;
11865
+ columnName?: string;
11866
+ };
11867
+ applicability?: Applicability;
11868
+ visualizationId?: string;
11869
+ liveboardId?: string;
11870
+ }
11871
+ /**
11872
+ * `OpenFilter` in Spotter context: only the column identity is accepted.
11873
+ */
11874
+ export interface OpenFilterSpotterRequest {
11875
+ column: {
11876
+ columnId?: string;
11877
+ columnName?: string;
11878
+ };
11879
+ }
11880
+ /**
11881
+ * `OpenFilter` in Search/Answer context: column identity plus column metadata.
11882
+ */
11883
+ export interface OpenFilterSearchRequest {
11884
+ column: {
11885
+ columnId?: string;
11886
+ columnName?: string;
11887
+ type?: string;
11888
+ dataType?: string;
11889
+ name?: string;
11890
+ isStrictDateColumn?: boolean;
11891
+ };
11892
+ }
11893
+ /**
11894
+ * Request payload for {@link HostEvent.DrillDown}. Drills on selected or
11895
+ * clicked points of a visualization. In Liveboard context `vizId` is required
11896
+ * at runtime (documentation only today; `trigger()` is not yet type-enforced).
11897
+ */
11898
+ export interface DrillDownRequest {
11899
+ points: {
11900
+ clickedPoint?: object;
11901
+ selectedPoints?: object[];
11902
+ };
11903
+ columnGuid?: string;
11904
+ autoDrillDown?: boolean;
11905
+ vizId?: string;
11906
+ }
11907
+ /**
11908
+ * Request payload for {@link HostEvent.OpenParameter}. One of parameterId
11909
+ * or parameterName must be provided (validated at runtime).
11910
+ */
11911
+ export interface OpenParameterRequest {
11912
+ parameter: {
11913
+ parameterId?: string;
11914
+ parameterName?: string;
11915
+ };
11916
+ applicability?: Applicability;
11917
+ }
11918
+ /**
11919
+ * Request payload for {@link HostEvent.Search}.
11920
+ */
11921
+ export interface SearchRequest {
11922
+ searchQuery: string;
11923
+ dataSources: string[];
11924
+ execute?: boolean;
11925
+ }
11926
+ /**
11927
+ * Request payload for {@link HostEvent.SpotterSearch}.
11928
+ */
11929
+ export interface SpotterSearchRequest {
11930
+ query: string;
11931
+ executeSearch: boolean;
11932
+ }
11933
+ /**
11934
+ * A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
11935
+ */
11936
+ export interface CrossFilterCondition {
11937
+ columnName?: string;
11938
+ operator?: string;
11939
+ values: Array<string | number | boolean>;
11940
+ }
11941
+ /**
11942
+ * Request payload for {@link HostEvent.UpdateCrossFilter}.
11943
+ */
11944
+ export interface UpdateCrossFilterRequest {
11945
+ vizId: string;
11946
+ conditions: CrossFilterCondition[];
11947
+ }
11948
+ /**
11949
+ * The column to filter on. Supply `columnName`. A filter with no column is
11950
+ * rejected at runtime, and passing both spellings silently discards the
11951
+ * `column` one.
11952
+ *
11953
+ * When several columns share a name, qualify it as
11954
+ * `WORKSHEET_NAME::COLUMN_NAME`, for example
11955
+ * `"(Sample) Retail - Apparel::city"`.
11956
+ */
11957
+ export type HostFilterUpdateColumn = {
11958
+ /**
11959
+ * Name of the column to filter on, optionally qualified as
11960
+ * `WORKSHEET_NAME::COLUMN_NAME`.
11961
+ */
11962
+ columnName: string;
11963
+ column?: never;
11964
+ } | {
11965
+ /**
11966
+ * @deprecated Use `columnName`, which matches {@link RuntimeFilter} and
11967
+ * the rest of the SDK. Still accepted, but not alongside `columnName`.
11968
+ */
11969
+ column: string;
11970
+ columnName?: never;
11971
+ };
11972
+ /**
11973
+ * The filter operator. Supply `operator`. A filter with no operator is
11974
+ * rejected at runtime, and passing both spellings silently discards the
11975
+ * `oper` one.
11976
+ */
11977
+ export type HostFilterUpdateOperator = {
11978
+ /** Filter operator, for example EQ, IN, CONTAINS. */
11979
+ operator: string;
11980
+ oper?: never;
11981
+ } | {
11982
+ /**
11983
+ * @deprecated Use `operator`, which matches {@link RuntimeFilter} and
11984
+ * the rest of the SDK. Still accepted, but not alongside `operator`.
11985
+ */
11986
+ oper: string;
11987
+ operator?: never;
11988
+ };
11989
+ /**
11990
+ * A single filter entry for {@link HostEvent.UpdateFilters}.
11991
+ *
11992
+ * Use `columnName` and `operator` - the spelling used by
11993
+ * {@link RuntimeFilter} and by the payload
11994
+ * `convertFilterChangedToUpdateFiltersPayload` produces.
11995
+ */
11996
+ export type HostFilterUpdate = HostFilterUpdateColumn & HostFilterUpdateOperator & {
11997
+ columnId?: string;
11998
+ values: Array<string | number | boolean | bigint>;
11999
+ type?: string;
12000
+ datePeriod?: string;
12001
+ negate?: boolean;
12002
+ applicability?: Applicability;
12003
+ };
12004
+ /**
12005
+ * Request payload for {@link HostEvent.UpdateFilters} (singular or plural
12006
+ * form).
12007
+ */
12008
+ export interface UpdateFiltersRequest {
12009
+ filter?: HostFilterUpdate;
12010
+ filters?: HostFilterUpdate[];
12011
+ /**
12012
+ * Scope the update to a specific visualization on a Liveboard.
12013
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
12014
+ */
12015
+ visualizationId?: string;
12016
+ /**
12017
+ * Scope the update to a specific Liveboard.
12018
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
12019
+ */
12020
+ liveboardId?: string;
12021
+ }
12022
+ /**
12023
+ * Request payload for personalised-view host events.
12024
+ */
12025
+ export interface PersonalisedViewRequest {
12026
+ viewId?: string;
12027
+ viewName?: string;
12028
+ }
12029
+ /**
12030
+ * Request payload for schedule-email related host events.
12031
+ */
12032
+ export interface ScheduleEmailRequest {
12033
+ sendToSelf?: boolean;
12034
+ }
12035
+ /**
12036
+ * Object form of the {@link HostEvent.Navigate} payload.
12037
+ */
12038
+ export interface NavigateRequest {
12039
+ /**
12040
+ * Route to navigate to, or a history delta such as `1` or `-1`.
12041
+ */
12042
+ path: string | number;
12043
+ /**
12044
+ * When `true`, replaces the current history entry instead of pushing.
12045
+ */
12046
+ replace?: boolean;
10993
12047
  }
10994
12048
  /**
10995
- * Levels at which a filter or parameter can be applied.
12049
+ * Request payload for {@link HostEvent.SetActiveTab}.
10996
12050
  */
10997
- export enum ApplicabilityLevel {
10998
- Liveboard = "LIVEBOARD",
10999
- Tab = "TAB",
11000
- Group = "GROUP"
12051
+ export interface SetActiveTabRequest {
12052
+ /**
12053
+ * Id of the liveboard tab to make active.
12054
+ */
12055
+ tabId: string;
11001
12056
  }
11002
12057
  /**
11003
- * Scopes a filter or parameter to a specific target.
11004
- * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
11005
- * is not required.
12058
+ * Typed request payloads for host events that do not go through the UI
12059
+ * passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
12060
+ *
12061
+ * Shapes are transcribed from the host's runtime validation schemas
12062
+ * (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
12063
+ * flattened across contexts to the permissive superset (context-specific
12064
+ * requirements are validated at runtime).
12065
+ *
12066
+ * Responses are typed only for UI-passthrough-backed events today (see
12067
+ * {@link HostEventResponse}). Add a response map alongside this one when the
12068
+ * first explicit response shape is specified; tightening later is additive.
12069
+ *
12070
+ * Deliberately absent (do not add without an audit):
12071
+ * - DrillDown: the runtime schema (object-shaped points) and the UI
12072
+ * passthrough contract (string-shaped points) disagree — resolve the
12073
+ * drift first.
12074
+ * - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
12075
+ * mapping; their Spotter-context vizId requirement is runtime-only.
11006
12076
  */
11007
- export interface Applicability {
11008
- level: ApplicabilityLevel;
11009
- targetId?: string;
11010
- }
11011
- export interface FilterUpdate {
11012
- column: string;
11013
- oper: string;
11014
- values: string[];
11015
- type?: string;
11016
- applicability?: Applicability;
11017
- }
11018
- export interface LiveboardFilter {
11019
- applicability?: Applicability;
11020
- [key: string]: any;
11021
- }
11022
- export interface LiveboardParameter {
11023
- applicability?: Applicability;
11024
- [key: string]: any;
11025
- }
11026
- export enum UIPassthroughEvent {
11027
- PinAnswerToLiveboard = "addVizToPinboard",
11028
- SaveAnswer = "saveAnswer",
11029
- GetDiscoverabilityStatus = "getDiscoverabilityStatus",
11030
- GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
11031
- GetAnswerConfig = "getAnswerPageConfig",
11032
- GetLiveboardConfig = "getPinboardPageConfig",
11033
- GetUnsavedAnswerTML = "getUnsavedAnswerTML",
11034
- UpdateFilters = "updateFilters",
11035
- Drilldown = "drillDown",
11036
- GetAnswerSession = "getAnswerSession",
11037
- GetFilters = "getFilters",
11038
- GetIframeUrl = "getIframeUrl",
11039
- GetParameters = "getParameters",
11040
- GetTML = "getTML",
11041
- GetTabs = "getTabs",
11042
- GetGroups = "getGroups",
11043
- GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
11044
- }
11045
- export type UIPassthroughContractBase = {
11046
- [UIPassthroughEvent.PinAnswerToLiveboard]: {
11047
- request: {
11048
- vizId?: string;
11049
- newVizName: string;
11050
- newVizDescription?: string;
11051
- liveboardId?: string;
11052
- tabId?: string;
11053
- newLiveboardName?: string;
11054
- newTabName?: string;
11055
- };
11056
- response: {
11057
- liveboardId: string;
11058
- tabId: string;
11059
- vizId: string;
11060
- };
11061
- };
11062
- [UIPassthroughEvent.SaveAnswer]: {
11063
- request: {
11064
- name: string;
11065
- description: string;
11066
- vizId?: string;
11067
- isDiscoverable?: boolean;
11068
- };
11069
- response: {
11070
- answerId: string;
11071
- saveResponse?: any;
11072
- shareResponse?: any;
11073
- };
11074
- };
11075
- [UIPassthroughEvent.GetDiscoverabilityStatus]: {
11076
- request: any;
11077
- response: {
11078
- shouldShowDiscoverability: boolean;
11079
- isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
11080
- };
11081
- };
11082
- [UIPassthroughEvent.GetAvailableUIPassthroughs]: {
11083
- request: any;
11084
- response: {
11085
- keys: string[];
11086
- };
11087
- };
11088
- [UIPassthroughEvent.GetAnswerConfig]: {
11089
- request: {
11090
- vizId?: string;
11091
- };
11092
- response: any;
11093
- };
11094
- [UIPassthroughEvent.GetLiveboardConfig]: {
11095
- request: any;
11096
- response: any;
11097
- };
11098
- [UIPassthroughEvent.GetUnsavedAnswerTML]: {
11099
- request: {
11100
- sessionId?: string;
11101
- vizId?: string;
11102
- };
11103
- response: {
11104
- tml: string;
11105
- };
11106
- };
11107
- [UIPassthroughEvent.GetAnswerSession]: {
11108
- request: {
11109
- vizId?: string;
11110
- };
11111
- response: {
11112
- session: SessionInterface;
11113
- embedAnswerData?: Record<string, any>;
11114
- };
11115
- };
11116
- [UIPassthroughEvent.GetFilters]: {
11117
- request: {
11118
- vizId?: string;
11119
- };
11120
- response: {
11121
- liveboardFilters: LiveboardFilter[];
11122
- runtimeFilters: RuntimeFilter[];
11123
- };
11124
- };
11125
- [UIPassthroughEvent.GetIframeUrl]: {
11126
- request: Record<string, never>;
11127
- response: {
11128
- iframeUrl: string;
11129
- };
11130
- };
11131
- [UIPassthroughEvent.GetParameters]: {
11132
- request: Record<string, never>;
11133
- response: {
11134
- parameters: LiveboardParameter[];
11135
- };
11136
- };
11137
- [UIPassthroughEvent.GetTML]: {
11138
- request: {
11139
- vizId?: string;
11140
- includeNonExecutedSearchTokens?: boolean;
11141
- };
11142
- response: Record<string, any>;
11143
- };
11144
- [UIPassthroughEvent.GetTabs]: {
11145
- request: Record<string, never>;
11146
- response: {
11147
- orderedTabIds: string[];
11148
- numberOfTabs: number;
11149
- Tabs: LiveboardTab[];
11150
- };
12077
+ export interface HostEventRequestMap {
12078
+ [HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
12079
+ [HostEvent.UpdateParameters]: RuntimeParameter[];
12080
+ [HostEvent.UpdateFilters]: UpdateFiltersRequest;
12081
+ [HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
12082
+ [HostEvent.OpenFilter]: OpenFilterRequest;
12083
+ [HostEvent.OpenParameter]: OpenParameterRequest;
12084
+ [HostEvent.SetVisibleVizs]: string[];
12085
+ [HostEvent.SetVisibleTabs]: string[];
12086
+ [HostEvent.SetHiddenTabs]: string[];
12087
+ [HostEvent.SetActiveTab]: SetActiveTabRequest;
12088
+ [HostEvent.Navigate]: string | number | NavigateRequest;
12089
+ [HostEvent.Search]: SearchRequest;
12090
+ [HostEvent.ResetSearch]: void;
12091
+ [HostEvent.AddColumns]: {
12092
+ columnIds: string[];
11151
12093
  };
11152
- [UIPassthroughEvent.GetGroups]: {
11153
- request: Record<string, never>;
11154
- response: {
11155
- orderedGroupIds: string[];
11156
- numberOfGroups: number;
11157
- Groups: LiveboardGroup[];
11158
- };
12094
+ [HostEvent.RemoveColumn]: {
12095
+ columnId: string;
11159
12096
  };
11160
- [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
11161
- request: Record<string, never>;
11162
- response: {
11163
- data: {
11164
- v2Content: string;
11165
- };
11166
- type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11167
- };
12097
+ [HostEvent.Edit]: VizScopedRequest;
12098
+ [HostEvent.Save]: VizScopedRequest;
12099
+ [HostEvent.Delete]: VizScopedRequest;
12100
+ [HostEvent.Share]: VizScopedRequest;
12101
+ [HostEvent.Present]: VizScopedRequest;
12102
+ [HostEvent.CopyLink]: VizScopedRequest;
12103
+ [HostEvent.ExportTML]: VizScopedRequest;
12104
+ [HostEvent.EditTML]: VizScopedRequest;
12105
+ [HostEvent.UpdateTML]: VizScopedRequest;
12106
+ [HostEvent.SchedulesList]: VizScopedRequest;
12107
+ [HostEvent.Schedule]: VizScopedRequest;
12108
+ [HostEvent.SpotIQAnalyze]: VizScopedRequest;
12109
+ [HostEvent.ShowUnderlyingData]: VizScopedRequest;
12110
+ [HostEvent.CreateMonitor]: VizScopedRequest;
12111
+ [HostEvent.ManageMonitor]: VizScopedRequest;
12112
+ [HostEvent.SyncToSheets]: VizScopedRequest;
12113
+ [HostEvent.SyncToOtherApps]: VizScopedRequest;
12114
+ [HostEvent.ManagePipelines]: VizScopedRequest;
12115
+ [HostEvent.DownloadAsPng]: VizScopedRequest;
12116
+ [HostEvent.DownloadAsCsv]: VizScopedRequest;
12117
+ [HostEvent.DownloadAsXlsx]: VizScopedRequest;
12118
+ [HostEvent.DownloadAsPdf]: VizScopedRequest & {
12119
+ liveboardId?: string;
11168
12120
  };
11169
- [UIPassthroughEvent.UpdateFilters]: {
11170
- request: {
11171
- filter?: FilterUpdate;
11172
- filters?: FilterUpdate[];
11173
- };
11174
- response: unknown;
12121
+ [HostEvent.Explore]: RequiredVizRequest;
12122
+ [HostEvent.AskSage]: RequiredVizRequest;
12123
+ [HostEvent.AskSpotter]: RequiredVizRequest;
12124
+ [HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
12125
+ [HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
12126
+ [HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
12127
+ [HostEvent.ResetLiveboardPersonalisedView]: void;
12128
+ [HostEvent.AIHighlights]: void;
12129
+ [HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
12130
+ [HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
12131
+ [HostEvent.SpotterSearch]: SpotterSearchRequest;
12132
+ [HostEvent.ResetSpotterConversation]: void;
12133
+ [HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
12134
+ [HostEvent.CloseSpotterShareConversation]: void;
12135
+ [HostEvent.ExitSpotterSharedConversation]: void;
12136
+ [HostEvent.PinSpotterConversation]: ConversationScopedRequest;
12137
+ [HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
12138
+ [HostEvent.EditLastPrompt]: string;
12139
+ [HostEvent.DeleteLastPrompt]: void;
12140
+ [HostEvent.PreviewSpotterData]: void;
12141
+ [HostEvent.SpotterVizSendUserMessage]: {
12142
+ query: string;
11175
12143
  };
11176
- [UIPassthroughEvent.Drilldown]: {
11177
- request: {
11178
- points: {
11179
- selectedPoints?: string[];
11180
- clickedPoint?: string;
11181
- };
11182
- columnGuid?: string;
11183
- autoDrillDown?: boolean;
11184
- vizId?: string;
11185
- };
11186
- response: unknown;
12144
+ [HostEvent.InitSpotterVizConversation]: void;
12145
+ [HostEvent.OpenSpotterVizPanel]: void;
12146
+ [HostEvent.CloseSpotterVizPanel]: void;
12147
+ }
12148
+ /**
12149
+ * Per-context request shapes for events whose payload varies by
12150
+ /**
12151
+ * Resolves the typed request payload for a host event.
12152
+ * Resolution order:
12153
+ * 1. Explicitly typed request in {@link HostEventRequestMap}
12154
+ * 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
12155
+ * 3. `any` (event not audited/typed yet — backward compatible)
12156
+ *
12157
+ * Requests are the cross-context superset today. The per-context `*Request`
12158
+ * interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
12159
+ * narrows by context; a later release may thread the caller's context to
12160
+ * enforce it.
12161
+ */
12162
+ export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
12163
+ /**
12164
+ * Resolves the typed response payload for a host event. Only UI passthrough
12165
+ * backed events have typed responses today; everything else resolves to `any`.
12166
+ */
12167
+ export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
12168
+ /**
12169
+ * Payload type accepted by `embed.trigger()`. Keeps the historical
12170
+ * `PayloadT` escape hatch so untyped existing call sites keep compiling.
12171
+ */
12172
+ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
12173
+ /**
12174
+ * Deep `Partial` of a request type: every field optional at every depth, with no
12175
+ * index signature — so object literals carrying unknown fields are flagged.
12176
+ */
12177
+ export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
12178
+ [K in keyof T]?: DeepPartial<T[K]>;
12179
+ } : T;
12180
+ /**
12181
+ * `trigger()`'s `data` type: an all-optional view of the event's request type.
12182
+ * See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
12183
+ * No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
12184
+ */
12185
+ export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
12186
+ /**
12187
+ * Response type returned by `embed.trigger()`.
12188
+ */
12189
+ export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
12190
+ /**
12191
+ * Typed `data` field per embed event. Seed with audited events only.
12192
+ */
12193
+ export interface EmbedEventDataExtension {
12194
+ [EmbedEvent.AuthInit]: {
12195
+ /**
12196
+ * Whether authentication was successful.
12197
+ */
12198
+ isLoggedIn?: boolean;
12199
+ [key: string]: any;
11187
12200
  };
12201
+ [EmbedEvent.EmbedListenerReady]: Record<string, any>;
12202
+ /**
12203
+ * Fired when a callback-type custom action is triggered. Use
12204
+ * `payload.data.id` to identify which action fired.
12205
+ */
12206
+ [EmbedEvent.CustomAction]: CustomActionPayload;
12207
+ }
12208
+ /**
12209
+ * Resolves the typed `data` payload for an embed event; `any` when the
12210
+ * event has not been audited/typed yet.
12211
+ */
12212
+ export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
12213
+ /**
12214
+ * Full envelope delivered to `embed.on()` callbacks for a given event:
12215
+ * the wire fields (`type`, `status`) plus the typed `data`.
12216
+ */
12217
+ export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
12218
+ data: EmbedEventData<EmbedEventT>;
11188
12219
  };
11189
- export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
11190
- export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
11191
- export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
11192
- refId?: string;
11193
- value?: UIPassthroughResponse<ApiName>;
11194
- error?: any;
11195
- }>;
11196
- export type EmbedApiHostEventMapping = {
11197
- [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
11198
- [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
11199
- [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
11200
- [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
11201
- [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
11202
- [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
11203
- [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
11204
- [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
11205
- [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
11206
- [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11207
- };
11208
- export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
11209
- export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
11210
- export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
11211
- export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
11212
12220
  class HostEventClient {
11213
12221
  iFrame: HTMLIFrameElement;
11214
12222
  /** Cached list of available UI passthrough keys from the embedded app */
@@ -11251,14 +12259,14 @@ class HostEventClient {
11251
12259
  protected handleDrillDownEvent(payload: HostEventRequest<HostEvent.DrillDown>, context?: ContextType): Promise<any>;
11252
12260
  /**
11253
12261
  * Dispatches a host event using the appropriate channel:
11254
- * 1. If the embedded app supports UI passthrough for this event, use it (custom handler or getter).
11255
- * 2. Otherwise fall back to the legacy host event channel.
12262
+ * 1. If the embedded app supports UI passthrough for this event, use it (custom
12263
+ * handler or getter). 2. Otherwise fall back to the legacy host event channel.
11256
12264
  *
11257
12265
  * @param hostEvent - The host event to trigger
11258
12266
  * @param payload - Optional payload for the event
11259
12267
  * @param context - Optional context (e.g. vizId) for scoped operations
11260
12268
  */
11261
- triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
12269
+ triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11262
12270
  }
11263
12271
  class TsEmbed {
11264
12272
  /**
@@ -11276,6 +12284,7 @@ class TsEmbed {
11276
12284
  * The key to store the embed instance in the DOM node
11277
12285
  */
11278
12286
  protected embedNodeKey: string;
12287
+ protected embedContainerLoadedKey: string;
11279
12288
  protected isAppInitialized: boolean;
11280
12289
  /**
11281
12290
  * A reference to the iframe within which the ThoughtSpot app
@@ -11445,10 +12454,10 @@ class TsEmbed {
11445
12454
  */
11446
12455
  protected getEmbedBasePath(query: string): string;
11447
12456
  protected getUpdateEmbedParamsObject(): Promise<{
11448
- customisations: CustomisationsInterface;
11449
- authToken: string;
11450
12457
  runtimeFilterParams: string;
11451
12458
  runtimeParameterParams: string;
12459
+ customisations: CustomisationsInterface;
12460
+ authToken: string;
11452
12461
  hiddenHomepageModules: HomepageModule[];
11453
12462
  reorderedHomepageModules: string[];
11454
12463
  hostConfig: Record<string, any>;
@@ -11541,6 +12550,7 @@ class TsEmbed {
11541
12550
  protected getV1EmbedBasePath(queryString: string): string;
11542
12551
  protected getEmbedParams(): string;
11543
12552
  protected getEmbedParamsObject(): Record<any, any>;
12553
+ protected getUrlQueryParamsObject(): Record<any, any>;
11544
12554
  protected getRootIframeSrc(): string;
11545
12555
  protected createIframeEl(frameSrc: string): HTMLIFrameElement;
11546
12556
  /**
@@ -11641,21 +12651,6 @@ class TsEmbed {
11641
12651
  * or else the v2 event type itself
11642
12652
  */
11643
12653
  protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
11644
- /**
11645
- * Calculates the iframe center for the current visible viewPort
11646
- * of iframe using Scroll position of Host App, offsetTop for iframe
11647
- * in Host app. ViewPort height of the tab.
11648
- * @returns iframe Center in visible viewport,
11649
- * Iframe height,
11650
- * View port height.
11651
- */
11652
- protected getIframeCenter(): {
11653
- iframeCenter: number;
11654
- iframeScrolled: number;
11655
- iframeHeight: number;
11656
- viewPortHeight: number;
11657
- iframeVisibleViewPort: number;
11658
- };
11659
12654
  /**
11660
12655
  * Registers an event listener to trigger an alert when the ThoughtSpot app
11661
12656
  * sends an event of a particular message type to the host application.
@@ -11679,7 +12674,7 @@ class TsEmbed {
11679
12674
  * });
11680
12675
  * ```
11681
12676
  */
11682
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
12677
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
11683
12678
  /**
11684
12679
  * Removes an event listener for a particular event type.
11685
12680
  * @param messageType The message type
@@ -11715,6 +12710,8 @@ class TsEmbed {
11715
12710
  */
11716
12711
  private embedContainerReadyCallbacks;
11717
12712
  protected getPreRenderObj<T extends TsEmbed>(): T;
12713
+ protected takeOverPreRender(): void;
12714
+ private markEmbedContainerLoaded;
11718
12715
  private checkEmbedContainerLoaded;
11719
12716
  private executeEmbedContainerReadyCallbacks;
11720
12717
  /**
@@ -11725,8 +12722,12 @@ class TsEmbed {
11725
12722
  protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
11726
12723
  /**
11727
12724
  * Triggers an event to the embedded app
12725
+ *
12726
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
12727
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
12728
+ * payload is checked strictly against the event contract — update call sites now.
11728
12729
  * @param {HostEvent} messageType The event type
11729
- * @param {any} data The payload to send with the message
12730
+ * @param {TriggerData} data The payload, typed against the event's contract
11730
12731
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
11731
12732
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
11732
12733
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -11743,7 +12744,7 @@ class TsEmbed {
11743
12744
  * ```
11744
12745
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
11745
12746
  */
11746
- trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
12747
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11747
12748
  /**
11748
12749
  * Triggers an event to the embedded app, skipping the UI flow.
11749
12750
  * @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
@@ -11845,6 +12846,9 @@ class TsEmbed {
11845
12846
  * @returns
11846
12847
  */
11847
12848
  prerenderGeneric(): Promise<any>;
12849
+ protected preRenderParamsApplied: Promise<void>;
12850
+ protected isConfigExcludedFromUrl(): boolean;
12851
+ protected triggerUpdateEmbedParams(): Promise<void>;
11848
12852
  protected beforePrerenderVisible(): void;
11849
12853
  /**
11850
12854
  * Displays the pre-rendered component inside the host element.
@@ -11923,7 +12927,7 @@ class V1Embed extends TsEmbed {
11923
12927
  * });
11924
12928
  * ```
11925
12929
  */
11926
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
12930
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
11927
12931
  /**
11928
12932
  * Only for testing purposes.
11929
12933
  * @hidden
@@ -12715,6 +13719,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
12715
13719
  spotterShareConversationConfig?: SpotterShareConversationConfig;
12716
13720
  visualOverridesParams?: VisualizationOverrides | null;
12717
13721
  starterPrompts?: StarterPromptsConfig;
13722
+ spotterAnalystConfig?: SpotterAnalystConfig;
12718
13723
  };
12719
13724
  }
12720
13725
  /**
@@ -13055,7 +14060,7 @@ export interface DiscoveryExperience {
13055
14060
  * The view configuration for full app embedding.
13056
14061
  * @group Embed components
13057
14062
  */
13058
- export interface AppViewConfig extends AllEmbedViewConfig {
14063
+ export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
13059
14064
  /**
13060
14065
  * If true, the top navigation bar within the ThoughtSpot app
13061
14066
  * is displayed. By default, the navigation bar is hidden.
@@ -13340,34 +14345,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13340
14345
  * ```
13341
14346
  */
13342
14347
  enableSearchAssist?: boolean;
13343
- /**
13344
- * If set to true, the Liveboard container dynamically resizes
13345
- * according to the height of the Liveboard.
13346
- *
13347
- * **Note**: Using fullHeight loads all visualizations
13348
- * on the Liveboard simultaneously, which results in
13349
- * multiple warehouse queries and potentially a
13350
- * longer wait for the topmost visualizations to
13351
- * display on the screen. Setting fullHeight to
13352
- * `false` fetches visualizations incrementally as
13353
- * users scroll the page to view the charts and tables.
13354
- *
13355
- * From SDK 1.52.0, enabling `fullHeight` also turns on
13356
- * {@link lazyLoadingForFullHeight} and
13357
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
13358
- * they scroll into view. Set either flag to `false` to opt out.
13359
- *
13360
- * Supported embed types: `AppEmbed`
13361
- * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
13362
- * @example
13363
- * ```js
13364
- * const embed = new AppEmbed('#tsEmbed', {
13365
- * ... // other embed view config
13366
- * fullHeight: true,
13367
- * })
13368
- * ```
13369
- */
13370
- fullHeight?: boolean;
13371
14348
  /**
13372
14349
  * Enables the V2 navigation and modular home page experience.
13373
14350
  * For more information,
@@ -13508,9 +14485,10 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13508
14485
  */
13509
14486
  isPNGInScheduledEmailsEnabled?: boolean;
13510
14487
  /**
13511
- * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
13512
- * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
13513
- * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl.
14488
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
14489
+ * rendered on a single page following the exact UI layout, instead of splitting
14490
+ * visualizations across multiple A4 pages. This feature is GA from SDK version
14491
+ * 1.51.0 and ThoughtSpot version 26.8.0.cl.
13514
14492
  *
13515
14493
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
13516
14494
  * @type {boolean}
@@ -13532,108 +14510,36 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13532
14510
  *
13533
14511
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
13534
14512
  * @type {boolean}
13535
- * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
13536
- * @default true
13537
- * @example
13538
- * ```js
13539
- * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
13540
- * const embed = new <EmbedComponent>('#tsEmbed', {
13541
- * ... // other embed view config
13542
- * isLiveboardXLSXCSVDownloadEnabled: true,
13543
- * })
13544
- * ```
13545
- */
13546
- isLiveboardXLSXCSVDownloadEnabled?: boolean;
13547
- /**
13548
- * This flag is used to enable/disable the granular XLSX/CSV schedules feature
13549
- * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl
13550
- *
13551
- * Supported embed types: `AppEmbed`, `LiveboardEmbed`
13552
- * @type {boolean}
13553
- * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
13554
- * @default true
13555
- * @example
13556
- * ```js
13557
- * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
13558
- * const embed = new <EmbedComponent>('#tsEmbed', {
13559
- * ... // other embed view config
13560
- * isGranularXLSXCSVSchedulesEnabled: true,
13561
- * })
13562
- * ```
13563
- */
13564
- isGranularXLSXCSVSchedulesEnabled?: boolean;
13565
- /**
13566
- * Loads visualizations only as they scroll into the viewport, instead of
13567
- * loading the whole full-height Liveboard at once.
13568
- *
13569
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
13570
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
13571
- * set explicitly. Set it to `false` to load every visualization upfront.
13572
- * The flag has no effect unless `fullHeight` is enabled.
13573
- *
13574
- * @type {boolean}
13575
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
13576
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
13577
- * @example
13578
- * ```js
13579
- * const embed = new AppEmbed('#embed-container', {
13580
- * // ...other options
13581
- * fullHeight: true,
13582
- * lazyLoadingForFullHeight: true,
13583
- * })
13584
- * ```
13585
- */
13586
- lazyLoadingForFullHeight?: boolean;
13587
- /**
13588
- * Computes the visible region of the embed against its scrollable and
13589
- * clipping ancestors, instead of treating the browser window as the only
13590
- * viewport, and tracks scroll and resize on those ancestors.
13591
- *
13592
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
13593
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
13594
- * set explicitly. Set it to `false` when the page scrolls with the window
13595
- * and the embed has no clipping ancestor, to skip the extra ancestor
13596
- * tracking.
13597
- *
13598
- * @type {boolean}
13599
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
13600
- * @hidden
14513
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
14514
+ * @default true
14515
+ * @example
14516
+ * ```js
14517
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
14518
+ * const embed = new <EmbedComponent>('#tsEmbed', {
14519
+ * ... // other embed view config
14520
+ * isLiveboardXLSXCSVDownloadEnabled: true,
14521
+ * })
14522
+ * ```
13601
14523
  */
13602
- enableScrollableContainerLazyLoading?: boolean;
14524
+ isLiveboardXLSXCSVDownloadEnabled?: boolean;
13603
14525
  /**
13604
- * How far outside the viewport a visualization starts loading, when
13605
- * {@link lazyLoadingForFullHeight} is enabled.
13606
- *
13607
- * For example, if the margin is set to '10px',
13608
- * the visualization will be loaded 10px before its top edge is visible in the
13609
- * viewport.
13610
- *
13611
- * The format is similar to CSS margin, so `'500px 0px'` extends the
13612
- * prefetch 500px above and below the viewport and not sideways. Accepted
13613
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
13614
- * `auto`; an invalid value is logged and ignored.
13615
- *
13616
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
13617
- * visualization ahead of the scroll position, so a chart has usually
13618
- * finished loading by the time it scrolls into view. Use a smaller margin
13619
- * to cut warehouse queries further, or `'0px'` to load a visualization
13620
- * only once it is actually visible.
14526
+ * This flag is used to enable/disable the granular XLSX/CSV schedules feature
14527
+ * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl
13621
14528
  *
13622
- * @type {string}
13623
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
13624
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
14529
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
14530
+ * @type {boolean}
14531
+ * @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
14532
+ * @default true
13625
14533
  * @example
13626
14534
  * ```js
13627
- * const embed = new AppEmbed('#embed-container', {
13628
- * // ...other options
13629
- * fullHeight: true,
13630
- * lazyLoadingForFullHeight: true,
13631
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
13632
- * lazyLoadingMargin: '0px',
14535
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
14536
+ * const embed = new <EmbedComponent>('#tsEmbed', {
14537
+ * ... // other embed view config
14538
+ * isGranularXLSXCSVSchedulesEnabled: true,
13633
14539
  * })
13634
14540
  * ```
13635
14541
  */
13636
- lazyLoadingMargin?: string;
14542
+ isGranularXLSXCSVSchedulesEnabled?: boolean;
13637
14543
  /**
13638
14544
  * updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
13639
14545
  *
@@ -13821,23 +14727,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13821
14727
  * @default false
13822
14728
  */
13823
14729
  enableStopAnswerGenerationEmbed?: boolean;
13824
- /**
13825
- * This is the minimum height (in pixels) for a full-height App.
13826
- * Setting this height helps resolve issues with empty Apps and
13827
- * other screens navigable from an App.
13828
- *
13829
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
13830
- * @default 500
13831
- * @example
13832
- * ```js
13833
- * const embed = new AppEmbed('#embed', {
13834
- * ... // other app view config
13835
- * fullHeight: true,
13836
- * minimumHeight: 600,
13837
- * });
13838
- * ```
13839
- */
13840
- minimumHeight?: number;
13841
14730
  /**
13842
14731
  * To enable the homepage announcement banner.
13843
14732
  * Controls the visibility of the announcement section
@@ -13887,6 +14776,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13887
14776
  * ```
13888
14777
  */
13889
14778
  updatedSpotterExperience?: boolean;
14779
+ /**
14780
+ * If set to `true`, the answer edit panel is hidden.
14781
+ *
14782
+ * Supported embed types: `AppEmbed`
14783
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
14784
+ * @example
14785
+ * ```js
14786
+ * const embed = new AppEmbed('#tsEmbed', {
14787
+ * ... // other embed view config
14788
+ * hideAnswerEditPanel: true,
14789
+ * })
14790
+ * ```
14791
+ */
14792
+ hideAnswerEditPanel?: boolean;
13890
14793
  }
13891
14794
  /**
13892
14795
  * APP_INIT data shape for AppEmbed.
@@ -13906,9 +14809,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
13906
14809
  */
13907
14810
  export class AppEmbed extends V1Embed {
13908
14811
  protected viewConfig: AppViewConfig;
13909
- private defaultHeight;
13910
- private lazyLoadScrollContainers;
13911
- private lazyLoadResizeObserver;
14812
+ private readonly fullHeightController?;
13912
14813
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
13913
14814
  /**
13914
14815
  * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
@@ -13929,27 +14830,11 @@ export class AppEmbed extends V1Embed {
13929
14830
  */
13930
14831
  protected getEmbedParams(): string;
13931
14832
  protected getEmbedParamsObject(): any;
13932
- private sendFullHeightLazyLoadData;
13933
- /**
13934
- * This is a handler for the RequestVisibleEmbedCoordinates event.
13935
- * It is used to send the visible coordinates data to the host application.
13936
- * @param data The event payload
13937
- * @param responder The responder function
13938
- */
13939
- private requestVisibleEmbedCoordinatesHandler;
13940
14833
  /**
13941
14834
  * Constructs the URL of the ThoughtSpot app page to be rendered.
13942
14835
  * @param pageId The ID of the page to be embedded.
13943
14836
  */
13944
14837
  getIFrameSrc(): string;
13945
- /**
13946
- * Set the iframe height as per the computed height received
13947
- * from the ThoughtSpot app.
13948
- * @param data The event payload
13949
- */
13950
- protected updateIFrameHeight: (data: MessagePayload) => void;
13951
- private embedIframeCenter;
13952
- private setIframeHeightForNonEmbedLiveboard;
13953
14838
  /**
13954
14839
  * Gets the ThoughtSpot route of the page for a particular page ID.
13955
14840
  * @param pageId The identifier for a page in the ThoughtSpot app.
@@ -13980,8 +14865,6 @@ export class AppEmbed extends V1Embed {
13980
14865
  */
13981
14866
  destroy(): void;
13982
14867
  private postRender;
13983
- private registerLazyLoadEvents;
13984
- private unregisterLazyLoadEvents;
13985
14868
  /**
13986
14869
  * Renders the embedded application pages in the ThoughtSpot app.
13987
14870
  * @param renderOptions An object containing the page ID
@@ -14286,71 +15169,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
14286
15169
  * The configuration for the embedded Liveboard or visualization page view.
14287
15170
  * @group Embed components
14288
15171
  */
14289
- export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14290
- /**
14291
- * If set to true, the embedded object container dynamically resizes
14292
- * according to the height of the Liveboard.
14293
- *
14294
- * **Note**: Using fullHeight loads all visualizations on the
14295
- * Liveboard simultaneously, which results in multiple warehouse
14296
- * queries and potentially a longer wait for the topmost
14297
- * visualizations to display on the screen.
14298
- * Setting `fullHeight` to `false` fetches visualizations
14299
- * incrementally as users scroll the page to view the charts and tables.
14300
- *
14301
- * From SDK 1.52.0, enabling `fullHeight` also turns on
14302
- * {@link lazyLoadingForFullHeight} and
14303
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
14304
- * they scroll into view. Set either flag to `false` to opt out.
14305
- *
14306
- *
14307
- * Supported embed types: `LiveboardEmbed`
14308
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
14309
- * @example
14310
- * ```js
14311
- * const embed = new LiveboardEmbed('#embed', {
14312
- * ... // other liveboard view config
14313
- * fullHeight: true,
14314
- * });
14315
- * ```
14316
- */
14317
- fullHeight?: boolean;
14318
- /**
14319
- * This is the minimum height (in pixels) for a full-height Liveboard.
14320
- * Setting this height helps resolve issues with empty Liveboards and
14321
- * other screens navigable from a Liveboard.
14322
- *
14323
- * Supported embed types: `LiveboardEmbed`
14324
- * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
14325
- * @deprecated Use `minimumHeight` instead.
14326
- * @default 500
14327
- * @example
14328
- * ```js
14329
- * const embed = new LiveboardEmbed('#embed', {
14330
- * ... // other liveboard view config
14331
- * fullHeight: true,
14332
- * defaultHeight: 600,
14333
- * });
14334
- * ```
14335
- */
14336
- defaultHeight?: number;
14337
- /**
14338
- * This is the minimum height (in pixels) for a full-height Liveboard.
14339
- * Setting this height helps resolve issues with empty Liveboards and
14340
- * other screens navigable from a Liveboard.
14341
- *
14342
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
14343
- * @default 500
14344
- * @example
14345
- * ```js
14346
- * const embed = new LiveboardEmbed('#embed', {
14347
- * ... // other liveboard view config
14348
- * fullHeight: true,
14349
- * minimumHeight: 600,
14350
- * });
14351
- * ```
14352
- */
14353
- minimumHeight?: number;
15172
+ export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14354
15173
  /**
14355
15174
  * If set to true, the context menu in visualizations will be enabled.
14356
15175
  * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
@@ -14640,9 +15459,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14640
15459
  */
14641
15460
  isPNGInScheduledEmailsEnabled?: boolean;
14642
15461
  /**
14643
- * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
14644
- * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
14645
- * This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.8.0.cl.
15462
+ * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
15463
+ * rendered on a single page following the exact UI layout, instead of splitting
15464
+ * visualizations across multiple A4 pages. This feature is GA from SDK version
15465
+ * 1.51.0 and ThoughtSpot version 26.8.0.cl.
14646
15466
  *
14647
15467
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
14648
15468
  * @type {boolean}
@@ -14694,77 +15514,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14694
15514
  * ```
14695
15515
  */
14696
15516
  isGranularXLSXCSVSchedulesEnabled?: boolean;
14697
- /**
14698
- * Loads visualizations only as they scroll into the viewport, instead of
14699
- * loading the whole full-height Liveboard at once.
14700
- *
14701
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
14702
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
14703
- * set explicitly. Set it to `false` to load every visualization upfront.
14704
- * The flag has no effect unless `fullHeight` is enabled.
14705
- *
14706
- * @type {boolean}
14707
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
14708
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
14709
- * @example
14710
- * ```js
14711
- * const embed = new LiveboardEmbed('#embed-container', {
14712
- * // ...other options
14713
- * fullHeight: true,
14714
- * lazyLoadingForFullHeight: true,
14715
- * })
14716
- * ```
14717
- */
14718
- lazyLoadingForFullHeight?: boolean;
14719
- /**
14720
- * Computes the visible region of the embed against its scrollable and
14721
- * clipping ancestors, instead of treating the browser window as the only
14722
- * viewport, and tracks scroll and resize on those ancestors.
14723
- *
14724
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
14725
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
14726
- * set explicitly. Set it to `false` when the page scrolls with the window
14727
- * and the embed has no clipping ancestor, to skip the extra ancestor
14728
- * tracking.
14729
- *
14730
- * @type {boolean}
14731
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
14732
- */
14733
- enableScrollableContainerLazyLoading?: boolean;
14734
- /**
14735
- * How far outside the viewport a visualization starts loading, when
14736
- * {@link lazyLoadingForFullHeight} is enabled.
14737
- *
14738
- * For example, if the margin is set to '10px',
14739
- * the visualization will be loaded 10px before its top edge is visible in the
14740
- * viewport.
14741
- *
14742
- * The format is similar to CSS margin, so `'500px 0px'` extends the
14743
- * prefetch 500px above and below the viewport and not sideways. Accepted
14744
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
14745
- * `auto`; an invalid value is logged and ignored.
14746
- *
14747
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
14748
- * visualization ahead of the scroll position, so a chart has usually
14749
- * finished loading by the time it scrolls into view. Use a smaller margin
14750
- * to cut warehouse queries further, or `'0px'` to load a visualization
14751
- * only once it is actually visible.
14752
- *
14753
- * @type {string}
14754
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
14755
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
14756
- * @example
14757
- * ```js
14758
- * const embed = new LiveboardEmbed('#embed-container', {
14759
- * // ...other options
14760
- * fullHeight: true,
14761
- * lazyLoadingForFullHeight: true,
14762
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
14763
- * lazyLoadingMargin: '0px',
14764
- * })
14765
- * ```
14766
- */
14767
- lazyLoadingMargin?: string;
14768
15517
  /**
14769
15518
  * showSpotterLimitations : show limitation text
14770
15519
  * of the spotter underneath the chat input.
@@ -14918,9 +15667,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14918
15667
  */
14919
15668
  export class LiveboardEmbed extends V1Embed {
14920
15669
  protected viewConfig: LiveboardViewConfig;
14921
- private defaultHeight;
14922
- private lazyLoadScrollContainers;
14923
- private lazyLoadResizeObserver;
15670
+ private readonly fullHeightController?;
14924
15671
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
14925
15672
  protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
14926
15673
  /**
@@ -14930,27 +15677,11 @@ export class LiveboardEmbed extends V1Embed {
14930
15677
  protected getEmbedParams(): string;
14931
15678
  protected getEmbedParamsObject(): any;
14932
15679
  private getIframeSuffixSrc;
14933
- private sendFullHeightLazyLoadData;
14934
- /**
14935
- * This is a handler for the RequestVisibleEmbedCoordinates event.
14936
- * It is used to send the visible coordinates data to the host application.
14937
- * @param data The event payload
14938
- * @param responder The responder function
14939
- */
14940
- private requestVisibleEmbedCoordinatesHandler;
14941
15680
  /**
14942
15681
  * Construct the URL of the embedded ThoughtSpot Liveboard or visualization
14943
15682
  * to be loaded within the iFrame.
14944
15683
  */
14945
15684
  private getIFrameSrc;
14946
- /**
14947
- * Set the iframe height as per the computed height received
14948
- * from the ThoughtSpot app.
14949
- * @param data The event payload
14950
- */
14951
- private updateIFrameHeight;
14952
- private embedIframeCenter;
14953
- private setIframeHeightForNonEmbedLiveboard;
14954
15685
  private setActiveTab;
14955
15686
  private showPreviewLoader;
14956
15687
  /**
@@ -14965,22 +15696,23 @@ export class LiveboardEmbed extends V1Embed {
14965
15696
  personalizedViewId: string;
14966
15697
  };
14967
15698
  protected beforePrerenderVisible(): void;
15699
+ private isShowingLiveboardRoute;
14968
15700
  protected handleRenderForPrerender(): Promise<TsEmbed>;
14969
15701
  /**
14970
15702
  * Triggers an event to the embedded app
15703
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
15704
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
14971
15705
  * @param {HostEvent} messageType The event type
14972
- * @param {any} data The payload to send with the message
15706
+ * @param {TriggerData} data The payload, typed against the event's contract
14973
15707
  * @returns A promise that resolves with the response from the embedded app
14974
15708
  */
14975
- trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
15709
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
14976
15710
  /**
14977
15711
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
14978
15712
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
14979
15713
  */
14980
15714
  destroy(): void;
14981
15715
  private postRender;
14982
- private registerLazyLoadEvents;
14983
- private unregisterLazyLoadEvents;
14984
15716
  /**
14985
15717
  * Render an embedded ThoughtSpot Liveboard or visualization
14986
15718
  * @param renderOptions An object specifying the Liveboard ID,
@@ -15151,6 +15883,20 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
15151
15883
  * ```
15152
15884
  */
15153
15885
  dataSource?: string;
15886
+ /**
15887
+ * If set to `true`, the answer edit panel is hidden.
15888
+ *
15889
+ * Supported embed types: `SearchEmbed`
15890
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
15891
+ * @example
15892
+ * ```js
15893
+ * const embed = new SearchEmbed('#tsEmbed', {
15894
+ * ... // other embed view config
15895
+ * hideAnswerEditPanel: true,
15896
+ * })
15897
+ * ```
15898
+ */
15899
+ hideAnswerEditPanel?: boolean;
15154
15900
  /**
15155
15901
  * The initial search query to load the answer with.
15156
15902
  * Use {@link searchOptions} instead.
@@ -15731,6 +16477,100 @@ export const getAnswerFromQuery: (query: string, worksheetId: string) => Promise
15731
16477
  * ```
15732
16478
  */
15733
16479
  export const createLiveboardWithAnswers: (answers: AnswerService[], name: string) => Promise<any>;
16480
+ export interface FilterChangedFilterContentValue {
16481
+ key?: string | number | boolean | null;
16482
+ }
16483
+ export interface FilterChangedFilterContent {
16484
+ filterType?: string;
16485
+ negate?: boolean;
16486
+ value?: FilterChangedFilterContentValue[];
16487
+ }
16488
+ export interface FilterChangedDateFilterValue {
16489
+ type?: string;
16490
+ op?: string;
16491
+ epoch?: string | number | null;
16492
+ dateRange?: {
16493
+ lowEpoch?: string | number | null;
16494
+ highEpoch?: string | number | null;
16495
+ };
16496
+ monthName?: string;
16497
+ quarterName?: string;
16498
+ yearName?: string;
16499
+ number?: number | null;
16500
+ datePeriod?: string;
16501
+ includeCurrentPeriod?: boolean | null;
16502
+ }
16503
+ export interface FilterChangedDateFilterContent {
16504
+ negate?: boolean;
16505
+ dateFilter?: FilterChangedDateFilterValue;
16506
+ }
16507
+ export interface FilterChangedFilter {
16508
+ filterContent?: FilterChangedFilterContent[];
16509
+ dateFilterContent?: FilterChangedDateFilterContent[];
16510
+ }
16511
+ export interface FilterChangedFilterGroup {
16512
+ columnInfo?: {
16513
+ name?: string;
16514
+ };
16515
+ filters?: FilterChangedFilter[];
16516
+ /**
16517
+ * Scope of the filter - `LIVEBOARD`, `TAB` or `GROUP`. Present from
16518
+ * SDK 1.53.0 / ThoughtSpot 26.10.0.cl. Omitted means Liveboard level.
16519
+ */
16520
+ applicability?: Applicability;
16521
+ }
16522
+ /**
16523
+ * Shape of the payload received via `LiveboardEmbed.on(EmbedEvent.FilterChanged, ...)`.
16524
+ */
16525
+ export interface FilterChangedPayload {
16526
+ liveboardFilters?: FilterChangedFilterGroup[];
16527
+ runtimeFilters?: RuntimeFilter[];
16528
+ }
16529
+ export interface UpdateFiltersFilterParam {
16530
+ columnName: string;
16531
+ operator: string;
16532
+ values: (string | number | boolean | bigint)[];
16533
+ type?: string;
16534
+ datePeriod?: string;
16535
+ negate?: boolean;
16536
+ includeCurrentPeriod?: boolean;
16537
+ applicability?: Applicability;
16538
+ }
16539
+ /**
16540
+ * Shape expected by `liveboardEmbed.trigger(HostEvent.UpdateFilters, ...)`.
16541
+ */
16542
+ export interface UpdateFiltersPayload {
16543
+ filters: UpdateFiltersFilterParam[];
16544
+ }
16545
+ /**
16546
+ * Converts the payload emitted by {@link EmbedEvent.FilterChanged} into the
16547
+ * payload shape expected by {@link HostEvent.UpdateFilters}, so the same
16548
+ * filter state can be captured and re-applied later, for example on a
16549
+ * subsequent page load.
16550
+ *
16551
+ * Both the Liveboard filters and the runtime filters present in the
16552
+ * `FilterChanged` payload are included in the returned `filters` array.
16553
+ *
16554
+ * Note: a column with multiple date-filter conditions (e.g. an OR of two
16555
+ * date ranges) is not guaranteed to round-trip losslessly - `HostEvent.UpdateFilters`
16556
+ * treats date filters as replace-not-merge per column, so only the last
16557
+ * converted entry for such a column will apply.
16558
+ * @param filterChangedPayload The filter state carried by the
16559
+ * `EmbedEvent.FilterChanged` callback, which is `payload.data` - the
16560
+ * callback argument is the event envelope, and the filters sit under its
16561
+ * `data` key.
16562
+ * @example
16563
+ * ```js
16564
+ * let savedFilters;
16565
+ * liveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
16566
+ * savedFilters = convertFilterChangedToUpdateFiltersPayload(payload.data);
16567
+ * });
16568
+ *
16569
+ * // later, e.g. after a fresh page load
16570
+ * liveboardEmbed.trigger(HostEvent.UpdateFilters, savedFilters);
16571
+ * ```
16572
+ */
16573
+ export function convertFilterChangedToUpdateFiltersPayload(filterChangedPayload: FilterChangedPayload): UpdateFiltersPayload;
15734
16574
  /**
15735
16575
  * Resets the auth token and a new token will be fetched on the next request.
15736
16576
  * @example