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