@thoughtspot/visual-embed-sdk 1.26.6 → 1.26.7

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 (263) hide show
  1. package/README.md +2 -2
  2. package/cjs/package.json +1 -1
  3. package/cjs/src/auth.d.ts +4 -4
  4. package/cjs/src/auth.d.ts.map +1 -1
  5. package/cjs/src/auth.js +16 -9
  6. package/cjs/src/auth.js.map +1 -1
  7. package/cjs/src/embed/app.d.ts +15 -15
  8. package/cjs/src/embed/app.d.ts.map +1 -1
  9. package/cjs/src/embed/app.js +4 -3
  10. package/cjs/src/embed/app.js.map +1 -1
  11. package/cjs/src/embed/app.spec.js +5 -4
  12. package/cjs/src/embed/app.spec.js.map +1 -1
  13. package/cjs/src/embed/base.d.ts +1 -1
  14. package/cjs/src/embed/base.d.ts.map +1 -1
  15. package/cjs/src/embed/base.js +9 -6
  16. package/cjs/src/embed/base.js.map +1 -1
  17. package/cjs/src/embed/base.spec.js +4 -3
  18. package/cjs/src/embed/base.spec.js.map +1 -1
  19. package/cjs/src/embed/embed.spec.js +2 -1
  20. package/cjs/src/embed/embed.spec.js.map +1 -1
  21. package/cjs/src/embed/embedConfig.d.ts +2 -1
  22. package/cjs/src/embed/embedConfig.d.ts.map +1 -1
  23. package/cjs/src/embed/embedConfig.js +2 -0
  24. package/cjs/src/embed/embedConfig.js.map +1 -1
  25. package/cjs/src/embed/events.spec.js +3 -2
  26. package/cjs/src/embed/events.spec.js.map +1 -1
  27. package/cjs/src/embed/liveboard.d.ts +35 -23
  28. package/cjs/src/embed/liveboard.d.ts.map +1 -1
  29. package/cjs/src/embed/liveboard.js +8 -4
  30. package/cjs/src/embed/liveboard.js.map +1 -1
  31. package/cjs/src/embed/liveboard.spec.js +2 -1
  32. package/cjs/src/embed/liveboard.spec.js.map +1 -1
  33. package/cjs/src/embed/sage.d.ts +48 -30
  34. package/cjs/src/embed/sage.d.ts.map +1 -1
  35. package/cjs/src/embed/sage.js +7 -6
  36. package/cjs/src/embed/sage.js.map +1 -1
  37. package/cjs/src/embed/sage.spec.js +3 -3
  38. package/cjs/src/embed/sage.spec.js.map +1 -1
  39. package/cjs/src/embed/search-bar.d.ts +22 -6
  40. package/cjs/src/embed/search-bar.d.ts.map +1 -1
  41. package/cjs/src/embed/search-bar.js.map +1 -1
  42. package/cjs/src/embed/search.d.ts +35 -16
  43. package/cjs/src/embed/search.d.ts.map +1 -1
  44. package/cjs/src/embed/search.js +10 -6
  45. package/cjs/src/embed/search.js.map +1 -1
  46. package/cjs/src/embed/search.spec.js +10 -0
  47. package/cjs/src/embed/search.spec.js.map +1 -1
  48. package/cjs/src/embed/ts-embed.d.ts +2 -1
  49. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  50. package/cjs/src/embed/ts-embed.js +45 -22
  51. package/cjs/src/embed/ts-embed.js.map +1 -1
  52. package/cjs/src/embed/ts-embed.spec.js +153 -32
  53. package/cjs/src/embed/ts-embed.spec.js.map +1 -1
  54. package/cjs/src/index.d.ts +2 -2
  55. package/cjs/src/index.d.ts.map +1 -1
  56. package/cjs/src/index.js +2 -1
  57. package/cjs/src/index.js.map +1 -1
  58. package/cjs/src/mixpanel-service.d.ts.map +1 -1
  59. package/cjs/src/mixpanel-service.js +2 -1
  60. package/cjs/src/mixpanel-service.js.map +1 -1
  61. package/cjs/src/react/index.d.ts +1 -1
  62. package/cjs/src/react/index.d.ts.map +1 -1
  63. package/cjs/src/react/index.js +2 -1
  64. package/cjs/src/react/index.js.map +1 -1
  65. package/cjs/src/react/index.spec.js +2 -2
  66. package/cjs/src/react/index.spec.js.map +1 -1
  67. package/cjs/src/types.d.ts +742 -237
  68. package/cjs/src/types.d.ts.map +1 -1
  69. package/cjs/src/types.js +653 -169
  70. package/cjs/src/types.js.map +1 -1
  71. package/cjs/src/utils/authService/authService.d.ts.map +1 -1
  72. package/cjs/src/utils/authService/authService.js +3 -2
  73. package/cjs/src/utils/authService/authService.js.map +1 -1
  74. package/cjs/src/utils/authService/authService.spec.js +3 -2
  75. package/cjs/src/utils/authService/authService.spec.js.map +1 -1
  76. package/cjs/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  77. package/cjs/src/utils/authService/tokenizedAuthService.js +2 -1
  78. package/cjs/src/utils/authService/tokenizedAuthService.js.map +1 -1
  79. package/cjs/src/utils/graphql/answerService/answerService.d.ts +2 -4
  80. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  81. package/cjs/src/utils/graphql/answerService/answerService.js +2 -4
  82. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  83. package/cjs/src/utils/logger.d.ts +18 -0
  84. package/cjs/src/utils/logger.d.ts.map +1 -0
  85. package/cjs/src/utils/logger.js +80 -0
  86. package/cjs/src/utils/logger.js.map +1 -0
  87. package/cjs/src/utils/logger.spec.d.ts +25 -0
  88. package/cjs/src/utils/logger.spec.d.ts.map +1 -0
  89. package/cjs/src/utils/logger.spec.js +116 -0
  90. package/cjs/src/utils/logger.spec.js.map +1 -0
  91. package/cjs/src/utils/processData.d.ts +6 -0
  92. package/cjs/src/utils/processData.d.ts.map +1 -1
  93. package/cjs/src/utils/processData.js +5 -1
  94. package/cjs/src/utils/processData.js.map +1 -1
  95. package/cjs/src/utils/processTrigger.js +1 -1
  96. package/dist/src/auth.d.ts +4 -4
  97. package/dist/src/auth.d.ts.map +1 -1
  98. package/dist/src/embed/app.d.ts +15 -15
  99. package/dist/src/embed/app.d.ts.map +1 -1
  100. package/dist/src/embed/base.d.ts +1 -1
  101. package/dist/src/embed/base.d.ts.map +1 -1
  102. package/dist/src/embed/embedConfig.d.ts +2 -1
  103. package/dist/src/embed/embedConfig.d.ts.map +1 -1
  104. package/dist/src/embed/liveboard.d.ts +35 -23
  105. package/dist/src/embed/liveboard.d.ts.map +1 -1
  106. package/dist/src/embed/sage.d.ts +48 -30
  107. package/dist/src/embed/sage.d.ts.map +1 -1
  108. package/dist/src/embed/search-bar.d.ts +22 -6
  109. package/dist/src/embed/search-bar.d.ts.map +1 -1
  110. package/dist/src/embed/search.d.ts +35 -16
  111. package/dist/src/embed/search.d.ts.map +1 -1
  112. package/dist/src/embed/ts-embed.d.ts +2 -1
  113. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  114. package/dist/src/index.d.ts +2 -2
  115. package/dist/src/index.d.ts.map +1 -1
  116. package/dist/src/mixpanel-service.d.ts.map +1 -1
  117. package/dist/src/react/index.d.ts +1 -1
  118. package/dist/src/react/index.d.ts.map +1 -1
  119. package/dist/src/types.d.ts +742 -237
  120. package/dist/src/types.d.ts.map +1 -1
  121. package/dist/src/utils/authService/authService.d.ts.map +1 -1
  122. package/dist/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  123. package/dist/src/utils/graphql/answerService/answerService.d.ts +2 -4
  124. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  125. package/dist/src/utils/logger.d.ts +18 -0
  126. package/dist/src/utils/logger.d.ts.map +1 -0
  127. package/dist/src/utils/logger.spec.d.ts +25 -0
  128. package/dist/src/utils/logger.spec.d.ts.map +1 -0
  129. package/dist/src/utils/processData.d.ts +6 -0
  130. package/dist/src/utils/processData.d.ts.map +1 -1
  131. package/dist/tsembed-react.es.js +3716 -3107
  132. package/dist/tsembed-react.js +3620 -3012
  133. package/dist/tsembed.es.js +9830 -9212
  134. package/dist/tsembed.js +15079 -14462
  135. package/dist/visual-embed-sdk-react-full.d.ts +923 -332
  136. package/dist/visual-embed-sdk-react.d.ts +923 -332
  137. package/dist/visual-embed-sdk.d.ts +923 -332
  138. package/lib/package.json +1 -1
  139. package/lib/src/auth.d.ts +4 -4
  140. package/lib/src/auth.d.ts.map +1 -1
  141. package/lib/src/auth.js +17 -10
  142. package/lib/src/auth.js.map +1 -1
  143. package/lib/src/embed/app.d.ts +15 -15
  144. package/lib/src/embed/app.d.ts.map +1 -1
  145. package/lib/src/embed/app.js +4 -3
  146. package/lib/src/embed/app.js.map +1 -1
  147. package/lib/src/embed/app.spec.js +5 -4
  148. package/lib/src/embed/app.spec.js.map +1 -1
  149. package/lib/src/embed/base.d.ts +1 -1
  150. package/lib/src/embed/base.d.ts.map +1 -1
  151. package/lib/src/embed/base.js +9 -6
  152. package/lib/src/embed/base.js.map +1 -1
  153. package/lib/src/embed/base.spec.js +5 -4
  154. package/lib/src/embed/base.spec.js.map +1 -1
  155. package/lib/src/embed/embed.spec.js +2 -1
  156. package/lib/src/embed/embed.spec.js.map +1 -1
  157. package/lib/src/embed/embedConfig.d.ts +2 -1
  158. package/lib/src/embed/embedConfig.d.ts.map +1 -1
  159. package/lib/src/embed/embedConfig.js +2 -0
  160. package/lib/src/embed/embedConfig.js.map +1 -1
  161. package/lib/src/embed/events.spec.js +3 -2
  162. package/lib/src/embed/events.spec.js.map +1 -1
  163. package/lib/src/embed/liveboard.d.ts +35 -23
  164. package/lib/src/embed/liveboard.d.ts.map +1 -1
  165. package/lib/src/embed/liveboard.js +8 -4
  166. package/lib/src/embed/liveboard.js.map +1 -1
  167. package/lib/src/embed/liveboard.spec.js +2 -1
  168. package/lib/src/embed/liveboard.spec.js.map +1 -1
  169. package/lib/src/embed/sage.d.ts +48 -30
  170. package/lib/src/embed/sage.d.ts.map +1 -1
  171. package/lib/src/embed/sage.js +7 -6
  172. package/lib/src/embed/sage.js.map +1 -1
  173. package/lib/src/embed/sage.spec.js +3 -3
  174. package/lib/src/embed/sage.spec.js.map +1 -1
  175. package/lib/src/embed/search-bar.d.ts +22 -6
  176. package/lib/src/embed/search-bar.d.ts.map +1 -1
  177. package/lib/src/embed/search-bar.js.map +1 -1
  178. package/lib/src/embed/search.d.ts +35 -16
  179. package/lib/src/embed/search.d.ts.map +1 -1
  180. package/lib/src/embed/search.js +11 -7
  181. package/lib/src/embed/search.js.map +1 -1
  182. package/lib/src/embed/search.spec.js +10 -0
  183. package/lib/src/embed/search.spec.js.map +1 -1
  184. package/lib/src/embed/ts-embed.d.ts +2 -1
  185. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  186. package/lib/src/embed/ts-embed.js +48 -25
  187. package/lib/src/embed/ts-embed.js.map +1 -1
  188. package/lib/src/embed/ts-embed.spec.js +153 -32
  189. package/lib/src/embed/ts-embed.spec.js.map +1 -1
  190. package/lib/src/index.d.ts +2 -2
  191. package/lib/src/index.d.ts.map +1 -1
  192. package/lib/src/index.js +2 -2
  193. package/lib/src/index.js.map +1 -1
  194. package/lib/src/mixpanel-service.d.ts.map +1 -1
  195. package/lib/src/mixpanel-service.js +2 -1
  196. package/lib/src/mixpanel-service.js.map +1 -1
  197. package/lib/src/react/index.d.ts +1 -1
  198. package/lib/src/react/index.d.ts.map +1 -1
  199. package/lib/src/react/index.js +1 -1
  200. package/lib/src/react/index.js.map +1 -1
  201. package/lib/src/react/index.spec.js +2 -2
  202. package/lib/src/react/index.spec.js.map +1 -1
  203. package/lib/src/types.d.ts +742 -237
  204. package/lib/src/types.d.ts.map +1 -1
  205. package/lib/src/types.js +652 -168
  206. package/lib/src/types.js.map +1 -1
  207. package/lib/src/utils/authService/authService.d.ts.map +1 -1
  208. package/lib/src/utils/authService/authService.js +3 -2
  209. package/lib/src/utils/authService/authService.js.map +1 -1
  210. package/lib/src/utils/authService/authService.spec.js +4 -3
  211. package/lib/src/utils/authService/authService.spec.js.map +1 -1
  212. package/lib/src/utils/authService/tokenizedAuthService.d.ts.map +1 -1
  213. package/lib/src/utils/authService/tokenizedAuthService.js +2 -1
  214. package/lib/src/utils/authService/tokenizedAuthService.js.map +1 -1
  215. package/lib/src/utils/graphql/answerService/answerService.d.ts +2 -4
  216. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  217. package/lib/src/utils/graphql/answerService/answerService.js +2 -4
  218. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  219. package/lib/src/utils/logger.d.ts +18 -0
  220. package/lib/src/utils/logger.d.ts.map +1 -0
  221. package/lib/src/utils/logger.js +74 -0
  222. package/lib/src/utils/logger.js.map +1 -0
  223. package/lib/src/utils/logger.spec.d.ts +25 -0
  224. package/lib/src/utils/logger.spec.d.ts.map +1 -0
  225. package/lib/src/utils/logger.spec.js +93 -0
  226. package/lib/src/utils/logger.spec.js.map +1 -0
  227. package/lib/src/utils/processData.d.ts +6 -0
  228. package/lib/src/utils/processData.d.ts.map +1 -1
  229. package/lib/src/utils/processData.js +4 -1
  230. package/lib/src/utils/processData.js.map +1 -1
  231. package/lib/src/utils/processTrigger.js +1 -1
  232. package/lib/src/visual-embed-sdk.d.ts +927 -336
  233. package/package.json +1 -1
  234. package/src/auth.ts +20 -13
  235. package/src/embed/app.spec.ts +5 -4
  236. package/src/embed/app.ts +23 -22
  237. package/src/embed/base.spec.ts +6 -5
  238. package/src/embed/base.ts +18 -11
  239. package/src/embed/embed.spec.ts +2 -1
  240. package/src/embed/embedConfig.ts +2 -0
  241. package/src/embed/events.spec.ts +3 -2
  242. package/src/embed/liveboard.spec.ts +2 -1
  243. package/src/embed/liveboard.ts +43 -27
  244. package/src/embed/sage.spec.ts +3 -3
  245. package/src/embed/sage.ts +54 -36
  246. package/src/embed/search-bar.tsx +22 -6
  247. package/src/embed/search.spec.ts +13 -0
  248. package/src/embed/search.ts +46 -21
  249. package/src/embed/ts-embed.spec.ts +182 -43
  250. package/src/embed/ts-embed.ts +78 -59
  251. package/src/index.ts +2 -0
  252. package/src/mixpanel-service.ts +2 -1
  253. package/src/react/index.spec.tsx +2 -2
  254. package/src/react/index.tsx +1 -0
  255. package/src/types.ts +753 -245
  256. package/src/utils/authService/authService.spec.ts +7 -6
  257. package/src/utils/authService/authService.ts +4 -2
  258. package/src/utils/authService/tokenizedAuthService.ts +2 -1
  259. package/src/utils/graphql/answerService/answerService.ts +2 -4
  260. package/src/utils/logger.spec.ts +108 -0
  261. package/src/utils/logger.ts +88 -0
  262. package/src/utils/processData.ts +4 -1
  263. package/src/utils/processTrigger.ts +1 -1
@@ -234,7 +234,7 @@ export function useEmbedRef<T extends EmbedComponent>(): React.MutableRefObject<
234
234
  * @summary ThoughtSpot Visual Embed SDK
235
235
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
236
236
  */
237
- export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, 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, };
237
+ export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportTMLInput, getEmbedConfig as getInitConfig, getSessionInfo, SearchEmbed, SearchBarEmbed, PinboardEmbed, LiveboardEmbed, SageEmbed, AppEmbed, AuthFailureType, AuthStatus, AuthEvent, AuthEventEmitter, AnswerService, 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, };
238
238
 
239
239
  /**
240
240
  * @group Embed components
@@ -242,25 +242,41 @@ export { init, logout, prefetch, executeTML, exportTML, executeTMLInput, exportT
242
242
  export interface SearchBarViewConfig extends Omit<ViewConfig, 'runtimeFilters' | 'showAlerts' | 'dataPanelV2' | 'hiddenHomepageModules' | 'hiddenHomeLeftNavItems' | 'hiddenTabs' | 'visibleTabs' | 'reorderedHomepageModules'> {
243
243
  /**
244
244
  * The array of data source GUIDs to set on load.
245
- * Only a single dataSource supported currently.
245
+ * Only a single data source is supported currently.
246
246
  *
247
- * @deprecated Use dataSource instead
247
+ * @deprecated Use `dataSource` instead
248
248
  */
249
249
  dataSources?: string[];
250
250
  /**
251
251
  * The array of data source GUIDs to set on load.
252
252
  *
253
- * @version: SDK: 1.19.0
253
+ * @version: SDK: 1.19.0, ThoughtSpot 9.0.0.cl, 9.0.1.sw
254
254
  */
255
255
  dataSource?: string;
256
256
  /**
257
- * Flag to set if last selected dataSource should be used
257
+ * Boolean to define if the last selected data source should be used
258
258
  *
259
- * @version: SDK: 1.24.0
259
+ * @version: SDK: 1.24.0, ThoughtSpot 9.5.0.cl, 9.5.0.sw
260
260
  */
261
261
  useLastSelectedSources?: boolean;
262
262
  /**
263
- * Configuration for search options
263
+ * Configuration for search options.
264
+ * Includes the following properties:
265
+ *
266
+ * `searchTokenString`: Search tokens to pass in the query.
267
+ *
268
+ * `executeSearch`: Boolean to define if the search should be executed or not.
269
+ * If it is executed, the focus is placed on the results.
270
+ * If it’s not executed, the focus is placed at the end of
271
+ * the token string in the search bar.
272
+ *
273
+ * @example
274
+ * ```js
275
+ * searchOptions: {
276
+ * searchTokenString: '[quantity purchased] [region]',
277
+ * executeSearch: true,
278
+ * }
279
+ * ```
264
280
  */
265
281
  searchOptions?: SearchOptions;
266
282
  }
@@ -296,14 +312,14 @@ export declare class SearchBarEmbed extends TsEmbed {
296
312
  */
297
313
  export interface SearchOptions {
298
314
  /**
299
- * The query string to pre-fill in natual language search bar
315
+ * The query string to pass for Natural Language Search.
300
316
  */
301
317
  searchQuery: string;
302
318
  /**
303
- * Boolean to determine if the search should be executed or not.
304
- * if it is executed, put the focus on the results.
305
- * if it’s not executed, put the focus in the search bar - at the end of
306
- * the tokens
319
+ * Boolean to define if the search should be executed or not.
320
+ * If it is executed, the focus is placed on the results.
321
+ * If it’s not executed, the focus is placed at the end of
322
+ * the token string in the search bar.
307
323
  */
308
324
  executeSearch?: boolean;
309
325
  }
@@ -311,16 +327,16 @@ export interface SearchOptions {
311
327
  * The configuration attributes for the embedded Natural language search view. Based on
312
328
  * GPT and LLM.
313
329
  *
314
- * @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
330
+ * @version: SDK: 1.23.0 | ThoughtSpot: 9.8.0.cl, 9.8.0.sw
315
331
  * @group Embed components
316
332
  */
317
333
  export interface SageViewConfig extends Omit<ViewConfig, 'hiddenHomepageModules' | 'hiddenHomeLeftNavItems' | 'hiddenTabs' | 'visibleTabs' | 'reorderedHomepageModules'> {
318
334
  /**
319
- * If set to true, a list of liveboard and answers related
335
+ * If set to true, a list of Liveboard and Answers related
320
336
  * to the natural language search will be shown below the
321
337
  * AI generated answer.
322
338
  *
323
- * @deprecated Currently liveboard and answers related
339
+ * @deprecated Currently Liveboard and Answers related
324
340
  * to the natural language search will not be shown for sage
325
341
  * embed
326
342
  */
@@ -337,63 +353,81 @@ export interface SageViewConfig extends Omit<ViewConfig, 'hiddenHomepageModules'
337
353
  */
338
354
  isProductTour?: boolean;
339
355
  /**
340
- * flag to hide search bar title. default false.
356
+ * Show or hide the search bar title.
341
357
  *
342
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl
358
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
343
359
  */
344
360
  hideSearchBarTitle?: boolean;
345
361
  /**
346
- * flag to disable Sage Answer header(`AI Answer` title section on top of the Sage
347
- * answer). default false.
362
+ * Show or hide the Answer header, that is, the `AI Answer` title
363
+ * at the top of the Answer page.
348
364
  *
349
- * @version SDK: 1.26.0 | Thoughtspot: 9.9.0.cl
365
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
350
366
  */
351
367
  hideSageAnswerHeader?: boolean;
352
368
  /**
353
- * flag to disable changing worksheet. default false.
369
+ * Disable the worksheet selection option.
354
370
  *
355
- * @version SDK: 1.26.0 | Thoughtspot: 9.9.0.cl
371
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
356
372
  */
357
373
  disableWorksheetChange?: boolean;
358
374
  /**
359
- * flag to hide worksheet selector. default false.
375
+ * Hide the worksheet selection panel.
376
+ *
377
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
360
378
  */
361
379
  hideWorksheetSelector?: boolean;
362
380
  /**
363
- * If set to true, the search bar auto complete search suggestions will not be shown.
364
- * default false
381
+ * Show or hide autocomplete suggestions for the search query string.
365
382
  *
366
- * @version SDK: 1.26.0 | Thoughtspot: 9.9.0.cl
383
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
367
384
  */
368
385
  hideAutocompleteSuggestions?: boolean;
369
386
  /**
370
- * If set to false, the auto complete search suggestions not be shown
387
+ * Show or hide autocomplete suggestions for the search query string.
371
388
  *
372
- * @deprecated currently, object suggestions will not be shown for sage embed
373
- * earlier this flag was used to show Auto complete suggestions
389
+ * @deprecated
390
+ * Currently, the object suggestions will not be shown for Natural Language Search.
391
+ * You can use {@link hideAutocompleteSuggestions} instead.
374
392
  */
375
393
  showObjectSuggestions?: boolean;
376
394
  /**
377
- * If set to true, sample questions would be hidden to user.
378
- * These sample questions are autogenerated based on selected datasource.
395
+ * Show or hide sample questions.
396
+ * The sample questions are autogenerated based on the worksheet
397
+ * selected for the search operation.
379
398
  *
380
- * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
399
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
381
400
  */
382
401
  hideSampleQuestions?: boolean;
383
402
  /**
384
- * The data source GUID to set on load.
403
+ * The data source GUID (Worksheet GUID) to set on load.
385
404
  */
386
405
  dataSource?: string;
387
406
  /**
388
- * Configuration for search options
407
+ * Includes the following properties:
389
408
  *
390
- * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl
409
+ * `searchQuery`: The search query string to pass in the search bar.
410
+ * Supports Natural Language Search queries.
411
+ *
412
+ * `executeSearch`: Boolean to define if the search should be executed or not.
413
+ * If it is executed, the focus is placed on the results.
414
+ * If it’s not executed, the focus is placed at the end of
415
+ * the token string in the search bar.
416
+ *
417
+ * @example
418
+ * ```js
419
+ * searchOptions: {
420
+ * searchQuery: 'average sales by country and product type',
421
+ * executeSearch: true,
422
+ * }
423
+ * ```
424
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
391
425
  */
392
426
  searchOptions?: SearchOptions;
393
427
  }
394
428
  export declare const HiddenActionItemByDefaultForSageEmbed: Action[];
395
429
  /**
396
- * Embed ThoughtSpot LLM and GPT based natural language search component.
430
+ * Embed ThoughtSpot LLM and GPT-based Natural Language Search component.
397
431
  *
398
432
  * @version: SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.1-sw
399
433
  * @group Embed components
@@ -412,6 +446,13 @@ export declare class SageEmbed extends V1Embed {
412
446
  * @returns {string} query string
413
447
  */
414
448
  protected getEmbedParams(): string;
449
+ /**
450
+ * Construct the URL of the embedded ThoughtSpot sage to be
451
+ * loaded in the iframe
452
+ *
453
+ * @returns {string} iframe url
454
+ */
455
+ getIFrameSrc(): string;
415
456
  /**
416
457
  * Render the embedded ThoughtSpot Sage
417
458
  *
@@ -429,18 +470,19 @@ export declare class SageEmbed extends V1Embed {
429
470
  * @author Ayon Ghosh <ayon.ghosh@thoughtspot.com>
430
471
  */
431
472
  /**
432
- * Configuration for search options
473
+ * Configuration for search options.
474
+ *
433
475
  */
434
476
  export interface SearchOptions {
435
477
  /**
436
- * The tml string to load the answer
478
+ * Search tokens to pass in the query.
437
479
  */
438
480
  searchTokenString: string;
439
481
  /**
440
- * Boolean to determine if the search should be executed or not.
441
- * if it is executed, put the focus on the results.
442
- * if it’s not executed, put the focus in the search bar - at the end of
443
- * the tokens
482
+ * Boolean to define if the search should be executed or not.
483
+ * If it is executed, the focus is placed on the results.
484
+ * If it’s not executed, the focus is placed at the end of
485
+ * the token string in the search bar.
444
486
  */
445
487
  executeSearch?: boolean;
446
488
  }
@@ -456,11 +498,11 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
456
498
  */
457
499
  collapseDataSources?: boolean;
458
500
  /**
459
- * If set to true, hides the data sources panel.
501
+ * Show or hide the data sources panel.
460
502
  */
461
503
  hideDataSources?: boolean;
462
504
  /**
463
- * If set to true, hides the charts and tables in search answers.
505
+ * Show or hide the charts and tables in search answers.
464
506
  * This attribute can be used to create a custom visualization
465
507
  * using raw answer data.
466
508
  */
@@ -482,9 +524,9 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
482
524
  forceTable?: boolean;
483
525
  /**
484
526
  * The array of data source GUIDs to set on load.
485
- * Only a single dataSource supported currently.
527
+ * Only a single data source is supported currently.
486
528
  *
487
- * @deprecated Use dataSource instead
529
+ * @deprecated Use `dataSource` instead.
488
530
  */
489
531
  dataSources?: string[];
490
532
  /**
@@ -496,11 +538,29 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
496
538
  /**
497
539
  * The initial search query to load the answer with.
498
540
  *
499
- * @deprecated Use {@link searchOptions} instead
541
+ * @deprecated
542
+ *
543
+ * Use {@link searchOptions} instead.
500
544
  */
501
545
  searchQuery?: string;
502
546
  /**
503
- * Configuration for search options
547
+ * Configuration for search options.
548
+ * Includes the following properties:
549
+ *
550
+ * `searchTokenString`: Search tokens to pass in the query.
551
+ *
552
+ * `executeSearch`: Boolean to define if the search should be executed or not.
553
+ * If it is executed, the focus is placed on the results.
554
+ * If it’s not executed, the focus is placed at the end of
555
+ * the token string in the search bar.
556
+ *
557
+ * @example
558
+ * ```js
559
+ * searchOptions: {
560
+ * searchTokenString: '[quantity purchased] [region]',
561
+ * executeSearch: true,
562
+ * }
563
+ * ```
504
564
  */
505
565
  searchOptions?: SearchOptions;
506
566
  /**
@@ -508,10 +568,10 @@ export interface SearchViewConfig extends Omit<ViewConfig, 'hiddenHomepageModule
508
568
  */
509
569
  answerId?: string;
510
570
  /**
511
- * If set to true, search page will render without the Search Bar
571
+ * If set to true, the search page will render without the Search Bar
512
572
  * The chart/table should still be visible.
513
573
  *
514
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
574
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
515
575
  */
516
576
  hideSearchBar?: boolean;
517
577
  /**
@@ -541,6 +601,14 @@ export declare class SearchEmbed extends TsEmbed {
541
601
  protected viewConfig: SearchViewConfig;
542
602
  constructor(domSelector: DOMSelector, viewConfig: SearchViewConfig);
543
603
  protected getEmbedParams(): string;
604
+ /**
605
+ * Construct the URL of the embedded ThoughtSpot search to be
606
+ * loaded in the iframe
607
+ *
608
+ * @param answerId The GUID of a saved answer
609
+ * @param dataSources A list of data source GUIDs
610
+ */
611
+ getIFrameSrc(): string;
544
612
  /**
545
613
  * Render the embedded ThoughtSpot search
546
614
  */
@@ -597,43 +665,43 @@ export declare enum Page {
597
665
  */
598
666
  export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
599
667
  /**
600
- * If true, the main navigation bar within the ThoughtSpot app
668
+ * If true, the top navigation bar within the ThoughtSpot app
601
669
  * is displayed. By default, the navigation bar is hidden.
602
- * This flag also control the homepage left nav-bar.
670
+ * This flag also controls the homepage left navigation bar.
603
671
  */
604
672
  showPrimaryNavbar?: boolean;
605
673
  /**
606
- * Flag to control Homepage Left Nav Bar
607
- * If showPrimaryNavbar is true, ie navigation bar(Global nav-bar) and Homepage left
608
- * nav-bar is visible, this flag will only hide the homepage left nav.
609
- * Precedence of showPrimaryNavbar flag > hideHomepageLeftNav flag.
674
+ * Control the visibility of the left navigation bar on the Homepage.
675
+ * If showPrimaryNavbar is true, that is, if the Global and Homepage
676
+ * nav-bars are visible, this flag will only hide the homepage left nav-bar.
677
+ * The showPrimaryNavbar flag takes precedence over the hideHomepageLeftNav.
610
678
  *
611
679
  * @default false
612
680
  * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
613
681
  */
614
682
  hideHomepageLeftNav?: boolean;
615
683
  /**
616
- * If true, help and profile buttons will hide on NavBar. By default,
617
- * they are shown.
684
+ * Control the visibility of the help (?) and profile buttons on the
685
+ * Global nav-bar. By default, these buttons are visible on the nav-bar.
618
686
  */
619
687
  disableProfileAndHelp?: boolean;
620
688
  /**
621
- * If true, application switcher button will hide on NavBar. By default,
622
- * they are shown.
689
+ * Control the visibility of the application switcher button on the nav-bar.
690
+ * By default, the application switcher is shown.
623
691
  */
624
692
  hideApplicationSwitcher?: boolean;
625
693
  /**
626
- * If true, org switcher button will hide on NavBar. By default,
627
- * they are shown.
694
+ * Control the visibility of the Org switcher button on the nav-bar.
695
+ * By default, the Org switcher button is shown.
628
696
  */
629
697
  hideOrgSwitcher?: boolean;
630
698
  /**
631
- * A URL path within the app that is to be embedded.
699
+ * A URL path to the embedded application page
632
700
  * If both path and pageId attributes are defined, the path definition
633
701
  * takes precedence. This is the path post the `#/` in the URL of the standalone
634
702
  * ThoughtSpot app. Use this to open the embedded view to a specific path.
635
703
  *
636
- * For eg, if you want the component to open to a specific liveboard
704
+ * For eg, if you want the component to open to a specific Liveboard
637
705
  * you could set the path to `pinboard/<liveboardId>/tab/<tabId>`.
638
706
  *
639
707
  * @example
@@ -744,6 +812,12 @@ export declare class AppEmbed extends V1Embed {
744
812
  * embedded Liveboard or visualization.
745
813
  */
746
814
  protected getEmbedParams(): string;
815
+ /**
816
+ * Constructs the URL of the ThoughtSpot app page to be rendered.
817
+ *
818
+ * @param pageId The ID of the page to be embedded.
819
+ */
820
+ getIFrameSrc(): string;
747
821
  /**
748
822
  * Set the iframe height as per the computed height received
749
823
  * from the ThoughtSpot app.
@@ -797,8 +871,8 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
797
871
  */
798
872
  fullHeight?: boolean;
799
873
  /**
800
- * This is the minimum height(in pixels) for a full height Liveboard.
801
- * Setting this height helps resolves issues with empty Liveboards and
874
+ * This is the minimum height(in pixels) for a full-height Liveboard.
875
+ * Setting this height helps resolve issues with empty Liveboards and
802
876
  * other screens navigable from a Liveboard.
803
877
  *
804
878
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
@@ -811,7 +885,7 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
811
885
  enableVizTransformations?: boolean;
812
886
  /**
813
887
  * The Liveboard to display in the embedded view.
814
- * Use either of liveboardId or pinboardId to reference the Liveboard to embed.
888
+ * Use either liveboardId or pinboardId to reference the Liveboard to embed.
815
889
  *
816
890
  * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
817
891
  */
@@ -830,79 +904,91 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
830
904
  * If set to true, all filter chips from a
831
905
  * Liveboard page will be read-only (no X buttons)
832
906
  *
833
- * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1
907
+ * @version SDK: 1.3.0 | ThoughtSpot ts7.aug.cl, 7.2.1.sw
834
908
  */
835
909
  preventLiveboardFilterRemoval?: boolean;
836
910
  /**
837
- * Array of viz ids which should be visible when the liveboard
838
- * first renders. This can be changed by triggering the "SetVisibleVizs"
911
+ * Array of visualization IDs which should be visible when the Liveboard
912
+ * renders. This can be changed by triggering the `SetVisibleVizs`
839
913
  * event.
840
914
  *
841
915
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1-sw
842
916
  */
843
917
  visibleVizs?: string[];
844
918
  /**
845
- * To support backward compatibilty
919
+ * To support backward compatibility
846
920
  *
847
921
  * @hidden
848
922
  */
849
923
  preventPinboardFilterRemoval?: boolean;
850
924
  /**
851
- * Render embedded Liveboards and visualizations in the new Liveboard experience mode
925
+ * Render embedded Liveboards and visualizations in the
926
+ * new Liveboard experience mode.
852
927
  *
853
928
  * @version SDK: 1.14.0 | ThoughtSpot: 8.6.0.cl, 8.8.1-sw
854
929
  */
855
930
  liveboardV2?: boolean;
856
931
  /**
857
- * Tab ID of the Liveboard that is supposed to be active
932
+ * Set a Liveboard tab as an active tab.
933
+ * Specify the tab ID.
858
934
  *
859
935
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1-sw
860
936
  */
861
937
  activeTabId?: string;
862
938
  /**
863
- * Hide tab Panel of embedded LB
939
+ * Show or hide the tab panel of the embedded Liveboard.
864
940
  *
865
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
941
+ * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
866
942
  */
867
943
  hideTabPanel?: boolean;
868
944
  /**
869
- * Show or hide Liveboard header
945
+ * Show or hide the Liveboard header.
870
946
  *
871
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
947
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
872
948
  * @default false
873
949
  */
874
950
  hideLiveboardHeader?: boolean;
875
951
  /**
876
- * Show or hide Liveboard title
952
+ * Show or hide the Liveboard title.
877
953
  *
878
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
954
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
879
955
  * @default false
880
956
  */
881
957
  showLiveboardTitle?: boolean;
882
958
  /**
883
- * Show or hide Liveboard description
959
+ * Show or hide the Liveboard description.
884
960
  *
885
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
961
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
886
962
  * @default false
887
963
  */
888
964
  showLiveboardDescription?: boolean;
889
965
  /**
890
- * Boolean for sticky Liveboard header.
966
+ * Control the position and visibility of
967
+ * the Liveboard header as the users scroll down the
968
+ * embedded Liveboard page.
891
969
  *
892
970
  * @example
893
971
  * ```js
894
972
  * const embed = new LiveboardEmbed('#embed', {
895
- * ... // other liveboard view config
973
+ * ... // other Liveboard view config
896
974
  * isLiveboardHeaderSticky: true,
897
975
  * });
898
976
  * ```
899
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
977
+ * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
900
978
  */
901
979
  isLiveboardHeaderSticky?: boolean;
980
+ /**
981
+ * enable or disable ask sage
982
+ *
983
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
984
+ * @default true
985
+ */
986
+ enableAskSage?: boolean;
902
987
  }
903
988
  /**
904
- * Embed a ThoughtSpot Liveboard or a Thoughtspot visualization. When rendered it already
905
- * waits for the authentication to complete, so no need to wait for AuthStatus.SUCCESS.
989
+ * Embed a ThoughtSpot Liveboard or visualization. When rendered it already
990
+ * waits for the authentication to complete, so you need not wait for
991
+ * `AuthStatus.SUCCESS`.
906
992
  *
907
993
  * @example
908
994
  * ```js
@@ -1148,8 +1234,8 @@ export declare enum AuthStatus {
1148
1234
  */
1149
1235
  LOGOUT = "LOGOUT",
1150
1236
  /**
1151
- * Emitted when inPopup: true in the SAMLRedirect flow.
1152
- * And, we are waiting for popup to be triggered either programatically
1237
+ * Emitted when inPopup is true in the SAMLRedirect flow and the
1238
+ * popup is waiting to be triggered either programmatically
1153
1239
  * or by the trigger button.
1154
1240
  *
1155
1241
  * @version SDK: 1.19.0
@@ -1194,8 +1280,8 @@ export interface AuthEventEmitter {
1194
1280
  */
1195
1281
  export declare enum AuthEvent {
1196
1282
  /**
1197
- * Manually trigger the SSO popup. This is useful with
1198
- * authStatus: SAMLRedirect/OIDCRedicre and inPopup: true
1283
+ * Manually trigger the SSO popup. This is useful when
1284
+ * authStatus is SAMLRedirect/OIDCRedirect and inPopup is set to true
1199
1285
  */
1200
1286
  TRIGGER_SSO_POPUP = "TRIGGER_SSO_POPUP"
1201
1287
  }
@@ -1304,10 +1390,14 @@ export declare enum AuthType {
1304
1390
  */
1305
1391
  None = "None",
1306
1392
  /**
1307
- * Passthrough SSO to the embedded App within the iframe. Requires least
1393
+ * Passthrough SSO to the embedded application within the iframe. Requires least
1308
1394
  * configuration, but may not be supported by all IDPs. This will behave like `None`
1309
1395
  * if SSO is not configured on ThoughtSpot.
1310
1396
  *
1397
+ * To use this:
1398
+ * Your SAML or OpenID provider must allow iframe redirects.
1399
+ * For example, if you are using Okta as IdP, you can enable iframe embedding.
1400
+ *
1311
1401
  * @example
1312
1402
  * ```js
1313
1403
  * init({
@@ -1315,12 +1405,7 @@ export declare enum AuthType {
1315
1405
  * authType: AuthType.EmbeddedSSO,
1316
1406
  * });
1317
1407
  * ```
1318
- * Set authentication type as Embedded SSO.
1319
- *
1320
- * To use this:
1321
- * Your SAML or OpenID provider must allow iframe redirects.
1322
- * eg. If you are using okta as IdP, you can enable iFrame embedding.
1323
- * @version: SDK: 1.15.0 | ThouhgtSpot: 8.8.0.cl
1408
+ * @version: SDK: 1.15.0 | ThoughtSpot: 8.8.0.cl
1324
1409
  */
1325
1410
  EmbeddedSSO = "EmbeddedSSO",
1326
1411
  /**
@@ -1339,10 +1424,10 @@ export declare enum AuthType {
1339
1424
  SAML = "SSO_SAML",
1340
1425
  /**
1341
1426
  * SSO using SAML
1342
- * Will make the host application redirect to the SAML Idp. Use this
1343
- * when the idp does not allow itself to be embedded.
1427
+ * Makes the host application redirect to the SAML IdP. Use this
1428
+ * if your IdP does not allow itself to be embedded.
1344
1429
  *
1345
- * This redirects the host application to the SAML Idp. The host application
1430
+ * This redirects the host application to the SAML IdP. The host application
1346
1431
  * will be redirected back to the ThoughtSpot app after authentication.
1347
1432
  *
1348
1433
  * @example
@@ -1353,7 +1438,7 @@ export declare enum AuthType {
1353
1438
  * });
1354
1439
  * ```
1355
1440
  *
1356
- * This opens the SAML Idp in a popup window. The popup is triggered
1441
+ * This opens the SAML IdP in a popup window. The popup is triggered
1357
1442
  * when the user clicks the trigger button. The popup window will be
1358
1443
  * closed automatically after authentication.
1359
1444
  * @example
@@ -1367,8 +1452,8 @@ export declare enum AuthType {
1367
1452
  * });
1368
1453
  * ```
1369
1454
  *
1370
- * Can also use event to trigger the popup flow. Works the same
1371
- * as above example.
1455
+ * Can also use the event to trigger the popup flow. Works the same
1456
+ * as the above example.
1372
1457
  * @example
1373
1458
  * ```js
1374
1459
  * const authEE = init({
@@ -1392,7 +1477,7 @@ export declare enum AuthType {
1392
1477
  OIDC = "SSO_OIDC",
1393
1478
  /**
1394
1479
  * SSO using OIDC
1395
- * Will make the host application redirect to the OIDC Idp.
1480
+ * Will make the host application redirect to the OIDC IdP.
1396
1481
  * See code samples in {@link SAMLRedirect}.
1397
1482
  */
1398
1483
  OIDCRedirect = "SSO_OIDC",
@@ -1404,8 +1489,8 @@ export declare enum AuthType {
1404
1489
  */
1405
1490
  AuthServer = "AuthServer",
1406
1491
  /**
1407
- * Trusted authentication server, Use your own authentication server
1408
- * which returns a bearer token, generated using the secret_key obtained
1492
+ * Trusted authentication server. Use your own authentication server
1493
+ * which returns a bearer token, generated using the `secret_key` obtained
1409
1494
  * from ThoughtSpot.
1410
1495
  *
1411
1496
  * @example
@@ -1422,11 +1507,11 @@ export declare enum AuthType {
1422
1507
  */
1423
1508
  TrustedAuthToken = "AuthServer",
1424
1509
  /**
1425
- * Trusted authentication server Cookieless, Use you own authentication
1426
- * server which returns a bearer token, generated using the secret_key
1510
+ * Trusted authentication server Cookieless, Use your own authentication
1511
+ * server which returns a bearer token, generated using the `secret_key`
1427
1512
  * obtained from ThoughtSpot. This uses a cookieless authentication
1428
- * approach, recommended to by pass third-party cookie-blocking restriction
1429
- * implemented by some browsers
1513
+ * approach, recommended to bypass the third-party cookie-blocking restriction
1514
+ * implemented by some browsers.
1430
1515
  *
1431
1516
  * @example
1432
1517
  * ```js
@@ -1439,7 +1524,7 @@ export declare enum AuthType {
1439
1524
  * .then((data) => data.token);
1440
1525
  * }
1441
1526
  * ```
1442
- * @version SDK: 1.22.0| ThouhgtSpot: 9.3.0.cl, 9.5.1.sw
1527
+ * @version SDK: 1.22.0| ThoughtSpot: 9.3.0.cl, 9.5.1.sw
1443
1528
  */
1444
1529
  TrustedAuthTokenCookieless = "AuthServerCookieless",
1445
1530
  /**
@@ -1561,13 +1646,19 @@ export interface EmbedConfig {
1561
1646
  * The ThoughtSpot cluster hostname or IP address.
1562
1647
  */
1563
1648
  thoughtSpotHost: string;
1649
+ /**
1650
+ * If true, all the iframe links will have /v2 added automatically.
1651
+ * If false, all the iframe links will have /v1 added automatically.
1652
+ * If undefined, nothing will be added
1653
+ */
1654
+ enableReactShell?: boolean | undefined;
1564
1655
  /**
1565
1656
  * The authentication mechanism to use.
1566
1657
  */
1567
1658
  authType: AuthType;
1568
1659
  /**
1569
1660
  * [AuthServer] The trusted authentication endpoint to use to get the
1570
- * authentication token. A GET request is made to the
1661
+ * authentication token. A `GET` request is made to the
1571
1662
  * authentication API endpoint, which returns the token
1572
1663
  * as a plaintext response. For trusted authentication,
1573
1664
  * the `authEndpoint` or `getAuthToken` attribute is required.
@@ -1580,8 +1671,8 @@ export interface EmbedConfig {
1580
1671
  * attribute is required.
1581
1672
  *
1582
1673
  * It is advisable to fetch a new token inside this method and not
1583
- * reuse and older issued token, as because when auth expires this is
1584
- * called again and if it is called with an older token the authentication
1674
+ * reuse the old issued token. When auth expires this method is
1675
+ * called again and if it is called with an older token, the authentication
1585
1676
  * will not succeed.
1586
1677
  */
1587
1678
  getAuthToken?: () => Promise<string>;
@@ -1591,7 +1682,7 @@ export interface EmbedConfig {
1591
1682
  */
1592
1683
  username?: string;
1593
1684
  /**
1594
- * [Basic] The ThoughtSpot login password corresponding to the user name
1685
+ * [Basic] The ThoughtSpot login password corresponding to the username
1595
1686
  *
1596
1687
  * Warning: This feature is primarily intended for developer testing. It is
1597
1688
  * strongly advised not to use this authentication method in production.
@@ -1599,7 +1690,7 @@ export interface EmbedConfig {
1599
1690
  password?: string;
1600
1691
  /**
1601
1692
  * [SSO] For SSO Authentication, if `noRedirect` is set to true, it will
1602
- * open the SAML auth flow in a popup, instead of redirecting browser in
1693
+ * open the SAML auth flow in a popup, instead of redirecting the browser in
1603
1694
  * place.
1604
1695
  *
1605
1696
  * @default false
@@ -1608,91 +1699,93 @@ export interface EmbedConfig {
1608
1699
  noRedirect?: boolean;
1609
1700
  /**
1610
1701
  * [SSO] For SSO Authentication, if `inPopup` is set to true, it will open
1611
- * the SAML auth flow in a popup, instead of redirecting browser in place.
1702
+ * the SAML auth flow in a popup, instead of redirecting the browser in place.
1612
1703
  *
1613
- * Need to use this with authTriggerContainer. Or manually trigger
1614
- * the AuthEvent.TRIGGER_SSO_POPUP event on a user interaction.
1704
+ * Need to use this with `authTriggerContainer`. Or manually trigger
1705
+ * the `AuthEvent.TRIGGER_SSO_POPUP` event on a user interaction.
1615
1706
  *
1616
1707
  * @default false
1617
1708
  * @version SDK: 1.18.0
1618
1709
  */
1619
1710
  inPopup?: boolean;
1620
1711
  /**
1621
- * [SSO] For SSO Authentication, one can supply an optional path param,
1622
- * this will be the path on the host origin where the SAML flow will be
1712
+ * [SSO] For SSO Authentication, one can supply an optional path param;
1713
+ * This will be the path on the host origin where the SAML flow will be
1623
1714
  * terminated.
1624
1715
  *
1625
1716
  * Eg: "/dashboard", "#/foo" [Do not include the host]
1626
1717
  *
1627
- * @version SDK: 1.10.2 | 8.2.0.cl, 8.4.1.sw
1718
+ * @version SDK: 1.10.2 | ThoughtSpot 8.2.0.cl, 8.4.1.sw
1628
1719
  */
1629
1720
  redirectPath?: string;
1630
1721
  /** @internal */
1631
1722
  basepath?: string;
1632
1723
  /**
1633
- * Should we encode URL Query Params using base64 encoding which thoughtspot
1634
- * will generate for embedding. This provides additional security to
1635
- * thoughtspot clusters against Cross site scripting attacks.
1724
+ * Boolean to define if the query parameters in the ThoughtSpot URL
1725
+ * should be encoded in base64. This provides additional security to
1726
+ * Thoughtspot clusters against cross-site scripting attacks.
1636
1727
  *
1637
1728
  * @default false
1638
1729
  */
1639
1730
  shouldEncodeUrlQueryParams?: boolean;
1640
1731
  /**
1641
- * Suppress cookie access alert when third party cookies are blocked by the
1642
- * user's browser. Third party cookie blocking is the default behaviour on
1643
- * Safari and opt-in for Firefox/Chrome. If you set this to `true`, you are
1644
- * encouraged to handle `noCookieAccess` event, to show your own treatment
1732
+ * Suppress cookie access alert when third-party cookies are blocked by the
1733
+ * user's browser. Third-party cookie blocking is the default behaviour on
1734
+ * some web browsers like Safari. If you set this attribute to `true`,
1735
+ * you are encouraged to handle `noCookieAccess` event, to show your own treatment
1645
1736
  * in this case.
1646
1737
  *
1647
1738
  * @default false
1648
1739
  */
1649
1740
  suppressNoCookieAccessAlert?: boolean;
1650
1741
  /**
1651
- * Ignore cookie access alert when third party cookies are blocked by the
1742
+ * Ignore the cookie access alert when third-party cookies are blocked by the
1652
1743
  * user's browser. If you set this to `true`, the embedded iframe behaviour
1653
- * persist even in case of non logged in user.
1744
+ * persists even in the case of a non-logged-in user.
1654
1745
  *
1655
1746
  * @default false
1656
1747
  */
1657
1748
  ignoreNoCookieAccess?: boolean;
1658
1749
  /**
1659
- * Re-login when session expires with the previous login options
1750
+ * Re-login a user with the previous login options
1751
+ * when a user session expires.
1660
1752
  *
1661
1753
  * @default false
1662
1754
  */
1663
1755
  autoLogin?: boolean;
1664
1756
  /**
1665
1757
  * Disable redirection to the login page when the embedded session expires
1666
- * This flag is typically used alongside the combination of auth modes such as {@link
1667
- * AuthType.AuthServer} and auto login behavior {@link EmbedConfig.autoLogin}
1758
+ * This flag is typically used alongside the combination of authentication modes such
1759
+ * as {@link AuthType.AuthServer} and auto-login behavior {@link
1760
+ * EmbedConfig.autoLogin}
1668
1761
  *
1669
1762
  * @version SDK: 1.9.3 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
1670
1763
  * @default false
1671
1764
  */
1672
1765
  disableLoginRedirect?: boolean;
1673
1766
  /**
1674
- * This message is displayed on the embed view when the login fails.
1767
+ * This message is displayed in the embedded view when a user login fails.
1675
1768
  *
1676
1769
  * @version SDK: 1.10.1 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
1677
1770
  */
1678
1771
  loginFailedMessage?: string;
1679
1772
  /**
1680
- * Calls the prefetch method internally when set to true
1773
+ * Calls the prefetch method internally when set to `true`
1681
1774
  *
1682
1775
  * @default false
1683
1776
  */
1684
1777
  callPrefetch?: boolean;
1685
1778
  /**
1686
- * When there are multiple embeds, queue the render of embed to start
1687
- * after the previous embed's render is complete. This helps in the load
1688
- * performance by decreasing the load on the browser.
1779
+ * When there are multiple objects embedded, queue the rendering of embedded objects
1780
+ * to start after the previous embed's render is complete. This helps improve
1781
+ * performance by decreasing the load on the browser.
1689
1782
  *
1690
1783
  * @Version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
1691
1784
  * @default false
1692
1785
  */
1693
1786
  queueMultiRenders?: boolean;
1694
1787
  /**
1695
- * Dynamic CSS Url to be injected in the loaded application.
1788
+ * Dynamic CSS URL to be injected in the loaded application.
1696
1789
  * You would also need to set `style-src` in the CSP settings.
1697
1790
  *
1698
1791
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -1700,9 +1793,9 @@ export interface EmbedConfig {
1700
1793
  */
1701
1794
  customCssUrl?: string;
1702
1795
  /**
1703
- * [AuthServer|Basic] Detect if 3rd party cookies are enabled by doing an
1796
+ * [AuthServer|Basic] Detect if third-party party cookies are enabled by doing an
1704
1797
  * additional call. This is slower and should be avoided. Listen to the
1705
- * NO_COOKIE_ACCESS event to handle the situation.
1798
+ * `NO_COOKIE_ACCESS` event to handle the situation.
1706
1799
  *
1707
1800
  * This is slightly slower than letting the browser handle the cookie check, as it
1708
1801
  * involves an extra network call.
@@ -1711,26 +1804,26 @@ export interface EmbedConfig {
1711
1804
  */
1712
1805
  detectCookieAccessSlow?: boolean;
1713
1806
  /**
1714
- * Hide beta alert warning message for SearchEmbed.
1807
+ * Hide the `beta` alert warning message for SearchEmbed.
1715
1808
  *
1716
1809
  * @version SDK: 1.12.0 | ThoughtSpot: 8.4.0.cl, 8.4.1.sw*
1717
1810
  */
1718
1811
  suppressSearchEmbedBetaWarning?: boolean;
1719
1812
  /**
1720
- * Hide beta alert warning message for SageEmbed.
1813
+ * Hide `beta` alert warning message for SageEmbed.
1721
1814
  *
1722
1815
  */
1723
1816
  suppressSageEmbedBetaWarning?: boolean;
1724
1817
  /**
1725
1818
  * Custom style params for embed Config.
1726
1819
  *
1727
- * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl
1820
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
1728
1821
  */
1729
1822
  customizations?: CustomisationsInterface;
1730
1823
  /**
1731
- * For inPopup SAMLRedirect or OIDCRedirect Auth, we need a button which the user
1732
- * click to trigger the flow. This is the containing element
1733
- * for that button.
1824
+ * For `inPopup` SAMLRedirect or OIDCRedirect authentication, we need a
1825
+ * button that the user can click to trigger the flow.
1826
+ * This attribute sets a containing element for that button.
1734
1827
  *
1735
1828
  * @example
1736
1829
  * ```js
@@ -1740,11 +1833,11 @@ export interface EmbedConfig {
1740
1833
  * authTriggerContainer: '#auth-trigger-container'
1741
1834
  * })
1742
1835
  * ```
1743
- * @version SDK: 1.17.0 | ThoughtSpot: *
1836
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
1744
1837
  */
1745
1838
  authTriggerContainer?: string | HTMLElement;
1746
1839
  /**
1747
- * Specify that we want to use the AuthEvent.TRIGGER_SSO_POPUP event to trigger
1840
+ * Specify that we want to use the `AuthEvent.TRIGGER_SSO_POPUP` event to trigger
1748
1841
  * SAML popup. This is useful when you want to trigger the popup on a custom user
1749
1842
  * action.
1750
1843
  *
@@ -1752,20 +1845,22 @@ export interface EmbedConfig {
1752
1845
  useEventForSAMLPopup?: boolean;
1753
1846
  /**
1754
1847
  * Text to show in the button which triggers the popup auth flow.
1755
- * Default: "Authorize".
1848
+ * Default: `Authorize`.
1756
1849
  *
1757
- * @version SDK: 1.17.0 | ThoughtSpot: *
1850
+ * @version SDK: 1.17.0 | ThoughtSpot: 8.9.0.cl, 9.0.1.sw
1758
1851
  */
1759
1852
  authTriggerText?: string;
1760
1853
  /**
1761
- * Disable Full App access of Embedded app outside of the iFrame.
1854
+ * Prevent users from accessing the full application or ThoughtSpot application pages
1855
+ * access to the embedded application users
1856
+ * outside of the iframe.
1762
1857
  *
1763
1858
  * @default true
1764
1859
  * @version SDK: 1.22.0 | ThoughtSpot: 9.3.0.cl, 9.5.1.sw
1765
1860
  */
1766
1861
  blockNonEmbedFullAppAccess?: boolean;
1767
1862
  /**
1768
- * Host config incase embedded app is inside TS app itself
1863
+ * Host config in case embedded app is inside TS app itself
1769
1864
  *
1770
1865
  * @hidden
1771
1866
  */
@@ -1787,21 +1882,35 @@ export interface EmbedConfig {
1787
1882
  * @version SDK: 1.26.2 | ThoughtSpot: *
1788
1883
  */
1789
1884
  suppressErrorAlerts?: boolean;
1885
+ /**
1886
+ * Log level for the SDK.
1887
+ *
1888
+ * @default LogLevel.ERROR
1889
+ * @example
1890
+ * ```js
1891
+ * init({
1892
+ * ...embedConfig,
1893
+ * logLevel: LogLevel.SILENT
1894
+ * })
1895
+ * ```
1896
+ * @version SDK: 1.26.5 | ThoughtSpot: 9.10.0.cl
1897
+ */
1898
+ logLevel?: LogLevel;
1790
1899
  }
1791
1900
  export interface LayoutConfig {
1792
1901
  }
1793
1902
  /**
1794
- * Embedded iFrame configuration
1903
+ * Embedded iframe configuration
1795
1904
  *
1796
1905
  * @group Embed components
1797
1906
  */
1798
1907
  export interface FrameParams {
1799
1908
  /**
1800
- * The width of the iFrame (unit is pixels if numeric).
1909
+ * The width of the iframe (unit is pixels if numeric).
1801
1910
  */
1802
1911
  width?: number | string;
1803
1912
  /**
1804
- * The height of the iFrame (unit is pixels if numeric).
1913
+ * The height of the iframe (unit is pixels if numeric).
1805
1914
  */
1806
1915
  height?: number | string;
1807
1916
  /**
@@ -1902,7 +2011,6 @@ export interface ViewConfig {
1902
2011
  */
1903
2012
  runtimeParameters?: RuntimeParameter[];
1904
2013
  /**
1905
- /**
1906
2014
  * The locale/language to use for the embedded view.
1907
2015
  *
1908
2016
  * @version SDK: 1.9.4 | ThoughtSpot 8.1.0.cl, 8.4.1.sw
@@ -2002,31 +2110,30 @@ export interface ViewConfig {
2002
2110
  */
2003
2111
  reorderedHomepageModules?: HomepageModule[];
2004
2112
  /**
2005
- * The list of tab IDs to show in the embedded.
2006
- * Only this Tabs will be shown in their respective LBs.
2007
- * Use this to show an tabID.
2113
+ * The list of tab IDs to show in the embedded Liveboard.
2114
+ * Only the tabs specified in the array will be shown in the Liveboard.
2008
2115
  *
2009
- * Use either this or hiddenTabs.
2116
+ * Use either `visibleTabs` or `hiddenTabs`.
2010
2117
  *
2011
2118
  * @example
2012
2119
  * ```js
2013
- * const embed = new LiveboardEmbed('#embed', {
2014
- * ... // other liveboard view config
2015
- * visibleTabs: [
2120
+ * visibleTabs: [
2016
2121
  * '430496d6-6903-4601-937e-2c691821af3c',
2017
- * 'f547ec54-2a37-4516-a222-2b06719af726']
2018
- * });
2122
+ * 'f547ec54-2a37-4516-a222-2b06719af726']
2019
2123
  * ```
2020
2124
  * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
2021
2125
  */
2022
2126
  visibleTabs?: string[];
2023
2127
  /**
2024
- * homepageLeftNavItems : show/hide Homeapage Left Nav Bar Items
2025
- * There are 8 home nav list items, we will send those item as list
2026
- * which we want to hide for TSE.
2027
- * eg: hiddenHomeLeftNavItems = [HomeLeftNavItem.Home] to hide home.
2128
+ * homepageLeftNavItems : Show or hide the left navigation bar items.
2129
+ * There are 8 eight home navigation list items.
2130
+ * To hide these items, specify the string in the array.
2028
2131
  *
2029
- * @version SDK: 1.27.0 | Thoughtspot: 9.8.0.cl
2132
+ * ```js
2133
+ * hiddenHomeLeftNavItems = [HomeLeftNavItem.Home]
2134
+ * ```
2135
+ *
2136
+ * @version SDK: 1.27.0 | Thoughtspot: 9.10.0.cl
2030
2137
  */
2031
2138
  hiddenHomeLeftNavItems?: HomeLeftNavItem[];
2032
2139
  /**
@@ -2042,7 +2149,7 @@ export interface ViewConfig {
2042
2149
  * });
2043
2150
  * embed.showPreRender();
2044
2151
  * ```
2045
- * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
2152
+ * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl, 9.8.0.sw
2046
2153
  */
2047
2154
  preRenderId?: string;
2048
2155
  /**
@@ -2081,7 +2188,7 @@ export type MessagePayload = {
2081
2188
  status?: string;
2082
2189
  };
2083
2190
  /**
2084
- * MessageOptions: By Providing options, getting specific event start / end based on
2191
+ * MessageOptions: By providing options, getting specific event start / end based on
2085
2192
  * option
2086
2193
  *
2087
2194
  * @group Events
@@ -2089,7 +2196,7 @@ export type MessagePayload = {
2089
2196
  export type MessageOptions = {
2090
2197
  /**
2091
2198
  * A boolean value indicating that start status events of this type
2092
- * will be dispatched
2199
+ * will be dispatched.
2093
2200
  */
2094
2201
  start?: boolean;
2095
2202
  };
@@ -2109,7 +2216,7 @@ responder?: (data: any) => void) => void;
2109
2216
  */
2110
2217
  export type MessageCallbackObj = {
2111
2218
  /**
2112
- * options: It contains start, A boolean value indicating that start
2219
+ * options: It contains start, a boolean value indicating that start
2113
2220
  * status events of this type will be dispatched
2114
2221
  */
2115
2222
  options: MessageOptions;
@@ -2181,7 +2288,7 @@ export declare enum RuntimeFilterOp {
2181
2288
  IN = "IN"
2182
2289
  }
2183
2290
  /**
2184
- * Home page module that can be hide
2291
+ * Home page module that can be hidden
2185
2292
  */
2186
2293
  export declare enum HomepageModule {
2187
2294
  /**
@@ -2197,7 +2304,7 @@ export declare enum HomepageModule {
2197
2304
  */
2198
2305
  Favorite = "FAVORITE",
2199
2306
  /**
2200
- * List of answers and liveboards
2307
+ * List of answers and Liveboards
2201
2308
  */
2202
2309
  MyLibrary = "MY_LIBRARY",
2203
2310
  /**
@@ -2230,7 +2337,7 @@ export interface RuntimeFilter {
2230
2337
  values: (number | boolean | string)[];
2231
2338
  }
2232
2339
  /**
2233
- * A filter that can be applied to ThoughtSpot answers, Liveboards, or
2340
+ * A filter that can be applied to ThoughtSpot Answers, Liveboards, or
2234
2341
  * visualizations at runtime.
2235
2342
  */
2236
2343
  export interface RuntimeParameter {
@@ -2267,12 +2374,26 @@ export declare enum EmbedEvent {
2267
2374
  /**
2268
2375
  * Rendering has initialized.
2269
2376
  *
2377
+ * @example
2378
+ *```js
2379
+ * liveboardEmbed.on(EmbedEvent.Init, showLoader)
2380
+ * //show a loader
2381
+ * function showLoader() {
2382
+ * document.getElementById("loader");
2383
+ * }
2384
+ *```
2270
2385
  * @returns timestamp - The timestamp when the event was generated.
2271
2386
  */
2272
2387
  Init = "init",
2273
2388
  /**
2274
2389
  * Authentication has either succeeded or failed.
2275
2390
  *
2391
+ * @example
2392
+ *```js
2393
+ * appEmbed.on(EmbedEvent.AuthInit, payload => {
2394
+ * console.log('AuthInit', payload);
2395
+ * })
2396
+ *```
2276
2397
  * @returns isLoggedIn - A Boolean specifying whether authentication was successful.
2277
2398
  */
2278
2399
  AuthInit = "authInit",
@@ -2280,37 +2401,91 @@ export declare enum EmbedEvent {
2280
2401
  * The embed object container has loaded.
2281
2402
  *
2282
2403
  * @returns timestamp - The timestamp when the event was generated.
2404
+ * @example
2405
+ *```js
2406
+ * liveboardEmbed.on(EmbedEvent.Load, hideLoader)
2407
+ * //hide loader
2408
+ * function hideLoader() {
2409
+ * document.getElementById("loader");
2410
+ * }
2411
+ *```
2283
2412
  */
2284
2413
  Load = "load",
2285
2414
  /**
2286
2415
  * Data pertaining to answer or Liveboard is received
2287
2416
  *
2288
2417
  * @return data - The answer or Liveboard data
2418
+ * @example
2419
+ *```js
2420
+ * liveboardEmbed.on(EmbedEvent.Data, payload => {
2421
+ * console.log('data', payload);
2422
+ * })
2423
+ *```
2289
2424
  * @important
2290
2425
  */
2291
2426
  Data = "data",
2292
2427
  /**
2293
- * Search/answer/Liveboard filters have been applied/updated by the user.
2428
+ * Search/Answer/Liveboard filters have been applied/updated by the user.
2294
2429
  *
2295
2430
  * @hidden
2296
2431
  */
2297
2432
  FiltersChanged = "filtersChanged",
2298
2433
  /**
2299
2434
  * Search query has been updated by the user.
2435
+ *
2436
+ * @example
2437
+ *```js
2438
+ * searchEmbed.on(EmbedEvent.QueryChanged, payload => console.log('data', payload))
2439
+ *```
2300
2440
  */
2301
2441
  QueryChanged = "queryChanged",
2302
2442
  /**
2303
- * A drill down operation has been performed.
2443
+ * A drill-down operation has been performed.
2304
2444
  *
2305
2445
  * @returns additionalFilters - Any additional filters applied
2306
2446
  * @returns drillDownColumns - The columns on which drill down was performed
2307
2447
  * @returns nonFilteredColumns - The columns that were not filtered
2448
+ * @example
2449
+ *```js
2450
+ * searchEmbed.trigger(HostEvent.DrillDown, {
2451
+ * points: {
2452
+ * clickedPoint,
2453
+ * selectedPoints: selectedPoint
2454
+ * },
2455
+ * autoDrillDown: true,
2456
+ * })
2457
+ *```
2458
+ * In this example, `VizPointDoubleClick` event is used for
2459
+ * triggering the `DrillDown` event when an area or specific
2460
+ * data point on a table or chart is double-clicked.
2461
+ * @example
2462
+ *```js
2463
+ * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
2464
+ * console.log(payload);
2465
+ * const clickedPoint = payload.data.clickedPoint;
2466
+ * const selectedPoint = payload.data.selectedPoints;
2467
+ * console.log('>>> called', clickedPoint);
2468
+ * embed.trigger(HostEvent.DrillDown, {
2469
+ * points: {
2470
+ * clickedPoint,
2471
+ * selectedPoints: selectedPoint
2472
+ * },
2473
+ * autoDrillDown: true,
2474
+ * })
2475
+ * })
2476
+ *```
2308
2477
  */
2309
2478
  Drilldown = "drillDown",
2310
2479
  /**
2311
2480
  * One or more data sources have been selected.
2312
2481
  *
2313
2482
  * @returns dataSourceIds - the list of data sources
2483
+ * @example
2484
+ * ```js
2485
+ * searchEmbed.on(EmbedEvent.DataSourceSelected, payload => {
2486
+ * console.log('DataSourceSelected', payload);
2487
+ * })
2488
+ * ```
2314
2489
  */
2315
2490
  DataSourceSelected = "dataSourceSelected",
2316
2491
  /**
@@ -2318,25 +2493,49 @@ export declare enum EmbedEvent {
2318
2493
  *
2319
2494
  * @returns columnIds - the list of columns
2320
2495
  * @version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
2496
+ * @example
2497
+ * ```js
2498
+ * appEmbed.on(EmbedEvent.AddRemoveColumns, payload => {
2499
+ * console.log('AddRemoveColumns', payload);
2500
+ * })
2501
+ * ```
2321
2502
  */
2322
2503
  AddRemoveColumns = "addRemoveColumns",
2323
2504
  /**
2324
- * A custom action has been triggered
2505
+ * A custom action has been triggered.
2325
2506
  *
2326
- * @returns actionId - The id of the custom action
2327
- * @returns data - The answer or Liveboard data
2507
+ * @returns actionId - ID of the custom action
2508
+ * @returns data - Response payload with the Answer or Liveboard data
2509
+ * @example
2510
+ * ```js
2511
+ * appEmbed.on(EmbedEvent.customAction, payload => {
2512
+ * const data = payload.data;
2513
+ * if (data.id === 'insert Custom Action ID here') {
2514
+ * console.log('Custom Action event:', data.embedAnswerData);
2515
+ * }
2516
+ * })
2517
+ * ```
2328
2518
  */
2329
2519
  CustomAction = "customAction",
2330
2520
  /**
2331
- * Listen to double clicks on a visualization
2521
+ * Listen to double click actions on a visualization.
2332
2522
  *
2333
- * @return ContextMenuInputPoints - data point that is double clicked
2523
+ * @return ContextMenuInputPoints - Data point that is double-clicked
2334
2524
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
2525
+ * @example
2526
+ * ```js
2527
+ * livebaordEmbed.on(EmbedEvent.VizPointDoubleClick, payload => {
2528
+ * console.log('VizPointDoubleClick', payload)
2529
+ * })
2530
+ * ```
2335
2531
  */
2336
2532
  VizPointDoubleClick = "vizPointDoubleClick",
2337
2533
  /**
2338
- * Listen to clicks on a visualization in a liveboard or Search result.
2534
+ * Listen to clicks on a visualization in a Liveboard or Search result.
2339
2535
  *
2536
+ * @return viz, clickedPoint - metadata about the point that is clicked
2537
+ * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2538
+ * @important
2340
2539
  * @example
2341
2540
  * ```js
2342
2541
  * embed.on(ThoughtSpotEmbed.Event.VizPointClick, ({data}) => {
@@ -2349,25 +2548,42 @@ export declare enum EmbedEvent {
2349
2548
  * )
2350
2549
  * });
2351
2550
  * ```
2352
- * @return viz, clickedPoint - metadata about point that is clicked
2353
- * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2354
- * @important
2355
2551
  */
2356
2552
  VizPointClick = "vizPointClick",
2357
2553
  /**
2358
2554
  * An error has occurred.
2359
2555
  *
2360
2556
  * @returns error - An error object or message
2557
+ * @example
2558
+ * ```js
2559
+ * SearchEmbed.on(EmbedEvent.Error, showErrorMsg)
2560
+ * //show error messaage
2561
+ * function showErrorMsg() {
2562
+ * document.getElementById("error");
2563
+ * ```
2361
2564
  */
2362
2565
  Error = "Error",
2363
2566
  /**
2364
- * The embedded object has sent an alert
2567
+ * The embedded object has sent an alert.
2365
2568
  *
2366
2569
  * @returns alert - An alert object
2570
+ * @example
2571
+ * ```js
2572
+ * searchEmbed.on(EmbedEvent.Alert)
2573
+ * ```
2367
2574
  */
2368
2575
  Alert = "alert",
2369
2576
  /**
2370
2577
  * The ThoughtSpot auth session has expired.
2578
+ *
2579
+ * @example
2580
+ *```js
2581
+ * appEmbed.on(EmbedEvent.AuthExpire, showAuthExpired)
2582
+ * //show auth expired banner
2583
+ * function showAuthExpired() {
2584
+ * document.getElementById("authExpiredBanner");
2585
+ * }
2586
+ *```
2371
2587
  */
2372
2588
  AuthExpire = "ThoughtspotAuthExpired",
2373
2589
  /**
@@ -2397,14 +2613,27 @@ export declare enum EmbedEvent {
2397
2613
  */
2398
2614
  EmbedIframeCenter = "EmbedIframeCenter",
2399
2615
  /**
2400
- * Emitted when the "Get Data" button in Search Bar embed
2401
- * is clicked.
2616
+ * Emitted when the **Get Data** action is initiated.
2617
+ * Applicable to `SearchBarEmbed` only.
2402
2618
  *
2403
- * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.0.sw
2619
+ * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
2620
+ * @example
2621
+ *```js
2622
+ * searchbarEmbed.on(EmbedEvent.GetDataClick)
2623
+ * .then(data => {
2624
+ * console.log('Answer Data:', data);
2625
+ * })
2626
+ *```
2404
2627
  */
2405
2628
  GetDataClick = "getDataClick",
2406
2629
  /**
2407
2630
  * Detects the route change.
2631
+ *
2632
+ * @example
2633
+ *```js
2634
+ * searchEmbed.on(EmbedEvent.RouteChange, payload =>
2635
+ * console.log('data', payload))
2636
+ *```
2408
2637
  */
2409
2638
  RouteChange = "ROUTE_CHANGE",
2410
2639
  /**
@@ -2414,10 +2643,15 @@ export declare enum EmbedEvent {
2414
2643
  */
2415
2644
  V1Data = "exportVizDataToParent",
2416
2645
  /**
2417
- * Emitted when the embed does not have cookie access. This
2418
- * happens on Safari where third-party cookies are blocked by default.
2646
+ * Emitted when the embed does not have cookie access. This happens
2647
+ * when Safari and other Web browsers block third-party cookies
2648
+ * are blocked by default. `NoCookieAccess` can trigger
2419
2649
  *
2420
- * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1
2650
+ * @example
2651
+ *```js
2652
+ * appEmbed.on(EmbedEvent.NoCookieAccess)
2653
+ *```
2654
+ * @version SDK: 1.1.0 | ThoughtSpot: ts7.may.cl, 7.2.1.sw
2421
2655
  */
2422
2656
  NoCookieAccess = "noCookieAccess",
2423
2657
  /**
@@ -2431,12 +2665,24 @@ export declare enum EmbedEvent {
2431
2665
  * Emitted when any modal is opened in the app
2432
2666
  *
2433
2667
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2668
+ * @example
2669
+ *```js
2670
+ * appEmbed.on(EmbedEvent.DialogOpen, payload => {
2671
+ * console.log('dialog open', payload);
2672
+ * })
2673
+ *```
2434
2674
  */
2435
2675
  DialogOpen = "dialog-open",
2436
2676
  /**
2437
2677
  * Emitted when any modal is closed in the app
2438
2678
  *
2439
2679
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2680
+ * @example
2681
+ *```js
2682
+ * appEmbed.on(EmbedEvent.DialogClose, payload => {
2683
+ * console.log('dialog close', payload);
2684
+ * })
2685
+ *```
2440
2686
  */
2441
2687
  DialogClose = "dialog-close",
2442
2688
  /**
@@ -2445,6 +2691,21 @@ export declare enum EmbedEvent {
2445
2691
  * other events on the rendered Liveboard.
2446
2692
  *
2447
2693
  * @version SDK: 1.9.1 | ThoughtSpot: 8.1.0.cl, 8.4.1.sw
2694
+ * @example
2695
+ *```js
2696
+ * liveboardEmbed.on(EmbedEvent.LiveboardRendered, payload => {
2697
+ console.log('Liveboard is rendered', payload);
2698
+ })
2699
+ *```
2700
+ * The following example shows how to trigger
2701
+ * `SetVisibleVizs` event using LiveboardRendered embed event:
2702
+ * @example
2703
+ *```js
2704
+ * const embedRef = useEmbedRef();
2705
+ * const onLiveboardRendered = () => {
2706
+ * embed.trigger(HostEvent.SetVisibleVizs, ['viz1', 'viz2']);
2707
+ * };
2708
+ *```
2448
2709
  */
2449
2710
  LiveboardRendered = "PinboardRendered",
2450
2711
  /**
@@ -2452,216 +2713,470 @@ export declare enum EmbedEvent {
2452
2713
  * is triggered on all events.
2453
2714
  *
2454
2715
  * @Version SDK: 1.10.0 | ThoughtSpot: 8.2.0.cl, 8.4.1.sw
2716
+ * @example
2717
+ *```js
2718
+ * appEmbed.on(EmbedEvent.ALL, payload => {
2719
+ * console.log('Embed Events', payload)
2720
+ * })
2721
+ *```
2455
2722
  */
2456
2723
  ALL = "*",
2457
2724
  /**
2458
2725
  * Emitted when an Answer is saved in the app
2459
2726
  *
2460
2727
  * @Version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2728
+ * @example
2729
+ *```js
2730
+ * //trigger when action starts
2731
+ * searchEmbed.on(EmbedEvent.Save, payload => {
2732
+ * console.log('Save', payload)
2733
+ * }, {
2734
+ * start: true
2735
+ * })
2736
+ * //trigger when action ends
2737
+ * searchEmbed.on(EmbedEvent.Save, payload => {
2738
+ * console.log('Save', payload)
2739
+ * })
2740
+ *```
2461
2741
  */
2462
2742
  Save = "save",
2463
2743
  /**
2464
2744
  * Emitted when the download action is triggered on an answer
2465
2745
  *
2746
+ * **Note**: This event is deprecated in v1.21.0.
2747
+ * To fire an event when a download action is initiated on a chart or table,
2748
+ * use `EmbedEvent.DownloadAsPng`, `EmbedEvent.DownloadAsPDF`, `EmbedEvent.DownloadAsCSV`,
2749
+ * or `EmbedEvent.DownloadAsXLSX`
2750
+ *
2466
2751
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2752
+ * @example
2753
+ *```js
2754
+ * liveboardEmbed.trigger(HostEvent.Download, {
2755
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'
2756
+ * })
2757
+ *```
2467
2758
  */
2468
2759
  Download = "download",
2469
2760
  /**
2470
2761
  * Emitted when the download action is triggered on an answer
2471
2762
  *
2472
2763
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.4.0.sw
2764
+ * @example
2765
+ *```js
2766
+ * //trigger when action starts
2767
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
2768
+ * console.log('download PNG', payload)}, {start: true })
2769
+ * //trigger when action ends
2770
+ * searchEmbed.on(EmbedEvent.DownloadAsPng, payload => {
2771
+ * console.log('download PNG', payload)})
2772
+ *```
2473
2773
  */
2474
2774
  DownloadAsPng = "downloadAsPng",
2475
2775
  /**
2476
2776
  * Emitted when the Download as PDF action is triggered on an answer
2477
2777
  *
2478
2778
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2779
+ * @example
2780
+ *```js
2781
+ * //trigger when action starts
2782
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
2783
+ * console.log('download PDF', payload)}, {start: true })
2784
+ * //trigger when action ends
2785
+ * searchEmbed.on(EmbedEvent.DownloadAsPdf, payload => {
2786
+ * console.log('download PDF', payload)})
2787
+ *```
2479
2788
  */
2480
2789
  DownloadAsPdf = "downloadAsPdf",
2481
2790
  /**
2482
2791
  * Emitted when the Download as CSV action is triggered on an answer
2483
2792
  *
2484
2793
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2794
+ * @example
2795
+ *```js
2796
+ * //trigger when action starts
2797
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
2798
+ * console.log('download CSV', payload)}, {start: true })
2799
+ * //trigger when action ends
2800
+ * searchEmbed.on(EmbedEvent.DownloadAsCSV, payload => {
2801
+ * console.log('download CSV', payload)})
2802
+ *```
2485
2803
  */
2486
2804
  DownloadAsCsv = "downloadAsCsv",
2487
2805
  /**
2488
2806
  * Emitted when the Download as XLSX action is triggered on an answer
2489
2807
  *
2490
2808
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2809
+ * @example
2810
+ *```js
2811
+ * //trigger when action starts
2812
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
2813
+ * console.log('download Xlsx', payload)}, { start: true })
2814
+ * //trigger when action ends
2815
+ * searchEmbed.on(EmbedEvent.DownloadAsXlsx, payload => {
2816
+ * console.log('download Xlsx', payload)})
2817
+ *```
2491
2818
  */
2492
2819
  DownloadAsXlsx = "downloadAsXlsx",
2493
2820
  /**
2494
- * Emitted when an answer is deleted in the app
2821
+ * Emitted when an Answer is deleted in the app
2495
2822
  *
2496
2823
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2824
+ * @example
2825
+ *```js
2826
+ * //trigger when action starts
2827
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
2828
+ * console.log('delete answer', payload)}, {start: true })
2829
+ * //trigger when action is completed
2830
+ * appEmbed.on(EmbedEvent.AnswerDelete, payload => {
2831
+ * console.log('delete answer', payload)})
2832
+ *```
2497
2833
  */
2498
2834
  AnswerDelete = "answerDelete",
2499
2835
  /**
2500
2836
  * Emitted when an answer is pinned to a Liveboard
2501
2837
  *
2502
2838
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2839
+ * @example
2840
+ *```js
2841
+ * //trigger when action starts
2842
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
2843
+ * console.log('pin', payload)
2844
+ * }, {
2845
+ * start: true
2846
+ * })
2847
+ * //trigger when action ends
2848
+ * searchEmbed.on(EmbedEvent.Pin, payload => {
2849
+ * console.log('pin', payload)
2850
+ * })
2851
+ *```
2503
2852
  */
2504
2853
  Pin = "pin",
2505
2854
  /**
2506
2855
  * Emitted when SpotIQ analysis is triggered
2507
2856
  *
2508
2857
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2858
+ * @example
2859
+ *```js
2860
+ * //trigger when action starts
2861
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
2862
+ * console.log('SpotIQAnalyze', payload)
2863
+ * }, {
2864
+ * start: true
2865
+ * })
2866
+ * //trigger when action ends
2867
+ * searchEmbed.on(EmbedEvent.SpotIQAnalyze, payload => {
2868
+ * console.log('SpotIQ analyze', payload)
2869
+ * })
2870
+ *```
2509
2871
  */
2510
2872
  SpotIQAnalyze = "spotIQAnalyze",
2511
2873
  /**
2512
2874
  * Emitted when a user shares an object with another user or group
2513
2875
  *
2514
2876
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2877
+ * @example
2878
+ *```js
2879
+ * //trigger when action starts
2880
+ * searchEmbed.on(EmbedEvent.Share, payload => {
2881
+ * console.log('Share', payload)
2882
+ * }, {
2883
+ * start: true
2884
+ * })
2885
+ * //trigger when action ends
2886
+ * searchEmbed.on(EmbedEvent.Share, payload => {
2887
+ * console.log('Share', payload)
2888
+ * })
2889
+ *```
2515
2890
  */
2516
2891
  Share = "share",
2517
2892
  /**
2518
- * Emitted when a user clicks the Include action to include a specific value or data
2519
- * on a chart or table
2893
+ * Emitted when a user clicks the **Include** action to include a specific value or
2894
+ * data on a chart or table.
2520
2895
  *
2521
2896
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2897
+ * @example
2898
+ *```js
2899
+ * appEmbed.on(EmbedEvent.DrillInclude, payload => {
2900
+ * console.log('Drill include', payload);
2901
+ * })
2902
+ *```
2522
2903
  */
2523
2904
  DrillInclude = "context-menu-item-include",
2524
2905
  /**
2525
- * Emitted when a user clicks the Exclude action to exclude a specific value or data
2526
- * on a chart or table
2906
+ * Emitted when a user clicks the **Exclude** action to exclude a specific value or
2907
+ * data on a chart or table
2527
2908
  *
2528
2909
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2910
+ * @example
2911
+ *```js
2912
+ * appEmbed.on(EmbedEvent.DrillExclude, payload => {
2913
+ * console.log('Drill exclude', payload);
2914
+ * })
2915
+ *```
2529
2916
  */
2530
2917
  DrillExclude = "context-menu-item-exclude",
2531
2918
  /**
2532
- * Emitted when copied column value on the app
2919
+ * Emitted when a column value is copied in the embedded app.
2533
2920
  *
2534
2921
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2922
+ * @example
2923
+ *```js
2924
+ * seachEmbed.on(EmbedEvent.CopyToClipboard, payload => {
2925
+ * console.log('copy to clipboard', payload);
2926
+ * })
2927
+ *```
2535
2928
  */
2536
2929
  CopyToClipboard = "context-menu-item-copy-to-clipboard",
2537
2930
  /**
2538
- * Emitted when a user clicks the Update TML action
2931
+ * Emitted when a user clicks the **Update TML** action
2539
2932
  *
2540
2933
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2934
+ * @example
2935
+ *```js
2936
+ * liveboardEmbed.on(EmbedEvent.UpdateTML)
2937
+ * })
2938
+ *```
2541
2939
  */
2542
2940
  UpdateTML = "updateTSL",
2543
2941
  /**
2544
- * Emitted when a user clicks the Edit TML action
2942
+ * Emitted when a user clicks the **Edit TML** action
2545
2943
  *
2546
2944
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2945
+ * @example
2946
+ *```js
2947
+ * appEmbed.on(EmbedEvent.EditTML, payload => {
2948
+ * console.log('Edit TML', payload);
2949
+ * })
2950
+ *```
2547
2951
  */
2548
2952
  EditTML = "editTSL",
2549
2953
  /**
2550
- * Emitted when ExportTML trigger in answer on the app
2954
+ * Emitted when the **Export TML** action is triggered on an
2955
+ * an embedded object in the app
2551
2956
  *
2552
2957
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2958
+ * @example
2959
+ *```js
2960
+ * //trigger when action starts
2961
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
2962
+ * console.log('Export TML', payload)}, { start: true })
2963
+ * //trigger when action ends
2964
+ * searchEmbed.on(EmbedEvent.ExportTML, payload => {
2965
+ * console.log('Export TML', payload)})
2966
+ *```
2553
2967
  */
2554
2968
  ExportTML = "exportTSL",
2555
2969
  /**
2556
- * Emitted when an answer is saved as a view
2970
+ * Emitted when an Answer is saved as a View.
2557
2971
  *
2558
2972
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2973
+ * @example
2974
+ *```js
2975
+ * appEmbed.on(EmbedEvent.SaveAsView, payload => {
2976
+ * console.log('View', payload);
2977
+ * })
2978
+ *```
2559
2979
  */
2560
2980
  SaveAsView = "saveAsView",
2561
2981
  /**
2562
- * Emitted when copy of existing answer on the app
2982
+ * Emitted when the user creates a copy of an Answer
2563
2983
  *
2564
2984
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
2985
+ * @example
2986
+ *```js
2987
+ * //trigger when action starts
2988
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
2989
+ * console.log('Copy and edit', payload)}, {start: true })
2990
+ * //trigger when action ends
2991
+ * appEmbed.on(EmbedEvent.CopyAEdit, payload => {
2992
+ * console.log('Copy and edit', payload)})
2993
+ *```
2565
2994
  */
2566
2995
  CopyAEdit = "copyAEdit",
2567
2996
  /**
2568
- * Emitted when a user clicks Show underlying data on an answe
2997
+ * Emitted when a user clicks Show underlying data on an Answer
2569
2998
  *
2570
2999
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3000
+ * @example
3001
+ *```js
3002
+ * liveboardEmbed.on(EmbedEvent.ShowUnderlyingData, payload => {
3003
+ * console.log('show data', payload);
3004
+ * })
3005
+ *```
2571
3006
  */
2572
3007
  ShowUnderlyingData = "showUnderlyingData",
2573
3008
  /**
2574
- * Emitted when an answer is switched to a chart or table view
3009
+ * Emitted when an answer is switched to a chart or table view.
2575
3010
  *
2576
3011
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3012
+ * @example
3013
+ *```js
3014
+ * searchEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
3015
+ * console.log('switch view', payload);
3016
+ * })
3017
+ *```
2577
3018
  */
2578
3019
  AnswerChartSwitcher = "answerChartSwitcher",
2579
3020
  /**
2580
- * Internal event to communicate the initial settings back to the TS APP
3021
+ * Internal event to communicate the initial settings back to the ThoughtSpot app
2581
3022
  *
2582
3023
  * @hidden
2583
3024
  */
2584
3025
  APP_INIT = "appInit",
2585
3026
  /**
2586
- * Emitted when a user clicks Show Liveboard details on a Liveboard
3027
+ * Emitted when a user clicks **Show Liveboard details** on a Liveboard
2587
3028
  *
2588
3029
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3030
+ * @example
3031
+ *```js
3032
+ * liveboardEmbed.on(EmbedEvent.AnswerChartSwitcher, payload => {
3033
+ * console.log('Liveboard details', payload);
3034
+ * })
3035
+ *```
2589
3036
  */
2590
3037
  LiveboardInfo = "pinboardInfo",
2591
3038
  /**
2592
3039
  * Emitted when a user clicks on the Favorite icon on a Liveboard
2593
3040
  *
2594
3041
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3042
+ * @example
3043
+ *```js
3044
+ * liveboardEmbed.on(EmbedEvent.AddToFavorites, payload => {
3045
+ * console.log('favorites', payload);
3046
+ * })
3047
+ *```
2595
3048
  */
2596
3049
  AddToFavorites = "addToFavorites",
2597
3050
  /**
2598
- * Emitted when a user clicks Schedule on a Liveboard
3051
+ * Emitted when a user clicks **Schedule** on a Liveboard
2599
3052
  *
2600
3053
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3054
+ * @example
3055
+ *```js
3056
+ * liveboardEmbed.on(EmbedEvent.Schedule, payload => {
3057
+ * console.log(`Liveboard schedule', payload);
3058
+ * })
3059
+ *```
2601
3060
  */
2602
3061
  Schedule = "subscription",
2603
3062
  /**
2604
- * Emitted when a user clicks Edit on a Liveboard or visualization
3063
+ * Emitted when a user clicks **Edit** on a Liveboard or visualization
2605
3064
  *
2606
3065
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3066
+ * @example
3067
+ *```js
3068
+ * liveboardEmbed.on(EmbedEvent.Edit, payload => {
3069
+ * console.log(`Liveboard edit', payload);
3070
+ * })
3071
+ *```
2607
3072
  */
2608
3073
  Edit = "edit",
2609
3074
  /**
2610
- * Emitted when a user clicks Make a copy on a Liveboard
3075
+ * Emitted when a user clicks *Make a copy* on a Liveboard
2611
3076
  *
2612
3077
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3078
+ * @example
3079
+ *```js
3080
+ * liveboardEmbed.on(EmbedEvent.MakeACopy, payload => {
3081
+ * console.log(`Copy', payload);
3082
+ * })
3083
+ *```
2613
3084
  */
2614
3085
  MakeACopy = "makeACopy",
2615
3086
  /**
2616
- * Emitted when a user clicks Present on a Liveboard or visualization
3087
+ * Emitted when a user clicks **Present** on a Liveboard or visualization
2617
3088
  *
2618
3089
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3090
+ * @example
3091
+ *```js
3092
+ * liveboardEmbed.trigger(HostEvent.Present)
3093
+ *```
3094
+ * @example
3095
+ *```js
3096
+ * liveboardEmbed.on(EmbedEvent.Present, {
3097
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
3098
+ * })
3099
+ *```
2619
3100
  */
2620
3101
  Present = "present",
2621
3102
  /**
2622
- * Emitted when a user clicks Delete on a Liveboard
3103
+ * Emitted when a user clicks **Delete** on a visualization
2623
3104
  *
2624
3105
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3106
+ * @example
3107
+ *```js
3108
+ * liveboardEmbed.trigger(HostEvent.Delete,
3109
+ * {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
3110
+ *```
2625
3111
  */
2626
3112
  Delete = "delete",
2627
3113
  /**
2628
3114
  * Emitted when a user clicks Manage schedules on a Liveboard
2629
3115
  *
2630
3116
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3117
+ * @example
3118
+ *```js
3119
+ * liveboardEmbed.trigger(HostEvent.SchedulesList)
3120
+ *```
2631
3121
  */
2632
3122
  SchedulesList = "schedule-list",
2633
3123
  /**
2634
- * Emitted when a user clicks Cancel in edit mode on a Liveboard
3124
+ * Emitted when a user clicks **Cancel** in edit mode on a Liveboard
2635
3125
  *
2636
3126
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3127
+ * @example
3128
+ *```js
3129
+ * liveboardEmbed.trigger(HostEvent.Cancel)
3130
+ *```
2637
3131
  */
2638
3132
  Cancel = "cancel",
2639
3133
  /**
2640
- * Emitted when a user clicks Explore on a visualization
3134
+ * Emitted when a user clicks **Explore** on a visualization
2641
3135
  *
2642
3136
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3137
+ * @example
3138
+ *```js
3139
+ * liveboardEmbed.trigger(HostEvent.Explore, {
3140
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
3141
+ *```
2643
3142
  */
2644
3143
  Explore = "explore",
2645
3144
  /**
2646
- * Emitted when a user clicks Copy link action on a visualization
3145
+ * Emitted when a user clicks **Copy link** action on a visualization
2647
3146
  *
2648
3147
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3148
+ * @example
3149
+ *```js
3150
+ * liveboardEmbed.trigger(HostEvent.CopyLink, {
3151
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
3152
+ *```
2649
3153
  */
2650
3154
  CopyLink = "embedDocument",
2651
3155
  /**
2652
- * Emitted when a user interacts with cross filters on a visualization or liveboard
3156
+ * Emitted when a user interacts with cross filters on a visualization or Liveboard
2653
3157
  *
2654
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3158
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
3159
+ * @example
3160
+ *```js
3161
+ * liveboardEmbed.trigger(HostEvent.CrossFilterChanged, {
3162
+ * vizId: '730496d6-6903-4601-937e-2c691821af3c'})
3163
+ *```
2655
3164
  */
2656
3165
  CrossFilterChanged = "cross-filter-changed",
2657
3166
  /**
2658
3167
  * Emitted when a user right clicks on a visualization (chart or table)
2659
3168
  *
2660
- * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl
3169
+ * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.5.0.sw
3170
+ * @example
3171
+ *```js
3172
+ * LiveboardEmbed.on(EmbedEvent.VizPointRightClick, payload => {
3173
+ * console.log('VizPointClick', payload)
3174
+ * })
3175
+ *```
2661
3176
  */
2662
3177
  VizPointRightClick = "vizPointRightClick",
2663
3178
  /**
2664
- * Emitted when a user clicks on Insert to slide on a visualization
3179
+ * Emitted when a user clicks **Insert to slide** on a visualization
2665
3180
  *
2666
3181
  * @hidden
2667
3182
  */
@@ -2669,52 +3184,52 @@ export declare enum EmbedEvent {
2669
3184
  /**
2670
3185
  * @hidden
2671
3186
  * Emitted when a user changes any filter on a Liveboard.
2672
- * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
3187
+ * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl, 9.5.0.sw
2673
3188
  */
2674
3189
  FilterChanged = "filterChanged",
2675
3190
  /**
2676
- * Emitted when a user click on Go button in Sage Embed
3191
+ * Emitted when a user clicks the **Go** button on the Search page
2677
3192
  *
2678
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3193
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2679
3194
  */
2680
3195
  SageEmbedQuery = "sageEmbedQuery",
2681
3196
  /**
2682
- * Emitten when a user select data source in Sage Embed
3197
+ * Emitted when a user selects a data source.
2683
3198
  *
2684
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3199
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2685
3200
  */
2686
3201
  SageWorksheetUpdated = "sageWorksheetUpdated",
2687
3202
  /**
2688
- * Emitted when a user updates a connection in Data tab
3203
+ * Emitted when a user updates a connection on the **Data** page
2689
3204
  *
2690
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
3205
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
2691
3206
  */
2692
3207
  UpdateConnection = "updateConnection",
2693
3208
  /**
2694
- * Emitted when a user updates a connection in Data tab
3209
+ * Emitted when a user updates a connection on the **Data** page
2695
3210
  *
2696
- * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
3211
+ * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
2697
3212
  */
2698
3213
  CreateConnection = "createConnection",
2699
3214
  /**
2700
3215
  * Emitted when name, status (private or public) or filter values of a
2701
- * PersonalisedView is updated.
3216
+ * Personalised view is updated.
2702
3217
  *
2703
3218
  * @returns viewName: string
2704
3219
  * @returns viewId: string
2705
3220
  * @returns liveboardId: string
2706
3221
  * @returns isPublic: boolean
2707
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3222
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2708
3223
  */
2709
3224
  UpdatePersonalisedView = "updatePersonalisedView",
2710
3225
  /**
2711
- * Emitted when a PersonalisedView is saved.
3226
+ * Emitted when a Personalised view is saved.
2712
3227
  *
2713
3228
  * @returns viewName: string
2714
3229
  * @returns viewId: string
2715
3230
  * @returns liveboardId: string
2716
3231
  * @returns isPublic: boolean
2717
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3232
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2718
3233
  */
2719
3234
  SavePersonalisedView = "savePersonalisedView",
2720
3235
  /**
@@ -2724,7 +3239,7 @@ export declare enum EmbedEvent {
2724
3239
  * @returns viewId: string
2725
3240
  * @returns liveboardId: string
2726
3241
  * @returns isPublic: boolean
2727
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3242
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2728
3243
  */
2729
3244
  ResetLiveboard = "resetLiveboard",
2730
3245
  /**
@@ -2732,20 +3247,30 @@ export declare enum EmbedEvent {
2732
3247
  *
2733
3248
  * @returns views: string[]
2734
3249
  * @returns liveboardId: string
2735
- * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl
3250
+ * @version SDK : 1.26.0 | Thoughtspot: 9.7.0.cl, 9.8.0.sw
2736
3251
  */
2737
3252
  DeletePersonalisedView = "deletePersonalisedView",
2738
3253
  /**
2739
- * Emitten when a user creates a new worksheet
3254
+ * Emitted when a user creates a new worksheet
2740
3255
  *
2741
3256
  * @version SDK : 1.27.0 | Thoughtspot: 9.8.0.cl
2742
3257
  */
2743
3258
  CreateWorksheet = "createWorksheet",
2744
3259
  /**
2745
- * Emitted when a LB/viz is renamed
2746
- *
2747
- * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
2748
- */
3260
+ * Emitted when Ask Sage is initialized.
3261
+ *
3262
+ * @returns viewName: string
3263
+ * @returns viewId: string
3264
+ * @returns liveboardId: string
3265
+ * @returns isPublic: boolean
3266
+ * @version SDK : 1.29.0 | Thoughtspot: 9.12.0.cl
3267
+ */
3268
+ AskSageInit = "AskSageInit",
3269
+ /**
3270
+ * Emitted when a LB/viz is renamed
3271
+ *
3272
+ * @version SDK : 1.28.0 | ThoughtSpot: 9.11.0.cl
3273
+ */
2749
3274
  Rename = "rename"
2750
3275
  }
2751
3276
  /**
@@ -2772,15 +3297,16 @@ export declare enum EmbedEvent {
2772
3297
  */
2773
3298
  export declare enum HostEvent {
2774
3299
  /**
2775
- * Triggers a search query in AppEmbed and SearchEmbed
2776
- * deployments.
3300
+ * Triggers a search operation with the search tokens specified in
3301
+ * the search query string.
3302
+ * Supported in `AppEmbed` and `SearchEmbed` deployments.
2777
3303
  * Includes the following properties:
2778
3304
  *
2779
- * @param - dataSourceIds - The data source GUID to Search on
3305
+ * @param - `searchQuery` - query string with search tokens
3306
+ * @param - `dataSources` - Data source GUID to Search on
2780
3307
  * - Although an array, only a single source
2781
3308
  * is supported.
2782
- * @param - searchQuery - Query string with search tokens
2783
- * @param - execute - executes the existing / updated query
3309
+ * @param - `execute` - executes search and updates the existing query
2784
3310
  * @example
2785
3311
  * ```js
2786
3312
  * searchembed.trigger(HostEvent.Search, {
@@ -2800,6 +3326,10 @@ export declare enum HostEvent {
2800
3326
  * @param - columnGuid - Optional. GUID of the column to drill
2801
3327
  * by. If not provided it will auto drill by the configured
2802
3328
  * column.
3329
+ * @param - autoDrillDown - Optional. If true, the drill down will be
3330
+ * done automatically on the most popular column.
3331
+ * @param - vizId [TS >= 9.8.0] - Optional. The GUID of the visualization to drill
3332
+ * in case of a liveboard.
2803
3333
  * @example
2804
3334
  * ```js
2805
3335
  * searchEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
@@ -2816,6 +3346,25 @@ export declare enum HostEvent {
2816
3346
  * });
2817
3347
  * })
2818
3348
  * ```
3349
+ * @example
3350
+ * ```js
3351
+ * // Works with TS 9.8.0 and above
3352
+ *
3353
+ * liveboardEmbed.on(EmbedEvent.VizPointDoubleClick, (payload) => {
3354
+ * console.log(payload);
3355
+ * const clickedPoint = payload.data.clickedPoint;
3356
+ * const selectedPoint = payload.data.selectedPoints;
3357
+ * console.log('>>> called', clickedPoint);
3358
+ * liveboardEmbed.trigger(HostEvent.DrillDown, {
3359
+ * points: {
3360
+ * clickedPoint,
3361
+ * selectedPoints: selectedPoint
3362
+ * },
3363
+ * autoDrillDown: true,
3364
+ * vizId: payload.data.vizId
3365
+ * });
3366
+ * })
3367
+ * ```
2819
3368
  * @version SDK: 1.5.0 | ThoughtSpot: ts7.oct.cl, 7.2.1
2820
3369
  */
2821
3370
  DrillDown = "triggerDrillDown",
@@ -2832,7 +3381,7 @@ export declare enum HostEvent {
2832
3381
  */
2833
3382
  Reload = "reload",
2834
3383
  /**
2835
- * Sets the visible visualizations on a Liveboard.
3384
+ * Display specific visualizations on a Liveboard.
2836
3385
  *
2837
3386
  * @param - An array of GUIDs of the visualization to show. The visualization IDs not passed
2838
3387
  * in this parameter will be hidden.
@@ -2846,7 +3395,7 @@ export declare enum HostEvent {
2846
3395
  */
2847
3396
  SetVisibleVizs = "SetPinboardVisibleVizs",
2848
3397
  /**
2849
- * Set the Active Tab of a Liveboard.
3398
+ * Set a Liveboard tab as an active tab.
2850
3399
  *
2851
3400
  * @param - tabId - string of id of Tab to show
2852
3401
  * @example
@@ -2859,7 +3408,7 @@ export declare enum HostEvent {
2859
3408
  */
2860
3409
  SetActiveTab = "SetActiveTab",
2861
3410
  /**
2862
- * Updates runtime filters applied on a Saved Answer or Liveboard. The
3411
+ * Update runtime filters applied on a Saved Answer or Liveboard. The
2863
3412
  * runtime filters passed here are appended to the existing runtime
2864
3413
  * filters.
2865
3414
  * Pass an array of runtime filters with the following attributes:
@@ -2885,10 +3434,11 @@ export declare enum HostEvent {
2885
3434
  */
2886
3435
  UpdateRuntimeFilters = "UpdateRuntimeFilters",
2887
3436
  /**
2888
- * Navigate to a specific page in the embedded application without reloading the page.
3437
+ * Navigate to a specific page in the embedded ThoughtSpot application.
2889
3438
  * This is the same as calling `appEmbed.navigateToPage(path, true)`
2890
3439
  *
2891
- * @param - path - the path to navigate to (can be a number[1/-1] to go forward/back)
3440
+ * @param - `path` - the path to navigate to to go forward or back. The path value can
3441
+ * be a number; for example, `1`, `-1`.
2892
3442
  * @example
2893
3443
  * ```js
2894
3444
  * appEmbed.navigateToPage(-1)
@@ -2897,7 +3447,7 @@ export declare enum HostEvent {
2897
3447
  */
2898
3448
  Navigate = "Navigate",
2899
3449
  /**
2900
- * Opens the filter panel for a particular column.
3450
+ * Open the filter panel for a particular column.
2901
3451
  * Works with Search and Liveboard embed.
2902
3452
  *
2903
3453
  * @param - { columnId: string,
@@ -2915,7 +3465,7 @@ export declare enum HostEvent {
2915
3465
  */
2916
3466
  OpenFilter = "openFilter",
2917
3467
  /**
2918
- * Adds columns to the current search query.
3468
+ * Add columns to the current search query.
2919
3469
  *
2920
3470
  * @param - { columnIds: string[] }
2921
3471
  * @example
@@ -2926,7 +3476,7 @@ export declare enum HostEvent {
2926
3476
  */
2927
3477
  AddColumns = "addColumns",
2928
3478
  /**
2929
- * Removes a column from the current search query.
3479
+ * Remove a column from the current search query.
2930
3480
  *
2931
3481
  * @param - { columnId: string }
2932
3482
  * @example
@@ -2937,27 +3487,29 @@ export declare enum HostEvent {
2937
3487
  */
2938
3488
  RemoveColumn = "removeColumn",
2939
3489
  /**
2940
- * Gets the current Liveboard content.
3490
+ * Get the transient state of a Liveboard as encoded content.
3491
+ * This includes unsaved and ad hoc changes such as
3492
+ * Liveboard filters, runtime filters applied on visualizations on a
3493
+ * Liveboard, and Liveboard layout, changes to visualizations such as
3494
+ * sorting, toggling of legends, and data drill down.
2941
3495
  *
2942
3496
  * @example
2943
3497
  * ```js
2944
- * liveboardEmbed.trigger(HostEvent.getExportRequestForCurrentPinboard)
3498
+ * liveboardEmbed.trigger(HostEvent.getexportrequestforcurrentpinboard).then(
3499
+ * data=>console.log(data))
2945
3500
  * ```
2946
3501
  * @version SDK: 1.13.0 | ThoughtSpot: 8.5.0.cl, 8.8.1.sw
2947
3502
  */
2948
3503
  getExportRequestForCurrentPinboard = "getExportRequestForCurrentPinboard",
2949
3504
  /**
2950
- * Triggers the **Pin** action on an embedded object
3505
+ * Trigger the **Pin** action on an embedded object
2951
3506
  *
2952
3507
  * @param - Liveboard embed takes the `vizId` as a
2953
- * key. Can be left undefined when embedding Search, full app or
3508
+ * key. Can be left undefined when embedding Search, full app, or
2954
3509
  * a visualization.
2955
3510
  * @example
2956
3511
  * ```js
2957
- * liveboardEmbed.trigger(HostEvent.Pin, {vizId: '730496d6-6903-4601-937e-2c691821af3c'})
2958
- * ```
2959
- * ```js
2960
- * vizEmbed.trigger(HostEvent.Pin)
3512
+ * appEmbed.trigger(HostEvent.Pin)
2961
3513
  * ```
2962
3514
  * ```js
2963
3515
  * searchEmbed.trigger(HostEvent.Pin)
@@ -2966,17 +3518,18 @@ export declare enum HostEvent {
2966
3518
  */
2967
3519
  Pin = "pin",
2968
3520
  /**
2969
- * Triggers the **Show Liveboard details** action on a Liveboard
3521
+ * Trigger the **Show Liveboard details** action
3522
+ * on an embedded Liveboard.
2970
3523
  *
2971
3524
  * @example
2972
- * ```js
2973
- * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
2974
- * ```
3525
+ *```js
3526
+ * liveboardEmbed.trigger(HostEvent.LiveboardInfo)
3527
+ *```
2975
3528
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2976
3529
  */
2977
3530
  LiveboardInfo = "pinboardInfo",
2978
3531
  /**
2979
- * Triggers the **Schedule** action on a Liveboard
3532
+ * Trigger the **Schedule** action on an embedded Liveboard.
2980
3533
  *
2981
3534
  * @example
2982
3535
  * ```js
@@ -2986,7 +3539,7 @@ export declare enum HostEvent {
2986
3539
  */
2987
3540
  Schedule = "subscription",
2988
3541
  /**
2989
- * Triggers the **Manage schedule** action on a Liveboard
3542
+ * Trigger the **Manage schedule** action on an embedded Liveboard
2990
3543
  *
2991
3544
  * @example
2992
3545
  * ```js
@@ -2996,7 +3549,7 @@ export declare enum HostEvent {
2996
3549
  */
2997
3550
  SchedulesList = "schedule-list",
2998
3551
  /**
2999
- * Triggers the **Export TML** action on a Liveboard
3552
+ * Trigger the **Export TML** action on an embedded Liveboard.
3000
3553
  *
3001
3554
  * @example
3002
3555
  * ```js
@@ -3006,7 +3559,7 @@ export declare enum HostEvent {
3006
3559
  */
3007
3560
  ExportTML = "exportTSL",
3008
3561
  /**
3009
- * Triggers the **Edit TML** action on a Liveboard
3562
+ * Trigger the **Edit TML** action on an embedded Liveboard.
3010
3563
  *
3011
3564
  * @example
3012
3565
  * ```js
@@ -3016,7 +3569,7 @@ export declare enum HostEvent {
3016
3569
  */
3017
3570
  EditTML = "editTSL",
3018
3571
  /**
3019
- * Triggers the **Update TML** action on a Liveboard
3572
+ * Trigger the **Update TML** action on an embedded Liveboard.
3020
3573
  *
3021
3574
  * @example
3022
3575
  * ```js
@@ -3026,7 +3579,7 @@ export declare enum HostEvent {
3026
3579
  */
3027
3580
  UpdateTML = "updateTSL",
3028
3581
  /**
3029
- * Triggers the **Download PDF** action on a Liveboard
3582
+ * Trigger the **Download PDF** action on an embedded Liveboard.
3030
3583
  *
3031
3584
  * @example
3032
3585
  * ```js
@@ -3036,8 +3589,8 @@ export declare enum HostEvent {
3036
3589
  */
3037
3590
  DownloadAsPdf = "downloadAsPdf",
3038
3591
  /**
3039
- * Triggers the **Make a copy** action on a Liveboard, Search, or
3040
- * visualization page
3592
+ * Trigger the **Make a copy** action on a Liveboard, Search, or
3593
+ * visualization page.
3041
3594
  *
3042
3595
  * @example
3043
3596
  * ```js
@@ -3053,7 +3606,7 @@ export declare enum HostEvent {
3053
3606
  */
3054
3607
  MakeACopy = "makeACopy",
3055
3608
  /**
3056
- * Triggers the **Delete** action on a Liveboard
3609
+ * Trigger the **Delete** action for a Liveboard.
3057
3610
  *
3058
3611
  * @example
3059
3612
  * ```js
@@ -3063,7 +3616,7 @@ export declare enum HostEvent {
3063
3616
  */
3064
3617
  Remove = "delete",
3065
3618
  /**
3066
- * Triggers the **Explore* action on a visualization
3619
+ * Trigger the **Explore** action on a visualization.
3067
3620
  *
3068
3621
  * @param - an object with `vizId` as a key
3069
3622
  * @example
@@ -3074,7 +3627,7 @@ export declare enum HostEvent {
3074
3627
  */
3075
3628
  Explore = "explore",
3076
3629
  /**
3077
- * Triggers the **Create alert** action on a visualization
3630
+ * Trigger the **Create alert** action on a visualization
3078
3631
  *
3079
3632
  * @param - an object with `vizId` as a key
3080
3633
  * @example
@@ -3087,7 +3640,7 @@ export declare enum HostEvent {
3087
3640
  */
3088
3641
  CreateMonitor = "createMonitor",
3089
3642
  /**
3090
- * Triggers the **Manage alerts** action on a visualization
3643
+ * Trigger the **Manage alerts** action on a visualization
3091
3644
  *
3092
3645
  * @param - an object with `vizId` as a key
3093
3646
  * @example
@@ -3100,7 +3653,7 @@ export declare enum HostEvent {
3100
3653
  */
3101
3654
  ManageMonitor = "manageMonitor",
3102
3655
  /**
3103
- * Triggers the **Edit** action on a Liveboard or visualization
3656
+ * Trigger the **Edit** action on a Liveboard or visualization
3104
3657
  *
3105
3658
  * @param - object - To trigger the action for a specific visualization
3106
3659
  * in Liveboard embed, pass in `vizId` as a key.
@@ -3121,7 +3674,7 @@ export declare enum HostEvent {
3121
3674
  */
3122
3675
  Edit = "edit",
3123
3676
  /**
3124
- * Triggers the **Copy link** action on a Liveboard or visualization
3677
+ * Trigger the **Copy link** action on a Liveboard or visualization
3125
3678
  *
3126
3679
  * @param - object - to trigger the action for a
3127
3680
  * specific visualization in Liveboard embed, pass in `vizId` as a key
@@ -3139,7 +3692,7 @@ export declare enum HostEvent {
3139
3692
  */
3140
3693
  CopyLink = "embedDocument",
3141
3694
  /**
3142
- * Triggers the **Present** action on a Liveboard or visualization
3695
+ * Trigger the **Present** action on a Liveboard or visualization
3143
3696
  *
3144
3697
  * @param - object - to trigger the action for a specific visualization
3145
3698
  * in Liveboard embed, pass in `vizId` as a key
@@ -3157,7 +3710,7 @@ export declare enum HostEvent {
3157
3710
  */
3158
3711
  Present = "present",
3159
3712
  /**
3160
- * Gets TML for the current search.
3713
+ * Get TML for the current search.
3161
3714
  *
3162
3715
  * @example
3163
3716
  * ```js
@@ -3172,7 +3725,7 @@ export declare enum HostEvent {
3172
3725
  */
3173
3726
  GetTML = "getTML",
3174
3727
  /**
3175
- * Triggers the **Show underlying data** action on visualization or search
3728
+ * Trigger the **Show underlying data** action on visualization or search
3176
3729
  *
3177
3730
  * @param - an object with vizId as a key
3178
3731
  * @example
@@ -3190,7 +3743,9 @@ export declare enum HostEvent {
3190
3743
  */
3191
3744
  ShowUnderlyingData = "showUnderlyingData",
3192
3745
  /**
3193
- * Triggers the **Delete** action on visualization or search
3746
+ * Trigger the **Delete** action for a visualization
3747
+ * in an embedded Liveboard, or a chart or table
3748
+ * generated from Search.
3194
3749
  *
3195
3750
  * @param - Liveboard embed takes an object with `vizId` as a key.
3196
3751
  * Can be left empty if embedding Search or visualization.
@@ -3200,16 +3755,13 @@ export declare enum HostEvent {
3200
3755
  * '730496d6-6903-4601-937e-2c691821af3c'})
3201
3756
  * ```
3202
3757
  * ```js
3203
- * vizEmbed.trigger(HostEvent.Delete)
3204
- * ```
3205
- * ```js
3206
3758
  * searchEmbed.trigger(HostEvent.Delete)
3207
3759
  * ```
3208
3760
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
3209
3761
  */
3210
3762
  Delete = "onDeleteAnswer",
3211
3763
  /**
3212
- * Triggers the **SpotIQ analyze** action on visualization
3764
+ * Trigger the **SpotIQ analyze** action on visualization
3213
3765
  * or search.
3214
3766
  *
3215
3767
  * @param - Liveboard embed takes `vizId` as a
@@ -3230,7 +3782,7 @@ export declare enum HostEvent {
3230
3782
  */
3231
3783
  SpotIQAnalyze = "spotIQAnalyze",
3232
3784
  /**
3233
- * Triggers the **Download** action on charts in
3785
+ * Trigger the **Download** action on charts in
3234
3786
  * the embedded view.
3235
3787
  *
3236
3788
  * @example
@@ -3239,17 +3791,15 @@ export declare enum HostEvent {
3239
3791
  * '730496d6-6903-4601-937e-2c691821af3c'})
3240
3792
  * ```
3241
3793
  * ```js
3242
- * vizEmbed.trigger(HostEvent.Download)
3243
- * ```
3244
- * ```js
3245
- * searchEmbed.trigger(HostEvent.Download)
3794
+ * embed.trigger(HostEvent.Download)
3246
3795
  * ```
3247
- * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw ,Use {@link DownloadAsPng}
3796
+ * @deprecated from SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl ,9.4.1.sw
3797
+ * Use {@link DownloadAsPng}
3248
3798
  * @version SDK: 1.19.0 | ThoughtSpot: 9.0.0.cl, 9.0.1.sw
3249
3799
  */
3250
3800
  Download = "downloadAsPng",
3251
3801
  /**
3252
- * Triggers the **Download** > **PNG** action on
3802
+ * Trigger the **Download** > **PNG** action on
3253
3803
  * charts in the embedded view.
3254
3804
  *
3255
3805
  * @example
@@ -3265,7 +3815,7 @@ export declare enum HostEvent {
3265
3815
  */
3266
3816
  DownloadAsPng = "downloadAsPng",
3267
3817
  /**
3268
- * Triggers the **Download** > **CSV** action on tables in
3818
+ * Trigger the **Download** > **CSV** action on tables in
3269
3819
  * the embedded view.
3270
3820
  *
3271
3821
  * @example
@@ -3283,7 +3833,7 @@ export declare enum HostEvent {
3283
3833
  */
3284
3834
  DownloadAsCsv = "downloadAsCSV",
3285
3835
  /**
3286
- * Triggers the **Download** > **XLSX** action on tables
3836
+ * Trigger the **Download** > **XLSX** action on tables
3287
3837
  * in the embedded view.
3288
3838
  *
3289
3839
  * @example
@@ -3301,7 +3851,7 @@ export declare enum HostEvent {
3301
3851
  */
3302
3852
  DownloadAsXlsx = "downloadAsXLSX",
3303
3853
  /**
3304
- * Triggers the **Share** action on an embedded
3854
+ * Trigger the **Share** action on an embedded
3305
3855
  * Liveboard or Answer.
3306
3856
  *
3307
3857
  * @example
@@ -3315,7 +3865,7 @@ export declare enum HostEvent {
3315
3865
  */
3316
3866
  Share = "share",
3317
3867
  /**
3318
- * Triggers the **Save** action on a Liveboard or Answer.
3868
+ * Trigger the **Save** action on a Liveboard or Answer.
3319
3869
  * Saves the changes.
3320
3870
  *
3321
3871
  * @example
@@ -3329,7 +3879,7 @@ export declare enum HostEvent {
3329
3879
  */
3330
3880
  Save = "save",
3331
3881
  /**
3332
- * Triggers the **Sync to Sheets** action on an embedded visualization or Answer
3882
+ * Trigger the **Sync to Sheets** action on an embedded visualization or Answer
3333
3883
  * Sends data from an Answer or Liveboard visualization to a Google sheet.
3334
3884
  *
3335
3885
  * @param - an object with `vizId` as a key
@@ -3345,7 +3895,7 @@ export declare enum HostEvent {
3345
3895
  */
3346
3896
  SyncToSheets = "sync-to-sheets",
3347
3897
  /**
3348
- * Triggers the **Sync to Other Apps** action on an embedded visualization or Answer
3898
+ * Trigger the **Sync to Other Apps** action on an embedded visualization or Answer
3349
3899
  * Sends data from an Answer or Liveboard visualization to third-party apps such
3350
3900
  * as Slack, Salesforce, Microsoft Teams, ServiceNow and so on.
3351
3901
  *
@@ -3362,7 +3912,7 @@ export declare enum HostEvent {
3362
3912
  */
3363
3913
  SyncToOtherApps = "sync-to-other-apps",
3364
3914
  /**
3365
- * Triggers the **Manage pipelines** action on an embedded
3915
+ * Trigger the **Manage pipelines** action on an embedded
3366
3916
  * visualization or Answer.
3367
3917
  * Allows users to manage ThoughtSpot Sync pipelines.
3368
3918
  *
@@ -3379,18 +3929,21 @@ export declare enum HostEvent {
3379
3929
  */
3380
3930
  ManagePipelines = "manage-pipeline",
3381
3931
  /**
3382
- * Triggers the Reset search on the Search page
3932
+ * Reset search operation on the Search or Answer page.
3383
3933
  *
3384
3934
  * @example
3385
3935
  * ```js
3386
3936
  * searchEmbed.trigger(HostEvent.ResetSearch)
3387
3937
  * ```
3938
+ * ```js
3939
+ * appEmbed.trigger(HostEvent.ResetSearch)
3940
+ * ```
3388
3941
  * @version SDK: 1.21.0 | ThoughtSpot: 9.2.0.cl, 9.0.1.sw
3389
3942
  */
3390
3943
  ResetSearch = "resetSearch",
3391
3944
  /**
3392
3945
  * @hidden
3393
- * Gets the currents visible and runtime filters applied on a Liveboard
3946
+ * Get the currents visible and runtime filters applied on a Liveboard
3394
3947
  * @example
3395
3948
  * liveboardEmbed.trigger(HostEvent.GetFilters)
3396
3949
  * @version SDK: 1.23.0 | ThoughtSpot: 9.4.0.cl
@@ -3398,7 +3951,7 @@ export declare enum HostEvent {
3398
3951
  GetFilters = "getFilters",
3399
3952
  /**
3400
3953
  * @hidden
3401
- * Updates the visible filters on the Liveboard.
3954
+ * Update the visible filters on the Liveboard.
3402
3955
  * @param - filter: filter object containing column name and filter operation and values
3403
3956
  * @example
3404
3957
  *
@@ -3411,7 +3964,7 @@ export declare enum HostEvent {
3411
3964
  */
3412
3965
  UpdateFilters = "updateFilters",
3413
3966
  /**
3414
- * Get Tab for the current Liveboard.
3967
+ * Get tab details for the current Liveboard.
3415
3968
  *
3416
3969
  * @example
3417
3970
  * ```js
@@ -3425,9 +3978,9 @@ export declare enum HostEvent {
3425
3978
  */
3426
3979
  GetTabs = "getTabs",
3427
3980
  /**
3428
- * Set the visible Tabs on a Liveboard.
3981
+ * Set the visible tabs on a Liveboard.
3429
3982
  *
3430
- * @param - an array of ids of Tabs to show, the ids not passed
3983
+ * @param - an array of ids of tabs to show, the IDs not passed
3431
3984
  * will be hidden.
3432
3985
  * @example
3433
3986
  * ```js
@@ -3441,8 +3994,8 @@ export declare enum HostEvent {
3441
3994
  /**
3442
3995
  * Set the hidden tabs on a Liveboard.
3443
3996
  *
3444
- * @param - an array of ids of Tabs to hide, the ids not passed
3445
- * will be shown.
3997
+ * @param - an array of the IDs of the tabs to hide.
3998
+ * The IDs not passed will be shown.
3446
3999
  * @example
3447
4000
  * ```js
3448
4001
  * liveboardEmbed.trigger(HostEvent.SetHiddenTabs, [
@@ -3453,9 +4006,10 @@ export declare enum HostEvent {
3453
4006
  */
3454
4007
  SetHiddenTabs = "SetPinboardHiddenTabs",
3455
4008
  /**
3456
- * Updates the search query for sage embed.
4009
+ * Updates the search query string for Natural Language Search operations.
3457
4010
  *
3458
- * @param - searchOptions: an object queryString and option to execute the query.
4011
+ * @param - `queryString`: Text string in Natural Language format
4012
+ * @param - `executeSearch`: Boolean to execute search and update search query
3459
4013
  * @example
3460
4014
  * ```js
3461
4015
  * sageEmbed.trigger(HostEvent.UpdateSageQuery, {
@@ -3463,7 +4017,7 @@ export declare enum HostEvent {
3463
4017
  * executeSearch: true,
3464
4018
  * })
3465
4019
  * ```
3466
- * @version SDK: 1.26.0 | Thoughtspot: 9.7.0.cl
4020
+ * @version SDK: 1.26.0 | Thoughtspot: 9.8.0.cl, 9.8.0.sw
3467
4021
  */
3468
4022
  UpdateSageQuery = "updateSageQuery",
3469
4023
  /**
@@ -3476,24 +4030,36 @@ export declare enum HostEvent {
3476
4030
  * vizId: '123', // For Liveboard Visualization.
3477
4031
  * })
3478
4032
  * ```
4033
+ * @version SDK: 1.26.0 | Thoughtspot: 9.10.0.cl
4034
+ */
4035
+ GetAnswerSession = "getAnswerSession",
4036
+ /**
4037
+ * Trigger Ask Sage for viz
4038
+ *
4039
+ * @example
4040
+ * ```js
4041
+ * liveboardEmbed.trigger(HostEvent.AskSage,
4042
+ * {vizId:'730496d6-6903-4601-937e-2c691821af3c'})
4043
+ * ```
4044
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
3479
4045
  */
3480
- GetAnswerSession = "getAnswerSession"
4046
+ AskSage = "AskSage"
3481
4047
  }
3482
4048
  /**
3483
4049
  * The different visual modes that the data sources panel within
3484
- * search could appear in, i.e., hidden, collapsed, or expanded.
4050
+ * search could appear in, such as hidden, collapsed, or expanded.
3485
4051
  */
3486
4052
  export declare enum DataSourceVisualMode {
3487
4053
  /**
3488
- * Data source panel is hidden.
4054
+ * The data source panel is hidden.
3489
4055
  */
3490
4056
  Hidden = "hide",
3491
4057
  /**
3492
- * Data source panel is collapsed, but the user can manually expand it.
4058
+ * The data source panel is collapsed, but the user can manually expand it.
3493
4059
  */
3494
4060
  Collapsed = "collapse",
3495
4061
  /**
3496
- * Data source panel is expanded, but the user can manually collapse it.
4062
+ * The data source panel is expanded, but the user can manually collapse it.
3497
4063
  */
3498
4064
  Expanded = "expand"
3499
4065
  }
@@ -3569,7 +4135,11 @@ export declare enum Param {
3569
4135
  LiveboardHeaderSticky = "isLiveboardHeaderSticky",
3570
4136
  IsProductTour = "isProductTour",
3571
4137
  HideSearchBarTitle = "hideSearchBarTitle",
3572
- HideSageAnswerHeader = "hideSageAnswerHeader"
4138
+ HideSageAnswerHeader = "hideSageAnswerHeader",
4139
+ HideSearchBar = "hideSearchBar",
4140
+ ClientLogLevel = "clientLogLevel",
4141
+ OverrideNativeConsole = "overrideConsoleLogs",
4142
+ enableAskSage = "enableAskSage"
3573
4143
  }
3574
4144
  /**
3575
4145
  * ThoughtSpot application pages include actions and menu commands
@@ -3629,9 +4199,11 @@ export declare enum Action {
3629
4199
  SaveAsView = "saveAsView",
3630
4200
  /**
3631
4201
  * The **Make a copy** action on a Liveboard or Answer
3632
- * page.
3633
- * Creates a copy of the Liveboard, visualization,
3634
- * or Answer.
4202
+ * page. Creates a copy of the Liveboard.
4203
+ * In LiveboardEmbed, the **Make a copy** action is not available for
4204
+ * visualizations in the embedded Liveboard view.
4205
+ * In AppEmbed, the **Make a copy** action is available on both
4206
+ * Liveboards and visualizations.
3635
4207
  *
3636
4208
  * @example
3637
4209
  * ```js
@@ -3815,7 +4387,7 @@ export declare enum Action {
3815
4387
  */
3816
4388
  DownloadAsPdf = "downloadAsPdf",
3817
4389
  /**
3818
- * The **Download** > **CSV** menu action for tables on a Liveboard
4390
+ * The **Download** > **CSV** menu action for tables on a Liveboard
3819
4391
  * or Answer page.
3820
4392
  * Downloads a visualization or Answer in the XLSX format.
3821
4393
  *
@@ -4346,6 +4918,7 @@ export declare enum Action {
4346
4918
  */
4347
4919
  RenameModalTitleDescription = "renameModalTitleDescription",
4348
4920
  /**
4921
+ *
4349
4922
  * @version SDK: 1.25.0 | Thoughtspot: 9.6.0.cl
4350
4923
  */
4351
4924
  RequestVerification = "requestVerification",
@@ -4425,7 +4998,17 @@ export declare enum Action {
4425
4998
  * ```
4426
4999
  * @version SDK: 1.29.0 | Thoughtspot: 9.10.0.cl
4427
5000
  */
4428
- VerifiedLiveboard = "verifiedLiveboard"
5001
+ VerifiedLiveboard = "verifiedLiveboard",
5002
+ /**
5003
+ * Action ID for ask sage button
5004
+ *
5005
+ * @example
5006
+ * ```js
5007
+ * hiddenAction: [Action.AskAi]
5008
+ * ```
5009
+ * @version SDK: 1.29.0 | Thoughtspot: 9.12.0.cl
5010
+ */
5011
+ AskAi = "AskAi"
4429
5012
  }
4430
5013
  export interface AnswerServiceType {
4431
5014
  getAnswer?: (offset: number, batchSize: number) => any;
@@ -4481,6 +5064,14 @@ export interface CustomActionPayload {
4481
5064
  session: SessionInterface;
4482
5065
  vizId?: string;
4483
5066
  }
5067
+ export declare enum LogLevel {
5068
+ SILENT = "SILENT",
5069
+ ERROR = "ERROR",
5070
+ WARN = "WARN",
5071
+ INFO = "INFO",
5072
+ DEBUG = "DEBUG",
5073
+ TRACE = "TRACE"
5074
+ }
4484
5075
 
4485
5076
  /**
4486
5077
  * The list of customization css variables. These
@@ -4854,8 +5445,7 @@ interface UnderlyingDataPoint {
4854
5445
  * const data = await underlying.fetchData(0, 100);
4855
5446
  * })
4856
5447
  * ```
4857
- * @version
4858
- * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
5448
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
4859
5449
  * @group Events
4860
5450
  */
4861
5451
  export declare class AnswerService {
@@ -4889,8 +5479,7 @@ export declare class AnswerService {
4889
5479
  * const data = await underlying.fetchData(0, 100);
4890
5480
  * })
4891
5481
  * ```
4892
- * @version
4893
- * ThoughtSpot: 9.9.0.cl / SDK: 1.25.0
5482
+ * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
4894
5483
  */
4895
5484
  getUnderlyingDataForPoint(outputColumnNames: string[], selectedPoints?: UnderlyingDataPoint[]): Promise<AnswerService>;
4896
5485
  executeQuery(query: string, variables: any): Promise<any>;
@@ -4908,12 +5497,13 @@ export {};
4908
5497
  export declare const getEmbedConfig: () => EmbedConfig;
4909
5498
  /**
4910
5499
  * Sets the configuration embed was initialized with.
5500
+ * And returns the new configuration.
4911
5501
  *
4912
5502
  * @param newConfig The configuration to set.
4913
5503
  * @version SDK: 1.27.0 | ThoughtSpot: *
4914
5504
  * @group Global methods
4915
5505
  */
4916
- export declare const setEmbedConfig: (newConfig: EmbedConfig) => void;
5506
+ export declare const setEmbedConfig: (newConfig: EmbedConfig) => EmbedConfig;
4917
5507
 
4918
5508
  /**
4919
5509
  * Copyright (c) 2022
@@ -5108,6 +5698,7 @@ export declare class TsEmbed {
5108
5698
  * @param args
5109
5699
  */
5110
5700
  render(): TsEmbed;
5701
+ getIframeSrc(): string;
5111
5702
  protected handleRenderForPrerender(): void;
5112
5703
  /**
5113
5704
  * Creates the preRender shell