@hostafrica/ha-sdk-typescript 1.0.12 → 1.0.14

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 (124) hide show
  1. package/.github/workflows/codeql.yml +3 -3
  2. package/.github/workflows/release.yml +3 -3
  3. package/.github/workflows/semgrep.yml +1 -1
  4. package/dist/apis/SnapshotsApi.d.ts +63 -3
  5. package/dist/apis/SnapshotsApi.js +190 -2
  6. package/dist/apis/VPSManagementApi.d.ts +2 -2
  7. package/dist/apis/VPSManagementApi.js +2 -2
  8. package/dist/esm/apis/SnapshotsApi.d.ts +63 -3
  9. package/dist/esm/apis/SnapshotsApi.js +191 -3
  10. package/dist/esm/apis/VPSManagementApi.d.ts +2 -2
  11. package/dist/esm/apis/VPSManagementApi.js +2 -2
  12. package/dist/esm/models/CreateSnapshotJobRequestContent.d.ts +76 -0
  13. package/dist/esm/models/CreateSnapshotJobRequestContent.js +63 -0
  14. package/dist/esm/models/CreateSnapshotJobResponseContent.d.ts +40 -0
  15. package/dist/esm/models/CreateSnapshotJobResponseContent.js +49 -0
  16. package/dist/esm/models/CreateSnapshotRequestContent.d.ts +7 -1
  17. package/dist/esm/models/CreateSnapshotRequestContent.js +6 -2
  18. package/dist/esm/models/DeleteSnapshotJobRequestContent.d.ts +38 -0
  19. package/dist/esm/models/DeleteSnapshotJobRequestContent.js +47 -0
  20. package/dist/esm/models/DeleteSnapshotJobResponseContent.d.ts +40 -0
  21. package/dist/esm/models/DeleteSnapshotJobResponseContent.js +49 -0
  22. package/dist/esm/models/ListSnapshotJobsRequestContent.d.ts +32 -0
  23. package/dist/esm/models/ListSnapshotJobsRequestContent.js +43 -0
  24. package/dist/esm/models/ListSnapshotJobsResponseContent.d.ts +40 -0
  25. package/dist/esm/models/ListSnapshotJobsResponseContent.js +49 -0
  26. package/dist/esm/models/SnapshotJob.d.ts +88 -0
  27. package/dist/esm/models/SnapshotJob.js +67 -0
  28. package/dist/esm/models/SnapshotJobDeleteResponseData.d.ts +39 -0
  29. package/dist/esm/models/SnapshotJobDeleteResponseData.js +48 -0
  30. package/dist/esm/models/SnapshotJobLimits.d.ts +44 -0
  31. package/dist/esm/models/SnapshotJobLimits.js +51 -0
  32. package/dist/esm/models/SnapshotJobListResponseData.d.ts +52 -0
  33. package/dist/esm/models/SnapshotJobListResponseData.js +55 -0
  34. package/dist/esm/models/SnapshotJobMutationResponseData.d.ts +46 -0
  35. package/dist/esm/models/SnapshotJobMutationResponseData.js +53 -0
  36. package/dist/esm/models/SnapshotJobPeriod.d.ts +25 -0
  37. package/dist/esm/models/SnapshotJobPeriod.js +43 -0
  38. package/dist/esm/models/SnapshotJobUpdateResponseData.d.ts +39 -0
  39. package/dist/esm/models/SnapshotJobUpdateResponseData.js +48 -0
  40. package/dist/esm/models/UpdateSnapshotJobRequestContent.d.ts +82 -0
  41. package/dist/esm/models/UpdateSnapshotJobRequestContent.js +63 -0
  42. package/dist/esm/models/UpdateSnapshotJobResponseContent.d.ts +40 -0
  43. package/dist/esm/models/UpdateSnapshotJobResponseContent.js +49 -0
  44. package/dist/esm/models/index.d.ts +15 -0
  45. package/dist/esm/models/index.js +15 -0
  46. package/dist/esm/retryablePaths.js +2 -1
  47. package/dist/esm/runtime.js +1 -3
  48. package/dist/models/CreateSnapshotJobRequestContent.d.ts +76 -0
  49. package/dist/models/CreateSnapshotJobRequestContent.js +70 -0
  50. package/dist/models/CreateSnapshotJobResponseContent.d.ts +40 -0
  51. package/dist/models/CreateSnapshotJobResponseContent.js +56 -0
  52. package/dist/models/CreateSnapshotRequestContent.d.ts +7 -1
  53. package/dist/models/CreateSnapshotRequestContent.js +6 -2
  54. package/dist/models/DeleteSnapshotJobRequestContent.d.ts +38 -0
  55. package/dist/models/DeleteSnapshotJobRequestContent.js +54 -0
  56. package/dist/models/DeleteSnapshotJobResponseContent.d.ts +40 -0
  57. package/dist/models/DeleteSnapshotJobResponseContent.js +56 -0
  58. package/dist/models/ListSnapshotJobsRequestContent.d.ts +32 -0
  59. package/dist/models/ListSnapshotJobsRequestContent.js +50 -0
  60. package/dist/models/ListSnapshotJobsResponseContent.d.ts +40 -0
  61. package/dist/models/ListSnapshotJobsResponseContent.js +56 -0
  62. package/dist/models/SnapshotJob.d.ts +88 -0
  63. package/dist/models/SnapshotJob.js +74 -0
  64. package/dist/models/SnapshotJobDeleteResponseData.d.ts +39 -0
  65. package/dist/models/SnapshotJobDeleteResponseData.js +55 -0
  66. package/dist/models/SnapshotJobLimits.d.ts +44 -0
  67. package/dist/models/SnapshotJobLimits.js +58 -0
  68. package/dist/models/SnapshotJobListResponseData.d.ts +52 -0
  69. package/dist/models/SnapshotJobListResponseData.js +62 -0
  70. package/dist/models/SnapshotJobMutationResponseData.d.ts +46 -0
  71. package/dist/models/SnapshotJobMutationResponseData.js +60 -0
  72. package/dist/models/SnapshotJobPeriod.d.ts +25 -0
  73. package/dist/models/SnapshotJobPeriod.js +51 -0
  74. package/dist/models/SnapshotJobUpdateResponseData.d.ts +39 -0
  75. package/dist/models/SnapshotJobUpdateResponseData.js +55 -0
  76. package/dist/models/UpdateSnapshotJobRequestContent.d.ts +82 -0
  77. package/dist/models/UpdateSnapshotJobRequestContent.js +70 -0
  78. package/dist/models/UpdateSnapshotJobResponseContent.d.ts +40 -0
  79. package/dist/models/UpdateSnapshotJobResponseContent.js +56 -0
  80. package/dist/models/index.d.ts +15 -0
  81. package/dist/models/index.js +15 -0
  82. package/dist/retryablePaths.js +2 -1
  83. package/dist/runtime.js +1 -3
  84. package/dist.zip +0 -0
  85. package/docs/CreateSnapshotJobRequestContent.md +48 -0
  86. package/docs/CreateSnapshotJobResponseContent.md +36 -0
  87. package/docs/CreateSnapshotRequestContent.md +4 -2
  88. package/docs/DeleteSnapshotJobRequestContent.md +36 -0
  89. package/docs/DeleteSnapshotJobResponseContent.md +36 -0
  90. package/docs/ListSnapshotJobsRequestContent.md +34 -0
  91. package/docs/ListSnapshotJobsResponseContent.md +36 -0
  92. package/docs/SnapshotJob.md +53 -0
  93. package/docs/SnapshotJobDeleteResponseData.md +37 -0
  94. package/docs/SnapshotJobLimits.md +39 -0
  95. package/docs/SnapshotJobListResponseData.md +41 -0
  96. package/docs/SnapshotJobMutationResponseData.md +39 -0
  97. package/docs/SnapshotJobPeriod.md +33 -0
  98. package/docs/SnapshotJobUpdateResponseData.md +37 -0
  99. package/docs/SnapshotsApi.md +321 -1
  100. package/docs/UpdateSnapshotJobRequestContent.md +50 -0
  101. package/docs/UpdateSnapshotJobResponseContent.md +36 -0
  102. package/docs/VPSManagementApi.md +1 -1
  103. package/package.json +1 -1
  104. package/src/apis/SnapshotsApi.ts +262 -2
  105. package/src/apis/VPSManagementApi.ts +2 -2
  106. package/src/models/CreateSnapshotJobRequestContent.ts +141 -0
  107. package/src/models/CreateSnapshotJobResponseContent.ts +92 -0
  108. package/src/models/CreateSnapshotRequestContent.ts +12 -3
  109. package/src/models/DeleteSnapshotJobRequestContent.ts +75 -0
  110. package/src/models/DeleteSnapshotJobResponseContent.ts +92 -0
  111. package/src/models/ListSnapshotJobsRequestContent.ts +66 -0
  112. package/src/models/ListSnapshotJobsResponseContent.ts +92 -0
  113. package/src/models/SnapshotJob.ts +157 -0
  114. package/src/models/SnapshotJobDeleteResponseData.ts +83 -0
  115. package/src/models/SnapshotJobLimits.ts +84 -0
  116. package/src/models/SnapshotJobListResponseData.ts +107 -0
  117. package/src/models/SnapshotJobMutationResponseData.ts +99 -0
  118. package/src/models/SnapshotJobPeriod.ts +53 -0
  119. package/src/models/SnapshotJobUpdateResponseData.ts +83 -0
  120. package/src/models/UpdateSnapshotJobRequestContent.ts +148 -0
  121. package/src/models/UpdateSnapshotJobResponseContent.ts +92 -0
  122. package/src/models/index.ts +15 -0
  123. package/src/retryablePaths.ts +2 -1
  124. package/src/runtime.ts +5 -3
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime.js';
24
- import { CreateSnapshotRequestContentToJSON, CreateSnapshotResponseContentFromJSON, DeleteSnapshotRequestContentToJSON, DeleteSnapshotResponseContentFromJSON, ListSnapshotsRequestContentToJSON, ListSnapshotsResponseContentFromJSON, RollbackSnapshotRequestContentToJSON, RollbackSnapshotResponseContentFromJSON, UpdateSnapshotRequestContentToJSON, UpdateSnapshotResponseContentFromJSON, } from '../models/index.js';
24
+ import { CreateSnapshotJobRequestContentToJSON, CreateSnapshotJobResponseContentFromJSON, CreateSnapshotRequestContentToJSON, CreateSnapshotResponseContentFromJSON, DeleteSnapshotJobRequestContentToJSON, DeleteSnapshotJobResponseContentFromJSON, DeleteSnapshotRequestContentToJSON, DeleteSnapshotResponseContentFromJSON, ListSnapshotJobsRequestContentToJSON, ListSnapshotJobsResponseContentFromJSON, ListSnapshotsRequestContentToJSON, ListSnapshotsResponseContentFromJSON, RollbackSnapshotRequestContentToJSON, RollbackSnapshotResponseContentFromJSON, UpdateSnapshotJobRequestContentToJSON, UpdateSnapshotJobResponseContentFromJSON, UpdateSnapshotRequestContentToJSON, UpdateSnapshotResponseContentFromJSON, } from '../models/index.js';
25
25
  /**
26
26
  *
27
27
  */
@@ -73,6 +73,53 @@ export class SnapshotsApi extends runtime.BaseAPI {
73
73
  return yield response.value();
74
74
  });
75
75
  }
76
+ /**
77
+ * Creates request options for createSnapshotJob without sending the request
78
+ */
79
+ createSnapshotJobRequestOpts(requestParameters) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ if (requestParameters['createSnapshotJobRequestContent'] == null) {
82
+ throw new runtime.RequiredError('createSnapshotJobRequestContent', 'Required parameter "createSnapshotJobRequestContent" was null or undefined when calling createSnapshotJob().');
83
+ }
84
+ const queryParameters = {};
85
+ const headerParameters = {};
86
+ headerParameters['Content-Type'] = 'application/json';
87
+ if (this.configuration && this.configuration.accessToken) {
88
+ const token = this.configuration.accessToken;
89
+ const tokenString = yield token("BearerAuth", []);
90
+ if (tokenString) {
91
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
92
+ }
93
+ }
94
+ let urlPath = `/vps/create-snapshot-job`;
95
+ return {
96
+ path: urlPath,
97
+ method: 'POST',
98
+ headers: headerParameters,
99
+ query: queryParameters,
100
+ body: CreateSnapshotJobRequestContentToJSON(requestParameters['createSnapshotJobRequestContent']),
101
+ };
102
+ });
103
+ }
104
+ /**
105
+ * [Under development] Creates a new snapshot job for a VPS service. Use period=\'hourly\' with run_every, or period=\'daily\' with days and start_time.
106
+ */
107
+ createSnapshotJobRaw(requestParameters, initOverrides) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const requestOptions = yield this.createSnapshotJobRequestOpts(requestParameters);
110
+ const response = yield this.request(requestOptions, initOverrides);
111
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateSnapshotJobResponseContentFromJSON(jsonValue));
112
+ });
113
+ }
114
+ /**
115
+ * [Under development] Creates a new snapshot job for a VPS service. Use period=\'hourly\' with run_every, or period=\'daily\' with days and start_time.
116
+ */
117
+ createSnapshotJob(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const response = yield this.createSnapshotJobRaw(requestParameters, initOverrides);
120
+ return yield response.value();
121
+ });
122
+ }
76
123
  /**
77
124
  * Creates request options for deleteSnapshot without sending the request
78
125
  */
@@ -120,6 +167,100 @@ export class SnapshotsApi extends runtime.BaseAPI {
120
167
  return yield response.value();
121
168
  });
122
169
  }
170
+ /**
171
+ * Creates request options for deleteSnapshotJob without sending the request
172
+ */
173
+ deleteSnapshotJobRequestOpts(requestParameters) {
174
+ return __awaiter(this, void 0, void 0, function* () {
175
+ if (requestParameters['deleteSnapshotJobRequestContent'] == null) {
176
+ throw new runtime.RequiredError('deleteSnapshotJobRequestContent', 'Required parameter "deleteSnapshotJobRequestContent" was null or undefined when calling deleteSnapshotJob().');
177
+ }
178
+ const queryParameters = {};
179
+ const headerParameters = {};
180
+ headerParameters['Content-Type'] = 'application/json';
181
+ if (this.configuration && this.configuration.accessToken) {
182
+ const token = this.configuration.accessToken;
183
+ const tokenString = yield token("BearerAuth", []);
184
+ if (tokenString) {
185
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
186
+ }
187
+ }
188
+ let urlPath = `/vps/delete-snapshot-job`;
189
+ return {
190
+ path: urlPath,
191
+ method: 'POST',
192
+ headers: headerParameters,
193
+ query: queryParameters,
194
+ body: DeleteSnapshotJobRequestContentToJSON(requestParameters['deleteSnapshotJobRequestContent']),
195
+ };
196
+ });
197
+ }
198
+ /**
199
+ * [Under development]Deletes a snapshot job from a VPS service
200
+ */
201
+ deleteSnapshotJobRaw(requestParameters, initOverrides) {
202
+ return __awaiter(this, void 0, void 0, function* () {
203
+ const requestOptions = yield this.deleteSnapshotJobRequestOpts(requestParameters);
204
+ const response = yield this.request(requestOptions, initOverrides);
205
+ return new runtime.JSONApiResponse(response, (jsonValue) => DeleteSnapshotJobResponseContentFromJSON(jsonValue));
206
+ });
207
+ }
208
+ /**
209
+ * [Under development]Deletes a snapshot job from a VPS service
210
+ */
211
+ deleteSnapshotJob(requestParameters, initOverrides) {
212
+ return __awaiter(this, void 0, void 0, function* () {
213
+ const response = yield this.deleteSnapshotJobRaw(requestParameters, initOverrides);
214
+ return yield response.value();
215
+ });
216
+ }
217
+ /**
218
+ * Creates request options for listSnapshotJobs without sending the request
219
+ */
220
+ listSnapshotJobsRequestOpts(requestParameters) {
221
+ return __awaiter(this, void 0, void 0, function* () {
222
+ if (requestParameters['listSnapshotJobsRequestContent'] == null) {
223
+ throw new runtime.RequiredError('listSnapshotJobsRequestContent', 'Required parameter "listSnapshotJobsRequestContent" was null or undefined when calling listSnapshotJobs().');
224
+ }
225
+ const queryParameters = {};
226
+ const headerParameters = {};
227
+ headerParameters['Content-Type'] = 'application/json';
228
+ if (this.configuration && this.configuration.accessToken) {
229
+ const token = this.configuration.accessToken;
230
+ const tokenString = yield token("BearerAuth", []);
231
+ if (tokenString) {
232
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
233
+ }
234
+ }
235
+ let urlPath = `/vps/list-snapshot-jobs`;
236
+ return {
237
+ path: urlPath,
238
+ method: 'POST',
239
+ headers: headerParameters,
240
+ query: queryParameters,
241
+ body: ListSnapshotJobsRequestContentToJSON(requestParameters['listSnapshotJobsRequestContent']),
242
+ };
243
+ });
244
+ }
245
+ /**
246
+ * [Under development]Retrieves the list of snapshot jobs for a VPS service
247
+ */
248
+ listSnapshotJobsRaw(requestParameters, initOverrides) {
249
+ return __awaiter(this, void 0, void 0, function* () {
250
+ const requestOptions = yield this.listSnapshotJobsRequestOpts(requestParameters);
251
+ const response = yield this.request(requestOptions, initOverrides);
252
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListSnapshotJobsResponseContentFromJSON(jsonValue));
253
+ });
254
+ }
255
+ /**
256
+ * [Under development]Retrieves the list of snapshot jobs for a VPS service
257
+ */
258
+ listSnapshotJobs(requestParameters, initOverrides) {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ const response = yield this.listSnapshotJobsRaw(requestParameters, initOverrides);
261
+ return yield response.value();
262
+ });
263
+ }
123
264
  /**
124
265
  * Creates request options for listSnapshots without sending the request
125
266
  */
@@ -196,7 +337,7 @@ export class SnapshotsApi extends runtime.BaseAPI {
196
337
  });
197
338
  }
198
339
  /**
199
- * [Under development] Rolls back a VPS to a previous snapshot state
340
+ * Rolls back a VPS to a previous snapshot state
200
341
  */
201
342
  rollbackSnapshotRaw(requestParameters, initOverrides) {
202
343
  return __awaiter(this, void 0, void 0, function* () {
@@ -206,7 +347,7 @@ export class SnapshotsApi extends runtime.BaseAPI {
206
347
  });
207
348
  }
208
349
  /**
209
- * [Under development] Rolls back a VPS to a previous snapshot state
350
+ * Rolls back a VPS to a previous snapshot state
210
351
  */
211
352
  rollbackSnapshot(requestParameters, initOverrides) {
212
353
  return __awaiter(this, void 0, void 0, function* () {
@@ -261,4 +402,51 @@ export class SnapshotsApi extends runtime.BaseAPI {
261
402
  return yield response.value();
262
403
  });
263
404
  }
405
+ /**
406
+ * Creates request options for updateSnapshotJob without sending the request
407
+ */
408
+ updateSnapshotJobRequestOpts(requestParameters) {
409
+ return __awaiter(this, void 0, void 0, function* () {
410
+ if (requestParameters['updateSnapshotJobRequestContent'] == null) {
411
+ throw new runtime.RequiredError('updateSnapshotJobRequestContent', 'Required parameter "updateSnapshotJobRequestContent" was null or undefined when calling updateSnapshotJob().');
412
+ }
413
+ const queryParameters = {};
414
+ const headerParameters = {};
415
+ headerParameters['Content-Type'] = 'application/json';
416
+ if (this.configuration && this.configuration.accessToken) {
417
+ const token = this.configuration.accessToken;
418
+ const tokenString = yield token("BearerAuth", []);
419
+ if (tokenString) {
420
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
421
+ }
422
+ }
423
+ let urlPath = `/vps/update-snapshot-job`;
424
+ return {
425
+ path: urlPath,
426
+ method: 'POST',
427
+ headers: headerParameters,
428
+ query: queryParameters,
429
+ body: UpdateSnapshotJobRequestContentToJSON(requestParameters['updateSnapshotJobRequestContent']),
430
+ };
431
+ });
432
+ }
433
+ /**
434
+ * [Under development] Updates an existing snapshot job. Only provide fields you want to change.
435
+ */
436
+ updateSnapshotJobRaw(requestParameters, initOverrides) {
437
+ return __awaiter(this, void 0, void 0, function* () {
438
+ const requestOptions = yield this.updateSnapshotJobRequestOpts(requestParameters);
439
+ const response = yield this.request(requestOptions, initOverrides);
440
+ return new runtime.JSONApiResponse(response, (jsonValue) => UpdateSnapshotJobResponseContentFromJSON(jsonValue));
441
+ });
442
+ }
443
+ /**
444
+ * [Under development] Updates an existing snapshot job. Only provide fields you want to change.
445
+ */
446
+ updateSnapshotJob(requestParameters, initOverrides) {
447
+ return __awaiter(this, void 0, void 0, function* () {
448
+ const response = yield this.updateSnapshotJobRaw(requestParameters, initOverrides);
449
+ return yield response.value();
450
+ });
451
+ }
264
452
  }
@@ -77,11 +77,11 @@ export declare class VPSManagementApi extends runtime.BaseAPI {
77
77
  */
78
78
  listReinstallOsRequestOpts(requestParameters: ListReinstallOsRequest): Promise<runtime.RequestOpts>;
79
79
  /**
80
- * [Under development] Retrieves the list of available OS images for VPS reinstallation
80
+ * Retrieves the list of available OS images for VPS reinstallation
81
81
  */
82
82
  listReinstallOsRaw(requestParameters: ListReinstallOsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListReinstallOsResponseContent>>;
83
83
  /**
84
- * [Under development] Retrieves the list of available OS images for VPS reinstallation
84
+ * Retrieves the list of available OS images for VPS reinstallation
85
85
  */
86
86
  listReinstallOs(requestParameters: ListReinstallOsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListReinstallOsResponseContent>;
87
87
  /**
@@ -196,7 +196,7 @@ export class VPSManagementApi extends runtime.BaseAPI {
196
196
  });
197
197
  }
198
198
  /**
199
- * [Under development] Retrieves the list of available OS images for VPS reinstallation
199
+ * Retrieves the list of available OS images for VPS reinstallation
200
200
  */
201
201
  listReinstallOsRaw(requestParameters, initOverrides) {
202
202
  return __awaiter(this, void 0, void 0, function* () {
@@ -206,7 +206,7 @@ export class VPSManagementApi extends runtime.BaseAPI {
206
206
  });
207
207
  }
208
208
  /**
209
- * [Under development] Retrieves the list of available OS images for VPS reinstallation
209
+ * Retrieves the list of available OS images for VPS reinstallation
210
210
  */
211
211
  listReinstallOs(requestParameters, initOverrides) {
212
212
  return __awaiter(this, void 0, void 0, function* () {
@@ -0,0 +1,76 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 2026-01-01
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { DayOfWeek } from './DayOfWeek.js';
13
+ import type { SnapshotJobPeriod } from './SnapshotJobPeriod.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface CreateSnapshotJobRequestContent
18
+ */
19
+ export interface CreateSnapshotJobRequestContent {
20
+ /**
21
+ * Service ID - must be sent as a string
22
+ * @type {string}
23
+ * @memberof CreateSnapshotJobRequestContent
24
+ */
25
+ serviceId: string;
26
+ /**
27
+ * Name for the snapshot job (e.g. 'auto_hourly')
28
+ * @type {string}
29
+ * @memberof CreateSnapshotJobRequestContent
30
+ */
31
+ name: string;
32
+ /**
33
+ * Description for the snapshot job
34
+ * @type {string}
35
+ * @memberof CreateSnapshotJobRequestContent
36
+ */
37
+ description?: string;
38
+ /**
39
+ * Whether to include VM state in the snapshot
40
+ * @type {boolean}
41
+ * @memberof CreateSnapshotJobRequestContent
42
+ */
43
+ vmstate?: boolean;
44
+ /**
45
+ *
46
+ * @type {SnapshotJobPeriod}
47
+ * @memberof CreateSnapshotJobRequestContent
48
+ */
49
+ period: SnapshotJobPeriod;
50
+ /**
51
+ * For hourly jobs: run every N hours (e.g. 6 = every 6 hours)
52
+ * @type {number}
53
+ * @memberof CreateSnapshotJobRequestContent
54
+ */
55
+ runEvery?: number;
56
+ /**
57
+ * For daily jobs: days of week when the job should run
58
+ * @type {Array<DayOfWeek>}
59
+ * @memberof CreateSnapshotJobRequestContent
60
+ */
61
+ days?: Array<DayOfWeek>;
62
+ /**
63
+ * For daily jobs: start time in HH:MM format (e.g. '02:30')
64
+ * @type {string}
65
+ * @memberof CreateSnapshotJobRequestContent
66
+ */
67
+ startTime?: string;
68
+ }
69
+ /**
70
+ * Check if a given object implements the CreateSnapshotJobRequestContent interface.
71
+ */
72
+ export declare function instanceOfCreateSnapshotJobRequestContent(value: object): value is CreateSnapshotJobRequestContent;
73
+ export declare function CreateSnapshotJobRequestContentFromJSON(json: any): CreateSnapshotJobRequestContent;
74
+ export declare function CreateSnapshotJobRequestContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSnapshotJobRequestContent;
75
+ export declare function CreateSnapshotJobRequestContentToJSON(json: any): CreateSnapshotJobRequestContent;
76
+ export declare function CreateSnapshotJobRequestContentToJSONTyped(value?: CreateSnapshotJobRequestContent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 2026-01-01
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { DayOfWeekFromJSON, DayOfWeekToJSON, } from './DayOfWeek.js';
15
+ import { SnapshotJobPeriodFromJSON, SnapshotJobPeriodToJSON, } from './SnapshotJobPeriod.js';
16
+ /**
17
+ * Check if a given object implements the CreateSnapshotJobRequestContent interface.
18
+ */
19
+ export function instanceOfCreateSnapshotJobRequestContent(value) {
20
+ if (!('serviceId' in value) || value['serviceId'] === undefined)
21
+ return false;
22
+ if (!('name' in value) || value['name'] === undefined)
23
+ return false;
24
+ if (!('period' in value) || value['period'] === undefined)
25
+ return false;
26
+ return true;
27
+ }
28
+ export function CreateSnapshotJobRequestContentFromJSON(json) {
29
+ return CreateSnapshotJobRequestContentFromJSONTyped(json, false);
30
+ }
31
+ export function CreateSnapshotJobRequestContentFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'serviceId': json['service_id'],
37
+ 'name': json['name'],
38
+ 'description': json['description'] == null ? undefined : json['description'],
39
+ 'vmstate': json['vmstate'] == null ? undefined : json['vmstate'],
40
+ 'period': SnapshotJobPeriodFromJSON(json['period']),
41
+ 'runEvery': json['run_every'] == null ? undefined : json['run_every'],
42
+ 'days': json['days'] == null ? undefined : (json['days'].map(DayOfWeekFromJSON)),
43
+ 'startTime': json['start_time'] == null ? undefined : json['start_time'],
44
+ };
45
+ }
46
+ export function CreateSnapshotJobRequestContentToJSON(json) {
47
+ return CreateSnapshotJobRequestContentToJSONTyped(json, false);
48
+ }
49
+ export function CreateSnapshotJobRequestContentToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'service_id': value['serviceId'],
55
+ 'name': value['name'],
56
+ 'description': value['description'],
57
+ 'vmstate': value['vmstate'],
58
+ 'period': SnapshotJobPeriodToJSON(value['period']),
59
+ 'run_every': value['runEvery'],
60
+ 'days': value['days'] == null ? undefined : (value['days'].map(DayOfWeekToJSON)),
61
+ 'start_time': value['startTime'],
62
+ };
63
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 2026-01-01
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SnapshotJobMutationResponseData } from './SnapshotJobMutationResponseData.js';
13
+ import type { OperationStatus } from './OperationStatus.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface CreateSnapshotJobResponseContent
18
+ */
19
+ export interface CreateSnapshotJobResponseContent {
20
+ /**
21
+ *
22
+ * @type {OperationStatus}
23
+ * @memberof CreateSnapshotJobResponseContent
24
+ */
25
+ status: OperationStatus;
26
+ /**
27
+ *
28
+ * @type {SnapshotJobMutationResponseData}
29
+ * @memberof CreateSnapshotJobResponseContent
30
+ */
31
+ data: SnapshotJobMutationResponseData;
32
+ }
33
+ /**
34
+ * Check if a given object implements the CreateSnapshotJobResponseContent interface.
35
+ */
36
+ export declare function instanceOfCreateSnapshotJobResponseContent(value: object): value is CreateSnapshotJobResponseContent;
37
+ export declare function CreateSnapshotJobResponseContentFromJSON(json: any): CreateSnapshotJobResponseContent;
38
+ export declare function CreateSnapshotJobResponseContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateSnapshotJobResponseContent;
39
+ export declare function CreateSnapshotJobResponseContentToJSON(json: any): CreateSnapshotJobResponseContent;
40
+ export declare function CreateSnapshotJobResponseContentToJSONTyped(value?: CreateSnapshotJobResponseContent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,49 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 2026-01-01
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { SnapshotJobMutationResponseDataFromJSON, SnapshotJobMutationResponseDataToJSON, } from './SnapshotJobMutationResponseData.js';
15
+ import { OperationStatusFromJSON, OperationStatusToJSON, } from './OperationStatus.js';
16
+ /**
17
+ * Check if a given object implements the CreateSnapshotJobResponseContent interface.
18
+ */
19
+ export function instanceOfCreateSnapshotJobResponseContent(value) {
20
+ if (!('status' in value) || value['status'] === undefined)
21
+ return false;
22
+ if (!('data' in value) || value['data'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function CreateSnapshotJobResponseContentFromJSON(json) {
27
+ return CreateSnapshotJobResponseContentFromJSONTyped(json, false);
28
+ }
29
+ export function CreateSnapshotJobResponseContentFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'status': OperationStatusFromJSON(json['status']),
35
+ 'data': SnapshotJobMutationResponseDataFromJSON(json['data']),
36
+ };
37
+ }
38
+ export function CreateSnapshotJobResponseContentToJSON(json) {
39
+ return CreateSnapshotJobResponseContentToJSONTyped(json, false);
40
+ }
41
+ export function CreateSnapshotJobResponseContentToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'status': OperationStatusToJSON(value['status']),
47
+ 'data': SnapshotJobMutationResponseDataToJSON(value['data']),
48
+ };
49
+ }
@@ -26,13 +26,19 @@ export interface CreateSnapshotRequestContent {
26
26
  * @type {string}
27
27
  * @memberof CreateSnapshotRequestContent
28
28
  */
29
- snapname?: string;
29
+ name: string;
30
30
  /**
31
31
  * Description for the snapshot
32
32
  * @type {string}
33
33
  * @memberof CreateSnapshotRequestContent
34
34
  */
35
35
  description?: string;
36
+ /**
37
+ * Whether to include RAM state in the snapshot. Defaults to false when omitted.
38
+ * @type {boolean}
39
+ * @memberof CreateSnapshotRequestContent
40
+ */
41
+ includeRam?: boolean;
36
42
  }
37
43
  /**
38
44
  * Check if a given object implements the CreateSnapshotRequestContent interface.
@@ -17,6 +17,8 @@
17
17
  export function instanceOfCreateSnapshotRequestContent(value) {
18
18
  if (!('serviceId' in value) || value['serviceId'] === undefined)
19
19
  return false;
20
+ if (!('name' in value) || value['name'] === undefined)
21
+ return false;
20
22
  return true;
21
23
  }
22
24
  export function CreateSnapshotRequestContentFromJSON(json) {
@@ -28,8 +30,9 @@ export function CreateSnapshotRequestContentFromJSONTyped(json, ignoreDiscrimina
28
30
  }
29
31
  return {
30
32
  'serviceId': json['service_id'],
31
- 'snapname': json['snapname'] == null ? undefined : json['snapname'],
33
+ 'name': json['name'],
32
34
  'description': json['description'] == null ? undefined : json['description'],
35
+ 'includeRam': json['include_ram'] == null ? undefined : json['include_ram'],
33
36
  };
34
37
  }
35
38
  export function CreateSnapshotRequestContentToJSON(json) {
@@ -41,7 +44,8 @@ export function CreateSnapshotRequestContentToJSONTyped(value, ignoreDiscriminat
41
44
  }
42
45
  return {
43
46
  'service_id': value['serviceId'],
44
- 'snapname': value['snapname'],
47
+ 'name': value['name'],
45
48
  'description': value['description'],
49
+ 'include_ram': value['includeRam'],
46
50
  };
47
51
  }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 2026-01-01
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface DeleteSnapshotJobRequestContent
16
+ */
17
+ export interface DeleteSnapshotJobRequestContent {
18
+ /**
19
+ * Service ID - must be sent as a string
20
+ * @type {string}
21
+ * @memberof DeleteSnapshotJobRequestContent
22
+ */
23
+ serviceId: string;
24
+ /**
25
+ * Snapshot job ID to delete
26
+ * @type {string}
27
+ * @memberof DeleteSnapshotJobRequestContent
28
+ */
29
+ jobId: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the DeleteSnapshotJobRequestContent interface.
33
+ */
34
+ export declare function instanceOfDeleteSnapshotJobRequestContent(value: object): value is DeleteSnapshotJobRequestContent;
35
+ export declare function DeleteSnapshotJobRequestContentFromJSON(json: any): DeleteSnapshotJobRequestContent;
36
+ export declare function DeleteSnapshotJobRequestContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteSnapshotJobRequestContent;
37
+ export declare function DeleteSnapshotJobRequestContentToJSON(json: any): DeleteSnapshotJobRequestContent;
38
+ export declare function DeleteSnapshotJobRequestContentToJSONTyped(value?: DeleteSnapshotJobRequestContent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * HostAfricaApi
5
+ * HostAfrica API
6
+ *
7
+ * The version of the OpenAPI document: 2026-01-01
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the DeleteSnapshotJobRequestContent interface.
16
+ */
17
+ export function instanceOfDeleteSnapshotJobRequestContent(value) {
18
+ if (!('serviceId' in value) || value['serviceId'] === undefined)
19
+ return false;
20
+ if (!('jobId' in value) || value['jobId'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function DeleteSnapshotJobRequestContentFromJSON(json) {
25
+ return DeleteSnapshotJobRequestContentFromJSONTyped(json, false);
26
+ }
27
+ export function DeleteSnapshotJobRequestContentFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'serviceId': json['service_id'],
33
+ 'jobId': json['job_id'],
34
+ };
35
+ }
36
+ export function DeleteSnapshotJobRequestContentToJSON(json) {
37
+ return DeleteSnapshotJobRequestContentToJSONTyped(json, false);
38
+ }
39
+ export function DeleteSnapshotJobRequestContentToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'service_id': value['serviceId'],
45
+ 'job_id': value['jobId'],
46
+ };
47
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * HostAfricaApi
3
+ * HostAfrica API
4
+ *
5
+ * The version of the OpenAPI document: 2026-01-01
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SnapshotJobDeleteResponseData } from './SnapshotJobDeleteResponseData.js';
13
+ import type { OperationStatus } from './OperationStatus.js';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface DeleteSnapshotJobResponseContent
18
+ */
19
+ export interface DeleteSnapshotJobResponseContent {
20
+ /**
21
+ *
22
+ * @type {OperationStatus}
23
+ * @memberof DeleteSnapshotJobResponseContent
24
+ */
25
+ status: OperationStatus;
26
+ /**
27
+ *
28
+ * @type {SnapshotJobDeleteResponseData}
29
+ * @memberof DeleteSnapshotJobResponseContent
30
+ */
31
+ data: SnapshotJobDeleteResponseData;
32
+ }
33
+ /**
34
+ * Check if a given object implements the DeleteSnapshotJobResponseContent interface.
35
+ */
36
+ export declare function instanceOfDeleteSnapshotJobResponseContent(value: object): value is DeleteSnapshotJobResponseContent;
37
+ export declare function DeleteSnapshotJobResponseContentFromJSON(json: any): DeleteSnapshotJobResponseContent;
38
+ export declare function DeleteSnapshotJobResponseContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeleteSnapshotJobResponseContent;
39
+ export declare function DeleteSnapshotJobResponseContentToJSON(json: any): DeleteSnapshotJobResponseContent;
40
+ export declare function DeleteSnapshotJobResponseContentToJSONTyped(value?: DeleteSnapshotJobResponseContent | null, ignoreDiscriminator?: boolean): any;