@buddy-works/sandbox-sdk 0.1.5 → 0.1.6-rc.1
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/README.md +73 -0
- package/dist/index.d.mts +574 -37
- package/dist/index.mjs +2035 -1518
- package/package.json +67 -65
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ type GroupPermissionView = {
|
|
|
10
10
|
/**
|
|
11
11
|
* The access level for the group
|
|
12
12
|
*/
|
|
13
|
-
access_level?: "DENIED" | "READ_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT"
|
|
13
|
+
access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
|
|
14
14
|
};
|
|
15
15
|
type UserPermissionView = {
|
|
16
16
|
/**
|
|
@@ -20,7 +20,24 @@ type UserPermissionView = {
|
|
|
20
20
|
/**
|
|
21
21
|
* The access level for the user
|
|
22
22
|
*/
|
|
23
|
-
access_level?: "DENIED" | "READ_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT"
|
|
23
|
+
access_level?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Access permissions configuration
|
|
27
|
+
*/
|
|
28
|
+
type PermissionsView = {
|
|
29
|
+
/**
|
|
30
|
+
* Access level for other workspace members
|
|
31
|
+
*/
|
|
32
|
+
others?: "DENIED" | "READ_ONLY" | "USE_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT";
|
|
33
|
+
/**
|
|
34
|
+
* List of specific users with their access levels
|
|
35
|
+
*/
|
|
36
|
+
users?: Array<UserPermissionView>;
|
|
37
|
+
/**
|
|
38
|
+
* List of user groups with their access levels
|
|
39
|
+
*/
|
|
40
|
+
groups?: Array<GroupPermissionView>;
|
|
24
41
|
};
|
|
25
42
|
type IdsView = {
|
|
26
43
|
/**
|
|
@@ -48,17 +65,37 @@ type IdsView = {
|
|
|
48
65
|
*/
|
|
49
66
|
environment_id?: string;
|
|
50
67
|
/**
|
|
51
|
-
* The ID of the
|
|
68
|
+
* The ID of the artifact
|
|
52
69
|
*/
|
|
53
|
-
|
|
70
|
+
artifact_id?: string;
|
|
54
71
|
/**
|
|
55
|
-
* The ID of the
|
|
72
|
+
* The ID of the artifact version
|
|
56
73
|
*/
|
|
57
|
-
|
|
74
|
+
artifact_version_id?: string;
|
|
58
75
|
/**
|
|
59
76
|
* The ID of the sandbox
|
|
60
77
|
*/
|
|
61
78
|
sandbox_id?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The ID of the unit test suite
|
|
81
|
+
*/
|
|
82
|
+
unit_test_suite_id?: string;
|
|
83
|
+
/**
|
|
84
|
+
* The ID of the visual test suite
|
|
85
|
+
*/
|
|
86
|
+
visual_test_suite_id?: string;
|
|
87
|
+
/**
|
|
88
|
+
* The ID of the crawl suite
|
|
89
|
+
*/
|
|
90
|
+
crawl_suite_id?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The ID of the distribution
|
|
93
|
+
*/
|
|
94
|
+
distribution_id?: string;
|
|
95
|
+
/**
|
|
96
|
+
* The ID of the route
|
|
97
|
+
*/
|
|
98
|
+
route_id?: string;
|
|
62
99
|
};
|
|
63
100
|
/**
|
|
64
101
|
* Sandbox reference
|
|
@@ -120,7 +157,7 @@ type IntegrationIdView = {
|
|
|
120
157
|
/**
|
|
121
158
|
* The type of integration
|
|
122
159
|
*/
|
|
123
|
-
type?: "GIT_HUB" | "BITBUCKET" | "GOOGLE" | "DIGITAL_OCEAN" | "SLACK" | "MODULUS" | "HEROKU" | "AMAZON" | "GIT_LAB" | "SHOPIFY" | "GIT_HUB_ENTERPRISE" | "GIT_LAB_ENTERPRISE" | "PUSHOVER" | "PUSHBULLET" | "RACKSPACE" | "CUSTOM" | "CLOUDFLARE" | "NEW_RELIC" | "SENTRY" | "ROLLBAR" | "DATADOG" | "DO_SPACES" | "HONEYBADGER" | "VULTR" | "SENTRY_ENTERPRISE" | "LOGGLY" | "HIP_CHAT" | "FIREBASE" | "TELEGRAM" | "AZURE" | "UPCLOUD" | "GHOST_INSPECTOR" | "NETLIFY" | "AZURE_CLOUD" | "MICROSOFT_TEAMS" | "GOOGLE_SERVICE_ACCOUNT" | "GOOGLE_PLAY_STORE" | "DOCKER_HUB" | "APP_STORE" | "GIT_HUB_APP" | "GIT_HUB_APP_ENTERPRISE" | "GIT_HUB_API" | "ATOP" | "SNYK" | "STACK_HAWK" | "BLACKFIRE" | "BACKBLAZE" | "ONE_LOGIN" | "OKTA" | "CONTENTFUL" | "JIRA";
|
|
160
|
+
type?: "GIT_HUB" | "BITBUCKET" | "GOOGLE" | "DIGITAL_OCEAN" | "SLACK" | "MODULUS" | "HEROKU" | "AMAZON" | "GIT_LAB" | "SHOPIFY" | "GIT_HUB_ENTERPRISE" | "GIT_LAB_ENTERPRISE" | "PUSHOVER" | "PUSHBULLET" | "RACKSPACE" | "CUSTOM" | "CLOUDFLARE" | "NEW_RELIC" | "SENTRY" | "ROLLBAR" | "DATADOG" | "DO_SPACES" | "HONEYBADGER" | "VULTR" | "SENTRY_ENTERPRISE" | "LOGGLY" | "HIP_CHAT" | "FIREBASE" | "TELEGRAM" | "AZURE" | "UPCLOUD" | "GHOST_INSPECTOR" | "NETLIFY" | "AZURE_CLOUD" | "MICROSOFT_TEAMS" | "GOOGLE_SERVICE_ACCOUNT" | "GOOGLE_PLAY_STORE" | "DOCKER_HUB" | "APP_STORE" | "GIT_HUB_APP" | "GIT_HUB_APP_ENTERPRISE" | "GIT_HUB_API" | "ATOP" | "SNYK" | "STACK_HAWK" | "BLACKFIRE" | "BACKBLAZE" | "ONE_LOGIN" | "OKTA" | "CONTENTFUL" | "JIRA" | "NPM_REGISTRY" | "ANTHROPIC";
|
|
124
161
|
/**
|
|
125
162
|
* The authentication method used by the integration
|
|
126
163
|
*/
|
|
@@ -275,23 +312,6 @@ type ProjectView = {
|
|
|
275
312
|
*/
|
|
276
313
|
without_repository?: boolean;
|
|
277
314
|
};
|
|
278
|
-
/**
|
|
279
|
-
* Access permissions configuration
|
|
280
|
-
*/
|
|
281
|
-
type PermissionsView = {
|
|
282
|
-
/**
|
|
283
|
-
* Access level for other workspace members
|
|
284
|
-
*/
|
|
285
|
-
others?: "DENIED" | "READ_ONLY" | "BLIND" | "RUN_ONLY" | "READ_WRITE" | "MANAGE" | "DEFAULT" | "ALLOWED" | "STAGE" | "COMMIT" | "USE_ONLY";
|
|
286
|
-
/**
|
|
287
|
-
* List of specific users with their access levels
|
|
288
|
-
*/
|
|
289
|
-
users?: Array<UserPermissionView>;
|
|
290
|
-
/**
|
|
291
|
-
* List of user groups with their access levels
|
|
292
|
-
*/
|
|
293
|
-
groups?: Array<GroupPermissionView>;
|
|
294
|
-
};
|
|
295
315
|
/**
|
|
296
316
|
* The TLS/SSL encryption settings of the tunnel
|
|
297
317
|
*/
|
|
@@ -414,6 +434,32 @@ type TunnelView = {
|
|
|
414
434
|
*/
|
|
415
435
|
endpoint_url?: string;
|
|
416
436
|
};
|
|
437
|
+
type SandboxFetchView = {
|
|
438
|
+
/**
|
|
439
|
+
* The type of the fetch item: PROJECT_REPO, PUBLIC_REPO, or ARTIFACT
|
|
440
|
+
*/
|
|
441
|
+
type?: "PROJECT_REPO" | "PUBLIC_REPO" | "ARTIFACT";
|
|
442
|
+
/**
|
|
443
|
+
* The URL of the git repository (for PUBLIC_REPO type)
|
|
444
|
+
*/
|
|
445
|
+
repository?: string;
|
|
446
|
+
/**
|
|
447
|
+
* The branch, tag, or commit to checkout. Defaults to the default branch
|
|
448
|
+
*/
|
|
449
|
+
ref?: string;
|
|
450
|
+
/**
|
|
451
|
+
* The target path where the item will be cloned/downloaded. Defaults to the app directory
|
|
452
|
+
*/
|
|
453
|
+
path?: string;
|
|
454
|
+
/**
|
|
455
|
+
* The command to run after fetching
|
|
456
|
+
*/
|
|
457
|
+
build_command?: string;
|
|
458
|
+
/**
|
|
459
|
+
* The artifact identifier in format pkg:version (for ARTIFACT type)
|
|
460
|
+
*/
|
|
461
|
+
artifact?: string;
|
|
462
|
+
};
|
|
417
463
|
type SandboxAppView = {
|
|
418
464
|
/**
|
|
419
465
|
* The auto-generated ID of the app
|
|
@@ -485,6 +531,17 @@ type SandboxContentItem = {
|
|
|
485
531
|
*/
|
|
486
532
|
size?: bigint;
|
|
487
533
|
};
|
|
534
|
+
type SandboxCommandsView = {
|
|
535
|
+
/**
|
|
536
|
+
* API endpoint to GET this object
|
|
537
|
+
*/
|
|
538
|
+
readonly url?: string;
|
|
539
|
+
/**
|
|
540
|
+
* Web URL to view this object in Buddy.works
|
|
541
|
+
*/
|
|
542
|
+
readonly html_url?: string;
|
|
543
|
+
commands?: Array<SandboxCommandView>;
|
|
544
|
+
};
|
|
488
545
|
type SandboxCommandView = {
|
|
489
546
|
/**
|
|
490
547
|
* API endpoint to GET this object
|
|
@@ -555,6 +612,50 @@ type SandboxAppLogsView = {
|
|
|
555
612
|
*/
|
|
556
613
|
logs?: Array<string>;
|
|
557
614
|
};
|
|
615
|
+
type SnapshotsView = {
|
|
616
|
+
/**
|
|
617
|
+
* API endpoint to GET this object
|
|
618
|
+
*/
|
|
619
|
+
readonly url?: string;
|
|
620
|
+
/**
|
|
621
|
+
* Web URL to view this object in Buddy.works
|
|
622
|
+
*/
|
|
623
|
+
readonly html_url?: string;
|
|
624
|
+
/**
|
|
625
|
+
* Collection of snapshots
|
|
626
|
+
*/
|
|
627
|
+
snapshots?: Array<ShortSnapshotView>;
|
|
628
|
+
};
|
|
629
|
+
type ShortSnapshotView = {
|
|
630
|
+
/**
|
|
631
|
+
* API endpoint to GET this object
|
|
632
|
+
*/
|
|
633
|
+
readonly url?: string;
|
|
634
|
+
/**
|
|
635
|
+
* Web URL to view this object in Buddy.works
|
|
636
|
+
*/
|
|
637
|
+
readonly html_url?: string;
|
|
638
|
+
/**
|
|
639
|
+
* The ID of the snapshot
|
|
640
|
+
*/
|
|
641
|
+
id?: string;
|
|
642
|
+
/**
|
|
643
|
+
* Snapshot name
|
|
644
|
+
*/
|
|
645
|
+
name?: string;
|
|
646
|
+
/**
|
|
647
|
+
* Snapshot size in GB
|
|
648
|
+
*/
|
|
649
|
+
size?: number;
|
|
650
|
+
/**
|
|
651
|
+
* Snapshot status
|
|
652
|
+
*/
|
|
653
|
+
status?: "CREATING" | "CREATED" | "DELETING" | "FAILED";
|
|
654
|
+
/**
|
|
655
|
+
* Snapshot creation date
|
|
656
|
+
*/
|
|
657
|
+
create_date?: Date;
|
|
658
|
+
};
|
|
558
659
|
type ExecuteSandboxCommandRequest = {
|
|
559
660
|
/**
|
|
560
661
|
* Command to execute in the sandbox
|
|
@@ -565,6 +666,43 @@ type ExecuteSandboxCommandRequest = {
|
|
|
565
666
|
*/
|
|
566
667
|
runtime?: "BASH" | "JAVASCRIPT" | "TYPESCRIPT" | "PYTHON";
|
|
567
668
|
};
|
|
669
|
+
type AddSnapshotRequest = {
|
|
670
|
+
/**
|
|
671
|
+
* Snapshot name
|
|
672
|
+
*/
|
|
673
|
+
name?: string;
|
|
674
|
+
};
|
|
675
|
+
type SnapshotView = {
|
|
676
|
+
/**
|
|
677
|
+
* API endpoint to GET this object
|
|
678
|
+
*/
|
|
679
|
+
readonly url?: string;
|
|
680
|
+
/**
|
|
681
|
+
* Web URL to view this object in Buddy.works
|
|
682
|
+
*/
|
|
683
|
+
readonly html_url?: string;
|
|
684
|
+
/**
|
|
685
|
+
* The ID of the snapshot
|
|
686
|
+
*/
|
|
687
|
+
id?: string;
|
|
688
|
+
/**
|
|
689
|
+
* Snapshot name
|
|
690
|
+
*/
|
|
691
|
+
name?: string;
|
|
692
|
+
/**
|
|
693
|
+
* Snapshot size in GB
|
|
694
|
+
*/
|
|
695
|
+
size?: number;
|
|
696
|
+
/**
|
|
697
|
+
* Snapshot status
|
|
698
|
+
*/
|
|
699
|
+
status?: "CREATING" | "CREATED" | "DELETING" | "FAILED";
|
|
700
|
+
/**
|
|
701
|
+
* Snapshot creation date
|
|
702
|
+
*/
|
|
703
|
+
create_date?: Date;
|
|
704
|
+
created_by?: MemberView;
|
|
705
|
+
};
|
|
568
706
|
type EnvironmentVariableView = {
|
|
569
707
|
/**
|
|
570
708
|
* The ID of the variable
|
|
@@ -607,15 +745,15 @@ type EnvironmentVariableView = {
|
|
|
607
745
|
*/
|
|
608
746
|
defaults?: string;
|
|
609
747
|
/**
|
|
610
|
-
* Specifies where to copy the file on each run. Set if `type` is `SSH_KEY`
|
|
748
|
+
* Specifies where to copy the file on each run. Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`
|
|
611
749
|
*/
|
|
612
750
|
file_path?: string;
|
|
613
751
|
/**
|
|
614
|
-
* File permission set on copy to a container on each run. Set if `type` is `SSH_KEY`
|
|
752
|
+
* File permission set on copy to a container on each run. Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`
|
|
615
753
|
*/
|
|
616
754
|
file_chmod?: string;
|
|
617
755
|
/**
|
|
618
|
-
* Set if `type` is `SSH_KEY`. If it's `NONE`, the variable can be used as a parameter in an action. For `CONTAINER`, the given key is additionally copied to an action container on each run
|
|
756
|
+
* Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`. If it's `NONE`, the variable can be used as a parameter in an action. For `CONTAINER`, the given key is additionally copied to an action container on each run
|
|
619
757
|
*/
|
|
620
758
|
file_place?: "NONE" | "CONTAINER";
|
|
621
759
|
/**
|
|
@@ -643,9 +781,13 @@ type EnvironmentVariableView = {
|
|
|
643
781
|
*/
|
|
644
782
|
passphrase?: string;
|
|
645
783
|
/**
|
|
646
|
-
* GPG
|
|
784
|
+
* Key identifier for iOS certificates, provisioning profiles, or GPG keys
|
|
647
785
|
*/
|
|
648
786
|
key_identifier?: string;
|
|
787
|
+
/**
|
|
788
|
+
* Set to `true` to disable the variable. Disabled variables are not injected anywhere
|
|
789
|
+
*/
|
|
790
|
+
disabled?: boolean;
|
|
649
791
|
};
|
|
650
792
|
type CloneSandboxRequest = {
|
|
651
793
|
/**
|
|
@@ -710,6 +852,10 @@ type SandboxResponse = {
|
|
|
710
852
|
* The list of apps (run commands) for the sandbox
|
|
711
853
|
*/
|
|
712
854
|
apps?: Array<SandboxAppView>;
|
|
855
|
+
/**
|
|
856
|
+
* The list of items (repositories and artifacts) to fetch into the sandbox
|
|
857
|
+
*/
|
|
858
|
+
fetch?: Array<SandboxFetchView>;
|
|
713
859
|
/**
|
|
714
860
|
* The timeout in seconds after which the sandbox will be automatically stopped
|
|
715
861
|
*/
|
|
@@ -726,6 +872,14 @@ type SandboxResponse = {
|
|
|
726
872
|
* The tunnel endpoints of the sandbox
|
|
727
873
|
*/
|
|
728
874
|
endpoints?: Array<TunnelView>;
|
|
875
|
+
/**
|
|
876
|
+
* The SSH hostname
|
|
877
|
+
*/
|
|
878
|
+
ssh_host?: string;
|
|
879
|
+
/**
|
|
880
|
+
* The SSH port
|
|
881
|
+
*/
|
|
882
|
+
ssh_port?: number;
|
|
729
883
|
project?: ProjectView;
|
|
730
884
|
permissions?: PermissionsView;
|
|
731
885
|
/**
|
|
@@ -733,6 +887,53 @@ type SandboxResponse = {
|
|
|
733
887
|
*/
|
|
734
888
|
variables?: Array<EnvironmentVariableView>;
|
|
735
889
|
};
|
|
890
|
+
type UpdateSandboxRequestWritable = {
|
|
891
|
+
/**
|
|
892
|
+
* The name of the sandbox
|
|
893
|
+
*/
|
|
894
|
+
name?: string;
|
|
895
|
+
/**
|
|
896
|
+
* A human-readable ID. Alphanumeric characters, underscores, and hyphens (hyphens cannot appear at the start or end).
|
|
897
|
+
*/
|
|
898
|
+
identifier?: string;
|
|
899
|
+
/**
|
|
900
|
+
* The resource configuration of the sandbox (CPU x RAM)
|
|
901
|
+
*/
|
|
902
|
+
resources?: "1x2" | "2x4" | "3x6" | "4x8" | "5x10" | "6x12" | "7x14" | "8x16" | "9x18" | "10x20" | "11x22" | "12x24" | "CUSTOM";
|
|
903
|
+
/**
|
|
904
|
+
* The commands to run during first boot of the sandbox
|
|
905
|
+
*/
|
|
906
|
+
first_boot_commands?: string;
|
|
907
|
+
/**
|
|
908
|
+
* The application directory of the sandbox
|
|
909
|
+
*/
|
|
910
|
+
app_dir?: string;
|
|
911
|
+
/**
|
|
912
|
+
* The list of apps (run commands) for the sandbox
|
|
913
|
+
*/
|
|
914
|
+
apps?: Array<SandboxAppView>;
|
|
915
|
+
/**
|
|
916
|
+
* The list of items (repositories and artifacts) to fetch into the sandbox
|
|
917
|
+
*/
|
|
918
|
+
fetch?: Array<SandboxFetchView>;
|
|
919
|
+
/**
|
|
920
|
+
* The timeout in seconds after which the sandbox will be automatically stopped
|
|
921
|
+
*/
|
|
922
|
+
timeout?: number;
|
|
923
|
+
/**
|
|
924
|
+
* The list of tags associated with the sandbox
|
|
925
|
+
*/
|
|
926
|
+
tags?: Array<string>;
|
|
927
|
+
/**
|
|
928
|
+
* The tunnel endpoints of the sandbox
|
|
929
|
+
*/
|
|
930
|
+
endpoints?: Array<TunnelViewWritable>;
|
|
931
|
+
/**
|
|
932
|
+
* The environment variables of the sandbox
|
|
933
|
+
*/
|
|
934
|
+
variables?: Array<AddVariableInObjectRequestWritable>;
|
|
935
|
+
permissions?: PermissionsView;
|
|
936
|
+
};
|
|
736
937
|
/**
|
|
737
938
|
* The environment variables of the sandbox
|
|
738
939
|
*/
|
|
@@ -770,15 +971,15 @@ type AddVariableInObjectRequestWritable = {
|
|
|
770
971
|
*/
|
|
771
972
|
defaults?: string;
|
|
772
973
|
/**
|
|
773
|
-
* Specifies where to copy the file on each run. Set if `type` is `SSH_KEY`
|
|
974
|
+
* Specifies where to copy the file on each run. Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`
|
|
774
975
|
*/
|
|
775
976
|
file_path?: string;
|
|
776
977
|
/**
|
|
777
|
-
* File permission set on copy to a container on each run. Set if `type` is `SSH_KEY`
|
|
978
|
+
* File permission set on copy to a container on each run. Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`
|
|
778
979
|
*/
|
|
779
980
|
file_chmod?: string;
|
|
780
981
|
/**
|
|
781
|
-
* Set if `type` is `SSH_KEY`. If it's `NONE`, the variable can be used as a parameter in an action. For `CONTAINER`, the given key is additionally copied to an action container on each run
|
|
982
|
+
* Set if `type` is `FILE`, `SSH_KEY`, `SSH_PUBLIC_KEY`, `IOS_KEYCHAIN`, or `IOS_PROVISION_PROFILES`. If it's `NONE`, the variable can be used as a parameter in an action. For `CONTAINER`, the given key is additionally copied to an action container on each run
|
|
782
983
|
*/
|
|
783
984
|
file_place?: "NONE" | "CONTAINER";
|
|
784
985
|
/**
|
|
@@ -790,9 +991,13 @@ type AddVariableInObjectRequestWritable = {
|
|
|
790
991
|
*/
|
|
791
992
|
passphrase?: string;
|
|
792
993
|
/**
|
|
793
|
-
* GPG
|
|
994
|
+
* Key identifier for iOS certificates, provisioning profiles, or GPG keys
|
|
794
995
|
*/
|
|
795
996
|
key_identifier?: string;
|
|
997
|
+
/**
|
|
998
|
+
* Set to `true` to disable the variable. Disabled variables are not injected anywhere
|
|
999
|
+
*/
|
|
1000
|
+
disabled?: boolean;
|
|
796
1001
|
/**
|
|
797
1002
|
* The type of the added variable
|
|
798
1003
|
*/
|
|
@@ -945,6 +1150,10 @@ type CreateNewSandboxRequestWritable = {
|
|
|
945
1150
|
* The list of apps (run commands) for the sandbox
|
|
946
1151
|
*/
|
|
947
1152
|
apps?: Array<string>;
|
|
1153
|
+
/**
|
|
1154
|
+
* The list of items (repositories and artifacts) to fetch into the sandbox
|
|
1155
|
+
*/
|
|
1156
|
+
fetch?: Array<SandboxFetchView>;
|
|
948
1157
|
/**
|
|
949
1158
|
* The list of tags associated with the sandbox
|
|
950
1159
|
*/
|
|
@@ -1031,17 +1240,45 @@ type GetIdentifiersData = {
|
|
|
1031
1240
|
*/
|
|
1032
1241
|
environment?: string;
|
|
1033
1242
|
/**
|
|
1034
|
-
* The human-readable ID of the
|
|
1243
|
+
* The human-readable ID of the artifact
|
|
1035
1244
|
*/
|
|
1036
|
-
|
|
1245
|
+
artifact?: string;
|
|
1037
1246
|
/**
|
|
1038
|
-
* The version of the
|
|
1247
|
+
* The version of the artifact
|
|
1039
1248
|
*/
|
|
1040
|
-
|
|
1249
|
+
artifact_version?: string;
|
|
1041
1250
|
/**
|
|
1042
1251
|
* The human-readable ID of the sandbox
|
|
1043
1252
|
*/
|
|
1044
1253
|
sandbox?: string;
|
|
1254
|
+
/**
|
|
1255
|
+
* The human-readable ID of the unit test suite
|
|
1256
|
+
*/
|
|
1257
|
+
unit_test_suite?: string;
|
|
1258
|
+
/**
|
|
1259
|
+
* The human-readable ID of the visual test suite
|
|
1260
|
+
*/
|
|
1261
|
+
visual_test_suite?: string;
|
|
1262
|
+
/**
|
|
1263
|
+
* The human-readable ID of the crawl suite
|
|
1264
|
+
*/
|
|
1265
|
+
crawl_suite?: string;
|
|
1266
|
+
/**
|
|
1267
|
+
* The human-readable ID of the distribution
|
|
1268
|
+
*/
|
|
1269
|
+
distribution?: string;
|
|
1270
|
+
/**
|
|
1271
|
+
* The subdomain of the route. Resolved together with route_domain and route_path against the parent distribution.
|
|
1272
|
+
*/
|
|
1273
|
+
route_subdomain?: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* The domain of the route. Required to resolve a route.
|
|
1276
|
+
*/
|
|
1277
|
+
route_domain?: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* The path of the route. Resolved together with route_subdomain and route_domain against the parent distribution.
|
|
1280
|
+
*/
|
|
1281
|
+
route_path?: string;
|
|
1045
1282
|
};
|
|
1046
1283
|
url: "/workspaces/{workspace_domain}/identifiers";
|
|
1047
1284
|
};
|
|
@@ -1111,6 +1348,21 @@ type GetSandboxResponses = {
|
|
|
1111
1348
|
200: SandboxResponse;
|
|
1112
1349
|
};
|
|
1113
1350
|
type GetSandboxResponse = GetSandboxResponses[keyof GetSandboxResponses];
|
|
1351
|
+
type UpdateSandboxData = {
|
|
1352
|
+
body?: UpdateSandboxRequestWritable;
|
|
1353
|
+
path: {
|
|
1354
|
+
/**
|
|
1355
|
+
* The human-readable ID of the workspace
|
|
1356
|
+
*/
|
|
1357
|
+
workspace_domain: string;
|
|
1358
|
+
/**
|
|
1359
|
+
* The ID of the sandbox
|
|
1360
|
+
*/
|
|
1361
|
+
id: string;
|
|
1362
|
+
};
|
|
1363
|
+
query?: never;
|
|
1364
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{id}";
|
|
1365
|
+
};
|
|
1114
1366
|
type GetSandboxAppLogsByIdData = {
|
|
1115
1367
|
body?: never;
|
|
1116
1368
|
path: {
|
|
@@ -1177,6 +1429,21 @@ type StopSandboxAppData = {
|
|
|
1177
1429
|
query?: never;
|
|
1178
1430
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/apps/{app_id}/stop";
|
|
1179
1431
|
};
|
|
1432
|
+
type GetSandboxCommandsData = {
|
|
1433
|
+
body?: never;
|
|
1434
|
+
path: {
|
|
1435
|
+
/**
|
|
1436
|
+
* The human-readable ID of the workspace
|
|
1437
|
+
*/
|
|
1438
|
+
workspace_domain: string;
|
|
1439
|
+
/**
|
|
1440
|
+
* The ID of the sandbox
|
|
1441
|
+
*/
|
|
1442
|
+
sandbox_id: string;
|
|
1443
|
+
};
|
|
1444
|
+
query?: never;
|
|
1445
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/commands";
|
|
1446
|
+
};
|
|
1180
1447
|
type ExecuteSandboxCommandData = {
|
|
1181
1448
|
body?: ExecuteSandboxCommandRequest;
|
|
1182
1449
|
path: {
|
|
@@ -1358,6 +1625,74 @@ type RestartSandboxData = {
|
|
|
1358
1625
|
query?: never;
|
|
1359
1626
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/restart";
|
|
1360
1627
|
};
|
|
1628
|
+
type GetSandboxSnapshotsData = {
|
|
1629
|
+
body?: never;
|
|
1630
|
+
path: {
|
|
1631
|
+
/**
|
|
1632
|
+
* The human-readable ID of the workspace
|
|
1633
|
+
*/
|
|
1634
|
+
workspace_domain: string;
|
|
1635
|
+
/**
|
|
1636
|
+
* The ID of the sandbox
|
|
1637
|
+
*/
|
|
1638
|
+
sandbox_id: string;
|
|
1639
|
+
};
|
|
1640
|
+
query?: never;
|
|
1641
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/snapshots";
|
|
1642
|
+
};
|
|
1643
|
+
type AddSandboxSnapshotData = {
|
|
1644
|
+
body?: AddSnapshotRequest;
|
|
1645
|
+
path: {
|
|
1646
|
+
/**
|
|
1647
|
+
* The human-readable ID of the workspace
|
|
1648
|
+
*/
|
|
1649
|
+
workspace_domain: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* The ID of the sandbox
|
|
1652
|
+
*/
|
|
1653
|
+
sandbox_id: string;
|
|
1654
|
+
};
|
|
1655
|
+
query?: never;
|
|
1656
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/snapshots";
|
|
1657
|
+
};
|
|
1658
|
+
type DeleteSandboxSnapshotData = {
|
|
1659
|
+
body?: never;
|
|
1660
|
+
path: {
|
|
1661
|
+
/**
|
|
1662
|
+
* The human-readable ID of the workspace
|
|
1663
|
+
*/
|
|
1664
|
+
workspace_domain: string;
|
|
1665
|
+
/**
|
|
1666
|
+
* The ID of the sandbox
|
|
1667
|
+
*/
|
|
1668
|
+
sandbox_id: string;
|
|
1669
|
+
/**
|
|
1670
|
+
* The ID of the snapshot
|
|
1671
|
+
*/
|
|
1672
|
+
id: string;
|
|
1673
|
+
};
|
|
1674
|
+
query?: never;
|
|
1675
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/snapshots/{id}";
|
|
1676
|
+
};
|
|
1677
|
+
type GetSandboxSnapshotData = {
|
|
1678
|
+
body?: never;
|
|
1679
|
+
path: {
|
|
1680
|
+
/**
|
|
1681
|
+
* The human-readable ID of the workspace
|
|
1682
|
+
*/
|
|
1683
|
+
workspace_domain: string;
|
|
1684
|
+
/**
|
|
1685
|
+
* The ID of the sandbox
|
|
1686
|
+
*/
|
|
1687
|
+
sandbox_id: string;
|
|
1688
|
+
/**
|
|
1689
|
+
* The ID of the snapshot
|
|
1690
|
+
*/
|
|
1691
|
+
id: string;
|
|
1692
|
+
};
|
|
1693
|
+
query?: never;
|
|
1694
|
+
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/snapshots/{id}";
|
|
1695
|
+
};
|
|
1361
1696
|
type StartSandboxData = {
|
|
1362
1697
|
body?: never;
|
|
1363
1698
|
path: {
|
|
@@ -1388,6 +1723,37 @@ type StopSandboxData = {
|
|
|
1388
1723
|
query?: never;
|
|
1389
1724
|
url: "/workspaces/{workspace_domain}/sandboxes/{sandbox_id}/stop";
|
|
1390
1725
|
};
|
|
1726
|
+
type GetProjectSnapshotsData = {
|
|
1727
|
+
body?: never;
|
|
1728
|
+
path: {
|
|
1729
|
+
/**
|
|
1730
|
+
* The human-readable ID of the workspace
|
|
1731
|
+
*/
|
|
1732
|
+
workspace_domain: string;
|
|
1733
|
+
};
|
|
1734
|
+
query: {
|
|
1735
|
+
/**
|
|
1736
|
+
* The human-readable ID of the project to filter sandboxes
|
|
1737
|
+
*/
|
|
1738
|
+
project_name: string;
|
|
1739
|
+
};
|
|
1740
|
+
url: "/workspaces/{workspace_domain}/sandboxes/snapshots";
|
|
1741
|
+
};
|
|
1742
|
+
type DeleteSnapshotData = {
|
|
1743
|
+
body?: never;
|
|
1744
|
+
path: {
|
|
1745
|
+
/**
|
|
1746
|
+
* The human-readable ID of the workspace
|
|
1747
|
+
*/
|
|
1748
|
+
workspace_domain: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* The ID of the snapshot
|
|
1751
|
+
*/
|
|
1752
|
+
id: string;
|
|
1753
|
+
};
|
|
1754
|
+
query?: never;
|
|
1755
|
+
url: "/workspaces/{workspace_domain}/sandboxes/snapshots/{id}";
|
|
1756
|
+
};
|
|
1391
1757
|
//#endregion
|
|
1392
1758
|
//#region src/core/http-client.d.ts
|
|
1393
1759
|
/** Configuration options for creating an HttpClient instance */
|
|
@@ -1435,6 +1801,8 @@ declare class HttpClient {
|
|
|
1435
1801
|
post<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
1436
1802
|
/** Perform a DELETE request */
|
|
1437
1803
|
delete<T = unknown>(url: string, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
1804
|
+
/** Perform a PATCH request with optional body data */
|
|
1805
|
+
patch<T = unknown>(url: string, data?: unknown, config?: RequestConfig): Promise<HttpResponse<T>>;
|
|
1438
1806
|
/** Set the Bearer token for authenticated requests */
|
|
1439
1807
|
setAuthToken(token: string): void;
|
|
1440
1808
|
}
|
|
@@ -1486,12 +1854,31 @@ declare class BuddyApiClient extends HttpClient {
|
|
|
1486
1854
|
readonly project_name: BuddyApiConfig["project_name"];
|
|
1487
1855
|
/** Create a new sandbox */
|
|
1488
1856
|
addSandbox<const Data$1 extends AddSandboxData>(data: ClientData<Data$1>): Promise<SandboxResponse>;
|
|
1857
|
+
/** Update an existing sandbox's configuration (timeout, apps, endpoints, etc.) */
|
|
1858
|
+
updateSandbox<const Data$1 extends UpdateSandboxData>(data: ClientData<Data$1>): Promise<SandboxResponse>;
|
|
1859
|
+
/** List snapshots for a sandbox */
|
|
1860
|
+
getSandboxSnapshots<const Data$1 extends GetSandboxSnapshotsData>(data: ClientData<Data$1>): Promise<SnapshotsView>;
|
|
1861
|
+
/** List all snapshots in the project (across all sandboxes, including orphans) */
|
|
1862
|
+
getProjectSnapshots<const Data$1 extends GetProjectSnapshotsData>(data: ClientData<Data$1>): Promise<SnapshotsView>;
|
|
1863
|
+
/** Create a snapshot of a sandbox */
|
|
1864
|
+
addSandboxSnapshot<const Data$1 extends AddSandboxSnapshotData>(data: ClientData<Data$1>): Promise<SnapshotView>;
|
|
1865
|
+
/** Get a single sandbox snapshot by ID */
|
|
1866
|
+
getSandboxSnapshot<const Data$1 extends GetSandboxSnapshotData>(data: ClientData<Data$1>): Promise<SnapshotView>;
|
|
1867
|
+
/** Delete a sandbox snapshot by ID */
|
|
1868
|
+
deleteSandboxSnapshot<const Data$1 extends DeleteSandboxSnapshotData>(data: ClientData<Data$1>): Promise<void>;
|
|
1869
|
+
/**
|
|
1870
|
+
* Delete a snapshot by ID at the project level (works for snapshots whose
|
|
1871
|
+
* parent sandbox has been deleted).
|
|
1872
|
+
*/
|
|
1873
|
+
deleteSnapshot<const Data$1 extends DeleteSnapshotData>(data: ClientData<Data$1>): Promise<void>;
|
|
1489
1874
|
/** Get a specific sandbox by its ID */
|
|
1490
1875
|
getSandboxById<const Data$1 extends GetSandboxData>(data: ClientData<Data$1>): Promise<SandboxResponse>;
|
|
1491
1876
|
/** Get a specific sandbox by its ID */
|
|
1492
1877
|
getIdentifiers<const Data$1 extends GetIdentifiersData>(data: ClientData<Data$1>): Promise<IdsView>;
|
|
1493
1878
|
/** Execute a command in a sandbox */
|
|
1494
1879
|
executeCommand<const Data$1 extends ExecuteSandboxCommandData>(data: ClientData<Data$1>): Promise<SandboxCommandView>;
|
|
1880
|
+
/** List all command executions in a sandbox (history) */
|
|
1881
|
+
getSandboxCommands<const Data$1 extends GetSandboxCommandsData>(data: ClientData<Data$1>): Promise<SandboxCommandsView>;
|
|
1495
1882
|
/** Get a specific command execution details */
|
|
1496
1883
|
getCommandDetails<const Data$1 extends GetSandboxCommandData>(data: ClientData<Data$1>): Promise<SandboxCommandView>;
|
|
1497
1884
|
/** Terminate a running command in a sandbox */
|
|
@@ -1701,6 +2088,41 @@ declare class FileSystem {
|
|
|
1701
2088
|
uploadFile(source: Buffer | string, remotePath: string): Promise<void>;
|
|
1702
2089
|
}
|
|
1703
2090
|
//#endregion
|
|
2091
|
+
//#region src/entity/snapshot.d.ts
|
|
2092
|
+
declare class Snapshot {
|
|
2093
|
+
#private;
|
|
2094
|
+
/** The raw snapshot response data from the API */
|
|
2095
|
+
get data(): SnapshotView;
|
|
2096
|
+
/** The snapshot ID, throws if not present */
|
|
2097
|
+
get id(): NonNullable<SnapshotView["id"]>;
|
|
2098
|
+
/** ID of the sandbox this snapshot belongs to */
|
|
2099
|
+
get sandboxId(): string;
|
|
2100
|
+
/**
|
|
2101
|
+
* Refresh the snapshot data from the API
|
|
2102
|
+
* Updates the internal state with the latest snapshot information
|
|
2103
|
+
*/
|
|
2104
|
+
refresh(): Promise<void>;
|
|
2105
|
+
/**
|
|
2106
|
+
* Wait until the snapshot reaches CREATED state.
|
|
2107
|
+
*
|
|
2108
|
+
* `sandbox.createSnapshot()` returns immediately with `status: "CREATING"`.
|
|
2109
|
+
* The snapshot cannot be restored until it transitions to `"CREATED"`.
|
|
2110
|
+
*
|
|
2111
|
+
* @param pollIntervalMs - How often to check the status (default: 2000ms (2s))
|
|
2112
|
+
* @param maxWaitMs - Maximum time to wait before timing out (default: 180000ms (180s))
|
|
2113
|
+
*/
|
|
2114
|
+
waitUntilReady(pollIntervalMs?: number, maxWaitMs?: number): Promise<void>;
|
|
2115
|
+
/**
|
|
2116
|
+
* Delete this snapshot permanently
|
|
2117
|
+
*/
|
|
2118
|
+
delete(): Promise<void>;
|
|
2119
|
+
private constructor();
|
|
2120
|
+
/**
|
|
2121
|
+
* @internal Factory used by the Sandbox class to construct Snapshot instances.
|
|
2122
|
+
*/
|
|
2123
|
+
static _build(data: SnapshotView, client: BuddyApiClient, sandboxId: string): Snapshot;
|
|
2124
|
+
}
|
|
2125
|
+
//#endregion
|
|
1704
2126
|
//#region src/entity/sandbox.d.ts
|
|
1705
2127
|
/**
|
|
1706
2128
|
* Configuration for creating a new sandbox
|
|
@@ -1723,6 +2145,20 @@ interface ListSandboxesConfig {
|
|
|
1723
2145
|
/** Optional connection configuration to override defaults */
|
|
1724
2146
|
connection?: ConnectionConfig;
|
|
1725
2147
|
}
|
|
2148
|
+
/**
|
|
2149
|
+
* Configuration for creating a sandbox from an existing snapshot
|
|
2150
|
+
*/
|
|
2151
|
+
interface CreateFromSnapshotConfig extends Partial<Omit<CreateFromSnapshotRequestWritable, "snapshot_id">> {
|
|
2152
|
+
/** Optional connection configuration to override defaults */
|
|
2153
|
+
connection?: ConnectionConfig;
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Configuration for cloning an existing sandbox
|
|
2157
|
+
*/
|
|
2158
|
+
interface CloneSandboxConfig extends Partial<Omit<CloneSandboxRequest, "source_sandbox_id">> {
|
|
2159
|
+
/** Optional connection configuration to override defaults */
|
|
2160
|
+
connection?: ConnectionConfig;
|
|
2161
|
+
}
|
|
1726
2162
|
/**
|
|
1727
2163
|
* Options for running a command in the sandbox
|
|
1728
2164
|
*/
|
|
@@ -1751,6 +2187,25 @@ declare class Sandbox {
|
|
|
1751
2187
|
* @returns A ready-to-use Sandbox instance
|
|
1752
2188
|
*/
|
|
1753
2189
|
static create(config?: CreateSandboxConfig): Promise<Sandbox>;
|
|
2190
|
+
/**
|
|
2191
|
+
* Create a new sandbox from an existing snapshot
|
|
2192
|
+
*
|
|
2193
|
+
* @param snapshotId - ID of the snapshot to create from
|
|
2194
|
+
* @param config - Optional sandbox configuration overrides (name, identifier, …)
|
|
2195
|
+
* @returns A ready-to-use Sandbox instance restored from the snapshot
|
|
2196
|
+
*/
|
|
2197
|
+
static createFromSnapshot(snapshotId: string, config?: CreateFromSnapshotConfig): Promise<Sandbox>;
|
|
2198
|
+
/**
|
|
2199
|
+
* Clone an existing sandbox by ID into a new one.
|
|
2200
|
+
*
|
|
2201
|
+
* Differs from `createFromSnapshot` in that it copies the current state of
|
|
2202
|
+
* a live sandbox directly, without going through a snapshot.
|
|
2203
|
+
*
|
|
2204
|
+
* @param sourceSandboxId - ID of the sandbox to clone
|
|
2205
|
+
* @param config - Optional sandbox configuration overrides (name, identifier)
|
|
2206
|
+
* @returns A ready-to-use Sandbox instance cloned from the source
|
|
2207
|
+
*/
|
|
2208
|
+
static clone(sourceSandboxId: string, config?: CloneSandboxConfig): Promise<Sandbox>;
|
|
1754
2209
|
/**
|
|
1755
2210
|
* Get an existing sandbox by its identifier
|
|
1756
2211
|
* @param identifier - Identifier of the sandbox to retrieve
|
|
@@ -1776,11 +2231,93 @@ declare class Sandbox {
|
|
|
1776
2231
|
* @returns Array of simplified sandbox objects
|
|
1777
2232
|
*/
|
|
1778
2233
|
static list(config?: ListSandboxesConfig): Promise<SandboxIdView[]>;
|
|
2234
|
+
/**
|
|
2235
|
+
* Get a single snapshot by its sandbox + snapshot ID without first fetching
|
|
2236
|
+
* the parent sandbox. Useful when you already have both IDs (e.g. from a
|
|
2237
|
+
* persisted reference).
|
|
2238
|
+
*
|
|
2239
|
+
* @param sandboxId - ID of the sandbox the snapshot belongs to
|
|
2240
|
+
* @param snapshotId - ID of the snapshot to fetch
|
|
2241
|
+
* @param config - Optional configuration including connection settings
|
|
2242
|
+
*/
|
|
2243
|
+
static getSnapshotById(sandboxId: string, snapshotId: NonNullable<SnapshotView["id"]>, config?: GetSandboxConfig): Promise<Snapshot>;
|
|
1779
2244
|
/**
|
|
1780
2245
|
* Execute a command in the sandbox
|
|
1781
2246
|
* @returns Command instance (call wait() for blocking execution)
|
|
1782
2247
|
*/
|
|
1783
2248
|
runCommand(options: RunCommandOptions): Promise<Command>;
|
|
2249
|
+
/**
|
|
2250
|
+
* List all command executions in this sandbox (history).
|
|
2251
|
+
*
|
|
2252
|
+
* Returns one `Command` instance per past execution. Useful for inspecting
|
|
2253
|
+
* previous runs, fetching their logs, or killing still-running detached
|
|
2254
|
+
* commands.
|
|
2255
|
+
*/
|
|
2256
|
+
listCommands(): Promise<Command[]>;
|
|
2257
|
+
/**
|
|
2258
|
+
* Update the sandbox configuration in place
|
|
2259
|
+
*
|
|
2260
|
+
* Accepts a partial update of any mutable sandbox field (`timeout`, `apps`,
|
|
2261
|
+
* `endpoints`, `variables`, `tags`, `resources`, …). Updates the internal
|
|
2262
|
+
* state with the API's response.
|
|
2263
|
+
*
|
|
2264
|
+
* @remarks Changing `first_boot_commands` leaves the sandbox in
|
|
2265
|
+
* `setup_status: STALE` — the new commands only apply on first boot, so
|
|
2266
|
+
* the sandbox must be recreated to take effect.
|
|
2267
|
+
*/
|
|
2268
|
+
update(config: Partial<UpdateSandboxRequestWritable>): Promise<void>;
|
|
2269
|
+
/**
|
|
2270
|
+
* Create a snapshot of the current sandbox
|
|
2271
|
+
*
|
|
2272
|
+
* Returns immediately with a snapshot whose `status` is `"CREATING"`. Call
|
|
2273
|
+
* `snapshot.waitUntilReady()` (or `sandbox.waitForSnapshotReady(snapshot.id)`)
|
|
2274
|
+
* before restoring from it.
|
|
2275
|
+
*
|
|
2276
|
+
* @param config - Optional snapshot configuration (name, description, …)
|
|
2277
|
+
*/
|
|
2278
|
+
createSnapshot(config?: AddSnapshotRequest): Promise<Snapshot>;
|
|
2279
|
+
/**
|
|
2280
|
+
* List all snapshots in the project across every sandbox, including
|
|
2281
|
+
* snapshots whose parent sandbox has been deleted.
|
|
2282
|
+
*
|
|
2283
|
+
* Use `Sandbox.createFromSnapshot(snapshot.id, …)` to provision a new
|
|
2284
|
+
* sandbox from any item in the list.
|
|
2285
|
+
*
|
|
2286
|
+
* @param config - Optional configuration including connection settings
|
|
2287
|
+
*/
|
|
2288
|
+
static listSnapshots(config?: ListSandboxesConfig): Promise<ShortSnapshotView[]>;
|
|
2289
|
+
/**
|
|
2290
|
+
* List snapshots of this sandbox
|
|
2291
|
+
*/
|
|
2292
|
+
listSnapshots(): Promise<Snapshot[]>;
|
|
2293
|
+
/**
|
|
2294
|
+
* Get a single snapshot of this sandbox by ID
|
|
2295
|
+
*/
|
|
2296
|
+
getSnapshot(snapshotId: NonNullable<SnapshotView["id"]>): Promise<Snapshot>;
|
|
2297
|
+
/**
|
|
2298
|
+
* Delete a snapshot by ID without needing the parent sandbox. Useful for
|
|
2299
|
+
* cleaning up snapshots whose parent sandbox has already been deleted.
|
|
2300
|
+
*
|
|
2301
|
+
* @param snapshotId - ID of the snapshot to delete
|
|
2302
|
+
* @param config - Optional configuration including connection settings
|
|
2303
|
+
*/
|
|
2304
|
+
static deleteSnapshot(snapshotId: NonNullable<SnapshotView["id"]>, config?: GetSandboxConfig): Promise<void>;
|
|
2305
|
+
/**
|
|
2306
|
+
* Delete a snapshot of this sandbox by ID
|
|
2307
|
+
*/
|
|
2308
|
+
deleteSnapshot(snapshotId: NonNullable<SnapshotView["id"]>): Promise<void>;
|
|
2309
|
+
/**
|
|
2310
|
+
* Wait until a snapshot reaches CREATED state.
|
|
2311
|
+
*
|
|
2312
|
+
* `createSnapshot()` returns immediately with `status: "CREATING"`. The
|
|
2313
|
+
* snapshot cannot be used as input to `Sandbox.createFromSnapshot()` until
|
|
2314
|
+
* it transitions to `"CREATED"`. Use this method to block until it does.
|
|
2315
|
+
*
|
|
2316
|
+
* @param snapshotId - ID of the snapshot to wait for
|
|
2317
|
+
* @param pollIntervalMs - How often to check the status (default: 2000ms (2s))
|
|
2318
|
+
* @param maxWaitMs - Maximum time to wait before timing out (default: 180000ms (180s))
|
|
2319
|
+
*/
|
|
2320
|
+
waitForSnapshotReady(snapshotId: NonNullable<SnapshotView["id"]>, pollIntervalMs?: number, maxWaitMs?: number): Promise<void>;
|
|
1784
2321
|
/**
|
|
1785
2322
|
* Delete the sandbox permanently
|
|
1786
2323
|
*/
|
|
@@ -1873,4 +2410,4 @@ declare class BuddySDKError extends Error {
|
|
|
1873
2410
|
});
|
|
1874
2411
|
}
|
|
1875
2412
|
//#endregion
|
|
1876
|
-
export { API_URLS, BuddyApiClient, BuddySDKError, Command, type ConnectionConfig, type CreateSandboxConfig, ERROR_CODES, type ErrorCode, type FileInfo, FileSystem, type GetFileSystemConfig, type GetSandboxConfig, type ListSandboxesConfig, REGIONS, type Region, Sandbox, type SandboxAppView, type SandboxIdView };
|
|
2413
|
+
export { API_URLS, type AddSnapshotRequest, BuddyApiClient, BuddySDKError, type CloneSandboxConfig, type CloneSandboxRequest, Command, type ConnectionConfig, type CreateFromSnapshotConfig, type CreateSandboxConfig, ERROR_CODES, type ErrorCode, type FileInfo, FileSystem, type GetFileSystemConfig, type GetSandboxConfig, type ListSandboxesConfig, REGIONS, type Region, Sandbox, type SandboxAppView, type SandboxIdView, type ShortSnapshotView, Snapshot, type SnapshotView };
|