@thoughtspot/visual-embed-sdk 1.29.1 → 1.29.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/cjs/package.json +1 -1
  2. package/cjs/src/types.d.ts +48 -20
  3. package/cjs/src/types.d.ts.map +1 -1
  4. package/cjs/src/types.js +46 -19
  5. package/cjs/src/types.js.map +1 -1
  6. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  7. package/cjs/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  8. package/cjs/src/utils/graphql/answerService/answer-queries.js +19 -1
  9. package/cjs/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  10. package/dist/src/types.d.ts +48 -20
  11. package/dist/src/types.d.ts.map +1 -1
  12. package/dist/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  13. package/dist/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  14. package/dist/tsembed-react.es.js +50 -20
  15. package/dist/tsembed-react.js +50 -20
  16. package/dist/tsembed.es.js +50 -20
  17. package/dist/tsembed.js +50 -20
  18. package/dist/visual-embed-sdk-react-full.d.ts +48 -20
  19. package/dist/visual-embed-sdk-react.d.ts +48 -20
  20. package/dist/visual-embed-sdk.d.ts +48 -20
  21. package/lib/package.json +1 -1
  22. package/lib/src/types.d.ts +48 -20
  23. package/lib/src/types.d.ts.map +1 -1
  24. package/lib/src/types.js +46 -19
  25. package/lib/src/types.js.map +1 -1
  26. package/lib/src/utils/graphql/answerService/answer-queries.d.ts +1 -0
  27. package/lib/src/utils/graphql/answerService/answer-queries.d.ts.map +1 -1
  28. package/lib/src/utils/graphql/answerService/answer-queries.js +18 -0
  29. package/lib/src/utils/graphql/answerService/answer-queries.js.map +1 -1
  30. package/lib/src/visual-embed-sdk.d.ts +48 -20
  31. package/package.json +1 -1
  32. package/src/types.ts +48 -20
  33. package/src/utils/graphql/answerService/answer-queries.ts +19 -0
@@ -1939,7 +1939,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
1939
1939
  };
1940
1940
  /**
1941
1941
  * Pendo API key to enable Pendo tracking to your own subscription, the key
1942
- * is added as an additional key to the embed, as per this [doc](https://support.pendo.io/hc/en-us/articles/360032201951-Send-data-to-multiple-subscriptions).
1942
+ * is added as an additional key to the embed, as per this link:https://support.pendo.io/hc/en-us/articles/360032201951-Send-data-to-multiple-subscriptions[document].
1943
+ *
1943
1944
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl
1944
1945
  */
1945
1946
  pendoTrackingKey?: string;
@@ -3159,7 +3160,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3159
3160
  */
3160
3161
  CopyToClipboard = "context-menu-item-copy-to-clipboard",
3161
3162
  /**
3162
- * Emitted when a user clicks the **Update TML** action
3163
+ * Emitted when a user clicks the **Update TML** action on
3164
+ * embedded Liveboard.
3165
+ *
3163
3166
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3164
3167
  * @example
3165
3168
  *```js
@@ -3170,6 +3173,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3170
3173
  UpdateTML = "updateTSL",
3171
3174
  /**
3172
3175
  * Emitted when a user clicks the **Edit TML** action
3176
+ * on an embedded Liveboard.
3177
+ *
3173
3178
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
3174
3179
  * @example
3175
3180
  *```js
@@ -3646,8 +3651,8 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3646
3651
  * _String_. The name of the column to filter on.
3647
3652
  *
3648
3653
  * `operator`
3649
- * Runtime filter operator to apply. For information,
3650
- * see [Developer Documentation](https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator).
3654
+ * Runtime filter operator to apply. For information,
3655
+ * see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
3651
3656
  *
3652
3657
  * `values`
3653
3658
  * List of operands. Some operators such as EQ, LE allow a single value, whereas
@@ -3775,16 +3780,22 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3775
3780
  */
3776
3781
  SchedulesList = "schedule-list",
3777
3782
  /**
3778
- * Trigger the **Export TML** action on an embedded Liveboard.
3783
+ * Trigger the **Export TML** action on an embedded Liveboard or
3784
+ * Answer.
3785
+ *
3779
3786
  * @example
3780
3787
  * ```js
3781
3788
  * liveboardEmbed.trigger(HostEvent.ExportTML)
3782
3789
  * ```
3790
+ *
3783
3791
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3784
3792
  */
3785
3793
  ExportTML = "exportTSL",
3786
3794
  /**
3787
- * Trigger the **Edit TML** action on an embedded Liveboard.
3795
+ * Trigger the **Edit TML** action on an embedded Liveboard or
3796
+ * saved Answers in the full application embedding.
3797
+ *
3798
+ *
3788
3799
  * @example
3789
3800
  * ```js
3790
3801
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -3802,7 +3813,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3802
3813
  */
3803
3814
  UpdateTML = "updateTSL",
3804
3815
  /**
3805
- * Trigger the **Download PDF** action on an embedded Liveboard.
3816
+ * Trigger the **Download PDF** action on an embedded Liveboard,
3817
+ * visualization or Answer.
3818
+ *
3819
+ * **NOTE**: The **Download** > **PDF** action is available on
3820
+ * visualizations and Answers if the data is in tabular format.
3821
+ *
3806
3822
  * @example
3807
3823
  * ```js
3808
3824
  * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
@@ -3870,22 +3886,23 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
3870
3886
  */
3871
3887
  ManageMonitor = "manageMonitor",
3872
3888
  /**
3873
- * Trigger the **Edit** action on a Liveboard or visualization
3889
+ * Trigger the **Edit** action on a Liveboard or a visualization
3890
+ * on a Liveboard.
3891
+ *
3892
+ * This event is not supported in visualization embed and search embed.
3893
+ *
3874
3894
  * @param - object - To trigger the action for a specific visualization
3875
3895
  * in Liveboard embed, pass in `vizId` as a key.
3876
- * Can be left undefined when embedding Search, full app, or
3877
- * a visualization.
3896
+ *
3878
3897
  * @example
3879
3898
  * ```js
3880
3899
  * liveboardEmbed.trigger(HostEvent.Edit)
3881
3900
  * ```
3901
+ * @example
3882
3902
  * ```js
3883
3903
  * liveboardEmbed.trigger(HostEvent.Edit, {vizId:
3884
3904
  * '730496d6-6903-4601-937e-2c691821af3c'})
3885
3905
  * ```
3886
- * ```js
3887
- * vizEmbed.trigger((HostEvent.Edit)
3888
- * ```
3889
3906
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
3890
3907
  */
3891
3908
  Edit = "edit",
@@ -4142,7 +4159,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4142
4159
  */
4143
4160
  ResetSearch = "resetSearch",
4144
4161
  /**
4145
- * Get details of the visible and runtime filters applied on Liveboard.
4162
+ * Get details of filters applied on the Liveboard.
4163
+ * Returns arrays containing Liveboard filter and runtime filter elements.
4164
+ *
4146
4165
  * @example
4147
4166
  * ```js
4148
4167
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -4164,11 +4183,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4164
4183
  *
4165
4184
  * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
4166
4185
  * For information about the supported filter operators,
4167
- * see [Developer Documentation](https://developers.thoughtspot.com/docs/runtime-filters#rtOperator).
4186
+ * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
4168
4187
  *
4169
4188
  * `values` - An array of one or several values. The value definition on the
4170
4189
  * data type you choose to filter on. For a complete list of supported data types,
4171
- * see [Developer Documentation](https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types).
4190
+ * see link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Developer Documentation].
4191
+ *
4172
4192
  * @example
4173
4193
  * ```js
4174
4194
  *
@@ -4484,7 +4504,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4484
4504
  SaveUntitled = "saveUntitled",
4485
4505
  /**
4486
4506
  * The **Save as View** action on the Answer
4487
- * page. Saves an Answer as a View object.
4507
+ * page. Saves an Answer as a View object in the full
4508
+ * application embedding mode.
4509
+ *
4488
4510
  * @example
4489
4511
  * ```js
4490
4512
  * disabledActions: [Action.SaveAsView]
@@ -4688,8 +4710,12 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4688
4710
  DownloadAsPng = "downloadAsPng",
4689
4711
  /**
4690
4712
  *
4691
- *The **Download PDF** action that downloads a Liveboard,
4692
- *visualization, or Answer as a PDF file.
4713
+ * The **Download PDF** action that downloads a Liveboard,
4714
+ * visualization, or Answer as a PDF file.
4715
+ *
4716
+ *
4717
+ * **NOTE**: The **Download** > **PDF** action is available on
4718
+ * visualizations and Answers if the data is in tabular format.
4693
4719
  *
4694
4720
  ***NOTE**: The **Download** > **PDF** action is available on
4695
4721
  *visualizations and Answers if the data is in tabular format.
@@ -4938,7 +4964,9 @@ declare module '@thoughtspot/visual-embed-sdk/types' {
4938
4964
  */
4939
4965
  QueryDetailsButtons = "queryDetailsButtons",
4940
4966
  /**
4941
- * The **Delete** action for Answers.
4967
+ * The **Delete** action for Answers in the full application
4968
+ * embedding mode.
4969
+ *
4942
4970
  * @example
4943
4971
  * ```js
4944
4972
  * disabledActions: [Action.AnswerDelete]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thoughtspot/visual-embed-sdk",
3
- "version": "1.29.1",
3
+ "version": "1.29.2",
4
4
  "description": "ThoughtSpot Embed SDK",
5
5
  "module": "lib/src/index.js",
6
6
  "main": "dist/tsembed.js",
package/src/types.ts CHANGED
@@ -528,7 +528,8 @@ export interface EmbedConfig {
528
528
 
529
529
  /**
530
530
  * Pendo API key to enable Pendo tracking to your own subscription, the key
531
- * is added as an additional key to the embed, as per this [doc](https://support.pendo.io/hc/en-us/articles/360032201951-Send-data-to-multiple-subscriptions).
531
+ * is added as an additional key to the embed, as per this link:https://support.pendo.io/hc/en-us/articles/360032201951-Send-data-to-multiple-subscriptions[document].
532
+ *
532
533
  * @version SDK: 1.27.0 | ThoughtSpot: 9.8.0.cl
533
534
  */
534
535
  pendoTrackingKey?: string;
@@ -1771,7 +1772,9 @@ export enum EmbedEvent {
1771
1772
  */
1772
1773
  CopyToClipboard = 'context-menu-item-copy-to-clipboard',
1773
1774
  /**
1774
- * Emitted when a user clicks the **Update TML** action
1775
+ * Emitted when a user clicks the **Update TML** action on
1776
+ * embedded Liveboard.
1777
+ *
1775
1778
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1776
1779
  * @example
1777
1780
  *```js
@@ -1782,6 +1785,8 @@ export enum EmbedEvent {
1782
1785
  UpdateTML = 'updateTSL',
1783
1786
  /**
1784
1787
  * Emitted when a user clicks the **Edit TML** action
1788
+ * on an embedded Liveboard.
1789
+ *
1785
1790
  * @version SDK: 1.11.0 | ThoughtSpot: 8.3.0.cl, 8.4.1.sw
1786
1791
  * @example
1787
1792
  *```js
@@ -2260,8 +2265,8 @@ export enum HostEvent {
2260
2265
  * _String_. The name of the column to filter on.
2261
2266
  *
2262
2267
  * `operator`
2263
- * Runtime filter operator to apply. For information,
2264
- * see [Developer Documentation](https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator).
2268
+ * Runtime filter operator to apply. For information,
2269
+ * see link:https://developers.thoughtspot.com/docs/?pageid=runtime-filters#rtOperator[Developer Documentation].
2265
2270
  *
2266
2271
  * `values`
2267
2272
  * List of operands. Some operators such as EQ, LE allow a single value, whereas
@@ -2389,16 +2394,22 @@ export enum HostEvent {
2389
2394
  */
2390
2395
  SchedulesList = 'schedule-list',
2391
2396
  /**
2392
- * Trigger the **Export TML** action on an embedded Liveboard.
2397
+ * Trigger the **Export TML** action on an embedded Liveboard or
2398
+ * Answer.
2399
+ *
2393
2400
  * @example
2394
2401
  * ```js
2395
2402
  * liveboardEmbed.trigger(HostEvent.ExportTML)
2396
2403
  * ```
2404
+ *
2397
2405
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2398
2406
  */
2399
2407
  ExportTML = 'exportTSL',
2400
2408
  /**
2401
- * Trigger the **Edit TML** action on an embedded Liveboard.
2409
+ * Trigger the **Edit TML** action on an embedded Liveboard or
2410
+ * saved Answers in the full application embedding.
2411
+ *
2412
+ *
2402
2413
  * @example
2403
2414
  * ```js
2404
2415
  * liveboardEmbed.trigger(HostEvent.EditTML)
@@ -2416,7 +2427,12 @@ export enum HostEvent {
2416
2427
  */
2417
2428
  UpdateTML = 'updateTSL',
2418
2429
  /**
2419
- * Trigger the **Download PDF** action on an embedded Liveboard.
2430
+ * Trigger the **Download PDF** action on an embedded Liveboard,
2431
+ * visualization or Answer.
2432
+ *
2433
+ * **NOTE**: The **Download** > **PDF** action is available on
2434
+ * visualizations and Answers if the data is in tabular format.
2435
+ *
2420
2436
  * @example
2421
2437
  * ```js
2422
2438
  * liveboardEmbed.trigger(HostEvent.DownloadAsPdf)
@@ -2484,22 +2500,23 @@ export enum HostEvent {
2484
2500
  */
2485
2501
  ManageMonitor = 'manageMonitor',
2486
2502
  /**
2487
- * Trigger the **Edit** action on a Liveboard or visualization
2503
+ * Trigger the **Edit** action on a Liveboard or a visualization
2504
+ * on a Liveboard.
2505
+ *
2506
+ * This event is not supported in visualization embed and search embed.
2507
+ *
2488
2508
  * @param - object - To trigger the action for a specific visualization
2489
2509
  * in Liveboard embed, pass in `vizId` as a key.
2490
- * Can be left undefined when embedding Search, full app, or
2491
- * a visualization.
2510
+ *
2492
2511
  * @example
2493
2512
  * ```js
2494
2513
  * liveboardEmbed.trigger(HostEvent.Edit)
2495
2514
  * ```
2515
+ * @example
2496
2516
  * ```js
2497
2517
  * liveboardEmbed.trigger(HostEvent.Edit, {vizId:
2498
2518
  * '730496d6-6903-4601-937e-2c691821af3c'})
2499
2519
  * ```
2500
- * ```js
2501
- * vizEmbed.trigger((HostEvent.Edit)
2502
- * ```
2503
2520
  * @version SDK: 1.15.0 | ThoughtSpot: 8.7.0.cl, 8.8.1.sw
2504
2521
  */
2505
2522
  Edit = 'edit',
@@ -2756,7 +2773,9 @@ export enum HostEvent {
2756
2773
  */
2757
2774
  ResetSearch = 'resetSearch',
2758
2775
  /**
2759
- * Get details of the visible and runtime filters applied on Liveboard.
2776
+ * Get details of filters applied on the Liveboard.
2777
+ * Returns arrays containing Liveboard filter and runtime filter elements.
2778
+ *
2760
2779
  * @example
2761
2780
  * ```js
2762
2781
  * const data = await liveboardEmbed.trigger(HostEvent.GetFilters);
@@ -2778,11 +2797,12 @@ export enum HostEvent {
2778
2797
  *
2779
2798
  * `oper` - Filter operator, for example, EQ, IN, CONTAINS.
2780
2799
  * For information about the supported filter operators,
2781
- * see [Developer Documentation](https://developers.thoughtspot.com/docs/runtime-filters#rtOperator).
2800
+ * see link:https://developers.thoughtspot.com/docs/runtime-filters#rtOperator[Developer Documentation].
2782
2801
  *
2783
2802
  * `values` - An array of one or several values. The value definition on the
2784
2803
  * data type you choose to filter on. For a complete list of supported data types,
2785
- * see [Developer Documentation](https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types).
2804
+ * see link:https://developers.thoughtspot.com/docs/runtime-filters#_supported_data_types[Developer Documentation].
2805
+ *
2786
2806
  * @example
2787
2807
  * ```js
2788
2808
  *
@@ -3105,7 +3125,9 @@ export enum Action {
3105
3125
  SaveUntitled = 'saveUntitled',
3106
3126
  /**
3107
3127
  * The **Save as View** action on the Answer
3108
- * page. Saves an Answer as a View object.
3128
+ * page. Saves an Answer as a View object in the full
3129
+ * application embedding mode.
3130
+ *
3109
3131
  * @example
3110
3132
  * ```js
3111
3133
  * disabledActions: [Action.SaveAsView]
@@ -3309,8 +3331,12 @@ export enum Action {
3309
3331
  DownloadAsPng = 'downloadAsPng',
3310
3332
  /**
3311
3333
  *
3312
- *The **Download PDF** action that downloads a Liveboard,
3313
- *visualization, or Answer as a PDF file.
3334
+ * The **Download PDF** action that downloads a Liveboard,
3335
+ * visualization, or Answer as a PDF file.
3336
+ *
3337
+ *
3338
+ * **NOTE**: The **Download** > **PDF** action is available on
3339
+ * visualizations and Answers if the data is in tabular format.
3314
3340
  *
3315
3341
  ***NOTE**: The **Download** > **PDF** action is available on
3316
3342
  *visualizations and Answers if the data is in tabular format.
@@ -3560,7 +3586,9 @@ export enum Action {
3560
3586
  */
3561
3587
  QueryDetailsButtons = 'queryDetailsButtons',
3562
3588
  /**
3563
- * The **Delete** action for Answers.
3589
+ * The **Delete** action for Answers in the full application
3590
+ * embedding mode.
3591
+ *
3564
3592
  * @example
3565
3593
  * ```js
3566
3594
  * disabledActions: [Action.AnswerDelete]
@@ -67,6 +67,9 @@ export const getAnswer = `
67
67
  ${bachSessionId}
68
68
  answer {
69
69
  id
70
+ name
71
+ description
72
+ displayMode
70
73
  sources {
71
74
  header {
72
75
  guid
@@ -136,3 +139,19 @@ export const getAnswerData = `
136
139
  }
137
140
  }
138
141
  `;
142
+
143
+ export const addVizToLiveboard = `
144
+ mutation AddVizToLiveboard(liveboardId: GUID!, session: BachSessionIdInput!, tabId: GUID, vizId: GUID!) {
145
+ Answer__addVizToPinboard(
146
+ pinboardId: liveboardId
147
+
148
+ session: $session
149
+
150
+ tabId: $tabId
151
+
152
+ vizId: $vizId
153
+ ) {
154
+ ${bachSessionId}
155
+ }
156
+ }
157
+ `;