@gooddata/api-client-tiger 10.1.0-alpha.9 → 10.1.0

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.
@@ -87,6 +87,47 @@ export const ActionsApiAxiosParamCreator = function (configuration) {
87
87
  options: localVarRequestOptions,
88
88
  };
89
89
  },
90
+ /**
91
+ * Delete the files in the given data source.
92
+ * @summary Delete datasource files
93
+ * @param {string} dataSourceId
94
+ * @param {DeleteFilesRequest} deleteFilesRequest
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ deleteFiles: async (dataSourceId, deleteFilesRequest, options = {}) => {
99
+ // verify required parameter 'dataSourceId' is not null or undefined
100
+ assertParamExists("deleteFiles", "dataSourceId", dataSourceId);
101
+ // verify required parameter 'deleteFilesRequest' is not null or undefined
102
+ assertParamExists("deleteFiles", "deleteFilesRequest", deleteFilesRequest);
103
+ const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/deleteFiles`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
104
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
105
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
106
+ let baseOptions;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ }
110
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
111
+ const localVarHeaderParameter = {};
112
+ const localVarQueryParameter = {};
113
+ localVarHeaderParameter["Content-Type"] = "application/json";
114
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = {
117
+ ...localVarHeaderParameter,
118
+ ...headersFromBaseOptions,
119
+ ...options.headers,
120
+ };
121
+ const needsSerialization = typeof deleteFilesRequest !== "string" ||
122
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
123
+ localVarRequestOptions.data = needsSerialization
124
+ ? JSON.stringify(deleteFilesRequest !== undefined ? deleteFilesRequest : {})
125
+ : deleteFilesRequest || "";
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
90
131
  /**
91
132
  * Provides a location for uploading staging files.
92
133
  * @summary Get a staging upload location
@@ -192,6 +233,47 @@ export const ActionsApiAxiosParamCreator = function (configuration) {
192
233
  options: localVarRequestOptions,
193
234
  };
194
235
  },
236
+ /**
237
+ * Provides a location for uploading staging files.
238
+ * @summary Upload a file to the staging area
239
+ * @param {string} dataSourceId
240
+ * @param {any} file The file to upload.
241
+ * @param {*} [options] Override http request option.
242
+ * @throws {RequiredError}
243
+ */
244
+ stagingUpload: async (dataSourceId, file, options = {}) => {
245
+ // verify required parameter 'dataSourceId' is not null or undefined
246
+ assertParamExists("stagingUpload", "dataSourceId", dataSourceId);
247
+ // verify required parameter 'file' is not null or undefined
248
+ assertParamExists("stagingUpload", "file", file);
249
+ const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/staging/uploadFile`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
250
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
251
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
252
+ let baseOptions;
253
+ if (configuration) {
254
+ baseOptions = configuration.baseOptions;
255
+ }
256
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
257
+ const localVarHeaderParameter = {};
258
+ const localVarQueryParameter = {};
259
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
260
+ if (file !== undefined) {
261
+ localVarFormParams.append("file", file);
262
+ }
263
+ localVarHeaderParameter["Content-Type"] = "multipart/form-data";
264
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
265
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
266
+ localVarRequestOptions.headers = {
267
+ ...localVarHeaderParameter,
268
+ ...headersFromBaseOptions,
269
+ ...options.headers,
270
+ };
271
+ localVarRequestOptions.data = localVarFormParams;
272
+ return {
273
+ url: toPathString(localVarUrlObj),
274
+ options: localVarRequestOptions,
275
+ };
276
+ },
195
277
  };
196
278
  };
197
279
  /**
@@ -223,6 +305,18 @@ export const ActionsApiFp = function (configuration) {
223
305
  const localVarAxiosArgs = await localVarAxiosParamCreator.collectCacheUsage(options);
224
306
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
225
307
  },
308
+ /**
309
+ * Delete the files in the given data source.
310
+ * @summary Delete datasource files
311
+ * @param {string} dataSourceId
312
+ * @param {DeleteFilesRequest} deleteFilesRequest
313
+ * @param {*} [options] Override http request option.
314
+ * @throws {RequiredError}
315
+ */
316
+ async deleteFiles(dataSourceId, deleteFilesRequest, options) {
317
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFiles(dataSourceId, deleteFilesRequest, options);
318
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
319
+ },
226
320
  /**
227
321
  * Provides a location for uploading staging files.
228
322
  * @summary Get a staging upload location
@@ -257,6 +351,18 @@ export const ActionsApiFp = function (configuration) {
257
351
  const localVarAxiosArgs = await localVarAxiosParamCreator.listFiles(dataSourceId, options);
258
352
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
259
353
  },
354
+ /**
355
+ * Provides a location for uploading staging files.
356
+ * @summary Upload a file to the staging area
357
+ * @param {string} dataSourceId
358
+ * @param {any} file The file to upload.
359
+ * @param {*} [options] Override http request option.
360
+ * @throws {RequiredError}
361
+ */
362
+ async stagingUpload(dataSourceId, file, options) {
363
+ const localVarAxiosArgs = await localVarAxiosParamCreator.stagingUpload(dataSourceId, file, options);
364
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
365
+ },
260
366
  };
261
367
  };
262
368
  /**
@@ -287,6 +393,18 @@ export const ActionsApiFactory = function (configuration, basePath, axios) {
287
393
  collectCacheUsage(options) {
288
394
  return localVarFp.collectCacheUsage(options).then((request) => request(axios, basePath));
289
395
  },
396
+ /**
397
+ * Delete the files in the given data source.
398
+ * @summary Delete datasource files
399
+ * @param {ActionsApiDeleteFilesRequest} requestParameters Request parameters.
400
+ * @param {*} [options] Override http request option.
401
+ * @throws {RequiredError}
402
+ */
403
+ deleteFiles(requestParameters, options) {
404
+ return localVarFp
405
+ .deleteFiles(requestParameters.dataSourceId, requestParameters.deleteFilesRequest, options)
406
+ .then((request) => request(axios, basePath));
407
+ },
290
408
  /**
291
409
  * Provides a location for uploading staging files.
292
410
  * @summary Get a staging upload location
@@ -323,6 +441,18 @@ export const ActionsApiFactory = function (configuration, basePath, axios) {
323
441
  .listFiles(requestParameters.dataSourceId, options)
324
442
  .then((request) => request(axios, basePath));
325
443
  },
444
+ /**
445
+ * Provides a location for uploading staging files.
446
+ * @summary Upload a file to the staging area
447
+ * @param {ActionsApiStagingUploadRequest} requestParameters Request parameters.
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ */
451
+ stagingUpload(requestParameters, options) {
452
+ return localVarFp
453
+ .stagingUpload(requestParameters.dataSourceId, requestParameters.file, options)
454
+ .then((request) => request(axios, basePath));
455
+ },
326
456
  };
327
457
  };
328
458
  /**
@@ -357,6 +487,19 @@ export class ActionsApi extends BaseAPI {
357
487
  .collectCacheUsage(options)
358
488
  .then((request) => request(this.axios, this.basePath));
359
489
  }
490
+ /**
491
+ * Delete the files in the given data source.
492
+ * @summary Delete datasource files
493
+ * @param {ActionsApiDeleteFilesRequest} requestParameters Request parameters.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ * @memberof ActionsApi
497
+ */
498
+ deleteFiles(requestParameters, options) {
499
+ return ActionsApiFp(this.configuration)
500
+ .deleteFiles(requestParameters.dataSourceId, requestParameters.deleteFilesRequest, options)
501
+ .then((request) => request(this.axios, this.basePath));
502
+ }
360
503
  /**
361
504
  * Provides a location for uploading staging files.
362
505
  * @summary Get a staging upload location
@@ -396,6 +539,19 @@ export class ActionsApi extends BaseAPI {
396
539
  .listFiles(requestParameters.dataSourceId, options)
397
540
  .then((request) => request(this.axios, this.basePath));
398
541
  }
542
+ /**
543
+ * Provides a location for uploading staging files.
544
+ * @summary Upload a file to the staging area
545
+ * @param {ActionsApiStagingUploadRequest} requestParameters Request parameters.
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ * @memberof ActionsApi
549
+ */
550
+ stagingUpload(requestParameters, options) {
551
+ return ActionsApiFp(this.configuration)
552
+ .stagingUpload(requestParameters.dataSourceId, requestParameters.file, options)
553
+ .then((request) => request(this.axios, this.basePath));
554
+ }
399
555
  }
400
556
  /**
401
557
  * CacheUsageApi - axios parameter creator
@@ -604,25 +760,25 @@ export class DataSourceFilesAnalysisApi extends BaseAPI {
604
760
  }
605
761
  }
606
762
  /**
607
- * DataSourceFilesImportApi - axios parameter creator
763
+ * DataSourceFilesDeletionApi - axios parameter creator
608
764
  * @export
609
765
  */
610
- export const DataSourceFilesImportApiAxiosParamCreator = function (configuration) {
766
+ export const DataSourceFilesDeletionApiAxiosParamCreator = function (configuration) {
611
767
  return {
612
768
  /**
613
- * Import the CSV files at the given locations in the staging area to the final location.
614
- * @summary Import CSV
769
+ * Delete the files in the given data source.
770
+ * @summary Delete datasource files
615
771
  * @param {string} dataSourceId
616
- * @param {ImportCsvRequest} importCsvRequest
772
+ * @param {DeleteFilesRequest} deleteFilesRequest
617
773
  * @param {*} [options] Override http request option.
618
774
  * @throws {RequiredError}
619
775
  */
620
- importCsv: async (dataSourceId, importCsvRequest, options = {}) => {
776
+ deleteFiles: async (dataSourceId, deleteFilesRequest, options = {}) => {
621
777
  // verify required parameter 'dataSourceId' is not null or undefined
622
- assertParamExists("importCsv", "dataSourceId", dataSourceId);
623
- // verify required parameter 'importCsvRequest' is not null or undefined
624
- assertParamExists("importCsv", "importCsvRequest", importCsvRequest);
625
- const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/import`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
778
+ assertParamExists("deleteFiles", "dataSourceId", dataSourceId);
779
+ // verify required parameter 'deleteFilesRequest' is not null or undefined
780
+ assertParamExists("deleteFiles", "deleteFilesRequest", deleteFilesRequest);
781
+ const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/deleteFiles`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
626
782
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
627
783
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
628
784
  let baseOptions;
@@ -640,27 +796,101 @@ export const DataSourceFilesImportApiAxiosParamCreator = function (configuration
640
796
  ...headersFromBaseOptions,
641
797
  ...options.headers,
642
798
  };
643
- const needsSerialization = typeof importCsvRequest !== "string" ||
799
+ const needsSerialization = typeof deleteFilesRequest !== "string" ||
644
800
  localVarRequestOptions.headers["Content-Type"] === "application/json";
645
801
  localVarRequestOptions.data = needsSerialization
646
- ? JSON.stringify(importCsvRequest !== undefined ? importCsvRequest : {})
647
- : importCsvRequest || "";
802
+ ? JSON.stringify(deleteFilesRequest !== undefined ? deleteFilesRequest : {})
803
+ : deleteFilesRequest || "";
648
804
  return {
649
805
  url: toPathString(localVarUrlObj),
650
806
  options: localVarRequestOptions,
651
807
  };
652
808
  },
809
+ };
810
+ };
811
+ /**
812
+ * DataSourceFilesDeletionApi - functional programming interface
813
+ * @export
814
+ */
815
+ export const DataSourceFilesDeletionApiFp = function (configuration) {
816
+ const localVarAxiosParamCreator = DataSourceFilesDeletionApiAxiosParamCreator(configuration);
817
+ return {
653
818
  /**
654
- * List all the files in the given data source.
655
- * @summary List datasource files
819
+ * Delete the files in the given data source.
820
+ * @summary Delete datasource files
656
821
  * @param {string} dataSourceId
822
+ * @param {DeleteFilesRequest} deleteFilesRequest
657
823
  * @param {*} [options] Override http request option.
658
824
  * @throws {RequiredError}
659
825
  */
660
- listFiles: async (dataSourceId, options = {}) => {
826
+ async deleteFiles(dataSourceId, deleteFilesRequest, options) {
827
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteFiles(dataSourceId, deleteFilesRequest, options);
828
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
829
+ },
830
+ };
831
+ };
832
+ /**
833
+ * DataSourceFilesDeletionApi - factory interface
834
+ * @export
835
+ */
836
+ export const DataSourceFilesDeletionApiFactory = function (configuration, basePath, axios) {
837
+ const localVarFp = DataSourceFilesDeletionApiFp(configuration);
838
+ return {
839
+ /**
840
+ * Delete the files in the given data source.
841
+ * @summary Delete datasource files
842
+ * @param {DataSourceFilesDeletionApiDeleteFilesRequest} requestParameters Request parameters.
843
+ * @param {*} [options] Override http request option.
844
+ * @throws {RequiredError}
845
+ */
846
+ deleteFiles(requestParameters, options) {
847
+ return localVarFp
848
+ .deleteFiles(requestParameters.dataSourceId, requestParameters.deleteFilesRequest, options)
849
+ .then((request) => request(axios, basePath));
850
+ },
851
+ };
852
+ };
853
+ /**
854
+ * DataSourceFilesDeletionApi - object-oriented interface
855
+ * @export
856
+ * @class DataSourceFilesDeletionApi
857
+ * @extends {BaseAPI}
858
+ */
859
+ export class DataSourceFilesDeletionApi extends BaseAPI {
860
+ /**
861
+ * Delete the files in the given data source.
862
+ * @summary Delete datasource files
863
+ * @param {DataSourceFilesDeletionApiDeleteFilesRequest} requestParameters Request parameters.
864
+ * @param {*} [options] Override http request option.
865
+ * @throws {RequiredError}
866
+ * @memberof DataSourceFilesDeletionApi
867
+ */
868
+ deleteFiles(requestParameters, options) {
869
+ return DataSourceFilesDeletionApiFp(this.configuration)
870
+ .deleteFiles(requestParameters.dataSourceId, requestParameters.deleteFilesRequest, options)
871
+ .then((request) => request(this.axios, this.basePath));
872
+ }
873
+ }
874
+ /**
875
+ * DataSourceFilesImportApi - axios parameter creator
876
+ * @export
877
+ */
878
+ export const DataSourceFilesImportApiAxiosParamCreator = function (configuration) {
879
+ return {
880
+ /**
881
+ * Import the CSV files at the given locations in the staging area to the final location.
882
+ * @summary Import CSV
883
+ * @param {string} dataSourceId
884
+ * @param {ImportCsvRequest} importCsvRequest
885
+ * @param {*} [options] Override http request option.
886
+ * @throws {RequiredError}
887
+ */
888
+ importCsv: async (dataSourceId, importCsvRequest, options = {}) => {
661
889
  // verify required parameter 'dataSourceId' is not null or undefined
662
- assertParamExists("listFiles", "dataSourceId", dataSourceId);
663
- const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/listFiles`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
890
+ assertParamExists("importCsv", "dataSourceId", dataSourceId);
891
+ // verify required parameter 'importCsvRequest' is not null or undefined
892
+ assertParamExists("importCsv", "importCsvRequest", importCsvRequest);
893
+ const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/import`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
664
894
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
665
895
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
666
896
  let baseOptions;
@@ -670,6 +900,7 @@ export const DataSourceFilesImportApiAxiosParamCreator = function (configuration
670
900
  const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
671
901
  const localVarHeaderParameter = {};
672
902
  const localVarQueryParameter = {};
903
+ localVarHeaderParameter["Content-Type"] = "application/json";
673
904
  setSearchParams(localVarUrlObj, localVarQueryParameter);
674
905
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
675
906
  localVarRequestOptions.headers = {
@@ -677,6 +908,11 @@ export const DataSourceFilesImportApiAxiosParamCreator = function (configuration
677
908
  ...headersFromBaseOptions,
678
909
  ...options.headers,
679
910
  };
911
+ const needsSerialization = typeof importCsvRequest !== "string" ||
912
+ localVarRequestOptions.headers["Content-Type"] === "application/json";
913
+ localVarRequestOptions.data = needsSerialization
914
+ ? JSON.stringify(importCsvRequest !== undefined ? importCsvRequest : {})
915
+ : importCsvRequest || "";
680
916
  return {
681
917
  url: toPathString(localVarUrlObj),
682
918
  options: localVarRequestOptions,
@@ -703,17 +939,6 @@ export const DataSourceFilesImportApiFp = function (configuration) {
703
939
  const localVarAxiosArgs = await localVarAxiosParamCreator.importCsv(dataSourceId, importCsvRequest, options);
704
940
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
705
941
  },
706
- /**
707
- * List all the files in the given data source.
708
- * @summary List datasource files
709
- * @param {string} dataSourceId
710
- * @param {*} [options] Override http request option.
711
- * @throws {RequiredError}
712
- */
713
- async listFiles(dataSourceId, options) {
714
- const localVarAxiosArgs = await localVarAxiosParamCreator.listFiles(dataSourceId, options);
715
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
716
- },
717
942
  };
718
943
  };
719
944
  /**
@@ -735,18 +960,6 @@ export const DataSourceFilesImportApiFactory = function (configuration, basePath
735
960
  .importCsv(requestParameters.dataSourceId, requestParameters.importCsvRequest, options)
736
961
  .then((request) => request(axios, basePath));
737
962
  },
738
- /**
739
- * List all the files in the given data source.
740
- * @summary List datasource files
741
- * @param {DataSourceFilesImportApiListFilesRequest} requestParameters Request parameters.
742
- * @param {*} [options] Override http request option.
743
- * @throws {RequiredError}
744
- */
745
- listFiles(requestParameters, options) {
746
- return localVarFp
747
- .listFiles(requestParameters.dataSourceId, options)
748
- .then((request) => request(axios, basePath));
749
- },
750
963
  };
751
964
  };
752
965
  /**
@@ -769,16 +982,105 @@ export class DataSourceFilesImportApi extends BaseAPI {
769
982
  .importCsv(requestParameters.dataSourceId, requestParameters.importCsvRequest, options)
770
983
  .then((request) => request(this.axios, this.basePath));
771
984
  }
985
+ }
986
+ /**
987
+ * DataSourceFilesListingApi - axios parameter creator
988
+ * @export
989
+ */
990
+ export const DataSourceFilesListingApiAxiosParamCreator = function (configuration) {
991
+ return {
992
+ /**
993
+ * List all the files in the given data source.
994
+ * @summary List datasource files
995
+ * @param {string} dataSourceId
996
+ * @param {*} [options] Override http request option.
997
+ * @throws {RequiredError}
998
+ */
999
+ listFiles: async (dataSourceId, options = {}) => {
1000
+ // verify required parameter 'dataSourceId' is not null or undefined
1001
+ assertParamExists("listFiles", "dataSourceId", dataSourceId);
1002
+ const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/listFiles`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
1003
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1004
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1005
+ let baseOptions;
1006
+ if (configuration) {
1007
+ baseOptions = configuration.baseOptions;
1008
+ }
1009
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
1010
+ const localVarHeaderParameter = {};
1011
+ const localVarQueryParameter = {};
1012
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1013
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1014
+ localVarRequestOptions.headers = {
1015
+ ...localVarHeaderParameter,
1016
+ ...headersFromBaseOptions,
1017
+ ...options.headers,
1018
+ };
1019
+ return {
1020
+ url: toPathString(localVarUrlObj),
1021
+ options: localVarRequestOptions,
1022
+ };
1023
+ },
1024
+ };
1025
+ };
1026
+ /**
1027
+ * DataSourceFilesListingApi - functional programming interface
1028
+ * @export
1029
+ */
1030
+ export const DataSourceFilesListingApiFp = function (configuration) {
1031
+ const localVarAxiosParamCreator = DataSourceFilesListingApiAxiosParamCreator(configuration);
1032
+ return {
1033
+ /**
1034
+ * List all the files in the given data source.
1035
+ * @summary List datasource files
1036
+ * @param {string} dataSourceId
1037
+ * @param {*} [options] Override http request option.
1038
+ * @throws {RequiredError}
1039
+ */
1040
+ async listFiles(dataSourceId, options) {
1041
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listFiles(dataSourceId, options);
1042
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1043
+ },
1044
+ };
1045
+ };
1046
+ /**
1047
+ * DataSourceFilesListingApi - factory interface
1048
+ * @export
1049
+ */
1050
+ export const DataSourceFilesListingApiFactory = function (configuration, basePath, axios) {
1051
+ const localVarFp = DataSourceFilesListingApiFp(configuration);
1052
+ return {
1053
+ /**
1054
+ * List all the files in the given data source.
1055
+ * @summary List datasource files
1056
+ * @param {DataSourceFilesListingApiListFilesRequest} requestParameters Request parameters.
1057
+ * @param {*} [options] Override http request option.
1058
+ * @throws {RequiredError}
1059
+ */
1060
+ listFiles(requestParameters, options) {
1061
+ return localVarFp
1062
+ .listFiles(requestParameters.dataSourceId, options)
1063
+ .then((request) => request(axios, basePath));
1064
+ },
1065
+ };
1066
+ };
1067
+ /**
1068
+ * DataSourceFilesListingApi - object-oriented interface
1069
+ * @export
1070
+ * @class DataSourceFilesListingApi
1071
+ * @extends {BaseAPI}
1072
+ */
1073
+ export class DataSourceFilesListingApi extends BaseAPI {
772
1074
  /**
773
1075
  * List all the files in the given data source.
774
1076
  * @summary List datasource files
775
- * @param {DataSourceFilesImportApiListFilesRequest} requestParameters Request parameters.
1077
+ * @param {DataSourceFilesListingApiListFilesRequest} requestParameters Request parameters.
776
1078
  * @param {*} [options] Override http request option.
777
1079
  * @throws {RequiredError}
778
- * @memberof DataSourceFilesImportApi
1080
+ * @memberof DataSourceFilesListingApi
779
1081
  */
780
1082
  listFiles(requestParameters, options) {
781
- return DataSourceFilesImportApiFp(this.configuration)
1083
+ return DataSourceFilesListingApiFp(this.configuration)
782
1084
  .listFiles(requestParameters.dataSourceId, options)
783
1085
  .then((request) => request(this.axios, this.basePath));
784
1086
  }
@@ -821,6 +1123,47 @@ export const DataSourceStagingLocationApiAxiosParamCreator = function (configura
821
1123
  options: localVarRequestOptions,
822
1124
  };
823
1125
  },
1126
+ /**
1127
+ * Provides a location for uploading staging files.
1128
+ * @summary Upload a file to the staging area
1129
+ * @param {string} dataSourceId
1130
+ * @param {any} file The file to upload.
1131
+ * @param {*} [options] Override http request option.
1132
+ * @throws {RequiredError}
1133
+ */
1134
+ stagingUpload: async (dataSourceId, file, options = {}) => {
1135
+ // verify required parameter 'dataSourceId' is not null or undefined
1136
+ assertParamExists("stagingUpload", "dataSourceId", dataSourceId);
1137
+ // verify required parameter 'file' is not null or undefined
1138
+ assertParamExists("stagingUpload", "file", file);
1139
+ const localVarPath = `/api/v1/actions/dataSources/{dataSourceId}/staging/uploadFile`.replace(`{${"dataSourceId"}}`, encodeURIComponent(String(dataSourceId)));
1140
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1141
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1142
+ let baseOptions;
1143
+ if (configuration) {
1144
+ baseOptions = configuration.baseOptions;
1145
+ }
1146
+ const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
1147
+ const localVarHeaderParameter = {};
1148
+ const localVarQueryParameter = {};
1149
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1150
+ if (file !== undefined) {
1151
+ localVarFormParams.append("file", file);
1152
+ }
1153
+ localVarHeaderParameter["Content-Type"] = "multipart/form-data";
1154
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1155
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1156
+ localVarRequestOptions.headers = {
1157
+ ...localVarHeaderParameter,
1158
+ ...headersFromBaseOptions,
1159
+ ...options.headers,
1160
+ };
1161
+ localVarRequestOptions.data = localVarFormParams;
1162
+ return {
1163
+ url: toPathString(localVarUrlObj),
1164
+ options: localVarRequestOptions,
1165
+ };
1166
+ },
824
1167
  };
825
1168
  };
826
1169
  /**
@@ -841,6 +1184,18 @@ export const DataSourceStagingLocationApiFp = function (configuration) {
841
1184
  const localVarAxiosArgs = await localVarAxiosParamCreator.getStagingUploadLocation(dataSourceId, options);
842
1185
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
843
1186
  },
1187
+ /**
1188
+ * Provides a location for uploading staging files.
1189
+ * @summary Upload a file to the staging area
1190
+ * @param {string} dataSourceId
1191
+ * @param {any} file The file to upload.
1192
+ * @param {*} [options] Override http request option.
1193
+ * @throws {RequiredError}
1194
+ */
1195
+ async stagingUpload(dataSourceId, file, options) {
1196
+ const localVarAxiosArgs = await localVarAxiosParamCreator.stagingUpload(dataSourceId, file, options);
1197
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1198
+ },
844
1199
  };
845
1200
  };
846
1201
  /**
@@ -862,6 +1217,18 @@ export const DataSourceStagingLocationApiFactory = function (configuration, base
862
1217
  .getStagingUploadLocation(requestParameters.dataSourceId, options)
863
1218
  .then((request) => request(axios, basePath));
864
1219
  },
1220
+ /**
1221
+ * Provides a location for uploading staging files.
1222
+ * @summary Upload a file to the staging area
1223
+ * @param {DataSourceStagingLocationApiStagingUploadRequest} requestParameters Request parameters.
1224
+ * @param {*} [options] Override http request option.
1225
+ * @throws {RequiredError}
1226
+ */
1227
+ stagingUpload(requestParameters, options) {
1228
+ return localVarFp
1229
+ .stagingUpload(requestParameters.dataSourceId, requestParameters.file, options)
1230
+ .then((request) => request(axios, basePath));
1231
+ },
865
1232
  };
866
1233
  };
867
1234
  /**
@@ -884,5 +1251,18 @@ export class DataSourceStagingLocationApi extends BaseAPI {
884
1251
  .getStagingUploadLocation(requestParameters.dataSourceId, options)
885
1252
  .then((request) => request(this.axios, this.basePath));
886
1253
  }
1254
+ /**
1255
+ * Provides a location for uploading staging files.
1256
+ * @summary Upload a file to the staging area
1257
+ * @param {DataSourceStagingLocationApiStagingUploadRequest} requestParameters Request parameters.
1258
+ * @param {*} [options] Override http request option.
1259
+ * @throws {RequiredError}
1260
+ * @memberof DataSourceStagingLocationApi
1261
+ */
1262
+ stagingUpload(requestParameters, options) {
1263
+ return DataSourceStagingLocationApiFp(this.configuration)
1264
+ .stagingUpload(requestParameters.dataSourceId, requestParameters.file, options)
1265
+ .then((request) => request(this.axios, this.basePath));
1266
+ }
887
1267
  }
888
1268
  //# sourceMappingURL=api.js.map