@krovacloud/sdk 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +22 -3
- package/dist/index.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +871 -798
- package/dist/index.d.ts +871 -798
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5,38 +5,140 @@ import { Client } from "openapi-fetch";
|
|
|
5
5
|
* Do not make direct changes to the file.
|
|
6
6
|
*/
|
|
7
7
|
interface paths {
|
|
8
|
-
"/
|
|
8
|
+
"/auth/cli/poll": {
|
|
9
9
|
parameters: {
|
|
10
10
|
query?: never;
|
|
11
11
|
header?: never;
|
|
12
12
|
path?: never;
|
|
13
13
|
cookie?: never;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
get?: never;
|
|
16
|
+
put?: never;
|
|
17
|
+
/**
|
|
18
|
+
* Poll for CLI device-authorization approval (RFC 8628)
|
|
19
|
+
* @description Public, unauthenticated. The CLI submits its deviceCode until the user approves or denies. On approval a real API key is minted ONCE, scoped to the approved Space and the approving user's membership, and returned a single time. Rate-limited per client IP.
|
|
20
|
+
*/
|
|
21
|
+
post: {
|
|
17
22
|
parameters: {
|
|
18
23
|
query?: never;
|
|
19
24
|
header?: never;
|
|
20
25
|
path?: never;
|
|
21
26
|
cookie?: never;
|
|
22
27
|
};
|
|
23
|
-
requestBody
|
|
28
|
+
requestBody: {
|
|
29
|
+
content: {
|
|
30
|
+
"application/json": {
|
|
31
|
+
/** @description The device code from /auth/cli/start. */
|
|
32
|
+
deviceCode: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
24
36
|
responses: {
|
|
25
|
-
/** @description
|
|
37
|
+
/** @description Approved — API key minted (returned once) */
|
|
26
38
|
200: {
|
|
27
39
|
headers: {
|
|
28
40
|
[name: string]: unknown;
|
|
29
41
|
};
|
|
30
42
|
content: {
|
|
31
43
|
"application/json": {
|
|
32
|
-
|
|
44
|
+
/** @description The full API key. Shown once and never returned again — store it securely. */
|
|
45
|
+
apiKey: string;
|
|
46
|
+
/** @description The Space the key is scoped to. */
|
|
47
|
+
spaceId: string;
|
|
33
48
|
};
|
|
34
49
|
};
|
|
35
50
|
};
|
|
51
|
+
400: components["responses"]["BadRequest"];
|
|
52
|
+
/** @description The user denied the login request */
|
|
53
|
+
403: {
|
|
54
|
+
headers: {
|
|
55
|
+
[name: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
content?: never;
|
|
58
|
+
};
|
|
59
|
+
/** @description The device code expired, was already consumed, or is unknown */
|
|
60
|
+
410: {
|
|
61
|
+
headers: {
|
|
62
|
+
[name: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
content?: never;
|
|
65
|
+
};
|
|
66
|
+
/** @description Authorization still pending — keep polling at the given interval */
|
|
67
|
+
428: {
|
|
68
|
+
headers: {
|
|
69
|
+
[name: string]: unknown;
|
|
70
|
+
};
|
|
71
|
+
content?: never;
|
|
72
|
+
};
|
|
73
|
+
429: components["responses"]["RateLimited"];
|
|
36
74
|
};
|
|
37
75
|
};
|
|
76
|
+
delete?: never;
|
|
77
|
+
options?: never;
|
|
78
|
+
head?: never;
|
|
79
|
+
patch?: never;
|
|
80
|
+
trace?: never;
|
|
81
|
+
};
|
|
82
|
+
"/auth/cli/start": {
|
|
83
|
+
parameters: {
|
|
84
|
+
query?: never;
|
|
85
|
+
header?: never;
|
|
86
|
+
path?: never;
|
|
87
|
+
cookie?: never;
|
|
88
|
+
};
|
|
89
|
+
get?: never;
|
|
38
90
|
put?: never;
|
|
39
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Begin a CLI device-authorization login (RFC 8628)
|
|
93
|
+
* @description Public, unauthenticated. Mints a device code (returned once) and a short human user code, and returns the verification URIs the user opens in a browser to approve. The CLI then polls /auth/cli/poll. Rate-limited per client IP.
|
|
94
|
+
*/
|
|
95
|
+
post: {
|
|
96
|
+
parameters: {
|
|
97
|
+
query?: never;
|
|
98
|
+
header?: never;
|
|
99
|
+
path?: never;
|
|
100
|
+
cookie?: never;
|
|
101
|
+
};
|
|
102
|
+
requestBody?: never;
|
|
103
|
+
responses: {
|
|
104
|
+
/** @description Device-authorization request created */
|
|
105
|
+
200: {
|
|
106
|
+
headers: {
|
|
107
|
+
[name: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
content: {
|
|
110
|
+
"application/json": {
|
|
111
|
+
/** @description High-entropy code the CLI keeps secret and presents on each poll. Only its hash is stored server-side. */
|
|
112
|
+
deviceCode: string;
|
|
113
|
+
/** @description Seconds until the device code expires (~600). */
|
|
114
|
+
expiresIn: number;
|
|
115
|
+
/** @description Seconds to wait between polls. */
|
|
116
|
+
interval: number;
|
|
117
|
+
/** @description Short human-readable code (KROVA-XXXX-XXXX) the user confirms in the browser. */
|
|
118
|
+
userCode: string;
|
|
119
|
+
/**
|
|
120
|
+
* Format: uri
|
|
121
|
+
* @description Browser URL where the user approves.
|
|
122
|
+
*/
|
|
123
|
+
verificationUri: string;
|
|
124
|
+
/**
|
|
125
|
+
* Format: uri
|
|
126
|
+
* @description verificationUri with the user code pre-filled.
|
|
127
|
+
*/
|
|
128
|
+
verificationUriComplete: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
429: components["responses"]["RateLimited"];
|
|
133
|
+
/** @description Could not allocate a login code; retry */
|
|
134
|
+
503: {
|
|
135
|
+
headers: {
|
|
136
|
+
[name: string]: unknown;
|
|
137
|
+
};
|
|
138
|
+
content?: never;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
40
142
|
delete?: never;
|
|
41
143
|
options?: never;
|
|
42
144
|
head?: never;
|
|
@@ -106,13 +208,13 @@ interface paths {
|
|
|
106
208
|
content: {
|
|
107
209
|
"application/json": {
|
|
108
210
|
currency: string;
|
|
211
|
+
note: string;
|
|
109
212
|
rates: {
|
|
110
|
-
vcpuPerHour: number;
|
|
111
|
-
ramGbPerHour: number;
|
|
112
213
|
diskGbPerHour: number;
|
|
214
|
+
ramGbPerHour: number;
|
|
215
|
+
vcpuPerHour: number;
|
|
113
216
|
};
|
|
114
217
|
tiers: components["schemas"]["PricingTier"][];
|
|
115
|
-
note: string;
|
|
116
218
|
};
|
|
117
219
|
};
|
|
118
220
|
};
|
|
@@ -126,20 +228,15 @@ interface paths {
|
|
|
126
228
|
patch?: never;
|
|
127
229
|
trace?: never;
|
|
128
230
|
};
|
|
129
|
-
"/
|
|
231
|
+
"/regions": {
|
|
130
232
|
parameters: {
|
|
131
233
|
query?: never;
|
|
132
234
|
header?: never;
|
|
133
235
|
path?: never;
|
|
134
236
|
cookie?: never;
|
|
135
237
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Begin a CLI device-authorization login (RFC 8628)
|
|
140
|
-
* @description Public, unauthenticated. Mints a device code (returned once) and a short human user code, and returns the verification URIs the user opens in a browser to approve. The CLI then polls /auth/cli/poll. Rate-limited per client IP.
|
|
141
|
-
*/
|
|
142
|
-
post: {
|
|
238
|
+
/** List regions with available capacity */
|
|
239
|
+
get: {
|
|
143
240
|
parameters: {
|
|
144
241
|
query?: never;
|
|
145
242
|
header?: never;
|
|
@@ -148,155 +245,111 @@ interface paths {
|
|
|
148
245
|
};
|
|
149
246
|
requestBody?: never;
|
|
150
247
|
responses: {
|
|
151
|
-
/** @description
|
|
248
|
+
/** @description Region list */
|
|
152
249
|
200: {
|
|
153
250
|
headers: {
|
|
154
251
|
[name: string]: unknown;
|
|
155
252
|
};
|
|
156
253
|
content: {
|
|
157
254
|
"application/json": {
|
|
158
|
-
|
|
159
|
-
deviceCode: string;
|
|
160
|
-
/** @description Short human-readable code (KROVA-XXXX-XXXX) the user confirms in the browser. */
|
|
161
|
-
userCode: string;
|
|
162
|
-
/**
|
|
163
|
-
* Format: uri
|
|
164
|
-
* @description Browser URL where the user approves.
|
|
165
|
-
*/
|
|
166
|
-
verificationUri: string;
|
|
167
|
-
/**
|
|
168
|
-
* Format: uri
|
|
169
|
-
* @description verificationUri with the user code pre-filled.
|
|
170
|
-
*/
|
|
171
|
-
verificationUriComplete: string;
|
|
172
|
-
/** @description Seconds to wait between polls. */
|
|
173
|
-
interval: number;
|
|
174
|
-
/** @description Seconds until the device code expires (~600). */
|
|
175
|
-
expiresIn: number;
|
|
255
|
+
regions: components["schemas"]["Region"][];
|
|
176
256
|
};
|
|
177
257
|
};
|
|
178
258
|
};
|
|
179
|
-
429: components["responses"]["RateLimited"];
|
|
180
|
-
/** @description Could not allocate a login code; retry */
|
|
181
|
-
503: {
|
|
182
|
-
headers: {
|
|
183
|
-
[name: string]: unknown;
|
|
184
|
-
};
|
|
185
|
-
content?: never;
|
|
186
|
-
};
|
|
187
259
|
};
|
|
188
260
|
};
|
|
261
|
+
put?: never;
|
|
262
|
+
post?: never;
|
|
189
263
|
delete?: never;
|
|
190
264
|
options?: never;
|
|
191
265
|
head?: never;
|
|
192
266
|
patch?: never;
|
|
193
267
|
trace?: never;
|
|
194
268
|
};
|
|
195
|
-
"/
|
|
269
|
+
"/space": {
|
|
196
270
|
parameters: {
|
|
197
271
|
query?: never;
|
|
198
272
|
header?: never;
|
|
199
273
|
path?: never;
|
|
200
274
|
cookie?: never;
|
|
201
275
|
};
|
|
202
|
-
get?: never;
|
|
203
|
-
put?: never;
|
|
204
276
|
/**
|
|
205
|
-
*
|
|
206
|
-
* @description
|
|
277
|
+
* Resolve the space this API key is scoped to
|
|
278
|
+
* @description Returns the single space the API key belongs to. Lets a client auto-resolve the space id from the key alone (no spaceId in the URL).
|
|
207
279
|
*/
|
|
208
|
-
|
|
280
|
+
get: {
|
|
209
281
|
parameters: {
|
|
210
282
|
query?: never;
|
|
211
283
|
header?: never;
|
|
212
284
|
path?: never;
|
|
213
285
|
cookie?: never;
|
|
214
286
|
};
|
|
215
|
-
requestBody
|
|
216
|
-
content: {
|
|
217
|
-
"application/json": {
|
|
218
|
-
/** @description The device code from /auth/cli/start. */
|
|
219
|
-
deviceCode: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
};
|
|
287
|
+
requestBody?: never;
|
|
223
288
|
responses: {
|
|
224
|
-
/** @description
|
|
289
|
+
/** @description The key's space */
|
|
225
290
|
200: {
|
|
226
291
|
headers: {
|
|
227
292
|
[name: string]: unknown;
|
|
228
293
|
};
|
|
229
294
|
content: {
|
|
230
|
-
"application/json":
|
|
231
|
-
/** @description The full API key. Shown once and never returned again — store it securely. */
|
|
232
|
-
apiKey: string;
|
|
233
|
-
/** @description The Space the key is scoped to. */
|
|
234
|
-
spaceId: string;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
400: components["responses"]["BadRequest"];
|
|
239
|
-
/** @description The user denied the login request */
|
|
240
|
-
403: {
|
|
241
|
-
headers: {
|
|
242
|
-
[name: string]: unknown;
|
|
243
|
-
};
|
|
244
|
-
content?: never;
|
|
245
|
-
};
|
|
246
|
-
/** @description The device code expired, was already consumed, or is unknown */
|
|
247
|
-
410: {
|
|
248
|
-
headers: {
|
|
249
|
-
[name: string]: unknown;
|
|
250
|
-
};
|
|
251
|
-
content?: never;
|
|
252
|
-
};
|
|
253
|
-
/** @description Authorization still pending — keep polling at the given interval */
|
|
254
|
-
428: {
|
|
255
|
-
headers: {
|
|
256
|
-
[name: string]: unknown;
|
|
295
|
+
"application/json": components["schemas"]["Space"];
|
|
257
296
|
};
|
|
258
|
-
content?: never;
|
|
259
297
|
};
|
|
260
|
-
|
|
298
|
+
401: components["responses"]["Unauthorized"];
|
|
299
|
+
404: components["responses"]["NotFound"];
|
|
261
300
|
};
|
|
262
301
|
};
|
|
302
|
+
put?: never;
|
|
303
|
+
post?: never;
|
|
263
304
|
delete?: never;
|
|
264
305
|
options?: never;
|
|
265
306
|
head?: never;
|
|
266
307
|
patch?: never;
|
|
267
308
|
trace?: never;
|
|
268
309
|
};
|
|
269
|
-
"/
|
|
310
|
+
"/spaces/{spaceId}/backups/{backupId}/download": {
|
|
270
311
|
parameters: {
|
|
271
312
|
query?: never;
|
|
272
313
|
header?: never;
|
|
273
314
|
path?: never;
|
|
274
315
|
cookie?: never;
|
|
275
316
|
};
|
|
276
|
-
/**
|
|
277
|
-
* Resolve the space this API key is scoped to
|
|
278
|
-
* @description Returns the single space the API key belongs to. Lets a client auto-resolve the space id from the key alone (no spaceId in the URL).
|
|
279
|
-
*/
|
|
317
|
+
/** Generate a presigned download URL for a backup .cube archive */
|
|
280
318
|
get: {
|
|
281
319
|
parameters: {
|
|
282
320
|
query?: never;
|
|
283
321
|
header?: never;
|
|
284
|
-
path
|
|
322
|
+
path: {
|
|
323
|
+
spaceId: string;
|
|
324
|
+
backupId: string;
|
|
325
|
+
};
|
|
285
326
|
cookie?: never;
|
|
286
327
|
};
|
|
287
328
|
requestBody?: never;
|
|
288
329
|
responses: {
|
|
289
|
-
/** @description
|
|
330
|
+
/** @description Presigned URL valid for 15 minutes */
|
|
290
331
|
200: {
|
|
291
332
|
headers: {
|
|
292
333
|
[name: string]: unknown;
|
|
293
334
|
};
|
|
294
335
|
content: {
|
|
295
|
-
"application/json":
|
|
336
|
+
"application/json": {
|
|
337
|
+
/** Format: date-time */
|
|
338
|
+
expiresAt?: string;
|
|
339
|
+
filename?: string;
|
|
340
|
+
sizeBytes?: number | null;
|
|
341
|
+
url?: string;
|
|
342
|
+
};
|
|
296
343
|
};
|
|
297
344
|
};
|
|
298
|
-
401: components["responses"]["Unauthorized"];
|
|
299
345
|
404: components["responses"]["NotFound"];
|
|
346
|
+
/** @description Backup is not in 'complete' status */
|
|
347
|
+
409: {
|
|
348
|
+
headers: {
|
|
349
|
+
[name: string]: unknown;
|
|
350
|
+
};
|
|
351
|
+
content?: never;
|
|
352
|
+
};
|
|
300
353
|
};
|
|
301
354
|
};
|
|
302
355
|
put?: never;
|
|
@@ -359,21 +412,24 @@ interface paths {
|
|
|
359
412
|
requestBody: {
|
|
360
413
|
content: {
|
|
361
414
|
"application/json": {
|
|
362
|
-
name: string;
|
|
363
415
|
image: string;
|
|
416
|
+
name: string;
|
|
417
|
+
/** @description Region slug from /v1/regions (optional). */
|
|
418
|
+
region?: string;
|
|
364
419
|
resources: {
|
|
365
|
-
vcpu: number;
|
|
366
|
-
ramGb: number;
|
|
367
420
|
diskGb: number;
|
|
368
|
-
|
|
421
|
+
ramGb: number;
|
|
422
|
+
vcpu: number;
|
|
423
|
+
};
|
|
369
424
|
/** @description SSH public key written to the Cube login user's authorized_keys at boot (~/.ssh/authorized_keys for the ubuntu or debian user; /root/.ssh/authorized_keys on Cubes created before the default-user change). GET /cubes/{cubeId}/ssh reports the login user for a given Cube. Must start with ssh-ed25519, ssh-rsa, ecdsa-sha2-*, ssh-dss, or sk-*@openssh.com. */
|
|
370
425
|
sshPublicKey: string;
|
|
371
|
-
/**
|
|
372
|
-
|
|
426
|
+
/**
|
|
427
|
+
* @description Create the Cube with termination protection already on, so it is never briefly deletable between create and a follow-up PATCH. Optional; anything other than a boolean is rejected with 400.
|
|
428
|
+
* @default false
|
|
429
|
+
*/
|
|
430
|
+
terminationProtection?: boolean;
|
|
373
431
|
/** @description cloud-init script (max 16 KB, optional). */
|
|
374
432
|
userData?: string;
|
|
375
|
-
/** @description Opt this Cube out of customer-initiated deletion (default `false`). Power-off, wake, restart, snapshot, and restore remain allowed regardless. Toggleable later via PATCH /spaces/{spaceId}/cubes/{cubeId} with `{ terminationProtection: boolean }`. */
|
|
376
|
-
terminationProtection?: boolean;
|
|
377
433
|
};
|
|
378
434
|
};
|
|
379
435
|
};
|
|
@@ -401,148 +457,187 @@ interface paths {
|
|
|
401
457
|
patch?: never;
|
|
402
458
|
trace?: never;
|
|
403
459
|
};
|
|
404
|
-
"/spaces/{spaceId}/cubes/
|
|
460
|
+
"/spaces/{spaceId}/cubes/imports": {
|
|
405
461
|
parameters: {
|
|
406
462
|
query?: never;
|
|
407
463
|
header?: never;
|
|
408
464
|
path?: never;
|
|
409
465
|
cookie?: never;
|
|
410
466
|
};
|
|
411
|
-
|
|
412
|
-
|
|
467
|
+
get?: never;
|
|
468
|
+
put?: never;
|
|
469
|
+
/** Initiate a .cube archive import (browser-side multipart upload) */
|
|
470
|
+
post: {
|
|
413
471
|
parameters: {
|
|
414
472
|
query?: never;
|
|
415
473
|
header?: never;
|
|
416
474
|
path: {
|
|
417
475
|
spaceId: string;
|
|
418
|
-
cubeId: string;
|
|
419
476
|
};
|
|
420
477
|
cookie?: never;
|
|
421
478
|
};
|
|
422
|
-
requestBody
|
|
479
|
+
requestBody: {
|
|
480
|
+
content: {
|
|
481
|
+
"application/json": {
|
|
482
|
+
diskGbOverride?: number | null;
|
|
483
|
+
expectedConfig?: {
|
|
484
|
+
diskLimitGb?: number;
|
|
485
|
+
ramMb?: number;
|
|
486
|
+
vcpus?: number;
|
|
487
|
+
} | null;
|
|
488
|
+
fileSizeBytes: number;
|
|
489
|
+
name: string;
|
|
490
|
+
ramMbOverride?: number | null;
|
|
491
|
+
region?: string | null;
|
|
492
|
+
/**
|
|
493
|
+
* @description What to do with SSH access on the imported rootfs. `replace` (default) writes `sshPublicKey` to the login user's authorized_keys and requires `sshPublicKey` to be set. `keep` leaves the image's own authorized_keys and sshd configuration completely untouched — nothing is written — so you must already hold a private key that the image accepts, or you will not be able to log in.
|
|
494
|
+
* @default replace
|
|
495
|
+
* @enum {string}
|
|
496
|
+
*/
|
|
497
|
+
sshKeyMode?: "replace" | "keep";
|
|
498
|
+
/** @description Public key to install when `sshKeyMode` is `replace`. Written to the login user's `~/.ssh/authorized_keys` — which user that is comes from the imported rootfs itself, so an image without a Krova default user keeps logging in as root. Ignored when `sshKeyMode` is `keep`. */
|
|
499
|
+
sshPublicKey?: string | null;
|
|
500
|
+
userData?: string | null;
|
|
501
|
+
vcpusOverride?: number | null;
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
};
|
|
423
505
|
responses: {
|
|
424
|
-
/** @description
|
|
425
|
-
|
|
506
|
+
/** @description Import initiated; returns presigned part URLs */
|
|
507
|
+
201: {
|
|
426
508
|
headers: {
|
|
427
509
|
[name: string]: unknown;
|
|
428
510
|
};
|
|
429
511
|
content: {
|
|
430
512
|
"application/json": {
|
|
431
|
-
|
|
513
|
+
chunkSizeBytes?: number;
|
|
514
|
+
/** Format: date-time */
|
|
515
|
+
expiresAt?: string;
|
|
516
|
+
importId?: string;
|
|
517
|
+
key?: string;
|
|
518
|
+
parts?: {
|
|
519
|
+
partNumber?: number;
|
|
520
|
+
url?: string;
|
|
521
|
+
}[];
|
|
522
|
+
uploadId?: string;
|
|
432
523
|
};
|
|
433
524
|
};
|
|
434
525
|
};
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
delete: {
|
|
442
|
-
parameters: {
|
|
443
|
-
query?: never;
|
|
444
|
-
header?: never;
|
|
445
|
-
path: {
|
|
446
|
-
spaceId: string;
|
|
447
|
-
cubeId: string;
|
|
526
|
+
/** @description Invalid input */
|
|
527
|
+
400: {
|
|
528
|
+
headers: {
|
|
529
|
+
[name: string]: unknown;
|
|
530
|
+
};
|
|
531
|
+
content?: never;
|
|
448
532
|
};
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
requestBody?: never;
|
|
452
|
-
responses: {
|
|
453
|
-
/** @description Deletion enqueued */
|
|
454
|
-
200: {
|
|
533
|
+
/** @description Plan limit exceeded */
|
|
534
|
+
403: {
|
|
455
535
|
headers: {
|
|
456
536
|
[name: string]: unknown;
|
|
457
537
|
};
|
|
458
|
-
content
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
538
|
+
content?: never;
|
|
539
|
+
};
|
|
540
|
+
/** @description No active storage backend */
|
|
541
|
+
503: {
|
|
542
|
+
headers: {
|
|
543
|
+
[name: string]: unknown;
|
|
462
544
|
};
|
|
545
|
+
content?: never;
|
|
463
546
|
};
|
|
464
|
-
404: components["responses"]["NotFound"];
|
|
465
|
-
429: components["responses"]["RateLimited"];
|
|
466
547
|
};
|
|
467
548
|
};
|
|
549
|
+
delete?: never;
|
|
468
550
|
options?: never;
|
|
469
551
|
head?: never;
|
|
470
|
-
|
|
471
|
-
|
|
552
|
+
patch?: never;
|
|
553
|
+
trace?: never;
|
|
554
|
+
};
|
|
555
|
+
"/spaces/{spaceId}/cubes/imports/{importId}": {
|
|
556
|
+
parameters: {
|
|
557
|
+
query?: never;
|
|
558
|
+
header?: never;
|
|
559
|
+
path?: never;
|
|
560
|
+
cookie?: never;
|
|
561
|
+
};
|
|
562
|
+
/** Get the current state of an import */
|
|
563
|
+
get: {
|
|
472
564
|
parameters: {
|
|
473
565
|
query?: never;
|
|
474
566
|
header?: never;
|
|
475
567
|
path: {
|
|
476
568
|
spaceId: string;
|
|
477
|
-
|
|
569
|
+
importId: string;
|
|
478
570
|
};
|
|
479
571
|
cookie?: never;
|
|
480
572
|
};
|
|
481
|
-
requestBody
|
|
482
|
-
content: {
|
|
483
|
-
"application/json": {
|
|
484
|
-
terminationProtection?: boolean;
|
|
485
|
-
};
|
|
486
|
-
};
|
|
487
|
-
};
|
|
573
|
+
requestBody?: never;
|
|
488
574
|
responses: {
|
|
489
|
-
/** @description
|
|
575
|
+
/** @description Current import state */
|
|
490
576
|
200: {
|
|
491
577
|
headers: {
|
|
492
578
|
[name: string]: unknown;
|
|
493
579
|
};
|
|
494
580
|
content: {
|
|
495
581
|
"application/json": {
|
|
496
|
-
|
|
582
|
+
import?: {
|
|
583
|
+
completedAt?: string | null;
|
|
584
|
+
createdAt?: string;
|
|
585
|
+
cubeId?: string | null;
|
|
586
|
+
error?: string | null;
|
|
587
|
+
id?: string;
|
|
588
|
+
name?: string;
|
|
589
|
+
/** @enum {string} */
|
|
590
|
+
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
591
|
+
updatedAt?: string;
|
|
592
|
+
};
|
|
497
593
|
};
|
|
498
594
|
};
|
|
499
595
|
};
|
|
500
596
|
404: components["responses"]["NotFound"];
|
|
501
|
-
429: components["responses"]["RateLimited"];
|
|
502
597
|
};
|
|
503
598
|
};
|
|
504
|
-
trace?: never;
|
|
505
|
-
};
|
|
506
|
-
"/spaces/{spaceId}/cubes/{cubeId}/power-off": {
|
|
507
|
-
parameters: {
|
|
508
|
-
query?: never;
|
|
509
|
-
header?: never;
|
|
510
|
-
path?: never;
|
|
511
|
-
cookie?: never;
|
|
512
|
-
};
|
|
513
|
-
get?: never;
|
|
514
599
|
put?: never;
|
|
515
|
-
|
|
516
|
-
|
|
600
|
+
post?: never;
|
|
601
|
+
/** Cancel an in-flight upload (only allowed in 'uploading' state) */
|
|
602
|
+
delete: {
|
|
517
603
|
parameters: {
|
|
518
604
|
query?: never;
|
|
519
605
|
header?: never;
|
|
520
606
|
path: {
|
|
521
607
|
spaceId: string;
|
|
522
|
-
|
|
608
|
+
importId: string;
|
|
523
609
|
};
|
|
524
610
|
cookie?: never;
|
|
525
611
|
};
|
|
526
612
|
requestBody?: never;
|
|
527
613
|
responses: {
|
|
528
|
-
/** @description
|
|
614
|
+
/** @description Cancelled */
|
|
529
615
|
200: {
|
|
530
616
|
headers: {
|
|
531
617
|
[name: string]: unknown;
|
|
532
618
|
};
|
|
533
|
-
content
|
|
619
|
+
content: {
|
|
620
|
+
"application/json": {
|
|
621
|
+
success: boolean;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
534
624
|
};
|
|
535
625
|
404: components["responses"]["NotFound"];
|
|
536
|
-
|
|
626
|
+
/** @description Cannot cancel an import past the 'uploading' state */
|
|
627
|
+
409: {
|
|
628
|
+
headers: {
|
|
629
|
+
[name: string]: unknown;
|
|
630
|
+
};
|
|
631
|
+
content?: never;
|
|
632
|
+
};
|
|
537
633
|
};
|
|
538
634
|
};
|
|
539
|
-
delete?: never;
|
|
540
635
|
options?: never;
|
|
541
636
|
head?: never;
|
|
542
637
|
patch?: never;
|
|
543
638
|
trace?: never;
|
|
544
639
|
};
|
|
545
|
-
"/spaces/{spaceId}/cubes/{
|
|
640
|
+
"/spaces/{spaceId}/cubes/imports/{importId}/complete": {
|
|
546
641
|
parameters: {
|
|
547
642
|
query?: never;
|
|
548
643
|
header?: never;
|
|
@@ -551,28 +646,84 @@ interface paths {
|
|
|
551
646
|
};
|
|
552
647
|
get?: never;
|
|
553
648
|
put?: never;
|
|
554
|
-
/**
|
|
649
|
+
/** Finalize a .cube import: complete multipart upload + create cube row + enqueue provisioning */
|
|
555
650
|
post: {
|
|
556
651
|
parameters: {
|
|
557
652
|
query?: never;
|
|
558
653
|
header?: never;
|
|
559
654
|
path: {
|
|
560
655
|
spaceId: string;
|
|
561
|
-
|
|
656
|
+
importId: string;
|
|
562
657
|
};
|
|
563
658
|
cookie?: never;
|
|
564
659
|
};
|
|
565
|
-
requestBody
|
|
660
|
+
requestBody: {
|
|
661
|
+
content: {
|
|
662
|
+
"application/json": {
|
|
663
|
+
config: {
|
|
664
|
+
diskLimitGb: number;
|
|
665
|
+
imageId: string;
|
|
666
|
+
ramMb: number;
|
|
667
|
+
userData?: string | null;
|
|
668
|
+
vcpus: number;
|
|
669
|
+
};
|
|
670
|
+
parts: {
|
|
671
|
+
etag: string;
|
|
672
|
+
partNumber: number;
|
|
673
|
+
}[];
|
|
674
|
+
};
|
|
675
|
+
};
|
|
676
|
+
};
|
|
566
677
|
responses: {
|
|
567
|
-
/** @description
|
|
678
|
+
/** @description Provisioning enqueued */
|
|
568
679
|
200: {
|
|
680
|
+
headers: {
|
|
681
|
+
[name: string]: unknown;
|
|
682
|
+
};
|
|
683
|
+
content: {
|
|
684
|
+
"application/json": {
|
|
685
|
+
cubeId?: string;
|
|
686
|
+
importId?: string;
|
|
687
|
+
/** @enum {string} */
|
|
688
|
+
status?: "provisioning";
|
|
689
|
+
};
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
/** @description Invalid input */
|
|
693
|
+
400: {
|
|
694
|
+
headers: {
|
|
695
|
+
[name: string]: unknown;
|
|
696
|
+
};
|
|
697
|
+
content?: never;
|
|
698
|
+
};
|
|
699
|
+
/** @description Plan limit exceeded */
|
|
700
|
+
403: {
|
|
701
|
+
headers: {
|
|
702
|
+
[name: string]: unknown;
|
|
703
|
+
};
|
|
704
|
+
content?: never;
|
|
705
|
+
};
|
|
706
|
+
/** @description Import not in 'uploading' state */
|
|
707
|
+
409: {
|
|
708
|
+
headers: {
|
|
709
|
+
[name: string]: unknown;
|
|
710
|
+
};
|
|
711
|
+
content?: never;
|
|
712
|
+
};
|
|
713
|
+
/** @description S3 finalization failed */
|
|
714
|
+
502: {
|
|
715
|
+
headers: {
|
|
716
|
+
[name: string]: unknown;
|
|
717
|
+
};
|
|
718
|
+
content?: never;
|
|
719
|
+
};
|
|
720
|
+
/** @description Storage backend unavailable */
|
|
721
|
+
503: {
|
|
569
722
|
headers: {
|
|
570
723
|
[name: string]: unknown;
|
|
571
724
|
};
|
|
572
725
|
content?: never;
|
|
573
726
|
};
|
|
574
|
-
404: components["responses"]["NotFound"];
|
|
575
|
-
429: components["responses"]["RateLimited"];
|
|
576
727
|
};
|
|
577
728
|
};
|
|
578
729
|
delete?: never;
|
|
@@ -581,20 +732,15 @@ interface paths {
|
|
|
581
732
|
patch?: never;
|
|
582
733
|
trace?: never;
|
|
583
734
|
};
|
|
584
|
-
"/spaces/{spaceId}/cubes/{cubeId}
|
|
735
|
+
"/spaces/{spaceId}/cubes/{cubeId}": {
|
|
585
736
|
parameters: {
|
|
586
737
|
query?: never;
|
|
587
738
|
header?: never;
|
|
588
739
|
path?: never;
|
|
589
740
|
cookie?: never;
|
|
590
741
|
};
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
/**
|
|
594
|
-
* Restart a running Cube
|
|
595
|
-
* @description Cold-restarts the Cube: the hypervisor process is stopped and relaunched, so the Cube boots against the host's current kernel. This is how a Cube picks up a refreshed guest kernel after a platform image update — a `reboot` issued inside the Cube cannot do it, because the kernel is supplied externally by the host. Disk state is preserved; only the kernel changes. Cube must be `running` (a stopped Cube already picks up the latest kernel when started). Concurrent restarts of the same Cube are rejected with 409 rather than queued twice.
|
|
596
|
-
*/
|
|
597
|
-
post: {
|
|
742
|
+
/** Get a Cube */
|
|
743
|
+
get: {
|
|
598
744
|
parameters: {
|
|
599
745
|
query?: never;
|
|
600
746
|
header?: never;
|
|
@@ -606,43 +752,24 @@ interface paths {
|
|
|
606
752
|
};
|
|
607
753
|
requestBody?: never;
|
|
608
754
|
responses: {
|
|
609
|
-
/** @description
|
|
755
|
+
/** @description Cube */
|
|
610
756
|
200: {
|
|
611
757
|
headers: {
|
|
612
758
|
[name: string]: unknown;
|
|
613
759
|
};
|
|
614
|
-
content
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
409: {
|
|
619
|
-
headers: {
|
|
620
|
-
[name: string]: unknown;
|
|
760
|
+
content: {
|
|
761
|
+
"application/json": {
|
|
762
|
+
cube: components["schemas"]["Cube"];
|
|
763
|
+
};
|
|
621
764
|
};
|
|
622
|
-
content?: never;
|
|
623
765
|
};
|
|
624
|
-
|
|
766
|
+
404: components["responses"]["NotFound"];
|
|
625
767
|
};
|
|
626
768
|
};
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
trace?: never;
|
|
632
|
-
};
|
|
633
|
-
"/spaces/{spaceId}/cubes/{cubeId}/ssh-port": {
|
|
634
|
-
parameters: {
|
|
635
|
-
query?: never;
|
|
636
|
-
header?: never;
|
|
637
|
-
path?: never;
|
|
638
|
-
cookie?: never;
|
|
639
|
-
};
|
|
640
|
-
get?: never;
|
|
641
|
-
/**
|
|
642
|
-
* Change a Cube's SSH port
|
|
643
|
-
* @description Sets the port INSIDE the Cube that SSH is forwarded to — NOT the host port you connect to. The host port is allocated by Krova and is unchanged by this call. Pointing this at a port nothing is listening on inside the Cube will make SSH unreachable; the default is 22. The change is applied atomically (the old port mapping is replaced).
|
|
644
|
-
*/
|
|
645
|
-
put: {
|
|
769
|
+
put?: never;
|
|
770
|
+
post?: never;
|
|
771
|
+
/** Delete a Cube (asynchronous) */
|
|
772
|
+
delete: {
|
|
646
773
|
parameters: {
|
|
647
774
|
query?: never;
|
|
648
775
|
header?: never;
|
|
@@ -652,46 +779,51 @@ interface paths {
|
|
|
652
779
|
};
|
|
653
780
|
cookie?: never;
|
|
654
781
|
};
|
|
655
|
-
requestBody
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
782
|
+
requestBody?: never;
|
|
783
|
+
responses: {
|
|
784
|
+
/** @description Deletion enqueued */
|
|
785
|
+
200: {
|
|
786
|
+
headers: {
|
|
787
|
+
[name: string]: unknown;
|
|
788
|
+
};
|
|
789
|
+
content: {
|
|
790
|
+
"application/json": {
|
|
791
|
+
success: boolean;
|
|
792
|
+
};
|
|
660
793
|
};
|
|
661
794
|
};
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
200: {
|
|
795
|
+
404: components["responses"]["NotFound"];
|
|
796
|
+
/** @description The Cube has termination protection on. Turn it off with PATCH before deleting. Power-off, wake, restart, restore, network-reset and snapshot operations are not termination and are never blocked by this. */
|
|
797
|
+
409: {
|
|
666
798
|
headers: {
|
|
667
799
|
[name: string]: unknown;
|
|
668
800
|
};
|
|
669
|
-
content
|
|
801
|
+
content: {
|
|
802
|
+
"application/json": {
|
|
803
|
+
error: {
|
|
804
|
+
/** @enum {string} */
|
|
805
|
+
code: "termination_protected";
|
|
806
|
+
cube?: {
|
|
807
|
+
id?: string;
|
|
808
|
+
/** Format: date-time */
|
|
809
|
+
terminationProtectionChangedAt?: string | null;
|
|
810
|
+
terminationProtectionChangedBy?: string | null;
|
|
811
|
+
};
|
|
812
|
+
message: string;
|
|
813
|
+
};
|
|
814
|
+
};
|
|
815
|
+
};
|
|
670
816
|
};
|
|
671
|
-
400: components["responses"]["BadRequest"];
|
|
672
|
-
404: components["responses"]["NotFound"];
|
|
673
817
|
429: components["responses"]["RateLimited"];
|
|
674
818
|
};
|
|
675
819
|
};
|
|
676
|
-
post?: never;
|
|
677
|
-
delete?: never;
|
|
678
820
|
options?: never;
|
|
679
821
|
head?: never;
|
|
680
|
-
patch?: never;
|
|
681
|
-
trace?: never;
|
|
682
|
-
};
|
|
683
|
-
"/spaces/{spaceId}/cubes/{cubeId}/ssh": {
|
|
684
|
-
parameters: {
|
|
685
|
-
query?: never;
|
|
686
|
-
header?: never;
|
|
687
|
-
path?: never;
|
|
688
|
-
cookie?: never;
|
|
689
|
-
};
|
|
690
822
|
/**
|
|
691
|
-
*
|
|
692
|
-
* @description
|
|
823
|
+
* Update a Cube (toggle termination protection)
|
|
824
|
+
* @description Idempotent. Termination protection is the only PATCHable field today: sending the value it already has returns the Cube unchanged and writes no audit row. Omitting it is a 400 rather than a no-op, so a typo in the field name cannot look like success. Rename and resize are not part of the public API.
|
|
693
825
|
*/
|
|
694
|
-
|
|
826
|
+
patch: {
|
|
695
827
|
parameters: {
|
|
696
828
|
query?: never;
|
|
697
829
|
header?: never;
|
|
@@ -701,26 +833,31 @@ interface paths {
|
|
|
701
833
|
};
|
|
702
834
|
cookie?: never;
|
|
703
835
|
};
|
|
704
|
-
requestBody
|
|
836
|
+
requestBody: {
|
|
837
|
+
content: {
|
|
838
|
+
"application/json": {
|
|
839
|
+
/** @description Turn protection on or off. Turning it on stamps `terminationProtectionChangedAt` and `terminationProtectionChangedBy`; turning it off clears both. */
|
|
840
|
+
terminationProtection: boolean;
|
|
841
|
+
};
|
|
842
|
+
};
|
|
843
|
+
};
|
|
705
844
|
responses: {
|
|
706
|
-
/** @description
|
|
845
|
+
/** @description The updated Cube */
|
|
707
846
|
200: {
|
|
708
847
|
headers: {
|
|
709
848
|
[name: string]: unknown;
|
|
710
849
|
};
|
|
711
850
|
content: {
|
|
712
|
-
"application/json":
|
|
851
|
+
"application/json": {
|
|
852
|
+
cube: components["schemas"]["Cube"];
|
|
853
|
+
};
|
|
713
854
|
};
|
|
714
855
|
};
|
|
856
|
+
400: components["responses"]["BadRequest"];
|
|
715
857
|
404: components["responses"]["NotFound"];
|
|
858
|
+
429: components["responses"]["RateLimited"];
|
|
716
859
|
};
|
|
717
860
|
};
|
|
718
|
-
put?: never;
|
|
719
|
-
post?: never;
|
|
720
|
-
delete?: never;
|
|
721
|
-
options?: never;
|
|
722
|
-
head?: never;
|
|
723
|
-
patch?: never;
|
|
724
861
|
trace?: never;
|
|
725
862
|
};
|
|
726
863
|
"/spaces/{spaceId}/cubes/{cubeId}/domains": {
|
|
@@ -777,63 +914,70 @@ interface paths {
|
|
|
777
914
|
requestBody: {
|
|
778
915
|
content: {
|
|
779
916
|
"application/json": {
|
|
917
|
+
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
918
|
+
basicAuthPassword?: string;
|
|
919
|
+
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
920
|
+
basicAuthUser?: string | null;
|
|
921
|
+
/** @description Accept a save that leaves domains on the same cube port with different proxyProtocol settings (for an app that handles both on one port, or mid-migration). Not stored. */
|
|
922
|
+
confirmMixedProxyProtocol?: boolean;
|
|
923
|
+
/** @description Per-domain CORS policy, applied at the edge. Null (default) = CORS disabled and no Access-Control-* header is emitted anywhere. When set, the proxy answers OPTIONS preflight itself (204, the cube is never involved) and adds the headers to normal AND error responses, so a cross-origin request to a failing or stopped cube is never CORS-masked. */
|
|
924
|
+
corsConfig?: {
|
|
925
|
+
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
926
|
+
allowCredentials?: boolean;
|
|
927
|
+
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
928
|
+
allowedHeaders?: string[];
|
|
929
|
+
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
930
|
+
allowedMethods?: string[];
|
|
931
|
+
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
932
|
+
allowedOrigins: string[];
|
|
933
|
+
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
934
|
+
exposedHeaders?: string[];
|
|
935
|
+
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
936
|
+
maxAgeSeconds?: number;
|
|
937
|
+
} | null;
|
|
780
938
|
/** @description The hostname to attach, e.g. app.example.com */
|
|
781
939
|
domain: string;
|
|
940
|
+
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
941
|
+
ipAllowList?: string[] | null;
|
|
942
|
+
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
943
|
+
ipDenyList?: string[] | null;
|
|
944
|
+
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
945
|
+
maxRequestBodyMb?: number | null;
|
|
946
|
+
/**
|
|
947
|
+
* @description Scheme the edge speaks to the CUBE on the backend hop. http (default) = cleartext. https = the cube terminates TLS itself (a control panel holding its own certificate, or an app listening on HTTPS) and answers plain HTTP with a redirect, so it cannot be reached over cleartext at all. Visitors are on HTTPS either way. The dial port is derived: https on the default port 80 connects on 443; a deliberate custom port is honored exactly. Applied as saved: if the cube does not serve this hostname over HTTPS, requests to the domain fail until you set it back to http.
|
|
948
|
+
* @enum {string}
|
|
949
|
+
*/
|
|
950
|
+
originScheme?: "http" | "https";
|
|
782
951
|
/** @description Cube port the domain proxies to. */
|
|
783
952
|
port: number;
|
|
784
953
|
/**
|
|
785
|
-
* @description
|
|
786
|
-
* @enum {string}
|
|
954
|
+
* @description Send a PROXY protocol header (v1 text or v2 binary) at the start of every connection to the cube, so the app reads the visitor's address from the connection itself, as on a plain VPS. Null (default) = off. The app must accept PROXY protocol on this port, or every request to the domain fails; it is applied as saved. Every domain on the same cube port must use the same setting: a save that would mix them is refused with 409 unless confirmMixedProxyProtocol is true.
|
|
955
|
+
* @enum {string|null}
|
|
787
956
|
*/
|
|
788
|
-
|
|
789
|
-
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
790
|
-
responseHeaderTimeoutSecs?: number;
|
|
957
|
+
proxyProtocol?: "v1" | "v2" | null;
|
|
791
958
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
792
|
-
|
|
959
|
+
requestHeaderOverrides?: {
|
|
960
|
+
remove?: string[];
|
|
793
961
|
set?: {
|
|
794
962
|
[key: string]: string;
|
|
795
963
|
};
|
|
796
|
-
remove?: string[];
|
|
797
964
|
} | null;
|
|
965
|
+
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
966
|
+
responseCompression?: boolean;
|
|
798
967
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
799
|
-
|
|
968
|
+
responseHeaderOverrides?: {
|
|
969
|
+
remove?: string[];
|
|
800
970
|
set?: {
|
|
801
971
|
[key: string]: string;
|
|
802
972
|
};
|
|
803
|
-
remove?: string[];
|
|
804
|
-
} | null;
|
|
805
|
-
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
806
|
-
maxRequestBodyMb?: number | null;
|
|
807
|
-
/** @description Per-domain CORS policy, applied at the edge. Null (default) = CORS disabled and no Access-Control-* header is emitted anywhere. When set, the proxy answers OPTIONS preflight itself (204, the cube is never involved) and adds the headers to normal AND error responses, so a cross-origin request to a failing or sleeping cube is never CORS-masked. */
|
|
808
|
-
corsConfig?: {
|
|
809
|
-
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
810
|
-
allowedOrigins: string[];
|
|
811
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
812
|
-
allowedMethods?: string[];
|
|
813
|
-
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
814
|
-
allowedHeaders?: string[];
|
|
815
|
-
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
816
|
-
exposedHeaders?: string[];
|
|
817
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
818
|
-
allowCredentials?: boolean;
|
|
819
|
-
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
820
|
-
maxAgeSeconds?: number;
|
|
821
973
|
} | null;
|
|
974
|
+
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
975
|
+
responseHeaderTimeoutSecs?: number;
|
|
822
976
|
/**
|
|
823
|
-
* @description
|
|
977
|
+
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
824
978
|
* @enum {string}
|
|
825
979
|
*/
|
|
826
|
-
|
|
827
|
-
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
828
|
-
responseCompression?: boolean;
|
|
829
|
-
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
830
|
-
ipAllowList?: string[] | null;
|
|
831
|
-
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
832
|
-
ipDenyList?: string[] | null;
|
|
833
|
-
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
834
|
-
basicAuthUser?: string | null;
|
|
835
|
-
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
836
|
-
basicAuthPassword?: string;
|
|
980
|
+
securityHeadersMode?: "enforced" | "app_managed";
|
|
837
981
|
};
|
|
838
982
|
};
|
|
839
983
|
};
|
|
@@ -851,69 +995,16 @@ interface paths {
|
|
|
851
995
|
};
|
|
852
996
|
};
|
|
853
997
|
400: components["responses"]["BadRequest"];
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
};
|
|
857
|
-
delete?: never;
|
|
858
|
-
options?: never;
|
|
859
|
-
head?: never;
|
|
860
|
-
patch?: never;
|
|
861
|
-
trace?: never;
|
|
862
|
-
};
|
|
863
|
-
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}/records": {
|
|
864
|
-
parameters: {
|
|
865
|
-
query?: never;
|
|
866
|
-
header?: never;
|
|
867
|
-
path?: never;
|
|
868
|
-
cookie?: never;
|
|
869
|
-
};
|
|
870
|
-
/**
|
|
871
|
-
* DNS records this domain needs, with their live status
|
|
872
|
-
* @description Every record required for the domain to work, each checked against live DNS. Poll this after publishing them.
|
|
873
|
-
*
|
|
874
|
-
* `state` is per record: `found`, `missing` (not published yet — the expected state before you add it, never an error), `mismatch` (something else is there), or `unknown` (we could not check — never a statement about your DNS). `summary.complete` is true only when every record is `found`.
|
|
875
|
-
*
|
|
876
|
-
* A wildcard needs three records; an exact host needs one. Each call performs live DNS lookups and is rate limited.
|
|
877
|
-
*/
|
|
878
|
-
get: {
|
|
879
|
-
parameters: {
|
|
880
|
-
query?: never;
|
|
881
|
-
header?: never;
|
|
882
|
-
path: {
|
|
883
|
-
spaceId: string;
|
|
884
|
-
cubeId: string;
|
|
885
|
-
mappingId: string;
|
|
886
|
-
};
|
|
887
|
-
cookie?: never;
|
|
888
|
-
};
|
|
889
|
-
requestBody?: never;
|
|
890
|
-
responses: {
|
|
891
|
-
/** @description Required records with live status */
|
|
892
|
-
200: {
|
|
998
|
+
/** @description Refused. Among other reasons (the domain is in use, or is being removed): the save would leave domains on the same cube port with different proxyProtocol settings. Then `errorMeta.code` is `proxy_protocol_port_mismatch`, with `errorMeta.port` and `errorMeta.domains` naming the other domains. Change them together, or resend with confirmMixedProxyProtocol: true. */
|
|
999
|
+
409: {
|
|
893
1000
|
headers: {
|
|
894
1001
|
[name: string]: unknown;
|
|
895
1002
|
};
|
|
896
|
-
content
|
|
897
|
-
"application/json": {
|
|
898
|
-
domain: string;
|
|
899
|
-
isWildcard: boolean;
|
|
900
|
-
records: components["schemas"]["DnsRecordStatus"][];
|
|
901
|
-
summary: {
|
|
902
|
-
found: number;
|
|
903
|
-
total: number;
|
|
904
|
-
complete: boolean;
|
|
905
|
-
};
|
|
906
|
-
/** Format: date-time */
|
|
907
|
-
checkedAt: string;
|
|
908
|
-
};
|
|
909
|
-
};
|
|
1003
|
+
content?: never;
|
|
910
1004
|
};
|
|
911
|
-
404: components["responses"]["NotFound"];
|
|
912
1005
|
429: components["responses"]["RateLimited"];
|
|
913
1006
|
};
|
|
914
1007
|
};
|
|
915
|
-
put?: never;
|
|
916
|
-
post?: never;
|
|
917
1008
|
delete?: never;
|
|
918
1009
|
options?: never;
|
|
919
1010
|
head?: never;
|
|
@@ -978,59 +1069,66 @@ interface paths {
|
|
|
978
1069
|
requestBody: {
|
|
979
1070
|
content: {
|
|
980
1071
|
"application/json": {
|
|
1072
|
+
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
1073
|
+
basicAuthPassword?: string;
|
|
1074
|
+
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
1075
|
+
basicAuthUser?: string | null;
|
|
1076
|
+
/** @description Accept a save that leaves domains on the same cube port with different proxyProtocol settings (for an app that handles both on one port, or mid-migration). Not stored. */
|
|
1077
|
+
confirmMixedProxyProtocol?: boolean;
|
|
1078
|
+
/** @description Per-domain CORS policy, applied at the edge. Null (default) = CORS disabled and no Access-Control-* header is emitted anywhere. When set, the proxy answers OPTIONS preflight itself (204, the cube is never involved) and adds the headers to normal AND error responses, so a cross-origin request to a failing or stopped cube is never CORS-masked. */
|
|
1079
|
+
corsConfig?: {
|
|
1080
|
+
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1081
|
+
allowCredentials?: boolean;
|
|
1082
|
+
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
1083
|
+
allowedHeaders?: string[];
|
|
1084
|
+
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
1085
|
+
allowedMethods?: string[];
|
|
1086
|
+
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
1087
|
+
allowedOrigins: string[];
|
|
1088
|
+
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
1089
|
+
exposedHeaders?: string[];
|
|
1090
|
+
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
1091
|
+
maxAgeSeconds?: number;
|
|
1092
|
+
} | null;
|
|
1093
|
+
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
1094
|
+
ipAllowList?: string[] | null;
|
|
1095
|
+
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
1096
|
+
ipDenyList?: string[] | null;
|
|
1097
|
+
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
1098
|
+
maxRequestBodyMb?: number | null;
|
|
981
1099
|
/**
|
|
982
|
-
* @description
|
|
1100
|
+
* @description Scheme the edge speaks to the CUBE on the backend hop. http (default) = cleartext. https = the cube terminates TLS itself (a control panel holding its own certificate, or an app listening on HTTPS) and answers plain HTTP with a redirect, so it cannot be reached over cleartext at all. Visitors are on HTTPS either way. The dial port is derived: https on the default port 80 connects on 443; a deliberate custom port is honored exactly. Applied as saved: if the cube does not serve this hostname over HTTPS, requests to the domain fail until you set it back to http.
|
|
983
1101
|
* @enum {string}
|
|
984
1102
|
*/
|
|
985
|
-
|
|
986
|
-
/**
|
|
987
|
-
|
|
1103
|
+
originScheme?: "http" | "https";
|
|
1104
|
+
/**
|
|
1105
|
+
* @description Send a PROXY protocol header (v1 text or v2 binary) at the start of every connection to the cube, so the app reads the visitor's address from the connection itself, as on a plain VPS. Null (default) = off. The app must accept PROXY protocol on this port, or every request to the domain fails; it is applied as saved. Every domain on the same cube port must use the same setting: a save that would mix them is refused with 409 unless confirmMixedProxyProtocol is true.
|
|
1106
|
+
* @enum {string|null}
|
|
1107
|
+
*/
|
|
1108
|
+
proxyProtocol?: "v1" | "v2" | null;
|
|
988
1109
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
989
|
-
|
|
1110
|
+
requestHeaderOverrides?: {
|
|
1111
|
+
remove?: string[];
|
|
990
1112
|
set?: {
|
|
991
1113
|
[key: string]: string;
|
|
992
1114
|
};
|
|
993
|
-
remove?: string[];
|
|
994
1115
|
} | null;
|
|
1116
|
+
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
1117
|
+
responseCompression?: boolean;
|
|
995
1118
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
996
|
-
|
|
1119
|
+
responseHeaderOverrides?: {
|
|
1120
|
+
remove?: string[];
|
|
997
1121
|
set?: {
|
|
998
1122
|
[key: string]: string;
|
|
999
1123
|
};
|
|
1000
|
-
remove?: string[];
|
|
1001
|
-
} | null;
|
|
1002
|
-
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
1003
|
-
maxRequestBodyMb?: number | null;
|
|
1004
|
-
/** @description Per-domain CORS policy, applied at the edge. Null (default) = CORS disabled and no Access-Control-* header is emitted anywhere. When set, the proxy answers OPTIONS preflight itself (204, the cube is never involved) and adds the headers to normal AND error responses, so a cross-origin request to a failing or sleeping cube is never CORS-masked. */
|
|
1005
|
-
corsConfig?: {
|
|
1006
|
-
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
1007
|
-
allowedOrigins: string[];
|
|
1008
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
1009
|
-
allowedMethods?: string[];
|
|
1010
|
-
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
1011
|
-
allowedHeaders?: string[];
|
|
1012
|
-
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
1013
|
-
exposedHeaders?: string[];
|
|
1014
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1015
|
-
allowCredentials?: boolean;
|
|
1016
|
-
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
1017
|
-
maxAgeSeconds?: number;
|
|
1018
1124
|
} | null;
|
|
1125
|
+
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
1126
|
+
responseHeaderTimeoutSecs?: number;
|
|
1019
1127
|
/**
|
|
1020
|
-
* @description
|
|
1128
|
+
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
1021
1129
|
* @enum {string}
|
|
1022
|
-
*/
|
|
1023
|
-
|
|
1024
|
-
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
1025
|
-
responseCompression?: boolean;
|
|
1026
|
-
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
1027
|
-
ipAllowList?: string[] | null;
|
|
1028
|
-
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
1029
|
-
ipDenyList?: string[] | null;
|
|
1030
|
-
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
1031
|
-
basicAuthUser?: string | null;
|
|
1032
|
-
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
1033
|
-
basicAuthPassword?: string;
|
|
1130
|
+
*/
|
|
1131
|
+
securityHeadersMode?: "enforced" | "app_managed";
|
|
1034
1132
|
};
|
|
1035
1133
|
};
|
|
1036
1134
|
};
|
|
@@ -1048,19 +1146,33 @@ interface paths {
|
|
|
1048
1146
|
};
|
|
1049
1147
|
400: components["responses"]["BadRequest"];
|
|
1050
1148
|
404: components["responses"]["NotFound"];
|
|
1149
|
+
/** @description Refused. Among other reasons (the domain is in use, or is being removed): the save would leave domains on the same cube port with different proxyProtocol settings. Then `errorMeta.code` is `proxy_protocol_port_mismatch`, with `errorMeta.port` and `errorMeta.domains` naming the other domains. Change them together, or resend with confirmMixedProxyProtocol: true. */
|
|
1150
|
+
409: {
|
|
1151
|
+
headers: {
|
|
1152
|
+
[name: string]: unknown;
|
|
1153
|
+
};
|
|
1154
|
+
content?: never;
|
|
1155
|
+
};
|
|
1051
1156
|
429: components["responses"]["RateLimited"];
|
|
1052
1157
|
};
|
|
1053
1158
|
};
|
|
1054
1159
|
trace?: never;
|
|
1055
1160
|
};
|
|
1056
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1161
|
+
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}/records": {
|
|
1057
1162
|
parameters: {
|
|
1058
1163
|
query?: never;
|
|
1059
1164
|
header?: never;
|
|
1060
1165
|
path?: never;
|
|
1061
1166
|
cookie?: never;
|
|
1062
1167
|
};
|
|
1063
|
-
/**
|
|
1168
|
+
/**
|
|
1169
|
+
* DNS records this domain needs, with their live status
|
|
1170
|
+
* @description Every record required for the domain to work, each checked against live DNS. Poll this after publishing them.
|
|
1171
|
+
*
|
|
1172
|
+
* `state` is per record: `found`, `missing` (not published yet — the expected state before you add it, never an error), `mismatch` (something else is there), or `unknown` (we could not check — never a statement about your DNS). `summary.complete` is true only when every record is `found`.
|
|
1173
|
+
*
|
|
1174
|
+
* A wildcard needs three records; an exact host needs one. Each call performs live DNS lookups and is rate limited.
|
|
1175
|
+
*/
|
|
1064
1176
|
get: {
|
|
1065
1177
|
parameters: {
|
|
1066
1178
|
query?: never;
|
|
@@ -1068,73 +1180,123 @@ interface paths {
|
|
|
1068
1180
|
path: {
|
|
1069
1181
|
spaceId: string;
|
|
1070
1182
|
cubeId: string;
|
|
1183
|
+
mappingId: string;
|
|
1071
1184
|
};
|
|
1072
1185
|
cookie?: never;
|
|
1073
1186
|
};
|
|
1074
1187
|
requestBody?: never;
|
|
1075
1188
|
responses: {
|
|
1076
|
-
/** @description
|
|
1189
|
+
/** @description Required records with live status */
|
|
1077
1190
|
200: {
|
|
1078
1191
|
headers: {
|
|
1079
1192
|
[name: string]: unknown;
|
|
1080
1193
|
};
|
|
1081
1194
|
content: {
|
|
1082
1195
|
"application/json": {
|
|
1083
|
-
|
|
1196
|
+
/** Format: date-time */
|
|
1197
|
+
checkedAt: string;
|
|
1198
|
+
domain: string;
|
|
1199
|
+
isWildcard: boolean;
|
|
1200
|
+
records: components["schemas"]["DnsRecordStatus"][];
|
|
1201
|
+
summary: {
|
|
1202
|
+
complete: boolean;
|
|
1203
|
+
found: number;
|
|
1204
|
+
total: number;
|
|
1205
|
+
};
|
|
1084
1206
|
};
|
|
1085
1207
|
};
|
|
1086
1208
|
};
|
|
1209
|
+
404: components["responses"]["NotFound"];
|
|
1210
|
+
429: components["responses"]["RateLimited"];
|
|
1087
1211
|
};
|
|
1088
1212
|
};
|
|
1089
1213
|
put?: never;
|
|
1090
|
-
|
|
1214
|
+
post?: never;
|
|
1215
|
+
delete?: never;
|
|
1216
|
+
options?: never;
|
|
1217
|
+
head?: never;
|
|
1218
|
+
patch?: never;
|
|
1219
|
+
trace?: never;
|
|
1220
|
+
};
|
|
1221
|
+
"/spaces/{spaceId}/cubes/{cubeId}/power-off": {
|
|
1222
|
+
parameters: {
|
|
1223
|
+
query?: never;
|
|
1224
|
+
header?: never;
|
|
1225
|
+
path?: never;
|
|
1226
|
+
cookie?: never;
|
|
1227
|
+
};
|
|
1228
|
+
get?: never;
|
|
1229
|
+
put?: never;
|
|
1230
|
+
/** Power off a running Cube */
|
|
1091
1231
|
post: {
|
|
1092
1232
|
parameters: {
|
|
1093
1233
|
query?: never;
|
|
1094
|
-
header?:
|
|
1095
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1096
|
-
"Idempotency-Key"?: string;
|
|
1097
|
-
};
|
|
1234
|
+
header?: never;
|
|
1098
1235
|
path: {
|
|
1099
1236
|
spaceId: string;
|
|
1100
1237
|
cubeId: string;
|
|
1101
1238
|
};
|
|
1102
1239
|
cookie?: never;
|
|
1103
1240
|
};
|
|
1104
|
-
requestBody
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
/**
|
|
1111
|
-
* @description Whether the mapping also forwards UDP traffic on the same host port, in addition to TCP. Optional; defaults to true when omitted.
|
|
1112
|
-
* @default true
|
|
1113
|
-
*/
|
|
1114
|
-
udpEnabled?: boolean;
|
|
1115
|
-
/** @description IPs/CIDRs allowed to reach the published port. Omit or send an empty array to leave the port open to the internet. */
|
|
1116
|
-
whitelistedIps?: string[];
|
|
1117
|
-
/**
|
|
1118
|
-
* @deprecated
|
|
1119
|
-
* @description DEPRECATED alias for `whitelistedIps`, accepted for backwards compatibility. `whitelistedIps` wins if both are sent. Use `whitelistedIps` in new code.
|
|
1120
|
-
*/
|
|
1121
|
-
whitelistIps?: string[];
|
|
1241
|
+
requestBody?: never;
|
|
1242
|
+
responses: {
|
|
1243
|
+
/** @description Power off enqueued */
|
|
1244
|
+
200: {
|
|
1245
|
+
headers: {
|
|
1246
|
+
[name: string]: unknown;
|
|
1122
1247
|
};
|
|
1248
|
+
content?: never;
|
|
1249
|
+
};
|
|
1250
|
+
404: components["responses"]["NotFound"];
|
|
1251
|
+
429: components["responses"]["RateLimited"];
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
delete?: never;
|
|
1255
|
+
options?: never;
|
|
1256
|
+
head?: never;
|
|
1257
|
+
patch?: never;
|
|
1258
|
+
trace?: never;
|
|
1259
|
+
};
|
|
1260
|
+
"/spaces/{spaceId}/cubes/{cubeId}/restart": {
|
|
1261
|
+
parameters: {
|
|
1262
|
+
query?: never;
|
|
1263
|
+
header?: never;
|
|
1264
|
+
path?: never;
|
|
1265
|
+
cookie?: never;
|
|
1266
|
+
};
|
|
1267
|
+
get?: never;
|
|
1268
|
+
put?: never;
|
|
1269
|
+
/**
|
|
1270
|
+
* Restart a running Cube
|
|
1271
|
+
* @description Cold-restarts the Cube: the hypervisor process is stopped and relaunched, so the Cube boots against the host's current kernel. This is how a Cube picks up a refreshed guest kernel after a platform image update — a `reboot` issued inside the Cube cannot do it, because the kernel is supplied externally by the host. Disk state is preserved; only the kernel changes. Cube must be `running` (a stopped Cube already picks up the latest kernel when started). Concurrent restarts of the same Cube are rejected with 409 rather than queued twice.
|
|
1272
|
+
*/
|
|
1273
|
+
post: {
|
|
1274
|
+
parameters: {
|
|
1275
|
+
query?: never;
|
|
1276
|
+
header?: never;
|
|
1277
|
+
path: {
|
|
1278
|
+
spaceId: string;
|
|
1279
|
+
cubeId: string;
|
|
1123
1280
|
};
|
|
1281
|
+
cookie?: never;
|
|
1124
1282
|
};
|
|
1283
|
+
requestBody?: never;
|
|
1125
1284
|
responses: {
|
|
1126
|
-
/** @description
|
|
1127
|
-
|
|
1285
|
+
/** @description Restart enqueued */
|
|
1286
|
+
200: {
|
|
1128
1287
|
headers: {
|
|
1129
1288
|
[name: string]: unknown;
|
|
1130
1289
|
};
|
|
1131
|
-
content
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1290
|
+
content?: never;
|
|
1291
|
+
};
|
|
1292
|
+
404: components["responses"]["NotFound"];
|
|
1293
|
+
/** @description Cube is not running, or a restart is already in progress */
|
|
1294
|
+
409: {
|
|
1295
|
+
headers: {
|
|
1296
|
+
[name: string]: unknown;
|
|
1135
1297
|
};
|
|
1298
|
+
content?: never;
|
|
1136
1299
|
};
|
|
1137
|
-
400: components["responses"]["BadRequest"];
|
|
1138
1300
|
429: components["responses"]["RateLimited"];
|
|
1139
1301
|
};
|
|
1140
1302
|
};
|
|
@@ -1144,7 +1306,7 @@ interface paths {
|
|
|
1144
1306
|
patch?: never;
|
|
1145
1307
|
trace?: never;
|
|
1146
1308
|
};
|
|
1147
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1309
|
+
"/spaces/{spaceId}/cubes/{cubeId}/restore": {
|
|
1148
1310
|
parameters: {
|
|
1149
1311
|
query?: never;
|
|
1150
1312
|
header?: never;
|
|
@@ -1153,22 +1315,26 @@ interface paths {
|
|
|
1153
1315
|
};
|
|
1154
1316
|
get?: never;
|
|
1155
1317
|
put?: never;
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
delete: {
|
|
1318
|
+
/** Restore a Cube from a snapshot */
|
|
1319
|
+
post: {
|
|
1159
1320
|
parameters: {
|
|
1160
1321
|
query?: never;
|
|
1161
1322
|
header?: never;
|
|
1162
1323
|
path: {
|
|
1163
1324
|
spaceId: string;
|
|
1164
1325
|
cubeId: string;
|
|
1165
|
-
mappingId: string;
|
|
1166
1326
|
};
|
|
1167
1327
|
cookie?: never;
|
|
1168
1328
|
};
|
|
1169
|
-
requestBody
|
|
1329
|
+
requestBody: {
|
|
1330
|
+
content: {
|
|
1331
|
+
"application/json": {
|
|
1332
|
+
snapshotId: string;
|
|
1333
|
+
};
|
|
1334
|
+
};
|
|
1335
|
+
};
|
|
1170
1336
|
responses: {
|
|
1171
|
-
/** @description
|
|
1337
|
+
/** @description Restore enqueued */
|
|
1172
1338
|
200: {
|
|
1173
1339
|
headers: {
|
|
1174
1340
|
[name: string]: unknown;
|
|
@@ -1182,6 +1348,7 @@ interface paths {
|
|
|
1182
1348
|
404: components["responses"]["NotFound"];
|
|
1183
1349
|
};
|
|
1184
1350
|
};
|
|
1351
|
+
delete?: never;
|
|
1185
1352
|
options?: never;
|
|
1186
1353
|
head?: never;
|
|
1187
1354
|
patch?: never;
|
|
@@ -1306,97 +1473,39 @@ interface paths {
|
|
|
1306
1473
|
patch?: never;
|
|
1307
1474
|
trace?: never;
|
|
1308
1475
|
};
|
|
1309
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1310
|
-
parameters: {
|
|
1311
|
-
query?: never;
|
|
1312
|
-
header?: never;
|
|
1313
|
-
path?: never;
|
|
1314
|
-
cookie?: never;
|
|
1315
|
-
};
|
|
1316
|
-
get?: never;
|
|
1317
|
-
put?: never;
|
|
1318
|
-
/** Restore a Cube from a snapshot */
|
|
1319
|
-
post: {
|
|
1320
|
-
parameters: {
|
|
1321
|
-
query?: never;
|
|
1322
|
-
header?: never;
|
|
1323
|
-
path: {
|
|
1324
|
-
spaceId: string;
|
|
1325
|
-
cubeId: string;
|
|
1326
|
-
};
|
|
1327
|
-
cookie?: never;
|
|
1328
|
-
};
|
|
1329
|
-
requestBody: {
|
|
1330
|
-
content: {
|
|
1331
|
-
"application/json": {
|
|
1332
|
-
snapshotId: string;
|
|
1333
|
-
};
|
|
1334
|
-
};
|
|
1335
|
-
};
|
|
1336
|
-
responses: {
|
|
1337
|
-
/** @description Restore enqueued */
|
|
1338
|
-
200: {
|
|
1339
|
-
headers: {
|
|
1340
|
-
[name: string]: unknown;
|
|
1341
|
-
};
|
|
1342
|
-
content: {
|
|
1343
|
-
"application/json": {
|
|
1344
|
-
success: boolean;
|
|
1345
|
-
};
|
|
1346
|
-
};
|
|
1347
|
-
};
|
|
1348
|
-
404: components["responses"]["NotFound"];
|
|
1349
|
-
};
|
|
1350
|
-
};
|
|
1351
|
-
delete?: never;
|
|
1352
|
-
options?: never;
|
|
1353
|
-
head?: never;
|
|
1354
|
-
patch?: never;
|
|
1355
|
-
trace?: never;
|
|
1356
|
-
};
|
|
1357
|
-
"/spaces/{spaceId}/backups/{backupId}/download": {
|
|
1476
|
+
"/spaces/{spaceId}/cubes/{cubeId}/ssh": {
|
|
1358
1477
|
parameters: {
|
|
1359
1478
|
query?: never;
|
|
1360
1479
|
header?: never;
|
|
1361
1480
|
path?: never;
|
|
1362
1481
|
cookie?: never;
|
|
1363
1482
|
};
|
|
1364
|
-
/**
|
|
1483
|
+
/**
|
|
1484
|
+
* Get a Cube's SSH connection info
|
|
1485
|
+
* @description Host (server public IPv4), host SSH port, login user, and the Cube's captured SSH host public keys. **Use `user` rather than assuming a username** — it is `ubuntu` or `debian` on Cubes created from images that ship a default user, and `root` on Cubes created before that change or imported from a rootfs without one. `hostKeys` is empty only until the reachability cron makes its first capture; clients fall back to trust-on-first-use until then, and pin strictly afterwards.
|
|
1486
|
+
*/
|
|
1365
1487
|
get: {
|
|
1366
1488
|
parameters: {
|
|
1367
1489
|
query?: never;
|
|
1368
1490
|
header?: never;
|
|
1369
1491
|
path: {
|
|
1370
1492
|
spaceId: string;
|
|
1371
|
-
|
|
1493
|
+
cubeId: string;
|
|
1372
1494
|
};
|
|
1373
1495
|
cookie?: never;
|
|
1374
1496
|
};
|
|
1375
1497
|
requestBody?: never;
|
|
1376
1498
|
responses: {
|
|
1377
|
-
/** @description
|
|
1499
|
+
/** @description SSH connection info */
|
|
1378
1500
|
200: {
|
|
1379
1501
|
headers: {
|
|
1380
1502
|
[name: string]: unknown;
|
|
1381
1503
|
};
|
|
1382
1504
|
content: {
|
|
1383
|
-
"application/json":
|
|
1384
|
-
url?: string;
|
|
1385
|
-
filename?: string;
|
|
1386
|
-
sizeBytes?: number | null;
|
|
1387
|
-
/** Format: date-time */
|
|
1388
|
-
expiresAt?: string;
|
|
1389
|
-
};
|
|
1505
|
+
"application/json": components["schemas"]["CubeSshInfo"];
|
|
1390
1506
|
};
|
|
1391
1507
|
};
|
|
1392
1508
|
404: components["responses"]["NotFound"];
|
|
1393
|
-
/** @description Backup is not in 'complete' status */
|
|
1394
|
-
409: {
|
|
1395
|
-
headers: {
|
|
1396
|
-
[name: string]: unknown;
|
|
1397
|
-
};
|
|
1398
|
-
content?: never;
|
|
1399
|
-
};
|
|
1400
1509
|
};
|
|
1401
1510
|
};
|
|
1402
1511
|
put?: never;
|
|
@@ -1407,7 +1516,7 @@ interface paths {
|
|
|
1407
1516
|
patch?: never;
|
|
1408
1517
|
trace?: never;
|
|
1409
1518
|
};
|
|
1410
|
-
"/spaces/{spaceId}/cubes/
|
|
1519
|
+
"/spaces/{spaceId}/cubes/{cubeId}/ssh-port": {
|
|
1411
1520
|
parameters: {
|
|
1412
1521
|
query?: never;
|
|
1413
1522
|
header?: never;
|
|
@@ -1415,179 +1524,140 @@ interface paths {
|
|
|
1415
1524
|
cookie?: never;
|
|
1416
1525
|
};
|
|
1417
1526
|
get?: never;
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1527
|
+
/**
|
|
1528
|
+
* Change a Cube's SSH port
|
|
1529
|
+
* @description Sets the port INSIDE the Cube that SSH is forwarded to — NOT the host port you connect to. The host port is allocated by Krova and is unchanged by this call. Pointing this at a port nothing is listening on inside the Cube will make SSH unreachable; the default is 22. The change is applied atomically (the old port mapping is replaced).
|
|
1530
|
+
*/
|
|
1531
|
+
put: {
|
|
1421
1532
|
parameters: {
|
|
1422
1533
|
query?: never;
|
|
1423
1534
|
header?: never;
|
|
1424
1535
|
path: {
|
|
1425
1536
|
spaceId: string;
|
|
1537
|
+
cubeId: string;
|
|
1426
1538
|
};
|
|
1427
1539
|
cookie?: never;
|
|
1428
1540
|
};
|
|
1429
1541
|
requestBody: {
|
|
1430
1542
|
content: {
|
|
1431
1543
|
"application/json": {
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
/**
|
|
1435
|
-
* @description What to do with SSH access on the imported rootfs. `replace` (default) writes `sshPublicKey` to the login user's authorized_keys and requires `sshPublicKey` to be set. `keep` leaves the image's own authorized_keys and sshd configuration completely untouched — nothing is written — so you must already hold a private key that the image accepts, or you will not be able to log in.
|
|
1436
|
-
* @default replace
|
|
1437
|
-
* @enum {string}
|
|
1438
|
-
*/
|
|
1439
|
-
sshKeyMode?: "replace" | "keep";
|
|
1440
|
-
/** @description Public key to install when `sshKeyMode` is `replace`. Written to the login user's `~/.ssh/authorized_keys` — which user that is comes from the imported rootfs itself, so an image without a Krova default user keeps logging in as root. Ignored when `sshKeyMode` is `keep`. */
|
|
1441
|
-
sshPublicKey?: string | null;
|
|
1442
|
-
region?: string | null;
|
|
1443
|
-
vcpusOverride?: number | null;
|
|
1444
|
-
ramMbOverride?: number | null;
|
|
1445
|
-
diskGbOverride?: number | null;
|
|
1446
|
-
userData?: string | null;
|
|
1447
|
-
expectedConfig?: {
|
|
1448
|
-
vcpus?: number;
|
|
1449
|
-
ramMb?: number;
|
|
1450
|
-
diskLimitGb?: number;
|
|
1451
|
-
} | null;
|
|
1544
|
+
/** @description The port inside the Cube that sshd listens on (default 22). This is the Cube side of the mapping, not the host port. */
|
|
1545
|
+
cubePort: number;
|
|
1452
1546
|
};
|
|
1453
1547
|
};
|
|
1454
1548
|
};
|
|
1455
1549
|
responses: {
|
|
1456
|
-
/** @description
|
|
1457
|
-
|
|
1458
|
-
headers: {
|
|
1459
|
-
[name: string]: unknown;
|
|
1460
|
-
};
|
|
1461
|
-
content: {
|
|
1462
|
-
"application/json": {
|
|
1463
|
-
importId?: string;
|
|
1464
|
-
uploadId?: string;
|
|
1465
|
-
key?: string;
|
|
1466
|
-
chunkSizeBytes?: number;
|
|
1467
|
-
parts?: {
|
|
1468
|
-
partNumber?: number;
|
|
1469
|
-
url?: string;
|
|
1470
|
-
}[];
|
|
1471
|
-
/** Format: date-time */
|
|
1472
|
-
expiresAt?: string;
|
|
1473
|
-
};
|
|
1474
|
-
};
|
|
1475
|
-
};
|
|
1476
|
-
/** @description Invalid input */
|
|
1477
|
-
400: {
|
|
1478
|
-
headers: {
|
|
1479
|
-
[name: string]: unknown;
|
|
1480
|
-
};
|
|
1481
|
-
content?: never;
|
|
1482
|
-
};
|
|
1483
|
-
/** @description Plan limit exceeded */
|
|
1484
|
-
403: {
|
|
1485
|
-
headers: {
|
|
1486
|
-
[name: string]: unknown;
|
|
1487
|
-
};
|
|
1488
|
-
content?: never;
|
|
1489
|
-
};
|
|
1490
|
-
/** @description No active storage backend */
|
|
1491
|
-
503: {
|
|
1550
|
+
/** @description SSH port updated */
|
|
1551
|
+
200: {
|
|
1492
1552
|
headers: {
|
|
1493
1553
|
[name: string]: unknown;
|
|
1494
1554
|
};
|
|
1495
1555
|
content?: never;
|
|
1496
1556
|
};
|
|
1557
|
+
400: components["responses"]["BadRequest"];
|
|
1558
|
+
404: components["responses"]["NotFound"];
|
|
1559
|
+
429: components["responses"]["RateLimited"];
|
|
1497
1560
|
};
|
|
1498
1561
|
};
|
|
1562
|
+
post?: never;
|
|
1499
1563
|
delete?: never;
|
|
1500
1564
|
options?: never;
|
|
1501
1565
|
head?: never;
|
|
1502
1566
|
patch?: never;
|
|
1503
1567
|
trace?: never;
|
|
1504
1568
|
};
|
|
1505
|
-
"/spaces/{spaceId}/cubes/
|
|
1569
|
+
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings": {
|
|
1506
1570
|
parameters: {
|
|
1507
1571
|
query?: never;
|
|
1508
1572
|
header?: never;
|
|
1509
1573
|
path?: never;
|
|
1510
1574
|
cookie?: never;
|
|
1511
1575
|
};
|
|
1512
|
-
/**
|
|
1576
|
+
/** List TCP port forwards for a Cube */
|
|
1513
1577
|
get: {
|
|
1514
1578
|
parameters: {
|
|
1515
1579
|
query?: never;
|
|
1516
1580
|
header?: never;
|
|
1517
1581
|
path: {
|
|
1518
1582
|
spaceId: string;
|
|
1519
|
-
|
|
1583
|
+
cubeId: string;
|
|
1520
1584
|
};
|
|
1521
1585
|
cookie?: never;
|
|
1522
1586
|
};
|
|
1523
1587
|
requestBody?: never;
|
|
1524
1588
|
responses: {
|
|
1525
|
-
/** @description
|
|
1589
|
+
/** @description TCP mapping list */
|
|
1526
1590
|
200: {
|
|
1527
1591
|
headers: {
|
|
1528
1592
|
[name: string]: unknown;
|
|
1529
1593
|
};
|
|
1530
1594
|
content: {
|
|
1531
1595
|
"application/json": {
|
|
1532
|
-
|
|
1533
|
-
id?: string;
|
|
1534
|
-
name?: string;
|
|
1535
|
-
/** @enum {string} */
|
|
1536
|
-
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
1537
|
-
cubeId?: string | null;
|
|
1538
|
-
error?: string | null;
|
|
1539
|
-
createdAt?: string;
|
|
1540
|
-
updatedAt?: string;
|
|
1541
|
-
completedAt?: string | null;
|
|
1542
|
-
};
|
|
1596
|
+
tcpMappings: components["schemas"]["TcpMapping"][];
|
|
1543
1597
|
};
|
|
1544
1598
|
};
|
|
1545
1599
|
};
|
|
1546
|
-
404: components["responses"]["NotFound"];
|
|
1547
1600
|
};
|
|
1548
1601
|
};
|
|
1549
1602
|
put?: never;
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
delete: {
|
|
1603
|
+
/** Create a TCP port forward */
|
|
1604
|
+
post: {
|
|
1553
1605
|
parameters: {
|
|
1554
1606
|
query?: never;
|
|
1555
|
-
header?:
|
|
1607
|
+
header?: {
|
|
1608
|
+
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1609
|
+
"Idempotency-Key"?: string;
|
|
1610
|
+
};
|
|
1556
1611
|
path: {
|
|
1557
1612
|
spaceId: string;
|
|
1558
|
-
|
|
1613
|
+
cubeId: string;
|
|
1559
1614
|
};
|
|
1560
1615
|
cookie?: never;
|
|
1561
1616
|
};
|
|
1562
|
-
requestBody
|
|
1617
|
+
requestBody: {
|
|
1618
|
+
content: {
|
|
1619
|
+
"application/json": {
|
|
1620
|
+
cubePort: number;
|
|
1621
|
+
/** @description Optional human label for the mapping. */
|
|
1622
|
+
label?: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* @description Also forward UDP on this port. Defaults to true. Always false for the platform SSH mapping. The allowlist, if you send one, applies to both protocols.
|
|
1625
|
+
* @default true
|
|
1626
|
+
*/
|
|
1627
|
+
udpEnabled?: boolean;
|
|
1628
|
+
/**
|
|
1629
|
+
* @deprecated
|
|
1630
|
+
* @description DEPRECATED alias for `whitelistedIps`, accepted for backwards compatibility. `whitelistedIps` wins if both are sent. Use `whitelistedIps` in new code.
|
|
1631
|
+
*/
|
|
1632
|
+
whitelistIps?: string[];
|
|
1633
|
+
/** @description IPs/CIDRs allowed to reach the published port. Omit or send an empty array to leave the port open to the internet. */
|
|
1634
|
+
whitelistedIps?: string[];
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
};
|
|
1563
1638
|
responses: {
|
|
1564
|
-
/** @description
|
|
1565
|
-
|
|
1639
|
+
/** @description Mapping created */
|
|
1640
|
+
201: {
|
|
1566
1641
|
headers: {
|
|
1567
1642
|
[name: string]: unknown;
|
|
1568
1643
|
};
|
|
1569
1644
|
content: {
|
|
1570
1645
|
"application/json": {
|
|
1571
|
-
|
|
1646
|
+
tcpMapping: components["schemas"]["TcpMapping"];
|
|
1572
1647
|
};
|
|
1573
1648
|
};
|
|
1574
1649
|
};
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
409: {
|
|
1578
|
-
headers: {
|
|
1579
|
-
[name: string]: unknown;
|
|
1580
|
-
};
|
|
1581
|
-
content?: never;
|
|
1582
|
-
};
|
|
1650
|
+
400: components["responses"]["BadRequest"];
|
|
1651
|
+
429: components["responses"]["RateLimited"];
|
|
1583
1652
|
};
|
|
1584
1653
|
};
|
|
1654
|
+
delete?: never;
|
|
1585
1655
|
options?: never;
|
|
1586
1656
|
head?: never;
|
|
1587
1657
|
patch?: never;
|
|
1588
1658
|
trace?: never;
|
|
1589
1659
|
};
|
|
1590
|
-
"/spaces/{spaceId}/cubes/
|
|
1660
|
+
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings/{mappingId}": {
|
|
1591
1661
|
parameters: {
|
|
1592
1662
|
query?: never;
|
|
1593
1663
|
header?: never;
|
|
@@ -1596,84 +1666,71 @@ interface paths {
|
|
|
1596
1666
|
};
|
|
1597
1667
|
get?: never;
|
|
1598
1668
|
put?: never;
|
|
1599
|
-
|
|
1600
|
-
|
|
1669
|
+
post?: never;
|
|
1670
|
+
/** Delete a TCP port forward */
|
|
1671
|
+
delete: {
|
|
1601
1672
|
parameters: {
|
|
1602
1673
|
query?: never;
|
|
1603
1674
|
header?: never;
|
|
1604
1675
|
path: {
|
|
1605
1676
|
spaceId: string;
|
|
1606
|
-
|
|
1677
|
+
cubeId: string;
|
|
1678
|
+
mappingId: string;
|
|
1607
1679
|
};
|
|
1608
1680
|
cookie?: never;
|
|
1609
1681
|
};
|
|
1610
|
-
requestBody
|
|
1611
|
-
content: {
|
|
1612
|
-
"application/json": {
|
|
1613
|
-
parts: {
|
|
1614
|
-
partNumber: number;
|
|
1615
|
-
etag: string;
|
|
1616
|
-
}[];
|
|
1617
|
-
config: {
|
|
1618
|
-
vcpus: number;
|
|
1619
|
-
ramMb: number;
|
|
1620
|
-
diskLimitGb: number;
|
|
1621
|
-
imageId: string;
|
|
1622
|
-
userData?: string | null;
|
|
1623
|
-
};
|
|
1624
|
-
};
|
|
1625
|
-
};
|
|
1626
|
-
};
|
|
1682
|
+
requestBody?: never;
|
|
1627
1683
|
responses: {
|
|
1628
|
-
/** @description
|
|
1684
|
+
/** @description Deleted */
|
|
1629
1685
|
200: {
|
|
1630
1686
|
headers: {
|
|
1631
1687
|
[name: string]: unknown;
|
|
1632
1688
|
};
|
|
1633
1689
|
content: {
|
|
1634
1690
|
"application/json": {
|
|
1635
|
-
|
|
1636
|
-
cubeId?: string;
|
|
1637
|
-
/** @enum {string} */
|
|
1638
|
-
status?: "provisioning";
|
|
1691
|
+
success: boolean;
|
|
1639
1692
|
};
|
|
1640
1693
|
};
|
|
1641
1694
|
};
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
};
|
|
1668
|
-
content?: never;
|
|
1695
|
+
404: components["responses"]["NotFound"];
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
options?: never;
|
|
1699
|
+
head?: never;
|
|
1700
|
+
patch?: never;
|
|
1701
|
+
trace?: never;
|
|
1702
|
+
};
|
|
1703
|
+
"/spaces/{spaceId}/cubes/{cubeId}/wake": {
|
|
1704
|
+
parameters: {
|
|
1705
|
+
query?: never;
|
|
1706
|
+
header?: never;
|
|
1707
|
+
path?: never;
|
|
1708
|
+
cookie?: never;
|
|
1709
|
+
};
|
|
1710
|
+
get?: never;
|
|
1711
|
+
put?: never;
|
|
1712
|
+
/** Start a stopped Cube */
|
|
1713
|
+
post: {
|
|
1714
|
+
parameters: {
|
|
1715
|
+
query?: never;
|
|
1716
|
+
header?: never;
|
|
1717
|
+
path: {
|
|
1718
|
+
spaceId: string;
|
|
1719
|
+
cubeId: string;
|
|
1669
1720
|
};
|
|
1670
|
-
|
|
1671
|
-
|
|
1721
|
+
cookie?: never;
|
|
1722
|
+
};
|
|
1723
|
+
requestBody?: never;
|
|
1724
|
+
responses: {
|
|
1725
|
+
/** @description Start enqueued */
|
|
1726
|
+
200: {
|
|
1672
1727
|
headers: {
|
|
1673
1728
|
[name: string]: unknown;
|
|
1674
1729
|
};
|
|
1675
1730
|
content?: never;
|
|
1676
1731
|
};
|
|
1732
|
+
404: components["responses"]["NotFound"];
|
|
1733
|
+
429: components["responses"]["RateLimited"];
|
|
1677
1734
|
};
|
|
1678
1735
|
};
|
|
1679
1736
|
delete?: never;
|
|
@@ -1724,9 +1781,9 @@ interface paths {
|
|
|
1724
1781
|
requestBody: {
|
|
1725
1782
|
content: {
|
|
1726
1783
|
"application/json": {
|
|
1784
|
+
events: ("cube.created" | "cube.running" | "cube.stopped" | "cube.error" | "cube.deleted" | "cube.cold_restarted" | "cube.transfer.started" | "cube.transfer.completed" | "cube.transfer.failed" | "cube.resize.started" | "cube.resize.completed" | "cube.resize.failed" | "resource.alert.memory" | "resource.alert.cpu" | "resource.alert.disk" | "domain.alert.error_4xx" | "domain.alert.error_5xx" | "cube.space_transferred" | "cube.space_transfer.requested" | "cube.space_transfer.accepted" | "cube.space_transfer.declined" | "cube.space_transfer.cancelled" | "cube.space_transfer.expired" | "snapshot.created" | "snapshot.restored" | "snapshot.deleted" | "snapshot.pinned" | "snapshot.promoted_to_backup" | "snapshot.exported" | "backup.created" | "backup.deleted" | "backup.redeployed" | "domain.added" | "domain.active" | "domain.removed" | "tcp_mapping.added" | "tcp_mapping.removed" | "tcp_mapping.updated" | "hosting.provisioned" | "hosting.suspended" | "hosting.unsuspended" | "hosting.deleted" | "hosting.plan_changed" | "hosting.renewed" | "hosting.cancellation_scheduled" | "hosting.suspended_for_non_payment" | "hosting.deleted_after_recovery" | "member.invited" | "member.joined" | "member.removed" | "member.role_changed")[];
|
|
1727
1785
|
/** Format: uri */
|
|
1728
1786
|
url: string;
|
|
1729
|
-
events: ("cube.created" | "cube.running" | "cube.stopped" | "cube.error" | "cube.deleted" | "cube.cold_restarted" | "cube.transfer.started" | "cube.transfer.completed" | "cube.transfer.failed" | "cube.resize.started" | "cube.resize.completed" | "cube.resize.failed" | "resource.alert.memory" | "resource.alert.cpu" | "resource.alert.disk" | "domain.alert.error_4xx" | "domain.alert.error_5xx" | "snapshot.created" | "snapshot.restored" | "snapshot.deleted" | "snapshot.pinned" | "snapshot.promoted_to_backup" | "snapshot.exported" | "backup.created" | "backup.deleted" | "backup.redeployed" | "domain.added" | "domain.active" | "domain.removed" | "tcp_mapping.added" | "tcp_mapping.removed" | "tcp_mapping.updated" | "hosting.provisioned" | "hosting.suspended" | "hosting.unsuspended" | "hosting.deleted" | "hosting.plan_changed" | "hosting.renewed" | "hosting.cancellation_scheduled" | "hosting.suspended_for_non_payment" | "hosting.deleted_after_recovery" | "member.invited" | "member.joined" | "member.removed" | "member.role_changed")[];
|
|
1730
1787
|
};
|
|
1731
1788
|
};
|
|
1732
1789
|
};
|
|
@@ -1849,199 +1906,204 @@ interface paths {
|
|
|
1849
1906
|
}
|
|
1850
1907
|
interface components {
|
|
1851
1908
|
schemas: {
|
|
1852
|
-
Space: {
|
|
1853
|
-
id: string;
|
|
1854
|
-
name: string;
|
|
1855
|
-
tier: string;
|
|
1856
|
-
/** Format: date-time */
|
|
1857
|
-
createdAt: string;
|
|
1858
|
-
};
|
|
1859
|
-
CubeSshInfo: {
|
|
1860
|
-
host: string | null;
|
|
1861
|
-
port: number;
|
|
1862
|
-
user: string;
|
|
1863
|
-
hostKeys: {
|
|
1864
|
-
type: string;
|
|
1865
|
-
key: string;
|
|
1866
|
-
}[];
|
|
1867
|
-
};
|
|
1868
1909
|
Cube: {
|
|
1869
|
-
id: string;
|
|
1870
|
-
name: string;
|
|
1871
|
-
/** @enum {string} */
|
|
1872
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
1873
|
-
publicIpv4: string | null;
|
|
1874
|
-
resources: {
|
|
1875
|
-
vcpu: number;
|
|
1876
|
-
ramGb: number;
|
|
1877
|
-
diskGb: number;
|
|
1878
|
-
};
|
|
1879
|
-
image: string;
|
|
1880
|
-
sshUser: string;
|
|
1881
1910
|
costPerHour: number;
|
|
1882
|
-
/** @description The hostname of the server currently hosting this Cube (e.g. `mango.krova.cloud`). This is NOT the Cube's own SSH target — use `host` from GET .../ssh for that, which is the Cube's own stable hostname and survives migration to another server. Null when the Cube has no server assigned. Only present on the single-Cube GET; list and create responses omit it. */
|
|
1883
|
-
serverDomain?: string | null;
|
|
1884
|
-
/** @description Whether this Cube is locked against customer-initiated deletion. Per-Cube, opt-in, default `false`. Power-off, wake, restart, snapshot, and restore remain allowed regardless. The two audit fields are populated whenever the flag is on. */
|
|
1885
|
-
terminationProtection: boolean;
|
|
1886
|
-
/** @description When `terminationProtection` last changed. `null` until the flag is first set, then tracked on every toggle.
|
|
1887
|
-
*
|
|
1888
|
-
* Format: date-time */
|
|
1889
|
-
terminationProtectionChangedAt?: string | null;
|
|
1890
|
-
/** @description Who last changed `terminationProtection`. `"user:<id>"` for customer toggles, `"admin:<id>"` for operator changes. `null` until the flag is first set. */
|
|
1891
|
-
terminationProtectionChangedBy?: string | null;
|
|
1892
1911
|
/** Format: date-time */
|
|
1893
1912
|
createdAt: string;
|
|
1894
|
-
/** Format: date-time */
|
|
1895
|
-
updatedAt: string;
|
|
1896
|
-
};
|
|
1897
|
-
Pagination: {
|
|
1898
|
-
page: number;
|
|
1899
|
-
limit: number;
|
|
1900
|
-
total: number;
|
|
1901
|
-
totalPages: number;
|
|
1902
|
-
};
|
|
1903
|
-
Region: {
|
|
1904
|
-
id: string;
|
|
1905
|
-
name: string;
|
|
1906
|
-
slug: string;
|
|
1907
|
-
};
|
|
1908
|
-
Image: {
|
|
1909
1913
|
id: string;
|
|
1914
|
+
image: string;
|
|
1910
1915
|
name: string;
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1916
|
+
publicIpv4: string | null;
|
|
1917
|
+
resources: {
|
|
1918
|
+
diskGb: number;
|
|
1919
|
+
ramGb: number;
|
|
1920
|
+
vcpu: number;
|
|
1921
|
+
};
|
|
1922
|
+
/** @description The hostname of the server currently hosting this Cube (e.g. `mango.krova.cloud`), shared by every Cube on that server. This is NOT the Cube's own SSH target — use `host` from GET .../ssh for that, which is the Cube's own stable hostname and survives migration to another server. Null when the Cube has no server assigned. Only present on the single-Cube GET; list and create responses omit it. */
|
|
1923
|
+
serverDomain?: string | null;
|
|
1924
|
+
sshUser: string;
|
|
1925
|
+
/** @enum {string} */
|
|
1926
|
+
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
1927
|
+
/** @description Per-cube opt-in flag. When true, customer-initiated destroy paths return 409 with `error.code = "termination_protected"`. Power-off, wake, restart, restore, network-reset, and snapshot ops are NOT termination and remain allowed. Default false. */
|
|
1928
|
+
terminationProtection: boolean;
|
|
1929
|
+
/**
|
|
1930
|
+
* Format: date-time
|
|
1931
|
+
* @description ISO8601 timestamp of the most recent toggle of `terminationProtection`. Null when the flag has never been turned on.
|
|
1932
|
+
*/
|
|
1933
|
+
terminationProtectionChangedAt: string | null;
|
|
1934
|
+
/** @description Identifies the actor that last toggled the flag: `"user:<id>"` for a customer, `"admin:<id>"` for an operator, `"system:<job-name>"` for a worker-driven write. Null when the flag has never been turned on. */
|
|
1935
|
+
terminationProtectionChangedBy: string | null;
|
|
1936
|
+
/** Format: date-time */
|
|
1937
|
+
updatedAt: string;
|
|
1914
1938
|
};
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1939
|
+
CubeSshInfo: {
|
|
1940
|
+
host: string | null;
|
|
1941
|
+
hostKeys: {
|
|
1942
|
+
key: string;
|
|
1943
|
+
type: string;
|
|
1944
|
+
}[];
|
|
1945
|
+
port: number;
|
|
1946
|
+
user: string;
|
|
1920
1947
|
};
|
|
1921
1948
|
DnsRecord: {
|
|
1949
|
+
host: string;
|
|
1922
1950
|
/** @enum {string} */
|
|
1923
1951
|
id: "ownership" | "routing" | "certificate";
|
|
1952
|
+
mustBeGrey: boolean;
|
|
1953
|
+
note?: string | null;
|
|
1954
|
+
proxyOk: boolean;
|
|
1955
|
+
/** @enum {string} */
|
|
1956
|
+
purpose: "ownership" | "routing" | "certificate";
|
|
1924
1957
|
/** @enum {string} */
|
|
1925
1958
|
type: "CNAME" | "TXT" | "A";
|
|
1926
|
-
host: string;
|
|
1927
1959
|
value: string;
|
|
1928
|
-
/** @enum {string} */
|
|
1929
|
-
purpose: "ownership" | "routing" | "certificate";
|
|
1930
|
-
note?: string | null;
|
|
1931
|
-
mustBeGrey: boolean;
|
|
1932
|
-
proxyOk: boolean;
|
|
1933
1960
|
};
|
|
1934
1961
|
DnsRecordStatus: {
|
|
1935
|
-
|
|
1936
|
-
/** @enum {string} */
|
|
1937
|
-
type: "CNAME" | "TXT" | "A";
|
|
1962
|
+
detail: string;
|
|
1938
1963
|
host: string;
|
|
1939
|
-
|
|
1940
|
-
purpose: string;
|
|
1941
|
-
note?: string | null;
|
|
1964
|
+
id: string;
|
|
1942
1965
|
mustBeGrey?: boolean;
|
|
1966
|
+
note?: string | null;
|
|
1967
|
+
observed?: string[] | null;
|
|
1943
1968
|
proxyOk?: boolean;
|
|
1969
|
+
purpose: string;
|
|
1944
1970
|
/** @enum {string} */
|
|
1945
1971
|
state: "found" | "missing" | "mismatch" | "unknown";
|
|
1946
|
-
|
|
1947
|
-
|
|
1972
|
+
/** @enum {string} */
|
|
1973
|
+
type: "CNAME" | "TXT" | "A";
|
|
1974
|
+
value: string;
|
|
1948
1975
|
};
|
|
1949
1976
|
Domain: {
|
|
1950
|
-
|
|
1977
|
+
acmeDelegationTarget: string | null;
|
|
1978
|
+
basicAuthEnabled: boolean;
|
|
1979
|
+
basicAuthUser: string | null;
|
|
1980
|
+
corsConfig: Record<string, never> | null;
|
|
1981
|
+
/** Format: date-time */
|
|
1982
|
+
createdAt: string;
|
|
1951
1983
|
cubeId: string;
|
|
1952
1984
|
domain: string;
|
|
1953
|
-
|
|
1954
|
-
status: string;
|
|
1985
|
+
id: string;
|
|
1955
1986
|
ingressStatus: string | null;
|
|
1987
|
+
ipAllowList: string[] | null;
|
|
1988
|
+
ipDenyList: string[] | null;
|
|
1989
|
+
isWildcard: boolean;
|
|
1990
|
+
maxRequestBodyMb: number | null;
|
|
1956
1991
|
/** @enum {string} */
|
|
1957
|
-
|
|
1958
|
-
|
|
1992
|
+
originScheme: "http" | "https";
|
|
1993
|
+
port: number | null;
|
|
1994
|
+
/** @enum {string|null} */
|
|
1995
|
+
proxyProtocol: "v1" | "v2" | null;
|
|
1959
1996
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1960
|
-
|
|
1997
|
+
requestHeaderOverrides: {
|
|
1998
|
+
remove?: string[];
|
|
1961
1999
|
set?: {
|
|
1962
2000
|
[key: string]: string;
|
|
1963
2001
|
};
|
|
1964
|
-
remove?: string[];
|
|
1965
2002
|
} | null;
|
|
2003
|
+
responseCompression: boolean;
|
|
1966
2004
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1967
|
-
|
|
2005
|
+
responseHeaderOverrides: {
|
|
2006
|
+
remove?: string[];
|
|
1968
2007
|
set?: {
|
|
1969
2008
|
[key: string]: string;
|
|
1970
2009
|
};
|
|
1971
|
-
remove?: string[];
|
|
1972
2010
|
} | null;
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
corsConfig: Record<string, never> | null;
|
|
1980
|
-
isWildcard: boolean;
|
|
2011
|
+
responseHeaderTimeoutSecs: number;
|
|
2012
|
+
/** @enum {string} */
|
|
2013
|
+
securityHeadersMode: "enforced" | "app_managed";
|
|
2014
|
+
status: string;
|
|
2015
|
+
/** Format: date-time */
|
|
2016
|
+
updatedAt: string;
|
|
1981
2017
|
/** @enum {string|null} */
|
|
1982
2018
|
wildcardCertState: "pending_delegation" | "issuing" | "ready" | "failed" | null;
|
|
1983
|
-
|
|
2019
|
+
};
|
|
2020
|
+
Error: {
|
|
2021
|
+
error: string;
|
|
2022
|
+
};
|
|
2023
|
+
Image: {
|
|
2024
|
+
defaultUser: string;
|
|
2025
|
+
description: string;
|
|
2026
|
+
id: string;
|
|
2027
|
+
name: string;
|
|
2028
|
+
version: string;
|
|
2029
|
+
};
|
|
2030
|
+
Pagination: {
|
|
2031
|
+
limit: number;
|
|
2032
|
+
page: number;
|
|
2033
|
+
total: number;
|
|
2034
|
+
totalPages: number;
|
|
2035
|
+
};
|
|
2036
|
+
PricingTier: {
|
|
2037
|
+
label: string;
|
|
2038
|
+
maxVcpus: number | null;
|
|
2039
|
+
minVcpus: number;
|
|
2040
|
+
multiplier: number;
|
|
2041
|
+
};
|
|
2042
|
+
Region: {
|
|
2043
|
+
id: string;
|
|
2044
|
+
name: string;
|
|
2045
|
+
slug: string;
|
|
2046
|
+
};
|
|
2047
|
+
Snapshot: {
|
|
1984
2048
|
/** Format: date-time */
|
|
1985
2049
|
createdAt: string;
|
|
2050
|
+
cubeId: string;
|
|
2051
|
+
id: string;
|
|
2052
|
+
kind: string;
|
|
2053
|
+
name: string;
|
|
2054
|
+
sizeBytes: number | null;
|
|
2055
|
+
status: string;
|
|
2056
|
+
};
|
|
2057
|
+
Space: {
|
|
1986
2058
|
/** Format: date-time */
|
|
1987
|
-
|
|
2059
|
+
createdAt: string;
|
|
2060
|
+
id: string;
|
|
2061
|
+
name: string;
|
|
2062
|
+
tier: string;
|
|
1988
2063
|
};
|
|
1989
2064
|
TcpMapping: {
|
|
1990
|
-
|
|
2065
|
+
/** Format: date-time */
|
|
2066
|
+
createdAt: string;
|
|
1991
2067
|
cubeId: string;
|
|
1992
2068
|
cubePort: number;
|
|
1993
2069
|
/** @description Where to connect for this mapping: `host:hostPort`. The Cube's own stable hostname, which survives migration to another server, falling back to the server's public IP when the Cube has no DNS record yet. Identical to `host` from GET .../ssh, and the same value for every mapping on a Cube. Null only when the Cube has no server assigned, in which case there is nowhere to connect. Do NOT use `serverDomain` from the Cube object — that is the current physical host and changes when the Cube moves. */
|
|
1994
|
-
host
|
|
2070
|
+
host?: string | null;
|
|
1995
2071
|
hostPort: number;
|
|
2072
|
+
id: string;
|
|
2073
|
+
isSsh: boolean;
|
|
1996
2074
|
label: string | null;
|
|
1997
2075
|
status: string;
|
|
1998
|
-
|
|
1999
|
-
/** @description Whether the mapping also forwards UDP traffic on the same host port, in addition to TCP. */
|
|
2076
|
+
/** @description Whether this mapping also forwards UDP on the same host port. True means TCP and UDP; false means TCP only. Always false for the platform SSH mapping. */
|
|
2000
2077
|
udpEnabled: boolean;
|
|
2001
2078
|
/** Format: date-time */
|
|
2002
|
-
createdAt: string;
|
|
2003
|
-
/** Format: date-time */
|
|
2004
2079
|
updatedAt: string;
|
|
2005
2080
|
whitelistedIps: {
|
|
2006
|
-
id: string;
|
|
2007
2081
|
cidr: string;
|
|
2082
|
+
id: string;
|
|
2008
2083
|
}[];
|
|
2009
2084
|
};
|
|
2010
|
-
Snapshot: {
|
|
2011
|
-
id: string;
|
|
2012
|
-
cubeId: string;
|
|
2013
|
-
name: string;
|
|
2014
|
-
sizeBytes: number | null;
|
|
2015
|
-
status: string;
|
|
2016
|
-
kind: string;
|
|
2017
|
-
/** Format: date-time */
|
|
2018
|
-
createdAt: string;
|
|
2019
|
-
};
|
|
2020
2085
|
Webhook: {
|
|
2021
|
-
id: string;
|
|
2022
|
-
/** Format: uri */
|
|
2023
|
-
url: string;
|
|
2024
|
-
events: string[];
|
|
2025
|
-
enabled: boolean;
|
|
2026
2086
|
/** Format: date-time */
|
|
2027
2087
|
createdAt: string;
|
|
2088
|
+
enabled: boolean;
|
|
2089
|
+
events: string[];
|
|
2090
|
+
id: string;
|
|
2028
2091
|
/** Format: date-time */
|
|
2029
2092
|
updatedAt: string;
|
|
2093
|
+
/** Format: uri */
|
|
2094
|
+
url: string;
|
|
2030
2095
|
};
|
|
2031
2096
|
WebhookDelivery: {
|
|
2032
|
-
id: string;
|
|
2033
|
-
event: string;
|
|
2034
|
-
/** @enum {string} */
|
|
2035
|
-
status: "pending" | "delivered" | "failed";
|
|
2036
2097
|
attempts: number;
|
|
2037
2098
|
/** Format: date-time */
|
|
2099
|
+
createdAt: string;
|
|
2100
|
+
event: string;
|
|
2101
|
+
id: string;
|
|
2102
|
+
/** Format: date-time */
|
|
2038
2103
|
lastAttemptAt: string | null;
|
|
2039
2104
|
responseStatus: number | null;
|
|
2040
|
-
/**
|
|
2041
|
-
|
|
2042
|
-
};
|
|
2043
|
-
Error: {
|
|
2044
|
-
error: string;
|
|
2105
|
+
/** @enum {string} */
|
|
2106
|
+
status: "pending" | "delivered" | "failed";
|
|
2045
2107
|
};
|
|
2046
2108
|
};
|
|
2047
2109
|
responses: {
|
|
@@ -2054,8 +2116,8 @@ interface components {
|
|
|
2054
2116
|
"application/json": components["schemas"]["Error"];
|
|
2055
2117
|
};
|
|
2056
2118
|
};
|
|
2057
|
-
/** @description
|
|
2058
|
-
|
|
2119
|
+
/** @description Authenticated but lacks the required permission */
|
|
2120
|
+
Forbidden: {
|
|
2059
2121
|
headers: {
|
|
2060
2122
|
[name: string]: unknown;
|
|
2061
2123
|
};
|
|
@@ -2063,8 +2125,8 @@ interface components {
|
|
|
2063
2125
|
"application/json": components["schemas"]["Error"];
|
|
2064
2126
|
};
|
|
2065
2127
|
};
|
|
2066
|
-
/** @description
|
|
2067
|
-
|
|
2128
|
+
/** @description Resource not found */
|
|
2129
|
+
NotFound: {
|
|
2068
2130
|
headers: {
|
|
2069
2131
|
[name: string]: unknown;
|
|
2070
2132
|
};
|
|
@@ -2072,8 +2134,8 @@ interface components {
|
|
|
2072
2134
|
"application/json": components["schemas"]["Error"];
|
|
2073
2135
|
};
|
|
2074
2136
|
};
|
|
2075
|
-
/** @description
|
|
2076
|
-
|
|
2137
|
+
/** @description Rate limit exceeded (10 mutations / 60s) */
|
|
2138
|
+
RateLimited: {
|
|
2077
2139
|
headers: {
|
|
2078
2140
|
[name: string]: unknown;
|
|
2079
2141
|
};
|
|
@@ -2081,8 +2143,8 @@ interface components {
|
|
|
2081
2143
|
"application/json": components["schemas"]["Error"];
|
|
2082
2144
|
};
|
|
2083
2145
|
};
|
|
2084
|
-
/** @description
|
|
2085
|
-
|
|
2146
|
+
/** @description Missing or invalid API key */
|
|
2147
|
+
Unauthorized: {
|
|
2086
2148
|
headers: {
|
|
2087
2149
|
[name: string]: unknown;
|
|
2088
2150
|
};
|
|
@@ -2251,28 +2313,28 @@ declare class KrovaClient {
|
|
|
2251
2313
|
/** List Cubes in a Space, with pagination metadata. */
|
|
2252
2314
|
list: (spaceId: string) => Promise<{
|
|
2253
2315
|
cubes: {
|
|
2316
|
+
costPerHour: number;
|
|
2317
|
+
createdAt: string;
|
|
2254
2318
|
id: string;
|
|
2319
|
+
image: string;
|
|
2255
2320
|
name: string;
|
|
2256
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2257
2321
|
publicIpv4: string | null;
|
|
2258
2322
|
resources: {
|
|
2259
|
-
vcpu: number;
|
|
2260
|
-
ramGb: number;
|
|
2261
2323
|
diskGb: number;
|
|
2324
|
+
ramGb: number;
|
|
2325
|
+
vcpu: number;
|
|
2262
2326
|
};
|
|
2263
|
-
image: string;
|
|
2264
|
-
sshUser: string;
|
|
2265
|
-
costPerHour: number;
|
|
2266
2327
|
serverDomain?: string | null;
|
|
2328
|
+
sshUser: string;
|
|
2329
|
+
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2267
2330
|
terminationProtection: boolean;
|
|
2268
|
-
terminationProtectionChangedAt
|
|
2269
|
-
terminationProtectionChangedBy
|
|
2270
|
-
createdAt: string;
|
|
2331
|
+
terminationProtectionChangedAt: string | null;
|
|
2332
|
+
terminationProtectionChangedBy: string | null;
|
|
2271
2333
|
updatedAt: string;
|
|
2272
2334
|
}[];
|
|
2273
2335
|
pagination: {
|
|
2274
|
-
page: number;
|
|
2275
2336
|
limit: number;
|
|
2337
|
+
page: number;
|
|
2276
2338
|
total: number;
|
|
2277
2339
|
totalPages: number;
|
|
2278
2340
|
};
|
|
@@ -2465,27 +2527,27 @@ declare class KrovaClient {
|
|
|
2465
2527
|
* archive to those URLs, then call {@link imports.complete}.
|
|
2466
2528
|
*/
|
|
2467
2529
|
create: (spaceId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2530
|
+
chunkSizeBytes?: number;
|
|
2531
|
+
expiresAt?: string;
|
|
2468
2532
|
importId?: string;
|
|
2469
|
-
uploadId?: string;
|
|
2470
2533
|
key?: string;
|
|
2471
|
-
chunkSizeBytes?: number;
|
|
2472
2534
|
parts?: {
|
|
2473
2535
|
partNumber?: number;
|
|
2474
2536
|
url?: string;
|
|
2475
2537
|
}[] | undefined;
|
|
2476
|
-
|
|
2538
|
+
uploadId?: string;
|
|
2477
2539
|
} | undefined>;
|
|
2478
2540
|
/** Get an in-progress or completed import by id. */
|
|
2479
2541
|
get: (spaceId: string, importId: string) => Promise<{
|
|
2480
2542
|
import?: {
|
|
2543
|
+
completedAt?: string | null;
|
|
2544
|
+
createdAt?: string;
|
|
2545
|
+
cubeId?: string | null;
|
|
2546
|
+
error?: string | null;
|
|
2481
2547
|
id?: string;
|
|
2482
2548
|
name?: string;
|
|
2483
2549
|
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
2484
|
-
cubeId?: string | null;
|
|
2485
|
-
error?: string | null;
|
|
2486
|
-
createdAt?: string;
|
|
2487
2550
|
updatedAt?: string;
|
|
2488
|
-
completedAt?: string | null;
|
|
2489
2551
|
} | undefined;
|
|
2490
2552
|
}>;
|
|
2491
2553
|
/**
|
|
@@ -2494,8 +2556,8 @@ declare class KrovaClient {
|
|
|
2494
2556
|
* `config`.
|
|
2495
2557
|
*/
|
|
2496
2558
|
complete: (spaceId: string, importId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports/{importId}/complete"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2497
|
-
importId?: string;
|
|
2498
2559
|
cubeId?: string;
|
|
2560
|
+
importId?: string;
|
|
2499
2561
|
status?: "provisioning";
|
|
2500
2562
|
} | undefined>;
|
|
2501
2563
|
/** Cancel an in-progress import. */
|
|
@@ -2506,10 +2568,10 @@ declare class KrovaClient {
|
|
|
2506
2568
|
readonly backups: {
|
|
2507
2569
|
/** Get a time-limited download URL for a backup `.cube` archive. */
|
|
2508
2570
|
download: (spaceId: string, backupId: string) => Promise<{
|
|
2509
|
-
|
|
2571
|
+
expiresAt?: string;
|
|
2510
2572
|
filename?: string;
|
|
2511
2573
|
sizeBytes?: number | null;
|
|
2512
|
-
|
|
2574
|
+
url?: string;
|
|
2513
2575
|
} | undefined>;
|
|
2514
2576
|
};
|
|
2515
2577
|
readonly webhooks: {
|
|
@@ -2563,28 +2625,28 @@ declare class KrovaClient {
|
|
|
2563
2625
|
/** List available OS images. */
|
|
2564
2626
|
images: () => Promise<{
|
|
2565
2627
|
images: {
|
|
2628
|
+
defaultUser: string;
|
|
2629
|
+
description: string;
|
|
2566
2630
|
id: string;
|
|
2567
2631
|
name: string;
|
|
2568
2632
|
version: string;
|
|
2569
|
-
description: string;
|
|
2570
|
-
defaultUser: string;
|
|
2571
2633
|
}[];
|
|
2572
2634
|
}>;
|
|
2573
2635
|
/** Per-resource hourly rates and volume pricing tiers. */
|
|
2574
2636
|
pricing: () => Promise<{
|
|
2575
2637
|
currency: string;
|
|
2638
|
+
note: string;
|
|
2576
2639
|
rates: {
|
|
2577
|
-
vcpuPerHour: number;
|
|
2578
|
-
ramGbPerHour: number;
|
|
2579
2640
|
diskGbPerHour: number;
|
|
2641
|
+
ramGbPerHour: number;
|
|
2642
|
+
vcpuPerHour: number;
|
|
2580
2643
|
};
|
|
2581
2644
|
tiers: {
|
|
2582
|
-
|
|
2645
|
+
label: string;
|
|
2583
2646
|
maxVcpus: number | null;
|
|
2647
|
+
minVcpus: number;
|
|
2584
2648
|
multiplier: number;
|
|
2585
|
-
label: string;
|
|
2586
2649
|
}[];
|
|
2587
|
-
note: string;
|
|
2588
2650
|
}>;
|
|
2589
2651
|
};
|
|
2590
2652
|
}
|
|
@@ -2635,8 +2697,19 @@ declare class KrovaError extends Error {
|
|
|
2635
2697
|
}
|
|
2636
2698
|
/**
|
|
2637
2699
|
* Build a {@link KrovaError} from a failing response + parsed error body.
|
|
2700
|
+
*
|
|
2701
|
+
* `body` is `unknown` rather than {@link KrovaErrorBody} because not every
|
|
2702
|
+
* documented error response is the flat `{ error: string }` shape — DELETE
|
|
2703
|
+
* /cubes/{cubeId} publishes a 409 whose `error` is an object. This function
|
|
2704
|
+
* already coped with that at runtime; typing the parameter narrowly only meant
|
|
2705
|
+
* the call sites had to lie. Widening accepts strictly more, so no caller
|
|
2706
|
+
* breaks.
|
|
2707
|
+
*
|
|
2708
|
+
* `body` is carried onto the error only when it really is the flat shape, so
|
|
2709
|
+
* {@link KrovaError.body} never advertises a `string` that is not there. A
|
|
2710
|
+
* caller that needs the raw payload of some other shape has `response`.
|
|
2638
2711
|
*/
|
|
2639
|
-
declare function krovaErrorFrom(response: Response, body:
|
|
2712
|
+
declare function krovaErrorFrom(response: Response, body: unknown): KrovaError;
|
|
2640
2713
|
/**
|
|
2641
2714
|
* Thrown by `client.cubes.delete` when the server rejects a delete with
|
|
2642
2715
|
* `409` and `error.code = "termination_protected"`.
|