@krovacloud/sdk 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +47 -1
- package/dist/client-DWShmqpe.d.cts +3337 -0
- package/dist/client-DWShmqpe.d.ts +3337 -0
- package/dist/index.cjs +77 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -3158
- package/dist/index.d.ts +2 -3158
- package/dist/index.js +75 -1
- package/dist/index.js.map +1 -1
- package/dist/rolldown-runtime-CmQyd0Gu.cjs +27 -0
- package/dist/ssh.cjs +349 -0
- package/dist/ssh.cjs.map +1 -0
- package/dist/ssh.d.cts +133 -0
- package/dist/ssh.d.ts +133 -0
- package/dist/ssh.js +335 -0
- package/dist/ssh.js.map +1 -0
- package/package.json +15 -2
package/dist/index.d.ts
CHANGED
|
@@ -9,3163 +9,7 @@
|
|
|
9
9
|
* const cubes = await krova.cubes.list("space_123");
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
13
|
-
/**
|
|
14
|
-
* This file was auto-generated by openapi-typescript.
|
|
15
|
-
* Do not make direct changes to the file.
|
|
16
|
-
*/
|
|
17
|
-
interface paths {
|
|
18
|
-
"/auth/cli/poll": {
|
|
19
|
-
parameters: {
|
|
20
|
-
query?: never;
|
|
21
|
-
header?: never;
|
|
22
|
-
path?: never;
|
|
23
|
-
cookie?: never;
|
|
24
|
-
};
|
|
25
|
-
get?: never;
|
|
26
|
-
put?: never;
|
|
27
|
-
/**
|
|
28
|
-
* Poll for CLI device-authorization approval (RFC 8628)
|
|
29
|
-
* @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.
|
|
30
|
-
*/
|
|
31
|
-
post: {
|
|
32
|
-
parameters: {
|
|
33
|
-
query?: never;
|
|
34
|
-
header?: never;
|
|
35
|
-
path?: never;
|
|
36
|
-
cookie?: never;
|
|
37
|
-
};
|
|
38
|
-
requestBody: {
|
|
39
|
-
content: {
|
|
40
|
-
"application/json": {
|
|
41
|
-
/** @description The device code from /auth/cli/start. */
|
|
42
|
-
deviceCode: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
responses: {
|
|
47
|
-
/** @description Approved — API key minted (returned once) */
|
|
48
|
-
200: {
|
|
49
|
-
headers: {
|
|
50
|
-
[name: string]: unknown;
|
|
51
|
-
};
|
|
52
|
-
content: {
|
|
53
|
-
"application/json": {
|
|
54
|
-
/** @description The full API key. Shown once and never returned again — store it securely. */
|
|
55
|
-
apiKey: string;
|
|
56
|
-
/** @description The Space the key is scoped to. */
|
|
57
|
-
spaceId: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
400: components["responses"]["BadRequest"];
|
|
62
|
-
/** @description The user denied the login request */
|
|
63
|
-
403: {
|
|
64
|
-
headers: {
|
|
65
|
-
[name: string]: unknown;
|
|
66
|
-
};
|
|
67
|
-
content?: never;
|
|
68
|
-
};
|
|
69
|
-
/** @description The device code expired, was already consumed, or is unknown */
|
|
70
|
-
410: {
|
|
71
|
-
headers: {
|
|
72
|
-
[name: string]: unknown;
|
|
73
|
-
};
|
|
74
|
-
content?: never;
|
|
75
|
-
};
|
|
76
|
-
/** @description Authorization still pending — keep polling at the given interval */
|
|
77
|
-
428: {
|
|
78
|
-
headers: {
|
|
79
|
-
[name: string]: unknown;
|
|
80
|
-
};
|
|
81
|
-
content?: never;
|
|
82
|
-
};
|
|
83
|
-
429: components["responses"]["RateLimited"];
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
delete?: never;
|
|
87
|
-
options?: never;
|
|
88
|
-
head?: never;
|
|
89
|
-
patch?: never;
|
|
90
|
-
trace?: never;
|
|
91
|
-
};
|
|
92
|
-
"/auth/cli/start": {
|
|
93
|
-
parameters: {
|
|
94
|
-
query?: never;
|
|
95
|
-
header?: never;
|
|
96
|
-
path?: never;
|
|
97
|
-
cookie?: never;
|
|
98
|
-
};
|
|
99
|
-
get?: never;
|
|
100
|
-
put?: never;
|
|
101
|
-
/**
|
|
102
|
-
* Begin a CLI device-authorization login (RFC 8628)
|
|
103
|
-
* @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.
|
|
104
|
-
*/
|
|
105
|
-
post: {
|
|
106
|
-
parameters: {
|
|
107
|
-
query?: never;
|
|
108
|
-
header?: never;
|
|
109
|
-
path?: never;
|
|
110
|
-
cookie?: never;
|
|
111
|
-
};
|
|
112
|
-
requestBody?: never;
|
|
113
|
-
responses: {
|
|
114
|
-
/** @description Device-authorization request created */
|
|
115
|
-
200: {
|
|
116
|
-
headers: {
|
|
117
|
-
[name: string]: unknown;
|
|
118
|
-
};
|
|
119
|
-
content: {
|
|
120
|
-
"application/json": {
|
|
121
|
-
/** @description High-entropy code the CLI keeps secret and presents on each poll. Only its hash is stored server-side. */
|
|
122
|
-
deviceCode: string;
|
|
123
|
-
/** @description Seconds until the device code expires (~600). */
|
|
124
|
-
expiresIn: number;
|
|
125
|
-
/** @description Seconds to wait between polls. */
|
|
126
|
-
interval: number;
|
|
127
|
-
/** @description Short human-readable code (KROVA-XXXX-XXXX) the user confirms in the browser. */
|
|
128
|
-
userCode: string;
|
|
129
|
-
/**
|
|
130
|
-
* Format: uri
|
|
131
|
-
* @description Browser URL where the user approves.
|
|
132
|
-
*/
|
|
133
|
-
verificationUri: string;
|
|
134
|
-
/**
|
|
135
|
-
* Format: uri
|
|
136
|
-
* @description verificationUri with the user code pre-filled.
|
|
137
|
-
*/
|
|
138
|
-
verificationUriComplete: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
429: components["responses"]["RateLimited"];
|
|
143
|
-
/** @description Could not allocate a login code; retry */
|
|
144
|
-
503: {
|
|
145
|
-
headers: {
|
|
146
|
-
[name: string]: unknown;
|
|
147
|
-
};
|
|
148
|
-
content?: never;
|
|
149
|
-
};
|
|
150
|
-
};
|
|
151
|
-
};
|
|
152
|
-
delete?: never;
|
|
153
|
-
options?: never;
|
|
154
|
-
head?: never;
|
|
155
|
-
patch?: never;
|
|
156
|
-
trace?: never;
|
|
157
|
-
};
|
|
158
|
-
"/images": {
|
|
159
|
-
parameters: {
|
|
160
|
-
query?: never;
|
|
161
|
-
header?: never;
|
|
162
|
-
path?: never;
|
|
163
|
-
cookie?: never;
|
|
164
|
-
};
|
|
165
|
-
/** List available OS images */
|
|
166
|
-
get: {
|
|
167
|
-
parameters: {
|
|
168
|
-
query?: never;
|
|
169
|
-
header?: never;
|
|
170
|
-
path?: never;
|
|
171
|
-
cookie?: never;
|
|
172
|
-
};
|
|
173
|
-
requestBody?: never;
|
|
174
|
-
responses: {
|
|
175
|
-
/** @description Image list */
|
|
176
|
-
200: {
|
|
177
|
-
headers: {
|
|
178
|
-
[name: string]: unknown;
|
|
179
|
-
};
|
|
180
|
-
content: {
|
|
181
|
-
"application/json": {
|
|
182
|
-
images: components["schemas"]["Image"][];
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
put?: never;
|
|
189
|
-
post?: never;
|
|
190
|
-
delete?: never;
|
|
191
|
-
options?: never;
|
|
192
|
-
head?: never;
|
|
193
|
-
patch?: never;
|
|
194
|
-
trace?: never;
|
|
195
|
-
};
|
|
196
|
-
"/pricing": {
|
|
197
|
-
parameters: {
|
|
198
|
-
query?: never;
|
|
199
|
-
header?: never;
|
|
200
|
-
path?: never;
|
|
201
|
-
cookie?: never;
|
|
202
|
-
};
|
|
203
|
-
/** Per-resource hourly rates and volume pricing tiers */
|
|
204
|
-
get: {
|
|
205
|
-
parameters: {
|
|
206
|
-
query?: never;
|
|
207
|
-
header?: never;
|
|
208
|
-
path?: never;
|
|
209
|
-
cookie?: never;
|
|
210
|
-
};
|
|
211
|
-
requestBody?: never;
|
|
212
|
-
responses: {
|
|
213
|
-
/** @description Pricing data */
|
|
214
|
-
200: {
|
|
215
|
-
headers: {
|
|
216
|
-
[name: string]: unknown;
|
|
217
|
-
};
|
|
218
|
-
content: {
|
|
219
|
-
"application/json": {
|
|
220
|
-
currency: string;
|
|
221
|
-
note: string;
|
|
222
|
-
rates: {
|
|
223
|
-
diskGbPerHour: number;
|
|
224
|
-
ramGbPerHour: number;
|
|
225
|
-
vcpuPerHour: number;
|
|
226
|
-
};
|
|
227
|
-
tiers: components["schemas"]["PricingTier"][];
|
|
228
|
-
};
|
|
229
|
-
};
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
|
-
put?: never;
|
|
234
|
-
post?: never;
|
|
235
|
-
delete?: never;
|
|
236
|
-
options?: never;
|
|
237
|
-
head?: never;
|
|
238
|
-
patch?: never;
|
|
239
|
-
trace?: never;
|
|
240
|
-
};
|
|
241
|
-
"/regions": {
|
|
242
|
-
parameters: {
|
|
243
|
-
query?: never;
|
|
244
|
-
header?: never;
|
|
245
|
-
path?: never;
|
|
246
|
-
cookie?: never;
|
|
247
|
-
};
|
|
248
|
-
/** List regions with available capacity */
|
|
249
|
-
get: {
|
|
250
|
-
parameters: {
|
|
251
|
-
query?: never;
|
|
252
|
-
header?: never;
|
|
253
|
-
path?: never;
|
|
254
|
-
cookie?: never;
|
|
255
|
-
};
|
|
256
|
-
requestBody?: never;
|
|
257
|
-
responses: {
|
|
258
|
-
/** @description Region list */
|
|
259
|
-
200: {
|
|
260
|
-
headers: {
|
|
261
|
-
[name: string]: unknown;
|
|
262
|
-
};
|
|
263
|
-
content: {
|
|
264
|
-
"application/json": {
|
|
265
|
-
regions: components["schemas"]["Region"][];
|
|
266
|
-
};
|
|
267
|
-
};
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
put?: never;
|
|
272
|
-
post?: never;
|
|
273
|
-
delete?: never;
|
|
274
|
-
options?: never;
|
|
275
|
-
head?: never;
|
|
276
|
-
patch?: never;
|
|
277
|
-
trace?: never;
|
|
278
|
-
};
|
|
279
|
-
"/space": {
|
|
280
|
-
parameters: {
|
|
281
|
-
query?: never;
|
|
282
|
-
header?: never;
|
|
283
|
-
path?: never;
|
|
284
|
-
cookie?: never;
|
|
285
|
-
};
|
|
286
|
-
/**
|
|
287
|
-
* Resolve the space this API key is scoped to
|
|
288
|
-
* @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).
|
|
289
|
-
*/
|
|
290
|
-
get: {
|
|
291
|
-
parameters: {
|
|
292
|
-
query?: never;
|
|
293
|
-
header?: never;
|
|
294
|
-
path?: never;
|
|
295
|
-
cookie?: never;
|
|
296
|
-
};
|
|
297
|
-
requestBody?: never;
|
|
298
|
-
responses: {
|
|
299
|
-
/** @description The key's space */
|
|
300
|
-
200: {
|
|
301
|
-
headers: {
|
|
302
|
-
[name: string]: unknown;
|
|
303
|
-
};
|
|
304
|
-
content: {
|
|
305
|
-
"application/json": components["schemas"]["Space"];
|
|
306
|
-
};
|
|
307
|
-
};
|
|
308
|
-
401: components["responses"]["Unauthorized"];
|
|
309
|
-
404: components["responses"]["NotFound"];
|
|
310
|
-
};
|
|
311
|
-
};
|
|
312
|
-
put?: never;
|
|
313
|
-
post?: never;
|
|
314
|
-
delete?: never;
|
|
315
|
-
options?: never;
|
|
316
|
-
head?: never;
|
|
317
|
-
patch?: never;
|
|
318
|
-
trace?: never;
|
|
319
|
-
};
|
|
320
|
-
"/spaces/{spaceId}/backup-shares": {
|
|
321
|
-
parameters: {
|
|
322
|
-
query?: never;
|
|
323
|
-
header?: never;
|
|
324
|
-
path?: never;
|
|
325
|
-
cookie?: never;
|
|
326
|
-
};
|
|
327
|
-
/** List pending backup shares into and out of this space */
|
|
328
|
-
get: {
|
|
329
|
-
parameters: {
|
|
330
|
-
query?: never;
|
|
331
|
-
header?: never;
|
|
332
|
-
path: {
|
|
333
|
-
spaceId: string;
|
|
334
|
-
};
|
|
335
|
-
cookie?: never;
|
|
336
|
-
};
|
|
337
|
-
requestBody?: never;
|
|
338
|
-
responses: {
|
|
339
|
-
/** @description `incoming` asks this space to accept a copy; `outgoing` was offered by this space */
|
|
340
|
-
200: {
|
|
341
|
-
headers: {
|
|
342
|
-
[name: string]: unknown;
|
|
343
|
-
};
|
|
344
|
-
content: {
|
|
345
|
-
"application/json": {
|
|
346
|
-
incoming: components["schemas"]["BackupShare"][];
|
|
347
|
-
outgoing: components["schemas"]["BackupShare"][];
|
|
348
|
-
};
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
403: components["responses"]["Forbidden"];
|
|
352
|
-
};
|
|
353
|
-
};
|
|
354
|
-
put?: never;
|
|
355
|
-
post?: never;
|
|
356
|
-
delete?: never;
|
|
357
|
-
options?: never;
|
|
358
|
-
head?: never;
|
|
359
|
-
patch?: never;
|
|
360
|
-
trace?: never;
|
|
361
|
-
};
|
|
362
|
-
"/spaces/{spaceId}/backup-shares/{shareId}/accept": {
|
|
363
|
-
parameters: {
|
|
364
|
-
query?: never;
|
|
365
|
-
header?: never;
|
|
366
|
-
path?: never;
|
|
367
|
-
cookie?: never;
|
|
368
|
-
};
|
|
369
|
-
get?: never;
|
|
370
|
-
put?: never;
|
|
371
|
-
/**
|
|
372
|
-
* Accept a backup share offered to this space
|
|
373
|
-
* @description Requires an API key of this space's owner, or of a member with `backup.manage`. Creates this space's own copy of the backup, billed for storage from now. Refused with 422 when the space cannot take it (no card, unverified owner, open abuse notice, no credit, or no backup allowance left on its plan).
|
|
374
|
-
*/
|
|
375
|
-
post: {
|
|
376
|
-
parameters: {
|
|
377
|
-
query?: never;
|
|
378
|
-
header?: never;
|
|
379
|
-
path: {
|
|
380
|
-
spaceId: string;
|
|
381
|
-
shareId: string;
|
|
382
|
-
};
|
|
383
|
-
cookie?: never;
|
|
384
|
-
};
|
|
385
|
-
requestBody?: never;
|
|
386
|
-
responses: {
|
|
387
|
-
/** @description The share and the new copy */
|
|
388
|
-
200: {
|
|
389
|
-
headers: {
|
|
390
|
-
[name: string]: unknown;
|
|
391
|
-
};
|
|
392
|
-
content: {
|
|
393
|
-
"application/json": {
|
|
394
|
-
backup: components["schemas"]["Backup"];
|
|
395
|
-
share: components["schemas"]["BackupShare"];
|
|
396
|
-
};
|
|
397
|
-
};
|
|
398
|
-
};
|
|
399
|
-
403: components["responses"]["Forbidden"];
|
|
400
|
-
/** @description The request is no longer pending, has expired, or this space already has a copy */
|
|
401
|
-
409: {
|
|
402
|
-
headers: {
|
|
403
|
-
[name: string]: unknown;
|
|
404
|
-
};
|
|
405
|
-
content?: never;
|
|
406
|
-
};
|
|
407
|
-
/** @description This space cannot take the copy right now */
|
|
408
|
-
422: {
|
|
409
|
-
headers: {
|
|
410
|
-
[name: string]: unknown;
|
|
411
|
-
};
|
|
412
|
-
content?: never;
|
|
413
|
-
};
|
|
414
|
-
429: components["responses"]["RateLimited"];
|
|
415
|
-
};
|
|
416
|
-
};
|
|
417
|
-
delete?: never;
|
|
418
|
-
options?: never;
|
|
419
|
-
head?: never;
|
|
420
|
-
patch?: never;
|
|
421
|
-
trace?: never;
|
|
422
|
-
};
|
|
423
|
-
"/spaces/{spaceId}/backup-shares/{shareId}/cancel": {
|
|
424
|
-
parameters: {
|
|
425
|
-
query?: never;
|
|
426
|
-
header?: never;
|
|
427
|
-
path?: never;
|
|
428
|
-
cookie?: never;
|
|
429
|
-
};
|
|
430
|
-
get?: never;
|
|
431
|
-
put?: never;
|
|
432
|
-
/**
|
|
433
|
-
* Withdraw a pending backup share offered by this space
|
|
434
|
-
* @description Allowed for an API key of this space's owner, of a member with `backup.manage`, or of the member who raised the request.
|
|
435
|
-
*/
|
|
436
|
-
post: {
|
|
437
|
-
parameters: {
|
|
438
|
-
query?: never;
|
|
439
|
-
header?: never;
|
|
440
|
-
path: {
|
|
441
|
-
spaceId: string;
|
|
442
|
-
shareId: string;
|
|
443
|
-
};
|
|
444
|
-
cookie?: never;
|
|
445
|
-
};
|
|
446
|
-
requestBody?: never;
|
|
447
|
-
responses: {
|
|
448
|
-
/** @description Canceled */
|
|
449
|
-
200: {
|
|
450
|
-
headers: {
|
|
451
|
-
[name: string]: unknown;
|
|
452
|
-
};
|
|
453
|
-
content: {
|
|
454
|
-
"application/json": {
|
|
455
|
-
share: components["schemas"]["BackupShare"];
|
|
456
|
-
};
|
|
457
|
-
};
|
|
458
|
-
};
|
|
459
|
-
403: components["responses"]["Forbidden"];
|
|
460
|
-
/** @description The request is no longer pending */
|
|
461
|
-
409: {
|
|
462
|
-
headers: {
|
|
463
|
-
[name: string]: unknown;
|
|
464
|
-
};
|
|
465
|
-
content?: never;
|
|
466
|
-
};
|
|
467
|
-
429: components["responses"]["RateLimited"];
|
|
468
|
-
};
|
|
469
|
-
};
|
|
470
|
-
delete?: never;
|
|
471
|
-
options?: never;
|
|
472
|
-
head?: never;
|
|
473
|
-
patch?: never;
|
|
474
|
-
trace?: never;
|
|
475
|
-
};
|
|
476
|
-
"/spaces/{spaceId}/backup-shares/{shareId}/decline": {
|
|
477
|
-
parameters: {
|
|
478
|
-
query?: never;
|
|
479
|
-
header?: never;
|
|
480
|
-
path?: never;
|
|
481
|
-
cookie?: never;
|
|
482
|
-
};
|
|
483
|
-
get?: never;
|
|
484
|
-
put?: never;
|
|
485
|
-
/**
|
|
486
|
-
* Decline a backup share offered to this space
|
|
487
|
-
* @description Requires an API key of this space's owner, or of a member with `backup.manage`.
|
|
488
|
-
*/
|
|
489
|
-
post: {
|
|
490
|
-
parameters: {
|
|
491
|
-
query?: never;
|
|
492
|
-
header?: never;
|
|
493
|
-
path: {
|
|
494
|
-
spaceId: string;
|
|
495
|
-
shareId: string;
|
|
496
|
-
};
|
|
497
|
-
cookie?: never;
|
|
498
|
-
};
|
|
499
|
-
requestBody?: never;
|
|
500
|
-
responses: {
|
|
501
|
-
/** @description Declined */
|
|
502
|
-
200: {
|
|
503
|
-
headers: {
|
|
504
|
-
[name: string]: unknown;
|
|
505
|
-
};
|
|
506
|
-
content: {
|
|
507
|
-
"application/json": {
|
|
508
|
-
share: components["schemas"]["BackupShare"];
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
};
|
|
512
|
-
403: components["responses"]["Forbidden"];
|
|
513
|
-
/** @description The request is no longer pending */
|
|
514
|
-
409: {
|
|
515
|
-
headers: {
|
|
516
|
-
[name: string]: unknown;
|
|
517
|
-
};
|
|
518
|
-
content?: never;
|
|
519
|
-
};
|
|
520
|
-
429: components["responses"]["RateLimited"];
|
|
521
|
-
};
|
|
522
|
-
};
|
|
523
|
-
delete?: never;
|
|
524
|
-
options?: never;
|
|
525
|
-
head?: never;
|
|
526
|
-
patch?: never;
|
|
527
|
-
trace?: never;
|
|
528
|
-
};
|
|
529
|
-
"/spaces/{spaceId}/backups": {
|
|
530
|
-
parameters: {
|
|
531
|
-
query?: never;
|
|
532
|
-
header?: never;
|
|
533
|
-
path?: never;
|
|
534
|
-
cookie?: never;
|
|
535
|
-
};
|
|
536
|
-
/** List the space's backups, newest first (shared copies included) */
|
|
537
|
-
get: {
|
|
538
|
-
parameters: {
|
|
539
|
-
query?: never;
|
|
540
|
-
header?: never;
|
|
541
|
-
path: {
|
|
542
|
-
spaceId: string;
|
|
543
|
-
};
|
|
544
|
-
cookie?: never;
|
|
545
|
-
};
|
|
546
|
-
requestBody?: never;
|
|
547
|
-
responses: {
|
|
548
|
-
/** @description Backups */
|
|
549
|
-
200: {
|
|
550
|
-
headers: {
|
|
551
|
-
[name: string]: unknown;
|
|
552
|
-
};
|
|
553
|
-
content: {
|
|
554
|
-
"application/json": {
|
|
555
|
-
backups: components["schemas"]["Backup"][];
|
|
556
|
-
};
|
|
557
|
-
};
|
|
558
|
-
};
|
|
559
|
-
403: components["responses"]["Forbidden"];
|
|
560
|
-
};
|
|
561
|
-
};
|
|
562
|
-
put?: never;
|
|
563
|
-
post?: never;
|
|
564
|
-
delete?: never;
|
|
565
|
-
options?: never;
|
|
566
|
-
head?: never;
|
|
567
|
-
patch?: never;
|
|
568
|
-
trace?: never;
|
|
569
|
-
};
|
|
570
|
-
"/spaces/{spaceId}/backups/{backupId}": {
|
|
571
|
-
parameters: {
|
|
572
|
-
query?: never;
|
|
573
|
-
header?: never;
|
|
574
|
-
path?: never;
|
|
575
|
-
cookie?: never;
|
|
576
|
-
};
|
|
577
|
-
/** Get one backup */
|
|
578
|
-
get: {
|
|
579
|
-
parameters: {
|
|
580
|
-
query?: never;
|
|
581
|
-
header?: never;
|
|
582
|
-
path: {
|
|
583
|
-
spaceId: string;
|
|
584
|
-
backupId: string;
|
|
585
|
-
};
|
|
586
|
-
cookie?: never;
|
|
587
|
-
};
|
|
588
|
-
requestBody?: never;
|
|
589
|
-
responses: {
|
|
590
|
-
/** @description The backup */
|
|
591
|
-
200: {
|
|
592
|
-
headers: {
|
|
593
|
-
[name: string]: unknown;
|
|
594
|
-
};
|
|
595
|
-
content: {
|
|
596
|
-
"application/json": {
|
|
597
|
-
backup: components["schemas"]["Backup"];
|
|
598
|
-
};
|
|
599
|
-
};
|
|
600
|
-
};
|
|
601
|
-
404: components["responses"]["NotFound"];
|
|
602
|
-
};
|
|
603
|
-
};
|
|
604
|
-
put?: never;
|
|
605
|
-
post?: never;
|
|
606
|
-
delete?: never;
|
|
607
|
-
options?: never;
|
|
608
|
-
head?: never;
|
|
609
|
-
patch?: never;
|
|
610
|
-
trace?: never;
|
|
611
|
-
};
|
|
612
|
-
"/spaces/{spaceId}/backups/{backupId}/download": {
|
|
613
|
-
parameters: {
|
|
614
|
-
query?: never;
|
|
615
|
-
header?: never;
|
|
616
|
-
path?: never;
|
|
617
|
-
cookie?: never;
|
|
618
|
-
};
|
|
619
|
-
/** Generate a presigned download URL for a backup .cube archive */
|
|
620
|
-
get: {
|
|
621
|
-
parameters: {
|
|
622
|
-
query?: never;
|
|
623
|
-
header?: never;
|
|
624
|
-
path: {
|
|
625
|
-
spaceId: string;
|
|
626
|
-
backupId: string;
|
|
627
|
-
};
|
|
628
|
-
cookie?: never;
|
|
629
|
-
};
|
|
630
|
-
requestBody?: never;
|
|
631
|
-
responses: {
|
|
632
|
-
/** @description Presigned URL valid for 15 minutes */
|
|
633
|
-
200: {
|
|
634
|
-
headers: {
|
|
635
|
-
[name: string]: unknown;
|
|
636
|
-
};
|
|
637
|
-
content: {
|
|
638
|
-
"application/json": {
|
|
639
|
-
/** Format: date-time */
|
|
640
|
-
expiresAt?: string;
|
|
641
|
-
filename?: string;
|
|
642
|
-
sizeBytes?: number | null;
|
|
643
|
-
url?: string;
|
|
644
|
-
};
|
|
645
|
-
};
|
|
646
|
-
};
|
|
647
|
-
404: components["responses"]["NotFound"];
|
|
648
|
-
/** @description Backup is not in 'complete' status */
|
|
649
|
-
409: {
|
|
650
|
-
headers: {
|
|
651
|
-
[name: string]: unknown;
|
|
652
|
-
};
|
|
653
|
-
content?: never;
|
|
654
|
-
};
|
|
655
|
-
};
|
|
656
|
-
};
|
|
657
|
-
put?: never;
|
|
658
|
-
post?: never;
|
|
659
|
-
delete?: never;
|
|
660
|
-
options?: never;
|
|
661
|
-
head?: never;
|
|
662
|
-
patch?: never;
|
|
663
|
-
trace?: never;
|
|
664
|
-
};
|
|
665
|
-
"/spaces/{spaceId}/backups/{backupId}/shares": {
|
|
666
|
-
parameters: {
|
|
667
|
-
query?: never;
|
|
668
|
-
header?: never;
|
|
669
|
-
path?: never;
|
|
670
|
-
cookie?: never;
|
|
671
|
-
};
|
|
672
|
-
get?: never;
|
|
673
|
-
put?: never;
|
|
674
|
-
/**
|
|
675
|
-
* Offer a copy of this backup to another space
|
|
676
|
-
* @description Requires `backup.manage`. Creates a pending share request that the destination space accepts within 48 hours: its owner, or a member there with `backup.manage`, in the dashboard or with an API key of their own. On acceptance the destination gets its own copy of the backup and pays backup storage for it from that moment; this space's backup is unchanged. A request made with an API key never completes immediately, even when the key's user owns both spaces.
|
|
677
|
-
*/
|
|
678
|
-
post: {
|
|
679
|
-
parameters: {
|
|
680
|
-
query?: never;
|
|
681
|
-
header?: {
|
|
682
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
683
|
-
"Idempotency-Key"?: string;
|
|
684
|
-
};
|
|
685
|
-
path: {
|
|
686
|
-
spaceId: string;
|
|
687
|
-
backupId: string;
|
|
688
|
-
};
|
|
689
|
-
cookie?: never;
|
|
690
|
-
};
|
|
691
|
-
requestBody: {
|
|
692
|
-
content: {
|
|
693
|
-
"application/json": {
|
|
694
|
-
destinationSpaceId: string;
|
|
695
|
-
};
|
|
696
|
-
};
|
|
697
|
-
};
|
|
698
|
-
responses: {
|
|
699
|
-
/** @description Share requested */
|
|
700
|
-
201: {
|
|
701
|
-
headers: {
|
|
702
|
-
[name: string]: unknown;
|
|
703
|
-
};
|
|
704
|
-
content: {
|
|
705
|
-
"application/json": {
|
|
706
|
-
share: components["schemas"]["BackupShare"];
|
|
707
|
-
};
|
|
708
|
-
};
|
|
709
|
-
};
|
|
710
|
-
400: components["responses"]["BadRequest"];
|
|
711
|
-
403: components["responses"]["Forbidden"];
|
|
712
|
-
404: components["responses"]["NotFound"];
|
|
713
|
-
/** @description The backup is not complete, is being deleted, is already in that space, or already has a pending share request for it */
|
|
714
|
-
409: {
|
|
715
|
-
headers: {
|
|
716
|
-
[name: string]: unknown;
|
|
717
|
-
};
|
|
718
|
-
content?: never;
|
|
719
|
-
};
|
|
720
|
-
429: components["responses"]["RateLimited"];
|
|
721
|
-
};
|
|
722
|
-
};
|
|
723
|
-
delete?: never;
|
|
724
|
-
options?: never;
|
|
725
|
-
head?: never;
|
|
726
|
-
patch?: never;
|
|
727
|
-
trace?: never;
|
|
728
|
-
};
|
|
729
|
-
"/spaces/{spaceId}/cubes": {
|
|
730
|
-
parameters: {
|
|
731
|
-
query?: never;
|
|
732
|
-
header?: never;
|
|
733
|
-
path?: never;
|
|
734
|
-
cookie?: never;
|
|
735
|
-
};
|
|
736
|
-
/** List Cubes in a Space */
|
|
737
|
-
get: {
|
|
738
|
-
parameters: {
|
|
739
|
-
query?: never;
|
|
740
|
-
header?: never;
|
|
741
|
-
path: {
|
|
742
|
-
spaceId: string;
|
|
743
|
-
};
|
|
744
|
-
cookie?: never;
|
|
745
|
-
};
|
|
746
|
-
requestBody?: never;
|
|
747
|
-
responses: {
|
|
748
|
-
/** @description Paginated Cube list */
|
|
749
|
-
200: {
|
|
750
|
-
headers: {
|
|
751
|
-
[name: string]: unknown;
|
|
752
|
-
};
|
|
753
|
-
content: {
|
|
754
|
-
"application/json": {
|
|
755
|
-
cubes: components["schemas"]["Cube"][];
|
|
756
|
-
pagination: components["schemas"]["Pagination"];
|
|
757
|
-
};
|
|
758
|
-
};
|
|
759
|
-
};
|
|
760
|
-
401: components["responses"]["Unauthorized"];
|
|
761
|
-
403: components["responses"]["Forbidden"];
|
|
762
|
-
};
|
|
763
|
-
};
|
|
764
|
-
put?: never;
|
|
765
|
-
/** Create a Cube */
|
|
766
|
-
post: {
|
|
767
|
-
parameters: {
|
|
768
|
-
query?: never;
|
|
769
|
-
header?: {
|
|
770
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
771
|
-
"Idempotency-Key"?: string;
|
|
772
|
-
};
|
|
773
|
-
path: {
|
|
774
|
-
spaceId: string;
|
|
775
|
-
};
|
|
776
|
-
cookie?: never;
|
|
777
|
-
};
|
|
778
|
-
requestBody: {
|
|
779
|
-
content: {
|
|
780
|
-
"application/json": {
|
|
781
|
-
image: string;
|
|
782
|
-
name: string;
|
|
783
|
-
/** @description Region slug from /v1/regions (optional). */
|
|
784
|
-
region?: string;
|
|
785
|
-
resources: {
|
|
786
|
-
diskGb: number;
|
|
787
|
-
ramGb: number;
|
|
788
|
-
vcpu: number;
|
|
789
|
-
};
|
|
790
|
-
/** @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. */
|
|
791
|
-
sshPublicKey: string;
|
|
792
|
-
/**
|
|
793
|
-
* @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.
|
|
794
|
-
* @default false
|
|
795
|
-
*/
|
|
796
|
-
terminationProtection?: boolean;
|
|
797
|
-
/** @description cloud-init script (max 16 KB, optional). */
|
|
798
|
-
userData?: string;
|
|
799
|
-
};
|
|
800
|
-
};
|
|
801
|
-
};
|
|
802
|
-
responses: {
|
|
803
|
-
/** @description Cube created */
|
|
804
|
-
201: {
|
|
805
|
-
headers: {
|
|
806
|
-
[name: string]: unknown;
|
|
807
|
-
};
|
|
808
|
-
content: {
|
|
809
|
-
"application/json": {
|
|
810
|
-
cube?: components["schemas"]["Cube"];
|
|
811
|
-
};
|
|
812
|
-
};
|
|
813
|
-
};
|
|
814
|
-
400: components["responses"]["BadRequest"];
|
|
815
|
-
401: components["responses"]["Unauthorized"];
|
|
816
|
-
403: components["responses"]["Forbidden"];
|
|
817
|
-
429: components["responses"]["RateLimited"];
|
|
818
|
-
};
|
|
819
|
-
};
|
|
820
|
-
delete?: never;
|
|
821
|
-
options?: never;
|
|
822
|
-
head?: never;
|
|
823
|
-
patch?: never;
|
|
824
|
-
trace?: never;
|
|
825
|
-
};
|
|
826
|
-
"/spaces/{spaceId}/cubes/imports": {
|
|
827
|
-
parameters: {
|
|
828
|
-
query?: never;
|
|
829
|
-
header?: never;
|
|
830
|
-
path?: never;
|
|
831
|
-
cookie?: never;
|
|
832
|
-
};
|
|
833
|
-
get?: never;
|
|
834
|
-
put?: never;
|
|
835
|
-
/** Initiate a .cube archive import (browser-side multipart upload) */
|
|
836
|
-
post: {
|
|
837
|
-
parameters: {
|
|
838
|
-
query?: never;
|
|
839
|
-
header?: never;
|
|
840
|
-
path: {
|
|
841
|
-
spaceId: string;
|
|
842
|
-
};
|
|
843
|
-
cookie?: never;
|
|
844
|
-
};
|
|
845
|
-
requestBody: {
|
|
846
|
-
content: {
|
|
847
|
-
"application/json": {
|
|
848
|
-
diskGbOverride?: number | null;
|
|
849
|
-
expectedConfig?: {
|
|
850
|
-
diskLimitGb?: number;
|
|
851
|
-
ramMb?: number;
|
|
852
|
-
vcpus?: number;
|
|
853
|
-
} | null;
|
|
854
|
-
fileSizeBytes: number;
|
|
855
|
-
name: string;
|
|
856
|
-
ramMbOverride?: number | null;
|
|
857
|
-
region?: string | null;
|
|
858
|
-
/**
|
|
859
|
-
* @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.
|
|
860
|
-
* @default replace
|
|
861
|
-
* @enum {string}
|
|
862
|
-
*/
|
|
863
|
-
sshKeyMode?: "replace" | "keep";
|
|
864
|
-
/** @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`. */
|
|
865
|
-
sshPublicKey?: string | null;
|
|
866
|
-
userData?: string | null;
|
|
867
|
-
vcpusOverride?: number | null;
|
|
868
|
-
};
|
|
869
|
-
};
|
|
870
|
-
};
|
|
871
|
-
responses: {
|
|
872
|
-
/** @description Import initiated; returns presigned part URLs */
|
|
873
|
-
201: {
|
|
874
|
-
headers: {
|
|
875
|
-
[name: string]: unknown;
|
|
876
|
-
};
|
|
877
|
-
content: {
|
|
878
|
-
"application/json": {
|
|
879
|
-
chunkSizeBytes?: number;
|
|
880
|
-
/** Format: date-time */
|
|
881
|
-
expiresAt?: string;
|
|
882
|
-
importId?: string;
|
|
883
|
-
key?: string;
|
|
884
|
-
parts?: {
|
|
885
|
-
partNumber?: number;
|
|
886
|
-
url?: string;
|
|
887
|
-
}[];
|
|
888
|
-
uploadId?: string;
|
|
889
|
-
};
|
|
890
|
-
};
|
|
891
|
-
};
|
|
892
|
-
/** @description Invalid input */
|
|
893
|
-
400: {
|
|
894
|
-
headers: {
|
|
895
|
-
[name: string]: unknown;
|
|
896
|
-
};
|
|
897
|
-
content?: never;
|
|
898
|
-
};
|
|
899
|
-
/** @description Plan limit exceeded */
|
|
900
|
-
403: {
|
|
901
|
-
headers: {
|
|
902
|
-
[name: string]: unknown;
|
|
903
|
-
};
|
|
904
|
-
content?: never;
|
|
905
|
-
};
|
|
906
|
-
/** @description No active storage backend */
|
|
907
|
-
503: {
|
|
908
|
-
headers: {
|
|
909
|
-
[name: string]: unknown;
|
|
910
|
-
};
|
|
911
|
-
content?: never;
|
|
912
|
-
};
|
|
913
|
-
};
|
|
914
|
-
};
|
|
915
|
-
delete?: never;
|
|
916
|
-
options?: never;
|
|
917
|
-
head?: never;
|
|
918
|
-
patch?: never;
|
|
919
|
-
trace?: never;
|
|
920
|
-
};
|
|
921
|
-
"/spaces/{spaceId}/cubes/imports/{importId}": {
|
|
922
|
-
parameters: {
|
|
923
|
-
query?: never;
|
|
924
|
-
header?: never;
|
|
925
|
-
path?: never;
|
|
926
|
-
cookie?: never;
|
|
927
|
-
};
|
|
928
|
-
/** Get the current state of an import */
|
|
929
|
-
get: {
|
|
930
|
-
parameters: {
|
|
931
|
-
query?: never;
|
|
932
|
-
header?: never;
|
|
933
|
-
path: {
|
|
934
|
-
spaceId: string;
|
|
935
|
-
importId: string;
|
|
936
|
-
};
|
|
937
|
-
cookie?: never;
|
|
938
|
-
};
|
|
939
|
-
requestBody?: never;
|
|
940
|
-
responses: {
|
|
941
|
-
/** @description Current import state */
|
|
942
|
-
200: {
|
|
943
|
-
headers: {
|
|
944
|
-
[name: string]: unknown;
|
|
945
|
-
};
|
|
946
|
-
content: {
|
|
947
|
-
"application/json": {
|
|
948
|
-
import?: {
|
|
949
|
-
completedAt?: string | null;
|
|
950
|
-
createdAt?: string;
|
|
951
|
-
cubeId?: string | null;
|
|
952
|
-
error?: string | null;
|
|
953
|
-
id?: string;
|
|
954
|
-
name?: string;
|
|
955
|
-
/** @enum {string} */
|
|
956
|
-
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
957
|
-
updatedAt?: string;
|
|
958
|
-
};
|
|
959
|
-
};
|
|
960
|
-
};
|
|
961
|
-
};
|
|
962
|
-
404: components["responses"]["NotFound"];
|
|
963
|
-
};
|
|
964
|
-
};
|
|
965
|
-
put?: never;
|
|
966
|
-
post?: never;
|
|
967
|
-
/** Cancel an in-flight upload (only allowed in 'uploading' state) */
|
|
968
|
-
delete: {
|
|
969
|
-
parameters: {
|
|
970
|
-
query?: never;
|
|
971
|
-
header?: never;
|
|
972
|
-
path: {
|
|
973
|
-
spaceId: string;
|
|
974
|
-
importId: string;
|
|
975
|
-
};
|
|
976
|
-
cookie?: never;
|
|
977
|
-
};
|
|
978
|
-
requestBody?: never;
|
|
979
|
-
responses: {
|
|
980
|
-
/** @description Cancelled */
|
|
981
|
-
200: {
|
|
982
|
-
headers: {
|
|
983
|
-
[name: string]: unknown;
|
|
984
|
-
};
|
|
985
|
-
content: {
|
|
986
|
-
"application/json": {
|
|
987
|
-
success: boolean;
|
|
988
|
-
};
|
|
989
|
-
};
|
|
990
|
-
};
|
|
991
|
-
404: components["responses"]["NotFound"];
|
|
992
|
-
/** @description Cannot cancel an import past the 'uploading' state */
|
|
993
|
-
409: {
|
|
994
|
-
headers: {
|
|
995
|
-
[name: string]: unknown;
|
|
996
|
-
};
|
|
997
|
-
content?: never;
|
|
998
|
-
};
|
|
999
|
-
};
|
|
1000
|
-
};
|
|
1001
|
-
options?: never;
|
|
1002
|
-
head?: never;
|
|
1003
|
-
patch?: never;
|
|
1004
|
-
trace?: never;
|
|
1005
|
-
};
|
|
1006
|
-
"/spaces/{spaceId}/cubes/imports/{importId}/complete": {
|
|
1007
|
-
parameters: {
|
|
1008
|
-
query?: never;
|
|
1009
|
-
header?: never;
|
|
1010
|
-
path?: never;
|
|
1011
|
-
cookie?: never;
|
|
1012
|
-
};
|
|
1013
|
-
get?: never;
|
|
1014
|
-
put?: never;
|
|
1015
|
-
/** Finalize a .cube import: complete multipart upload + create cube row + enqueue provisioning */
|
|
1016
|
-
post: {
|
|
1017
|
-
parameters: {
|
|
1018
|
-
query?: never;
|
|
1019
|
-
header?: never;
|
|
1020
|
-
path: {
|
|
1021
|
-
spaceId: string;
|
|
1022
|
-
importId: string;
|
|
1023
|
-
};
|
|
1024
|
-
cookie?: never;
|
|
1025
|
-
};
|
|
1026
|
-
requestBody: {
|
|
1027
|
-
content: {
|
|
1028
|
-
"application/json": {
|
|
1029
|
-
config: {
|
|
1030
|
-
diskLimitGb: number;
|
|
1031
|
-
imageId: string;
|
|
1032
|
-
ramMb: number;
|
|
1033
|
-
userData?: string | null;
|
|
1034
|
-
vcpus: number;
|
|
1035
|
-
};
|
|
1036
|
-
parts: {
|
|
1037
|
-
etag: string;
|
|
1038
|
-
partNumber: number;
|
|
1039
|
-
}[];
|
|
1040
|
-
};
|
|
1041
|
-
};
|
|
1042
|
-
};
|
|
1043
|
-
responses: {
|
|
1044
|
-
/** @description Provisioning enqueued */
|
|
1045
|
-
200: {
|
|
1046
|
-
headers: {
|
|
1047
|
-
[name: string]: unknown;
|
|
1048
|
-
};
|
|
1049
|
-
content: {
|
|
1050
|
-
"application/json": {
|
|
1051
|
-
cubeId?: string;
|
|
1052
|
-
importId?: string;
|
|
1053
|
-
/** @enum {string} */
|
|
1054
|
-
status?: "provisioning";
|
|
1055
|
-
};
|
|
1056
|
-
};
|
|
1057
|
-
};
|
|
1058
|
-
/** @description Invalid input */
|
|
1059
|
-
400: {
|
|
1060
|
-
headers: {
|
|
1061
|
-
[name: string]: unknown;
|
|
1062
|
-
};
|
|
1063
|
-
content?: never;
|
|
1064
|
-
};
|
|
1065
|
-
/** @description Plan limit exceeded */
|
|
1066
|
-
403: {
|
|
1067
|
-
headers: {
|
|
1068
|
-
[name: string]: unknown;
|
|
1069
|
-
};
|
|
1070
|
-
content?: never;
|
|
1071
|
-
};
|
|
1072
|
-
/** @description Import not in 'uploading' state */
|
|
1073
|
-
409: {
|
|
1074
|
-
headers: {
|
|
1075
|
-
[name: string]: unknown;
|
|
1076
|
-
};
|
|
1077
|
-
content?: never;
|
|
1078
|
-
};
|
|
1079
|
-
/** @description S3 finalization failed */
|
|
1080
|
-
502: {
|
|
1081
|
-
headers: {
|
|
1082
|
-
[name: string]: unknown;
|
|
1083
|
-
};
|
|
1084
|
-
content?: never;
|
|
1085
|
-
};
|
|
1086
|
-
/** @description Storage backend unavailable */
|
|
1087
|
-
503: {
|
|
1088
|
-
headers: {
|
|
1089
|
-
[name: string]: unknown;
|
|
1090
|
-
};
|
|
1091
|
-
content?: never;
|
|
1092
|
-
};
|
|
1093
|
-
};
|
|
1094
|
-
};
|
|
1095
|
-
delete?: never;
|
|
1096
|
-
options?: never;
|
|
1097
|
-
head?: never;
|
|
1098
|
-
patch?: never;
|
|
1099
|
-
trace?: never;
|
|
1100
|
-
};
|
|
1101
|
-
"/spaces/{spaceId}/cubes/{cubeId}": {
|
|
1102
|
-
parameters: {
|
|
1103
|
-
query?: never;
|
|
1104
|
-
header?: never;
|
|
1105
|
-
path?: never;
|
|
1106
|
-
cookie?: never;
|
|
1107
|
-
};
|
|
1108
|
-
/** Get a Cube */
|
|
1109
|
-
get: {
|
|
1110
|
-
parameters: {
|
|
1111
|
-
query?: never;
|
|
1112
|
-
header?: never;
|
|
1113
|
-
path: {
|
|
1114
|
-
spaceId: string;
|
|
1115
|
-
cubeId: string;
|
|
1116
|
-
};
|
|
1117
|
-
cookie?: never;
|
|
1118
|
-
};
|
|
1119
|
-
requestBody?: never;
|
|
1120
|
-
responses: {
|
|
1121
|
-
/** @description Cube */
|
|
1122
|
-
200: {
|
|
1123
|
-
headers: {
|
|
1124
|
-
[name: string]: unknown;
|
|
1125
|
-
};
|
|
1126
|
-
content: {
|
|
1127
|
-
"application/json": {
|
|
1128
|
-
cube: components["schemas"]["Cube"];
|
|
1129
|
-
};
|
|
1130
|
-
};
|
|
1131
|
-
};
|
|
1132
|
-
404: components["responses"]["NotFound"];
|
|
1133
|
-
};
|
|
1134
|
-
};
|
|
1135
|
-
put?: never;
|
|
1136
|
-
post?: never;
|
|
1137
|
-
/** Delete a Cube (asynchronous) */
|
|
1138
|
-
delete: {
|
|
1139
|
-
parameters: {
|
|
1140
|
-
query?: never;
|
|
1141
|
-
header?: never;
|
|
1142
|
-
path: {
|
|
1143
|
-
spaceId: string;
|
|
1144
|
-
cubeId: string;
|
|
1145
|
-
};
|
|
1146
|
-
cookie?: never;
|
|
1147
|
-
};
|
|
1148
|
-
requestBody?: never;
|
|
1149
|
-
responses: {
|
|
1150
|
-
/** @description Deletion enqueued */
|
|
1151
|
-
200: {
|
|
1152
|
-
headers: {
|
|
1153
|
-
[name: string]: unknown;
|
|
1154
|
-
};
|
|
1155
|
-
content: {
|
|
1156
|
-
"application/json": {
|
|
1157
|
-
success: boolean;
|
|
1158
|
-
};
|
|
1159
|
-
};
|
|
1160
|
-
};
|
|
1161
|
-
404: components["responses"]["NotFound"];
|
|
1162
|
-
/** @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. */
|
|
1163
|
-
409: {
|
|
1164
|
-
headers: {
|
|
1165
|
-
[name: string]: unknown;
|
|
1166
|
-
};
|
|
1167
|
-
content: {
|
|
1168
|
-
"application/json": {
|
|
1169
|
-
error: {
|
|
1170
|
-
/** @enum {string} */
|
|
1171
|
-
code: "termination_protected";
|
|
1172
|
-
cube?: {
|
|
1173
|
-
id?: string;
|
|
1174
|
-
/** Format: date-time */
|
|
1175
|
-
terminationProtectionChangedAt?: string | null;
|
|
1176
|
-
terminationProtectionChangedBy?: string | null;
|
|
1177
|
-
};
|
|
1178
|
-
message: string;
|
|
1179
|
-
};
|
|
1180
|
-
};
|
|
1181
|
-
};
|
|
1182
|
-
};
|
|
1183
|
-
429: components["responses"]["RateLimited"];
|
|
1184
|
-
};
|
|
1185
|
-
};
|
|
1186
|
-
options?: never;
|
|
1187
|
-
head?: never;
|
|
1188
|
-
/**
|
|
1189
|
-
* Update a Cube (toggle termination protection)
|
|
1190
|
-
* @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.
|
|
1191
|
-
*/
|
|
1192
|
-
patch: {
|
|
1193
|
-
parameters: {
|
|
1194
|
-
query?: never;
|
|
1195
|
-
header?: never;
|
|
1196
|
-
path: {
|
|
1197
|
-
spaceId: string;
|
|
1198
|
-
cubeId: string;
|
|
1199
|
-
};
|
|
1200
|
-
cookie?: never;
|
|
1201
|
-
};
|
|
1202
|
-
requestBody: {
|
|
1203
|
-
content: {
|
|
1204
|
-
"application/json": {
|
|
1205
|
-
/** @description Turn protection on or off. Turning it on stamps `terminationProtectionChangedAt` and `terminationProtectionChangedBy`; turning it off clears both. */
|
|
1206
|
-
terminationProtection: boolean;
|
|
1207
|
-
};
|
|
1208
|
-
};
|
|
1209
|
-
};
|
|
1210
|
-
responses: {
|
|
1211
|
-
/** @description The updated Cube */
|
|
1212
|
-
200: {
|
|
1213
|
-
headers: {
|
|
1214
|
-
[name: string]: unknown;
|
|
1215
|
-
};
|
|
1216
|
-
content: {
|
|
1217
|
-
"application/json": {
|
|
1218
|
-
cube: components["schemas"]["Cube"];
|
|
1219
|
-
};
|
|
1220
|
-
};
|
|
1221
|
-
};
|
|
1222
|
-
400: components["responses"]["BadRequest"];
|
|
1223
|
-
404: components["responses"]["NotFound"];
|
|
1224
|
-
429: components["responses"]["RateLimited"];
|
|
1225
|
-
};
|
|
1226
|
-
};
|
|
1227
|
-
trace?: never;
|
|
1228
|
-
};
|
|
1229
|
-
"/spaces/{spaceId}/cubes/{cubeId}/domains": {
|
|
1230
|
-
parameters: {
|
|
1231
|
-
query?: never;
|
|
1232
|
-
header?: never;
|
|
1233
|
-
path?: never;
|
|
1234
|
-
cookie?: never;
|
|
1235
|
-
};
|
|
1236
|
-
/** List custom domains attached to a Cube */
|
|
1237
|
-
get: {
|
|
1238
|
-
parameters: {
|
|
1239
|
-
query?: never;
|
|
1240
|
-
header?: never;
|
|
1241
|
-
path: {
|
|
1242
|
-
spaceId: string;
|
|
1243
|
-
cubeId: string;
|
|
1244
|
-
};
|
|
1245
|
-
cookie?: never;
|
|
1246
|
-
};
|
|
1247
|
-
requestBody?: never;
|
|
1248
|
-
responses: {
|
|
1249
|
-
/** @description Domain list */
|
|
1250
|
-
200: {
|
|
1251
|
-
headers: {
|
|
1252
|
-
[name: string]: unknown;
|
|
1253
|
-
};
|
|
1254
|
-
content: {
|
|
1255
|
-
"application/json": {
|
|
1256
|
-
domains: components["schemas"]["Domain"][];
|
|
1257
|
-
};
|
|
1258
|
-
};
|
|
1259
|
-
};
|
|
1260
|
-
};
|
|
1261
|
-
};
|
|
1262
|
-
put?: never;
|
|
1263
|
-
/**
|
|
1264
|
-
* Attach a custom domain to a Cube
|
|
1265
|
-
* @description Attaches a domain and optionally configures any per-domain proxy settings at the same time. Settings can also be changed later via PATCH.
|
|
1266
|
-
*/
|
|
1267
|
-
post: {
|
|
1268
|
-
parameters: {
|
|
1269
|
-
query?: never;
|
|
1270
|
-
header?: {
|
|
1271
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1272
|
-
"Idempotency-Key"?: string;
|
|
1273
|
-
};
|
|
1274
|
-
path: {
|
|
1275
|
-
spaceId: string;
|
|
1276
|
-
cubeId: string;
|
|
1277
|
-
};
|
|
1278
|
-
cookie?: never;
|
|
1279
|
-
};
|
|
1280
|
-
requestBody: {
|
|
1281
|
-
content: {
|
|
1282
|
-
"application/json": {
|
|
1283
|
-
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
1284
|
-
basicAuthPassword?: string;
|
|
1285
|
-
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
1286
|
-
basicAuthUser?: string | null;
|
|
1287
|
-
/** @description Accept a save that leaves domains on the same cube port with different proxyProtocol settings (for an app that handles both on one port, or mid-migration). Not stored. */
|
|
1288
|
-
confirmMixedProxyProtocol?: boolean;
|
|
1289
|
-
/** @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. */
|
|
1290
|
-
corsConfig?: {
|
|
1291
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1292
|
-
allowCredentials?: boolean;
|
|
1293
|
-
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
1294
|
-
allowedHeaders?: string[];
|
|
1295
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
1296
|
-
allowedMethods?: string[];
|
|
1297
|
-
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
1298
|
-
allowedOrigins: string[];
|
|
1299
|
-
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
1300
|
-
exposedHeaders?: string[];
|
|
1301
|
-
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
1302
|
-
maxAgeSeconds?: number;
|
|
1303
|
-
} | null;
|
|
1304
|
-
/** @description The hostname to attach, e.g. app.example.com */
|
|
1305
|
-
domain: string;
|
|
1306
|
-
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
1307
|
-
ipAllowList?: string[] | null;
|
|
1308
|
-
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
1309
|
-
ipDenyList?: string[] | null;
|
|
1310
|
-
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
1311
|
-
maxRequestBodyMb?: number | null;
|
|
1312
|
-
/**
|
|
1313
|
-
* @description Scheme the edge speaks to the CUBE on the backend hop. http (default) = cleartext. https = the cube terminates TLS itself (a control panel holding its own certificate, or an app listening on HTTPS) and answers plain HTTP with a redirect, so it cannot be reached over cleartext at all. Visitors are on HTTPS either way. The dial port is derived: https on the default port 80 connects on 443; a deliberate custom port is honored exactly. Applied as saved: if the cube does not serve this hostname over HTTPS, requests to the domain fail until you set it back to http.
|
|
1314
|
-
* @enum {string}
|
|
1315
|
-
*/
|
|
1316
|
-
originScheme?: "http" | "https";
|
|
1317
|
-
/** @description Cube port the domain proxies to. */
|
|
1318
|
-
port: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* @description Send a PROXY protocol header (v1 text or v2 binary) at the start of every connection to the cube, so the app reads the visitor's address from the connection itself, as on a plain VPS. Null (default) = off. The app must accept PROXY protocol on this port, or every request to the domain fails; it is applied as saved. Every domain on the same cube port must use the same setting: a save that would mix them is refused with 409 unless confirmMixedProxyProtocol is true.
|
|
1321
|
-
* @enum {string|null}
|
|
1322
|
-
*/
|
|
1323
|
-
proxyProtocol?: "v1" | "v2" | null;
|
|
1324
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1325
|
-
requestHeaderOverrides?: {
|
|
1326
|
-
remove?: string[];
|
|
1327
|
-
set?: {
|
|
1328
|
-
[key: string]: string;
|
|
1329
|
-
};
|
|
1330
|
-
} | null;
|
|
1331
|
-
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
1332
|
-
responseCompression?: boolean;
|
|
1333
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1334
|
-
responseHeaderOverrides?: {
|
|
1335
|
-
remove?: string[];
|
|
1336
|
-
set?: {
|
|
1337
|
-
[key: string]: string;
|
|
1338
|
-
};
|
|
1339
|
-
} | null;
|
|
1340
|
-
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
1341
|
-
responseHeaderTimeoutSecs?: number;
|
|
1342
|
-
/**
|
|
1343
|
-
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
1344
|
-
* @enum {string}
|
|
1345
|
-
*/
|
|
1346
|
-
securityHeadersMode?: "enforced" | "app_managed";
|
|
1347
|
-
};
|
|
1348
|
-
};
|
|
1349
|
-
};
|
|
1350
|
-
responses: {
|
|
1351
|
-
/** @description Domain attached */
|
|
1352
|
-
201: {
|
|
1353
|
-
headers: {
|
|
1354
|
-
[name: string]: unknown;
|
|
1355
|
-
};
|
|
1356
|
-
content: {
|
|
1357
|
-
"application/json": {
|
|
1358
|
-
domain: components["schemas"]["Domain"];
|
|
1359
|
-
records: components["schemas"]["DnsRecord"][];
|
|
1360
|
-
};
|
|
1361
|
-
};
|
|
1362
|
-
};
|
|
1363
|
-
400: components["responses"]["BadRequest"];
|
|
1364
|
-
/** @description Refused. Among other reasons (the domain is in use or is being removed; or, temporarily, the Cube is in the last stretch of a move to another server, refused with the error "This cube is being moved to another server. Try again in a minute." and accepted once the move ends): the save would leave domains on the same cube port with different proxyProtocol settings. Then `errorMeta.code` is `proxy_protocol_port_mismatch`, with `errorMeta.port` and `errorMeta.domains` naming the other domains. Change them together, or resend with confirmMixedProxyProtocol: true. */
|
|
1365
|
-
409: {
|
|
1366
|
-
headers: {
|
|
1367
|
-
[name: string]: unknown;
|
|
1368
|
-
};
|
|
1369
|
-
content?: never;
|
|
1370
|
-
};
|
|
1371
|
-
429: components["responses"]["RateLimited"];
|
|
1372
|
-
};
|
|
1373
|
-
};
|
|
1374
|
-
delete?: never;
|
|
1375
|
-
options?: never;
|
|
1376
|
-
head?: never;
|
|
1377
|
-
patch?: never;
|
|
1378
|
-
trace?: never;
|
|
1379
|
-
};
|
|
1380
|
-
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}": {
|
|
1381
|
-
parameters: {
|
|
1382
|
-
query?: never;
|
|
1383
|
-
header?: never;
|
|
1384
|
-
path?: never;
|
|
1385
|
-
cookie?: never;
|
|
1386
|
-
};
|
|
1387
|
-
get?: never;
|
|
1388
|
-
put?: never;
|
|
1389
|
-
post?: never;
|
|
1390
|
-
/** Detach a custom domain */
|
|
1391
|
-
delete: {
|
|
1392
|
-
parameters: {
|
|
1393
|
-
query?: never;
|
|
1394
|
-
header?: never;
|
|
1395
|
-
path: {
|
|
1396
|
-
spaceId: string;
|
|
1397
|
-
cubeId: string;
|
|
1398
|
-
mappingId: string;
|
|
1399
|
-
};
|
|
1400
|
-
cookie?: never;
|
|
1401
|
-
};
|
|
1402
|
-
requestBody?: never;
|
|
1403
|
-
responses: {
|
|
1404
|
-
/** @description Detached */
|
|
1405
|
-
200: {
|
|
1406
|
-
headers: {
|
|
1407
|
-
[name: string]: unknown;
|
|
1408
|
-
};
|
|
1409
|
-
content: {
|
|
1410
|
-
"application/json": {
|
|
1411
|
-
success: boolean;
|
|
1412
|
-
};
|
|
1413
|
-
};
|
|
1414
|
-
};
|
|
1415
|
-
404: components["responses"]["NotFound"];
|
|
1416
|
-
/** @description Refused because the change conflicts with the Cube's current state, for example the port is already in use or the mapping is already being removed. One such conflict is temporary: in the last stretch of a move of the Cube to another server the change is refused with the error "This cube is being moved to another server. Try again in a minute." Nothing was changed then, and the same request is accepted once the move ends. */
|
|
1417
|
-
409: {
|
|
1418
|
-
headers: {
|
|
1419
|
-
[name: string]: unknown;
|
|
1420
|
-
};
|
|
1421
|
-
content?: never;
|
|
1422
|
-
};
|
|
1423
|
-
};
|
|
1424
|
-
};
|
|
1425
|
-
options?: never;
|
|
1426
|
-
head?: never;
|
|
1427
|
-
/**
|
|
1428
|
-
* Update a custom domain's proxy settings
|
|
1429
|
-
* @description Partial update — only the fields you send change; omitted fields are left as-is. The Basic Auth password is write-only and bcrypt-hashed server-side.
|
|
1430
|
-
*/
|
|
1431
|
-
patch: {
|
|
1432
|
-
parameters: {
|
|
1433
|
-
query?: never;
|
|
1434
|
-
header?: never;
|
|
1435
|
-
path: {
|
|
1436
|
-
spaceId: string;
|
|
1437
|
-
cubeId: string;
|
|
1438
|
-
mappingId: string;
|
|
1439
|
-
};
|
|
1440
|
-
cookie?: never;
|
|
1441
|
-
};
|
|
1442
|
-
requestBody: {
|
|
1443
|
-
content: {
|
|
1444
|
-
"application/json": {
|
|
1445
|
-
/** @description Plaintext Basic Auth password — bcrypt-hashed server-side, never stored or returned. Required when setting basicAuthUser. */
|
|
1446
|
-
basicAuthPassword?: string;
|
|
1447
|
-
/** @description HTTP Basic Auth username. Null/empty clears Basic Auth. Setting it requires basicAuthPassword. */
|
|
1448
|
-
basicAuthUser?: string | null;
|
|
1449
|
-
/** @description Accept a save that leaves domains on the same cube port with different proxyProtocol settings (for an app that handles both on one port, or mid-migration). Not stored. */
|
|
1450
|
-
confirmMixedProxyProtocol?: boolean;
|
|
1451
|
-
/** @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. */
|
|
1452
|
-
corsConfig?: {
|
|
1453
|
-
/** @description Send Access-Control-Allow-Credentials: true. Rejected together with the "*" origin. */
|
|
1454
|
-
allowCredentials?: boolean;
|
|
1455
|
-
/** @description Allowed request headers. Omitted/empty = echo the preflight's Access-Control-Request-Headers. */
|
|
1456
|
-
allowedHeaders?: string[];
|
|
1457
|
-
/** @description Allowed methods. Omitted = GET, POST, PUT, PATCH, DELETE, OPTIONS. */
|
|
1458
|
-
allowedMethods?: string[];
|
|
1459
|
-
/** @description Exact scheme://host[:port] origins (no path, query or trailing slash), or the single-element wildcard ["*"]. "*" and allowCredentials are mutually exclusive. */
|
|
1460
|
-
allowedOrigins: string[];
|
|
1461
|
-
/** @description Response headers exposed to JS. Omitted/empty = none. */
|
|
1462
|
-
exposedHeaders?: string[];
|
|
1463
|
-
/** @description Preflight cache TTL. Default 600; 86400 is Chromium's hard cap. */
|
|
1464
|
-
maxAgeSeconds?: number;
|
|
1465
|
-
} | null;
|
|
1466
|
-
/** @description Visitor IP/CIDR allow-list (v4+v6). Non-empty ⇒ only these reach the app. Null/empty = open. */
|
|
1467
|
-
ipAllowList?: string[] | null;
|
|
1468
|
-
/** @description Visitor IP/CIDR deny-list (v4+v6) → 403. Null/empty = none. */
|
|
1469
|
-
ipDenyList?: string[] | null;
|
|
1470
|
-
/** @description Max request body size (MB). Null = unlimited (default). */
|
|
1471
|
-
maxRequestBodyMb?: number | null;
|
|
1472
|
-
/**
|
|
1473
|
-
* @description Scheme the edge speaks to the CUBE on the backend hop. http (default) = cleartext. https = the cube terminates TLS itself (a control panel holding its own certificate, or an app listening on HTTPS) and answers plain HTTP with a redirect, so it cannot be reached over cleartext at all. Visitors are on HTTPS either way. The dial port is derived: https on the default port 80 connects on 443; a deliberate custom port is honored exactly. Applied as saved: if the cube does not serve this hostname over HTTPS, requests to the domain fail until you set it back to http.
|
|
1474
|
-
* @enum {string}
|
|
1475
|
-
*/
|
|
1476
|
-
originScheme?: "http" | "https";
|
|
1477
|
-
/**
|
|
1478
|
-
* @description Send a PROXY protocol header (v1 text or v2 binary) at the start of every connection to the cube, so the app reads the visitor's address from the connection itself, as on a plain VPS. Null (default) = off. The app must accept PROXY protocol on this port, or every request to the domain fails; it is applied as saved. Every domain on the same cube port must use the same setting: a save that would mix them is refused with 409 unless confirmMixedProxyProtocol is true.
|
|
1479
|
-
* @enum {string|null}
|
|
1480
|
-
*/
|
|
1481
|
-
proxyProtocol?: "v1" | "v2" | null;
|
|
1482
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1483
|
-
requestHeaderOverrides?: {
|
|
1484
|
-
remove?: string[];
|
|
1485
|
-
set?: {
|
|
1486
|
-
[key: string]: string;
|
|
1487
|
-
};
|
|
1488
|
-
} | null;
|
|
1489
|
-
/** @description Edge gzip/zstd compression. Default false (domains behind a CDN are already compressed there). */
|
|
1490
|
-
responseCompression?: boolean;
|
|
1491
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
1492
|
-
responseHeaderOverrides?: {
|
|
1493
|
-
remove?: string[];
|
|
1494
|
-
set?: {
|
|
1495
|
-
[key: string]: string;
|
|
1496
|
-
};
|
|
1497
|
-
} | null;
|
|
1498
|
-
/** @description Seconds the app may take to send response headers (streaming unaffected). Default 60. */
|
|
1499
|
-
responseHeaderTimeoutSecs?: number;
|
|
1500
|
-
/**
|
|
1501
|
-
* @description enforced = proxy sets platform security headers (HSTS, X-Frame-Options, …); app_managed = the app's own headers pass through. Default enforced.
|
|
1502
|
-
* @enum {string}
|
|
1503
|
-
*/
|
|
1504
|
-
securityHeadersMode?: "enforced" | "app_managed";
|
|
1505
|
-
};
|
|
1506
|
-
};
|
|
1507
|
-
};
|
|
1508
|
-
responses: {
|
|
1509
|
-
/** @description Settings updated */
|
|
1510
|
-
200: {
|
|
1511
|
-
headers: {
|
|
1512
|
-
[name: string]: unknown;
|
|
1513
|
-
};
|
|
1514
|
-
content: {
|
|
1515
|
-
"application/json": {
|
|
1516
|
-
domain: components["schemas"]["Domain"];
|
|
1517
|
-
};
|
|
1518
|
-
};
|
|
1519
|
-
};
|
|
1520
|
-
400: components["responses"]["BadRequest"];
|
|
1521
|
-
404: components["responses"]["NotFound"];
|
|
1522
|
-
/** @description Refused. Among other reasons (the domain is in use or is being removed; or, temporarily, the Cube is in the last stretch of a move to another server, refused with the error "This cube is being moved to another server. Try again in a minute." and accepted once the move ends): the save would leave domains on the same cube port with different proxyProtocol settings. Then `errorMeta.code` is `proxy_protocol_port_mismatch`, with `errorMeta.port` and `errorMeta.domains` naming the other domains. Change them together, or resend with confirmMixedProxyProtocol: true. */
|
|
1523
|
-
409: {
|
|
1524
|
-
headers: {
|
|
1525
|
-
[name: string]: unknown;
|
|
1526
|
-
};
|
|
1527
|
-
content?: never;
|
|
1528
|
-
};
|
|
1529
|
-
429: components["responses"]["RateLimited"];
|
|
1530
|
-
};
|
|
1531
|
-
};
|
|
1532
|
-
trace?: never;
|
|
1533
|
-
};
|
|
1534
|
-
"/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}/records": {
|
|
1535
|
-
parameters: {
|
|
1536
|
-
query?: never;
|
|
1537
|
-
header?: never;
|
|
1538
|
-
path?: never;
|
|
1539
|
-
cookie?: never;
|
|
1540
|
-
};
|
|
1541
|
-
/**
|
|
1542
|
-
* DNS records this domain needs, with their live status
|
|
1543
|
-
* @description Every record required for the domain to work, each checked against live DNS. Poll this after publishing them.
|
|
1544
|
-
*
|
|
1545
|
-
* `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`.
|
|
1546
|
-
*
|
|
1547
|
-
* A wildcard needs three records; an exact host needs one. Each call performs live DNS lookups and is rate limited.
|
|
1548
|
-
*/
|
|
1549
|
-
get: {
|
|
1550
|
-
parameters: {
|
|
1551
|
-
query?: never;
|
|
1552
|
-
header?: never;
|
|
1553
|
-
path: {
|
|
1554
|
-
spaceId: string;
|
|
1555
|
-
cubeId: string;
|
|
1556
|
-
mappingId: string;
|
|
1557
|
-
};
|
|
1558
|
-
cookie?: never;
|
|
1559
|
-
};
|
|
1560
|
-
requestBody?: never;
|
|
1561
|
-
responses: {
|
|
1562
|
-
/** @description Required records with live status */
|
|
1563
|
-
200: {
|
|
1564
|
-
headers: {
|
|
1565
|
-
[name: string]: unknown;
|
|
1566
|
-
};
|
|
1567
|
-
content: {
|
|
1568
|
-
"application/json": {
|
|
1569
|
-
/** Format: date-time */
|
|
1570
|
-
checkedAt: string;
|
|
1571
|
-
domain: string;
|
|
1572
|
-
isWildcard: boolean;
|
|
1573
|
-
records: components["schemas"]["DnsRecordStatus"][];
|
|
1574
|
-
summary: {
|
|
1575
|
-
complete: boolean;
|
|
1576
|
-
found: number;
|
|
1577
|
-
total: number;
|
|
1578
|
-
};
|
|
1579
|
-
};
|
|
1580
|
-
};
|
|
1581
|
-
};
|
|
1582
|
-
404: components["responses"]["NotFound"];
|
|
1583
|
-
429: components["responses"]["RateLimited"];
|
|
1584
|
-
};
|
|
1585
|
-
};
|
|
1586
|
-
put?: never;
|
|
1587
|
-
post?: never;
|
|
1588
|
-
delete?: never;
|
|
1589
|
-
options?: never;
|
|
1590
|
-
head?: never;
|
|
1591
|
-
patch?: never;
|
|
1592
|
-
trace?: never;
|
|
1593
|
-
};
|
|
1594
|
-
"/spaces/{spaceId}/cubes/{cubeId}/power-off": {
|
|
1595
|
-
parameters: {
|
|
1596
|
-
query?: never;
|
|
1597
|
-
header?: never;
|
|
1598
|
-
path?: never;
|
|
1599
|
-
cookie?: never;
|
|
1600
|
-
};
|
|
1601
|
-
get?: never;
|
|
1602
|
-
put?: never;
|
|
1603
|
-
/** Power off a running Cube */
|
|
1604
|
-
post: {
|
|
1605
|
-
parameters: {
|
|
1606
|
-
query?: never;
|
|
1607
|
-
header?: never;
|
|
1608
|
-
path: {
|
|
1609
|
-
spaceId: string;
|
|
1610
|
-
cubeId: string;
|
|
1611
|
-
};
|
|
1612
|
-
cookie?: never;
|
|
1613
|
-
};
|
|
1614
|
-
requestBody?: never;
|
|
1615
|
-
responses: {
|
|
1616
|
-
/** @description Power off enqueued */
|
|
1617
|
-
200: {
|
|
1618
|
-
headers: {
|
|
1619
|
-
[name: string]: unknown;
|
|
1620
|
-
};
|
|
1621
|
-
content?: never;
|
|
1622
|
-
};
|
|
1623
|
-
404: components["responses"]["NotFound"];
|
|
1624
|
-
429: components["responses"]["RateLimited"];
|
|
1625
|
-
};
|
|
1626
|
-
};
|
|
1627
|
-
delete?: never;
|
|
1628
|
-
options?: never;
|
|
1629
|
-
head?: never;
|
|
1630
|
-
patch?: never;
|
|
1631
|
-
trace?: never;
|
|
1632
|
-
};
|
|
1633
|
-
"/spaces/{spaceId}/cubes/{cubeId}/restart": {
|
|
1634
|
-
parameters: {
|
|
1635
|
-
query?: never;
|
|
1636
|
-
header?: never;
|
|
1637
|
-
path?: never;
|
|
1638
|
-
cookie?: never;
|
|
1639
|
-
};
|
|
1640
|
-
get?: never;
|
|
1641
|
-
put?: never;
|
|
1642
|
-
/**
|
|
1643
|
-
* Restart a running Cube
|
|
1644
|
-
* @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.
|
|
1645
|
-
*/
|
|
1646
|
-
post: {
|
|
1647
|
-
parameters: {
|
|
1648
|
-
query?: never;
|
|
1649
|
-
header?: never;
|
|
1650
|
-
path: {
|
|
1651
|
-
spaceId: string;
|
|
1652
|
-
cubeId: string;
|
|
1653
|
-
};
|
|
1654
|
-
cookie?: never;
|
|
1655
|
-
};
|
|
1656
|
-
requestBody?: never;
|
|
1657
|
-
responses: {
|
|
1658
|
-
/** @description Restart enqueued */
|
|
1659
|
-
200: {
|
|
1660
|
-
headers: {
|
|
1661
|
-
[name: string]: unknown;
|
|
1662
|
-
};
|
|
1663
|
-
content?: never;
|
|
1664
|
-
};
|
|
1665
|
-
404: components["responses"]["NotFound"];
|
|
1666
|
-
/** @description Cube is not running, or a restart is already in progress */
|
|
1667
|
-
409: {
|
|
1668
|
-
headers: {
|
|
1669
|
-
[name: string]: unknown;
|
|
1670
|
-
};
|
|
1671
|
-
content?: never;
|
|
1672
|
-
};
|
|
1673
|
-
429: components["responses"]["RateLimited"];
|
|
1674
|
-
};
|
|
1675
|
-
};
|
|
1676
|
-
delete?: never;
|
|
1677
|
-
options?: never;
|
|
1678
|
-
head?: never;
|
|
1679
|
-
patch?: never;
|
|
1680
|
-
trace?: never;
|
|
1681
|
-
};
|
|
1682
|
-
"/spaces/{spaceId}/cubes/{cubeId}/restore": {
|
|
1683
|
-
parameters: {
|
|
1684
|
-
query?: never;
|
|
1685
|
-
header?: never;
|
|
1686
|
-
path?: never;
|
|
1687
|
-
cookie?: never;
|
|
1688
|
-
};
|
|
1689
|
-
get?: never;
|
|
1690
|
-
put?: never;
|
|
1691
|
-
/** Restore a Cube from a snapshot */
|
|
1692
|
-
post: {
|
|
1693
|
-
parameters: {
|
|
1694
|
-
query?: never;
|
|
1695
|
-
header?: never;
|
|
1696
|
-
path: {
|
|
1697
|
-
spaceId: string;
|
|
1698
|
-
cubeId: string;
|
|
1699
|
-
};
|
|
1700
|
-
cookie?: never;
|
|
1701
|
-
};
|
|
1702
|
-
requestBody: {
|
|
1703
|
-
content: {
|
|
1704
|
-
"application/json": {
|
|
1705
|
-
snapshotId: string;
|
|
1706
|
-
};
|
|
1707
|
-
};
|
|
1708
|
-
};
|
|
1709
|
-
responses: {
|
|
1710
|
-
/** @description Restore enqueued */
|
|
1711
|
-
200: {
|
|
1712
|
-
headers: {
|
|
1713
|
-
[name: string]: unknown;
|
|
1714
|
-
};
|
|
1715
|
-
content: {
|
|
1716
|
-
"application/json": {
|
|
1717
|
-
success: boolean;
|
|
1718
|
-
};
|
|
1719
|
-
};
|
|
1720
|
-
};
|
|
1721
|
-
404: components["responses"]["NotFound"];
|
|
1722
|
-
};
|
|
1723
|
-
};
|
|
1724
|
-
delete?: never;
|
|
1725
|
-
options?: never;
|
|
1726
|
-
head?: never;
|
|
1727
|
-
patch?: never;
|
|
1728
|
-
trace?: never;
|
|
1729
|
-
};
|
|
1730
|
-
"/spaces/{spaceId}/cubes/{cubeId}/snapshots": {
|
|
1731
|
-
parameters: {
|
|
1732
|
-
query?: never;
|
|
1733
|
-
header?: never;
|
|
1734
|
-
path?: never;
|
|
1735
|
-
cookie?: never;
|
|
1736
|
-
};
|
|
1737
|
-
/** List snapshots for a Cube */
|
|
1738
|
-
get: {
|
|
1739
|
-
parameters: {
|
|
1740
|
-
query?: never;
|
|
1741
|
-
header?: never;
|
|
1742
|
-
path: {
|
|
1743
|
-
spaceId: string;
|
|
1744
|
-
cubeId: string;
|
|
1745
|
-
};
|
|
1746
|
-
cookie?: never;
|
|
1747
|
-
};
|
|
1748
|
-
requestBody?: never;
|
|
1749
|
-
responses: {
|
|
1750
|
-
/** @description Snapshot list */
|
|
1751
|
-
200: {
|
|
1752
|
-
headers: {
|
|
1753
|
-
[name: string]: unknown;
|
|
1754
|
-
};
|
|
1755
|
-
content: {
|
|
1756
|
-
"application/json": {
|
|
1757
|
-
snapshots: components["schemas"]["Snapshot"][];
|
|
1758
|
-
};
|
|
1759
|
-
};
|
|
1760
|
-
};
|
|
1761
|
-
};
|
|
1762
|
-
};
|
|
1763
|
-
put?: never;
|
|
1764
|
-
/** Create a snapshot */
|
|
1765
|
-
post: {
|
|
1766
|
-
parameters: {
|
|
1767
|
-
query?: never;
|
|
1768
|
-
header?: {
|
|
1769
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1770
|
-
"Idempotency-Key"?: string;
|
|
1771
|
-
};
|
|
1772
|
-
path: {
|
|
1773
|
-
spaceId: string;
|
|
1774
|
-
cubeId: string;
|
|
1775
|
-
};
|
|
1776
|
-
cookie?: never;
|
|
1777
|
-
};
|
|
1778
|
-
requestBody?: {
|
|
1779
|
-
content: {
|
|
1780
|
-
"application/json": {
|
|
1781
|
-
name?: string;
|
|
1782
|
-
};
|
|
1783
|
-
};
|
|
1784
|
-
};
|
|
1785
|
-
responses: {
|
|
1786
|
-
/** @description Snapshot enqueued */
|
|
1787
|
-
201: {
|
|
1788
|
-
headers: {
|
|
1789
|
-
[name: string]: unknown;
|
|
1790
|
-
};
|
|
1791
|
-
content: {
|
|
1792
|
-
"application/json": {
|
|
1793
|
-
snapshot: components["schemas"]["Snapshot"];
|
|
1794
|
-
};
|
|
1795
|
-
};
|
|
1796
|
-
};
|
|
1797
|
-
429: components["responses"]["RateLimited"];
|
|
1798
|
-
};
|
|
1799
|
-
};
|
|
1800
|
-
delete?: never;
|
|
1801
|
-
options?: never;
|
|
1802
|
-
head?: never;
|
|
1803
|
-
patch?: never;
|
|
1804
|
-
trace?: never;
|
|
1805
|
-
};
|
|
1806
|
-
"/spaces/{spaceId}/cubes/{cubeId}/snapshots/{snapshotId}": {
|
|
1807
|
-
parameters: {
|
|
1808
|
-
query?: never;
|
|
1809
|
-
header?: never;
|
|
1810
|
-
path?: never;
|
|
1811
|
-
cookie?: never;
|
|
1812
|
-
};
|
|
1813
|
-
get?: never;
|
|
1814
|
-
put?: never;
|
|
1815
|
-
post?: never;
|
|
1816
|
-
/** Delete a snapshot */
|
|
1817
|
-
delete: {
|
|
1818
|
-
parameters: {
|
|
1819
|
-
query?: never;
|
|
1820
|
-
header?: never;
|
|
1821
|
-
path: {
|
|
1822
|
-
spaceId: string;
|
|
1823
|
-
cubeId: string;
|
|
1824
|
-
snapshotId: string;
|
|
1825
|
-
};
|
|
1826
|
-
cookie?: never;
|
|
1827
|
-
};
|
|
1828
|
-
requestBody?: never;
|
|
1829
|
-
responses: {
|
|
1830
|
-
/** @description Deleted */
|
|
1831
|
-
200: {
|
|
1832
|
-
headers: {
|
|
1833
|
-
[name: string]: unknown;
|
|
1834
|
-
};
|
|
1835
|
-
content: {
|
|
1836
|
-
"application/json": {
|
|
1837
|
-
success: boolean;
|
|
1838
|
-
};
|
|
1839
|
-
};
|
|
1840
|
-
};
|
|
1841
|
-
404: components["responses"]["NotFound"];
|
|
1842
|
-
};
|
|
1843
|
-
};
|
|
1844
|
-
options?: never;
|
|
1845
|
-
head?: never;
|
|
1846
|
-
patch?: never;
|
|
1847
|
-
trace?: never;
|
|
1848
|
-
};
|
|
1849
|
-
"/spaces/{spaceId}/cubes/{cubeId}/ssh": {
|
|
1850
|
-
parameters: {
|
|
1851
|
-
query?: never;
|
|
1852
|
-
header?: never;
|
|
1853
|
-
path?: never;
|
|
1854
|
-
cookie?: never;
|
|
1855
|
-
};
|
|
1856
|
-
/**
|
|
1857
|
-
* Get a Cube's SSH connection info
|
|
1858
|
-
* @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.
|
|
1859
|
-
*/
|
|
1860
|
-
get: {
|
|
1861
|
-
parameters: {
|
|
1862
|
-
query?: never;
|
|
1863
|
-
header?: never;
|
|
1864
|
-
path: {
|
|
1865
|
-
spaceId: string;
|
|
1866
|
-
cubeId: string;
|
|
1867
|
-
};
|
|
1868
|
-
cookie?: never;
|
|
1869
|
-
};
|
|
1870
|
-
requestBody?: never;
|
|
1871
|
-
responses: {
|
|
1872
|
-
/** @description SSH connection info */
|
|
1873
|
-
200: {
|
|
1874
|
-
headers: {
|
|
1875
|
-
[name: string]: unknown;
|
|
1876
|
-
};
|
|
1877
|
-
content: {
|
|
1878
|
-
"application/json": components["schemas"]["CubeSshInfo"];
|
|
1879
|
-
};
|
|
1880
|
-
};
|
|
1881
|
-
404: components["responses"]["NotFound"];
|
|
1882
|
-
};
|
|
1883
|
-
};
|
|
1884
|
-
put?: never;
|
|
1885
|
-
post?: never;
|
|
1886
|
-
delete?: never;
|
|
1887
|
-
options?: never;
|
|
1888
|
-
head?: never;
|
|
1889
|
-
patch?: never;
|
|
1890
|
-
trace?: never;
|
|
1891
|
-
};
|
|
1892
|
-
"/spaces/{spaceId}/cubes/{cubeId}/ssh-port": {
|
|
1893
|
-
parameters: {
|
|
1894
|
-
query?: never;
|
|
1895
|
-
header?: never;
|
|
1896
|
-
path?: never;
|
|
1897
|
-
cookie?: never;
|
|
1898
|
-
};
|
|
1899
|
-
get?: never;
|
|
1900
|
-
/**
|
|
1901
|
-
* Change a Cube's SSH port
|
|
1902
|
-
* @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).
|
|
1903
|
-
*/
|
|
1904
|
-
put: {
|
|
1905
|
-
parameters: {
|
|
1906
|
-
query?: never;
|
|
1907
|
-
header?: never;
|
|
1908
|
-
path: {
|
|
1909
|
-
spaceId: string;
|
|
1910
|
-
cubeId: string;
|
|
1911
|
-
};
|
|
1912
|
-
cookie?: never;
|
|
1913
|
-
};
|
|
1914
|
-
requestBody: {
|
|
1915
|
-
content: {
|
|
1916
|
-
"application/json": {
|
|
1917
|
-
/** @description The port inside the Cube that sshd listens on (default 22). This is the Cube side of the mapping, not the host port. */
|
|
1918
|
-
cubePort: number;
|
|
1919
|
-
};
|
|
1920
|
-
};
|
|
1921
|
-
};
|
|
1922
|
-
responses: {
|
|
1923
|
-
/** @description SSH port updated */
|
|
1924
|
-
200: {
|
|
1925
|
-
headers: {
|
|
1926
|
-
[name: string]: unknown;
|
|
1927
|
-
};
|
|
1928
|
-
content?: never;
|
|
1929
|
-
};
|
|
1930
|
-
400: components["responses"]["BadRequest"];
|
|
1931
|
-
404: components["responses"]["NotFound"];
|
|
1932
|
-
/** @description Refused because the change conflicts with the Cube's current state, for example the port is already in use or the mapping is already being removed. One such conflict is temporary: in the last stretch of a move of the Cube to another server the change is refused with the error "This cube is being moved to another server. Try again in a minute." Nothing was changed then, and the same request is accepted once the move ends. */
|
|
1933
|
-
409: {
|
|
1934
|
-
headers: {
|
|
1935
|
-
[name: string]: unknown;
|
|
1936
|
-
};
|
|
1937
|
-
content?: never;
|
|
1938
|
-
};
|
|
1939
|
-
429: components["responses"]["RateLimited"];
|
|
1940
|
-
};
|
|
1941
|
-
};
|
|
1942
|
-
post?: never;
|
|
1943
|
-
delete?: never;
|
|
1944
|
-
options?: never;
|
|
1945
|
-
head?: never;
|
|
1946
|
-
patch?: never;
|
|
1947
|
-
trace?: never;
|
|
1948
|
-
};
|
|
1949
|
-
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings": {
|
|
1950
|
-
parameters: {
|
|
1951
|
-
query?: never;
|
|
1952
|
-
header?: never;
|
|
1953
|
-
path?: never;
|
|
1954
|
-
cookie?: never;
|
|
1955
|
-
};
|
|
1956
|
-
/** List TCP port forwards for a Cube */
|
|
1957
|
-
get: {
|
|
1958
|
-
parameters: {
|
|
1959
|
-
query?: never;
|
|
1960
|
-
header?: never;
|
|
1961
|
-
path: {
|
|
1962
|
-
spaceId: string;
|
|
1963
|
-
cubeId: string;
|
|
1964
|
-
};
|
|
1965
|
-
cookie?: never;
|
|
1966
|
-
};
|
|
1967
|
-
requestBody?: never;
|
|
1968
|
-
responses: {
|
|
1969
|
-
/** @description TCP mapping list */
|
|
1970
|
-
200: {
|
|
1971
|
-
headers: {
|
|
1972
|
-
[name: string]: unknown;
|
|
1973
|
-
};
|
|
1974
|
-
content: {
|
|
1975
|
-
"application/json": {
|
|
1976
|
-
tcpMappings: components["schemas"]["TcpMapping"][];
|
|
1977
|
-
};
|
|
1978
|
-
};
|
|
1979
|
-
};
|
|
1980
|
-
};
|
|
1981
|
-
};
|
|
1982
|
-
put?: never;
|
|
1983
|
-
/** Create a TCP port forward */
|
|
1984
|
-
post: {
|
|
1985
|
-
parameters: {
|
|
1986
|
-
query?: never;
|
|
1987
|
-
header?: {
|
|
1988
|
-
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
1989
|
-
"Idempotency-Key"?: string;
|
|
1990
|
-
};
|
|
1991
|
-
path: {
|
|
1992
|
-
spaceId: string;
|
|
1993
|
-
cubeId: string;
|
|
1994
|
-
};
|
|
1995
|
-
cookie?: never;
|
|
1996
|
-
};
|
|
1997
|
-
requestBody: {
|
|
1998
|
-
content: {
|
|
1999
|
-
"application/json": {
|
|
2000
|
-
cubePort: number;
|
|
2001
|
-
/** @description Optional human label for the mapping. */
|
|
2002
|
-
label?: string;
|
|
2003
|
-
/**
|
|
2004
|
-
* @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.
|
|
2005
|
-
* @default true
|
|
2006
|
-
*/
|
|
2007
|
-
udpEnabled?: boolean;
|
|
2008
|
-
/**
|
|
2009
|
-
* @deprecated
|
|
2010
|
-
* @description DEPRECATED alias for `whitelistedIps`, accepted for backwards compatibility. `whitelistedIps` wins if both are sent. Use `whitelistedIps` in new code.
|
|
2011
|
-
*/
|
|
2012
|
-
whitelistIps?: string[];
|
|
2013
|
-
/** @description IPs/CIDRs allowed to reach the published port. Omit or send an empty array to leave the port open to the internet. */
|
|
2014
|
-
whitelistedIps?: string[];
|
|
2015
|
-
};
|
|
2016
|
-
};
|
|
2017
|
-
};
|
|
2018
|
-
responses: {
|
|
2019
|
-
/** @description Mapping created */
|
|
2020
|
-
201: {
|
|
2021
|
-
headers: {
|
|
2022
|
-
[name: string]: unknown;
|
|
2023
|
-
};
|
|
2024
|
-
content: {
|
|
2025
|
-
"application/json": {
|
|
2026
|
-
tcpMapping: components["schemas"]["TcpMapping"];
|
|
2027
|
-
};
|
|
2028
|
-
};
|
|
2029
|
-
};
|
|
2030
|
-
400: components["responses"]["BadRequest"];
|
|
2031
|
-
/** @description Refused because the change conflicts with the Cube's current state, for example the port is already in use or the mapping is already being removed. One such conflict is temporary: in the last stretch of a move of the Cube to another server the change is refused with the error "This cube is being moved to another server. Try again in a minute." Nothing was changed then, and the same request is accepted once the move ends. */
|
|
2032
|
-
409: {
|
|
2033
|
-
headers: {
|
|
2034
|
-
[name: string]: unknown;
|
|
2035
|
-
};
|
|
2036
|
-
content?: never;
|
|
2037
|
-
};
|
|
2038
|
-
429: components["responses"]["RateLimited"];
|
|
2039
|
-
};
|
|
2040
|
-
};
|
|
2041
|
-
delete?: never;
|
|
2042
|
-
options?: never;
|
|
2043
|
-
head?: never;
|
|
2044
|
-
patch?: never;
|
|
2045
|
-
trace?: never;
|
|
2046
|
-
};
|
|
2047
|
-
"/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings/{mappingId}": {
|
|
2048
|
-
parameters: {
|
|
2049
|
-
query?: never;
|
|
2050
|
-
header?: never;
|
|
2051
|
-
path?: never;
|
|
2052
|
-
cookie?: never;
|
|
2053
|
-
};
|
|
2054
|
-
get?: never;
|
|
2055
|
-
put?: never;
|
|
2056
|
-
post?: never;
|
|
2057
|
-
/** Delete a TCP port forward */
|
|
2058
|
-
delete: {
|
|
2059
|
-
parameters: {
|
|
2060
|
-
query?: never;
|
|
2061
|
-
header?: never;
|
|
2062
|
-
path: {
|
|
2063
|
-
spaceId: string;
|
|
2064
|
-
cubeId: string;
|
|
2065
|
-
mappingId: string;
|
|
2066
|
-
};
|
|
2067
|
-
cookie?: never;
|
|
2068
|
-
};
|
|
2069
|
-
requestBody?: never;
|
|
2070
|
-
responses: {
|
|
2071
|
-
/** @description Deleted */
|
|
2072
|
-
200: {
|
|
2073
|
-
headers: {
|
|
2074
|
-
[name: string]: unknown;
|
|
2075
|
-
};
|
|
2076
|
-
content: {
|
|
2077
|
-
"application/json": {
|
|
2078
|
-
success: boolean;
|
|
2079
|
-
};
|
|
2080
|
-
};
|
|
2081
|
-
};
|
|
2082
|
-
404: components["responses"]["NotFound"];
|
|
2083
|
-
/** @description Refused because the change conflicts with the Cube's current state, for example the port is already in use or the mapping is already being removed. One such conflict is temporary: in the last stretch of a move of the Cube to another server the change is refused with the error "This cube is being moved to another server. Try again in a minute." Nothing was changed then, and the same request is accepted once the move ends. */
|
|
2084
|
-
409: {
|
|
2085
|
-
headers: {
|
|
2086
|
-
[name: string]: unknown;
|
|
2087
|
-
};
|
|
2088
|
-
content?: never;
|
|
2089
|
-
};
|
|
2090
|
-
};
|
|
2091
|
-
};
|
|
2092
|
-
options?: never;
|
|
2093
|
-
head?: never;
|
|
2094
|
-
patch?: never;
|
|
2095
|
-
trace?: never;
|
|
2096
|
-
};
|
|
2097
|
-
"/spaces/{spaceId}/cubes/{cubeId}/wake": {
|
|
2098
|
-
parameters: {
|
|
2099
|
-
query?: never;
|
|
2100
|
-
header?: never;
|
|
2101
|
-
path?: never;
|
|
2102
|
-
cookie?: never;
|
|
2103
|
-
};
|
|
2104
|
-
get?: never;
|
|
2105
|
-
put?: never;
|
|
2106
|
-
/** Start a stopped Cube */
|
|
2107
|
-
post: {
|
|
2108
|
-
parameters: {
|
|
2109
|
-
query?: never;
|
|
2110
|
-
header?: never;
|
|
2111
|
-
path: {
|
|
2112
|
-
spaceId: string;
|
|
2113
|
-
cubeId: string;
|
|
2114
|
-
};
|
|
2115
|
-
cookie?: never;
|
|
2116
|
-
};
|
|
2117
|
-
requestBody?: never;
|
|
2118
|
-
responses: {
|
|
2119
|
-
/** @description Start enqueued */
|
|
2120
|
-
200: {
|
|
2121
|
-
headers: {
|
|
2122
|
-
[name: string]: unknown;
|
|
2123
|
-
};
|
|
2124
|
-
content?: never;
|
|
2125
|
-
};
|
|
2126
|
-
404: components["responses"]["NotFound"];
|
|
2127
|
-
429: components["responses"]["RateLimited"];
|
|
2128
|
-
};
|
|
2129
|
-
};
|
|
2130
|
-
delete?: never;
|
|
2131
|
-
options?: never;
|
|
2132
|
-
head?: never;
|
|
2133
|
-
patch?: never;
|
|
2134
|
-
trace?: never;
|
|
2135
|
-
};
|
|
2136
|
-
"/spaces/{spaceId}/webhooks": {
|
|
2137
|
-
parameters: {
|
|
2138
|
-
query?: never;
|
|
2139
|
-
header?: never;
|
|
2140
|
-
path?: never;
|
|
2141
|
-
cookie?: never;
|
|
2142
|
-
};
|
|
2143
|
-
/** List webhook endpoints */
|
|
2144
|
-
get: {
|
|
2145
|
-
parameters: {
|
|
2146
|
-
query?: never;
|
|
2147
|
-
header?: never;
|
|
2148
|
-
path: {
|
|
2149
|
-
spaceId: string;
|
|
2150
|
-
};
|
|
2151
|
-
cookie?: never;
|
|
2152
|
-
};
|
|
2153
|
-
requestBody?: never;
|
|
2154
|
-
responses: {
|
|
2155
|
-
/** @description Webhook list */
|
|
2156
|
-
200: {
|
|
2157
|
-
headers: {
|
|
2158
|
-
[name: string]: unknown;
|
|
2159
|
-
};
|
|
2160
|
-
content?: never;
|
|
2161
|
-
};
|
|
2162
|
-
};
|
|
2163
|
-
};
|
|
2164
|
-
put?: never;
|
|
2165
|
-
/** Create a webhook endpoint (signing secret returned once) */
|
|
2166
|
-
post: {
|
|
2167
|
-
parameters: {
|
|
2168
|
-
query?: never;
|
|
2169
|
-
header?: never;
|
|
2170
|
-
path: {
|
|
2171
|
-
spaceId: string;
|
|
2172
|
-
};
|
|
2173
|
-
cookie?: never;
|
|
2174
|
-
};
|
|
2175
|
-
requestBody: {
|
|
2176
|
-
content: {
|
|
2177
|
-
"application/json": {
|
|
2178
|
-
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" | "backup.share.requested" | "backup.share.accepted" | "backup.share.declined" | "backup.share.canceled" | "backup.share.expired" | "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")[];
|
|
2179
|
-
/** Format: uri */
|
|
2180
|
-
url: string;
|
|
2181
|
-
};
|
|
2182
|
-
};
|
|
2183
|
-
};
|
|
2184
|
-
responses: {
|
|
2185
|
-
/** @description Webhook created (response includes secret) */
|
|
2186
|
-
201: {
|
|
2187
|
-
headers: {
|
|
2188
|
-
[name: string]: unknown;
|
|
2189
|
-
};
|
|
2190
|
-
content?: never;
|
|
2191
|
-
};
|
|
2192
|
-
400: components["responses"]["BadRequest"];
|
|
2193
|
-
429: components["responses"]["RateLimited"];
|
|
2194
|
-
};
|
|
2195
|
-
};
|
|
2196
|
-
delete?: never;
|
|
2197
|
-
options?: never;
|
|
2198
|
-
head?: never;
|
|
2199
|
-
patch?: never;
|
|
2200
|
-
trace?: never;
|
|
2201
|
-
};
|
|
2202
|
-
"/spaces/{spaceId}/webhooks/{endpointId}": {
|
|
2203
|
-
parameters: {
|
|
2204
|
-
query?: never;
|
|
2205
|
-
header?: never;
|
|
2206
|
-
path?: never;
|
|
2207
|
-
cookie?: never;
|
|
2208
|
-
};
|
|
2209
|
-
/** Get a webhook (no secret) */
|
|
2210
|
-
get: {
|
|
2211
|
-
parameters: {
|
|
2212
|
-
query?: never;
|
|
2213
|
-
header?: never;
|
|
2214
|
-
path: {
|
|
2215
|
-
spaceId: string;
|
|
2216
|
-
endpointId: string;
|
|
2217
|
-
};
|
|
2218
|
-
cookie?: never;
|
|
2219
|
-
};
|
|
2220
|
-
requestBody?: never;
|
|
2221
|
-
responses: {
|
|
2222
|
-
/** @description Webhook */
|
|
2223
|
-
200: {
|
|
2224
|
-
headers: {
|
|
2225
|
-
[name: string]: unknown;
|
|
2226
|
-
};
|
|
2227
|
-
content?: never;
|
|
2228
|
-
};
|
|
2229
|
-
};
|
|
2230
|
-
};
|
|
2231
|
-
put?: never;
|
|
2232
|
-
post?: never;
|
|
2233
|
-
/** Delete a webhook (cascades deliveries) */
|
|
2234
|
-
delete: {
|
|
2235
|
-
parameters: {
|
|
2236
|
-
query?: never;
|
|
2237
|
-
header?: never;
|
|
2238
|
-
path: {
|
|
2239
|
-
spaceId: string;
|
|
2240
|
-
endpointId: string;
|
|
2241
|
-
};
|
|
2242
|
-
cookie?: never;
|
|
2243
|
-
};
|
|
2244
|
-
requestBody?: never;
|
|
2245
|
-
responses: {
|
|
2246
|
-
/** @description Deleted */
|
|
2247
|
-
200: {
|
|
2248
|
-
headers: {
|
|
2249
|
-
[name: string]: unknown;
|
|
2250
|
-
};
|
|
2251
|
-
content?: never;
|
|
2252
|
-
};
|
|
2253
|
-
429: components["responses"]["RateLimited"];
|
|
2254
|
-
};
|
|
2255
|
-
};
|
|
2256
|
-
options?: never;
|
|
2257
|
-
head?: never;
|
|
2258
|
-
patch?: never;
|
|
2259
|
-
trace?: never;
|
|
2260
|
-
};
|
|
2261
|
-
"/spaces/{spaceId}/webhooks/{endpointId}/deliveries": {
|
|
2262
|
-
parameters: {
|
|
2263
|
-
query?: never;
|
|
2264
|
-
header?: never;
|
|
2265
|
-
path?: never;
|
|
2266
|
-
cookie?: never;
|
|
2267
|
-
};
|
|
2268
|
-
/** Last 30 days of webhook delivery history (max 100) */
|
|
2269
|
-
get: {
|
|
2270
|
-
parameters: {
|
|
2271
|
-
query?: {
|
|
2272
|
-
limit?: number;
|
|
2273
|
-
};
|
|
2274
|
-
header?: never;
|
|
2275
|
-
path: {
|
|
2276
|
-
spaceId: string;
|
|
2277
|
-
endpointId: string;
|
|
2278
|
-
};
|
|
2279
|
-
cookie?: never;
|
|
2280
|
-
};
|
|
2281
|
-
requestBody?: never;
|
|
2282
|
-
responses: {
|
|
2283
|
-
/** @description Delivery list */
|
|
2284
|
-
200: {
|
|
2285
|
-
headers: {
|
|
2286
|
-
[name: string]: unknown;
|
|
2287
|
-
};
|
|
2288
|
-
content?: never;
|
|
2289
|
-
};
|
|
2290
|
-
};
|
|
2291
|
-
};
|
|
2292
|
-
put?: never;
|
|
2293
|
-
post?: never;
|
|
2294
|
-
delete?: never;
|
|
2295
|
-
options?: never;
|
|
2296
|
-
head?: never;
|
|
2297
|
-
patch?: never;
|
|
2298
|
-
trace?: never;
|
|
2299
|
-
};
|
|
2300
|
-
}
|
|
2301
|
-
interface components {
|
|
2302
|
-
schemas: {
|
|
2303
|
-
Backup: {
|
|
2304
|
-
/** Format: date-time */
|
|
2305
|
-
completedAt: string | null;
|
|
2306
|
-
/** @description The Cube configuration captured with the backup, used by redeploy. A shared copy carries no domains. */
|
|
2307
|
-
config: {
|
|
2308
|
-
diskLimitGb: number | null;
|
|
2309
|
-
domains: {
|
|
2310
|
-
domain: string;
|
|
2311
|
-
port: number;
|
|
2312
|
-
}[];
|
|
2313
|
-
imageId: string | null;
|
|
2314
|
-
ramMb: number | null;
|
|
2315
|
-
regionId: string | null;
|
|
2316
|
-
regionName: string | null;
|
|
2317
|
-
tcpPorts: {
|
|
2318
|
-
cubePort: number;
|
|
2319
|
-
label: string | null;
|
|
2320
|
-
}[];
|
|
2321
|
-
vcpus: number | null;
|
|
2322
|
-
};
|
|
2323
|
-
/** Format: date-time */
|
|
2324
|
-
createdAt: string;
|
|
2325
|
-
diskSizeGb: number;
|
|
2326
|
-
id: string;
|
|
2327
|
-
name: string;
|
|
2328
|
-
originalCubeId: string;
|
|
2329
|
-
originalCubeName: string;
|
|
2330
|
-
redeployedCubeId: string | null;
|
|
2331
|
-
/** @description Set on a shared copy: the backup it was shared from, which may since have been deleted. Null for a backup this space made itself. */
|
|
2332
|
-
sharedFromBackupId: string | null;
|
|
2333
|
-
sizeBytes: number | null;
|
|
2334
|
-
/** @enum {string} */
|
|
2335
|
-
status: "pending" | "creating" | "complete" | "failed";
|
|
2336
|
-
};
|
|
2337
|
-
BackupShare: {
|
|
2338
|
-
/** @description The SOURCE backup being shared. */
|
|
2339
|
-
backupId: string;
|
|
2340
|
-
backupName: string;
|
|
2341
|
-
/** @description The destination space's own copy, once the share is accepted. */
|
|
2342
|
-
copyBackupId: string | null;
|
|
2343
|
-
/** @description The other space in this share: the destination on an outgoing share, the source on an incoming one. */
|
|
2344
|
-
counterpartySpaceName: string;
|
|
2345
|
-
/** Format: date-time */
|
|
2346
|
-
createdAt: string;
|
|
2347
|
-
destinationSpaceId: string;
|
|
2348
|
-
/** Format: date-time */
|
|
2349
|
-
expiresAt: string;
|
|
2350
|
-
id: string;
|
|
2351
|
-
sourceSpaceId: string;
|
|
2352
|
-
/** @enum {string} */
|
|
2353
|
-
status: "pending" | "accepted" | "declined" | "canceled" | "expired";
|
|
2354
|
-
};
|
|
2355
|
-
Cube: {
|
|
2356
|
-
costPerHour: number;
|
|
2357
|
-
/** Format: date-time */
|
|
2358
|
-
createdAt: string;
|
|
2359
|
-
id: string;
|
|
2360
|
-
image: string;
|
|
2361
|
-
name: string;
|
|
2362
|
-
publicIpv4: string | null;
|
|
2363
|
-
resources: {
|
|
2364
|
-
diskGb: number;
|
|
2365
|
-
ramGb: number;
|
|
2366
|
-
vcpu: number;
|
|
2367
|
-
};
|
|
2368
|
-
/** @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. */
|
|
2369
|
-
serverDomain?: string | null;
|
|
2370
|
-
sshUser: string;
|
|
2371
|
-
/** @enum {string} */
|
|
2372
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2373
|
-
/** @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. */
|
|
2374
|
-
terminationProtection: boolean;
|
|
2375
|
-
/**
|
|
2376
|
-
* Format: date-time
|
|
2377
|
-
* @description ISO8601 timestamp of the most recent toggle of `terminationProtection`. Null when the flag has never been turned on.
|
|
2378
|
-
*/
|
|
2379
|
-
terminationProtectionChangedAt: string | null;
|
|
2380
|
-
/** @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. */
|
|
2381
|
-
terminationProtectionChangedBy: string | null;
|
|
2382
|
-
/** Format: date-time */
|
|
2383
|
-
updatedAt: string;
|
|
2384
|
-
};
|
|
2385
|
-
CubeSshInfo: {
|
|
2386
|
-
host: string | null;
|
|
2387
|
-
hostKeys: {
|
|
2388
|
-
key: string;
|
|
2389
|
-
type: string;
|
|
2390
|
-
}[];
|
|
2391
|
-
port: number;
|
|
2392
|
-
user: string;
|
|
2393
|
-
};
|
|
2394
|
-
DnsRecord: {
|
|
2395
|
-
host: string;
|
|
2396
|
-
/** @enum {string} */
|
|
2397
|
-
id: "ownership" | "routing" | "certificate";
|
|
2398
|
-
mustBeGrey: boolean;
|
|
2399
|
-
note?: string | null;
|
|
2400
|
-
proxyOk: boolean;
|
|
2401
|
-
/** @enum {string} */
|
|
2402
|
-
purpose: "ownership" | "routing" | "certificate";
|
|
2403
|
-
/** @enum {string} */
|
|
2404
|
-
type: "CNAME" | "TXT" | "A";
|
|
2405
|
-
value: string;
|
|
2406
|
-
};
|
|
2407
|
-
DnsRecordStatus: {
|
|
2408
|
-
detail: string;
|
|
2409
|
-
host: string;
|
|
2410
|
-
id: string;
|
|
2411
|
-
mustBeGrey?: boolean;
|
|
2412
|
-
note?: string | null;
|
|
2413
|
-
observed?: string[] | null;
|
|
2414
|
-
proxyOk?: boolean;
|
|
2415
|
-
purpose: string;
|
|
2416
|
-
/** @enum {string} */
|
|
2417
|
-
state: "found" | "missing" | "mismatch" | "unknown";
|
|
2418
|
-
/** @enum {string} */
|
|
2419
|
-
type: "CNAME" | "TXT" | "A";
|
|
2420
|
-
value: string;
|
|
2421
|
-
};
|
|
2422
|
-
Domain: {
|
|
2423
|
-
acmeDelegationTarget: string | null;
|
|
2424
|
-
basicAuthEnabled: boolean;
|
|
2425
|
-
basicAuthUser: string | null;
|
|
2426
|
-
corsConfig: Record<string, never> | null;
|
|
2427
|
-
/** Format: date-time */
|
|
2428
|
-
createdAt: string;
|
|
2429
|
-
cubeId: string;
|
|
2430
|
-
domain: string;
|
|
2431
|
-
id: string;
|
|
2432
|
-
ingressStatus: string | null;
|
|
2433
|
-
ipAllowList: string[] | null;
|
|
2434
|
-
ipDenyList: string[] | null;
|
|
2435
|
-
isWildcard: boolean;
|
|
2436
|
-
maxRequestBodyMb: number | null;
|
|
2437
|
-
/** @enum {string} */
|
|
2438
|
-
originScheme: "http" | "https";
|
|
2439
|
-
port: number | null;
|
|
2440
|
-
/** @enum {string|null} */
|
|
2441
|
-
proxyProtocol: "v1" | "v2" | null;
|
|
2442
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
2443
|
-
requestHeaderOverrides: {
|
|
2444
|
-
remove?: string[];
|
|
2445
|
-
set?: {
|
|
2446
|
-
[key: string]: string;
|
|
2447
|
-
};
|
|
2448
|
-
} | null;
|
|
2449
|
-
responseCompression: boolean;
|
|
2450
|
-
/** @description Header rewrites: `set` adds/overwrites, `remove` deletes. Null clears all. */
|
|
2451
|
-
responseHeaderOverrides: {
|
|
2452
|
-
remove?: string[];
|
|
2453
|
-
set?: {
|
|
2454
|
-
[key: string]: string;
|
|
2455
|
-
};
|
|
2456
|
-
} | null;
|
|
2457
|
-
responseHeaderTimeoutSecs: number;
|
|
2458
|
-
/** @enum {string} */
|
|
2459
|
-
securityHeadersMode: "enforced" | "app_managed";
|
|
2460
|
-
status: string;
|
|
2461
|
-
/** Format: date-time */
|
|
2462
|
-
updatedAt: string;
|
|
2463
|
-
/** @enum {string|null} */
|
|
2464
|
-
wildcardCertState: "pending_delegation" | "issuing" | "ready" | "failed" | null;
|
|
2465
|
-
};
|
|
2466
|
-
Error: {
|
|
2467
|
-
error: string;
|
|
2468
|
-
};
|
|
2469
|
-
Image: {
|
|
2470
|
-
defaultUser: string;
|
|
2471
|
-
description: string;
|
|
2472
|
-
id: string;
|
|
2473
|
-
name: string;
|
|
2474
|
-
version: string;
|
|
2475
|
-
};
|
|
2476
|
-
Pagination: {
|
|
2477
|
-
limit: number;
|
|
2478
|
-
page: number;
|
|
2479
|
-
total: number;
|
|
2480
|
-
totalPages: number;
|
|
2481
|
-
};
|
|
2482
|
-
PricingTier: {
|
|
2483
|
-
label: string;
|
|
2484
|
-
maxVcpus: number | null;
|
|
2485
|
-
minVcpus: number;
|
|
2486
|
-
multiplier: number;
|
|
2487
|
-
};
|
|
2488
|
-
Region: {
|
|
2489
|
-
id: string;
|
|
2490
|
-
name: string;
|
|
2491
|
-
slug: string;
|
|
2492
|
-
};
|
|
2493
|
-
Snapshot: {
|
|
2494
|
-
/** Format: date-time */
|
|
2495
|
-
createdAt: string;
|
|
2496
|
-
cubeId: string;
|
|
2497
|
-
id: string;
|
|
2498
|
-
kind: string;
|
|
2499
|
-
name: string;
|
|
2500
|
-
sizeBytes: number | null;
|
|
2501
|
-
status: string;
|
|
2502
|
-
};
|
|
2503
|
-
Space: {
|
|
2504
|
-
/** Format: date-time */
|
|
2505
|
-
createdAt: string;
|
|
2506
|
-
id: string;
|
|
2507
|
-
name: string;
|
|
2508
|
-
tier: string;
|
|
2509
|
-
};
|
|
2510
|
-
TcpMapping: {
|
|
2511
|
-
/** Format: date-time */
|
|
2512
|
-
createdAt: string;
|
|
2513
|
-
cubeId: string;
|
|
2514
|
-
cubePort: number;
|
|
2515
|
-
/** @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. */
|
|
2516
|
-
host?: string | null;
|
|
2517
|
-
hostPort: number;
|
|
2518
|
-
id: string;
|
|
2519
|
-
isSsh: boolean;
|
|
2520
|
-
label: string | null;
|
|
2521
|
-
status: string;
|
|
2522
|
-
/** @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. */
|
|
2523
|
-
udpEnabled: boolean;
|
|
2524
|
-
/** Format: date-time */
|
|
2525
|
-
updatedAt: string;
|
|
2526
|
-
whitelistedIps: {
|
|
2527
|
-
cidr: string;
|
|
2528
|
-
id: string;
|
|
2529
|
-
}[];
|
|
2530
|
-
};
|
|
2531
|
-
Webhook: {
|
|
2532
|
-
/** Format: date-time */
|
|
2533
|
-
createdAt: string;
|
|
2534
|
-
enabled: boolean;
|
|
2535
|
-
events: string[];
|
|
2536
|
-
id: string;
|
|
2537
|
-
/** Format: date-time */
|
|
2538
|
-
updatedAt: string;
|
|
2539
|
-
/** Format: uri */
|
|
2540
|
-
url: string;
|
|
2541
|
-
};
|
|
2542
|
-
WebhookDelivery: {
|
|
2543
|
-
attempts: number;
|
|
2544
|
-
/** Format: date-time */
|
|
2545
|
-
createdAt: string;
|
|
2546
|
-
event: string;
|
|
2547
|
-
id: string;
|
|
2548
|
-
/** Format: date-time */
|
|
2549
|
-
lastAttemptAt: string | null;
|
|
2550
|
-
responseStatus: number | null;
|
|
2551
|
-
/** @enum {string} */
|
|
2552
|
-
status: "pending" | "delivered" | "failed";
|
|
2553
|
-
};
|
|
2554
|
-
};
|
|
2555
|
-
responses: {
|
|
2556
|
-
/** @description Bad request */
|
|
2557
|
-
BadRequest: {
|
|
2558
|
-
headers: {
|
|
2559
|
-
[name: string]: unknown;
|
|
2560
|
-
};
|
|
2561
|
-
content: {
|
|
2562
|
-
"application/json": components["schemas"]["Error"];
|
|
2563
|
-
};
|
|
2564
|
-
};
|
|
2565
|
-
/** @description Authenticated but lacks the required permission */
|
|
2566
|
-
Forbidden: {
|
|
2567
|
-
headers: {
|
|
2568
|
-
[name: string]: unknown;
|
|
2569
|
-
};
|
|
2570
|
-
content: {
|
|
2571
|
-
"application/json": components["schemas"]["Error"];
|
|
2572
|
-
};
|
|
2573
|
-
};
|
|
2574
|
-
/** @description Resource not found */
|
|
2575
|
-
NotFound: {
|
|
2576
|
-
headers: {
|
|
2577
|
-
[name: string]: unknown;
|
|
2578
|
-
};
|
|
2579
|
-
content: {
|
|
2580
|
-
"application/json": components["schemas"]["Error"];
|
|
2581
|
-
};
|
|
2582
|
-
};
|
|
2583
|
-
/** @description Rate limit exceeded (10 mutations / 60s) */
|
|
2584
|
-
RateLimited: {
|
|
2585
|
-
headers: {
|
|
2586
|
-
[name: string]: unknown;
|
|
2587
|
-
};
|
|
2588
|
-
content: {
|
|
2589
|
-
"application/json": components["schemas"]["Error"];
|
|
2590
|
-
};
|
|
2591
|
-
};
|
|
2592
|
-
/** @description Missing or invalid API key */
|
|
2593
|
-
Unauthorized: {
|
|
2594
|
-
headers: {
|
|
2595
|
-
[name: string]: unknown;
|
|
2596
|
-
};
|
|
2597
|
-
content: {
|
|
2598
|
-
"application/json": components["schemas"]["Error"];
|
|
2599
|
-
};
|
|
2600
|
-
};
|
|
2601
|
-
};
|
|
2602
|
-
parameters: never;
|
|
2603
|
-
requestBodies: never;
|
|
2604
|
-
headers: never;
|
|
2605
|
-
pathItems: never;
|
|
2606
|
-
}
|
|
2607
|
-
/** The Cube resource, as defined in the Krova Cloud OpenAPI spec. */
|
|
2608
|
-
type Cube = components["schemas"]["Cube"];
|
|
2609
|
-
/** A region with available capacity (from the catalog). */
|
|
2610
|
-
type Region = components["schemas"]["Region"];
|
|
2611
|
-
/** A selectable OS image (from the catalog). */
|
|
2612
|
-
type Image = components["schemas"]["Image"];
|
|
2613
|
-
/** A volume-pricing tier (from the catalog). */
|
|
2614
|
-
type PricingTier = components["schemas"]["PricingTier"];
|
|
2615
|
-
/** Pagination envelope returned alongside a Cube list. */
|
|
2616
|
-
type Pagination = components["schemas"]["Pagination"];
|
|
2617
|
-
/** A Space — the tenancy an API key is scoped to. */
|
|
2618
|
-
type Space = components["schemas"]["Space"];
|
|
2619
|
-
/** A Cube's SSH connection info (host, port, user, and pinned host keys). */
|
|
2620
|
-
type CubeSshInfo = components["schemas"]["CubeSshInfo"];
|
|
2621
|
-
/** A custom domain attached to a Cube. */
|
|
2622
|
-
type Domain = components["schemas"]["Domain"];
|
|
2623
|
-
/**
|
|
2624
|
-
* One DNS record you must publish for a domain to work.
|
|
2625
|
-
*
|
|
2626
|
-
* An ordinary subdomain needs one CNAME. A wildcard needs three: an ownership
|
|
2627
|
-
* TXT, the routing CNAME, and an `_acme-challenge` CNAME that lets Krova issue
|
|
2628
|
-
* and renew its certificate.
|
|
2629
|
-
*
|
|
2630
|
-
* ⛔ `mustBeGrey` and `proxyOk` are deliberate OPPOSITES, and automation needs
|
|
2631
|
-
* both. The routing record may sit behind Cloudflare's proxy (orange); the
|
|
2632
|
-
* `_acme-challenge` record must not, because a proxied one answers with
|
|
2633
|
-
* Cloudflare's addresses and the certificate authority finds nothing there.
|
|
2634
|
-
*/
|
|
2635
|
-
type DnsRecord = components["schemas"]["DnsRecord"];
|
|
2636
|
-
/**
|
|
2637
|
-
* A {@link DnsRecord} plus what Krova can currently see in public DNS.
|
|
2638
|
-
*
|
|
2639
|
-
* ⛔ `state: "missing"` means NOT PUBLISHED YET — the expected state before you
|
|
2640
|
-
* create the record, never an error. `state: "unknown"` means Krova could not
|
|
2641
|
-
* complete the lookup, which is never a statement about your DNS. Surfacing
|
|
2642
|
-
* either to your own users as a failure would be wrong.
|
|
2643
|
-
*/
|
|
2644
|
-
type DnsRecordStatus = components["schemas"]["DnsRecordStatus"];
|
|
2645
|
-
/** A snapshot of a Cube's disk. */
|
|
2646
|
-
type Snapshot = components["schemas"]["Snapshot"];
|
|
2647
|
-
/** A TCP port mapping exposing a Cube port on the host. */
|
|
2648
|
-
type TcpMapping = components["schemas"]["TcpMapping"];
|
|
2649
|
-
/**
|
|
2650
|
-
* A backup: a Cube's disk and configuration, kept after the Cube is gone and
|
|
2651
|
-
* redeployable as a new Cube. `sharedFromBackupId` is set on a copy another
|
|
2652
|
-
* space shared with this one.
|
|
2653
|
-
*/
|
|
2654
|
-
type Backup = components["schemas"]["Backup"];
|
|
2655
|
-
/**
|
|
2656
|
-
* A request to give another space its own copy of a backup.
|
|
2657
|
-
*
|
|
2658
|
-
* `counterpartySpaceName` is the other side: the destination on an outgoing
|
|
2659
|
-
* share, the source on an incoming one. `copyBackupId` is set once accepted.
|
|
2660
|
-
*/
|
|
2661
|
-
type BackupShare = components["schemas"]["BackupShare"];
|
|
2662
|
-
/** Pending, unexpired backup shares into and out of a space. */
|
|
2663
|
-
interface BackupShareList {
|
|
2664
|
-
incoming: BackupShare[];
|
|
2665
|
-
outgoing: BackupShare[];
|
|
2666
|
-
}
|
|
2667
|
-
/** An accepted share, and the destination space's new copy. */
|
|
2668
|
-
interface AcceptedBackupShare {
|
|
2669
|
-
share: BackupShare;
|
|
2670
|
-
backup: Backup;
|
|
2671
|
-
}
|
|
2672
|
-
/** Request body for attaching a custom domain to a Cube. */
|
|
2673
|
-
type CreateDomainInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/domains"]["post"]["requestBody"]>["content"]["application/json"];
|
|
2674
|
-
/** Request body for updating a custom domain's proxy settings. */
|
|
2675
|
-
type UpdateDomainInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/domains/{mappingId}"]["patch"]["requestBody"]>["content"]["application/json"];
|
|
2676
|
-
/** Request body for creating a TCP port mapping. */
|
|
2677
|
-
type CreateTcpMappingInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/tcp-mappings"]["post"]["requestBody"]>["content"]["application/json"];
|
|
2678
|
-
/**
|
|
2679
|
-
* Request body for `POST /spaces/{spaceId}/cubes` as defined in the OpenAPI
|
|
2680
|
-
* spec, with `terminationProtection` intersected on because the bundled spec
|
|
2681
|
-
* does not declare the field but the v1 API accepts it. A boolean `false` (or
|
|
2682
|
-
* omission) leaves the Cube in the documented default-unprotected state; `true`
|
|
2683
|
-
* opts the Cube out of customer-initiated deletion until the flag is toggled
|
|
2684
|
-
* back via `cubes.setTerminationProtection`.
|
|
2685
|
-
*/
|
|
2686
|
-
type CreateCubeInput = NonNullable<paths["/spaces/{spaceId}/cubes"]["post"]["requestBody"]>["content"]["application/json"] & {
|
|
2687
|
-
/** Opt this Cube out of customer-initiated deletion (default `false`). */
|
|
2688
|
-
terminationProtection?: boolean;
|
|
2689
|
-
};
|
|
2690
|
-
/**
|
|
2691
|
-
* A webhook endpoint subscribed to Space events.
|
|
2692
|
-
*
|
|
2693
|
-
* ⛔ Runtime discrepancy: the bundled OpenAPI spec does not declare
|
|
2694
|
-
* `description`, but `GET /spaces/{spaceId}/webhooks/{endpointId}` includes
|
|
2695
|
-
* it as `string | null`. The schema-derived type is extended here so callers
|
|
2696
|
-
* reading a single webhook see the field; it is optional so list responses
|
|
2697
|
-
* (which omit it) still typecheck.
|
|
2698
|
-
*/
|
|
2699
|
-
type Webhook = components["schemas"]["Webhook"] & {
|
|
2700
|
-
description?: string | null;
|
|
2701
|
-
};
|
|
2702
|
-
/** A recorded webhook delivery attempt (last 30 days of history). */
|
|
2703
|
-
type WebhookDelivery = components["schemas"]["WebhookDelivery"];
|
|
2704
|
-
/**
|
|
2705
|
-
* Request body for creating a webhook endpoint.
|
|
2706
|
-
*
|
|
2707
|
-
* Derived from `paths["/spaces/{spaceId}/webhooks"]["post"]` exactly like
|
|
2708
|
-
* {@link CreateDomainInput}; `description` is intersected on because the
|
|
2709
|
-
* bundled spec omits it but the runtime accepts it.
|
|
2710
|
-
*/
|
|
2711
|
-
type CreateWebhookInput = NonNullable<paths["/spaces/{spaceId}/webhooks"]["post"]["requestBody"]>["content"]["application/json"] & {
|
|
2712
|
-
/** Optional human-readable label shown on the endpoint. */
|
|
2713
|
-
description?: string;
|
|
2714
|
-
};
|
|
2715
|
-
/** A webhook plus its signing secret. Returned ONLY by {@link KrovaClient.webhooks}.create. */
|
|
2716
|
-
type WebhookWithSecret = Webhook & {
|
|
2717
|
-
secret: string;
|
|
2718
|
-
};
|
|
2719
|
-
/** Default API base URL — the single `servers[0].url` from the OpenAPI spec. */
|
|
2720
|
-
export declare const DEFAULT_BASE_URL = "https://krova.cloud/api/v1";
|
|
2721
|
-
/**
|
|
2722
|
-
* How the API key is presented to the server.
|
|
2723
|
-
*
|
|
2724
|
-
* - `"x-api-key"` (default) — `X-API-KEY: <key>`, matching the spec's
|
|
2725
|
-
* `components.securitySchemes.ApiKeyAuth` (an `apiKey` header named
|
|
2726
|
-
* `X-API-KEY`).
|
|
2727
|
-
* - `"bearer"` — `Authorization: Bearer <key>`, for gateways that expect it.
|
|
2728
|
-
*/
|
|
2729
|
-
type AuthScheme = "x-api-key" | "bearer";
|
|
2730
|
-
interface KrovaClientOptions {
|
|
2731
|
-
/**
|
|
2732
|
-
* Your Krova Cloud API key (a `kro_...` token). Keys are scoped per Space
|
|
2733
|
-
* and inherit the permissions of the membership that created them.
|
|
2734
|
-
*/
|
|
2735
|
-
apiKey: string;
|
|
2736
|
-
/** Override the API base URL. Defaults to {@link DEFAULT_BASE_URL}. */
|
|
2737
|
-
baseUrl?: string;
|
|
2738
|
-
/**
|
|
2739
|
-
* Auth header scheme. Defaults to `"x-api-key"` (the spec's scheme).
|
|
2740
|
-
*/
|
|
2741
|
-
authScheme?: AuthScheme;
|
|
2742
|
-
/**
|
|
2743
|
-
* Max automatic retries on retryable statuses (429, 503).
|
|
2744
|
-
* Defaults to 2. Set to 0 to disable retries.
|
|
2745
|
-
*/
|
|
2746
|
-
maxRetries?: number;
|
|
2747
|
-
/**
|
|
2748
|
-
* A custom `fetch` implementation (e.g. for tests or a proxy). Defaults to
|
|
2749
|
-
* the global `fetch`.
|
|
2750
|
-
*/
|
|
2751
|
-
fetch?: typeof fetch;
|
|
2752
|
-
}
|
|
2753
|
-
/**
|
|
2754
|
-
* A typed client for the Krova Cloud API.
|
|
2755
|
-
*
|
|
2756
|
-
* @example
|
|
2757
|
-
* ```ts
|
|
2758
|
-
* const krova = new KrovaClient({ apiKey: "kro_..." });
|
|
2759
|
-
* const cubes = await krova.cubes.list("space_123");
|
|
2760
|
-
* ```
|
|
2761
|
-
*/
|
|
2762
|
-
export declare class KrovaClient {
|
|
2763
|
-
/**
|
|
2764
|
-
* The underlying openapi-fetch client — a fully typed escape hatch to every
|
|
2765
|
-
* path in the spec. Returns `{ data, error, response }` and never throws.
|
|
2766
|
-
*
|
|
2767
|
-
* @example
|
|
2768
|
-
* ```ts
|
|
2769
|
-
* const { data, error } = await krova.raw.GET(
|
|
2770
|
-
* "/spaces/{spaceId}/cubes/{cubeId}",
|
|
2771
|
-
* { params: { path: { spaceId, cubeId } } },
|
|
2772
|
-
* );
|
|
2773
|
-
* ```
|
|
2774
|
-
*/
|
|
2775
|
-
readonly raw: Client<paths>;
|
|
2776
|
-
/** The resolved base URL in use. */
|
|
2777
|
-
readonly baseUrl: string;
|
|
2778
|
-
constructor(options: KrovaClientOptions);
|
|
2779
|
-
readonly cubes: {
|
|
2780
|
-
/** List Cubes in a Space, with pagination metadata. */
|
|
2781
|
-
list: (spaceId: string) => Promise<{
|
|
2782
|
-
cubes: {
|
|
2783
|
-
costPerHour: number;
|
|
2784
|
-
createdAt: string;
|
|
2785
|
-
id: string;
|
|
2786
|
-
image: string;
|
|
2787
|
-
name: string;
|
|
2788
|
-
publicIpv4: string | null;
|
|
2789
|
-
resources: {
|
|
2790
|
-
diskGb: number;
|
|
2791
|
-
ramGb: number;
|
|
2792
|
-
vcpu: number;
|
|
2793
|
-
};
|
|
2794
|
-
serverDomain?: string | null;
|
|
2795
|
-
sshUser: string;
|
|
2796
|
-
state: "pending" | "booting" | "running" | "stopped" | "stopping" | "resizing" | "error" | "deleted";
|
|
2797
|
-
terminationProtection: boolean;
|
|
2798
|
-
terminationProtectionChangedAt: string | null;
|
|
2799
|
-
terminationProtectionChangedBy: string | null;
|
|
2800
|
-
updatedAt: string;
|
|
2801
|
-
}[];
|
|
2802
|
-
pagination: {
|
|
2803
|
-
limit: number;
|
|
2804
|
-
page: number;
|
|
2805
|
-
total: number;
|
|
2806
|
-
totalPages: number;
|
|
2807
|
-
};
|
|
2808
|
-
}>;
|
|
2809
|
-
/**
|
|
2810
|
-
* Create a Cube. Returns the created {@link Cube}.
|
|
2811
|
-
*
|
|
2812
|
-
* Set `terminationProtection: true` to opt the Cube out of
|
|
2813
|
-
* customer-initiated deletion. The flag is per-Cube; power-off, wake,
|
|
2814
|
-
* restart, snapshot, and restore remain allowed regardless.
|
|
2815
|
-
*
|
|
2816
|
-
* @param spaceId Target Space id.
|
|
2817
|
-
* @param body Cube spec — `{ name, image, resources, sshPublicKey, terminationProtection?, ... }`.
|
|
2818
|
-
* @param opts Optional `idempotencyKey` (max 255 chars, scoped per space).
|
|
2819
|
-
*/
|
|
2820
|
-
create: (spaceId: string, body: CreateCubeInput, opts?: {
|
|
2821
|
-
idempotencyKey?: string;
|
|
2822
|
-
}) => Promise<Cube>;
|
|
2823
|
-
/** Get a single Cube. Returns the {@link Cube}. */
|
|
2824
|
-
get: (spaceId: string, cubeId: string) => Promise<Cube>;
|
|
2825
|
-
/**
|
|
2826
|
-
* Update the IN-CUBE port that SSH is forwarded to.
|
|
2827
|
-
*
|
|
2828
|
-
* `cubePort` is the port **inside** the Cube that sshd listens on — NOT the
|
|
2829
|
-
* host port you connect to. The host port is allocated by Krova and is not
|
|
2830
|
-
* changed by this call. Pointing this at a port nothing is listening on
|
|
2831
|
-
* inside the Cube will silently make SSH unreachable; the default is 22.
|
|
2832
|
-
*
|
|
2833
|
-
* The Krova Cloud API exposes no general Cube-mutation endpoint; the only
|
|
2834
|
-
* mutable Cube field over the API is this port, via
|
|
2835
|
-
* `PUT /spaces/{spaceId}/cubes/{cubeId}/ssh-port`. This helper maps to that
|
|
2836
|
-
* endpoint. (Compute resize / rename are not part of the public API.)
|
|
2837
|
-
*/
|
|
2838
|
-
update: (spaceId: string, cubeId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/ssh-port"]["put"]["requestBody"]>["content"]["application/json"]) => Promise<unknown>;
|
|
2839
|
-
/**
|
|
2840
|
-
* Toggle a Cube's termination-protection flag.
|
|
2841
|
-
*
|
|
2842
|
-
* The v1 API exposes `PATCH /spaces/{spaceId}/cubes/{cubeId}` with body
|
|
2843
|
-
* `{ terminationProtection: boolean }`. The call is idempotent: passing the
|
|
2844
|
-
* current value is a no-op server-side (no audit row is written).
|
|
2845
|
-
*
|
|
2846
|
-
* Returns the updated {@link Cube}, including `terminationProtection`,
|
|
2847
|
-
* `terminationProtectionChangedAt`, and `terminationProtectionChangedBy`.
|
|
2848
|
-
*/
|
|
2849
|
-
setTerminationProtection: (spaceId: string, cubeId: string, enabled: boolean) => Promise<Cube>;
|
|
2850
|
-
/**
|
|
2851
|
-
* Delete a Cube (asynchronous — deletion is enqueued).
|
|
2852
|
-
*
|
|
2853
|
-
* Throws {@link TerminationProtectedError} when the server returns `409`
|
|
2854
|
-
* with `error.code = "termination_protected"` — the Cube had its
|
|
2855
|
-
* termination-protection flag set and must be unprotected first. Any other
|
|
2856
|
-
* non-2xx response surfaces as a plain {@link KrovaError}.
|
|
2857
|
-
*/
|
|
2858
|
-
delete: (spaceId: string, cubeId: string) => Promise<{
|
|
2859
|
-
success: boolean;
|
|
2860
|
-
}>;
|
|
2861
|
-
/** Power off a running Cube (asynchronous — power-off is enqueued). The Cube
|
|
2862
|
-
* becomes `stopped` (its host RAM is freed); start it again with `wake`. */
|
|
2863
|
-
powerOff: (spaceId: string, cubeId: string) => Promise<unknown>;
|
|
2864
|
-
/** Start a stopped Cube (asynchronous — start is enqueued). */
|
|
2865
|
-
/**
|
|
2866
|
-
* Restart a Cube (COLD restart).
|
|
2867
|
-
*
|
|
2868
|
-
* The hypervisor process is stopped and relaunched, so the Cube boots
|
|
2869
|
-
* against the host's current kernel. This is the only way a Cube picks up a
|
|
2870
|
-
* refreshed guest kernel after a platform image update — a `reboot` issued
|
|
2871
|
-
* INSIDE the Cube cannot do it, because Firecracker treats a guest reboot as
|
|
2872
|
-
* a shutdown and the kernel is supplied externally by the host.
|
|
2873
|
-
*
|
|
2874
|
-
* Disk state is preserved; only the kernel changes. The Cube must be
|
|
2875
|
-
* `running`. Concurrent restarts of the same Cube are rejected (409) rather
|
|
2876
|
-
* than queued twice.
|
|
2877
|
-
*/
|
|
2878
|
-
restart: (spaceId: string, cubeId: string) => Promise<unknown>;
|
|
2879
|
-
wake: (spaceId: string, cubeId: string) => Promise<unknown>;
|
|
2880
|
-
/**
|
|
2881
|
-
* Get a Cube's SSH connection info — host, port, login user, and (when
|
|
2882
|
-
* available) the pinned host public keys for strict host-key verification.
|
|
2883
|
-
*/
|
|
2884
|
-
ssh: (spaceId: string, cubeId: string) => Promise<CubeSshInfo>;
|
|
2885
|
-
/**
|
|
2886
|
-
* Restore a Cube's disk from one of its {@link Snapshot}s (asynchronous —
|
|
2887
|
-
* the restore is enqueued). The Cube's current disk is replaced.
|
|
2888
|
-
*/
|
|
2889
|
-
restore: (spaceId: string, cubeId: string, snapshotId: string) => Promise<{
|
|
2890
|
-
success: boolean;
|
|
2891
|
-
}>;
|
|
2892
|
-
};
|
|
2893
|
-
/**
|
|
2894
|
-
* Resolve the {@link Space} this API key is scoped to — so you don't have to
|
|
2895
|
-
* hardcode a `spaceId`. Handy right after constructing the client:
|
|
2896
|
-
*
|
|
2897
|
-
* @example
|
|
2898
|
-
* ```ts
|
|
2899
|
-
* const space = await krova.getSpace();
|
|
2900
|
-
* const cubes = await krova.cubes.list(space.id);
|
|
2901
|
-
* ```
|
|
2902
|
-
*/
|
|
2903
|
-
getSpace(): Promise<Space>;
|
|
2904
|
-
readonly domains: {
|
|
2905
|
-
/** List the custom domains attached to a Cube. */
|
|
2906
|
-
list: (spaceId: string, cubeId: string) => Promise<Domain[]>;
|
|
2907
|
-
/**
|
|
2908
|
-
* Attach a custom domain to a Cube. `domain` + `port` are required.
|
|
2909
|
-
*
|
|
2910
|
-
* Returns the domain AND the DNS records you must publish for it to work —
|
|
2911
|
-
* so you can create them in the same run, without a second call and without
|
|
2912
|
-
* hard-coding record shapes. A wildcard needs three; an exact host needs one.
|
|
2913
|
-
*
|
|
2914
|
-
* ⛔ BREAKING in 0.4.0: this used to resolve to `Domain`. It now resolves to
|
|
2915
|
-
* `{ domain, records }`, because for a wildcard two of the three records
|
|
2916
|
-
* (the ownership TXT and the `_acme-challenge` delegation) were not
|
|
2917
|
-
* derivable from anything the SDK returned — an integration had to read
|
|
2918
|
-
* them out of the docs and hope they still matched the server.
|
|
2919
|
-
*/
|
|
2920
|
-
create: (spaceId: string, cubeId: string, body: CreateDomainInput) => Promise<{
|
|
2921
|
-
domain: Domain;
|
|
2922
|
-
records: DnsRecord[];
|
|
2923
|
-
}>;
|
|
2924
|
-
/**
|
|
2925
|
-
* The DNS records a domain needs, each checked against live DNS.
|
|
2926
|
-
*
|
|
2927
|
-
* Poll this after publishing them: `summary.complete` turns true only once
|
|
2928
|
-
* every record is `found`. Each call performs real DNS lookups and is rate
|
|
2929
|
-
* limited, so poll on an interval rather than in a tight loop.
|
|
2930
|
-
*/
|
|
2931
|
-
records: (spaceId: string, cubeId: string, mappingId: string) => Promise<{
|
|
2932
|
-
domain: string;
|
|
2933
|
-
isWildcard: boolean;
|
|
2934
|
-
records: DnsRecordStatus[];
|
|
2935
|
-
summary: {
|
|
2936
|
-
found: number;
|
|
2937
|
-
total: number;
|
|
2938
|
-
complete: boolean;
|
|
2939
|
-
};
|
|
2940
|
-
checkedAt: string;
|
|
2941
|
-
}>;
|
|
2942
|
-
/** Update a domain's per-domain proxy settings. */
|
|
2943
|
-
update: (spaceId: string, cubeId: string, mappingId: string, body: UpdateDomainInput) => Promise<Domain>;
|
|
2944
|
-
/** Detach a custom domain from a Cube. */
|
|
2945
|
-
delete: (spaceId: string, cubeId: string, mappingId: string) => Promise<{
|
|
2946
|
-
success: boolean;
|
|
2947
|
-
} | undefined>;
|
|
2948
|
-
};
|
|
2949
|
-
readonly snapshots: {
|
|
2950
|
-
/** List a Cube's snapshots. */
|
|
2951
|
-
list: (spaceId: string, cubeId: string) => Promise<Snapshot[]>;
|
|
2952
|
-
/** Create a snapshot of a Cube's disk (asynchronous — enqueued). */
|
|
2953
|
-
create: (spaceId: string, cubeId: string, body?: {
|
|
2954
|
-
name?: string;
|
|
2955
|
-
}) => Promise<Snapshot>;
|
|
2956
|
-
/** Delete a snapshot. */
|
|
2957
|
-
delete: (spaceId: string, cubeId: string, snapshotId: string) => Promise<{
|
|
2958
|
-
success: boolean;
|
|
2959
|
-
}>;
|
|
2960
|
-
};
|
|
2961
|
-
readonly tcpMappings: {
|
|
2962
|
-
/** List a Cube's TCP port mappings. */
|
|
2963
|
-
list: (spaceId: string, cubeId: string) => Promise<TcpMapping[]>;
|
|
2964
|
-
/**
|
|
2965
|
-
* Create a TCP port mapping exposing a Cube port on the host. `cubePort` is
|
|
2966
|
-
* required; `whitelistedIps` optionally restricts who can reach it.
|
|
2967
|
-
*
|
|
2968
|
-
* ⛔ Send `whitelistedIps`, not `whitelistIps`. The published spec named
|
|
2969
|
-
* the field `whitelistIps` while the server has always read
|
|
2970
|
-
* `whitelistedIps`, so every allow-listed mapping created through this SDK
|
|
2971
|
-
* was silently published WORLD-OPEN, with a 201 and no error (reproduced
|
|
2972
|
-
* on production 2026-09-02). The server now accepts both, so an older
|
|
2973
|
-
* client keeps working, but `whitelistIps` is deprecated.
|
|
2974
|
-
*
|
|
2975
|
-
* **Omitting the allow-list leaves the port open to the internet.** That is
|
|
2976
|
-
* the documented behaviour, not an oversight — but it means a typo in the
|
|
2977
|
-
* field name fails OPEN, which is exactly how the original defect survived.
|
|
2978
|
-
*
|
|
2979
|
-
* `udpEnabled` optionally forwards UDP traffic on the same host port
|
|
2980
|
-
* alongside TCP. It is optional and the server defaults it to `true` when
|
|
2981
|
-
* omitted — so leave it unset to get UDP forwarding, and pass `false`
|
|
2982
|
-
* only to explicitly disable it.
|
|
2983
|
-
*/
|
|
2984
|
-
create: (spaceId: string, cubeId: string, body: CreateTcpMappingInput) => Promise<TcpMapping>;
|
|
2985
|
-
/** Delete a TCP port mapping. */
|
|
2986
|
-
delete: (spaceId: string, cubeId: string, mappingId: string) => Promise<{
|
|
2987
|
-
success: boolean;
|
|
2988
|
-
} | undefined>;
|
|
2989
|
-
};
|
|
2990
|
-
readonly imports: {
|
|
2991
|
-
/**
|
|
2992
|
-
* Start importing a `.cube` archive into a new Cube. Returns the multipart
|
|
2993
|
-
* upload target (`importId`, `uploadId`, presigned `parts`, …). Upload the
|
|
2994
|
-
* archive to those URLs, then call {@link imports.complete}.
|
|
2995
|
-
*/
|
|
2996
|
-
create: (spaceId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
2997
|
-
chunkSizeBytes?: number;
|
|
2998
|
-
expiresAt?: string;
|
|
2999
|
-
importId?: string;
|
|
3000
|
-
key?: string;
|
|
3001
|
-
parts?: {
|
|
3002
|
-
partNumber?: number;
|
|
3003
|
-
url?: string;
|
|
3004
|
-
}[] | undefined;
|
|
3005
|
-
uploadId?: string;
|
|
3006
|
-
} | undefined>;
|
|
3007
|
-
/** Get an in-progress or completed import by id. */
|
|
3008
|
-
get: (spaceId: string, importId: string) => Promise<{
|
|
3009
|
-
import?: {
|
|
3010
|
-
completedAt?: string | null;
|
|
3011
|
-
createdAt?: string;
|
|
3012
|
-
cubeId?: string | null;
|
|
3013
|
-
error?: string | null;
|
|
3014
|
-
id?: string;
|
|
3015
|
-
name?: string;
|
|
3016
|
-
status?: "uploading" | "finalizing" | "provisioning" | "complete" | "failed" | "expired";
|
|
3017
|
-
updatedAt?: string;
|
|
3018
|
-
} | undefined;
|
|
3019
|
-
}>;
|
|
3020
|
-
/**
|
|
3021
|
-
* Finish an import after the archive has been uploaded — provisions the
|
|
3022
|
-
* Cube. Pass the uploaded `parts` (partNumber + etag) and the resolved
|
|
3023
|
-
* `config`.
|
|
3024
|
-
*/
|
|
3025
|
-
complete: (spaceId: string, importId: string, body: NonNullable<paths["/spaces/{spaceId}/cubes/imports/{importId}/complete"]["post"]["requestBody"]>["content"]["application/json"]) => Promise<{
|
|
3026
|
-
cubeId?: string;
|
|
3027
|
-
importId?: string;
|
|
3028
|
-
status?: "provisioning";
|
|
3029
|
-
} | undefined>;
|
|
3030
|
-
/** Cancel an in-progress import. */
|
|
3031
|
-
cancel: (spaceId: string, importId: string) => Promise<{
|
|
3032
|
-
success: boolean;
|
|
3033
|
-
} | undefined>;
|
|
3034
|
-
};
|
|
3035
|
-
readonly backups: {
|
|
3036
|
-
/** List the space's backups, newest first, including copies shared into it. */
|
|
3037
|
-
list: (spaceId: string) => Promise<Backup[]>;
|
|
3038
|
-
/** Get one backup. */
|
|
3039
|
-
get: (spaceId: string, backupId: string) => Promise<Backup>;
|
|
3040
|
-
/** Get a time-limited download URL for a backup `.cube` archive. */
|
|
3041
|
-
download: (spaceId: string, backupId: string) => Promise<{
|
|
3042
|
-
expiresAt?: string;
|
|
3043
|
-
filename?: string;
|
|
3044
|
-
sizeBytes?: number | null;
|
|
3045
|
-
url?: string;
|
|
3046
|
-
} | undefined>;
|
|
3047
|
-
/**
|
|
3048
|
-
* Offer a copy of a backup to another space. Returns the pending
|
|
3049
|
-
* {@link BackupShare}.
|
|
3050
|
-
*
|
|
3051
|
-
* Nothing is copied until the destination accepts: its owner, or a member
|
|
3052
|
-
* there with `backup.manage`, within 48 hours. The accepted copy is the
|
|
3053
|
-
* destination's own and is billed to it; this space's backup and bill are
|
|
3054
|
-
* unchanged. Through the API a share is always a request, even when your
|
|
3055
|
-
* user owns both spaces.
|
|
3056
|
-
*
|
|
3057
|
-
* A refusal at this step never says anything about the destination's
|
|
3058
|
-
* billing or verification; those are checked when it accepts.
|
|
3059
|
-
*
|
|
3060
|
-
* @param spaceId The space that holds the backup.
|
|
3061
|
-
* @param backupId The backup to share.
|
|
3062
|
-
* @param body `{ destinationSpaceId }`.
|
|
3063
|
-
* @param opts Optional `idempotencyKey` (max 255 chars, scoped per space).
|
|
3064
|
-
*/
|
|
3065
|
-
share: (spaceId: string, backupId: string, body: {
|
|
3066
|
-
destinationSpaceId: string;
|
|
3067
|
-
}, opts?: {
|
|
3068
|
-
idempotencyKey?: string;
|
|
3069
|
-
}) => Promise<BackupShare>;
|
|
3070
|
-
};
|
|
3071
|
-
readonly backupShares: {
|
|
3072
|
-
/** Pending, unexpired shares into (`incoming`) and out of (`outgoing`) a space. */
|
|
3073
|
-
list: (spaceId: string) => Promise<BackupShareList>;
|
|
3074
|
-
/**
|
|
3075
|
-
* Accept a share offered to this space. Returns the share and the space's
|
|
3076
|
-
* new copy of the backup.
|
|
3077
|
-
*
|
|
3078
|
-
* The copy is billed to this space from now, so only a key of the space's
|
|
3079
|
-
* owner, or of a member holding `backup.manage`, may accept. A space that
|
|
3080
|
-
* cannot take the copy (no card or credit, owner not verified, an open abuse
|
|
3081
|
-
* notice, or no backup allowance left on its plan) is refused with a 422.
|
|
3082
|
-
*/
|
|
3083
|
-
accept: (spaceId: string, shareId: string) => Promise<AcceptedBackupShare>;
|
|
3084
|
-
/** Decline a share offered to this space. Same permission as {@link accept}. */
|
|
3085
|
-
decline: (spaceId: string, shareId: string) => Promise<BackupShare>;
|
|
3086
|
-
/**
|
|
3087
|
-
* Withdraw a pending share this space offered. Allowed for a key of the
|
|
3088
|
-
* space's owner, of a member holding `backup.manage`, or of the member who
|
|
3089
|
-
* raised the request.
|
|
3090
|
-
*/
|
|
3091
|
-
cancel: (spaceId: string, shareId: string) => Promise<BackupShare>;
|
|
3092
|
-
};
|
|
3093
|
-
readonly webhooks: {
|
|
3094
|
-
/** List webhook endpoints in a Space. */
|
|
3095
|
-
list: (spaceId: string) => Promise<Webhook[]>;
|
|
3096
|
-
/** Get a single webhook endpoint by id. Does NOT include the signing secret. */
|
|
3097
|
-
get: (spaceId: string, endpointId: string) => Promise<Webhook>;
|
|
3098
|
-
/**
|
|
3099
|
-
* Create a webhook endpoint. Returns the endpoint AND its signing secret.
|
|
3100
|
-
*
|
|
3101
|
-
* ⛔ The signing secret is shown ONLY at creation. Persist it immediately;
|
|
3102
|
-
* you cannot retrieve it later — `webhooks.get` deliberately omits it.
|
|
3103
|
-
* Losing the secret means every subsequent delivery will fail signature
|
|
3104
|
-
* verification, and you will have to delete the endpoint and create a new
|
|
3105
|
-
* one. An automation that swallows this helper's return value will lose
|
|
3106
|
-
* the secret on the next request, so the response is checked here and
|
|
3107
|
-
* throws if the server omits either the webhook or the secret.
|
|
3108
|
-
*
|
|
3109
|
-
* @param spaceId Target Space id.
|
|
3110
|
-
* @param body Webhook spec — `{ url, events, description? }`.
|
|
3111
|
-
*/
|
|
3112
|
-
create: (spaceId: string, body: CreateWebhookInput) => Promise<WebhookWithSecret>;
|
|
3113
|
-
/**
|
|
3114
|
-
* Delete a webhook endpoint (cascades delivery history).
|
|
3115
|
-
*
|
|
3116
|
-
* Resolves on any 2xx; the response body is intentionally not parsed
|
|
3117
|
-
* because the server returns `{ success: true }` but the caller does not
|
|
3118
|
-
* need it.
|
|
3119
|
-
*/
|
|
3120
|
-
delete: (spaceId: string, endpointId: string) => Promise<void>;
|
|
3121
|
-
/**
|
|
3122
|
-
* List recent deliveries for a webhook endpoint (last 30 days, max 100).
|
|
3123
|
-
*
|
|
3124
|
-
* @param spaceId Target Space id.
|
|
3125
|
-
* @param endpointId Webhook endpoint id.
|
|
3126
|
-
* @param opts Optional `limit` (1..100). Omit to let the server default to 50.
|
|
3127
|
-
*/
|
|
3128
|
-
deliveries: (spaceId: string, endpointId: string, opts?: {
|
|
3129
|
-
limit?: number;
|
|
3130
|
-
}) => Promise<WebhookDelivery[]>;
|
|
3131
|
-
};
|
|
3132
|
-
readonly catalog: {
|
|
3133
|
-
/** List regions with available capacity. */
|
|
3134
|
-
regions: () => Promise<{
|
|
3135
|
-
regions: {
|
|
3136
|
-
id: string;
|
|
3137
|
-
name: string;
|
|
3138
|
-
slug: string;
|
|
3139
|
-
}[];
|
|
3140
|
-
}>;
|
|
3141
|
-
/** List available OS images. */
|
|
3142
|
-
images: () => Promise<{
|
|
3143
|
-
images: {
|
|
3144
|
-
defaultUser: string;
|
|
3145
|
-
description: string;
|
|
3146
|
-
id: string;
|
|
3147
|
-
name: string;
|
|
3148
|
-
version: string;
|
|
3149
|
-
}[];
|
|
3150
|
-
}>;
|
|
3151
|
-
/** Per-resource hourly rates and volume pricing tiers. */
|
|
3152
|
-
pricing: () => Promise<{
|
|
3153
|
-
currency: string;
|
|
3154
|
-
note: string;
|
|
3155
|
-
rates: {
|
|
3156
|
-
diskGbPerHour: number;
|
|
3157
|
-
ramGbPerHour: number;
|
|
3158
|
-
vcpuPerHour: number;
|
|
3159
|
-
};
|
|
3160
|
-
tiers: {
|
|
3161
|
-
label: string;
|
|
3162
|
-
maxVcpus: number | null;
|
|
3163
|
-
minVcpus: number;
|
|
3164
|
-
multiplier: number;
|
|
3165
|
-
}[];
|
|
3166
|
-
}>;
|
|
3167
|
-
};
|
|
3168
|
-
}
|
|
12
|
+
import { C as TcpMapping, E as paths, S as Space, T as components, _ as PricingTier, a as BackupShareList, b as ResizeCubeResult, c as CreateTcpMappingInput, d as DEFAULT_BASE_URL, f as Domain, g as Pagination, h as KrovaClientOptions, i as BackupShare, l as Cube, m as KrovaClient, n as AuthScheme, o as CreateCubeInput, p as Image, r as Backup, s as CreateDomainInput, t as AcceptedBackupShare, u as CubeSshInfo, v as Region, w as UpdateDomainInput, x as Snapshot, y as ResizeCubeInput } from "./client-DWShmqpe.js";
|
|
3169
13
|
/**
|
|
3170
14
|
* The error body shape returned by the Krova Cloud API.
|
|
3171
15
|
*
|
|
@@ -3273,4 +117,4 @@ export declare class TerminationProtectedError extends KrovaError {
|
|
|
3273
117
|
* missing optional fields.
|
|
3274
118
|
*/
|
|
3275
119
|
export declare function terminationProtectedFrom(response: Response, cubeId: string, body: unknown): TerminationProtectedError | null;
|
|
3276
|
-
export type
|
|
120
|
+
export { type AcceptedBackupShare, type AuthScheme, type Backup, type BackupShare, type BackupShareList, type CreateCubeInput, type CreateDomainInput, type CreateTcpMappingInput, type Cube, type CubeSshInfo, DEFAULT_BASE_URL, type Domain, type Image, KrovaClient, type KrovaClientOptions, type KrovaErrorBody, type Pagination, type PricingTier, type Region, type ResizeCubeInput, type ResizeCubeResult, type Snapshot, type Space, type TcpMapping, type UpdateDomainInput, type components, type paths };
|