@thoughtspot/visual-embed-sdk 1.39.1 → 1.39.2-alpha.2

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 (190) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/config.spec.js +9 -0
  3. package/cjs/src/config.spec.js.map +1 -1
  4. package/cjs/src/embed/app.d.ts +75 -15
  5. package/cjs/src/embed/app.d.ts.map +1 -1
  6. package/cjs/src/embed/app.js +69 -9
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +374 -12
  9. package/cjs/src/embed/app.spec.js.map +1 -1
  10. package/cjs/src/embed/bodyless-conversation.d.ts +19 -7
  11. package/cjs/src/embed/bodyless-conversation.d.ts.map +1 -1
  12. package/cjs/src/embed/bodyless-conversation.js +24 -4
  13. package/cjs/src/embed/bodyless-conversation.js.map +1 -1
  14. package/cjs/src/embed/bodyless-conversation.spec.js +8 -190
  15. package/cjs/src/embed/bodyless-conversation.spec.js.map +1 -1
  16. package/cjs/src/embed/conversation.spec.js +28 -0
  17. package/cjs/src/embed/conversation.spec.js.map +1 -1
  18. package/cjs/src/embed/embedConfig.d.ts +9 -7
  19. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  20. package/cjs/src/embed/embedConfig.js +9 -7
  21. package/cjs/src/embed/embedConfig.js.map +1 -1
  22. package/cjs/src/embed/liveboard.d.ts +56 -17
  23. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  24. package/cjs/src/embed/liveboard.js +48 -4
  25. package/cjs/src/embed/liveboard.js.map +1 -1
  26. package/cjs/src/embed/liveboard.spec.js +215 -11
  27. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  28. package/cjs/src/embed/ts-embed.d.ts +5 -0
  29. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  30. package/cjs/src/embed/ts-embed.js +16 -1
  31. package/cjs/src/embed/ts-embed.js.map +1 -1
  32. package/cjs/src/embed/ts-embed.spec.js +164 -0
  33. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  34. package/cjs/src/errors.d.ts +1 -0
  35. package/cjs/src/errors.d.ts.map +1 -1
  36. package/cjs/src/errors.js +1 -0
  37. package/cjs/src/errors.js.map +1 -1
  38. package/cjs/src/index.d.ts +2 -2
  39. package/cjs/src/index.d.ts.map +1 -1
  40. package/cjs/src/index.js +2 -1
  41. package/cjs/src/index.js.map +1 -1
  42. package/cjs/src/react/all-types-export.d.ts +1 -1
  43. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  44. package/cjs/src/react/all-types-export.js +3 -2
  45. package/cjs/src/react/all-types-export.js.map +1 -1
  46. package/cjs/src/react/index.d.ts +71 -20
  47. package/cjs/src/react/index.d.ts.map +1 -1
  48. package/cjs/src/react/index.js +79 -42
  49. package/cjs/src/react/index.js.map +1 -1
  50. package/cjs/src/react/index.spec.js +436 -100
  51. package/cjs/src/react/index.spec.js.map +1 -1
  52. package/cjs/src/types.d.ts +80 -6
  53. package/cjs/src/types.d.ts.map +1 -1
  54. package/cjs/src/types.js +45 -1
  55. package/cjs/src/types.js.map +1 -1
  56. package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  57. package/cjs/src/utils/graphql/nlsService/conversation-service.js +2 -0
  58. package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
  59. package/cjs/src/utils/processTrigger.js +2 -1
  60. package/cjs/src/utils/processTrigger.js.map +1 -1
  61. package/cjs/src/utils.d.ts +6 -0
  62. package/cjs/src/utils.d.ts.map +1 -1
  63. package/cjs/src/utils.js +23 -3
  64. package/cjs/src/utils.js.map +1 -1
  65. package/cjs/src/utils.spec.js +237 -1
  66. package/cjs/src/utils.spec.js.map +1 -1
  67. package/dist/{index-JaFaxrvQ.js → index-CmEQfuE3.js} +1 -1
  68. package/dist/index-DeFzsyFF.js +7371 -0
  69. package/dist/index-Dpf0rd6w.js +7371 -0
  70. package/dist/index-UuEbsISo.js +7447 -0
  71. package/dist/index-e3Uw3YFO.js +7371 -0
  72. package/dist/src/embed/app.d.ts +75 -15
  73. package/dist/src/embed/app.d.ts.map +1 -1
  74. package/dist/src/embed/bodyless-conversation.d.ts +19 -7
  75. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  76. package/dist/src/embed/embedConfig.d.ts +9 -7
  77. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  78. package/dist/src/embed/liveboard.d.ts +56 -17
  79. package/dist/src/embed/liveboard.d.ts.map +1 -1
  80. package/dist/src/embed/ts-embed.d.ts +5 -0
  81. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  82. package/dist/src/errors.d.ts +1 -0
  83. package/dist/src/errors.d.ts.map +1 -1
  84. package/dist/src/index.d.ts +2 -2
  85. package/dist/src/index.d.ts.map +1 -1
  86. package/dist/src/react/all-types-export.d.ts +1 -1
  87. package/dist/src/react/all-types-export.d.ts.map +1 -1
  88. package/dist/src/react/index.d.ts +71 -20
  89. package/dist/src/react/index.d.ts.map +1 -1
  90. package/dist/src/types.d.ts +80 -6
  91. package/dist/src/types.d.ts.map +1 -1
  92. package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  93. package/dist/src/utils.d.ts +6 -0
  94. package/dist/src/utils.d.ts.map +1 -1
  95. package/dist/tsembed-react.es.js +320 -78
  96. package/dist/tsembed-react.js +320 -76
  97. package/dist/tsembed.es.js +238 -31
  98. package/dist/tsembed.js +236 -29
  99. package/dist/visual-embed-sdk-react-full.d.ts +288 -72
  100. package/dist/visual-embed-sdk-react.d.ts +288 -72
  101. package/dist/visual-embed-sdk.d.ts +218 -53
  102. package/lib/package.json +1 -1
  103. package/lib/src/config.spec.js +9 -0
  104. package/lib/src/config.spec.js.map +1 -1
  105. package/lib/src/embed/app.d.ts +75 -15
  106. package/lib/src/embed/app.d.ts.map +1 -1
  107. package/lib/src/embed/app.js +69 -9
  108. package/lib/src/embed/app.js.map +1 -1
  109. package/lib/src/embed/app.spec.js +376 -14
  110. package/lib/src/embed/app.spec.js.map +1 -1
  111. package/lib/src/embed/bodyless-conversation.d.ts +19 -7
  112. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  113. package/lib/src/embed/bodyless-conversation.js +23 -4
  114. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  115. package/lib/src/embed/bodyless-conversation.spec.js +9 -191
  116. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  117. package/lib/src/embed/conversation.spec.js +30 -2
  118. package/lib/src/embed/conversation.spec.js.map +1 -1
  119. package/lib/src/embed/embedConfig.d.ts +9 -7
  120. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  121. package/lib/src/embed/embedConfig.js +9 -7
  122. package/lib/src/embed/embedConfig.js.map +1 -1
  123. package/lib/src/embed/liveboard.d.ts +56 -17
  124. package/lib/src/embed/liveboard.d.ts.map +1 -1
  125. package/lib/src/embed/liveboard.js +49 -5
  126. package/lib/src/embed/liveboard.js.map +1 -1
  127. package/lib/src/embed/liveboard.spec.js +215 -11
  128. package/lib/src/embed/liveboard.spec.js.map +1 -1
  129. package/lib/src/embed/ts-embed.d.ts +5 -0
  130. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  131. package/lib/src/embed/ts-embed.js +16 -1
  132. package/lib/src/embed/ts-embed.js.map +1 -1
  133. package/lib/src/embed/ts-embed.spec.js +164 -0
  134. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  135. package/lib/src/errors.d.ts +1 -0
  136. package/lib/src/errors.d.ts.map +1 -1
  137. package/lib/src/errors.js +1 -0
  138. package/lib/src/errors.js.map +1 -1
  139. package/lib/src/index.d.ts +2 -2
  140. package/lib/src/index.d.ts.map +1 -1
  141. package/lib/src/index.js +2 -2
  142. package/lib/src/index.js.map +1 -1
  143. package/lib/src/react/all-types-export.d.ts +1 -1
  144. package/lib/src/react/all-types-export.d.ts.map +1 -1
  145. package/lib/src/react/all-types-export.js +1 -1
  146. package/lib/src/react/all-types-export.js.map +1 -1
  147. package/lib/src/react/index.d.ts +71 -20
  148. package/lib/src/react/index.d.ts.map +1 -1
  149. package/lib/src/react/index.js +79 -43
  150. package/lib/src/react/index.js.map +1 -1
  151. package/lib/src/react/index.spec.js +439 -103
  152. package/lib/src/react/index.spec.js.map +1 -1
  153. package/lib/src/types.d.ts +80 -6
  154. package/lib/src/types.d.ts.map +1 -1
  155. package/lib/src/types.js +45 -1
  156. package/lib/src/types.js.map +1 -1
  157. package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  158. package/lib/src/utils/graphql/nlsService/conversation-service.js +2 -0
  159. package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
  160. package/lib/src/utils/processTrigger.js +2 -1
  161. package/lib/src/utils/processTrigger.js.map +1 -1
  162. package/lib/src/utils.d.ts +6 -0
  163. package/lib/src/utils.d.ts.map +1 -1
  164. package/lib/src/utils.js +21 -2
  165. package/lib/src/utils.js.map +1 -1
  166. package/lib/src/utils.spec.js +238 -2
  167. package/lib/src/utils.spec.js.map +1 -1
  168. package/lib/src/visual-embed-sdk.d.ts +219 -54
  169. package/package.json +1 -1
  170. package/src/config.spec.ts +11 -0
  171. package/src/embed/app.spec.ts +479 -26
  172. package/src/embed/app.ts +133 -27
  173. package/src/embed/bodyless-conversation.spec.ts +9 -203
  174. package/src/embed/bodyless-conversation.ts +24 -10
  175. package/src/embed/conversation.spec.ts +40 -2
  176. package/src/embed/embedConfig.ts +10 -8
  177. package/src/embed/liveboard.spec.ts +256 -5
  178. package/src/embed/liveboard.ts +99 -27
  179. package/src/embed/ts-embed.spec.ts +225 -0
  180. package/src/embed/ts-embed.ts +19 -0
  181. package/src/errors.ts +1 -0
  182. package/src/index.ts +2 -0
  183. package/src/react/all-types-export.ts +2 -1
  184. package/src/react/index.spec.tsx +556 -157
  185. package/src/react/index.tsx +117 -51
  186. package/src/types.ts +117 -43
  187. package/src/utils/graphql/nlsService/conversation-service.ts +2 -0
  188. package/src/utils/processTrigger.ts +1 -1
  189. package/src/utils.spec.ts +279 -2
  190. package/src/utils.ts +28 -2
@@ -233,33 +233,42 @@ export const SpotterEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & R
233
233
  * ```
234
234
  */
235
235
  export const ConversationEmbed: React.ForwardRefExoticComponent<ConversationEmbedProps & React.RefAttributes<_ConversationEmbed>>;
236
- interface SpotterAgentEmbedProps extends EmbedProps, SpotterAgentEmbedViewConfig {
236
+ /**
237
+ * React component for individual conversation messages from SpotterAgent.
238
+ * This component is used internally by the useSpotterAgent hook.
239
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
240
+ */
241
+ interface ConversationMessageProps extends EmbedProps, SpotterAgentMessageViewConfig {
237
242
  }
243
+ export const ConversationMessage: React.ForwardRefExoticComponent<ConversationMessageProps & React.RefAttributes<_ConversationMessage>>;
238
244
  /**
239
- * React component for SpotterAgent embed, which can be integrated inside
240
- * chatbots or other conversational interfaces.
245
+ * React component for displaying individual conversation messages from SpotterAgent.
246
+ *
247
+ * This component renders a single message response from your ThoughtSpot conversation,
248
+ * showing charts, visualizations, or text responses based on the user's query.
249
+ *
241
250
  * @example
242
251
  * ```tsx
243
- * function SpotterAgent() {
244
- * const ref = useRef();
252
+ * const { sendMessage } = useSpotterAgent({ worksheetId: 'worksheetId' });
253
+ * const result = await sendMessage('show me sales by region');
245
254
  *
246
- * const handleSendMessage = async () => {
247
- * const { container, error } = await ref.current.sendMessage('show me sales by region');
248
- * if (container) {
249
- * document.body.appendChild(container);
250
- * }
251
- * };
255
+ * if (!result.error) {
256
+ * // Simple usage - just pass the message data
257
+ * <SpotterMessage message={result.message} />
252
258
  *
253
- * return (
254
- * <div>
255
- * <SpotterAgentEmbed ref={ref} worksheetId="worksheetId" />
256
- * <button onClick={handleSendMessage}>Send Message</button>
257
- * </div>
258
- * );
259
+ * // With optional query for context
260
+ * <SpotterMessage
261
+ * message={result.message}
262
+ * query={result.query}
263
+ * />
259
264
  * }
260
265
  * ```
266
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.11.0.cl
261
267
  */
262
- export const SpotterAgentEmbed: React.ForwardRefExoticComponent<SpotterAgentEmbedProps & React.RefAttributes<_SpotterAgentEmbed>>;
268
+ export const SpotterMessage: React.ForwardRefExoticComponent<{
269
+ message: SpotterAgentMessageViewConfig;
270
+ query?: string;
271
+ } & Omit<EmbedProps, keyof SpotterAgentMessageViewConfig> & React.RefAttributes<_ConversationMessage>>;
263
272
  /**
264
273
  * React component for PreRendered Conversation embed.
265
274
  *
@@ -279,7 +288,7 @@ export const SpotterAgentEmbed: React.ForwardRefExoticComponent<SpotterAgentEmbe
279
288
  * ```
280
289
  */
281
290
  export const PreRenderedConversationEmbed: React.ForwardRefExoticComponent<SpotterEmbedProps & PreRenderProps & React.RefAttributes<_SpotterEmbed>>;
282
- type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof SpotterAgentEmbed | typeof SpotterEmbed | typeof ConversationEmbed;
291
+ type EmbedComponent = typeof SearchEmbed | typeof AppEmbed | typeof LiveboardEmbed | typeof SearchBarEmbed | typeof SageEmbed | typeof ConversationMessage | typeof SpotterMessage | typeof SpotterEmbed | typeof ConversationEmbed;
283
292
  /**
284
293
  * Get a reference to the embed component to trigger events on the component.
285
294
  * @example
@@ -311,6 +320,48 @@ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<
311
320
  * @version SDK: 1.36.2 | ThoughtSpot: *
312
321
  */
313
322
  export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEmitter>;
323
+ /**
324
+ * React hook for interacting with SpotterAgent AI conversations.
325
+ *
326
+ * This hook provides a sendMessage function that allows you to send natural language
327
+ * queries to your data and get back AI-generated responses with visualizations.
328
+ *
329
+ * @param config - Configuration object containing worksheetId and other options
330
+ * @returns Object with sendMessage function that returns conversation results
331
+ * @example
332
+ * ```tsx
333
+ * const { sendMessage } = useSpotterAgent({ worksheetId: 'worksheetId' });
334
+ *
335
+ * const handleQuery = async () => {
336
+ * const result = await sendMessage('show me sales by region');
337
+ *
338
+ * if (!result.error) {
339
+ * // Display the message response
340
+ * <SpotterMessage message={result.message} />
341
+ * } else {
342
+ * console.error('Error:', result.error);
343
+ * }
344
+ * };
345
+ * ```
346
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.11.0.cl
347
+ */
348
+ export function useSpotterAgent(config: SpotterAgentEmbedViewConfig): {
349
+ sendMessage: (query: string) => Promise<{
350
+ error: any;
351
+ query?: undefined;
352
+ message?: undefined;
353
+ } | {
354
+ query: string;
355
+ message: {
356
+ worksheetId: string;
357
+ sessionId: any;
358
+ genNo: any;
359
+ acSessionId: any;
360
+ acGenNo: any;
361
+ };
362
+ error?: undefined;
363
+ }>;
364
+ };
314
365
 
315
366
  export declare let loggedInStatus: boolean;
316
367
  export declare let samlAuthWindow: Window;
@@ -1194,6 +1245,21 @@ export declare enum HomePage {
1194
1245
  */
1195
1246
  Modular = "v2"
1196
1247
  }
1248
+ /**
1249
+ * Define the version of the list page
1250
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
1251
+ */
1252
+ export declare enum ListPage {
1253
+ /**
1254
+ * List (v2) is the traditional List Experience.
1255
+ * It serves as the foundational version of the list page.
1256
+ */
1257
+ List = "v2",
1258
+ /**
1259
+ * ListWithUXChanges (v3) introduces the new updated list page with UX changes.
1260
+ */
1261
+ ListWithUXChanges = "v3"
1262
+ }
1197
1263
  /**
1198
1264
  * Define the discovery experience
1199
1265
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
@@ -1207,6 +1273,10 @@ export interface DiscoveryExperience {
1207
1273
  * homePage determines the version of the home page.
1208
1274
  */
1209
1275
  homePage?: HomePage;
1276
+ /**
1277
+ * listPageVersion determines the version of the list page.
1278
+ */
1279
+ listPageVersion?: ListPage;
1210
1280
  }
1211
1281
  /**
1212
1282
  * The view configuration for full app embedding.
@@ -1578,21 +1648,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
1578
1648
  * ```
1579
1649
  */
1580
1650
  isUnifiedSearchExperienceEnabled?: boolean;
1581
- /**
1582
- * Show alert messages and toast messages in the embedded
1583
- * view in full app embed.
1584
- *
1585
- * Supported embed types: `AppEmbed`
1586
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1587
- * @example
1588
- * ```js
1589
- * const embed = new AppEmbed('#tsEmbed', {
1590
- * ... // other embed view config
1591
- * showAlerts:true,
1592
- * })
1593
- * ```
1594
- */
1595
- showAlerts?: boolean;
1596
1651
  /**
1597
1652
  * This flag is used to enable/disable the styling and grouping in a Liveboard
1598
1653
  *
@@ -1609,6 +1664,46 @@ export interface AppViewConfig extends AllEmbedViewConfig {
1609
1664
  * ```
1610
1665
  */
1611
1666
  isLiveboardStylingAndGroupingEnabled?: boolean;
1667
+ /**
1668
+ * This flag is used to enable the full height lazy load data.
1669
+ *
1670
+ * @example
1671
+ * ```js
1672
+ * const embed = new AppEmbed('#embed-container', {
1673
+ * // ...other options
1674
+ * fullHeight: true,
1675
+ * lazyLoadingForFullHeight: true,
1676
+ * })
1677
+ * ```
1678
+ *
1679
+ * @type {boolean}
1680
+ * @default false
1681
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
1682
+ */
1683
+ lazyLoadingForFullHeight?: boolean;
1684
+ /**
1685
+ * The margin to be used for lazy loading.
1686
+ *
1687
+ * For example, if the margin is set to '10px',
1688
+ * the visualization will be loaded 10px before the its top edge is visible in the
1689
+ * viewport.
1690
+ *
1691
+ * The format is similar to CSS margin.
1692
+ *
1693
+ * @example
1694
+ * ```js
1695
+ * const embed = new AppEmbed('#embed-container', {
1696
+ * // ...other options
1697
+ * fullHeight: true,
1698
+ * lazyLoadingForFullHeight: true,
1699
+ * // Using 0px, the visualization will be only loaded when its visible in the viewport.
1700
+ * lazyLoadingMargin: '0px',
1701
+ * })
1702
+ * ```
1703
+ * @type {string}
1704
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
1705
+ */
1706
+ lazyLoadingMargin?: string;
1612
1707
  }
1613
1708
  /**
1614
1709
  * Embeds full ThoughtSpot experience in a host application.
@@ -1645,6 +1740,11 @@ export declare class AppEmbed extends V1Embed {
1645
1740
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
1646
1741
  */
1647
1742
  navigateToPage(path: string | number, noReload?: boolean): void;
1743
+ /**
1744
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
1745
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1746
+ */
1747
+ destroy(): void;
1648
1748
  /**
1649
1749
  * Renders the embedded application pages in the ThoughtSpot app.
1650
1750
  * @param renderOptions An object containing the page ID
@@ -1900,23 +2000,6 @@ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewC
1900
2000
  * })
1901
2001
  */
1902
2002
  dataSourceId?: string;
1903
- /**
1904
- * This flag is for show/hide checkboxes for include or exclude
1905
- * cover page and filters in the Liveboard PDF.
1906
- *
1907
- * Supported embed types: `LiveboardEmbed`
1908
- * @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
1909
- * @default true
1910
- * Supported embed types: `LiveboardEmbed`
1911
- * @example
1912
- * ```js
1913
- * const embed = new LiveboardEmbed('#tsEmbed', {
1914
- * ... //other embed view config
1915
- * coverAndFilterOptionInPDF: false,
1916
- * })
1917
- * ```
1918
- */
1919
- coverAndFilterOptionInPDF?: boolean;
1920
2003
  /**
1921
2004
  * The list of tab IDs to hide from the embedded.
1922
2005
  * This Tabs will be hidden from their respective LBs.
@@ -1972,6 +2055,46 @@ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewC
1972
2055
  * ```
1973
2056
  */
1974
2057
  isLiveboardStylingAndGroupingEnabled?: boolean;
2058
+ /**
2059
+ * This flag is used to enable the full height lazy load data.
2060
+ *
2061
+ * @example
2062
+ * ```js
2063
+ * const embed = new LiveboardEmbed('#embed-container', {
2064
+ * // ...other options
2065
+ * fullHeight: true,
2066
+ * lazyLoadingForFullHeight: true,
2067
+ * })
2068
+ * ```
2069
+ *
2070
+ * @type {boolean}
2071
+ * @default false
2072
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
2073
+ */
2074
+ lazyLoadingForFullHeight?: boolean;
2075
+ /**
2076
+ * The margin to be used for lazy loading.
2077
+ *
2078
+ * For example, if the margin is set to '10px',
2079
+ * the visualization will be loaded 10px before the its top edge is visible in the
2080
+ * viewport.
2081
+ *
2082
+ * The format is similar to CSS margin.
2083
+ *
2084
+ * @example
2085
+ * ```js
2086
+ * const embed = new LiveboardEmbed('#embed-container', {
2087
+ * // ...other options
2088
+ * fullHeight: true,
2089
+ * lazyLoadingForFullHeight: true,
2090
+ * // Using 0px, the visualization will be only loaded when its visible in the viewport.
2091
+ * lazyLoadingMargin: '0px',
2092
+ * })
2093
+ * ```
2094
+ * @type {string}
2095
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
2096
+ */
2097
+ lazyLoadingMargin?: string;
1975
2098
  }
1976
2099
  /**
1977
2100
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
@@ -2005,6 +2128,11 @@ export declare class LiveboardEmbed extends V1Embed {
2005
2128
  * @returns A promise that resolves with the response from the embedded app
2006
2129
  */
2007
2130
  trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
2131
+ /**
2132
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
2133
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
2134
+ */
2135
+ destroy(): void;
2008
2136
  /**
2009
2137
  * Render an embedded ThoughtSpot Liveboard or visualization
2010
2138
  * @param renderOptions An object specifying the Liveboard ID,
@@ -2034,10 +2162,6 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
2034
2162
  * The ID of the worksheet to use for the conversation.
2035
2163
  */
2036
2164
  worksheetId: string;
2037
- /**
2038
- * Optional CSS class name to add to the container div.
2039
- */
2040
- containerClassName?: string;
2041
2165
  }
2042
2166
  /**
2043
2167
  * Configuration for conversation options.
@@ -2047,13 +2171,13 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
2047
2171
  */
2048
2172
  export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
2049
2173
  }
2050
- interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
2174
+ export interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
2051
2175
  sessionId: string;
2052
2176
  genNo: number;
2053
2177
  acSessionId: string;
2054
2178
  acGenNo: number;
2055
2179
  }
2056
- declare class ConversationMessage extends TsEmbed {
2180
+ export declare class ConversationMessage extends TsEmbed {
2057
2181
  protected viewConfig: SpotterAgentMessageViewConfig;
2058
2182
  constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
2059
2183
  getIframeSrc(): string;
@@ -2089,6 +2213,23 @@ export declare class SpotterAgentEmbed {
2089
2213
  viz: ConversationMessage;
2090
2214
  error?: undefined;
2091
2215
  }>;
2216
+ /**
2217
+ * Send a message to the conversation service and return only the data.
2218
+ * @param userMessage - The message to send to the conversation service.
2219
+ * @returns The data from the conversation service.
2220
+ */
2221
+ sendMessageData(userMessage: string): Promise<{
2222
+ error: any;
2223
+ data?: undefined;
2224
+ } | {
2225
+ data: {
2226
+ sessionId: any;
2227
+ genNo: any;
2228
+ acSessionId: any;
2229
+ acGenNo: any;
2230
+ };
2231
+ error?: undefined;
2232
+ }>;
2092
2233
  }
2093
2234
  /**
2094
2235
  * Create a conversation embed, which can be integrated inside
@@ -2113,7 +2254,6 @@ export declare class SpotterAgentEmbed {
2113
2254
  export declare class BodylessConversation extends SpotterAgentEmbed {
2114
2255
  constructor(viewConfig: BodylessConversationViewConfig);
2115
2256
  }
2116
- export {};
2117
2257
 
2118
2258
  /**
2119
2259
  * Copyright (c) 2023
@@ -2327,7 +2467,13 @@ export declare enum HomeLeftNavItem {
2327
2467
  * available when new navigation V3 is enabled.
2328
2468
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2329
2469
  */
2330
- Spotter = "spotter"
2470
+ Spotter = "spotter",
2471
+ /**
2472
+ * Favorites option in the insights left navigation,
2473
+ * available when new navigation V3 is enabled.
2474
+ * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2475
+ */
2476
+ Favorites = "favorites"
2331
2477
  }
2332
2478
  export type DOMSelector = string | HTMLElement;
2333
2479
  /**
@@ -3093,6 +3239,20 @@ export interface BaseViewConfig {
3093
3239
  * @private
3094
3240
  */
3095
3241
  insertInToSlide?: boolean;
3242
+ /**
3243
+ * Show alert messages and toast messages in the embed.
3244
+ * Supported embed in all embed types.
3245
+ *
3246
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3247
+ * @example
3248
+ * ```js
3249
+ * const embed = new AppEmbed('#tsEmbed', {
3250
+ * ... // other embed view config
3251
+ * showAlerts:true,
3252
+ * })
3253
+ * ```
3254
+ */
3255
+ showAlerts?: boolean;
3096
3256
  }
3097
3257
  /**
3098
3258
  * The configuration object for Home page embeds configs.
@@ -3470,6 +3630,22 @@ export interface LiveboardAppEmbedViewConfig {
3470
3630
  * ```
3471
3631
  */
3472
3632
  enableAskSage?: boolean;
3633
+ /**
3634
+ * This flag is used to show or hide checkboxes for including or excluding
3635
+ * the cover and filters pages in the Liveboard PDF.
3636
+ *
3637
+ * Supported embed types: `AppEmbed`, `LiveboardEmbed`
3638
+ * @version SDK: 1.40.0 | ThoughtSpot:10.8.0.cl
3639
+ * @example
3640
+ * ```js
3641
+ * // Replace <EmbedComponent> with embed component name. For example, AppEmbed or LiveboardEmbed
3642
+ * const embed = new <EmbedComponent>('#tsEmbed', {
3643
+ * ... // other embed view config
3644
+ * coverAndFilterOptionInPDF: false,
3645
+ * })
3646
+ * ```
3647
+ */
3648
+ coverAndFilterOptionInPDF?: boolean;
3473
3649
  }
3474
3650
  export interface AllEmbedViewConfig extends BaseViewConfig, SearchLiveboardCommonViewConfig, HomePageConfig, LiveboardAppEmbedViewConfig {
3475
3651
  }
@@ -4729,7 +4905,13 @@ export declare enum EmbedEvent {
4729
4905
  * Emitted when a user exits present mode.
4730
4906
  * @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
4731
4907
  */
4732
- ExitPresentMode = "exitPresentMode"
4908
+ ExitPresentMode = "exitPresentMode",
4909
+ /**
4910
+ * Emitted when a user requests the full height lazy load data.
4911
+ * @version SDK : 1.39.0 | ThoughtSpot : 10.10.0.cl
4912
+ * @hidden
4913
+ */
4914
+ RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates"
4733
4915
  }
4734
4916
  /**
4735
4917
  * Event types that can be triggered by the host application
@@ -5811,7 +5993,20 @@ export declare enum HostEvent {
5811
5993
  *```
5812
5994
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5813
5995
  */
5814
- ExitPresentMode = "exitPresentMode"
5996
+ ExitPresentMode = "exitPresentMode",
5997
+ /**
5998
+ * Triggers the full height lazy load data.
5999
+ * @example
6000
+ * ```js
6001
+ * liveboardEmbed.on(EmbedEvent.RequestVisibleEmbedCoordinates, (payload) => {
6002
+ * console.log(payload);
6003
+ * });
6004
+ * ```
6005
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
6006
+ *
6007
+ * @hidden
6008
+ */
6009
+ VisibleEmbedCoordinates = "visibleEmbedCoordinates"
5815
6010
  }
5816
6011
  /**
5817
6012
  * The different visual modes that the data sources panel within
@@ -5907,6 +6102,7 @@ export declare enum Param {
5907
6102
  Query = "query",
5908
6103
  HideHomepageLeftNav = "hideHomepageLeftNav",
5909
6104
  ModularHomeExperienceEnabled = "modularHomeExperience",
6105
+ ListPageVersion = "listpageVersion",
5910
6106
  PendoTrackingKey = "additionalPendoKey",
5911
6107
  LiveboardHeaderSticky = "isLiveboardHeaderSticky",
5912
6108
  IsProductTour = "isProductTour",
@@ -5941,10 +6137,12 @@ export declare enum Param {
5941
6137
  DataSourceId = "dataSourceId",
5942
6138
  preAuthCache = "preAuthCache",
5943
6139
  ShowSpotterLimitations = "showSpotterLimitations",
5944
- CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
6140
+ CoverAndFilterOptionInPDF = "arePdfCoverFilterPageCheckboxesEnabled",
5945
6141
  PrimaryAction = "primaryAction",
5946
6142
  isSpotterAgentEmbed = "isSpotterAgentEmbed",
5947
- IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled"
6143
+ IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
6144
+ IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
6145
+ RootMarginForLazyLoad = "rootMarginForLazyLoad"
5948
6146
  }
5949
6147
  /**
5950
6148
  * ThoughtSpot application pages include actions and menu commands
@@ -7164,7 +7362,23 @@ export declare enum Action {
7164
7362
  * ```
7165
7363
  * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
7166
7364
  */
7167
- CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
7365
+ CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF",
7366
+ /**
7367
+ * Action ID for hide or disable the
7368
+ * Spotter in conversation training widget.
7369
+ * The Add to Coaching feature is currently in beta
7370
+ * and is disabled by default on embed deployments.
7371
+ * To enable this feature on your instance,
7372
+ * contact ThoughtSpot Support.
7373
+ * @example
7374
+ * ```js
7375
+ * hiddenAction: [Action.InConversationTraining]
7376
+ * disabledActions: [Action.InConversationTraining]
7377
+ *
7378
+ * ```
7379
+ * @version SDK: 1.39.0 | ThoughtSpot Cloud: 10.10.0.cl
7380
+ */
7381
+ InConversationTraining = "InConversationTraining"
7168
7382
  }
7169
7383
  export interface AnswerServiceType {
7170
7384
  getAnswer?: (offset: number, batchSize: number) => any;
@@ -7501,7 +7715,7 @@ export declare class ConversationEmbed extends SpotterEmbed {
7501
7715
  * @summary ThoughtSpot Visual Embed SDK
7502
7716
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
7503
7717
  */
7504
- export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, SpotterAgentEmbed, SpotterAgentEmbedViewConfig, BodylessConversationViewConfig, BodylessConversation, SpotterEmbed, SpotterEmbedViewConfig, ConversationViewConfig, ConversationEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, DataPanelCustomColumnGroupsAccordionState, };
7718
+ export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, tokenizedFetch, getAnswerFromQuery, createLiveboardWithAnswers, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, SpotterAgentEmbed, SpotterAgentEmbedViewConfig, BodylessConversationViewConfig, BodylessConversation, SpotterEmbed, SpotterEmbedViewConfig, ConversationViewConfig, ConversationEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, SessionInterface, UnderlyingDataPoint, Page, AuthType, RuntimeFilter, RuntimeFilterOp, EmbedEvent, HostEvent, DataSourceVisualMode, Action, ContextMenuTriggerOptions, EmbedConfig, SearchViewConfig, SearchBarViewConfig, LiveboardViewConfig, SageViewConfig, AppViewConfig, PrefetchFeatures, FrameParams, HomeLeftNavItem, HomepageModule, DOMSelector, MessageOptions, MessageCallback, MessagePayload, CustomisationsInterface, CustomStyles, customCssInterface, CustomCssVariables, RuntimeParameter, LogLevel, uploadMixpanelEvent, MIXPANEL_EVENT, HomePageSearchBarMode, PrimaryNavbarVersion, HomePage, ListPage, VizPoint, CustomActionPayload, UIPassthroughEvent, ListPageColumns, DataPanelCustomColumnGroupsAccordionState, };
7505
7719
 
7506
7720
  /**
7507
7721
  * Copyright (c) 2022
@@ -8733,13 +8947,14 @@ export declare function resetCachedPreauthInfo(): void;
8733
8947
  *
8734
8948
  * @example
8735
8949
  * ```js
8950
+ * import { getInitConfig } from '@thoughtspot/visual-embed-sdk';
8951
+ * // Call the getInitConfig method to retrieve the embed configuration
8736
8952
  * const config = getInitConfig();
8953
+ * // Log the configuration settings
8737
8954
  * console.log(config);
8738
8955
  * ```
8739
- * @example
8740
- *
8741
- * Returns the `EmbedConfig` object, which
8742
- * contains the configuration settings used to
8956
+ * Returns the link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[EmbedConfig]
8957
+ * object, which contains the configuration settings used to
8743
8958
  * initialize the SDK, including the following:
8744
8959
  *
8745
8960
  * - `thoughtSpotHost` - ThoughtSpot host URL
@@ -8748,9 +8963,10 @@ export declare function resetCachedPreauthInfo(): void;
8748
8963
  * - `customizations` - Style, text, and icon customization settings
8749
8964
  * that were applied during the SDK initialization.
8750
8965
  *
8751
- * For a comprehensive list of embed configuration settings,
8752
- * see link:https://developers.thoughtspot.com/docs/Interface_EmbedConfig[Developer Documentation].
8966
+ * The following JSON output shows the embed configuration
8967
+ * settings returned from the code in the previous example:
8753
8968
  *
8969
+ * @example
8754
8970
  * ```json
8755
8971
  * {
8756
8972
  * "thoughtSpotHost": "https://{ThoughtSpot-Host}",
@@ -8772,7 +8988,7 @@ export declare function resetCachedPreauthInfo(): void;
8772
8988
  * "authTriggerContainer": "#your-own-div"
8773
8989
  * }
8774
8990
  * ```
8775
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.cl, and later
8991
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw, and later
8776
8992
  * @group Global methods
8777
8993
  */
8778
8994
  export declare const getEmbedConfig: () => EmbedConfig;