@krovacloud/sdk 0.4.10 → 0.4.11
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/dist/index.cjs +14 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +844 -803
- package/dist/index.d.ts +844 -803
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
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
|
-
content: {
|
|
657
|
-
"application/json": {
|
|
658
|
-
/** @description The port inside the Cube that sshd listens on (default 22). This is the Cube side of the mapping, not the host port. */
|
|
659
|
-
cubePort: number;
|
|
660
|
-
};
|
|
661
|
-
};
|
|
662
|
-
};
|
|
782
|
+
requestBody?: never;
|
|
663
783
|
responses: {
|
|
664
|
-
/** @description
|
|
784
|
+
/** @description Deletion enqueued */
|
|
665
785
|
200: {
|
|
666
786
|
headers: {
|
|
667
787
|
[name: string]: unknown;
|
|
668
788
|
};
|
|
669
|
-
content
|
|
789
|
+
content: {
|
|
790
|
+
"application/json": {
|
|
791
|
+
success: boolean;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
670
794
|
};
|
|
671
|
-
400: components["responses"]["BadRequest"];
|
|
672
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: {
|
|
798
|
+
headers: {
|
|
799
|
+
[name: string]: unknown;
|
|
800
|
+
};
|
|
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
|
+
};
|
|
816
|
+
};
|
|
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,63 @@ 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 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. */
|
|
922
|
+
corsConfig?: {
|
|
923
|
+
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
924
|
+
allowCredentials?: boolean;
|
|
925
|
+
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
926
|
+
allowedHeaders?: string[];
|
|
927
|
+
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
928
|
+
allowedMethods?: string[];
|
|
929
|
+
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
930
|
+
allowedOrigins: string[];
|
|
931
|
+
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
932
|
+
exposedHeaders?: string[];
|
|
933
|
+
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
934
|
+
maxAgeSeconds?: number;
|
|
935
|
+
} | null;
|
|
780
936
|
/** @description The hostname to attach, e.g. app.example.com */
|
|
781
937
|
domain: string;
|
|
782
|
-
/** @description
|
|
783
|
-
|
|
938
|
+
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
939
|
+
ipAllowList?: string[] | null;
|
|
940
|
+
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
941
|
+
ipDenyList?: string[] | null;
|
|
942
|
+
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
943
|
+
maxRequestBodyMb?: number | null;
|
|
784
944
|
/**
|
|
785
|
-
* @description
|
|
945
|
+
* @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 honoured exactly. Verified against the cube before it is applied — if the domain does not serve, the route is left on http.
|
|
786
946
|
* @enum {string}
|
|
787
947
|
*/
|
|
788
|
-
|
|
789
|
-
/** @description
|
|
790
|
-
|
|
948
|
+
originScheme?: "http" | "https";
|
|
949
|
+
/** @description Cube port the domain proxies to. */
|
|
950
|
+
port: number;
|
|
791
951
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
792
|
-
|
|
952
|
+
requestHeaderOverrides?: {
|
|
953
|
+
remove?: string[];
|
|
793
954
|
set?: {
|
|
794
955
|
[key: string]: string;
|
|
795
956
|
};
|
|
796
|
-
remove?: string[];
|
|
797
957
|
} | null;
|
|
958
|
+
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
959
|
+
responseCompression?: boolean;
|
|
798
960
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
799
|
-
|
|
961
|
+
responseHeaderOverrides?: {
|
|
962
|
+
remove?: string[];
|
|
800
963
|
set?: {
|
|
801
964
|
[key: string]: string;
|
|
802
965
|
};
|
|
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
966
|
} | null;
|
|
967
|
+
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
968
|
+
responseHeaderTimeoutSecs?: number;
|
|
822
969
|
/**
|
|
823
|
-
* @description
|
|
970
|
+
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
824
971
|
* @enum {string}
|
|
825
972
|
*/
|
|
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;
|
|
973
|
+
securityHeadersMode?: "enforced" | "app_managed";
|
|
837
974
|
};
|
|
838
975
|
};
|
|
839
976
|
};
|
|
@@ -860,66 +997,6 @@ interface paths {
|
|
|
860
997
|
patch?: never;
|
|
861
998
|
trace?: never;
|
|
862
999
|
};
|
|
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: {
|
|
893
|
-
headers: {
|
|
894
|
-
[name: string]: unknown;
|
|
895
|
-
};
|
|
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
|
-
};
|
|
910
|
-
};
|
|
911
|
-
404: components["responses"]["NotFound"];
|
|
912
|
-
429: components["responses"]["RateLimited"];
|
|
913
|
-
};
|
|
914
|
-
};
|
|
915
|
-
put?: never;
|
|
916
|
-
post?: never;
|
|
917
|
-
delete?: never;
|
|
918
|
-
options?: never;
|
|
919
|
-
head?: never;
|
|
920
|
-
patch?: never;
|
|
921
|
-
trace?: never;
|
|
922
|
-
};
|
|
923
1000
|
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}": {
|
|
924
1001
|
parameters: {
|
|
925
1002
|
query?: never;
|
|
@@ -978,59 +1055,59 @@ interface paths {
|
|
|
978
1055
|
requestBody: {
|
|
979
1056
|
content: {
|
|
980
1057
|
"application/json": {
|
|
981
|
-
/**
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
987
|
-
responseHeaderTimeoutSecs?: number;
|
|
988
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
989
|
-
responseHeaderOverrides?: {
|
|
990
|
-
set?: {
|
|
991
|
-
[key: string]: string;
|
|
992
|
-
};
|
|
993
|
-
remove?: string[];
|
|
994
|
-
} | null;
|
|
995
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
996
|
-
requestHeaderOverrides?: {
|
|
997
|
-
set?: {
|
|
998
|
-
[key: string]: string;
|
|
999
|
-
};
|
|
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. */
|
|
1058
|
+
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
1059
|
+
basicAuthPassword?: string;
|
|
1060
|
+
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
1061
|
+
basicAuthUser?: string | null;
|
|
1062
|
+
/** @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. */
|
|
1005
1063
|
corsConfig?: {
|
|
1006
|
-
/** @description
|
|
1007
|
-
|
|
1008
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
1009
|
-
allowedMethods?: string[];
|
|
1064
|
+
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1065
|
+
allowCredentials?: boolean;
|
|
1010
1066
|
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
1011
1067
|
allowedHeaders?: string[];
|
|
1068
|
+
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
1069
|
+
allowedMethods?: string[];
|
|
1070
|
+
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
1071
|
+
allowedOrigins: string[];
|
|
1012
1072
|
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
1013
1073
|
exposedHeaders?: string[];
|
|
1014
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1015
|
-
allowCredentials?: boolean;
|
|
1016
1074
|
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
1017
1075
|
maxAgeSeconds?: number;
|
|
1018
1076
|
} | null;
|
|
1077
|
+
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
1078
|
+
ipAllowList?: string[] | null;
|
|
1079
|
+
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
1080
|
+
ipDenyList?: string[] | null;
|
|
1081
|
+
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
1082
|
+
maxRequestBodyMb?: number | null;
|
|
1019
1083
|
/**
|
|
1020
1084
|
* @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 honoured exactly. Verified against the cube before it is applied — if the domain does not serve, the route is left on http.
|
|
1021
1085
|
* @enum {string}
|
|
1022
1086
|
*/
|
|
1023
1087
|
originScheme?: "http" | "https";
|
|
1088
|
+
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1089
|
+
requestHeaderOverrides?: {
|
|
1090
|
+
remove?: string[];
|
|
1091
|
+
set?: {
|
|
1092
|
+
[key: string]: string;
|
|
1093
|
+
};
|
|
1094
|
+
} | null;
|
|
1024
1095
|
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
1025
1096
|
responseCompression?: boolean;
|
|
1026
|
-
/** @description
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1097
|
+
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1098
|
+
responseHeaderOverrides?: {
|
|
1099
|
+
remove?: string[];
|
|
1100
|
+
set?: {
|
|
1101
|
+
[key: string]: string;
|
|
1102
|
+
};
|
|
1103
|
+
} | null;
|
|
1104
|
+
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
1105
|
+
responseHeaderTimeoutSecs?: number;
|
|
1106
|
+
/**
|
|
1107
|
+
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
1108
|
+
* @enum {string}
|
|
1109
|
+
*/
|
|
1110
|
+
securityHeadersMode?: "enforced" | "app_managed";
|
|
1034
1111
|
};
|
|
1035
1112
|
};
|
|
1036
1113
|
};
|
|
@@ -1053,14 +1130,21 @@ interface paths {
|
|
|
1053
1130
|
};
|
|
1054
1131
|
trace?: never;
|
|
1055
1132
|
};
|
|
1056
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1133
|
+
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}/records": {
|
|
1057
1134
|
parameters: {
|
|
1058
1135
|
query?: never;
|
|
1059
1136
|
header?: never;
|
|
1060
1137
|
path?: never;
|
|
1061
1138
|
cookie?: never;
|
|
1062
1139
|
};
|
|
1063
|
-
/**
|
|
1140
|
+
/**
|
|
1141
|
+
* DNS records this domain needs, with their live status
|
|
1142
|
+
* @description Every record required for the domain to work, each checked against live DNS. Poll this after publishing them.
|
|
1143
|
+
*
|
|
1144
|
+
* `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`.
|
|
1145
|
+
*
|
|
1146
|
+
* A wildcard needs three records; an exact host needs one. Each call performs live DNS lookups and is rate limited.
|
|
1147
|
+
*/
|
|
1064
1148
|
get: {
|
|
1065
1149
|
parameters: {
|
|
1066
1150
|
query?: never;
|
|
@@ -1068,73 +1152,123 @@ interface paths {
|
|
|
1068
1152
|
path: {
|
|
1069
1153
|
spaceId: string;
|
|
1070
1154
|
cubeId: string;
|
|
1155
|
+
mappingId: string;
|
|
1071
1156
|
};
|
|
1072
1157
|
cookie?: never;
|
|
1073
1158
|
};
|
|
1074
1159
|
requestBody?: never;
|
|
1075
1160
|
responses: {
|
|
1076
|
-
/** @description
|
|
1161
|
+
/** @description Required records with live status */
|
|
1077
1162
|
200: {
|
|
1078
1163
|
headers: {
|
|
1079
1164
|
[name: string]: unknown;
|
|
1080
1165
|
};
|
|
1081
1166
|
content: {
|
|
1082
1167
|
"application/json": {
|
|
1083
|
-
|
|
1168
|
+
/** Format: date-time */
|
|
1169
|
+
checkedAt: string;
|
|
1170
|
+
domain: string;
|
|
1171
|
+
isWildcard: boolean;
|
|
1172
|
+
records: components["schemas"]["DnsRecordStatus"][];
|
|
1173
|
+
summary: {
|
|
1174
|
+
complete: boolean;
|
|
1175
|
+
found: number;
|
|
1176
|
+
total: number;
|
|
1177
|
+
};
|
|
1084
1178
|
};
|
|
1085
1179
|
};
|
|
1086
1180
|
};
|
|
1181
|
+
404: components["responses"]["NotFound"];
|
|
1182
|
+
429: components["responses"]["RateLimited"];
|
|
1087
1183
|
};
|
|
1088
1184
|
};
|
|
1089
1185
|
put?: never;
|
|
1090
|
-
|
|
1186
|
+
post?: never;
|
|
1187
|
+
delete?: never;
|
|
1188
|
+
options?: never;
|
|
1189
|
+
head?: never;
|
|
1190
|
+
patch?: never;
|
|
1191
|
+
trace?: never;
|
|
1192
|
+
};
|
|
1193
|
+
"/spaces/{spaceId}/cubes/{cubeId}/power-off": {
|
|
1194
|
+
parameters: {
|
|
1195
|
+
query?: never;
|
|
1196
|
+
header?: never;
|
|
1197
|
+
path?: never;
|
|
1198
|
+
cookie?: never;
|
|
1199
|
+
};
|
|
1200
|
+
get?: never;
|
|
1201
|
+
put?: never;
|
|
1202
|
+
/** Power off a running Cube */
|
|
1091
1203
|
post: {
|
|
1092
1204
|
parameters: {
|
|
1093
1205
|
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
|
-
};
|
|
1206
|
+
header?: never;
|
|
1098
1207
|
path: {
|
|
1099
1208
|
spaceId: string;
|
|
1100
1209
|
cubeId: string;
|
|
1101
1210
|
};
|
|
1102
1211
|
cookie?: never;
|
|
1103
1212
|
};
|
|
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[];
|
|
1213
|
+
requestBody?: never;
|
|
1214
|
+
responses: {
|
|
1215
|
+
/** @description Power off enqueued */
|
|
1216
|
+
200: {
|
|
1217
|
+
headers: {
|
|
1218
|
+
[name: string]: unknown;
|
|
1122
1219
|
};
|
|
1220
|
+
content?: never;
|
|
1221
|
+
};
|
|
1222
|
+
404: components["responses"]["NotFound"];
|
|
1223
|
+
429: components["responses"]["RateLimited"];
|
|
1224
|
+
};
|
|
1225
|
+
};
|
|
1226
|
+
delete?: never;
|
|
1227
|
+
options?: never;
|
|
1228
|
+
head?: never;
|
|
1229
|
+
patch?: never;
|
|
1230
|
+
trace?: never;
|
|
1231
|
+
};
|
|
1232
|
+
"/spaces/{spaceId}/cubes/{cubeId}/restart": {
|
|
1233
|
+
parameters: {
|
|
1234
|
+
query?: never;
|
|
1235
|
+
header?: never;
|
|
1236
|
+
path?: never;
|
|
1237
|
+
cookie?: never;
|
|
1238
|
+
};
|
|
1239
|
+
get?: never;
|
|
1240
|
+
put?: never;
|
|
1241
|
+
/**
|
|
1242
|
+
* Restart a running Cube
|
|
1243
|
+
* @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.
|
|
1244
|
+
*/
|
|
1245
|
+
post: {
|
|
1246
|
+
parameters: {
|
|
1247
|
+
query?: never;
|
|
1248
|
+
header?: never;
|
|
1249
|
+
path: {
|
|
1250
|
+
spaceId: string;
|
|
1251
|
+
cubeId: string;
|
|
1123
1252
|
};
|
|
1253
|
+
cookie?: never;
|
|
1124
1254
|
};
|
|
1255
|
+
requestBody?: never;
|
|
1125
1256
|
responses: {
|
|
1126
|
-
/** @description
|
|
1127
|
-
|
|
1257
|
+
/** @description Restart enqueued */
|
|
1258
|
+
200: {
|
|
1128
1259
|
headers: {
|
|
1129
1260
|
[name: string]: unknown;
|
|
1130
1261
|
};
|
|
1131
|
-
content
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1262
|
+
content?: never;
|
|
1263
|
+
};
|
|
1264
|
+
404: components["responses"]["NotFound"];
|
|
1265
|
+
/** @description Cube is not running, or a restart is already in progress */
|
|
1266
|
+
409: {
|
|
1267
|
+
headers: {
|
|
1268
|
+
[name: string]: unknown;
|
|
1135
1269
|
};
|
|
1270
|
+
content?: never;
|
|
1136
1271
|
};
|
|
1137
|
-
400: components["responses"]["BadRequest"];
|
|
1138
1272
|
429: components["responses"]["RateLimited"];
|
|
1139
1273
|
};
|
|
1140
1274
|
};
|
|
@@ -1144,7 +1278,7 @@ interface paths {
|
|
|
1144
1278
|
patch?: never;
|
|
1145
1279
|
trace?: never;
|
|
1146
1280
|
};
|
|
1147
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1281
|
+
"/spaces/{spaceId}/cubes/{cubeId}/restore": {
|
|
1148
1282
|
parameters: {
|
|
1149
1283
|
query?: never;
|
|
1150
1284
|
header?: never;
|
|
@@ -1153,22 +1287,26 @@ interface paths {
|
|
|
1153
1287
|
};
|
|
1154
1288
|
get?: never;
|
|
1155
1289
|
put?: never;
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
delete: {
|
|
1290
|
+
/** Restore a Cube from a snapshot */
|
|
1291
|
+
post: {
|
|
1159
1292
|
parameters: {
|
|
1160
1293
|
query?: never;
|
|
1161
1294
|
header?: never;
|
|
1162
1295
|
path: {
|
|
1163
1296
|
spaceId: string;
|
|
1164
1297
|
cubeId: string;
|
|
1165
|
-
mappingId: string;
|
|
1166
1298
|
};
|
|
1167
1299
|
cookie?: never;
|
|
1168
1300
|
};
|
|
1169
|
-
requestBody
|
|
1301
|
+
requestBody: {
|
|
1302
|
+
content: {
|
|
1303
|
+
"application/json": {
|
|
1304
|
+
snapshotId: string;
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1170
1308
|
responses: {
|
|
1171
|
-
/** @description
|
|
1309
|
+
/** @description Restore enqueued */
|
|
1172
1310
|
200: {
|
|
1173
1311
|
headers: {
|
|
1174
1312
|
[name: string]: unknown;
|
|
@@ -1182,6 +1320,7 @@ interface paths {
|
|
|
1182
1320
|
404: components["responses"]["NotFound"];
|
|
1183
1321
|
};
|
|
1184
1322
|
};
|
|
1323
|
+
delete?: never;
|
|
1185
1324
|
options?: never;
|
|
1186
1325
|
head?: never;
|
|
1187
1326
|
patch?: never;
|
|
@@ -1306,97 +1445,39 @@ interface paths {
|
|
|
1306
1445
|
patch?: never;
|
|
1307
1446
|
trace?: never;
|
|
1308
1447
|
};
|
|
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": {
|
|
1448
|
+
"/spaces/{spaceId}/cubes/{cubeId}/ssh": {
|
|
1358
1449
|
parameters: {
|
|
1359
1450
|
query?: never;
|
|
1360
1451
|
header?: never;
|
|
1361
1452
|
path?: never;
|
|
1362
1453
|
cookie?: never;
|
|
1363
1454
|
};
|
|
1364
|
-
/**
|
|
1455
|
+
/**
|
|
1456
|
+
* Get a Cube's SSH connection info
|
|
1457
|
+
* @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.
|
|
1458
|
+
*/
|
|
1365
1459
|
get: {
|
|
1366
1460
|
parameters: {
|
|
1367
1461
|
query?: never;
|
|
1368
1462
|
header?: never;
|
|
1369
1463
|
path: {
|
|
1370
1464
|
spaceId: string;
|
|
1371
|
-
|
|
1465
|
+
cubeId: string;
|
|
1372
1466
|
};
|
|
1373
1467
|
cookie?: never;
|
|
1374
1468
|
};
|
|
1375
1469
|
requestBody?: never;
|
|
1376
1470
|
responses: {
|
|
1377
|
-
/** @description
|
|
1471
|
+
/** @description SSH connection info */
|
|
1378
1472
|
200: {
|
|
1379
1473
|
headers: {
|
|
1380
1474
|
[name: string]: unknown;
|
|
1381
1475
|
};
|
|
1382
1476
|
content: {
|
|
1383
|
-
"application/json":
|
|
1384
|
-
url?: string;
|
|
1385
|
-
filename?: string;
|
|
1386
|
-
sizeBytes?: number | null;
|
|
1387
|
-
/** Format: date-time */
|
|
1388
|
-
expiresAt?: string;
|
|
1389
|
-
};
|
|
1477
|
+
"application/json": components["schemas"]["CubeSshInfo"];
|
|
1390
1478
|
};
|
|
1391
1479
|
};
|
|
1392
1480
|
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
1481
|
};
|
|
1401
1482
|
};
|
|
1402
1483
|
put?: never;
|
|
@@ -1407,7 +1488,7 @@ interface paths {
|
|
|
1407
1488
|
patch?: never;
|
|
1408
1489
|
trace?: never;
|
|
1409
1490
|
};
|
|
1410
|
-
"/spaces/{spaceId}/cubes/
|
|
1491
|
+
"/spaces/{spaceId}/cubes/{cubeId}/ssh-port": {
|
|
1411
1492
|
parameters: {
|
|
1412
1493
|
query?: never;
|
|
1413
1494
|
header?: never;
|
|
@@ -1415,179 +1496,140 @@ interface paths {
|
|
|
1415
1496
|
cookie?: never;
|
|
1416
1497
|
};
|
|
1417
1498
|
get?: never;
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1499
|
+
/**
|
|
1500
|
+
* Change a Cube's SSH port
|
|
1501
|
+
* @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).
|
|
1502
|
+
*/
|
|
1503
|
+
put: {
|
|
1421
1504
|
parameters: {
|
|
1422
1505
|
query?: never;
|
|
1423
1506
|
header?: never;
|
|
1424
1507
|
path: {
|
|
1425
1508
|
spaceId: string;
|
|
1509
|
+
cubeId: string;
|
|
1426
1510
|
};
|
|
1427
1511
|
cookie?: never;
|
|
1428
1512
|
};
|
|
1429
1513
|
requestBody: {
|
|
1430
1514
|
content: {
|
|
1431
1515
|
"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;
|
|
1516
|
+
/** @description The port inside the Cube that sshd listens on (default 22). This is the Cube side of the mapping, not the host port. */
|
|
1517
|
+
cubePort: number;
|
|
1452
1518
|
};
|
|
1453
1519
|
};
|
|
1454
1520
|
};
|
|
1455
1521
|
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: {
|
|
1522
|
+
/** @description SSH port updated */
|
|
1523
|
+
200: {
|
|
1492
1524
|
headers: {
|
|
1493
1525
|
[name: string]: unknown;
|
|
1494
1526
|
};
|
|
1495
1527
|
content?: never;
|
|
1496
1528
|
};
|
|
1529
|
+
400: components["responses"]["BadRequest"];
|
|
1530
|
+
404: components["responses"]["NotFound"];
|
|
1531
|
+
429: components["responses"]["RateLimited"];
|
|
1497
1532
|
};
|
|
1498
1533
|
};
|
|
1534
|
+
post?: never;
|
|
1499
1535
|
delete?: never;
|
|
1500
1536
|
options?: never;
|
|
1501
1537
|
head?: never;
|
|
1502
1538
|
patch?: never;
|
|
1503
1539
|
trace?: never;
|
|
1504
1540
|
};
|
|
1505
|
-
"/spaces/{spaceId}/cubes/
|
|
1541
|
+
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings": {
|
|
1506
1542
|
parameters: {
|
|
1507
1543
|
query?: never;
|
|
1508
1544
|
header?: never;
|
|
1509
1545
|
path?: never;
|
|
1510
1546
|
cookie?: never;
|
|
1511
1547
|
};
|
|
1512
|
-
/**
|
|
1548
|
+
/** List TCP port forwards for a Cube */
|
|
1513
1549
|
get: {
|
|
1514
1550
|
parameters: {
|
|
1515
1551
|
query?: never;
|
|
1516
1552
|
header?: never;
|
|
1517
1553
|
path: {
|
|
1518
1554
|
spaceId: string;
|
|
1519
|
-
|
|
1555
|
+
cubeId: string;
|
|
1520
1556
|
};
|
|
1521
1557
|
cookie?: never;
|
|
1522
1558
|
};
|
|
1523
1559
|
requestBody?: never;
|
|
1524
1560
|
responses: {
|
|
1525
|
-
/** @description
|
|
1561
|
+
/** @description TCP mapping list */
|
|
1526
1562
|
200: {
|
|
1527
1563
|
headers: {
|
|
1528
1564
|
[name: string]: unknown;
|
|
1529
1565
|
};
|
|
1530
1566
|
content: {
|
|
1531
1567
|
"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
|
-
};
|
|
1568
|
+
tcpMappings: components["schemas"]["TcpMapping"][];
|
|
1543
1569
|
};
|
|
1544
1570
|
};
|
|
1545
1571
|
};
|
|
1546
|
-
404: components["responses"]["NotFound"];
|
|
1547
1572
|
};
|
|
1548
1573
|
};
|
|
1549
1574
|
put?: never;
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
delete: {
|
|
1575
|
+
/** Create a TCP port forward */
|
|
1576
|
+
post: {
|
|
1553
1577
|
parameters: {
|
|
1554
1578
|
query?: never;
|
|
1555
|
-
header?:
|
|
1579
|
+
header?: {
|
|
1580
|
+
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1581
|
+
"Idempotency-Key"?: string;
|
|
1582
|
+
};
|
|
1556
1583
|
path: {
|
|
1557
1584
|
spaceId: string;
|
|
1558
|
-
|
|
1585
|
+
cubeId: string;
|
|
1559
1586
|
};
|
|
1560
1587
|
cookie?: never;
|
|
1561
1588
|
};
|
|
1562
|
-
requestBody
|
|
1589
|
+
requestBody: {
|
|
1590
|
+
content: {
|
|
1591
|
+
"application/json": {
|
|
1592
|
+
cubePort: number;
|
|
1593
|
+
/** @description Optional human label for the mapping. */
|
|
1594
|
+
label?: string;
|
|
1595
|
+
/**
|
|
1596
|
+
* @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.
|
|
1597
|
+
* @default true
|
|
1598
|
+
*/
|
|
1599
|
+
udpEnabled?: boolean;
|
|
1600
|
+
/**
|
|
1601
|
+
* @deprecated
|
|
1602
|
+
* @description DEPRECATED alias for `whitelistedIps`, accepted for backwards compatibility. `whitelistedIps` wins if both are sent. Use `whitelistedIps` in new code.
|
|
1603
|
+
*/
|
|
1604
|
+
whitelistIps?: string[];
|
|
1605
|
+
/** @description IPs/CIDRs allowed to reach the published port. Omit or send an empty array to leave the port open to the internet. */
|
|
1606
|
+
whitelistedIps?: string[];
|
|
1607
|
+
};
|
|
1608
|
+
};
|
|
1609
|
+
};
|
|
1563
1610
|
responses: {
|
|
1564
|
-
/** @description
|
|
1565
|
-
|
|
1611
|
+
/** @description Mapping created */
|
|
1612
|
+
201: {
|
|
1566
1613
|
headers: {
|
|
1567
1614
|
[name: string]: unknown;
|
|
1568
1615
|
};
|
|
1569
1616
|
content: {
|
|
1570
1617
|
"application/json": {
|
|
1571
|
-
|
|
1618
|
+
tcpMapping: components["schemas"]["TcpMapping"];
|
|
1572
1619
|
};
|
|
1573
1620
|
};
|
|
1574
1621
|
};
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
409: {
|
|
1578
|
-
headers: {
|
|
1579
|
-
[name: string]: unknown;
|
|
1580
|
-
};
|
|
1581
|
-
content?: never;
|
|
1582
|
-
};
|
|
1622
|
+
400: components["responses"]["BadRequest"];
|
|
1623
|
+
429: components["responses"]["RateLimited"];
|
|
1583
1624
|
};
|
|
1584
1625
|
};
|
|
1626
|
+
delete?: never;
|
|
1585
1627
|
options?: never;
|
|
1586
1628
|
head?: never;
|
|
1587
1629
|
patch?: never;
|
|
1588
1630
|
trace?: never;
|
|
1589
1631
|
};
|
|
1590
|
-
"/spaces/{spaceId}/cubes/
|
|
1632
|
+
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings/{mappingId}": {
|
|
1591
1633
|
parameters: {
|
|
1592
1634
|
query?: never;
|
|
1593
1635
|
header?: never;
|
|
@@ -1596,84 +1638,71 @@ interface paths {
|
|
|
1596
1638
|
};
|
|
1597
1639
|
get?: never;
|
|
1598
1640
|
put?: never;
|
|
1599
|
-
|
|
1600
|
-
|
|
1641
|
+
post?: never;
|
|
1642
|
+
/** Delete a TCP port forward */
|
|
1643
|
+
delete: {
|
|
1601
1644
|
parameters: {
|
|
1602
1645
|
query?: never;
|
|
1603
1646
|
header?: never;
|
|
1604
1647
|
path: {
|
|
1605
1648
|
spaceId: string;
|
|
1606
|
-
|
|
1649
|
+
cubeId: string;
|
|
1650
|
+
mappingId: string;
|
|
1607
1651
|
};
|
|
1608
1652
|
cookie?: never;
|
|
1609
1653
|
};
|
|
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
|
-
};
|
|
1654
|
+
requestBody?: never;
|
|
1627
1655
|
responses: {
|
|
1628
|
-
/** @description
|
|
1656
|
+
/** @description Deleted */
|
|
1629
1657
|
200: {
|
|
1630
1658
|
headers: {
|
|
1631
1659
|
[name: string]: unknown;
|
|
1632
1660
|
};
|
|
1633
1661
|
content: {
|
|
1634
1662
|
"application/json": {
|
|
1635
|
-
|
|
1636
|
-
cubeId?: string;
|
|
1637
|
-
/** @enum {string} */
|
|
1638
|
-
status?: "provisioning";
|
|
1663
|
+
success: boolean;
|
|
1639
1664
|
};
|
|
1640
1665
|
};
|
|
1641
1666
|
};
|
|
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;
|
|
1667
|
+
404: components["responses"]["NotFound"];
|
|
1668
|
+
};
|
|
1669
|
+
};
|
|
1670
|
+
options?: never;
|
|
1671
|
+
head?: never;
|
|
1672
|
+
patch?: never;
|
|
1673
|
+
trace?: never;
|
|
1674
|
+
};
|
|
1675
|
+
"/spaces/{spaceId}/cubes/{cubeId}/wake": {
|
|
1676
|
+
parameters: {
|
|
1677
|
+
query?: never;
|
|
1678
|
+
header?: never;
|
|
1679
|
+
path?: never;
|
|
1680
|
+
cookie?: never;
|
|
1681
|
+
};
|
|
1682
|
+
get?: never;
|
|
1683
|
+
put?: never;
|
|
1684
|
+
/** Start a stopped Cube */
|
|
1685
|
+
post: {
|
|
1686
|
+
parameters: {
|
|
1687
|
+
query?: never;
|
|
1688
|
+
header?: never;
|
|
1689
|
+
path: {
|
|
1690
|
+
spaceId: string;
|
|
1691
|
+
cubeId: string;
|
|
1669
1692
|
};
|
|
1670
|
-
|
|
1671
|
-
|
|
1693
|
+
cookie?: never;
|
|
1694
|
+
};
|
|
1695
|
+
requestBody?: never;
|
|
1696
|
+
responses: {
|
|
1697
|
+
/** @description Start enqueued */
|
|
1698
|
+
200: {
|
|
1672
1699
|
headers: {
|
|
1673
1700
|
[name: string]: unknown;
|
|
1674
1701
|
};
|
|
1675
1702
|
content?: never;
|
|
1676
1703
|
};
|
|
1704
|
+
404: components["responses"]["NotFound"];
|
|
1705
|
+
429: components["responses"]["RateLimited"];
|
|
1677
1706
|
};
|
|
1678
1707
|
};
|
|
1679
1708
|
delete?: never;
|
|
@@ -1724,9 +1753,9 @@ interface paths {
|
|
|
1724
1753
|
requestBody: {
|
|
1725
1754
|
content: {
|
|
1726
1755
|
"application/json": {
|
|
1756
|
+
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
1757
|
/** Format: uri */
|
|
1728
1758
|
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
1759
|
};
|
|
1731
1760
|
};
|
|
1732
1761
|
};
|
|
@@ -1849,199 +1878,200 @@ interface paths {
|
|
|
1849
1878
|
}
|
|
1850
1879
|
interface components {
|
|
1851
1880
|
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
1881
|
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
1882
|
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
1883
|
/** Format: date-time */
|
|
1893
1884
|
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
1885
|
id: string;
|
|
1886
|
+
image: string;
|
|
1910
1887
|
name: string;
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1888
|
+
publicIpv4: string | null;
|
|
1889
|
+
resources: {
|
|
1890
|
+
diskGb: number;
|
|
1891
|
+
ramGb: number;
|
|
1892
|
+
vcpu: number;
|
|
1893
|
+
};
|
|
1894
|
+
/** @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. */
|
|
1895
|
+
serverDomain?: string | null;
|
|
1896
|
+
sshUser: string;
|
|
1897
|
+
/** @enum {string} */
|
|
1898
|
+
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
1899
|
+
/** @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. */
|
|
1900
|
+
terminationProtection: boolean;
|
|
1901
|
+
/**
|
|
1902
|
+
* Format: date-time
|
|
1903
|
+
* @description ISO8601 timestamp of the most recent toggle of `terminationProtection`. Null when the flag has never been turned on.
|
|
1904
|
+
*/
|
|
1905
|
+
terminationProtectionChangedAt: string | null;
|
|
1906
|
+
/** @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. */
|
|
1907
|
+
terminationProtectionChangedBy: string | null;
|
|
1908
|
+
/** Format: date-time */
|
|
1909
|
+
updatedAt: string;
|
|
1914
1910
|
};
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1911
|
+
CubeSshInfo: {
|
|
1912
|
+
host: string | null;
|
|
1913
|
+
hostKeys: {
|
|
1914
|
+
key: string;
|
|
1915
|
+
type: string;
|
|
1916
|
+
}[];
|
|
1917
|
+
port: number;
|
|
1918
|
+
user: string;
|
|
1920
1919
|
};
|
|
1921
1920
|
DnsRecord: {
|
|
1921
|
+
host: string;
|
|
1922
1922
|
/** @enum {string} */
|
|
1923
1923
|
id: "ownership" | "routing" | "certificate";
|
|
1924
|
+
mustBeGrey: boolean;
|
|
1925
|
+
note?: string | null;
|
|
1926
|
+
proxyOk: boolean;
|
|
1927
|
+
/** @enum {string} */
|
|
1928
|
+
purpose: "ownership" | "routing" | "certificate";
|
|
1924
1929
|
/** @enum {string} */
|
|
1925
1930
|
type: "CNAME" | "TXT" | "A";
|
|
1926
|
-
host: string;
|
|
1927
1931
|
value: string;
|
|
1928
|
-
/** @enum {string} */
|
|
1929
|
-
purpose: "ownership" | "routing" | "certificate";
|
|
1930
|
-
note?: string | null;
|
|
1931
|
-
mustBeGrey: boolean;
|
|
1932
|
-
proxyOk: boolean;
|
|
1933
1932
|
};
|
|
1934
1933
|
DnsRecordStatus: {
|
|
1935
|
-
|
|
1936
|
-
/** @enum {string} */
|
|
1937
|
-
type: "CNAME" | "TXT" | "A";
|
|
1934
|
+
detail: string;
|
|
1938
1935
|
host: string;
|
|
1939
|
-
|
|
1940
|
-
purpose: string;
|
|
1941
|
-
note?: string | null;
|
|
1936
|
+
id: string;
|
|
1942
1937
|
mustBeGrey?: boolean;
|
|
1938
|
+
note?: string | null;
|
|
1939
|
+
observed?: string[] | null;
|
|
1943
1940
|
proxyOk?: boolean;
|
|
1941
|
+
purpose: string;
|
|
1944
1942
|
/** @enum {string} */
|
|
1945
1943
|
state: "found" | "missing" | "mismatch" | "unknown";
|
|
1946
|
-
|
|
1947
|
-
|
|
1944
|
+
/** @enum {string} */
|
|
1945
|
+
type: "CNAME" | "TXT" | "A";
|
|
1946
|
+
value: string;
|
|
1948
1947
|
};
|
|
1949
1948
|
Domain: {
|
|
1950
|
-
|
|
1949
|
+
acmeDelegationTarget: string | null;
|
|
1950
|
+
basicAuthEnabled: boolean;
|
|
1951
|
+
basicAuthUser: string | null;
|
|
1952
|
+
corsConfig: Record<string, never> | null;
|
|
1953
|
+
/** Format: date-time */
|
|
1954
|
+
createdAt: string;
|
|
1951
1955
|
cubeId: string;
|
|
1952
1956
|
domain: string;
|
|
1953
|
-
|
|
1954
|
-
status: string;
|
|
1957
|
+
id: string;
|
|
1955
1958
|
ingressStatus: string | null;
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
+
ipAllowList: string[] | null;
|
|
1960
|
+
ipDenyList: string[] | null;
|
|
1961
|
+
isWildcard: boolean;
|
|
1962
|
+
maxRequestBodyMb: number | null;
|
|
1963
|
+
port: number | null;
|
|
1959
1964
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1960
|
-
|
|
1965
|
+
requestHeaderOverrides: {
|
|
1966
|
+
remove?: string[];
|
|
1961
1967
|
set?: {
|
|
1962
1968
|
[key: string]: string;
|
|
1963
1969
|
};
|
|
1964
|
-
remove?: string[];
|
|
1965
1970
|
} | null;
|
|
1971
|
+
responseCompression: boolean;
|
|
1966
1972
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1967
|
-
|
|
1973
|
+
responseHeaderOverrides: {
|
|
1974
|
+
remove?: string[];
|
|
1968
1975
|
set?: {
|
|
1969
1976
|
[key: string]: string;
|
|
1970
1977
|
};
|
|
1971
|
-
remove?: string[];
|
|
1972
1978
|
} | null;
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
corsConfig: Record<string, never> | null;
|
|
1980
|
-
isWildcard: boolean;
|
|
1979
|
+
responseHeaderTimeoutSecs: number;
|
|
1980
|
+
/** @enum {string} */
|
|
1981
|
+
securityHeadersMode: "enforced" | "app_managed";
|
|
1982
|
+
status: string;
|
|
1983
|
+
/** Format: date-time */
|
|
1984
|
+
updatedAt: string;
|
|
1981
1985
|
/** @enum {string|null} */
|
|
1982
1986
|
wildcardCertState: "pending_delegation" | "issuing" | "ready" | "failed" | null;
|
|
1983
|
-
|
|
1987
|
+
};
|
|
1988
|
+
Error: {
|
|
1989
|
+
error: string;
|
|
1990
|
+
};
|
|
1991
|
+
Image: {
|
|
1992
|
+
defaultUser: string;
|
|
1993
|
+
description: string;
|
|
1994
|
+
id: string;
|
|
1995
|
+
name: string;
|
|
1996
|
+
version: string;
|
|
1997
|
+
};
|
|
1998
|
+
Pagination: {
|
|
1999
|
+
limit: number;
|
|
2000
|
+
page: number;
|
|
2001
|
+
total: number;
|
|
2002
|
+
totalPages: number;
|
|
2003
|
+
};
|
|
2004
|
+
PricingTier: {
|
|
2005
|
+
label: string;
|
|
2006
|
+
maxVcpus: number | null;
|
|
2007
|
+
minVcpus: number;
|
|
2008
|
+
multiplier: number;
|
|
2009
|
+
};
|
|
2010
|
+
Region: {
|
|
2011
|
+
id: string;
|
|
2012
|
+
name: string;
|
|
2013
|
+
slug: string;
|
|
2014
|
+
};
|
|
2015
|
+
Snapshot: {
|
|
1984
2016
|
/** Format: date-time */
|
|
1985
2017
|
createdAt: string;
|
|
2018
|
+
cubeId: string;
|
|
2019
|
+
id: string;
|
|
2020
|
+
kind: string;
|
|
2021
|
+
name: string;
|
|
2022
|
+
sizeBytes: number | null;
|
|
2023
|
+
status: string;
|
|
2024
|
+
};
|
|
2025
|
+
Space: {
|
|
1986
2026
|
/** Format: date-time */
|
|
1987
|
-
|
|
2027
|
+
createdAt: string;
|
|
2028
|
+
id: string;
|
|
2029
|
+
name: string;
|
|
2030
|
+
tier: string;
|
|
1988
2031
|
};
|
|
1989
2032
|
TcpMapping: {
|
|
1990
|
-
|
|
2033
|
+
/** Format: date-time */
|
|
2034
|
+
createdAt: string;
|
|
1991
2035
|
cubeId: string;
|
|
1992
2036
|
cubePort: number;
|
|
1993
2037
|
/** @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
|
|
2038
|
+
host?: string | null;
|
|
1995
2039
|
hostPort: number;
|
|
2040
|
+
id: string;
|
|
2041
|
+
isSsh: boolean;
|
|
1996
2042
|
label: string | null;
|
|
1997
2043
|
status: string;
|
|
1998
|
-
|
|
1999
|
-
/** @description Whether the mapping also forwards UDP traffic on the same host port, in addition to TCP. */
|
|
2044
|
+
/** @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
2045
|
udpEnabled: boolean;
|
|
2001
2046
|
/** Format: date-time */
|
|
2002
|
-
createdAt: string;
|
|
2003
|
-
/** Format: date-time */
|
|
2004
2047
|
updatedAt: string;
|
|
2005
2048
|
whitelistedIps: {
|
|
2006
|
-
id: string;
|
|
2007
2049
|
cidr: string;
|
|
2050
|
+
id: string;
|
|
2008
2051
|
}[];
|
|
2009
2052
|
};
|
|
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
2053
|
Webhook: {
|
|
2021
|
-
id: string;
|
|
2022
|
-
/** Format: uri */
|
|
2023
|
-
url: string;
|
|
2024
|
-
events: string[];
|
|
2025
|
-
enabled: boolean;
|
|
2026
2054
|
/** Format: date-time */
|
|
2027
2055
|
createdAt: string;
|
|
2056
|
+
enabled: boolean;
|
|
2057
|
+
events: string[];
|
|
2058
|
+
id: string;
|
|
2028
2059
|
/** Format: date-time */
|
|
2029
2060
|
updatedAt: string;
|
|
2061
|
+
/** Format: uri */
|
|
2062
|
+
url: string;
|
|
2030
2063
|
};
|
|
2031
2064
|
WebhookDelivery: {
|
|
2032
|
-
id: string;
|
|
2033
|
-
event: string;
|
|
2034
|
-
/** @enum {string} */
|
|
2035
|
-
status: "pending" | "delivered" | "failed";
|
|
2036
2065
|
attempts: number;
|
|
2037
2066
|
/** Format: date-time */
|
|
2067
|
+
createdAt: string;
|
|
2068
|
+
event: string;
|
|
2069
|
+
id: string;
|
|
2070
|
+
/** Format: date-time */
|
|
2038
2071
|
lastAttemptAt: string | null;
|
|
2039
2072
|
responseStatus: number | null;
|
|
2040
|
-
/**
|
|
2041
|
-
|
|
2042
|
-
};
|
|
2043
|
-
Error: {
|
|
2044
|
-
error: string;
|
|
2073
|
+
/** @enum {string} */
|
|
2074
|
+
status: "pending" | "delivered" | "failed";
|
|
2045
2075
|
};
|
|
2046
2076
|
};
|
|
2047
2077
|
responses: {
|
|
@@ -2054,8 +2084,8 @@ interface components {
|
|
|
2054
2084
|
"application/json": components["schemas"]["Error"];
|
|
2055
2085
|
};
|
|
2056
2086
|
};
|
|
2057
|
-
/** @description
|
|
2058
|
-
|
|
2087
|
+
/** @description Authenticated but lacks the required permission */
|
|
2088
|
+
Forbidden: {
|
|
2059
2089
|
headers: {
|
|
2060
2090
|
[name: string]: unknown;
|
|
2061
2091
|
};
|
|
@@ -2063,8 +2093,8 @@ interface components {
|
|
|
2063
2093
|
"application/json": components["schemas"]["Error"];
|
|
2064
2094
|
};
|
|
2065
2095
|
};
|
|
2066
|
-
/** @description
|
|
2067
|
-
|
|
2096
|
+
/** @description Resource not found */
|
|
2097
|
+
NotFound: {
|
|
2068
2098
|
headers: {
|
|
2069
2099
|
[name: string]: unknown;
|
|
2070
2100
|
};
|
|
@@ -2072,8 +2102,8 @@ interface components {
|
|
|
2072
2102
|
"application/json": components["schemas"]["Error"];
|
|
2073
2103
|
};
|
|
2074
2104
|
};
|
|
2075
|
-
/** @description
|
|
2076
|
-
|
|
2105
|
+
/** @description Rate limit exceeded (10 mutations / 60s) */
|
|
2106
|
+
RateLimited: {
|
|
2077
2107
|
headers: {
|
|
2078
2108
|
[name: string]: unknown;
|
|
2079
2109
|
};
|
|
@@ -2081,8 +2111,8 @@ interface components {
|
|
|
2081
2111
|
"application/json": components["schemas"]["Error"];
|
|
2082
2112
|
};
|
|
2083
2113
|
};
|
|
2084
|
-
/** @description
|
|
2085
|
-
|
|
2114
|
+
/** @description Missing or invalid API key */
|
|
2115
|
+
Unauthorized: {
|
|
2086
2116
|
headers: {
|
|
2087
2117
|
[name: string]: unknown;
|
|
2088
2118
|
};
|
|
@@ -2251,28 +2281,28 @@ declare class KrovaClient {
|
|
|
2251
2281
|
/** List Cubes in a Space, with pagination metadata. */
|
|
2252
2282
|
list: (spaceId: string) => Promise<{
|
|
2253
2283
|
cubes: {
|
|
2284
|
+
costPerHour: number;
|
|
2285
|
+
createdAt: string;
|
|
2254
2286
|
id: string;
|
|
2287
|
+
image: string;
|
|
2255
2288
|
name: string;
|
|
2256
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2257
2289
|
publicIpv4: string | null;
|
|
2258
2290
|
resources: {
|
|
2259
|
-
vcpu: number;
|
|
2260
|
-
ramGb: number;
|
|
2261
2291
|
diskGb: number;
|
|
2292
|
+
ramGb: number;
|
|
2293
|
+
vcpu: number;
|
|
2262
2294
|
};
|
|
2263
|
-
image: string;
|
|
2264
|
-
sshUser: string;
|
|
2265
|
-
costPerHour: number;
|
|
2266
2295
|
serverDomain?: string | null;
|
|
2296
|
+
sshUser: string;
|
|
2297
|
+
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2267
2298
|
terminationProtection: boolean;
|
|
2268
|
-
terminationProtectionChangedAt
|
|
2269
|
-
terminationProtectionChangedBy
|
|
2270
|
-
createdAt: string;
|
|
2299
|
+
terminationProtectionChangedAt: string | null;
|
|
2300
|
+
terminationProtectionChangedBy: string | null;
|
|
2271
2301
|
updatedAt: string;
|
|
2272
2302
|
}[];
|
|
2273
2303
|
pagination: {
|
|
2274
|
-
page: number;
|
|
2275
2304
|
limit: number;
|
|
2305
|
+
page: number;
|
|
2276
2306
|
total: number;
|
|
2277
2307
|
totalPages: number;
|
|
2278
2308
|
};
|
|
@@ -2465,27 +2495,27 @@ declare class KrovaClient {
|
|
|
2465
2495
|
* archive to those URLs, then call {@link imports.complete}.
|
|
2466
2496
|
*/
|
|
2467
2497
|
create: (spaceId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2498
|
+
chunkSizeBytes?: number;
|
|
2499
|
+
expiresAt?: string;
|
|
2468
2500
|
importId?: string;
|
|
2469
|
-
uploadId?: string;
|
|
2470
2501
|
key?: string;
|
|
2471
|
-
chunkSizeBytes?: number;
|
|
2472
2502
|
parts?: {
|
|
2473
2503
|
partNumber?: number;
|
|
2474
2504
|
url?: string;
|
|
2475
2505
|
}[] | undefined;
|
|
2476
|
-
|
|
2506
|
+
uploadId?: string;
|
|
2477
2507
|
} | undefined>;
|
|
2478
2508
|
/** Get an in-progress or completed import by id. */
|
|
2479
2509
|
get: (spaceId: string, importId: string) => Promise<{
|
|
2480
2510
|
import?: {
|
|
2511
|
+
completedAt?: string | null;
|
|
2512
|
+
createdAt?: string;
|
|
2513
|
+
cubeId?: string | null;
|
|
2514
|
+
error?: string | null;
|
|
2481
2515
|
id?: string;
|
|
2482
2516
|
name?: string;
|
|
2483
2517
|
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
2484
|
-
cubeId?: string | null;
|
|
2485
|
-
error?: string | null;
|
|
2486
|
-
createdAt?: string;
|
|
2487
2518
|
updatedAt?: string;
|
|
2488
|
-
completedAt?: string | null;
|
|
2489
2519
|
} | undefined;
|
|
2490
2520
|
}>;
|
|
2491
2521
|
/**
|
|
@@ -2494,8 +2524,8 @@ declare class KrovaClient {
|
|
|
2494
2524
|
* `config`.
|
|
2495
2525
|
*/
|
|
2496
2526
|
complete: (spaceId: string, importId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports/{importId}/complete"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2497
|
-
importId?: string;
|
|
2498
2527
|
cubeId?: string;
|
|
2528
|
+
importId?: string;
|
|
2499
2529
|
status?: "provisioning";
|
|
2500
2530
|
} | undefined>;
|
|
2501
2531
|
/** Cancel an in-progress import. */
|
|
@@ -2506,10 +2536,10 @@ declare class KrovaClient {
|
|
|
2506
2536
|
readonly backups: {
|
|
2507
2537
|
/** Get a time-limited download URL for a backup `.cube` archive. */
|
|
2508
2538
|
download: (spaceId: string, backupId: string) => Promise<{
|
|
2509
|
-
|
|
2539
|
+
expiresAt?: string;
|
|
2510
2540
|
filename?: string;
|
|
2511
2541
|
sizeBytes?: number | null;
|
|
2512
|
-
|
|
2542
|
+
url?: string;
|
|
2513
2543
|
} | undefined>;
|
|
2514
2544
|
};
|
|
2515
2545
|
readonly webhooks: {
|
|
@@ -2563,28 +2593,28 @@ declare class KrovaClient {
|
|
|
2563
2593
|
/** List available OS images. */
|
|
2564
2594
|
images: () => Promise<{
|
|
2565
2595
|
images: {
|
|
2596
|
+
defaultUser: string;
|
|
2597
|
+
description: string;
|
|
2566
2598
|
id: string;
|
|
2567
2599
|
name: string;
|
|
2568
2600
|
version: string;
|
|
2569
|
-
description: string;
|
|
2570
|
-
defaultUser: string;
|
|
2571
2601
|
}[];
|
|
2572
2602
|
}>;
|
|
2573
2603
|
/** Per-resource hourly rates and volume pricing tiers. */
|
|
2574
2604
|
pricing: () => Promise<{
|
|
2575
2605
|
currency: string;
|
|
2606
|
+
note: string;
|
|
2576
2607
|
rates: {
|
|
2577
|
-
vcpuPerHour: number;
|
|
2578
|
-
ramGbPerHour: number;
|
|
2579
2608
|
diskGbPerHour: number;
|
|
2609
|
+
ramGbPerHour: number;
|
|
2610
|
+
vcpuPerHour: number;
|
|
2580
2611
|
};
|
|
2581
2612
|
tiers: {
|
|
2582
|
-
|
|
2613
|
+
label: string;
|
|
2583
2614
|
maxVcpus: number | null;
|
|
2615
|
+
minVcpus: number;
|
|
2584
2616
|
multiplier: number;
|
|
2585
|
-
label: string;
|
|
2586
2617
|
}[];
|
|
2587
|
-
note: string;
|
|
2588
2618
|
}>;
|
|
2589
2619
|
};
|
|
2590
2620
|
}
|
|
@@ -2635,8 +2665,19 @@ declare class KrovaError extends Error {
|
|
|
2635
2665
|
}
|
|
2636
2666
|
/**
|
|
2637
2667
|
* Build a {@link KrovaError} from a failing response + parsed error body.
|
|
2668
|
+
*
|
|
2669
|
+
* `body` is `unknown` rather than {@link KrovaErrorBody} because not every
|
|
2670
|
+
* documented error response is the flat `{ error: string }` shape — DELETE
|
|
2671
|
+
* /cubes/{cubeId} publishes a 409 whose `error` is an object. This function
|
|
2672
|
+
* already coped with that at runtime; typing the parameter narrowly only meant
|
|
2673
|
+
* the call sites had to lie. Widening accepts strictly more, so no caller
|
|
2674
|
+
* breaks.
|
|
2675
|
+
*
|
|
2676
|
+
* `body` is carried onto the error only when it really is the flat shape, so
|
|
2677
|
+
* {@link KrovaError.body} never advertises a `string` that is not there. A
|
|
2678
|
+
* caller that needs the raw payload of some other shape has `response`.
|
|
2638
2679
|
*/
|
|
2639
|
-
declare function krovaErrorFrom(response: Response, body:
|
|
2680
|
+
declare function krovaErrorFrom(response: Response, body: unknown): KrovaError;
|
|
2640
2681
|
/**
|
|
2641
2682
|
* Thrown by `client.cubes.delete` when the server rejects a delete with
|
|
2642
2683
|
* `409` and `error.code = "termination_protected"`.
|