@orangefox-recovery/foxinternalclient 5.4.0 → 6.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (462) hide show
  1. package/.openapi-generator/FILES +34 -40
  2. package/README.md +74 -85
  3. package/dist/apis/DeviceApi.d.ts +89 -107
  4. package/dist/apis/DeviceApi.js +60 -71
  5. package/dist/apis/FoxFactoryApi.d.ts +163 -199
  6. package/dist/apis/FoxFactoryApi.js +122 -233
  7. package/dist/apis/GitlabApi.d.ts +21 -18
  8. package/dist/apis/GitlabApi.js +21 -12
  9. package/dist/apis/InternalApi.d.ts +452 -545
  10. package/dist/apis/InternalApi.js +413 -650
  11. package/dist/apis/PasteApi.d.ts +33 -39
  12. package/dist/apis/PasteApi.js +23 -27
  13. package/dist/apis/ReleaseApi.d.ts +145 -143
  14. package/dist/apis/ReleaseApi.js +108 -95
  15. package/dist/apis/ReportApi.d.ts +64 -0
  16. package/dist/apis/ReportApi.js +89 -0
  17. package/dist/apis/StatsApi.d.ts +19 -19
  18. package/dist/apis/StatsApi.js +14 -14
  19. package/dist/apis/index.d.ts +1 -0
  20. package/dist/apis/index.js +1 -0
  21. package/dist/esm/apis/DeviceApi.d.ts +89 -107
  22. package/dist/esm/apis/DeviceApi.js +61 -72
  23. package/dist/esm/apis/FoxFactoryApi.d.ts +163 -199
  24. package/dist/esm/apis/FoxFactoryApi.js +123 -234
  25. package/dist/esm/apis/GitlabApi.d.ts +21 -18
  26. package/dist/esm/apis/GitlabApi.js +21 -12
  27. package/dist/esm/apis/InternalApi.d.ts +452 -545
  28. package/dist/esm/apis/InternalApi.js +414 -651
  29. package/dist/esm/apis/PasteApi.d.ts +33 -39
  30. package/dist/esm/apis/PasteApi.js +24 -28
  31. package/dist/esm/apis/ReleaseApi.d.ts +145 -143
  32. package/dist/esm/apis/ReleaseApi.js +109 -96
  33. package/dist/esm/apis/ReportApi.d.ts +64 -0
  34. package/dist/esm/apis/ReportApi.js +85 -0
  35. package/dist/esm/apis/StatsApi.d.ts +19 -19
  36. package/dist/esm/apis/StatsApi.js +15 -15
  37. package/dist/esm/apis/index.d.ts +1 -0
  38. package/dist/esm/apis/index.js +1 -0
  39. package/dist/esm/models/BuildTaskResponse.d.ts +22 -26
  40. package/dist/esm/models/BuildTaskResponse.js +30 -24
  41. package/dist/esm/models/BuildTaskShortResponse.d.ts +19 -21
  42. package/dist/esm/models/BuildTaskShortResponse.js +27 -23
  43. package/dist/esm/models/ChangePasswordBody.d.ts +38 -0
  44. package/dist/esm/models/ChangePasswordBody.js +47 -0
  45. package/dist/esm/models/DeletePasskeyBody.d.ts +32 -0
  46. package/dist/esm/models/DeletePasskeyBody.js +43 -0
  47. package/dist/esm/models/DeviceInternalResponse.d.ts +40 -36
  48. package/dist/esm/models/DeviceInternalResponse.js +36 -30
  49. package/dist/esm/models/DeviceResponse.d.ts +33 -29
  50. package/dist/esm/models/DeviceResponse.js +34 -26
  51. package/dist/esm/models/DeviceStatsResponse.d.ts +2 -2
  52. package/dist/esm/models/DeviceStatsResponse.js +2 -2
  53. package/dist/esm/models/DeviceUpdateBody.d.ts +13 -13
  54. package/dist/esm/models/DeviceUpdateBody.js +8 -8
  55. package/dist/esm/models/ErrorResponse.d.ts +32 -0
  56. package/dist/esm/models/ErrorResponse.js +43 -0
  57. package/dist/esm/models/FFStatusResponse.d.ts +4 -5
  58. package/dist/esm/models/FFStatusResponse.js +4 -5
  59. package/dist/esm/models/GlobalStatsResponse.d.ts +52 -0
  60. package/dist/esm/models/{GlobalStatsAggregationModel.js → GlobalStatsResponse.js} +14 -14
  61. package/dist/esm/models/ListResponseBuildTaskShortResponse.d.ts +8 -8
  62. package/dist/esm/models/ListResponseBuildTaskShortResponse.js +8 -7
  63. package/dist/esm/models/ListResponseBuildTaskShortResponseDataInner.d.ts +87 -0
  64. package/dist/esm/models/ListResponseBuildTaskShortResponseDataInner.js +78 -0
  65. package/dist/esm/models/ListResponsePasteResponse.d.ts +39 -0
  66. package/dist/esm/models/ListResponsePasteResponse.js +48 -0
  67. package/dist/esm/models/ListResponsePasteResponseDataInner.d.ts +50 -0
  68. package/dist/esm/models/ListResponsePasteResponseDataInner.js +53 -0
  69. package/dist/esm/models/ListResponseReleaseResponse.d.ts +8 -8
  70. package/dist/esm/models/ListResponseReleaseResponse.js +8 -7
  71. package/dist/esm/models/ListResponseReleaseResponseDataInner.d.ts +155 -0
  72. package/dist/esm/models/ListResponseReleaseResponseDataInner.js +114 -0
  73. package/dist/esm/models/ListResponseShortDeviceResponse.d.ts +8 -8
  74. package/dist/esm/models/ListResponseShortDeviceResponse.js +8 -7
  75. package/dist/esm/models/ListResponseShortDeviceResponseDataInner.d.ts +98 -0
  76. package/dist/esm/models/ListResponseShortDeviceResponseDataInner.js +85 -0
  77. package/dist/esm/models/ListResponseString.d.ts +38 -0
  78. package/dist/esm/models/ListResponseString.js +47 -0
  79. package/dist/esm/models/ListResponseUserShortResponse.d.ts +8 -8
  80. package/dist/esm/models/ListResponseUserShortResponse.js +8 -7
  81. package/dist/esm/models/ListResponseUserShortResponseDataInner.d.ts +50 -0
  82. package/dist/esm/models/ListResponseUserShortResponseDataInner.js +55 -0
  83. package/dist/esm/models/LogListResponse.d.ts +5 -5
  84. package/dist/esm/models/LogListResponse.js +6 -6
  85. package/dist/esm/models/LogResponse.d.ts +15 -17
  86. package/dist/esm/models/LogResponse.js +16 -16
  87. package/dist/esm/models/LoginForm.d.ts +38 -0
  88. package/dist/esm/models/LoginForm.js +47 -0
  89. package/dist/esm/models/MaintainerShortResponse.d.ts +50 -0
  90. package/dist/esm/models/MaintainerShortResponse.js +55 -0
  91. package/dist/esm/models/NewBuildTaskBody.d.ts +13 -8
  92. package/dist/esm/models/NewBuildTaskBody.js +8 -7
  93. package/dist/esm/models/NewDeviceBody.d.ts +8 -8
  94. package/dist/esm/models/NewDeviceBody.js +9 -9
  95. package/dist/esm/models/NewReportRequest.d.ts +58 -0
  96. package/dist/esm/models/NewReportRequest.js +55 -0
  97. package/dist/esm/models/PasskeyCredentialResponse.d.ts +15 -15
  98. package/dist/esm/models/PasskeyCredentialResponse.js +14 -14
  99. package/dist/esm/models/PasskeyRegisterOptionsRequest.d.ts +3 -3
  100. package/dist/esm/models/PasskeyRegisterOptionsRequest.js +2 -2
  101. package/dist/esm/models/PasskeyVerifyRequest.d.ts +8 -10
  102. package/dist/esm/models/PasskeyVerifyRequest.js +6 -6
  103. package/dist/esm/models/PasteInput.d.ts +3 -3
  104. package/dist/esm/models/PasteInput.js +2 -2
  105. package/dist/esm/models/PasteResponse.d.ts +50 -0
  106. package/dist/esm/models/PasteResponse.js +53 -0
  107. package/dist/esm/models/RecoveryImgResponse.d.ts +6 -6
  108. package/dist/esm/models/RecoveryImgResponse.js +6 -6
  109. package/dist/esm/models/ReleaseGroupsResponse.d.ts +2 -2
  110. package/dist/esm/models/ReleaseGroupsResponse.js +2 -2
  111. package/dist/esm/models/ReleaseInternalResponse.d.ts +54 -53
  112. package/dist/esm/models/ReleaseInternalResponse.js +52 -53
  113. package/dist/esm/models/ReleaseResponse.d.ts +46 -42
  114. package/dist/esm/models/ReleaseResponse.js +45 -44
  115. package/dist/esm/models/ReleaseStatsResponse.d.ts +2 -2
  116. package/dist/esm/models/ReleaseStatsResponse.js +2 -2
  117. package/dist/esm/models/ReleaseUpdateBody.d.ts +9 -9
  118. package/dist/esm/models/ReleaseUpdateBody.js +6 -6
  119. package/dist/esm/models/RenamePasskeyBody.d.ts +3 -3
  120. package/dist/esm/models/RenamePasskeyBody.js +2 -2
  121. package/dist/esm/models/ShortDeviceResponse.d.ts +29 -25
  122. package/dist/esm/models/ShortDeviceResponse.js +26 -18
  123. package/dist/esm/models/ShortReleaseResponse.d.ts +31 -27
  124. package/dist/esm/models/ShortReleaseResponse.js +35 -32
  125. package/dist/esm/models/TaskUpdateBody.d.ts +7 -8
  126. package/dist/esm/models/TaskUpdateBody.js +4 -5
  127. package/dist/esm/models/TokenResponse.d.ts +3 -3
  128. package/dist/esm/models/TokenResponse.js +5 -3
  129. package/dist/esm/models/UserInternalResponse.d.ts +21 -24
  130. package/dist/esm/models/UserInternalResponse.js +20 -23
  131. package/dist/esm/models/UserShortResponse.d.ts +7 -7
  132. package/dist/esm/models/UserShortResponse.js +9 -9
  133. package/dist/esm/models/UserUpdateBody.d.ts +9 -9
  134. package/dist/esm/models/UserUpdateBody.js +8 -8
  135. package/dist/esm/models/WorkerStatusBody.d.ts +32 -0
  136. package/dist/esm/models/WorkerStatusBody.js +43 -0
  137. package/dist/esm/models/index.d.ts +16 -20
  138. package/dist/esm/models/index.js +16 -20
  139. package/dist/esm/runtime.d.ts +2 -2
  140. package/dist/esm/runtime.js +2 -2
  141. package/dist/models/BuildTaskResponse.d.ts +22 -26
  142. package/dist/models/BuildTaskResponse.js +30 -24
  143. package/dist/models/BuildTaskShortResponse.d.ts +19 -21
  144. package/dist/models/BuildTaskShortResponse.js +27 -23
  145. package/dist/models/ChangePasswordBody.d.ts +38 -0
  146. package/dist/models/ChangePasswordBody.js +54 -0
  147. package/dist/models/DeletePasskeyBody.d.ts +32 -0
  148. package/dist/models/DeletePasskeyBody.js +50 -0
  149. package/dist/models/DeviceInternalResponse.d.ts +40 -36
  150. package/dist/models/DeviceInternalResponse.js +36 -30
  151. package/dist/models/DeviceResponse.d.ts +33 -29
  152. package/dist/models/DeviceResponse.js +34 -26
  153. package/dist/models/DeviceStatsResponse.d.ts +2 -2
  154. package/dist/models/DeviceStatsResponse.js +2 -2
  155. package/dist/models/DeviceUpdateBody.d.ts +13 -13
  156. package/dist/models/DeviceUpdateBody.js +8 -8
  157. package/dist/models/ErrorResponse.d.ts +32 -0
  158. package/dist/models/ErrorResponse.js +50 -0
  159. package/dist/models/FFStatusResponse.d.ts +4 -5
  160. package/dist/models/FFStatusResponse.js +4 -5
  161. package/dist/models/GlobalStatsResponse.d.ts +52 -0
  162. package/dist/models/GlobalStatsResponse.js +62 -0
  163. package/dist/models/ListResponseBuildTaskShortResponse.d.ts +8 -8
  164. package/dist/models/ListResponseBuildTaskShortResponse.js +8 -7
  165. package/dist/models/ListResponseBuildTaskShortResponseDataInner.d.ts +87 -0
  166. package/dist/models/ListResponseBuildTaskShortResponseDataInner.js +85 -0
  167. package/dist/models/ListResponsePasteResponse.d.ts +39 -0
  168. package/dist/models/ListResponsePasteResponse.js +55 -0
  169. package/dist/models/ListResponsePasteResponseDataInner.d.ts +50 -0
  170. package/dist/models/ListResponsePasteResponseDataInner.js +60 -0
  171. package/dist/models/ListResponseReleaseResponse.d.ts +8 -8
  172. package/dist/models/ListResponseReleaseResponse.js +8 -7
  173. package/dist/models/ListResponseReleaseResponseDataInner.d.ts +155 -0
  174. package/dist/models/ListResponseReleaseResponseDataInner.js +121 -0
  175. package/dist/models/ListResponseShortDeviceResponse.d.ts +8 -8
  176. package/dist/models/ListResponseShortDeviceResponse.js +8 -7
  177. package/dist/models/ListResponseShortDeviceResponseDataInner.d.ts +98 -0
  178. package/dist/models/ListResponseShortDeviceResponseDataInner.js +92 -0
  179. package/dist/models/ListResponseString.d.ts +38 -0
  180. package/dist/models/ListResponseString.js +54 -0
  181. package/dist/models/ListResponseUserShortResponse.d.ts +8 -8
  182. package/dist/models/ListResponseUserShortResponse.js +8 -7
  183. package/dist/models/ListResponseUserShortResponseDataInner.d.ts +50 -0
  184. package/dist/models/ListResponseUserShortResponseDataInner.js +62 -0
  185. package/dist/models/LogListResponse.d.ts +5 -5
  186. package/dist/models/LogListResponse.js +6 -6
  187. package/dist/models/LogResponse.d.ts +15 -17
  188. package/dist/models/LogResponse.js +16 -16
  189. package/dist/models/LoginForm.d.ts +38 -0
  190. package/dist/models/LoginForm.js +54 -0
  191. package/dist/models/MaintainerShortResponse.d.ts +50 -0
  192. package/dist/models/MaintainerShortResponse.js +62 -0
  193. package/dist/models/NewBuildTaskBody.d.ts +13 -8
  194. package/dist/models/NewBuildTaskBody.js +8 -7
  195. package/dist/models/NewDeviceBody.d.ts +8 -8
  196. package/dist/models/NewDeviceBody.js +9 -9
  197. package/dist/models/NewReportRequest.d.ts +58 -0
  198. package/dist/models/NewReportRequest.js +62 -0
  199. package/dist/models/PasskeyCredentialResponse.d.ts +15 -15
  200. package/dist/models/PasskeyCredentialResponse.js +14 -14
  201. package/dist/models/PasskeyRegisterOptionsRequest.d.ts +3 -3
  202. package/dist/models/PasskeyRegisterOptionsRequest.js +2 -2
  203. package/dist/models/PasskeyVerifyRequest.d.ts +8 -10
  204. package/dist/models/PasskeyVerifyRequest.js +6 -6
  205. package/dist/models/PasteInput.d.ts +3 -3
  206. package/dist/models/PasteInput.js +2 -2
  207. package/dist/models/PasteResponse.d.ts +50 -0
  208. package/dist/models/PasteResponse.js +60 -0
  209. package/dist/models/RecoveryImgResponse.d.ts +6 -6
  210. package/dist/models/RecoveryImgResponse.js +6 -6
  211. package/dist/models/ReleaseGroupsResponse.d.ts +2 -2
  212. package/dist/models/ReleaseGroupsResponse.js +2 -2
  213. package/dist/models/ReleaseInternalResponse.d.ts +54 -53
  214. package/dist/models/ReleaseInternalResponse.js +52 -53
  215. package/dist/models/ReleaseResponse.d.ts +46 -42
  216. package/dist/models/ReleaseResponse.js +45 -44
  217. package/dist/models/ReleaseStatsResponse.d.ts +2 -2
  218. package/dist/models/ReleaseStatsResponse.js +2 -2
  219. package/dist/models/ReleaseUpdateBody.d.ts +9 -9
  220. package/dist/models/ReleaseUpdateBody.js +6 -6
  221. package/dist/models/RenamePasskeyBody.d.ts +3 -3
  222. package/dist/models/RenamePasskeyBody.js +2 -2
  223. package/dist/models/ShortDeviceResponse.d.ts +29 -25
  224. package/dist/models/ShortDeviceResponse.js +26 -18
  225. package/dist/models/ShortReleaseResponse.d.ts +31 -27
  226. package/dist/models/ShortReleaseResponse.js +35 -32
  227. package/dist/models/TaskUpdateBody.d.ts +7 -8
  228. package/dist/models/TaskUpdateBody.js +4 -5
  229. package/dist/models/TokenResponse.d.ts +3 -3
  230. package/dist/models/TokenResponse.js +5 -3
  231. package/dist/models/UserInternalResponse.d.ts +21 -24
  232. package/dist/models/UserInternalResponse.js +20 -23
  233. package/dist/models/UserShortResponse.d.ts +7 -7
  234. package/dist/models/UserShortResponse.js +9 -9
  235. package/dist/models/UserUpdateBody.d.ts +9 -9
  236. package/dist/models/UserUpdateBody.js +8 -8
  237. package/dist/models/WorkerStatusBody.d.ts +32 -0
  238. package/dist/models/WorkerStatusBody.js +50 -0
  239. package/dist/models/index.d.ts +16 -20
  240. package/dist/models/index.js +16 -20
  241. package/dist/runtime.d.ts +2 -2
  242. package/dist/runtime.js +2 -2
  243. package/docs/BuildTaskResponse.md +13 -13
  244. package/docs/BuildTaskShortResponse.md +12 -12
  245. package/docs/{BodyChangePasswordProfileChangePasswordPost.md → ChangePasswordBody.md} +6 -6
  246. package/docs/{PasswordConfirmationBody.md → DeletePasskeyBody.md} +5 -4
  247. package/docs/DeviceApi.md +83 -90
  248. package/docs/DeviceInternalResponse.md +22 -19
  249. package/docs/DeviceResponse.md +19 -17
  250. package/docs/DeviceUpdateBody.md +7 -6
  251. package/docs/{LocationInner.md → ErrorResponse.md} +6 -4
  252. package/docs/FFStatusResponse.md +1 -1
  253. package/docs/FoxFactoryApi.md +140 -191
  254. package/docs/GitlabApi.md +21 -14
  255. package/docs/{GlobalStatsAggregationModel.md → GlobalStatsResponse.md} +6 -6
  256. package/docs/InternalApi.md +433 -586
  257. package/docs/ListResponseBuildTaskShortResponse.md +2 -2
  258. package/docs/ListResponseBuildTaskShortResponseDataInner.md +52 -0
  259. package/docs/{ListResponseShortReleaseResponse.md → ListResponsePasteResponse.md} +6 -6
  260. package/docs/{UserGitlab.md → ListResponsePasteResponseDataInner.md} +11 -5
  261. package/docs/ListResponseReleaseResponse.md +2 -2
  262. package/docs/ListResponseReleaseResponseDataInner.md +74 -0
  263. package/docs/ListResponseShortDeviceResponse.md +2 -2
  264. package/docs/ListResponseShortDeviceResponseDataInner.md +56 -0
  265. package/docs/{ListResponseStr.md → ListResponseString.md} +6 -6
  266. package/docs/ListResponseUserShortResponse.md +2 -2
  267. package/docs/ListResponseUserShortResponseDataInner.md +40 -0
  268. package/docs/LogListResponse.md +2 -2
  269. package/docs/LogResponse.md +10 -10
  270. package/docs/{UserMail.md → LoginForm.md} +7 -4
  271. package/docs/{MaintainerShortModel.md → MaintainerShortResponse.md} +9 -7
  272. package/docs/NewBuildTaskBody.md +6 -3
  273. package/docs/NewDeviceBody.md +5 -4
  274. package/docs/{FFStatusEnum.md → NewReportRequest.md} +14 -4
  275. package/docs/PasskeyCredentialResponse.md +9 -8
  276. package/docs/PasskeyRegisterOptionsRequest.md +1 -0
  277. package/docs/PasskeyVerifyRequest.md +4 -3
  278. package/docs/PasteApi.md +25 -29
  279. package/docs/{PasteOutput.md → PasteResponse.md} +7 -7
  280. package/docs/RecoveryImgResponse.md +2 -2
  281. package/docs/ReleaseApi.md +176 -118
  282. package/docs/ReleaseInternalResponse.md +34 -31
  283. package/docs/ReleaseResponse.md +28 -26
  284. package/docs/ReleaseUpdateBody.md +5 -4
  285. package/docs/RenamePasskeyBody.md +1 -0
  286. package/docs/ReportApi.md +84 -0
  287. package/docs/ShortDeviceResponse.md +14 -12
  288. package/docs/ShortReleaseResponse.md +22 -20
  289. package/docs/StatsApi.md +10 -10
  290. package/docs/TaskUpdateBody.md +3 -2
  291. package/docs/UserInternalResponse.md +13 -13
  292. package/docs/UserShortResponse.md +4 -4
  293. package/docs/UserUpdateBody.md +7 -6
  294. package/docs/{BuildStatusEnum.md → WorkerStatusBody.md} +6 -4
  295. package/package.json +3 -12
  296. package/src/apis/DeviceApi.ts +130 -148
  297. package/src/apis/FoxFactoryApi.ts +239 -385
  298. package/src/apis/GitlabApi.ts +36 -25
  299. package/src/apis/InternalApi.ts +736 -1113
  300. package/src/apis/PasteApi.ts +47 -53
  301. package/src/apis/ReleaseApi.ts +237 -228
  302. package/src/apis/ReportApi.ts +139 -0
  303. package/src/apis/StatsApi.ts +28 -25
  304. package/src/apis/index.ts +1 -0
  305. package/src/models/BuildTaskResponse.ts +45 -57
  306. package/src/models/BuildTaskShortResponse.ts +40 -53
  307. package/src/models/ChangePasswordBody.ts +75 -0
  308. package/src/models/DeletePasskeyBody.ts +66 -0
  309. package/src/models/DeviceInternalResponse.ts +75 -66
  310. package/src/models/DeviceResponse.ts +65 -55
  311. package/src/models/DeviceStatsResponse.ts +2 -2
  312. package/src/models/DeviceUpdateBody.ts +19 -19
  313. package/src/models/ErrorResponse.ts +66 -0
  314. package/src/models/FFStatusResponse.ts +6 -16
  315. package/src/models/GlobalStatsResponse.ts +93 -0
  316. package/src/models/ListResponseBuildTaskShortResponse.ts +17 -16
  317. package/src/models/ListResponseBuildTaskShortResponseDataInner.ts +154 -0
  318. package/src/models/ListResponsePasteResponse.ts +83 -0
  319. package/src/models/ListResponsePasteResponseDataInner.ts +92 -0
  320. package/src/models/ListResponseReleaseResponse.ts +17 -16
  321. package/src/models/ListResponseReleaseResponseDataInner.ts +249 -0
  322. package/src/models/ListResponseShortDeviceResponse.ts +17 -16
  323. package/src/models/ListResponseShortDeviceResponseDataInner.ts +164 -0
  324. package/src/models/ListResponseString.ts +75 -0
  325. package/src/models/ListResponseUserShortResponse.ts +17 -16
  326. package/src/models/ListResponseUserShortResponseDataInner.ts +93 -0
  327. package/src/models/LogListResponse.ts +8 -8
  328. package/src/models/LogResponse.ts +32 -32
  329. package/src/models/LoginForm.ts +75 -0
  330. package/src/models/MaintainerShortResponse.ts +93 -0
  331. package/src/models/NewBuildTaskBody.ts +19 -21
  332. package/src/models/NewDeviceBody.ts +14 -14
  333. package/src/models/NewReportRequest.ts +100 -0
  334. package/src/models/PasskeyCredentialResponse.ts +25 -25
  335. package/src/models/PasskeyRegisterOptionsRequest.ts +3 -3
  336. package/src/models/PasskeyVerifyRequest.ts +11 -11
  337. package/src/models/PasteInput.ts +3 -3
  338. package/src/models/PasteResponse.ts +92 -0
  339. package/src/models/RecoveryImgResponse.ts +9 -9
  340. package/src/models/ReleaseGroupsResponse.ts +2 -2
  341. package/src/models/ReleaseInternalResponse.ts +104 -112
  342. package/src/models/ReleaseResponse.ts +85 -86
  343. package/src/models/ReleaseStatsResponse.ts +2 -2
  344. package/src/models/ReleaseUpdateBody.ts +13 -13
  345. package/src/models/RenamePasskeyBody.ts +3 -3
  346. package/src/models/ShortDeviceResponse.ts +50 -40
  347. package/src/models/ShortReleaseResponse.ts +62 -64
  348. package/src/models/TaskUpdateBody.ts +9 -19
  349. package/src/models/TokenResponse.ts +5 -4
  350. package/src/models/UserInternalResponse.ts +38 -59
  351. package/src/models/UserShortResponse.ts +13 -13
  352. package/src/models/UserUpdateBody.ts +15 -15
  353. package/src/models/WorkerStatusBody.ts +66 -0
  354. package/src/models/index.ts +16 -20
  355. package/src/runtime.ts +2 -2
  356. package/dist/esm/models/BodyChangePasswordProfileChangePasswordPost.d.ts +0 -38
  357. package/dist/esm/models/BodyChangePasswordProfileChangePasswordPost.js +0 -47
  358. package/dist/esm/models/BuildStatusEnum.d.ts +0 -30
  359. package/dist/esm/models/BuildStatusEnum.js +0 -48
  360. package/dist/esm/models/FFStatusEnum.d.ts +0 -26
  361. package/dist/esm/models/FFStatusEnum.js +0 -44
  362. package/dist/esm/models/GlobalStatsAggregationModel.d.ts +0 -52
  363. package/dist/esm/models/HTTPValidationError.d.ts +0 -33
  364. package/dist/esm/models/HTTPValidationError.js +0 -42
  365. package/dist/esm/models/ListResponseShortReleaseResponse.d.ts +0 -39
  366. package/dist/esm/models/ListResponseShortReleaseResponse.js +0 -47
  367. package/dist/esm/models/ListResponseStr.d.ts +0 -38
  368. package/dist/esm/models/ListResponseStr.js +0 -46
  369. package/dist/esm/models/LocationInner.d.ts +0 -26
  370. package/dist/esm/models/LocationInner.js +0 -31
  371. package/dist/esm/models/MaintainerShortModel.d.ts +0 -44
  372. package/dist/esm/models/MaintainerShortModel.js +0 -51
  373. package/dist/esm/models/PasskeyOptionsResponse.d.ts +0 -40
  374. package/dist/esm/models/PasskeyOptionsResponse.js +0 -47
  375. package/dist/esm/models/PasswordConfirmationBody.d.ts +0 -32
  376. package/dist/esm/models/PasswordConfirmationBody.js +0 -43
  377. package/dist/esm/models/PasteOutput.d.ts +0 -50
  378. package/dist/esm/models/PasteOutput.js +0 -53
  379. package/dist/esm/models/ReleaseInternalResponsePropValue.d.ts +0 -26
  380. package/dist/esm/models/ReleaseInternalResponsePropValue.js +0 -31
  381. package/dist/esm/models/ReleaseType.d.ts +0 -26
  382. package/dist/esm/models/ReleaseType.js +0 -44
  383. package/dist/esm/models/ReleasesSort.d.ts +0 -25
  384. package/dist/esm/models/ReleasesSort.js +0 -43
  385. package/dist/esm/models/ResponseGetReleases.d.ts +0 -41
  386. package/dist/esm/models/ResponseGetReleases.js +0 -46
  387. package/dist/esm/models/UserGitlab.d.ts +0 -32
  388. package/dist/esm/models/UserGitlab.js +0 -43
  389. package/dist/esm/models/UserMail.d.ts +0 -32
  390. package/dist/esm/models/UserMail.js +0 -43
  391. package/dist/esm/models/UserTelegram.d.ts +0 -32
  392. package/dist/esm/models/UserTelegram.js +0 -43
  393. package/dist/esm/models/ValidationError.d.ts +0 -57
  394. package/dist/esm/models/ValidationError.js +0 -56
  395. package/dist/models/BodyChangePasswordProfileChangePasswordPost.d.ts +0 -38
  396. package/dist/models/BodyChangePasswordProfileChangePasswordPost.js +0 -54
  397. package/dist/models/BuildStatusEnum.d.ts +0 -30
  398. package/dist/models/BuildStatusEnum.js +0 -56
  399. package/dist/models/FFStatusEnum.d.ts +0 -26
  400. package/dist/models/FFStatusEnum.js +0 -52
  401. package/dist/models/GlobalStatsAggregationModel.d.ts +0 -52
  402. package/dist/models/GlobalStatsAggregationModel.js +0 -62
  403. package/dist/models/HTTPValidationError.d.ts +0 -33
  404. package/dist/models/HTTPValidationError.js +0 -49
  405. package/dist/models/ListResponseShortReleaseResponse.d.ts +0 -39
  406. package/dist/models/ListResponseShortReleaseResponse.js +0 -54
  407. package/dist/models/ListResponseStr.d.ts +0 -38
  408. package/dist/models/ListResponseStr.js +0 -53
  409. package/dist/models/LocationInner.d.ts +0 -26
  410. package/dist/models/LocationInner.js +0 -38
  411. package/dist/models/MaintainerShortModel.d.ts +0 -44
  412. package/dist/models/MaintainerShortModel.js +0 -58
  413. package/dist/models/PasskeyOptionsResponse.d.ts +0 -40
  414. package/dist/models/PasskeyOptionsResponse.js +0 -54
  415. package/dist/models/PasswordConfirmationBody.d.ts +0 -32
  416. package/dist/models/PasswordConfirmationBody.js +0 -50
  417. package/dist/models/PasteOutput.d.ts +0 -50
  418. package/dist/models/PasteOutput.js +0 -60
  419. package/dist/models/ReleaseInternalResponsePropValue.d.ts +0 -26
  420. package/dist/models/ReleaseInternalResponsePropValue.js +0 -38
  421. package/dist/models/ReleaseType.d.ts +0 -26
  422. package/dist/models/ReleaseType.js +0 -52
  423. package/dist/models/ReleasesSort.d.ts +0 -25
  424. package/dist/models/ReleasesSort.js +0 -51
  425. package/dist/models/ResponseGetReleases.d.ts +0 -41
  426. package/dist/models/ResponseGetReleases.js +0 -53
  427. package/dist/models/UserGitlab.d.ts +0 -32
  428. package/dist/models/UserGitlab.js +0 -50
  429. package/dist/models/UserMail.d.ts +0 -32
  430. package/dist/models/UserMail.js +0 -50
  431. package/dist/models/UserTelegram.d.ts +0 -32
  432. package/dist/models/UserTelegram.js +0 -50
  433. package/dist/models/ValidationError.d.ts +0 -57
  434. package/dist/models/ValidationError.js +0 -63
  435. package/docs/HTTPValidationError.md +0 -34
  436. package/docs/PasskeyOptionsResponse.md +0 -36
  437. package/docs/ReleaseInternalResponsePropValue.md +0 -32
  438. package/docs/ReleaseType.md +0 -32
  439. package/docs/ReleasesSort.md +0 -32
  440. package/docs/ResponseGetReleases.md +0 -36
  441. package/docs/UserTelegram.md +0 -34
  442. package/docs/ValidationError.md +0 -42
  443. package/src/models/BodyChangePasswordProfileChangePasswordPost.ts +0 -75
  444. package/src/models/BuildStatusEnum.ts +0 -58
  445. package/src/models/FFStatusEnum.ts +0 -54
  446. package/src/models/GlobalStatsAggregationModel.ts +0 -93
  447. package/src/models/HTTPValidationError.ts +0 -73
  448. package/src/models/ListResponseShortReleaseResponse.ts +0 -82
  449. package/src/models/ListResponseStr.ts +0 -74
  450. package/src/models/LocationInner.ts +0 -46
  451. package/src/models/MaintainerShortModel.ts +0 -84
  452. package/src/models/PasskeyOptionsResponse.ts +0 -75
  453. package/src/models/PasswordConfirmationBody.ts +0 -66
  454. package/src/models/PasteOutput.ts +0 -92
  455. package/src/models/ReleaseInternalResponsePropValue.ts +0 -46
  456. package/src/models/ReleaseType.ts +0 -54
  457. package/src/models/ReleasesSort.ts +0 -53
  458. package/src/models/ResponseGetReleases.ts +0 -96
  459. package/src/models/UserGitlab.ts +0 -66
  460. package/src/models/UserMail.ts +0 -66
  461. package/src/models/UserTelegram.ts +0 -66
  462. package/src/models/ValidationError.ts +0 -108
@@ -2,9 +2,9 @@
2
2
  /* eslint-disable */
3
3
  /**
4
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.
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
6
  *
7
- * The version of the OpenAPI document: 5.4.0
7
+ * The version of the OpenAPI document: 6.0.4
8
8
  * Contact: admin@orangefox.tech
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -16,67 +16,65 @@
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
18
  BuildTaskResponse,
19
- FFStatusEnum,
19
+ ErrorResponse,
20
20
  FFStatusResponse,
21
- HTTPValidationError,
22
21
  ListResponseBuildTaskShortResponse,
23
22
  NewBuildTaskBody,
24
23
  TaskUpdateBody,
24
+ WorkerStatusBody,
25
25
  } from '../models/index';
26
26
  import {
27
27
  BuildTaskResponseFromJSON,
28
28
  BuildTaskResponseToJSON,
29
- FFStatusEnumFromJSON,
30
- FFStatusEnumToJSON,
29
+ ErrorResponseFromJSON,
30
+ ErrorResponseToJSON,
31
31
  FFStatusResponseFromJSON,
32
32
  FFStatusResponseToJSON,
33
- HTTPValidationErrorFromJSON,
34
- HTTPValidationErrorToJSON,
35
33
  ListResponseBuildTaskShortResponseFromJSON,
36
34
  ListResponseBuildTaskShortResponseToJSON,
37
35
  NewBuildTaskBodyFromJSON,
38
36
  NewBuildTaskBodyToJSON,
39
37
  TaskUpdateBodyFromJSON,
40
38
  TaskUpdateBodyToJSON,
39
+ WorkerStatusBodyFromJSON,
40
+ WorkerStatusBodyToJSON,
41
41
  } from '../models/index';
42
42
 
43
- export interface CancelTaskFactoryTaskIdCancelPostRequest {
43
+ export interface CancelTaskRequest {
44
44
  taskId: string;
45
45
  }
46
46
 
47
- export interface DeleteTaskFactoryTaskIdDeleteRequest {
48
- taskId: string;
47
+ export interface CreateTaskRequest {
48
+ newBuildTaskBody: NewBuildTaskBody;
49
49
  }
50
50
 
51
- export interface DownloadArtifactFactoryTaskIdArtifactGetRequest {
51
+ export interface DeleteTaskRequest {
52
52
  taskId: string;
53
53
  }
54
54
 
55
- export interface GetTaskFactoryTaskIdGetRequest {
55
+ export interface DownloadArtifactRequest {
56
56
  taskId: string;
57
57
  }
58
58
 
59
- export interface ListTasksFactoryGetRequest {
60
- deviceId?: string | null;
59
+ export interface GetTaskRequest {
60
+ taskId: string;
61
61
  }
62
62
 
63
- export interface NewTaskFactoryPostRequest {
64
- newBuildTaskBody: NewBuildTaskBody;
63
+ export interface ListTasksRequest {
64
+ deviceId?: string | null;
65
65
  }
66
66
 
67
- export interface UpdateTaskFactoryTaskIdPatchRequest {
67
+ export interface UpdateTaskRequest {
68
68
  taskId: string;
69
69
  taskUpdateBody: TaskUpdateBody;
70
70
  }
71
71
 
72
- export interface UpdateWorkerStatusFactoryUpdateStatusPostRequest {
73
- body: string;
72
+ export interface UpdateWorkerStatusRequest {
73
+ workerStatusBody: WorkerStatusBody;
74
74
  }
75
75
 
76
- export interface UploadArtifactFactoryTaskIdArtifactPostRequest {
76
+ export interface UploadArtifactRequest {
77
77
  taskId: string;
78
- artifact: string;
79
- md5Hash: string;
80
78
  }
81
79
 
82
80
  /**
@@ -87,248 +85,234 @@ export interface UploadArtifactFactoryTaskIdArtifactPostRequest {
87
85
  */
88
86
  export interface FoxFactoryApiInterface {
89
87
  /**
90
- * Creates request options for cancelTaskFactoryTaskIdCancelPost without sending the request
91
- * @param {string} taskId
88
+ * Creates request options for cancelTask without sending the request
89
+ * @param {string} taskId Build task ID
92
90
  * @throws {RequiredError}
93
91
  * @memberof FoxFactoryApiInterface
94
92
  */
95
- cancelTaskFactoryTaskIdCancelPostRequestOpts(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest): Promise<runtime.RequestOpts>;
93
+ cancelTaskRequestOpts(requestParameters: CancelTaskRequest): Promise<runtime.RequestOpts>;
96
94
 
97
95
  /**
98
- * 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.
99
- * @summary Cancel Task
100
- * @param {string} taskId
96
+ *
97
+ * @summary POST /internal/factory/{task_id}/cancel – Cancel a running build task.
98
+ * @param {string} taskId Build task ID
101
99
  * @param {*} [options] Override http request option.
102
100
  * @throws {RequiredError}
103
101
  * @memberof FoxFactoryApiInterface
104
102
  */
105
- cancelTaskFactoryTaskIdCancelPostRaw(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>>;
103
+ cancelTaskRaw(requestParameters: CancelTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>>;
106
104
 
107
105
  /**
108
- * 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.
109
- * Cancel Task
106
+ * POST /internal/factory/{task_id}/cancel Cancel a running build task.
110
107
  */
111
- cancelTaskFactoryTaskIdCancelPost(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse>;
108
+ cancelTask(requestParameters: CancelTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse>;
112
109
 
113
110
  /**
114
- * Creates request options for deleteTaskFactoryTaskIdDelete without sending the request
115
- * @param {string} taskId
111
+ * Creates request options for createTask without sending the request
112
+ * @param {NewBuildTaskBody} newBuildTaskBody
116
113
  * @throws {RequiredError}
117
114
  * @memberof FoxFactoryApiInterface
118
115
  */
119
- deleteTaskFactoryTaskIdDeleteRequestOpts(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest): Promise<runtime.RequestOpts>;
116
+ createTaskRequestOpts(requestParameters: CreateTaskRequest): Promise<runtime.RequestOpts>;
120
117
 
121
118
  /**
122
- * 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.
123
- * @summary Delete Task
124
- * @param {string} taskId
119
+ *
120
+ * @summary POST /internal/factory – Create a new build task.
121
+ * @param {NewBuildTaskBody} newBuildTaskBody
125
122
  * @param {*} [options] Override http request option.
126
123
  * @throws {RequiredError}
127
124
  * @memberof FoxFactoryApiInterface
128
125
  */
129
- deleteTaskFactoryTaskIdDeleteRaw(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
126
+ createTaskRaw(requestParameters: CreateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
130
127
 
131
128
  /**
132
- * 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.
133
- * Delete Task
129
+ * POST /internal/factory Create a new build task.
134
130
  */
135
- deleteTaskFactoryTaskIdDelete(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
131
+ createTask(requestParameters: CreateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
136
132
 
137
133
  /**
138
- * Creates request options for downloadArtifactFactoryTaskIdArtifactGet without sending the request
139
- * @param {string} taskId
134
+ * Creates request options for deleteTask without sending the request
135
+ * @param {string} taskId Build task ID
140
136
  * @throws {RequiredError}
141
137
  * @memberof FoxFactoryApiInterface
142
138
  */
143
- downloadArtifactFactoryTaskIdArtifactGetRequestOpts(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest): Promise<runtime.RequestOpts>;
139
+ deleteTaskRequestOpts(requestParameters: DeleteTaskRequest): Promise<runtime.RequestOpts>;
144
140
 
145
141
  /**
146
- * 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
147
- * @summary Download Artifact
148
- * @param {string} taskId
142
+ *
143
+ * @summary DELETE /internal/factory/{task_id} – Delete a build task and its artifact.
144
+ * @param {string} taskId Build task ID
149
145
  * @param {*} [options] Override http request option.
150
146
  * @throws {RequiredError}
151
147
  * @memberof FoxFactoryApiInterface
152
148
  */
153
- downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
149
+ deleteTaskRaw(requestParameters: DeleteTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
154
150
 
155
151
  /**
156
- * 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
157
- * Download Artifact
152
+ * DELETE /internal/factory/{task_id} Delete a build task and its artifact.
158
153
  */
159
- downloadArtifactFactoryTaskIdArtifactGet(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
154
+ deleteTask(requestParameters: DeleteTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
160
155
 
161
156
  /**
162
- * Creates request options for factoryStatusFactoryStatusGet without sending the request
157
+ * Creates request options for downloadArtifact without sending the request
158
+ * @param {string} taskId Build task ID
163
159
  * @throws {RequiredError}
164
160
  * @memberof FoxFactoryApiInterface
165
161
  */
166
- factoryStatusFactoryStatusGetRequestOpts(): Promise<runtime.RequestOpts>;
162
+ downloadArtifactRequestOpts(requestParameters: DownloadArtifactRequest): Promise<runtime.RequestOpts>;
167
163
 
168
164
  /**
169
- * 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.
170
- * @summary Factory Status
165
+ *
166
+ * @summary GET /internal/factory/{task_id}/artifact – Download a build artifact.
167
+ * @param {string} taskId Build task ID
171
168
  * @param {*} [options] Override http request option.
172
169
  * @throws {RequiredError}
173
170
  * @memberof FoxFactoryApiInterface
174
171
  */
175
- factoryStatusFactoryStatusGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FFStatusResponse>>;
172
+ downloadArtifactRaw(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
176
173
 
177
174
  /**
178
- * 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.
179
- * Factory Status
175
+ * GET /internal/factory/{task_id}/artifact Download a build artifact.
180
176
  */
181
- factoryStatusFactoryStatusGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FFStatusResponse>;
177
+ downloadArtifact(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
182
178
 
183
179
  /**
184
- * Creates request options for getTaskFactoryTaskIdGet without sending the request
185
- * @param {string} taskId
180
+ * Creates request options for getFactoryStatus without sending the request
186
181
  * @throws {RequiredError}
187
182
  * @memberof FoxFactoryApiInterface
188
183
  */
189
- getTaskFactoryTaskIdGetRequestOpts(requestParameters: GetTaskFactoryTaskIdGetRequest): Promise<runtime.RequestOpts>;
184
+ getFactoryStatusRequestOpts(): Promise<runtime.RequestOpts>;
190
185
 
191
186
  /**
192
- * 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.
193
- * @summary Get Task
194
- * @param {string} taskId
187
+ *
188
+ * @summary GET /internal/factory/status – Get the current FoxFactory worker status.
195
189
  * @param {*} [options] Override http request option.
196
190
  * @throws {RequiredError}
197
191
  * @memberof FoxFactoryApiInterface
198
192
  */
199
- getTaskFactoryTaskIdGetRaw(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>>;
193
+ getFactoryStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FFStatusResponse>>;
200
194
 
201
195
  /**
202
- * 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.
203
- * Get Task
196
+ * GET /internal/factory/status Get the current FoxFactory worker status.
204
197
  */
205
- getTaskFactoryTaskIdGet(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse>;
198
+ getFactoryStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FFStatusResponse>;
206
199
 
207
200
  /**
208
- * Creates request options for listTasksFactoryGet without sending the request
209
- * @param {string} [deviceId]
201
+ * Creates request options for getTask without sending the request
202
+ * @param {string} taskId Build task ID
210
203
  * @throws {RequiredError}
211
204
  * @memberof FoxFactoryApiInterface
212
205
  */
213
- listTasksFactoryGetRequestOpts(requestParameters: ListTasksFactoryGetRequest): Promise<runtime.RequestOpts>;
206
+ getTaskRequestOpts(requestParameters: GetTaskRequest): Promise<runtime.RequestOpts>;
214
207
 
215
208
  /**
216
- * 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
217
- * @summary List Tasks
218
- * @param {string} [deviceId]
209
+ *
210
+ * @summary GET /internal/factory/{task_id} – Get a single build task.
211
+ * @param {string} taskId Build task ID
219
212
  * @param {*} [options] Override http request option.
220
213
  * @throws {RequiredError}
221
214
  * @memberof FoxFactoryApiInterface
222
215
  */
223
- listTasksFactoryGetRaw(requestParameters: ListTasksFactoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResponseBuildTaskShortResponse>>;
216
+ getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>>;
224
217
 
225
218
  /**
226
- * 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
227
- * List Tasks
219
+ * GET /internal/factory/{task_id} Get a single build task.
228
220
  */
229
- listTasksFactoryGet(requestParameters: ListTasksFactoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListResponseBuildTaskShortResponse>;
221
+ getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse>;
230
222
 
231
223
  /**
232
- * Creates request options for newTaskFactoryPost without sending the request
233
- * @param {NewBuildTaskBody} newBuildTaskBody
224
+ * Creates request options for listTasks without sending the request
225
+ * @param {string} [deviceId]
234
226
  * @throws {RequiredError}
235
227
  * @memberof FoxFactoryApiInterface
236
228
  */
237
- newTaskFactoryPostRequestOpts(requestParameters: NewTaskFactoryPostRequest): Promise<runtime.RequestOpts>;
229
+ listTasksRequestOpts(requestParameters: ListTasksRequest): Promise<runtime.RequestOpts>;
238
230
 
239
231
  /**
240
- * 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.
241
- * @summary New Task
242
- * @param {NewBuildTaskBody} newBuildTaskBody
232
+ *
233
+ * @summary GET /internal/factory – List build tasks.
234
+ * @param {string} [deviceId]
243
235
  * @param {*} [options] Override http request option.
244
236
  * @throws {RequiredError}
245
237
  * @memberof FoxFactoryApiInterface
246
238
  */
247
- newTaskFactoryPostRaw(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
239
+ listTasksRaw(requestParameters: ListTasksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResponseBuildTaskShortResponse>>;
248
240
 
249
241
  /**
250
- * 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.
251
- * New Task
242
+ * GET /internal/factory List build tasks.
252
243
  */
253
- newTaskFactoryPost(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
244
+ listTasks(requestParameters: ListTasksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListResponseBuildTaskShortResponse>;
254
245
 
255
246
  /**
256
- * Creates request options for updateTaskFactoryTaskIdPatch without sending the request
257
- * @param {string} taskId
247
+ * Creates request options for updateTask without sending the request
248
+ * @param {string} taskId Build task ID
258
249
  * @param {TaskUpdateBody} taskUpdateBody
259
250
  * @throws {RequiredError}
260
251
  * @memberof FoxFactoryApiInterface
261
252
  */
262
- updateTaskFactoryTaskIdPatchRequestOpts(requestParameters: UpdateTaskFactoryTaskIdPatchRequest): Promise<runtime.RequestOpts>;
253
+ updateTaskRequestOpts(requestParameters: UpdateTaskRequest): Promise<runtime.RequestOpts>;
263
254
 
264
255
  /**
265
- * 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.
266
- * @summary Update Task
267
- * @param {string} taskId
256
+ *
257
+ * @summary PATCH /internal/factory/{task_id} – Update task status / logs.
258
+ * @param {string} taskId Build task ID
268
259
  * @param {TaskUpdateBody} taskUpdateBody
269
260
  * @param {*} [options] Override http request option.
270
261
  * @throws {RequiredError}
271
262
  * @memberof FoxFactoryApiInterface
272
263
  */
273
- updateTaskFactoryTaskIdPatchRaw(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
264
+ updateTaskRaw(requestParameters: UpdateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
274
265
 
275
266
  /**
276
- * 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.
277
- * Update Task
267
+ * PATCH /internal/factory/{task_id} Update task status / logs.
278
268
  */
279
- updateTaskFactoryTaskIdPatch(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
269
+ updateTask(requestParameters: UpdateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
280
270
 
281
271
  /**
282
- * Creates request options for updateWorkerStatusFactoryUpdateStatusPost without sending the request
283
- * @param {string} body
272
+ * Creates request options for updateWorkerStatus without sending the request
273
+ * @param {WorkerStatusBody} workerStatusBody
284
274
  * @throws {RequiredError}
285
275
  * @memberof FoxFactoryApiInterface
286
276
  */
287
- updateWorkerStatusFactoryUpdateStatusPostRequestOpts(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest): Promise<runtime.RequestOpts>;
277
+ updateWorkerStatusRequestOpts(requestParameters: UpdateWorkerStatusRequest): Promise<runtime.RequestOpts>;
288
278
 
289
279
  /**
290
- * Endpoint for FoxFactory worker to update its status.
291
- * @summary Update Worker Status
292
- * @param {string} body
280
+ *
281
+ * @summary POST /internal/factory/update_status – Worker heartbeat / status update.
282
+ * @param {WorkerStatusBody} workerStatusBody
293
283
  * @param {*} [options] Override http request option.
294
284
  * @throws {RequiredError}
295
285
  * @memberof FoxFactoryApiInterface
296
286
  */
297
- updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>>;
287
+ updateWorkerStatusRaw(requestParameters: UpdateWorkerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
298
288
 
299
289
  /**
300
- * Endpoint for FoxFactory worker to update its status.
301
- * Update Worker Status
290
+ * POST /internal/factory/update_status Worker heartbeat / status update.
302
291
  */
303
- updateWorkerStatusFactoryUpdateStatusPost(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any>;
292
+ updateWorkerStatus(requestParameters: UpdateWorkerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
304
293
 
305
294
  /**
306
- * Creates request options for uploadArtifactFactoryTaskIdArtifactPost without sending the request
307
- * @param {string} taskId
308
- * @param {string} artifact
309
- * @param {string} md5Hash
295
+ * Creates request options for uploadArtifact without sending the request
296
+ * @param {string} taskId Build task ID
310
297
  * @throws {RequiredError}
311
298
  * @memberof FoxFactoryApiInterface
312
299
  */
313
- uploadArtifactFactoryTaskIdArtifactPostRequestOpts(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest): Promise<runtime.RequestOpts>;
300
+ uploadArtifactRequestOpts(requestParameters: UploadArtifactRequest): Promise<runtime.RequestOpts>;
314
301
 
315
302
  /**
316
- * 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
317
- * @summary Upload Artifact
318
- * @param {string} taskId
319
- * @param {string} artifact
320
- * @param {string} md5Hash
303
+ *
304
+ * @summary POST /internal/factory/{task_id}/artifact – Upload a build artifact.
305
+ * @param {string} taskId Build task ID
321
306
  * @param {*} [options] Override http request option.
322
307
  * @throws {RequiredError}
323
308
  * @memberof FoxFactoryApiInterface
324
309
  */
325
- uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
310
+ uploadArtifactRaw(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>>;
326
311
 
327
312
  /**
328
- * 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
329
- * Upload Artifact
313
+ * POST /internal/factory/{task_id}/artifact Upload a build artifact.
330
314
  */
331
- uploadArtifactFactoryTaskIdArtifactPost(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
315
+ uploadArtifact(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean>;
332
316
 
333
317
  }
334
318
 
@@ -338,13 +322,13 @@ export interface FoxFactoryApiInterface {
338
322
  export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInterface {
339
323
 
340
324
  /**
341
- * Creates request options for cancelTaskFactoryTaskIdCancelPost without sending the request
325
+ * Creates request options for cancelTask without sending the request
342
326
  */
343
- async cancelTaskFactoryTaskIdCancelPostRequestOpts(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest): Promise<runtime.RequestOpts> {
327
+ async cancelTaskRequestOpts(requestParameters: CancelTaskRequest): Promise<runtime.RequestOpts> {
344
328
  if (requestParameters['taskId'] == null) {
345
329
  throw new runtime.RequiredError(
346
330
  'taskId',
347
- 'Required parameter "taskId" was null or undefined when calling cancelTaskFactoryTaskIdCancelPost().'
331
+ 'Required parameter "taskId" was null or undefined when calling cancelTask().'
348
332
  );
349
333
  }
350
334
 
@@ -352,11 +336,6 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
352
336
 
353
337
  const headerParameters: runtime.HTTPHeaders = {};
354
338
 
355
- if (this.configuration && this.configuration.accessToken) {
356
- // oauth required
357
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
358
- }
359
-
360
339
  if (this.configuration && this.configuration.accessToken) {
361
340
  const token = this.configuration.accessToken;
362
341
  const tokenString = await token("bearer_auth", []);
@@ -378,33 +357,31 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
378
357
  }
379
358
 
380
359
  /**
381
- * 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.
382
- * Cancel Task
360
+ * POST /internal/factory/{task_id}/cancel Cancel a running build task.
383
361
  */
384
- async cancelTaskFactoryTaskIdCancelPostRaw(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>> {
385
- const requestOptions = await this.cancelTaskFactoryTaskIdCancelPostRequestOpts(requestParameters);
362
+ async cancelTaskRaw(requestParameters: CancelTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>> {
363
+ const requestOptions = await this.cancelTaskRequestOpts(requestParameters);
386
364
  const response = await this.request(requestOptions, initOverrides);
387
365
 
388
366
  return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
389
367
  }
390
368
 
391
369
  /**
392
- * 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.
393
- * Cancel Task
370
+ * POST /internal/factory/{task_id}/cancel Cancel a running build task.
394
371
  */
395
- async cancelTaskFactoryTaskIdCancelPost(requestParameters: CancelTaskFactoryTaskIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse> {
396
- const response = await this.cancelTaskFactoryTaskIdCancelPostRaw(requestParameters, initOverrides);
372
+ async cancelTask(requestParameters: CancelTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse> {
373
+ const response = await this.cancelTaskRaw(requestParameters, initOverrides);
397
374
  return await response.value();
398
375
  }
399
376
 
400
377
  /**
401
- * Creates request options for deleteTaskFactoryTaskIdDelete without sending the request
378
+ * Creates request options for createTask without sending the request
402
379
  */
403
- async deleteTaskFactoryTaskIdDeleteRequestOpts(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest): Promise<runtime.RequestOpts> {
404
- if (requestParameters['taskId'] == null) {
380
+ async createTaskRequestOpts(requestParameters: CreateTaskRequest): Promise<runtime.RequestOpts> {
381
+ if (requestParameters['newBuildTaskBody'] == null) {
405
382
  throw new runtime.RequiredError(
406
- 'taskId',
407
- 'Required parameter "taskId" was null or undefined when calling deleteTaskFactoryTaskIdDelete().'
383
+ 'newBuildTaskBody',
384
+ 'Required parameter "newBuildTaskBody" was null or undefined when calling createTask().'
408
385
  );
409
386
  }
410
387
 
@@ -412,10 +389,7 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
412
389
 
413
390
  const headerParameters: runtime.HTTPHeaders = {};
414
391
 
415
- if (this.configuration && this.configuration.accessToken) {
416
- // oauth required
417
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
418
- }
392
+ headerParameters['Content-Type'] = 'application/json';
419
393
 
420
394
  if (this.configuration && this.configuration.accessToken) {
421
395
  const token = this.configuration.accessToken;
@@ -426,49 +400,42 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
426
400
  }
427
401
  }
428
402
 
429
- let urlPath = `/factory/{task_id}`;
430
- urlPath = urlPath.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId'])));
403
+ let urlPath = `/factory`;
431
404
 
432
405
  return {
433
406
  path: urlPath,
434
- method: 'DELETE',
407
+ method: 'POST',
435
408
  headers: headerParameters,
436
409
  query: queryParameters,
410
+ body: NewBuildTaskBodyToJSON(requestParameters['newBuildTaskBody']),
437
411
  };
438
412
  }
439
413
 
440
414
  /**
441
- * 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.
442
- * Delete Task
415
+ * POST /internal/factory Create a new build task.
443
416
  */
444
- async deleteTaskFactoryTaskIdDeleteRaw(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
445
- const requestOptions = await this.deleteTaskFactoryTaskIdDeleteRequestOpts(requestParameters);
417
+ async createTaskRaw(requestParameters: CreateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
418
+ const requestOptions = await this.createTaskRequestOpts(requestParameters);
446
419
  const response = await this.request(requestOptions, initOverrides);
447
420
 
448
- if (this.isJsonMime(response.headers.get('content-type'))) {
449
- return new runtime.JSONApiResponse<boolean>(response);
450
- } else {
451
- return new runtime.TextApiResponse(response) as any;
452
- }
421
+ return new runtime.VoidApiResponse(response);
453
422
  }
454
423
 
455
424
  /**
456
- * 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.
457
- * Delete Task
425
+ * POST /internal/factory Create a new build task.
458
426
  */
459
- async deleteTaskFactoryTaskIdDelete(requestParameters: DeleteTaskFactoryTaskIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
460
- const response = await this.deleteTaskFactoryTaskIdDeleteRaw(requestParameters, initOverrides);
461
- return await response.value();
427
+ async createTask(requestParameters: CreateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
428
+ await this.createTaskRaw(requestParameters, initOverrides);
462
429
  }
463
430
 
464
431
  /**
465
- * Creates request options for downloadArtifactFactoryTaskIdArtifactGet without sending the request
432
+ * Creates request options for deleteTask without sending the request
466
433
  */
467
- async downloadArtifactFactoryTaskIdArtifactGetRequestOpts(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest): Promise<runtime.RequestOpts> {
434
+ async deleteTaskRequestOpts(requestParameters: DeleteTaskRequest): Promise<runtime.RequestOpts> {
468
435
  if (requestParameters['taskId'] == null) {
469
436
  throw new runtime.RequiredError(
470
437
  'taskId',
471
- 'Required parameter "taskId" was null or undefined when calling downloadArtifactFactoryTaskIdArtifactGet().'
438
+ 'Required parameter "taskId" was null or undefined when calling deleteTask().'
472
439
  );
473
440
  }
474
441
 
@@ -476,11 +443,6 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
476
443
 
477
444
  const headerParameters: runtime.HTTPHeaders = {};
478
445
 
479
- if (this.configuration && this.configuration.accessToken) {
480
- // oauth required
481
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
482
- }
483
-
484
446
  if (this.configuration && this.configuration.accessToken) {
485
447
  const token = this.configuration.accessToken;
486
448
  const tokenString = await token("bearer_auth", []);
@@ -490,54 +452,54 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
490
452
  }
491
453
  }
492
454
 
493
- let urlPath = `/factory/{task_id}/artifact`;
455
+ let urlPath = `/factory/{task_id}`;
494
456
  urlPath = urlPath.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId'])));
495
457
 
496
458
  return {
497
459
  path: urlPath,
498
- method: 'GET',
460
+ method: 'DELETE',
499
461
  headers: headerParameters,
500
462
  query: queryParameters,
501
463
  };
502
464
  }
503
465
 
504
466
  /**
505
- * 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
506
- * Download Artifact
467
+ * DELETE /internal/factory/{task_id} Delete a build task and its artifact.
507
468
  */
508
- async downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
509
- const requestOptions = await this.downloadArtifactFactoryTaskIdArtifactGetRequestOpts(requestParameters);
469
+ async deleteTaskRaw(requestParameters: DeleteTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
470
+ const requestOptions = await this.deleteTaskRequestOpts(requestParameters);
510
471
  const response = await this.request(requestOptions, initOverrides);
511
472
 
512
473
  if (this.isJsonMime(response.headers.get('content-type'))) {
513
- return new runtime.JSONApiResponse<any>(response);
474
+ return new runtime.JSONApiResponse<boolean>(response);
514
475
  } else {
515
476
  return new runtime.TextApiResponse(response) as any;
516
477
  }
517
478
  }
518
479
 
519
480
  /**
520
- * 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
521
- * Download Artifact
481
+ * DELETE /internal/factory/{task_id} Delete a build task and its artifact.
522
482
  */
523
- async downloadArtifactFactoryTaskIdArtifactGet(requestParameters: DownloadArtifactFactoryTaskIdArtifactGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
524
- const response = await this.downloadArtifactFactoryTaskIdArtifactGetRaw(requestParameters, initOverrides);
483
+ async deleteTask(requestParameters: DeleteTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
484
+ const response = await this.deleteTaskRaw(requestParameters, initOverrides);
525
485
  return await response.value();
526
486
  }
527
487
 
528
488
  /**
529
- * Creates request options for factoryStatusFactoryStatusGet without sending the request
489
+ * Creates request options for downloadArtifact without sending the request
530
490
  */
531
- async factoryStatusFactoryStatusGetRequestOpts(): Promise<runtime.RequestOpts> {
491
+ async downloadArtifactRequestOpts(requestParameters: DownloadArtifactRequest): Promise<runtime.RequestOpts> {
492
+ if (requestParameters['taskId'] == null) {
493
+ throw new runtime.RequiredError(
494
+ 'taskId',
495
+ 'Required parameter "taskId" was null or undefined when calling downloadArtifact().'
496
+ );
497
+ }
498
+
532
499
  const queryParameters: any = {};
533
500
 
534
501
  const headerParameters: runtime.HTTPHeaders = {};
535
502
 
536
- if (this.configuration && this.configuration.accessToken) {
537
- // oauth required
538
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
539
- }
540
-
541
503
  if (this.configuration && this.configuration.accessToken) {
542
504
  const token = this.configuration.accessToken;
543
505
  const tokenString = await token("bearer_auth", []);
@@ -547,7 +509,8 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
547
509
  }
548
510
  }
549
511
 
550
- let urlPath = `/factory/status`;
512
+ let urlPath = `/factory/{task_id}/artifact`;
513
+ urlPath = urlPath.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId'])));
551
514
 
552
515
  return {
553
516
  path: urlPath,
@@ -558,56 +521,32 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
558
521
  }
559
522
 
560
523
  /**
561
- * 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.
562
- * Factory Status
524
+ * GET /internal/factory/{task_id}/artifact Download a build artifact.
563
525
  */
564
- async factoryStatusFactoryStatusGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FFStatusResponse>> {
565
- const requestOptions = await this.factoryStatusFactoryStatusGetRequestOpts();
526
+ async downloadArtifactRaw(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
527
+ const requestOptions = await this.downloadArtifactRequestOpts(requestParameters);
566
528
  const response = await this.request(requestOptions, initOverrides);
567
529
 
568
- return new runtime.JSONApiResponse(response, (jsonValue) => FFStatusResponseFromJSON(jsonValue));
530
+ return new runtime.VoidApiResponse(response);
569
531
  }
570
532
 
571
533
  /**
572
- * 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.
573
- * Factory Status
534
+ * GET /internal/factory/{task_id}/artifact Download a build artifact.
574
535
  */
575
- async factoryStatusFactoryStatusGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FFStatusResponse> {
576
- const response = await this.factoryStatusFactoryStatusGetRaw(initOverrides);
577
- return await response.value();
536
+ async downloadArtifact(requestParameters: DownloadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
537
+ await this.downloadArtifactRaw(requestParameters, initOverrides);
578
538
  }
579
539
 
580
540
  /**
581
- * Creates request options for getTaskFactoryTaskIdGet without sending the request
541
+ * Creates request options for getFactoryStatus without sending the request
582
542
  */
583
- async getTaskFactoryTaskIdGetRequestOpts(requestParameters: GetTaskFactoryTaskIdGetRequest): Promise<runtime.RequestOpts> {
584
- if (requestParameters['taskId'] == null) {
585
- throw new runtime.RequiredError(
586
- 'taskId',
587
- 'Required parameter "taskId" was null or undefined when calling getTaskFactoryTaskIdGet().'
588
- );
589
- }
590
-
543
+ async getFactoryStatusRequestOpts(): Promise<runtime.RequestOpts> {
591
544
  const queryParameters: any = {};
592
545
 
593
546
  const headerParameters: runtime.HTTPHeaders = {};
594
547
 
595
- if (this.configuration && this.configuration.accessToken) {
596
- // oauth required
597
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
598
- }
599
-
600
- if (this.configuration && this.configuration.accessToken) {
601
- const token = this.configuration.accessToken;
602
- const tokenString = await token("bearer_auth", []);
603
548
 
604
- if (tokenString) {
605
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
606
- }
607
- }
608
-
609
- let urlPath = `/factory/{task_id}`;
610
- urlPath = urlPath.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId'])));
549
+ let urlPath = `/factory/status`;
611
550
 
612
551
  return {
613
552
  path: urlPath,
@@ -618,41 +557,37 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
618
557
  }
619
558
 
620
559
  /**
621
- * 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.
622
- * Get Task
560
+ * GET /internal/factory/status Get the current FoxFactory worker status.
623
561
  */
624
- async getTaskFactoryTaskIdGetRaw(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>> {
625
- const requestOptions = await this.getTaskFactoryTaskIdGetRequestOpts(requestParameters);
562
+ async getFactoryStatusRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FFStatusResponse>> {
563
+ const requestOptions = await this.getFactoryStatusRequestOpts();
626
564
  const response = await this.request(requestOptions, initOverrides);
627
565
 
628
- return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
566
+ return new runtime.JSONApiResponse(response, (jsonValue) => FFStatusResponseFromJSON(jsonValue));
629
567
  }
630
568
 
631
569
  /**
632
- * 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.
633
- * Get Task
570
+ * GET /internal/factory/status Get the current FoxFactory worker status.
634
571
  */
635
- async getTaskFactoryTaskIdGet(requestParameters: GetTaskFactoryTaskIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse> {
636
- const response = await this.getTaskFactoryTaskIdGetRaw(requestParameters, initOverrides);
572
+ async getFactoryStatus(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FFStatusResponse> {
573
+ const response = await this.getFactoryStatusRaw(initOverrides);
637
574
  return await response.value();
638
575
  }
639
576
 
640
577
  /**
641
- * Creates request options for listTasksFactoryGet without sending the request
578
+ * Creates request options for getTask without sending the request
642
579
  */
643
- async listTasksFactoryGetRequestOpts(requestParameters: ListTasksFactoryGetRequest): Promise<runtime.RequestOpts> {
644
- const queryParameters: any = {};
645
-
646
- if (requestParameters['deviceId'] != null) {
647
- queryParameters['device_id'] = requestParameters['deviceId'];
580
+ async getTaskRequestOpts(requestParameters: GetTaskRequest): Promise<runtime.RequestOpts> {
581
+ if (requestParameters['taskId'] == null) {
582
+ throw new runtime.RequiredError(
583
+ 'taskId',
584
+ 'Required parameter "taskId" was null or undefined when calling getTask().'
585
+ );
648
586
  }
649
587
 
650
- const headerParameters: runtime.HTTPHeaders = {};
588
+ const queryParameters: any = {};
651
589
 
652
- if (this.configuration && this.configuration.accessToken) {
653
- // oauth required
654
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
655
- }
590
+ const headerParameters: runtime.HTTPHeaders = {};
656
591
 
657
592
  if (this.configuration && this.configuration.accessToken) {
658
593
  const token = this.configuration.accessToken;
@@ -663,7 +598,8 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
663
598
  }
664
599
  }
665
600
 
666
- let urlPath = `/factory/`;
601
+ let urlPath = `/factory/{task_id}`;
602
+ urlPath = urlPath.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId'])));
667
603
 
668
604
  return {
669
605
  path: urlPath,
@@ -674,47 +610,35 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
674
610
  }
675
611
 
676
612
  /**
677
- * 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
678
- * List Tasks
613
+ * GET /internal/factory/{task_id} Get a single build task.
679
614
  */
680
- async listTasksFactoryGetRaw(requestParameters: ListTasksFactoryGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResponseBuildTaskShortResponse>> {
681
- const requestOptions = await this.listTasksFactoryGetRequestOpts(requestParameters);
615
+ async getTaskRaw(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BuildTaskResponse>> {
616
+ const requestOptions = await this.getTaskRequestOpts(requestParameters);
682
617
  const response = await this.request(requestOptions, initOverrides);
683
618
 
684
- return new runtime.JSONApiResponse(response, (jsonValue) => ListResponseBuildTaskShortResponseFromJSON(jsonValue));
619
+ return new runtime.JSONApiResponse(response, (jsonValue) => BuildTaskResponseFromJSON(jsonValue));
685
620
  }
686
621
 
687
622
  /**
688
- * 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
689
- * List Tasks
623
+ * GET /internal/factory/{task_id} Get a single build task.
690
624
  */
691
- async listTasksFactoryGet(requestParameters: ListTasksFactoryGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListResponseBuildTaskShortResponse> {
692
- const response = await this.listTasksFactoryGetRaw(requestParameters, initOverrides);
625
+ async getTask(requestParameters: GetTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuildTaskResponse> {
626
+ const response = await this.getTaskRaw(requestParameters, initOverrides);
693
627
  return await response.value();
694
628
  }
695
629
 
696
630
  /**
697
- * Creates request options for newTaskFactoryPost without sending the request
631
+ * Creates request options for listTasks without sending the request
698
632
  */
699
- async newTaskFactoryPostRequestOpts(requestParameters: NewTaskFactoryPostRequest): Promise<runtime.RequestOpts> {
700
- if (requestParameters['newBuildTaskBody'] == null) {
701
- throw new runtime.RequiredError(
702
- 'newBuildTaskBody',
703
- 'Required parameter "newBuildTaskBody" was null or undefined when calling newTaskFactoryPost().'
704
- );
705
- }
706
-
633
+ async listTasksRequestOpts(requestParameters: ListTasksRequest): Promise<runtime.RequestOpts> {
707
634
  const queryParameters: any = {};
708
635
 
709
- const headerParameters: runtime.HTTPHeaders = {};
710
-
711
- headerParameters['Content-Type'] = 'application/json';
712
-
713
- if (this.configuration && this.configuration.accessToken) {
714
- // oauth required
715
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
636
+ if (requestParameters['deviceId'] != null) {
637
+ queryParameters['device_id'] = requestParameters['deviceId'];
716
638
  }
717
639
 
640
+ const headerParameters: runtime.HTTPHeaders = {};
641
+
718
642
  if (this.configuration && this.configuration.accessToken) {
719
643
  const token = this.configuration.accessToken;
720
644
  const tokenString = await token("bearer_auth", []);
@@ -724,56 +648,49 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
724
648
  }
725
649
  }
726
650
 
727
- let urlPath = `/factory/`;
651
+ let urlPath = `/factory`;
728
652
 
729
653
  return {
730
654
  path: urlPath,
731
- method: 'POST',
655
+ method: 'GET',
732
656
  headers: headerParameters,
733
657
  query: queryParameters,
734
- body: NewBuildTaskBodyToJSON(requestParameters['newBuildTaskBody']),
735
658
  };
736
659
  }
737
660
 
738
661
  /**
739
- * 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.
740
- * New Task
662
+ * GET /internal/factory List build tasks.
741
663
  */
742
- async newTaskFactoryPostRaw(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
743
- const requestOptions = await this.newTaskFactoryPostRequestOpts(requestParameters);
664
+ async listTasksRaw(requestParameters: ListTasksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListResponseBuildTaskShortResponse>> {
665
+ const requestOptions = await this.listTasksRequestOpts(requestParameters);
744
666
  const response = await this.request(requestOptions, initOverrides);
745
667
 
746
- if (this.isJsonMime(response.headers.get('content-type'))) {
747
- return new runtime.JSONApiResponse<boolean>(response);
748
- } else {
749
- return new runtime.TextApiResponse(response) as any;
750
- }
668
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListResponseBuildTaskShortResponseFromJSON(jsonValue));
751
669
  }
752
670
 
753
671
  /**
754
- * 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.
755
- * New Task
672
+ * GET /internal/factory List build tasks.
756
673
  */
757
- async newTaskFactoryPost(requestParameters: NewTaskFactoryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
758
- const response = await this.newTaskFactoryPostRaw(requestParameters, initOverrides);
674
+ async listTasks(requestParameters: ListTasksRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListResponseBuildTaskShortResponse> {
675
+ const response = await this.listTasksRaw(requestParameters, initOverrides);
759
676
  return await response.value();
760
677
  }
761
678
 
762
679
  /**
763
- * Creates request options for updateTaskFactoryTaskIdPatch without sending the request
680
+ * Creates request options for updateTask without sending the request
764
681
  */
765
- async updateTaskFactoryTaskIdPatchRequestOpts(requestParameters: UpdateTaskFactoryTaskIdPatchRequest): Promise<runtime.RequestOpts> {
682
+ async updateTaskRequestOpts(requestParameters: UpdateTaskRequest): Promise<runtime.RequestOpts> {
766
683
  if (requestParameters['taskId'] == null) {
767
684
  throw new runtime.RequiredError(
768
685
  'taskId',
769
- 'Required parameter "taskId" was null or undefined when calling updateTaskFactoryTaskIdPatch().'
686
+ 'Required parameter "taskId" was null or undefined when calling updateTask().'
770
687
  );
771
688
  }
772
689
 
773
690
  if (requestParameters['taskUpdateBody'] == null) {
774
691
  throw new runtime.RequiredError(
775
692
  'taskUpdateBody',
776
- 'Required parameter "taskUpdateBody" was null or undefined when calling updateTaskFactoryTaskIdPatch().'
693
+ 'Required parameter "taskUpdateBody" was null or undefined when calling updateTask().'
777
694
  );
778
695
  }
779
696
 
@@ -783,11 +700,6 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
783
700
 
784
701
  headerParameters['Content-Type'] = 'application/json';
785
702
 
786
- if (this.configuration && this.configuration.accessToken) {
787
- // oauth required
788
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
789
- }
790
-
791
703
  if (this.configuration && this.configuration.accessToken) {
792
704
  const token = this.configuration.accessToken;
793
705
  const tokenString = await token("bearer_auth", []);
@@ -810,11 +722,10 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
810
722
  }
811
723
 
812
724
  /**
813
- * 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.
814
- * Update Task
725
+ * PATCH /internal/factory/{task_id} Update task status / logs.
815
726
  */
816
- async updateTaskFactoryTaskIdPatchRaw(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
817
- const requestOptions = await this.updateTaskFactoryTaskIdPatchRequestOpts(requestParameters);
727
+ async updateTaskRaw(requestParameters: UpdateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
728
+ const requestOptions = await this.updateTaskRequestOpts(requestParameters);
818
729
  const response = await this.request(requestOptions, initOverrides);
819
730
 
820
731
  if (this.isJsonMime(response.headers.get('content-type'))) {
@@ -825,22 +736,21 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
825
736
  }
826
737
 
827
738
  /**
828
- * 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.
829
- * Update Task
739
+ * PATCH /internal/factory/{task_id} Update task status / logs.
830
740
  */
831
- async updateTaskFactoryTaskIdPatch(requestParameters: UpdateTaskFactoryTaskIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
832
- const response = await this.updateTaskFactoryTaskIdPatchRaw(requestParameters, initOverrides);
741
+ async updateTask(requestParameters: UpdateTaskRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
742
+ const response = await this.updateTaskRaw(requestParameters, initOverrides);
833
743
  return await response.value();
834
744
  }
835
745
 
836
746
  /**
837
- * Creates request options for updateWorkerStatusFactoryUpdateStatusPost without sending the request
747
+ * Creates request options for updateWorkerStatus without sending the request
838
748
  */
839
- async updateWorkerStatusFactoryUpdateStatusPostRequestOpts(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest): Promise<runtime.RequestOpts> {
840
- if (requestParameters['body'] == null) {
749
+ async updateWorkerStatusRequestOpts(requestParameters: UpdateWorkerStatusRequest): Promise<runtime.RequestOpts> {
750
+ if (requestParameters['workerStatusBody'] == null) {
841
751
  throw new runtime.RequiredError(
842
- 'body',
843
- 'Required parameter "body" was null or undefined when calling updateWorkerStatusFactoryUpdateStatusPost().'
752
+ 'workerStatusBody',
753
+ 'Required parameter "workerStatusBody" was null or undefined when calling updateWorkerStatus().'
844
754
  );
845
755
  }
846
756
 
@@ -850,11 +760,6 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
850
760
 
851
761
  headerParameters['Content-Type'] = 'application/json';
852
762
 
853
- if (this.configuration && this.configuration.accessToken) {
854
- // oauth required
855
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
856
- }
857
-
858
763
  if (this.configuration && this.configuration.accessToken) {
859
764
  const token = this.configuration.accessToken;
860
765
  const tokenString = await token("bearer_auth", []);
@@ -871,56 +776,35 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
871
776
  method: 'POST',
872
777
  headers: headerParameters,
873
778
  query: queryParameters,
874
- body: requestParameters['body'] as any,
779
+ body: WorkerStatusBodyToJSON(requestParameters['workerStatusBody']),
875
780
  };
876
781
  }
877
782
 
878
783
  /**
879
- * Endpoint for FoxFactory worker to update its status.
880
- * Update Worker Status
784
+ * POST /internal/factory/update_status Worker heartbeat / status update.
881
785
  */
882
- async updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<any>> {
883
- const requestOptions = await this.updateWorkerStatusFactoryUpdateStatusPostRequestOpts(requestParameters);
786
+ async updateWorkerStatusRaw(requestParameters: UpdateWorkerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
787
+ const requestOptions = await this.updateWorkerStatusRequestOpts(requestParameters);
884
788
  const response = await this.request(requestOptions, initOverrides);
885
789
 
886
- if (this.isJsonMime(response.headers.get('content-type'))) {
887
- return new runtime.JSONApiResponse<any>(response);
888
- } else {
889
- return new runtime.TextApiResponse(response) as any;
890
- }
790
+ return new runtime.VoidApiResponse(response);
891
791
  }
892
792
 
893
793
  /**
894
- * Endpoint for FoxFactory worker to update its status.
895
- * Update Worker Status
794
+ * POST /internal/factory/update_status Worker heartbeat / status update.
896
795
  */
897
- async updateWorkerStatusFactoryUpdateStatusPost(requestParameters: UpdateWorkerStatusFactoryUpdateStatusPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<any> {
898
- const response = await this.updateWorkerStatusFactoryUpdateStatusPostRaw(requestParameters, initOverrides);
899
- return await response.value();
796
+ async updateWorkerStatus(requestParameters: UpdateWorkerStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
797
+ await this.updateWorkerStatusRaw(requestParameters, initOverrides);
900
798
  }
901
799
 
902
800
  /**
903
- * Creates request options for uploadArtifactFactoryTaskIdArtifactPost without sending the request
801
+ * Creates request options for uploadArtifact without sending the request
904
802
  */
905
- async uploadArtifactFactoryTaskIdArtifactPostRequestOpts(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest): Promise<runtime.RequestOpts> {
803
+ async uploadArtifactRequestOpts(requestParameters: UploadArtifactRequest): Promise<runtime.RequestOpts> {
906
804
  if (requestParameters['taskId'] == null) {
907
805
  throw new runtime.RequiredError(
908
806
  'taskId',
909
- 'Required parameter "taskId" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().'
910
- );
911
- }
912
-
913
- if (requestParameters['artifact'] == null) {
914
- throw new runtime.RequiredError(
915
- 'artifact',
916
- 'Required parameter "artifact" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().'
917
- );
918
- }
919
-
920
- if (requestParameters['md5Hash'] == null) {
921
- throw new runtime.RequiredError(
922
- 'md5Hash',
923
- 'Required parameter "md5Hash" was null or undefined when calling uploadArtifactFactoryTaskIdArtifactPost().'
807
+ 'Required parameter "taskId" was null or undefined when calling uploadArtifact().'
924
808
  );
925
809
  }
926
810
 
@@ -928,11 +812,6 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
928
812
 
929
813
  const headerParameters: runtime.HTTPHeaders = {};
930
814
 
931
- if (this.configuration && this.configuration.accessToken) {
932
- // oauth required
933
- headerParameters["Authorization"] = await this.configuration.accessToken("oauth2_password", []);
934
- }
935
-
936
815
  if (this.configuration && this.configuration.accessToken) {
937
816
  const token = this.configuration.accessToken;
938
817
  const tokenString = await token("bearer_auth", []);
@@ -941,28 +820,6 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
941
820
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
942
821
  }
943
822
  }
944
- const consumes: runtime.Consume[] = [
945
- { contentType: 'multipart/form-data' },
946
- ];
947
- // @ts-ignore: canConsumeForm may be unused
948
- const canConsumeForm = runtime.canConsumeForm(consumes);
949
-
950
- let formParams: { append(param: string, value: any): any };
951
- let useForm = false;
952
- if (useForm) {
953
- formParams = new FormData();
954
- } else {
955
- formParams = new URLSearchParams();
956
- }
957
-
958
- if (requestParameters['artifact'] != null) {
959
- formParams.append('artifact', requestParameters['artifact'] as any);
960
- }
961
-
962
- if (requestParameters['md5Hash'] != null) {
963
- formParams.append('md5_hash', requestParameters['md5Hash'] as any);
964
- }
965
-
966
823
 
967
824
  let urlPath = `/factory/{task_id}/artifact`;
968
825
  urlPath = urlPath.replace(`{${"task_id"}}`, encodeURIComponent(String(requestParameters['taskId'])));
@@ -972,16 +829,14 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
972
829
  method: 'POST',
973
830
  headers: headerParameters,
974
831
  query: queryParameters,
975
- body: formParams,
976
832
  };
977
833
  }
978
834
 
979
835
  /**
980
- * 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
981
- * Upload Artifact
836
+ * POST /internal/factory/{task_id}/artifact Upload a build artifact.
982
837
  */
983
- async uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
984
- const requestOptions = await this.uploadArtifactFactoryTaskIdArtifactPostRequestOpts(requestParameters);
838
+ async uploadArtifactRaw(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<boolean>> {
839
+ const requestOptions = await this.uploadArtifactRequestOpts(requestParameters);
985
840
  const response = await this.request(requestOptions, initOverrides);
986
841
 
987
842
  if (this.isJsonMime(response.headers.get('content-type'))) {
@@ -992,11 +847,10 @@ export class FoxFactoryApi extends runtime.BaseAPI implements FoxFactoryApiInter
992
847
  }
993
848
 
994
849
  /**
995
- * 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
996
- * Upload Artifact
850
+ * POST /internal/factory/{task_id}/artifact Upload a build artifact.
997
851
  */
998
- async uploadArtifactFactoryTaskIdArtifactPost(requestParameters: UploadArtifactFactoryTaskIdArtifactPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
999
- const response = await this.uploadArtifactFactoryTaskIdArtifactPostRaw(requestParameters, initOverrides);
852
+ async uploadArtifact(requestParameters: UploadArtifactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<boolean> {
853
+ const response = await this.uploadArtifactRaw(requestParameters, initOverrides);
1000
854
  return await response.value();
1001
855
  }
1002
856