@thoughtspot/visual-embed-sdk 1.36.9-primaryAction → 1.37.0-temp-nav

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 (127) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/auth.d.ts +2 -1
  3. package/cjs/src/auth.d.ts.map +1 -1
  4. package/cjs/src/auth.js +1 -0
  5. package/cjs/src/auth.js.map +1 -1
  6. package/cjs/src/embed/app.d.ts +76 -0
  7. package/cjs/src/embed/app.d.ts.map +1 -1
  8. package/cjs/src/embed/app.js +18 -1
  9. package/cjs/src/embed/app.js.map +1 -1
  10. package/cjs/src/embed/app.spec.js +50 -0
  11. package/cjs/src/embed/app.spec.js.map +1 -1
  12. package/cjs/src/embed/liveboard.d.ts +2 -2
  13. package/cjs/src/embed/ts-embed.d.ts.map +1 -1
  14. package/cjs/src/embed/ts-embed.js +3 -3
  15. package/cjs/src/embed/ts-embed.js.map +1 -1
  16. package/cjs/src/index.d.ts.map +1 -1
  17. package/cjs/src/index.js +1 -0
  18. package/cjs/src/index.js.map +1 -1
  19. package/cjs/src/react/index.d.ts.map +1 -1
  20. package/cjs/src/react/index.js +1 -0
  21. package/cjs/src/react/index.js.map +1 -1
  22. package/cjs/src/types.d.ts +54 -27
  23. package/cjs/src/types.d.ts.map +1 -1
  24. package/cjs/src/types.js +38 -9
  25. package/cjs/src/types.js.map +1 -1
  26. package/cjs/src/utils/graphql/answerService/answerService.d.ts +35 -15
  27. package/cjs/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  28. package/cjs/src/utils/graphql/answerService/answerService.js +35 -15
  29. package/cjs/src/utils/graphql/answerService/answerService.js.map +1 -1
  30. package/cjs/src/utils/processData.js +6 -4
  31. package/cjs/src/utils/processData.js.map +1 -1
  32. package/dist/{index-BEyovSez.js → index-Cj4BVGHL.js} +2 -1
  33. package/dist/{index-Dg18PU5Z.js → index-Fhk1V_Gw.js} +1 -0
  34. package/dist/src/auth.d.ts +2 -1
  35. package/dist/src/auth.d.ts.map +1 -1
  36. package/dist/src/embed/app.d.ts +76 -0
  37. package/dist/src/embed/app.d.ts.map +1 -1
  38. package/dist/src/embed/liveboard.d.ts +2 -2
  39. package/dist/src/embed/ts-embed.d.ts.map +1 -1
  40. package/dist/src/index.d.ts.map +1 -1
  41. package/dist/src/react/index.d.ts.map +1 -1
  42. package/dist/src/types.d.ts +54 -27
  43. package/dist/src/types.d.ts.map +1 -1
  44. package/dist/src/utils/graphql/answerService/answerService.d.ts +35 -15
  45. package/dist/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  46. package/dist/tsembed-react.es.js +105 -35
  47. package/dist/tsembed-react.js +104 -34
  48. package/dist/tsembed.es.js +105 -35
  49. package/dist/tsembed.js +104 -34
  50. package/dist/visual-embed-sdk-react-full.d.ts +169 -45
  51. package/dist/visual-embed-sdk-react.d.ts +169 -45
  52. package/dist/visual-embed-sdk.d.ts +169 -45
  53. package/lib/package.json +1 -1
  54. package/lib/src/auth.d.ts +2 -1
  55. package/lib/src/auth.d.ts.map +1 -1
  56. package/lib/src/auth.js +1 -0
  57. package/lib/src/auth.js.map +1 -1
  58. package/lib/src/embed/app.d.ts +76 -0
  59. package/lib/src/embed/app.d.ts.map +1 -1
  60. package/lib/src/embed/app.js +18 -1
  61. package/lib/src/embed/app.js.map +1 -1
  62. package/lib/src/embed/app.spec.js +50 -0
  63. package/lib/src/embed/app.spec.js.map +1 -1
  64. package/lib/src/embed/liveboard.d.ts +2 -2
  65. package/lib/src/embed/ts-embed.d.ts.map +1 -1
  66. package/lib/src/embed/ts-embed.js +3 -3
  67. package/lib/src/embed/ts-embed.js.map +1 -1
  68. package/lib/src/index.d.ts.map +1 -1
  69. package/lib/src/index.js +1 -0
  70. package/lib/src/index.js.map +1 -1
  71. package/lib/src/react/index.d.ts.map +1 -1
  72. package/lib/src/react/index.js +1 -0
  73. package/lib/src/react/index.js.map +1 -1
  74. package/lib/src/types.d.ts +54 -27
  75. package/lib/src/types.d.ts.map +1 -1
  76. package/lib/src/types.js +38 -9
  77. package/lib/src/types.js.map +1 -1
  78. package/lib/src/utils/graphql/answerService/answerService.d.ts +35 -15
  79. package/lib/src/utils/graphql/answerService/answerService.d.ts.map +1 -1
  80. package/lib/src/utils/graphql/answerService/answerService.js +35 -15
  81. package/lib/src/utils/graphql/answerService/answerService.js.map +1 -1
  82. package/lib/src/utils/processData.js +6 -4
  83. package/lib/src/utils/processData.js.map +1 -1
  84. package/lib/src/visual-embed-sdk.d.ts +169 -45
  85. package/package.json +1 -1
  86. package/src/auth.ts +2 -1
  87. package/src/embed/app.spec.ts +70 -0
  88. package/src/embed/app.ts +104 -0
  89. package/src/embed/liveboard.ts +2 -2
  90. package/src/embed/ts-embed.ts +3 -4
  91. package/src/index.ts +2 -0
  92. package/src/react/index.tsx +2 -0
  93. package/src/types.ts +54 -31
  94. package/src/utils/graphql/answerService/answerService.ts +35 -15
  95. package/src/utils/processData.ts +6 -6
  96. package/dist/index-BJx3m5_V.js +0 -7370
  97. package/dist/index-Do_T8J8z.js +0 -7370
  98. package/dist/src/pages/embed-test.page.d.ts +0 -8
  99. package/dist/src/pages/embed-test.page.d.ts.map +0 -1
  100. package/dist/src/pages/home.page.d.ts +0 -6
  101. package/dist/src/pages/home.page.d.ts.map +0 -1
  102. package/dist/src/pages/login.page.d.ts +0 -15
  103. package/dist/src/pages/login.page.d.ts.map +0 -1
  104. package/dist/src/tests/auth.test.d.ts +0 -1
  105. package/dist/src/tests/auth.test.d.ts.map +0 -1
  106. package/dist/src/tests/e2e/auth.spec.d.ts +0 -2
  107. package/dist/src/tests/e2e/auth.spec.d.ts.map +0 -1
  108. package/lib/src/pages/embed-test.page.d.ts +0 -8
  109. package/lib/src/pages/embed-test.page.d.ts.map +0 -1
  110. package/lib/src/pages/embed-test.page.js +0 -16
  111. package/lib/src/pages/embed-test.page.js.map +0 -1
  112. package/lib/src/pages/home.page.d.ts +0 -6
  113. package/lib/src/pages/home.page.d.ts.map +0 -1
  114. package/lib/src/pages/home.page.js +0 -8
  115. package/lib/src/pages/home.page.js.map +0 -1
  116. package/lib/src/pages/login.page.d.ts +0 -15
  117. package/lib/src/pages/login.page.d.ts.map +0 -1
  118. package/lib/src/pages/login.page.js +0 -18
  119. package/lib/src/pages/login.page.js.map +0 -1
  120. package/lib/src/tests/auth.test.d.ts +0 -1
  121. package/lib/src/tests/auth.test.d.ts.map +0 -1
  122. package/lib/src/tests/auth.test.js +0 -1
  123. package/lib/src/tests/auth.test.js.map +0 -1
  124. package/lib/src/tests/e2e/auth.spec.d.ts +0 -2
  125. package/lib/src/tests/e2e/auth.spec.d.ts.map +0 -1
  126. package/lib/src/tests/e2e/auth.spec.js +0 -52
  127. package/lib/src/tests/e2e/auth.spec.js.map +0 -1
@@ -289,7 +289,8 @@ export declare enum AuthFailureType {
289
289
  NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
290
290
  EXPIRY = "EXPIRY",
291
291
  OTHER = "OTHER",
292
- IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT"
292
+ IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
293
+ UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
293
294
  }
294
295
  /**
295
296
  * Enum for auth status emitted by the emitter returned from {@link init}.
@@ -1072,6 +1073,20 @@ export declare enum HomePageSearchBarMode {
1072
1073
  AI_ANSWER = "aiAnswer",
1073
1074
  NONE = "none"
1074
1075
  }
1076
+ export interface ModularHomeExperienceV3 {
1077
+ /**
1078
+ * Enabled the modular homepage version 3.
1079
+ */
1080
+ enabled?: boolean;
1081
+ /**
1082
+ * homePage values are v2/v3,
1083
+ * v2 will show the modular homepage experience
1084
+ * v3 will show the new modular homepage v3 experience.
1085
+ *
1086
+ * @default v2
1087
+ */
1088
+ homePage?: string;
1089
+ }
1075
1090
  /**
1076
1091
  * The view configuration for full app embedding.
1077
1092
  * @group Embed components
@@ -1140,6 +1155,51 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1140
1155
  * ```
1141
1156
  */
1142
1157
  enablePendoHelp?: boolean;
1158
+ /**
1159
+ * Control the visibility of the hamburger icon on the top nav bar
1160
+ * available when new navigation V3 is enabled.
1161
+ *
1162
+ * @default false
1163
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1164
+ * @example
1165
+ * ```js
1166
+ * const embed = new AppEmbed('#tsEmbed', {
1167
+ * ... // other options
1168
+ * hideHamburger : true,
1169
+ * })
1170
+ * ```
1171
+ */
1172
+ hideHamburger?: boolean;
1173
+ /**
1174
+ * Control the visibility of the Eureka search on the top nav bar
1175
+ * this will control for both new V2 and new navigation V3.
1176
+ *
1177
+ * @default true
1178
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1179
+ * @example
1180
+ * ```js
1181
+ * const embed = new AppEmbed('#tsEmbed', {
1182
+ * ... // other options
1183
+ * hideObjectSearch: false,
1184
+ * })
1185
+ * ```
1186
+ */
1187
+ hideObjectSearch?: boolean;
1188
+ /**
1189
+ * Control the visibility of the notification on the top nav bar V3,
1190
+ * available when new navigation V3 is enabled.
1191
+ *
1192
+ * @default true
1193
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1194
+ * @example
1195
+ * ```js
1196
+ * const embed = new AppEmbed('#tsEmbed', {
1197
+ * ... // other options
1198
+ * hideNotification: false,
1199
+ * })
1200
+ * ```
1201
+ */
1202
+ hideNotification?: boolean;
1143
1203
  /**
1144
1204
  * Control the visibility of the application switcher button on the nav-bar.
1145
1205
  * By default, the application switcher is shown.
@@ -1333,6 +1393,23 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1333
1393
  * ```
1334
1394
  */
1335
1395
  modularHomeExperience?: boolean;
1396
+ /**
1397
+ * Flag to control new navigation v3 home experience.
1398
+ *
1399
+ * @default false
1400
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1401
+ * @example
1402
+ * ```js
1403
+ * const embed = new AppEmbed('#tsEmbed', {
1404
+ * ... // other options
1405
+ * modularHomeExperienceV3 : {
1406
+ * enabled: true,
1407
+ * homePage: 'v2'
1408
+ * },
1409
+ * })
1410
+ * ```
1411
+ */
1412
+ modularHomeExperienceV3?: ModularHomeExperienceV3;
1336
1413
  /**
1337
1414
  * Boolean to control if Liveboard header is sticky or not.
1338
1415
  * @example
@@ -1878,10 +1955,10 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
1878
1955
  dataSourceId?: string;
1879
1956
  /**
1880
1957
  * This flag is for show/hide checkboxes for include or exclude
1881
- * cover and filter pages in the Liveboard PDF
1958
+ * cover page and filters in the Liveboard PDF.
1882
1959
  * @type {boolean}
1883
1960
  * @default true
1884
- * @version SDK: 1.38.0 | ThoughtSpot:10.8.0.cl
1961
+ * @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
1885
1962
  * @example
1886
1963
  * ```js
1887
1964
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2144,7 +2221,19 @@ export declare enum HomeLeftNavItem {
2144
2221
  /**
2145
2222
  * @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
2146
2223
  */
2147
- LiveboardSchedules = "liveboard-schedules"
2224
+ LiveboardSchedules = "liveboard-schedules",
2225
+ /**
2226
+ * Create new options in the insights left navigation,
2227
+ * available when new navigation V3 is enabled.
2228
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
2229
+ */
2230
+ Create = "create",
2231
+ /**
2232
+ * Spotter option in the insights left navigation,
2233
+ * available when new navigation V3 is enabled.
2234
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
2235
+ */
2236
+ Spotter = "spotter"
2148
2237
  }
2149
2238
  export type DOMSelector = string | HTMLElement;
2150
2239
  /**
@@ -2625,6 +2714,19 @@ export interface ViewConfig {
2625
2714
  * ```
2626
2715
  */
2627
2716
  disabledActions?: Action[];
2717
+ /**
2718
+ * The primary action to display on top of the viz for Liveboard and App Embed.
2719
+ * Use this to set the primary action.
2720
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
2721
+ * @example
2722
+ * ```js
2723
+ * const embed = new LiveboardEmbed('#embed', {
2724
+ * ... // other liveboard view config
2725
+ * primaryAction: Action.Download
2726
+ * });
2727
+ * ```
2728
+ */
2729
+ primaryAction?: Action | string;
2628
2730
  /**
2629
2731
  * The tooltip to display for disabled actions.
2630
2732
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -2653,21 +2755,6 @@ export interface ViewConfig {
2653
2755
  * @important
2654
2756
  */
2655
2757
  hiddenActions?: Action[];
2656
- /**
2657
- * The primary action to display from the embedded.
2658
- * This action will be displayed from the embedded.
2659
- * Use this to set the primary action.
2660
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2661
- * @example
2662
- * ```js
2663
- * const embed = new LiveboardEmbed('#embed', {
2664
- * ... // other liveboard view config
2665
- * primaryAction: 'download'
2666
- * });
2667
- * ```
2668
- * @important
2669
- */
2670
- primaryAction?: string;
2671
2758
  /**
2672
2759
  * The list of actions to display from the primary menu, more menu
2673
2760
  * (...), and the contextual menu. These will be only actions that
@@ -3066,8 +3153,8 @@ export interface ViewConfig {
3066
3153
  * Hide list page columns
3067
3154
  * For example: hiddenListColumns = [ListPageColumns.Author]
3068
3155
  *
3069
- * **Note**: This option is appplicable only in full app embedding.
3070
- * @version SDK: 1.38.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
3156
+ * **Note**: This option is available only in full app embedding.
3157
+ * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
3071
3158
  * @example
3072
3159
  * ```js
3073
3160
  * const embed = new AppEmbed('#tsEmbed', {
@@ -3224,8 +3311,8 @@ export declare enum HomepageModule {
3224
3311
  }
3225
3312
  /**
3226
3313
  * List page columns that can be hidden.
3227
- * **Note**: This option is applicable only in full app embedding.
3228
- * @version SDK: 1.38.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
3314
+ * **Note**: This option is applicable to full app embedding only.
3315
+ * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
3229
3316
  */
3230
3317
  export declare enum ListPageColumns {
3231
3318
  /**
@@ -4308,7 +4395,7 @@ export declare enum EmbedEvent {
4308
4395
  * searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
4309
4396
  * })
4310
4397
  * ```
4311
- * @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
4398
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
4312
4399
  */
4313
4400
  TableVizRendered = "TableVizRendered",
4314
4401
  /**
@@ -4321,12 +4408,12 @@ export declare enum EmbedEvent {
4321
4408
  * console.log('payload', payload);
4322
4409
  * })
4323
4410
  *```
4324
- * @version SDK : 1.38.0 | ThoughtSpot : 10.8.0.cl
4411
+ * @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
4325
4412
  */
4326
4413
  CreateLiveboard = "createLiveboard",
4327
4414
  /**
4328
4415
  * Emitted when a user creates a Model.
4329
- * @version SDK : 1.38.0 | ThoughtSpot : 10.8.0.cl
4416
+ * @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
4330
4417
  */
4331
4418
  CreateModel = "createModel"
4332
4419
  }
@@ -4768,7 +4855,7 @@ export declare enum HostEvent {
4768
4855
  * ```js
4769
4856
  * liveboardEmbed.trigger(HostEvent.Remove)
4770
4857
  * ```
4771
- * @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
4858
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
4772
4859
  */
4773
4860
  Remove = "delete",
4774
4861
  /**
@@ -5229,8 +5316,17 @@ export declare enum HostEvent {
5229
5316
  /**
5230
5317
  * Get the Answer session for a Search or
5231
5318
  * Liveboard visualization.
5319
+ *
5320
+ * Note: This event is not typically used directly. Instead, use the
5321
+ * `getAnswerService()` method on the embed instance to get an AnswerService
5322
+ * object that provides a more convenient interface for working with answers.
5323
+ *
5232
5324
  * @example
5233
5325
  * ```js
5326
+ * // Preferred way to get an AnswerService
5327
+ * const service = await embed.getAnswerService();
5328
+ *
5329
+ * // Alternative direct usage (not recommended)
5234
5330
  * const {session} = await embed.trigger(
5235
5331
  * HostEvent.GetAnswerSession, {
5236
5332
  * vizId: '123', // For Liveboard Visualization.
@@ -5238,6 +5334,10 @@ export declare enum HostEvent {
5238
5334
  * ```
5239
5335
  * @example
5240
5336
  * ```js
5337
+ * // Preferred way to get an AnswerService
5338
+ * const service = await embed.getAnswerService();
5339
+ *
5340
+ * // Alternative direct usage (not recommended)
5241
5341
  * const {session} = await embed.trigger( HostEvent.GetAnswerSession )
5242
5342
  * ```
5243
5343
  * @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
@@ -5363,7 +5463,7 @@ export declare enum HostEvent {
5363
5463
  * searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
5364
5464
  * })
5365
5465
  * ```
5366
- * @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
5466
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
5367
5467
  */
5368
5468
  TransformTableVizData = "TransformTableVizData"
5369
5469
  }
@@ -5436,6 +5536,10 @@ export declare enum Param {
5436
5536
  ShowInsertToSlide = "insertInToSlide",
5437
5537
  PrimaryNavHidden = "primaryNavHidden",
5438
5538
  HideProfleAndHelp = "profileAndHelpInNavBarHidden",
5539
+ NavigationVersion = "navigationVersion",
5540
+ HideHamburger = "hideHamburger",
5541
+ HideObjectSearch = "hideObjectSearch",
5542
+ HideNotification = "hideNotification",
5439
5543
  HideApplicationSwitcher = "applicationSwitcherHidden",
5440
5544
  HideOrgSwitcher = "orgSwitcherHidden",
5441
5545
  IsSageEmbed = "isSageEmbed",
@@ -6699,7 +6803,7 @@ export declare enum Action {
6699
6803
  * ```js
6700
6804
  * hiddenAction: [Action.ColumnRename]
6701
6805
  * ```
6702
- * @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
6806
+ * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
6703
6807
  */
6704
6808
  ColumnRename = "columnRename",
6705
6809
  /**
@@ -6709,7 +6813,7 @@ export declare enum Action {
6709
6813
  * ```js
6710
6814
  * hiddenAction: [Action.CoverAndFilterOptionInPDF]
6711
6815
  * ```
6712
- * @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
6816
+ * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
6713
6817
  */
6714
6818
  CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
6715
6819
  }
@@ -7706,29 +7810,49 @@ export interface UnderlyingDataPoint {
7706
7810
  dataValue: any;
7707
7811
  }
7708
7812
  /**
7709
- * Class representing the answer service provided with the
7710
- * custom action payload. This service could be used to run
7711
- * graphql queries in the context of the answer on which the
7712
- * custom action was triggered.
7813
+ * AnswerService provides a simple way to work with ThoughtSpot Answers.
7814
+ *
7815
+ * This service allows you to interact with ThoughtSpot Answers programmatically,
7816
+ * making it easy to customize visualizations, filter data, and extract insights
7817
+ * directly from your application.
7818
+ *
7819
+ * You can use this service to:
7820
+ * - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
7821
+ * - Apply filters to Answers (`addFilter`)
7822
+ * - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
7823
+ * - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
7824
+ * - Run custom queries (`executeQuery`)
7825
+ * - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
7826
+ *
7713
7827
  * @example
7714
7828
  * ```js
7715
- * embed.on(EmbedEvent.CustomAction, e => {
7716
- * const underlying = await e.answerService.getUnderlyingDataForPoint([
7717
- * 'col name 1'
7718
- * ]);
7719
- * const data = await underlying.fetchData(0, 100);
7720
- * })
7829
+ * // Get the answer service
7830
+ * embed.on(EmbedEvent.Data, async (e) => {
7831
+ * const service = await embed.getAnswerService();
7832
+ *
7833
+ * // Add columns to the answer
7834
+ * await service.addColumnsByName(["Sales", "Region"]);
7835
+ *
7836
+ * // Get the data
7837
+ * const data = await service.fetchData();
7838
+ * console.log(data);
7839
+ * });
7721
7840
  * ```
7841
+ *
7722
7842
  * @example
7723
7843
  * ```js
7724
- * embed.on(EmbedEvent.Data, async (e) => {
7725
- * const service = await embed.getAnswerService();
7726
- * await service.addColumns([
7727
- * "<column guid>"
7844
+ * // Get data for a point in a visualization
7845
+ * embed.on(EmbedEvent.CustomAction, async (e) => {
7846
+ * const underlying = await e.answerService.getUnderlyingDataForPoint([
7847
+ * 'Product Name',
7848
+ * 'Sales Amount'
7728
7849
  * ]);
7729
- * console.log(await service.fetchData());
7850
+ *
7851
+ * const data = await underlying.fetchData(0, 100);
7852
+ * console.log(data);
7730
7853
  * });
7731
7854
  * ```
7855
+ *
7732
7856
  * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
7733
7857
  * @group Events
7734
7858
  */