@thoughtspot/visual-embed-sdk 1.52.0 → 1.52.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/package.json +19 -4
- package/cjs/src/contracts/contracts.spec.d.ts +2 -0
- package/cjs/src/contracts/contracts.spec.d.ts.map +1 -0
- package/cjs/src/contracts/contracts.spec.js +345 -0
- package/cjs/src/contracts/contracts.spec.js.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts +73 -0
- package/cjs/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/cjs/src/contracts/embed-event-payloads.js +3 -0
- package/cjs/src/contracts/embed-event-payloads.js.map +1 -0
- package/cjs/src/contracts/host-event-contracts.d.ts +416 -0
- package/cjs/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/cjs/src/contracts/host-event-contracts.js +3 -0
- package/cjs/src/contracts/host-event-contracts.js.map +1 -0
- package/cjs/src/contracts/index.d.ts +22 -0
- package/cjs/src/contracts/index.d.ts.map +1 -0
- package/cjs/src/contracts/index.js +33 -0
- package/cjs/src/contracts/index.js.map +1 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/cjs/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/cjs/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/cjs/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/cjs/src/embed/app.d.ts +21 -143
- package/cjs/src/embed/app.d.ts.map +1 -1
- package/cjs/src/embed/app.js +21 -121
- package/cjs/src/embed/app.js.map +1 -1
- package/cjs/src/embed/app.spec.js +80 -26
- package/cjs/src/embed/app.spec.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.js +1 -1
- package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
- package/cjs/src/embed/auto-frame-renderer.spec.js +24 -13
- package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/cjs/src/embed/bodyless-conversation.js +1 -1
- package/cjs/src/embed/bodyless-conversation.js.map +1 -1
- package/cjs/src/embed/conversation.d.ts +1 -0
- package/cjs/src/embed/conversation.d.ts.map +1 -1
- package/cjs/src/embed/conversation.js +4 -4
- package/cjs/src/embed/conversation.js.map +1 -1
- package/cjs/src/embed/conversation.spec.js +35 -24
- package/cjs/src/embed/conversation.spec.js.map +1 -1
- package/cjs/src/embed/embedConfig.spec.js +2 -1
- package/cjs/src/embed/embedConfig.spec.js.map +1 -1
- package/cjs/src/embed/events.spec.js +12 -2
- package/cjs/src/embed/events.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts +5 -4
- package/cjs/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.js +34 -23
- package/cjs/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js +50 -44
- package/cjs/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts +10 -1
- package/cjs/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.js +52 -6
- package/cjs/src/embed/hostEventClient/utils.js.map +1 -1
- package/cjs/src/embed/hostEventClient/utils.spec.js +151 -0
- package/cjs/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/cjs/src/embed/liveboard.d.ts +13 -164
- package/cjs/src/embed/liveboard.d.ts.map +1 -1
- package/cjs/src/embed/liveboard.js +72 -135
- package/cjs/src/embed/liveboard.js.map +1 -1
- package/cjs/src/embed/liveboard.spec.js +213 -29
- package/cjs/src/embed/liveboard.spec.js.map +1 -1
- package/cjs/src/embed/search-bar.js +1 -1
- package/cjs/src/embed/search-bar.js.map +1 -1
- package/cjs/src/embed/search.d.ts +14 -0
- package/cjs/src/embed/search.d.ts.map +1 -1
- package/cjs/src/embed/search.js +5 -2
- package/cjs/src/embed/search.js.map +1 -1
- package/cjs/src/embed/search.spec.js +85 -0
- package/cjs/src/embed/search.spec.js.map +1 -1
- package/cjs/src/embed/spotter-utils.d.ts +8 -1
- package/cjs/src/embed/spotter-utils.d.ts.map +1 -1
- package/cjs/src/embed/spotter-utils.js +14 -1
- package/cjs/src/embed/spotter-utils.js.map +1 -1
- package/cjs/src/embed/spotter-utils.spec.js +26 -0
- package/cjs/src/embed/spotter-utils.spec.js.map +1 -1
- package/cjs/src/embed/ts-embed.d.ts +20 -22
- package/cjs/src/embed/ts-embed.d.ts.map +1 -1
- package/cjs/src/embed/ts-embed.js +171 -66
- package/cjs/src/embed/ts-embed.js.map +1 -1
- package/cjs/src/embed/ts-embed.spec.js +486 -38
- package/cjs/src/embed/ts-embed.spec.js.map +1 -1
- package/cjs/src/errors.js +1 -1
- package/cjs/src/errors.js.map +1 -1
- package/cjs/src/full-height.d.ts +137 -0
- package/cjs/src/full-height.d.ts.map +1 -0
- package/cjs/src/full-height.js +272 -0
- package/cjs/src/full-height.js.map +1 -0
- package/cjs/src/full-height.spec.d.ts +2 -0
- package/cjs/src/full-height.spec.d.ts.map +1 -0
- package/cjs/src/full-height.spec.js +835 -0
- package/cjs/src/full-height.spec.js.map +1 -0
- package/cjs/src/index.d.ts +5 -3
- package/cjs/src/index.d.ts.map +1 -1
- package/cjs/src/index.js +6 -4
- package/cjs/src/index.js.map +1 -1
- package/cjs/src/react/all-types-export.d.ts +1 -1
- package/cjs/src/react/all-types-export.d.ts.map +1 -1
- package/cjs/src/react/all-types-export.js +2 -1
- package/cjs/src/react/all-types-export.js.map +1 -1
- package/cjs/src/react/all-types-export.parity.spec.js +55 -3
- package/cjs/src/react/all-types-export.parity.spec.js.map +1 -1
- package/cjs/src/types.d.ts +584 -24
- package/cjs/src/types.d.ts.map +1 -1
- package/cjs/src/types.js +370 -22
- package/cjs/src/types.js.map +1 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js +2 -1
- package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/cjs/src/utils/custom-actions.spec.js +4 -2
- package/cjs/src/utils/custom-actions.spec.js.map +1 -1
- package/cjs/src/utils/filterConverter.d.ts +106 -0
- package/cjs/src/utils/filterConverter.d.ts.map +1 -0
- package/cjs/src/utils/filterConverter.js +215 -0
- package/cjs/src/utils/filterConverter.js.map +1 -0
- package/cjs/src/utils/filterConverter.spec.d.ts +2 -0
- package/cjs/src/utils/filterConverter.spec.d.ts.map +1 -0
- package/cjs/src/utils/filterConverter.spec.js +709 -0
- package/cjs/src/utils/filterConverter.spec.js.map +1 -0
- package/cjs/src/utils/processData.spec.js +2 -1
- package/cjs/src/utils/processData.spec.js.map +1 -1
- package/cjs/src/utils/processTrigger.d.ts +3 -1
- package/cjs/src/utils/processTrigger.d.ts.map +1 -1
- package/cjs/src/utils/processTrigger.js +19 -51
- package/cjs/src/utils/processTrigger.js.map +1 -1
- package/cjs/src/utils/transport/iframe-transport.d.ts +55 -0
- package/cjs/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.js +108 -0
- package/cjs/src/utils/transport/iframe-transport.js.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/cjs/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js +140 -0
- package/cjs/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/cjs/src/utils.d.ts +18 -0
- package/cjs/src/utils.d.ts.map +1 -1
- package/cjs/src/utils.js +39 -1
- package/cjs/src/utils.js.map +1 -1
- package/cjs/src/utils.spec.js +62 -0
- package/cjs/src/utils.spec.js.map +1 -1
- package/dist/{index-BMppCU63.js → index-CcBYlGo9.js} +1 -1
- package/dist/src/contracts/contracts.spec.d.ts +2 -0
- package/dist/src/contracts/contracts.spec.d.ts.map +1 -0
- package/dist/src/contracts/embed-event-payloads.d.ts +73 -0
- package/dist/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/dist/src/contracts/host-event-contracts.d.ts +416 -0
- package/dist/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/dist/src/contracts/index.d.ts +22 -0
- package/dist/src/contracts/index.d.ts.map +1 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/dist/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/dist/src/embed/app.d.ts +21 -143
- package/dist/src/embed/app.d.ts.map +1 -1
- package/dist/src/embed/conversation.d.ts +1 -0
- package/dist/src/embed/conversation.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/host-event-client.d.ts +5 -4
- package/dist/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/dist/src/embed/hostEventClient/utils.d.ts +10 -1
- package/dist/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/dist/src/embed/liveboard.d.ts +13 -164
- package/dist/src/embed/liveboard.d.ts.map +1 -1
- package/dist/src/embed/search.d.ts +14 -0
- package/dist/src/embed/search.d.ts.map +1 -1
- package/dist/src/embed/spotter-utils.d.ts +8 -1
- package/dist/src/embed/spotter-utils.d.ts.map +1 -1
- package/dist/src/embed/ts-embed.d.ts +20 -22
- package/dist/src/embed/ts-embed.d.ts.map +1 -1
- package/dist/src/full-height.d.ts +137 -0
- package/dist/src/full-height.d.ts.map +1 -0
- package/dist/src/full-height.spec.d.ts +2 -0
- package/dist/src/full-height.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +5 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/react/all-types-export.d.ts +1 -1
- package/dist/src/react/all-types-export.d.ts.map +1 -1
- package/dist/src/types.d.ts +584 -24
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/filterConverter.d.ts +106 -0
- package/dist/src/utils/filterConverter.d.ts.map +1 -0
- package/dist/src/utils/filterConverter.spec.d.ts +2 -0
- package/dist/src/utils/filterConverter.spec.d.ts.map +1 -0
- package/dist/src/utils/processTrigger.d.ts +3 -1
- package/dist/src/utils/processTrigger.d.ts.map +1 -1
- package/dist/src/utils/transport/iframe-transport.d.ts +55 -0
- package/dist/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/dist/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/dist/src/utils.d.ts +18 -0
- package/dist/src/utils.d.ts.map +1 -1
- package/dist/tsembed-react.es.js +1144 -412
- package/dist/tsembed-react.js +1143 -411
- package/dist/tsembed.es.js +1357 -418
- package/dist/tsembed.js +1352 -412
- package/dist/visual-embed-sdk-react-full.d.ts +1514 -651
- package/dist/visual-embed-sdk-react.d.ts +1351 -632
- package/dist/visual-embed-sdk.d.ts +1508 -668
- package/lib/package.json +19 -4
- package/lib/src/contracts/contracts.spec.d.ts +2 -0
- package/lib/src/contracts/contracts.spec.d.ts.map +1 -0
- package/lib/src/contracts/contracts.spec.js +342 -0
- package/lib/src/contracts/contracts.spec.js.map +1 -0
- package/lib/src/contracts/embed-event-payloads.d.ts +73 -0
- package/lib/src/contracts/embed-event-payloads.d.ts.map +1 -0
- package/lib/src/contracts/embed-event-payloads.js +2 -0
- package/lib/src/contracts/embed-event-payloads.js.map +1 -0
- package/lib/src/contracts/host-event-contracts.d.ts +416 -0
- package/lib/src/contracts/host-event-contracts.d.ts.map +1 -0
- package/lib/src/contracts/host-event-contracts.js +2 -0
- package/lib/src/contracts/host-event-contracts.js.map +1 -0
- package/lib/src/contracts/index.d.ts +22 -0
- package/lib/src/contracts/index.d.ts.map +1 -0
- package/lib/src/contracts/index.js +22 -0
- package/lib/src/contracts/index.js.map +1 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts +277 -0
- package/lib/src/contracts/ui-passthrough-contracts.d.ts.map +1 -0
- package/lib/src/{embed/hostEventClient/contracts.js → contracts/ui-passthrough-contracts.js} +6 -2
- package/lib/src/contracts/ui-passthrough-contracts.js.map +1 -0
- package/lib/src/embed/app.d.ts +21 -143
- package/lib/src/embed/app.d.ts.map +1 -1
- package/lib/src/embed/app.js +23 -123
- package/lib/src/embed/app.js.map +1 -1
- package/lib/src/embed/app.spec.js +80 -26
- package/lib/src/embed/app.spec.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.js +1 -1
- package/lib/src/embed/auto-frame-renderer.js.map +1 -1
- package/lib/src/embed/auto-frame-renderer.spec.js +24 -13
- package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
- package/lib/src/embed/bodyless-conversation.js +1 -1
- package/lib/src/embed/bodyless-conversation.js.map +1 -1
- package/lib/src/embed/conversation.d.ts +1 -0
- package/lib/src/embed/conversation.d.ts.map +1 -1
- package/lib/src/embed/conversation.js +5 -5
- package/lib/src/embed/conversation.js.map +1 -1
- package/lib/src/embed/conversation.spec.js +35 -24
- package/lib/src/embed/conversation.spec.js.map +1 -1
- package/lib/src/embed/embedConfig.spec.js +2 -1
- package/lib/src/embed/embedConfig.spec.js.map +1 -1
- package/lib/src/embed/events.spec.js +12 -2
- package/lib/src/embed/events.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.d.ts +5 -4
- package/lib/src/embed/hostEventClient/host-event-client.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.js +19 -8
- package/lib/src/embed/hostEventClient/host-event-client.js.map +1 -1
- package/lib/src/embed/hostEventClient/host-event-client.spec.js +15 -9
- package/lib/src/embed/hostEventClient/host-event-client.spec.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.d.ts +10 -1
- package/lib/src/embed/hostEventClient/utils.d.ts.map +1 -1
- package/lib/src/embed/hostEventClient/utils.js +48 -3
- package/lib/src/embed/hostEventClient/utils.js.map +1 -1
- package/lib/src/embed/hostEventClient/utils.spec.js +152 -1
- package/lib/src/embed/hostEventClient/utils.spec.js.map +1 -1
- package/lib/src/embed/liveboard.d.ts +13 -164
- package/lib/src/embed/liveboard.d.ts.map +1 -1
- package/lib/src/embed/liveboard.js +73 -136
- package/lib/src/embed/liveboard.js.map +1 -1
- package/lib/src/embed/liveboard.spec.js +213 -29
- package/lib/src/embed/liveboard.spec.js.map +1 -1
- package/lib/src/embed/search-bar.js +1 -1
- package/lib/src/embed/search-bar.js.map +1 -1
- package/lib/src/embed/search.d.ts +14 -0
- package/lib/src/embed/search.d.ts.map +1 -1
- package/lib/src/embed/search.js +5 -2
- package/lib/src/embed/search.js.map +1 -1
- package/lib/src/embed/search.spec.js +85 -0
- package/lib/src/embed/search.spec.js.map +1 -1
- package/lib/src/embed/spotter-utils.d.ts +8 -1
- package/lib/src/embed/spotter-utils.d.ts.map +1 -1
- package/lib/src/embed/spotter-utils.js +12 -0
- package/lib/src/embed/spotter-utils.js.map +1 -1
- package/lib/src/embed/spotter-utils.spec.js +27 -1
- package/lib/src/embed/spotter-utils.spec.js.map +1 -1
- package/lib/src/embed/ts-embed.d.ts +20 -22
- package/lib/src/embed/ts-embed.d.ts.map +1 -1
- package/lib/src/embed/ts-embed.js +171 -66
- package/lib/src/embed/ts-embed.js.map +1 -1
- package/lib/src/embed/ts-embed.spec.js +484 -36
- package/lib/src/embed/ts-embed.spec.js.map +1 -1
- package/lib/src/errors.js +1 -1
- package/lib/src/errors.js.map +1 -1
- package/lib/src/full-height.d.ts +137 -0
- package/lib/src/full-height.d.ts.map +1 -0
- package/lib/src/full-height.js +268 -0
- package/lib/src/full-height.js.map +1 -0
- package/lib/src/full-height.spec.d.ts +2 -0
- package/lib/src/full-height.spec.d.ts.map +1 -0
- package/lib/src/full-height.spec.js +833 -0
- package/lib/src/full-height.spec.js.map +1 -0
- package/lib/src/index.d.ts +5 -3
- package/lib/src/index.d.ts.map +1 -1
- package/lib/src/index.js +3 -2
- package/lib/src/index.js.map +1 -1
- package/lib/src/react/all-types-export.d.ts +1 -1
- package/lib/src/react/all-types-export.d.ts.map +1 -1
- package/lib/src/react/all-types-export.js +1 -1
- package/lib/src/react/all-types-export.js.map +1 -1
- package/lib/src/react/all-types-export.parity.spec.js +55 -3
- package/lib/src/react/all-types-export.parity.spec.js.map +1 -1
- package/lib/src/types.d.ts +584 -24
- package/lib/src/types.d.ts.map +1 -1
- package/lib/src/types.js +370 -22
- package/lib/src/types.js.map +1 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js +2 -1
- package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
- package/lib/src/utils/custom-actions.spec.js +4 -2
- package/lib/src/utils/custom-actions.spec.js.map +1 -1
- package/lib/src/utils/filterConverter.d.ts +106 -0
- package/lib/src/utils/filterConverter.d.ts.map +1 -0
- package/lib/src/utils/filterConverter.js +210 -0
- package/lib/src/utils/filterConverter.js.map +1 -0
- package/lib/src/utils/filterConverter.spec.d.ts +2 -0
- package/lib/src/utils/filterConverter.spec.d.ts.map +1 -0
- package/lib/src/utils/filterConverter.spec.js +707 -0
- package/lib/src/utils/filterConverter.spec.js.map +1 -0
- package/lib/src/utils/processData.spec.js +2 -1
- package/lib/src/utils/processData.spec.js.map +1 -1
- package/lib/src/utils/processTrigger.d.ts +3 -1
- package/lib/src/utils/processTrigger.d.ts.map +1 -1
- package/lib/src/utils/processTrigger.js +19 -51
- package/lib/src/utils/processTrigger.js.map +1 -1
- package/lib/src/utils/transport/iframe-transport.d.ts +55 -0
- package/lib/src/utils/transport/iframe-transport.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.js +101 -0
- package/lib/src/utils/transport/iframe-transport.js.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts +2 -0
- package/lib/src/utils/transport/iframe-transport.spec.d.ts.map +1 -0
- package/lib/src/utils/transport/iframe-transport.spec.js +138 -0
- package/lib/src/utils/transport/iframe-transport.spec.js.map +1 -0
- package/lib/src/utils.d.ts +18 -0
- package/lib/src/utils.d.ts.map +1 -1
- package/lib/src/utils.js +37 -0
- package/lib/src/utils.js.map +1 -1
- package/lib/src/utils.spec.js +63 -1
- package/lib/src/utils.spec.js.map +1 -1
- package/lib/src/visual-embed-sdk.d.ts +1508 -668
- package/package.json +19 -4
- package/src/contracts/contracts.spec.ts +392 -0
- package/src/contracts/embed-event-payloads.ts +83 -0
- package/src/contracts/host-event-contracts.ts +500 -0
- package/src/contracts/index.ts +53 -0
- package/src/contracts/ui-passthrough-contracts.ts +301 -0
- package/src/embed/app.spec.ts +101 -34
- package/src/embed/app.ts +42 -268
- package/src/embed/auto-frame-renderer.spec.ts +24 -13
- package/src/embed/auto-frame-renderer.ts +1 -1
- package/src/embed/bodyless-conversation.ts +1 -1
- package/src/embed/conversation.spec.ts +38 -27
- package/src/embed/conversation.ts +5 -5
- package/src/embed/embedConfig.spec.ts +2 -1
- package/src/embed/events.spec.ts +14 -2
- package/src/embed/hostEventClient/host-event-client.spec.ts +16 -10
- package/src/embed/hostEventClient/host-event-client.ts +31 -10
- package/src/embed/hostEventClient/utils.spec.ts +176 -1
- package/src/embed/hostEventClient/utils.ts +53 -3
- package/src/embed/liveboard.spec.ts +261 -41
- package/src/embed/liveboard.ts +85 -300
- package/src/embed/search-bar.tsx +1 -1
- package/src/embed/search.spec.ts +103 -0
- package/src/embed/search.ts +21 -1
- package/src/embed/spotter-utils.spec.ts +29 -0
- package/src/embed/spotter-utils.ts +16 -0
- package/src/embed/ts-embed.spec.ts +650 -36
- package/src/embed/ts-embed.ts +205 -76
- package/src/errors.ts +1 -1
- package/src/full-height.spec.ts +1008 -0
- package/src/full-height.ts +361 -0
- package/src/index.ts +103 -5
- package/src/react/all-types-export.parity.spec.ts +63 -3
- package/src/react/all-types-export.ts +49 -0
- package/src/types.ts +584 -22
- package/src/utils/authService/tokenizedAuthService.spec.ts +2 -1
- package/src/utils/custom-actions.spec.ts +4 -2
- package/src/utils/filterConverter.spec.ts +801 -0
- package/src/utils/filterConverter.ts +304 -0
- package/src/utils/processData.spec.ts +2 -1
- package/src/utils/processTrigger.ts +28 -58
- package/src/utils/transport/iframe-transport.spec.ts +177 -0
- package/src/utils/transport/iframe-transport.ts +122 -0
- package/src/utils.spec.ts +71 -0
- package/src/utils.ts +38 -0
- package/cjs/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/cjs/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/cjs/src/embed/hostEventClient/contracts.js.map +0 -1
- package/dist/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/dist/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.d.ts +0 -231
- package/lib/src/embed/hostEventClient/contracts.d.ts.map +0 -1
- package/lib/src/embed/hostEventClient/contracts.js.map +0 -1
- 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,10 +7281,18 @@ 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);
|
|
6939
7289
|
* console.log('data', data);
|
|
7290
|
+
* // {
|
|
7291
|
+
* // liveboardFilters: [ ... ],
|
|
7292
|
+
* // runtimeFilters: [
|
|
7293
|
+
* // { columnName: "Region", operator: "IN", values: ["West"] }
|
|
7294
|
+
* // ]
|
|
7295
|
+
* // }
|
|
6940
7296
|
* ```
|
|
6941
7297
|
* @example
|
|
6942
7298
|
* ```js
|
|
@@ -6952,6 +7308,7 @@ export declare enum HostEvent {
|
|
|
6952
7308
|
GetFilters = "getFilters",
|
|
6953
7309
|
/**
|
|
6954
7310
|
* Update one or several filters applied on a Liveboard.
|
|
7311
|
+
* Payload: {@link UpdateFiltersRequest}.
|
|
6955
7312
|
* @param - Includes the following keys:
|
|
6956
7313
|
* - `filter`: A single filter object containing column name, filter operator, and
|
|
6957
7314
|
* values.
|
|
@@ -6960,9 +7317,9 @@ export declare enum HostEvent {
|
|
|
6960
7317
|
*
|
|
6961
7318
|
* Each filter object must include the following attributes:
|
|
6962
7319
|
*
|
|
6963
|
-
* `
|
|
7320
|
+
* `columnName` - Name of the column to filter on.
|
|
6964
7321
|
*
|
|
6965
|
-
* `
|
|
7322
|
+
* `operator` - Filter operator, for example, EQ, IN, CONTAINS.
|
|
6966
7323
|
* For information about the supported filter operators,
|
|
6967
7324
|
* see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
|
|
6968
7325
|
*
|
|
@@ -6989,8 +7346,8 @@ export declare enum HostEvent {
|
|
|
6989
7346
|
*
|
|
6990
7347
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
6991
7348
|
* filter: {
|
|
6992
|
-
*
|
|
6993
|
-
*
|
|
7349
|
+
* columnName: "item type",
|
|
7350
|
+
* operator: "IN",
|
|
6994
7351
|
* values: ["bags","shirts"]
|
|
6995
7352
|
* }
|
|
6996
7353
|
* });
|
|
@@ -7000,8 +7357,8 @@ export declare enum HostEvent {
|
|
|
7000
7357
|
*
|
|
7001
7358
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
7002
7359
|
* filter: {
|
|
7003
|
-
*
|
|
7004
|
-
*
|
|
7360
|
+
* columnName: "date",
|
|
7361
|
+
* operator: "EQ",
|
|
7005
7362
|
* values: ["JULY","2023"],
|
|
7006
7363
|
* type: "MONTH_YEAR"
|
|
7007
7364
|
* }
|
|
@@ -7012,18 +7369,18 @@ export declare enum HostEvent {
|
|
|
7012
7369
|
* ```js
|
|
7013
7370
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
7014
7371
|
* filters: [{
|
|
7015
|
-
*
|
|
7016
|
-
*
|
|
7372
|
+
* columnName: "Item Type",
|
|
7373
|
+
* operator: 'IN',
|
|
7017
7374
|
* values: ["bags","shirts"]
|
|
7018
7375
|
* },
|
|
7019
7376
|
* {
|
|
7020
|
-
*
|
|
7021
|
-
*
|
|
7377
|
+
* columnName: "Region",
|
|
7378
|
+
* operator: 'IN',
|
|
7022
7379
|
* values: ["West","Midwest"]
|
|
7023
7380
|
* },
|
|
7024
7381
|
* {
|
|
7025
|
-
*
|
|
7026
|
-
*
|
|
7382
|
+
* columnName: "Date",
|
|
7383
|
+
* operator: 'EQ',
|
|
7027
7384
|
* values: ["2023-07-31"],
|
|
7028
7385
|
* type: "EXACT_DATE"
|
|
7029
7386
|
* }]
|
|
@@ -7037,13 +7394,13 @@ export declare enum HostEvent {
|
|
|
7037
7394
|
* ```js
|
|
7038
7395
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
7039
7396
|
* filters: [{
|
|
7040
|
-
*
|
|
7041
|
-
*
|
|
7397
|
+
* columnName: "(Sample) Retail - Apparel::city",
|
|
7398
|
+
* operator: 'IN',
|
|
7042
7399
|
* values: ["atlanta"]
|
|
7043
7400
|
* },
|
|
7044
7401
|
* {
|
|
7045
|
-
*
|
|
7046
|
-
*
|
|
7402
|
+
* columnName: "(Sample) Retail - Apparel::Region",
|
|
7403
|
+
* operator: 'IN',
|
|
7047
7404
|
* values: ["West","Midwest"]
|
|
7048
7405
|
* }]
|
|
7049
7406
|
* });
|
|
@@ -7054,8 +7411,8 @@ export declare enum HostEvent {
|
|
|
7054
7411
|
* import { ContextType } from '@thoughtspot/visual-embed-sdk';
|
|
7055
7412
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
7056
7413
|
* filter: {
|
|
7057
|
-
*
|
|
7058
|
-
*
|
|
7414
|
+
* columnName: "item type",
|
|
7415
|
+
* operator: "IN",
|
|
7059
7416
|
* values: ["shoes", "boots"]
|
|
7060
7417
|
* }
|
|
7061
7418
|
* }, ContextType.Liveboard);
|
|
@@ -7065,8 +7422,8 @@ export declare enum HostEvent {
|
|
|
7065
7422
|
* // Scope the filter to a specific Liveboard tab
|
|
7066
7423
|
* liveboardEmbed.trigger(HostEvent.UpdateFilters, {
|
|
7067
7424
|
* filter: {
|
|
7068
|
-
*
|
|
7069
|
-
*
|
|
7425
|
+
* columnName: "item type",
|
|
7426
|
+
* operator: "IN",
|
|
7070
7427
|
* values: ["bags", "shirts"],
|
|
7071
7428
|
* applicability: {
|
|
7072
7429
|
* level: "TAB",
|
|
@@ -7075,11 +7432,19 @@ export declare enum HostEvent {
|
|
|
7075
7432
|
* }
|
|
7076
7433
|
* });
|
|
7077
7434
|
* ```
|
|
7435
|
+
* Use `columnName` and `operator` - the same spelling as
|
|
7436
|
+
* {@link RuntimeFilter}. The older `column` and `oper` spellings are
|
|
7437
|
+
* deprecated; they are still accepted, but pass only one spelling of each
|
|
7438
|
+
* field, never both. To reapply the filter state captured from
|
|
7439
|
+
* {@link EmbedEvent.FilterChanged}, use `convertFilterChangedToUpdateFiltersPayload`
|
|
7440
|
+
* to convert its payload into the shape expected here.
|
|
7078
7441
|
* @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
|
|
7079
7442
|
*/
|
|
7080
7443
|
UpdateFilters = "updateFilters",
|
|
7081
7444
|
/**
|
|
7082
7445
|
* Get tab details for the current Liveboard.
|
|
7446
|
+
* Payload: none.
|
|
7447
|
+
* Response: {@link GetTabsResponse}.
|
|
7083
7448
|
* @example
|
|
7084
7449
|
* ```js
|
|
7085
7450
|
* liveboardEmbed.trigger(HostEvent.GetTabs).then((tabDetails) => {
|
|
@@ -7105,6 +7470,8 @@ export declare enum HostEvent {
|
|
|
7105
7470
|
/**
|
|
7106
7471
|
* Get group details for the current Liveboard.
|
|
7107
7472
|
* Mirrors {@link HostEvent.GetTabs} for filter/parameter groups.
|
|
7473
|
+
* Payload: none.
|
|
7474
|
+
* Response: {@link GetGroupsResponse}.
|
|
7108
7475
|
* @example
|
|
7109
7476
|
* ```js
|
|
7110
7477
|
* liveboardEmbed.trigger(HostEvent.GetGroups).then((groupDetails) => {
|
|
@@ -7129,6 +7496,7 @@ export declare enum HostEvent {
|
|
|
7129
7496
|
GetGroups = "getGroups",
|
|
7130
7497
|
/**
|
|
7131
7498
|
* Set the visible tabs on a Liveboard.
|
|
7499
|
+
* Payload: `string[]`.
|
|
7132
7500
|
* @param - an array of ids of tabs to show, the IDs not passed
|
|
7133
7501
|
* will be hidden.
|
|
7134
7502
|
* @example
|
|
@@ -7151,6 +7519,7 @@ export declare enum HostEvent {
|
|
|
7151
7519
|
SetVisibleTabs = "SetPinboardVisibleTabs",
|
|
7152
7520
|
/**
|
|
7153
7521
|
* Set the hidden tabs on a Liveboard.
|
|
7522
|
+
* Payload: `string[]`.
|
|
7154
7523
|
* @param - an array of the IDs of the tabs to hide.
|
|
7155
7524
|
* The IDs not passed will be shown.
|
|
7156
7525
|
* @example
|
|
@@ -7179,6 +7548,8 @@ export declare enum HostEvent {
|
|
|
7179
7548
|
* `getAnswerService()` method on the embed instance to get an AnswerService
|
|
7180
7549
|
* object that provides a more convenient interface for working with answers.
|
|
7181
7550
|
*
|
|
7551
|
+
* Payload: {@link GetAnswerSessionRequest}.
|
|
7552
|
+
* Response: {@link GetAnswerSessionResponse}.
|
|
7182
7553
|
* @example
|
|
7183
7554
|
* ```js
|
|
7184
7555
|
* // Preferred way to get an AnswerService
|
|
@@ -7206,6 +7577,7 @@ export declare enum HostEvent {
|
|
|
7206
7577
|
GetAnswerSession = "getAnswerSession",
|
|
7207
7578
|
/**
|
|
7208
7579
|
* Trigger the *Ask Sage* action for visualizations
|
|
7580
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7209
7581
|
* @example
|
|
7210
7582
|
* ```js
|
|
7211
7583
|
* liveboardEmbed.trigger(HostEvent.AskSage,
|
|
@@ -7217,6 +7589,7 @@ export declare enum HostEvent {
|
|
|
7217
7589
|
/**
|
|
7218
7590
|
* Trigger cross filter update action on a Liveboard.
|
|
7219
7591
|
*
|
|
7592
|
+
* Payload: {@link UpdateCrossFilterRequest}.
|
|
7220
7593
|
* @example
|
|
7221
7594
|
* ```js
|
|
7222
7595
|
* liveboardEmbed.trigger(HostEvent.UpdateCrossFilter, {
|
|
@@ -7232,7 +7605,9 @@ export declare enum HostEvent {
|
|
|
7232
7605
|
UpdateCrossFilter = "UpdateCrossFilter",
|
|
7233
7606
|
/**
|
|
7234
7607
|
* Trigger reset action for a personalized Liveboard view.
|
|
7235
|
-
* This event is deprecated.
|
|
7608
|
+
* This event is deprecated.
|
|
7609
|
+
* Use {@link HostEvent.ResetLiveboardPersonalizedView} instead.
|
|
7610
|
+
* Payload: none.
|
|
7236
7611
|
* @example
|
|
7237
7612
|
* ```js
|
|
7238
7613
|
* liveboardEmbed.trigger(HostEvent.ResetLiveboardPersonalisedView);
|
|
@@ -7253,6 +7628,7 @@ export declare enum HostEvent {
|
|
|
7253
7628
|
/**
|
|
7254
7629
|
* Triggers an action to update Parameter values on embedded
|
|
7255
7630
|
* Answers, Liveboard, and Spotter answer in Edit mode.
|
|
7631
|
+
* Payload: {@link RuntimeParameter}[].
|
|
7256
7632
|
* @param - Includes the following keys for each item:
|
|
7257
7633
|
* - `name`: Name of the parameter.
|
|
7258
7634
|
* - `value`: The value to set for the parameter.
|
|
@@ -7310,6 +7686,8 @@ export declare enum HostEvent {
|
|
|
7310
7686
|
* whole Liveboard.
|
|
7311
7687
|
* The `applicability` attribute is available from SDK: 1.53.0 |
|
|
7312
7688
|
* ThoughtSpot: 26.10.0.cl.
|
|
7689
|
+
* Payload: none.
|
|
7690
|
+
* Response: {@link GetParametersResponse}.
|
|
7313
7691
|
* @param - `vizId` refers to the Answer ID in Spotter embed and is required in Spotter embed.
|
|
7314
7692
|
* ```js
|
|
7315
7693
|
* liveboardEmbed.trigger(HostEvent.GetParameters).then((parameter) => {
|
|
@@ -7347,6 +7725,7 @@ export declare enum HostEvent {
|
|
|
7347
7725
|
* ```js
|
|
7348
7726
|
* liveboardEmbed.trigger(HostEvent.UpdatePersonalisedView, {viewId: '1234'})
|
|
7349
7727
|
* ```
|
|
7728
|
+
* Payload: {@link PersonalisedViewRequest} (`viewId` only).
|
|
7350
7729
|
* @example
|
|
7351
7730
|
* ```js
|
|
7352
7731
|
* // Update personalized view from liveboard context
|
|
@@ -7379,6 +7758,7 @@ export declare enum HostEvent {
|
|
|
7379
7758
|
* If neither is provided, the Liveboard resets to the original/default view.
|
|
7380
7759
|
* When a `viewName` is provided and multiple views share
|
|
7381
7760
|
* the same name, the first match is selected.
|
|
7761
|
+
* Payload: {@link PersonalisedViewRequest}.
|
|
7382
7762
|
* @example
|
|
7383
7763
|
* ```js
|
|
7384
7764
|
* liveboardEmbed.trigger(
|
|
@@ -7422,6 +7802,8 @@ export declare enum HostEvent {
|
|
|
7422
7802
|
* If no parameters are specified, the save action is
|
|
7423
7803
|
* triggered with a modal to prompt users to
|
|
7424
7804
|
* add a name and description for the Answer.
|
|
7805
|
+
* Payload: {@link SaveAnswerRequest}.
|
|
7806
|
+
* Response: {@link SaveAnswerResponse}.
|
|
7425
7807
|
* @param - Includes the following keys:
|
|
7426
7808
|
* - `vizId`: Refers to the Answer ID in Spotter embed and is **required** in Spotter
|
|
7427
7809
|
* embed.
|
|
@@ -7507,6 +7889,7 @@ export declare enum HostEvent {
|
|
|
7507
7889
|
/**
|
|
7508
7890
|
* Triggers a search operation with the search tokens specified in
|
|
7509
7891
|
* the search query string in spotter embed.
|
|
7892
|
+
* Payload: {@link SpotterSearchRequest}.
|
|
7510
7893
|
* @param - Includes the following keys:
|
|
7511
7894
|
* - `query`: Text string in Natural Language format.
|
|
7512
7895
|
* - `executeSearch`: Boolean to execute search and update search query.
|
|
@@ -7531,6 +7914,7 @@ export declare enum HostEvent {
|
|
|
7531
7914
|
SpotterSearch = "SpotterSearch",
|
|
7532
7915
|
/**
|
|
7533
7916
|
* Edits the last prompt in spotter embed.
|
|
7917
|
+
* Payload: `string`.
|
|
7534
7918
|
* @param - `query`: Text string
|
|
7535
7919
|
* @example
|
|
7536
7920
|
* ```js
|
|
@@ -7547,6 +7931,7 @@ export declare enum HostEvent {
|
|
|
7547
7931
|
EditLastPrompt = "EditLastPrompt",
|
|
7548
7932
|
/**
|
|
7549
7933
|
* Opens the data source preview modal in Spotter Embed.
|
|
7934
|
+
* Payload: none.
|
|
7550
7935
|
* @example
|
|
7551
7936
|
* ```js
|
|
7552
7937
|
* spotterEmbed.trigger(HostEvent.PreviewSpotterData);
|
|
@@ -7582,6 +7967,7 @@ export declare enum HostEvent {
|
|
|
7582
7967
|
DataModelInstructions = "DataModelInstructions",
|
|
7583
7968
|
/**
|
|
7584
7969
|
* Resets the Spotter Embed Conversation.
|
|
7970
|
+
* Payload: none.
|
|
7585
7971
|
* @example
|
|
7586
7972
|
* ```js
|
|
7587
7973
|
* spotterEmbed.trigger(HostEvent.ResetSpotterConversation);
|
|
@@ -7594,6 +7980,7 @@ export declare enum HostEvent {
|
|
|
7594
7980
|
* `conversationId` is **mandatory** — you must pass the id of the
|
|
7595
7981
|
* conversation to share. Also no-op when sharing is disabled
|
|
7596
7982
|
* (enableShareConversation off) or when already in the read-only shared view.
|
|
7983
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7597
7984
|
* @example
|
|
7598
7985
|
* ```js
|
|
7599
7986
|
* spotterEmbed.trigger(HostEvent.ShareSpotterConversation, { conversationId: 'abc' });
|
|
@@ -7603,6 +7990,7 @@ export declare enum HostEvent {
|
|
|
7603
7990
|
ShareSpotterConversation = "ShareSpotterConversation",
|
|
7604
7991
|
/**
|
|
7605
7992
|
* Closes the Spotter share-conversation modal. No-op if none is open.
|
|
7993
|
+
* Payload: none.
|
|
7606
7994
|
* @example
|
|
7607
7995
|
* ```js
|
|
7608
7996
|
* spotterEmbed.trigger(HostEvent.CloseSpotterShareConversation);
|
|
@@ -7612,6 +8000,7 @@ export declare enum HostEvent {
|
|
|
7612
8000
|
CloseSpotterShareConversation = "CloseSpotterShareConversation",
|
|
7613
8001
|
/**
|
|
7614
8002
|
* Exits the read-only shared-conversation view.
|
|
8003
|
+
* Payload: none.
|
|
7615
8004
|
* @example
|
|
7616
8005
|
* ```js
|
|
7617
8006
|
* spotterEmbed.trigger(HostEvent.ExitSpotterSharedConversation);
|
|
@@ -7621,6 +8010,7 @@ export declare enum HostEvent {
|
|
|
7621
8010
|
ExitSpotterSharedConversation = "ExitSpotterSharedConversation",
|
|
7622
8011
|
/**
|
|
7623
8012
|
* Deletes the last prompt in spotter embed.
|
|
8013
|
+
* Payload: none.
|
|
7624
8014
|
* @example
|
|
7625
8015
|
* ```js
|
|
7626
8016
|
* spotterEmbed.trigger(HostEvent.DeleteLastPrompt);
|
|
@@ -7630,6 +8020,7 @@ export declare enum HostEvent {
|
|
|
7630
8020
|
DeleteLastPrompt = "DeleteLastPrompt",
|
|
7631
8021
|
/**
|
|
7632
8022
|
* Toggle the visualization to chart or table view.
|
|
8023
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7633
8024
|
* @param - `vizId ` refers to the Visualization ID in Spotter embed and is required.
|
|
7634
8025
|
* @example
|
|
7635
8026
|
* ```js
|
|
@@ -7668,6 +8059,7 @@ export declare enum HostEvent {
|
|
|
7668
8059
|
VisibleEmbedCoordinates = "visibleEmbedCoordinates",
|
|
7669
8060
|
/**
|
|
7670
8061
|
* Trigger the *Spotter* action for visualizations present on the liveboard's vizzes.
|
|
8062
|
+
* Payload: {@link RequiredVizRequest}.
|
|
7671
8063
|
* @param - `vizId` refers to the Visualization ID in Spotter embed and is required.
|
|
7672
8064
|
* @example
|
|
7673
8065
|
* ```js
|
|
@@ -7729,6 +8121,7 @@ export declare enum HostEvent {
|
|
|
7729
8121
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
7730
8122
|
* instance.
|
|
7731
8123
|
*
|
|
8124
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7732
8125
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7733
8126
|
* @example
|
|
7734
8127
|
* ```js
|
|
@@ -7746,6 +8139,7 @@ export declare enum HostEvent {
|
|
|
7746
8139
|
* instance. Contact your admin or ThoughtSpot Support to enable chat history on your
|
|
7747
8140
|
* instance.
|
|
7748
8141
|
*
|
|
8142
|
+
* Payload: {@link ConversationScopedRequest}.
|
|
7749
8143
|
* @version SDK: 1.53.0 | ThoughtSpot Cloud: 26.10.0.cl
|
|
7750
8144
|
* @example
|
|
7751
8145
|
* ```js
|
|
@@ -7770,6 +8164,7 @@ export declare enum HostEvent {
|
|
|
7770
8164
|
* Trigger the **Send Test Email** action in the Liveboard schedule modal.
|
|
7771
8165
|
* Sends a test schedule email to self or all recipients.
|
|
7772
8166
|
* Requires `isSendNowLiveboardSchedulingEnabled` to be enabled.
|
|
8167
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
7773
8168
|
* @example
|
|
7774
8169
|
* ```js
|
|
7775
8170
|
* liveboardEmbed.trigger(HostEvent.SendTestScheduleEmail, {
|
|
@@ -7788,6 +8183,7 @@ export declare enum HostEvent {
|
|
|
7788
8183
|
SendTestScheduleEmail = "sendTestScheduleEmail",
|
|
7789
8184
|
/**
|
|
7790
8185
|
* Sends a user message (prompt) to the SpotterViz panel programmatically.
|
|
8186
|
+
* Payload: `{ query: string }`.
|
|
7791
8187
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7792
8188
|
* @param query - the prompt text to send.
|
|
7793
8189
|
* @example
|
|
@@ -7800,6 +8196,7 @@ export declare enum HostEvent {
|
|
|
7800
8196
|
SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
|
|
7801
8197
|
/**
|
|
7802
8198
|
* Initializes a new SpotterViz conversation.
|
|
8199
|
+
* Payload: none.
|
|
7803
8200
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7804
8201
|
* @example
|
|
7805
8202
|
* ```js
|
|
@@ -7809,6 +8206,7 @@ export declare enum HostEvent {
|
|
|
7809
8206
|
InitSpotterVizConversation = "InitSpotterVizConversation",
|
|
7810
8207
|
/**
|
|
7811
8208
|
* Opens the SpotterViz panel.
|
|
8209
|
+
* Payload: none.
|
|
7812
8210
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7813
8211
|
* @example
|
|
7814
8212
|
* ```js
|
|
@@ -7818,6 +8216,7 @@ export declare enum HostEvent {
|
|
|
7818
8216
|
OpenSpotterVizPanel = "OpenSpotterVizPanel",
|
|
7819
8217
|
/**
|
|
7820
8218
|
* Closes the SpotterViz panel.
|
|
8219
|
+
* Payload: none.
|
|
7821
8220
|
* @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
|
|
7822
8221
|
* @example
|
|
7823
8222
|
* ```js
|
|
@@ -7828,6 +8227,7 @@ export declare enum HostEvent {
|
|
|
7828
8227
|
/**
|
|
7829
8228
|
* Clears browser cache and fetches new data for liveboard ChartViz Containers.
|
|
7830
8229
|
* Requires `enableLiveboardDataCache` to be enabled.
|
|
8230
|
+
* Payload: {@link ScheduleEmailRequest}.
|
|
7831
8231
|
* @example
|
|
7832
8232
|
* ```js
|
|
7833
8233
|
* liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
|
|
@@ -9860,85 +10260,381 @@ export declare enum Action {
|
|
|
9860
10260
|
* disabledActions: [Action.SpotterOnLiveboard]
|
|
9861
10261
|
* ```
|
|
9862
10262
|
*/
|
|
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 {
|
|
10263
|
+
SpotterOnLiveboard = "spotterOnLiveboard",
|
|
9916
10264
|
/**
|
|
9917
|
-
*
|
|
9918
|
-
* in
|
|
10265
|
+
* Controls the visibility and disabled state of the "Chart Type" menu item
|
|
10266
|
+
* in Chart Settings V2.
|
|
10267
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10268
|
+
* @example
|
|
10269
|
+
* ```js
|
|
10270
|
+
* {
|
|
10271
|
+
* hiddenActions: [Action.ChartTypeSettings],
|
|
10272
|
+
* disabledActions: [Action.ChartTypeSettings],
|
|
10273
|
+
* }
|
|
10274
|
+
* ```
|
|
9919
10275
|
*/
|
|
9920
|
-
|
|
10276
|
+
ChartTypeSettings = "CHART_TYPE",
|
|
9921
10277
|
/**
|
|
9922
|
-
*
|
|
9923
|
-
*
|
|
10278
|
+
* Controls the visibility and disabled state of the "Layout" menu item
|
|
10279
|
+
* in Chart Settings V2.
|
|
10280
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10281
|
+
* @example
|
|
10282
|
+
* ```js
|
|
10283
|
+
* {
|
|
10284
|
+
* hiddenActions: [Action.LayoutSettings],
|
|
10285
|
+
* disabledActions: [Action.LayoutSettings],
|
|
10286
|
+
* }
|
|
10287
|
+
* ```
|
|
9924
10288
|
*/
|
|
9925
|
-
|
|
10289
|
+
LayoutSettings = "LAYOUT",
|
|
9926
10290
|
/**
|
|
9927
|
-
*
|
|
9928
|
-
*
|
|
9929
|
-
*
|
|
9930
|
-
*
|
|
9931
|
-
*
|
|
10291
|
+
* Controls the visibility and disabled state of the "Column" menu item
|
|
10292
|
+
* in Chart Settings V2.
|
|
10293
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10294
|
+
* @example
|
|
10295
|
+
* ```js
|
|
10296
|
+
* {
|
|
10297
|
+
* hiddenActions: [Action.ColumnSettings],
|
|
10298
|
+
* disabledActions: [Action.ColumnSettings],
|
|
10299
|
+
* }
|
|
10300
|
+
* ```
|
|
9932
10301
|
*/
|
|
9933
|
-
|
|
9934
|
-
|
|
9935
|
-
|
|
9936
|
-
|
|
9937
|
-
|
|
9938
|
-
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
10302
|
+
ColumnSettings = "COLUMN",
|
|
10303
|
+
/**
|
|
10304
|
+
* Controls the visibility and disabled state of the "Axis" menu item
|
|
10305
|
+
* in Chart Settings V2.
|
|
10306
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10307
|
+
* @example
|
|
10308
|
+
* ```js
|
|
10309
|
+
* {
|
|
10310
|
+
* hiddenActions: [Action.AxisSettings],
|
|
10311
|
+
* disabledActions: [Action.AxisSettings],
|
|
10312
|
+
* }
|
|
10313
|
+
* ```
|
|
10314
|
+
*/
|
|
10315
|
+
AxisSettings = "AXIS",
|
|
10316
|
+
/**
|
|
10317
|
+
* Controls the visibility and disabled state of the "Data Label" menu item
|
|
10318
|
+
* in Chart Settings V2.
|
|
10319
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10320
|
+
* @example
|
|
10321
|
+
* ```js
|
|
10322
|
+
* {
|
|
10323
|
+
* hiddenActions: [Action.DataLabelSettings],
|
|
10324
|
+
* disabledActions: [Action.DataLabelSettings],
|
|
10325
|
+
* }
|
|
10326
|
+
* ```
|
|
10327
|
+
*/
|
|
10328
|
+
DataLabelSettings = "DATA_LABEL",
|
|
10329
|
+
/**
|
|
10330
|
+
* Controls the visibility and disabled state of the "Tooltip" menu item
|
|
10331
|
+
* in Chart Settings V2.
|
|
10332
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10333
|
+
* @example
|
|
10334
|
+
* ```js
|
|
10335
|
+
* {
|
|
10336
|
+
* hiddenActions: [Action.TooltipSettings],
|
|
10337
|
+
* disabledActions: [Action.TooltipSettings],
|
|
10338
|
+
* }
|
|
10339
|
+
* ```
|
|
10340
|
+
*/
|
|
10341
|
+
TooltipSettings = "TOOLTIP",
|
|
10342
|
+
/**
|
|
10343
|
+
* Controls the visibility and disabled state of the "Legend" menu item
|
|
10344
|
+
* in Chart Settings V2.
|
|
10345
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10346
|
+
* @example
|
|
10347
|
+
* ```js
|
|
10348
|
+
* {
|
|
10349
|
+
* hiddenActions: [Action.LegendSettings],
|
|
10350
|
+
* disabledActions: [Action.LegendSettings],
|
|
10351
|
+
* }
|
|
10352
|
+
* ```
|
|
10353
|
+
*/
|
|
10354
|
+
LegendSettings = "LEGEND",
|
|
10355
|
+
/**
|
|
10356
|
+
* Controls the visibility and disabled state of the "Display" menu item
|
|
10357
|
+
* in Chart Settings V2.
|
|
10358
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10359
|
+
* @example
|
|
10360
|
+
* ```js
|
|
10361
|
+
* {
|
|
10362
|
+
* hiddenActions: [Action.DisplaySettings],
|
|
10363
|
+
* disabledActions: [Action.DisplaySettings],
|
|
10364
|
+
* }
|
|
10365
|
+
* ```
|
|
10366
|
+
*/
|
|
10367
|
+
DisplaySettings = "DISPLAY",
|
|
10368
|
+
/**
|
|
10369
|
+
* Controls the visibility and disabled state of the "Query Details" menu
|
|
10370
|
+
* item in Chart Settings V2.
|
|
10371
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10372
|
+
* @example
|
|
10373
|
+
* ```js
|
|
10374
|
+
* {
|
|
10375
|
+
* hiddenActions: [Action.QuerySettings],
|
|
10376
|
+
* disabledActions: [Action.QuerySettings],
|
|
10377
|
+
* }
|
|
10378
|
+
* ```
|
|
10379
|
+
*/
|
|
10380
|
+
QuerySettings = "QUERY_DETAILS",
|
|
10381
|
+
/**
|
|
10382
|
+
* Controls the visibility and disabled state of the "Custom Action" menu
|
|
10383
|
+
* item in Chart Settings V2.
|
|
10384
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10385
|
+
* @example
|
|
10386
|
+
* ```js
|
|
10387
|
+
* {
|
|
10388
|
+
* hiddenActions: [Action.CustomSettings],
|
|
10389
|
+
* disabledActions: [Action.CustomSettings],
|
|
10390
|
+
* }
|
|
10391
|
+
* ```
|
|
10392
|
+
*/
|
|
10393
|
+
CustomSettings = "CUSTOM_ACTION",
|
|
10394
|
+
/**
|
|
10395
|
+
* Controls the visibility and disabled state of the "Muze AI" menu item
|
|
10396
|
+
* in Chart Settings V2.
|
|
10397
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10398
|
+
* @example
|
|
10399
|
+
* ```js
|
|
10400
|
+
* {
|
|
10401
|
+
* hiddenActions: [Action.MuzeAiSettings],
|
|
10402
|
+
* disabledActions: [Action.MuzeAiSettings],
|
|
10403
|
+
* }
|
|
10404
|
+
* ```
|
|
10405
|
+
*/
|
|
10406
|
+
MuzeAiSettings = "MUZE_AI",
|
|
10407
|
+
/**
|
|
10408
|
+
* Controls the visibility and disabled state of the "R Analysis" menu item
|
|
10409
|
+
* in Chart Settings V2.
|
|
10410
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
10411
|
+
* @example
|
|
10412
|
+
* ```js
|
|
10413
|
+
* {
|
|
10414
|
+
* hiddenActions: [Action.RAnalysisSettings],
|
|
10415
|
+
* disabledActions: [Action.RAnalysisSettings],
|
|
10416
|
+
* }
|
|
10417
|
+
* ```
|
|
10418
|
+
*/
|
|
10419
|
+
RAnalysisSettings = "R_ANALYSIS",
|
|
10420
|
+
/**
|
|
10421
|
+
* Controls the visibility and disabled state of the "Add to Collection" menu item.
|
|
10422
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10423
|
+
* @example
|
|
10424
|
+
* ```js
|
|
10425
|
+
* {
|
|
10426
|
+
* hiddenActions: [Action.AddToCollection],
|
|
10427
|
+
* disabledActions: [Action.AddToCollection],
|
|
10428
|
+
* }
|
|
10429
|
+
* ```
|
|
10430
|
+
*/
|
|
10431
|
+
AddToCollection = "addToCollection",
|
|
10432
|
+
/**
|
|
10433
|
+
* Controls the visibility and disabled state of the "Create Collection" button.
|
|
10434
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10435
|
+
* @example
|
|
10436
|
+
* ```js
|
|
10437
|
+
* {
|
|
10438
|
+
* hiddenActions: [Action.CreateCollection],
|
|
10439
|
+
* disabledActions: [Action.CreateCollection],
|
|
10440
|
+
* }
|
|
10441
|
+
* ```
|
|
10442
|
+
*/
|
|
10443
|
+
CreateCollection = "createCollection",
|
|
10444
|
+
/**
|
|
10445
|
+
* Controls the visibility and disabled state of the "Move" menu item in a
|
|
10446
|
+
* Collection.
|
|
10447
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10448
|
+
* @example
|
|
10449
|
+
* ```js
|
|
10450
|
+
* {
|
|
10451
|
+
* hiddenActions: [Action.MoveToCollection],
|
|
10452
|
+
* disabledActions: [Action.MoveToCollection],
|
|
10453
|
+
* }
|
|
10454
|
+
* ```
|
|
10455
|
+
*/
|
|
10456
|
+
MoveToCollection = "moveToCollection",
|
|
10457
|
+
/**
|
|
10458
|
+
* Controls the visibility and disabled state of the "Remove" menu item in a
|
|
10459
|
+
* Collection.
|
|
10460
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10461
|
+
* @example
|
|
10462
|
+
* ```js
|
|
10463
|
+
* {
|
|
10464
|
+
* hiddenActions: [Action.RemoveFromCollection],
|
|
10465
|
+
* disabledActions: [Action.RemoveFromCollection],
|
|
10466
|
+
* }
|
|
10467
|
+
* ```
|
|
10468
|
+
*/
|
|
10469
|
+
RemoveFromCollection = "removeFromCollection",
|
|
10470
|
+
/**
|
|
10471
|
+
* Controls the visibility and disabled state of the "Delete" menu item for a
|
|
10472
|
+
* Collection.
|
|
10473
|
+
* @version SDK: 1.52.1 | ThoughtSpot Cloud: 26.5.0.cl
|
|
10474
|
+
* @example
|
|
10475
|
+
* ```js
|
|
10476
|
+
* {
|
|
10477
|
+
* hiddenActions: [Action.DeleteCollection],
|
|
10478
|
+
* disabledActions: [Action.DeleteCollection],
|
|
10479
|
+
* }
|
|
10480
|
+
* ```
|
|
10481
|
+
*/
|
|
10482
|
+
DeleteCollection = "deleteCollection",
|
|
10483
|
+
/**
|
|
10484
|
+
* Controls the visibility of the "Customize homepage" button on the
|
|
10485
|
+
* embedded home page.
|
|
10486
|
+
* @version SDK: 1.55.0 | ThoughtSpot Cloud: 26.12.0.cl
|
|
10487
|
+
* @example
|
|
10488
|
+
* ```js
|
|
10489
|
+
* {
|
|
10490
|
+
* hiddenActions: [Action.CustomizeHomepage],
|
|
10491
|
+
* }
|
|
10492
|
+
* ```
|
|
10493
|
+
*/
|
|
10494
|
+
CustomizeHomepage = "customizeHomepage"
|
|
10495
|
+
}
|
|
10496
|
+
export declare enum PrefetchFeatures {
|
|
10497
|
+
FullApp = "FullApp",
|
|
10498
|
+
SearchEmbed = "SearchEmbed",
|
|
10499
|
+
LiveboardEmbed = "LiveboardEmbed",
|
|
10500
|
+
VizEmbed = "VizEmbed"
|
|
10501
|
+
}
|
|
10502
|
+
declare enum ContextMenuTriggerOptions {
|
|
10503
|
+
LEFT_CLICK = "left-click",
|
|
10504
|
+
RIGHT_CLICK = "right-click",
|
|
10505
|
+
BOTH_CLICKS = "both-clicks"
|
|
10506
|
+
}
|
|
10507
|
+
export interface ColumnValue {
|
|
10508
|
+
column: {
|
|
10509
|
+
id: string;
|
|
10510
|
+
name: string;
|
|
10511
|
+
dataType: string;
|
|
10512
|
+
[key: string]: any;
|
|
10513
|
+
};
|
|
10514
|
+
value: string | number | boolean | {
|
|
10515
|
+
v: {
|
|
10516
|
+
s: number;
|
|
10517
|
+
e: number;
|
|
10518
|
+
};
|
|
10519
|
+
};
|
|
10520
|
+
}
|
|
10521
|
+
export interface VizPoint {
|
|
10522
|
+
selectedAttributes: ColumnValue[];
|
|
10523
|
+
selectedMeasures: ColumnValue[];
|
|
10524
|
+
}
|
|
10525
|
+
/**
|
|
10526
|
+
* @group Events
|
|
10527
|
+
*/
|
|
10528
|
+
export interface CustomActionPayload {
|
|
10529
|
+
/**
|
|
10530
|
+
* Id of the custom action that was triggered. Matches the `id` you set on
|
|
10531
|
+
* the {@link CustomAction}. Omitted on Liveboard-level code-based actions.
|
|
10532
|
+
*/
|
|
10533
|
+
id?: string;
|
|
10534
|
+
contextMenuPoints?: {
|
|
10535
|
+
clickedPoint: VizPoint;
|
|
10536
|
+
selectedPoints: VizPoint[];
|
|
10537
|
+
};
|
|
10538
|
+
embedAnswerData: {
|
|
10539
|
+
name: string;
|
|
10540
|
+
id: string;
|
|
10541
|
+
sources: {
|
|
10542
|
+
header: {
|
|
10543
|
+
guid: string;
|
|
10544
|
+
};
|
|
10545
|
+
};
|
|
10546
|
+
columns: any[];
|
|
10547
|
+
data: any[];
|
|
10548
|
+
[key: string]: any;
|
|
10549
|
+
};
|
|
10550
|
+
session: SessionInterface;
|
|
10551
|
+
vizId?: string;
|
|
10552
|
+
}
|
|
10553
|
+
/**
|
|
10554
|
+
* A code-based custom action to inject into the embedded ThoughtSpot UI.
|
|
10555
|
+
* Pass an array of these as `customActions` in the embed view config. When a
|
|
10556
|
+
* user invokes the action, the host emits {@link EmbedEvent.CustomAction} with
|
|
10557
|
+
* a {@link CustomActionPayload} carrying the same `id`.
|
|
10558
|
+
*/
|
|
10559
|
+
export interface CustomAction {
|
|
10560
|
+
/**
|
|
10561
|
+
* Display label shown on the action's button or menu item.
|
|
10562
|
+
*/
|
|
10563
|
+
name: string;
|
|
10564
|
+
/**
|
|
10565
|
+
* Unique identifier for the action. Echoed back as `id` on the
|
|
10566
|
+
* {@link CustomActionPayload} when the action is invoked.
|
|
10567
|
+
*/
|
|
10568
|
+
id: string;
|
|
10569
|
+
/**
|
|
10570
|
+
* Where the action appears: a primary button, the "More" menu, or the
|
|
10571
|
+
* right-click context menu. See {@link CustomActionsPosition}.
|
|
10572
|
+
*/
|
|
10573
|
+
position: CustomActionsPosition;
|
|
10574
|
+
/**
|
|
10575
|
+
* The surface the action applies to (Liveboard, visualization, Answer, or
|
|
10576
|
+
* Spotter). See {@link CustomActionTarget}. The allowed `position` values
|
|
10577
|
+
* and scoping keys depend on the target.
|
|
10578
|
+
*/
|
|
10579
|
+
target: CustomActionTarget;
|
|
10580
|
+
/**
|
|
10581
|
+
* Scope the action to specific objects by GUID. Which keys are allowed
|
|
10582
|
+
* depends on `target` (for example, a `VIZ` action may use `answerIds`,
|
|
10583
|
+
* `liveboardIds`, and `vizIds`).
|
|
10584
|
+
*/
|
|
10585
|
+
metadataIds?: {
|
|
10586
|
+
answerIds?: string[];
|
|
10587
|
+
liveboardIds?: string[];
|
|
10588
|
+
vizIds?: string[];
|
|
10589
|
+
};
|
|
10590
|
+
/**
|
|
10591
|
+
* Scope the action by data model, using model GUIDs or column names.
|
|
10592
|
+
* Allowed for `VIZ`, `ANSWER`, and `SPOTTER` targets.
|
|
10593
|
+
*/
|
|
10594
|
+
dataModelIds?: {
|
|
10595
|
+
modelIds?: string[];
|
|
10596
|
+
modelColumnNames?: string[];
|
|
10597
|
+
};
|
|
10598
|
+
/**
|
|
10599
|
+
* Restrict the action to specific organizations by ID.
|
|
10600
|
+
*/
|
|
10601
|
+
orgIds?: string[];
|
|
10602
|
+
/**
|
|
10603
|
+
* Restrict the action to specific user groups by ID.
|
|
10604
|
+
*/
|
|
10605
|
+
groupIds?: string[];
|
|
10606
|
+
}
|
|
10607
|
+
/**
|
|
10608
|
+
* Enum options to show custom actions at different
|
|
10609
|
+
* positions in the application.
|
|
10610
|
+
*/
|
|
10611
|
+
export declare enum CustomActionsPosition {
|
|
10612
|
+
/**
|
|
10613
|
+
* Shows the action as a primary button
|
|
10614
|
+
* in the toolbar area of the embed.
|
|
10615
|
+
*/
|
|
10616
|
+
PRIMARY = "PRIMARY",
|
|
10617
|
+
/**
|
|
10618
|
+
* Shows the action inside the "More" menu
|
|
10619
|
+
* (three-dot overflow menu).
|
|
10620
|
+
*/
|
|
10621
|
+
MENU = "MENU",
|
|
10622
|
+
/**
|
|
10623
|
+
* Shows the action in the right-click
|
|
10624
|
+
* context menu. Only supported for
|
|
10625
|
+
* {@link CustomActionTarget.VIZ},
|
|
10626
|
+
* {@link CustomActionTarget.ANSWER}, and
|
|
10627
|
+
* {@link CustomActionTarget.SPOTTER} targets.
|
|
10628
|
+
*/
|
|
10629
|
+
CONTEXTMENU = "CONTEXTMENU"
|
|
10630
|
+
}
|
|
10631
|
+
/**
|
|
10632
|
+
* Enum options to mention the target of the code-based custom action.
|
|
10633
|
+
* The target determines which type of ThoughtSpot object the action is
|
|
10634
|
+
* associated with, and also controls which positions and scoping options
|
|
10635
|
+
* are available.
|
|
10636
|
+
*/
|
|
10637
|
+
export declare enum CustomActionTarget {
|
|
9942
10638
|
/**
|
|
9943
10639
|
* Action applies at the Liveboard level.
|
|
9944
10640
|
* Supported positions:
|
|
@@ -10757,6 +11453,166 @@ export interface VisualizationOverrides {
|
|
|
10757
11453
|
/** Table visualization overrides */
|
|
10758
11454
|
table?: TableOverrides;
|
|
10759
11455
|
}
|
|
11456
|
+
/**
|
|
11457
|
+
* The configuration object for the full-height behavior shared by the
|
|
11458
|
+
* Liveboard and app embeds.
|
|
11459
|
+
*
|
|
11460
|
+
* When `fullHeight` is enabled the SDK resizes the embed container to match the
|
|
11461
|
+
* height reported by the ThoughtSpot app, and — when lazy loading is also
|
|
11462
|
+
* enabled — keeps the app informed of the portion of the embed that is
|
|
11463
|
+
* currently visible so that visualizations load on demand.
|
|
11464
|
+
*/
|
|
11465
|
+
export interface FullHeightViewConfig {
|
|
11466
|
+
/**
|
|
11467
|
+
* If set to true, the embedded object container dynamically resizes
|
|
11468
|
+
* according to the height of the Liveboard.
|
|
11469
|
+
*
|
|
11470
|
+
* **Note**: Using fullHeight loads all visualizations on the
|
|
11471
|
+
* Liveboard simultaneously, which results in multiple warehouse
|
|
11472
|
+
* queries and potentially a longer wait for the topmost
|
|
11473
|
+
* visualizations to display on the screen.
|
|
11474
|
+
* Setting `fullHeight` to `false` fetches visualizations
|
|
11475
|
+
* incrementally as users scroll the page to view the charts and tables.
|
|
11476
|
+
*
|
|
11477
|
+
* From SDK 1.52.0, enabling `fullHeight` also turns on
|
|
11478
|
+
* {@link lazyLoadingForFullHeight} and
|
|
11479
|
+
* {@link enableScrollableContainerLazyLoading}, so visualizations load as
|
|
11480
|
+
* they scroll into view. Set either flag to `false` to opt out.
|
|
11481
|
+
*
|
|
11482
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11483
|
+
* @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
|
|
11484
|
+
* @example
|
|
11485
|
+
* ```js
|
|
11486
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11487
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11488
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11489
|
+
* ... // other view config
|
|
11490
|
+
* fullHeight: true,
|
|
11491
|
+
* });
|
|
11492
|
+
* ```
|
|
11493
|
+
*/
|
|
11494
|
+
fullHeight?: boolean;
|
|
11495
|
+
/**
|
|
11496
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
11497
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
11498
|
+
* other screens navigable from a Liveboard.
|
|
11499
|
+
*
|
|
11500
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11501
|
+
* @version SDK: 1.44.2 | ThoughtSpot: 10.15.0.cl
|
|
11502
|
+
* @default 500
|
|
11503
|
+
* @example
|
|
11504
|
+
* ```js
|
|
11505
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11506
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11507
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11508
|
+
* ... // other view config
|
|
11509
|
+
* fullHeight: true,
|
|
11510
|
+
* minimumHeight: 600,
|
|
11511
|
+
* });
|
|
11512
|
+
* ```
|
|
11513
|
+
*/
|
|
11514
|
+
minimumHeight?: number;
|
|
11515
|
+
/**
|
|
11516
|
+
* This is the minimum height (in pixels) for a full-height Liveboard.
|
|
11517
|
+
* Setting this height helps resolve issues with empty Liveboards and
|
|
11518
|
+
* other screens navigable from a Liveboard.
|
|
11519
|
+
*
|
|
11520
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11521
|
+
* @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
|
|
11522
|
+
* @deprecated Use `minimumHeight` instead.
|
|
11523
|
+
* @default 500
|
|
11524
|
+
* @example
|
|
11525
|
+
* ```js
|
|
11526
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11527
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11528
|
+
* const embed = new <EmbedComponent>('#embed', {
|
|
11529
|
+
* ... // other view config
|
|
11530
|
+
* fullHeight: true,
|
|
11531
|
+
* defaultHeight: 600,
|
|
11532
|
+
* });
|
|
11533
|
+
* ```
|
|
11534
|
+
*/
|
|
11535
|
+
defaultHeight?: number;
|
|
11536
|
+
/**
|
|
11537
|
+
* Loads visualizations only as they scroll into the viewport, instead of
|
|
11538
|
+
* loading the whole full-height Liveboard at once.
|
|
11539
|
+
*
|
|
11540
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
11541
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
11542
|
+
* set explicitly. Set it to `false` to load every visualization upfront.
|
|
11543
|
+
* The flag has no effect unless `fullHeight` is enabled.
|
|
11544
|
+
*
|
|
11545
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11546
|
+
* @type {boolean}
|
|
11547
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
11548
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
11549
|
+
* @example
|
|
11550
|
+
* ```js
|
|
11551
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11552
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11553
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
11554
|
+
* // ...other options
|
|
11555
|
+
* fullHeight: true,
|
|
11556
|
+
* lazyLoadingForFullHeight: true,
|
|
11557
|
+
* })
|
|
11558
|
+
* ```
|
|
11559
|
+
*/
|
|
11560
|
+
lazyLoadingForFullHeight?: boolean;
|
|
11561
|
+
/**
|
|
11562
|
+
* How far outside the viewport a visualization starts loading, when
|
|
11563
|
+
* {@link lazyLoadingForFullHeight} is enabled.
|
|
11564
|
+
*
|
|
11565
|
+
* For example, if the margin is set to '10px',
|
|
11566
|
+
* the visualization will be loaded 10px before its top edge is visible in the
|
|
11567
|
+
* viewport.
|
|
11568
|
+
*
|
|
11569
|
+
* The format is similar to CSS margin, so `'500px 0px'` extends the
|
|
11570
|
+
* prefetch 500px above and below the viewport and not sideways. Accepted
|
|
11571
|
+
* units are `px`, `em`, `rem`, `%`, `vh` and `vw`, plus bare `0` and
|
|
11572
|
+
* `auto`; an invalid value is logged and ignored.
|
|
11573
|
+
*
|
|
11574
|
+
* From SDK 1.52.0 this defaults to `'500px 0px'` — roughly one
|
|
11575
|
+
* visualization ahead of the scroll position, so a chart has usually
|
|
11576
|
+
* finished loading by the time it scrolls into view. Use a smaller margin
|
|
11577
|
+
* to cut warehouse queries further, or `'0px'` to load a visualization
|
|
11578
|
+
* only once it is actually visible.
|
|
11579
|
+
*
|
|
11580
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11581
|
+
* @type {string}
|
|
11582
|
+
* @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
|
|
11583
|
+
* @default '500px 0px' when `fullHeight` is enabled, from SDK 1.52.0
|
|
11584
|
+
* @example
|
|
11585
|
+
* ```js
|
|
11586
|
+
* // Replace <EmbedComponent> with the embed component name.
|
|
11587
|
+
* // For example, AppEmbed or LiveboardEmbed
|
|
11588
|
+
* const embed = new <EmbedComponent>('#embed-container', {
|
|
11589
|
+
* // ...other options
|
|
11590
|
+
* fullHeight: true,
|
|
11591
|
+
* lazyLoadingForFullHeight: true,
|
|
11592
|
+
* // With 0px, the visualization only starts loading once it is
|
|
11593
|
+
* // visible in the viewport.
|
|
11594
|
+
* lazyLoadingMargin: '0px',
|
|
11595
|
+
* })
|
|
11596
|
+
* ```
|
|
11597
|
+
*/
|
|
11598
|
+
lazyLoadingMargin?: string;
|
|
11599
|
+
/**
|
|
11600
|
+
* Computes the visible region of the embed against its scrollable and
|
|
11601
|
+
* clipping ancestors, instead of treating the browser window as the only
|
|
11602
|
+
* viewport, and tracks scroll and resize on those ancestors.
|
|
11603
|
+
*
|
|
11604
|
+
* From SDK 1.52.0 this is enabled automatically whenever `fullHeight` is
|
|
11605
|
+
* `true`. On SDK 1.51.0 and earlier it defaulted to `false` and had to be
|
|
11606
|
+
* set explicitly. Set it to `false` when the page scrolls with the window
|
|
11607
|
+
* and the embed has no clipping ancestor, to skip the extra ancestor
|
|
11608
|
+
* tracking.
|
|
11609
|
+
*
|
|
11610
|
+
* Supported embed types: `LiveboardEmbed`, `AppEmbed`
|
|
11611
|
+
* @type {boolean}
|
|
11612
|
+
* @default true when `fullHeight` is enabled, from SDK 1.52.0
|
|
11613
|
+
*/
|
|
11614
|
+
enableScrollableContainerLazyLoading?: boolean;
|
|
11615
|
+
}
|
|
10760
11616
|
/**
|
|
10761
11617
|
* Enum for auth failure types.
|
|
10762
11618
|
* This value is passed to the listener for {@link AuthStatus.FAILURE}.
|
|
@@ -10918,234 +11774,409 @@ export declare enum AuthEvent {
|
|
|
10918
11774
|
*/
|
|
10919
11775
|
TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
|
|
10920
11776
|
}
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
11777
|
+
/**
|
|
11778
|
+
* Request for host events that MAY target a specific visualization.
|
|
11779
|
+
* Omitting vizId targets the current answer/liveboard as a whole.
|
|
11780
|
+
* (In some contexts, e.g. Spotter, the app requires vizId at runtime.)
|
|
11781
|
+
*/
|
|
11782
|
+
export interface VizScopedRequest {
|
|
11783
|
+
vizId?: string;
|
|
10925
11784
|
}
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
11785
|
+
/**
|
|
11786
|
+
* Request for host events that MUST target a specific visualization.
|
|
11787
|
+
*/
|
|
11788
|
+
export interface RequiredVizRequest {
|
|
11789
|
+
vizId: string;
|
|
11790
|
+
}
|
|
11791
|
+
/**
|
|
11792
|
+
* Request for Spotter conversation-scoped host events.
|
|
11793
|
+
*/
|
|
11794
|
+
export interface ConversationScopedRequest {
|
|
11795
|
+
conversationId: string;
|
|
11796
|
+
}
|
|
11797
|
+
/**
|
|
11798
|
+
* Request payload for {@link HostEvent.OpenFilter}. Field requirements
|
|
11799
|
+
* vary by context (Search requires columnId/type/dataType/name); the
|
|
11800
|
+
* contract is the cross-context superset — the app validates per context
|
|
11801
|
+
* at runtime. Per-context views: {@link OpenFilterLiveboardRequest},
|
|
11802
|
+
* {@link OpenFilterSpotterRequest}, {@link OpenFilterSearchRequest}.
|
|
11803
|
+
*/
|
|
11804
|
+
export interface OpenFilterRequest {
|
|
11805
|
+
column: {
|
|
11806
|
+
columnId?: string;
|
|
11807
|
+
columnName?: string;
|
|
11808
|
+
type?: string;
|
|
11809
|
+
dataType?: string;
|
|
11810
|
+
name?: string;
|
|
11811
|
+
isStrictDateColumn?: boolean;
|
|
11812
|
+
};
|
|
11813
|
+
applicability?: Applicability;
|
|
11814
|
+
visualizationId?: string;
|
|
11815
|
+
liveboardId?: string;
|
|
11816
|
+
}
|
|
11817
|
+
/**
|
|
11818
|
+
* `OpenFilter` in Liveboard context: full column plus scoping fields.
|
|
11819
|
+
* A per-context view of {@link OpenFilterRequest} (documentation only today;
|
|
11820
|
+
* `trigger()` accepts the superset).
|
|
11821
|
+
*/
|
|
11822
|
+
export interface OpenFilterLiveboardRequest {
|
|
11823
|
+
column: {
|
|
11824
|
+
columnId?: string;
|
|
11825
|
+
columnName?: string;
|
|
11826
|
+
};
|
|
11827
|
+
applicability?: Applicability;
|
|
11828
|
+
visualizationId?: string;
|
|
11829
|
+
liveboardId?: string;
|
|
11830
|
+
}
|
|
11831
|
+
/**
|
|
11832
|
+
* `OpenFilter` in Spotter context: only the column identity is accepted.
|
|
11833
|
+
*/
|
|
11834
|
+
export interface OpenFilterSpotterRequest {
|
|
11835
|
+
column: {
|
|
11836
|
+
columnId?: string;
|
|
11837
|
+
columnName?: string;
|
|
11838
|
+
};
|
|
11839
|
+
}
|
|
11840
|
+
/**
|
|
11841
|
+
* `OpenFilter` in Search/Answer context: column identity plus column metadata.
|
|
11842
|
+
*/
|
|
11843
|
+
export interface OpenFilterSearchRequest {
|
|
11844
|
+
column: {
|
|
11845
|
+
columnId?: string;
|
|
11846
|
+
columnName?: string;
|
|
11847
|
+
type?: string;
|
|
11848
|
+
dataType?: string;
|
|
11849
|
+
name?: string;
|
|
11850
|
+
isStrictDateColumn?: boolean;
|
|
11851
|
+
};
|
|
11852
|
+
}
|
|
11853
|
+
/**
|
|
11854
|
+
* Request payload for {@link HostEvent.DrillDown}. Drills on selected or
|
|
11855
|
+
* clicked points of a visualization. In Liveboard context `vizId` is required
|
|
11856
|
+
* at runtime (documentation only today; `trigger()` is not yet type-enforced).
|
|
11857
|
+
*/
|
|
11858
|
+
export interface DrillDownRequest {
|
|
11859
|
+
points: {
|
|
11860
|
+
clickedPoint?: object;
|
|
11861
|
+
selectedPoints?: object[];
|
|
11862
|
+
};
|
|
11863
|
+
columnGuid?: string;
|
|
11864
|
+
autoDrillDown?: boolean;
|
|
11865
|
+
vizId?: string;
|
|
11866
|
+
}
|
|
11867
|
+
/**
|
|
11868
|
+
* Request payload for {@link HostEvent.OpenParameter}. One of parameterId
|
|
11869
|
+
* or parameterName must be provided (validated at runtime).
|
|
11870
|
+
*/
|
|
11871
|
+
export interface OpenParameterRequest {
|
|
11872
|
+
parameter: {
|
|
11873
|
+
parameterId?: string;
|
|
11874
|
+
parameterName?: string;
|
|
11875
|
+
};
|
|
11876
|
+
applicability?: Applicability;
|
|
11877
|
+
}
|
|
11878
|
+
/**
|
|
11879
|
+
* Request payload for {@link HostEvent.Search}.
|
|
11880
|
+
*/
|
|
11881
|
+
export interface SearchRequest {
|
|
11882
|
+
searchQuery: string;
|
|
11883
|
+
dataSources: string[];
|
|
11884
|
+
execute?: boolean;
|
|
11885
|
+
}
|
|
11886
|
+
/**
|
|
11887
|
+
* Request payload for {@link HostEvent.SpotterSearch}.
|
|
11888
|
+
*/
|
|
11889
|
+
export interface SpotterSearchRequest {
|
|
11890
|
+
query: string;
|
|
11891
|
+
executeSearch: boolean;
|
|
11892
|
+
}
|
|
11893
|
+
/**
|
|
11894
|
+
* A single cross-filter condition for {@link HostEvent.UpdateCrossFilter}.
|
|
11895
|
+
*/
|
|
11896
|
+
export interface CrossFilterCondition {
|
|
11897
|
+
columnName?: string;
|
|
11898
|
+
operator?: string;
|
|
11899
|
+
values: Array<string | number | boolean>;
|
|
11900
|
+
}
|
|
11901
|
+
/**
|
|
11902
|
+
* Request payload for {@link HostEvent.UpdateCrossFilter}.
|
|
11903
|
+
*/
|
|
11904
|
+
export interface UpdateCrossFilterRequest {
|
|
11905
|
+
vizId: string;
|
|
11906
|
+
conditions: CrossFilterCondition[];
|
|
11907
|
+
}
|
|
11908
|
+
/**
|
|
11909
|
+
* The column to filter on. Supply `columnName`. A filter with no column is
|
|
11910
|
+
* rejected at runtime, and passing both spellings silently discards the
|
|
11911
|
+
* `column` one.
|
|
11912
|
+
*
|
|
11913
|
+
* When several columns share a name, qualify it as
|
|
11914
|
+
* `WORKSHEET_NAME::COLUMN_NAME`, for example
|
|
11915
|
+
* `"(Sample) Retail - Apparel::city"`.
|
|
11916
|
+
*/
|
|
11917
|
+
export type HostFilterUpdateColumn = {
|
|
11918
|
+
/**
|
|
11919
|
+
* Name of the column to filter on, optionally qualified as
|
|
11920
|
+
* `WORKSHEET_NAME::COLUMN_NAME`.
|
|
11921
|
+
*/
|
|
11922
|
+
columnName: string;
|
|
11923
|
+
column?: never;
|
|
11924
|
+
} | {
|
|
11925
|
+
/**
|
|
11926
|
+
* @deprecated Use `columnName`, which matches {@link RuntimeFilter} and
|
|
11927
|
+
* the rest of the SDK. Still accepted, but not alongside `columnName`.
|
|
11928
|
+
*/
|
|
11929
|
+
column: string;
|
|
11930
|
+
columnName?: never;
|
|
11931
|
+
};
|
|
11932
|
+
/**
|
|
11933
|
+
* The filter operator. Supply `operator`. A filter with no operator is
|
|
11934
|
+
* rejected at runtime, and passing both spellings silently discards the
|
|
11935
|
+
* `oper` one.
|
|
11936
|
+
*/
|
|
11937
|
+
export type HostFilterUpdateOperator = {
|
|
11938
|
+
/** Filter operator, for example EQ, IN, CONTAINS. */
|
|
11939
|
+
operator: string;
|
|
11940
|
+
oper?: never;
|
|
11941
|
+
} | {
|
|
11942
|
+
/**
|
|
11943
|
+
* @deprecated Use `operator`, which matches {@link RuntimeFilter} and
|
|
11944
|
+
* the rest of the SDK. Still accepted, but not alongside `operator`.
|
|
11945
|
+
*/
|
|
11946
|
+
oper: string;
|
|
11947
|
+
operator?: never;
|
|
11948
|
+
};
|
|
11949
|
+
/**
|
|
11950
|
+
* A single filter entry for {@link HostEvent.UpdateFilters}.
|
|
11951
|
+
*
|
|
11952
|
+
* Use `columnName` and `operator` - the spelling used by
|
|
11953
|
+
* {@link RuntimeFilter} and by the payload
|
|
11954
|
+
* `convertFilterChangedToUpdateFiltersPayload` produces.
|
|
11955
|
+
*/
|
|
11956
|
+
export type HostFilterUpdate = HostFilterUpdateColumn & HostFilterUpdateOperator & {
|
|
11957
|
+
columnId?: string;
|
|
11958
|
+
values: Array<string | number | boolean | bigint>;
|
|
11959
|
+
type?: string;
|
|
11960
|
+
datePeriod?: string;
|
|
11961
|
+
negate?: boolean;
|
|
11962
|
+
applicability?: Applicability;
|
|
11963
|
+
};
|
|
11964
|
+
/**
|
|
11965
|
+
* Request payload for {@link HostEvent.UpdateFilters} (singular or plural
|
|
11966
|
+
* form).
|
|
11967
|
+
*/
|
|
11968
|
+
export interface UpdateFiltersRequest {
|
|
11969
|
+
filter?: HostFilterUpdate;
|
|
11970
|
+
filters?: HostFilterUpdate[];
|
|
11971
|
+
/**
|
|
11972
|
+
* Scope the update to a specific visualization on a Liveboard.
|
|
11973
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11974
|
+
*/
|
|
11975
|
+
visualizationId?: string;
|
|
11976
|
+
/**
|
|
11977
|
+
* Scope the update to a specific Liveboard.
|
|
11978
|
+
* @version SDK: 1.52.0 | ThoughtSpot Cloud: 26.9.0.cl
|
|
11979
|
+
*/
|
|
11980
|
+
liveboardId?: string;
|
|
10930
11981
|
}
|
|
10931
11982
|
/**
|
|
10932
|
-
*
|
|
11983
|
+
* Request payload for personalised-view host events.
|
|
10933
11984
|
*/
|
|
10934
|
-
export
|
|
10935
|
-
|
|
10936
|
-
|
|
10937
|
-
Group = "GROUP"
|
|
11985
|
+
export interface PersonalisedViewRequest {
|
|
11986
|
+
viewId?: string;
|
|
11987
|
+
viewName?: string;
|
|
10938
11988
|
}
|
|
10939
11989
|
/**
|
|
10940
|
-
*
|
|
10941
|
-
* At `LIVEBOARD` level the filter applies to the whole Liveboard, so `targetId`
|
|
10942
|
-
* is not required.
|
|
11990
|
+
* Request payload for schedule-email related host events.
|
|
10943
11991
|
*/
|
|
10944
|
-
export interface
|
|
10945
|
-
|
|
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;
|
|
11992
|
+
export interface ScheduleEmailRequest {
|
|
11993
|
+
sendToSelf?: boolean;
|
|
10958
11994
|
}
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
|
|
11995
|
+
/**
|
|
11996
|
+
* Object form of the {@link HostEvent.Navigate} payload.
|
|
11997
|
+
*/
|
|
11998
|
+
export interface NavigateRequest {
|
|
11999
|
+
/**
|
|
12000
|
+
* Route to navigate to, or a history delta such as `1` or `-1`.
|
|
12001
|
+
*/
|
|
12002
|
+
path: string | number;
|
|
12003
|
+
/**
|
|
12004
|
+
* When `true`, replaces the current history entry instead of pushing.
|
|
12005
|
+
*/
|
|
12006
|
+
replace?: boolean;
|
|
10962
12007
|
}
|
|
10963
|
-
|
|
10964
|
-
|
|
10965
|
-
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
|
|
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"
|
|
12008
|
+
/**
|
|
12009
|
+
* Request payload for {@link HostEvent.SetActiveTab}.
|
|
12010
|
+
*/
|
|
12011
|
+
export interface SetActiveTabRequest {
|
|
12012
|
+
/**
|
|
12013
|
+
* Id of the liveboard tab to make active.
|
|
12014
|
+
*/
|
|
12015
|
+
tabId: string;
|
|
10981
12016
|
}
|
|
10982
|
-
|
|
10983
|
-
|
|
10984
|
-
|
|
10985
|
-
|
|
10986
|
-
|
|
10987
|
-
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
|
|
10992
|
-
|
|
10993
|
-
|
|
10994
|
-
|
|
10995
|
-
|
|
10996
|
-
|
|
10997
|
-
|
|
10998
|
-
|
|
10999
|
-
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
|
|
11003
|
-
|
|
11004
|
-
|
|
11005
|
-
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
|
|
11012
|
-
[
|
|
11013
|
-
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
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
|
-
};
|
|
12017
|
+
/**
|
|
12018
|
+
* Typed request payloads for host events that do not go through the UI
|
|
12019
|
+
* passthrough pipeline (`HostEvent` member → request type; `void` = no payload).
|
|
12020
|
+
*
|
|
12021
|
+
* Shapes are transcribed from the host's runtime validation schemas
|
|
12022
|
+
* (embed-util HostEventContract) — what the ThoughtSpot app actually enforces —
|
|
12023
|
+
* flattened across contexts to the permissive superset (context-specific
|
|
12024
|
+
* requirements are validated at runtime).
|
|
12025
|
+
*
|
|
12026
|
+
* Responses are typed only for UI-passthrough-backed events today (see
|
|
12027
|
+
* {@link HostEventResponse}). Add a response map alongside this one when the
|
|
12028
|
+
* first explicit response shape is specified; tightening later is additive.
|
|
12029
|
+
*
|
|
12030
|
+
* Deliberately absent (do not add without an audit):
|
|
12031
|
+
* - DrillDown: the runtime schema (object-shaped points) and the UI
|
|
12032
|
+
* passthrough contract (string-shaped points) disagree — resolve the
|
|
12033
|
+
* drift first.
|
|
12034
|
+
* - GetAnswerSession/GetParameters/GetTML: typed via the UI passthrough
|
|
12035
|
+
* mapping; their Spotter-context vizId requirement is runtime-only.
|
|
12036
|
+
*/
|
|
12037
|
+
export interface HostEventRequestMap {
|
|
12038
|
+
[HostEvent.UpdateRuntimeFilters]: RuntimeFilter[];
|
|
12039
|
+
[HostEvent.UpdateParameters]: RuntimeParameter[];
|
|
12040
|
+
[HostEvent.UpdateFilters]: UpdateFiltersRequest;
|
|
12041
|
+
[HostEvent.UpdateCrossFilter]: UpdateCrossFilterRequest;
|
|
12042
|
+
[HostEvent.OpenFilter]: OpenFilterRequest;
|
|
12043
|
+
[HostEvent.OpenParameter]: OpenParameterRequest;
|
|
12044
|
+
[HostEvent.SetVisibleVizs]: string[];
|
|
12045
|
+
[HostEvent.SetVisibleTabs]: string[];
|
|
12046
|
+
[HostEvent.SetHiddenTabs]: string[];
|
|
12047
|
+
[HostEvent.SetActiveTab]: SetActiveTabRequest;
|
|
12048
|
+
[HostEvent.Navigate]: string | number | NavigateRequest;
|
|
12049
|
+
[HostEvent.Search]: SearchRequest;
|
|
12050
|
+
[HostEvent.ResetSearch]: void;
|
|
12051
|
+
[HostEvent.AddColumns]: {
|
|
12052
|
+
columnIds: string[];
|
|
11088
12053
|
};
|
|
11089
|
-
[
|
|
11090
|
-
|
|
11091
|
-
response: {
|
|
11092
|
-
orderedGroupIds: string[];
|
|
11093
|
-
numberOfGroups: number;
|
|
11094
|
-
Groups: LiveboardGroup[];
|
|
11095
|
-
};
|
|
12054
|
+
[HostEvent.RemoveColumn]: {
|
|
12055
|
+
columnId: string;
|
|
11096
12056
|
};
|
|
11097
|
-
[
|
|
11098
|
-
|
|
11099
|
-
|
|
11100
|
-
|
|
11101
|
-
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
12057
|
+
[HostEvent.Edit]: VizScopedRequest;
|
|
12058
|
+
[HostEvent.Save]: VizScopedRequest;
|
|
12059
|
+
[HostEvent.Delete]: VizScopedRequest;
|
|
12060
|
+
[HostEvent.Share]: VizScopedRequest;
|
|
12061
|
+
[HostEvent.Present]: VizScopedRequest;
|
|
12062
|
+
[HostEvent.CopyLink]: VizScopedRequest;
|
|
12063
|
+
[HostEvent.ExportTML]: VizScopedRequest;
|
|
12064
|
+
[HostEvent.EditTML]: VizScopedRequest;
|
|
12065
|
+
[HostEvent.UpdateTML]: VizScopedRequest;
|
|
12066
|
+
[HostEvent.SchedulesList]: VizScopedRequest;
|
|
12067
|
+
[HostEvent.Schedule]: VizScopedRequest;
|
|
12068
|
+
[HostEvent.SpotIQAnalyze]: VizScopedRequest;
|
|
12069
|
+
[HostEvent.ShowUnderlyingData]: VizScopedRequest;
|
|
12070
|
+
[HostEvent.CreateMonitor]: VizScopedRequest;
|
|
12071
|
+
[HostEvent.ManageMonitor]: VizScopedRequest;
|
|
12072
|
+
[HostEvent.SyncToSheets]: VizScopedRequest;
|
|
12073
|
+
[HostEvent.SyncToOtherApps]: VizScopedRequest;
|
|
12074
|
+
[HostEvent.ManagePipelines]: VizScopedRequest;
|
|
12075
|
+
[HostEvent.DownloadAsPng]: VizScopedRequest;
|
|
12076
|
+
[HostEvent.DownloadAsCsv]: VizScopedRequest;
|
|
12077
|
+
[HostEvent.DownloadAsXlsx]: VizScopedRequest;
|
|
12078
|
+
[HostEvent.DownloadAsPdf]: VizScopedRequest & {
|
|
12079
|
+
liveboardId?: string;
|
|
11105
12080
|
};
|
|
11106
|
-
[
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
12081
|
+
[HostEvent.Explore]: RequiredVizRequest;
|
|
12082
|
+
[HostEvent.AskSage]: RequiredVizRequest;
|
|
12083
|
+
[HostEvent.AskSpotter]: RequiredVizRequest;
|
|
12084
|
+
[HostEvent.AnswerChartSwitcher]: RequiredVizRequest;
|
|
12085
|
+
[HostEvent.UpdatePersonalisedView]: Pick<PersonalisedViewRequest, "viewId">;
|
|
12086
|
+
[HostEvent.SelectPersonalizedView]: PersonalisedViewRequest;
|
|
12087
|
+
[HostEvent.ResetLiveboardPersonalisedView]: void;
|
|
12088
|
+
[HostEvent.AIHighlights]: void;
|
|
12089
|
+
[HostEvent.SendTestScheduleEmail]: ScheduleEmailRequest;
|
|
12090
|
+
[HostEvent.RefreshLiveboardBrowserCache]: ScheduleEmailRequest;
|
|
12091
|
+
[HostEvent.SpotterSearch]: SpotterSearchRequest;
|
|
12092
|
+
[HostEvent.ResetSpotterConversation]: void;
|
|
12093
|
+
[HostEvent.ShareSpotterConversation]: ConversationScopedRequest;
|
|
12094
|
+
[HostEvent.CloseSpotterShareConversation]: void;
|
|
12095
|
+
[HostEvent.ExitSpotterSharedConversation]: void;
|
|
12096
|
+
[HostEvent.PinSpotterConversation]: ConversationScopedRequest;
|
|
12097
|
+
[HostEvent.UnpinSpotterConversation]: ConversationScopedRequest;
|
|
12098
|
+
[HostEvent.EditLastPrompt]: string;
|
|
12099
|
+
[HostEvent.DeleteLastPrompt]: void;
|
|
12100
|
+
[HostEvent.PreviewSpotterData]: void;
|
|
12101
|
+
[HostEvent.SpotterVizSendUserMessage]: {
|
|
12102
|
+
query: string;
|
|
11112
12103
|
};
|
|
11113
|
-
[
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
12104
|
+
[HostEvent.InitSpotterVizConversation]: void;
|
|
12105
|
+
[HostEvent.OpenSpotterVizPanel]: void;
|
|
12106
|
+
[HostEvent.CloseSpotterVizPanel]: void;
|
|
12107
|
+
}
|
|
12108
|
+
/**
|
|
12109
|
+
* Per-context request shapes for events whose payload varies by
|
|
12110
|
+
/**
|
|
12111
|
+
* Resolves the typed request payload for a host event.
|
|
12112
|
+
* Resolution order:
|
|
12113
|
+
* 1. Explicitly typed request in {@link HostEventRequestMap}
|
|
12114
|
+
* 2. UI passthrough backed contract ({@link EmbedApiHostEventMapping})
|
|
12115
|
+
* 3. `any` (event not audited/typed yet — backward compatible)
|
|
12116
|
+
*
|
|
12117
|
+
* Requests are the cross-context superset today. The per-context `*Request`
|
|
12118
|
+
* interfaces (e.g. {@link OpenFilterLiveboardRequest}) document how the shape
|
|
12119
|
+
* narrows by context; a later release may thread the caller's context to
|
|
12120
|
+
* enforce it.
|
|
12121
|
+
*/
|
|
12122
|
+
export type HostEventRequest<HostEventT extends HostEvent> = HostEventT extends keyof HostEventRequestMap ? HostEventRequestMap[HostEventT] : HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughRequest<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
12123
|
+
/**
|
|
12124
|
+
* Resolves the typed response payload for a host event. Only UI passthrough
|
|
12125
|
+
* backed events have typed responses today; everything else resolves to `any`.
|
|
12126
|
+
*/
|
|
12127
|
+
export type HostEventResponse<HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = HostEventT extends keyof EmbedApiHostEventMapping ? UIPassthroughResponse<EmbedApiHostEventMapping[HostEventT]> : any;
|
|
12128
|
+
/**
|
|
12129
|
+
* Payload type accepted by `embed.trigger()`. Keeps the historical
|
|
12130
|
+
* `PayloadT` escape hatch so untyped existing call sites keep compiling.
|
|
12131
|
+
*/
|
|
12132
|
+
export type TriggerPayload<PayloadT, HostEventT extends HostEvent> = PayloadT | HostEventRequest<HostEventT>;
|
|
12133
|
+
/**
|
|
12134
|
+
* Deep `Partial` of a request type: every field optional at every depth, with no
|
|
12135
|
+
* index signature — so object literals carrying unknown fields are flagged.
|
|
12136
|
+
*/
|
|
12137
|
+
export type DeepPartial<T> = T extends (infer U)[] ? DeepPartial<U>[] : T extends object ? {
|
|
12138
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
12139
|
+
} : T;
|
|
12140
|
+
/**
|
|
12141
|
+
* `trigger()`'s `data` type: an all-optional view of the event's request type.
|
|
12142
|
+
* See {@link HostEventRequest} and the `*Request` interfaces, e.g. {@link SearchRequest}.
|
|
12143
|
+
* No-payload events take `{}`. SDK 1.54.0 makes this strict (required fields enforced).
|
|
12144
|
+
*/
|
|
12145
|
+
export type TriggerData<HostEventT extends HostEvent> = HostEventRequest<HostEventT> extends void ? Record<string, never> : DeepPartial<HostEventRequest<HostEventT>>;
|
|
12146
|
+
/**
|
|
12147
|
+
* Response type returned by `embed.trigger()`.
|
|
12148
|
+
*/
|
|
12149
|
+
export type TriggerResponse<PayloadT, HostEventT extends HostEvent, ContextT extends ContextType = ContextType> = PayloadT extends HostEventRequest<HostEventT> ? HostEventResponse<HostEventT, ContextT> : any;
|
|
12150
|
+
/**
|
|
12151
|
+
* Typed `data` field per embed event. Seed with audited events only.
|
|
12152
|
+
*/
|
|
12153
|
+
export interface EmbedEventDataExtension {
|
|
12154
|
+
[EmbedEvent.AuthInit]: {
|
|
12155
|
+
/**
|
|
12156
|
+
* Whether authentication was successful.
|
|
12157
|
+
*/
|
|
12158
|
+
isLoggedIn?: boolean;
|
|
12159
|
+
[key: string]: any;
|
|
11124
12160
|
};
|
|
12161
|
+
[EmbedEvent.EmbedListenerReady]: Record<string, any>;
|
|
12162
|
+
/**
|
|
12163
|
+
* Fired when a callback-type custom action is triggered. Use
|
|
12164
|
+
* `payload.data.id` to identify which action fired.
|
|
12165
|
+
*/
|
|
12166
|
+
[EmbedEvent.CustomAction]: CustomActionPayload;
|
|
12167
|
+
}
|
|
12168
|
+
/**
|
|
12169
|
+
* Resolves the typed `data` payload for an embed event; `any` when the
|
|
12170
|
+
* event has not been audited/typed yet.
|
|
12171
|
+
*/
|
|
12172
|
+
export type EmbedEventData<EmbedEventT extends EmbedEvent> = EmbedEventT extends keyof EmbedEventDataExtension ? EmbedEventDataExtension[EmbedEventT] : any;
|
|
12173
|
+
/**
|
|
12174
|
+
* Full envelope delivered to `embed.on()` callbacks for a given event:
|
|
12175
|
+
* the wire fields (`type`, `status`) plus the typed `data`.
|
|
12176
|
+
*/
|
|
12177
|
+
export type EmbedEventPayload<EmbedEventT extends EmbedEvent> = Omit<MessagePayload, "data"> & {
|
|
12178
|
+
data: EmbedEventData<EmbedEventT>;
|
|
11125
12179
|
};
|
|
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
12180
|
declare class HostEventClient {
|
|
11150
12181
|
iFrame: HTMLIFrameElement;
|
|
11151
12182
|
/** Cached list of available UI passthrough keys from the embedded app */
|
|
@@ -11188,14 +12219,14 @@ declare class HostEventClient {
|
|
|
11188
12219
|
protected handleDrillDownEvent(payload: HostEventRequest<HostEvent.DrillDown>, context?: ContextType): Promise<any>;
|
|
11189
12220
|
/**
|
|
11190
12221
|
* Dispatches a host event using the appropriate channel:
|
|
11191
|
-
* 1. If the embedded app supports UI passthrough for this event, use it (custom
|
|
11192
|
-
* 2. Otherwise fall back to the legacy host event channel.
|
|
12222
|
+
* 1. If the embedded app supports UI passthrough for this event, use it (custom
|
|
12223
|
+
* handler or getter). 2. Otherwise fall back to the legacy host event channel.
|
|
11193
12224
|
*
|
|
11194
12225
|
* @param hostEvent - The host event to trigger
|
|
11195
12226
|
* @param payload - Optional payload for the event
|
|
11196
12227
|
* @param context - Optional context (e.g. vizId) for scoped operations
|
|
11197
12228
|
*/
|
|
11198
|
-
triggerHostEvent<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(hostEvent: HostEventT, payload?: TriggerPayload<PayloadT, HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT,
|
|
12229
|
+
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
12230
|
}
|
|
11200
12231
|
declare class TsEmbed {
|
|
11201
12232
|
/**
|
|
@@ -11213,6 +12244,7 @@ declare class TsEmbed {
|
|
|
11213
12244
|
* The key to store the embed instance in the DOM node
|
|
11214
12245
|
*/
|
|
11215
12246
|
protected embedNodeKey: string;
|
|
12247
|
+
protected embedContainerLoadedKey: string;
|
|
11216
12248
|
protected isAppInitialized: boolean;
|
|
11217
12249
|
/**
|
|
11218
12250
|
* A reference to the iframe within which the ThoughtSpot app
|
|
@@ -11382,10 +12414,10 @@ declare class TsEmbed {
|
|
|
11382
12414
|
*/
|
|
11383
12415
|
protected getEmbedBasePath(query: string): string;
|
|
11384
12416
|
protected getUpdateEmbedParamsObject(): Promise<{
|
|
11385
|
-
customisations: CustomisationsInterface;
|
|
11386
|
-
authToken: string;
|
|
11387
12417
|
runtimeFilterParams: string;
|
|
11388
12418
|
runtimeParameterParams: string;
|
|
12419
|
+
customisations: CustomisationsInterface;
|
|
12420
|
+
authToken: string;
|
|
11389
12421
|
hiddenHomepageModules: HomepageModule[];
|
|
11390
12422
|
reorderedHomepageModules: string[];
|
|
11391
12423
|
hostConfig: Record<string, any>;
|
|
@@ -11478,6 +12510,7 @@ declare class TsEmbed {
|
|
|
11478
12510
|
protected getV1EmbedBasePath(queryString: string): string;
|
|
11479
12511
|
protected getEmbedParams(): string;
|
|
11480
12512
|
protected getEmbedParamsObject(): Record<any, any>;
|
|
12513
|
+
protected getUrlQueryParamsObject(): Record<any, any>;
|
|
11481
12514
|
protected getRootIframeSrc(): string;
|
|
11482
12515
|
protected createIframeEl(frameSrc: string): HTMLIFrameElement;
|
|
11483
12516
|
/**
|
|
@@ -11578,21 +12611,6 @@ declare class TsEmbed {
|
|
|
11578
12611
|
* or else the v2 event type itself
|
|
11579
12612
|
*/
|
|
11580
12613
|
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
12614
|
/**
|
|
11597
12615
|
* Registers an event listener to trigger an alert when the ThoughtSpot app
|
|
11598
12616
|
* sends an event of a particular message type to the host application.
|
|
@@ -11616,7 +12634,7 @@ declare class TsEmbed {
|
|
|
11616
12634
|
* });
|
|
11617
12635
|
* ```
|
|
11618
12636
|
*/
|
|
11619
|
-
on(messageType:
|
|
12637
|
+
on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions, isRegisteredBySDK?: boolean): typeof TsEmbed.prototype;
|
|
11620
12638
|
/**
|
|
11621
12639
|
* Removes an event listener for a particular event type.
|
|
11622
12640
|
* @param messageType The message type
|
|
@@ -11652,6 +12670,8 @@ declare class TsEmbed {
|
|
|
11652
12670
|
*/
|
|
11653
12671
|
private embedContainerReadyCallbacks;
|
|
11654
12672
|
protected getPreRenderObj<T extends TsEmbed>(): T;
|
|
12673
|
+
protected takeOverPreRender(): void;
|
|
12674
|
+
private markEmbedContainerLoaded;
|
|
11655
12675
|
private checkEmbedContainerLoaded;
|
|
11656
12676
|
private executeEmbedContainerReadyCallbacks;
|
|
11657
12677
|
/**
|
|
@@ -11662,8 +12682,12 @@ declare class TsEmbed {
|
|
|
11662
12682
|
protected createEmbedContainerHandler: (source: EmbedEvent.AuthInit | EmbedEvent.EmbedListenerReady) => () => void;
|
|
11663
12683
|
/**
|
|
11664
12684
|
* Triggers an event to the embedded app
|
|
12685
|
+
*
|
|
12686
|
+
* Payload typing: from SDK 1.52.0 (ThoughtSpot Cloud 26.9.0.cl), unknown fields
|
|
12687
|
+
* on a known event's payload fail to compile. From SDK 1.54.0 (26.11.0.cl) the
|
|
12688
|
+
* payload is checked strictly against the event contract — update call sites now.
|
|
11665
12689
|
* @param {HostEvent} messageType The event type
|
|
11666
|
-
* @param {
|
|
12690
|
+
* @param {TriggerData} data The payload, typed against the event's contract
|
|
11667
12691
|
* @param {ContextType} context Optional context type to specify the context from which the event is triggered.
|
|
11668
12692
|
* Use ContextType.Search for search answer context, ContextType.Answer for answer/explore context,
|
|
11669
12693
|
* ContextType.Liveboard for liveboard context, or ContextType.Spotter for spotter context.
|
|
@@ -11680,7 +12704,7 @@ declare class TsEmbed {
|
|
|
11680
12704
|
* ```
|
|
11681
12705
|
* @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl (for context parameter)
|
|
11682
12706
|
*/
|
|
11683
|
-
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?:
|
|
12707
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
11684
12708
|
/**
|
|
11685
12709
|
* Triggers an event to the embedded app, skipping the UI flow.
|
|
11686
12710
|
* @param {UIPassthroughEvent} apiName - The name of the API to be triggered.
|
|
@@ -11782,6 +12806,9 @@ declare class TsEmbed {
|
|
|
11782
12806
|
* @returns
|
|
11783
12807
|
*/
|
|
11784
12808
|
prerenderGeneric(): Promise<any>;
|
|
12809
|
+
protected preRenderParamsApplied: Promise<void>;
|
|
12810
|
+
protected isConfigExcludedFromUrl(): boolean;
|
|
12811
|
+
protected triggerUpdateEmbedParams(): Promise<void>;
|
|
11785
12812
|
protected beforePrerenderVisible(): void;
|
|
11786
12813
|
/**
|
|
11787
12814
|
* Displays the pre-rendered component inside the host element.
|
|
@@ -11860,7 +12887,7 @@ declare class V1Embed extends TsEmbed {
|
|
|
11860
12887
|
* });
|
|
11861
12888
|
* ```
|
|
11862
12889
|
*/
|
|
11863
|
-
on(messageType:
|
|
12890
|
+
on<EmbedEventT extends EmbedEvent>(messageType: EmbedEventT, callback: (payload: EmbedEventPayload<EmbedEventT>, responder?: (data: any) => void) => void, options?: MessageOptions): typeof TsEmbed.prototype;
|
|
11864
12891
|
/**
|
|
11865
12892
|
* Only for testing purposes.
|
|
11866
12893
|
* @hidden
|
|
@@ -12022,6 +13049,20 @@ export interface SearchViewConfig extends SearchLiveboardCommonViewConfig, Omit<
|
|
|
12022
13049
|
* ```
|
|
12023
13050
|
*/
|
|
12024
13051
|
dataSource?: string;
|
|
13052
|
+
/**
|
|
13053
|
+
* If set to `true`, the answer edit panel is hidden.
|
|
13054
|
+
*
|
|
13055
|
+
* Supported embed types: `SearchEmbed`
|
|
13056
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
13057
|
+
* @example
|
|
13058
|
+
* ```js
|
|
13059
|
+
* const embed = new SearchEmbed('#tsEmbed', {
|
|
13060
|
+
* ... // other embed view config
|
|
13061
|
+
* hideAnswerEditPanel: true,
|
|
13062
|
+
* })
|
|
13063
|
+
* ```
|
|
13064
|
+
*/
|
|
13065
|
+
hideAnswerEditPanel?: boolean;
|
|
12025
13066
|
/**
|
|
12026
13067
|
* The initial search query to load the answer with.
|
|
12027
13068
|
* Use {@link searchOptions} instead.
|
|
@@ -13102,6 +14143,7 @@ export interface SpotterAppInitData extends DefaultAppInitData {
|
|
|
13102
14143
|
spotterShareConversationConfig?: SpotterShareConversationConfig;
|
|
13103
14144
|
visualOverridesParams?: VisualizationOverrides | null;
|
|
13104
14145
|
starterPrompts?: StarterPromptsConfig;
|
|
14146
|
+
spotterAnalystConfig?: SpotterAnalystConfig;
|
|
13105
14147
|
};
|
|
13106
14148
|
}
|
|
13107
14149
|
declare class SpotterEmbed extends TsEmbed {
|
|
@@ -13398,7 +14440,7 @@ export interface DiscoveryExperience {
|
|
|
13398
14440
|
* The view configuration for full app embedding.
|
|
13399
14441
|
* @group Embed components
|
|
13400
14442
|
*/
|
|
13401
|
-
export interface AppViewConfig extends AllEmbedViewConfig {
|
|
14443
|
+
export interface AppViewConfig extends AllEmbedViewConfig, FullHeightViewConfig {
|
|
13402
14444
|
/**
|
|
13403
14445
|
* If true, the top navigation bar within the ThoughtSpot app
|
|
13404
14446
|
* is displayed. By default, the navigation bar is hidden.
|
|
@@ -13683,34 +14725,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13683
14725
|
* ```
|
|
13684
14726
|
*/
|
|
13685
14727
|
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
14728
|
/**
|
|
13715
14729
|
* Enables the V2 navigation and modular home page experience.
|
|
13716
14730
|
* For more information,
|
|
@@ -13851,9 +14865,10 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13851
14865
|
*/
|
|
13852
14866
|
isPNGInScheduledEmailsEnabled?: boolean;
|
|
13853
14867
|
/**
|
|
13854
|
-
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
|
|
13855
|
-
* following the exact UI layout, instead of splitting
|
|
13856
|
-
* This feature is GA from SDK version
|
|
14868
|
+
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
|
|
14869
|
+
* rendered on a single page following the exact UI layout, instead of splitting
|
|
14870
|
+
* visualizations across multiple A4 pages. This feature is GA from SDK version
|
|
14871
|
+
* 1.51.0 and ThoughtSpot version 26.8.0.cl.
|
|
13857
14872
|
*
|
|
13858
14873
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
13859
14874
|
* @type {boolean}
|
|
@@ -13877,106 +14892,34 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
13877
14892
|
* @type {boolean}
|
|
13878
14893
|
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
13879
14894
|
* @default true
|
|
13880
|
-
* @example
|
|
13881
|
-
* ```js
|
|
13882
|
-
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
13883
|
-
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
13884
|
-
* ... // other embed view config
|
|
13885
|
-
* isLiveboardXLSXCSVDownloadEnabled: true,
|
|
13886
|
-
* })
|
|
13887
|
-
* ```
|
|
13888
|
-
*/
|
|
13889
|
-
isLiveboardXLSXCSVDownloadEnabled?: boolean;
|
|
13890
|
-
/**
|
|
13891
|
-
* This flag is used to enable/disable the granular XLSX/CSV schedules feature
|
|
13892
|
-
* This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl
|
|
13893
|
-
*
|
|
13894
|
-
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
13895
|
-
* @type {boolean}
|
|
13896
|
-
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
13897
|
-
* @default true
|
|
13898
|
-
* @example
|
|
13899
|
-
* ```js
|
|
13900
|
-
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
13901
|
-
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
13902
|
-
* ... // other embed view config
|
|
13903
|
-
* isGranularXLSXCSVSchedulesEnabled: true,
|
|
13904
|
-
* })
|
|
13905
|
-
* ```
|
|
13906
|
-
*/
|
|
13907
|
-
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,
|
|
14895
|
+
* @example
|
|
14896
|
+
* ```js
|
|
14897
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
14898
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
14899
|
+
* ... // other embed view config
|
|
14900
|
+
* isLiveboardXLSXCSVDownloadEnabled: true,
|
|
13926
14901
|
* })
|
|
13927
14902
|
* ```
|
|
13928
14903
|
*/
|
|
13929
|
-
|
|
14904
|
+
isLiveboardXLSXCSVDownloadEnabled?: boolean;
|
|
13930
14905
|
/**
|
|
13931
|
-
*
|
|
13932
|
-
*
|
|
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.
|
|
14906
|
+
* This flag is used to enable/disable the granular XLSX/CSV schedules feature
|
|
14907
|
+
* This feature is GA from SDK version 1.51.0 and ThoughtSpot version 26.6.0.cl
|
|
13940
14908
|
*
|
|
14909
|
+
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
13941
14910
|
* @type {boolean}
|
|
13942
|
-
* @
|
|
13943
|
-
* @
|
|
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
|
|
14911
|
+
* @version SDK: 1.46.0 | ThoughtSpot: 26.3.0.cl
|
|
14912
|
+
* @default true
|
|
13968
14913
|
* @example
|
|
13969
14914
|
* ```js
|
|
13970
|
-
*
|
|
13971
|
-
*
|
|
13972
|
-
*
|
|
13973
|
-
*
|
|
13974
|
-
* // Using 0px, the visualization will be only loaded when it's visible in the viewport.
|
|
13975
|
-
* lazyLoadingMargin: '0px',
|
|
14915
|
+
* // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
|
|
14916
|
+
* const embed = new <EmbedComponent>('#tsEmbed', {
|
|
14917
|
+
* ... // other embed view config
|
|
14918
|
+
* isGranularXLSXCSVSchedulesEnabled: true,
|
|
13976
14919
|
* })
|
|
13977
14920
|
* ```
|
|
13978
14921
|
*/
|
|
13979
|
-
|
|
14922
|
+
isGranularXLSXCSVSchedulesEnabled?: boolean;
|
|
13980
14923
|
/**
|
|
13981
14924
|
* updatedSpotterChatPrompt : Controls the updated spotter chat prompt.
|
|
13982
14925
|
*
|
|
@@ -14164,23 +15107,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
14164
15107
|
* @default false
|
|
14165
15108
|
*/
|
|
14166
15109
|
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
15110
|
/**
|
|
14185
15111
|
* To enable the homepage announcement banner.
|
|
14186
15112
|
* Controls the visibility of the announcement section
|
|
@@ -14230,6 +15156,20 @@ export interface AppViewConfig extends AllEmbedViewConfig {
|
|
|
14230
15156
|
* ```
|
|
14231
15157
|
*/
|
|
14232
15158
|
updatedSpotterExperience?: boolean;
|
|
15159
|
+
/**
|
|
15160
|
+
* If set to `true`, the answer edit panel is hidden.
|
|
15161
|
+
*
|
|
15162
|
+
* Supported embed types: `AppEmbed`
|
|
15163
|
+
* @version SDK: 1.54.0 | ThoughtSpot Cloud: 26.11.0.cl
|
|
15164
|
+
* @example
|
|
15165
|
+
* ```js
|
|
15166
|
+
* const embed = new AppEmbed('#tsEmbed', {
|
|
15167
|
+
* ... // other embed view config
|
|
15168
|
+
* hideAnswerEditPanel: true,
|
|
15169
|
+
* })
|
|
15170
|
+
* ```
|
|
15171
|
+
*/
|
|
15172
|
+
hideAnswerEditPanel?: boolean;
|
|
14233
15173
|
}
|
|
14234
15174
|
/**
|
|
14235
15175
|
* APP_INIT data shape for AppEmbed.
|
|
@@ -14245,9 +15185,7 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
|
|
|
14245
15185
|
}
|
|
14246
15186
|
declare class AppEmbed extends V1Embed {
|
|
14247
15187
|
protected viewConfig: AppViewConfig;
|
|
14248
|
-
private
|
|
14249
|
-
private lazyLoadScrollContainers;
|
|
14250
|
-
private lazyLoadResizeObserver;
|
|
15188
|
+
private readonly fullHeightController?;
|
|
14251
15189
|
constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
|
|
14252
15190
|
/**
|
|
14253
15191
|
* Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
|
|
@@ -14268,27 +15206,11 @@ declare class AppEmbed extends V1Embed {
|
|
|
14268
15206
|
*/
|
|
14269
15207
|
protected getEmbedParams(): string;
|
|
14270
15208
|
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
15209
|
/**
|
|
14280
15210
|
* Constructs the URL of the ThoughtSpot app page to be rendered.
|
|
14281
15211
|
* @param pageId The ID of the page to be embedded.
|
|
14282
15212
|
*/
|
|
14283
15213
|
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
15214
|
/**
|
|
14293
15215
|
* Gets the ThoughtSpot route of the page for a particular page ID.
|
|
14294
15216
|
* @param pageId The identifier for a page in the ThoughtSpot app.
|
|
@@ -14319,8 +15241,6 @@ declare class AppEmbed extends V1Embed {
|
|
|
14319
15241
|
*/
|
|
14320
15242
|
destroy(): void;
|
|
14321
15243
|
private postRender;
|
|
14322
|
-
private registerLazyLoadEvents;
|
|
14323
|
-
private unregisterLazyLoadEvents;
|
|
14324
15244
|
/**
|
|
14325
15245
|
* Renders the embedded application pages in the ThoughtSpot app.
|
|
14326
15246
|
* @param renderOptions An object containing the page ID
|
|
@@ -14342,71 +15262,7 @@ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
|
|
|
14342
15262
|
* The configuration for the embedded Liveboard or visualization page view.
|
|
14343
15263
|
* @group Embed components
|
|
14344
15264
|
*/
|
|
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;
|
|
15265
|
+
export interface LiveboardViewConfig extends BaseViewConfig, FullHeightViewConfig, SearchLiveboardCommonViewConfig, LiveboardAppEmbedViewConfig {
|
|
14410
15266
|
/**
|
|
14411
15267
|
* If set to true, the context menu in visualizations will be enabled.
|
|
14412
15268
|
* @version SDK: 1.1.0 | ThoughtSpot: 8.1.0.sw
|
|
@@ -14696,9 +15552,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14696
15552
|
*/
|
|
14697
15553
|
isPNGInScheduledEmailsEnabled?: boolean;
|
|
14698
15554
|
/**
|
|
14699
|
-
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
|
|
14700
|
-
* following the exact UI layout, instead of splitting
|
|
14701
|
-
* This feature is GA from SDK version
|
|
15555
|
+
* Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is
|
|
15556
|
+
* rendered on a single page following the exact UI layout, instead of splitting
|
|
15557
|
+
* visualizations across multiple A4 pages. This feature is GA from SDK version
|
|
15558
|
+
* 1.51.0 and ThoughtSpot version 26.8.0.cl.
|
|
14702
15559
|
*
|
|
14703
15560
|
* Supported embed types: `AppEmbed`, `LiveboardEmbed`
|
|
14704
15561
|
* @type {boolean}
|
|
@@ -14750,77 +15607,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14750
15607
|
* ```
|
|
14751
15608
|
*/
|
|
14752
15609
|
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
15610
|
/**
|
|
14825
15611
|
* showSpotterLimitations : show limitation text
|
|
14826
15612
|
* of the spotter underneath the chat input.
|
|
@@ -14959,9 +15745,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
|
|
|
14959
15745
|
}
|
|
14960
15746
|
declare class LiveboardEmbed extends V1Embed {
|
|
14961
15747
|
protected viewConfig: LiveboardViewConfig;
|
|
14962
|
-
private
|
|
14963
|
-
private lazyLoadScrollContainers;
|
|
14964
|
-
private lazyLoadResizeObserver;
|
|
15748
|
+
private readonly fullHeightController?;
|
|
14965
15749
|
constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
|
|
14966
15750
|
protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
|
|
14967
15751
|
/**
|
|
@@ -14971,27 +15755,11 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
14971
15755
|
protected getEmbedParams(): string;
|
|
14972
15756
|
protected getEmbedParamsObject(): any;
|
|
14973
15757
|
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
15758
|
/**
|
|
14983
15759
|
* Construct the URL of the embedded ThoughtSpot Liveboard or visualization
|
|
14984
15760
|
* to be loaded within the iFrame.
|
|
14985
15761
|
*/
|
|
14986
15762
|
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
15763
|
private setActiveTab;
|
|
14996
15764
|
private showPreviewLoader;
|
|
14997
15765
|
/**
|
|
@@ -15006,22 +15774,23 @@ declare class LiveboardEmbed extends V1Embed {
|
|
|
15006
15774
|
personalizedViewId: string;
|
|
15007
15775
|
};
|
|
15008
15776
|
protected beforePrerenderVisible(): void;
|
|
15777
|
+
private isShowingLiveboardRoute;
|
|
15009
15778
|
protected handleRenderForPrerender(): Promise<TsEmbed>;
|
|
15010
15779
|
/**
|
|
15011
15780
|
* Triggers an event to the embedded app
|
|
15781
|
+
* Payload typing follows {@link TsEmbed.trigger}: unknown fields fail to compile
|
|
15782
|
+
* from SDK 1.52.0; strict contract checks land in SDK 1.54.0.
|
|
15012
15783
|
* @param {HostEvent} messageType The event type
|
|
15013
|
-
* @param {
|
|
15784
|
+
* @param {TriggerData} data The payload, typed against the event's contract
|
|
15014
15785
|
* @returns A promise that resolves with the response from the embedded app
|
|
15015
15786
|
*/
|
|
15016
|
-
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?:
|
|
15787
|
+
trigger<HostEventT extends HostEvent, PayloadT = HostEventRequest<HostEventT>, ContextT extends ContextType = ContextType>(messageType: HostEventT, data?: TriggerData<HostEventT>, context?: ContextT): Promise<TriggerResponse<PayloadT, HostEventT, ContextT>>;
|
|
15017
15788
|
/**
|
|
15018
15789
|
* Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
|
|
15019
15790
|
* @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
|
|
15020
15791
|
*/
|
|
15021
15792
|
destroy(): void;
|
|
15022
15793
|
private postRender;
|
|
15023
|
-
private registerLazyLoadEvents;
|
|
15024
|
-
private unregisterLazyLoadEvents;
|
|
15025
15794
|
/**
|
|
15026
15795
|
* Render an embedded ThoughtSpot Liveboard or visualization
|
|
15027
15796
|
* @param renderOptions An object specifying the Liveboard ID,
|
|
@@ -15210,6 +15979,100 @@ declare const getEmbedConfig: () => EmbedConfig;
|
|
|
15210
15979
|
* @param eventProps
|
|
15211
15980
|
*/
|
|
15212
15981
|
export declare function uploadMixpanelEvent(eventId: string, eventProps?: {}): void;
|
|
15982
|
+
export interface FilterChangedFilterContentValue {
|
|
15983
|
+
key?: string | number | boolean | null;
|
|
15984
|
+
}
|
|
15985
|
+
export interface FilterChangedFilterContent {
|
|
15986
|
+
filterType?: string;
|
|
15987
|
+
negate?: boolean;
|
|
15988
|
+
value?: FilterChangedFilterContentValue[];
|
|
15989
|
+
}
|
|
15990
|
+
export interface FilterChangedDateFilterValue {
|
|
15991
|
+
type?: string;
|
|
15992
|
+
op?: string;
|
|
15993
|
+
epoch?: string | number | null;
|
|
15994
|
+
dateRange?: {
|
|
15995
|
+
lowEpoch?: string | number | null;
|
|
15996
|
+
highEpoch?: string | number | null;
|
|
15997
|
+
};
|
|
15998
|
+
monthName?: string;
|
|
15999
|
+
quarterName?: string;
|
|
16000
|
+
yearName?: string;
|
|
16001
|
+
number?: number | null;
|
|
16002
|
+
datePeriod?: string;
|
|
16003
|
+
includeCurrentPeriod?: boolean | null;
|
|
16004
|
+
}
|
|
16005
|
+
export interface FilterChangedDateFilterContent {
|
|
16006
|
+
negate?: boolean;
|
|
16007
|
+
dateFilter?: FilterChangedDateFilterValue;
|
|
16008
|
+
}
|
|
16009
|
+
export interface FilterChangedFilter {
|
|
16010
|
+
filterContent?: FilterChangedFilterContent[];
|
|
16011
|
+
dateFilterContent?: FilterChangedDateFilterContent[];
|
|
16012
|
+
}
|
|
16013
|
+
export interface FilterChangedFilterGroup {
|
|
16014
|
+
columnInfo?: {
|
|
16015
|
+
name?: string;
|
|
16016
|
+
};
|
|
16017
|
+
filters?: FilterChangedFilter[];
|
|
16018
|
+
/**
|
|
16019
|
+
* Scope of the filter - `LIVEBOARD`, `TAB` or `GROUP`. Present from
|
|
16020
|
+
* SDK 1.53.0 / ThoughtSpot 26.10.0.cl. Omitted means Liveboard level.
|
|
16021
|
+
*/
|
|
16022
|
+
applicability?: Applicability;
|
|
16023
|
+
}
|
|
16024
|
+
/**
|
|
16025
|
+
* Shape of the payload received via `LiveboardEmbed.on(EmbedEvent.FilterChanged, ...)`.
|
|
16026
|
+
*/
|
|
16027
|
+
export interface FilterChangedPayload {
|
|
16028
|
+
liveboardFilters?: FilterChangedFilterGroup[];
|
|
16029
|
+
runtimeFilters?: RuntimeFilter[];
|
|
16030
|
+
}
|
|
16031
|
+
export interface UpdateFiltersFilterParam {
|
|
16032
|
+
columnName: string;
|
|
16033
|
+
operator: string;
|
|
16034
|
+
values: (string | number | boolean | bigint)[];
|
|
16035
|
+
type?: string;
|
|
16036
|
+
datePeriod?: string;
|
|
16037
|
+
negate?: boolean;
|
|
16038
|
+
includeCurrentPeriod?: boolean;
|
|
16039
|
+
applicability?: Applicability;
|
|
16040
|
+
}
|
|
16041
|
+
/**
|
|
16042
|
+
* Shape expected by `liveboardEmbed.trigger(HostEvent.UpdateFilters, ...)`.
|
|
16043
|
+
*/
|
|
16044
|
+
export interface UpdateFiltersPayload {
|
|
16045
|
+
filters: UpdateFiltersFilterParam[];
|
|
16046
|
+
}
|
|
16047
|
+
/**
|
|
16048
|
+
* Converts the payload emitted by {@link EmbedEvent.FilterChanged} into the
|
|
16049
|
+
* payload shape expected by {@link HostEvent.UpdateFilters}, so the same
|
|
16050
|
+
* filter state can be captured and re-applied later, for example on a
|
|
16051
|
+
* subsequent page load.
|
|
16052
|
+
*
|
|
16053
|
+
* Both the Liveboard filters and the runtime filters present in the
|
|
16054
|
+
* `FilterChanged` payload are included in the returned `filters` array.
|
|
16055
|
+
*
|
|
16056
|
+
* Note: a column with multiple date-filter conditions (e.g. an OR of two
|
|
16057
|
+
* date ranges) is not guaranteed to round-trip losslessly - `HostEvent.UpdateFilters`
|
|
16058
|
+
* treats date filters as replace-not-merge per column, so only the last
|
|
16059
|
+
* converted entry for such a column will apply.
|
|
16060
|
+
* @param filterChangedPayload The filter state carried by the
|
|
16061
|
+
* `EmbedEvent.FilterChanged` callback, which is `payload.data` - the
|
|
16062
|
+
* callback argument is the event envelope, and the filters sit under its
|
|
16063
|
+
* `data` key.
|
|
16064
|
+
* @example
|
|
16065
|
+
* ```js
|
|
16066
|
+
* let savedFilters;
|
|
16067
|
+
* liveboardEmbed.on(EmbedEvent.FilterChanged, (payload) => {
|
|
16068
|
+
* savedFilters = convertFilterChangedToUpdateFiltersPayload(payload.data);
|
|
16069
|
+
* });
|
|
16070
|
+
*
|
|
16071
|
+
* // later, e.g. after a fresh page load
|
|
16072
|
+
* liveboardEmbed.trigger(HostEvent.UpdateFilters, savedFilters);
|
|
16073
|
+
* ```
|
|
16074
|
+
*/
|
|
16075
|
+
export declare function convertFilterChangedToUpdateFiltersPayload(filterChangedPayload: FilterChangedPayload): UpdateFiltersPayload;
|
|
15213
16076
|
/**
|
|
15214
16077
|
* Resets the auth token and a new token will be fetched on the next request.
|
|
15215
16078
|
* @example
|