@thoughtspot/visual-embed-sdk 1.47.3 → 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 (244) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts.map +1 -1
  3. package/cjs/src/auth.js +11 -1
  4. package/cjs/src/auth.js.map +1 -1
  5. package/cjs/src/auth.spec.js +38 -0
  6. package/cjs/src/auth.spec.js.map +1 -1
  7. package/cjs/src/authToken.d.ts +2 -0
  8. package/cjs/src/authToken.d.ts.map +1 -1
  9. package/cjs/src/authToken.js +7 -5
  10. package/cjs/src/authToken.js.map +1 -1
  11. package/cjs/src/css-variables.d.ts +140 -0
  12. package/cjs/src/css-variables.d.ts.map +1 -1
  13. package/cjs/src/embed/app.d.ts +63 -2
  14. package/cjs/src/embed/app.d.ts.map +1 -1
  15. package/cjs/src/embed/app.js +57 -6
  16. package/cjs/src/embed/app.js.map +1 -1
  17. package/cjs/src/embed/app.spec.js +200 -1
  18. package/cjs/src/embed/app.spec.js.map +1 -1
  19. package/cjs/src/embed/auto-frame-renderer.js +7 -2
  20. package/cjs/src/embed/auto-frame-renderer.js.map +1 -1
  21. package/cjs/src/embed/auto-frame-renderer.spec.js +385 -6
  22. package/cjs/src/embed/auto-frame-renderer.spec.js.map +1 -1
  23. package/cjs/src/embed/base.d.ts +1 -0
  24. package/cjs/src/embed/base.d.ts.map +1 -1
  25. package/cjs/src/embed/base.js +13 -1
  26. package/cjs/src/embed/base.js.map +1 -1
  27. package/cjs/src/embed/base.spec.js +21 -0
  28. package/cjs/src/embed/base.spec.js.map +1 -1
  29. package/cjs/src/embed/bodyless-conversation.spec.js +86 -0
  30. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  31. package/cjs/src/embed/conversation.d.ts +16 -1
  32. package/cjs/src/embed/conversation.d.ts.map +1 -1
  33. package/cjs/src/embed/conversation.js +5 -1
  34. package/cjs/src/embed/conversation.js.map +1 -1
  35. package/cjs/src/embed/conversation.spec.js +26 -0
  36. package/cjs/src/embed/conversation.spec.js.map +1 -1
  37. package/cjs/src/embed/liveboard.d.ts +48 -2
  38. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  39. package/cjs/src/embed/liveboard.js +48 -7
  40. package/cjs/src/embed/liveboard.js.map +1 -1
  41. package/cjs/src/embed/liveboard.spec.js +139 -1
  42. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  43. package/cjs/src/embed/spotter-viz-utils.d.ts +85 -0
  44. package/cjs/src/embed/spotter-viz-utils.d.ts.map +1 -0
  45. package/cjs/src/embed/spotter-viz-utils.js +17 -0
  46. package/cjs/src/embed/spotter-viz-utils.js.map +1 -0
  47. package/cjs/src/embed/spotter-viz-utils.spec.d.ts +2 -0
  48. package/cjs/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
  49. package/cjs/src/embed/spotter-viz-utils.spec.js +31 -0
  50. package/cjs/src/embed/spotter-viz-utils.spec.js.map +1 -0
  51. package/cjs/src/embed/ts-embed.d.ts +58 -38
  52. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  53. package/cjs/src/embed/ts-embed.js +247 -151
  54. package/cjs/src/embed/ts-embed.js.map +1 -1
  55. package/cjs/src/embed/ts-embed.spec.js +397 -122
  56. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  57. package/cjs/src/index.d.ts +2 -1
  58. package/cjs/src/index.d.ts.map +1 -1
  59. package/cjs/src/index.js.map +1 -1
  60. package/cjs/src/react/index.d.ts.map +1 -1
  61. package/cjs/src/react/index.js +3 -0
  62. package/cjs/src/react/index.js.map +1 -1
  63. package/cjs/src/tokenizedFetch.d.ts.map +1 -1
  64. package/cjs/src/tokenizedFetch.js +12 -9
  65. package/cjs/src/tokenizedFetch.js.map +1 -1
  66. package/cjs/src/tokenizedFetch.spec.d.ts +2 -0
  67. package/cjs/src/tokenizedFetch.spec.d.ts.map +1 -0
  68. package/cjs/src/tokenizedFetch.spec.js +68 -0
  69. package/cjs/src/tokenizedFetch.spec.js.map +1 -0
  70. package/cjs/src/types.d.ts +309 -40
  71. package/cjs/src/types.d.ts.map +1 -1
  72. package/cjs/src/types.js +251 -23
  73. package/cjs/src/types.js.map +1 -1
  74. package/cjs/src/utils/authService/tokenizedAuthService.spec.js +6 -7
  75. package/cjs/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  76. package/cjs/src/utils/logger.js +2 -1
  77. package/cjs/src/utils/logger.js.map +1 -1
  78. package/cjs/src/utils/logger.spec.d.ts +1 -0
  79. package/cjs/src/utils/logger.spec.d.ts.map +1 -1
  80. package/cjs/src/utils/logger.spec.js +10 -9
  81. package/cjs/src/utils/logger.spec.js.map +1 -1
  82. package/cjs/src/utils.d.ts +4 -1
  83. package/cjs/src/utils.d.ts.map +1 -1
  84. package/cjs/src/utils.js +107 -10
  85. package/cjs/src/utils.js.map +1 -1
  86. package/cjs/src/utils.spec.js +163 -4
  87. package/cjs/src/utils.spec.js.map +1 -1
  88. package/dist/{index-DZq20cR6.js → index-_UGCSSDR.js} +1 -1
  89. package/dist/src/auth.d.ts.map +1 -1
  90. package/dist/src/authToken.d.ts +2 -0
  91. package/dist/src/authToken.d.ts.map +1 -1
  92. package/dist/src/css-variables.d.ts +140 -0
  93. package/dist/src/css-variables.d.ts.map +1 -1
  94. package/dist/src/embed/app.d.ts +63 -2
  95. package/dist/src/embed/app.d.ts.map +1 -1
  96. package/dist/src/embed/base.d.ts +1 -0
  97. package/dist/src/embed/base.d.ts.map +1 -1
  98. package/dist/src/embed/conversation.d.ts +16 -1
  99. package/dist/src/embed/conversation.d.ts.map +1 -1
  100. package/dist/src/embed/liveboard.d.ts +48 -2
  101. package/dist/src/embed/liveboard.d.ts.map +1 -1
  102. package/dist/src/embed/spotter-viz-utils.d.ts +85 -0
  103. package/dist/src/embed/spotter-viz-utils.d.ts.map +1 -0
  104. package/dist/src/embed/spotter-viz-utils.spec.d.ts +2 -0
  105. package/dist/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
  106. package/dist/src/embed/ts-embed.d.ts +58 -38
  107. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  108. package/dist/src/index.d.ts +2 -1
  109. package/dist/src/index.d.ts.map +1 -1
  110. package/dist/src/react/index.d.ts.map +1 -1
  111. package/dist/src/tokenizedFetch.d.ts.map +1 -1
  112. package/dist/src/tokenizedFetch.spec.d.ts +2 -0
  113. package/dist/src/tokenizedFetch.spec.d.ts.map +1 -0
  114. package/dist/src/types.d.ts +309 -40
  115. package/dist/src/types.d.ts.map +1 -1
  116. package/dist/src/utils/logger.spec.d.ts +1 -0
  117. package/dist/src/utils/logger.spec.d.ts.map +1 -1
  118. package/dist/src/utils.d.ts +4 -1
  119. package/dist/src/utils.d.ts.map +1 -1
  120. package/dist/tsembed-react.es.js +3418 -2899
  121. package/dist/tsembed-react.js +3420 -2901
  122. package/dist/tsembed.es.js +3426 -2905
  123. package/dist/tsembed.js +3419 -2898
  124. package/dist/visual-embed-sdk-react-full.d.ts +687 -78
  125. package/dist/visual-embed-sdk-react.d.ts +687 -78
  126. package/dist/visual-embed-sdk.d.ts +702 -80
  127. package/lib/package.json +1 -1
  128. package/lib/src/auth.d.ts.map +1 -1
  129. package/lib/src/auth.js +12 -2
  130. package/lib/src/auth.js.map +1 -1
  131. package/lib/src/auth.spec.js +38 -0
  132. package/lib/src/auth.spec.js.map +1 -1
  133. package/lib/src/authToken.d.ts +2 -0
  134. package/lib/src/authToken.d.ts.map +1 -1
  135. package/lib/src/authToken.js +2 -2
  136. package/lib/src/authToken.js.map +1 -1
  137. package/lib/src/css-variables.d.ts +140 -0
  138. package/lib/src/css-variables.d.ts.map +1 -1
  139. package/lib/src/embed/app.d.ts +63 -2
  140. package/lib/src/embed/app.d.ts.map +1 -1
  141. package/lib/src/embed/app.js +58 -7
  142. package/lib/src/embed/app.js.map +1 -1
  143. package/lib/src/embed/app.spec.js +201 -2
  144. package/lib/src/embed/app.spec.js.map +1 -1
  145. package/lib/src/embed/auto-frame-renderer.js +7 -2
  146. package/lib/src/embed/auto-frame-renderer.js.map +1 -1
  147. package/lib/src/embed/auto-frame-renderer.spec.js +387 -8
  148. package/lib/src/embed/auto-frame-renderer.spec.js.map +1 -1
  149. package/lib/src/embed/base.d.ts +1 -0
  150. package/lib/src/embed/base.d.ts.map +1 -1
  151. package/lib/src/embed/base.js +11 -0
  152. package/lib/src/embed/base.js.map +1 -1
  153. package/lib/src/embed/base.spec.js +22 -1
  154. package/lib/src/embed/base.spec.js.map +1 -1
  155. package/lib/src/embed/bodyless-conversation.spec.js +86 -0
  156. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  157. package/lib/src/embed/conversation.d.ts +16 -1
  158. package/lib/src/embed/conversation.d.ts.map +1 -1
  159. package/lib/src/embed/conversation.js +5 -1
  160. package/lib/src/embed/conversation.js.map +1 -1
  161. package/lib/src/embed/conversation.spec.js +27 -1
  162. package/lib/src/embed/conversation.spec.js.map +1 -1
  163. package/lib/src/embed/liveboard.d.ts +48 -2
  164. package/lib/src/embed/liveboard.d.ts.map +1 -1
  165. package/lib/src/embed/liveboard.js +49 -8
  166. package/lib/src/embed/liveboard.js.map +1 -1
  167. package/lib/src/embed/liveboard.spec.js +139 -1
  168. package/lib/src/embed/liveboard.spec.js.map +1 -1
  169. package/lib/src/embed/spotter-viz-utils.d.ts +85 -0
  170. package/lib/src/embed/spotter-viz-utils.d.ts.map +1 -0
  171. package/lib/src/embed/spotter-viz-utils.js +13 -0
  172. package/lib/src/embed/spotter-viz-utils.js.map +1 -0
  173. package/lib/src/embed/spotter-viz-utils.spec.d.ts +2 -0
  174. package/lib/src/embed/spotter-viz-utils.spec.d.ts.map +1 -0
  175. package/lib/src/embed/spotter-viz-utils.spec.js +29 -0
  176. package/lib/src/embed/spotter-viz-utils.spec.js.map +1 -0
  177. package/lib/src/embed/ts-embed.d.ts +58 -38
  178. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  179. package/lib/src/embed/ts-embed.js +250 -154
  180. package/lib/src/embed/ts-embed.js.map +1 -1
  181. package/lib/src/embed/ts-embed.spec.js +397 -122
  182. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  183. package/lib/src/index.d.ts +2 -1
  184. package/lib/src/index.d.ts.map +1 -1
  185. package/lib/src/index.js.map +1 -1
  186. package/lib/src/react/index.d.ts.map +1 -1
  187. package/lib/src/react/index.js +3 -0
  188. package/lib/src/react/index.js.map +1 -1
  189. package/lib/src/tokenizedFetch.d.ts.map +1 -1
  190. package/lib/src/tokenizedFetch.js +13 -10
  191. package/lib/src/tokenizedFetch.js.map +1 -1
  192. package/lib/src/tokenizedFetch.spec.d.ts +2 -0
  193. package/lib/src/tokenizedFetch.spec.d.ts.map +1 -0
  194. package/lib/src/tokenizedFetch.spec.js +65 -0
  195. package/lib/src/tokenizedFetch.spec.js.map +1 -0
  196. package/lib/src/types.d.ts +309 -40
  197. package/lib/src/types.d.ts.map +1 -1
  198. package/lib/src/types.js +251 -23
  199. package/lib/src/types.js.map +1 -1
  200. package/lib/src/utils/authService/tokenizedAuthService.spec.js +6 -7
  201. package/lib/src/utils/authService/tokenizedAuthService.spec.js.map +1 -1
  202. package/lib/src/utils/logger.js +2 -1
  203. package/lib/src/utils/logger.js.map +1 -1
  204. package/lib/src/utils/logger.spec.d.ts +1 -0
  205. package/lib/src/utils/logger.spec.d.ts.map +1 -1
  206. package/lib/src/utils/logger.spec.js +10 -9
  207. package/lib/src/utils/logger.spec.js.map +1 -1
  208. package/lib/src/utils.d.ts +4 -1
  209. package/lib/src/utils.d.ts.map +1 -1
  210. package/lib/src/utils.js +103 -9
  211. package/lib/src/utils.js.map +1 -1
  212. package/lib/src/utils.spec.js +164 -5
  213. package/lib/src/utils.spec.js.map +1 -1
  214. package/lib/src/visual-embed-sdk.d.ts +702 -80
  215. package/package.json +1 -1
  216. package/src/auth.spec.ts +55 -1
  217. package/src/auth.ts +11 -2
  218. package/src/authToken.ts +2 -2
  219. package/src/css-variables.ts +175 -1
  220. package/src/embed/app.spec.ts +260 -3
  221. package/src/embed/app.ts +127 -7
  222. package/src/embed/auto-frame-renderer.spec.ts +457 -58
  223. package/src/embed/auto-frame-renderer.ts +7 -2
  224. package/src/embed/base.spec.ts +25 -1
  225. package/src/embed/base.ts +19 -5
  226. package/src/embed/bodyless-conversation.spec.ts +93 -0
  227. package/src/embed/conversation.spec.ts +34 -0
  228. package/src/embed/conversation.ts +22 -1
  229. package/src/embed/liveboard.spec.ts +163 -1
  230. package/src/embed/liveboard.ts +106 -10
  231. package/src/embed/spotter-viz-utils.spec.ts +30 -0
  232. package/src/embed/spotter-viz-utils.ts +94 -0
  233. package/src/embed/ts-embed.spec.ts +564 -231
  234. package/src/embed/ts-embed.ts +384 -258
  235. package/src/index.ts +3 -0
  236. package/src/react/index.tsx +3 -0
  237. package/src/tokenizedFetch.spec.ts +81 -0
  238. package/src/tokenizedFetch.ts +14 -11
  239. package/src/types.ts +326 -36
  240. package/src/utils/authService/tokenizedAuthService.spec.ts +6 -6
  241. package/src/utils/logger.spec.ts +11 -9
  242. package/src/utils/logger.ts +2 -2
  243. package/src/utils.spec.ts +200 -4
  244. 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;
@@ -1902,9 +2042,10 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1902
2042
  styleSheet__unstable?: string;
1903
2043
  /**
1904
2044
  * The list of actions to disable from the primary menu, more menu
1905
- * (...), and the contextual menu. These actions will be disabled
1906
- * for the user.
1907
- * Use this to disable actions.
2045
+ * (...), and the contextual menu. Disabled actions are grayed out
2046
+ * and still visible to the user, but cannot be clicked.
2047
+ * Use this when you want to disable an action (keep it visible but non-interactive).
2048
+ * To completely remove an action from the UI, use {@link hiddenActions} instead.
1908
2049
  *
1909
2050
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
1910
2051
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -1935,9 +2076,10 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1935
2076
  */
1936
2077
  disabledActionReason?: string;
1937
2078
  /**
1938
- * The list of actions to hide from the embedded view.
1939
- * These actions will be hidden from the user.
1940
- * Use this to hide an action.
2079
+ * The list of actions to completely remove from the embedded view.
2080
+ * Hidden actions are not visible to the user at all (fully removed from the UI).
2081
+ * Use this when you want to remove an action entirely.
2082
+ * To keep an action visible but non-interactive (grayed out), use {@link disabledActions} instead.
1941
2083
  *
1942
2084
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
1943
2085
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -1956,9 +2098,8 @@ export interface BaseViewConfig extends ApiInterceptFlags {
1956
2098
  * The list of actions to display from the primary menu, more menu
1957
2099
  * (...), and the contextual menu. These will be only actions that
1958
2100
  * are visible to the user.
1959
- * Use this to hide all actions except the ones you want to show.
1960
- *
1961
- * Use either this or hiddenActions.
2101
+ * Use this as an allowlist only the actions listed here will be shown.
2102
+ * All other actions will be hidden. Use either this or {@link hiddenActions}, not both.
1962
2103
  *
1963
2104
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
1964
2105
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -2115,6 +2256,14 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2115
2256
  * This flag can be used to disable links inside the embedded app,
2116
2257
  * and disable redirection of links in a new tab.
2117
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
+ *
2118
2267
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`, `SearchEmbed`, `SpotterAgentEmbed`, `SpotterEmbed`, `SearchBarEmbed`
2119
2268
  * @version SDK: 1.32.1 | ThoughtSpot: 10.3.0.cl
2120
2269
  * @example
@@ -2150,8 +2299,13 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2150
2299
  * Flag to override the *Open Link in New Tab* context
2151
2300
  * menu option.
2152
2301
  *
2153
- * For improved link override handling, use
2154
- * {@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`.
2155
2309
  *
2156
2310
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`,
2157
2311
  * `SearchEmbed`, `SpotterAgentEmbed`,
@@ -2177,6 +2331,9 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2177
2331
  * alongside this flag for backward compatibility with
2178
2332
  * older ThoughtSpot versions.
2179
2333
  *
2334
+ * Note: This flag is ignored when
2335
+ * {@link disableRedirectionLinksInNewTab} is `true`.
2336
+ *
2180
2337
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`,
2181
2338
  * `SearchEmbed`, `SpotterAgentEmbed`,
2182
2339
  * `SpotterEmbed`, `SearchBarEmbed`
@@ -2412,6 +2569,7 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2412
2569
  /**
2413
2570
  * Refresh the auth token when the token is near expiry.
2414
2571
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
2572
+ * @default true
2415
2573
  * @example
2416
2574
  * ```js
2417
2575
  * const embed = new AppEmbed('#tsEmbed', {
@@ -2448,8 +2606,21 @@ export interface BaseViewConfig extends ApiInterceptFlags {
2448
2606
  */
2449
2607
  useHostEventsV2?: boolean;
2450
2608
  }
2451
- export interface AutoMCPFrameRendererViewConfig extends BaseViewConfig {
2452
- }
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">;
2453
2624
  /**
2454
2625
  * The configuration object for Home page embeds configs.
2455
2626
  */
@@ -3394,38 +3565,54 @@ export enum EmbedEvent {
3394
3565
  */
3395
3566
  VizPointClick = "vizPointClick",
3396
3567
  /**
3397
- * An error has occurred. This event is fired for the following error types:
3568
+ * Fired when an error occurs in the embedded component.
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
3398
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:
3399
3589
  * `API` - API call failure.
3400
- * `FULLSCREEN` - Error when presenting a Liveboard or visualization in full screen
3401
- * mode. `SINGLE_VALUE_FILTER` - Error due to multiple values in the single value
3402
- * filter. `NON_EXIST_FILTER` - Error due to a non-existent filter.
3403
- * `INVALID_DATE_VALUE` - Invalid date value error.
3404
- * `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.
3405
3592
  *
3406
3593
  * For more information, see https://developers.thoughtspot.com/docs/events-app-integration#errorType
3407
3594
  * @returns error - An error object or message
3408
3595
  * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 8.4.1.sw
3409
3596
  * @example
3410
3597
  * ```js
3411
- * // API error
3412
- * SearchEmbed.on(EmbedEvent.Error, (error) => {
3413
- * console.log(error);
3414
- * // { type: "Error", data: { errorType: "API", error: { message: '...', error: '...' } } }
3415
- * // { 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);
3416
3607
  * });
3417
3608
  * ```
3418
3609
  * @example
3419
3610
  * ```js
3420
- * // Fullscreen error (Errors during presenting of a liveboard)
3421
- * LiveboardEmbed.on(EmbedEvent.Error, (error) => {
3611
+ * // API error
3612
+ * SearchEmbed.on(EmbedEvent.Error, (error) => {
3422
3613
  * console.log(error);
3423
- * // { type: "Error", data: { errorType: "FULLSCREEN", error: {
3424
- * // message: "Fullscreen API is not enabled",
3425
- * // stack: "..."
3426
- * // } }}
3427
- * // { errorType: "FULLSCREEN", message: "Fullscreen API is not enabled", code: '...' } new format
3428
- * })
3614
+ * // { errorType: "API", message: '...', code: '...' }
3615
+ * });
3429
3616
  * ```
3430
3617
  */
3431
3618
  Error = "Error",
@@ -4626,7 +4813,103 @@ export enum EmbedEvent {
4626
4813
  * ```
4627
4814
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
4628
4815
  */
4629
- 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"
4630
4913
  }
4631
4914
  /**
4632
4915
  * Event types that can be triggered by the host application
@@ -6696,7 +6979,38 @@ export enum HostEvent {
6696
6979
  * ```
6697
6980
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
6698
6981
  */
6699
- 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"
6700
7014
  }
6701
7015
  /**
6702
7016
  * The different visual modes that the data sources panel within
@@ -6716,13 +7030,24 @@ export enum DataSourceVisualMode {
6716
7030
  */
6717
7031
  Expanded = "expand"
6718
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
+ };
6719
7040
  /**
6720
7041
  * ThoughtSpot application pages include actions and menu commands
6721
7042
  * for various user-initiated operations. These actions are represented
6722
- * as enumeration members in the SDK. To show, hide, or disable
6723
- * specific actions in the embedded view, define the Action
6724
- * enumeration members in the `disabledActions`, `visibleActions`,
6725
- * or `hiddenActions` array.
7043
+ * as enumeration members in the SDK. To control actions in the embedded view:
7044
+ * - disabledActions the action is grayed out and still visible, but non-interactive (user can see but not click).
7045
+ * - hiddenActions the action is completely removed from the UI (user cannot see it at all).
7046
+ * - visibleActions — allowlist, only these actions are shown; all others are hidden.
7047
+ *
7048
+ * Use disabledActions to disable (gray out) an action.
7049
+ * Use hiddenActions to hide (fully remove) an action.
7050
+ * Use visibleActions to show only specific actions.
6726
7051
  * @example
6727
7052
  * ```js
6728
7053
  * const embed = new LiveboardEmbed('#tsEmbed', {
@@ -7048,6 +7373,20 @@ export enum Action {
7048
7373
  * @version SDK: 1.48.0 | ThoughtSpot: 26.5.0.cl
7049
7374
  */
7050
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",
7051
7390
  /**
7052
7391
  * The **Download Liveboard as XLSX** menu action on a Liveboard.
7053
7392
  * Allows downloading the entire Liveboard as an XLSX file.
@@ -7569,6 +7908,26 @@ export enum Action {
7569
7908
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.1.sw
7570
7909
  */
7571
7910
  AxisMenuRemove = "axisMenuRemove",
7911
+ /**
7912
+ * The **Compare with** action in the chart axis customization menu.
7913
+ * Allows comparing data across dimensions or measures.
7914
+ * @example
7915
+ * ```js
7916
+ * disabledActions: [Action.AxisMenuCompare]
7917
+ * ```
7918
+ * @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
7919
+ */
7920
+ AxisMenuCompare = "axisMenuCompare",
7921
+ /**
7922
+ * The **Merge with** action in the chart axis customization menu.
7923
+ * Allows merging data across dimensions or measures.
7924
+ * @example
7925
+ * ```js
7926
+ * disabledActions: [Action.AxisMenuMerge]
7927
+ * ```
7928
+ * @version SDK: 1.50.0 | ThoughtSpot: 26.7.0.cl
7929
+ */
7930
+ AxisMenuMerge = "axisMenuMerge",
7572
7931
  /**
7573
7932
  * @hidden
7574
7933
  */
@@ -8339,7 +8698,51 @@ export enum Action {
8339
8698
  * ```
8340
8699
  * @version SDK: 1.48.0 | ThoughtSpot Cloud: 26.5.0.cl
8341
8700
  */
8342
- 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"
8343
8746
  }
8344
8747
  export enum PrefetchFeatures {
8345
8748
  FullApp = "FullApp",
@@ -8791,6 +9194,9 @@ export interface DefaultAppInitData {
8791
9194
  customActions: CustomAction[];
8792
9195
  interceptTimeout: number | undefined;
8793
9196
  interceptUrls: (string | InterceptedApiType)[];
9197
+ embedExpiryInAuthToken: boolean;
9198
+ shouldBypassPayloadValidation?: boolean;
9199
+ useHostEventsV2?: boolean;
8794
9200
  }
8795
9201
  /**
8796
9202
  * Enum for the type of API intercepted
@@ -9567,7 +9973,7 @@ class TsEmbed {
9567
9973
  /**
9568
9974
  * The DOM node where the ThoughtSpot app is to be embedded.
9569
9975
  */
9570
- protected el: HTMLElement;
9976
+ protected hostElement: HTMLElement;
9571
9977
  /**
9572
9978
  * The key to store the embed instance in the DOM node
9573
9979
  */
@@ -9623,6 +10029,7 @@ class TsEmbed {
9623
10029
  private resizeObserver;
9624
10030
  protected hostEventClient: HostEventClient;
9625
10031
  protected isReadyForRenderPromise: Promise<void>;
10032
+ protected shouldWaitForRenderPromise: boolean;
9626
10033
  /**
9627
10034
  * Handler for fullscreen change events
9628
10035
  */
@@ -9756,6 +10163,10 @@ class TsEmbed {
9756
10163
  protected getEmbedParamsObject(): Record<any, any>;
9757
10164
  protected getRootIframeSrc(): string;
9758
10165
  protected createIframeEl(frameSrc: string): HTMLIFrameElement;
10166
+ /**
10167
+ * Returns true if this embed instance is configured for pre-rendering.
10168
+ */
10169
+ protected isPreRenderEmbed(): boolean;
9759
10170
  protected handleInsertionIntoDOM(child: string | Node): void;
9760
10171
  /**
9761
10172
  * Renders the embedded ThoughtSpot app in an iframe and sets up
@@ -9766,9 +10177,23 @@ class TsEmbed {
9766
10177
  protected createPreRenderWrapper(): HTMLDivElement;
9767
10178
  protected preRenderWrapper: HTMLElement;
9768
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
+ */
9769
10188
  protected connectPreRendered(): boolean;
9770
- protected isPreRenderAvailable(): boolean;
10189
+ protected isPreRenderConnected(): boolean;
9771
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;
9772
10197
  protected insertIntoDOMForPreRender(child: string | Node): void;
9773
10198
  private showPreRenderByDefault;
9774
10199
  protected insertIntoDOM(child: string | Node): void;
@@ -9865,10 +10290,10 @@ class TsEmbed {
9865
10290
  */
9866
10291
  private triggerEventOnPort;
9867
10292
  /**
9868
- * @hidden
9869
- * Internal state to track if the embed container is loaded.
9870
- * This is used to trigger events after the embed container is loaded.
9871
- */
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
+ */
9872
10297
  isEmbedContainerLoaded: boolean;
9873
10298
  /**
9874
10299
  * @hidden
@@ -9925,33 +10350,33 @@ class TsEmbed {
9925
10350
  getIframeSrc(): string;
9926
10351
  protected handleRenderForPrerender(): Promise<TsEmbed>;
9927
10352
  /**
9928
- * Context object for the embedded component.
9929
- * @returns {ContextObject} The current context object containing the page type and object ids.
9930
- * @example
9931
- * ```js
9932
- * const context = await embed.getCurrentContext();
9933
- * console.log(context);
9934
- *
9935
- * // Example output
9936
- * {
9937
- * stack: [
9938
- * {
9939
- * name: 'Liveboard',
9940
- * type: ContextType.Liveboard,
9941
- * objectIds: {
9942
- * liveboardId: '123',
9943
- * },
9944
- * },
9945
- * ],
9946
- * currentContext: {
9947
- * name: 'Liveboard',
9948
- * type: ContextType.Liveboard,
9949
- * objectIds: {
9950
- * liveboardId: '123',
9951
- * },
9952
- * },
9953
- * }
9954
- * ```
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
+ * ```
9955
10380
  * @version SDK: 1.45.2 | ThoughtSpot: 26.3.0.cl
9956
10381
  */
9957
10382
  getCurrentContext(): Promise<ContextObject>;
@@ -9996,14 +10421,14 @@ class TsEmbed {
9996
10421
  */
9997
10422
  prerenderGeneric(): Promise<any>;
9998
10423
  protected beforePrerenderVisible(): void;
9999
- private validatePreRenderViewConfig;
10000
10424
  /**
10001
- * Displays the PreRender component.
10002
- * If the component is not preRendered, it attempts to create and render it.
10003
- * Also, synchronizes the style of the PreRender component with the embedding
10004
- * 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.
10005
10429
  */
10006
10430
  showPreRender(): Promise<TsEmbed>;
10431
+ protected getPreRenderPlaceHolderElement(): HTMLDivElement;
10007
10432
  /**
10008
10433
  * Synchronizes the style properties of the PreRender component with the embedding
10009
10434
  * element. This function adjusts the position, width, and height of the PreRender
@@ -10028,6 +10453,7 @@ class TsEmbed {
10028
10453
  getPreRenderIds(): {
10029
10454
  wrapper: string;
10030
10455
  child: string;
10456
+ placeHolder: string;
10031
10457
  };
10032
10458
  /**
10033
10459
  * Returns the answerService which can be used to make arbitrary graphql calls on top
@@ -10185,6 +10611,21 @@ export interface SpotterChatViewConfig {
10185
10611
  * External MCP tool branding is not affected.
10186
10612
  */
10187
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;
10188
10629
  }
10189
10630
  /**
10190
10631
  * The configuration for the embedded spotterEmbed options.
@@ -10488,6 +10929,82 @@ export class ConversationEmbed extends SpotterEmbed {
10488
10929
  protected viewConfig: ConversationViewConfig;
10489
10930
  constructor(container: HTMLElement, viewConfig: ConversationViewConfig);
10490
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
+ }
10491
11008
  /**
10492
11009
  * Pages within the ThoughtSpot app that can be embedded.
10493
11010
  */
@@ -10574,7 +11091,15 @@ export enum HomePage {
10574
11091
  * ModularWithStylingChanges (v3) introduces Modular Home Experience
10575
11092
  * with styling changes.
10576
11093
  */
10577
- 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"
10578
11103
  }
10579
11104
  /**
10580
11105
  * Define the version of the list page
@@ -11006,6 +11531,21 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11006
11531
  * ```
11007
11532
  */
11008
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;
11009
11549
  /**
11010
11550
  * This flag is used to enable/disable the styling and grouping in a Liveboard. Use {@link isLiveboardMasterpiecesEnabled} instead.
11011
11551
  * @deprecated This flag is deprecated.
@@ -11043,7 +11583,7 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11043
11583
  /**
11044
11584
  * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
11045
11585
  * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
11046
- * This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
11586
+ * This feature is GA from version 26.5.0.cl. It is disabled by default in embed deployments.
11047
11587
  *
11048
11588
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
11049
11589
  * @type {boolean}
@@ -11106,6 +11646,17 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11106
11646
  * ```
11107
11647
  */
11108
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;
11109
11660
  /**
11110
11661
  * The margin to be used for lazy loading.
11111
11662
  *
@@ -11192,6 +11743,29 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11192
11743
  * ```
11193
11744
  */
11194
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;
11195
11769
  /**
11196
11770
  * Enables the stop answer generation button in the Spotter embed UI,
11197
11771
  * allowing users to interrupt an ongoing answer generation.
@@ -11260,6 +11834,7 @@ export interface AppViewConfig extends AllEmbedViewConfig {
11260
11834
  export interface AppEmbedAppInitData extends DefaultAppInitData {
11261
11835
  embedParams?: {
11262
11836
  spotterSidebarConfig?: SpotterSidebarViewConfig;
11837
+ spotterVizConfig?: SpotterVizConfig;
11263
11838
  };
11264
11839
  }
11265
11840
  /**
@@ -11269,6 +11844,8 @@ export interface AppEmbedAppInitData extends DefaultAppInitData {
11269
11844
  export class AppEmbed extends V1Embed {
11270
11845
  protected viewConfig: AppViewConfig;
11271
11846
  private defaultHeight;
11847
+ private lazyLoadScrollContainers;
11848
+ private lazyLoadResizeObserver;
11272
11849
  constructor(domSelector: DOMSelector, viewConfig: AppViewConfig);
11273
11850
  /**
11274
11851
  * Extends the default APP_INIT payload with `embedParams.spotterSidebarConfig`
@@ -11631,6 +12208,15 @@ export const exportTML: (data: exportTMLInput) => Promise<any>;
11631
12208
  * @group Global methods
11632
12209
  */
11633
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
+ }
11634
12220
  /**
11635
12221
  * The configuration for the embedded Liveboard or visualization page view.
11636
12222
  * @group Embed components
@@ -11986,7 +12572,7 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
11986
12572
  /**
11987
12573
  * Enables the 'what you see is what you get' PDF export for Liveboards. Each tab is rendered on a single page
11988
12574
  * following the exact UI layout, instead of splitting visualizations across multiple A4 pages.
11989
- * This feature is GA from version 26.5.0.cl and is enabled by default on embed deployments.
12575
+ * This feature is GA from version 26.5.0.cl. It is disabled by default in embed deployments.
11990
12576
  *
11991
12577
  * Supported embed types: `AppEmbed`, `LiveboardEmbed`
11992
12578
  * @type {boolean}
@@ -12049,6 +12635,16 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
12049
12635
  * ```
12050
12636
  */
12051
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;
12052
12648
  /**
12053
12649
  * The margin to be used for lazy loading.
12054
12650
  *
@@ -12130,6 +12726,29 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
12130
12726
  * ```
12131
12727
  */
12132
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;
12133
12752
  /**
12134
12753
  * If set to true, enables visualization data caching on the Liveboard.
12135
12754
  * @type {boolean}
@@ -12162,7 +12781,10 @@ export interface LiveboardViewConfig extends BaseViewConfig, SearchLiveboardComm
12162
12781
  export class LiveboardEmbed extends V1Embed {
12163
12782
  protected viewConfig: LiveboardViewConfig;
12164
12783
  private defaultHeight;
12784
+ private lazyLoadScrollContainers;
12785
+ private lazyLoadResizeObserver;
12165
12786
  constructor(domSelector: DOMSelector, viewConfig: LiveboardViewConfig);
12787
+ protected getAppInitData(): Promise<LiveboardEmbedAppInitData>;
12166
12788
  /**
12167
12789
  * Construct a map of params to be passed on to the
12168
12790
  * embedded Liveboard or visualization.