@thoughtspot/visual-embed-sdk 1.39.2-alpha.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 (170) 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 +68 -9
  7. package/cjs/src/embed/app.js.map +1 -1
  8. package/cjs/src/embed/app.spec.js +356 -4
  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.d.ts +2 -60
  17. package/cjs/src/embed/conversation.d.ts.map +1 -1
  18. package/cjs/src/embed/conversation.js +1 -9
  19. package/cjs/src/embed/conversation.js.map +1 -1
  20. package/cjs/src/embed/conversation.spec.js +0 -102
  21. package/cjs/src/embed/conversation.spec.js.map +1 -1
  22. package/cjs/src/embed/liveboard.d.ts +56 -0
  23. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  24. package/cjs/src/embed/liveboard.js +46 -0
  25. package/cjs/src/embed/liveboard.js.map +1 -1
  26. package/cjs/src/embed/liveboard.spec.js +203 -0
  27. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  28. package/cjs/src/errors.d.ts +1 -0
  29. package/cjs/src/errors.d.ts.map +1 -1
  30. package/cjs/src/errors.js +1 -0
  31. package/cjs/src/errors.js.map +1 -1
  32. package/cjs/src/index.d.ts +2 -2
  33. package/cjs/src/index.d.ts.map +1 -1
  34. package/cjs/src/index.js +2 -1
  35. package/cjs/src/index.js.map +1 -1
  36. package/cjs/src/react/all-types-export.d.ts +1 -1
  37. package/cjs/src/react/all-types-export.d.ts.map +1 -1
  38. package/cjs/src/react/all-types-export.js +3 -2
  39. package/cjs/src/react/all-types-export.js.map +1 -1
  40. package/cjs/src/react/index.d.ts +71 -20
  41. package/cjs/src/react/index.d.ts.map +1 -1
  42. package/cjs/src/react/index.js +79 -42
  43. package/cjs/src/react/index.js.map +1 -1
  44. package/cjs/src/react/index.spec.js +436 -100
  45. package/cjs/src/react/index.spec.js.map +1 -1
  46. package/cjs/src/types.d.ts +46 -4
  47. package/cjs/src/types.d.ts.map +1 -1
  48. package/cjs/src/types.js +28 -0
  49. package/cjs/src/types.js.map +1 -1
  50. package/cjs/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  51. package/cjs/src/utils/graphql/nlsService/conversation-service.js +2 -0
  52. package/cjs/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
  53. package/cjs/src/utils/processTrigger.js +2 -1
  54. package/cjs/src/utils/processTrigger.js.map +1 -1
  55. package/cjs/src/utils.d.ts +6 -0
  56. package/cjs/src/utils.d.ts.map +1 -1
  57. package/cjs/src/utils.js +23 -3
  58. package/cjs/src/utils.js.map +1 -1
  59. package/cjs/src/utils.spec.js +237 -1
  60. package/cjs/src/utils.spec.js.map +1 -1
  61. package/dist/index-e3Uw3YFO.js +7371 -0
  62. package/dist/src/embed/app.d.ts +75 -15
  63. package/dist/src/embed/app.d.ts.map +1 -1
  64. package/dist/src/embed/bodyless-conversation.d.ts +19 -7
  65. package/dist/src/embed/bodyless-conversation.d.ts.map +1 -1
  66. package/dist/src/embed/conversation.d.ts +2 -60
  67. package/dist/src/embed/conversation.d.ts.map +1 -1
  68. package/dist/src/embed/liveboard.d.ts +56 -0
  69. package/dist/src/embed/liveboard.d.ts.map +1 -1
  70. package/dist/src/errors.d.ts +1 -0
  71. package/dist/src/errors.d.ts.map +1 -1
  72. package/dist/src/index.d.ts +2 -2
  73. package/dist/src/index.d.ts.map +1 -1
  74. package/dist/src/react/all-types-export.d.ts +1 -1
  75. package/dist/src/react/all-types-export.d.ts.map +1 -1
  76. package/dist/src/react/index.d.ts +71 -20
  77. package/dist/src/react/index.d.ts.map +1 -1
  78. package/dist/src/types.d.ts +46 -4
  79. package/dist/src/types.d.ts.map +1 -1
  80. package/dist/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  81. package/dist/src/utils.d.ts +6 -0
  82. package/dist/src/utils.d.ts.map +1 -1
  83. package/dist/tsembed-react.es.js +276 -74
  84. package/dist/tsembed-react.js +276 -72
  85. package/dist/tsembed.es.js +194 -27
  86. package/dist/tsembed.js +192 -25
  87. package/dist/visual-embed-sdk-react-full.d.ts +246 -105
  88. package/dist/visual-embed-sdk-react.d.ts +246 -105
  89. package/dist/visual-embed-sdk.d.ts +176 -86
  90. package/lib/package.json +1 -1
  91. package/lib/src/config.spec.js +9 -0
  92. package/lib/src/config.spec.js.map +1 -1
  93. package/lib/src/embed/app.d.ts +75 -15
  94. package/lib/src/embed/app.d.ts.map +1 -1
  95. package/lib/src/embed/app.js +68 -9
  96. package/lib/src/embed/app.js.map +1 -1
  97. package/lib/src/embed/app.spec.js +357 -5
  98. package/lib/src/embed/app.spec.js.map +1 -1
  99. package/lib/src/embed/bodyless-conversation.d.ts +19 -7
  100. package/lib/src/embed/bodyless-conversation.d.ts.map +1 -1
  101. package/lib/src/embed/bodyless-conversation.js +23 -4
  102. package/lib/src/embed/bodyless-conversation.js.map +1 -1
  103. package/lib/src/embed/bodyless-conversation.spec.js +9 -191
  104. package/lib/src/embed/bodyless-conversation.spec.js.map +1 -1
  105. package/lib/src/embed/conversation.d.ts +2 -60
  106. package/lib/src/embed/conversation.d.ts.map +1 -1
  107. package/lib/src/embed/conversation.js +2 -10
  108. package/lib/src/embed/conversation.js.map +1 -1
  109. package/lib/src/embed/conversation.spec.js +2 -104
  110. package/lib/src/embed/conversation.spec.js.map +1 -1
  111. package/lib/src/embed/liveboard.d.ts +56 -0
  112. package/lib/src/embed/liveboard.d.ts.map +1 -1
  113. package/lib/src/embed/liveboard.js +47 -1
  114. package/lib/src/embed/liveboard.js.map +1 -1
  115. package/lib/src/embed/liveboard.spec.js +203 -0
  116. package/lib/src/embed/liveboard.spec.js.map +1 -1
  117. package/lib/src/errors.d.ts +1 -0
  118. package/lib/src/errors.d.ts.map +1 -1
  119. package/lib/src/errors.js +1 -0
  120. package/lib/src/errors.js.map +1 -1
  121. package/lib/src/index.d.ts +2 -2
  122. package/lib/src/index.d.ts.map +1 -1
  123. package/lib/src/index.js +2 -2
  124. package/lib/src/index.js.map +1 -1
  125. package/lib/src/react/all-types-export.d.ts +1 -1
  126. package/lib/src/react/all-types-export.d.ts.map +1 -1
  127. package/lib/src/react/all-types-export.js +1 -1
  128. package/lib/src/react/all-types-export.js.map +1 -1
  129. package/lib/src/react/index.d.ts +71 -20
  130. package/lib/src/react/index.d.ts.map +1 -1
  131. package/lib/src/react/index.js +79 -43
  132. package/lib/src/react/index.js.map +1 -1
  133. package/lib/src/react/index.spec.js +439 -103
  134. package/lib/src/react/index.spec.js.map +1 -1
  135. package/lib/src/types.d.ts +46 -4
  136. package/lib/src/types.d.ts.map +1 -1
  137. package/lib/src/types.js +28 -0
  138. package/lib/src/types.js.map +1 -1
  139. package/lib/src/utils/graphql/nlsService/conversation-service.d.ts.map +1 -1
  140. package/lib/src/utils/graphql/nlsService/conversation-service.js +2 -0
  141. package/lib/src/utils/graphql/nlsService/conversation-service.js.map +1 -1
  142. package/lib/src/utils/processTrigger.js +2 -1
  143. package/lib/src/utils/processTrigger.js.map +1 -1
  144. package/lib/src/utils.d.ts +6 -0
  145. package/lib/src/utils.d.ts.map +1 -1
  146. package/lib/src/utils.js +21 -2
  147. package/lib/src/utils.js.map +1 -1
  148. package/lib/src/utils.spec.js +238 -2
  149. package/lib/src/utils.spec.js.map +1 -1
  150. package/lib/src/visual-embed-sdk.d.ts +178 -88
  151. package/package.json +1 -1
  152. package/src/config.spec.ts +11 -0
  153. package/src/embed/app.spec.ts +444 -4
  154. package/src/embed/app.ts +131 -27
  155. package/src/embed/bodyless-conversation.spec.ts +9 -203
  156. package/src/embed/bodyless-conversation.ts +24 -10
  157. package/src/embed/conversation.spec.ts +5 -131
  158. package/src/embed/conversation.ts +10 -82
  159. package/src/embed/liveboard.spec.ts +251 -1
  160. package/src/embed/liveboard.ts +97 -5
  161. package/src/errors.ts +1 -0
  162. package/src/index.ts +2 -0
  163. package/src/react/all-types-export.ts +2 -1
  164. package/src/react/index.spec.tsx +556 -157
  165. package/src/react/index.tsx +117 -51
  166. package/src/types.ts +42 -0
  167. package/src/utils/graphql/nlsService/conversation-service.ts +2 -0
  168. package/src/utils/processTrigger.ts +1 -1
  169. package/src/utils.spec.ts +279 -2
  170. 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
  /**
316
367
  * Copyright (c) 2023
@@ -320,7 +371,7 @@ export function useInit(config: EmbedConfig): React.MutableRefObject<AuthEventEm
320
371
  * @summary ThoughtSpot Visual Embed SDK
321
372
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
322
373
  */
323
- 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, };
374
+ 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, };
324
375
 
325
376
  export declare let loggedInStatus: boolean;
326
377
  export declare let samlAuthWindow: Window;
@@ -1204,6 +1255,21 @@ export declare enum HomePage {
1204
1255
  */
1205
1256
  Modular = "v2"
1206
1257
  }
1258
+ /**
1259
+ * Define the version of the list page
1260
+ * @version SDK: 1.40.0 | ThoughtSpot: 10.12.0.cl
1261
+ */
1262
+ export declare enum ListPage {
1263
+ /**
1264
+ * List (v2) is the traditional List Experience.
1265
+ * It serves as the foundational version of the list page.
1266
+ */
1267
+ List = "v2",
1268
+ /**
1269
+ * ListWithUXChanges (v3) introduces the new updated list page with UX changes.
1270
+ */
1271
+ ListWithUXChanges = "v3"
1272
+ }
1207
1273
  /**
1208
1274
  * Define the discovery experience
1209
1275
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
@@ -1217,6 +1283,10 @@ export interface DiscoveryExperience {
1217
1283
  * homePage determines the version of the home page.
1218
1284
  */
1219
1285
  homePage?: HomePage;
1286
+ /**
1287
+ * listPageVersion determines the version of the list page.
1288
+ */
1289
+ listPageVersion?: ListPage;
1220
1290
  }
1221
1291
  /**
1222
1292
  * The view configuration for full app embedding.
@@ -1588,21 +1658,6 @@ export interface AppViewConfig extends AllEmbedViewConfig {
1588
1658
  * ```
1589
1659
  */
1590
1660
  isUnifiedSearchExperienceEnabled?: boolean;
1591
- /**
1592
- * Show alert messages and toast messages in the embedded
1593
- * view in full app embed.
1594
- *
1595
- * Supported embed types: `AppEmbed`
1596
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1597
- * @example
1598
- * ```js
1599
- * const embed = new AppEmbed('#tsEmbed', {
1600
- * ... // other embed view config
1601
- * showAlerts:true,
1602
- * })
1603
- * ```
1604
- */
1605
- showAlerts?: boolean;
1606
1661
  /**
1607
1662
  * This flag is used to enable/disable the styling and grouping in a Liveboard
1608
1663
  *
@@ -1619,6 +1674,46 @@ export interface AppViewConfig extends AllEmbedViewConfig {
1619
1674
  * ```
1620
1675
  */
1621
1676
  isLiveboardStylingAndGroupingEnabled?: boolean;
1677
+ /**
1678
+ * This flag is used to enable the full height lazy load data.
1679
+ *
1680
+ * @example
1681
+ * ```js
1682
+ * const embed = new AppEmbed('#embed-container', {
1683
+ * // ...other options
1684
+ * fullHeight: true,
1685
+ * lazyLoadingForFullHeight: true,
1686
+ * })
1687
+ * ```
1688
+ *
1689
+ * @type {boolean}
1690
+ * @default false
1691
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
1692
+ */
1693
+ lazyLoadingForFullHeight?: boolean;
1694
+ /**
1695
+ * The margin to be used for lazy loading.
1696
+ *
1697
+ * For example, if the margin is set to '10px',
1698
+ * the visualization will be loaded 10px before the its top edge is visible in the
1699
+ * viewport.
1700
+ *
1701
+ * The format is similar to CSS margin.
1702
+ *
1703
+ * @example
1704
+ * ```js
1705
+ * const embed = new AppEmbed('#embed-container', {
1706
+ * // ...other options
1707
+ * fullHeight: true,
1708
+ * lazyLoadingForFullHeight: true,
1709
+ * // Using 0px, the visualization will be only loaded when its visible in the viewport.
1710
+ * lazyLoadingMargin: '0px',
1711
+ * })
1712
+ * ```
1713
+ * @type {string}
1714
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
1715
+ */
1716
+ lazyLoadingMargin?: string;
1622
1717
  }
1623
1718
  /**
1624
1719
  * Embeds full ThoughtSpot experience in a host application.
@@ -1655,6 +1750,11 @@ export declare class AppEmbed extends V1Embed {
1655
1750
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1-sw
1656
1751
  */
1657
1752
  navigateToPage(path: string | number, noReload?: boolean): void;
1753
+ /**
1754
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
1755
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
1756
+ */
1757
+ destroy(): void;
1658
1758
  /**
1659
1759
  * Renders the embedded application pages in the ThoughtSpot app.
1660
1760
  * @param renderOptions An object containing the page ID
@@ -1965,6 +2065,46 @@ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewC
1965
2065
  * ```
1966
2066
  */
1967
2067
  isLiveboardStylingAndGroupingEnabled?: boolean;
2068
+ /**
2069
+ * This flag is used to enable the full height lazy load data.
2070
+ *
2071
+ * @example
2072
+ * ```js
2073
+ * const embed = new LiveboardEmbed('#embed-container', {
2074
+ * // ...other options
2075
+ * fullHeight: true,
2076
+ * lazyLoadingForFullHeight: true,
2077
+ * })
2078
+ * ```
2079
+ *
2080
+ * @type {boolean}
2081
+ * @default false
2082
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
2083
+ */
2084
+ lazyLoadingForFullHeight?: boolean;
2085
+ /**
2086
+ * The margin to be used for lazy loading.
2087
+ *
2088
+ * For example, if the margin is set to '10px',
2089
+ * the visualization will be loaded 10px before the its top edge is visible in the
2090
+ * viewport.
2091
+ *
2092
+ * The format is similar to CSS margin.
2093
+ *
2094
+ * @example
2095
+ * ```js
2096
+ * const embed = new LiveboardEmbed('#embed-container', {
2097
+ * // ...other options
2098
+ * fullHeight: true,
2099
+ * lazyLoadingForFullHeight: true,
2100
+ * // Using 0px, the visualization will be only loaded when its visible in the viewport.
2101
+ * lazyLoadingMargin: '0px',
2102
+ * })
2103
+ * ```
2104
+ * @type {string}
2105
+ * @version SDK: 1.39.0 | ThoughtSpot:10.10.0.cl
2106
+ */
2107
+ lazyLoadingMargin?: string;
1968
2108
  }
1969
2109
  /**
1970
2110
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
@@ -1998,6 +2138,11 @@ export declare class LiveboardEmbed extends V1Embed {
1998
2138
  * @returns A promise that resolves with the response from the embedded app
1999
2139
  */
2000
2140
  trigger<HostEventT extends HostEvent, PayloadT>(messageType: HostEventT, data?: TriggerPayload<PayloadT, HostEventT>): Promise<TriggerResponse<PayloadT, HostEventT>>;
2141
+ /**
2142
+ * Destroys the ThoughtSpot embed, and remove any nodes from the DOM.
2143
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
2144
+ */
2145
+ destroy(): void;
2001
2146
  /**
2002
2147
  * Render an embedded ThoughtSpot Liveboard or visualization
2003
2148
  * @param renderOptions An object specifying the Liveboard ID,
@@ -2027,10 +2172,6 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
2027
2172
  * The ID of the worksheet to use for the conversation.
2028
2173
  */
2029
2174
  worksheetId: string;
2030
- /**
2031
- * Optional CSS class name to add to the container div.
2032
- */
2033
- containerClassName?: string;
2034
2175
  }
2035
2176
  /**
2036
2177
  * Configuration for conversation options.
@@ -2040,13 +2181,13 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
2040
2181
  */
2041
2182
  export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
2042
2183
  }
2043
- interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
2184
+ export interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
2044
2185
  sessionId: string;
2045
2186
  genNo: number;
2046
2187
  acSessionId: string;
2047
2188
  acGenNo: number;
2048
2189
  }
2049
- declare class ConversationMessage extends TsEmbed {
2190
+ export declare class ConversationMessage extends TsEmbed {
2050
2191
  protected viewConfig: SpotterAgentMessageViewConfig;
2051
2192
  constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
2052
2193
  getIframeSrc(): string;
@@ -2082,6 +2223,23 @@ export declare class SpotterAgentEmbed {
2082
2223
  viz: ConversationMessage;
2083
2224
  error?: undefined;
2084
2225
  }>;
2226
+ /**
2227
+ * Send a message to the conversation service and return only the data.
2228
+ * @param userMessage - The message to send to the conversation service.
2229
+ * @returns The data from the conversation service.
2230
+ */
2231
+ sendMessageData(userMessage: string): Promise<{
2232
+ error: any;
2233
+ data?: undefined;
2234
+ } | {
2235
+ data: {
2236
+ sessionId: any;
2237
+ genNo: any;
2238
+ acSessionId: any;
2239
+ acGenNo: any;
2240
+ };
2241
+ error?: undefined;
2242
+ }>;
2085
2243
  }
2086
2244
  /**
2087
2245
  * Create a conversation embed, which can be integrated inside
@@ -2106,7 +2264,6 @@ export declare class SpotterAgentEmbed {
2106
2264
  export declare class BodylessConversation extends SpotterAgentEmbed {
2107
2265
  constructor(viewConfig: BodylessConversationViewConfig);
2108
2266
  }
2109
- export {};
2110
2267
 
2111
2268
  /**
2112
2269
  * Copyright (c) 2023
@@ -2320,7 +2477,13 @@ export declare enum HomeLeftNavItem {
2320
2477
  * available when new navigation V3 is enabled.
2321
2478
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2322
2479
  */
2323
- Spotter = "spotter"
2480
+ Spotter = "spotter",
2481
+ /**
2482
+ * Favorites option in the insights left navigation,
2483
+ * available when new navigation V3 is enabled.
2484
+ * @version SDK: 1.41.0 | ThoughtSpot: 10.12.0.cl
2485
+ */
2486
+ Favorites = "favorites"
2324
2487
  }
2325
2488
  export type DOMSelector = string | HTMLElement;
2326
2489
  /**
@@ -3086,6 +3249,20 @@ export interface BaseViewConfig {
3086
3249
  * @private
3087
3250
  */
3088
3251
  insertInToSlide?: boolean;
3252
+ /**
3253
+ * Show alert messages and toast messages in the embed.
3254
+ * Supported embed in all embed types.
3255
+ *
3256
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3257
+ * @example
3258
+ * ```js
3259
+ * const embed = new AppEmbed('#tsEmbed', {
3260
+ * ... // other embed view config
3261
+ * showAlerts:true,
3262
+ * })
3263
+ * ```
3264
+ */
3265
+ showAlerts?: boolean;
3089
3266
  }
3090
3267
  /**
3091
3268
  * The configuration object for Home page embeds configs.
@@ -4738,7 +4915,13 @@ export declare enum EmbedEvent {
4738
4915
  * Emitted when a user exits present mode.
4739
4916
  * @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
4740
4917
  */
4741
- ExitPresentMode = "exitPresentMode"
4918
+ ExitPresentMode = "exitPresentMode",
4919
+ /**
4920
+ * Emitted when a user requests the full height lazy load data.
4921
+ * @version SDK : 1.39.0 | ThoughtSpot : 10.10.0.cl
4922
+ * @hidden
4923
+ */
4924
+ RequestVisibleEmbedCoordinates = "requestVisibleEmbedCoordinates"
4742
4925
  }
4743
4926
  /**
4744
4927
  * Event types that can be triggered by the host application
@@ -5820,7 +6003,20 @@ export declare enum HostEvent {
5820
6003
  *```
5821
6004
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5822
6005
  */
5823
- ExitPresentMode = "exitPresentMode"
6006
+ ExitPresentMode = "exitPresentMode",
6007
+ /**
6008
+ * Triggers the full height lazy load data.
6009
+ * @example
6010
+ * ```js
6011
+ * liveboardEmbed.on(EmbedEvent.RequestVisibleEmbedCoordinates, (payload) => {
6012
+ * console.log(payload);
6013
+ * });
6014
+ * ```
6015
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
6016
+ *
6017
+ * @hidden
6018
+ */
6019
+ VisibleEmbedCoordinates = "visibleEmbedCoordinates"
5824
6020
  }
5825
6021
  /**
5826
6022
  * The different visual modes that the data sources panel within
@@ -5916,6 +6112,7 @@ export declare enum Param {
5916
6112
  Query = "query",
5917
6113
  HideHomepageLeftNav = "hideHomepageLeftNav",
5918
6114
  ModularHomeExperienceEnabled = "modularHomeExperience",
6115
+ ListPageVersion = "listpageVersion",
5919
6116
  PendoTrackingKey = "additionalPendoKey",
5920
6117
  LiveboardHeaderSticky = "isLiveboardHeaderSticky",
5921
6118
  IsProductTour = "isProductTour",
@@ -5953,7 +6150,9 @@ export declare enum Param {
5953
6150
  CoverAndFilterOptionInPDF = "arePdfCoverFilterPageCheckboxesEnabled",
5954
6151
  PrimaryAction = "primaryAction",
5955
6152
  isSpotterAgentEmbed = "isSpotterAgentEmbed",
5956
- IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled"
6153
+ IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
6154
+ IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
6155
+ RootMarginForLazyLoad = "rootMarginForLazyLoad"
5957
6156
  }
5958
6157
  /**
5959
6158
  * ThoughtSpot application pages include actions and menu commands
@@ -7383,8 +7582,7 @@ export interface SearchOptions {
7383
7582
  */
7384
7583
  export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAction'> {
7385
7584
  /**
7386
- * The ID of the data source object. For example, Model, View, or Table. Spotter uses
7387
- * this object to query data and generate Answers.
7585
+ * The ID of the data source object. For example, Model, View, or Table. Spotter uses this object to query data and generate Answers.
7388
7586
  */
7389
7587
  worksheetId: string;
7390
7588
  /**
@@ -7467,63 +7665,6 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
7467
7665
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
7468
7666
  */
7469
7667
  hideSampleQuestions?: boolean;
7470
- /**
7471
- * The list of runtime filters to apply to a search Answer,
7472
- * visualization, or Liveboard.
7473
- *
7474
- * Supported embed types: `SpotterEmbed`
7475
- * @example
7476
- * ```js
7477
- * const embed = new SpotterEmbed('#tsEmbed', {
7478
- * ... // other embed view config
7479
- * runtimeFilters: [
7480
- * {
7481
- * columnName: 'value',
7482
- * operator: RuntimeFilterOp.EQ,
7483
- * values: ['string' | 123 | true],
7484
- * },
7485
- * ],
7486
- * })
7487
- * ```
7488
- */
7489
- runtimeFilters?: RuntimeFilter[];
7490
- /**
7491
- * Flag to control whether runtime filters should be included in the URL.
7492
- * If true, filters will be passed via app initialization payload instead.
7493
- * If false/undefined, filters will be added to URL (default behavior).
7494
- *
7495
- * Supported embed types: `SpotterEmbed`
7496
- * @default false
7497
- */
7498
- excludeRuntimeFiltersfromURL?: boolean;
7499
- /**
7500
- * The list of runtime parameters to apply to the conversation.
7501
- *
7502
- * Supported embed types: `SpotterEmbed`
7503
- * @example
7504
- * ```js
7505
- * const embed = new SpotterEmbed('#tsEmbed', {
7506
- * ... // other embed view config
7507
- * runtimeParameters: [
7508
- * {
7509
- * name: 'Parameter Name',
7510
- * value: 'Parameter Value',
7511
- * },
7512
- * ],
7513
- * })
7514
- * ```
7515
- */
7516
- runtimeParameters?: RuntimeParameter[];
7517
- /**
7518
- * Flag to control whether runtime parameters should be included in the URL.
7519
- * If true, parameters will be passed via app initialization payload instead.
7520
- * If false/undefined, parameters will be added to URL (default behavior).
7521
- *
7522
- * Supported embed types: `SpotterEmbed`
7523
- * @default false
7524
- *
7525
- */
7526
- excludeRuntimeParametersfromURL?: boolean;
7527
7668
  }
7528
7669
  /**
7529
7670
  * The configuration for the embedded spotterEmbed options.