@thoughtspot/visual-embed-sdk 1.48.0 → 1.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/css-variables.d.ts +140 -0
  3. package/cjs/src/css-variables.d.ts.map +1 -1
  4. package/cjs/src/embed/app.d.ts +62 -1
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +57 -6
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +191 -1
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/auto-frame-renderer.js +7 -2
  11. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  12. package/cjs/src/embed/auto-frame-renderer.spec.js +385 -6
  13. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  14. package/cjs/src/embed/base.d.ts +1 -0
  15. package/cjs/src/embed/base.d.ts.map +1 -1
  16. package/cjs/src/embed/base.js +13 -1
  17. package/cjs/src/embed/base.js.map +1 -1
  18. package/cjs/src/embed/base.spec.js +21 -0
  19. package/cjs/src/embed/base.spec.js.map +1 -1
  20. package/cjs/src/embed/bodyless-conversation.spec.js +86 -0
  21. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  22. package/cjs/src/embed/conversation.d.ts +16 -1
  23. package/cjs/src/embed/conversation.d.ts.map +1 -1
  24. package/cjs/src/embed/conversation.js +5 -1
  25. package/cjs/src/embed/conversation.js.map +1 -1
  26. package/cjs/src/embed/conversation.spec.js +26 -0
  27. package/cjs/src/embed/conversation.spec.js.map +1 -1
  28. package/cjs/src/embed/liveboard.d.ts +47 -1
  29. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  30. package/cjs/src/embed/liveboard.js +47 -6
  31. package/cjs/src/embed/liveboard.js.map +1 -1
  32. package/cjs/src/embed/liveboard.spec.js +129 -1
  33. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  34. package/cjs/src/embed/spotter-viz-utils.d.ts +85 -0
  35. package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -0
  36. package/cjs/src/embed/spotter-viz-utils.js +17 -0
  37. package/cjs/src/embed/spotter-viz-utils.js.map +1 -0
  38. package/cjs/src/embed/spotter-viz-utils.spec.d.ts +2 -0
  39. package/cjs/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
  40. package/cjs/src/embed/spotter-viz-utils.spec.js +31 -0
  41. package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -0
  42. package/cjs/src/embed/ts-embed.d.ts +58 -38
  43. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  44. package/cjs/src/embed/ts-embed.js +245 -149
  45. package/cjs/src/embed/ts-embed.js.map +1 -1
  46. package/cjs/src/embed/ts-embed.spec.js +369 -123
  47. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  48. package/cjs/src/index.d.ts +2 -1
  49. package/cjs/src/index.d.ts.map +1 -1
  50. package/cjs/src/index.js.map +1 -1
  51. package/cjs/src/react/index.d.ts.map +1 -1
  52. package/cjs/src/react/index.js +3 -0
  53. package/cjs/src/react/index.js.map +1 -1
  54. package/cjs/src/types.d.ts +267 -27
  55. package/cjs/src/types.d.ts.map +1 -1
  56. package/cjs/src/types.js +223 -19
  57. package/cjs/src/types.js.map +1 -1
  58. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +6 -7
  59. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  60. package/cjs/src/utils/logger.js +2 -1
  61. package/cjs/src/utils/logger.js.map +1 -1
  62. package/cjs/src/utils/logger.spec.d.ts +1 -0
  63. package/cjs/src/utils/logger.spec.d.ts.map +1 -1
  64. package/cjs/src/utils/logger.spec.js +10 -9
  65. package/cjs/src/utils/logger.spec.js.map +1 -1
  66. package/cjs/src/utils.d.ts +4 -1
  67. package/cjs/src/utils.d.ts.map +1 -1
  68. package/cjs/src/utils.js +107 -10
  69. package/cjs/src/utils.js.map +1 -1
  70. package/cjs/src/utils.spec.js +163 -4
  71. package/cjs/src/utils.spec.js.map +1 -1
  72. package/dist/{index-Ck-r09gt.js → index-_UGCSSDR.js} +1 -1
  73. package/dist/src/css-variables.d.ts +140 -0
  74. package/dist/src/css-variables.d.ts.map +1 -1
  75. package/dist/src/embed/app.d.ts +62 -1
  76. package/dist/src/embed/app.d.ts.map +1 -1
  77. package/dist/src/embed/base.d.ts +1 -0
  78. package/dist/src/embed/base.d.ts.map +1 -1
  79. package/dist/src/embed/conversation.d.ts +16 -1
  80. package/dist/src/embed/conversation.d.ts.map +1 -1
  81. package/dist/src/embed/liveboard.d.ts +47 -1
  82. package/dist/src/embed/liveboard.d.ts.map +1 -1
  83. package/dist/src/embed/spotter-viz-utils.d.ts +85 -0
  84. package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -0
  85. package/dist/src/embed/spotter-viz-utils.spec.d.ts +2 -0
  86. package/dist/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
  87. package/dist/src/embed/ts-embed.d.ts +58 -38
  88. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  89. package/dist/src/index.d.ts +2 -1
  90. package/dist/src/index.d.ts.map +1 -1
  91. package/dist/src/react/index.d.ts.map +1 -1
  92. package/dist/src/types.d.ts +267 -27
  93. package/dist/src/types.d.ts.map +1 -1
  94. package/dist/src/utils/logger.spec.d.ts +1 -0
  95. package/dist/src/utils/logger.spec.d.ts.map +1 -1
  96. package/dist/src/utils.d.ts +4 -1
  97. package/dist/src/utils.d.ts.map +1 -1
  98. package/dist/tsembed-react.es.js +3708 -3226
  99. package/dist/tsembed-react.js +3358 -2876
  100. package/dist/tsembed.es.js +3713 -3229
  101. package/dist/tsembed.js +3708 -3224
  102. package/dist/visual-embed-sdk-react-full.d.ts +643 -63
  103. package/dist/visual-embed-sdk-react.d.ts +643 -63
  104. package/dist/visual-embed-sdk.d.ts +658 -65
  105. package/lib/package.json +1 -1
  106. package/lib/src/css-variables.d.ts +140 -0
  107. package/lib/src/css-variables.d.ts.map +1 -1
  108. package/lib/src/embed/app.d.ts +62 -1
  109. package/lib/src/embed/app.d.ts.map +1 -1
  110. package/lib/src/embed/app.js +58 -7
  111. package/lib/src/embed/app.js.map +1 -1
  112. package/lib/src/embed/app.spec.js +192 -2
  113. package/lib/src/embed/app.spec.js.map +1 -1
  114. package/lib/src/embed/auto-frame-renderer.js +7 -2
  115. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  116. package/lib/src/embed/auto-frame-renderer.spec.js +387 -8
  117. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  118. package/lib/src/embed/base.d.ts +1 -0
  119. package/lib/src/embed/base.d.ts.map +1 -1
  120. package/lib/src/embed/base.js +11 -0
  121. package/lib/src/embed/base.js.map +1 -1
  122. package/lib/src/embed/base.spec.js +22 -1
  123. package/lib/src/embed/base.spec.js.map +1 -1
  124. package/lib/src/embed/bodyless-conversation.spec.js +86 -0
  125. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  126. package/lib/src/embed/conversation.d.ts +16 -1
  127. package/lib/src/embed/conversation.d.ts.map +1 -1
  128. package/lib/src/embed/conversation.js +5 -1
  129. package/lib/src/embed/conversation.js.map +1 -1
  130. package/lib/src/embed/conversation.spec.js +27 -1
  131. package/lib/src/embed/conversation.spec.js.map +1 -1
  132. package/lib/src/embed/liveboard.d.ts +47 -1
  133. package/lib/src/embed/liveboard.d.ts.map +1 -1
  134. package/lib/src/embed/liveboard.js +48 -7
  135. package/lib/src/embed/liveboard.js.map +1 -1
  136. package/lib/src/embed/liveboard.spec.js +129 -1
  137. package/lib/src/embed/liveboard.spec.js.map +1 -1
  138. package/lib/src/embed/spotter-viz-utils.d.ts +85 -0
  139. package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -0
  140. package/lib/src/embed/spotter-viz-utils.js +13 -0
  141. package/lib/src/embed/spotter-viz-utils.js.map +1 -0
  142. package/lib/src/embed/spotter-viz-utils.spec.d.ts +2 -0
  143. package/lib/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
  144. package/lib/src/embed/spotter-viz-utils.spec.js +29 -0
  145. package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -0
  146. package/lib/src/embed/ts-embed.d.ts +58 -38
  147. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  148. package/lib/src/embed/ts-embed.js +248 -152
  149. package/lib/src/embed/ts-embed.js.map +1 -1
  150. package/lib/src/embed/ts-embed.spec.js +369 -123
  151. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  152. package/lib/src/index.d.ts +2 -1
  153. package/lib/src/index.d.ts.map +1 -1
  154. package/lib/src/index.js.map +1 -1
  155. package/lib/src/react/index.d.ts.map +1 -1
  156. package/lib/src/react/index.js +3 -0
  157. package/lib/src/react/index.js.map +1 -1
  158. package/lib/src/types.d.ts +267 -27
  159. package/lib/src/types.d.ts.map +1 -1
  160. package/lib/src/types.js +223 -19
  161. package/lib/src/types.js.map +1 -1
  162. package/lib/src/utils/authService/tokenizedAuthService.spec.js +6 -7
  163. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  164. package/lib/src/utils/logger.js +2 -1
  165. package/lib/src/utils/logger.js.map +1 -1
  166. package/lib/src/utils/logger.spec.d.ts +1 -0
  167. package/lib/src/utils/logger.spec.d.ts.map +1 -1
  168. package/lib/src/utils/logger.spec.js +10 -9
  169. package/lib/src/utils/logger.spec.js.map +1 -1
  170. package/lib/src/utils.d.ts +4 -1
  171. package/lib/src/utils.d.ts.map +1 -1
  172. package/lib/src/utils.js +103 -9
  173. package/lib/src/utils.js.map +1 -1
  174. package/lib/src/utils.spec.js +164 -5
  175. package/lib/src/utils.spec.js.map +1 -1
  176. package/lib/src/visual-embed-sdk.d.ts +658 -65
  177. package/package.json +1 -1
  178. package/src/css-variables.ts +175 -1
  179. package/src/embed/app.spec.ts +247 -3
  180. package/src/embed/app.ts +125 -5
  181. package/src/embed/auto-frame-renderer.spec.ts +457 -58
  182. package/src/embed/auto-frame-renderer.ts +7 -2
  183. package/src/embed/base.spec.ts +25 -1
  184. package/src/embed/base.ts +19 -5
  185. package/src/embed/bodyless-conversation.spec.ts +93 -0
  186. package/src/embed/conversation.spec.ts +34 -0
  187. package/src/embed/conversation.ts +22 -1
  188. package/src/embed/liveboard.spec.ts +149 -1
  189. package/src/embed/liveboard.ts +102 -6
  190. package/src/embed/spotter-viz-utils.spec.ts +30 -0
  191. package/src/embed/spotter-viz-utils.ts +94 -0
  192. package/src/embed/ts-embed.spec.ts +532 -234
  193. package/src/embed/ts-embed.ts +383 -257
  194. package/src/index.ts +3 -0
  195. package/src/react/index.tsx +3 -0
  196. package/src/types.ts +284 -23
  197. package/src/utils/authService/tokenizedAuthService.spec.ts +6 -6
  198. package/src/utils/logger.spec.ts +11 -9
  199. package/src/utils/logger.ts +2 -2
  200. package/src/utils.spec.ts +200 -4
  201. package/src/utils.ts +128 -9
@@ -819,6 +819,146 @@ export interface CustomCssVariables {
819
819
  * Background color of the color palette in the Liveboard styling panel.
820
820
  */
821
821
  "--ts-var-liveboard-styling-color-palette-background"?: string;
822
+ /**
823
+ * Main panel background of the SpotterViz.
824
+ */
825
+ "--ts-var-spotterviz-panel-background"?: string;
826
+ /**
827
+ * Background color of the chat input field in SpotterViz.
828
+ */
829
+ "--ts-var-spotterviz-input-background"?: string;
830
+ /**
831
+ * Placeholder text color of the chat input field in SpotterViz.
832
+ */
833
+ "--ts-var-spotterviz-input-placeholder-color"?: string;
834
+ /**
835
+ * CTA color of the chat input field in SpotterViz.
836
+ */
837
+ "--ts-var-spotterviz-input-cta-color"?: string;
838
+ /**
839
+ * CTA hover color of the chat input field in SpotterViz.
840
+ */
841
+ "--ts-var-spotterviz-input-cta-hover-color"?: string;
842
+ /**
843
+ * Text color for the SpotterViz label in the empty state, displayed below
844
+ * the SpotterViz icon.
845
+ */
846
+ "--ts-var-spotterviz-emptystate-spotterviz-color"?: string;
847
+ /**
848
+ * Background color of the starter prompt cards in SpotterViz.
849
+ */
850
+ "--ts-var-spotterviz-prompt-card-background"?: string;
851
+ /**
852
+ * Background hover color of the starter prompt cards in SpotterViz.
853
+ */
854
+ "--ts-var-spotterviz-prompt-card-hover-background"?: string;
855
+ /**
856
+ * Primary text color in SpotterViz, also used for tool response text,
857
+ * upvote/downvote buttons, and other primary content.
858
+ */
859
+ "--ts-var-spotterviz-text-primary"?: string;
860
+ /**
861
+ * Secondary text color in SpotterViz.
862
+ */
863
+ "--ts-var-spotterviz-text-secondary"?: string;
864
+ /**
865
+ * Background color of the user chat message bubble in SpotterViz.
866
+ */
867
+ "--ts-var-spotterviz-message-background"?: string;
868
+ /**
869
+ * Hover color for the user chat message expand button in SpotterViz.
870
+ */
871
+ "--ts-var-spotterviz-usermessage-icon-hover"?: string;
872
+ /**
873
+ * Background color of the user chat message expand button in SpotterViz.
874
+ */
875
+ "--ts-var-spotterviz-usermessage-icon-background"?: string;
876
+ /**
877
+ * Color of the thinking step header when in progress in SpotterViz.
878
+ */
879
+ "--ts-var-spotterviz-thinking-inprogress-header-color"?: string;
880
+ /**
881
+ * Color of the thinking step header when completed in SpotterViz.
882
+ */
883
+ "--ts-var-spotterviz-thinking-completed-header-color"?: string;
884
+ /**
885
+ * Color of the final completion indicator icon shown when all work is done.
886
+ * The last green dot which is shown when work is done.
887
+ */
888
+ "--ts-var-spotterviz-thinking-work-done-icon-color"?: string;
889
+ /**
890
+ * Hover background color for the working/work done CTA in SpotterViz.
891
+ */
892
+ "--ts-var-spotterviz-thinking-cta-hover-background"?: string;
893
+ /**
894
+ * Background color of tool call panels in SpotterViz.
895
+ */
896
+ "--ts-var-spotterviz-tool-call-background"?: string;
897
+ /**
898
+ * Color of tool titles and icons in SpotterViz.
899
+ */
900
+ "--ts-var-spotterviz-tool-title-color"?: string;
901
+ /**
902
+ * Border color of tool call panels in SpotterViz.
903
+ */
904
+ "--ts-var-spotterviz-tool-border-color"?: string;
905
+ /**
906
+ * Background color of the JSON input panel inside a tool call in SpotterViz.
907
+ */
908
+ "--ts-var-spotterviz-tool-json-input-background"?: string;
909
+ /**
910
+ * Background color of the upvote/downvote feedback buttons in SpotterViz.
911
+ */
912
+ "--ts-var-spotterviz-tool-feedback-button-background"?: string;
913
+ /**
914
+ * Hover background color of the upvote/downvote feedback buttons in SpotterViz.
915
+ */
916
+ "--ts-var-spotterviz-tool-feedback-button-hover"?: string;
917
+ /**
918
+ * Text color of the JSON input panel inside a tool call in SpotterViz.
919
+ */
920
+ "--ts-var-spotterviz-tool-json-input-color"?: string;
921
+ /**
922
+ * Background color of the last checkpoint section in SpotterViz.
923
+ */
924
+ "--ts-var-spotterviz-last-checkpoint-background"?: string;
925
+ /**
926
+ * Border color of the last checkpoint section in SpotterViz.
927
+ */
928
+ "--ts-var-spotterviz-last-checkpoint-border"?: string;
929
+ /**
930
+ * Border color of the Liveboard edit header toolbar.
931
+ */
932
+ "--ts-var-liveboard-edit-toolbar-border"?: string;
933
+ /**
934
+ * Background color of the selected section in the Liveboard edit header toolbar.
935
+ */
936
+ "--ts-var-liveboard-edit-toolbar-selected-background"?: string;
937
+ /**
938
+ * Text color of the selected section in the Liveboard edit header toolbar.
939
+ */
940
+ "--ts-var-liveboard-edit-toolbar-selected-text-color"?: string;
941
+ /**
942
+ * Text color of unselected items in the Liveboard edit header toolbar.
943
+ */
944
+ "--ts-var-liveboard-edit-toolbar-text"?: string;
945
+ /**
946
+ * Hover background color of unselected items in the Liveboard edit header toolbar.
947
+ */
948
+ "--ts-var-liveboard-edit-toolbar-hover-background"?: string;
949
+ /**
950
+ * Hover text color of unselected items in the Liveboard edit header toolbar.
951
+ */
952
+ "--ts-var-liveboard-edit-toolbar-hover-text-color"?: string;
953
+ /**
954
+ * Text color of the SpotterViz footer.
955
+ */
956
+ "--ts-var-spotterviz-footer-text-color"?: string;
957
+ /**
958
+ * Shared border color used throughout SpotterViz: input box, user message,
959
+ * header underline, left panel border, thinking step connector and dots.
960
+ */
961
+ "--ts-var-spotterviz-border-color"?: string;
822
962
  }
823
963
  export interface SessionInterface {
824
964
  sessionId: string;
@@ -2115,6 +2255,14 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2115
2255
  * This flag can be used to disable links inside the embedded app,
2116
2256
  * and disable redirection of links in a new tab.
2117
2257
  *
2258
+ * Note: When set to `true`, this flag automatically disables
2259
+ * {@link enableLinkOverridesV2} for the
2260
+ * embed session. The two features are mutually exclusive — link
2261
+ * overrides mutate anchors (delete `href`, attach a JS click handler),
2262
+ * which breaks native browser behavior (Cmd/Ctrl+Click, middle-click,
2263
+ * right-click "Open in new tab") when combined with the disable flag.
2264
+ * The disable flag preserves native anchor semantics instead.
2265
+ *
2118
2266
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
2119
2267
  * @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
2120
2268
  * @example
@@ -2150,8 +2298,13 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2150
2298
  * Flag to override the *Open Link in New Tab* context
2151
2299
  * menu option.
2152
2300
  *
2153
- * For improved link override handling, use
2154
- * {@link enableLinkOverridesV2} instead.
2301
+ * Note: Setting this flag implicitly enables
2302
+ * {@link enableLinkOverridesV2}. V1 is auto-upgraded to
2303
+ * V2 to ensure consistent link-override behavior; the
2304
+ * legacy V1-only path is no longer used in isolation.
2305
+ *
2306
+ * Note: This flag is ignored when
2307
+ * {@link disableRedirectionLinksInNewTab} is `true`.
2155
2308
  *
2156
2309
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`,
2157
2310
  * `SearchEmbed`, `SpotterAgentEmbed`,
@@ -2177,6 +2330,9 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2177
2330
  * alongside this flag for backward compatibility with
2178
2331
  * older ThoughtSpot versions.
2179
2332
  *
2333
+ * Note: This flag is ignored when
2334
+ * {@link disableRedirectionLinksInNewTab} is `true`.
2335
+ *
2180
2336
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`,
2181
2337
  * `SearchEmbed`, `SpotterAgentEmbed`,
2182
2338
  * `SpotterEmbed`, `SearchBarEmbed`
@@ -2449,8 +2605,21 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2449
2605
  */
2450
2606
  useHostEventsV2?: boolean;
2451
2607
  }
2452
- export interface AutoMCPFrameRendererViewConfig extends BaseViewConfig {
2453
- }
2608
+ /**
2609
+ * Configuration for {@link startAutoMCPFrameRenderer}.
2610
+ *
2611
+ * Extends {@link BaseViewConfig} but omits params that are not applicable
2612
+ * to the auto-frame renderer:
2613
+ * - `preRenderId` / `usePrerenderedIfAvailable` / `doNotTrackPreRenderSize` —
2614
+ * the renderer always replaces a live iframe in-place; prerender pools are not used.
2615
+ * - `insertAsSibling` — insertion is always a same-position `replaceWith`; the
2616
+ * container-append path is never taken.
2617
+ * - `primaryAction` — a Liveboard/AppEmbed-specific feature; the renderer renders
2618
+ * whatever route the MCP server specifies.
2619
+ * - `enableV2Shell_experimental` — the renderer always uses the v2 URL format;
2620
+ * this flag has no effect.
2621
+ */
2622
+ export type AutoMCPFrameRendererViewConfig = Omit<BaseViewConfig, "preRenderId" | "usePrerenderedIfAvailable" | "doNotTrackPreRenderSize" | "insertAsSibling" | "primaryAction" | "enableV2Shell_experimental">;
2454
2623
  /**
2455
2624
  * The configuration object for Home page embeds configs.
2456
2625
  */
@@ -3395,38 +3564,54 @@ export declare enum EmbedEvent {
3395
3564
  */
3396
3565
  VizPointClick = "vizPointClick",
3397
3566
  /**
3398
- * An error has occurred. This event is fired for the following error types:
3567
+ * Fired when an error occurs in the embedded component.
3399
3568
  *
3569
+ * **Important:** This event fires for many reasons — including internal
3570
+ * validation warnings (e.g. `HOST_EVENT_VALIDATION`), configuration issues,
3571
+ * and transient errors that ThoughtSpot already handles gracefully inside the
3572
+ * iframe. **Do not call `embed.destroy()` or unmount the embed component on
3573
+ * every error.** Doing so will tear down the iframe and abort all in-flight
3574
+ * requests, causing the embed to fail entirely.
3575
+ *
3576
+ * Only treat the following codes as unrecoverable:
3577
+ * - `INIT_ERROR` — SDK was not initialised before render
3578
+ * - `LOGIN_FAILED` — authentication could not be completed
3579
+ *
3580
+ * All other error codes should be logged and inspected, not acted upon
3581
+ * destructively.
3582
+ *
3583
+ * **Note:** There is currently no dedicated event for a true unrecoverable
3584
+ * crash. A future `EmbedEvent.FatalError` event is planned to give customers
3585
+ * a clean signal for when the embed cannot recover and needs to be torn down.
3586
+ *
3587
+ * Error types include:
3400
3588
  * `API` - API call failure.
3401
- * `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
3402
- * mode. `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value
3403
- * filter. `NON_EXIST_FILTER` - Error due to a non-existent filter.
3404
- * `INVALID_DATE_VALUE` - Invalid date value error.
3405
- * `INVALID_OPERATOR` - Use of invalid operator during filter application.
3589
+ * `FULLSCREEN` - Error when presenting a Liveboard in full screen mode.
3590
+ * `VALIDATION_ERROR` - Internal host event or configuration validation warning.
3406
3591
  *
3407
3592
  * For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
3408
3593
  * @returns error - An error object or message
3409
3594
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
3410
3595
  * @example
3411
3596
  * ```js
3412
- * // API error
3413
- * SearchEmbed.on(EmbedEvent.Error, (error) => {
3414
- * console.log(error);
3415
- * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
3416
- * // { errorType: "API", message: '...', code: '...' } new format
3597
+ * // Recommended pattern — only destroy on truly fatal errors
3598
+ * embed.on(EmbedEvent.Error, (error) => {
3599
+ * const FATAL_CODES = ['INIT_ERROR', 'LOGIN_FAILED'];
3600
+ * if (FATAL_CODES.includes(error.data?.code)) {
3601
+ * embed.destroy();
3602
+ * return;
3603
+ * }
3604
+ * // Log all other errors — do not destroy
3605
+ * console.warn('Embed error (non-fatal):', error);
3417
3606
  * });
3418
3607
  * ```
3419
3608
  * @example
3420
3609
  * ```js
3421
- * // Fullscreen error (Errors during presenting of a liveboard)
3422
- * LiveboardEmbed.on(EmbedEvent.Error, (error) => {
3610
+ * // API error
3611
+ * SearchEmbed.on(EmbedEvent.Error, (error) => {
3423
3612
  * console.log(error);
3424
- * // { type: "Error", data: { errorType: "FULLSCREEN", error: {
3425
- * // message: "Fullscreen API is not enabled",
3426
- * // stack: "..."
3427
- * // } }}
3428
- * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
3429
- * })
3613
+ * // { errorType: "API", message: '...', code: '...' }
3614
+ * });
3430
3615
  * ```
3431
3616
  */
3432
3617
  Error = "Error",
@@ -4627,7 +4812,103 @@ export declare enum EmbedEvent {
4627
4812
  * ```
4628
4813
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
4629
4814
  */
4630
- SendTestScheduleEmail = "sendTestScheduleEmail"
4815
+ SendTestScheduleEmail = "sendTestScheduleEmail",
4816
+ /**
4817
+ * Emitted when the SpotterViz panel mounts in embed mode.
4818
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4819
+ * @example
4820
+ * ```js
4821
+ * liveboardEmbed.on(EmbedEvent.SpotterVizInit, (payload) => {
4822
+ * console.log('SpotterViz initialized', payload);
4823
+ * // payload: { liveboardId: string }
4824
+ * })
4825
+ * ```
4826
+ */
4827
+ SpotterVizInit = "SpotterVizInit",
4828
+ /**
4829
+ * Emitted when the user submits a prompt in the SpotterViz panel.
4830
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4831
+ * @example
4832
+ * ```js
4833
+ * liveboardEmbed.on(EmbedEvent.SpotterVizQueryTriggered, (payload) => {
4834
+ * console.log('SpotterViz query triggered', payload);
4835
+ * // payload: { query: string, sessionId: string }
4836
+ * })
4837
+ * ```
4838
+ */
4839
+ SpotterVizQueryTriggered = "SpotterVizQueryTriggered",
4840
+ /**
4841
+ * Emitted when the SpotterViz agent finishes responding.
4842
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4843
+ * @example
4844
+ * ```js
4845
+ * liveboardEmbed.on(EmbedEvent.SpotterVizResponseComplete, (payload) => {
4846
+ * console.log('SpotterViz response complete', payload);
4847
+ * // payload: { sessionId: string, messageId: string }
4848
+ * })
4849
+ * ```
4850
+ */
4851
+ SpotterVizResponseComplete = "SpotterVizResponseComplete",
4852
+ /**
4853
+ * Emitted when a checkpoint is created in the SpotterViz panel.
4854
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4855
+ * @example
4856
+ * ```js
4857
+ * liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointCreated, (payload) => {
4858
+ * console.log('SpotterViz checkpoint created', payload);
4859
+ * // payload: { checkpointId: string, source: string, label: string }
4860
+ * })
4861
+ * ```
4862
+ */
4863
+ SpotterVizCheckpointCreated = "SpotterVizCheckpointCreated",
4864
+ /**
4865
+ * Emitted when a checkpoint is restored in the SpotterViz panel.
4866
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4867
+ * @example
4868
+ * ```js
4869
+ * liveboardEmbed.on(EmbedEvent.SpotterVizCheckpointRestored, (payload) => {
4870
+ * console.log('SpotterViz checkpoint restored', payload);
4871
+ * // payload: { checkpointId: string, newGenNumber: number }
4872
+ * })
4873
+ * ```
4874
+ */
4875
+ SpotterVizCheckpointRestored = "SpotterVizCheckpointRestored",
4876
+ /**
4877
+ * Emitted when an error occurs in the SpotterViz panel.
4878
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4879
+ * @example
4880
+ * ```js
4881
+ * liveboardEmbed.on(EmbedEvent.SpotterVizError, (payload) => {
4882
+ * console.log('SpotterViz error', payload);
4883
+ * })
4884
+ * ```
4885
+ */
4886
+ SpotterVizError = "SpotterVizError",
4887
+ /**
4888
+ * Emitted when the SpotterViz panel is closed.
4889
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
4890
+ * @example
4891
+ * ```js
4892
+ * liveboardEmbed.on(EmbedEvent.SpotterVizClosed, (payload) => {
4893
+ * console.log('SpotterViz panel closed', payload);
4894
+ * })
4895
+ * ```
4896
+ */
4897
+ SpotterVizClosed = "SpotterVizClosed",
4898
+ /**
4899
+ * Emitted when a user clicks the **Refresh** button in the
4900
+ * Liveboard header. Requires `enableLiveboardDataCache`
4901
+ * to be enabled.
4902
+ * @example
4903
+ * ```js
4904
+ * liveboardEmbed.on(EmbedEvent.RefreshLiveboardBrowserCache, (payload) => {
4905
+ * console.log('Liveboard browser cache refreshed', payload);
4906
+ * // payload: { liveboardId: string }
4907
+ * })
4908
+ * ```
4909
+ * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
4910
+ */
4911
+ RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
4631
4912
  }
4632
4913
  /**
4633
4914
  * Event types that can be triggered by the host application
@@ -6697,7 +6978,38 @@ export declare enum HostEvent {
6697
6978
  * ```
6698
6979
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
6699
6980
  */
6700
- SendTestScheduleEmail = "sendTestScheduleEmail"
6981
+ SendTestScheduleEmail = "sendTestScheduleEmail",
6982
+ /**
6983
+ * Sends a user message (prompt) to the SpotterViz panel programmatically.
6984
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
6985
+ * @param query - the prompt text to send.
6986
+ * @example
6987
+ * ```js
6988
+ * liveboardEmbed.trigger(HostEvent.SpotterVizSendUserMessage, {
6989
+ * query: 'Show me revenue by region',
6990
+ * });
6991
+ * ```
6992
+ */
6993
+ SpotterVizSendUserMessage = "SpotterVizSendUserMessage",
6994
+ /**
6995
+ * Initializes a new SpotterViz conversation.
6996
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
6997
+ * @example
6998
+ * ```js
6999
+ * liveboardEmbed.trigger(HostEvent.InitSpotterVizConversation);
7000
+ * ```
7001
+ */
7002
+ InitSpotterVizConversation = "InitSpotterVizConversation",
7003
+ /**
7004
+ * Clears browser cache and fetches new data for liveboard ChartViz Containers.
7005
+ * Requires `enableLiveboardDataCache` to be enabled.
7006
+ * @example
7007
+ * ```js
7008
+ * liveboardEmbed.trigger(HostEvent.RefreshLiveboardBrowserCache);
7009
+ * ```
7010
+ * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
7011
+ */
7012
+ RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
6701
7013
  }
6702
7014
  /**
6703
7015
  * The different visual modes that the data sources panel within
@@ -6717,6 +7029,13 @@ export declare enum DataSourceVisualMode {
6717
7029
  */
6718
7030
  Expanded = "expand"
6719
7031
  }
7032
+ /**
7033
+ * Configuration for allowed file types in Spotter file upload.
7034
+ * @group Embed components
7035
+ */
7036
+ export type SpotterFileUploadFileTypes = {
7037
+ types?: string[];
7038
+ };
6720
7039
  /**
6721
7040
  * ThoughtSpot application pages include actions and menu commands
6722
7041
  * for various user-initiated operations. These actions are represented
@@ -7053,6 +7372,20 @@ export declare enum Action {
7053
7372
  * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7054
7373
  */
7055
7374
  DownloadLiveboardAsContinuousPDF = "downloadLiveboardAsContinuousPDF",
7375
+ /**
7376
+ * The Download Liveboard as A4 PDF menu action on a Liveboard.
7377
+ * Allows downloading the entire Liveboard as an A4 PDF.
7378
+ * Requires {@link Action.DownloadLiveboard} as a parent action when
7379
+ * {@link LiveboardViewConfig.isLiveboardXLSXCSVDownloadEnabled} or
7380
+ * {@link LiveboardViewConfig.isContinuousLiveboardPDFEnabled} flags are enabled.
7381
+ * Use this instead of {@link Action.DownloadAsPdf} when either flag is on.
7382
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
7383
+ * @example
7384
+ * ```js
7385
+ * disabledActions: [Action.DownloadLiveboardAsA4Pdf]
7386
+ * ```
7387
+ */
7388
+ DownloadLiveboardAsA4Pdf = "downloadLiveboardAsA4Pdf",
7056
7389
  /**
7057
7390
  * The **Download Liveboard as XLSX** menu action on a Liveboard.
7058
7391
  * Allows downloading the entire Liveboard as an XLSX file.
@@ -8364,7 +8697,51 @@ export declare enum Action {
8364
8697
  * ```
8365
8698
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8366
8699
  */
8367
- SendTestScheduleEmail = "sendTestScheduleEmail"
8700
+ SendTestScheduleEmail = "sendTestScheduleEmail",
8701
+ /**
8702
+ * The thumbs up/down feedback buttons in the SpotterViz panel.
8703
+ * Visible by default.
8704
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
8705
+ * @example
8706
+ * ```js
8707
+ * hiddenActions: [Action.SpotterVizFeedback]
8708
+ * disabledActions: [Action.SpotterVizFeedback]
8709
+ * ```
8710
+ */
8711
+ SpotterVizFeedback = "spotterVizFeedback",
8712
+ /**
8713
+ * The version restore button on checkpoint cards in the SpotterViz panel.
8714
+ * Visible by default.
8715
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
8716
+ * @example
8717
+ * ```js
8718
+ * hiddenActions: [Action.SpotterVizCheckpointRestore]
8719
+ * disabledActions: [Action.SpotterVizCheckpointRestore]
8720
+ * ```
8721
+ */
8722
+ SpotterVizCheckpointRestore = "spotterVizCheckpointRestore",
8723
+ /**
8724
+ * The **SpotterViz** button in the top edit header.
8725
+ * Visible by default.
8726
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
8727
+ * @example
8728
+ * ```js
8729
+ * hiddenActions: [Action.SpotterViz]
8730
+ * disabledActions: [Action.SpotterViz]
8731
+ * ```
8732
+ */
8733
+ SpotterViz = "spotterViz",
8734
+ /**
8735
+ * Clears browser cache and fetches new data for liveboard ChartViz Containers.
8736
+ * Requires `enableLiveboardDataCache` to be enabled.
8737
+ * @example
8738
+ * ```js
8739
+ * disabledActions: [Action.RefreshLiveboardBrowserCache]
8740
+ * hiddenActions: [Action.RefreshLiveboardBrowserCache]
8741
+ * ```
8742
+ * @version SDK: 1.49.0 | ThoughtSpot Cloud: 26.6.0.cl
8743
+ */
8744
+ RefreshLiveboardBrowserCache = "refreshLiveboardBrowserCache"
8368
8745
  }
8369
8746
  export declare enum PrefetchFeatures {
8370
8747
  FullApp = "FullApp",
@@ -9595,7 +9972,7 @@ declare class TsEmbed {
9595
9972
  /**
9596
9973
  * The DOM node where the ThoughtSpot app is to be embedded.
9597
9974
  */
9598
- protected el: HTMLElement;
9975
+ protected hostElement: HTMLElement;
9599
9976
  /**
9600
9977
  * The key to store the embed instance in the DOM node
9601
9978
  */
@@ -9651,6 +10028,7 @@ declare class TsEmbed {
9651
10028
  private resizeObserver;
9652
10029
  protected hostEventClient: HostEventClient;
9653
10030
  protected isReadyForRenderPromise: Promise<void>;
10031
+ protected shouldWaitForRenderPromise: boolean;
9654
10032
  /**
9655
10033
  * Handler for fullscreen change events
9656
10034
  */
@@ -9784,6 +10162,10 @@ declare class TsEmbed {
9784
10162
  protected getEmbedParamsObject(): Record<any, any>;
9785
10163
  protected getRootIframeSrc(): string;
9786
10164
  protected createIframeEl(frameSrc: string): HTMLIFrameElement;
10165
+ /**
10166
+ * Returns true if this embed instance is configured for pre-rendering.
10167
+ */
10168
+ protected isPreRenderEmbed(): boolean;
9787
10169
  protected handleInsertionIntoDOM(child: string | Node): void;
9788
10170
  /**
9789
10171
  * Renders the embedded ThoughtSpot app in an iframe and sets up
@@ -9794,9 +10176,23 @@ declare class TsEmbed {
9794
10176
  protected createPreRenderWrapper(): HTMLDivElement;
9795
10177
  protected preRenderWrapper: HTMLElement;
9796
10178
  protected preRenderChild: HTMLElement;
10179
+ /**
10180
+ * Checks for an existing pre-rendered component and connects to it.
10181
+ *
10182
+ * If a matching pre-rendered component is found in the DOM, this method
10183
+ * sets the internal properties of the embed object to reference it.
10184
+ *
10185
+ * @returns True if a connection was successfully established, false otherwise.
10186
+ */
9797
10187
  protected connectPreRendered(): boolean;
9798
- protected isPreRenderAvailable(): boolean;
10188
+ protected isPreRenderConnected(): boolean;
9799
10189
  protected createPreRenderChild(child: string | Node): HTMLElement;
10190
+ /**
10191
+ * Creates the in-flow placeholder div inserted into the host element when
10192
+ * showPreRender() is called. The wrapper observes this element to stay
10193
+ * aligned with the host layout.
10194
+ */
10195
+ private createPreRenderPlaceholder;
9800
10196
  protected insertIntoDOMForPreRender(child: string | Node): void;
9801
10197
  private showPreRenderByDefault;
9802
10198
  protected insertIntoDOM(child: string | Node): void;
@@ -9893,10 +10289,10 @@ declare class TsEmbed {
9893
10289
  */
9894
10290
  private triggerEventOnPort;
9895
10291
  /**
9896
- * @hidden
9897
- * Internal state to track if the embed container is loaded.
9898
- * This is used to trigger events after the embed container is loaded.
9899
- */
10292
+ * @hidden
10293
+ * Internal state to track if the embed container is loaded.
10294
+ * This is used to trigger events after the embed container is loaded.
10295
+ */
9900
10296
  isEmbedContainerLoaded: boolean;
9901
10297
  /**
9902
10298
  * @hidden
@@ -9953,33 +10349,33 @@ declare class TsEmbed {
9953
10349
  getIframeSrc(): string;
9954
10350
  protected handleRenderForPrerender(): Promise<TsEmbed>;
9955
10351
  /**
9956
- * Context object for the embedded component.
9957
- * @returns {ContextObject} The current context object containing the page type and object ids.
9958
- * @example
9959
- * ```js
9960
- * const context = await embed.getCurrentContext();
9961
- * console.log(context);
9962
- *
9963
- * // Example output
9964
- * {
9965
- * stack: [
9966
- * {
9967
- * name: 'Liveboard',
9968
- * type: ContextType.Liveboard,
9969
- * objectIds: {
9970
- * liveboardId: '123',
9971
- * },
9972
- * },
9973
- * ],
9974
- * currentContext: {
9975
- * name: 'Liveboard',
9976
- * type: ContextType.Liveboard,
9977
- * objectIds: {
9978
- * liveboardId: '123',
9979
- * },
9980
- * },
9981
- * }
9982
- * ```
10352
+ * Context object for the embedded component.
10353
+ * @returns {ContextObject} The current context object containing the page type and object ids.
10354
+ * @example
10355
+ * ```js
10356
+ * const context = await embed.getCurrentContext();
10357
+ * console.log(context);
10358
+ *
10359
+ * // Example output
10360
+ * {
10361
+ * stack: [
10362
+ * {
10363
+ * name: 'Liveboard',
10364
+ * type: ContextType.Liveboard,
10365
+ * objectIds: {
10366
+ * liveboardId: '123',
10367
+ * },
10368
+ * },
10369
+ * ],
10370
+ * currentContext: {
10371
+ * name: 'Liveboard',
10372
+ * type: ContextType.Liveboard,
10373
+ * objectIds: {
10374
+ * liveboardId: '123',
10375
+ * },
10376
+ * },
10377
+ * }
10378
+ * ```
9983
10379
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
9984
10380
  */
9985
10381
  getCurrentContext(): Promise<ContextObject>;
@@ -10024,14 +10420,14 @@ declare class TsEmbed {
10024
10420
  */
10025
10421
  prerenderGeneric(): Promise<any>;
10026
10422
  protected beforePrerenderVisible(): void;
10027
- private validatePreRenderViewConfig;
10028
10423
  /**
10029
- * Displays the PreRender component.
10030
- * If the component is not preRendered, it attempts to create and render it.
10031
- * Also, synchronizes the style of the PreRender component with the embedding
10032
- * element.
10424
+ * Displays the pre-rendered component inside the host element.
10425
+ * If the component has not been pre-rendered yet, it initiates rendering first.
10426
+ * Inserts a placeholder element into the host and positions the pre-render
10427
+ * wrapper to overlay it.
10033
10428
  */
10034
10429
  showPreRender(): Promise<TsEmbed>;
10430
+ protected getPreRenderPlaceHolderElement(): HTMLDivElement;
10035
10431
  /**
10036
10432
  * Synchronizes the style properties of the PreRender component with the embedding
10037
10433
  * element. This function adjusts the position, width, and height of the PreRender
@@ -10056,6 +10452,7 @@ declare class TsEmbed {
10056
10452
  getPreRenderIds(): {
10057
10453
  wrapper: string;
10058
10454
  child: string;
10455
+ placeHolder: string;
10059
10456
  };
10060
10457
  /**
10061
10458
  * Returns the answerService which can be used to make arbitrary graphql calls on top
@@ -10213,6 +10610,21 @@ export interface SpotterChatViewConfig {
10213
10610
  * External MCP tool branding is not affected.
10214
10611
  */
10215
10612
  toolResponseCardBrandingLabel?: string;
10613
+ /**
10614
+ * Enables file upload in the Spotter chat interface.
10615
+ *
10616
+ * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
10617
+ * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
10618
+ * @default false
10619
+ */
10620
+ spotterFileUploadEnabled?: boolean;
10621
+ /**
10622
+ * Restricts the allowed file types for Spotter file upload.
10623
+ *
10624
+ * Supported embed types: `SpotterEmbed`, `LiveboardEmbed`, `AppEmbed`
10625
+ * @version SDK: 1.49.0 | ThoughtSpot: 26.6.0.cl
10626
+ */
10627
+ spotterFileUploadFileTypes?: SpotterFileUploadFileTypes;
10216
10628
  }
10217
10629
  /**
10218
10630
  * The configuration for the embedded spotterEmbed options.
@@ -10516,6 +10928,82 @@ export declare class ConversationEmbed extends SpotterEmbed {
10516
10928
  protected viewConfig: ConversationViewConfig;
10517
10929
  constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
10518
10930
  }
10931
+ /**
10932
+ * Defines starter prompts displayed in the SpotterViz interface.
10933
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10934
+ * @group Embed components
10935
+ */
10936
+ export interface SpotterVizStarterPrompt {
10937
+ /** Identifier for the prompt. */
10938
+ id: string;
10939
+ /** Short label shown to the user as a clickable suggestion. */
10940
+ displayText: string;
10941
+ /** Full prompt text sent to Spotter when the user clicks the suggestion. */
10942
+ fullPrompt: string;
10943
+ }
10944
+ /**
10945
+ * Configuration for the SpotterViz interface shown on the Liveboard.
10946
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
10947
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10948
+ * @group Embed components
10949
+ * @example
10950
+ * ```js
10951
+ * const embed = new AppEmbed('#embed-container', {
10952
+ * ... // other options,
10953
+ * spotterViz: {
10954
+ * brandName: 'MyBrand',
10955
+ * brandHeadline: 'Hi, there! I\'m',
10956
+ * description: 'Ask questions about your data',
10957
+ * inputChatPlaceholder: 'Ask a question...',
10958
+ * hideStarterPrompts: false,
10959
+ * customStarterPrompts: [
10960
+ * { id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }
10961
+ * ],
10962
+ * },
10963
+ * })
10964
+ * ```
10965
+ */
10966
+ export interface SpotterVizConfig {
10967
+ /**
10968
+ * Rename the default "SpotterViz" label shown in the SpotterViz interface with a custom brand name.
10969
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10970
+ * @default ''
10971
+ */
10972
+ brandName?: string;
10973
+ /**
10974
+ * Custom headline text shown before the brand name in the SpotterViz interface.
10975
+ * Replaces the default greeting prefix (e.g. "Hi, there! I'm").
10976
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10977
+ * @default ''
10978
+ */
10979
+ brandHeadline?: string;
10980
+ /**
10981
+ * Hides the starter prompts section entirely in the SpotterViz interface.
10982
+ * When set to `true`, the starter prompts are not displayed.
10983
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10984
+ * @default false
10985
+ */
10986
+ hideStarterPrompts?: boolean;
10987
+ /**
10988
+ * Overrides the starter prompts with a custom list.
10989
+ * Each entry must match the {@link SpotterVizStarterPrompt} shape.
10990
+ * Has no effect when `hideStarterPrompts` is `true`.
10991
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10992
+ */
10993
+ customStarterPrompts?: SpotterVizStarterPrompt[];
10994
+ /**
10995
+ * Custom description text shown in the SpotterViz interface.
10996
+ * Replaces the default SpotterViz description.
10997
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
10998
+ */
10999
+ description?: string;
11000
+ /**
11001
+ * Custom placeholder text for the chat input in the SpotterViz interface.
11002
+ * Replaces the default chat input placeholder text.
11003
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
11004
+ */
11005
+ inputChatPlaceholder?: string;
11006
+ }
10519
11007
  /**
10520
11008
  * Pages within the ThoughtSpot app that can be embedded.
10521
11009
  */
@@ -10602,7 +11090,15 @@ export declare enum HomePage {
10602
11090
  * ModularWithStylingChanges (v3) introduces Modular Home Experience
10603
11091
  * with styling changes.
10604
11092
  */
10605
- ModularWithStylingChanges = "v3"
11093
+ ModularWithStylingChanges = "v3",
11094
+ /**
11095
+ * Focused (v4) introduces the V4 homepage experience
11096
+ * in which Watchlist and recents and incorporated together
11097
+ * to form a more focused homepage.
11098
+ * Pre-requisite : spotter enablement
11099
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
11100
+ */
11101
+ Focused = "v4"
10606
11102
  }
10607
11103
  /**
10608
11104
  * Define the version of the list page
@@ -11034,6 +11530,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11034
11530
  * ```
11035
11531
  */
11036
11532
  isUnifiedSearchExperienceEnabled?: boolean;
11533
+ /**
11534
+ * This flag is used to enable the new connection experience for AppEmbed.
11535
+ *
11536
+ * Supported embed types: `AppEmbed`
11537
+ * @version SDK: 1.51.0 | ThoughtSpot Cloud: 26.8.0.cl
11538
+ * @default false
11539
+ * @example
11540
+ * ```js
11541
+ * const embed = new AppEmbed('#tsEmbed', {
11542
+ * ... // other embed view config
11543
+ * newConnectionsExperience: true,
11544
+ * })
11545
+ * ```
11546
+ */
11547
+ newConnectionsExperience?: boolean;
11037
11548
  /**
11038
11549
  * This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead.
11039
11550
  * @deprecated This flag is deprecated.
@@ -11134,6 +11645,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11134
11645
  * ```
11135
11646
  */
11136
11647
  lazyLoadingForFullHeight?: boolean;
11648
+ /**
11649
+ * This flag is used to enable container-aware full height lazy loading.
11650
+ *
11651
+ * Use this when the embed is rendered inside a scrollable or clipping
11652
+ * container instead of relying on the browser window as the only viewport.
11653
+ *
11654
+ * @type {boolean}
11655
+ * @default false
11656
+ * @hidden
11657
+ */
11658
+ enableScrollableContainerLazyLoading?: boolean;
11137
11659
  /**
11138
11660
  * The margin to be used for lazy loading.
11139
11661
  *
@@ -11220,6 +11742,29 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11220
11742
  * ```
11221
11743
  */
11222
11744
  spotterChatConfig?: SpotterChatViewConfig;
11745
+ /**
11746
+ * Configuration for the SpotterViz interface shown on the Liveboard.
11747
+ * Customize the brand name, description, chat input placeholder,
11748
+ * starter prompts, and visibility of starter prompts in the SpotterViz panel.
11749
+ *
11750
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
11751
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
11752
+ * @example
11753
+ * ```js
11754
+ * const embed = new AppEmbed('#embed-container', {
11755
+ * ... // other options
11756
+ * spotterViz: {
11757
+ * brandName: 'MyBrand',
11758
+ * brandHeadline: 'Hi, there! I\'m',
11759
+ * description: 'Ask questions about your data',
11760
+ * inputChatPlaceholder: 'Ask a question...',
11761
+ * hideStarterPrompts: false,
11762
+ * customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }]
11763
+ * },
11764
+ * })
11765
+ * ```
11766
+ */
11767
+ spotterViz?: SpotterVizConfig;
11223
11768
  /**
11224
11769
  * Enables the stop answer generation button in the Spotter embed UI,
11225
11770
  * allowing users to interrupt an ongoing answer generation.
@@ -11288,6 +11833,7 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11288
11833
  export interface AppEmbedAppInitData extends DefaultAppInitData {
11289
11834
  embedParams?: {
11290
11835
  spotterSidebarConfig?: SpotterSidebarViewConfig;
11836
+ spotterVizConfig?: SpotterVizConfig;
11291
11837
  };
11292
11838
  }
11293
11839
  /**
@@ -11297,6 +11843,8 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
11297
11843
  export declare class AppEmbed extends V1Embed {
11298
11844
  protected viewConfig: AppViewConfig;
11299
11845
  private defaultHeight;
11846
+ private lazyLoadScrollContainers;
11847
+ private lazyLoadResizeObserver;
11300
11848
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
11301
11849
  /**
11302
11850
  * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
@@ -11659,6 +12207,15 @@ export declare const exportTML: (data: exportTMLInput) => Promise<any>;
11659
12207
  * @group Global methods
11660
12208
  */
11661
12209
  export declare const reloadIframe: (iFrame: HTMLIFrameElement) => void;
12210
+ /**
12211
+ * APP_INIT data shape for LiveboardEmbed.
12212
+ * @internal
12213
+ */
12214
+ export interface LiveboardEmbedAppInitData extends DefaultAppInitData {
12215
+ embedParams?: {
12216
+ spotterVizConfig?: SpotterVizConfig;
12217
+ };
12218
+ }
11662
12219
  /**
11663
12220
  * The configuration for the embedded Liveboard or visualization page view.
11664
12221
  * @group Embed components
@@ -12077,6 +12634,16 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
12077
12634
  * ```
12078
12635
  */
12079
12636
  lazyLoadingForFullHeight?: boolean;
12637
+ /**
12638
+ * This flag is used to enable container-aware full height lazy loading.
12639
+ *
12640
+ * Use this when the embed is rendered inside a scrollable or clipping
12641
+ * container instead of relying on the browser window as the only viewport.
12642
+ *
12643
+ * @type {boolean}
12644
+ * @default false
12645
+ */
12646
+ enableScrollableContainerLazyLoading?: boolean;
12080
12647
  /**
12081
12648
  * The margin to be used for lazy loading.
12082
12649
  *
@@ -12158,6 +12725,29 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
12158
12725
  * ```
12159
12726
  */
12160
12727
  spotterChatConfig?: SpotterChatViewConfig;
12728
+ /**
12729
+ * Configuration for the SpotterViz interface shown on the Liveboard.
12730
+ * Customize the brand name, description, chat input placeholder,
12731
+ * starter prompts, and visibility of starter prompts in the SpotterViz panel.
12732
+ *
12733
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
12734
+ * @version SDK: 1.50.0 | ThoughtSpot Cloud: 26.7.0.cl
12735
+ * @example
12736
+ * ```js
12737
+ * const embed = new LiveboardEmbed('#embed-container', {
12738
+ * ... // other options
12739
+ * spotterViz: {
12740
+ * brandName: 'MyBrand',
12741
+ * brandHeadline: 'Hi, there! I\'m',
12742
+ * description: 'Ask questions about your data',
12743
+ * inputChatPlaceholder: 'Ask a question...',
12744
+ * hideStarterPrompts: false,
12745
+ * customStarterPrompts: [{ id: '1', displayText: 'Top products', fullPrompt: 'What are the top products by revenue?' }],
12746
+ * },
12747
+ * })
12748
+ * ```
12749
+ */
12750
+ spotterViz?: SpotterVizConfig;
12161
12751
  /**
12162
12752
  * If set to true, enables visualization data caching on the Liveboard.
12163
12753
  * @type {boolean}
@@ -12190,7 +12780,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
12190
12780
  export declare class LiveboardEmbed extends V1Embed {
12191
12781
  protected viewConfig: LiveboardViewConfig;
12192
12782
  private defaultHeight;
12783
+ private lazyLoadScrollContainers;
12784
+ private lazyLoadResizeObserver;
12193
12785
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
12786
+ protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
12194
12787
  /**
12195
12788
  * Construct a map of params to be passed on to the
12196
12789
  * embedded Liveboard or visualization.