@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
@@ -1250,6 +1250,280 @@ declare class AnswerService {
1250
1250
  addDisplayedVizToLiveboard(liveboardId: string): Promise<any>;
1251
1251
  setTMLOverride(override: any): void;
1252
1252
  }
1253
+ export interface LiveboardTab {
1254
+ id: string;
1255
+ name: string;
1256
+ [key: string]: any;
1257
+ }
1258
+ export interface LiveboardGroup {
1259
+ id: string;
1260
+ name: string;
1261
+ [key: string]: any;
1262
+ }
1263
+ /**
1264
+ * Levels at which a filter or parameter can be applied.
1265
+ */
1266
+ export declare enum ApplicabilityLevel {
1267
+ Liveboard = "LIVEBOARD",
1268
+ Tab = "TAB",
1269
+ Group = "GROUP"
1270
+ }
1271
+ /**
1272
+ * Scopes a filter or parameter to a specific target.
1273
+ * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
1274
+ * is not required. `level` accepts the enum or its string value, e.g. `'TAB'`.
1275
+ */
1276
+ export interface Applicability {
1277
+ level: ApplicabilityLevel | `${ApplicabilityLevel}`;
1278
+ targetId?: string;
1279
+ }
1280
+ export interface FilterUpdate {
1281
+ column: string;
1282
+ oper: string;
1283
+ values: string[];
1284
+ type?: string;
1285
+ applicability?: Applicability;
1286
+ }
1287
+ export interface LiveboardFilter {
1288
+ applicability?: Applicability;
1289
+ [key: string]: any;
1290
+ }
1291
+ export interface LiveboardParameter {
1292
+ applicability?: Applicability;
1293
+ [key: string]: any;
1294
+ }
1295
+ export declare enum UIPassthroughEvent {
1296
+ PinAnswerToLiveboard = "addVizToPinboard",
1297
+ SaveAnswer = "saveAnswer",
1298
+ GetDiscoverabilityStatus = "getDiscoverabilityStatus",
1299
+ GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
1300
+ GetAnswerConfig = "getAnswerPageConfig",
1301
+ GetLiveboardConfig = "getPinboardPageConfig",
1302
+ GetUnsavedAnswerTML = "getUnsavedAnswerTML",
1303
+ UpdateFilters = "updateFilters",
1304
+ Drilldown = "drillDown",
1305
+ GetAnswerSession = "getAnswerSession",
1306
+ GetFilters = "getFilters",
1307
+ GetIframeUrl = "getIframeUrl",
1308
+ GetParameters = "getParameters",
1309
+ GetTML = "getTML",
1310
+ GetTabs = "getTabs",
1311
+ GetGroups = "getGroups",
1312
+ GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
1313
+ }
1314
+ /**
1315
+ * UI passthrough contract. Each event's request/response is a named interface so it
1316
+ * documents and imports cleanly; `UIPassthroughContractBase` maps events to the pairs.
1317
+ */
1318
+ /** Request for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
1319
+ export interface PinAnswerToLiveboardRequest {
1320
+ vizId?: string;
1321
+ newVizName: string;
1322
+ newVizDescription?: string;
1323
+ liveboardId?: string;
1324
+ tabId?: string;
1325
+ newLiveboardName?: string;
1326
+ newTabName?: string;
1327
+ }
1328
+ /** Response for {@link UIPassthroughEvent.PinAnswerToLiveboard}. */
1329
+ export interface PinAnswerToLiveboardResponse {
1330
+ liveboardId: string;
1331
+ tabId: string;
1332
+ vizId: string;
1333
+ }
1334
+ /** Request for {@link UIPassthroughEvent.SaveAnswer}. */
1335
+ export interface SaveAnswerRequest {
1336
+ name: string;
1337
+ description: string;
1338
+ vizId?: string;
1339
+ isDiscoverable?: boolean;
1340
+ }
1341
+ /** Response for {@link UIPassthroughEvent.SaveAnswer}. */
1342
+ export interface SaveAnswerResponse {
1343
+ answerId: string;
1344
+ saveResponse?: any;
1345
+ shareResponse?: any;
1346
+ }
1347
+ /** Response for {@link UIPassthroughEvent.GetDiscoverabilityStatus}. */
1348
+ export interface GetDiscoverabilityStatusResponse {
1349
+ shouldShowDiscoverability: boolean;
1350
+ isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
1351
+ }
1352
+ /** Response for {@link UIPassthroughEvent.GetAvailableUIPassthroughs}. */
1353
+ export interface GetAvailableUIPassthroughsResponse {
1354
+ keys: string[];
1355
+ }
1356
+ /** Request for {@link UIPassthroughEvent.GetAnswerConfig}. */
1357
+ export interface GetAnswerConfigRequest {
1358
+ vizId?: string;
1359
+ }
1360
+ /** Request for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
1361
+ export interface GetUnsavedAnswerTMLRequest {
1362
+ sessionId?: string;
1363
+ vizId?: string;
1364
+ }
1365
+ /** Response for {@link UIPassthroughEvent.GetUnsavedAnswerTML}. */
1366
+ export interface GetUnsavedAnswerTMLResponse {
1367
+ tml: string;
1368
+ }
1369
+ /** Request for {@link UIPassthroughEvent.GetAnswerSession}. */
1370
+ export interface GetAnswerSessionRequest {
1371
+ vizId?: string;
1372
+ }
1373
+ /** Response for {@link UIPassthroughEvent.GetAnswerSession}. */
1374
+ export interface GetAnswerSessionResponse {
1375
+ session: SessionInterface;
1376
+ embedAnswerData?: Record<string, any>;
1377
+ }
1378
+ /** Request for {@link UIPassthroughEvent.GetFilters}. */
1379
+ export interface GetFiltersRequest {
1380
+ vizId?: string;
1381
+ }
1382
+ /** Response for {@link UIPassthroughEvent.GetFilters}. */
1383
+ export interface GetFiltersResponse {
1384
+ liveboardFilters: LiveboardFilter[];
1385
+ runtimeFilters: RuntimeFilter[];
1386
+ }
1387
+ /** Response for {@link UIPassthroughEvent.GetIframeUrl}. */
1388
+ export interface GetIframeUrlResponse {
1389
+ iframeUrl: string;
1390
+ }
1391
+ /** Response for {@link UIPassthroughEvent.GetParameters}. */
1392
+ export interface GetParametersResponse {
1393
+ parameters: LiveboardParameter[];
1394
+ }
1395
+ /** Request for {@link UIPassthroughEvent.GetTML}. */
1396
+ export interface GetTMLRequest {
1397
+ vizId?: string;
1398
+ includeNonExecutedSearchTokens?: boolean;
1399
+ }
1400
+ /** Response for {@link UIPassthroughEvent.GetTabs}. */
1401
+ export interface GetTabsResponse {
1402
+ orderedTabIds: string[];
1403
+ numberOfTabs: number;
1404
+ Tabs: LiveboardTab[];
1405
+ }
1406
+ /** Response for {@link UIPassthroughEvent.GetGroups}. */
1407
+ export interface GetGroupsResponse {
1408
+ orderedGroupIds: string[];
1409
+ numberOfGroups: number;
1410
+ Groups: LiveboardGroup[];
1411
+ }
1412
+ /** Response for {@link UIPassthroughEvent.GetExportRequestForCurrentPinboard}. */
1413
+ export interface GetExportRequestForCurrentPinboardResponse {
1414
+ data: {
1415
+ v2Content: string;
1416
+ };
1417
+ type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
1418
+ }
1419
+ /**
1420
+ * Request for {@link UIPassthroughEvent.UpdateFilters}. Not the host-event
1421
+ * `UpdateFiltersRequest` (host-event-contracts.ts), which has a different shape.
1422
+ */
1423
+ export interface UpdateFiltersPassthroughRequest {
1424
+ filter?: FilterUpdate;
1425
+ filters?: FilterUpdate[];
1426
+ }
1427
+ /** Request for {@link UIPassthroughEvent.Drilldown}. */
1428
+ export interface DrilldownRequest {
1429
+ points: {
1430
+ selectedPoints?: string[];
1431
+ clickedPoint?: string;
1432
+ };
1433
+ columnGuid?: string;
1434
+ autoDrillDown?: boolean;
1435
+ vizId?: string;
1436
+ }
1437
+ /** Maps each UI passthrough event to its request/response pair. */
1438
+ export type UIPassthroughContractBase = {
1439
+ [UIPassthroughEvent.PinAnswerToLiveboard]: {
1440
+ request: PinAnswerToLiveboardRequest;
1441
+ response: PinAnswerToLiveboardResponse;
1442
+ };
1443
+ [UIPassthroughEvent.SaveAnswer]: {
1444
+ request: SaveAnswerRequest;
1445
+ response: SaveAnswerResponse;
1446
+ };
1447
+ [UIPassthroughEvent.GetDiscoverabilityStatus]: {
1448
+ request: any;
1449
+ response: GetDiscoverabilityStatusResponse;
1450
+ };
1451
+ [UIPassthroughEvent.GetAvailableUIPassthroughs]: {
1452
+ request: any;
1453
+ response: GetAvailableUIPassthroughsResponse;
1454
+ };
1455
+ [UIPassthroughEvent.GetAnswerConfig]: {
1456
+ request: GetAnswerConfigRequest;
1457
+ response: any;
1458
+ };
1459
+ [UIPassthroughEvent.GetLiveboardConfig]: {
1460
+ request: any;
1461
+ response: any;
1462
+ };
1463
+ [UIPassthroughEvent.GetUnsavedAnswerTML]: {
1464
+ request: GetUnsavedAnswerTMLRequest;
1465
+ response: GetUnsavedAnswerTMLResponse;
1466
+ };
1467
+ [UIPassthroughEvent.GetAnswerSession]: {
1468
+ request: GetAnswerSessionRequest;
1469
+ response: GetAnswerSessionResponse;
1470
+ };
1471
+ [UIPassthroughEvent.GetFilters]: {
1472
+ request: GetFiltersRequest;
1473
+ response: GetFiltersResponse;
1474
+ };
1475
+ [UIPassthroughEvent.GetIframeUrl]: {
1476
+ request: Record<string, never>;
1477
+ response: GetIframeUrlResponse;
1478
+ };
1479
+ [UIPassthroughEvent.GetParameters]: {
1480
+ request: Record<string, never>;
1481
+ response: GetParametersResponse;
1482
+ };
1483
+ [UIPassthroughEvent.GetTML]: {
1484
+ request: GetTMLRequest;
1485
+ response: Record<string, any>;
1486
+ };
1487
+ [UIPassthroughEvent.GetTabs]: {
1488
+ request: Record<string, never>;
1489
+ response: GetTabsResponse;
1490
+ };
1491
+ [UIPassthroughEvent.GetGroups]: {
1492
+ request: Record<string, never>;
1493
+ response: GetGroupsResponse;
1494
+ };
1495
+ [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
1496
+ request: Record<string, never>;
1497
+ response: GetExportRequestForCurrentPinboardResponse;
1498
+ };
1499
+ [UIPassthroughEvent.UpdateFilters]: {
1500
+ request: UpdateFiltersPassthroughRequest;
1501
+ response: unknown;
1502
+ };
1503
+ [UIPassthroughEvent.Drilldown]: {
1504
+ request: DrilldownRequest;
1505
+ response: unknown;
1506
+ };
1507
+ };
1508
+ export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
1509
+ export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
1510
+ export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
1511
+ refId?: string;
1512
+ value?: UIPassthroughResponse<ApiName>;
1513
+ error?: any;
1514
+ }>;
1515
+ export type EmbedApiHostEventMapping = {
1516
+ [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
1517
+ [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
1518
+ [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
1519
+ [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
1520
+ [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
1521
+ [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
1522
+ [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
1523
+ [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
1524
+ [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
1525
+ [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
1526
+ };
1253
1527
  /**
1254
1528
  * The authentication mechanism for allowing access to
1255
1529
  * the embedded app
@@ -3647,6 +3921,15 @@ export interface RuntimeParameter {
3647
3921
  * Values
3648
3922
  */
3649
3923
  value: number | boolean | string;
3924
+ /**
3925
+ * Whether the parameter is visible to the user (`UpdateParameters` only).
3926
+ */
3927
+ isVisibleToUser?: boolean;
3928
+ /**
3929
+ * Scope of the update (`UpdateParameters` only). Omitting it, or `level`,
3930
+ * targets the Liveboard level.
3931
+ */
3932
+ applicability?: Applicability;
3650
3933
  }
3651
3934
  /**
3652
3935
  * Event types emitted by the embedded ThoughtSpot application.
@@ -4098,6 +4381,9 @@ export declare enum EmbedEvent {
4098
4381
  Download = "download",
4099
4382
  /**
4100
4383
  * Emitted when the download action is triggered on an Answer.
4384
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4385
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4386
+ * accepts the union now; per-context enforced next release.
4101
4387
  * Use start:true to subscribe to when download is initiated, or end:true to
4102
4388
  * subscribe to when download is completed. Default is end:true.
4103
4389
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
@@ -4114,6 +4400,9 @@ export declare enum EmbedEvent {
4114
4400
  DownloadAsPng = "downloadAsPng",
4115
4401
  /**
4116
4402
  * Emitted when the Download as PDF action is triggered on an Answer
4403
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer; plus
4404
+ * liveboardId on Liveboard), {@link RequiredVizRequest} (Spotter). trigger()
4405
+ * accepts the union now; per-context enforced next release.
4117
4406
  * Use start:true to subscribe to when download as PDF is initiated, or end:true to
4118
4407
  * subscribe to when download as PDF is completed. Default is end:true.
4119
4408
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4130,6 +4419,9 @@ export declare enum EmbedEvent {
4130
4419
  DownloadAsPdf = "downloadAsPdf",
4131
4420
  /**
4132
4421
  * Emitted when the Download as CSV action is triggered on an Answer.
4422
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4423
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4424
+ * accepts the union now; per-context enforced next release.
4133
4425
  * Use start:true to subscribe to when download as CSV is initiated, or end:true to
4134
4426
  * subscribe to when download as CSV is completed. Default is end:true.
4135
4427
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4146,6 +4438,9 @@ export declare enum EmbedEvent {
4146
4438
  DownloadAsCsv = "downloadAsCsv",
4147
4439
  /**
4148
4440
  * Emitted when the Download as XLSX action is triggered on an Answer.
4441
+ * Payload varies by context: {@link VizScopedRequest} (Search, Answer,
4442
+ * Liveboard), {@link RequiredVizRequest} (Spotter, vizId required). trigger()
4443
+ * accepts the union now; per-context enforced next release.
4149
4444
  * Use start:true to subscribe to when download as XLSX is initiated, or end:true to
4150
4445
  * subscribe to when download as XLSX is completed. Default is end:true.
4151
4446
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
@@ -4424,6 +4719,9 @@ export declare enum EmbedEvent {
4424
4719
  Schedule = "subscription",
4425
4720
  /**
4426
4721
  * Emitted when a user clicks **Edit** on a Liveboard or visualization
4722
+ * Payload varies by context: {@link VizScopedRequest} (Liveboard),
4723
+ * {@link RequiredVizRequest} (Spotter, vizId required). trigger() accepts the
4724
+ * union now; per-context enforced next release.
4427
4725
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
4428
4726
  * @example
4429
4727
  * ```js
@@ -5502,6 +5800,7 @@ export declare enum HostEvent {
5502
5800
  * the search query string.
5503
5801
  * Supported in `AppEmbed` and `SearchEmbed` deployments.
5504
5802
  * Includes the following properties:
5803
+ * Payload: {@link SearchRequest}.
5505
5804
  * @param - Includes the following keys:
5506
5805
  * - `searchQuery`: Query string with search tokens.
5507
5806
  * - `dataSources`: Data source GUID to search on.
@@ -5529,6 +5828,9 @@ export declare enum HostEvent {
5529
5828
  Search = "search",
5530
5829
  /**
5531
5830
  * Triggers a drill on certain points of the specified column
5831
+ * Payload: {@link DrillDownRequest}; in Liveboard context vizId is required
5832
+ * ({@link RequiredVizRequest}). trigger() accepts the union now; per-context
5833
+ * enforced next release.
5532
5834
  * Includes the following properties:
5533
5835
  * @param - Includes the following keys:
5534
5836
  * - `points`: An object containing `selectedPoints` and/or `clickedPoint`
@@ -5608,6 +5910,8 @@ export declare enum HostEvent {
5608
5910
  Reload = "reload",
5609
5911
  /**
5610
5912
  * Get iframe URL for the current embed view.
5913
+ * Payload: none.
5914
+ * Response: {@link GetIframeUrlResponse}.
5611
5915
  * @example
5612
5916
  * ```js
5613
5917
  * const url = embed.trigger(HostEvent.GetIframeUrl);
@@ -5626,6 +5930,7 @@ export declare enum HostEvent {
5626
5930
  GetIframeUrl = "GetIframeUrl",
5627
5931
  /**
5628
5932
  * Display specific visualizations on a Liveboard.
5933
+ * Payload: `string[]`.
5629
5934
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
5630
5935
  * in this parameter will be hidden.
5631
5936
  * @example
@@ -5648,6 +5953,7 @@ export declare enum HostEvent {
5648
5953
  SetVisibleVizs = "SetPinboardVisibleVizs",
5649
5954
  /**
5650
5955
  * Set a Liveboard tab as an active tab.
5956
+ * Payload: {@link SetActiveTabRequest}.
5651
5957
  * @param - tabId - string of id of Tab to show
5652
5958
  * @example
5653
5959
  * ```js
@@ -5675,6 +5981,7 @@ export declare enum HostEvent {
5675
5981
  * and `AppEmbed` only. In full application embedding, this event updates
5676
5982
  * the runtime filters applied on the Liveboard and saved Answer objects.
5677
5983
  *
5984
+ * Payload: {@link RuntimeFilter}[].
5678
5985
  * @param - Array of {@link RuntimeFilter} objects. Each item includes:
5679
5986
  * - `columnName`: Name of the column to filter on.
5680
5987
  * - `operator`: {@link RuntimeFilterOp} to apply. For more information, see
@@ -5716,6 +6023,7 @@ export declare enum HostEvent {
5716
6023
  * Accepts either a plain value or an object with `path`
5717
6024
  * and an optional `replace` flag.
5718
6025
  *
6026
+ * Payload: `string` | `number` | {@link NavigateRequest}.
5719
6027
  * @param data - A string path, a numeric history delta, or an object
5720
6028
  * `{ path: string | number, replace?: boolean }`.
5721
6029
  * - `path` — the route to navigate to, or a history delta such as `1`
@@ -5743,6 +6051,9 @@ export declare enum HostEvent {
5743
6051
  /**
5744
6052
  * Open the filter panel for a particular column.
5745
6053
  * Works with Search and Liveboard embed.
6054
+ * Payload: {@link OpenFilterRequest} (the cross-context superset). The
6055
+ * accepted fields vary by context: {@link OpenFilterLiveboardRequest},
6056
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
5746
6057
  * @param - { columnId: string,
5747
6058
  * name: string,
5748
6059
  * type: ATTRIBUTE/MEASURE,
@@ -5825,6 +6136,7 @@ export declare enum HostEvent {
5825
6136
  /**
5826
6137
  * Open the parameter panel for a particular parameter on a Liveboard.
5827
6138
  * Mirrors {@link HostEvent.OpenFilter} for parameters.
6139
+ * Payload: {@link OpenParameterRequest}.
5828
6140
  * @param - Includes the following keys:
5829
6141
  * - `parameter`: An object identifying the parameter to open, for
5830
6142
  * example, `{ parameterId: '<parameter-GUID>' }`.
@@ -5856,6 +6168,7 @@ export declare enum HostEvent {
5856
6168
  OpenParameter = "openParameter",
5857
6169
  /**
5858
6170
  * Add columns to the current search query.
6171
+ * Payload: `{ columnIds: string[] }`.
5859
6172
  * @param - { columnIds: string[] }
5860
6173
  * @example
5861
6174
  * ```js
@@ -5874,6 +6187,7 @@ export declare enum HostEvent {
5874
6187
  AddColumns = "addColumns",
5875
6188
  /**
5876
6189
  * Remove a column from the current search query.
6190
+ * Payload: `{ columnId: string }`.
5877
6191
  * @param - { columnId: string }
5878
6192
  * @example
5879
6193
  * ```js
@@ -5898,6 +6212,8 @@ export declare enum HostEvent {
5898
6212
  * sorting, toggling of legends, and data drill down.
5899
6213
  * For more information, see
5900
6214
  * link:https://developers.thoughtspot.com/docs/fetch-data-and-report-apis#transient-lb-content[Liveboard data with unsaved changes].
6215
+ * Payload: none.
6216
+ * Response: {@link GetExportRequestForCurrentPinboardResponse}.
5901
6217
  * @example
5902
6218
  * ```js
5903
6219
  * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard).then(
@@ -5919,6 +6235,8 @@ export declare enum HostEvent {
5919
6235
  * requiring additional user input via the *Pin to Liveboard* modal, define
5920
6236
  * the following parameters:
5921
6237
  *
6238
+ * Payload: {@link PinAnswerToLiveboardRequest}.
6239
+ * Response: {@link PinAnswerToLiveboardResponse}.
5922
6240
  * @param - Includes the following keys:
5923
6241
  * - `vizId`: GUID of the saved Answer or Spotter visualization ID to pin to a
5924
6242
  * Liveboard.
@@ -6033,6 +6351,7 @@ export declare enum HostEvent {
6033
6351
  LiveboardInfo = "pinboardInfo",
6034
6352
  /**
6035
6353
  * Trigger the **Schedule** action on an embedded Liveboard.
6354
+ * Payload: {@link VizScopedRequest}.
6036
6355
  * @example
6037
6356
  * ```js
6038
6357
  * liveboardEmbed.trigger(HostEvent.Schedule)
@@ -6048,6 +6367,7 @@ export declare enum HostEvent {
6048
6367
  Schedule = "subscription",
6049
6368
  /**
6050
6369
  * Trigger the **Manage schedule** action on an embedded Liveboard
6370
+ * Payload: {@link VizScopedRequest}.
6051
6371
  * @example
6052
6372
  * ```js
6053
6373
  * liveboardEmbed.trigger(HostEvent.SchedulesList)
@@ -6064,6 +6384,7 @@ export declare enum HostEvent {
6064
6384
  /**
6065
6385
  * Trigger the **Export TML** action on an embedded Liveboard or
6066
6386
  * Answer.
6387
+ * Payload: {@link VizScopedRequest}.
6067
6388
  * @example
6068
6389
  * ```js
6069
6390
  * liveboardEmbed.trigger(HostEvent.ExportTML)
@@ -6086,6 +6407,7 @@ export declare enum HostEvent {
6086
6407
  /**
6087
6408
  * Trigger the **Edit TML** action on an embedded Liveboard or
6088
6409
  * saved Answers in the full application embedding.
6410
+ * Payload: {@link VizScopedRequest}.
6089
6411
  * @example
6090
6412
  * ```js
6091
6413
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -6107,6 +6429,7 @@ export declare enum HostEvent {
6107
6429
  EditTML = "editTSL",
6108
6430
  /**
6109
6431
  * Trigger the **Update TML** action on an embedded Liveboard.
6432
+ * Payload: {@link VizScopedRequest}.
6110
6433
  * @example
6111
6434
  * ```js
6112
6435
  * liveboardEmbed.trigger(HostEvent.UpdateTML)
@@ -6124,6 +6447,7 @@ export declare enum HostEvent {
6124
6447
  * Trigger the **Download PDF** action on an embedded Liveboard,
6125
6448
  * visualization or Answer.
6126
6449
  *
6450
+ * Payload: {@link VizScopedRequest} plus optional `liveboardId`.
6127
6451
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
6128
6452
  *
6129
6453
  * **NOTE**: The **Download** > **PDF** action is available on
@@ -6174,6 +6498,7 @@ export declare enum HostEvent {
6174
6498
  /**
6175
6499
  * Trigger the **AI Highlights** action on an embedded Liveboard
6176
6500
  *
6501
+ * Payload: none.
6177
6502
  * @example
6178
6503
  * ```js
6179
6504
  * liveboardEmbed.trigger(HostEvent.AIHighlights)
@@ -6228,6 +6553,9 @@ export declare enum HostEvent {
6228
6553
  MakeACopy = "makeACopy",
6229
6554
  /**
6230
6555
  * Trigger the **Delete** action for a Liveboard.
6556
+ * Payload varies by context: {@link RequiredVizRequest} (Liveboard, vizId
6557
+ * required), {@link VizScopedRequest} (Search). trigger() accepts the union
6558
+ * now; per-context enforced next release.
6231
6559
  * @example
6232
6560
  * ```js
6233
6561
  * appEmbed.trigger(HostEvent.Remove)
@@ -6242,6 +6570,7 @@ export declare enum HostEvent {
6242
6570
  Remove = "delete",
6243
6571
  /**
6244
6572
  * Trigger the **Explore** action on a visualization.
6573
+ * Payload: {@link RequiredVizRequest}.
6245
6574
  * @param - an object with `vizId` as a key
6246
6575
  * @example
6247
6576
  * ```js
@@ -6261,6 +6590,7 @@ export declare enum HostEvent {
6261
6590
  /**
6262
6591
  * Trigger the **Create alert** action on a KPI chart
6263
6592
  * in a Liveboard or saved Answer.
6593
+ * Payload: {@link VizScopedRequest}.
6264
6594
  * @param - an object with `vizId` as a key
6265
6595
  * @example
6266
6596
  * ```js
@@ -6292,6 +6622,7 @@ export declare enum HostEvent {
6292
6622
  /**
6293
6623
  * Trigger the **Manage alerts** action on a KPI chart
6294
6624
  * in a visualization or saved Answer.
6625
+ * Payload: {@link VizScopedRequest}.
6295
6626
  * @param - an object with `vizId` as a key
6296
6627
  * @example
6297
6628
  * ```js
@@ -6329,6 +6660,7 @@ export declare enum HostEvent {
6329
6660
  * on a Liveboard.
6330
6661
  *
6331
6662
  * This event is not supported in visualization embed and search embed.
6663
+ * Payload: {@link VizScopedRequest}.
6332
6664
  * @param - Object parameter. Includes the following keys:
6333
6665
  * - `vizId`: To trigger the action for a specific visualization in Liveboard embed,
6334
6666
  * pass in `vizId` as a key. In Spotter embed, `vizId` refers to the Answer ID and
@@ -6371,6 +6703,7 @@ export declare enum HostEvent {
6371
6703
  Edit = "edit",
6372
6704
  /**
6373
6705
  * Trigger the **Copy link** action on a Liveboard or visualization
6706
+ * Payload: {@link VizScopedRequest}.
6374
6707
  * @param - object - to trigger the action for a
6375
6708
  * specific visualization in Liveboard embed, pass in `vizId` as a key
6376
6709
  * @example
@@ -6416,6 +6749,7 @@ export declare enum HostEvent {
6416
6749
  CopyLink = "embedDocument",
6417
6750
  /**
6418
6751
  * Trigger the **Present** action on a Liveboard or visualization
6752
+ * Payload: {@link VizScopedRequest}.
6419
6753
  * @param - object - to trigger the action for a specific visualization
6420
6754
  * in Liveboard embed, pass in `vizId` as a key
6421
6755
  * @example
@@ -6461,6 +6795,8 @@ export declare enum HostEvent {
6461
6795
  Present = "present",
6462
6796
  /**
6463
6797
  * Get TML for the current search.
6798
+ * Payload: {@link GetTMLRequest}.
6799
+ * Response: `Record<string, any>`.
6464
6800
  * @example
6465
6801
  * ```js
6466
6802
  * searchEmbed.trigger(HostEvent.GetTML).then((tml) => {
@@ -6510,6 +6846,7 @@ export declare enum HostEvent {
6510
6846
  * Trigger the **Show underlying data** action on a
6511
6847
  * chart or table.
6512
6848
  *
6849
+ * Payload: {@link VizScopedRequest}.
6513
6850
  * @param - an object with vizId as a key
6514
6851
  * @example
6515
6852
  * ```js
@@ -6543,6 +6880,7 @@ export declare enum HostEvent {
6543
6880
  * Trigger the **Delete** action for a visualization
6544
6881
  * in an embedded Liveboard, or a chart or table
6545
6882
  * generated from Search.
6883
+ * Payload: {@link VizScopedRequest}.
6546
6884
  * @param - Liveboard embed takes an object with `vizId` as a key.
6547
6885
  * Can be left empty if embedding Search or visualization.
6548
6886
  * @example
@@ -6571,6 +6909,7 @@ export declare enum HostEvent {
6571
6909
  /**
6572
6910
  * Trigger the **SpotIQ analyze** action on a
6573
6911
  * chart or table.
6912
+ * Payload: {@link VizScopedRequest}.
6574
6913
  * @param - Liveboard embed takes `vizId` as a
6575
6914
  * key. Can be left undefined when embedding Search or
6576
6915
  * visualization.
@@ -6633,6 +6972,7 @@ export declare enum HostEvent {
6633
6972
  /**
6634
6973
  * Trigger the **Download** > **PNG** action on
6635
6974
  * charts in the embedded view.
6975
+ * Payload: {@link VizScopedRequest}.
6636
6976
  * @example
6637
6977
  * ```js
6638
6978
  * liveboardEmbed.trigger(HostEvent.DownloadAsPng,
@@ -6663,6 +7003,7 @@ export declare enum HostEvent {
6663
7003
  /**
6664
7004
  * Trigger the **Download** > **CSV** action on tables in
6665
7005
  * the embedded view.
7006
+ * Payload: {@link VizScopedRequest}.
6666
7007
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
6667
7008
  * @example
6668
7009
  * ```js
@@ -6702,6 +7043,7 @@ export declare enum HostEvent {
6702
7043
  /**
6703
7044
  * Trigger the **Download** > **XLSX** action on tables
6704
7045
  * in the embedded view.
7046
+ * Payload: {@link VizScopedRequest}.
6705
7047
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required in Spotter embed.
6706
7048
  * @example
6707
7049
  * ```js
@@ -6741,6 +7083,7 @@ export declare enum HostEvent {
6741
7083
  /**
6742
7084
  * Trigger the **Share** action on an embedded
6743
7085
  * Liveboard or Answer.
7086
+ * Payload: {@link VizScopedRequest}.
6744
7087
  * @example
6745
7088
  * ```js
6746
7089
  * liveboardEmbed.trigger(HostEvent.Share)
@@ -6767,6 +7110,7 @@ export declare enum HostEvent {
6767
7110
  * Trigger the **Save** action on a Liveboard, Answer, or Spotter.
6768
7111
  * Saves the changes.
6769
7112
  *
7113
+ * Payload: {@link VizScopedRequest}.
6770
7114
  * @param - `vizId` refers to the Spotter Visualization Id used in Spotter embed.
6771
7115
  * It is required and can be retrieved from the data embed event.
6772
7116
  *
@@ -6818,6 +7162,7 @@ export declare enum HostEvent {
6818
7162
  /**
6819
7163
  * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
6820
7164
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
7165
+ * Payload: {@link VizScopedRequest}.
6821
7166
  * @param - an object with `vizId` as a key
6822
7167
  * @example
6823
7168
  * ```js
@@ -6848,6 +7193,7 @@ export declare enum HostEvent {
6848
7193
  * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
6849
7194
  * Sends data from an Answer or Liveboard visualization to third-party apps such
6850
7195
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
7196
+ * Payload: {@link VizScopedRequest}.
6851
7197
  * @param - an object with vizId as a key
6852
7198
  * @example
6853
7199
  * ```js
@@ -6878,6 +7224,7 @@ export declare enum HostEvent {
6878
7224
  * Trigger the **Manage pipelines** action on an embedded
6879
7225
  * visualization or Answer.
6880
7226
  * Allows users to manage ThoughtSpot Sync pipelines.
7227
+ * Payload: {@link VizScopedRequest}.
6881
7228
  * @param - an object with `vizId` as a key
6882
7229
  * @example
6883
7230
  * ```js
@@ -6906,6 +7253,7 @@ export declare enum HostEvent {
6906
7253
  ManagePipelines = "manage-pipeline",
6907
7254
  /**
6908
7255
  * Reset search operation on the Search or Answer page.
7256
+ * Payload: none.
6909
7257
  * @example
6910
7258
  * ```js
6911
7259
  * searchEmbed.trigger(HostEvent.ResetSearch)
@@ -6933,6 +7281,8 @@ export declare enum HostEvent {
6933
7281
  * whole Liveboard.
6934
7282
  * The `applicability` attribute is available from SDK: 1.53.0 |
6935
7283
  * ThoughtSpot: 26.10.0.cl.
7284
+ * Payload: {@link GetFiltersRequest}.
7285
+ * Response: {@link GetFiltersResponse}.
6936
7286
  * @example
6937
7287
  * ```js
6938
7288
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -6952,6 +7302,7 @@ export declare enum HostEvent {
6952
7302
  GetFilters = "getFilters",
6953
7303
  /**
6954
7304
  * Update one or several filters applied on a Liveboard.
7305
+ * Payload: {@link UpdateFiltersRequest}.
6955
7306
  * @param - Includes the following keys:
6956
7307
  * - `filter`: A single filter object containing column name, filter operator, and
6957
7308
  * values.
@@ -7080,6 +7431,8 @@ export declare enum HostEvent {
7080
7431
  UpdateFilters = "updateFilters",
7081
7432
  /**
7082
7433
  * Get tab details for the current Liveboard.
7434
+ * Payload: none.
7435
+ * Response: {@link GetTabsResponse}.
7083
7436
  * @example
7084
7437
  * ```js
7085
7438
  * liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
@@ -7105,6 +7458,8 @@ export declare enum HostEvent {
7105
7458
  /**
7106
7459
  * Get group details for the current Liveboard.
7107
7460
  * Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
7461
+ * Payload: none.
7462
+ * Response: {@link GetGroupsResponse}.
7108
7463
  * @example
7109
7464
  * ```js
7110
7465
  * liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
@@ -7129,6 +7484,7 @@ export declare enum HostEvent {
7129
7484
  GetGroups = "getGroups",
7130
7485
  /**
7131
7486
  * Set the visible tabs on a Liveboard.
7487
+ * Payload: `string[]`.
7132
7488
  * @param - an array of ids of tabs to show, the IDs not passed
7133
7489
  * will be hidden.
7134
7490
  * @example
@@ -7151,6 +7507,7 @@ export declare enum HostEvent {
7151
7507
  SetVisibleTabs = "SetPinboardVisibleTabs",
7152
7508
  /**
7153
7509
  * Set the hidden tabs on a Liveboard.
7510
+ * Payload: `string[]`.
7154
7511
  * @param - an array of the IDs of the tabs to hide.
7155
7512
  * The IDs not passed will be shown.
7156
7513
  * @example
@@ -7179,6 +7536,8 @@ export declare enum HostEvent {
7179
7536
  * `getAnswerService()` method on the embed instance to get an AnswerService
7180
7537
  * object that provides a more convenient interface for working with answers.
7181
7538
  *
7539
+ * Payload: {@link GetAnswerSessionRequest}.
7540
+ * Response: {@link GetAnswerSessionResponse}.
7182
7541
  * @example
7183
7542
  * ```js
7184
7543
  * // Preferred way to get an AnswerService
@@ -7206,6 +7565,7 @@ export declare enum HostEvent {
7206
7565
  GetAnswerSession = "getAnswerSession",
7207
7566
  /**
7208
7567
  * Trigger the *Ask Sage* action for visualizations
7568
+ * Payload: {@link RequiredVizRequest}.
7209
7569
  * @example
7210
7570
  * ```js
7211
7571
  * liveboardEmbed.trigger(HostEvent.AskSage,
@@ -7217,6 +7577,7 @@ export declare enum HostEvent {
7217
7577
  /**
7218
7578
  * Trigger cross filter update action on a Liveboard.
7219
7579
  *
7580
+ * Payload: {@link UpdateCrossFilterRequest}.
7220
7581
  * @example
7221
7582
  * ```js
7222
7583
  * liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
@@ -7232,7 +7593,9 @@ export declare enum HostEvent {
7232
7593
  UpdateCrossFilter = "UpdateCrossFilter",
7233
7594
  /**
7234
7595
  * Trigger reset action for a personalized Liveboard view.
7235
- * This event is deprecated. Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7596
+ * This event is deprecated.
7597
+ * Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
7598
+ * Payload: none.
7236
7599
  * @example
7237
7600
  * ```js
7238
7601
  * liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
@@ -7253,6 +7616,7 @@ export declare enum HostEvent {
7253
7616
  /**
7254
7617
  * Triggers an action to update Parameter values on embedded
7255
7618
  * Answers, Liveboard, and Spotter answer in Edit mode.
7619
+ * Payload: {@link RuntimeParameter}[].
7256
7620
  * @param - Includes the following keys for each item:
7257
7621
  * - `name`: Name of the parameter.
7258
7622
  * - `value`: The value to set for the parameter.
@@ -7310,6 +7674,8 @@ export declare enum HostEvent {
7310
7674
  * whole Liveboard.
7311
7675
  * The `applicability` attribute is available from SDK: 1.53.0 |
7312
7676
  * ThoughtSpot: 26.10.0.cl.
7677
+ * Payload: none.
7678
+ * Response: {@link GetParametersResponse}.
7313
7679
  * @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
7314
7680
  * ```js
7315
7681
  * liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
@@ -7347,6 +7713,7 @@ export declare enum HostEvent {
7347
7713
  * ```js
7348
7714
  * liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
7349
7715
  * ```
7716
+ * Payload: {@link PersonalisedViewRequest} (`viewId` only).
7350
7717
  * @example
7351
7718
  * ```js
7352
7719
  * // Update personalized view from liveboard context
@@ -7379,6 +7746,7 @@ export declare enum HostEvent {
7379
7746
  * If neither is provided, the Liveboard resets to the original/default view.
7380
7747
  * When a `viewName` is provided and multiple views share
7381
7748
  * the same name, the first match is selected.
7749
+ * Payload: {@link PersonalisedViewRequest}.
7382
7750
  * @example
7383
7751
  * ```js
7384
7752
  * liveboardEmbed.trigger(
@@ -7422,6 +7790,8 @@ export declare enum HostEvent {
7422
7790
  * If no parameters are specified, the save action is
7423
7791
  * triggered with a modal to prompt users to
7424
7792
  * add a name and description for the Answer.
7793
+ * Payload: {@link SaveAnswerRequest}.
7794
+ * Response: {@link SaveAnswerResponse}.
7425
7795
  * @param - Includes the following keys:
7426
7796
  * - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
7427
7797
  * embed.
@@ -7507,6 +7877,7 @@ export declare enum HostEvent {
7507
7877
  /**
7508
7878
  * Triggers a search operation with the search tokens specified in
7509
7879
  * the search query string in spotter embed.
7880
+ * Payload: {@link SpotterSearchRequest}.
7510
7881
  * @param - Includes the following keys:
7511
7882
  * - `query`: Text string in Natural Language format.
7512
7883
  * - `executeSearch`: Boolean to execute search and update search query.
@@ -7531,6 +7902,7 @@ export declare enum HostEvent {
7531
7902
  SpotterSearch = "SpotterSearch",
7532
7903
  /**
7533
7904
  * Edits the last prompt in spotter embed.
7905
+ * Payload: `string`.
7534
7906
  * @param - `query`: Text string
7535
7907
  * @example
7536
7908
  * ```js
@@ -7547,6 +7919,7 @@ export declare enum HostEvent {
7547
7919
  EditLastPrompt = "EditLastPrompt",
7548
7920
  /**
7549
7921
  * Opens the data source preview modal in Spotter Embed.
7922
+ * Payload: none.
7550
7923
  * @example
7551
7924
  * ```js
7552
7925
  * spotterEmbed.trigger(HostEvent.PreviewSpotterData);
@@ -7582,6 +7955,7 @@ export declare enum HostEvent {
7582
7955
  DataModelInstructions = "DataModelInstructions",
7583
7956
  /**
7584
7957
  * Resets the Spotter Embed Conversation.
7958
+ * Payload: none.
7585
7959
  * @example
7586
7960
  * ```js
7587
7961
  * spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
@@ -7594,6 +7968,7 @@ export declare enum HostEvent {
7594
7968
  * `conversationId` is **mandatory** — you must pass the id of the
7595
7969
  * conversation to share. Also no-op when sharing is disabled
7596
7970
  * (enableShareConversation off) or when already in the read-only shared view.
7971
+ * Payload: {@link ConversationScopedRequest}.
7597
7972
  * @example
7598
7973
  * ```js
7599
7974
  * spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
@@ -7603,6 +7978,7 @@ export declare enum HostEvent {
7603
7978
  ShareSpotterConversation = "ShareSpotterConversation",
7604
7979
  /**
7605
7980
  * Closes the Spotter share-conversation modal. No-op if none is open.
7981
+ * Payload: none.
7606
7982
  * @example
7607
7983
  * ```js
7608
7984
  * spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
@@ -7612,6 +7988,7 @@ export declare enum HostEvent {
7612
7988
  CloseSpotterShareConversation = "CloseSpotterShareConversation",
7613
7989
  /**
7614
7990
  * Exits the read-only shared-conversation view.
7991
+ * Payload: none.
7615
7992
  * @example
7616
7993
  * ```js
7617
7994
  * spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
@@ -7621,6 +7998,7 @@ export declare enum HostEvent {
7621
7998
  ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
7622
7999
  /**
7623
8000
  * Deletes the last prompt in spotter embed.
8001
+ * Payload: none.
7624
8002
  * @example
7625
8003
  * ```js
7626
8004
  * spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
@@ -7630,6 +8008,7 @@ export declare enum HostEvent {
7630
8008
  DeleteLastPrompt = "DeleteLastPrompt",
7631
8009
  /**
7632
8010
  * Toggle the visualization to chart or table view.
8011
+ * Payload: {@link RequiredVizRequest}.
7633
8012
  * @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
7634
8013
  * @example
7635
8014
  * ```js
@@ -7668,6 +8047,7 @@ export declare enum HostEvent {
7668
8047
  VisibleEmbedCoordinates = "visibleEmbedCoordinates",
7669
8048
  /**
7670
8049
  * Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
8050
+ * Payload: {@link RequiredVizRequest}.
7671
8051
  * @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
7672
8052
  * @example
7673
8053
  * ```js
@@ -7729,6 +8109,7 @@ export declare enum HostEvent {
7729
8109
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7730
8110
  * instance.
7731
8111
  *
8112
+ * Payload: {@link ConversationScopedRequest}.
7732
8113
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7733
8114
  * @example
7734
8115
  * ```js
@@ -7746,6 +8127,7 @@ export declare enum HostEvent {
7746
8127
  * instance. Contact your admin or ThoughtSpot Support to enable chat history on your
7747
8128
  * instance.
7748
8129
  *
8130
+ * Payload: {@link ConversationScopedRequest}.
7749
8131
  * @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
7750
8132
  * @example
7751
8133
  * ```js
@@ -7770,6 +8152,7 @@ export declare enum HostEvent {
7770
8152
  * Trigger the **Send Test Email** action in the Liveboard schedule modal.
7771
8153
  * Sends a test schedule email to self or all recipients.
7772
8154
  * Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
8155
+ * Payload: {@link ScheduleEmailRequest}.
7773
8156
  * @example
7774
8157
  * ```js
7775
8158
  * liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
@@ -7788,6 +8171,7 @@ export declare enum HostEvent {
7788
8171
  SendTestScheduleEmail = "sendTestScheduleEmail",
7789
8172
  /**
7790
8173
  * Sends a user message (prompt) to the SpotterViz panel programmatically.
8174
+ * Payload: `{ query: string }`.
7791
8175
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7792
8176
  * @param query - the prompt text to send.
7793
8177
  * @example
@@ -7800,6 +8184,7 @@ export declare enum HostEvent {
7800
8184
  SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
7801
8185
  /**
7802
8186
  * Initializes a new SpotterViz conversation.
8187
+ * Payload: none.
7803
8188
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7804
8189
  * @example
7805
8190
  * ```js
@@ -7809,6 +8194,7 @@ export declare enum HostEvent {
7809
8194
  InitSpotterVizConversation = "InitSpotterVizConversation",
7810
8195
  /**
7811
8196
  * Opens the SpotterViz panel.
8197
+ * Payload: none.
7812
8198
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7813
8199
  * @example
7814
8200
  * ```js
@@ -7818,6 +8204,7 @@ export declare enum HostEvent {
7818
8204
  OpenSpotterVizPanel = "OpenSpotterVizPanel",
7819
8205
  /**
7820
8206
  * Closes the SpotterViz panel.
8207
+ * Payload: none.
7821
8208
  * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7822
8209
  * @example
7823
8210
  * ```js
@@ -7828,6 +8215,7 @@ export declare enum HostEvent {
7828
8215
  /**
7829
8216
  * Clears browser cache and fetches new data for liveboard ChartViz Containers.
7830
8217
  * Requires `enableLiveboardDataCache` to be enabled.
8218
+ * Payload: {@link ScheduleEmailRequest}.
7831
8219
  * @example
7832
8220
  * ```js
7833
8221
  * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
@@ -9860,92 +10248,376 @@ export declare enum Action {
9860
10248
  * disabledActions: [Action.SpotterOnLiveboard]
9861
10249
  * ```
9862
10250
  */
9863
- SpotterOnLiveboard = "spotterOnLiveboard"
9864
- }
9865
- export declare enum PrefetchFeatures {
9866
- FullApp = "FullApp",
9867
- SearchEmbed = "SearchEmbed",
9868
- LiveboardEmbed = "LiveboardEmbed",
9869
- VizEmbed = "VizEmbed"
9870
- }
9871
- declare enum ContextMenuTriggerOptions {
9872
- LEFT_CLICK = "left-click",
9873
- RIGHT_CLICK = "right-click",
9874
- BOTH_CLICKS = "both-clicks"
9875
- }
9876
- export interface ColumnValue {
9877
- column: {
9878
- id: string;
9879
- name: string;
9880
- dataType: string;
9881
- [key: string]: any;
9882
- };
9883
- value: string | number | boolean | {
9884
- v: {
9885
- s: number;
9886
- e: number;
9887
- };
9888
- };
9889
- }
9890
- export interface VizPoint {
9891
- selectedAttributes: ColumnValue[];
9892
- selectedMeasures: ColumnValue[];
9893
- }
9894
- export interface CustomAction {
9895
- name: string;
9896
- id: string;
9897
- position: CustomActionsPosition;
9898
- target: CustomActionTarget;
9899
- metadataIds?: {
9900
- answerIds?: string[];
9901
- liveboardIds?: string[];
9902
- vizIds?: string[];
9903
- };
9904
- dataModelIds?: {
9905
- modelIds?: string[];
9906
- modelColumnNames?: string[];
9907
- };
9908
- orgIds?: string[];
9909
- groupIds?: string[];
9910
- }
9911
- /**
9912
- * Enum options to show custom actions at different
9913
- * positions in the application.
9914
- */
9915
- export declare enum CustomActionsPosition {
10251
+ SpotterOnLiveboard = "spotterOnLiveboard",
9916
10252
  /**
9917
- * Shows the action as a primary button
9918
- * in the toolbar area of the embed.
10253
+ * Controls the visibility and disabled state of the "Chart Type" menu item
10254
+ * in Chart Settings V2.
10255
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10256
+ * @example
10257
+ * ```js
10258
+ * {
10259
+ * hiddenActions: [Action.ChartTypeSettings],
10260
+ * disabledActions: [Action.ChartTypeSettings],
10261
+ * }
10262
+ * ```
9919
10263
  */
9920
- PRIMARY = "PRIMARY",
10264
+ ChartTypeSettings = "CHART_TYPE",
9921
10265
  /**
9922
- * Shows the action inside the "More" menu
9923
- * (three-dot overflow menu).
10266
+ * Controls the visibility and disabled state of the "Layout" menu item
10267
+ * in Chart Settings V2.
10268
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10269
+ * @example
10270
+ * ```js
10271
+ * {
10272
+ * hiddenActions: [Action.LayoutSettings],
10273
+ * disabledActions: [Action.LayoutSettings],
10274
+ * }
10275
+ * ```
9924
10276
  */
9925
- MENU = "MENU",
10277
+ LayoutSettings = "LAYOUT",
9926
10278
  /**
9927
- * Shows the action in the right-click
9928
- * context menu. Only supported for
9929
- * {@link CustomActionTarget.VIZ},
9930
- * {@link CustomActionTarget.ANSWER}, and
9931
- * {@link CustomActionTarget.SPOTTER} targets.
10279
+ * Controls the visibility and disabled state of the "Column" menu item
10280
+ * in Chart Settings V2.
10281
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10282
+ * @example
10283
+ * ```js
10284
+ * {
10285
+ * hiddenActions: [Action.ColumnSettings],
10286
+ * disabledActions: [Action.ColumnSettings],
10287
+ * }
10288
+ * ```
9932
10289
  */
9933
- CONTEXTMENU = "CONTEXTMENU"
9934
- }
9935
- /**
9936
- * Enum options to mention the target of the code-based custom action.
9937
- * The target determines which type of ThoughtSpot object the action is
9938
- * associated with, and also controls which positions and scoping options
9939
- * are available.
9940
- */
9941
- export declare enum CustomActionTarget {
10290
+ ColumnSettings = "COLUMN",
9942
10291
  /**
9943
- * Action applies at the Liveboard level.
9944
- * Supported positions:
9945
- * {@link CustomActionsPosition.PRIMARY},
9946
- * {@link CustomActionsPosition.MENU}.
9947
- * Can be scoped with
9948
- * `metadataIds.liveboardIds`,
10292
+ * Controls the visibility and disabled state of the "Axis" menu item
10293
+ * in Chart Settings V2.
10294
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10295
+ * @example
10296
+ * ```js
10297
+ * {
10298
+ * hiddenActions: [Action.AxisSettings],
10299
+ * disabledActions: [Action.AxisSettings],
10300
+ * }
10301
+ * ```
10302
+ */
10303
+ AxisSettings = "AXIS",
10304
+ /**
10305
+ * Controls the visibility and disabled state of the "Data Label" menu item
10306
+ * in Chart Settings V2.
10307
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10308
+ * @example
10309
+ * ```js
10310
+ * {
10311
+ * hiddenActions: [Action.DataLabelSettings],
10312
+ * disabledActions: [Action.DataLabelSettings],
10313
+ * }
10314
+ * ```
10315
+ */
10316
+ DataLabelSettings = "DATA_LABEL",
10317
+ /**
10318
+ * Controls the visibility and disabled state of the "Tooltip" menu item
10319
+ * in Chart Settings V2.
10320
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10321
+ * @example
10322
+ * ```js
10323
+ * {
10324
+ * hiddenActions: [Action.TooltipSettings],
10325
+ * disabledActions: [Action.TooltipSettings],
10326
+ * }
10327
+ * ```
10328
+ */
10329
+ TooltipSettings = "TOOLTIP",
10330
+ /**
10331
+ * Controls the visibility and disabled state of the "Legend" menu item
10332
+ * in Chart Settings V2.
10333
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10334
+ * @example
10335
+ * ```js
10336
+ * {
10337
+ * hiddenActions: [Action.LegendSettings],
10338
+ * disabledActions: [Action.LegendSettings],
10339
+ * }
10340
+ * ```
10341
+ */
10342
+ LegendSettings = "LEGEND",
10343
+ /**
10344
+ * Controls the visibility and disabled state of the "Display" menu item
10345
+ * in Chart Settings V2.
10346
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10347
+ * @example
10348
+ * ```js
10349
+ * {
10350
+ * hiddenActions: [Action.DisplaySettings],
10351
+ * disabledActions: [Action.DisplaySettings],
10352
+ * }
10353
+ * ```
10354
+ */
10355
+ DisplaySettings = "DISPLAY",
10356
+ /**
10357
+ * Controls the visibility and disabled state of the "Query Details" menu
10358
+ * item in Chart Settings V2.
10359
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10360
+ * @example
10361
+ * ```js
10362
+ * {
10363
+ * hiddenActions: [Action.QuerySettings],
10364
+ * disabledActions: [Action.QuerySettings],
10365
+ * }
10366
+ * ```
10367
+ */
10368
+ QuerySettings = "QUERY_DETAILS",
10369
+ /**
10370
+ * Controls the visibility and disabled state of the "Custom Action" menu
10371
+ * item in Chart Settings V2.
10372
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10373
+ * @example
10374
+ * ```js
10375
+ * {
10376
+ * hiddenActions: [Action.CustomSettings],
10377
+ * disabledActions: [Action.CustomSettings],
10378
+ * }
10379
+ * ```
10380
+ */
10381
+ CustomSettings = "CUSTOM_ACTION",
10382
+ /**
10383
+ * Controls the visibility and disabled state of the "Muze AI" menu item
10384
+ * in Chart Settings V2.
10385
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10386
+ * @example
10387
+ * ```js
10388
+ * {
10389
+ * hiddenActions: [Action.MuzeAiSettings],
10390
+ * disabledActions: [Action.MuzeAiSettings],
10391
+ * }
10392
+ * ```
10393
+ */
10394
+ MuzeAiSettings = "MUZE_AI",
10395
+ /**
10396
+ * Controls the visibility and disabled state of the "R Analysis" menu item
10397
+ * in Chart Settings V2.
10398
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
10399
+ * @example
10400
+ * ```js
10401
+ * {
10402
+ * hiddenActions: [Action.RAnalysisSettings],
10403
+ * disabledActions: [Action.RAnalysisSettings],
10404
+ * }
10405
+ * ```
10406
+ */
10407
+ RAnalysisSettings = "R_ANALYSIS",
10408
+ /**
10409
+ * Controls the visibility and disabled state of the "Add to Collection" menu item.
10410
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10411
+ * @example
10412
+ * ```js
10413
+ * {
10414
+ * hiddenActions: [Action.AddToCollection],
10415
+ * disabledActions: [Action.AddToCollection],
10416
+ * }
10417
+ * ```
10418
+ */
10419
+ AddToCollection = "addToCollection",
10420
+ /**
10421
+ * Controls the visibility and disabled state of the "Create Collection" button.
10422
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10423
+ * @example
10424
+ * ```js
10425
+ * {
10426
+ * hiddenActions: [Action.CreateCollection],
10427
+ * disabledActions: [Action.CreateCollection],
10428
+ * }
10429
+ * ```
10430
+ */
10431
+ CreateCollection = "createCollection",
10432
+ /**
10433
+ * Controls the visibility and disabled state of the "Move" menu item in a
10434
+ * Collection.
10435
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10436
+ * @example
10437
+ * ```js
10438
+ * {
10439
+ * hiddenActions: [Action.MoveToCollection],
10440
+ * disabledActions: [Action.MoveToCollection],
10441
+ * }
10442
+ * ```
10443
+ */
10444
+ MoveToCollection = "moveToCollection",
10445
+ /**
10446
+ * Controls the visibility and disabled state of the "Remove" menu item in a
10447
+ * Collection.
10448
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10449
+ * @example
10450
+ * ```js
10451
+ * {
10452
+ * hiddenActions: [Action.RemoveFromCollection],
10453
+ * disabledActions: [Action.RemoveFromCollection],
10454
+ * }
10455
+ * ```
10456
+ */
10457
+ RemoveFromCollection = "removeFromCollection",
10458
+ /**
10459
+ * Controls the visibility and disabled state of the "Delete" menu item for a
10460
+ * Collection.
10461
+ * @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
10462
+ * @example
10463
+ * ```js
10464
+ * {
10465
+ * hiddenActions: [Action.DeleteCollection],
10466
+ * disabledActions: [Action.DeleteCollection],
10467
+ * }
10468
+ * ```
10469
+ */
10470
+ DeleteCollection = "deleteCollection"
10471
+ }
10472
+ export declare enum PrefetchFeatures {
10473
+ FullApp = "FullApp",
10474
+ SearchEmbed = "SearchEmbed",
10475
+ LiveboardEmbed = "LiveboardEmbed",
10476
+ VizEmbed = "VizEmbed"
10477
+ }
10478
+ declare enum ContextMenuTriggerOptions {
10479
+ LEFT_CLICK = "left-click",
10480
+ RIGHT_CLICK = "right-click",
10481
+ BOTH_CLICKS = "both-clicks"
10482
+ }
10483
+ export interface ColumnValue {
10484
+ column: {
10485
+ id: string;
10486
+ name: string;
10487
+ dataType: string;
10488
+ [key: string]: any;
10489
+ };
10490
+ value: string | number | boolean | {
10491
+ v: {
10492
+ s: number;
10493
+ e: number;
10494
+ };
10495
+ };
10496
+ }
10497
+ export interface VizPoint {
10498
+ selectedAttributes: ColumnValue[];
10499
+ selectedMeasures: ColumnValue[];
10500
+ }
10501
+ /**
10502
+ * @group Events
10503
+ */
10504
+ export interface CustomActionPayload {
10505
+ /**
10506
+ * Id of the custom action that was triggered. Matches the `id` you set on
10507
+ * the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
10508
+ */
10509
+ id?: string;
10510
+ contextMenuPoints?: {
10511
+ clickedPoint: VizPoint;
10512
+ selectedPoints: VizPoint[];
10513
+ };
10514
+ embedAnswerData: {
10515
+ name: string;
10516
+ id: string;
10517
+ sources: {
10518
+ header: {
10519
+ guid: string;
10520
+ };
10521
+ };
10522
+ columns: any[];
10523
+ data: any[];
10524
+ [key: string]: any;
10525
+ };
10526
+ session: SessionInterface;
10527
+ vizId?: string;
10528
+ }
10529
+ /**
10530
+ * A code-based custom action to inject into the embedded ThoughtSpot UI.
10531
+ * Pass an array of these as `customActions` in the embed view config. When a
10532
+ * user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
10533
+ * a {@link CustomActionPayload} carrying the same `id`.
10534
+ */
10535
+ export interface CustomAction {
10536
+ /**
10537
+ * Display label shown on the action's button or menu item.
10538
+ */
10539
+ name: string;
10540
+ /**
10541
+ * Unique identifier for the action. Echoed back as `id` on the
10542
+ * {@link CustomActionPayload} when the action is invoked.
10543
+ */
10544
+ id: string;
10545
+ /**
10546
+ * Where the action appears: a primary button, the "More" menu, or the
10547
+ * right-click context menu. See {@link CustomActionsPosition}.
10548
+ */
10549
+ position: CustomActionsPosition;
10550
+ /**
10551
+ * The surface the action applies to (Liveboard, visualization, Answer, or
10552
+ * Spotter). See {@link CustomActionTarget}. The allowed `position` values
10553
+ * and scoping keys depend on the target.
10554
+ */
10555
+ target: CustomActionTarget;
10556
+ /**
10557
+ * Scope the action to specific objects by GUID. Which keys are allowed
10558
+ * depends on `target` (for example, a `VIZ` action may use `answerIds`,
10559
+ * `liveboardIds`, and `vizIds`).
10560
+ */
10561
+ metadataIds?: {
10562
+ answerIds?: string[];
10563
+ liveboardIds?: string[];
10564
+ vizIds?: string[];
10565
+ };
10566
+ /**
10567
+ * Scope the action by data model, using model GUIDs or column names.
10568
+ * Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
10569
+ */
10570
+ dataModelIds?: {
10571
+ modelIds?: string[];
10572
+ modelColumnNames?: string[];
10573
+ };
10574
+ /**
10575
+ * Restrict the action to specific organizations by ID.
10576
+ */
10577
+ orgIds?: string[];
10578
+ /**
10579
+ * Restrict the action to specific user groups by ID.
10580
+ */
10581
+ groupIds?: string[];
10582
+ }
10583
+ /**
10584
+ * Enum options to show custom actions at different
10585
+ * positions in the application.
10586
+ */
10587
+ export declare enum CustomActionsPosition {
10588
+ /**
10589
+ * Shows the action as a primary button
10590
+ * in the toolbar area of the embed.
10591
+ */
10592
+ PRIMARY = "PRIMARY",
10593
+ /**
10594
+ * Shows the action inside the "More" menu
10595
+ * (three-dot overflow menu).
10596
+ */
10597
+ MENU = "MENU",
10598
+ /**
10599
+ * Shows the action in the right-click
10600
+ * context menu. Only supported for
10601
+ * {@link CustomActionTarget.VIZ},
10602
+ * {@link CustomActionTarget.ANSWER}, and
10603
+ * {@link CustomActionTarget.SPOTTER} targets.
10604
+ */
10605
+ CONTEXTMENU = "CONTEXTMENU"
10606
+ }
10607
+ /**
10608
+ * Enum options to mention the target of the code-based custom action.
10609
+ * The target determines which type of ThoughtSpot object the action is
10610
+ * associated with, and also controls which positions and scoping options
10611
+ * are available.
10612
+ */
10613
+ export declare enum CustomActionTarget {
10614
+ /**
10615
+ * Action applies at the Liveboard level.
10616
+ * Supported positions:
10617
+ * {@link CustomActionsPosition.PRIMARY},
10618
+ * {@link CustomActionsPosition.MENU}.
10619
+ * Can be scoped with
10620
+ * `metadataIds.liveboardIds`,
9949
10621
  * `orgIds`, and `groupIds`.
9950
10622
  */
9951
10623
  LIVEBOARD = "LIVEBOARD",
@@ -10757,6 +11429,166 @@ export interface VisualizationOverrides {
10757
11429
  /** Table visualization overrides */
10758
11430
  table?: TableOverrides;
10759
11431
  }
11432
+ /**
11433
+ * The configuration object for the full-height behavior shared by the
11434
+ * Liveboard and app embeds.
11435
+ *
11436
+ * When `fullHeight` is enabled the SDK resizes the embed container to match the
11437
+ * height reported by the ThoughtSpot app, and — when lazy loading is also
11438
+ * enabled — keeps the app informed of the portion of the embed that is
11439
+ * currently visible so that visualizations load on demand.
11440
+ */
11441
+ export interface FullHeightViewConfig {
11442
+ /**
11443
+ * If set to true, the embedded object container dynamically resizes
11444
+ * according to the height of the Liveboard.
11445
+ *
11446
+ * **Note**: Using fullHeight loads all visualizations on the
11447
+ * Liveboard simultaneously, which results in multiple warehouse
11448
+ * queries and potentially a longer wait for the topmost
11449
+ * visualizations to display on the screen.
11450
+ * Setting `fullHeight` to `false` fetches visualizations
11451
+ * incrementally as users scroll the page to view the charts and tables.
11452
+ *
11453
+ * From SDK 1.52.0, enabling `fullHeight` also turns on
11454
+ * {@link lazyLoadingForFullHeight} and
11455
+ * {@link enableScrollableContainerLazyLoading}, so visualizations load as
11456
+ * they scroll into view. Set either flag to `false` to opt out.
11457
+ *
11458
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11459
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
11460
+ * @example
11461
+ * ```js
11462
+ * // Replace <EmbedComponent> with the embed component name.
11463
+ * // For example, AppEmbed or LiveboardEmbed
11464
+ * const embed = new <EmbedComponent>('#embed', {
11465
+ * ... // other view config
11466
+ * fullHeight: true,
11467
+ * });
11468
+ * ```
11469
+ */
11470
+ fullHeight?: boolean;
11471
+ /**
11472
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11473
+ * Setting this height helps resolve issues with empty Liveboards and
11474
+ * other screens navigable from a Liveboard.
11475
+ *
11476
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11477
+ * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
11478
+ * @default 500
11479
+ * @example
11480
+ * ```js
11481
+ * // Replace <EmbedComponent> with the embed component name.
11482
+ * // For example, AppEmbed or LiveboardEmbed
11483
+ * const embed = new <EmbedComponent>('#embed', {
11484
+ * ... // other view config
11485
+ * fullHeight: true,
11486
+ * minimumHeight: 600,
11487
+ * });
11488
+ * ```
11489
+ */
11490
+ minimumHeight?: number;
11491
+ /**
11492
+ * This is the minimum height (in pixels) for a full-height Liveboard.
11493
+ * Setting this height helps resolve issues with empty Liveboards and
11494
+ * other screens navigable from a Liveboard.
11495
+ *
11496
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11497
+ * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
11498
+ * @deprecated Use `minimumHeight` instead.
11499
+ * @default 500
11500
+ * @example
11501
+ * ```js
11502
+ * // Replace <EmbedComponent> with the embed component name.
11503
+ * // For example, AppEmbed or LiveboardEmbed
11504
+ * const embed = new <EmbedComponent>('#embed', {
11505
+ * ... // other view config
11506
+ * fullHeight: true,
11507
+ * defaultHeight: 600,
11508
+ * });
11509
+ * ```
11510
+ */
11511
+ defaultHeight?: number;
11512
+ /**
11513
+ * Loads visualizations only as they scroll into the viewport, instead of
11514
+ * loading the whole full-height Liveboard at once.
11515
+ *
11516
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11517
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11518
+ * set explicitly. Set it to `false` to load every visualization upfront.
11519
+ * The flag has no effect unless `fullHeight` is enabled.
11520
+ *
11521
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11522
+ * @type {boolean}
11523
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11524
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11525
+ * @example
11526
+ * ```js
11527
+ * // Replace <EmbedComponent> with the embed component name.
11528
+ * // For example, AppEmbed or LiveboardEmbed
11529
+ * const embed = new <EmbedComponent>('#embed-container', {
11530
+ * // ...other options
11531
+ * fullHeight: true,
11532
+ * lazyLoadingForFullHeight: true,
11533
+ * })
11534
+ * ```
11535
+ */
11536
+ lazyLoadingForFullHeight?: boolean;
11537
+ /**
11538
+ * How far outside the viewport a visualization starts loading, when
11539
+ * {@link lazyLoadingForFullHeight} is enabled.
11540
+ *
11541
+ * For example, if the margin is set to '10px',
11542
+ * the visualization will be loaded 10px before its top edge is visible in the
11543
+ * viewport.
11544
+ *
11545
+ * The format is similar to CSS margin, so `'500px 0px'` extends the
11546
+ * prefetch 500px above and below the viewport and not sideways. Accepted
11547
+ * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
11548
+ * `auto`; an invalid value is logged and ignored.
11549
+ *
11550
+ * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
11551
+ * visualization ahead of the scroll position, so a chart has usually
11552
+ * finished loading by the time it scrolls into view. Use a smaller margin
11553
+ * to cut warehouse queries further, or `'0px'` to load a visualization
11554
+ * only once it is actually visible.
11555
+ *
11556
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11557
+ * @type {string}
11558
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
11559
+ * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
11560
+ * @example
11561
+ * ```js
11562
+ * // Replace <EmbedComponent> with the embed component name.
11563
+ * // For example, AppEmbed or LiveboardEmbed
11564
+ * const embed = new <EmbedComponent>('#embed-container', {
11565
+ * // ...other options
11566
+ * fullHeight: true,
11567
+ * lazyLoadingForFullHeight: true,
11568
+ * // With 0px, the visualization only starts loading once it is
11569
+ * // visible in the viewport.
11570
+ * lazyLoadingMargin: '0px',
11571
+ * })
11572
+ * ```
11573
+ */
11574
+ lazyLoadingMargin?: string;
11575
+ /**
11576
+ * Computes the visible region of the embed against its scrollable and
11577
+ * clipping ancestors, instead of treating the browser window as the only
11578
+ * viewport, and tracks scroll and resize on those ancestors.
11579
+ *
11580
+ * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
11581
+ * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
11582
+ * set explicitly. Set it to `false` when the page scrolls with the window
11583
+ * and the embed has no clipping ancestor, to skip the extra ancestor
11584
+ * tracking.
11585
+ *
11586
+ * Supported embed types: `LiveboardEmbed`, `AppEmbed`
11587
+ * @type {boolean}
11588
+ * @default true when `fullHeight` is enabled, from SDK 1.52.0
11589
+ */
11590
+ enableScrollableContainerLazyLoading?: boolean;
11591
+ }
10760
11592
  /**
10761
11593
  * Enum for auth failure types.
10762
11594
  * This value is passed to the listener for {@link AuthStatus.FAILURE}.
@@ -10868,284 +11700,421 @@ export declare enum AuthStatus {
10868
11700
  SAML_POPUP_CLOSED_NO_AUTH = "SAML_POPUP_CLOSED_NO_AUTH"
10869
11701
  }
10870
11702
  /**
10871
- * Event emitter returned from {@link init}.
10872
- * @group Authentication / Init
11703
+ * Event emitter returned from {@link init}.
11704
+ * @group Authentication / Init
11705
+ */
11706
+ export interface AuthEventEmitter {
11707
+ /**
11708
+ * Register a listener on Auth failure.
11709
+ * @param event
11710
+ * @param listener
11711
+ */
11712
+ on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
11713
+ /**
11714
+ * Register a listener on Auth SDK success.
11715
+ * @param event
11716
+ * @param listener
11717
+ */
11718
+ on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
11719
+ on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
11720
+ once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
11721
+ once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
11722
+ once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
11723
+ /**
11724
+ * Trigger an event on the emitter returned from init.
11725
+ * @param {@link AuthEvent}
11726
+ */
11727
+ emit(event: AuthEvent, ...args: any[]): boolean;
11728
+ /**
11729
+ * Remove listener from the emitter returned from init.
11730
+ * @param event
11731
+ * @param listener
11732
+ * @param context
11733
+ * @param once
11734
+ */
11735
+ off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this;
11736
+ /**
11737
+ * Remove all the event listeners
11738
+ * @param event
11739
+ */
11740
+ removeAllListeners(event: AuthStatus): this;
11741
+ }
11742
+ /**
11743
+ * Events which can be triggered on the emitter returned from {@link init}.
11744
+ * @group Authentication / Init
11745
+ */
11746
+ export declare enum AuthEvent {
11747
+ /**
11748
+ * Manually trigger the SSO popup. This is useful when
11749
+ * authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
11750
+ */
11751
+ TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
11752
+ }
11753
+ /**
11754
+ * Request for host events that MAY target a specific visualization.
11755
+ * Omitting vizId targets the current answer/liveboard as a whole.
11756
+ * (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
11757
+ */
11758
+ export interface VizScopedRequest {
11759
+ vizId?: string;
11760
+ }
11761
+ /**
11762
+ * Request for host events that MUST target a specific visualization.
11763
+ */
11764
+ export interface RequiredVizRequest {
11765
+ vizId: string;
11766
+ }
11767
+ /**
11768
+ * Request for Spotter conversation-scoped host events.
11769
+ */
11770
+ export interface ConversationScopedRequest {
11771
+ conversationId: string;
11772
+ }
11773
+ /**
11774
+ * Request payload for {@link HostEvent.OpenFilter}. Field requirements
11775
+ * vary by context (Search requires columnId/type/dataType/name); the
11776
+ * contract is the cross-context superset — the app validates per context
11777
+ * at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
11778
+ * {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
11779
+ */
11780
+ export interface OpenFilterRequest {
11781
+ column: {
11782
+ columnId?: string;
11783
+ columnName?: string;
11784
+ type?: string;
11785
+ dataType?: string;
11786
+ name?: string;
11787
+ isStrictDateColumn?: boolean;
11788
+ };
11789
+ applicability?: Applicability;
11790
+ visualizationId?: string;
11791
+ liveboardId?: string;
11792
+ }
11793
+ /**
11794
+ * `OpenFilter` in Liveboard context: full column plus scoping fields.
11795
+ * A per-context view of {@link OpenFilterRequest} (documentation only today;
11796
+ * `trigger()` accepts the superset).
11797
+ */
11798
+ export interface OpenFilterLiveboardRequest {
11799
+ column: {
11800
+ columnId?: string;
11801
+ columnName?: string;
11802
+ };
11803
+ applicability?: Applicability;
11804
+ visualizationId?: string;
11805
+ liveboardId?: string;
11806
+ }
11807
+ /**
11808
+ * `OpenFilter` in Spotter context: only the column identity is accepted.
11809
+ */
11810
+ export interface OpenFilterSpotterRequest {
11811
+ column: {
11812
+ columnId?: string;
11813
+ columnName?: string;
11814
+ };
11815
+ }
11816
+ /**
11817
+ * `OpenFilter` in Search/Answer context: column identity plus column metadata.
11818
+ */
11819
+ export interface OpenFilterSearchRequest {
11820
+ column: {
11821
+ columnId?: string;
11822
+ columnName?: string;
11823
+ type?: string;
11824
+ dataType?: string;
11825
+ name?: string;
11826
+ isStrictDateColumn?: boolean;
11827
+ };
11828
+ }
11829
+ /**
11830
+ * Request payload for {@link HostEvent.DrillDown}. Drills on selected or
11831
+ * clicked points of a visualization. In Liveboard context `vizId` is required
11832
+ * at runtime (documentation only today; `trigger()` is not yet type-enforced).
11833
+ */
11834
+ export interface DrillDownRequest {
11835
+ points: {
11836
+ clickedPoint?: object;
11837
+ selectedPoints?: object[];
11838
+ };
11839
+ columnGuid?: string;
11840
+ autoDrillDown?: boolean;
11841
+ vizId?: string;
11842
+ }
11843
+ /**
11844
+ * Request payload for {@link HostEvent.OpenParameter}. One of parameterId
11845
+ * or parameterName must be provided (validated at runtime).
11846
+ */
11847
+ export interface OpenParameterRequest {
11848
+ parameter: {
11849
+ parameterId?: string;
11850
+ parameterName?: string;
11851
+ };
11852
+ applicability?: Applicability;
11853
+ }
11854
+ /**
11855
+ * Request payload for {@link HostEvent.Search}.
11856
+ */
11857
+ export interface SearchRequest {
11858
+ searchQuery: string;
11859
+ dataSources: string[];
11860
+ execute?: boolean;
11861
+ }
11862
+ /**
11863
+ * Request payload for {@link HostEvent.SpotterSearch}.
10873
11864
  */
10874
- export interface AuthEventEmitter {
10875
- /**
10876
- * Register a listener on Auth failure.
10877
- * @param event
10878
- * @param listener
10879
- */
10880
- on(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
11865
+ export interface SpotterSearchRequest {
11866
+ query: string;
11867
+ executeSearch: boolean;
11868
+ }
11869
+ /**
11870
+ * A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
11871
+ */
11872
+ export interface CrossFilterCondition {
11873
+ columnName?: string;
11874
+ operator?: string;
11875
+ values: Array<string | number | boolean>;
11876
+ }
11877
+ /**
11878
+ * Request payload for {@link HostEvent.UpdateCrossFilter}.
11879
+ */
11880
+ export interface UpdateCrossFilterRequest {
11881
+ vizId: string;
11882
+ conditions: CrossFilterCondition[];
11883
+ }
11884
+ /**
11885
+ * A single filter entry for {@link HostEvent.UpdateFilters}. Supports both
11886
+ * the current (columnName/operator) and legacy (column/oper) field names.
11887
+ */
11888
+ export interface HostFilterUpdate {
11889
+ columnName?: string;
11890
+ columnId?: string;
11891
+ operator?: string;
11892
+ values: Array<string | number | boolean>;
11893
+ type?: string;
11894
+ datePeriod?: string;
11895
+ negate?: boolean;
11896
+ /** Legacy field name for columnName. */
11897
+ column?: string;
11898
+ /** Legacy field name for operator. */
11899
+ oper?: string;
11900
+ applicability?: Applicability;
11901
+ }
11902
+ /**
11903
+ * Request payload for {@link HostEvent.UpdateFilters} (singular or plural
11904
+ * form).
11905
+ */
11906
+ export interface UpdateFiltersRequest {
11907
+ filter?: HostFilterUpdate;
11908
+ filters?: HostFilterUpdate[];
10881
11909
  /**
10882
- * Register a listener on Auth SDK success.
10883
- * @param event
10884
- * @param listener
11910
+ * Scope the update to a specific visualization on a Liveboard.
11911
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
10885
11912
  */
10886
- on(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
10887
- on(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
10888
- once(event: AuthStatus.FAILURE, listener: (failureType: AuthFailureType) => void): this;
10889
- once(event: AuthStatus.SDK_SUCCESS | AuthStatus.LOGOUT | AuthStatus.WAITING_FOR_POPUP | AuthStatus.SAML_POPUP_CLOSED_NO_AUTH, listener: () => void): this;
10890
- once(event: AuthStatus.SUCCESS, listener: (sessionInfo: any) => void): this;
11913
+ visualizationId?: string;
10891
11914
  /**
10892
- * Trigger an event on the emitter returned from init.
10893
- * @param {@link AuthEvent}
11915
+ * Scope the update to a specific Liveboard.
11916
+ * @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
10894
11917
  */
10895
- emit(event: AuthEvent, ...args: any[]): boolean;
11918
+ liveboardId?: string;
11919
+ }
11920
+ /**
11921
+ * Request payload for personalised-view host events.
11922
+ */
11923
+ export interface PersonalisedViewRequest {
11924
+ viewId?: string;
11925
+ viewName?: string;
11926
+ }
11927
+ /**
11928
+ * Request payload for schedule-email related host events.
11929
+ */
11930
+ export interface ScheduleEmailRequest {
11931
+ sendToSelf?: boolean;
11932
+ }
11933
+ /**
11934
+ * Object form of the {@link HostEvent.Navigate} payload.
11935
+ */
11936
+ export interface NavigateRequest {
10896
11937
  /**
10897
- * Remove listener from the emitter returned from init.
10898
- * @param event
10899
- * @param listener
10900
- * @param context
10901
- * @param once
11938
+ * Route to navigate to, or a history delta such as `1` or `-1`.
10902
11939
  */
10903
- off(event: AuthStatus, listener: (...args: any[]) => void, context: any, once: boolean): this;
11940
+ path: string | number;
10904
11941
  /**
10905
- * Remove all the event listeners
10906
- * @param event
11942
+ * When `true`, replaces the current history entry instead of pushing.
10907
11943
  */
10908
- removeAllListeners(event: AuthStatus): this;
11944
+ replace?: boolean;
10909
11945
  }
10910
11946
  /**
10911
- * Events which can be triggered on the emitter returned from {@link init}.
10912
- * @group Authentication / Init
11947
+ * Request payload for {@link HostEvent.SetActiveTab}.
10913
11948
  */
10914
- export declare enum AuthEvent {
11949
+ export interface SetActiveTabRequest {
10915
11950
  /**
10916
- * Manually trigger the SSO popup. This is useful when
10917
- * authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
11951
+ * Id of the liveboard tab to make active.
10918
11952
  */
10919
- TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
10920
- }
10921
- export interface LiveboardTab {
10922
- id: string;
10923
- name: string;
10924
- [key: string]: any;
10925
- }
10926
- export interface LiveboardGroup {
10927
- id: string;
10928
- name: string;
10929
- [key: string]: any;
10930
- }
10931
- /**
10932
- * Levels at which a filter or parameter can be applied.
10933
- */
10934
- export declare enum ApplicabilityLevel {
10935
- Liveboard = "LIVEBOARD",
10936
- Tab = "TAB",
10937
- Group = "GROUP"
11953
+ tabId: string;
10938
11954
  }
10939
11955
  /**
10940
- * Scopes a filter or parameter to a specific target.
10941
- * At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
10942
- * is not required.
11956
+ * Typed request payloads for host events that do not go through the UI
11957
+ * passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
11958
+ *
11959
+ * Shapes are transcribed from the host's runtime validation schemas
11960
+ * (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
11961
+ * flattened across contexts to the permissive superset (context-specific
11962
+ * requirements are validated at runtime).
11963
+ *
11964
+ * Responses are typed only for UI-passthrough-backed events today (see
11965
+ * {@link HostEventResponse}). Add a response map alongside this one when the
11966
+ * first explicit response shape is specified; tightening later is additive.
11967
+ *
11968
+ * Deliberately absent (do not add without an audit):
11969
+ * - DrillDown: the runtime schema (object-shaped points) and the UI
11970
+ * passthrough contract (string-shaped points) disagree — resolve the
11971
+ * drift first.
11972
+ * - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
11973
+ * mapping; their Spotter-context vizId requirement is runtime-only.
10943
11974
  */
10944
- export interface Applicability {
10945
- level: ApplicabilityLevel;
10946
- targetId?: string;
10947
- }
10948
- export interface FilterUpdate {
10949
- column: string;
10950
- oper: string;
10951
- values: string[];
10952
- type?: string;
10953
- applicability?: Applicability;
10954
- }
10955
- export interface LiveboardFilter {
10956
- applicability?: Applicability;
10957
- [key: string]: any;
10958
- }
10959
- export interface LiveboardParameter {
10960
- applicability?: Applicability;
10961
- [key: string]: any;
10962
- }
10963
- export declare enum UIPassthroughEvent {
10964
- PinAnswerToLiveboard = "addVizToPinboard",
10965
- SaveAnswer = "saveAnswer",
10966
- GetDiscoverabilityStatus = "getDiscoverabilityStatus",
10967
- GetAvailableUIPassthroughs = "getAvailableUiPassthroughs",
10968
- GetAnswerConfig = "getAnswerPageConfig",
10969
- GetLiveboardConfig = "getPinboardPageConfig",
10970
- GetUnsavedAnswerTML = "getUnsavedAnswerTML",
10971
- UpdateFilters = "updateFilters",
10972
- Drilldown = "drillDown",
10973
- GetAnswerSession = "getAnswerSession",
10974
- GetFilters = "getFilters",
10975
- GetIframeUrl = "getIframeUrl",
10976
- GetParameters = "getParameters",
10977
- GetTML = "getTML",
10978
- GetTabs = "getTabs",
10979
- GetGroups = "getGroups",
10980
- GetExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard"
10981
- }
10982
- export type UIPassthroughContractBase = {
10983
- [UIPassthroughEvent.PinAnswerToLiveboard]: {
10984
- request: {
10985
- vizId?: string;
10986
- newVizName: string;
10987
- newVizDescription?: string;
10988
- liveboardId?: string;
10989
- tabId?: string;
10990
- newLiveboardName?: string;
10991
- newTabName?: string;
10992
- };
10993
- response: {
10994
- liveboardId: string;
10995
- tabId: string;
10996
- vizId: string;
10997
- };
10998
- };
10999
- [UIPassthroughEvent.SaveAnswer]: {
11000
- request: {
11001
- name: string;
11002
- description: string;
11003
- vizId?: string;
11004
- isDiscoverable?: boolean;
11005
- };
11006
- response: {
11007
- answerId: string;
11008
- saveResponse?: any;
11009
- shareResponse?: any;
11010
- };
11011
- };
11012
- [UIPassthroughEvent.GetDiscoverabilityStatus]: {
11013
- request: any;
11014
- response: {
11015
- shouldShowDiscoverability: boolean;
11016
- isDiscoverabilityCheckboxUnselectedPerOrg: boolean;
11017
- };
11018
- };
11019
- [UIPassthroughEvent.GetAvailableUIPassthroughs]: {
11020
- request: any;
11021
- response: {
11022
- keys: string[];
11023
- };
11024
- };
11025
- [UIPassthroughEvent.GetAnswerConfig]: {
11026
- request: {
11027
- vizId?: string;
11028
- };
11029
- response: any;
11030
- };
11031
- [UIPassthroughEvent.GetLiveboardConfig]: {
11032
- request: any;
11033
- response: any;
11034
- };
11035
- [UIPassthroughEvent.GetUnsavedAnswerTML]: {
11036
- request: {
11037
- sessionId?: string;
11038
- vizId?: string;
11039
- };
11040
- response: {
11041
- tml: string;
11042
- };
11043
- };
11044
- [UIPassthroughEvent.GetAnswerSession]: {
11045
- request: {
11046
- vizId?: string;
11047
- };
11048
- response: {
11049
- session: SessionInterface;
11050
- embedAnswerData?: Record<string, any>;
11051
- };
11052
- };
11053
- [UIPassthroughEvent.GetFilters]: {
11054
- request: {
11055
- vizId?: string;
11056
- };
11057
- response: {
11058
- liveboardFilters: LiveboardFilter[];
11059
- runtimeFilters: RuntimeFilter[];
11060
- };
11061
- };
11062
- [UIPassthroughEvent.GetIframeUrl]: {
11063
- request: Record<string, never>;
11064
- response: {
11065
- iframeUrl: string;
11066
- };
11067
- };
11068
- [UIPassthroughEvent.GetParameters]: {
11069
- request: Record<string, never>;
11070
- response: {
11071
- parameters: LiveboardParameter[];
11072
- };
11073
- };
11074
- [UIPassthroughEvent.GetTML]: {
11075
- request: {
11076
- vizId?: string;
11077
- includeNonExecutedSearchTokens?: boolean;
11078
- };
11079
- response: Record<string, any>;
11080
- };
11081
- [UIPassthroughEvent.GetTabs]: {
11082
- request: Record<string, never>;
11083
- response: {
11084
- orderedTabIds: string[];
11085
- numberOfTabs: number;
11086
- Tabs: LiveboardTab[];
11087
- };
11975
+ export interface HostEventRequestMap {
11976
+ [HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
11977
+ [HostEvent.UpdateParameters]: RuntimeParameter[];
11978
+ [HostEvent.UpdateFilters]: UpdateFiltersRequest;
11979
+ [HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
11980
+ [HostEvent.OpenFilter]: OpenFilterRequest;
11981
+ [HostEvent.OpenParameter]: OpenParameterRequest;
11982
+ [HostEvent.SetVisibleVizs]: string[];
11983
+ [HostEvent.SetVisibleTabs]: string[];
11984
+ [HostEvent.SetHiddenTabs]: string[];
11985
+ [HostEvent.SetActiveTab]: SetActiveTabRequest;
11986
+ [HostEvent.Navigate]: string | number | NavigateRequest;
11987
+ [HostEvent.Search]: SearchRequest;
11988
+ [HostEvent.ResetSearch]: void;
11989
+ [HostEvent.AddColumns]: {
11990
+ columnIds: string[];
11088
11991
  };
11089
- [UIPassthroughEvent.GetGroups]: {
11090
- request: Record<string, never>;
11091
- response: {
11092
- orderedGroupIds: string[];
11093
- numberOfGroups: number;
11094
- Groups: LiveboardGroup[];
11095
- };
11992
+ [HostEvent.RemoveColumn]: {
11993
+ columnId: string;
11096
11994
  };
11097
- [UIPassthroughEvent.GetExportRequestForCurrentPinboard]: {
11098
- request: Record<string, never>;
11099
- response: {
11100
- data: {
11101
- v2Content: string;
11102
- };
11103
- type: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11104
- };
11995
+ [HostEvent.Edit]: VizScopedRequest;
11996
+ [HostEvent.Save]: VizScopedRequest;
11997
+ [HostEvent.Delete]: VizScopedRequest;
11998
+ [HostEvent.Share]: VizScopedRequest;
11999
+ [HostEvent.Present]: VizScopedRequest;
12000
+ [HostEvent.CopyLink]: VizScopedRequest;
12001
+ [HostEvent.ExportTML]: VizScopedRequest;
12002
+ [HostEvent.EditTML]: VizScopedRequest;
12003
+ [HostEvent.UpdateTML]: VizScopedRequest;
12004
+ [HostEvent.SchedulesList]: VizScopedRequest;
12005
+ [HostEvent.Schedule]: VizScopedRequest;
12006
+ [HostEvent.SpotIQAnalyze]: VizScopedRequest;
12007
+ [HostEvent.ShowUnderlyingData]: VizScopedRequest;
12008
+ [HostEvent.CreateMonitor]: VizScopedRequest;
12009
+ [HostEvent.ManageMonitor]: VizScopedRequest;
12010
+ [HostEvent.SyncToSheets]: VizScopedRequest;
12011
+ [HostEvent.SyncToOtherApps]: VizScopedRequest;
12012
+ [HostEvent.ManagePipelines]: VizScopedRequest;
12013
+ [HostEvent.DownloadAsPng]: VizScopedRequest;
12014
+ [HostEvent.DownloadAsCsv]: VizScopedRequest;
12015
+ [HostEvent.DownloadAsXlsx]: VizScopedRequest;
12016
+ [HostEvent.DownloadAsPdf]: VizScopedRequest & {
12017
+ liveboardId?: string;
11105
12018
  };
11106
- [UIPassthroughEvent.UpdateFilters]: {
11107
- request: {
11108
- filter?: FilterUpdate;
11109
- filters?: FilterUpdate[];
11110
- };
11111
- response: unknown;
12019
+ [HostEvent.Explore]: RequiredVizRequest;
12020
+ [HostEvent.AskSage]: RequiredVizRequest;
12021
+ [HostEvent.AskSpotter]: RequiredVizRequest;
12022
+ [HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
12023
+ [HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
12024
+ [HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
12025
+ [HostEvent.ResetLiveboardPersonalisedView]: void;
12026
+ [HostEvent.AIHighlights]: void;
12027
+ [HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
12028
+ [HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
12029
+ [HostEvent.SpotterSearch]: SpotterSearchRequest;
12030
+ [HostEvent.ResetSpotterConversation]: void;
12031
+ [HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
12032
+ [HostEvent.CloseSpotterShareConversation]: void;
12033
+ [HostEvent.ExitSpotterSharedConversation]: void;
12034
+ [HostEvent.PinSpotterConversation]: ConversationScopedRequest;
12035
+ [HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
12036
+ [HostEvent.EditLastPrompt]: string;
12037
+ [HostEvent.DeleteLastPrompt]: void;
12038
+ [HostEvent.PreviewSpotterData]: void;
12039
+ [HostEvent.SpotterVizSendUserMessage]: {
12040
+ query: string;
11112
12041
  };
11113
- [UIPassthroughEvent.Drilldown]: {
11114
- request: {
11115
- points: {
11116
- selectedPoints?: string[];
11117
- clickedPoint?: string;
11118
- };
11119
- columnGuid?: string;
11120
- autoDrillDown?: boolean;
11121
- vizId?: string;
11122
- };
11123
- response: unknown;
12042
+ [HostEvent.InitSpotterVizConversation]: void;
12043
+ [HostEvent.OpenSpotterVizPanel]: void;
12044
+ [HostEvent.CloseSpotterVizPanel]: void;
12045
+ }
12046
+ /**
12047
+ * Per-context request shapes for events whose payload varies by
12048
+ /**
12049
+ * Resolves the typed request payload for a host event.
12050
+ * Resolution order:
12051
+ * 1. Explicitly typed request in {@link HostEventRequestMap}
12052
+ * 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
12053
+ * 3. `any` (event not audited/typed yet — backward compatible)
12054
+ *
12055
+ * Requests are the cross-context superset today. The per-context `*Request`
12056
+ * interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
12057
+ * narrows by context; a later release may thread the caller's context to
12058
+ * enforce it.
12059
+ */
12060
+ export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
12061
+ /**
12062
+ * Resolves the typed response payload for a host event. Only UI passthrough
12063
+ * backed events have typed responses today; everything else resolves to `any`.
12064
+ */
12065
+ export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
12066
+ /**
12067
+ * Payload type accepted by `embed.trigger()`. Keeps the historical
12068
+ * `PayloadT` escape hatch so untyped existing call sites keep compiling.
12069
+ */
12070
+ export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
12071
+ /**
12072
+ * Deep `Partial` of a request type: every field optional at every depth, with no
12073
+ * index signature — so object literals carrying unknown fields are flagged.
12074
+ */
12075
+ export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
12076
+ [K in keyof T]?: DeepPartial<T[K]>;
12077
+ } : T;
12078
+ /**
12079
+ * `trigger()`'s `data` type: an all-optional view of the event's request type.
12080
+ * See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
12081
+ * No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
12082
+ */
12083
+ export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
12084
+ /**
12085
+ * Response type returned by `embed.trigger()`.
12086
+ */
12087
+ export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
12088
+ /**
12089
+ * Typed `data` field per embed event. Seed with audited events only.
12090
+ */
12091
+ export interface EmbedEventDataExtension {
12092
+ [EmbedEvent.AuthInit]: {
12093
+ /**
12094
+ * Whether authentication was successful.
12095
+ */
12096
+ isLoggedIn?: boolean;
12097
+ [key: string]: any;
11124
12098
  };
12099
+ [EmbedEvent.EmbedListenerReady]: Record<string, any>;
12100
+ /**
12101
+ * Fired when a callback-type custom action is triggered. Use
12102
+ * `payload.data.id` to identify which action fired.
12103
+ */
12104
+ [EmbedEvent.CustomAction]: CustomActionPayload;
12105
+ }
12106
+ /**
12107
+ * Resolves the typed `data` payload for an embed event; `any` when the
12108
+ * event has not been audited/typed yet.
12109
+ */
12110
+ export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
12111
+ /**
12112
+ * Full envelope delivered to `embed.on()` callbacks for a given event:
12113
+ * the wire fields (`type`, `status`) plus the typed `data`.
12114
+ */
12115
+ export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
12116
+ data: EmbedEventData<EmbedEventT>;
11125
12117
  };
11126
- export type UIPassthroughRequest<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["request"];
11127
- export type UIPassthroughResponse<T extends keyof UIPassthroughContractBase> = UIPassthroughContractBase[T]["response"];
11128
- export type UIPassthroughArrayResponse<ApiName extends keyof UIPassthroughContractBase> = Array<{
11129
- refId?: string;
11130
- value?: UIPassthroughResponse<ApiName>;
11131
- error?: any;
11132
- }>;
11133
- export type EmbedApiHostEventMapping = {
11134
- [HostEvent.Pin]: UIPassthroughEvent.PinAnswerToLiveboard;
11135
- [HostEvent.SaveAnswer]: UIPassthroughEvent.SaveAnswer;
11136
- [HostEvent.GetAnswerSession]: UIPassthroughEvent.GetAnswerSession;
11137
- [HostEvent.GetFilters]: UIPassthroughEvent.GetFilters;
11138
- [HostEvent.GetIframeUrl]: UIPassthroughEvent.GetIframeUrl;
11139
- [HostEvent.GetParameters]: UIPassthroughEvent.GetParameters;
11140
- [HostEvent.GetTML]: UIPassthroughEvent.GetTML;
11141
- [HostEvent.GetTabs]: UIPassthroughEvent.GetTabs;
11142
- [HostEvent.GetGroups]: UIPassthroughEvent.GetGroups;
11143
- [HostEvent.getExportRequestForCurrentPinboard]: UIPassthroughEvent.GetExportRequestForCurrentPinboard;
11144
- };
11145
- export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
11146
- export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
11147
- export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
11148
- export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
11149
12118
  declare class HostEventClient {
11150
12119
  iFrame: HTMLIFrameElement;
11151
12120
  /** Cached list of available UI passthrough keys from the embedded app */
@@ -11195,7 +12164,7 @@ declare class HostEventClient {
11195
12164
  * @param payload - Optional payload for the event
11196
12165
  * @param context - Optional context (e.g. vizId) for scoped operations
11197
12166
  */
11198
- triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextType>>;
12167
+ triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11199
12168
  }
11200
12169
  declare class TsEmbed {
11201
12170
  /**
@@ -11213,6 +12182,7 @@ declare class TsEmbed {
11213
12182
  * The key to store the embed instance in the DOM node
11214
12183
  */
11215
12184
  protected embedNodeKey: string;
12185
+ protected embedContainerLoadedKey: string;
11216
12186
  protected isAppInitialized: boolean;
11217
12187
  /**
11218
12188
  * A reference to the iframe within which the ThoughtSpot app
@@ -11382,10 +12352,10 @@ declare class TsEmbed {
11382
12352
  */
11383
12353
  protected getEmbedBasePath(query: string): string;
11384
12354
  protected getUpdateEmbedParamsObject(): Promise<{
11385
- customisations: CustomisationsInterface;
11386
- authToken: string;
11387
12355
  runtimeFilterParams: string;
11388
12356
  runtimeParameterParams: string;
12357
+ customisations: CustomisationsInterface;
12358
+ authToken: string;
11389
12359
  hiddenHomepageModules: HomepageModule[];
11390
12360
  reorderedHomepageModules: string[];
11391
12361
  hostConfig: Record<string, any>;
@@ -11578,21 +12548,6 @@ declare class TsEmbed {
11578
12548
  * or else the v2 event type itself
11579
12549
  */
11580
12550
  protected getCompatibleEventType(eventType: EmbedEvent): EmbedEvent;
11581
- /**
11582
- * Calculates the iframe center for the current visible viewPort
11583
- * of iframe using Scroll position of Host App, offsetTop for iframe
11584
- * in Host app. ViewPort height of the tab.
11585
- * @returns iframe Center in visible viewport,
11586
- * Iframe height,
11587
- * View port height.
11588
- */
11589
- protected getIframeCenter(): {
11590
- iframeCenter: number;
11591
- iframeScrolled: number;
11592
- iframeHeight: number;
11593
- viewPortHeight: number;
11594
- iframeVisibleViewPort: number;
11595
- };
11596
12551
  /**
11597
12552
  * Registers an event listener to trigger an alert when the ThoughtSpot app
11598
12553
  * sends an event of a particular message type to the host application.
@@ -11616,7 +12571,7 @@ declare class TsEmbed {
11616
12571
  * });
11617
12572
  * ```
11618
12573
  */
11619
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
12574
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
11620
12575
  /**
11621
12576
  * Removes an event listener for a particular event type.
11622
12577
  * @param messageType The message type
@@ -11652,6 +12607,8 @@ declare class TsEmbed {
11652
12607
  */
11653
12608
  private embedContainerReadyCallbacks;
11654
12609
  protected getPreRenderObj<T extends TsEmbed>(): T;
12610
+ protected takeOverPreRender(): void;
12611
+ private markEmbedContainerLoaded;
11655
12612
  private checkEmbedContainerLoaded;
11656
12613
  private executeEmbedContainerReadyCallbacks;
11657
12614
  /**
@@ -11662,8 +12619,12 @@ declare class TsEmbed {
11662
12619
  protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
11663
12620
  /**
11664
12621
  * Triggers an event to the embedded app
12622
+ *
12623
+ * Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
12624
+ * on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
12625
+ * payload is checked strictly against the event contract — update call sites now.
11665
12626
  * @param {HostEvent} messageType The event type
11666
- * @param {any} data The payload to send with the message
12627
+ * @param {TriggerData} data The payload, typed against the event's contract
11667
12628
  * @param {ContextType} context Optional context type to specify the context from which the event is triggered.
11668
12629
  * Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
11669
12630
  * ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
@@ -11680,7 +12641,7 @@ declare class TsEmbed {
11680
12641
  * ```
11681
12642
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
11682
12643
  */
11683
- trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
12644
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
11684
12645
  /**
11685
12646
  * Triggers an event to the embedded app, skipping the UI flow.
11686
12647
  * @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
@@ -11782,6 +12743,7 @@ declare class TsEmbed {
11782
12743
  * @returns
11783
12744
  */
11784
12745
  prerenderGeneric(): Promise<any>;
12746
+ protected preRenderParamsApplied: Promise<void>;
11785
12747
  protected beforePrerenderVisible(): void;
11786
12748
  /**
11787
12749
  * Displays the pre-rendered component inside the host element.
@@ -11860,7 +12822,7 @@ declare class V1Embed extends TsEmbed {
11860
12822
  * });
11861
12823
  * ```
11862
12824
  */
11863
- on(messageType: EmbedEvent, callback: MessageCallback, options?: MessageOptions): typeof TsEmbed.prototype;
12825
+ on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
11864
12826
  /**
11865
12827
  * Only for testing purposes.
11866
12828
  * @hidden
@@ -12021,7 +12983,21 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
12021
12983
  * })
12022
12984
  * ```
12023
12985
  */
12024
- dataSource?: string;
12986
+ dataSource?: string;
12987
+ /**
12988
+ * If set to `true`, the answer edit panel is hidden.
12989
+ *
12990
+ * Supported embed types: `SearchEmbed`
12991
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
12992
+ * @example
12993
+ * ```js
12994
+ * const embed = new SearchEmbed('#tsEmbed', {
12995
+ * ... // other embed view config
12996
+ * hideAnswerEditPanel: true,
12997
+ * })
12998
+ * ```
12999
+ */
13000
+ hideAnswerEditPanel?: boolean;
12025
13001
  /**
12026
13002
  * The initial search query to load the answer with.
12027
13003
  * Use {@link searchOptions} instead.
@@ -13398,7 +14374,7 @@ export interface DiscoveryExperience {
13398
14374
  * The view configuration for full app embedding.
13399
14375
  * @group Embed components
13400
14376
  */
13401
- export interface AppViewConfig extends AllEmbedViewConfig {
14377
+ export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
13402
14378
  /**
13403
14379
  * If true, the top navigation bar within the ThoughtSpot app
13404
14380
  * is displayed. By default, the navigation bar is hidden.
@@ -13683,34 +14659,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13683
14659
  * ```
13684
14660
  */
13685
14661
  enableSearchAssist?: boolean;
13686
- /**
13687
- * If set to true, the Liveboard container dynamically resizes
13688
- * according to the height of the Liveboard.
13689
- *
13690
- * **Note**: Using fullHeight loads all visualizations
13691
- * on the Liveboard simultaneously, which results in
13692
- * multiple warehouse queries and potentially a
13693
- * longer wait for the topmost visualizations to
13694
- * display on the screen. Setting fullHeight to
13695
- * `false` fetches visualizations incrementally as
13696
- * users scroll the page to view the charts and tables.
13697
- *
13698
- * From SDK 1.52.0, enabling `fullHeight` also turns on
13699
- * {@link lazyLoadingForFullHeight} and
13700
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
13701
- * they scroll into view. Set either flag to `false` to opt out.
13702
- *
13703
- * Supported embed types: `AppEmbed`
13704
- * @version SDK: 1.21.0 | ThoughtSpot: 9.4.0.cl, 9.4.0-sw
13705
- * @example
13706
- * ```js
13707
- * const embed = new AppEmbed('#tsEmbed', {
13708
- * ... // other embed view config
13709
- * fullHeight: true,
13710
- * })
13711
- * ```
13712
- */
13713
- fullHeight?: boolean;
13714
14662
  /**
13715
14663
  * Enables the V2 navigation and modular home page experience.
13716
14664
  * For more information,
@@ -13905,78 +14853,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
13905
14853
  * ```
13906
14854
  */
13907
14855
  isGranularXLSXCSVSchedulesEnabled?: boolean;
13908
- /**
13909
- * Loads visualizations only as they scroll into the viewport, instead of
13910
- * loading the whole full-height Liveboard at once.
13911
- *
13912
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
13913
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
13914
- * set explicitly. Set it to `false` to load every visualization upfront.
13915
- * The flag has no effect unless `fullHeight` is enabled.
13916
- *
13917
- * @type {boolean}
13918
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
13919
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
13920
- * @example
13921
- * ```js
13922
- * const embed = new AppEmbed('#embed-container', {
13923
- * // ...other options
13924
- * fullHeight: true,
13925
- * lazyLoadingForFullHeight: true,
13926
- * })
13927
- * ```
13928
- */
13929
- lazyLoadingForFullHeight?: boolean;
13930
- /**
13931
- * Computes the visible region of the embed against its scrollable and
13932
- * clipping ancestors, instead of treating the browser window as the only
13933
- * viewport, and tracks scroll and resize on those ancestors.
13934
- *
13935
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
13936
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
13937
- * set explicitly. Set it to `false` when the page scrolls with the window
13938
- * and the embed has no clipping ancestor, to skip the extra ancestor
13939
- * tracking.
13940
- *
13941
- * @type {boolean}
13942
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
13943
- * @hidden
13944
- */
13945
- enableScrollableContainerLazyLoading?: boolean;
13946
- /**
13947
- * How far outside the viewport a visualization starts loading, when
13948
- * {@link lazyLoadingForFullHeight} is enabled.
13949
- *
13950
- * For example, if the margin is set to '10px',
13951
- * the visualization will be loaded 10px before its top edge is visible in the
13952
- * viewport.
13953
- *
13954
- * The format is similar to CSS margin, so `'500px 0px'` extends the
13955
- * prefetch 500px above and below the viewport and not sideways. Accepted
13956
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
13957
- * `auto`; an invalid value is logged and ignored.
13958
- *
13959
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
13960
- * visualization ahead of the scroll position, so a chart has usually
13961
- * finished loading by the time it scrolls into view. Use a smaller margin
13962
- * to cut warehouse queries further, or `'0px'` to load a visualization
13963
- * only once it is actually visible.
13964
- *
13965
- * @type {string}
13966
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
13967
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
13968
- * @example
13969
- * ```js
13970
- * const embed = new AppEmbed('#embed-container', {
13971
- * // ...other options
13972
- * fullHeight: true,
13973
- * lazyLoadingForFullHeight: true,
13974
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
13975
- * lazyLoadingMargin: '0px',
13976
- * })
13977
- * ```
13978
- */
13979
- lazyLoadingMargin?: string;
13980
14856
  /**
13981
14857
  * updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
13982
14858
  *
@@ -14164,23 +15040,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
14164
15040
  * @default false
14165
15041
  */
14166
15042
  enableStopAnswerGenerationEmbed?: boolean;
14167
- /**
14168
- * This is the minimum height (in pixels) for a full-height App.
14169
- * Setting this height helps resolve issues with empty Apps and
14170
- * other screens navigable from an App.
14171
- *
14172
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
14173
- * @default 500
14174
- * @example
14175
- * ```js
14176
- * const embed = new AppEmbed('#embed', {
14177
- * ... // other app view config
14178
- * fullHeight: true,
14179
- * minimumHeight: 600,
14180
- * });
14181
- * ```
14182
- */
14183
- minimumHeight?: number;
14184
15043
  /**
14185
15044
  * To enable the homepage announcement banner.
14186
15045
  * Controls the visibility of the announcement section
@@ -14230,6 +15089,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
14230
15089
  * ```
14231
15090
  */
14232
15091
  updatedSpotterExperience?: boolean;
15092
+ /**
15093
+ * If set to `true`, the answer edit panel is hidden.
15094
+ *
15095
+ * Supported embed types: `AppEmbed`
15096
+ * @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
15097
+ * @example
15098
+ * ```js
15099
+ * const embed = new AppEmbed('#tsEmbed', {
15100
+ * ... // other embed view config
15101
+ * hideAnswerEditPanel: true,
15102
+ * })
15103
+ * ```
15104
+ */
15105
+ hideAnswerEditPanel?: boolean;
14233
15106
  }
14234
15107
  /**
14235
15108
  * APP_INIT data shape for AppEmbed.
@@ -14245,9 +15118,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
14245
15118
  }
14246
15119
  declare class AppEmbed extends V1Embed {
14247
15120
  protected viewConfig: AppViewConfig;
14248
- private defaultHeight;
14249
- private lazyLoadScrollContainers;
14250
- private lazyLoadResizeObserver;
15121
+ private readonly fullHeightController?;
14251
15122
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
14252
15123
  /**
14253
15124
  * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
@@ -14268,27 +15139,11 @@ declare class AppEmbed extends V1Embed {
14268
15139
  */
14269
15140
  protected getEmbedParams(): string;
14270
15141
  protected getEmbedParamsObject(): any;
14271
- private sendFullHeightLazyLoadData;
14272
- /**
14273
- * This is a handler for the RequestVisibleEmbedCoordinates event.
14274
- * It is used to send the visible coordinates data to the host application.
14275
- * @param data The event payload
14276
- * @param responder The responder function
14277
- */
14278
- private requestVisibleEmbedCoordinatesHandler;
14279
15142
  /**
14280
15143
  * Constructs the URL of the ThoughtSpot app page to be rendered.
14281
15144
  * @param pageId The ID of the page to be embedded.
14282
15145
  */
14283
15146
  getIFrameSrc(): string;
14284
- /**
14285
- * Set the iframe height as per the computed height received
14286
- * from the ThoughtSpot app.
14287
- * @param data The event payload
14288
- */
14289
- protected updateIFrameHeight: (data: MessagePayload) => void;
14290
- private embedIframeCenter;
14291
- private setIframeHeightForNonEmbedLiveboard;
14292
15147
  /**
14293
15148
  * Gets the ThoughtSpot route of the page for a particular page ID.
14294
15149
  * @param pageId The identifier for a page in the ThoughtSpot app.
@@ -14319,8 +15174,6 @@ declare class AppEmbed extends V1Embed {
14319
15174
  */
14320
15175
  destroy(): void;
14321
15176
  private postRender;
14322
- private registerLazyLoadEvents;
14323
- private unregisterLazyLoadEvents;
14324
15177
  /**
14325
15178
  * Renders the embedded application pages in the ThoughtSpot app.
14326
15179
  * @param renderOptions An object containing the page ID
@@ -14342,71 +15195,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
14342
15195
  * The configuration for the embedded Liveboard or visualization page view.
14343
15196
  * @group Embed components
14344
15197
  */
14345
- export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14346
- /**
14347
- * If set to true, the embedded object container dynamically resizes
14348
- * according to the height of the Liveboard.
14349
- *
14350
- * **Note**: Using fullHeight loads all visualizations on the
14351
- * Liveboard simultaneously, which results in multiple warehouse
14352
- * queries and potentially a longer wait for the topmost
14353
- * visualizations to display on the screen.
14354
- * Setting `fullHeight` to `false` fetches visualizations
14355
- * incrementally as users scroll the page to view the charts and tables.
14356
- *
14357
- * From SDK 1.52.0, enabling `fullHeight` also turns on
14358
- * {@link lazyLoadingForFullHeight} and
14359
- * {@link enableScrollableContainerLazyLoading}, so visualizations load as
14360
- * they scroll into view. Set either flag to `false` to opt out.
14361
- *
14362
- *
14363
- * Supported embed types: `LiveboardEmbed`
14364
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
14365
- * @example
14366
- * ```js
14367
- * const embed = new LiveboardEmbed('#embed', {
14368
- * ... // other liveboard view config
14369
- * fullHeight: true,
14370
- * });
14371
- * ```
14372
- */
14373
- fullHeight?: boolean;
14374
- /**
14375
- * This is the minimum height (in pixels) for a full-height Liveboard.
14376
- * Setting this height helps resolve issues with empty Liveboards and
14377
- * other screens navigable from a Liveboard.
14378
- *
14379
- * Supported embed types: `LiveboardEmbed`
14380
- * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
14381
- * @deprecated Use `minimumHeight` instead.
14382
- * @default 500
14383
- * @example
14384
- * ```js
14385
- * const embed = new LiveboardEmbed('#embed', {
14386
- * ... // other liveboard view config
14387
- * fullHeight: true,
14388
- * defaultHeight: 600,
14389
- * });
14390
- * ```
14391
- */
14392
- defaultHeight?: number;
14393
- /**
14394
- * This is the minimum height (in pixels) for a full-height Liveboard.
14395
- * Setting this height helps resolve issues with empty Liveboards and
14396
- * other screens navigable from a Liveboard.
14397
- *
14398
- * @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
14399
- * @default 500
14400
- * @example
14401
- * ```js
14402
- * const embed = new LiveboardEmbed('#embed', {
14403
- * ... // other liveboard view config
14404
- * fullHeight: true,
14405
- * minimumHeight: 600,
14406
- * });
14407
- * ```
14408
- */
14409
- minimumHeight?: number;
15198
+ export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
14410
15199
  /**
14411
15200
  * If set to true, the context menu in visualizations will be enabled.
14412
15201
  * @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
@@ -14750,77 +15539,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14750
15539
  * ```
14751
15540
  */
14752
15541
  isGranularXLSXCSVSchedulesEnabled?: boolean;
14753
- /**
14754
- * Loads visualizations only as they scroll into the viewport, instead of
14755
- * loading the whole full-height Liveboard at once.
14756
- *
14757
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
14758
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
14759
- * set explicitly. Set it to `false` to load every visualization upfront.
14760
- * The flag has no effect unless `fullHeight` is enabled.
14761
- *
14762
- * @type {boolean}
14763
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
14764
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
14765
- * @example
14766
- * ```js
14767
- * const embed = new LiveboardEmbed('#embed-container', {
14768
- * // ...other options
14769
- * fullHeight: true,
14770
- * lazyLoadingForFullHeight: true,
14771
- * })
14772
- * ```
14773
- */
14774
- lazyLoadingForFullHeight?: boolean;
14775
- /**
14776
- * Computes the visible region of the embed against its scrollable and
14777
- * clipping ancestors, instead of treating the browser window as the only
14778
- * viewport, and tracks scroll and resize on those ancestors.
14779
- *
14780
- * From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
14781
- * `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
14782
- * set explicitly. Set it to `false` when the page scrolls with the window
14783
- * and the embed has no clipping ancestor, to skip the extra ancestor
14784
- * tracking.
14785
- *
14786
- * @type {boolean}
14787
- * @default true when `fullHeight` is enabled, from SDK 1.52.0
14788
- */
14789
- enableScrollableContainerLazyLoading?: boolean;
14790
- /**
14791
- * How far outside the viewport a visualization starts loading, when
14792
- * {@link lazyLoadingForFullHeight} is enabled.
14793
- *
14794
- * For example, if the margin is set to '10px',
14795
- * the visualization will be loaded 10px before its top edge is visible in the
14796
- * viewport.
14797
- *
14798
- * The format is similar to CSS margin, so `'500px 0px'` extends the
14799
- * prefetch 500px above and below the viewport and not sideways. Accepted
14800
- * units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
14801
- * `auto`; an invalid value is logged and ignored.
14802
- *
14803
- * From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
14804
- * visualization ahead of the scroll position, so a chart has usually
14805
- * finished loading by the time it scrolls into view. Use a smaller margin
14806
- * to cut warehouse queries further, or `'0px'` to load a visualization
14807
- * only once it is actually visible.
14808
- *
14809
- * @type {string}
14810
- * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
14811
- * @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
14812
- * @example
14813
- * ```js
14814
- * const embed = new LiveboardEmbed('#embed-container', {
14815
- * // ...other options
14816
- * fullHeight: true,
14817
- * lazyLoadingForFullHeight: true,
14818
- * // Using 0px, the visualization will be only loaded when it's visible in the viewport.
14819
- * lazyLoadingMargin: '0px',
14820
- * })
14821
- * ```
14822
- */
14823
- lazyLoadingMargin?: string;
14824
15542
  /**
14825
15543
  * showSpotterLimitations : show limitation text
14826
15544
  * of the spotter underneath the chat input.
@@ -14959,9 +15677,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
14959
15677
  }
14960
15678
  declare class LiveboardEmbed extends V1Embed {
14961
15679
  protected viewConfig: LiveboardViewConfig;
14962
- private defaultHeight;
14963
- private lazyLoadScrollContainers;
14964
- private lazyLoadResizeObserver;
15680
+ private readonly fullHeightController?;
14965
15681
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
14966
15682
  protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
14967
15683
  /**
@@ -14971,27 +15687,11 @@ declare class LiveboardEmbed extends V1Embed {
14971
15687
  protected getEmbedParams(): string;
14972
15688
  protected getEmbedParamsObject(): any;
14973
15689
  private getIframeSuffixSrc;
14974
- private sendFullHeightLazyLoadData;
14975
- /**
14976
- * This is a handler for the RequestVisibleEmbedCoordinates event.
14977
- * It is used to send the visible coordinates data to the host application.
14978
- * @param data The event payload
14979
- * @param responder The responder function
14980
- */
14981
- private requestVisibleEmbedCoordinatesHandler;
14982
15690
  /**
14983
15691
  * Construct the URL of the embedded ThoughtSpot Liveboard or visualization
14984
15692
  * to be loaded within the iFrame.
14985
15693
  */
14986
15694
  private getIFrameSrc;
14987
- /**
14988
- * Set the iframe height as per the computed height received
14989
- * from the ThoughtSpot app.
14990
- * @param data The event payload
14991
- */
14992
- private updateIFrameHeight;
14993
- private embedIframeCenter;
14994
- private setIframeHeightForNonEmbedLiveboard;
14995
15695
  private setActiveTab;
14996
15696
  private showPreviewLoader;
14997
15697
  /**
@@ -15006,22 +15706,23 @@ declare class LiveboardEmbed extends V1Embed {
15006
15706
  personalizedViewId: string;
15007
15707
  };
15008
15708
  protected beforePrerenderVisible(): void;
15709
+ private isShowingLiveboardRoute;
15009
15710
  protected handleRenderForPrerender(): Promise<TsEmbed>;
15010
15711
  /**
15011
15712
  * Triggers an event to the embedded app
15713
+ * Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
15714
+ * from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
15012
15715
  * @param {HostEvent} messageType The event type
15013
- * @param {any} data The payload to send with the message
15716
+ * @param {TriggerData} data The payload, typed against the event's contract
15014
15717
  * @returns A promise that resolves with the response from the embedded app
15015
15718
  */
15016
- trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
15719
+ trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
15017
15720
  /**
15018
15721
  * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
15019
15722
  * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
15020
15723
  */
15021
15724
  destroy(): void;
15022
15725
  private postRender;
15023
- private registerLazyLoadEvents;
15024
- private unregisterLazyLoadEvents;
15025
15726
  /**
15026
15727
  * Render an embedded ThoughtSpot Liveboard or visualization
15027
15728
  * @param renderOptions An object specifying the Liveboard ID,