@orangefox-recovery/foxinternalclient 5.2.6 → 5.2.7
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/.openapi-generator/FILES +58 -60
- package/README.md +3 -122
- package/dist/apis/DeviceApi.d.ts +158 -0
- package/dist/apis/DeviceApi.js +188 -0
- package/dist/apis/FoxFactoryApi.d.ts +298 -0
- package/dist/apis/FoxFactoryApi.js +507 -0
- package/dist/apis/GitlabApi.d.ts +51 -0
- package/dist/apis/GitlabApi.js +71 -0
- package/dist/apis/InternalApi.d.ts +549 -0
- package/dist/apis/InternalApi.js +957 -0
- package/dist/apis/PasteApi.d.ts +80 -0
- package/dist/apis/PasteApi.js +95 -0
- package/dist/apis/ReleaseApi.d.ts +188 -0
- package/dist/apis/ReleaseApi.js +226 -0
- package/dist/apis/StatsApi.d.ts +49 -0
- package/dist/apis/StatsApi.js +60 -0
- package/dist/apis/index.d.ts +7 -0
- package/dist/apis/index.js +25 -0
- package/dist/esm/apis/DeviceApi.d.ts +158 -0
- package/dist/esm/apis/DeviceApi.js +184 -0
- package/dist/esm/apis/FoxFactoryApi.d.ts +298 -0
- package/dist/esm/apis/FoxFactoryApi.js +503 -0
- package/dist/esm/apis/GitlabApi.d.ts +51 -0
- package/dist/esm/apis/GitlabApi.js +67 -0
- package/dist/esm/apis/InternalApi.d.ts +549 -0
- package/dist/esm/apis/InternalApi.js +953 -0
- package/dist/esm/apis/PasteApi.d.ts +80 -0
- package/dist/esm/apis/PasteApi.js +91 -0
- package/dist/esm/apis/ReleaseApi.d.ts +188 -0
- package/dist/esm/apis/ReleaseApi.js +222 -0
- package/dist/esm/apis/StatsApi.d.ts +49 -0
- package/dist/esm/apis/StatsApi.js +56 -0
- package/dist/esm/apis/index.d.ts +7 -0
- package/dist/esm/apis/index.js +9 -0
- package/dist/esm/index.d.ts +3 -13
- package/dist/esm/index.js +3 -13
- package/dist/esm/models/BodyChangePasswordProfileChangePasswordPost.d.ts +38 -0
- package/dist/esm/models/BodyChangePasswordProfileChangePasswordPost.js +47 -0
- package/dist/esm/models/BuildStatusEnum.d.ts +30 -0
- package/dist/esm/models/BuildStatusEnum.js +48 -0
- package/dist/esm/models/BuildTaskResponse.d.ts +103 -0
- package/dist/esm/models/BuildTaskResponse.js +78 -0
- package/dist/esm/models/BuildTaskShortResponse.d.ts +89 -0
- package/dist/esm/models/BuildTaskShortResponse.js +74 -0
- package/dist/esm/models/DeviceInternalResponse.d.ts +114 -0
- package/dist/esm/models/DeviceInternalResponse.js +91 -0
- package/dist/esm/models/DeviceResponse.d.ts +101 -0
- package/dist/esm/models/DeviceResponse.js +82 -0
- package/dist/esm/models/DeviceStatsResponse.d.ts +48 -0
- package/dist/esm/models/DeviceStatsResponse.js +51 -0
- package/dist/esm/models/DeviceUpdateBody.d.ts +62 -0
- package/dist/esm/models/DeviceUpdateBody.js +51 -0
- package/dist/esm/models/FFStatusEnum.d.ts +26 -0
- package/dist/esm/models/FFStatusEnum.js +44 -0
- package/dist/esm/models/FFStatusResponse.d.ts +33 -0
- package/dist/esm/models/FFStatusResponse.js +44 -0
- package/dist/esm/models/GlobalStatsAggregationModel.d.ts +52 -0
- package/dist/esm/models/GlobalStatsAggregationModel.js +55 -0
- package/dist/esm/models/HTTPValidationError.d.ts +33 -0
- package/dist/esm/models/HTTPValidationError.js +42 -0
- package/dist/esm/models/ListResponseBuildTaskShortResponse.d.ts +39 -0
- package/dist/esm/models/ListResponseBuildTaskShortResponse.js +47 -0
- package/dist/esm/models/ListResponseReleaseResponse.d.ts +39 -0
- package/dist/esm/models/ListResponseReleaseResponse.js +47 -0
- package/dist/esm/models/ListResponseShortDeviceResponse.d.ts +39 -0
- package/dist/esm/models/ListResponseShortDeviceResponse.js +47 -0
- package/dist/esm/models/ListResponseShortReleaseResponse.d.ts +39 -0
- package/dist/esm/models/ListResponseShortReleaseResponse.js +47 -0
- package/dist/esm/models/ListResponseStr.d.ts +38 -0
- package/dist/esm/models/ListResponseStr.js +46 -0
- package/dist/esm/models/ListResponseUserShortResponse.d.ts +39 -0
- package/dist/esm/models/ListResponseUserShortResponse.js +47 -0
- package/dist/esm/models/LogListResponse.d.ts +51 -0
- package/dist/esm/models/LogListResponse.js +56 -0
- package/dist/esm/models/LogResponse.d.ts +83 -0
- package/dist/esm/models/LogResponse.js +66 -0
- package/dist/esm/models/MaintainerShortModel.d.ts +44 -0
- package/dist/esm/models/MaintainerShortModel.js +51 -0
- package/dist/esm/models/NewBuildTaskBody.d.ts +57 -0
- package/dist/esm/models/NewBuildTaskBody.js +52 -0
- package/dist/esm/models/NewDeviceBody.d.ts +50 -0
- package/dist/esm/models/NewDeviceBody.js +55 -0
- package/dist/esm/models/PasteInput.d.ts +50 -0
- package/dist/esm/models/PasteInput.js +51 -0
- package/dist/esm/models/PasteOutput.d.ts +50 -0
- package/dist/esm/models/PasteOutput.js +51 -0
- package/dist/esm/models/RecoveryImgResponse.d.ts +38 -0
- package/dist/esm/models/RecoveryImgResponse.js +47 -0
- package/dist/esm/models/ReleaseGroupsResponse.d.ts +35 -0
- package/dist/esm/models/ReleaseGroupsResponse.js +43 -0
- package/dist/esm/models/ReleaseInternalResponse.d.ts +162 -0
- package/dist/esm/models/ReleaseInternalResponse.js +119 -0
- package/dist/esm/models/ReleaseInternalResponsePropValue.d.ts +26 -0
- package/dist/esm/models/ReleaseInternalResponsePropValue.js +31 -0
- package/dist/esm/models/ReleaseResponse.d.ts +139 -0
- package/dist/esm/models/ReleaseResponse.js +107 -0
- package/dist/esm/models/ReleaseStatsResponse.d.ts +48 -0
- package/dist/esm/models/ReleaseStatsResponse.js +51 -0
- package/dist/esm/models/ReleaseType.d.ts +26 -0
- package/dist/esm/models/ReleaseType.js +44 -0
- package/dist/esm/models/ReleaseUpdateBody.d.ts +50 -0
- package/dist/esm/models/ReleaseUpdateBody.js +47 -0
- package/dist/esm/models/ReleasesSort.d.ts +25 -0
- package/dist/esm/models/ReleasesSort.js +43 -0
- package/dist/esm/models/ResponseGetReleases.d.ts +41 -0
- package/dist/esm/models/ResponseGetReleases.js +46 -0
- package/dist/esm/models/ShortDeviceResponse.d.ts +82 -0
- package/dist/esm/models/ShortDeviceResponse.js +73 -0
- package/dist/esm/models/ShortReleaseResponse.d.ts +100 -0
- package/dist/esm/models/ShortReleaseResponse.js +84 -0
- package/dist/esm/models/TaskUpdateBody.d.ts +39 -0
- package/dist/esm/models/TaskUpdateBody.js +44 -0
- package/dist/esm/models/TokenResponse.d.ts +38 -0
- package/dist/esm/models/TokenResponse.js +45 -0
- package/dist/esm/models/UserGitlab.d.ts +32 -0
- package/dist/esm/models/UserGitlab.js +43 -0
- package/dist/esm/models/UserInternalResponse.d.ts +90 -0
- package/dist/esm/models/UserInternalResponse.js +75 -0
- package/dist/esm/models/UserMail.d.ts +32 -0
- package/dist/esm/models/UserMail.js +43 -0
- package/dist/esm/models/UserShortResponse.d.ts +50 -0
- package/dist/esm/models/UserShortResponse.js +55 -0
- package/dist/esm/models/UserTelegram.d.ts +32 -0
- package/dist/esm/models/UserTelegram.js +43 -0
- package/dist/esm/models/UserUpdateBody.d.ts +56 -0
- package/dist/esm/models/UserUpdateBody.js +49 -0
- package/dist/esm/models/ValidationError.d.ts +45 -0
- package/dist/esm/models/ValidationError.js +52 -0
- package/dist/esm/models/ValidationErrorLocInner.d.ts +26 -0
- package/{index.ts → dist/esm/models/ValidationErrorLocInner.js} +20 -7
- package/dist/esm/models/index.d.ts +47 -0
- package/dist/esm/models/index.js +49 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -13
- package/dist/index.js +5 -15
- package/dist/models/BodyChangePasswordProfileChangePasswordPost.d.ts +38 -0
- package/dist/models/BodyChangePasswordProfileChangePasswordPost.js +54 -0
- package/dist/models/BuildStatusEnum.d.ts +30 -0
- package/dist/models/BuildStatusEnum.js +56 -0
- package/dist/models/BuildTaskResponse.d.ts +103 -0
- package/dist/models/BuildTaskResponse.js +85 -0
- package/dist/models/BuildTaskShortResponse.d.ts +89 -0
- package/dist/models/BuildTaskShortResponse.js +81 -0
- package/dist/models/DeviceInternalResponse.d.ts +114 -0
- package/dist/models/DeviceInternalResponse.js +98 -0
- package/dist/models/DeviceResponse.d.ts +101 -0
- package/dist/models/DeviceResponse.js +89 -0
- package/dist/models/DeviceStatsResponse.d.ts +48 -0
- package/dist/models/DeviceStatsResponse.js +58 -0
- package/dist/models/DeviceUpdateBody.d.ts +62 -0
- package/dist/models/DeviceUpdateBody.js +58 -0
- package/dist/models/FFStatusEnum.d.ts +26 -0
- package/dist/models/FFStatusEnum.js +52 -0
- package/dist/models/FFStatusResponse.d.ts +33 -0
- package/dist/models/FFStatusResponse.js +51 -0
- package/dist/models/GlobalStatsAggregationModel.d.ts +52 -0
- package/dist/models/GlobalStatsAggregationModel.js +62 -0
- package/dist/models/HTTPValidationError.d.ts +33 -0
- package/dist/models/HTTPValidationError.js +49 -0
- package/dist/models/ListResponseBuildTaskShortResponse.d.ts +39 -0
- package/dist/models/ListResponseBuildTaskShortResponse.js +54 -0
- package/dist/models/ListResponseReleaseResponse.d.ts +39 -0
- package/dist/models/ListResponseReleaseResponse.js +54 -0
- package/dist/models/ListResponseShortDeviceResponse.d.ts +39 -0
- package/dist/models/ListResponseShortDeviceResponse.js +54 -0
- package/dist/models/ListResponseShortReleaseResponse.d.ts +39 -0
- package/dist/models/ListResponseShortReleaseResponse.js +54 -0
- package/dist/models/ListResponseStr.d.ts +38 -0
- package/dist/models/ListResponseStr.js +53 -0
- package/dist/models/ListResponseUserShortResponse.d.ts +39 -0
- package/dist/models/ListResponseUserShortResponse.js +54 -0
- package/dist/models/LogListResponse.d.ts +51 -0
- package/dist/models/LogListResponse.js +63 -0
- package/dist/models/LogResponse.d.ts +83 -0
- package/dist/models/LogResponse.js +73 -0
- package/dist/models/MaintainerShortModel.d.ts +44 -0
- package/dist/models/MaintainerShortModel.js +58 -0
- package/dist/models/NewBuildTaskBody.d.ts +57 -0
- package/dist/models/NewBuildTaskBody.js +59 -0
- package/dist/models/NewDeviceBody.d.ts +50 -0
- package/dist/models/NewDeviceBody.js +62 -0
- package/dist/models/PasteInput.d.ts +50 -0
- package/dist/models/PasteInput.js +58 -0
- package/dist/models/PasteOutput.d.ts +50 -0
- package/dist/models/PasteOutput.js +58 -0
- package/dist/models/RecoveryImgResponse.d.ts +38 -0
- package/dist/models/RecoveryImgResponse.js +54 -0
- package/dist/models/ReleaseGroupsResponse.d.ts +35 -0
- package/dist/models/ReleaseGroupsResponse.js +50 -0
- package/dist/models/ReleaseInternalResponse.d.ts +162 -0
- package/dist/models/ReleaseInternalResponse.js +126 -0
- package/dist/models/ReleaseInternalResponsePropValue.d.ts +26 -0
- package/dist/models/ReleaseInternalResponsePropValue.js +38 -0
- package/dist/models/ReleaseResponse.d.ts +139 -0
- package/dist/models/ReleaseResponse.js +114 -0
- package/dist/models/ReleaseStatsResponse.d.ts +48 -0
- package/dist/models/ReleaseStatsResponse.js +58 -0
- package/dist/models/ReleaseType.d.ts +26 -0
- package/dist/models/ReleaseType.js +52 -0
- package/dist/models/ReleaseUpdateBody.d.ts +50 -0
- package/dist/models/ReleaseUpdateBody.js +54 -0
- package/dist/models/ReleasesSort.d.ts +25 -0
- package/dist/models/ReleasesSort.js +51 -0
- package/dist/models/ResponseGetReleases.d.ts +41 -0
- package/dist/models/ResponseGetReleases.js +53 -0
- package/dist/models/ShortDeviceResponse.d.ts +82 -0
- package/dist/models/ShortDeviceResponse.js +80 -0
- package/dist/models/ShortReleaseResponse.d.ts +100 -0
- package/dist/models/ShortReleaseResponse.js +91 -0
- package/dist/models/TaskUpdateBody.d.ts +39 -0
- package/dist/models/TaskUpdateBody.js +51 -0
- package/dist/models/TokenResponse.d.ts +38 -0
- package/dist/models/TokenResponse.js +52 -0
- package/dist/models/UserGitlab.d.ts +32 -0
- package/dist/models/UserGitlab.js +50 -0
- package/dist/models/UserInternalResponse.d.ts +90 -0
- package/dist/models/UserInternalResponse.js +82 -0
- package/dist/models/UserMail.d.ts +32 -0
- package/dist/models/UserMail.js +50 -0
- package/dist/models/UserShortResponse.d.ts +50 -0
- package/dist/models/UserShortResponse.js +62 -0
- package/dist/models/UserTelegram.d.ts +32 -0
- package/dist/models/UserTelegram.js +50 -0
- package/dist/models/UserUpdateBody.d.ts +56 -0
- package/dist/models/UserUpdateBody.js +56 -0
- package/dist/models/ValidationError.d.ts +45 -0
- package/dist/models/ValidationError.js +59 -0
- package/dist/models/ValidationErrorLocInner.d.ts +26 -0
- package/dist/models/ValidationErrorLocInner.js +38 -0
- package/dist/models/index.d.ts +47 -0
- package/dist/models/index.js +65 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/package.json +4 -17
- package/src/apis/DeviceApi.ts +326 -0
- package/src/apis/FoxFactoryApi.ts +807 -0
- package/src/apis/GitlabApi.ts +108 -0
- package/src/apis/InternalApi.ts +1590 -0
- package/src/apis/PasteApi.ts +158 -0
- package/src/apis/ReleaseApi.ts +414 -0
- package/src/apis/StatsApi.ts +82 -0
- package/src/apis/index.ts +9 -0
- package/src/index.ts +5 -0
- package/src/models/BodyChangePasswordProfileChangePasswordPost.ts +75 -0
- package/src/models/BuildStatusEnum.ts +58 -0
- package/src/models/BuildTaskResponse.ts +183 -0
- package/src/models/BuildTaskShortResponse.ts +167 -0
- package/src/models/DeviceInternalResponse.ts +196 -0
- package/src/models/DeviceResponse.ts +171 -0
- package/src/models/DeviceStatsResponse.ts +84 -0
- package/src/models/DeviceUpdateBody.ts +105 -0
- package/src/models/FFStatusEnum.ts +54 -0
- package/src/models/FFStatusResponse.ts +76 -0
- package/src/models/GlobalStatsAggregationModel.ts +93 -0
- package/src/models/HTTPValidationError.ts +73 -0
- package/src/models/ListResponseBuildTaskShortResponse.ts +82 -0
- package/src/models/ListResponseReleaseResponse.ts +82 -0
- package/src/models/ListResponseShortDeviceResponse.ts +82 -0
- package/src/models/ListResponseShortReleaseResponse.ts +82 -0
- package/src/models/ListResponseStr.ts +74 -0
- package/src/models/ListResponseUserShortResponse.ts +82 -0
- package/src/models/LogListResponse.ts +101 -0
- package/src/models/LogResponse.ts +141 -0
- package/src/models/MaintainerShortModel.ts +84 -0
- package/src/models/NewBuildTaskBody.ts +108 -0
- package/src/models/NewDeviceBody.ts +93 -0
- package/src/models/PasteInput.ts +91 -0
- package/src/models/PasteOutput.ts +91 -0
- package/src/models/RecoveryImgResponse.ts +75 -0
- package/src/models/ReleaseGroupsResponse.ts +74 -0
- package/src/models/ReleaseInternalResponse.ts +279 -0
- package/src/models/ReleaseInternalResponsePropValue.ts +46 -0
- package/src/models/ReleaseResponse.ts +233 -0
- package/src/models/ReleaseStatsResponse.ts +84 -0
- package/src/models/ReleaseType.ts +54 -0
- package/src/models/ReleaseUpdateBody.ts +89 -0
- package/src/models/ReleasesSort.ts +53 -0
- package/src/models/ResponseGetReleases.ts +96 -0
- package/src/models/ShortDeviceResponse.ts +138 -0
- package/src/models/ShortReleaseResponse.ts +174 -0
- package/src/models/TaskUpdateBody.ts +83 -0
- package/src/models/TokenResponse.ts +74 -0
- package/src/models/UserGitlab.ts +66 -0
- package/src/models/UserInternalResponse.ts +172 -0
- package/src/models/UserMail.ts +66 -0
- package/src/models/UserShortResponse.ts +93 -0
- package/src/models/UserTelegram.ts +66 -0
- package/src/models/UserUpdateBody.ts +97 -0
- package/src/models/ValidationError.ts +92 -0
- package/src/models/ValidationErrorLocInner.ts +46 -0
- package/src/models/index.ts +49 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.json +2 -4
- package/api.ts +0 -6111
- package/base.ts +0 -86
- package/common.ts +0 -150
- package/configuration.ts +0 -115
- package/dist/api.d.ts +0 -3964
- package/dist/api.js +0 -3664
- package/dist/base.d.ts +0 -66
- package/dist/base.js +0 -65
- package/dist/common.d.ts +0 -65
- package/dist/common.js +0 -161
- package/dist/configuration.d.ts +0 -91
- package/dist/configuration.js +0 -44
- package/dist/esm/api.d.ts +0 -3964
- package/dist/esm/api.js +0 -3633
- package/dist/esm/base.d.ts +0 -66
- package/dist/esm/base.js +0 -60
- package/dist/esm/common.d.ts +0 -65
- package/dist/esm/common.js +0 -149
- package/dist/esm/configuration.d.ts +0 -91
- package/dist/esm/configuration.js +0 -40
- package/docs/BodyChangePasswordProfileChangePasswordPost.md +0 -22
- package/docs/BuildStatusEnum.md +0 -20
- package/docs/BuildTaskResponse.md +0 -42
- package/docs/BuildTaskShortResponse.md +0 -38
- package/docs/DeviceApi.md +0 -251
- package/docs/DeviceInternalResponse.md +0 -48
- package/docs/DeviceResponse.md +0 -44
- package/docs/DeviceStatsResponse.md +0 -24
- package/docs/DeviceUpdateBody.md +0 -30
- package/docs/FFStatusEnum.md +0 -12
- package/docs/FFStatusResponse.md +0 -20
- package/docs/FoxFactoryApi.md +0 -540
- package/docs/GitlabApi.md +0 -62
- package/docs/GlobalStatsAggregationModel.md +0 -26
- package/docs/HTTPValidationError.md +0 -20
- package/docs/InternalApi.md +0 -1072
- package/docs/ListResponseBuildTaskShortResponse.md +0 -22
- package/docs/ListResponseReleaseResponse.md +0 -22
- package/docs/ListResponseShortDeviceResponse.md +0 -22
- package/docs/ListResponseShortReleaseResponse.md +0 -22
- package/docs/ListResponseStr.md +0 -22
- package/docs/ListResponseUserShortResponse.md +0 -22
- package/docs/LogListResponse.md +0 -26
- package/docs/LogResponse.md +0 -36
- package/docs/MaintainerShortModel.md +0 -26
- package/docs/NewBuildTaskBody.md +0 -28
- package/docs/NewDeviceBody.md +0 -26
- package/docs/PasteApi.md +0 -117
- package/docs/PasteInput.md +0 -26
- package/docs/PasteOutput.md +0 -26
- package/docs/RecoveryImgResponse.md +0 -22
- package/docs/ReleaseApi.md +0 -289
- package/docs/ReleaseGroupsResponse.md +0 -20
- package/docs/ReleaseInternalResponse.md +0 -62
- package/docs/ReleaseInternalResponsePropValue.md +0 -18
- package/docs/ReleaseResponse.md +0 -56
- package/docs/ReleaseStatsResponse.md +0 -24
- package/docs/ReleaseType.md +0 -12
- package/docs/ReleaseUpdateBody.md +0 -26
- package/docs/ReleasesSort.md +0 -10
- package/docs/ResponseGetReleases.md +0 -22
- package/docs/ShortDeviceResponse.md +0 -38
- package/docs/ShortReleaseResponse.md +0 -44
- package/docs/StatsApi.md +0 -53
- package/docs/TaskUpdateBody.md +0 -22
- package/docs/TokenResponse.md +0 -22
- package/docs/UserGitlab.md +0 -20
- package/docs/UserInternalResponse.md +0 -38
- package/docs/UserMail.md +0 -20
- package/docs/UserShortResponse.md +0 -26
- package/docs/UserTelegram.md +0 -20
- package/docs/UserUpdateBody.md +0 -28
- package/docs/ValidationError.md +0 -24
- package/docs/ValidationErrorLocInner.md +0 -18
- package/git_push.sh +0 -57
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Fox API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 5.2.7
|
|
8
|
+
* Contact: admin@orangefox.tech
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { BuildTaskResponseFromJSON, FFStatusResponseFromJSON, ListResponseBuildTaskShortResponseFromJSON, NewBuildTaskBodyToJSON, TaskUpdateBodyToJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class FoxFactoryApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Cancels a build task given its identifier. The task\'s status is updated to indicate that it is in the process of cancellation. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
31
|
+
* Cancel Task
|
|
32
|
+
*/
|
|
33
|
+
cancelTaskFactoryTaskIdCancelPostRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['taskId'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling cancelTaskFactoryTaskIdCancelPost().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
41
|
+
// oauth required
|
|
42
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
43
|
+
}
|
|
44
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
45
|
+
const token = this.configuration.accessToken;
|
|
46
|
+
const tokenString = yield token("bearer_auth", []);
|
|
47
|
+
if (tokenString) {
|
|
48
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const response = yield this.request({
|
|
52
|
+
path: `/factory/{task_id}/cancel`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
53
|
+
method: 'POST',
|
|
54
|
+
headers: headerParameters,
|
|
55
|
+
query: queryParameters,
|
|
56
|
+
}, initOverrides);
|
|
57
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Cancels a build task given its identifier. The task\'s status is updated to indicate that it is in the process of cancellation. If the task with the specified ID is not found, a 404 HTTP exception is raised.
|
|
62
|
+
* Cancel Task
|
|
63
|
+
*/
|
|
64
|
+
cancelTaskFactoryTaskIdCancelPost(requestParameters, initOverrides) {
|
|
65
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
+
const response = yield this.cancelTaskFactoryTaskIdCancelPostRaw(requestParameters, initOverrides);
|
|
67
|
+
return yield response.value();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* 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.
|
|
72
|
+
* Delete Task
|
|
73
|
+
*/
|
|
74
|
+
deleteTaskFactoryTaskIdDeleteRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
if (requestParameters['taskId'] == null) {
|
|
77
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling deleteTaskFactoryTaskIdDelete().');
|
|
78
|
+
}
|
|
79
|
+
const queryParameters = {};
|
|
80
|
+
const headerParameters = {};
|
|
81
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
82
|
+
// oauth required
|
|
83
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
84
|
+
}
|
|
85
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
86
|
+
const token = this.configuration.accessToken;
|
|
87
|
+
const tokenString = yield token("bearer_auth", []);
|
|
88
|
+
if (tokenString) {
|
|
89
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const response = yield this.request({
|
|
93
|
+
path: `/factory/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
94
|
+
method: 'DELETE',
|
|
95
|
+
headers: headerParameters,
|
|
96
|
+
query: queryParameters,
|
|
97
|
+
}, initOverrides);
|
|
98
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
99
|
+
return new runtime.JSONApiResponse(response);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
return new runtime.TextApiResponse(response);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* 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.
|
|
108
|
+
* Delete Task
|
|
109
|
+
*/
|
|
110
|
+
deleteTaskFactoryTaskIdDelete(requestParameters, initOverrides) {
|
|
111
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
112
|
+
const response = yield this.deleteTaskFactoryTaskIdDeleteRaw(requestParameters, initOverrides);
|
|
113
|
+
return yield response.value();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* 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
|
|
118
|
+
* Download Artifact
|
|
119
|
+
*/
|
|
120
|
+
downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters, initOverrides) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
if (requestParameters['taskId'] == null) {
|
|
123
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling downloadArtifactFactoryTaskIdArtifactGet().');
|
|
124
|
+
}
|
|
125
|
+
const queryParameters = {};
|
|
126
|
+
const headerParameters = {};
|
|
127
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
128
|
+
// oauth required
|
|
129
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
130
|
+
}
|
|
131
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
132
|
+
const token = this.configuration.accessToken;
|
|
133
|
+
const tokenString = yield token("bearer_auth", []);
|
|
134
|
+
if (tokenString) {
|
|
135
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const response = yield this.request({
|
|
139
|
+
path: `/factory/{task_id}/artifact`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
140
|
+
method: 'GET',
|
|
141
|
+
headers: headerParameters,
|
|
142
|
+
query: queryParameters,
|
|
143
|
+
}, initOverrides);
|
|
144
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
145
|
+
return new runtime.JSONApiResponse(response);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return new runtime.TextApiResponse(response);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* 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
|
|
154
|
+
* Download Artifact
|
|
155
|
+
*/
|
|
156
|
+
downloadArtifactFactoryTaskIdArtifactGet(requestParameters, initOverrides) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
const response = yield this.downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters, initOverrides);
|
|
159
|
+
return yield response.value();
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* 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.
|
|
164
|
+
* Factory Status
|
|
165
|
+
*/
|
|
166
|
+
factoryStatusFactoryStatusGetRaw(initOverrides) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const queryParameters = {};
|
|
169
|
+
const headerParameters = {};
|
|
170
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
171
|
+
// oauth required
|
|
172
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
173
|
+
}
|
|
174
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
175
|
+
const token = this.configuration.accessToken;
|
|
176
|
+
const tokenString = yield token("bearer_auth", []);
|
|
177
|
+
if (tokenString) {
|
|
178
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
const response = yield this.request({
|
|
182
|
+
path: `/factory/status`,
|
|
183
|
+
method: 'GET',
|
|
184
|
+
headers: headerParameters,
|
|
185
|
+
query: queryParameters,
|
|
186
|
+
}, initOverrides);
|
|
187
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FFStatusResponseFromJSON(jsonValue));
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* 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.
|
|
192
|
+
* Factory Status
|
|
193
|
+
*/
|
|
194
|
+
factoryStatusFactoryStatusGet(initOverrides) {
|
|
195
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
196
|
+
const response = yield this.factoryStatusFactoryStatusGetRaw(initOverrides);
|
|
197
|
+
return yield response.value();
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Retrieves the details of a specific build task. This endpoint allows a user to fetch detailed information about a build task by its ID. Access to this endpoint is restricted to users with the \'maintainer\' or \'foxworker\' roles. Depending on the user\'s roles, returned task details may differ. Admin users will receive all task details, while others will have some fields excluded.
|
|
202
|
+
* Get Task
|
|
203
|
+
*/
|
|
204
|
+
getTaskFactoryTaskIdGetRaw(requestParameters, initOverrides) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
if (requestParameters['taskId'] == null) {
|
|
207
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling getTaskFactoryTaskIdGet().');
|
|
208
|
+
}
|
|
209
|
+
const queryParameters = {};
|
|
210
|
+
const headerParameters = {};
|
|
211
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
212
|
+
// oauth required
|
|
213
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
214
|
+
}
|
|
215
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
216
|
+
const token = this.configuration.accessToken;
|
|
217
|
+
const tokenString = yield token("bearer_auth", []);
|
|
218
|
+
if (tokenString) {
|
|
219
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const response = yield this.request({
|
|
223
|
+
path: `/factory/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
224
|
+
method: 'GET',
|
|
225
|
+
headers: headerParameters,
|
|
226
|
+
query: queryParameters,
|
|
227
|
+
}, initOverrides);
|
|
228
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Retrieves the details of a specific build task. This endpoint allows a user to fetch detailed information about a build task by its ID. Access to this endpoint is restricted to users with the \'maintainer\' or \'foxworker\' roles. Depending on the user\'s roles, returned task details may differ. Admin users will receive all task details, while others will have some fields excluded.
|
|
233
|
+
* Get Task
|
|
234
|
+
*/
|
|
235
|
+
getTaskFactoryTaskIdGet(requestParameters, initOverrides) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
const response = yield this.getTaskFactoryTaskIdGetRaw(requestParameters, initOverrides);
|
|
238
|
+
return yield response.value();
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Get a list of all build tasks. This endpoint retrieves all build tasks from the database and returns them as a list of abbreviated responses. Parameters: device_id (ObjectId, optional): Filter tasks by device ID
|
|
243
|
+
* List Tasks
|
|
244
|
+
*/
|
|
245
|
+
listTasksFactoryGetRaw(requestParameters, initOverrides) {
|
|
246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
+
const queryParameters = {};
|
|
248
|
+
if (requestParameters['deviceId'] != null) {
|
|
249
|
+
queryParameters['device_id'] = requestParameters['deviceId'];
|
|
250
|
+
}
|
|
251
|
+
const headerParameters = {};
|
|
252
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
253
|
+
// oauth required
|
|
254
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
255
|
+
}
|
|
256
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
257
|
+
const token = this.configuration.accessToken;
|
|
258
|
+
const tokenString = yield token("bearer_auth", []);
|
|
259
|
+
if (tokenString) {
|
|
260
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
const response = yield this.request({
|
|
264
|
+
path: `/factory/`,
|
|
265
|
+
method: 'GET',
|
|
266
|
+
headers: headerParameters,
|
|
267
|
+
query: queryParameters,
|
|
268
|
+
}, initOverrides);
|
|
269
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListResponseBuildTaskShortResponseFromJSON(jsonValue));
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Get a list of all build tasks. This endpoint retrieves all build tasks from the database and returns them as a list of abbreviated responses. Parameters: device_id (ObjectId, optional): Filter tasks by device ID
|
|
274
|
+
* List Tasks
|
|
275
|
+
*/
|
|
276
|
+
listTasksFactoryGet() {
|
|
277
|
+
return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
|
|
278
|
+
const response = yield this.listTasksFactoryGetRaw(requestParameters, initOverrides);
|
|
279
|
+
return yield response.value();
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Handles the creation of a new build task including validations for the device existence and its connection to GitLab. It initializes a new task with a pending status and the required details, then saves it to the database before returning the task model.
|
|
284
|
+
* New Task
|
|
285
|
+
*/
|
|
286
|
+
newTaskFactoryPostRaw(requestParameters, initOverrides) {
|
|
287
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
288
|
+
if (requestParameters['newBuildTaskBody'] == null) {
|
|
289
|
+
throw new runtime.RequiredError('newBuildTaskBody', 'Required parameter "newBuildTaskBody" was null or undefined when calling newTaskFactoryPost().');
|
|
290
|
+
}
|
|
291
|
+
const queryParameters = {};
|
|
292
|
+
const headerParameters = {};
|
|
293
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
294
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
295
|
+
// oauth required
|
|
296
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
297
|
+
}
|
|
298
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
299
|
+
const token = this.configuration.accessToken;
|
|
300
|
+
const tokenString = yield token("bearer_auth", []);
|
|
301
|
+
if (tokenString) {
|
|
302
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
const response = yield this.request({
|
|
306
|
+
path: `/factory/`,
|
|
307
|
+
method: 'POST',
|
|
308
|
+
headers: headerParameters,
|
|
309
|
+
query: queryParameters,
|
|
310
|
+
body: NewBuildTaskBodyToJSON(requestParameters['newBuildTaskBody']),
|
|
311
|
+
}, initOverrides);
|
|
312
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
313
|
+
return new runtime.JSONApiResponse(response);
|
|
314
|
+
}
|
|
315
|
+
else {
|
|
316
|
+
return new runtime.TextApiResponse(response);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Handles the creation of a new build task including validations for the device existence and its connection to GitLab. It initializes a new task with a pending status and the required details, then saves it to the database before returning the task model.
|
|
322
|
+
* New Task
|
|
323
|
+
*/
|
|
324
|
+
newTaskFactoryPost(requestParameters, initOverrides) {
|
|
325
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
326
|
+
const response = yield this.newTaskFactoryPostRaw(requestParameters, initOverrides);
|
|
327
|
+
return yield response.value();
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Updates an existing build task by its unique identifier. The function allows updates to the task\'s status and logs. If the task\'s status is set to a value indicating completion, the finished timestamp is also updated. Allowed only for foxworker users.
|
|
332
|
+
* Update Task
|
|
333
|
+
*/
|
|
334
|
+
updateTaskFactoryTaskIdPatchRaw(requestParameters, initOverrides) {
|
|
335
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
336
|
+
if (requestParameters['taskId'] == null) {
|
|
337
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling updateTaskFactoryTaskIdPatch().');
|
|
338
|
+
}
|
|
339
|
+
if (requestParameters['taskUpdateBody'] == null) {
|
|
340
|
+
throw new runtime.RequiredError('taskUpdateBody', 'Required parameter "taskUpdateBody" was null or undefined when calling updateTaskFactoryTaskIdPatch().');
|
|
341
|
+
}
|
|
342
|
+
const queryParameters = {};
|
|
343
|
+
const headerParameters = {};
|
|
344
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
345
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
346
|
+
// oauth required
|
|
347
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
348
|
+
}
|
|
349
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
350
|
+
const token = this.configuration.accessToken;
|
|
351
|
+
const tokenString = yield token("bearer_auth", []);
|
|
352
|
+
if (tokenString) {
|
|
353
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
const response = yield this.request({
|
|
357
|
+
path: `/factory/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
358
|
+
method: 'PATCH',
|
|
359
|
+
headers: headerParameters,
|
|
360
|
+
query: queryParameters,
|
|
361
|
+
body: TaskUpdateBodyToJSON(requestParameters['taskUpdateBody']),
|
|
362
|
+
}, initOverrides);
|
|
363
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
364
|
+
return new runtime.JSONApiResponse(response);
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
return new runtime.TextApiResponse(response);
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Updates an existing build task by its unique identifier. The function allows updates to the task\'s status and logs. If the task\'s status is set to a value indicating completion, the finished timestamp is also updated. Allowed only for foxworker users.
|
|
373
|
+
* Update Task
|
|
374
|
+
*/
|
|
375
|
+
updateTaskFactoryTaskIdPatch(requestParameters, initOverrides) {
|
|
376
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
377
|
+
const response = yield this.updateTaskFactoryTaskIdPatchRaw(requestParameters, initOverrides);
|
|
378
|
+
return yield response.value();
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Endpoint for FoxFactory worker to update its status.
|
|
383
|
+
* Update Worker Status
|
|
384
|
+
*/
|
|
385
|
+
updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters, initOverrides) {
|
|
386
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
387
|
+
if (requestParameters['body'] == null) {
|
|
388
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling updateWorkerStatusFactoryUpdateStatusPost().');
|
|
389
|
+
}
|
|
390
|
+
const queryParameters = {};
|
|
391
|
+
const headerParameters = {};
|
|
392
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
393
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
394
|
+
// oauth required
|
|
395
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
396
|
+
}
|
|
397
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
398
|
+
const token = this.configuration.accessToken;
|
|
399
|
+
const tokenString = yield token("bearer_auth", []);
|
|
400
|
+
if (tokenString) {
|
|
401
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
const response = yield this.request({
|
|
405
|
+
path: `/factory/update_status`,
|
|
406
|
+
method: 'POST',
|
|
407
|
+
headers: headerParameters,
|
|
408
|
+
query: queryParameters,
|
|
409
|
+
body: requestParameters['body'],
|
|
410
|
+
}, initOverrides);
|
|
411
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
412
|
+
return new runtime.JSONApiResponse(response);
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
return new runtime.TextApiResponse(response);
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Endpoint for FoxFactory worker to update its status.
|
|
421
|
+
* Update Worker Status
|
|
422
|
+
*/
|
|
423
|
+
updateWorkerStatusFactoryUpdateStatusPost(requestParameters, initOverrides) {
|
|
424
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
425
|
+
const response = yield this.updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters, initOverrides);
|
|
426
|
+
return yield response.value();
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* 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
|
|
431
|
+
* Upload Artifact
|
|
432
|
+
*/
|
|
433
|
+
uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters, initOverrides) {
|
|
434
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
435
|
+
if (requestParameters['taskId'] == null) {
|
|
436
|
+
throw new runtime.RequiredError('taskId', 'Required parameter "taskId" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().');
|
|
437
|
+
}
|
|
438
|
+
if (requestParameters['artifact'] == null) {
|
|
439
|
+
throw new runtime.RequiredError('artifact', 'Required parameter "artifact" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().');
|
|
440
|
+
}
|
|
441
|
+
if (requestParameters['md5Hash'] == null) {
|
|
442
|
+
throw new runtime.RequiredError('md5Hash', 'Required parameter "md5Hash" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().');
|
|
443
|
+
}
|
|
444
|
+
const queryParameters = {};
|
|
445
|
+
const headerParameters = {};
|
|
446
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
447
|
+
// oauth required
|
|
448
|
+
headerParameters["Authorization"] = yield this.configuration.accessToken("oauth2_password", []);
|
|
449
|
+
}
|
|
450
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
451
|
+
const token = this.configuration.accessToken;
|
|
452
|
+
const tokenString = yield token("bearer_auth", []);
|
|
453
|
+
if (tokenString) {
|
|
454
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
const consumes = [
|
|
458
|
+
{ contentType: 'multipart/form-data' },
|
|
459
|
+
];
|
|
460
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
461
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
462
|
+
let formParams;
|
|
463
|
+
let useForm = false;
|
|
464
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
465
|
+
useForm = canConsumeForm;
|
|
466
|
+
if (useForm) {
|
|
467
|
+
formParams = new FormData();
|
|
468
|
+
}
|
|
469
|
+
else {
|
|
470
|
+
formParams = new URLSearchParams();
|
|
471
|
+
}
|
|
472
|
+
if (requestParameters['artifact'] != null) {
|
|
473
|
+
formParams.append('artifact', requestParameters['artifact']);
|
|
474
|
+
}
|
|
475
|
+
if (requestParameters['md5Hash'] != null) {
|
|
476
|
+
formParams.append('md5_hash', requestParameters['md5Hash']);
|
|
477
|
+
}
|
|
478
|
+
const response = yield this.request({
|
|
479
|
+
path: `/factory/{task_id}/artifact`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
480
|
+
method: 'POST',
|
|
481
|
+
headers: headerParameters,
|
|
482
|
+
query: queryParameters,
|
|
483
|
+
body: formParams,
|
|
484
|
+
}, initOverrides);
|
|
485
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
486
|
+
return new runtime.JSONApiResponse(response);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
return new runtime.TextApiResponse(response);
|
|
490
|
+
}
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* 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
|
|
495
|
+
* Upload Artifact
|
|
496
|
+
*/
|
|
497
|
+
uploadArtifactFactoryTaskIdArtifactPost(requestParameters, initOverrides) {
|
|
498
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
499
|
+
const response = yield this.uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters, initOverrides);
|
|
500
|
+
return yield response.value();
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fox API
|
|
3
|
+
* 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.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 5.2.7
|
|
6
|
+
* Contact: admin@orangefox.tech
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
export interface DeviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRequest {
|
|
14
|
+
deviceId: string;
|
|
15
|
+
glProjectUrl: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* GitlabApi - interface
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface GitlabApiInterface
|
|
22
|
+
*/
|
|
23
|
+
export interface GitlabApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @summary Device Add Gitlab Repo
|
|
27
|
+
* @param {string} deviceId
|
|
28
|
+
* @param {string} glProjectUrl
|
|
29
|
+
* @param {*} [options] Override http request option.
|
|
30
|
+
* @throws {RequiredError}
|
|
31
|
+
* @memberof GitlabApiInterface
|
|
32
|
+
*/
|
|
33
|
+
deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRaw(requestParameters: DeviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
|
|
34
|
+
/**
|
|
35
|
+
* Device Add Gitlab Repo
|
|
36
|
+
*/
|
|
37
|
+
deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPost(requestParameters: DeviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export declare class GitlabApi extends runtime.BaseAPI implements GitlabApiInterface {
|
|
43
|
+
/**
|
|
44
|
+
* Device Add Gitlab Repo
|
|
45
|
+
*/
|
|
46
|
+
deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRaw(requestParameters: DeviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
|
|
47
|
+
/**
|
|
48
|
+
* Device Add Gitlab Repo
|
|
49
|
+
*/
|
|
50
|
+
deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPost(requestParameters: DeviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
|
|
51
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Fox API
|
|
5
|
+
* 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.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 5.2.7
|
|
8
|
+
* Contact: admin@orangefox.tech
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
export class GitlabApi extends runtime.BaseAPI {
|
|
28
|
+
/**
|
|
29
|
+
* Device Add Gitlab Repo
|
|
30
|
+
*/
|
|
31
|
+
deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRaw(requestParameters, initOverrides) {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
if (requestParameters['deviceId'] == null) {
|
|
34
|
+
throw new runtime.RequiredError('deviceId', 'Required parameter "deviceId" was null or undefined when calling deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPost().');
|
|
35
|
+
}
|
|
36
|
+
if (requestParameters['glProjectUrl'] == null) {
|
|
37
|
+
throw new runtime.RequiredError('glProjectUrl', 'Required parameter "glProjectUrl" was null or undefined when calling deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPost().');
|
|
38
|
+
}
|
|
39
|
+
const queryParameters = {};
|
|
40
|
+
if (requestParameters['glProjectUrl'] != null) {
|
|
41
|
+
queryParameters['gl_project_url'] = requestParameters['glProjectUrl'];
|
|
42
|
+
}
|
|
43
|
+
const headerParameters = {};
|
|
44
|
+
const response = yield this.request({
|
|
45
|
+
path: `/gitlab/device/{device_id}/gitlab`.replace(`{${"device_id"}}`, encodeURIComponent(String(requestParameters['deviceId']))),
|
|
46
|
+
method: 'POST',
|
|
47
|
+
headers: headerParameters,
|
|
48
|
+
query: queryParameters,
|
|
49
|
+
}, initOverrides);
|
|
50
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
51
|
+
return new runtime.JSONApiResponse(response);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return new runtime.TextApiResponse(response);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Device Add Gitlab Repo
|
|
60
|
+
*/
|
|
61
|
+
deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPost(requestParameters, initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const response = yield this.deviceAddGitlabRepoGitlabDeviceDeviceIdGitlabPostRaw(requestParameters, initOverrides);
|
|
64
|
+
return yield response.value();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
}
|