@thoughtspot/visual-embed-sdk 1.52.0 → 1.52.1

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 (279) hide show
  1. package/cjs/package.json +9 -1
  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 +378 -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 +17 -140
  23. package/cjs/src/embed/app.d.ts.map +1 -1
  24. package/cjs/src/embed/app.js +20 -120
  25. package/cjs/src/embed/app.js.map +1 -1
  26. package/cjs/src/embed/app.spec.js +70 -26
  27. package/cjs/src/embed/app.spec.js.map +1 -1
  28. package/cjs/src/embed/events.spec.js +12 -2
  29. package/cjs/src/embed/events.spec.js.map +1 -1
  30. package/cjs/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  31. package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  32. package/cjs/src/embed/hostEventClient/host-event-client.js +23 -18
  33. package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
  34. package/cjs/src/embed/hostEventClient/host-event-client.spec.js +36 -36
  35. package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  36. package/cjs/src/embed/hostEventClient/utils.d.ts +1 -1
  37. package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
  38. package/cjs/src/embed/hostEventClient/utils.js +3 -3
  39. package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
  40. package/cjs/src/embed/liveboard.d.ts +9 -161
  41. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  42. package/cjs/src/embed/liveboard.js +66 -134
  43. package/cjs/src/embed/liveboard.js.map +1 -1
  44. package/cjs/src/embed/liveboard.spec.js +211 -28
  45. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  46. package/cjs/src/embed/search.d.ts +14 -0
  47. package/cjs/src/embed/search.d.ts.map +1 -1
  48. package/cjs/src/embed/search.js +4 -1
  49. package/cjs/src/embed/search.js.map +1 -1
  50. package/cjs/src/embed/search.spec.js +65 -0
  51. package/cjs/src/embed/search.spec.js.map +1 -1
  52. package/cjs/src/embed/ts-embed.d.ts +17 -22
  53. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  54. package/cjs/src/embed/ts-embed.js +82 -56
  55. package/cjs/src/embed/ts-embed.js.map +1 -1
  56. package/cjs/src/embed/ts-embed.spec.js +325 -17
  57. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  58. package/cjs/src/full-height.d.ts +137 -0
  59. package/cjs/src/full-height.d.ts.map +1 -0
  60. package/cjs/src/full-height.js +272 -0
  61. package/cjs/src/full-height.js.map +1 -0
  62. package/cjs/src/full-height.spec.d.ts +2 -0
  63. package/cjs/src/full-height.spec.d.ts.map +1 -0
  64. package/cjs/src/full-height.spec.js +835 -0
  65. package/cjs/src/full-height.spec.js.map +1 -0
  66. package/cjs/src/index.d.ts +4 -3
  67. package/cjs/src/index.d.ts.map +1 -1
  68. package/cjs/src/index.js +3 -3
  69. package/cjs/src/index.js.map +1 -1
  70. package/cjs/src/react/all-types-export.d.ts +1 -1
  71. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  72. package/cjs/src/react/all-types-export.js.map +1 -1
  73. package/cjs/src/react/all-types-export.parity.spec.js +55 -3
  74. package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
  75. package/cjs/src/types.d.ts +540 -3
  76. package/cjs/src/types.d.ts.map +1 -1
  77. package/cjs/src/types.js +326 -1
  78. package/cjs/src/types.js.map +1 -1
  79. package/cjs/src/utils/processTrigger.d.ts +3 -1
  80. package/cjs/src/utils/processTrigger.d.ts.map +1 -1
  81. package/cjs/src/utils/processTrigger.js +19 -51
  82. package/cjs/src/utils/processTrigger.js.map +1 -1
  83. package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
  84. package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
  85. package/cjs/src/utils/transport/iframe-transport.js +108 -0
  86. package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
  87. package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  88. package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  89. package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
  90. package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
  91. package/cjs/src/utils.d.ts +18 -0
  92. package/cjs/src/utils.d.ts.map +1 -1
  93. package/cjs/src/utils.js +39 -1
  94. package/cjs/src/utils.js.map +1 -1
  95. package/cjs/src/utils.spec.js +62 -0
  96. package/cjs/src/utils.spec.js.map +1 -1
  97. package/dist/{index-BMppCU63.js → index-C1pmYb5H.js} +1 -1
  98. package/dist/src/contracts/contracts.spec.d.ts +2 -0
  99. package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
  100. package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
  101. package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
  102. package/dist/src/contracts/host-event-contracts.d.ts +378 -0
  103. package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
  104. package/dist/src/contracts/index.d.ts +22 -0
  105. package/dist/src/contracts/index.d.ts.map +1 -0
  106. package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  107. package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  108. package/dist/src/embed/app.d.ts +17 -140
  109. package/dist/src/embed/app.d.ts.map +1 -1
  110. package/dist/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  111. package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  112. package/dist/src/embed/hostEventClient/utils.d.ts +1 -1
  113. package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
  114. package/dist/src/embed/liveboard.d.ts +9 -161
  115. package/dist/src/embed/liveboard.d.ts.map +1 -1
  116. package/dist/src/embed/search.d.ts +14 -0
  117. package/dist/src/embed/search.d.ts.map +1 -1
  118. package/dist/src/embed/ts-embed.d.ts +17 -22
  119. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  120. package/dist/src/full-height.d.ts +137 -0
  121. package/dist/src/full-height.d.ts.map +1 -0
  122. package/dist/src/full-height.spec.d.ts +2 -0
  123. package/dist/src/full-height.spec.d.ts.map +1 -0
  124. package/dist/src/index.d.ts +4 -3
  125. package/dist/src/index.d.ts.map +1 -1
  126. package/dist/src/react/all-types-export.d.ts +1 -1
  127. package/dist/src/react/all-types-export.d.ts.map +1 -1
  128. package/dist/src/types.d.ts +540 -3
  129. package/dist/src/types.d.ts.map +1 -1
  130. package/dist/src/utils/processTrigger.d.ts +3 -1
  131. package/dist/src/utils/processTrigger.d.ts.map +1 -1
  132. package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
  133. package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
  134. package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  135. package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  136. package/dist/src/utils.d.ts +18 -0
  137. package/dist/src/utils.d.ts.map +1 -1
  138. package/dist/tsembed-react.es.js +925 -363
  139. package/dist/tsembed-react.js +924 -362
  140. package/dist/tsembed.es.js +925 -363
  141. package/dist/tsembed.js +924 -362
  142. package/dist/visual-embed-sdk-react-full.d.ts +1357 -656
  143. package/dist/visual-embed-sdk-react.d.ts +1257 -606
  144. package/dist/visual-embed-sdk.d.ts +1320 -642
  145. package/lib/package.json +9 -1
  146. package/lib/src/contracts/contracts.spec.d.ts +2 -0
  147. package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
  148. package/lib/src/contracts/contracts.spec.js +342 -0
  149. package/lib/src/contracts/contracts.spec.js.map +1 -0
  150. package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
  151. package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
  152. package/lib/src/contracts/embed-event-payloads.js +2 -0
  153. package/lib/src/contracts/embed-event-payloads.js.map +1 -0
  154. package/lib/src/contracts/host-event-contracts.d.ts +378 -0
  155. package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
  156. package/lib/src/contracts/host-event-contracts.js +2 -0
  157. package/lib/src/contracts/host-event-contracts.js.map +1 -0
  158. package/lib/src/contracts/index.d.ts +22 -0
  159. package/lib/src/contracts/index.d.ts.map +1 -0
  160. package/lib/src/contracts/index.js +22 -0
  161. package/lib/src/contracts/index.js.map +1 -0
  162. package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
  163. package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
  164. package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
  165. package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
  166. package/lib/src/embed/app.d.ts +17 -140
  167. package/lib/src/embed/app.d.ts.map +1 -1
  168. package/lib/src/embed/app.js +22 -122
  169. package/lib/src/embed/app.js.map +1 -1
  170. package/lib/src/embed/app.spec.js +70 -26
  171. package/lib/src/embed/app.spec.js.map +1 -1
  172. package/lib/src/embed/events.spec.js +12 -2
  173. package/lib/src/embed/events.spec.js.map +1 -1
  174. package/lib/src/embed/hostEventClient/host-event-client.d.ts +3 -2
  175. package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
  176. package/lib/src/embed/hostEventClient/host-event-client.js +6 -1
  177. package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
  178. package/lib/src/embed/hostEventClient/host-event-client.spec.js +1 -1
  179. package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
  180. package/lib/src/embed/hostEventClient/utils.d.ts +1 -1
  181. package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
  182. package/lib/src/embed/hostEventClient/utils.js +1 -1
  183. package/lib/src/embed/hostEventClient/utils.js.map +1 -1
  184. package/lib/src/embed/liveboard.d.ts +9 -161
  185. package/lib/src/embed/liveboard.d.ts.map +1 -1
  186. package/lib/src/embed/liveboard.js +67 -135
  187. package/lib/src/embed/liveboard.js.map +1 -1
  188. package/lib/src/embed/liveboard.spec.js +211 -28
  189. package/lib/src/embed/liveboard.spec.js.map +1 -1
  190. package/lib/src/embed/search.d.ts +14 -0
  191. package/lib/src/embed/search.d.ts.map +1 -1
  192. package/lib/src/embed/search.js +4 -1
  193. package/lib/src/embed/search.js.map +1 -1
  194. package/lib/src/embed/search.spec.js +65 -0
  195. package/lib/src/embed/search.spec.js.map +1 -1
  196. package/lib/src/embed/ts-embed.d.ts +17 -22
  197. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  198. package/lib/src/embed/ts-embed.js +82 -56
  199. package/lib/src/embed/ts-embed.js.map +1 -1
  200. package/lib/src/embed/ts-embed.spec.js +322 -14
  201. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  202. package/lib/src/full-height.d.ts +137 -0
  203. package/lib/src/full-height.d.ts.map +1 -0
  204. package/lib/src/full-height.js +268 -0
  205. package/lib/src/full-height.js.map +1 -0
  206. package/lib/src/full-height.spec.d.ts +2 -0
  207. package/lib/src/full-height.spec.d.ts.map +1 -0
  208. package/lib/src/full-height.spec.js +833 -0
  209. package/lib/src/full-height.spec.js.map +1 -0
  210. package/lib/src/index.d.ts +4 -3
  211. package/lib/src/index.d.ts.map +1 -1
  212. package/lib/src/index.js +1 -1
  213. package/lib/src/index.js.map +1 -1
  214. package/lib/src/react/all-types-export.d.ts +1 -1
  215. package/lib/src/react/all-types-export.d.ts.map +1 -1
  216. package/lib/src/react/all-types-export.js.map +1 -1
  217. package/lib/src/react/all-types-export.parity.spec.js +55 -3
  218. package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
  219. package/lib/src/types.d.ts +540 -3
  220. package/lib/src/types.d.ts.map +1 -1
  221. package/lib/src/types.js +326 -1
  222. package/lib/src/types.js.map +1 -1
  223. package/lib/src/utils/processTrigger.d.ts +3 -1
  224. package/lib/src/utils/processTrigger.d.ts.map +1 -1
  225. package/lib/src/utils/processTrigger.js +19 -51
  226. package/lib/src/utils/processTrigger.js.map +1 -1
  227. package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
  228. package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
  229. package/lib/src/utils/transport/iframe-transport.js +101 -0
  230. package/lib/src/utils/transport/iframe-transport.js.map +1 -0
  231. package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
  232. package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
  233. package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
  234. package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
  235. package/lib/src/utils.d.ts +18 -0
  236. package/lib/src/utils.d.ts.map +1 -1
  237. package/lib/src/utils.js +37 -0
  238. package/lib/src/utils.js.map +1 -1
  239. package/lib/src/utils.spec.js +63 -1
  240. package/lib/src/utils.spec.js.map +1 -1
  241. package/lib/src/visual-embed-sdk.d.ts +1320 -642
  242. package/package.json +9 -1
  243. package/src/contracts/contracts.spec.ts +392 -0
  244. package/src/contracts/embed-event-payloads.ts +83 -0
  245. package/src/contracts/host-event-contracts.ts +456 -0
  246. package/src/contracts/index.ts +53 -0
  247. package/src/contracts/ui-passthrough-contracts.ts +301 -0
  248. package/src/embed/app.spec.ts +86 -34
  249. package/src/embed/app.ts +37 -264
  250. package/src/embed/events.spec.ts +14 -2
  251. package/src/embed/hostEventClient/host-event-client.spec.ts +2 -2
  252. package/src/embed/hostEventClient/host-event-client.ts +18 -5
  253. package/src/embed/hostEventClient/utils.ts +2 -1
  254. package/src/embed/liveboard.spec.ts +257 -38
  255. package/src/embed/liveboard.ts +75 -296
  256. package/src/embed/search.spec.ts +80 -0
  257. package/src/embed/search.ts +20 -0
  258. package/src/embed/ts-embed.spec.ts +448 -15
  259. package/src/embed/ts-embed.ts +109 -66
  260. package/src/full-height.spec.ts +1008 -0
  261. package/src/full-height.ts +361 -0
  262. package/src/index.ts +93 -5
  263. package/src/react/all-types-export.parity.spec.ts +63 -3
  264. package/src/react/all-types-export.ts +45 -0
  265. package/src/types.ts +540 -1
  266. package/src/utils/processTrigger.ts +28 -58
  267. package/src/utils/transport/iframe-transport.spec.ts +177 -0
  268. package/src/utils/transport/iframe-transport.ts +122 -0
  269. package/src/utils.spec.ts +71 -0
  270. package/src/utils.ts +38 -0
  271. package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
  272. package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  273. package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
  274. package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
  275. package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  276. package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
  277. package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
  278. package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
  279. 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,6 +7368,8 @@ 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);
@@ -7039,6 +7389,7 @@ export enum HostEvent {
7039
7389
  GetFilters = "getFilters",
7040
7390
  /**
7041
7391
  * Update one or several filters applied on a Liveboard.
7392
+ * Payload: {@link UpdateFiltersRequest}.
7042
7393
  * @param - Includes the following keys:
7043
7394
  * - `filter`: A single filter object containing column name, filter operator, and
7044
7395
  * values.
@@ -7167,6 +7518,8 @@ export enum HostEvent {
7167
7518
  UpdateFilters = "updateFilters",
7168
7519
  /**
7169
7520
  * Get tab details for the current Liveboard.
7521
+ * Payload: none.
7522
+ * Response: {@link GetTabsResponse}.
7170
7523
  * @example
7171
7524
  * ```js
7172
7525
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -7192,6 +7545,8 @@ export enum HostEvent {
7192
7545
  /**
7193
7546
  * Get group details for the current Liveboard.
7194
7547
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
7548
+ * Payload: none.
7549
+ * Response: {@link GetGroupsResponse}.
7195
7550
  * @example
7196
7551
  * ```js
7197
7552
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -7216,6 +7571,7 @@ export enum HostEvent {
7216
7571
  GetGroups = "getGroups",
7217
7572
  /**
7218
7573
  * Set the visible tabs on a Liveboard.
7574
+ * Payload: `string[]`.
7219
7575
  * @param - an array of ids of tabs to show, the IDs not passed
7220
7576
  * will be hidden.
7221
7577
  * @example
@@ -7238,6 +7594,7 @@ export enum HostEvent {
7238
7594
  SetVisibleTabs = "SetPinboardVisibleTabs",
7239
7595
  /**
7240
7596
  * Set the hidden tabs on a Liveboard.
7597
+ * Payload: `string[]`.
7241
7598
  * @param - an array of the IDs of the tabs to hide.
7242
7599
  * The IDs not passed will be shown.
7243
7600
  * @example
@@ -7266,6 +7623,8 @@ export enum HostEvent {
7266
7623
  * `getAnswerService()` method on the embed instance to get an AnswerService
7267
7624
  * object that provides a more convenient interface for working with answers.
7268
7625
  *
7626
+ * Payload: {@link GetAnswerSessionRequest}.
7627
+ * Response: {@link GetAnswerSessionResponse}.
7269
7628
  * @example
7270
7629
  * ```js
7271
7630
  * // Preferred way to get an AnswerService
@@ -7293,6 +7652,7 @@ export enum HostEvent {
7293
7652
  GetAnswerSession = "getAnswerSession",
7294
7653
  /**
7295
7654
  * Trigger the *Ask Sage* action for visualizations
7655
+ * Payload: {@link RequiredVizRequest}.
7296
7656
  * @example
7297
7657
  * ```js
7298
7658
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -7304,6 +7664,7 @@ export enum HostEvent {
7304
7664
  /**
7305
7665
  * Trigger cross filter update action on a Liveboard.
7306
7666
  *
7667
+ * Payload: {@link UpdateCrossFilterRequest}.
7307
7668
  * @example
7308
7669
  * ```js
7309
7670
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -7319,7 +7680,9 @@ export enum HostEvent {
7319
7680
  UpdateCrossFilter = "UpdateCrossFilter",
7320
7681
  /**
7321
7682
  * Trigger reset action for a personalized Liveboard view.
7322
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7683
+ * This event is deprecated.
7684
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7685
+ * Payload: none.
7323
7686
  * @example
7324
7687
  * ```js
7325
7688
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -7340,6 +7703,7 @@ export enum HostEvent {
7340
7703
  /**
7341
7704
  * Triggers an action to update Parameter values on embedded
7342
7705
  * Answers, Liveboard, and Spotter answer in Edit mode.
7706
+ * Payload: {@link RuntimeParameter}[].
7343
7707
  * @param - Includes the following keys for each item:
7344
7708
  * - `name`: Name of the parameter.
7345
7709
  * - `value`: The value to set for the parameter.
@@ -7397,6 +7761,8 @@ export enum HostEvent {
7397
7761
  * whole Liveboard.
7398
7762
  * The `applicability` attribute is available from SDK: 1.53.0 |
7399
7763
  * ThoughtSpot: 26.10.0.cl.
7764
+ * Payload: none.
7765
+ * Response: {@link GetParametersResponse}.
7400
7766
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
7401
7767
  * ```js
7402
7768
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -7434,6 +7800,7 @@ export enum HostEvent {
7434
7800
  * ```js
7435
7801
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
7436
7802
  * ```
7803
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
7437
7804
  * @example
7438
7805
  * ```js
7439
7806
  * // Update personalized view from liveboard context
@@ -7466,6 +7833,7 @@ export enum HostEvent {
7466
7833
  * If neither is provided, the Liveboard resets to the original/default view.
7467
7834
  * When a `viewName` is provided and multiple views share
7468
7835
  * the same name, the first match is selected.
7836
+ * Payload: {@link PersonalisedViewRequest}.
7469
7837
  * @example
7470
7838
  * ```js
7471
7839
  * liveboardEmbed.trigger(
@@ -7509,6 +7877,8 @@ export enum HostEvent {
7509
7877
  * If no parameters are specified, the save action is
7510
7878
  * triggered with a modal to prompt users to
7511
7879
  * add a name and description for the Answer.
7880
+ * Payload: {@link SaveAnswerRequest}.
7881
+ * Response: {@link SaveAnswerResponse}.
7512
7882
  * @param - Includes the following keys:
7513
7883
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
7514
7884
  * embed.
@@ -7594,6 +7964,7 @@ export enum HostEvent {
7594
7964
  /**
7595
7965
  * Triggers a search operation with the search tokens specified in
7596
7966
  * the search query string in spotter embed.
7967
+ * Payload: {@link SpotterSearchRequest}.
7597
7968
  * @param - Includes the following keys:
7598
7969
  * - `query`: Text string in Natural Language format.
7599
7970
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -7618,6 +7989,7 @@ export enum HostEvent {
7618
7989
  SpotterSearch = "SpotterSearch",
7619
7990
  /**
7620
7991
  * Edits the last prompt in spotter embed.
7992
+ * Payload: `string`.
7621
7993
  * @param - `query`: Text string
7622
7994
  * @example
7623
7995
  * ```js
@@ -7634,6 +8006,7 @@ export enum HostEvent {
7634
8006
  EditLastPrompt = "EditLastPrompt",
7635
8007
  /**
7636
8008
  * Opens the data source preview modal in Spotter Embed.
8009
+ * Payload: none.
7637
8010
  * @example
7638
8011
  * ```js
7639
8012
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -7669,6 +8042,7 @@ export enum HostEvent {
7669
8042
  DataModelInstructions = "DataModelInstructions",
7670
8043
  /**
7671
8044
  * Resets the Spotter Embed Conversation.
8045
+ * Payload: none.
7672
8046
  * @example
7673
8047
  * ```js
7674
8048
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -7681,6 +8055,7 @@ export enum HostEvent {
7681
8055
  * `conversationId` is **mandatory** — you must pass the id of the
7682
8056
  * conversation to share. Also no-op when sharing is disabled
7683
8057
  * (enableShareConversation off) or when already in the read-only shared view.
8058
+ * Payload: {@link ConversationScopedRequest}.
7684
8059
  * @example
7685
8060
  * ```js
7686
8061
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -7690,6 +8065,7 @@ export enum HostEvent {
7690
8065
  ShareSpotterConversation = "ShareSpotterConversation",
7691
8066
  /**
7692
8067
  * Closes the Spotter share-conversation modal. No-op if none is open.
8068
+ * Payload: none.
7693
8069
  * @example
7694
8070
  * ```js
7695
8071
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -7699,6 +8075,7 @@ export enum HostEvent {
7699
8075
  CloseSpotterShareConversation = "CloseSpotterShareConversation",
7700
8076
  /**
7701
8077
  * Exits the read-only shared-conversation view.
8078
+ * Payload: none.
7702
8079
  * @example
7703
8080
  * ```js
7704
8081
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -7708,6 +8085,7 @@ export enum HostEvent {
7708
8085
  ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
7709
8086
  /**
7710
8087
  * Deletes the last prompt in spotter embed.
8088
+ * Payload: none.
7711
8089
  * @example
7712
8090
  * ```js
7713
8091
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -7717,6 +8095,7 @@ export enum HostEvent {
7717
8095
  DeleteLastPrompt = "DeleteLastPrompt",
7718
8096
  /**
7719
8097
  * Toggle the visualization to chart or table view.
8098
+ * Payload: {@link RequiredVizRequest}.
7720
8099
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
7721
8100
  * @example
7722
8101
  * ```js
@@ -7755,6 +8134,7 @@ export enum HostEvent {
7755
8134
  VisibleEmbedCoordinates = "visibleEmbedCoordinates",
7756
8135
  /**
7757
8136
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
8137
+ * Payload: {@link RequiredVizRequest}.
7758
8138
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
7759
8139
  * @example
7760
8140
  * ```js
@@ -7816,6 +8196,7 @@ export enum HostEvent {
7816
8196
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7817
8197
  * instance.
7818
8198
  *
8199
+ * Payload: {@link ConversationScopedRequest}.
7819
8200
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7820
8201
  * @example
7821
8202
  * ```js
@@ -7833,6 +8214,7 @@ export enum HostEvent {
7833
8214
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7834
8215
  * instance.
7835
8216
  *
8217
+ * Payload: {@link ConversationScopedRequest}.
7836
8218
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7837
8219
  * @example
7838
8220
  * ```js
@@ -7857,6 +8239,7 @@ export enum HostEvent {
7857
8239
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
7858
8240
  * Sends a test schedule email to self or all recipients.
7859
8241
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
8242
+ * Payload: {@link ScheduleEmailRequest}.
7860
8243
  * @example
7861
8244
  * ```js
7862
8245
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -7875,6 +8258,7 @@ export enum HostEvent {
7875
8258
  SendTestScheduleEmail = "sendTestScheduleEmail",
7876
8259
  /**
7877
8260
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
8261
+ * Payload: `{ query: string }`.
7878
8262
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7879
8263
  * @param query - the prompt text to send.
7880
8264
  * @example
@@ -7887,6 +8271,7 @@ export enum HostEvent {
7887
8271
  SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
7888
8272
  /**
7889
8273
  * Initializes a new SpotterViz conversation.
8274
+ * Payload: none.
7890
8275
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7891
8276
  * @example
7892
8277
  * ```js
@@ -7896,6 +8281,7 @@ export enum HostEvent {
7896
8281
  InitSpotterVizConversation = "InitSpotterVizConversation",
7897
8282
  /**
7898
8283
  * Opens the SpotterViz panel.
8284
+ * Payload: none.
7899
8285
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7900
8286
  * @example
7901
8287
  * ```js
@@ -7905,6 +8291,7 @@ export enum HostEvent {
7905
8291
  OpenSpotterVizPanel = "OpenSpotterVizPanel",
7906
8292
  /**
7907
8293
  * Closes the SpotterViz panel.
8294
+ * Payload: none.
7908
8295
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7909
8296
  * @example
7910
8297
  * ```js
@@ -7915,6 +8302,7 @@ export enum HostEvent {
7915
8302
  /**
7916
8303
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
7917
8304
  * Requires `enableLiveboardDataCache` to be enabled.
8305
+ * Payload: {@link ScheduleEmailRequest}.
7918
8306
  * @example
7919
8307
  * ```js
7920
8308
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -9947,89 +10335,350 @@ export enum Action {
9947
10335
  * disabledActions: [Action.SpotterOnLiveboard]
9948
10336
  * ```
9949
10337
  */
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 {
10338
+ SpotterOnLiveboard = "spotterOnLiveboard",
10030
10339
  /**
10031
- * Shows the action as a primary button
10032
- * in the toolbar area of the embed.
10340
+ * Controls the visibility and disabled state of the "Chart Type" menu item
10341
+ * in Chart Settings V2.
10342
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10343
+ * @example
10344
+ * ```js
10345
+ * {
10346
+ * hiddenActions: [Action.ChartTypeSettings],
10347
+ * disabledActions: [Action.ChartTypeSettings],
10348
+ * }
10349
+ * ```
10350
+ */
10351
+ ChartTypeSettings = "CHART_TYPE",
10352
+ /**
10353
+ * Controls the visibility and disabled state of the "Layout" menu item
10354
+ * in Chart Settings V2.
10355
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10356
+ * @example
10357
+ * ```js
10358
+ * {
10359
+ * hiddenActions: [Action.LayoutSettings],
10360
+ * disabledActions: [Action.LayoutSettings],
10361
+ * }
10362
+ * ```
10363
+ */
10364
+ LayoutSettings = "LAYOUT",
10365
+ /**
10366
+ * Controls the visibility and disabled state of the "Column" menu item
10367
+ * in Chart Settings V2.
10368
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10369
+ * @example
10370
+ * ```js
10371
+ * {
10372
+ * hiddenActions: [Action.ColumnSettings],
10373
+ * disabledActions: [Action.ColumnSettings],
10374
+ * }
10375
+ * ```
10376
+ */
10377
+ ColumnSettings = "COLUMN",
10378
+ /**
10379
+ * Controls the visibility and disabled state of the "Axis" menu item
10380
+ * in Chart Settings V2.
10381
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10382
+ * @example
10383
+ * ```js
10384
+ * {
10385
+ * hiddenActions: [Action.AxisSettings],
10386
+ * disabledActions: [Action.AxisSettings],
10387
+ * }
10388
+ * ```
10389
+ */
10390
+ AxisSettings = "AXIS",
10391
+ /**
10392
+ * Controls the visibility and disabled state of the "Data Label" menu item
10393
+ * in Chart Settings V2.
10394
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10395
+ * @example
10396
+ * ```js
10397
+ * {
10398
+ * hiddenActions: [Action.DataLabelSettings],
10399
+ * disabledActions: [Action.DataLabelSettings],
10400
+ * }
10401
+ * ```
10402
+ */
10403
+ DataLabelSettings = "DATA_LABEL",
10404
+ /**
10405
+ * Controls the visibility and disabled state of the "Tooltip" menu item
10406
+ * in Chart Settings V2.
10407
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10408
+ * @example
10409
+ * ```js
10410
+ * {
10411
+ * hiddenActions: [Action.TooltipSettings],
10412
+ * disabledActions: [Action.TooltipSettings],
10413
+ * }
10414
+ * ```
10415
+ */
10416
+ TooltipSettings = "TOOLTIP",
10417
+ /**
10418
+ * Controls the visibility and disabled state of the "Legend" menu item
10419
+ * in Chart Settings V2.
10420
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10421
+ * @example
10422
+ * ```js
10423
+ * {
10424
+ * hiddenActions: [Action.LegendSettings],
10425
+ * disabledActions: [Action.LegendSettings],
10426
+ * }
10427
+ * ```
10428
+ */
10429
+ LegendSettings = "LEGEND",
10430
+ /**
10431
+ * Controls the visibility and disabled state of the "Display" menu item
10432
+ * in Chart Settings V2.
10433
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10434
+ * @example
10435
+ * ```js
10436
+ * {
10437
+ * hiddenActions: [Action.DisplaySettings],
10438
+ * disabledActions: [Action.DisplaySettings],
10439
+ * }
10440
+ * ```
10441
+ */
10442
+ DisplaySettings = "DISPLAY",
10443
+ /**
10444
+ * Controls the visibility and disabled state of the "Query Details" menu
10445
+ * item in Chart Settings V2.
10446
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10447
+ * @example
10448
+ * ```js
10449
+ * {
10450
+ * hiddenActions: [Action.QuerySettings],
10451
+ * disabledActions: [Action.QuerySettings],
10452
+ * }
10453
+ * ```
10454
+ */
10455
+ QuerySettings = "QUERY_DETAILS",
10456
+ /**
10457
+ * Controls the visibility and disabled state of the "Custom Action" menu
10458
+ * item in Chart Settings V2.
10459
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10460
+ * @example
10461
+ * ```js
10462
+ * {
10463
+ * hiddenActions: [Action.CustomSettings],
10464
+ * disabledActions: [Action.CustomSettings],
10465
+ * }
10466
+ * ```
10467
+ */
10468
+ CustomSettings = "CUSTOM_ACTION",
10469
+ /**
10470
+ * Controls the visibility and disabled state of the "Muze AI" menu item
10471
+ * in Chart Settings V2.
10472
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10473
+ * @example
10474
+ * ```js
10475
+ * {
10476
+ * hiddenActions: [Action.MuzeAiSettings],
10477
+ * disabledActions: [Action.MuzeAiSettings],
10478
+ * }
10479
+ * ```
10480
+ */
10481
+ MuzeAiSettings = "MUZE_AI",
10482
+ /**
10483
+ * Controls the visibility and disabled state of the "R Analysis" menu item
10484
+ * in Chart Settings V2.
10485
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10486
+ * @example
10487
+ * ```js
10488
+ * {
10489
+ * hiddenActions: [Action.RAnalysisSettings],
10490
+ * disabledActions: [Action.RAnalysisSettings],
10491
+ * }
10492
+ * ```
10493
+ */
10494
+ RAnalysisSettings = "R_ANALYSIS",
10495
+ /**
10496
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
10497
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10498
+ * @example
10499
+ * ```js
10500
+ * {
10501
+ * hiddenActions: [Action.AddToCollection],
10502
+ * disabledActions: [Action.AddToCollection],
10503
+ * }
10504
+ * ```
10505
+ */
10506
+ AddToCollection = "addToCollection",
10507
+ /**
10508
+ * Controls the visibility and disabled state of the "Create Collection" button.
10509
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10510
+ * @example
10511
+ * ```js
10512
+ * {
10513
+ * hiddenActions: [Action.CreateCollection],
10514
+ * disabledActions: [Action.CreateCollection],
10515
+ * }
10516
+ * ```
10517
+ */
10518
+ CreateCollection = "createCollection",
10519
+ /**
10520
+ * Controls the visibility and disabled state of the "Move" menu item in a
10521
+ * Collection.
10522
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10523
+ * @example
10524
+ * ```js
10525
+ * {
10526
+ * hiddenActions: [Action.MoveToCollection],
10527
+ * disabledActions: [Action.MoveToCollection],
10528
+ * }
10529
+ * ```
10530
+ */
10531
+ MoveToCollection = "moveToCollection",
10532
+ /**
10533
+ * Controls the visibility and disabled state of the "Remove" menu item in a
10534
+ * Collection.
10535
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10536
+ * @example
10537
+ * ```js
10538
+ * {
10539
+ * hiddenActions: [Action.RemoveFromCollection],
10540
+ * disabledActions: [Action.RemoveFromCollection],
10541
+ * }
10542
+ * ```
10543
+ */
10544
+ RemoveFromCollection = "removeFromCollection",
10545
+ /**
10546
+ * Controls the visibility and disabled state of the "Delete" menu item for a
10547
+ * Collection.
10548
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10549
+ * @example
10550
+ * ```js
10551
+ * {
10552
+ * hiddenActions: [Action.DeleteCollection],
10553
+ * disabledActions: [Action.DeleteCollection],
10554
+ * }
10555
+ * ```
10556
+ */
10557
+ DeleteCollection = "deleteCollection"
10558
+ }
10559
+ export enum PrefetchFeatures {
10560
+ FullApp = "FullApp",
10561
+ SearchEmbed = "SearchEmbed",
10562
+ LiveboardEmbed = "LiveboardEmbed",
10563
+ VizEmbed = "VizEmbed"
10564
+ }
10565
+ /**
10566
+ * Enum for options to change context trigger.
10567
+ * The `BOTH_CLICKS` option is available from 10.8.0.cl.
10568
+ */
10569
+ export enum ContextMenuTriggerOptions {
10570
+ LEFT_CLICK = "left-click",
10571
+ RIGHT_CLICK = "right-click",
10572
+ BOTH_CLICKS = "both-clicks"
10573
+ }
10574
+ export interface ColumnValue {
10575
+ column: {
10576
+ id: string;
10577
+ name: string;
10578
+ dataType: string;
10579
+ [key: string]: any;
10580
+ };
10581
+ value: string | number | boolean | {
10582
+ v: {
10583
+ s: number;
10584
+ e: number;
10585
+ };
10586
+ };
10587
+ }
10588
+ export interface VizPoint {
10589
+ selectedAttributes: ColumnValue[];
10590
+ selectedMeasures: ColumnValue[];
10591
+ }
10592
+ /**
10593
+ * @group Events
10594
+ */
10595
+ export interface CustomActionPayload {
10596
+ /**
10597
+ * Id of the custom action that was triggered. Matches the `id` you set on
10598
+ * the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
10599
+ */
10600
+ id?: string;
10601
+ contextMenuPoints?: {
10602
+ clickedPoint: VizPoint;
10603
+ selectedPoints: VizPoint[];
10604
+ };
10605
+ embedAnswerData: {
10606
+ name: string;
10607
+ id: string;
10608
+ sources: {
10609
+ header: {
10610
+ guid: string;
10611
+ };
10612
+ };
10613
+ columns: any[];
10614
+ data: any[];
10615
+ [key: string]: any;
10616
+ };
10617
+ session: SessionInterface;
10618
+ vizId?: string;
10619
+ }
10620
+ /**
10621
+ * A code-based custom action to inject into the embedded ThoughtSpot UI.
10622
+ * Pass an array of these as `customActions` in the embed view config. When a
10623
+ * user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
10624
+ * a {@link CustomActionPayload} carrying the same `id`.
10625
+ */
10626
+ export interface CustomAction {
10627
+ /**
10628
+ * Display label shown on the action's button or menu item.
10629
+ */
10630
+ name: string;
10631
+ /**
10632
+ * Unique identifier for the action. Echoed back as `id` on the
10633
+ * {@link CustomActionPayload} when the action is invoked.
10634
+ */
10635
+ id: string;
10636
+ /**
10637
+ * Where the action appears: a primary button, the "More" menu, or the
10638
+ * right-click context menu. See {@link CustomActionsPosition}.
10639
+ */
10640
+ position: CustomActionsPosition;
10641
+ /**
10642
+ * The surface the action applies to (Liveboard, visualization, Answer, or
10643
+ * Spotter). See {@link CustomActionTarget}. The allowed `position` values
10644
+ * and scoping keys depend on the target.
10645
+ */
10646
+ target: CustomActionTarget;
10647
+ /**
10648
+ * Scope the action to specific objects by GUID. Which keys are allowed
10649
+ * depends on `target` (for example, a `VIZ` action may use `answerIds`,
10650
+ * `liveboardIds`, and `vizIds`).
10651
+ */
10652
+ metadataIds?: {
10653
+ answerIds?: string[];
10654
+ liveboardIds?: string[];
10655
+ vizIds?: string[];
10656
+ };
10657
+ /**
10658
+ * Scope the action by data model, using model GUIDs or column names.
10659
+ * Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
10660
+ */
10661
+ dataModelIds?: {
10662
+ modelIds?: string[];
10663
+ modelColumnNames?: string[];
10664
+ };
10665
+ /**
10666
+ * Restrict the action to specific organizations by ID.
10667
+ */
10668
+ orgIds?: string[];
10669
+ /**
10670
+ * Restrict the action to specific user groups by ID.
10671
+ */
10672
+ groupIds?: string[];
10673
+ }
10674
+ /**
10675
+ * Enum options to show custom actions at different
10676
+ * positions in the application.
10677
+ */
10678
+ export enum CustomActionsPosition {
10679
+ /**
10680
+ * Shows the action as a primary button
10681
+ * in the toolbar area of the embed.
10033
10682
  */
10034
10683
  PRIMARY = "PRIMARY",
10035
10684
  /**
@@ -10956,259 +11605,556 @@ export interface TableOverrides {
10956
11605
  updateMaskPaths?: string[];
10957
11606
  }
10958
11607
  /**
10959
- * Visualization overrides to customize chart and table rendering
10960
- * within embedded ThoughtSpot components.
10961
- *
10962
- * @group Visual Overrides
10963
- * @example
10964
- * ```js
10965
- * const embed = new AppEmbed('#tsEmbed', {
10966
- * visualOverrides: {
10967
- * chart: {
10968
- * legend: { show: true, position: 'bottom' },
10969
- * columns: [{ name: 'Revenue', color: '#1f77b4' }],
10970
- * },
10971
- * table: {
10972
- * display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' },
10973
- * },
10974
- * },
10975
- * });
10976
- * ```
11608
+ * Visualization overrides to customize chart and table rendering
11609
+ * within embedded ThoughtSpot components.
11610
+ *
11611
+ * @group Visual Overrides
11612
+ * @example
11613
+ * ```js
11614
+ * const embed = new AppEmbed('#tsEmbed', {
11615
+ * visualOverrides: {
11616
+ * chart: {
11617
+ * legend: { show: true, position: 'bottom' },
11618
+ * columns: [{ name: 'Revenue', color: '#1f77b4' }],
11619
+ * },
11620
+ * table: {
11621
+ * display: { tableTheme: 'ZEBRA', tableContentDensity: 'COMPACT' },
11622
+ * },
11623
+ * },
11624
+ * });
11625
+ * ```
11626
+ */
11627
+ export interface VisualizationOverrides {
11628
+ /** Chart visualization overrides */
11629
+ chart?: ChartOverrides;
11630
+ /** Table visualization overrides */
11631
+ table?: TableOverrides;
11632
+ }
11633
+ /**
11634
+ * The configuration object for the full-height behavior shared by the
11635
+ * Liveboard and app embeds.
11636
+ *
11637
+ * When `fullHeight` is enabled the SDK resizes the embed container to match the
11638
+ * height reported by the ThoughtSpot app, and — when lazy loading is also
11639
+ * enabled — keeps the app informed of the portion of the embed that is
11640
+ * currently visible so that visualizations load on demand.
11641
+ */
11642
+ export interface FullHeightViewConfig {
11643
+ /**
11644
+ * If set to true, the embedded object container dynamically resizes
11645
+ * according to the height of the Liveboard.
11646
+ *
11647
+ * **Note**: Using fullHeight loads all visualizations on the
11648
+ * Liveboard simultaneously, which results in multiple warehouse
11649
+ * queries and potentially a longer wait for the topmost
11650
+ * visualizations to display on the screen.
11651
+ * Setting `fullHeight` to `false` fetches visualizations
11652
+ * incrementally as users scroll the page to view the charts and tables.
11653
+ *
11654
+ * From SDK 1.52.0, enabling `fullHeight` also turns on
11655
+ * {@link lazyLoadingForFullHeight} and
11656
+ * {@link enableScrollableContainerLazyLoading}, so visualizations load as
11657
+ * they scroll into view. Set either flag to `false` to opt out.
11658
+ *
11659
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11660
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
11661
+ * @example
11662
+ * ```js
11663
+ * // Replace <EmbedComponent> with the embed component name.
11664
+ * // For example, AppEmbed or LiveboardEmbed
11665
+ * const embed = new <EmbedComponent>('#embed', {
11666
+ * ... // other view config
11667
+ * fullHeight: true,
11668
+ * });
11669
+ * ```
11670
+ */
11671
+ fullHeight?: boolean;
11672
+ /**
11673
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11674
+ * Setting this height helps resolve issues with empty Liveboards and
11675
+ * other screens navigable from a Liveboard.
11676
+ *
11677
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11678
+ * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
11679
+ * @default 500
11680
+ * @example
11681
+ * ```js
11682
+ * // Replace <EmbedComponent> with the embed component name.
11683
+ * // For example, AppEmbed or LiveboardEmbed
11684
+ * const embed = new <EmbedComponent>('#embed', {
11685
+ * ... // other view config
11686
+ * fullHeight: true,
11687
+ * minimumHeight: 600,
11688
+ * });
11689
+ * ```
11690
+ */
11691
+ minimumHeight?: number;
11692
+ /**
11693
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11694
+ * Setting this height helps resolve issues with empty Liveboards and
11695
+ * other screens navigable from a Liveboard.
11696
+ *
11697
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11698
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
11699
+ * @deprecated Use `minimumHeight` instead.
11700
+ * @default 500
11701
+ * @example
11702
+ * ```js
11703
+ * // Replace <EmbedComponent> with the embed component name.
11704
+ * // For example, AppEmbed or LiveboardEmbed
11705
+ * const embed = new <EmbedComponent>('#embed', {
11706
+ * ... // other view config
11707
+ * fullHeight: true,
11708
+ * defaultHeight: 600,
11709
+ * });
11710
+ * ```
11711
+ */
11712
+ defaultHeight?: number;
11713
+ /**
11714
+ * Loads visualizations only as they scroll into the viewport, instead of
11715
+ * loading the whole full-height Liveboard at once.
11716
+ *
11717
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11718
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11719
+ * set explicitly. Set it to `false` to load every visualization upfront.
11720
+ * The flag has no effect unless `fullHeight` is enabled.
11721
+ *
11722
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11723
+ * @type {boolean}
11724
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11725
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11726
+ * @example
11727
+ * ```js
11728
+ * // Replace <EmbedComponent> with the embed component name.
11729
+ * // For example, AppEmbed or LiveboardEmbed
11730
+ * const embed = new <EmbedComponent>('#embed-container', {
11731
+ * // ...other options
11732
+ * fullHeight: true,
11733
+ * lazyLoadingForFullHeight: true,
11734
+ * })
11735
+ * ```
11736
+ */
11737
+ lazyLoadingForFullHeight?: boolean;
11738
+ /**
11739
+ * How far outside the viewport a visualization starts loading, when
11740
+ * {@link lazyLoadingForFullHeight} is enabled.
11741
+ *
11742
+ * For example, if the margin is set to '10px',
11743
+ * the visualization will be loaded 10px before its top edge is visible in the
11744
+ * viewport.
11745
+ *
11746
+ * The format is similar to CSS margin, so `'500px 0px'` extends the
11747
+ * prefetch 500px above and below the viewport and not sideways. Accepted
11748
+ * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
11749
+ * `auto`; an invalid value is logged and ignored.
11750
+ *
11751
+ * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
11752
+ * visualization ahead of the scroll position, so a chart has usually
11753
+ * finished loading by the time it scrolls into view. Use a smaller margin
11754
+ * to cut warehouse queries further, or `'0px'` to load a visualization
11755
+ * only once it is actually visible.
11756
+ *
11757
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11758
+ * @type {string}
11759
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11760
+ * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
11761
+ * @example
11762
+ * ```js
11763
+ * // Replace <EmbedComponent> with the embed component name.
11764
+ * // For example, AppEmbed or LiveboardEmbed
11765
+ * const embed = new <EmbedComponent>('#embed-container', {
11766
+ * // ...other options
11767
+ * fullHeight: true,
11768
+ * lazyLoadingForFullHeight: true,
11769
+ * // With 0px, the visualization only starts loading once it is
11770
+ * // visible in the viewport.
11771
+ * lazyLoadingMargin: '0px',
11772
+ * })
11773
+ * ```
11774
+ */
11775
+ lazyLoadingMargin?: string;
11776
+ /**
11777
+ * Computes the visible region of the embed against its scrollable and
11778
+ * clipping ancestors, instead of treating the browser window as the only
11779
+ * viewport, and tracks scroll and resize on those ancestors.
11780
+ *
11781
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11782
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11783
+ * set explicitly. Set it to `false` when the page scrolls with the window
11784
+ * and the embed has no clipping ancestor, to skip the extra ancestor
11785
+ * tracking.
11786
+ *
11787
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11788
+ * @type {boolean}
11789
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11790
+ */
11791
+ enableScrollableContainerLazyLoading?: boolean;
11792
+ }
11793
+ /**
11794
+ * Request for host events that MAY target a specific visualization.
11795
+ * Omitting vizId targets the current answer/liveboard as a whole.
11796
+ * (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
11797
+ */
11798
+ export interface VizScopedRequest {
11799
+ vizId?: string;
11800
+ }
11801
+ /**
11802
+ * Request for host events that MUST target a specific visualization.
11803
+ */
11804
+ export interface RequiredVizRequest {
11805
+ vizId: string;
11806
+ }
11807
+ /**
11808
+ * Request for Spotter conversation-scoped host events.
11809
+ */
11810
+ export interface ConversationScopedRequest {
11811
+ conversationId: string;
11812
+ }
11813
+ /**
11814
+ * Request payload for {@link HostEvent.OpenFilter}. Field requirements
11815
+ * vary by context (Search requires columnId/type/dataType/name); the
11816
+ * contract is the cross-context superset — the app validates per context
11817
+ * at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
11818
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
11819
+ */
11820
+ export interface OpenFilterRequest {
11821
+ column: {
11822
+ columnId?: string;
11823
+ columnName?: string;
11824
+ type?: string;
11825
+ dataType?: string;
11826
+ name?: string;
11827
+ isStrictDateColumn?: boolean;
11828
+ };
11829
+ applicability?: Applicability;
11830
+ visualizationId?: string;
11831
+ liveboardId?: string;
11832
+ }
11833
+ /**
11834
+ * `OpenFilter` in Liveboard context: full column plus scoping fields.
11835
+ * A per-context view of {@link OpenFilterRequest} (documentation only today;
11836
+ * `trigger()` accepts the superset).
11837
+ */
11838
+ export interface OpenFilterLiveboardRequest {
11839
+ column: {
11840
+ columnId?: string;
11841
+ columnName?: string;
11842
+ };
11843
+ applicability?: Applicability;
11844
+ visualizationId?: string;
11845
+ liveboardId?: string;
11846
+ }
11847
+ /**
11848
+ * `OpenFilter` in Spotter context: only the column identity is accepted.
11849
+ */
11850
+ export interface OpenFilterSpotterRequest {
11851
+ column: {
11852
+ columnId?: string;
11853
+ columnName?: string;
11854
+ };
11855
+ }
11856
+ /**
11857
+ * `OpenFilter` in Search/Answer context: column identity plus column metadata.
11858
+ */
11859
+ export interface OpenFilterSearchRequest {
11860
+ column: {
11861
+ columnId?: string;
11862
+ columnName?: string;
11863
+ type?: string;
11864
+ dataType?: string;
11865
+ name?: string;
11866
+ isStrictDateColumn?: boolean;
11867
+ };
11868
+ }
11869
+ /**
11870
+ * Request payload for {@link HostEvent.DrillDown}. Drills on selected or
11871
+ * clicked points of a visualization. In Liveboard context `vizId` is required
11872
+ * at runtime (documentation only today; `trigger()` is not yet type-enforced).
11873
+ */
11874
+ export interface DrillDownRequest {
11875
+ points: {
11876
+ clickedPoint?: object;
11877
+ selectedPoints?: object[];
11878
+ };
11879
+ columnGuid?: string;
11880
+ autoDrillDown?: boolean;
11881
+ vizId?: string;
11882
+ }
11883
+ /**
11884
+ * Request payload for {@link HostEvent.OpenParameter}. One of parameterId
11885
+ * or parameterName must be provided (validated at runtime).
10977
11886
  */
10978
- export interface VisualizationOverrides {
10979
- /** Chart visualization overrides */
10980
- chart?: ChartOverrides;
10981
- /** Table visualization overrides */
10982
- table?: TableOverrides;
11887
+ export interface OpenParameterRequest {
11888
+ parameter: {
11889
+ parameterId?: string;
11890
+ parameterName?: string;
11891
+ };
11892
+ applicability?: Applicability;
10983
11893
  }
10984
- export interface LiveboardTab {
10985
- id: string;
10986
- name: string;
10987
- [key: string]: any;
11894
+ /**
11895
+ * Request payload for {@link HostEvent.Search}.
11896
+ */
11897
+ export interface SearchRequest {
11898
+ searchQuery: string;
11899
+ dataSources: string[];
11900
+ execute?: boolean;
10988
11901
  }
10989
- export interface LiveboardGroup {
10990
- id: string;
10991
- name: string;
10992
- [key: string]: any;
11902
+ /**
11903
+ * Request payload for {@link HostEvent.SpotterSearch}.
11904
+ */
11905
+ export interface SpotterSearchRequest {
11906
+ query: string;
11907
+ executeSearch: boolean;
10993
11908
  }
10994
11909
  /**
10995
- * Levels at which a filter or parameter can be applied.
11910
+ * A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
10996
11911
  */
10997
- export enum ApplicabilityLevel {
10998
- Liveboard = "LIVEBOARD",
10999
- Tab = "TAB",
11000
- Group = "GROUP"
11912
+ export interface CrossFilterCondition {
11913
+ columnName?: string;
11914
+ operator?: string;
11915
+ values: Array<string | number | boolean>;
11001
11916
  }
11002
11917
  /**
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.
11918
+ * Request payload for {@link HostEvent.UpdateCrossFilter}.
11006
11919
  */
11007
- export interface Applicability {
11008
- level: ApplicabilityLevel;
11009
- targetId?: string;
11920
+ export interface UpdateCrossFilterRequest {
11921
+ vizId: string;
11922
+ conditions: CrossFilterCondition[];
11010
11923
  }
11011
- export interface FilterUpdate {
11012
- column: string;
11013
- oper: string;
11014
- values: string[];
11924
+ /**
11925
+ * A single filter entry for {@link HostEvent.UpdateFilters}. Supports both
11926
+ * the current (columnName/operator) and legacy (column/oper) field names.
11927
+ */
11928
+ export interface HostFilterUpdate {
11929
+ columnName?: string;
11930
+ columnId?: string;
11931
+ operator?: string;
11932
+ values: Array<string | number | boolean>;
11015
11933
  type?: string;
11934
+ datePeriod?: string;
11935
+ negate?: boolean;
11936
+ /** Legacy field name for columnName. */
11937
+ column?: string;
11938
+ /** Legacy field name for operator. */
11939
+ oper?: string;
11016
11940
  applicability?: Applicability;
11017
11941
  }
11018
- export interface LiveboardFilter {
11019
- applicability?: Applicability;
11020
- [key: string]: any;
11942
+ /**
11943
+ * Request payload for {@link HostEvent.UpdateFilters} (singular or plural
11944
+ * form).
11945
+ */
11946
+ export interface UpdateFiltersRequest {
11947
+ filter?: HostFilterUpdate;
11948
+ filters?: HostFilterUpdate[];
11949
+ /**
11950
+ * Scope the update to a specific visualization on a Liveboard.
11951
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
11952
+ */
11953
+ visualizationId?: string;
11954
+ /**
11955
+ * Scope the update to a specific Liveboard.
11956
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
11957
+ */
11958
+ liveboardId?: string;
11021
11959
  }
11022
- export interface LiveboardParameter {
11023
- applicability?: Applicability;
11024
- [key: string]: any;
11960
+ /**
11961
+ * Request payload for personalised-view host events.
11962
+ */
11963
+ export interface PersonalisedViewRequest {
11964
+ viewId?: string;
11965
+ viewName?: string;
11025
11966
  }
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"
11967
+ /**
11968
+ * Request payload for schedule-email related host events.
11969
+ */
11970
+ export interface ScheduleEmailRequest {
11971
+ sendToSelf?: boolean;
11044
11972
  }
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
- };
11973
+ /**
11974
+ * Object form of the {@link HostEvent.Navigate} payload.
11975
+ */
11976
+ export interface NavigateRequest {
11977
+ /**
11978
+ * Route to navigate to, or a history delta such as `1` or `-1`.
11979
+ */
11980
+ path: string | number;
11981
+ /**
11982
+ * When `true`, replaces the current history entry instead of pushing.
11983
+ */
11984
+ replace?: boolean;
11985
+ }
11986
+ /**
11987
+ * Request payload for {@link HostEvent.SetActiveTab}.
11988
+ */
11989
+ export interface SetActiveTabRequest {
11990
+ /**
11991
+ * Id of the liveboard tab to make active.
11992
+ */
11993
+ tabId: string;
11994
+ }
11995
+ /**
11996
+ * Typed request payloads for host events that do not go through the UI
11997
+ * passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
11998
+ *
11999
+ * Shapes are transcribed from the host's runtime validation schemas
12000
+ * (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
12001
+ * flattened across contexts to the permissive superset (context-specific
12002
+ * requirements are validated at runtime).
12003
+ *
12004
+ * Responses are typed only for UI-passthrough-backed events today (see
12005
+ * {@link HostEventResponse}). Add a response map alongside this one when the
12006
+ * first explicit response shape is specified; tightening later is additive.
12007
+ *
12008
+ * Deliberately absent (do not add without an audit):
12009
+ * - DrillDown: the runtime schema (object-shaped points) and the UI
12010
+ * passthrough contract (string-shaped points) disagree — resolve the
12011
+ * drift first.
12012
+ * - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
12013
+ * mapping; their Spotter-context vizId requirement is runtime-only.
12014
+ */
12015
+ export interface HostEventRequestMap {
12016
+ [HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
12017
+ [HostEvent.UpdateParameters]: RuntimeParameter[];
12018
+ [HostEvent.UpdateFilters]: UpdateFiltersRequest;
12019
+ [HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
12020
+ [HostEvent.OpenFilter]: OpenFilterRequest;
12021
+ [HostEvent.OpenParameter]: OpenParameterRequest;
12022
+ [HostEvent.SetVisibleVizs]: string[];
12023
+ [HostEvent.SetVisibleTabs]: string[];
12024
+ [HostEvent.SetHiddenTabs]: string[];
12025
+ [HostEvent.SetActiveTab]: SetActiveTabRequest;
12026
+ [HostEvent.Navigate]: string | number | NavigateRequest;
12027
+ [HostEvent.Search]: SearchRequest;
12028
+ [HostEvent.ResetSearch]: void;
12029
+ [HostEvent.AddColumns]: {
12030
+ columnIds: string[];
11151
12031
  };
11152
- [UIPassthroughEvent.GetGroups]: {
11153
- request: Record<string, never>;
11154
- response: {
11155
- orderedGroupIds: string[];
11156
- numberOfGroups: number;
11157
- Groups: LiveboardGroup[];
11158
- };
12032
+ [HostEvent.RemoveColumn]: {
12033
+ columnId: string;
11159
12034
  };
11160
- [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
11161
- request: Record<string, never>;
11162
- response: {
11163
- data: {
11164
- v2Content: string;
11165
- };
11166
- type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11167
- };
12035
+ [HostEvent.Edit]: VizScopedRequest;
12036
+ [HostEvent.Save]: VizScopedRequest;
12037
+ [HostEvent.Delete]: VizScopedRequest;
12038
+ [HostEvent.Share]: VizScopedRequest;
12039
+ [HostEvent.Present]: VizScopedRequest;
12040
+ [HostEvent.CopyLink]: VizScopedRequest;
12041
+ [HostEvent.ExportTML]: VizScopedRequest;
12042
+ [HostEvent.EditTML]: VizScopedRequest;
12043
+ [HostEvent.UpdateTML]: VizScopedRequest;
12044
+ [HostEvent.SchedulesList]: VizScopedRequest;
12045
+ [HostEvent.Schedule]: VizScopedRequest;
12046
+ [HostEvent.SpotIQAnalyze]: VizScopedRequest;
12047
+ [HostEvent.ShowUnderlyingData]: VizScopedRequest;
12048
+ [HostEvent.CreateMonitor]: VizScopedRequest;
12049
+ [HostEvent.ManageMonitor]: VizScopedRequest;
12050
+ [HostEvent.SyncToSheets]: VizScopedRequest;
12051
+ [HostEvent.SyncToOtherApps]: VizScopedRequest;
12052
+ [HostEvent.ManagePipelines]: VizScopedRequest;
12053
+ [HostEvent.DownloadAsPng]: VizScopedRequest;
12054
+ [HostEvent.DownloadAsCsv]: VizScopedRequest;
12055
+ [HostEvent.DownloadAsXlsx]: VizScopedRequest;
12056
+ [HostEvent.DownloadAsPdf]: VizScopedRequest & {
12057
+ liveboardId?: string;
11168
12058
  };
11169
- [UIPassthroughEvent.UpdateFilters]: {
11170
- request: {
11171
- filter?: FilterUpdate;
11172
- filters?: FilterUpdate[];
11173
- };
11174
- response: unknown;
12059
+ [HostEvent.Explore]: RequiredVizRequest;
12060
+ [HostEvent.AskSage]: RequiredVizRequest;
12061
+ [HostEvent.AskSpotter]: RequiredVizRequest;
12062
+ [HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
12063
+ [HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
12064
+ [HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
12065
+ [HostEvent.ResetLiveboardPersonalisedView]: void;
12066
+ [HostEvent.AIHighlights]: void;
12067
+ [HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
12068
+ [HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
12069
+ [HostEvent.SpotterSearch]: SpotterSearchRequest;
12070
+ [HostEvent.ResetSpotterConversation]: void;
12071
+ [HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
12072
+ [HostEvent.CloseSpotterShareConversation]: void;
12073
+ [HostEvent.ExitSpotterSharedConversation]: void;
12074
+ [HostEvent.PinSpotterConversation]: ConversationScopedRequest;
12075
+ [HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
12076
+ [HostEvent.EditLastPrompt]: string;
12077
+ [HostEvent.DeleteLastPrompt]: void;
12078
+ [HostEvent.PreviewSpotterData]: void;
12079
+ [HostEvent.SpotterVizSendUserMessage]: {
12080
+ query: string;
11175
12081
  };
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;
12082
+ [HostEvent.InitSpotterVizConversation]: void;
12083
+ [HostEvent.OpenSpotterVizPanel]: void;
12084
+ [HostEvent.CloseSpotterVizPanel]: void;
12085
+ }
12086
+ /**
12087
+ * Per-context request shapes for events whose payload varies by
12088
+ /**
12089
+ * Resolves the typed request payload for a host event.
12090
+ * Resolution order:
12091
+ * 1. Explicitly typed request in {@link HostEventRequestMap}
12092
+ * 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
12093
+ * 3. `any` (event not audited/typed yet — backward compatible)
12094
+ *
12095
+ * Requests are the cross-context superset today. The per-context `*Request`
12096
+ * interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
12097
+ * narrows by context; a later release may thread the caller's context to
12098
+ * enforce it.
12099
+ */
12100
+ export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
12101
+ /**
12102
+ * Resolves the typed response payload for a host event. Only UI passthrough
12103
+ * backed events have typed responses today; everything else resolves to `any`.
12104
+ */
12105
+ export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
12106
+ /**
12107
+ * Payload type accepted by `embed.trigger()`. Keeps the historical
12108
+ * `PayloadT` escape hatch so untyped existing call sites keep compiling.
12109
+ */
12110
+ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
12111
+ /**
12112
+ * Deep `Partial` of a request type: every field optional at every depth, with no
12113
+ * index signature — so object literals carrying unknown fields are flagged.
12114
+ */
12115
+ export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
12116
+ [K in keyof T]?: DeepPartial<T[K]>;
12117
+ } : T;
12118
+ /**
12119
+ * `trigger()`'s `data` type: an all-optional view of the event's request type.
12120
+ * See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
12121
+ * No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
12122
+ */
12123
+ export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
12124
+ /**
12125
+ * Response type returned by `embed.trigger()`.
12126
+ */
12127
+ export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
12128
+ /**
12129
+ * Typed `data` field per embed event. Seed with audited events only.
12130
+ */
12131
+ export interface EmbedEventDataExtension {
12132
+ [EmbedEvent.AuthInit]: {
12133
+ /**
12134
+ * Whether authentication was successful.
12135
+ */
12136
+ isLoggedIn?: boolean;
12137
+ [key: string]: any;
11187
12138
  };
12139
+ [EmbedEvent.EmbedListenerReady]: Record<string, any>;
12140
+ /**
12141
+ * Fired when a callback-type custom action is triggered. Use
12142
+ * `payload.data.id` to identify which action fired.
12143
+ */
12144
+ [EmbedEvent.CustomAction]: CustomActionPayload;
12145
+ }
12146
+ /**
12147
+ * Resolves the typed `data` payload for an embed event; `any` when the
12148
+ * event has not been audited/typed yet.
12149
+ */
12150
+ export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
12151
+ /**
12152
+ * Full envelope delivered to `embed.on()` callbacks for a given event:
12153
+ * the wire fields (`type`, `status`) plus the typed `data`.
12154
+ */
12155
+ export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
12156
+ data: EmbedEventData<EmbedEventT>;
11188
12157
  };
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
12158
  class HostEventClient {
11213
12159
  iFrame: HTMLIFrameElement;
11214
12160
  /** Cached list of available UI passthrough keys from the embedded app */
@@ -11258,7 +12204,7 @@ class HostEventClient {
11258
12204
  * @param payload - Optional payload for the event
11259
12205
  * @param context - Optional context (e.g. vizId) for scoped operations
11260
12206
  */
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>>;
12207
+ 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
12208
  }
11263
12209
  class TsEmbed {
11264
12210
  /**
@@ -11276,6 +12222,7 @@ class TsEmbed {
11276
12222
  * The key to store the embed instance in the DOM node
11277
12223
  */
11278
12224
  protected embedNodeKey: string;
12225
+ protected embedContainerLoadedKey: string;
11279
12226
  protected isAppInitialized: boolean;
11280
12227
  /**
11281
12228
  * A reference to the iframe within which the ThoughtSpot app
@@ -11445,10 +12392,10 @@ class TsEmbed {
11445
12392
  */
11446
12393
  protected getEmbedBasePath(query: string): string;
11447
12394
  protected getUpdateEmbedParamsObject(): Promise<{
11448
- customisations: CustomisationsInterface;
11449
- authToken: string;
11450
12395
  runtimeFilterParams: string;
11451
12396
  runtimeParameterParams: string;
12397
+ customisations: CustomisationsInterface;
12398
+ authToken: string;
11452
12399
  hiddenHomepageModules: HomepageModule[];
11453
12400
  reorderedHomepageModules: string[];
11454
12401
  hostConfig: Record<string, any>;
@@ -11641,21 +12588,6 @@ class TsEmbed {
11641
12588
  * or else the v2 event type itself
11642
12589
  */
11643
12590
  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
12591
  /**
11660
12592
  * Registers an event listener to trigger an alert when the ThoughtSpot app
11661
12593
  * sends an event of a particular message type to the host application.
@@ -11679,7 +12611,7 @@ class TsEmbed {
11679
12611
  * });
11680
12612
  * ```
11681
12613
  */
11682
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
12614
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
11683
12615
  /**
11684
12616
  * Removes an event listener for a particular event type.
11685
12617
  * @param messageType The message type
@@ -11715,6 +12647,8 @@ class TsEmbed {
11715
12647
  */
11716
12648
  private embedContainerReadyCallbacks;
11717
12649
  protected getPreRenderObj<T extends TsEmbed>(): T;
12650
+ protected takeOverPreRender(): void;
12651
+ private markEmbedContainerLoaded;
11718
12652
  private checkEmbedContainerLoaded;
11719
12653
  private executeEmbedContainerReadyCallbacks;
11720
12654
  /**
@@ -11725,8 +12659,12 @@ class TsEmbed {
11725
12659
  protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
11726
12660
  /**
11727
12661
  * Triggers an event to the embedded app
12662
+ *
12663
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
12664
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
12665
+ * payload is checked strictly against the event contract — update call sites now.
11728
12666
  * @param {HostEvent} messageType The event type
11729
- * @param {any} data The payload to send with the message
12667
+ * @param {TriggerData} data The payload, typed against the event's contract
11730
12668
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
11731
12669
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
11732
12670
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -11743,7 +12681,7 @@ class TsEmbed {
11743
12681
  * ```
11744
12682
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
11745
12683
  */
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>>;
12684
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11747
12685
  /**
11748
12686
  * Triggers an event to the embedded app, skipping the UI flow.
11749
12687
  * @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
@@ -11845,6 +12783,7 @@ class TsEmbed {
11845
12783
  * @returns
11846
12784
  */
11847
12785
  prerenderGeneric(): Promise<any>;
12786
+ protected preRenderParamsApplied: Promise<void>;
11848
12787
  protected beforePrerenderVisible(): void;
11849
12788
  /**
11850
12789
  * Displays the pre-rendered component inside the host element.
@@ -11923,7 +12862,7 @@ class V1Embed extends TsEmbed {
11923
12862
  * });
11924
12863
  * ```
11925
12864
  */
11926
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
12865
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
11927
12866
  /**
11928
12867
  * Only for testing purposes.
11929
12868
  * @hidden
@@ -13055,7 +13994,7 @@ export interface DiscoveryExperience {
13055
13994
  * The view configuration for full app embedding.
13056
13995
  * @group Embed components
13057
13996
  */
13058
- export interface AppViewConfig extends AllEmbedViewConfig {
13997
+ export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
13059
13998
  /**
13060
13999
  * If true, the top navigation bar within the ThoughtSpot app
13061
14000
  * is displayed. By default, the navigation bar is hidden.
@@ -13323,51 +14262,23 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13323
14262
  * Supported embed types: `AppEmbed`
13324
14263
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1-sw
13325
14264
  * @hidden
13326
- */
13327
- liveboardV2?: boolean;
13328
- /**
13329
- * If set to true, the Search Assist feature is enabled.
13330
- *
13331
- * Supported embed types: `AppEmbed`
13332
- * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
13333
- * @default true
13334
- * @example
13335
- * ```js
13336
- * const embed = new AppEmbed('#tsEmbed', {
13337
- * ... // other embed view config
13338
- * enableSearchAssist: true,
13339
- * })
13340
- * ```
13341
- */
13342
- 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.
14265
+ */
14266
+ liveboardV2?: boolean;
14267
+ /**
14268
+ * If set to true, the Search Assist feature is enabled.
13359
14269
  *
13360
14270
  * Supported embed types: `AppEmbed`
13361
- * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
14271
+ * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1-sw
14272
+ * @default true
13362
14273
  * @example
13363
14274
  * ```js
13364
14275
  * const embed = new AppEmbed('#tsEmbed', {
13365
14276
  * ... // other embed view config
13366
- * fullHeight: true,
14277
+ * enableSearchAssist: true,
13367
14278
  * })
13368
14279
  * ```
13369
14280
  */
13370
- fullHeight?: boolean;
14281
+ enableSearchAssist?: boolean;
13371
14282
  /**
13372
14283
  * Enables the V2 navigation and modular home page experience.
13373
14284
  * For more information,
@@ -13562,78 +14473,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13562
14473
  * ```
13563
14474
  */
13564
14475
  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
13601
- */
13602
- enableScrollableContainerLazyLoading?: boolean;
13603
- /**
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.
13621
- *
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
13625
- * @example
13626
- * ```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',
13633
- * })
13634
- * ```
13635
- */
13636
- lazyLoadingMargin?: string;
13637
14476
  /**
13638
14477
  * updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
13639
14478
  *
@@ -13821,23 +14660,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13821
14660
  * @default false
13822
14661
  */
13823
14662
  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
14663
  /**
13842
14664
  * To enable the homepage announcement banner.
13843
14665
  * Controls the visibility of the announcement section
@@ -13887,6 +14709,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13887
14709
  * ```
13888
14710
  */
13889
14711
  updatedSpotterExperience?: boolean;
14712
+ /**
14713
+ * If set to `true`, the answer edit panel is hidden.
14714
+ *
14715
+ * Supported embed types: `AppEmbed`
14716
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
14717
+ * @example
14718
+ * ```js
14719
+ * const embed = new AppEmbed('#tsEmbed', {
14720
+ * ... // other embed view config
14721
+ * hideAnswerEditPanel: true,
14722
+ * })
14723
+ * ```
14724
+ */
14725
+ hideAnswerEditPanel?: boolean;
13890
14726
  }
13891
14727
  /**
13892
14728
  * APP_INIT data shape for AppEmbed.
@@ -13906,9 +14742,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
13906
14742
  */
13907
14743
  export class AppEmbed extends V1Embed {
13908
14744
  protected viewConfig: AppViewConfig;
13909
- private defaultHeight;
13910
- private lazyLoadScrollContainers;
13911
- private lazyLoadResizeObserver;
14745
+ private readonly fullHeightController?;
13912
14746
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
13913
14747
  /**
13914
14748
  * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
@@ -13929,27 +14763,11 @@ export class AppEmbed extends V1Embed {
13929
14763
  */
13930
14764
  protected getEmbedParams(): string;
13931
14765
  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
14766
  /**
13941
14767
  * Constructs the URL of the ThoughtSpot app page to be rendered.
13942
14768
  * @param pageId The ID of the page to be embedded.
13943
14769
  */
13944
14770
  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
14771
  /**
13954
14772
  * Gets the ThoughtSpot route of the page for a particular page ID.
13955
14773
  * @param pageId The identifier for a page in the ThoughtSpot app.
@@ -13980,8 +14798,6 @@ export class AppEmbed extends V1Embed {
13980
14798
  */
13981
14799
  destroy(): void;
13982
14800
  private postRender;
13983
- private registerLazyLoadEvents;
13984
- private unregisterLazyLoadEvents;
13985
14801
  /**
13986
14802
  * Renders the embedded application pages in the ThoughtSpot app.
13987
14803
  * @param renderOptions An object containing the page ID
@@ -14286,71 +15102,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
14286
15102
  * The configuration for the embedded Liveboard or visualization page view.
14287
15103
  * @group Embed components
14288
15104
  */
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;
15105
+ export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14354
15106
  /**
14355
15107
  * If set to true, the context menu in visualizations will be enabled.
14356
15108
  * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
@@ -14694,77 +15446,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14694
15446
  * ```
14695
15447
  */
14696
15448
  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
15449
  /**
14769
15450
  * showSpotterLimitations : show limitation text
14770
15451
  * of the spotter underneath the chat input.
@@ -14918,9 +15599,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14918
15599
  */
14919
15600
  export class LiveboardEmbed extends V1Embed {
14920
15601
  protected viewConfig: LiveboardViewConfig;
14921
- private defaultHeight;
14922
- private lazyLoadScrollContainers;
14923
- private lazyLoadResizeObserver;
15602
+ private readonly fullHeightController?;
14924
15603
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
14925
15604
  protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
14926
15605
  /**
@@ -14930,27 +15609,11 @@ export class LiveboardEmbed extends V1Embed {
14930
15609
  protected getEmbedParams(): string;
14931
15610
  protected getEmbedParamsObject(): any;
14932
15611
  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
15612
  /**
14942
15613
  * Construct the URL of the embedded ThoughtSpot Liveboard or visualization
14943
15614
  * to be loaded within the iFrame.
14944
15615
  */
14945
15616
  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
15617
  private setActiveTab;
14955
15618
  private showPreviewLoader;
14956
15619
  /**
@@ -14965,22 +15628,23 @@ export class LiveboardEmbed extends V1Embed {
14965
15628
  personalizedViewId: string;
14966
15629
  };
14967
15630
  protected beforePrerenderVisible(): void;
15631
+ private isShowingLiveboardRoute;
14968
15632
  protected handleRenderForPrerender(): Promise<TsEmbed>;
14969
15633
  /**
14970
15634
  * Triggers an event to the embedded app
15635
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
15636
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
14971
15637
  * @param {HostEvent} messageType The event type
14972
- * @param {any} data The payload to send with the message
15638
+ * @param {TriggerData} data The payload, typed against the event's contract
14973
15639
  * @returns A promise that resolves with the response from the embedded app
14974
15640
  */
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>>;
15641
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
14976
15642
  /**
14977
15643
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
14978
15644
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
14979
15645
  */
14980
15646
  destroy(): void;
14981
15647
  private postRender;
14982
- private registerLazyLoadEvents;
14983
- private unregisterLazyLoadEvents;
14984
15648
  /**
14985
15649
  * Render an embedded ThoughtSpot Liveboard or visualization
14986
15650
  * @param renderOptions An object specifying the Liveboard ID,
@@ -15151,6 +15815,20 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
15151
15815
  * ```
15152
15816
  */
15153
15817
  dataSource?: string;
15818
+ /**
15819
+ * If set to `true`, the answer edit panel is hidden.
15820
+ *
15821
+ * Supported embed types: `SearchEmbed`
15822
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
15823
+ * @example
15824
+ * ```js
15825
+ * const embed = new SearchEmbed('#tsEmbed', {
15826
+ * ... // other embed view config
15827
+ * hideAnswerEditPanel: true,
15828
+ * })
15829
+ * ```
15830
+ */
15831
+ hideAnswerEditPanel?: boolean;
15154
15832
  /**
15155
15833
  * The initial search query to load the answer with.
15156
15834
  * Use {@link searchOptions} instead.