@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
  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
@@ -1955,6 +2055,46 @@ export interface LiveboardViewConfig extends BaseViewConfig, LiveboardOtherViewC
1955
2055
  * ```
1956
2056
  */
1957
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;
1958
2098
  }
1959
2099
  /**
1960
2100
  * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
@@ -1988,6 +2128,11 @@ export declare class LiveboardEmbed extends V1Embed {
1988
2128
  * @returns A promise that resolves with the response from the embedded app
1989
2129
  */
1990
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;
1991
2136
  /**
1992
2137
  * Render an embedded ThoughtSpot Liveboard or visualization
1993
2138
  * @param renderOptions An object specifying the Liveboard ID,
@@ -2017,10 +2162,6 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
2017
2162
  * The ID of the worksheet to use for the conversation.
2018
2163
  */
2019
2164
  worksheetId: string;
2020
- /**
2021
- * Optional CSS class name to add to the container div.
2022
- */
2023
- containerClassName?: string;
2024
2165
  }
2025
2166
  /**
2026
2167
  * Configuration for conversation options.
@@ -2030,13 +2171,13 @@ export interface SpotterAgentEmbedViewConfig extends Omit<BaseViewConfig, 'prima
2030
2171
  */
2031
2172
  export interface BodylessConversationViewConfig extends SpotterAgentEmbedViewConfig {
2032
2173
  }
2033
- interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
2174
+ export interface SpotterAgentMessageViewConfig extends SpotterAgentEmbedViewConfig {
2034
2175
  sessionId: string;
2035
2176
  genNo: number;
2036
2177
  acSessionId: string;
2037
2178
  acGenNo: number;
2038
2179
  }
2039
- declare class ConversationMessage extends TsEmbed {
2180
+ export declare class ConversationMessage extends TsEmbed {
2040
2181
  protected viewConfig: SpotterAgentMessageViewConfig;
2041
2182
  constructor(container: HTMLElement, viewConfig: SpotterAgentMessageViewConfig);
2042
2183
  getIframeSrc(): string;
@@ -2072,6 +2213,23 @@ export declare class SpotterAgentEmbed {
2072
2213
  viz: ConversationMessage;
2073
2214
  error?: undefined;
2074
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
+ }>;
2075
2233
  }
2076
2234
  /**
2077
2235
  * Create a conversation embed, which can be integrated inside
@@ -2096,7 +2254,6 @@ export declare class SpotterAgentEmbed {
2096
2254
  export declare class BodylessConversation extends SpotterAgentEmbed {
2097
2255
  constructor(viewConfig: BodylessConversationViewConfig);
2098
2256
  }
2099
- export {};
2100
2257
 
2101
2258
  /**
2102
2259
  * Copyright (c) 2023
@@ -2310,7 +2467,13 @@ export declare enum HomeLeftNavItem {
2310
2467
  * available when new navigation V3 is enabled.
2311
2468
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
2312
2469
  */
2313
- 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"
2314
2477
  }
2315
2478
  export type DOMSelector = string | HTMLElement;
2316
2479
  /**
@@ -3076,6 +3239,20 @@ export interface BaseViewConfig {
3076
3239
  * @private
3077
3240
  */
3078
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;
3079
3256
  }
3080
3257
  /**
3081
3258
  * The configuration object for Home page embeds configs.
@@ -4728,7 +4905,13 @@ export declare enum EmbedEvent {
4728
4905
  * Emitted when a user exits present mode.
4729
4906
  * @version SDK : 1.40.0 | ThoughtSpot: 10.11.0.cl
4730
4907
  */
4731
- 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"
4732
4915
  }
4733
4916
  /**
4734
4917
  * Event types that can be triggered by the host application
@@ -5810,7 +5993,20 @@ export declare enum HostEvent {
5810
5993
  *```
5811
5994
  * @version SDK: 1.40.0 | ThoughtSpot: 10.11.0.cl
5812
5995
  */
5813
- 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"
5814
6010
  }
5815
6011
  /**
5816
6012
  * The different visual modes that the data sources panel within
@@ -5906,6 +6102,7 @@ export declare enum Param {
5906
6102
  Query = "query",
5907
6103
  HideHomepageLeftNav = "hideHomepageLeftNav",
5908
6104
  ModularHomeExperienceEnabled = "modularHomeExperience",
6105
+ ListPageVersion = "listpageVersion",
5909
6106
  PendoTrackingKey = "additionalPendoKey",
5910
6107
  LiveboardHeaderSticky = "isLiveboardHeaderSticky",
5911
6108
  IsProductTour = "isProductTour",
@@ -5943,7 +6140,9 @@ export declare enum Param {
5943
6140
  CoverAndFilterOptionInPDF = "arePdfCoverFilterPageCheckboxesEnabled",
5944
6141
  PrimaryAction = "primaryAction",
5945
6142
  isSpotterAgentEmbed = "isSpotterAgentEmbed",
5946
- IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled"
6143
+ IsLiveboardStylingAndGroupingEnabled = "isLiveboardStylingAndGroupingEnabled",
6144
+ IsLazyLoadingForEmbedEnabled = "isLazyLoadingForEmbedEnabled",
6145
+ RootMarginForLazyLoad = "rootMarginForLazyLoad"
5947
6146
  }
5948
6147
  /**
5949
6148
  * ThoughtSpot application pages include actions and menu commands
@@ -7373,8 +7572,7 @@ export interface SearchOptions {
7373
7572
  */
7374
7573
  export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAction'> {
7375
7574
  /**
7376
- * The ID of the data source object. For example, Model, View, or Table. Spotter uses
7377
- * this object to query data and generate Answers.
7575
+ * The ID of the data source object. For example, Model, View, or Table. Spotter uses this object to query data and generate Answers.
7378
7576
  */
7379
7577
  worksheetId: string;
7380
7578
  /**
@@ -7457,63 +7655,6 @@ export interface SpotterEmbedViewConfig extends Omit<BaseViewConfig, 'primaryAct
7457
7655
  * @version SDK: 1.36.0 | ThoughtSpot: 10.6.0.cl
7458
7656
  */
7459
7657
  hideSampleQuestions?: boolean;
7460
- /**
7461
- * The list of runtime filters to apply to a search Answer,
7462
- * visualization, or Liveboard.
7463
- *
7464
- * Supported embed types: `SpotterEmbed`
7465
- * @example
7466
- * ```js
7467
- * const embed = new SpotterEmbed('#tsEmbed', {
7468
- * ... // other embed view config
7469
- * runtimeFilters: [
7470
- * {
7471
- * columnName: 'value',
7472
- * operator: RuntimeFilterOp.EQ,
7473
- * values: ['string' | 123 | true],
7474
- * },
7475
- * ],
7476
- * })
7477
- * ```
7478
- */
7479
- runtimeFilters?: RuntimeFilter[];
7480
- /**
7481
- * Flag to control whether runtime filters should be included in the URL.
7482
- * If true, filters will be passed via app initialization payload instead.
7483
- * If false/undefined, filters will be added to URL (default behavior).
7484
- *
7485
- * Supported embed types: `SpotterEmbed`
7486
- * @default false
7487
- */
7488
- excludeRuntimeFiltersfromURL?: boolean;
7489
- /**
7490
- * The list of runtime parameters to apply to the conversation.
7491
- *
7492
- * Supported embed types: `SpotterEmbed`
7493
- * @example
7494
- * ```js
7495
- * const embed = new SpotterEmbed('#tsEmbed', {
7496
- * ... // other embed view config
7497
- * runtimeParameters: [
7498
- * {
7499
- * name: 'Parameter Name',
7500
- * value: 'Parameter Value',
7501
- * },
7502
- * ],
7503
- * })
7504
- * ```
7505
- */
7506
- runtimeParameters?: RuntimeParameter[];
7507
- /**
7508
- * Flag to control whether runtime parameters should be included in the URL.
7509
- * If true, parameters will be passed via app initialization payload instead.
7510
- * If false/undefined, parameters will be added to URL (default behavior).
7511
- *
7512
- * Supported embed types: `SpotterEmbed`
7513
- * @default false
7514
- *
7515
- */
7516
- excludeRuntimeParametersfromURL?: boolean;
7517
7658
  }
7518
7659
  /**
7519
7660
  * The configuration for the embedded spotterEmbed options.
@@ -7574,7 +7715,7 @@ export declare class ConversationEmbed extends SpotterEmbed {
7574
7715
  * @summary ThoughtSpot Visual Embed SDK
7575
7716
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
7576
7717
  */
7577
- 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, };
7578
7719
 
7579
7720
  /**
7580
7721
  * Copyright (c) 2022