@3e/sqa-common 6.24.0-2 → 6.24.0-4

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 (4) hide show
  1. package/index.d.ts +14 -1
  2. package/package.json +1 -1
  3. package/sqa_common.js +1313 -1304
  4. package/types.ts +25 -0
package/index.d.ts CHANGED
@@ -35,6 +35,8 @@ import {
35
35
  PacoViewParameters,
36
36
  Parameter,
37
37
  ShortLDTypeValue,
38
+ SaveDataArguments,
39
+ ViewExportFormat
38
40
  } from './types'
39
41
 
40
42
  /**
@@ -524,6 +526,8 @@ declare module '@3e/sqa-common' {
524
526
  *
525
527
  * @param visualization - The visualization to be saved in a .csv format
526
528
  * @param filename - the name of the csv.zip file to be downloaded
529
+ * @param format - the format of the file to be downloaded. Default is *text/csv*
530
+ * @param compression - the compression used for export. Default is "zip"
527
531
  *
528
532
  * @throws An error in case the provided parameters were incorrect. Wrap the
529
533
  * request inside a `try-catch` block
@@ -531,7 +535,16 @@ declare module '@3e/sqa-common' {
531
535
  createSaveDataJob(
532
536
  visualization: Visualization,
533
537
  filename: string,
534
- ): Promise<string>
538
+ format?: ViewExportFormat,
539
+ compression?: "none" | "zip"): Promise<string>
540
+
541
+ /**
542
+ * Extract arguments to create a `save_data` job for a view
543
+ * @param view - the view to save data for
544
+ * @param filename - the name of the export file. Defaults to the view title
545
+ */
546
+ viewToSaveDataArguments(view: SQView): Promise<SaveDataArguments>
547
+ viewToSaveDataArguments(view: SQView, filename: string): Promise<SaveDataArguments>
535
548
 
536
549
  /**
537
550
  * Used for polling the SQA API for the job status.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3e/sqa-common",
3
- "version": "6.24.0-2",
3
+ "version": "6.24.0-4",
4
4
  "description": "SynaptiQ utilities package",
5
5
  "main": "sqa_common.js",
6
6
  "dependencies": {