@krovacloud/sdk 0.4.9 → 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 +127 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +950 -780
- package/dist/index.d.ts +950 -780
- package/dist/index.js +126 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5,38 +5,140 @@ import { Client } from "openapi-fetch";
|
|
|
5
5
|
* Do not make direct changes to the file.
|
|
6
6
|
*/
|
|
7
7
|
interface paths {
|
|
8
|
-
"/
|
|
8
|
+
"/auth/cli/poll": {
|
|
9
9
|
parameters: {
|
|
10
10
|
query?: never;
|
|
11
11
|
header?: never;
|
|
12
12
|
path?: never;
|
|
13
13
|
cookie?: never;
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
get?: never;
|
|
16
|
+
put?: never;
|
|
17
|
+
/**
|
|
18
|
+
* Poll for CLI device-authorization approval (RFC 8628)
|
|
19
|
+
* @description Public, unauthenticated. The CLI submits its deviceCode until the user approves or denies. On approval a real API key is minted ONCE, scoped to the approved Space and the approving user's membership, and returned a single time. Rate-limited per client IP.
|
|
20
|
+
*/
|
|
21
|
+
post: {
|
|
17
22
|
parameters: {
|
|
18
23
|
query?: never;
|
|
19
24
|
header?: never;
|
|
20
25
|
path?: never;
|
|
21
26
|
cookie?: never;
|
|
22
27
|
};
|
|
23
|
-
requestBody
|
|
28
|
+
requestBody: {
|
|
29
|
+
content: {
|
|
30
|
+
"application/json": {
|
|
31
|
+
/** @description The device code from /auth/cli/start. */
|
|
32
|
+
deviceCode: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
24
36
|
responses: {
|
|
25
|
-
/** @description
|
|
37
|
+
/** @description Approved — API key minted (returned once) */
|
|
26
38
|
200: {
|
|
27
39
|
headers: {
|
|
28
40
|
[name: string]: unknown;
|
|
29
41
|
};
|
|
30
42
|
content: {
|
|
31
43
|
"application/json": {
|
|
32
|
-
|
|
44
|
+
/** @description The full API key. Shown once and never returned again — store it securely. */
|
|
45
|
+
apiKey: string;
|
|
46
|
+
/** @description The Space the key is scoped to. */
|
|
47
|
+
spaceId: string;
|
|
33
48
|
};
|
|
34
49
|
};
|
|
35
50
|
};
|
|
51
|
+
400: components["responses"]["BadRequest"];
|
|
52
|
+
/** @description The user denied the login request */
|
|
53
|
+
403: {
|
|
54
|
+
headers: {
|
|
55
|
+
[name: string]: unknown;
|
|
56
|
+
};
|
|
57
|
+
content?: never;
|
|
58
|
+
};
|
|
59
|
+
/** @description The device code expired, was already consumed, or is unknown */
|
|
60
|
+
410: {
|
|
61
|
+
headers: {
|
|
62
|
+
[name: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
content?: never;
|
|
65
|
+
};
|
|
66
|
+
/** @description Authorization still pending — keep polling at the given interval */
|
|
67
|
+
428: {
|
|
68
|
+
headers: {
|
|
69
|
+
[name: string]: unknown;
|
|
70
|
+
};
|
|
71
|
+
content?: never;
|
|
72
|
+
};
|
|
73
|
+
429: components["responses"]["RateLimited"];
|
|
36
74
|
};
|
|
37
75
|
};
|
|
76
|
+
delete?: never;
|
|
77
|
+
options?: never;
|
|
78
|
+
head?: never;
|
|
79
|
+
patch?: never;
|
|
80
|
+
trace?: never;
|
|
81
|
+
};
|
|
82
|
+
"/auth/cli/start": {
|
|
83
|
+
parameters: {
|
|
84
|
+
query?: never;
|
|
85
|
+
header?: never;
|
|
86
|
+
path?: never;
|
|
87
|
+
cookie?: never;
|
|
88
|
+
};
|
|
89
|
+
get?: never;
|
|
38
90
|
put?: never;
|
|
39
|
-
|
|
91
|
+
/**
|
|
92
|
+
* Begin a CLI device-authorization login (RFC 8628)
|
|
93
|
+
* @description Public, unauthenticated. Mints a device code (returned once) and a short human user code, and returns the verification URIs the user opens in a browser to approve. The CLI then polls /auth/cli/poll. Rate-limited per client IP.
|
|
94
|
+
*/
|
|
95
|
+
post: {
|
|
96
|
+
parameters: {
|
|
97
|
+
query?: never;
|
|
98
|
+
header?: never;
|
|
99
|
+
path?: never;
|
|
100
|
+
cookie?: never;
|
|
101
|
+
};
|
|
102
|
+
requestBody?: never;
|
|
103
|
+
responses: {
|
|
104
|
+
/** @description Device-authorization request created */
|
|
105
|
+
200: {
|
|
106
|
+
headers: {
|
|
107
|
+
[name: string]: unknown;
|
|
108
|
+
};
|
|
109
|
+
content: {
|
|
110
|
+
"application/json": {
|
|
111
|
+
/** @description High-entropy code the CLI keeps secret and presents on each poll. Only its hash is stored server-side. */
|
|
112
|
+
deviceCode: string;
|
|
113
|
+
/** @description Seconds until the device code expires (~600). */
|
|
114
|
+
expiresIn: number;
|
|
115
|
+
/** @description Seconds to wait between polls. */
|
|
116
|
+
interval: number;
|
|
117
|
+
/** @description Short human-readable code (KROVA-XXXX-XXXX) the user confirms in the browser. */
|
|
118
|
+
userCode: string;
|
|
119
|
+
/**
|
|
120
|
+
* Format: uri
|
|
121
|
+
* @description Browser URL where the user approves.
|
|
122
|
+
*/
|
|
123
|
+
verificationUri: string;
|
|
124
|
+
/**
|
|
125
|
+
* Format: uri
|
|
126
|
+
* @description verificationUri with the user code pre-filled.
|
|
127
|
+
*/
|
|
128
|
+
verificationUriComplete: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
429: components["responses"]["RateLimited"];
|
|
133
|
+
/** @description Could not allocate a login code; retry */
|
|
134
|
+
503: {
|
|
135
|
+
headers: {
|
|
136
|
+
[name: string]: unknown;
|
|
137
|
+
};
|
|
138
|
+
content?: never;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
40
142
|
delete?: never;
|
|
41
143
|
options?: never;
|
|
42
144
|
head?: never;
|
|
@@ -106,13 +208,13 @@ interface paths {
|
|
|
106
208
|
content: {
|
|
107
209
|
"application/json": {
|
|
108
210
|
currency: string;
|
|
211
|
+
note: string;
|
|
109
212
|
rates: {
|
|
110
|
-
vcpuPerHour: number;
|
|
111
|
-
ramGbPerHour: number;
|
|
112
213
|
diskGbPerHour: number;
|
|
214
|
+
ramGbPerHour: number;
|
|
215
|
+
vcpuPerHour: number;
|
|
113
216
|
};
|
|
114
217
|
tiers: components["schemas"]["PricingTier"][];
|
|
115
|
-
note: string;
|
|
116
218
|
};
|
|
117
219
|
};
|
|
118
220
|
};
|
|
@@ -126,20 +228,15 @@ interface paths {
|
|
|
126
228
|
patch?: never;
|
|
127
229
|
trace?: never;
|
|
128
230
|
};
|
|
129
|
-
"/
|
|
231
|
+
"/regions": {
|
|
130
232
|
parameters: {
|
|
131
233
|
query?: never;
|
|
132
234
|
header?: never;
|
|
133
235
|
path?: never;
|
|
134
236
|
cookie?: never;
|
|
135
237
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Begin a CLI device-authorization login (RFC 8628)
|
|
140
|
-
* @description Public, unauthenticated. Mints a device code (returned once) and a short human user code, and returns the verification URIs the user opens in a browser to approve. The CLI then polls /auth/cli/poll. Rate-limited per client IP.
|
|
141
|
-
*/
|
|
142
|
-
post: {
|
|
238
|
+
/** List regions with available capacity */
|
|
239
|
+
get: {
|
|
143
240
|
parameters: {
|
|
144
241
|
query?: never;
|
|
145
242
|
header?: never;
|
|
@@ -148,155 +245,111 @@ interface paths {
|
|
|
148
245
|
};
|
|
149
246
|
requestBody?: never;
|
|
150
247
|
responses: {
|
|
151
|
-
/** @description
|
|
248
|
+
/** @description Region list */
|
|
152
249
|
200: {
|
|
153
250
|
headers: {
|
|
154
251
|
[name: string]: unknown;
|
|
155
252
|
};
|
|
156
253
|
content: {
|
|
157
254
|
"application/json": {
|
|
158
|
-
|
|
159
|
-
deviceCode: string;
|
|
160
|
-
/** @description Short human-readable code (KROVA-XXXX-XXXX) the user confirms in the browser. */
|
|
161
|
-
userCode: string;
|
|
162
|
-
/**
|
|
163
|
-
* Format: uri
|
|
164
|
-
* @description Browser URL where the user approves.
|
|
165
|
-
*/
|
|
166
|
-
verificationUri: string;
|
|
167
|
-
/**
|
|
168
|
-
* Format: uri
|
|
169
|
-
* @description verificationUri with the user code pre-filled.
|
|
170
|
-
*/
|
|
171
|
-
verificationUriComplete: string;
|
|
172
|
-
/** @description Seconds to wait between polls. */
|
|
173
|
-
interval: number;
|
|
174
|
-
/** @description Seconds until the device code expires (~600). */
|
|
175
|
-
expiresIn: number;
|
|
255
|
+
regions: components["schemas"]["Region"][];
|
|
176
256
|
};
|
|
177
257
|
};
|
|
178
258
|
};
|
|
179
|
-
429: components["responses"]["RateLimited"];
|
|
180
|
-
/** @description Could not allocate a login code; retry */
|
|
181
|
-
503: {
|
|
182
|
-
headers: {
|
|
183
|
-
[name: string]: unknown;
|
|
184
|
-
};
|
|
185
|
-
content?: never;
|
|
186
|
-
};
|
|
187
259
|
};
|
|
188
260
|
};
|
|
261
|
+
put?: never;
|
|
262
|
+
post?: never;
|
|
189
263
|
delete?: never;
|
|
190
264
|
options?: never;
|
|
191
265
|
head?: never;
|
|
192
266
|
patch?: never;
|
|
193
267
|
trace?: never;
|
|
194
268
|
};
|
|
195
|
-
"/
|
|
269
|
+
"/space": {
|
|
196
270
|
parameters: {
|
|
197
271
|
query?: never;
|
|
198
272
|
header?: never;
|
|
199
273
|
path?: never;
|
|
200
274
|
cookie?: never;
|
|
201
275
|
};
|
|
202
|
-
get?: never;
|
|
203
|
-
put?: never;
|
|
204
276
|
/**
|
|
205
|
-
*
|
|
206
|
-
* @description
|
|
277
|
+
* Resolve the space this API key is scoped to
|
|
278
|
+
* @description Returns the single space the API key belongs to. Lets a client auto-resolve the space id from the key alone (no spaceId in the URL).
|
|
207
279
|
*/
|
|
208
|
-
|
|
280
|
+
get: {
|
|
209
281
|
parameters: {
|
|
210
282
|
query?: never;
|
|
211
283
|
header?: never;
|
|
212
284
|
path?: never;
|
|
213
285
|
cookie?: never;
|
|
214
286
|
};
|
|
215
|
-
requestBody
|
|
216
|
-
content: {
|
|
217
|
-
"application/json": {
|
|
218
|
-
/** @description The device code from /auth/cli/start. */
|
|
219
|
-
deviceCode: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
};
|
|
287
|
+
requestBody?: never;
|
|
223
288
|
responses: {
|
|
224
|
-
/** @description
|
|
289
|
+
/** @description The key's space */
|
|
225
290
|
200: {
|
|
226
291
|
headers: {
|
|
227
292
|
[name: string]: unknown;
|
|
228
293
|
};
|
|
229
294
|
content: {
|
|
230
|
-
"application/json":
|
|
231
|
-
/** @description The full API key. Shown once and never returned again — store it securely. */
|
|
232
|
-
apiKey: string;
|
|
233
|
-
/** @description The Space the key is scoped to. */
|
|
234
|
-
spaceId: string;
|
|
235
|
-
};
|
|
236
|
-
};
|
|
237
|
-
};
|
|
238
|
-
400: components["responses"]["BadRequest"];
|
|
239
|
-
/** @description The user denied the login request */
|
|
240
|
-
403: {
|
|
241
|
-
headers: {
|
|
242
|
-
[name: string]: unknown;
|
|
243
|
-
};
|
|
244
|
-
content?: never;
|
|
245
|
-
};
|
|
246
|
-
/** @description The device code expired, was already consumed, or is unknown */
|
|
247
|
-
410: {
|
|
248
|
-
headers: {
|
|
249
|
-
[name: string]: unknown;
|
|
250
|
-
};
|
|
251
|
-
content?: never;
|
|
252
|
-
};
|
|
253
|
-
/** @description Authorization still pending — keep polling at the given interval */
|
|
254
|
-
428: {
|
|
255
|
-
headers: {
|
|
256
|
-
[name: string]: unknown;
|
|
295
|
+
"application/json": components["schemas"]["Space"];
|
|
257
296
|
};
|
|
258
|
-
content?: never;
|
|
259
297
|
};
|
|
260
|
-
|
|
298
|
+
401: components["responses"]["Unauthorized"];
|
|
299
|
+
404: components["responses"]["NotFound"];
|
|
261
300
|
};
|
|
262
301
|
};
|
|
302
|
+
put?: never;
|
|
303
|
+
post?: never;
|
|
263
304
|
delete?: never;
|
|
264
305
|
options?: never;
|
|
265
306
|
head?: never;
|
|
266
307
|
patch?: never;
|
|
267
308
|
trace?: never;
|
|
268
309
|
};
|
|
269
|
-
"/
|
|
310
|
+
"/spaces/{spaceId}/backups/{backupId}/download": {
|
|
270
311
|
parameters: {
|
|
271
312
|
query?: never;
|
|
272
313
|
header?: never;
|
|
273
314
|
path?: never;
|
|
274
315
|
cookie?: never;
|
|
275
316
|
};
|
|
276
|
-
/**
|
|
277
|
-
* Resolve the space this API key is scoped to
|
|
278
|
-
* @description Returns the single space the API key belongs to. Lets a client auto-resolve the space id from the key alone (no spaceId in the URL).
|
|
279
|
-
*/
|
|
317
|
+
/** Generate a presigned download URL for a backup .cube archive */
|
|
280
318
|
get: {
|
|
281
319
|
parameters: {
|
|
282
320
|
query?: never;
|
|
283
321
|
header?: never;
|
|
284
|
-
path
|
|
322
|
+
path: {
|
|
323
|
+
spaceId: string;
|
|
324
|
+
backupId: string;
|
|
325
|
+
};
|
|
285
326
|
cookie?: never;
|
|
286
327
|
};
|
|
287
328
|
requestBody?: never;
|
|
288
329
|
responses: {
|
|
289
|
-
/** @description
|
|
330
|
+
/** @description Presigned URL valid for 15 minutes */
|
|
290
331
|
200: {
|
|
291
332
|
headers: {
|
|
292
333
|
[name: string]: unknown;
|
|
293
334
|
};
|
|
294
335
|
content: {
|
|
295
|
-
"application/json":
|
|
336
|
+
"application/json": {
|
|
337
|
+
/** Format: date-time */
|
|
338
|
+
expiresAt?: string;
|
|
339
|
+
filename?: string;
|
|
340
|
+
sizeBytes?: number | null;
|
|
341
|
+
url?: string;
|
|
342
|
+
};
|
|
296
343
|
};
|
|
297
344
|
};
|
|
298
|
-
401: components["responses"]["Unauthorized"];
|
|
299
345
|
404: components["responses"]["NotFound"];
|
|
346
|
+
/** @description Backup is not in 'complete' status */
|
|
347
|
+
409: {
|
|
348
|
+
headers: {
|
|
349
|
+
[name: string]: unknown;
|
|
350
|
+
};
|
|
351
|
+
content?: never;
|
|
352
|
+
};
|
|
300
353
|
};
|
|
301
354
|
};
|
|
302
355
|
put?: never;
|
|
@@ -359,17 +412,22 @@ 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
433
|
};
|
|
@@ -399,154 +457,187 @@ interface paths {
|
|
|
399
457
|
patch?: never;
|
|
400
458
|
trace?: never;
|
|
401
459
|
};
|
|
402
|
-
"/spaces/{spaceId}/cubes/
|
|
460
|
+
"/spaces/{spaceId}/cubes/imports": {
|
|
403
461
|
parameters: {
|
|
404
462
|
query?: never;
|
|
405
463
|
header?: never;
|
|
406
464
|
path?: never;
|
|
407
465
|
cookie?: never;
|
|
408
466
|
};
|
|
409
|
-
|
|
410
|
-
|
|
467
|
+
get?: never;
|
|
468
|
+
put?: never;
|
|
469
|
+
/** Initiate a .cube archive import (browser-side multipart upload) */
|
|
470
|
+
post: {
|
|
411
471
|
parameters: {
|
|
412
472
|
query?: never;
|
|
413
473
|
header?: never;
|
|
414
474
|
path: {
|
|
415
475
|
spaceId: string;
|
|
416
|
-
cubeId: string;
|
|
417
476
|
};
|
|
418
477
|
cookie?: never;
|
|
419
478
|
};
|
|
420
|
-
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
|
+
};
|
|
421
505
|
responses: {
|
|
422
|
-
/** @description
|
|
423
|
-
|
|
506
|
+
/** @description Import initiated; returns presigned part URLs */
|
|
507
|
+
201: {
|
|
424
508
|
headers: {
|
|
425
509
|
[name: string]: unknown;
|
|
426
510
|
};
|
|
427
511
|
content: {
|
|
428
512
|
"application/json": {
|
|
429
|
-
|
|
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;
|
|
430
523
|
};
|
|
431
524
|
};
|
|
432
525
|
};
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
delete: {
|
|
440
|
-
parameters: {
|
|
441
|
-
query?: never;
|
|
442
|
-
header?: never;
|
|
443
|
-
path: {
|
|
444
|
-
spaceId: string;
|
|
445
|
-
cubeId: string;
|
|
526
|
+
/** @description Invalid input */
|
|
527
|
+
400: {
|
|
528
|
+
headers: {
|
|
529
|
+
[name: string]: unknown;
|
|
530
|
+
};
|
|
531
|
+
content?: never;
|
|
446
532
|
};
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
requestBody?: never;
|
|
450
|
-
responses: {
|
|
451
|
-
/** @description Deletion enqueued */
|
|
452
|
-
200: {
|
|
533
|
+
/** @description Plan limit exceeded */
|
|
534
|
+
403: {
|
|
453
535
|
headers: {
|
|
454
536
|
[name: string]: unknown;
|
|
455
537
|
};
|
|
456
|
-
content
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
538
|
+
content?: never;
|
|
539
|
+
};
|
|
540
|
+
/** @description No active storage backend */
|
|
541
|
+
503: {
|
|
542
|
+
headers: {
|
|
543
|
+
[name: string]: unknown;
|
|
460
544
|
};
|
|
545
|
+
content?: never;
|
|
461
546
|
};
|
|
462
|
-
404: components["responses"]["NotFound"];
|
|
463
|
-
429: components["responses"]["RateLimited"];
|
|
464
547
|
};
|
|
465
548
|
};
|
|
549
|
+
delete?: never;
|
|
466
550
|
options?: never;
|
|
467
551
|
head?: never;
|
|
468
552
|
patch?: never;
|
|
469
553
|
trace?: never;
|
|
470
554
|
};
|
|
471
|
-
"/spaces/{spaceId}/cubes/{
|
|
555
|
+
"/spaces/{spaceId}/cubes/imports/{importId}": {
|
|
472
556
|
parameters: {
|
|
473
557
|
query?: never;
|
|
474
558
|
header?: never;
|
|
475
559
|
path?: never;
|
|
476
560
|
cookie?: never;
|
|
477
561
|
};
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
/** Power off a running Cube */
|
|
481
|
-
post: {
|
|
562
|
+
/** Get the current state of an import */
|
|
563
|
+
get: {
|
|
482
564
|
parameters: {
|
|
483
565
|
query?: never;
|
|
484
566
|
header?: never;
|
|
485
567
|
path: {
|
|
486
568
|
spaceId: string;
|
|
487
|
-
|
|
569
|
+
importId: string;
|
|
488
570
|
};
|
|
489
571
|
cookie?: never;
|
|
490
572
|
};
|
|
491
573
|
requestBody?: never;
|
|
492
574
|
responses: {
|
|
493
|
-
/** @description
|
|
575
|
+
/** @description Current import state */
|
|
494
576
|
200: {
|
|
495
577
|
headers: {
|
|
496
578
|
[name: string]: unknown;
|
|
497
579
|
};
|
|
498
|
-
content
|
|
580
|
+
content: {
|
|
581
|
+
"application/json": {
|
|
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
|
+
};
|
|
593
|
+
};
|
|
594
|
+
};
|
|
499
595
|
};
|
|
500
596
|
404: components["responses"]["NotFound"];
|
|
501
|
-
429: components["responses"]["RateLimited"];
|
|
502
597
|
};
|
|
503
598
|
};
|
|
504
|
-
delete?: never;
|
|
505
|
-
options?: never;
|
|
506
|
-
head?: never;
|
|
507
|
-
patch?: never;
|
|
508
|
-
trace?: never;
|
|
509
|
-
};
|
|
510
|
-
"/spaces/{spaceId}/cubes/{cubeId}/wake": {
|
|
511
|
-
parameters: {
|
|
512
|
-
query?: never;
|
|
513
|
-
header?: never;
|
|
514
|
-
path?: never;
|
|
515
|
-
cookie?: never;
|
|
516
|
-
};
|
|
517
|
-
get?: never;
|
|
518
599
|
put?: never;
|
|
519
|
-
|
|
520
|
-
|
|
600
|
+
post?: never;
|
|
601
|
+
/** Cancel an in-flight upload (only allowed in 'uploading' state) */
|
|
602
|
+
delete: {
|
|
521
603
|
parameters: {
|
|
522
604
|
query?: never;
|
|
523
605
|
header?: never;
|
|
524
606
|
path: {
|
|
525
607
|
spaceId: string;
|
|
526
|
-
|
|
608
|
+
importId: string;
|
|
527
609
|
};
|
|
528
610
|
cookie?: never;
|
|
529
611
|
};
|
|
530
612
|
requestBody?: never;
|
|
531
613
|
responses: {
|
|
532
|
-
/** @description
|
|
614
|
+
/** @description Cancelled */
|
|
533
615
|
200: {
|
|
534
616
|
headers: {
|
|
535
617
|
[name: string]: unknown;
|
|
536
618
|
};
|
|
537
|
-
content
|
|
619
|
+
content: {
|
|
620
|
+
"application/json": {
|
|
621
|
+
success: boolean;
|
|
622
|
+
};
|
|
623
|
+
};
|
|
538
624
|
};
|
|
539
625
|
404: components["responses"]["NotFound"];
|
|
540
|
-
|
|
626
|
+
/** @description Cannot cancel an import past the 'uploading' state */
|
|
627
|
+
409: {
|
|
628
|
+
headers: {
|
|
629
|
+
[name: string]: unknown;
|
|
630
|
+
};
|
|
631
|
+
content?: never;
|
|
632
|
+
};
|
|
541
633
|
};
|
|
542
634
|
};
|
|
543
|
-
delete?: never;
|
|
544
635
|
options?: never;
|
|
545
636
|
head?: never;
|
|
546
637
|
patch?: never;
|
|
547
638
|
trace?: never;
|
|
548
639
|
};
|
|
549
|
-
"/spaces/{spaceId}/cubes/{
|
|
640
|
+
"/spaces/{spaceId}/cubes/imports/{importId}/complete": {
|
|
550
641
|
parameters: {
|
|
551
642
|
query?: never;
|
|
552
643
|
header?: never;
|
|
@@ -555,38 +646,84 @@ interface paths {
|
|
|
555
646
|
};
|
|
556
647
|
get?: never;
|
|
557
648
|
put?: never;
|
|
558
|
-
/**
|
|
559
|
-
* Restart a running Cube
|
|
560
|
-
* @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.
|
|
561
|
-
*/
|
|
649
|
+
/** Finalize a .cube import: complete multipart upload + create cube row + enqueue provisioning */
|
|
562
650
|
post: {
|
|
563
651
|
parameters: {
|
|
564
652
|
query?: never;
|
|
565
653
|
header?: never;
|
|
566
654
|
path: {
|
|
567
655
|
spaceId: string;
|
|
568
|
-
|
|
656
|
+
importId: string;
|
|
569
657
|
};
|
|
570
658
|
cookie?: never;
|
|
571
659
|
};
|
|
572
|
-
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
|
+
};
|
|
573
677
|
responses: {
|
|
574
|
-
/** @description
|
|
678
|
+
/** @description Provisioning enqueued */
|
|
575
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: {
|
|
576
694
|
headers: {
|
|
577
695
|
[name: string]: unknown;
|
|
578
696
|
};
|
|
579
697
|
content?: never;
|
|
580
698
|
};
|
|
581
|
-
|
|
582
|
-
|
|
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 */
|
|
583
707
|
409: {
|
|
584
708
|
headers: {
|
|
585
709
|
[name: string]: unknown;
|
|
586
710
|
};
|
|
587
711
|
content?: never;
|
|
588
712
|
};
|
|
589
|
-
|
|
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: {
|
|
722
|
+
headers: {
|
|
723
|
+
[name: string]: unknown;
|
|
724
|
+
};
|
|
725
|
+
content?: never;
|
|
726
|
+
};
|
|
590
727
|
};
|
|
591
728
|
};
|
|
592
729
|
delete?: never;
|
|
@@ -595,19 +732,15 @@ interface paths {
|
|
|
595
732
|
patch?: never;
|
|
596
733
|
trace?: never;
|
|
597
734
|
};
|
|
598
|
-
"/spaces/{spaceId}/cubes/{cubeId}
|
|
735
|
+
"/spaces/{spaceId}/cubes/{cubeId}": {
|
|
599
736
|
parameters: {
|
|
600
737
|
query?: never;
|
|
601
738
|
header?: never;
|
|
602
739
|
path?: never;
|
|
603
740
|
cookie?: never;
|
|
604
741
|
};
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
* Change a Cube's SSH port
|
|
608
|
-
* @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).
|
|
609
|
-
*/
|
|
610
|
-
put: {
|
|
742
|
+
/** Get a Cube */
|
|
743
|
+
get: {
|
|
611
744
|
parameters: {
|
|
612
745
|
query?: never;
|
|
613
746
|
header?: never;
|
|
@@ -617,46 +750,80 @@ interface paths {
|
|
|
617
750
|
};
|
|
618
751
|
cookie?: never;
|
|
619
752
|
};
|
|
620
|
-
requestBody
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
753
|
+
requestBody?: never;
|
|
754
|
+
responses: {
|
|
755
|
+
/** @description Cube */
|
|
756
|
+
200: {
|
|
757
|
+
headers: {
|
|
758
|
+
[name: string]: unknown;
|
|
759
|
+
};
|
|
760
|
+
content: {
|
|
761
|
+
"application/json": {
|
|
762
|
+
cube: components["schemas"]["Cube"];
|
|
763
|
+
};
|
|
625
764
|
};
|
|
626
765
|
};
|
|
766
|
+
404: components["responses"]["NotFound"];
|
|
627
767
|
};
|
|
768
|
+
};
|
|
769
|
+
put?: never;
|
|
770
|
+
post?: never;
|
|
771
|
+
/** Delete a Cube (asynchronous) */
|
|
772
|
+
delete: {
|
|
773
|
+
parameters: {
|
|
774
|
+
query?: never;
|
|
775
|
+
header?: never;
|
|
776
|
+
path: {
|
|
777
|
+
spaceId: string;
|
|
778
|
+
cubeId: string;
|
|
779
|
+
};
|
|
780
|
+
cookie?: never;
|
|
781
|
+
};
|
|
782
|
+
requestBody?: never;
|
|
628
783
|
responses: {
|
|
629
|
-
/** @description
|
|
784
|
+
/** @description Deletion enqueued */
|
|
630
785
|
200: {
|
|
631
786
|
headers: {
|
|
632
787
|
[name: string]: unknown;
|
|
633
788
|
};
|
|
634
|
-
content
|
|
789
|
+
content: {
|
|
790
|
+
"application/json": {
|
|
791
|
+
success: boolean;
|
|
792
|
+
};
|
|
793
|
+
};
|
|
635
794
|
};
|
|
636
|
-
400: components["responses"]["BadRequest"];
|
|
637
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
|
+
};
|
|
638
817
|
429: components["responses"]["RateLimited"];
|
|
639
818
|
};
|
|
640
819
|
};
|
|
641
|
-
post?: never;
|
|
642
|
-
delete?: never;
|
|
643
820
|
options?: never;
|
|
644
821
|
head?: never;
|
|
645
|
-
patch?: never;
|
|
646
|
-
trace?: never;
|
|
647
|
-
};
|
|
648
|
-
"/spaces/{spaceId}/cubes/{cubeId}/ssh": {
|
|
649
|
-
parameters: {
|
|
650
|
-
query?: never;
|
|
651
|
-
header?: never;
|
|
652
|
-
path?: never;
|
|
653
|
-
cookie?: never;
|
|
654
|
-
};
|
|
655
822
|
/**
|
|
656
|
-
*
|
|
657
|
-
* @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.
|
|
658
825
|
*/
|
|
659
|
-
|
|
826
|
+
patch: {
|
|
660
827
|
parameters: {
|
|
661
828
|
query?: never;
|
|
662
829
|
header?: never;
|
|
@@ -666,26 +833,31 @@ interface paths {
|
|
|
666
833
|
};
|
|
667
834
|
cookie?: never;
|
|
668
835
|
};
|
|
669
|
-
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
|
+
};
|
|
670
844
|
responses: {
|
|
671
|
-
/** @description
|
|
845
|
+
/** @description The updated Cube */
|
|
672
846
|
200: {
|
|
673
847
|
headers: {
|
|
674
848
|
[name: string]: unknown;
|
|
675
849
|
};
|
|
676
850
|
content: {
|
|
677
|
-
"application/json":
|
|
851
|
+
"application/json": {
|
|
852
|
+
cube: components["schemas"]["Cube"];
|
|
853
|
+
};
|
|
678
854
|
};
|
|
679
855
|
};
|
|
856
|
+
400: components["responses"]["BadRequest"];
|
|
680
857
|
404: components["responses"]["NotFound"];
|
|
858
|
+
429: components["responses"]["RateLimited"];
|
|
681
859
|
};
|
|
682
860
|
};
|
|
683
|
-
put?: never;
|
|
684
|
-
post?: never;
|
|
685
|
-
delete?: never;
|
|
686
|
-
options?: never;
|
|
687
|
-
head?: never;
|
|
688
|
-
patch?: never;
|
|
689
861
|
trace?: never;
|
|
690
862
|
};
|
|
691
863
|
"/spaces/{spaceId}/cubes/{cubeId}/domains": {
|
|
@@ -742,63 +914,63 @@ interface paths {
|
|
|
742
914
|
requestBody: {
|
|
743
915
|
content: {
|
|
744
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;
|
|
745
936
|
/** @description The hostname to attach, e.g. app.example.com */
|
|
746
937
|
domain: string;
|
|
747
|
-
/** @description
|
|
748
|
-
|
|
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;
|
|
749
944
|
/**
|
|
750
|
-
* @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.
|
|
751
946
|
* @enum {string}
|
|
752
947
|
*/
|
|
753
|
-
|
|
754
|
-
/** @description
|
|
755
|
-
|
|
948
|
+
originScheme?: "http" | "https";
|
|
949
|
+
/** @description Cube port the domain proxies to. */
|
|
950
|
+
port: number;
|
|
756
951
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
757
|
-
|
|
952
|
+
requestHeaderOverrides?: {
|
|
953
|
+
remove?: string[];
|
|
758
954
|
set?: {
|
|
759
955
|
[key: string]: string;
|
|
760
956
|
};
|
|
761
|
-
remove?: string[];
|
|
762
957
|
} | null;
|
|
958
|
+
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
959
|
+
responseCompression?: boolean;
|
|
763
960
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
764
|
-
|
|
961
|
+
responseHeaderOverrides?: {
|
|
962
|
+
remove?: string[];
|
|
765
963
|
set?: {
|
|
766
964
|
[key: string]: string;
|
|
767
965
|
};
|
|
768
|
-
remove?: string[];
|
|
769
|
-
} | null;
|
|
770
|
-
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
771
|
-
maxRequestBodyMb?: number | null;
|
|
772
|
-
/** @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. */
|
|
773
|
-
corsConfig?: {
|
|
774
|
-
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
775
|
-
allowedOrigins: string[];
|
|
776
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
777
|
-
allowedMethods?: string[];
|
|
778
|
-
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
779
|
-
allowedHeaders?: string[];
|
|
780
|
-
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
781
|
-
exposedHeaders?: string[];
|
|
782
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
783
|
-
allowCredentials?: boolean;
|
|
784
|
-
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
785
|
-
maxAgeSeconds?: number;
|
|
786
966
|
} | null;
|
|
967
|
+
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
968
|
+
responseHeaderTimeoutSecs?: number;
|
|
787
969
|
/**
|
|
788
|
-
* @description
|
|
970
|
+
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
789
971
|
* @enum {string}
|
|
790
972
|
*/
|
|
791
|
-
|
|
792
|
-
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
793
|
-
responseCompression?: boolean;
|
|
794
|
-
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
795
|
-
ipAllowList?: string[] | null;
|
|
796
|
-
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
797
|
-
ipDenyList?: string[] | null;
|
|
798
|
-
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
799
|
-
basicAuthUser?: string | null;
|
|
800
|
-
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
801
|
-
basicAuthPassword?: string;
|
|
973
|
+
securityHeadersMode?: "enforced" | "app_managed";
|
|
802
974
|
};
|
|
803
975
|
};
|
|
804
976
|
};
|
|
@@ -825,66 +997,6 @@ interface paths {
|
|
|
825
997
|
patch?: never;
|
|
826
998
|
trace?: never;
|
|
827
999
|
};
|
|
828
|
-
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}/records": {
|
|
829
|
-
parameters: {
|
|
830
|
-
query?: never;
|
|
831
|
-
header?: never;
|
|
832
|
-
path?: never;
|
|
833
|
-
cookie?: never;
|
|
834
|
-
};
|
|
835
|
-
/**
|
|
836
|
-
* DNS records this domain needs, with their live status
|
|
837
|
-
* @description Every record required for the domain to work, each checked against live DNS. Poll this after publishing them.
|
|
838
|
-
*
|
|
839
|
-
* `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`.
|
|
840
|
-
*
|
|
841
|
-
* A wildcard needs three records; an exact host needs one. Each call performs live DNS lookups and is rate limited.
|
|
842
|
-
*/
|
|
843
|
-
get: {
|
|
844
|
-
parameters: {
|
|
845
|
-
query?: never;
|
|
846
|
-
header?: never;
|
|
847
|
-
path: {
|
|
848
|
-
spaceId: string;
|
|
849
|
-
cubeId: string;
|
|
850
|
-
mappingId: string;
|
|
851
|
-
};
|
|
852
|
-
cookie?: never;
|
|
853
|
-
};
|
|
854
|
-
requestBody?: never;
|
|
855
|
-
responses: {
|
|
856
|
-
/** @description Required records with live status */
|
|
857
|
-
200: {
|
|
858
|
-
headers: {
|
|
859
|
-
[name: string]: unknown;
|
|
860
|
-
};
|
|
861
|
-
content: {
|
|
862
|
-
"application/json": {
|
|
863
|
-
domain: string;
|
|
864
|
-
isWildcard: boolean;
|
|
865
|
-
records: components["schemas"]["DnsRecordStatus"][];
|
|
866
|
-
summary: {
|
|
867
|
-
found: number;
|
|
868
|
-
total: number;
|
|
869
|
-
complete: boolean;
|
|
870
|
-
};
|
|
871
|
-
/** Format: date-time */
|
|
872
|
-
checkedAt: string;
|
|
873
|
-
};
|
|
874
|
-
};
|
|
875
|
-
};
|
|
876
|
-
404: components["responses"]["NotFound"];
|
|
877
|
-
429: components["responses"]["RateLimited"];
|
|
878
|
-
};
|
|
879
|
-
};
|
|
880
|
-
put?: never;
|
|
881
|
-
post?: never;
|
|
882
|
-
delete?: never;
|
|
883
|
-
options?: never;
|
|
884
|
-
head?: never;
|
|
885
|
-
patch?: never;
|
|
886
|
-
trace?: never;
|
|
887
|
-
};
|
|
888
1000
|
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}": {
|
|
889
1001
|
parameters: {
|
|
890
1002
|
query?: never;
|
|
@@ -943,59 +1055,59 @@ interface paths {
|
|
|
943
1055
|
requestBody: {
|
|
944
1056
|
content: {
|
|
945
1057
|
"application/json": {
|
|
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. */
|
|
1063
|
+
corsConfig?: {
|
|
1064
|
+
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1065
|
+
allowCredentials?: boolean;
|
|
1066
|
+
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
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[];
|
|
1072
|
+
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
1073
|
+
exposedHeaders?: string[];
|
|
1074
|
+
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
1075
|
+
maxAgeSeconds?: number;
|
|
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;
|
|
946
1083
|
/**
|
|
947
|
-
* @description
|
|
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.
|
|
948
1085
|
* @enum {string}
|
|
949
1086
|
*/
|
|
950
|
-
|
|
951
|
-
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
952
|
-
responseHeaderTimeoutSecs?: number;
|
|
1087
|
+
originScheme?: "http" | "https";
|
|
953
1088
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
954
|
-
|
|
1089
|
+
requestHeaderOverrides?: {
|
|
1090
|
+
remove?: string[];
|
|
955
1091
|
set?: {
|
|
956
1092
|
[key: string]: string;
|
|
957
1093
|
};
|
|
958
|
-
remove?: string[];
|
|
959
1094
|
} | null;
|
|
1095
|
+
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
1096
|
+
responseCompression?: boolean;
|
|
960
1097
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
961
|
-
|
|
1098
|
+
responseHeaderOverrides?: {
|
|
1099
|
+
remove?: string[];
|
|
962
1100
|
set?: {
|
|
963
1101
|
[key: string]: string;
|
|
964
1102
|
};
|
|
965
|
-
remove?: string[];
|
|
966
|
-
} | null;
|
|
967
|
-
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
968
|
-
maxRequestBodyMb?: number | null;
|
|
969
|
-
/** @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. */
|
|
970
|
-
corsConfig?: {
|
|
971
|
-
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
972
|
-
allowedOrigins: string[];
|
|
973
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
974
|
-
allowedMethods?: string[];
|
|
975
|
-
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
976
|
-
allowedHeaders?: string[];
|
|
977
|
-
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
978
|
-
exposedHeaders?: string[];
|
|
979
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
980
|
-
allowCredentials?: boolean;
|
|
981
|
-
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
982
|
-
maxAgeSeconds?: number;
|
|
983
1103
|
} | null;
|
|
1104
|
+
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
1105
|
+
responseHeaderTimeoutSecs?: number;
|
|
984
1106
|
/**
|
|
985
|
-
* @description
|
|
1107
|
+
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
986
1108
|
* @enum {string}
|
|
987
1109
|
*/
|
|
988
|
-
|
|
989
|
-
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
990
|
-
responseCompression?: boolean;
|
|
991
|
-
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
992
|
-
ipAllowList?: string[] | null;
|
|
993
|
-
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
994
|
-
ipDenyList?: string[] | null;
|
|
995
|
-
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
996
|
-
basicAuthUser?: string | null;
|
|
997
|
-
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
998
|
-
basicAuthPassword?: string;
|
|
1110
|
+
securityHeadersMode?: "enforced" | "app_managed";
|
|
999
1111
|
};
|
|
1000
1112
|
};
|
|
1001
1113
|
};
|
|
@@ -1011,22 +1123,84 @@ interface paths {
|
|
|
1011
1123
|
};
|
|
1012
1124
|
};
|
|
1013
1125
|
};
|
|
1014
|
-
400: components["responses"]["BadRequest"];
|
|
1126
|
+
400: components["responses"]["BadRequest"];
|
|
1127
|
+
404: components["responses"]["NotFound"];
|
|
1128
|
+
429: components["responses"]["RateLimited"];
|
|
1129
|
+
};
|
|
1130
|
+
};
|
|
1131
|
+
trace?: never;
|
|
1132
|
+
};
|
|
1133
|
+
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}/records": {
|
|
1134
|
+
parameters: {
|
|
1135
|
+
query?: never;
|
|
1136
|
+
header?: never;
|
|
1137
|
+
path?: never;
|
|
1138
|
+
cookie?: never;
|
|
1139
|
+
};
|
|
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
|
+
*/
|
|
1148
|
+
get: {
|
|
1149
|
+
parameters: {
|
|
1150
|
+
query?: never;
|
|
1151
|
+
header?: never;
|
|
1152
|
+
path: {
|
|
1153
|
+
spaceId: string;
|
|
1154
|
+
cubeId: string;
|
|
1155
|
+
mappingId: string;
|
|
1156
|
+
};
|
|
1157
|
+
cookie?: never;
|
|
1158
|
+
};
|
|
1159
|
+
requestBody?: never;
|
|
1160
|
+
responses: {
|
|
1161
|
+
/** @description Required records with live status */
|
|
1162
|
+
200: {
|
|
1163
|
+
headers: {
|
|
1164
|
+
[name: string]: unknown;
|
|
1165
|
+
};
|
|
1166
|
+
content: {
|
|
1167
|
+
"application/json": {
|
|
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
|
+
};
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1015
1181
|
404: components["responses"]["NotFound"];
|
|
1016
1182
|
429: components["responses"]["RateLimited"];
|
|
1017
1183
|
};
|
|
1018
1184
|
};
|
|
1185
|
+
put?: never;
|
|
1186
|
+
post?: never;
|
|
1187
|
+
delete?: never;
|
|
1188
|
+
options?: never;
|
|
1189
|
+
head?: never;
|
|
1190
|
+
patch?: never;
|
|
1019
1191
|
trace?: never;
|
|
1020
1192
|
};
|
|
1021
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1193
|
+
"/spaces/{spaceId}/cubes/{cubeId}/power-off": {
|
|
1022
1194
|
parameters: {
|
|
1023
1195
|
query?: never;
|
|
1024
1196
|
header?: never;
|
|
1025
1197
|
path?: never;
|
|
1026
1198
|
cookie?: never;
|
|
1027
1199
|
};
|
|
1028
|
-
|
|
1029
|
-
|
|
1200
|
+
get?: never;
|
|
1201
|
+
put?: never;
|
|
1202
|
+
/** Power off a running Cube */
|
|
1203
|
+
post: {
|
|
1030
1204
|
parameters: {
|
|
1031
1205
|
query?: never;
|
|
1032
1206
|
header?: never;
|
|
@@ -1038,68 +1212,63 @@ interface paths {
|
|
|
1038
1212
|
};
|
|
1039
1213
|
requestBody?: never;
|
|
1040
1214
|
responses: {
|
|
1041
|
-
/** @description
|
|
1215
|
+
/** @description Power off enqueued */
|
|
1042
1216
|
200: {
|
|
1043
1217
|
headers: {
|
|
1044
1218
|
[name: string]: unknown;
|
|
1045
1219
|
};
|
|
1046
|
-
content
|
|
1047
|
-
"application/json": {
|
|
1048
|
-
tcpMappings: components["schemas"]["TcpMapping"][];
|
|
1049
|
-
};
|
|
1050
|
-
};
|
|
1220
|
+
content?: never;
|
|
1051
1221
|
};
|
|
1222
|
+
404: components["responses"]["NotFound"];
|
|
1223
|
+
429: components["responses"]["RateLimited"];
|
|
1052
1224
|
};
|
|
1053
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;
|
|
1054
1240
|
put?: never;
|
|
1055
|
-
/**
|
|
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
|
+
*/
|
|
1056
1245
|
post: {
|
|
1057
1246
|
parameters: {
|
|
1058
1247
|
query?: never;
|
|
1059
|
-
header?:
|
|
1060
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1061
|
-
"Idempotency-Key"?: string;
|
|
1062
|
-
};
|
|
1248
|
+
header?: never;
|
|
1063
1249
|
path: {
|
|
1064
1250
|
spaceId: string;
|
|
1065
1251
|
cubeId: string;
|
|
1066
1252
|
};
|
|
1067
1253
|
cookie?: never;
|
|
1068
1254
|
};
|
|
1069
|
-
requestBody
|
|
1070
|
-
content: {
|
|
1071
|
-
"application/json": {
|
|
1072
|
-
cubePort: number;
|
|
1073
|
-
/** @description Optional human label for the mapping. */
|
|
1074
|
-
label?: string;
|
|
1075
|
-
/**
|
|
1076
|
-
* @description Whether the mapping also forwards UDP traffic on the same host port, in addition to TCP. Optional; defaults to true when omitted.
|
|
1077
|
-
* @default true
|
|
1078
|
-
*/
|
|
1079
|
-
udpEnabled?: boolean;
|
|
1080
|
-
/** @description IPs/CIDRs allowed to reach the published port. Omit or send an empty array to leave the port open to the internet. */
|
|
1081
|
-
whitelistedIps?: string[];
|
|
1082
|
-
/**
|
|
1083
|
-
* @deprecated
|
|
1084
|
-
* @description DEPRECATED alias for `whitelistedIps`, accepted for backwards compatibility. `whitelistedIps` wins if both are sent. Use `whitelistedIps` in new code.
|
|
1085
|
-
*/
|
|
1086
|
-
whitelistIps?: string[];
|
|
1087
|
-
};
|
|
1088
|
-
};
|
|
1089
|
-
};
|
|
1255
|
+
requestBody?: never;
|
|
1090
1256
|
responses: {
|
|
1091
|
-
/** @description
|
|
1092
|
-
|
|
1257
|
+
/** @description Restart enqueued */
|
|
1258
|
+
200: {
|
|
1093
1259
|
headers: {
|
|
1094
1260
|
[name: string]: unknown;
|
|
1095
1261
|
};
|
|
1096
|
-
content
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
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;
|
|
1100
1269
|
};
|
|
1270
|
+
content?: never;
|
|
1101
1271
|
};
|
|
1102
|
-
400: components["responses"]["BadRequest"];
|
|
1103
1272
|
429: components["responses"]["RateLimited"];
|
|
1104
1273
|
};
|
|
1105
1274
|
};
|
|
@@ -1109,7 +1278,7 @@ interface paths {
|
|
|
1109
1278
|
patch?: never;
|
|
1110
1279
|
trace?: never;
|
|
1111
1280
|
};
|
|
1112
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1281
|
+
"/spaces/{spaceId}/cubes/{cubeId}/restore": {
|
|
1113
1282
|
parameters: {
|
|
1114
1283
|
query?: never;
|
|
1115
1284
|
header?: never;
|
|
@@ -1118,22 +1287,26 @@ interface paths {
|
|
|
1118
1287
|
};
|
|
1119
1288
|
get?: never;
|
|
1120
1289
|
put?: never;
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
delete: {
|
|
1290
|
+
/** Restore a Cube from a snapshot */
|
|
1291
|
+
post: {
|
|
1124
1292
|
parameters: {
|
|
1125
1293
|
query?: never;
|
|
1126
1294
|
header?: never;
|
|
1127
1295
|
path: {
|
|
1128
1296
|
spaceId: string;
|
|
1129
1297
|
cubeId: string;
|
|
1130
|
-
mappingId: string;
|
|
1131
1298
|
};
|
|
1132
1299
|
cookie?: never;
|
|
1133
1300
|
};
|
|
1134
|
-
requestBody
|
|
1301
|
+
requestBody: {
|
|
1302
|
+
content: {
|
|
1303
|
+
"application/json": {
|
|
1304
|
+
snapshotId: string;
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1135
1308
|
responses: {
|
|
1136
|
-
/** @description
|
|
1309
|
+
/** @description Restore enqueued */
|
|
1137
1310
|
200: {
|
|
1138
1311
|
headers: {
|
|
1139
1312
|
[name: string]: unknown;
|
|
@@ -1147,6 +1320,7 @@ interface paths {
|
|
|
1147
1320
|
404: components["responses"]["NotFound"];
|
|
1148
1321
|
};
|
|
1149
1322
|
};
|
|
1323
|
+
delete?: never;
|
|
1150
1324
|
options?: never;
|
|
1151
1325
|
head?: never;
|
|
1152
1326
|
patch?: never;
|
|
@@ -1271,97 +1445,39 @@ interface paths {
|
|
|
1271
1445
|
patch?: never;
|
|
1272
1446
|
trace?: never;
|
|
1273
1447
|
};
|
|
1274
|
-
"/spaces/{spaceId}/cubes/{cubeId}/
|
|
1275
|
-
parameters: {
|
|
1276
|
-
query?: never;
|
|
1277
|
-
header?: never;
|
|
1278
|
-
path?: never;
|
|
1279
|
-
cookie?: never;
|
|
1280
|
-
};
|
|
1281
|
-
get?: never;
|
|
1282
|
-
put?: never;
|
|
1283
|
-
/** Restore a Cube from a snapshot */
|
|
1284
|
-
post: {
|
|
1285
|
-
parameters: {
|
|
1286
|
-
query?: never;
|
|
1287
|
-
header?: never;
|
|
1288
|
-
path: {
|
|
1289
|
-
spaceId: string;
|
|
1290
|
-
cubeId: string;
|
|
1291
|
-
};
|
|
1292
|
-
cookie?: never;
|
|
1293
|
-
};
|
|
1294
|
-
requestBody: {
|
|
1295
|
-
content: {
|
|
1296
|
-
"application/json": {
|
|
1297
|
-
snapshotId: string;
|
|
1298
|
-
};
|
|
1299
|
-
};
|
|
1300
|
-
};
|
|
1301
|
-
responses: {
|
|
1302
|
-
/** @description Restore enqueued */
|
|
1303
|
-
200: {
|
|
1304
|
-
headers: {
|
|
1305
|
-
[name: string]: unknown;
|
|
1306
|
-
};
|
|
1307
|
-
content: {
|
|
1308
|
-
"application/json": {
|
|
1309
|
-
success: boolean;
|
|
1310
|
-
};
|
|
1311
|
-
};
|
|
1312
|
-
};
|
|
1313
|
-
404: components["responses"]["NotFound"];
|
|
1314
|
-
};
|
|
1315
|
-
};
|
|
1316
|
-
delete?: never;
|
|
1317
|
-
options?: never;
|
|
1318
|
-
head?: never;
|
|
1319
|
-
patch?: never;
|
|
1320
|
-
trace?: never;
|
|
1321
|
-
};
|
|
1322
|
-
"/spaces/{spaceId}/backups/{backupId}/download": {
|
|
1448
|
+
"/spaces/{spaceId}/cubes/{cubeId}/ssh": {
|
|
1323
1449
|
parameters: {
|
|
1324
1450
|
query?: never;
|
|
1325
1451
|
header?: never;
|
|
1326
1452
|
path?: never;
|
|
1327
1453
|
cookie?: never;
|
|
1328
1454
|
};
|
|
1329
|
-
/**
|
|
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
|
+
*/
|
|
1330
1459
|
get: {
|
|
1331
1460
|
parameters: {
|
|
1332
1461
|
query?: never;
|
|
1333
1462
|
header?: never;
|
|
1334
1463
|
path: {
|
|
1335
1464
|
spaceId: string;
|
|
1336
|
-
|
|
1465
|
+
cubeId: string;
|
|
1337
1466
|
};
|
|
1338
1467
|
cookie?: never;
|
|
1339
1468
|
};
|
|
1340
1469
|
requestBody?: never;
|
|
1341
1470
|
responses: {
|
|
1342
|
-
/** @description
|
|
1471
|
+
/** @description SSH connection info */
|
|
1343
1472
|
200: {
|
|
1344
1473
|
headers: {
|
|
1345
1474
|
[name: string]: unknown;
|
|
1346
1475
|
};
|
|
1347
1476
|
content: {
|
|
1348
|
-
"application/json":
|
|
1349
|
-
url?: string;
|
|
1350
|
-
filename?: string;
|
|
1351
|
-
sizeBytes?: number | null;
|
|
1352
|
-
/** Format: date-time */
|
|
1353
|
-
expiresAt?: string;
|
|
1354
|
-
};
|
|
1477
|
+
"application/json": components["schemas"]["CubeSshInfo"];
|
|
1355
1478
|
};
|
|
1356
1479
|
};
|
|
1357
1480
|
404: components["responses"]["NotFound"];
|
|
1358
|
-
/** @description Backup is not in 'complete' status */
|
|
1359
|
-
409: {
|
|
1360
|
-
headers: {
|
|
1361
|
-
[name: string]: unknown;
|
|
1362
|
-
};
|
|
1363
|
-
content?: never;
|
|
1364
|
-
};
|
|
1365
1481
|
};
|
|
1366
1482
|
};
|
|
1367
1483
|
put?: never;
|
|
@@ -1372,7 +1488,7 @@ interface paths {
|
|
|
1372
1488
|
patch?: never;
|
|
1373
1489
|
trace?: never;
|
|
1374
1490
|
};
|
|
1375
|
-
"/spaces/{spaceId}/cubes/
|
|
1491
|
+
"/spaces/{spaceId}/cubes/{cubeId}/ssh-port": {
|
|
1376
1492
|
parameters: {
|
|
1377
1493
|
query?: never;
|
|
1378
1494
|
header?: never;
|
|
@@ -1380,179 +1496,140 @@ interface paths {
|
|
|
1380
1496
|
cookie?: never;
|
|
1381
1497
|
};
|
|
1382
1498
|
get?: never;
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
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: {
|
|
1386
1504
|
parameters: {
|
|
1387
|
-
query?: never;
|
|
1388
|
-
header?: never;
|
|
1389
|
-
path: {
|
|
1390
|
-
spaceId: string;
|
|
1391
|
-
|
|
1392
|
-
cookie?: never;
|
|
1393
|
-
};
|
|
1394
|
-
requestBody: {
|
|
1395
|
-
content: {
|
|
1396
|
-
"application/json": {
|
|
1397
|
-
name: string;
|
|
1398
|
-
fileSizeBytes: number;
|
|
1399
|
-
/**
|
|
1400
|
-
* @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.
|
|
1401
|
-
* @default replace
|
|
1402
|
-
* @enum {string}
|
|
1403
|
-
*/
|
|
1404
|
-
sshKeyMode?: "replace" | "keep";
|
|
1405
|
-
/** @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`. */
|
|
1406
|
-
sshPublicKey?: string | null;
|
|
1407
|
-
region?: string | null;
|
|
1408
|
-
vcpusOverride?: number | null;
|
|
1409
|
-
ramMbOverride?: number | null;
|
|
1410
|
-
diskGbOverride?: number | null;
|
|
1411
|
-
userData?: string | null;
|
|
1412
|
-
expectedConfig?: {
|
|
1413
|
-
vcpus?: number;
|
|
1414
|
-
ramMb?: number;
|
|
1415
|
-
diskLimitGb?: number;
|
|
1416
|
-
} | null;
|
|
1417
|
-
};
|
|
1418
|
-
};
|
|
1419
|
-
};
|
|
1420
|
-
responses: {
|
|
1421
|
-
/** @description Import initiated; returns presigned part URLs */
|
|
1422
|
-
201: {
|
|
1423
|
-
headers: {
|
|
1424
|
-
[name: string]: unknown;
|
|
1425
|
-
};
|
|
1426
|
-
content: {
|
|
1427
|
-
"application/json": {
|
|
1428
|
-
importId?: string;
|
|
1429
|
-
uploadId?: string;
|
|
1430
|
-
key?: string;
|
|
1431
|
-
chunkSizeBytes?: number;
|
|
1432
|
-
parts?: {
|
|
1433
|
-
partNumber?: number;
|
|
1434
|
-
url?: string;
|
|
1435
|
-
}[];
|
|
1436
|
-
/** Format: date-time */
|
|
1437
|
-
expiresAt?: string;
|
|
1438
|
-
};
|
|
1439
|
-
};
|
|
1440
|
-
};
|
|
1441
|
-
/** @description Invalid input */
|
|
1442
|
-
400: {
|
|
1443
|
-
headers: {
|
|
1444
|
-
[name: string]: unknown;
|
|
1445
|
-
};
|
|
1446
|
-
content?: never;
|
|
1505
|
+
query?: never;
|
|
1506
|
+
header?: never;
|
|
1507
|
+
path: {
|
|
1508
|
+
spaceId: string;
|
|
1509
|
+
cubeId: string;
|
|
1447
1510
|
};
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1511
|
+
cookie?: never;
|
|
1512
|
+
};
|
|
1513
|
+
requestBody: {
|
|
1514
|
+
content: {
|
|
1515
|
+
"application/json": {
|
|
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
|
-
content?: never;
|
|
1454
1519
|
};
|
|
1455
|
-
|
|
1456
|
-
|
|
1520
|
+
};
|
|
1521
|
+
responses: {
|
|
1522
|
+
/** @description SSH port updated */
|
|
1523
|
+
200: {
|
|
1457
1524
|
headers: {
|
|
1458
1525
|
[name: string]: unknown;
|
|
1459
1526
|
};
|
|
1460
1527
|
content?: never;
|
|
1461
1528
|
};
|
|
1529
|
+
400: components["responses"]["BadRequest"];
|
|
1530
|
+
404: components["responses"]["NotFound"];
|
|
1531
|
+
429: components["responses"]["RateLimited"];
|
|
1462
1532
|
};
|
|
1463
1533
|
};
|
|
1534
|
+
post?: never;
|
|
1464
1535
|
delete?: never;
|
|
1465
1536
|
options?: never;
|
|
1466
1537
|
head?: never;
|
|
1467
1538
|
patch?: never;
|
|
1468
1539
|
trace?: never;
|
|
1469
1540
|
};
|
|
1470
|
-
"/spaces/{spaceId}/cubes/
|
|
1541
|
+
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings": {
|
|
1471
1542
|
parameters: {
|
|
1472
1543
|
query?: never;
|
|
1473
1544
|
header?: never;
|
|
1474
1545
|
path?: never;
|
|
1475
1546
|
cookie?: never;
|
|
1476
1547
|
};
|
|
1477
|
-
/**
|
|
1548
|
+
/** List TCP port forwards for a Cube */
|
|
1478
1549
|
get: {
|
|
1479
1550
|
parameters: {
|
|
1480
1551
|
query?: never;
|
|
1481
1552
|
header?: never;
|
|
1482
1553
|
path: {
|
|
1483
1554
|
spaceId: string;
|
|
1484
|
-
|
|
1555
|
+
cubeId: string;
|
|
1485
1556
|
};
|
|
1486
1557
|
cookie?: never;
|
|
1487
1558
|
};
|
|
1488
1559
|
requestBody?: never;
|
|
1489
1560
|
responses: {
|
|
1490
|
-
/** @description
|
|
1561
|
+
/** @description TCP mapping list */
|
|
1491
1562
|
200: {
|
|
1492
1563
|
headers: {
|
|
1493
1564
|
[name: string]: unknown;
|
|
1494
1565
|
};
|
|
1495
1566
|
content: {
|
|
1496
1567
|
"application/json": {
|
|
1497
|
-
|
|
1498
|
-
id?: string;
|
|
1499
|
-
name?: string;
|
|
1500
|
-
/** @enum {string} */
|
|
1501
|
-
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
1502
|
-
cubeId?: string | null;
|
|
1503
|
-
error?: string | null;
|
|
1504
|
-
createdAt?: string;
|
|
1505
|
-
updatedAt?: string;
|
|
1506
|
-
completedAt?: string | null;
|
|
1507
|
-
};
|
|
1568
|
+
tcpMappings: components["schemas"]["TcpMapping"][];
|
|
1508
1569
|
};
|
|
1509
1570
|
};
|
|
1510
1571
|
};
|
|
1511
|
-
404: components["responses"]["NotFound"];
|
|
1512
1572
|
};
|
|
1513
1573
|
};
|
|
1514
1574
|
put?: never;
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
delete: {
|
|
1575
|
+
/** Create a TCP port forward */
|
|
1576
|
+
post: {
|
|
1518
1577
|
parameters: {
|
|
1519
1578
|
query?: never;
|
|
1520
|
-
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
|
+
};
|
|
1521
1583
|
path: {
|
|
1522
1584
|
spaceId: string;
|
|
1523
|
-
|
|
1585
|
+
cubeId: string;
|
|
1524
1586
|
};
|
|
1525
1587
|
cookie?: never;
|
|
1526
1588
|
};
|
|
1527
|
-
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
|
+
};
|
|
1528
1610
|
responses: {
|
|
1529
|
-
/** @description
|
|
1530
|
-
|
|
1611
|
+
/** @description Mapping created */
|
|
1612
|
+
201: {
|
|
1531
1613
|
headers: {
|
|
1532
1614
|
[name: string]: unknown;
|
|
1533
1615
|
};
|
|
1534
1616
|
content: {
|
|
1535
1617
|
"application/json": {
|
|
1536
|
-
|
|
1618
|
+
tcpMapping: components["schemas"]["TcpMapping"];
|
|
1537
1619
|
};
|
|
1538
1620
|
};
|
|
1539
1621
|
};
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
409: {
|
|
1543
|
-
headers: {
|
|
1544
|
-
[name: string]: unknown;
|
|
1545
|
-
};
|
|
1546
|
-
content?: never;
|
|
1547
|
-
};
|
|
1622
|
+
400: components["responses"]["BadRequest"];
|
|
1623
|
+
429: components["responses"]["RateLimited"];
|
|
1548
1624
|
};
|
|
1549
1625
|
};
|
|
1626
|
+
delete?: never;
|
|
1550
1627
|
options?: never;
|
|
1551
1628
|
head?: never;
|
|
1552
1629
|
patch?: never;
|
|
1553
1630
|
trace?: never;
|
|
1554
1631
|
};
|
|
1555
|
-
"/spaces/{spaceId}/cubes/
|
|
1632
|
+
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings/{mappingId}": {
|
|
1556
1633
|
parameters: {
|
|
1557
1634
|
query?: never;
|
|
1558
1635
|
header?: never;
|
|
@@ -1561,84 +1638,71 @@ interface paths {
|
|
|
1561
1638
|
};
|
|
1562
1639
|
get?: never;
|
|
1563
1640
|
put?: never;
|
|
1564
|
-
|
|
1565
|
-
|
|
1641
|
+
post?: never;
|
|
1642
|
+
/** Delete a TCP port forward */
|
|
1643
|
+
delete: {
|
|
1566
1644
|
parameters: {
|
|
1567
1645
|
query?: never;
|
|
1568
1646
|
header?: never;
|
|
1569
1647
|
path: {
|
|
1570
1648
|
spaceId: string;
|
|
1571
|
-
|
|
1649
|
+
cubeId: string;
|
|
1650
|
+
mappingId: string;
|
|
1572
1651
|
};
|
|
1573
1652
|
cookie?: never;
|
|
1574
1653
|
};
|
|
1575
|
-
requestBody
|
|
1576
|
-
content: {
|
|
1577
|
-
"application/json": {
|
|
1578
|
-
parts: {
|
|
1579
|
-
partNumber: number;
|
|
1580
|
-
etag: string;
|
|
1581
|
-
}[];
|
|
1582
|
-
config: {
|
|
1583
|
-
vcpus: number;
|
|
1584
|
-
ramMb: number;
|
|
1585
|
-
diskLimitGb: number;
|
|
1586
|
-
imageId: string;
|
|
1587
|
-
userData?: string | null;
|
|
1588
|
-
};
|
|
1589
|
-
};
|
|
1590
|
-
};
|
|
1591
|
-
};
|
|
1654
|
+
requestBody?: never;
|
|
1592
1655
|
responses: {
|
|
1593
|
-
/** @description
|
|
1656
|
+
/** @description Deleted */
|
|
1594
1657
|
200: {
|
|
1595
1658
|
headers: {
|
|
1596
1659
|
[name: string]: unknown;
|
|
1597
1660
|
};
|
|
1598
1661
|
content: {
|
|
1599
1662
|
"application/json": {
|
|
1600
|
-
|
|
1601
|
-
cubeId?: string;
|
|
1602
|
-
/** @enum {string} */
|
|
1603
|
-
status?: "provisioning";
|
|
1663
|
+
success: boolean;
|
|
1604
1664
|
};
|
|
1605
1665
|
};
|
|
1606
1666
|
};
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
};
|
|
1633
|
-
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;
|
|
1634
1692
|
};
|
|
1635
|
-
|
|
1636
|
-
|
|
1693
|
+
cookie?: never;
|
|
1694
|
+
};
|
|
1695
|
+
requestBody?: never;
|
|
1696
|
+
responses: {
|
|
1697
|
+
/** @description Start enqueued */
|
|
1698
|
+
200: {
|
|
1637
1699
|
headers: {
|
|
1638
1700
|
[name: string]: unknown;
|
|
1639
1701
|
};
|
|
1640
1702
|
content?: never;
|
|
1641
1703
|
};
|
|
1704
|
+
404: components["responses"]["NotFound"];
|
|
1705
|
+
429: components["responses"]["RateLimited"];
|
|
1642
1706
|
};
|
|
1643
1707
|
};
|
|
1644
1708
|
delete?: never;
|
|
@@ -1689,9 +1753,9 @@ interface paths {
|
|
|
1689
1753
|
requestBody: {
|
|
1690
1754
|
content: {
|
|
1691
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")[];
|
|
1692
1757
|
/** Format: uri */
|
|
1693
1758
|
url: string;
|
|
1694
|
-
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")[];
|
|
1695
1759
|
};
|
|
1696
1760
|
};
|
|
1697
1761
|
};
|
|
@@ -1814,191 +1878,200 @@ interface paths {
|
|
|
1814
1878
|
}
|
|
1815
1879
|
interface components {
|
|
1816
1880
|
schemas: {
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
name: string;
|
|
1820
|
-
tier: string;
|
|
1881
|
+
Cube: {
|
|
1882
|
+
costPerHour: number;
|
|
1821
1883
|
/** Format: date-time */
|
|
1822
1884
|
createdAt: string;
|
|
1823
|
-
};
|
|
1824
|
-
CubeSshInfo: {
|
|
1825
|
-
host: string | null;
|
|
1826
|
-
port: number;
|
|
1827
|
-
user: string;
|
|
1828
|
-
hostKeys: {
|
|
1829
|
-
type: string;
|
|
1830
|
-
key: string;
|
|
1831
|
-
}[];
|
|
1832
|
-
};
|
|
1833
|
-
Cube: {
|
|
1834
1885
|
id: string;
|
|
1886
|
+
image: string;
|
|
1835
1887
|
name: string;
|
|
1836
|
-
/** @enum {string} */
|
|
1837
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
1838
1888
|
publicIpv4: string | null;
|
|
1839
1889
|
resources: {
|
|
1840
|
-
vcpu: number;
|
|
1841
|
-
ramGb: number;
|
|
1842
1890
|
diskGb: number;
|
|
1891
|
+
ramGb: number;
|
|
1892
|
+
vcpu: number;
|
|
1843
1893
|
};
|
|
1844
|
-
|
|
1845
|
-
sshUser: string;
|
|
1846
|
-
costPerHour: number;
|
|
1847
|
-
/** @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. */
|
|
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. */
|
|
1848
1895
|
serverDomain?: string | null;
|
|
1849
|
-
|
|
1850
|
-
|
|
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;
|
|
1851
1908
|
/** Format: date-time */
|
|
1852
1909
|
updatedAt: string;
|
|
1853
1910
|
};
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
name: string;
|
|
1863
|
-
slug: string;
|
|
1864
|
-
};
|
|
1865
|
-
Image: {
|
|
1866
|
-
id: string;
|
|
1867
|
-
name: string;
|
|
1868
|
-
version: string;
|
|
1869
|
-
description: string;
|
|
1870
|
-
defaultUser: string;
|
|
1871
|
-
};
|
|
1872
|
-
PricingTier: {
|
|
1873
|
-
minVcpus: number;
|
|
1874
|
-
maxVcpus: number | null;
|
|
1875
|
-
multiplier: number;
|
|
1876
|
-
label: string;
|
|
1911
|
+
CubeSshInfo: {
|
|
1912
|
+
host: string | null;
|
|
1913
|
+
hostKeys: {
|
|
1914
|
+
key: string;
|
|
1915
|
+
type: string;
|
|
1916
|
+
}[];
|
|
1917
|
+
port: number;
|
|
1918
|
+
user: string;
|
|
1877
1919
|
};
|
|
1878
1920
|
DnsRecord: {
|
|
1921
|
+
host: string;
|
|
1879
1922
|
/** @enum {string} */
|
|
1880
1923
|
id: "ownership" | "routing" | "certificate";
|
|
1924
|
+
mustBeGrey: boolean;
|
|
1925
|
+
note?: string | null;
|
|
1926
|
+
proxyOk: boolean;
|
|
1927
|
+
/** @enum {string} */
|
|
1928
|
+
purpose: "ownership" | "routing" | "certificate";
|
|
1881
1929
|
/** @enum {string} */
|
|
1882
1930
|
type: "CNAME" | "TXT" | "A";
|
|
1883
|
-
host: string;
|
|
1884
1931
|
value: string;
|
|
1885
|
-
/** @enum {string} */
|
|
1886
|
-
purpose: "ownership" | "routing" | "certificate";
|
|
1887
|
-
note?: string | null;
|
|
1888
|
-
mustBeGrey: boolean;
|
|
1889
|
-
proxyOk: boolean;
|
|
1890
1932
|
};
|
|
1891
1933
|
DnsRecordStatus: {
|
|
1892
|
-
|
|
1893
|
-
/** @enum {string} */
|
|
1894
|
-
type: "CNAME" | "TXT" | "A";
|
|
1934
|
+
detail: string;
|
|
1895
1935
|
host: string;
|
|
1896
|
-
|
|
1897
|
-
purpose: string;
|
|
1898
|
-
note?: string | null;
|
|
1936
|
+
id: string;
|
|
1899
1937
|
mustBeGrey?: boolean;
|
|
1938
|
+
note?: string | null;
|
|
1939
|
+
observed?: string[] | null;
|
|
1900
1940
|
proxyOk?: boolean;
|
|
1941
|
+
purpose: string;
|
|
1901
1942
|
/** @enum {string} */
|
|
1902
1943
|
state: "found" | "missing" | "mismatch" | "unknown";
|
|
1903
|
-
|
|
1904
|
-
|
|
1944
|
+
/** @enum {string} */
|
|
1945
|
+
type: "CNAME" | "TXT" | "A";
|
|
1946
|
+
value: string;
|
|
1905
1947
|
};
|
|
1906
1948
|
Domain: {
|
|
1907
|
-
|
|
1949
|
+
acmeDelegationTarget: string | null;
|
|
1950
|
+
basicAuthEnabled: boolean;
|
|
1951
|
+
basicAuthUser: string | null;
|
|
1952
|
+
corsConfig: Record<string, never> | null;
|
|
1953
|
+
/** Format: date-time */
|
|
1954
|
+
createdAt: string;
|
|
1908
1955
|
cubeId: string;
|
|
1909
1956
|
domain: string;
|
|
1910
|
-
|
|
1911
|
-
status: string;
|
|
1957
|
+
id: string;
|
|
1912
1958
|
ingressStatus: string | null;
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1959
|
+
ipAllowList: string[] | null;
|
|
1960
|
+
ipDenyList: string[] | null;
|
|
1961
|
+
isWildcard: boolean;
|
|
1962
|
+
maxRequestBodyMb: number | null;
|
|
1963
|
+
port: number | null;
|
|
1916
1964
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1917
|
-
|
|
1965
|
+
requestHeaderOverrides: {
|
|
1966
|
+
remove?: string[];
|
|
1918
1967
|
set?: {
|
|
1919
1968
|
[key: string]: string;
|
|
1920
1969
|
};
|
|
1921
|
-
remove?: string[];
|
|
1922
1970
|
} | null;
|
|
1971
|
+
responseCompression: boolean;
|
|
1923
1972
|
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1924
|
-
|
|
1973
|
+
responseHeaderOverrides: {
|
|
1974
|
+
remove?: string[];
|
|
1925
1975
|
set?: {
|
|
1926
1976
|
[key: string]: string;
|
|
1927
1977
|
};
|
|
1928
|
-
remove?: string[];
|
|
1929
1978
|
} | null;
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
corsConfig: Record<string, never> | null;
|
|
1937
|
-
isWildcard: boolean;
|
|
1979
|
+
responseHeaderTimeoutSecs: number;
|
|
1980
|
+
/** @enum {string} */
|
|
1981
|
+
securityHeadersMode: "enforced" | "app_managed";
|
|
1982
|
+
status: string;
|
|
1983
|
+
/** Format: date-time */
|
|
1984
|
+
updatedAt: string;
|
|
1938
1985
|
/** @enum {string|null} */
|
|
1939
1986
|
wildcardCertState: "pending_delegation" | "issuing" | "ready" | "failed" | null;
|
|
1940
|
-
|
|
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: {
|
|
1941
2016
|
/** Format: date-time */
|
|
1942
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: {
|
|
1943
2026
|
/** Format: date-time */
|
|
1944
|
-
|
|
2027
|
+
createdAt: string;
|
|
2028
|
+
id: string;
|
|
2029
|
+
name: string;
|
|
2030
|
+
tier: string;
|
|
1945
2031
|
};
|
|
1946
2032
|
TcpMapping: {
|
|
1947
|
-
|
|
2033
|
+
/** Format: date-time */
|
|
2034
|
+
createdAt: string;
|
|
1948
2035
|
cubeId: string;
|
|
1949
2036
|
cubePort: number;
|
|
1950
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. */
|
|
1951
|
-
host
|
|
2038
|
+
host?: string | null;
|
|
1952
2039
|
hostPort: number;
|
|
2040
|
+
id: string;
|
|
2041
|
+
isSsh: boolean;
|
|
1953
2042
|
label: string | null;
|
|
1954
2043
|
status: string;
|
|
1955
|
-
|
|
1956
|
-
/** @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. */
|
|
1957
2045
|
udpEnabled: boolean;
|
|
1958
2046
|
/** Format: date-time */
|
|
1959
|
-
createdAt: string;
|
|
1960
|
-
/** Format: date-time */
|
|
1961
2047
|
updatedAt: string;
|
|
1962
2048
|
whitelistedIps: {
|
|
1963
|
-
id: string;
|
|
1964
2049
|
cidr: string;
|
|
2050
|
+
id: string;
|
|
1965
2051
|
}[];
|
|
1966
2052
|
};
|
|
1967
|
-
Snapshot: {
|
|
1968
|
-
id: string;
|
|
1969
|
-
cubeId: string;
|
|
1970
|
-
name: string;
|
|
1971
|
-
sizeBytes: number | null;
|
|
1972
|
-
status: string;
|
|
1973
|
-
kind: string;
|
|
1974
|
-
/** Format: date-time */
|
|
1975
|
-
createdAt: string;
|
|
1976
|
-
};
|
|
1977
2053
|
Webhook: {
|
|
1978
|
-
id: string;
|
|
1979
|
-
/** Format: uri */
|
|
1980
|
-
url: string;
|
|
1981
|
-
events: string[];
|
|
1982
|
-
enabled: boolean;
|
|
1983
2054
|
/** Format: date-time */
|
|
1984
2055
|
createdAt: string;
|
|
2056
|
+
enabled: boolean;
|
|
2057
|
+
events: string[];
|
|
2058
|
+
id: string;
|
|
1985
2059
|
/** Format: date-time */
|
|
1986
2060
|
updatedAt: string;
|
|
2061
|
+
/** Format: uri */
|
|
2062
|
+
url: string;
|
|
1987
2063
|
};
|
|
1988
2064
|
WebhookDelivery: {
|
|
1989
|
-
id: string;
|
|
1990
|
-
event: string;
|
|
1991
|
-
/** @enum {string} */
|
|
1992
|
-
status: "pending" | "delivered" | "failed";
|
|
1993
2065
|
attempts: number;
|
|
1994
2066
|
/** Format: date-time */
|
|
2067
|
+
createdAt: string;
|
|
2068
|
+
event: string;
|
|
2069
|
+
id: string;
|
|
2070
|
+
/** Format: date-time */
|
|
1995
2071
|
lastAttemptAt: string | null;
|
|
1996
2072
|
responseStatus: number | null;
|
|
1997
|
-
/**
|
|
1998
|
-
|
|
1999
|
-
};
|
|
2000
|
-
Error: {
|
|
2001
|
-
error: string;
|
|
2073
|
+
/** @enum {string} */
|
|
2074
|
+
status: "pending" | "delivered" | "failed";
|
|
2002
2075
|
};
|
|
2003
2076
|
};
|
|
2004
2077
|
responses: {
|
|
@@ -2011,8 +2084,8 @@ interface components {
|
|
|
2011
2084
|
"application/json": components["schemas"]["Error"];
|
|
2012
2085
|
};
|
|
2013
2086
|
};
|
|
2014
|
-
/** @description
|
|
2015
|
-
|
|
2087
|
+
/** @description Authenticated but lacks the required permission */
|
|
2088
|
+
Forbidden: {
|
|
2016
2089
|
headers: {
|
|
2017
2090
|
[name: string]: unknown;
|
|
2018
2091
|
};
|
|
@@ -2020,8 +2093,8 @@ interface components {
|
|
|
2020
2093
|
"application/json": components["schemas"]["Error"];
|
|
2021
2094
|
};
|
|
2022
2095
|
};
|
|
2023
|
-
/** @description
|
|
2024
|
-
|
|
2096
|
+
/** @description Resource not found */
|
|
2097
|
+
NotFound: {
|
|
2025
2098
|
headers: {
|
|
2026
2099
|
[name: string]: unknown;
|
|
2027
2100
|
};
|
|
@@ -2029,8 +2102,8 @@ interface components {
|
|
|
2029
2102
|
"application/json": components["schemas"]["Error"];
|
|
2030
2103
|
};
|
|
2031
2104
|
};
|
|
2032
|
-
/** @description
|
|
2033
|
-
|
|
2105
|
+
/** @description Rate limit exceeded (10 mutations / 60s) */
|
|
2106
|
+
RateLimited: {
|
|
2034
2107
|
headers: {
|
|
2035
2108
|
[name: string]: unknown;
|
|
2036
2109
|
};
|
|
@@ -2038,8 +2111,8 @@ interface components {
|
|
|
2038
2111
|
"application/json": components["schemas"]["Error"];
|
|
2039
2112
|
};
|
|
2040
2113
|
};
|
|
2041
|
-
/** @description
|
|
2042
|
-
|
|
2114
|
+
/** @description Missing or invalid API key */
|
|
2115
|
+
Unauthorized: {
|
|
2043
2116
|
headers: {
|
|
2044
2117
|
[name: string]: unknown;
|
|
2045
2118
|
};
|
|
@@ -2103,6 +2176,18 @@ type CreateDomainInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/dom
|
|
|
2103
2176
|
type UpdateDomainInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}"]["patch"]["requestBody"]>["content"]["application/json"];
|
|
2104
2177
|
/** Request body for creating a TCP port mapping. */
|
|
2105
2178
|
type CreateTcpMappingInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings"]["post"]["requestBody"]>["content"]["application/json"];
|
|
2179
|
+
/**
|
|
2180
|
+
* Request body for `POST /spaces/{spaceId}/cubes` as defined in the OpenAPI
|
|
2181
|
+
* spec, with `terminationProtection` intersected on because the bundled spec
|
|
2182
|
+
* does not declare the field but the v1 API accepts it. A boolean `false` (or
|
|
2183
|
+
* omission) leaves the Cube in the documented default-unprotected state; `true`
|
|
2184
|
+
* opts the Cube out of customer-initiated deletion until the flag is toggled
|
|
2185
|
+
* back via `cubes.setTerminationProtection`.
|
|
2186
|
+
*/
|
|
2187
|
+
type CreateCubeInput = NonNullable<paths["/spaces/{spaceId}/cubes"]["post"]["requestBody"]>["content"]["application/json"] & {
|
|
2188
|
+
/** Opt this Cube out of customer-initiated deletion (default `false`). */
|
|
2189
|
+
terminationProtection?: boolean;
|
|
2190
|
+
};
|
|
2106
2191
|
/**
|
|
2107
2192
|
* A webhook endpoint subscribed to Space events.
|
|
2108
2193
|
*
|
|
@@ -2196,25 +2281,28 @@ declare class KrovaClient {
|
|
|
2196
2281
|
/** List Cubes in a Space, with pagination metadata. */
|
|
2197
2282
|
list: (spaceId: string) => Promise<{
|
|
2198
2283
|
cubes: {
|
|
2284
|
+
costPerHour: number;
|
|
2285
|
+
createdAt: string;
|
|
2199
2286
|
id: string;
|
|
2287
|
+
image: string;
|
|
2200
2288
|
name: string;
|
|
2201
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2202
2289
|
publicIpv4: string | null;
|
|
2203
2290
|
resources: {
|
|
2204
|
-
vcpu: number;
|
|
2205
|
-
ramGb: number;
|
|
2206
2291
|
diskGb: number;
|
|
2292
|
+
ramGb: number;
|
|
2293
|
+
vcpu: number;
|
|
2207
2294
|
};
|
|
2208
|
-
image: string;
|
|
2209
|
-
sshUser: string;
|
|
2210
|
-
costPerHour: number;
|
|
2211
2295
|
serverDomain?: string | null;
|
|
2212
|
-
|
|
2296
|
+
sshUser: string;
|
|
2297
|
+
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2298
|
+
terminationProtection: boolean;
|
|
2299
|
+
terminationProtectionChangedAt: string | null;
|
|
2300
|
+
terminationProtectionChangedBy: string | null;
|
|
2213
2301
|
updatedAt: string;
|
|
2214
2302
|
}[];
|
|
2215
2303
|
pagination: {
|
|
2216
|
-
page: number;
|
|
2217
2304
|
limit: number;
|
|
2305
|
+
page: number;
|
|
2218
2306
|
total: number;
|
|
2219
2307
|
totalPages: number;
|
|
2220
2308
|
};
|
|
@@ -2222,11 +2310,15 @@ declare class KrovaClient {
|
|
|
2222
2310
|
/**
|
|
2223
2311
|
* Create a Cube. Returns the created {@link Cube}.
|
|
2224
2312
|
*
|
|
2313
|
+
* Set `terminationProtection: true` to opt the Cube out of
|
|
2314
|
+
* customer-initiated deletion. The flag is per-Cube; power-off, wake,
|
|
2315
|
+
* restart, snapshot, and restore remain allowed regardless.
|
|
2316
|
+
*
|
|
2225
2317
|
* @param spaceId Target Space id.
|
|
2226
|
-
* @param body Cube spec — `{ name, image, resources, sshPublicKey, ... }`.
|
|
2318
|
+
* @param body Cube spec — `{ name, image, resources, sshPublicKey, terminationProtection?, ... }`.
|
|
2227
2319
|
* @param opts Optional `idempotencyKey` (max 255 chars, scoped per space).
|
|
2228
2320
|
*/
|
|
2229
|
-
create: (spaceId: string, body:
|
|
2321
|
+
create: (spaceId: string, body: CreateCubeInput, opts?: {
|
|
2230
2322
|
idempotencyKey?: string;
|
|
2231
2323
|
}) => Promise<Cube>;
|
|
2232
2324
|
/** Get a single Cube. Returns the {@link Cube}. */
|
|
@@ -2245,7 +2337,25 @@ declare class KrovaClient {
|
|
|
2245
2337
|
* endpoint. (Compute resize / rename are not part of the public API.)
|
|
2246
2338
|
*/
|
|
2247
2339
|
update: (spaceId: string, cubeId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/ssh-port"]["put"]["requestBody"]>["content"]["application/json"]) => Promise<unknown>;
|
|
2248
|
-
/**
|
|
2340
|
+
/**
|
|
2341
|
+
* Toggle a Cube's termination-protection flag.
|
|
2342
|
+
*
|
|
2343
|
+
* The v1 API exposes `PATCH /spaces/{spaceId}/cubes/{cubeId}` with body
|
|
2344
|
+
* `{ terminationProtection: boolean }`. The call is idempotent: passing the
|
|
2345
|
+
* current value is a no-op server-side (no audit row is written).
|
|
2346
|
+
*
|
|
2347
|
+
* Returns the updated {@link Cube}, including `terminationProtection`,
|
|
2348
|
+
* `terminationProtectionChangedAt`, and `terminationProtectionChangedBy`.
|
|
2349
|
+
*/
|
|
2350
|
+
setTerminationProtection: (spaceId: string, cubeId: string, enabled: boolean) => Promise<Cube>;
|
|
2351
|
+
/**
|
|
2352
|
+
* Delete a Cube (asynchronous — deletion is enqueued).
|
|
2353
|
+
*
|
|
2354
|
+
* Throws {@link TerminationProtectedError} when the server returns `409`
|
|
2355
|
+
* with `error.code = "termination_protected"` — the Cube had its
|
|
2356
|
+
* termination-protection flag set and must be unprotected first. Any other
|
|
2357
|
+
* non-2xx response surfaces as a plain {@link KrovaError}.
|
|
2358
|
+
*/
|
|
2249
2359
|
delete: (spaceId: string, cubeId: string) => Promise<{
|
|
2250
2360
|
success: boolean;
|
|
2251
2361
|
}>;
|
|
@@ -2385,27 +2495,27 @@ declare class KrovaClient {
|
|
|
2385
2495
|
* archive to those URLs, then call {@link imports.complete}.
|
|
2386
2496
|
*/
|
|
2387
2497
|
create: (spaceId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2498
|
+
chunkSizeBytes?: number;
|
|
2499
|
+
expiresAt?: string;
|
|
2388
2500
|
importId?: string;
|
|
2389
|
-
uploadId?: string;
|
|
2390
2501
|
key?: string;
|
|
2391
|
-
chunkSizeBytes?: number;
|
|
2392
2502
|
parts?: {
|
|
2393
2503
|
partNumber?: number;
|
|
2394
2504
|
url?: string;
|
|
2395
2505
|
}[] | undefined;
|
|
2396
|
-
|
|
2506
|
+
uploadId?: string;
|
|
2397
2507
|
} | undefined>;
|
|
2398
2508
|
/** Get an in-progress or completed import by id. */
|
|
2399
2509
|
get: (spaceId: string, importId: string) => Promise<{
|
|
2400
2510
|
import?: {
|
|
2511
|
+
completedAt?: string | null;
|
|
2512
|
+
createdAt?: string;
|
|
2513
|
+
cubeId?: string | null;
|
|
2514
|
+
error?: string | null;
|
|
2401
2515
|
id?: string;
|
|
2402
2516
|
name?: string;
|
|
2403
2517
|
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
2404
|
-
cubeId?: string | null;
|
|
2405
|
-
error?: string | null;
|
|
2406
|
-
createdAt?: string;
|
|
2407
2518
|
updatedAt?: string;
|
|
2408
|
-
completedAt?: string | null;
|
|
2409
2519
|
} | undefined;
|
|
2410
2520
|
}>;
|
|
2411
2521
|
/**
|
|
@@ -2414,8 +2524,8 @@ declare class KrovaClient {
|
|
|
2414
2524
|
* `config`.
|
|
2415
2525
|
*/
|
|
2416
2526
|
complete: (spaceId: string, importId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports/{importId}/complete"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2417
|
-
importId?: string;
|
|
2418
2527
|
cubeId?: string;
|
|
2528
|
+
importId?: string;
|
|
2419
2529
|
status?: "provisioning";
|
|
2420
2530
|
} | undefined>;
|
|
2421
2531
|
/** Cancel an in-progress import. */
|
|
@@ -2426,10 +2536,10 @@ declare class KrovaClient {
|
|
|
2426
2536
|
readonly backups: {
|
|
2427
2537
|
/** Get a time-limited download URL for a backup `.cube` archive. */
|
|
2428
2538
|
download: (spaceId: string, backupId: string) => Promise<{
|
|
2429
|
-
|
|
2539
|
+
expiresAt?: string;
|
|
2430
2540
|
filename?: string;
|
|
2431
2541
|
sizeBytes?: number | null;
|
|
2432
|
-
|
|
2542
|
+
url?: string;
|
|
2433
2543
|
} | undefined>;
|
|
2434
2544
|
};
|
|
2435
2545
|
readonly webhooks: {
|
|
@@ -2483,28 +2593,28 @@ declare class KrovaClient {
|
|
|
2483
2593
|
/** List available OS images. */
|
|
2484
2594
|
images: () => Promise<{
|
|
2485
2595
|
images: {
|
|
2596
|
+
defaultUser: string;
|
|
2597
|
+
description: string;
|
|
2486
2598
|
id: string;
|
|
2487
2599
|
name: string;
|
|
2488
2600
|
version: string;
|
|
2489
|
-
description: string;
|
|
2490
|
-
defaultUser: string;
|
|
2491
2601
|
}[];
|
|
2492
2602
|
}>;
|
|
2493
2603
|
/** Per-resource hourly rates and volume pricing tiers. */
|
|
2494
2604
|
pricing: () => Promise<{
|
|
2495
2605
|
currency: string;
|
|
2606
|
+
note: string;
|
|
2496
2607
|
rates: {
|
|
2497
|
-
vcpuPerHour: number;
|
|
2498
|
-
ramGbPerHour: number;
|
|
2499
2608
|
diskGbPerHour: number;
|
|
2609
|
+
ramGbPerHour: number;
|
|
2610
|
+
vcpuPerHour: number;
|
|
2500
2611
|
};
|
|
2501
2612
|
tiers: {
|
|
2502
|
-
|
|
2613
|
+
label: string;
|
|
2503
2614
|
maxVcpus: number | null;
|
|
2615
|
+
minVcpus: number;
|
|
2504
2616
|
multiplier: number;
|
|
2505
|
-
label: string;
|
|
2506
2617
|
}[];
|
|
2507
|
-
note: string;
|
|
2508
2618
|
}>;
|
|
2509
2619
|
};
|
|
2510
2620
|
}
|
|
@@ -2555,8 +2665,68 @@ declare class KrovaError extends Error {
|
|
|
2555
2665
|
}
|
|
2556
2666
|
/**
|
|
2557
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`.
|
|
2679
|
+
*/
|
|
2680
|
+
declare function krovaErrorFrom(response: Response, body: unknown): KrovaError;
|
|
2681
|
+
/**
|
|
2682
|
+
* Thrown by `client.cubes.delete` when the server rejects a delete with
|
|
2683
|
+
* `409` and `error.code = "termination_protected"`.
|
|
2684
|
+
*
|
|
2685
|
+
* The customer-facing contract is: a Cube with `terminationProtection = true`
|
|
2686
|
+
* cannot be deleted until the flag is turned off. The CLI and MCP surface the
|
|
2687
|
+
* server's message verbatim, so callers can switch on `code` rather than
|
|
2688
|
+
* parsing prose. `cubeId` / `changedAt` / `changedBy` are best-effort — a
|
|
2689
|
+
* defensive server (or an older control plane) may omit the `cube` block, in
|
|
2690
|
+
* which case the SDK falls back to the id the call was made with and leaves
|
|
2691
|
+
* the two timestamps `null`.
|
|
2692
|
+
*/
|
|
2693
|
+
declare class TerminationProtectedError extends KrovaError {
|
|
2694
|
+
/** The id of the Cube the customer tried to delete. */
|
|
2695
|
+
readonly cubeId: string;
|
|
2696
|
+
/**
|
|
2697
|
+
* When the flag was last changed (`terminationProtectionChangedAt` on the
|
|
2698
|
+
* Cube row). `null` when the server's 409 body omitted it.
|
|
2699
|
+
*/
|
|
2700
|
+
readonly changedAt: string | null;
|
|
2701
|
+
/**
|
|
2702
|
+
* Who last changed the flag (`terminationProtectionChangedBy` on the Cube
|
|
2703
|
+
* row — typically `"user:<id>"`). `null` when the server's 409 body omitted
|
|
2704
|
+
* it.
|
|
2705
|
+
*/
|
|
2706
|
+
readonly changedBy: string | null;
|
|
2707
|
+
constructor(message: string, init: {
|
|
2708
|
+
status: number;
|
|
2709
|
+
code: string;
|
|
2710
|
+
requestId?: string;
|
|
2711
|
+
body?: KrovaErrorBody;
|
|
2712
|
+
response?: Response;
|
|
2713
|
+
cubeId: string;
|
|
2714
|
+
changedAt: string | null;
|
|
2715
|
+
changedBy: string | null;
|
|
2716
|
+
});
|
|
2717
|
+
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Try to interpret a failing DELETE response as the v1 API's
|
|
2720
|
+
* termination-protected 409. Returns a {@link TerminationProtectedError} when
|
|
2721
|
+
* the body shape matches, `null` otherwise (the caller then falls back to a
|
|
2722
|
+
* plain {@link KrovaError}).
|
|
2723
|
+
*
|
|
2724
|
+
* The 409 body is published as `{ error: { code, message, cube: { … } } }`,
|
|
2725
|
+
* but the bundled OpenAPI spec only declares `{ error: string }` for the
|
|
2726
|
+
* generic `Error` schema — so the cast is best-effort and we tolerate
|
|
2727
|
+
* missing optional fields.
|
|
2558
2728
|
*/
|
|
2559
|
-
declare function
|
|
2729
|
+
declare function terminationProtectedFrom(response: Response, cubeId: string, body: unknown): TerminationProtectedError | null;
|
|
2560
2730
|
//#endregion
|
|
2561
|
-
export { type AuthScheme, type CreateDomainInput, type CreateTcpMappingInput, type Cube, type CubeSshInfo, DEFAULT_BASE_URL, type Domain, type Image, KrovaClient, type KrovaClientOptions, KrovaError, type KrovaErrorBody, type Pagination, type PricingTier, type Region, type Snapshot, type Space, type TcpMapping, type UpdateDomainInput, type components, krovaErrorFrom, type paths };
|
|
2731
|
+
export { type AuthScheme, type CreateCubeInput, type CreateDomainInput, type CreateTcpMappingInput, type Cube, type CubeSshInfo, DEFAULT_BASE_URL, type Domain, type Image, KrovaClient, type KrovaClientOptions, KrovaError, type KrovaErrorBody, type Pagination, type PricingTier, type Region, type Snapshot, type Space, type TcpMapping, TerminationProtectedError, type UpdateDomainInput, type components, krovaErrorFrom, type paths, terminationProtectedFrom };
|
|
2562
2732
|
//# sourceMappingURL=index.d.cts.map
|