@orangefox-recovery/foxinternalclient 5.2.4 → 5.2.6

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.
package/dist/api.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * Fox API
6
6
  * Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application\'s access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
7
7
  *
8
- * The version of the OpenAPI document: 5.2.4
8
+ * The version of the OpenAPI document: 5.2.6
9
9
  * Contact: admin@orangefox.tech
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.StatsApi = exports.StatsApiFactory = exports.StatsApiFp = exports.StatsApiAxiosParamCreator = exports.ReleaseApi = exports.ReleaseApiFactory = exports.ReleaseApiFp = exports.ReleaseApiAxiosParamCreator = exports.InternalApi = exports.InternalApiFactory = exports.InternalApiFp = exports.InternalApiAxiosParamCreator = exports.GitlabApi = exports.GitlabApiFactory = exports.GitlabApiFp = exports.GitlabApiAxiosParamCreator = exports.FoxFactoryApi = exports.FoxFactoryApiFactory = exports.FoxFactoryApiFp = exports.FoxFactoryApiAxiosParamCreator = exports.DeviceApi = exports.DeviceApiFactory = exports.DeviceApiFp = exports.DeviceApiAxiosParamCreator = exports.ReleasesSort = exports.ReleaseType = exports.FFStatusEnum = exports.BuildStatusEnum = void 0;
25
+ exports.StatsApi = exports.StatsApiFactory = exports.StatsApiFp = exports.StatsApiAxiosParamCreator = exports.ReleaseApi = exports.ReleaseApiFactory = exports.ReleaseApiFp = exports.ReleaseApiAxiosParamCreator = exports.PasteApi = exports.PasteApiFactory = exports.PasteApiFp = exports.PasteApiAxiosParamCreator = exports.InternalApi = exports.InternalApiFactory = exports.InternalApiFp = exports.InternalApiAxiosParamCreator = exports.GitlabApi = exports.GitlabApiFactory = exports.GitlabApiFp = exports.GitlabApiAxiosParamCreator = exports.FoxFactoryApi = exports.FoxFactoryApiFactory = exports.FoxFactoryApiFp = exports.FoxFactoryApiAxiosParamCreator = exports.DeviceApi = exports.DeviceApiFactory = exports.DeviceApiFp = exports.DeviceApiAxiosParamCreator = exports.ReleasesSort = exports.ReleaseType = exports.FFStatusEnum = exports.BuildStatusEnum = void 0;
26
26
  const axios_1 = require("axios");
27
27
  // Some imports not used depending on template conditions
28
28
  // @ts-ignore
@@ -38,6 +38,7 @@ exports.BuildStatusEnum = {
38
38
  Pending: 'pending',
39
39
  Running: 'running',
40
40
  Cancelling: 'cancelling',
41
+ Uploading: 'uploading',
41
42
  Success: 'success',
42
43
  Cancelled: 'cancelled',
43
44
  Failed: 'failed'
@@ -481,6 +482,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
481
482
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
482
483
  const localVarHeaderParameter = {};
483
484
  const localVarQueryParameter = {};
485
+ // authentication oauth2_password required
486
+ // oauth required
487
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
488
+ // authentication bearer_auth required
489
+ // http bearer authentication required
490
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
484
491
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
485
492
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
486
493
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -490,7 +497,7 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
490
497
  };
491
498
  }),
492
499
  /**
493
- * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
500
+ * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised. Also deletes any associated artifact files.
494
501
  * @summary Delete Task
495
502
  * @param {string} taskId
496
503
  * @param {*} [options] Override http request option.
@@ -510,6 +517,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
510
517
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
511
518
  const localVarHeaderParameter = {};
512
519
  const localVarQueryParameter = {};
520
+ // authentication oauth2_password required
521
+ // oauth required
522
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
523
+ // authentication bearer_auth required
524
+ // http bearer authentication required
525
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
513
526
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
514
527
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
515
528
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -519,7 +532,42 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
519
532
  };
520
533
  }),
521
534
  /**
522
- *
535
+ * Download the artifact file for a specific build task. This endpoint allows maintainers and foxfactory workers to download the artifact file associated with a build task. Parameters: task_id: The ID of the build task
536
+ * @summary Download Artifact
537
+ * @param {string} taskId
538
+ * @param {*} [options] Override http request option.
539
+ * @throws {RequiredError}
540
+ */
541
+ downloadArtifactFactoryTaskIdArtifactGet: (taskId_1, ...args_1) => __awaiter(this, [taskId_1, ...args_1], void 0, function* (taskId, options = {}) {
542
+ // verify required parameter 'taskId' is not null or undefined
543
+ (0, common_1.assertParamExists)('downloadArtifactFactoryTaskIdArtifactGet', 'taskId', taskId);
544
+ const localVarPath = `/factory/{task_id}/artifact`
545
+ .replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
546
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
547
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
548
+ let baseOptions;
549
+ if (configuration) {
550
+ baseOptions = configuration.baseOptions;
551
+ }
552
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
553
+ const localVarHeaderParameter = {};
554
+ const localVarQueryParameter = {};
555
+ // authentication oauth2_password required
556
+ // oauth required
557
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
558
+ // authentication bearer_auth required
559
+ // http bearer authentication required
560
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
561
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
562
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
563
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
564
+ return {
565
+ url: (0, common_1.toPathString)(localVarUrlObj),
566
+ options: localVarRequestOptions,
567
+ };
568
+ }),
569
+ /**
570
+ * Endpoint for clients to get the current status of the worker. If the last update was longer than the defined timeout, worker is considered offline.
523
571
  * @summary Factory Status
524
572
  * @param {*} [options] Override http request option.
525
573
  * @throws {RequiredError}
@@ -535,6 +583,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
535
583
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
536
584
  const localVarHeaderParameter = {};
537
585
  const localVarQueryParameter = {};
586
+ // authentication oauth2_password required
587
+ // oauth required
588
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
589
+ // authentication bearer_auth required
590
+ // http bearer authentication required
591
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
538
592
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
539
593
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
540
594
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -564,6 +618,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
564
618
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
565
619
  const localVarHeaderParameter = {};
566
620
  const localVarQueryParameter = {};
621
+ // authentication oauth2_password required
622
+ // oauth required
623
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
624
+ // authentication bearer_auth required
625
+ // http bearer authentication required
626
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
567
627
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
568
628
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
569
629
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -590,6 +650,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
590
650
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
591
651
  const localVarHeaderParameter = {};
592
652
  const localVarQueryParameter = {};
653
+ // authentication oauth2_password required
654
+ // oauth required
655
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
656
+ // authentication bearer_auth required
657
+ // http bearer authentication required
658
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
593
659
  if (deviceId !== undefined) {
594
660
  localVarQueryParameter['device_id'] = deviceId;
595
661
  }
@@ -621,6 +687,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
621
687
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
622
688
  const localVarHeaderParameter = {};
623
689
  const localVarQueryParameter = {};
690
+ // authentication oauth2_password required
691
+ // oauth required
692
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
693
+ // authentication bearer_auth required
694
+ // http bearer authentication required
695
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
624
696
  localVarHeaderParameter['Content-Type'] = 'application/json';
625
697
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
626
698
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -655,6 +727,12 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
655
727
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
656
728
  const localVarHeaderParameter = {};
657
729
  const localVarQueryParameter = {};
730
+ // authentication oauth2_password required
731
+ // oauth required
732
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
733
+ // authentication bearer_auth required
734
+ // http bearer authentication required
735
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
658
736
  localVarHeaderParameter['Content-Type'] = 'application/json';
659
737
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
660
738
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -665,6 +743,92 @@ const FoxFactoryApiAxiosParamCreator = function (configuration) {
665
743
  options: localVarRequestOptions,
666
744
  };
667
745
  }),
746
+ /**
747
+ * Endpoint for FoxFactory worker to update its status.
748
+ * @summary Update Worker Status
749
+ * @param {string} body
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ */
753
+ updateWorkerStatusFactoryUpdateStatusPost: (body_1, ...args_1) => __awaiter(this, [body_1, ...args_1], void 0, function* (body, options = {}) {
754
+ // verify required parameter 'body' is not null or undefined
755
+ (0, common_1.assertParamExists)('updateWorkerStatusFactoryUpdateStatusPost', 'body', body);
756
+ const localVarPath = `/factory/update_status`;
757
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
758
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
759
+ let baseOptions;
760
+ if (configuration) {
761
+ baseOptions = configuration.baseOptions;
762
+ }
763
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
764
+ const localVarHeaderParameter = {};
765
+ const localVarQueryParameter = {};
766
+ // authentication oauth2_password required
767
+ // oauth required
768
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
769
+ // authentication bearer_auth required
770
+ // http bearer authentication required
771
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
772
+ localVarHeaderParameter['Content-Type'] = 'application/json';
773
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
774
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
775
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
776
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
777
+ return {
778
+ url: (0, common_1.toPathString)(localVarUrlObj),
779
+ options: localVarRequestOptions,
780
+ };
781
+ }),
782
+ /**
783
+ * Upload an artifact zip file for a specific build task. This endpoint allows foxfactory workers to upload an artifact zip file, verifies its MD5 hash, and stores it in the appropriate directory. Parameters: task_id: The ID of the build task artifact: The artifact zip file to upload md5_hash: The expected MD5 hash of the artifact file
784
+ * @summary Upload Artifact
785
+ * @param {string} taskId
786
+ * @param {File} artifact
787
+ * @param {string} md5Hash
788
+ * @param {*} [options] Override http request option.
789
+ * @throws {RequiredError}
790
+ */
791
+ uploadArtifactFactoryTaskIdArtifactPost: (taskId_1, artifact_1, md5Hash_1, ...args_1) => __awaiter(this, [taskId_1, artifact_1, md5Hash_1, ...args_1], void 0, function* (taskId, artifact, md5Hash, options = {}) {
792
+ // verify required parameter 'taskId' is not null or undefined
793
+ (0, common_1.assertParamExists)('uploadArtifactFactoryTaskIdArtifactPost', 'taskId', taskId);
794
+ // verify required parameter 'artifact' is not null or undefined
795
+ (0, common_1.assertParamExists)('uploadArtifactFactoryTaskIdArtifactPost', 'artifact', artifact);
796
+ // verify required parameter 'md5Hash' is not null or undefined
797
+ (0, common_1.assertParamExists)('uploadArtifactFactoryTaskIdArtifactPost', 'md5Hash', md5Hash);
798
+ const localVarPath = `/factory/{task_id}/artifact`
799
+ .replace(`{${"task_id"}}`, encodeURIComponent(String(taskId)));
800
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
801
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
802
+ let baseOptions;
803
+ if (configuration) {
804
+ baseOptions = configuration.baseOptions;
805
+ }
806
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
807
+ const localVarHeaderParameter = {};
808
+ const localVarQueryParameter = {};
809
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
810
+ // authentication oauth2_password required
811
+ // oauth required
812
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
813
+ // authentication bearer_auth required
814
+ // http bearer authentication required
815
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
816
+ if (artifact !== undefined) {
817
+ localVarFormParams.append('artifact', artifact);
818
+ }
819
+ if (md5Hash !== undefined) {
820
+ localVarFormParams.append('md5_hash', md5Hash);
821
+ }
822
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
823
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
824
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
825
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
826
+ localVarRequestOptions.data = localVarFormParams;
827
+ return {
828
+ url: (0, common_1.toPathString)(localVarUrlObj),
829
+ options: localVarRequestOptions,
830
+ };
831
+ }),
668
832
  };
669
833
  };
670
834
  exports.FoxFactoryApiAxiosParamCreator = FoxFactoryApiAxiosParamCreator;
@@ -692,7 +856,7 @@ const FoxFactoryApiFp = function (configuration) {
692
856
  });
693
857
  },
694
858
  /**
695
- * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
859
+ * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised. Also deletes any associated artifact files.
696
860
  * @summary Delete Task
697
861
  * @param {string} taskId
698
862
  * @param {*} [options] Override http request option.
@@ -708,7 +872,23 @@ const FoxFactoryApiFp = function (configuration) {
708
872
  });
709
873
  },
710
874
  /**
711
- *
875
+ * Download the artifact file for a specific build task. This endpoint allows maintainers and foxfactory workers to download the artifact file associated with a build task. Parameters: task_id: The ID of the build task
876
+ * @summary Download Artifact
877
+ * @param {string} taskId
878
+ * @param {*} [options] Override http request option.
879
+ * @throws {RequiredError}
880
+ */
881
+ downloadArtifactFactoryTaskIdArtifactGet(taskId, options) {
882
+ return __awaiter(this, void 0, void 0, function* () {
883
+ var _a, _b, _c;
884
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadArtifactFactoryTaskIdArtifactGet(taskId, options);
885
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
886
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FoxFactoryApi.downloadArtifactFactoryTaskIdArtifactGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
887
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
888
+ });
889
+ },
890
+ /**
891
+ * Endpoint for clients to get the current status of the worker. If the last update was longer than the defined timeout, worker is considered offline.
712
892
  * @summary Factory Status
713
893
  * @param {*} [options] Override http request option.
714
894
  * @throws {RequiredError}
@@ -787,6 +967,40 @@ const FoxFactoryApiFp = function (configuration) {
787
967
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
788
968
  });
789
969
  },
970
+ /**
971
+ * Endpoint for FoxFactory worker to update its status.
972
+ * @summary Update Worker Status
973
+ * @param {string} body
974
+ * @param {*} [options] Override http request option.
975
+ * @throws {RequiredError}
976
+ */
977
+ updateWorkerStatusFactoryUpdateStatusPost(body, options) {
978
+ return __awaiter(this, void 0, void 0, function* () {
979
+ var _a, _b, _c;
980
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateWorkerStatusFactoryUpdateStatusPost(body, options);
981
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
982
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FoxFactoryApi.updateWorkerStatusFactoryUpdateStatusPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
983
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
984
+ });
985
+ },
986
+ /**
987
+ * Upload an artifact zip file for a specific build task. This endpoint allows foxfactory workers to upload an artifact zip file, verifies its MD5 hash, and stores it in the appropriate directory. Parameters: task_id: The ID of the build task artifact: The artifact zip file to upload md5_hash: The expected MD5 hash of the artifact file
988
+ * @summary Upload Artifact
989
+ * @param {string} taskId
990
+ * @param {File} artifact
991
+ * @param {string} md5Hash
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ uploadArtifactFactoryTaskIdArtifactPost(taskId, artifact, md5Hash, options) {
996
+ return __awaiter(this, void 0, void 0, function* () {
997
+ var _a, _b, _c;
998
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadArtifactFactoryTaskIdArtifactPost(taskId, artifact, md5Hash, options);
999
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1000
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['FoxFactoryApi.uploadArtifactFactoryTaskIdArtifactPost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1001
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1002
+ });
1003
+ },
790
1004
  };
791
1005
  };
792
1006
  exports.FoxFactoryApiFp = FoxFactoryApiFp;
@@ -808,7 +1022,7 @@ const FoxFactoryApiFactory = function (configuration, basePath, axios) {
808
1022
  return localVarFp.cancelTaskFactoryTaskIdCancelPost(taskId, options).then((request) => request(axios, basePath));
809
1023
  },
810
1024
  /**
811
- * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
1025
+ * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised. Also deletes any associated artifact files.
812
1026
  * @summary Delete Task
813
1027
  * @param {string} taskId
814
1028
  * @param {*} [options] Override http request option.
@@ -818,7 +1032,17 @@ const FoxFactoryApiFactory = function (configuration, basePath, axios) {
818
1032
  return localVarFp.deleteTaskFactoryTaskIdDelete(taskId, options).then((request) => request(axios, basePath));
819
1033
  },
820
1034
  /**
821
- *
1035
+ * Download the artifact file for a specific build task. This endpoint allows maintainers and foxfactory workers to download the artifact file associated with a build task. Parameters: task_id: The ID of the build task
1036
+ * @summary Download Artifact
1037
+ * @param {string} taskId
1038
+ * @param {*} [options] Override http request option.
1039
+ * @throws {RequiredError}
1040
+ */
1041
+ downloadArtifactFactoryTaskIdArtifactGet(taskId, options) {
1042
+ return localVarFp.downloadArtifactFactoryTaskIdArtifactGet(taskId, options).then((request) => request(axios, basePath));
1043
+ },
1044
+ /**
1045
+ * Endpoint for clients to get the current status of the worker. If the last update was longer than the defined timeout, worker is considered offline.
822
1046
  * @summary Factory Status
823
1047
  * @param {*} [options] Override http request option.
824
1048
  * @throws {RequiredError}
@@ -867,6 +1091,28 @@ const FoxFactoryApiFactory = function (configuration, basePath, axios) {
867
1091
  updateTaskFactoryTaskIdPatch(taskId, taskUpdateBody, options) {
868
1092
  return localVarFp.updateTaskFactoryTaskIdPatch(taskId, taskUpdateBody, options).then((request) => request(axios, basePath));
869
1093
  },
1094
+ /**
1095
+ * Endpoint for FoxFactory worker to update its status.
1096
+ * @summary Update Worker Status
1097
+ * @param {string} body
1098
+ * @param {*} [options] Override http request option.
1099
+ * @throws {RequiredError}
1100
+ */
1101
+ updateWorkerStatusFactoryUpdateStatusPost(body, options) {
1102
+ return localVarFp.updateWorkerStatusFactoryUpdateStatusPost(body, options).then((request) => request(axios, basePath));
1103
+ },
1104
+ /**
1105
+ * Upload an artifact zip file for a specific build task. This endpoint allows foxfactory workers to upload an artifact zip file, verifies its MD5 hash, and stores it in the appropriate directory. Parameters: task_id: The ID of the build task artifact: The artifact zip file to upload md5_hash: The expected MD5 hash of the artifact file
1106
+ * @summary Upload Artifact
1107
+ * @param {string} taskId
1108
+ * @param {File} artifact
1109
+ * @param {string} md5Hash
1110
+ * @param {*} [options] Override http request option.
1111
+ * @throws {RequiredError}
1112
+ */
1113
+ uploadArtifactFactoryTaskIdArtifactPost(taskId, artifact, md5Hash, options) {
1114
+ return localVarFp.uploadArtifactFactoryTaskIdArtifactPost(taskId, artifact, md5Hash, options).then((request) => request(axios, basePath));
1115
+ },
870
1116
  };
871
1117
  };
872
1118
  exports.FoxFactoryApiFactory = FoxFactoryApiFactory;
@@ -889,7 +1135,7 @@ class FoxFactoryApi extends base_1.BaseAPI {
889
1135
  return (0, exports.FoxFactoryApiFp)(this.configuration).cancelTaskFactoryTaskIdCancelPost(taskId, options).then((request) => request(this.axios, this.basePath));
890
1136
  }
891
1137
  /**
892
- * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
1138
+ * Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised. Also deletes any associated artifact files.
893
1139
  * @summary Delete Task
894
1140
  * @param {string} taskId
895
1141
  * @param {*} [options] Override http request option.
@@ -900,7 +1146,18 @@ class FoxFactoryApi extends base_1.BaseAPI {
900
1146
  return (0, exports.FoxFactoryApiFp)(this.configuration).deleteTaskFactoryTaskIdDelete(taskId, options).then((request) => request(this.axios, this.basePath));
901
1147
  }
902
1148
  /**
903
- *
1149
+ * Download the artifact file for a specific build task. This endpoint allows maintainers and foxfactory workers to download the artifact file associated with a build task. Parameters: task_id: The ID of the build task
1150
+ * @summary Download Artifact
1151
+ * @param {string} taskId
1152
+ * @param {*} [options] Override http request option.
1153
+ * @throws {RequiredError}
1154
+ * @memberof FoxFactoryApi
1155
+ */
1156
+ downloadArtifactFactoryTaskIdArtifactGet(taskId, options) {
1157
+ return (0, exports.FoxFactoryApiFp)(this.configuration).downloadArtifactFactoryTaskIdArtifactGet(taskId, options).then((request) => request(this.axios, this.basePath));
1158
+ }
1159
+ /**
1160
+ * Endpoint for clients to get the current status of the worker. If the last update was longer than the defined timeout, worker is considered offline.
904
1161
  * @summary Factory Status
905
1162
  * @param {*} [options] Override http request option.
906
1163
  * @throws {RequiredError}
@@ -954,6 +1211,30 @@ class FoxFactoryApi extends base_1.BaseAPI {
954
1211
  updateTaskFactoryTaskIdPatch(taskId, taskUpdateBody, options) {
955
1212
  return (0, exports.FoxFactoryApiFp)(this.configuration).updateTaskFactoryTaskIdPatch(taskId, taskUpdateBody, options).then((request) => request(this.axios, this.basePath));
956
1213
  }
1214
+ /**
1215
+ * Endpoint for FoxFactory worker to update its status.
1216
+ * @summary Update Worker Status
1217
+ * @param {string} body
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ * @memberof FoxFactoryApi
1221
+ */
1222
+ updateWorkerStatusFactoryUpdateStatusPost(body, options) {
1223
+ return (0, exports.FoxFactoryApiFp)(this.configuration).updateWorkerStatusFactoryUpdateStatusPost(body, options).then((request) => request(this.axios, this.basePath));
1224
+ }
1225
+ /**
1226
+ * Upload an artifact zip file for a specific build task. This endpoint allows foxfactory workers to upload an artifact zip file, verifies its MD5 hash, and stores it in the appropriate directory. Parameters: task_id: The ID of the build task artifact: The artifact zip file to upload md5_hash: The expected MD5 hash of the artifact file
1227
+ * @summary Upload Artifact
1228
+ * @param {string} taskId
1229
+ * @param {File} artifact
1230
+ * @param {string} md5Hash
1231
+ * @param {*} [options] Override http request option.
1232
+ * @throws {RequiredError}
1233
+ * @memberof FoxFactoryApi
1234
+ */
1235
+ uploadArtifactFactoryTaskIdArtifactPost(taskId, artifact, md5Hash, options) {
1236
+ return (0, exports.FoxFactoryApiFp)(this.configuration).uploadArtifactFactoryTaskIdArtifactPost(taskId, artifact, md5Hash, options).then((request) => request(this.axios, this.basePath));
1237
+ }
957
1238
  }
958
1239
  exports.FoxFactoryApi = FoxFactoryApi;
959
1240
  /**
@@ -1140,6 +1421,41 @@ const InternalApiAxiosParamCreator = function (configuration) {
1140
1421
  options: localVarRequestOptions,
1141
1422
  };
1142
1423
  }),
1424
+ /**
1425
+ * Delete a paste by ID. Requires admin permissions.
1426
+ * @summary Delete Paste
1427
+ * @param {string} pasteId
1428
+ * @param {*} [options] Override http request option.
1429
+ * @throws {RequiredError}
1430
+ */
1431
+ deletePasteInternalPastePasteIdDelete: (pasteId_1, ...args_1) => __awaiter(this, [pasteId_1, ...args_1], void 0, function* (pasteId, options = {}) {
1432
+ // verify required parameter 'pasteId' is not null or undefined
1433
+ (0, common_1.assertParamExists)('deletePasteInternalPastePasteIdDelete', 'pasteId', pasteId);
1434
+ const localVarPath = `/internal/paste/{paste_id}`
1435
+ .replace(`{${"paste_id"}}`, encodeURIComponent(String(pasteId)));
1436
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1437
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1438
+ let baseOptions;
1439
+ if (configuration) {
1440
+ baseOptions = configuration.baseOptions;
1441
+ }
1442
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1443
+ const localVarHeaderParameter = {};
1444
+ const localVarQueryParameter = {};
1445
+ // authentication oauth2_password required
1446
+ // oauth required
1447
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
1448
+ // authentication bearer_auth required
1449
+ // http bearer authentication required
1450
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1451
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1452
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1453
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1454
+ return {
1455
+ url: (0, common_1.toPathString)(localVarUrlObj),
1456
+ options: localVarRequestOptions,
1457
+ };
1458
+ }),
1143
1459
  /**
1144
1460
  *
1145
1461
  * @summary Delete User
@@ -1729,6 +2045,46 @@ const InternalApiAxiosParamCreator = function (configuration) {
1729
2045
  options: localVarRequestOptions,
1730
2046
  };
1731
2047
  }),
2048
+ /**
2049
+ * Update a paste by ID. Requires admin permissions.
2050
+ * @summary Update Paste
2051
+ * @param {string} pasteId
2052
+ * @param {PasteInput} pasteInput
2053
+ * @param {*} [options] Override http request option.
2054
+ * @throws {RequiredError}
2055
+ */
2056
+ updatePasteInternalPastePasteIdPut: (pasteId_1, pasteInput_1, ...args_1) => __awaiter(this, [pasteId_1, pasteInput_1, ...args_1], void 0, function* (pasteId, pasteInput, options = {}) {
2057
+ // verify required parameter 'pasteId' is not null or undefined
2058
+ (0, common_1.assertParamExists)('updatePasteInternalPastePasteIdPut', 'pasteId', pasteId);
2059
+ // verify required parameter 'pasteInput' is not null or undefined
2060
+ (0, common_1.assertParamExists)('updatePasteInternalPastePasteIdPut', 'pasteInput', pasteInput);
2061
+ const localVarPath = `/internal/paste/{paste_id}`
2062
+ .replace(`{${"paste_id"}}`, encodeURIComponent(String(pasteId)));
2063
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2064
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2065
+ let baseOptions;
2066
+ if (configuration) {
2067
+ baseOptions = configuration.baseOptions;
2068
+ }
2069
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
2070
+ const localVarHeaderParameter = {};
2071
+ const localVarQueryParameter = {};
2072
+ // authentication oauth2_password required
2073
+ // oauth required
2074
+ yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2_password", [], configuration);
2075
+ // authentication bearer_auth required
2076
+ // http bearer authentication required
2077
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
2078
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2079
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2080
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2081
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2082
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(pasteInput, localVarRequestOptions, configuration);
2083
+ return {
2084
+ url: (0, common_1.toPathString)(localVarUrlObj),
2085
+ options: localVarRequestOptions,
2086
+ };
2087
+ }),
1732
2088
  /**
1733
2089
  *
1734
2090
  * @summary Update User
@@ -1811,6 +2167,22 @@ const InternalApiFp = function (configuration) {
1811
2167
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1812
2168
  });
1813
2169
  },
2170
+ /**
2171
+ * Delete a paste by ID. Requires admin permissions.
2172
+ * @summary Delete Paste
2173
+ * @param {string} pasteId
2174
+ * @param {*} [options] Override http request option.
2175
+ * @throws {RequiredError}
2176
+ */
2177
+ deletePasteInternalPastePasteIdDelete(pasteId, options) {
2178
+ return __awaiter(this, void 0, void 0, function* () {
2179
+ var _a, _b, _c;
2180
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deletePasteInternalPastePasteIdDelete(pasteId, options);
2181
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2182
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InternalApi.deletePasteInternalPastePasteIdDelete']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2183
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2184
+ });
2185
+ },
1814
2186
  /**
1815
2187
  *
1816
2188
  * @summary Delete User
@@ -2054,6 +2426,23 @@ const InternalApiFp = function (configuration) {
2054
2426
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2055
2427
  });
2056
2428
  },
2429
+ /**
2430
+ * Update a paste by ID. Requires admin permissions.
2431
+ * @summary Update Paste
2432
+ * @param {string} pasteId
2433
+ * @param {PasteInput} pasteInput
2434
+ * @param {*} [options] Override http request option.
2435
+ * @throws {RequiredError}
2436
+ */
2437
+ updatePasteInternalPastePasteIdPut(pasteId, pasteInput, options) {
2438
+ return __awaiter(this, void 0, void 0, function* () {
2439
+ var _a, _b, _c;
2440
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updatePasteInternalPastePasteIdPut(pasteId, pasteInput, options);
2441
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
2442
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['InternalApi.updatePasteInternalPastePasteIdPut']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
2443
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2444
+ });
2445
+ },
2057
2446
  /**
2058
2447
  *
2059
2448
  * @summary Update User
@@ -2101,6 +2490,16 @@ const InternalApiFactory = function (configuration, basePath, axios) {
2101
2490
  delReleaseInternalReleasesReleaseIdDelete(releaseId, options) {
2102
2491
  return localVarFp.delReleaseInternalReleasesReleaseIdDelete(releaseId, options).then((request) => request(axios, basePath));
2103
2492
  },
2493
+ /**
2494
+ * Delete a paste by ID. Requires admin permissions.
2495
+ * @summary Delete Paste
2496
+ * @param {string} pasteId
2497
+ * @param {*} [options] Override http request option.
2498
+ * @throws {RequiredError}
2499
+ */
2500
+ deletePasteInternalPastePasteIdDelete(pasteId, options) {
2501
+ return localVarFp.deletePasteInternalPastePasteIdDelete(pasteId, options).then((request) => request(axios, basePath));
2502
+ },
2104
2503
  /**
2105
2504
  *
2106
2505
  * @summary Delete User
@@ -2260,6 +2659,17 @@ const InternalApiFactory = function (configuration, basePath, axios) {
2260
2659
  updateDeviceInternalDevicesDeviceIdPut(deviceId, deviceUpdateBody, options) {
2261
2660
  return localVarFp.updateDeviceInternalDevicesDeviceIdPut(deviceId, deviceUpdateBody, options).then((request) => request(axios, basePath));
2262
2661
  },
2662
+ /**
2663
+ * Update a paste by ID. Requires admin permissions.
2664
+ * @summary Update Paste
2665
+ * @param {string} pasteId
2666
+ * @param {PasteInput} pasteInput
2667
+ * @param {*} [options] Override http request option.
2668
+ * @throws {RequiredError}
2669
+ */
2670
+ updatePasteInternalPastePasteIdPut(pasteId, pasteInput, options) {
2671
+ return localVarFp.updatePasteInternalPastePasteIdPut(pasteId, pasteInput, options).then((request) => request(axios, basePath));
2672
+ },
2263
2673
  /**
2264
2674
  *
2265
2675
  * @summary Update User
@@ -2303,6 +2713,17 @@ class InternalApi extends base_1.BaseAPI {
2303
2713
  delReleaseInternalReleasesReleaseIdDelete(releaseId, options) {
2304
2714
  return (0, exports.InternalApiFp)(this.configuration).delReleaseInternalReleasesReleaseIdDelete(releaseId, options).then((request) => request(this.axios, this.basePath));
2305
2715
  }
2716
+ /**
2717
+ * Delete a paste by ID. Requires admin permissions.
2718
+ * @summary Delete Paste
2719
+ * @param {string} pasteId
2720
+ * @param {*} [options] Override http request option.
2721
+ * @throws {RequiredError}
2722
+ * @memberof InternalApi
2723
+ */
2724
+ deletePasteInternalPastePasteIdDelete(pasteId, options) {
2725
+ return (0, exports.InternalApiFp)(this.configuration).deletePasteInternalPastePasteIdDelete(pasteId, options).then((request) => request(this.axios, this.basePath));
2726
+ }
2306
2727
  /**
2307
2728
  *
2308
2729
  * @summary Delete User
@@ -2476,6 +2897,18 @@ class InternalApi extends base_1.BaseAPI {
2476
2897
  updateDeviceInternalDevicesDeviceIdPut(deviceId, deviceUpdateBody, options) {
2477
2898
  return (0, exports.InternalApiFp)(this.configuration).updateDeviceInternalDevicesDeviceIdPut(deviceId, deviceUpdateBody, options).then((request) => request(this.axios, this.basePath));
2478
2899
  }
2900
+ /**
2901
+ * Update a paste by ID. Requires admin permissions.
2902
+ * @summary Update Paste
2903
+ * @param {string} pasteId
2904
+ * @param {PasteInput} pasteInput
2905
+ * @param {*} [options] Override http request option.
2906
+ * @throws {RequiredError}
2907
+ * @memberof InternalApi
2908
+ */
2909
+ updatePasteInternalPastePasteIdPut(pasteId, pasteInput, options) {
2910
+ return (0, exports.InternalApiFp)(this.configuration).updatePasteInternalPastePasteIdPut(pasteId, pasteInput, options).then((request) => request(this.axios, this.basePath));
2911
+ }
2479
2912
  /**
2480
2913
  *
2481
2914
  * @summary Update User
@@ -2490,6 +2923,177 @@ class InternalApi extends base_1.BaseAPI {
2490
2923
  }
2491
2924
  }
2492
2925
  exports.InternalApi = InternalApi;
2926
+ /**
2927
+ * PasteApi - axios parameter creator
2928
+ * @export
2929
+ */
2930
+ const PasteApiAxiosParamCreator = function (configuration) {
2931
+ return {
2932
+ /**
2933
+ * Create a new paste.
2934
+ * @summary Create Paste
2935
+ * @param {PasteInput} pasteInput
2936
+ * @param {*} [options] Override http request option.
2937
+ * @throws {RequiredError}
2938
+ */
2939
+ createPastePastePost: (pasteInput_1, ...args_1) => __awaiter(this, [pasteInput_1, ...args_1], void 0, function* (pasteInput, options = {}) {
2940
+ // verify required parameter 'pasteInput' is not null or undefined
2941
+ (0, common_1.assertParamExists)('createPastePastePost', 'pasteInput', pasteInput);
2942
+ const localVarPath = `/paste/`;
2943
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2944
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2945
+ let baseOptions;
2946
+ if (configuration) {
2947
+ baseOptions = configuration.baseOptions;
2948
+ }
2949
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
2950
+ const localVarHeaderParameter = {};
2951
+ const localVarQueryParameter = {};
2952
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2953
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2954
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2955
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2956
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(pasteInput, localVarRequestOptions, configuration);
2957
+ return {
2958
+ url: (0, common_1.toPathString)(localVarUrlObj),
2959
+ options: localVarRequestOptions,
2960
+ };
2961
+ }),
2962
+ /**
2963
+ * Get a paste by ID.
2964
+ * @summary Get Paste
2965
+ * @param {string} pasteId
2966
+ * @param {*} [options] Override http request option.
2967
+ * @throws {RequiredError}
2968
+ */
2969
+ getPastePastePasteIdGet: (pasteId_1, ...args_1) => __awaiter(this, [pasteId_1, ...args_1], void 0, function* (pasteId, options = {}) {
2970
+ // verify required parameter 'pasteId' is not null or undefined
2971
+ (0, common_1.assertParamExists)('getPastePastePasteIdGet', 'pasteId', pasteId);
2972
+ const localVarPath = `/paste/{paste_id}`
2973
+ .replace(`{${"paste_id"}}`, encodeURIComponent(String(pasteId)));
2974
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2975
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2976
+ let baseOptions;
2977
+ if (configuration) {
2978
+ baseOptions = configuration.baseOptions;
2979
+ }
2980
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2981
+ const localVarHeaderParameter = {};
2982
+ const localVarQueryParameter = {};
2983
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2984
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2985
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2986
+ return {
2987
+ url: (0, common_1.toPathString)(localVarUrlObj),
2988
+ options: localVarRequestOptions,
2989
+ };
2990
+ }),
2991
+ };
2992
+ };
2993
+ exports.PasteApiAxiosParamCreator = PasteApiAxiosParamCreator;
2994
+ /**
2995
+ * PasteApi - functional programming interface
2996
+ * @export
2997
+ */
2998
+ const PasteApiFp = function (configuration) {
2999
+ const localVarAxiosParamCreator = (0, exports.PasteApiAxiosParamCreator)(configuration);
3000
+ return {
3001
+ /**
3002
+ * Create a new paste.
3003
+ * @summary Create Paste
3004
+ * @param {PasteInput} pasteInput
3005
+ * @param {*} [options] Override http request option.
3006
+ * @throws {RequiredError}
3007
+ */
3008
+ createPastePastePost(pasteInput, options) {
3009
+ return __awaiter(this, void 0, void 0, function* () {
3010
+ var _a, _b, _c;
3011
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createPastePastePost(pasteInput, options);
3012
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3013
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PasteApi.createPastePastePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3014
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3015
+ });
3016
+ },
3017
+ /**
3018
+ * Get a paste by ID.
3019
+ * @summary Get Paste
3020
+ * @param {string} pasteId
3021
+ * @param {*} [options] Override http request option.
3022
+ * @throws {RequiredError}
3023
+ */
3024
+ getPastePastePasteIdGet(pasteId, options) {
3025
+ return __awaiter(this, void 0, void 0, function* () {
3026
+ var _a, _b, _c;
3027
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPastePastePasteIdGet(pasteId, options);
3028
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3029
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['PasteApi.getPastePastePasteIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3030
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3031
+ });
3032
+ },
3033
+ };
3034
+ };
3035
+ exports.PasteApiFp = PasteApiFp;
3036
+ /**
3037
+ * PasteApi - factory interface
3038
+ * @export
3039
+ */
3040
+ const PasteApiFactory = function (configuration, basePath, axios) {
3041
+ const localVarFp = (0, exports.PasteApiFp)(configuration);
3042
+ return {
3043
+ /**
3044
+ * Create a new paste.
3045
+ * @summary Create Paste
3046
+ * @param {PasteInput} pasteInput
3047
+ * @param {*} [options] Override http request option.
3048
+ * @throws {RequiredError}
3049
+ */
3050
+ createPastePastePost(pasteInput, options) {
3051
+ return localVarFp.createPastePastePost(pasteInput, options).then((request) => request(axios, basePath));
3052
+ },
3053
+ /**
3054
+ * Get a paste by ID.
3055
+ * @summary Get Paste
3056
+ * @param {string} pasteId
3057
+ * @param {*} [options] Override http request option.
3058
+ * @throws {RequiredError}
3059
+ */
3060
+ getPastePastePasteIdGet(pasteId, options) {
3061
+ return localVarFp.getPastePastePasteIdGet(pasteId, options).then((request) => request(axios, basePath));
3062
+ },
3063
+ };
3064
+ };
3065
+ exports.PasteApiFactory = PasteApiFactory;
3066
+ /**
3067
+ * PasteApi - object-oriented interface
3068
+ * @export
3069
+ * @class PasteApi
3070
+ * @extends {BaseAPI}
3071
+ */
3072
+ class PasteApi extends base_1.BaseAPI {
3073
+ /**
3074
+ * Create a new paste.
3075
+ * @summary Create Paste
3076
+ * @param {PasteInput} pasteInput
3077
+ * @param {*} [options] Override http request option.
3078
+ * @throws {RequiredError}
3079
+ * @memberof PasteApi
3080
+ */
3081
+ createPastePastePost(pasteInput, options) {
3082
+ return (0, exports.PasteApiFp)(this.configuration).createPastePastePost(pasteInput, options).then((request) => request(this.axios, this.basePath));
3083
+ }
3084
+ /**
3085
+ * Get a paste by ID.
3086
+ * @summary Get Paste
3087
+ * @param {string} pasteId
3088
+ * @param {*} [options] Override http request option.
3089
+ * @throws {RequiredError}
3090
+ * @memberof PasteApi
3091
+ */
3092
+ getPastePastePasteIdGet(pasteId, options) {
3093
+ return (0, exports.PasteApiFp)(this.configuration).getPastePastePasteIdGet(pasteId, options).then((request) => request(this.axios, this.basePath));
3094
+ }
3095
+ }
3096
+ exports.PasteApi = PasteApi;
2493
3097
  /**
2494
3098
  * ReleaseApi - axios parameter creator
2495
3099
  * @export