@orangefox-recovery/foxinternalclient 5.2.3 → 5.2.5

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.
@@ -6,11 +6,14 @@ All URIs are relative to *https://api.orangefox.download*
6
6
  |------------- | ------------- | -------------|
7
7
  |[**cancelTaskFactoryTaskIdCancelPost**](#canceltaskfactorytaskidcancelpost) | **POST** /factory/{task_id}/cancel | Cancel Task|
8
8
  |[**deleteTaskFactoryTaskIdDelete**](#deletetaskfactorytaskiddelete) | **DELETE** /factory/{task_id} | Delete Task|
9
+ |[**downloadArtifactFactoryTaskIdArtifactGet**](#downloadartifactfactorytaskidartifactget) | **GET** /factory/{task_id}/artifact | Download Artifact|
9
10
  |[**factoryStatusFactoryStatusGet**](#factorystatusfactorystatusget) | **GET** /factory/status | Factory Status|
10
11
  |[**getTaskFactoryTaskIdGet**](#gettaskfactorytaskidget) | **GET** /factory/{task_id} | Get Task|
11
12
  |[**listTasksFactoryGet**](#listtasksfactoryget) | **GET** /factory/ | List Tasks|
12
13
  |[**newTaskFactoryPost**](#newtaskfactorypost) | **POST** /factory/ | New Task|
13
14
  |[**updateTaskFactoryTaskIdPatch**](#updatetaskfactorytaskidpatch) | **PATCH** /factory/{task_id} | Update Task|
15
+ |[**updateWorkerStatusFactoryUpdateStatusPost**](#updateworkerstatusfactoryupdatestatuspost) | **POST** /factory/update_status | Update Worker Status|
16
+ |[**uploadArtifactFactoryTaskIdArtifactPost**](#uploadartifactfactorytaskidartifactpost) | **POST** /factory/{task_id}/artifact | Upload Artifact|
14
17
 
15
18
  # **cancelTaskFactoryTaskIdCancelPost**
16
19
  > BuildTaskResponse cancelTaskFactoryTaskIdCancelPost()
@@ -67,7 +70,7 @@ No authorization required
67
70
  # **deleteTaskFactoryTaskIdDelete**
68
71
  > boolean deleteTaskFactoryTaskIdDelete()
69
72
 
70
- Deletes a build task given its identifier. If the task with the specified ID is not found, a 404 HTTP exception is raised.
73
+ 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.
71
74
 
72
75
  ### Example
73
76
 
@@ -108,6 +111,58 @@ No authorization required
108
111
  - **Accept**: application/json
109
112
 
110
113
 
114
+ ### HTTP response details
115
+ | Status code | Description | Response headers |
116
+ |-------------|-------------|------------------|
117
+ |**200** | Successful Response | - |
118
+ |**422** | Validation Error | - |
119
+
120
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
121
+
122
+ # **downloadArtifactFactoryTaskIdArtifactGet**
123
+ > any downloadArtifactFactoryTaskIdArtifactGet()
124
+
125
+ 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
126
+
127
+ ### Example
128
+
129
+ ```typescript
130
+ import {
131
+ FoxFactoryApi,
132
+ Configuration
133
+ } from '@orangefox-recovery/foxinternalclient';
134
+
135
+ const configuration = new Configuration();
136
+ const apiInstance = new FoxFactoryApi(configuration);
137
+
138
+ let taskId: string; // (default to undefined)
139
+
140
+ const { status, data } = await apiInstance.downloadArtifactFactoryTaskIdArtifactGet(
141
+ taskId
142
+ );
143
+ ```
144
+
145
+ ### Parameters
146
+
147
+ |Name | Type | Description | Notes|
148
+ |------------- | ------------- | ------------- | -------------|
149
+ | **taskId** | [**string**] | | defaults to undefined|
150
+
151
+
152
+ ### Return type
153
+
154
+ **any**
155
+
156
+ ### Authorization
157
+
158
+ No authorization required
159
+
160
+ ### HTTP request headers
161
+
162
+ - **Content-Type**: Not defined
163
+ - **Accept**: application/json
164
+
165
+
111
166
  ### HTTP response details
112
167
  | Status code | Description | Response headers |
113
168
  |-------------|-------------|------------------|
@@ -119,6 +174,7 @@ No authorization required
119
174
  # **factoryStatusFactoryStatusGet**
120
175
  > FFStatusResponse factoryStatusFactoryStatusGet()
121
176
 
177
+ 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.
122
178
 
123
179
  ### Example
124
180
 
@@ -212,7 +268,7 @@ No authorization required
212
268
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
213
269
 
214
270
  # **listTasksFactoryGet**
215
- > Array<BuildTaskShortResponse> listTasksFactoryGet()
271
+ > ListResponseBuildTaskShortResponse listTasksFactoryGet()
216
272
 
217
273
  Get a list of all build tasks. This endpoint retrieves all build tasks from the database and returns them as a list of abbreviated responses. Parameters: device_id (ObjectId, optional): Filter tasks by device ID
218
274
 
@@ -243,7 +299,7 @@ const { status, data } = await apiInstance.listTasksFactoryGet(
243
299
 
244
300
  ### Return type
245
301
 
246
- **Array<BuildTaskShortResponse>**
302
+ **ListResponseBuildTaskShortResponse**
247
303
 
248
304
  ### Authorization
249
305
 
@@ -372,3 +428,113 @@ No authorization required
372
428
 
373
429
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
374
430
 
431
+ # **updateWorkerStatusFactoryUpdateStatusPost**
432
+ > any updateWorkerStatusFactoryUpdateStatusPost(body)
433
+
434
+ Endpoint for FoxFactory worker to update its status.
435
+
436
+ ### Example
437
+
438
+ ```typescript
439
+ import {
440
+ FoxFactoryApi,
441
+ Configuration
442
+ } from '@orangefox-recovery/foxinternalclient';
443
+
444
+ const configuration = new Configuration();
445
+ const apiInstance = new FoxFactoryApi(configuration);
446
+
447
+ let body: string; //
448
+
449
+ const { status, data } = await apiInstance.updateWorkerStatusFactoryUpdateStatusPost(
450
+ body
451
+ );
452
+ ```
453
+
454
+ ### Parameters
455
+
456
+ |Name | Type | Description | Notes|
457
+ |------------- | ------------- | ------------- | -------------|
458
+ | **body** | **string**| | |
459
+
460
+
461
+ ### Return type
462
+
463
+ **any**
464
+
465
+ ### Authorization
466
+
467
+ No authorization required
468
+
469
+ ### HTTP request headers
470
+
471
+ - **Content-Type**: application/json
472
+ - **Accept**: application/json
473
+
474
+
475
+ ### HTTP response details
476
+ | Status code | Description | Response headers |
477
+ |-------------|-------------|------------------|
478
+ |**200** | Successful Response | - |
479
+ |**422** | Validation Error | - |
480
+
481
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
482
+
483
+ # **uploadArtifactFactoryTaskIdArtifactPost**
484
+ > boolean uploadArtifactFactoryTaskIdArtifactPost()
485
+
486
+ 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
487
+
488
+ ### Example
489
+
490
+ ```typescript
491
+ import {
492
+ FoxFactoryApi,
493
+ Configuration
494
+ } from '@orangefox-recovery/foxinternalclient';
495
+
496
+ const configuration = new Configuration();
497
+ const apiInstance = new FoxFactoryApi(configuration);
498
+
499
+ let taskId: string; // (default to undefined)
500
+ let artifact: File; // (default to undefined)
501
+ let md5Hash: string; // (default to undefined)
502
+
503
+ const { status, data } = await apiInstance.uploadArtifactFactoryTaskIdArtifactPost(
504
+ taskId,
505
+ artifact,
506
+ md5Hash
507
+ );
508
+ ```
509
+
510
+ ### Parameters
511
+
512
+ |Name | Type | Description | Notes|
513
+ |------------- | ------------- | ------------- | -------------|
514
+ | **taskId** | [**string**] | | defaults to undefined|
515
+ | **artifact** | [**File**] | | defaults to undefined|
516
+ | **md5Hash** | [**string**] | | defaults to undefined|
517
+
518
+
519
+ ### Return type
520
+
521
+ **boolean**
522
+
523
+ ### Authorization
524
+
525
+ No authorization required
526
+
527
+ ### HTTP request headers
528
+
529
+ - **Content-Type**: multipart/form-data
530
+ - **Accept**: application/json
531
+
532
+
533
+ ### HTTP response details
534
+ | Status code | Description | Response headers |
535
+ |-------------|-------------|------------------|
536
+ |**200** | Successful Response | - |
537
+ |**422** | Validation Error | - |
538
+
539
+ [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
540
+
@@ -0,0 +1,22 @@
1
+ # ListResponseBuildTaskShortResponse
2
+
3
+
4
+ ## Properties
5
+
6
+ Name | Type | Description | Notes
7
+ ------------ | ------------- | ------------- | -------------
8
+ **data** | [**Array&lt;BuildTaskShortResponse&gt;**](BuildTaskShortResponse.md) | | [default to undefined]
9
+ **count** | **number** | | [readonly] [default to undefined]
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import { ListResponseBuildTaskShortResponse } from '@orangefox-recovery/foxinternalclient';
15
+
16
+ const instance: ListResponseBuildTaskShortResponse = {
17
+ data,
18
+ count,
19
+ };
20
+ ```
21
+
22
+ [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Fox API
5
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.2.3
7
+ * The version of the OpenAPI document: 5.2.5
8
8
  * Contact: admin@orangefox.tech
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangefox-recovery/foxinternalclient",
3
- "version": "5.2.3",
3
+ "version": "5.2.5",
4
4
  "description": "OpenAPI client for @orangefox-recovery/foxinternalclient",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {