@krovacloud/sdk 0.4.12 → 0.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +63 -11
- package/dist/index.cjs +116 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +514 -6
- package/dist/index.d.ts +514 -6
- package/dist/index.js +116 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -307,6 +307,298 @@ interface paths {
|
|
|
307
307
|
patch?: never;
|
|
308
308
|
trace?: never;
|
|
309
309
|
};
|
|
310
|
+
"/spaces/{spaceId}/backup-shares": {
|
|
311
|
+
parameters: {
|
|
312
|
+
query?: never;
|
|
313
|
+
header?: never;
|
|
314
|
+
path?: never;
|
|
315
|
+
cookie?: never;
|
|
316
|
+
};
|
|
317
|
+
/** List pending backup shares into and out of this space */
|
|
318
|
+
get: {
|
|
319
|
+
parameters: {
|
|
320
|
+
query?: never;
|
|
321
|
+
header?: never;
|
|
322
|
+
path: {
|
|
323
|
+
spaceId: string;
|
|
324
|
+
};
|
|
325
|
+
cookie?: never;
|
|
326
|
+
};
|
|
327
|
+
requestBody?: never;
|
|
328
|
+
responses: {
|
|
329
|
+
/** @description `incoming` asks this space to accept a copy; `outgoing` was offered by this space */
|
|
330
|
+
200: {
|
|
331
|
+
headers: {
|
|
332
|
+
[name: string]: unknown;
|
|
333
|
+
};
|
|
334
|
+
content: {
|
|
335
|
+
"application/json": {
|
|
336
|
+
incoming: components["schemas"]["BackupShare"][];
|
|
337
|
+
outgoing: components["schemas"]["BackupShare"][];
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
403: components["responses"]["Forbidden"];
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
put?: never;
|
|
345
|
+
post?: never;
|
|
346
|
+
delete?: never;
|
|
347
|
+
options?: never;
|
|
348
|
+
head?: never;
|
|
349
|
+
patch?: never;
|
|
350
|
+
trace?: never;
|
|
351
|
+
};
|
|
352
|
+
"/spaces/{spaceId}/backup-shares/{shareId}/accept": {
|
|
353
|
+
parameters: {
|
|
354
|
+
query?: never;
|
|
355
|
+
header?: never;
|
|
356
|
+
path?: never;
|
|
357
|
+
cookie?: never;
|
|
358
|
+
};
|
|
359
|
+
get?: never;
|
|
360
|
+
put?: never;
|
|
361
|
+
/**
|
|
362
|
+
* Accept a backup share offered to this space
|
|
363
|
+
* @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).
|
|
364
|
+
*/
|
|
365
|
+
post: {
|
|
366
|
+
parameters: {
|
|
367
|
+
query?: never;
|
|
368
|
+
header?: never;
|
|
369
|
+
path: {
|
|
370
|
+
spaceId: string;
|
|
371
|
+
shareId: string;
|
|
372
|
+
};
|
|
373
|
+
cookie?: never;
|
|
374
|
+
};
|
|
375
|
+
requestBody?: never;
|
|
376
|
+
responses: {
|
|
377
|
+
/** @description The share and the new copy */
|
|
378
|
+
200: {
|
|
379
|
+
headers: {
|
|
380
|
+
[name: string]: unknown;
|
|
381
|
+
};
|
|
382
|
+
content: {
|
|
383
|
+
"application/json": {
|
|
384
|
+
backup: components["schemas"]["Backup"];
|
|
385
|
+
share: components["schemas"]["BackupShare"];
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
403: components["responses"]["Forbidden"];
|
|
390
|
+
/** @description The request is no longer pending, has expired, or this space already has a copy */
|
|
391
|
+
409: {
|
|
392
|
+
headers: {
|
|
393
|
+
[name: string]: unknown;
|
|
394
|
+
};
|
|
395
|
+
content?: never;
|
|
396
|
+
};
|
|
397
|
+
/** @description This space cannot take the copy right now */
|
|
398
|
+
422: {
|
|
399
|
+
headers: {
|
|
400
|
+
[name: string]: unknown;
|
|
401
|
+
};
|
|
402
|
+
content?: never;
|
|
403
|
+
};
|
|
404
|
+
429: components["responses"]["RateLimited"];
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
delete?: never;
|
|
408
|
+
options?: never;
|
|
409
|
+
head?: never;
|
|
410
|
+
patch?: never;
|
|
411
|
+
trace?: never;
|
|
412
|
+
};
|
|
413
|
+
"/spaces/{spaceId}/backup-shares/{shareId}/cancel": {
|
|
414
|
+
parameters: {
|
|
415
|
+
query?: never;
|
|
416
|
+
header?: never;
|
|
417
|
+
path?: never;
|
|
418
|
+
cookie?: never;
|
|
419
|
+
};
|
|
420
|
+
get?: never;
|
|
421
|
+
put?: never;
|
|
422
|
+
/**
|
|
423
|
+
* Withdraw a pending backup share offered by this space
|
|
424
|
+
* @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.
|
|
425
|
+
*/
|
|
426
|
+
post: {
|
|
427
|
+
parameters: {
|
|
428
|
+
query?: never;
|
|
429
|
+
header?: never;
|
|
430
|
+
path: {
|
|
431
|
+
spaceId: string;
|
|
432
|
+
shareId: string;
|
|
433
|
+
};
|
|
434
|
+
cookie?: never;
|
|
435
|
+
};
|
|
436
|
+
requestBody?: never;
|
|
437
|
+
responses: {
|
|
438
|
+
/** @description Canceled */
|
|
439
|
+
200: {
|
|
440
|
+
headers: {
|
|
441
|
+
[name: string]: unknown;
|
|
442
|
+
};
|
|
443
|
+
content: {
|
|
444
|
+
"application/json": {
|
|
445
|
+
share: components["schemas"]["BackupShare"];
|
|
446
|
+
};
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
403: components["responses"]["Forbidden"];
|
|
450
|
+
/** @description The request is no longer pending */
|
|
451
|
+
409: {
|
|
452
|
+
headers: {
|
|
453
|
+
[name: string]: unknown;
|
|
454
|
+
};
|
|
455
|
+
content?: never;
|
|
456
|
+
};
|
|
457
|
+
429: components["responses"]["RateLimited"];
|
|
458
|
+
};
|
|
459
|
+
};
|
|
460
|
+
delete?: never;
|
|
461
|
+
options?: never;
|
|
462
|
+
head?: never;
|
|
463
|
+
patch?: never;
|
|
464
|
+
trace?: never;
|
|
465
|
+
};
|
|
466
|
+
"/spaces/{spaceId}/backup-shares/{shareId}/decline": {
|
|
467
|
+
parameters: {
|
|
468
|
+
query?: never;
|
|
469
|
+
header?: never;
|
|
470
|
+
path?: never;
|
|
471
|
+
cookie?: never;
|
|
472
|
+
};
|
|
473
|
+
get?: never;
|
|
474
|
+
put?: never;
|
|
475
|
+
/**
|
|
476
|
+
* Decline a backup share offered to this space
|
|
477
|
+
* @description Requires an API key of this space's owner, or of a member with `backup.manage`.
|
|
478
|
+
*/
|
|
479
|
+
post: {
|
|
480
|
+
parameters: {
|
|
481
|
+
query?: never;
|
|
482
|
+
header?: never;
|
|
483
|
+
path: {
|
|
484
|
+
spaceId: string;
|
|
485
|
+
shareId: string;
|
|
486
|
+
};
|
|
487
|
+
cookie?: never;
|
|
488
|
+
};
|
|
489
|
+
requestBody?: never;
|
|
490
|
+
responses: {
|
|
491
|
+
/** @description Declined */
|
|
492
|
+
200: {
|
|
493
|
+
headers: {
|
|
494
|
+
[name: string]: unknown;
|
|
495
|
+
};
|
|
496
|
+
content: {
|
|
497
|
+
"application/json": {
|
|
498
|
+
share: components["schemas"]["BackupShare"];
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
403: components["responses"]["Forbidden"];
|
|
503
|
+
/** @description The request is no longer pending */
|
|
504
|
+
409: {
|
|
505
|
+
headers: {
|
|
506
|
+
[name: string]: unknown;
|
|
507
|
+
};
|
|
508
|
+
content?: never;
|
|
509
|
+
};
|
|
510
|
+
429: components["responses"]["RateLimited"];
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
delete?: never;
|
|
514
|
+
options?: never;
|
|
515
|
+
head?: never;
|
|
516
|
+
patch?: never;
|
|
517
|
+
trace?: never;
|
|
518
|
+
};
|
|
519
|
+
"/spaces/{spaceId}/backups": {
|
|
520
|
+
parameters: {
|
|
521
|
+
query?: never;
|
|
522
|
+
header?: never;
|
|
523
|
+
path?: never;
|
|
524
|
+
cookie?: never;
|
|
525
|
+
};
|
|
526
|
+
/** List the space's backups, newest first (shared copies included) */
|
|
527
|
+
get: {
|
|
528
|
+
parameters: {
|
|
529
|
+
query?: never;
|
|
530
|
+
header?: never;
|
|
531
|
+
path: {
|
|
532
|
+
spaceId: string;
|
|
533
|
+
};
|
|
534
|
+
cookie?: never;
|
|
535
|
+
};
|
|
536
|
+
requestBody?: never;
|
|
537
|
+
responses: {
|
|
538
|
+
/** @description Backups */
|
|
539
|
+
200: {
|
|
540
|
+
headers: {
|
|
541
|
+
[name: string]: unknown;
|
|
542
|
+
};
|
|
543
|
+
content: {
|
|
544
|
+
"application/json": {
|
|
545
|
+
backups: components["schemas"]["Backup"][];
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
403: components["responses"]["Forbidden"];
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
put?: never;
|
|
553
|
+
post?: never;
|
|
554
|
+
delete?: never;
|
|
555
|
+
options?: never;
|
|
556
|
+
head?: never;
|
|
557
|
+
patch?: never;
|
|
558
|
+
trace?: never;
|
|
559
|
+
};
|
|
560
|
+
"/spaces/{spaceId}/backups/{backupId}": {
|
|
561
|
+
parameters: {
|
|
562
|
+
query?: never;
|
|
563
|
+
header?: never;
|
|
564
|
+
path?: never;
|
|
565
|
+
cookie?: never;
|
|
566
|
+
};
|
|
567
|
+
/** Get one backup */
|
|
568
|
+
get: {
|
|
569
|
+
parameters: {
|
|
570
|
+
query?: never;
|
|
571
|
+
header?: never;
|
|
572
|
+
path: {
|
|
573
|
+
spaceId: string;
|
|
574
|
+
backupId: string;
|
|
575
|
+
};
|
|
576
|
+
cookie?: never;
|
|
577
|
+
};
|
|
578
|
+
requestBody?: never;
|
|
579
|
+
responses: {
|
|
580
|
+
/** @description The backup */
|
|
581
|
+
200: {
|
|
582
|
+
headers: {
|
|
583
|
+
[name: string]: unknown;
|
|
584
|
+
};
|
|
585
|
+
content: {
|
|
586
|
+
"application/json": {
|
|
587
|
+
backup: components["schemas"]["Backup"];
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
};
|
|
591
|
+
404: components["responses"]["NotFound"];
|
|
592
|
+
};
|
|
593
|
+
};
|
|
594
|
+
put?: never;
|
|
595
|
+
post?: never;
|
|
596
|
+
delete?: never;
|
|
597
|
+
options?: never;
|
|
598
|
+
head?: never;
|
|
599
|
+
patch?: never;
|
|
600
|
+
trace?: never;
|
|
601
|
+
};
|
|
310
602
|
"/spaces/{spaceId}/backups/{backupId}/download": {
|
|
311
603
|
parameters: {
|
|
312
604
|
query?: never;
|
|
@@ -360,6 +652,70 @@ interface paths {
|
|
|
360
652
|
patch?: never;
|
|
361
653
|
trace?: never;
|
|
362
654
|
};
|
|
655
|
+
"/spaces/{spaceId}/backups/{backupId}/shares": {
|
|
656
|
+
parameters: {
|
|
657
|
+
query?: never;
|
|
658
|
+
header?: never;
|
|
659
|
+
path?: never;
|
|
660
|
+
cookie?: never;
|
|
661
|
+
};
|
|
662
|
+
get?: never;
|
|
663
|
+
put?: never;
|
|
664
|
+
/**
|
|
665
|
+
* Offer a copy of this backup to another space
|
|
666
|
+
* @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.
|
|
667
|
+
*/
|
|
668
|
+
post: {
|
|
669
|
+
parameters: {
|
|
670
|
+
query?: never;
|
|
671
|
+
header?: {
|
|
672
|
+
/** @description Optional unique key (max 255 chars). Replays return the original response and add header Idempotency-Replayed: true. Scoped per space; expires after 24h. */
|
|
673
|
+
"Idempotency-Key"?: string;
|
|
674
|
+
};
|
|
675
|
+
path: {
|
|
676
|
+
spaceId: string;
|
|
677
|
+
backupId: string;
|
|
678
|
+
};
|
|
679
|
+
cookie?: never;
|
|
680
|
+
};
|
|
681
|
+
requestBody: {
|
|
682
|
+
content: {
|
|
683
|
+
"application/json": {
|
|
684
|
+
destinationSpaceId: string;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
};
|
|
688
|
+
responses: {
|
|
689
|
+
/** @description Share requested */
|
|
690
|
+
201: {
|
|
691
|
+
headers: {
|
|
692
|
+
[name: string]: unknown;
|
|
693
|
+
};
|
|
694
|
+
content: {
|
|
695
|
+
"application/json": {
|
|
696
|
+
share: components["schemas"]["BackupShare"];
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
};
|
|
700
|
+
400: components["responses"]["BadRequest"];
|
|
701
|
+
403: components["responses"]["Forbidden"];
|
|
702
|
+
404: components["responses"]["NotFound"];
|
|
703
|
+
/** @description The backup is not complete, is being deleted, is already in that space, or already has a pending share request for it */
|
|
704
|
+
409: {
|
|
705
|
+
headers: {
|
|
706
|
+
[name: string]: unknown;
|
|
707
|
+
};
|
|
708
|
+
content?: never;
|
|
709
|
+
};
|
|
710
|
+
429: components["responses"]["RateLimited"];
|
|
711
|
+
};
|
|
712
|
+
};
|
|
713
|
+
delete?: never;
|
|
714
|
+
options?: never;
|
|
715
|
+
head?: never;
|
|
716
|
+
patch?: never;
|
|
717
|
+
trace?: never;
|
|
718
|
+
};
|
|
363
719
|
"/spaces/{spaceId}/cubes": {
|
|
364
720
|
parameters: {
|
|
365
721
|
query?: never;
|
|
@@ -995,7 +1351,7 @@ interface paths {
|
|
|
995
1351
|
};
|
|
996
1352
|
};
|
|
997
1353
|
400: components["responses"]["BadRequest"];
|
|
998
|
-
/** @description Refused. Among other reasons (the domain is in use
|
|
1354
|
+
/** @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. */
|
|
999
1355
|
409: {
|
|
1000
1356
|
headers: {
|
|
1001
1357
|
[name: string]: unknown;
|
|
@@ -1047,6 +1403,13 @@ interface paths {
|
|
|
1047
1403
|
};
|
|
1048
1404
|
};
|
|
1049
1405
|
404: components["responses"]["NotFound"];
|
|
1406
|
+
/** @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. */
|
|
1407
|
+
409: {
|
|
1408
|
+
headers: {
|
|
1409
|
+
[name: string]: unknown;
|
|
1410
|
+
};
|
|
1411
|
+
content?: never;
|
|
1412
|
+
};
|
|
1050
1413
|
};
|
|
1051
1414
|
};
|
|
1052
1415
|
options?: never;
|
|
@@ -1146,7 +1509,7 @@ interface paths {
|
|
|
1146
1509
|
};
|
|
1147
1510
|
400: components["responses"]["BadRequest"];
|
|
1148
1511
|
404: components["responses"]["NotFound"];
|
|
1149
|
-
/** @description Refused. Among other reasons (the domain is in use
|
|
1512
|
+
/** @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. */
|
|
1150
1513
|
409: {
|
|
1151
1514
|
headers: {
|
|
1152
1515
|
[name: string]: unknown;
|
|
@@ -1556,6 +1919,13 @@ interface paths {
|
|
|
1556
1919
|
};
|
|
1557
1920
|
400: components["responses"]["BadRequest"];
|
|
1558
1921
|
404: components["responses"]["NotFound"];
|
|
1922
|
+
/** @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. */
|
|
1923
|
+
409: {
|
|
1924
|
+
headers: {
|
|
1925
|
+
[name: string]: unknown;
|
|
1926
|
+
};
|
|
1927
|
+
content?: never;
|
|
1928
|
+
};
|
|
1559
1929
|
429: components["responses"]["RateLimited"];
|
|
1560
1930
|
};
|
|
1561
1931
|
};
|
|
@@ -1648,6 +2018,13 @@ interface paths {
|
|
|
1648
2018
|
};
|
|
1649
2019
|
};
|
|
1650
2020
|
400: components["responses"]["BadRequest"];
|
|
2021
|
+
/** @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. */
|
|
2022
|
+
409: {
|
|
2023
|
+
headers: {
|
|
2024
|
+
[name: string]: unknown;
|
|
2025
|
+
};
|
|
2026
|
+
content?: never;
|
|
2027
|
+
};
|
|
1651
2028
|
429: components["responses"]["RateLimited"];
|
|
1652
2029
|
};
|
|
1653
2030
|
};
|
|
@@ -1693,6 +2070,13 @@ interface paths {
|
|
|
1693
2070
|
};
|
|
1694
2071
|
};
|
|
1695
2072
|
404: components["responses"]["NotFound"];
|
|
2073
|
+
/** @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. */
|
|
2074
|
+
409: {
|
|
2075
|
+
headers: {
|
|
2076
|
+
[name: string]: unknown;
|
|
2077
|
+
};
|
|
2078
|
+
content?: never;
|
|
2079
|
+
};
|
|
1696
2080
|
};
|
|
1697
2081
|
};
|
|
1698
2082
|
options?: never;
|
|
@@ -1781,7 +2165,7 @@ interface paths {
|
|
|
1781
2165
|
requestBody: {
|
|
1782
2166
|
content: {
|
|
1783
2167
|
"application/json": {
|
|
1784
|
-
events: ("cube.created" | "cube.running" | "cube.stopped" | "cube.error" | "cube.deleted" | "cube.cold_restarted" | "cube.transfer.started" | "cube.transfer.completed" | "cube.transfer.failed" | "cube.resize.started" | "cube.resize.completed" | "cube.resize.failed" | "resource.alert.memory" | "resource.alert.cpu" | "resource.alert.disk" | "domain.alert.error_4xx" | "domain.alert.error_5xx" | "cube.space_transferred" | "cube.space_transfer.requested" | "cube.space_transfer.accepted" | "cube.space_transfer.declined" | "cube.space_transfer.cancelled" | "cube.space_transfer.expired" | "snapshot.created" | "snapshot.restored" | "snapshot.deleted" | "snapshot.pinned" | "snapshot.promoted_to_backup" | "snapshot.exported" | "backup.created" | "backup.deleted" | "backup.redeployed" | "domain.added" | "domain.active" | "domain.removed" | "tcp_mapping.added" | "tcp_mapping.removed" | "tcp_mapping.updated" | "hosting.provisioned" | "hosting.suspended" | "hosting.unsuspended" | "hosting.deleted" | "hosting.plan_changed" | "hosting.renewed" | "hosting.cancellation_scheduled" | "hosting.suspended_for_non_payment" | "hosting.deleted_after_recovery" | "member.invited" | "member.joined" | "member.removed" | "member.role_changed")[];
|
|
2168
|
+
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")[];
|
|
1785
2169
|
/** Format: uri */
|
|
1786
2170
|
url: string;
|
|
1787
2171
|
};
|
|
@@ -1906,6 +2290,58 @@ interface paths {
|
|
|
1906
2290
|
}
|
|
1907
2291
|
interface components {
|
|
1908
2292
|
schemas: {
|
|
2293
|
+
Backup: {
|
|
2294
|
+
/** Format: date-time */
|
|
2295
|
+
completedAt: string | null;
|
|
2296
|
+
/** @description The Cube configuration captured with the backup, used by redeploy. A shared copy carries no domains. */
|
|
2297
|
+
config: {
|
|
2298
|
+
diskLimitGb: number | null;
|
|
2299
|
+
domains: {
|
|
2300
|
+
domain: string;
|
|
2301
|
+
port: number;
|
|
2302
|
+
}[];
|
|
2303
|
+
imageId: string | null;
|
|
2304
|
+
ramMb: number | null;
|
|
2305
|
+
regionId: string | null;
|
|
2306
|
+
regionName: string | null;
|
|
2307
|
+
tcpPorts: {
|
|
2308
|
+
cubePort: number;
|
|
2309
|
+
label: string | null;
|
|
2310
|
+
}[];
|
|
2311
|
+
vcpus: number | null;
|
|
2312
|
+
};
|
|
2313
|
+
/** Format: date-time */
|
|
2314
|
+
createdAt: string;
|
|
2315
|
+
diskSizeGb: number;
|
|
2316
|
+
id: string;
|
|
2317
|
+
name: string;
|
|
2318
|
+
originalCubeId: string;
|
|
2319
|
+
originalCubeName: string;
|
|
2320
|
+
redeployedCubeId: string | null;
|
|
2321
|
+
/** @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. */
|
|
2322
|
+
sharedFromBackupId: string | null;
|
|
2323
|
+
sizeBytes: number | null;
|
|
2324
|
+
/** @enum {string} */
|
|
2325
|
+
status: "pending" | "creating" | "complete" | "failed";
|
|
2326
|
+
};
|
|
2327
|
+
BackupShare: {
|
|
2328
|
+
/** @description The SOURCE backup being shared. */
|
|
2329
|
+
backupId: string;
|
|
2330
|
+
backupName: string;
|
|
2331
|
+
/** @description The destination space's own copy, once the share is accepted. */
|
|
2332
|
+
copyBackupId: string | null;
|
|
2333
|
+
/** @description The other space in this share: the destination on an outgoing share, the source on an incoming one. */
|
|
2334
|
+
counterpartySpaceName: string;
|
|
2335
|
+
/** Format: date-time */
|
|
2336
|
+
createdAt: string;
|
|
2337
|
+
destinationSpaceId: string;
|
|
2338
|
+
/** Format: date-time */
|
|
2339
|
+
expiresAt: string;
|
|
2340
|
+
id: string;
|
|
2341
|
+
sourceSpaceId: string;
|
|
2342
|
+
/** @enum {string} */
|
|
2343
|
+
status: "pending" | "accepted" | "declined" | "canceled" | "expired";
|
|
2344
|
+
};
|
|
1909
2345
|
Cube: {
|
|
1910
2346
|
costPerHour: number;
|
|
1911
2347
|
/** Format: date-time */
|
|
@@ -2202,6 +2638,29 @@ type DnsRecordStatus = components["schemas"]["DnsRecordStatus"];
|
|
|
2202
2638
|
type Snapshot = components["schemas"]["Snapshot"];
|
|
2203
2639
|
/** A TCP port mapping exposing a Cube port on the host. */
|
|
2204
2640
|
type TcpMapping = components["schemas"]["TcpMapping"];
|
|
2641
|
+
/**
|
|
2642
|
+
* A backup: a Cube's disk and configuration, kept after the Cube is gone and
|
|
2643
|
+
* redeployable as a new Cube. `sharedFromBackupId` is set on a copy another
|
|
2644
|
+
* space shared with this one.
|
|
2645
|
+
*/
|
|
2646
|
+
type Backup = components["schemas"]["Backup"];
|
|
2647
|
+
/**
|
|
2648
|
+
* A request to give another space its own copy of a backup.
|
|
2649
|
+
*
|
|
2650
|
+
* `counterpartySpaceName` is the other side: the destination on an outgoing
|
|
2651
|
+
* share, the source on an incoming one. `copyBackupId` is set once accepted.
|
|
2652
|
+
*/
|
|
2653
|
+
type BackupShare = components["schemas"]["BackupShare"];
|
|
2654
|
+
/** Pending, unexpired backup shares into and out of a space. */
|
|
2655
|
+
interface BackupShareList {
|
|
2656
|
+
incoming: BackupShare[];
|
|
2657
|
+
outgoing: BackupShare[];
|
|
2658
|
+
}
|
|
2659
|
+
/** An accepted share, and the destination space's new copy. */
|
|
2660
|
+
interface AcceptedBackupShare {
|
|
2661
|
+
share: BackupShare;
|
|
2662
|
+
backup: Backup;
|
|
2663
|
+
}
|
|
2205
2664
|
/** Request body for attaching a custom domain to a Cube. */
|
|
2206
2665
|
type CreateDomainInput = NonNullable<paths["/spaces/{spaceId}/cubes/{cubeId}/domains"]["post"]["requestBody"]>["content"]["application/json"];
|
|
2207
2666
|
/** Request body for updating a custom domain's proxy settings. */
|
|
@@ -2477,7 +2936,7 @@ declare class KrovaClient {
|
|
|
2477
2936
|
/** Detach a custom domain from a Cube. */
|
|
2478
2937
|
delete: (spaceId: string, cubeId: string, mappingId: string) => Promise<{
|
|
2479
2938
|
success: boolean;
|
|
2480
|
-
}>;
|
|
2939
|
+
} | undefined>;
|
|
2481
2940
|
};
|
|
2482
2941
|
readonly snapshots: {
|
|
2483
2942
|
/** List a Cube's snapshots. */
|
|
@@ -2518,7 +2977,7 @@ declare class KrovaClient {
|
|
|
2518
2977
|
/** Delete a TCP port mapping. */
|
|
2519
2978
|
delete: (spaceId: string, cubeId: string, mappingId: string) => Promise<{
|
|
2520
2979
|
success: boolean;
|
|
2521
|
-
}>;
|
|
2980
|
+
} | undefined>;
|
|
2522
2981
|
};
|
|
2523
2982
|
readonly imports: {
|
|
2524
2983
|
/**
|
|
@@ -2566,6 +3025,10 @@ declare class KrovaClient {
|
|
|
2566
3025
|
} | undefined>;
|
|
2567
3026
|
};
|
|
2568
3027
|
readonly backups: {
|
|
3028
|
+
/** List the space's backups, newest first, including copies shared into it. */
|
|
3029
|
+
list: (spaceId: string) => Promise<Backup[]>;
|
|
3030
|
+
/** Get one backup. */
|
|
3031
|
+
get: (spaceId: string, backupId: string) => Promise<Backup>;
|
|
2569
3032
|
/** Get a time-limited download URL for a backup `.cube` archive. */
|
|
2570
3033
|
download: (spaceId: string, backupId: string) => Promise<{
|
|
2571
3034
|
expiresAt?: string;
|
|
@@ -2573,6 +3036,51 @@ declare class KrovaClient {
|
|
|
2573
3036
|
sizeBytes?: number | null;
|
|
2574
3037
|
url?: string;
|
|
2575
3038
|
} | undefined>;
|
|
3039
|
+
/**
|
|
3040
|
+
* Offer a copy of a backup to another space. Returns the pending
|
|
3041
|
+
* {@link BackupShare}.
|
|
3042
|
+
*
|
|
3043
|
+
* Nothing is copied until the destination accepts: its owner, or a member
|
|
3044
|
+
* there with `backup.manage`, within 48 hours. The accepted copy is the
|
|
3045
|
+
* destination's own and is billed to it; this space's backup and bill are
|
|
3046
|
+
* unchanged. Through the API a share is always a request, even when your
|
|
3047
|
+
* user owns both spaces.
|
|
3048
|
+
*
|
|
3049
|
+
* A refusal at this step never says anything about the destination's
|
|
3050
|
+
* billing or verification; those are checked when it accepts.
|
|
3051
|
+
*
|
|
3052
|
+
* @param spaceId The space that holds the backup.
|
|
3053
|
+
* @param backupId The backup to share.
|
|
3054
|
+
* @param body `{ destinationSpaceId }`.
|
|
3055
|
+
* @param opts Optional `idempotencyKey` (max 255 chars, scoped per space).
|
|
3056
|
+
*/
|
|
3057
|
+
share: (spaceId: string, backupId: string, body: {
|
|
3058
|
+
destinationSpaceId: string;
|
|
3059
|
+
}, opts?: {
|
|
3060
|
+
idempotencyKey?: string;
|
|
3061
|
+
}) => Promise<BackupShare>;
|
|
3062
|
+
};
|
|
3063
|
+
readonly backupShares: {
|
|
3064
|
+
/** Pending, unexpired shares into (`incoming`) and out of (`outgoing`) a space. */
|
|
3065
|
+
list: (spaceId: string) => Promise<BackupShareList>;
|
|
3066
|
+
/**
|
|
3067
|
+
* Accept a share offered to this space. Returns the share and the space's
|
|
3068
|
+
* new copy of the backup.
|
|
3069
|
+
*
|
|
3070
|
+
* The copy is billed to this space from now, so only a key of the space's
|
|
3071
|
+
* owner, or of a member holding `backup.manage`, may accept. A space that
|
|
3072
|
+
* cannot take the copy (no card or credit, owner not verified, an open abuse
|
|
3073
|
+
* notice, or no backup allowance left on its plan) is refused with a 422.
|
|
3074
|
+
*/
|
|
3075
|
+
accept: (spaceId: string, shareId: string) => Promise<AcceptedBackupShare>;
|
|
3076
|
+
/** Decline a share offered to this space. Same permission as {@link accept}. */
|
|
3077
|
+
decline: (spaceId: string, shareId: string) => Promise<BackupShare>;
|
|
3078
|
+
/**
|
|
3079
|
+
* Withdraw a pending share this space offered. Allowed for a key of the
|
|
3080
|
+
* space's owner, of a member holding `backup.manage`, or of the member who
|
|
3081
|
+
* raised the request.
|
|
3082
|
+
*/
|
|
3083
|
+
cancel: (spaceId: string, shareId: string) => Promise<BackupShare>;
|
|
2576
3084
|
};
|
|
2577
3085
|
readonly webhooks: {
|
|
2578
3086
|
/** List webhook endpoints in a Space. */
|
|
@@ -2760,5 +3268,5 @@ declare class TerminationProtectedError extends KrovaError {
|
|
|
2760
3268
|
*/
|
|
2761
3269
|
declare function terminationProtectedFrom(response: Response, cubeId: string, body: unknown): TerminationProtectedError | null;
|
|
2762
3270
|
//#endregion
|
|
2763
|
-
export { type AuthScheme, type CreateCubeInput, type CreateDomainInput, type CreateTcpMappingInput, type Cube, type CubeSshInfo, DEFAULT_BASE_URL, type Domain, type Image, KrovaClient, type KrovaClientOptions, KrovaError, type KrovaErrorBody, type Pagination, type PricingTier, type Region, type Snapshot, type Space, type TcpMapping, TerminationProtectedError, type UpdateDomainInput, type components, krovaErrorFrom, type paths, terminationProtectedFrom };
|
|
3271
|
+
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, KrovaError, type KrovaErrorBody, type Pagination, type PricingTier, type Region, type Snapshot, type Space, type TcpMapping, TerminationProtectedError, type UpdateDomainInput, type components, krovaErrorFrom, type paths, terminationProtectedFrom };
|
|
2764
3272
|
//# sourceMappingURL=index.d.cts.map
|