@orangefox-recovery/foxinternalclient 5.2.5 → 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 -57
- package/README.md +3 -116
- 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 -5578
- package/base.ts +0 -86
- package/common.ts +0 -150
- package/configuration.ts +0 -115
- package/dist/api.d.ts +0 -3696
- package/dist/api.js +0 -3281
- 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 -3696
- package/dist/esm/api.js +0 -3254
- 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 -958
- 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/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,807 @@
|
|
|
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
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
BuildTaskResponse,
|
|
19
|
+
FFStatusEnum,
|
|
20
|
+
FFStatusResponse,
|
|
21
|
+
HTTPValidationError,
|
|
22
|
+
ListResponseBuildTaskShortResponse,
|
|
23
|
+
NewBuildTaskBody,
|
|
24
|
+
TaskUpdateBody,
|
|
25
|
+
} from '../models/index';
|
|
26
|
+
import {
|
|
27
|
+
BuildTaskResponseFromJSON,
|
|
28
|
+
BuildTaskResponseToJSON,
|
|
29
|
+
FFStatusEnumFromJSON,
|
|
30
|
+
FFStatusEnumToJSON,
|
|
31
|
+
FFStatusResponseFromJSON,
|
|
32
|
+
FFStatusResponseToJSON,
|
|
33
|
+
HTTPValidationErrorFromJSON,
|
|
34
|
+
HTTPValidationErrorToJSON,
|
|
35
|
+
ListResponseBuildTaskShortResponseFromJSON,
|
|
36
|
+
ListResponseBuildTaskShortResponseToJSON,
|
|
37
|
+
NewBuildTaskBodyFromJSON,
|
|
38
|
+
NewBuildTaskBodyToJSON,
|
|
39
|
+
TaskUpdateBodyFromJSON,
|
|
40
|
+
TaskUpdateBodyToJSON,
|
|
41
|
+
} from '../models/index';
|
|
42
|
+
|
|
43
|
+
export interface CancelTaskFactoryTaskIdCancelPostRequest {
|
|
44
|
+
taskId: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface DeleteTaskFactoryTaskIdDeleteRequest {
|
|
48
|
+
taskId: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface DownloadArtifactFactoryTaskIdArtifactGetRequest {
|
|
52
|
+
taskId: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface GetTaskFactoryTaskIdGetRequest {
|
|
56
|
+
taskId: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface ListTasksFactoryGetRequest {
|
|
60
|
+
deviceId?: string | null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface NewTaskFactoryPostRequest {
|
|
64
|
+
newBuildTaskBody: NewBuildTaskBody;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface UpdateTaskFactoryTaskIdPatchRequest {
|
|
68
|
+
taskId: string;
|
|
69
|
+
taskUpdateBody: TaskUpdateBody;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface UpdateWorkerStatusFactoryUpdateStatusPostRequest {
|
|
73
|
+
body: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface UploadArtifactFactoryTaskIdArtifactPostRequest {
|
|
77
|
+
taskId: string;
|
|
78
|
+
artifact: Blob;
|
|
79
|
+
md5Hash: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* FoxFactoryApi - interface
|
|
84
|
+
*
|
|
85
|
+
* @export
|
|
86
|
+
* @interface FoxFactoryApiInterface
|
|
87
|
+
*/
|
|
88
|
+
export interface FoxFactoryApiInterface {
|
|
89
|
+
/**
|
|
90
|
+
* 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.
|
|
91
|
+
* @summary Cancel Task
|
|
92
|
+
* @param {string} taskId
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
* @memberof FoxFactoryApiInterface
|
|
96
|
+
*/
|
|
97
|
+
cancelTaskFactoryTaskIdCancelPostRaw(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* 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.
|
|
101
|
+
* Cancel Task
|
|
102
|
+
*/
|
|
103
|
+
cancelTaskFactoryTaskIdCancelPost(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 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.
|
|
107
|
+
* @summary Delete Task
|
|
108
|
+
* @param {string} taskId
|
|
109
|
+
* @param {*} [options] Override http request option.
|
|
110
|
+
* @throws {RequiredError}
|
|
111
|
+
* @memberof FoxFactoryApiInterface
|
|
112
|
+
*/
|
|
113
|
+
deleteTaskFactoryTaskIdDeleteRaw(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 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.
|
|
117
|
+
* Delete Task
|
|
118
|
+
*/
|
|
119
|
+
deleteTaskFactoryTaskIdDelete(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* 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
|
|
123
|
+
* @summary Download Artifact
|
|
124
|
+
* @param {string} taskId
|
|
125
|
+
* @param {*} [options] Override http request option.
|
|
126
|
+
* @throws {RequiredError}
|
|
127
|
+
* @memberof FoxFactoryApiInterface
|
|
128
|
+
*/
|
|
129
|
+
downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 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
|
|
133
|
+
* Download Artifact
|
|
134
|
+
*/
|
|
135
|
+
downloadArtifactFactoryTaskIdArtifactGet(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 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.
|
|
139
|
+
* @summary Factory Status
|
|
140
|
+
* @param {*} [options] Override http request option.
|
|
141
|
+
* @throws {RequiredError}
|
|
142
|
+
* @memberof FoxFactoryApiInterface
|
|
143
|
+
*/
|
|
144
|
+
factoryStatusFactoryStatusGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FFStatusResponse>>;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* 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.
|
|
148
|
+
* Factory Status
|
|
149
|
+
*/
|
|
150
|
+
factoryStatusFactoryStatusGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FFStatusResponse>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 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.
|
|
154
|
+
* @summary Get Task
|
|
155
|
+
* @param {string} taskId
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
* @memberof FoxFactoryApiInterface
|
|
159
|
+
*/
|
|
160
|
+
getTaskFactoryTaskIdGetRaw(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* 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.
|
|
164
|
+
* Get Task
|
|
165
|
+
*/
|
|
166
|
+
getTaskFactoryTaskIdGet(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse>;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* 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
|
|
170
|
+
* @summary List Tasks
|
|
171
|
+
* @param {string} [deviceId]
|
|
172
|
+
* @param {*} [options] Override http request option.
|
|
173
|
+
* @throws {RequiredError}
|
|
174
|
+
* @memberof FoxFactoryApiInterface
|
|
175
|
+
*/
|
|
176
|
+
listTasksFactoryGetRaw(requestParameters: ListTasksFactoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResponseBuildTaskShortResponse>>;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* 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
|
|
180
|
+
* List Tasks
|
|
181
|
+
*/
|
|
182
|
+
listTasksFactoryGet(requestParameters: ListTasksFactoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListResponseBuildTaskShortResponse>;
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* 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.
|
|
186
|
+
* @summary New Task
|
|
187
|
+
* @param {NewBuildTaskBody} newBuildTaskBody
|
|
188
|
+
* @param {*} [options] Override http request option.
|
|
189
|
+
* @throws {RequiredError}
|
|
190
|
+
* @memberof FoxFactoryApiInterface
|
|
191
|
+
*/
|
|
192
|
+
newTaskFactoryPostRaw(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* 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.
|
|
196
|
+
* New Task
|
|
197
|
+
*/
|
|
198
|
+
newTaskFactoryPost(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* 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.
|
|
202
|
+
* @summary Update Task
|
|
203
|
+
* @param {string} taskId
|
|
204
|
+
* @param {TaskUpdateBody} taskUpdateBody
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
* @memberof FoxFactoryApiInterface
|
|
208
|
+
*/
|
|
209
|
+
updateTaskFactoryTaskIdPatchRaw(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* 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.
|
|
213
|
+
* Update Task
|
|
214
|
+
*/
|
|
215
|
+
updateTaskFactoryTaskIdPatch(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Endpoint for FoxFactory worker to update its status.
|
|
219
|
+
* @summary Update Worker Status
|
|
220
|
+
* @param {string} body
|
|
221
|
+
* @param {*} [options] Override http request option.
|
|
222
|
+
* @throws {RequiredError}
|
|
223
|
+
* @memberof FoxFactoryApiInterface
|
|
224
|
+
*/
|
|
225
|
+
updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Endpoint for FoxFactory worker to update its status.
|
|
229
|
+
* Update Worker Status
|
|
230
|
+
*/
|
|
231
|
+
updateWorkerStatusFactoryUpdateStatusPost(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* 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
|
|
235
|
+
* @summary Upload Artifact
|
|
236
|
+
* @param {string} taskId
|
|
237
|
+
* @param {Blob} artifact
|
|
238
|
+
* @param {string} md5Hash
|
|
239
|
+
* @param {*} [options] Override http request option.
|
|
240
|
+
* @throws {RequiredError}
|
|
241
|
+
* @memberof FoxFactoryApiInterface
|
|
242
|
+
*/
|
|
243
|
+
uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* 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
|
|
247
|
+
* Upload Artifact
|
|
248
|
+
*/
|
|
249
|
+
uploadArtifactFactoryTaskIdArtifactPost(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
|
|
250
|
+
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
*/
|
|
256
|
+
export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInterface {
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* 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.
|
|
260
|
+
* Cancel Task
|
|
261
|
+
*/
|
|
262
|
+
async cancelTaskFactoryTaskIdCancelPostRaw(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>> {
|
|
263
|
+
if (requestParameters['taskId'] == null) {
|
|
264
|
+
throw new runtime.RequiredError(
|
|
265
|
+
'taskId',
|
|
266
|
+
'Required parameter "taskId" was null or undefined when calling cancelTaskFactoryTaskIdCancelPost().'
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const queryParameters: any = {};
|
|
271
|
+
|
|
272
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
273
|
+
|
|
274
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
275
|
+
// oauth required
|
|
276
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
280
|
+
const token = this.configuration.accessToken;
|
|
281
|
+
const tokenString = await token("bearer_auth", []);
|
|
282
|
+
|
|
283
|
+
if (tokenString) {
|
|
284
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
const response = await this.request({
|
|
288
|
+
path: `/factory/{task_id}/cancel`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
289
|
+
method: 'POST',
|
|
290
|
+
headers: headerParameters,
|
|
291
|
+
query: queryParameters,
|
|
292
|
+
}, initOverrides);
|
|
293
|
+
|
|
294
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* 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.
|
|
299
|
+
* Cancel Task
|
|
300
|
+
*/
|
|
301
|
+
async cancelTaskFactoryTaskIdCancelPost(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse> {
|
|
302
|
+
const response = await this.cancelTaskFactoryTaskIdCancelPostRaw(requestParameters, initOverrides);
|
|
303
|
+
return await response.value();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* 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.
|
|
308
|
+
* Delete Task
|
|
309
|
+
*/
|
|
310
|
+
async deleteTaskFactoryTaskIdDeleteRaw(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
|
311
|
+
if (requestParameters['taskId'] == null) {
|
|
312
|
+
throw new runtime.RequiredError(
|
|
313
|
+
'taskId',
|
|
314
|
+
'Required parameter "taskId" was null or undefined when calling deleteTaskFactoryTaskIdDelete().'
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const queryParameters: any = {};
|
|
319
|
+
|
|
320
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
321
|
+
|
|
322
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
323
|
+
// oauth required
|
|
324
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
328
|
+
const token = this.configuration.accessToken;
|
|
329
|
+
const tokenString = await token("bearer_auth", []);
|
|
330
|
+
|
|
331
|
+
if (tokenString) {
|
|
332
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
const response = await this.request({
|
|
336
|
+
path: `/factory/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
337
|
+
method: 'DELETE',
|
|
338
|
+
headers: headerParameters,
|
|
339
|
+
query: queryParameters,
|
|
340
|
+
}, initOverrides);
|
|
341
|
+
|
|
342
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
343
|
+
return new runtime.JSONApiResponse<boolean>(response);
|
|
344
|
+
} else {
|
|
345
|
+
return new runtime.TextApiResponse(response) as any;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* 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.
|
|
351
|
+
* Delete Task
|
|
352
|
+
*/
|
|
353
|
+
async deleteTaskFactoryTaskIdDelete(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
|
|
354
|
+
const response = await this.deleteTaskFactoryTaskIdDeleteRaw(requestParameters, initOverrides);
|
|
355
|
+
return await response.value();
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* 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
|
|
360
|
+
* Download Artifact
|
|
361
|
+
*/
|
|
362
|
+
async downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
|
|
363
|
+
if (requestParameters['taskId'] == null) {
|
|
364
|
+
throw new runtime.RequiredError(
|
|
365
|
+
'taskId',
|
|
366
|
+
'Required parameter "taskId" was null or undefined when calling downloadArtifactFactoryTaskIdArtifactGet().'
|
|
367
|
+
);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
const queryParameters: any = {};
|
|
371
|
+
|
|
372
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
373
|
+
|
|
374
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
375
|
+
// oauth required
|
|
376
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
380
|
+
const token = this.configuration.accessToken;
|
|
381
|
+
const tokenString = await token("bearer_auth", []);
|
|
382
|
+
|
|
383
|
+
if (tokenString) {
|
|
384
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
const response = await this.request({
|
|
388
|
+
path: `/factory/{task_id}/artifact`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
389
|
+
method: 'GET',
|
|
390
|
+
headers: headerParameters,
|
|
391
|
+
query: queryParameters,
|
|
392
|
+
}, initOverrides);
|
|
393
|
+
|
|
394
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
395
|
+
return new runtime.JSONApiResponse<any>(response);
|
|
396
|
+
} else {
|
|
397
|
+
return new runtime.TextApiResponse(response) as any;
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* 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
|
|
403
|
+
* Download Artifact
|
|
404
|
+
*/
|
|
405
|
+
async downloadArtifactFactoryTaskIdArtifactGet(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
|
|
406
|
+
const response = await this.downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters, initOverrides);
|
|
407
|
+
return await response.value();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* 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.
|
|
412
|
+
* Factory Status
|
|
413
|
+
*/
|
|
414
|
+
async factoryStatusFactoryStatusGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FFStatusResponse>> {
|
|
415
|
+
const queryParameters: any = {};
|
|
416
|
+
|
|
417
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
418
|
+
|
|
419
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
420
|
+
// oauth required
|
|
421
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
425
|
+
const token = this.configuration.accessToken;
|
|
426
|
+
const tokenString = await token("bearer_auth", []);
|
|
427
|
+
|
|
428
|
+
if (tokenString) {
|
|
429
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
const response = await this.request({
|
|
433
|
+
path: `/factory/status`,
|
|
434
|
+
method: 'GET',
|
|
435
|
+
headers: headerParameters,
|
|
436
|
+
query: queryParameters,
|
|
437
|
+
}, initOverrides);
|
|
438
|
+
|
|
439
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => FFStatusResponseFromJSON(jsonValue));
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* 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.
|
|
444
|
+
* Factory Status
|
|
445
|
+
*/
|
|
446
|
+
async factoryStatusFactoryStatusGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FFStatusResponse> {
|
|
447
|
+
const response = await this.factoryStatusFactoryStatusGetRaw(initOverrides);
|
|
448
|
+
return await response.value();
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* 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.
|
|
453
|
+
* Get Task
|
|
454
|
+
*/
|
|
455
|
+
async getTaskFactoryTaskIdGetRaw(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>> {
|
|
456
|
+
if (requestParameters['taskId'] == null) {
|
|
457
|
+
throw new runtime.RequiredError(
|
|
458
|
+
'taskId',
|
|
459
|
+
'Required parameter "taskId" was null or undefined when calling getTaskFactoryTaskIdGet().'
|
|
460
|
+
);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
const queryParameters: any = {};
|
|
464
|
+
|
|
465
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
466
|
+
|
|
467
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
468
|
+
// oauth required
|
|
469
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
473
|
+
const token = this.configuration.accessToken;
|
|
474
|
+
const tokenString = await token("bearer_auth", []);
|
|
475
|
+
|
|
476
|
+
if (tokenString) {
|
|
477
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
const response = await this.request({
|
|
481
|
+
path: `/factory/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
482
|
+
method: 'GET',
|
|
483
|
+
headers: headerParameters,
|
|
484
|
+
query: queryParameters,
|
|
485
|
+
}, initOverrides);
|
|
486
|
+
|
|
487
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* 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.
|
|
492
|
+
* Get Task
|
|
493
|
+
*/
|
|
494
|
+
async getTaskFactoryTaskIdGet(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse> {
|
|
495
|
+
const response = await this.getTaskFactoryTaskIdGetRaw(requestParameters, initOverrides);
|
|
496
|
+
return await response.value();
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* 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
|
|
501
|
+
* List Tasks
|
|
502
|
+
*/
|
|
503
|
+
async listTasksFactoryGetRaw(requestParameters: ListTasksFactoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResponseBuildTaskShortResponse>> {
|
|
504
|
+
const queryParameters: any = {};
|
|
505
|
+
|
|
506
|
+
if (requestParameters['deviceId'] != null) {
|
|
507
|
+
queryParameters['device_id'] = requestParameters['deviceId'];
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
511
|
+
|
|
512
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
513
|
+
// oauth required
|
|
514
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
518
|
+
const token = this.configuration.accessToken;
|
|
519
|
+
const tokenString = await token("bearer_auth", []);
|
|
520
|
+
|
|
521
|
+
if (tokenString) {
|
|
522
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
const response = await this.request({
|
|
526
|
+
path: `/factory/`,
|
|
527
|
+
method: 'GET',
|
|
528
|
+
headers: headerParameters,
|
|
529
|
+
query: queryParameters,
|
|
530
|
+
}, initOverrides);
|
|
531
|
+
|
|
532
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListResponseBuildTaskShortResponseFromJSON(jsonValue));
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* 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
|
|
537
|
+
* List Tasks
|
|
538
|
+
*/
|
|
539
|
+
async listTasksFactoryGet(requestParameters: ListTasksFactoryGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListResponseBuildTaskShortResponse> {
|
|
540
|
+
const response = await this.listTasksFactoryGetRaw(requestParameters, initOverrides);
|
|
541
|
+
return await response.value();
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* 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.
|
|
546
|
+
* New Task
|
|
547
|
+
*/
|
|
548
|
+
async newTaskFactoryPostRaw(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
|
549
|
+
if (requestParameters['newBuildTaskBody'] == null) {
|
|
550
|
+
throw new runtime.RequiredError(
|
|
551
|
+
'newBuildTaskBody',
|
|
552
|
+
'Required parameter "newBuildTaskBody" was null or undefined when calling newTaskFactoryPost().'
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
const queryParameters: any = {};
|
|
557
|
+
|
|
558
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
559
|
+
|
|
560
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
561
|
+
|
|
562
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
563
|
+
// oauth required
|
|
564
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
568
|
+
const token = this.configuration.accessToken;
|
|
569
|
+
const tokenString = await token("bearer_auth", []);
|
|
570
|
+
|
|
571
|
+
if (tokenString) {
|
|
572
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
const response = await this.request({
|
|
576
|
+
path: `/factory/`,
|
|
577
|
+
method: 'POST',
|
|
578
|
+
headers: headerParameters,
|
|
579
|
+
query: queryParameters,
|
|
580
|
+
body: NewBuildTaskBodyToJSON(requestParameters['newBuildTaskBody']),
|
|
581
|
+
}, initOverrides);
|
|
582
|
+
|
|
583
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
584
|
+
return new runtime.JSONApiResponse<boolean>(response);
|
|
585
|
+
} else {
|
|
586
|
+
return new runtime.TextApiResponse(response) as any;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
/**
|
|
591
|
+
* 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.
|
|
592
|
+
* New Task
|
|
593
|
+
*/
|
|
594
|
+
async newTaskFactoryPost(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
|
|
595
|
+
const response = await this.newTaskFactoryPostRaw(requestParameters, initOverrides);
|
|
596
|
+
return await response.value();
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* 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.
|
|
601
|
+
* Update Task
|
|
602
|
+
*/
|
|
603
|
+
async updateTaskFactoryTaskIdPatchRaw(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
|
604
|
+
if (requestParameters['taskId'] == null) {
|
|
605
|
+
throw new runtime.RequiredError(
|
|
606
|
+
'taskId',
|
|
607
|
+
'Required parameter "taskId" was null or undefined when calling updateTaskFactoryTaskIdPatch().'
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
if (requestParameters['taskUpdateBody'] == null) {
|
|
612
|
+
throw new runtime.RequiredError(
|
|
613
|
+
'taskUpdateBody',
|
|
614
|
+
'Required parameter "taskUpdateBody" was null or undefined when calling updateTaskFactoryTaskIdPatch().'
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
const queryParameters: any = {};
|
|
619
|
+
|
|
620
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
621
|
+
|
|
622
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
623
|
+
|
|
624
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
625
|
+
// oauth required
|
|
626
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
630
|
+
const token = this.configuration.accessToken;
|
|
631
|
+
const tokenString = await token("bearer_auth", []);
|
|
632
|
+
|
|
633
|
+
if (tokenString) {
|
|
634
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
const response = await this.request({
|
|
638
|
+
path: `/factory/{task_id}`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
639
|
+
method: 'PATCH',
|
|
640
|
+
headers: headerParameters,
|
|
641
|
+
query: queryParameters,
|
|
642
|
+
body: TaskUpdateBodyToJSON(requestParameters['taskUpdateBody']),
|
|
643
|
+
}, initOverrides);
|
|
644
|
+
|
|
645
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
646
|
+
return new runtime.JSONApiResponse<boolean>(response);
|
|
647
|
+
} else {
|
|
648
|
+
return new runtime.TextApiResponse(response) as any;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
/**
|
|
653
|
+
* 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.
|
|
654
|
+
* Update Task
|
|
655
|
+
*/
|
|
656
|
+
async updateTaskFactoryTaskIdPatch(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
|
|
657
|
+
const response = await this.updateTaskFactoryTaskIdPatchRaw(requestParameters, initOverrides);
|
|
658
|
+
return await response.value();
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/**
|
|
662
|
+
* Endpoint for FoxFactory worker to update its status.
|
|
663
|
+
* Update Worker Status
|
|
664
|
+
*/
|
|
665
|
+
async updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
|
|
666
|
+
if (requestParameters['body'] == null) {
|
|
667
|
+
throw new runtime.RequiredError(
|
|
668
|
+
'body',
|
|
669
|
+
'Required parameter "body" was null or undefined when calling updateWorkerStatusFactoryUpdateStatusPost().'
|
|
670
|
+
);
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
const queryParameters: any = {};
|
|
674
|
+
|
|
675
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
676
|
+
|
|
677
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
678
|
+
|
|
679
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
680
|
+
// oauth required
|
|
681
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
685
|
+
const token = this.configuration.accessToken;
|
|
686
|
+
const tokenString = await token("bearer_auth", []);
|
|
687
|
+
|
|
688
|
+
if (tokenString) {
|
|
689
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
const response = await this.request({
|
|
693
|
+
path: `/factory/update_status`,
|
|
694
|
+
method: 'POST',
|
|
695
|
+
headers: headerParameters,
|
|
696
|
+
query: queryParameters,
|
|
697
|
+
body: requestParameters['body'] as any,
|
|
698
|
+
}, initOverrides);
|
|
699
|
+
|
|
700
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
701
|
+
return new runtime.JSONApiResponse<any>(response);
|
|
702
|
+
} else {
|
|
703
|
+
return new runtime.TextApiResponse(response) as any;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* Endpoint for FoxFactory worker to update its status.
|
|
709
|
+
* Update Worker Status
|
|
710
|
+
*/
|
|
711
|
+
async updateWorkerStatusFactoryUpdateStatusPost(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
|
|
712
|
+
const response = await this.updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters, initOverrides);
|
|
713
|
+
return await response.value();
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* 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
|
|
718
|
+
* Upload Artifact
|
|
719
|
+
*/
|
|
720
|
+
async uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
|
|
721
|
+
if (requestParameters['taskId'] == null) {
|
|
722
|
+
throw new runtime.RequiredError(
|
|
723
|
+
'taskId',
|
|
724
|
+
'Required parameter "taskId" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().'
|
|
725
|
+
);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (requestParameters['artifact'] == null) {
|
|
729
|
+
throw new runtime.RequiredError(
|
|
730
|
+
'artifact',
|
|
731
|
+
'Required parameter "artifact" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().'
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
if (requestParameters['md5Hash'] == null) {
|
|
736
|
+
throw new runtime.RequiredError(
|
|
737
|
+
'md5Hash',
|
|
738
|
+
'Required parameter "md5Hash" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().'
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
const queryParameters: any = {};
|
|
743
|
+
|
|
744
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
745
|
+
|
|
746
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
747
|
+
// oauth required
|
|
748
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
752
|
+
const token = this.configuration.accessToken;
|
|
753
|
+
const tokenString = await token("bearer_auth", []);
|
|
754
|
+
|
|
755
|
+
if (tokenString) {
|
|
756
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
const consumes: runtime.Consume[] = [
|
|
760
|
+
{ contentType: 'multipart/form-data' },
|
|
761
|
+
];
|
|
762
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
763
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
764
|
+
|
|
765
|
+
let formParams: { append(param: string, value: any): any };
|
|
766
|
+
let useForm = false;
|
|
767
|
+
// use FormData to transmit files using content-type "multipart/form-data"
|
|
768
|
+
useForm = canConsumeForm;
|
|
769
|
+
if (useForm) {
|
|
770
|
+
formParams = new FormData();
|
|
771
|
+
} else {
|
|
772
|
+
formParams = new URLSearchParams();
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
if (requestParameters['artifact'] != null) {
|
|
776
|
+
formParams.append('artifact', requestParameters['artifact'] as any);
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
if (requestParameters['md5Hash'] != null) {
|
|
780
|
+
formParams.append('md5_hash', requestParameters['md5Hash'] as any);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
const response = await this.request({
|
|
784
|
+
path: `/factory/{task_id}/artifact`.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId']))),
|
|
785
|
+
method: 'POST',
|
|
786
|
+
headers: headerParameters,
|
|
787
|
+
query: queryParameters,
|
|
788
|
+
body: formParams,
|
|
789
|
+
}, initOverrides);
|
|
790
|
+
|
|
791
|
+
if (this.isJsonMime(response.headers.get('content-type'))) {
|
|
792
|
+
return new runtime.JSONApiResponse<boolean>(response);
|
|
793
|
+
} else {
|
|
794
|
+
return new runtime.TextApiResponse(response) as any;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* 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
|
|
800
|
+
* Upload Artifact
|
|
801
|
+
*/
|
|
802
|
+
async uploadArtifactFactoryTaskIdArtifactPost(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
|
|
803
|
+
const response = await this.uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters, initOverrides);
|
|
804
|
+
return await response.value();
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
}
|