@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
@@ -279,7 +279,8 @@ export declare enum AuthFailureType {
279
279
  NO_COOKIE_ACCESS = "NO_COOKIE_ACCESS",
280
280
  EXPIRY = "EXPIRY",
281
281
  OTHER = "OTHER",
282
- IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT"
282
+ IDLE_SESSION_TIMEOUT = "IDLE_SESSION_TIMEOUT",
283
+ UNAUTHENTICATED_FAILURE = "UNAUTHENTICATED_FAILURE"
283
284
  }
284
285
  /**
285
286
  * Enum for auth status emitted by the emitter returned from {@link init}.
@@ -1062,6 +1063,20 @@ export declare enum HomePageSearchBarMode {
1062
1063
  AI_ANSWER = "aiAnswer",
1063
1064
  NONE = "none"
1064
1065
  }
1066
+ export interface ModularHomeExperienceV3 {
1067
+ /**
1068
+ * Enabled the modular homepage version 3.
1069
+ */
1070
+ enabled?: boolean;
1071
+ /**
1072
+ * homePage values are v2/v3,
1073
+ * v2 will show the modular homepage experience
1074
+ * v3 will show the new modular homepage v3 experience.
1075
+ *
1076
+ * @default v2
1077
+ */
1078
+ homePage?: string;
1079
+ }
1065
1080
  /**
1066
1081
  * The view configuration for full app embedding.
1067
1082
  * @group Embed components
@@ -1130,6 +1145,51 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1130
1145
  * ```
1131
1146
  */
1132
1147
  enablePendoHelp?: boolean;
1148
+ /**
1149
+ * Control the visibility of the hamburger icon on the top nav bar
1150
+ * available when new navigation V3 is enabled.
1151
+ *
1152
+ * @default false
1153
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1154
+ * @example
1155
+ * ```js
1156
+ * const embed = new AppEmbed('#tsEmbed', {
1157
+ * ... // other options
1158
+ * hideHamburger : true,
1159
+ * })
1160
+ * ```
1161
+ */
1162
+ hideHamburger?: boolean;
1163
+ /**
1164
+ * Control the visibility of the Eureka search on the top nav bar
1165
+ * this will control for both new V2 and new navigation V3.
1166
+ *
1167
+ * @default true
1168
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1169
+ * @example
1170
+ * ```js
1171
+ * const embed = new AppEmbed('#tsEmbed', {
1172
+ * ... // other options
1173
+ * hideObjectSearch: false,
1174
+ * })
1175
+ * ```
1176
+ */
1177
+ hideObjectSearch?: boolean;
1178
+ /**
1179
+ * Control the visibility of the notification on the top nav bar V3,
1180
+ * available when new navigation V3 is enabled.
1181
+ *
1182
+ * @default true
1183
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1184
+ * @example
1185
+ * ```js
1186
+ * const embed = new AppEmbed('#tsEmbed', {
1187
+ * ... // other options
1188
+ * hideNotification: false,
1189
+ * })
1190
+ * ```
1191
+ */
1192
+ hideNotification?: boolean;
1133
1193
  /**
1134
1194
  * Control the visibility of the application switcher button on the nav-bar.
1135
1195
  * By default, the application switcher is shown.
@@ -1323,6 +1383,23 @@ export interface AppViewConfig extends Omit<ViewConfig, 'visibleTabs'> {
1323
1383
  * ```
1324
1384
  */
1325
1385
  modularHomeExperience?: boolean;
1386
+ /**
1387
+ * Flag to control new navigation v3 home experience.
1388
+ *
1389
+ * @default false
1390
+ * @version SDK: 1.39.0 | Thoughtspot: 10.10.0.cl
1391
+ * @example
1392
+ * ```js
1393
+ * const embed = new AppEmbed('#tsEmbed', {
1394
+ * ... // other options
1395
+ * modularHomeExperienceV3 : {
1396
+ * enabled: true,
1397
+ * homePage: 'v2'
1398
+ * },
1399
+ * })
1400
+ * ```
1401
+ */
1402
+ modularHomeExperienceV3?: ModularHomeExperienceV3;
1326
1403
  /**
1327
1404
  * Boolean to control if Liveboard header is sticky or not.
1328
1405
  * @example
@@ -1868,10 +1945,10 @@ export interface LiveboardViewConfig extends Omit<ViewConfig, 'hiddenHomepageMod
1868
1945
  dataSourceId?: string;
1869
1946
  /**
1870
1947
  * This flag is for show/hide checkboxes for include or exclude
1871
- * cover and filter pages in the Liveboard PDF
1948
+ * cover page and filters in the Liveboard PDF.
1872
1949
  * @type {boolean}
1873
1950
  * @default true
1874
- * @version SDK: 1.38.0 | ThoughtSpot:10.8.0.cl
1951
+ * @version SDK: 1.37.0 | ThoughtSpot:10.8.0.cl
1875
1952
  * @example
1876
1953
  * ```js
1877
1954
  * const embed = new LiveboardEmbed('#embed-container', {
@@ -2134,7 +2211,19 @@ export declare enum HomeLeftNavItem {
2134
2211
  /**
2135
2212
  * @version SDK: 1.34.0| ThoughtSpot: 10.3.0.cl
2136
2213
  */
2137
- LiveboardSchedules = "liveboard-schedules"
2214
+ LiveboardSchedules = "liveboard-schedules",
2215
+ /**
2216
+ * Create new options in the insights left navigation,
2217
+ * available when new navigation V3 is enabled.
2218
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
2219
+ */
2220
+ Create = "create",
2221
+ /**
2222
+ * Spotter option in the insights left navigation,
2223
+ * available when new navigation V3 is enabled.
2224
+ * @version SDK: 1.39.0 | ThoughtSpot: 10.10.0.cl
2225
+ */
2226
+ Spotter = "spotter"
2138
2227
  }
2139
2228
  export type DOMSelector = string | HTMLElement;
2140
2229
  /**
@@ -2615,6 +2704,19 @@ export interface ViewConfig {
2615
2704
  * ```
2616
2705
  */
2617
2706
  disabledActions?: Action[];
2707
+ /**
2708
+ * The primary action to display on top of the viz for Liveboard and App Embed.
2709
+ * Use this to set the primary action.
2710
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
2711
+ * @example
2712
+ * ```js
2713
+ * const embed = new LiveboardEmbed('#embed', {
2714
+ * ... // other liveboard view config
2715
+ * primaryAction: Action.Download
2716
+ * });
2717
+ * ```
2718
+ */
2719
+ primaryAction?: Action | string;
2618
2720
  /**
2619
2721
  * The tooltip to display for disabled actions.
2620
2722
  * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
@@ -2643,21 +2745,6 @@ export interface ViewConfig {
2643
2745
  * @important
2644
2746
  */
2645
2747
  hiddenActions?: Action[];
2646
- /**
2647
- * The primary action to display from the embedded.
2648
- * This action will be displayed from the embedded.
2649
- * Use this to set the primary action.
2650
- * @version SDK: 1.6.0 | ThoughtSpot: ts8.nov.cl, 8.4.1.sw
2651
- * @example
2652
- * ```js
2653
- * const embed = new LiveboardEmbed('#embed', {
2654
- * ... // other liveboard view config
2655
- * primaryAction: 'download'
2656
- * });
2657
- * ```
2658
- * @important
2659
- */
2660
- primaryAction?: string;
2661
2748
  /**
2662
2749
  * The list of actions to display from the primary menu, more menu
2663
2750
  * (...), and the contextual menu. These will be only actions that
@@ -3056,8 +3143,8 @@ export interface ViewConfig {
3056
3143
  * Hide list page columns
3057
3144
  * For example: hiddenListColumns = [ListPageColumns.Author]
3058
3145
  *
3059
- * **Note**: This option is appplicable only in full app embedding.
3060
- * @version SDK: 1.38.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
3146
+ * **Note**: This option is available only in full app embedding.
3147
+ * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
3061
3148
  * @example
3062
3149
  * ```js
3063
3150
  * const embed = new AppEmbed('#tsEmbed', {
@@ -3214,8 +3301,8 @@ export declare enum HomepageModule {
3214
3301
  }
3215
3302
  /**
3216
3303
  * List page columns that can be hidden.
3217
- * **Note**: This option is applicable only in full app embedding.
3218
- * @version SDK: 1.38.0 | ThoughtSpot: 9.12.5.cl, 10.1.0.sw
3304
+ * **Note**: This option is applicable to full app embedding only.
3305
+ * @version SDK: 1.38.0 | ThoughtSpot: 10.9.0.cl
3219
3306
  */
3220
3307
  export declare enum ListPageColumns {
3221
3308
  /**
@@ -4298,7 +4385,7 @@ export declare enum EmbedEvent {
4298
4385
  * searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
4299
4386
  * })
4300
4387
  * ```
4301
- * @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
4388
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
4302
4389
  */
4303
4390
  TableVizRendered = "TableVizRendered",
4304
4391
  /**
@@ -4311,12 +4398,12 @@ export declare enum EmbedEvent {
4311
4398
  * console.log('payload', payload);
4312
4399
  * })
4313
4400
  *```
4314
- * @version SDK : 1.38.0 | ThoughtSpot : 10.8.0.cl
4401
+ * @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
4315
4402
  */
4316
4403
  CreateLiveboard = "createLiveboard",
4317
4404
  /**
4318
4405
  * Emitted when a user creates a Model.
4319
- * @version SDK : 1.38.0 | ThoughtSpot : 10.8.0.cl
4406
+ * @version SDK : 1.37.0 | ThoughtSpot : 10.8.0.cl
4320
4407
  */
4321
4408
  CreateModel = "createModel"
4322
4409
  }
@@ -4758,7 +4845,7 @@ export declare enum HostEvent {
4758
4845
  * ```js
4759
4846
  * liveboardEmbed.trigger(HostEvent.Remove)
4760
4847
  * ```
4761
- * @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
4848
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl, 10.10.0.sw
4762
4849
  */
4763
4850
  Remove = "delete",
4764
4851
  /**
@@ -5219,8 +5306,17 @@ export declare enum HostEvent {
5219
5306
  /**
5220
5307
  * Get the Answer session for a Search or
5221
5308
  * Liveboard visualization.
5309
+ *
5310
+ * Note: This event is not typically used directly. Instead, use the
5311
+ * `getAnswerService()` method on the embed instance to get an AnswerService
5312
+ * object that provides a more convenient interface for working with answers.
5313
+ *
5222
5314
  * @example
5223
5315
  * ```js
5316
+ * // Preferred way to get an AnswerService
5317
+ * const service = await embed.getAnswerService();
5318
+ *
5319
+ * // Alternative direct usage (not recommended)
5224
5320
  * const {session} = await embed.trigger(
5225
5321
  * HostEvent.GetAnswerSession, {
5226
5322
  * vizId: '123', // For Liveboard Visualization.
@@ -5228,6 +5324,10 @@ export declare enum HostEvent {
5228
5324
  * ```
5229
5325
  * @example
5230
5326
  * ```js
5327
+ * // Preferred way to get an AnswerService
5328
+ * const service = await embed.getAnswerService();
5329
+ *
5330
+ * // Alternative direct usage (not recommended)
5231
5331
  * const {session} = await embed.trigger( HostEvent.GetAnswerSession )
5232
5332
  * ```
5233
5333
  * @version SDK: 1.26.0 | ThoughtSpot: 9.10.0.cl, 10.1.0.sw
@@ -5353,7 +5453,7 @@ export declare enum HostEvent {
5353
5453
  * searchEmbed.trigger(HostEvent.TransformTableVizData, columnDataLite);
5354
5454
  * })
5355
5455
  * ```
5356
- * @version SDK: 1.38.0 | ThoughtSpot: 10.8.0.cl
5456
+ * @version SDK: 1.37.0 | ThoughtSpot: 10.8.0.cl
5357
5457
  */
5358
5458
  TransformTableVizData = "TransformTableVizData"
5359
5459
  }
@@ -5426,6 +5526,10 @@ export declare enum Param {
5426
5526
  ShowInsertToSlide = "insertInToSlide",
5427
5527
  PrimaryNavHidden = "primaryNavHidden",
5428
5528
  HideProfleAndHelp = "profileAndHelpInNavBarHidden",
5529
+ NavigationVersion = "navigationVersion",
5530
+ HideHamburger = "hideHamburger",
5531
+ HideObjectSearch = "hideObjectSearch",
5532
+ HideNotification = "hideNotification",
5429
5533
  HideApplicationSwitcher = "applicationSwitcherHidden",
5430
5534
  HideOrgSwitcher = "orgSwitcherHidden",
5431
5535
  IsSageEmbed = "isSageEmbed",
@@ -6689,7 +6793,7 @@ export declare enum Action {
6689
6793
  * ```js
6690
6794
  * hiddenAction: [Action.ColumnRename]
6691
6795
  * ```
6692
- * @version SDK: 1.38.0 | ThoughtSpot Cloud: 10.8.0.cl
6796
+ * @version SDK: 1.37.0 | ThoughtSpot Cloud: 10.8.0.cl
6693
6797
  */
6694
6798
  ColumnRename = "columnRename",
6695
6799
  /**
@@ -6699,7 +6803,7 @@ export declare enum Action {
6699
6803
  * ```js
6700
6804
  * hiddenAction: [Action.CoverAndFilterOptionInPDF]
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
  CoverAndFilterOptionInPDF = "coverAndFilterOptionInPDF"
6705
6809
  }
@@ -7793,29 +7897,49 @@ export interface UnderlyingDataPoint {
7793
7897
  dataValue: any;
7794
7898
  }
7795
7899
  /**
7796
- * Class representing the answer service provided with the
7797
- * custom action payload. This service could be used to run
7798
- * graphql queries in the context of the answer on which the
7799
- * custom action was triggered.
7900
+ * AnswerService provides a simple way to work with ThoughtSpot Answers.
7901
+ *
7902
+ * This service allows you to interact with ThoughtSpot Answers programmatically,
7903
+ * making it easy to customize visualizations, filter data, and extract insights
7904
+ * directly from your application.
7905
+ *
7906
+ * You can use this service to:
7907
+ * - Add or remove columns from Answers (`addColumns`, `removeColumns`, `addColumnsByName`)
7908
+ * - Apply filters to Answers (`addFilter`)
7909
+ * - Get data from Answers in different formats (JSON, CSV, PNG) (`fetchData`, `fetchCSVBlob`, `fetchPNGBlob`)
7910
+ * - Get data for specific points in visualizations (`getUnderlyingDataForPoint`)
7911
+ * - Run custom queries (`executeQuery`)
7912
+ * - Add visualizations to liveboards (`addDisplayedVizToLiveboard`)
7913
+ *
7800
7914
  * @example
7801
7915
  * ```js
7802
- * embed.on(EmbedEvent.CustomAction, e => {
7803
- * const underlying = await e.answerService.getUnderlyingDataForPoint([
7804
- * 'col name 1'
7805
- * ]);
7806
- * const data = await underlying.fetchData(0, 100);
7807
- * })
7916
+ * // Get the answer service
7917
+ * embed.on(EmbedEvent.Data, async (e) => {
7918
+ * const service = await embed.getAnswerService();
7919
+ *
7920
+ * // Add columns to the answer
7921
+ * await service.addColumnsByName(["Sales", "Region"]);
7922
+ *
7923
+ * // Get the data
7924
+ * const data = await service.fetchData();
7925
+ * console.log(data);
7926
+ * });
7808
7927
  * ```
7928
+ *
7809
7929
  * @example
7810
7930
  * ```js
7811
- * embed.on(EmbedEvent.Data, async (e) => {
7812
- * const service = await embed.getAnswerService();
7813
- * await service.addColumns([
7814
- * "<column guid>"
7931
+ * // Get data for a point in a visualization
7932
+ * embed.on(EmbedEvent.CustomAction, async (e) => {
7933
+ * const underlying = await e.answerService.getUnderlyingDataForPoint([
7934
+ * 'Product Name',
7935
+ * 'Sales Amount'
7815
7936
  * ]);
7816
- * console.log(await service.fetchData());
7937
+ *
7938
+ * const data = await underlying.fetchData(0, 100);
7939
+ * console.log(data);
7817
7940
  * });
7818
7941
  * ```
7942
+ *
7819
7943
  * @version SDK: 1.25.0| ThoughtSpot: 9.10.0.cl
7820
7944
  * @group Events
7821
7945
  */