@phala/cloud 0.4.0 → 0.6.0
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 +20 -0
- package/dist/actions/api_tokens/revoke_current_api_token.d.ts +47 -0
- package/dist/actions/apps/app_launch_token.d.ts +121 -0
- package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +17 -311
- package/dist/actions/apps/check_app_is_allowed.d.ts +20 -32
- package/dist/actions/apps/create_app_instance.d.ts +43 -63
- package/dist/actions/apps/get_app_attestation.d.ts +113 -779
- package/dist/actions/apps/get_app_cvms.d.ts +1 -5
- package/dist/actions/apps/get_app_device_allowlist.d.ts +26 -272
- package/dist/actions/apps/get_app_filter_options.d.ts +8 -24
- package/dist/actions/apps/get_app_info.d.ts +1 -5
- package/dist/actions/apps/get_app_list.d.ts +2 -26
- package/dist/actions/apps/get_app_revision_detail.d.ts +1 -9
- package/dist/actions/apps/get_app_revisions.d.ts +1 -9
- package/dist/actions/blockchains/add_compose_hash.d.ts +1 -13
- package/dist/actions/blockchains/add_device.d.ts +1 -13
- package/dist/actions/blockchains/deploy_app_auth.d.ts +3 -95
- package/dist/actions/blockchains/get_allowed_devices.d.ts +2 -12
- package/dist/actions/blockchains/remove_device.d.ts +1 -13
- package/dist/actions/blockchains/set_allow_any_device.d.ts +1 -13
- package/dist/actions/cvms/check_cvm_is_allowed.d.ts +13 -138
- package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +9 -45
- package/dist/actions/cvms/commit_cvm_provision.d.ts +32 -422
- package/dist/actions/cvms/commit_cvm_update.d.ts +70 -41
- package/dist/actions/cvms/confirm_cvm_patch.d.ts +62 -35
- package/dist/actions/cvms/cvm_annotations.d.ts +152 -0
- package/dist/actions/cvms/delete_cvm.d.ts +8 -14
- package/dist/actions/cvms/get_available_os_images.d.ts +70 -111
- package/dist/actions/cvms/get_cvm_attestation.d.ts +34 -392
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +384 -614
- package/dist/actions/cvms/get_cvm_containers_stats.d.ts +25 -91
- package/dist/actions/cvms/get_cvm_docker_compose.d.ts +8 -14
- package/dist/actions/cvms/get_cvm_info.d.ts +6 -12
- package/dist/actions/cvms/get_cvm_init_scripts.d.ts +92 -0
- package/dist/actions/cvms/get_cvm_list.d.ts +7 -13
- package/dist/actions/cvms/get_cvm_network.d.ts +18 -50
- package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +8 -14
- package/dist/actions/cvms/get_cvm_state.d.ts +11 -37
- package/dist/actions/cvms/get_cvm_stats.d.ts +23 -149
- package/dist/actions/cvms/get_cvm_status_batch.d.ts +19 -209
- package/dist/actions/cvms/get_cvm_user_config.d.ts +13 -24
- package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +9 -27
- package/dist/actions/cvms/log-time.d.ts +5 -0
- package/dist/actions/cvms/logs.d.ts +64 -0
- package/dist/actions/cvms/patch_cvm.d.ts +665 -295
- package/dist/actions/cvms/provision_cvm.d.ts +329 -1561
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +550 -953
- package/dist/actions/cvms/put_cvm_init_scripts.d.ts +150 -0
- package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +74 -131
- package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +77 -297
- package/dist/actions/cvms/replicate_cvm.d.ts +7 -21
- package/dist/actions/cvms/restart_cvm.d.ts +3 -18
- package/dist/actions/cvms/shutdown_cvm.d.ts +6 -12
- package/dist/actions/cvms/start_cvm.d.ts +6 -12
- package/dist/actions/cvms/stop_cvm.d.ts +6 -12
- package/dist/actions/cvms/update_cvm_envs.d.ts +136 -203
- package/dist/actions/cvms/update_cvm_resources.d.ts +82 -48
- package/dist/actions/cvms/update_cvm_visibility.d.ts +90 -132
- package/dist/actions/cvms/update_docker_compose.d.ts +127 -202
- package/dist/actions/cvms/update_os_image.d.ts +55 -28
- package/dist/actions/cvms/update_prelaunch_script.d.ts +127 -202
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +118 -193
- package/dist/actions/cvms/watch_cvm_state.d.ts +5 -15
- package/dist/actions/get_available_nodes.d.ts +186 -1067
- package/dist/actions/get_cvm_create_resources.d.ts +138 -2489
- package/dist/actions/index.d.ts +9 -2
- package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +11 -23
- package/dist/actions/kms/get_kms_contract.d.ts +25 -27
- package/dist/actions/kms/get_kms_info.d.ts +3 -7
- package/dist/actions/kms/get_kms_list.d.ts +34 -88
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +66 -664
- package/dist/actions/kms/list_kms_contract_nodes.d.ts +21 -53
- package/dist/actions/kms/list_kms_contracts.d.ts +33 -87
- package/dist/actions/kms/next_app_ids.d.ts +5 -25
- package/dist/actions/list-instance-types.d.ts +77 -257
- package/dist/actions/os_images/get_os_images.d.ts +38 -152
- package/dist/actions/ssh_keys/create_ssh_key.d.ts +11 -17
- package/dist/actions/ssh_keys/delete_ssh_key.d.ts +3 -7
- package/dist/actions/ssh_keys/get_cvm_ssh_keys.d.ts +113 -0
- package/dist/actions/ssh_keys/import_github_profile.d.ts +7 -21
- package/dist/actions/ssh_keys/list_ssh_keys.d.ts +2 -50
- package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +8 -20
- package/dist/actions/ssh_keys/update_cvm_ssh_keys.d.ts +140 -0
- package/dist/actions/workspaces/get_workspace.d.ts +32 -28
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +34 -321
- package/dist/actions/workspaces/get_workspace_quotas.d.ts +107 -1021
- package/dist/actions/workspaces/list_workspaces.d.ts +67 -369
- package/dist/client.d.ts +23 -4
- package/dist/create-client.d.ts +1900 -1
- package/dist/credentials/current_user_v20251028.d.ts +1 -17
- package/dist/credentials/current_user_v20260121.d.ts +22 -227
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6004 -4537
- package/dist/index.mjs +6033 -4625
- package/dist/types/app_compose.d.ts +108 -221
- package/dist/types/app_info_v20251028.d.ts +22 -1067
- package/dist/types/app_info_v20260121.d.ts +442 -8900
- package/dist/types/app_revision.d.ts +15 -371
- package/dist/types/client.d.ts +16 -0
- package/dist/types/common.d.ts +6 -0
- package/dist/types/cvm_id.d.ts +12 -57
- package/dist/types/cvm_info.d.ts +33 -460
- package/dist/types/cvm_info_v20251028.d.ts +100 -821
- package/dist/types/cvm_info_v20260121.d.ts +254 -3160
- package/dist/types/kms_contract.d.ts +2 -32
- package/dist/types/kms_info.d.ts +34 -68
- package/dist/user-agent.d.ts +30 -0
- package/dist/utils/define-action.d.ts +4 -4
- package/dist/utils/errors.d.ts +4 -36
- package/dist/utils/get_compose_hash.d.ts +36 -5
- package/dist/utils/get_mr_config_id.d.ts +94 -3
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/placement-request.d.ts +3 -0
- package/package.json +4 -4
|
@@ -5,13 +5,13 @@ export declare const CvmContainersStatsSchema: z.ZodObject<{
|
|
|
5
5
|
is_public: z.ZodDefault<z.ZodBoolean>;
|
|
6
6
|
error: z.ZodNullable<z.ZodString>;
|
|
7
7
|
docker_compose_file: z.ZodNullable<z.ZodString>;
|
|
8
|
-
manifest_version: z.ZodNullable<z.
|
|
8
|
+
manifest_version: z.ZodNullable<z.ZodCoercedNumber<unknown>>;
|
|
9
9
|
version: z.ZodNullable<z.ZodString>;
|
|
10
10
|
runner: z.ZodNullable<z.ZodString>;
|
|
11
|
-
features: z.ZodNullable<z.ZodArray<z.ZodString
|
|
11
|
+
features: z.ZodNullable<z.ZodArray<z.ZodString>>;
|
|
12
12
|
containers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
13
13
|
id: z.ZodString;
|
|
14
|
-
names: z.ZodArray<z.ZodString
|
|
14
|
+
names: z.ZodArray<z.ZodString>;
|
|
15
15
|
image: z.ZodString;
|
|
16
16
|
image_id: z.ZodString;
|
|
17
17
|
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -19,144 +19,78 @@ export declare const CvmContainersStatsSchema: z.ZodObject<{
|
|
|
19
19
|
state: z.ZodString;
|
|
20
20
|
status: z.ZodString;
|
|
21
21
|
log_endpoint: z.ZodNullable<z.ZodString>;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
image: string;
|
|
25
|
-
id: string;
|
|
26
|
-
names: string[];
|
|
27
|
-
image_id: string;
|
|
28
|
-
created: number;
|
|
29
|
-
state: string;
|
|
30
|
-
log_endpoint: string | null;
|
|
31
|
-
command?: string | null | undefined;
|
|
32
|
-
}, {
|
|
33
|
-
status: string;
|
|
34
|
-
image: string;
|
|
35
|
-
id: string;
|
|
36
|
-
names: string[];
|
|
37
|
-
image_id: string;
|
|
38
|
-
created: number;
|
|
39
|
-
state: string;
|
|
40
|
-
log_endpoint: string | null;
|
|
41
|
-
command?: string | null | undefined;
|
|
42
|
-
}>, "many">>;
|
|
43
|
-
}, "strip", z.ZodTypeAny, {
|
|
44
|
-
error: string | null;
|
|
45
|
-
version: string | null;
|
|
46
|
-
manifest_version: number | null;
|
|
47
|
-
runner: string | null;
|
|
48
|
-
docker_compose_file: string | null;
|
|
49
|
-
features: string[] | null;
|
|
50
|
-
is_online: boolean;
|
|
51
|
-
is_public: boolean;
|
|
52
|
-
containers: {
|
|
53
|
-
status: string;
|
|
54
|
-
image: string;
|
|
55
|
-
id: string;
|
|
56
|
-
names: string[];
|
|
57
|
-
image_id: string;
|
|
58
|
-
created: number;
|
|
59
|
-
state: string;
|
|
60
|
-
log_endpoint: string | null;
|
|
61
|
-
command?: string | null | undefined;
|
|
62
|
-
}[] | null;
|
|
63
|
-
}, {
|
|
64
|
-
error: string | null;
|
|
65
|
-
version: string | null;
|
|
66
|
-
manifest_version: number | null;
|
|
67
|
-
runner: string | null;
|
|
68
|
-
docker_compose_file: string | null;
|
|
69
|
-
features: string[] | null;
|
|
70
|
-
is_online: boolean;
|
|
71
|
-
containers: {
|
|
72
|
-
status: string;
|
|
73
|
-
image: string;
|
|
74
|
-
id: string;
|
|
75
|
-
names: string[];
|
|
76
|
-
image_id: string;
|
|
77
|
-
created: number;
|
|
78
|
-
state: string;
|
|
79
|
-
log_endpoint: string | null;
|
|
80
|
-
command?: string | null | undefined;
|
|
81
|
-
}[] | null;
|
|
82
|
-
is_public?: boolean | undefined;
|
|
83
|
-
}>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
84
24
|
export type CvmContainersStats = z.infer<typeof CvmContainersStatsSchema>;
|
|
85
|
-
export declare const GetCvmContainersStatsRequestSchema: z.
|
|
25
|
+
export declare const GetCvmContainersStatsRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
86
26
|
id: z.ZodOptional<z.ZodString>;
|
|
87
27
|
uuid: z.ZodOptional<z.ZodString>;
|
|
88
28
|
app_id: z.ZodOptional<z.ZodString>;
|
|
89
29
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
90
|
-
name: z.ZodOptional<z.
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
id?: string | undefined;
|
|
94
|
-
uuid?: string | undefined;
|
|
95
|
-
app_id?: string | undefined;
|
|
96
|
-
instance_id?: string | undefined;
|
|
30
|
+
name: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
32
|
+
cvmId: string;
|
|
97
33
|
}, {
|
|
98
|
-
name?: string | undefined;
|
|
99
34
|
id?: string | undefined;
|
|
100
35
|
uuid?: string | undefined;
|
|
101
36
|
app_id?: string | undefined;
|
|
102
37
|
instance_id?: string | undefined;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}, any>;
|
|
38
|
+
name?: string | undefined;
|
|
39
|
+
}>>;
|
|
106
40
|
export type GetCvmContainersStatsRequest = CvmIdInput;
|
|
107
41
|
declare const getCvmContainersStats: {
|
|
108
42
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
|
|
43
|
+
is_online: boolean;
|
|
44
|
+
is_public: boolean;
|
|
109
45
|
error: string | null;
|
|
110
|
-
|
|
46
|
+
docker_compose_file: string | null;
|
|
111
47
|
manifest_version: number | null;
|
|
48
|
+
version: string | null;
|
|
112
49
|
runner: string | null;
|
|
113
|
-
docker_compose_file: string | null;
|
|
114
50
|
features: string[] | null;
|
|
115
|
-
is_online: boolean;
|
|
116
|
-
is_public: boolean;
|
|
117
51
|
containers: {
|
|
118
|
-
status: string;
|
|
119
|
-
image: string;
|
|
120
52
|
id: string;
|
|
121
53
|
names: string[];
|
|
54
|
+
image: string;
|
|
122
55
|
image_id: string;
|
|
123
56
|
created: number;
|
|
124
57
|
state: string;
|
|
58
|
+
status: string;
|
|
125
59
|
log_endpoint: string | null;
|
|
126
60
|
command?: string | null | undefined;
|
|
127
61
|
}[] | null;
|
|
128
62
|
}>;
|
|
129
63
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
130
64
|
schema: T;
|
|
131
|
-
}): Promise<z.
|
|
65
|
+
}): Promise<z.core.output<T>>;
|
|
132
66
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
133
67
|
schema: false;
|
|
134
68
|
}): Promise<unknown>;
|
|
135
69
|
}, safeGetCvmContainersStats: {
|
|
136
70
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
71
|
+
is_online: boolean;
|
|
72
|
+
is_public: boolean;
|
|
137
73
|
error: string | null;
|
|
138
|
-
|
|
74
|
+
docker_compose_file: string | null;
|
|
139
75
|
manifest_version: number | null;
|
|
76
|
+
version: string | null;
|
|
140
77
|
runner: string | null;
|
|
141
|
-
docker_compose_file: string | null;
|
|
142
78
|
features: string[] | null;
|
|
143
|
-
is_online: boolean;
|
|
144
|
-
is_public: boolean;
|
|
145
79
|
containers: {
|
|
146
|
-
status: string;
|
|
147
|
-
image: string;
|
|
148
80
|
id: string;
|
|
149
81
|
names: string[];
|
|
82
|
+
image: string;
|
|
150
83
|
image_id: string;
|
|
151
84
|
created: number;
|
|
152
85
|
state: string;
|
|
86
|
+
status: string;
|
|
153
87
|
log_endpoint: string | null;
|
|
154
88
|
command?: string | null | undefined;
|
|
155
89
|
}[] | null;
|
|
156
90
|
}>>;
|
|
157
91
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
158
92
|
schema: T;
|
|
159
|
-
}): Promise<import("../..").SafeResult<z.
|
|
93
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
160
94
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
161
95
|
schema: false;
|
|
162
96
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
-
export declare const GetCvmDockerComposeRequestSchema: z.
|
|
3
|
+
export declare const GetCvmDockerComposeRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
4
4
|
id: z.ZodOptional<z.ZodString>;
|
|
5
5
|
uuid: z.ZodOptional<z.ZodString>;
|
|
6
6
|
app_id: z.ZodOptional<z.ZodString>;
|
|
7
7
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
8
|
-
name: z.ZodOptional<z.
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
id?: string | undefined;
|
|
12
|
-
uuid?: string | undefined;
|
|
13
|
-
app_id?: string | undefined;
|
|
14
|
-
instance_id?: string | undefined;
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
10
|
+
cvmId: string;
|
|
15
11
|
}, {
|
|
16
|
-
name?: string | undefined;
|
|
17
12
|
id?: string | undefined;
|
|
18
13
|
uuid?: string | undefined;
|
|
19
14
|
app_id?: string | undefined;
|
|
20
15
|
instance_id?: string | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, any>;
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
}>>;
|
|
24
18
|
export type GetCvmDockerComposeRequest = CvmIdInput;
|
|
25
19
|
declare const getCvmDockerCompose: {
|
|
26
20
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<string>;
|
|
27
21
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
28
22
|
schema: T;
|
|
29
|
-
}): Promise<z.
|
|
23
|
+
}): Promise<z.core.output<T>>;
|
|
30
24
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
31
25
|
schema: false;
|
|
32
26
|
}): Promise<unknown>;
|
|
@@ -34,7 +28,7 @@ declare const getCvmDockerCompose: {
|
|
|
34
28
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<string>>;
|
|
35
29
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
36
30
|
schema: T;
|
|
37
|
-
}): Promise<import("../..").SafeResult<z.
|
|
31
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
38
32
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
39
33
|
schema: false;
|
|
40
34
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
@@ -2,27 +2,21 @@ import { type Client, type SafeResult } from "../../client";
|
|
|
2
2
|
import type { ApiVersion } from "../../types/client";
|
|
3
3
|
import { type CvmIdInput } from "../../types/cvm_id";
|
|
4
4
|
import type { GetCvmInfoResponse } from "../../types/version-mappings";
|
|
5
|
-
export declare const GetCvmInfoRequestSchema: import("zod").
|
|
5
|
+
export declare const GetCvmInfoRequestSchema: import("zod").ZodPipe<import("zod").ZodObject<{
|
|
6
6
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
7
7
|
uuid: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
8
|
app_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
9
|
instance_id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
-
name: import("zod").ZodOptional<import("zod").
|
|
11
|
-
}, "strip
|
|
12
|
-
|
|
13
|
-
id?: string | undefined;
|
|
14
|
-
uuid?: string | undefined;
|
|
15
|
-
app_id?: string | undefined;
|
|
16
|
-
instance_id?: string | undefined;
|
|
10
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodTransform<{
|
|
12
|
+
cvmId: string;
|
|
17
13
|
}, {
|
|
18
|
-
name?: string | undefined;
|
|
19
14
|
id?: string | undefined;
|
|
20
15
|
uuid?: string | undefined;
|
|
21
16
|
app_id?: string | undefined;
|
|
22
17
|
instance_id?: string | undefined;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, any>;
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
}>>;
|
|
26
20
|
export type GetCvmInfoRequest = CvmIdInput;
|
|
27
21
|
/**
|
|
28
22
|
* Get information about a specific CVM
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
+
export declare const CvmInitScriptSchema: z.ZodObject<{
|
|
4
|
+
slug: z.ZodEnum<{
|
|
5
|
+
docker_cleanup: "docker_cleanup";
|
|
6
|
+
env_merge: "env_merge";
|
|
7
|
+
}>;
|
|
8
|
+
selected: z.ZodBoolean;
|
|
9
|
+
selectable: z.ZodBoolean;
|
|
10
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const CvmInitScriptsSchema: z.ZodObject<{
|
|
13
|
+
items: z.ZodArray<z.ZodObject<{
|
|
14
|
+
slug: z.ZodEnum<{
|
|
15
|
+
docker_cleanup: "docker_cleanup";
|
|
16
|
+
env_merge: "env_merge";
|
|
17
|
+
}>;
|
|
18
|
+
selected: z.ZodBoolean;
|
|
19
|
+
selectable: z.ZodBoolean;
|
|
20
|
+
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
has_custom_scripts: z.ZodBoolean;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
export type CvmInitScript = z.infer<typeof CvmInitScriptSchema>;
|
|
25
|
+
export type CvmInitScripts = z.infer<typeof CvmInitScriptsSchema>;
|
|
26
|
+
export declare const GetCvmInitScriptsRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
27
|
+
id: z.ZodOptional<z.ZodString>;
|
|
28
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
29
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
30
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
31
|
+
name: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
33
|
+
cvmId: string;
|
|
34
|
+
}, {
|
|
35
|
+
id?: string | undefined;
|
|
36
|
+
uuid?: string | undefined;
|
|
37
|
+
app_id?: string | undefined;
|
|
38
|
+
instance_id?: string | undefined;
|
|
39
|
+
name?: string | undefined;
|
|
40
|
+
}>>;
|
|
41
|
+
export type GetCvmInitScriptsRequest = CvmIdInput;
|
|
42
|
+
/**
|
|
43
|
+
* List the platform init scripts of a CVM
|
|
44
|
+
*
|
|
45
|
+
* Returns every platform init script in its fixed run order: whether the CVM's
|
|
46
|
+
* current compose runs it, and whether the caller could select it (with the
|
|
47
|
+
* reason when not). has_custom_scripts is true when the compose also runs a
|
|
48
|
+
* script that is not a platform script. Change the selection with
|
|
49
|
+
* `patchCvm({ init_scripts })` or replace raw scripts with `putCvmInitScripts`.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* import { createClient, getCvmInitScripts } from '@phala/cloud'
|
|
54
|
+
*
|
|
55
|
+
* const client = createClient()
|
|
56
|
+
* const { items } = await getCvmInitScripts(client, { id: 'my-cvm' })
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
declare const getCvmInitScripts: {
|
|
60
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
|
|
61
|
+
items: {
|
|
62
|
+
slug: "docker_cleanup" | "env_merge";
|
|
63
|
+
selected: boolean;
|
|
64
|
+
selectable: boolean;
|
|
65
|
+
reason?: string | null | undefined;
|
|
66
|
+
}[];
|
|
67
|
+
has_custom_scripts: boolean;
|
|
68
|
+
}>;
|
|
69
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
70
|
+
schema: T;
|
|
71
|
+
}): Promise<z.core.output<T>>;
|
|
72
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
73
|
+
schema: false;
|
|
74
|
+
}): Promise<unknown>;
|
|
75
|
+
}, safeGetCvmInitScripts: {
|
|
76
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
77
|
+
items: {
|
|
78
|
+
slug: "docker_cleanup" | "env_merge";
|
|
79
|
+
selected: boolean;
|
|
80
|
+
selectable: boolean;
|
|
81
|
+
reason?: string | null | undefined;
|
|
82
|
+
}[];
|
|
83
|
+
has_custom_scripts: boolean;
|
|
84
|
+
}>>;
|
|
85
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
86
|
+
schema: T;
|
|
87
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
88
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
89
|
+
schema: false;
|
|
90
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
91
|
+
};
|
|
92
|
+
export { getCvmInitScripts, safeGetCvmInitScripts };
|
|
@@ -5,19 +5,13 @@ import type { GetCvmListResponse } from "../../types/version-mappings";
|
|
|
5
5
|
export declare const GetCvmListRequestSchema: z.ZodObject<{
|
|
6
6
|
page: z.ZodOptional<z.ZodNumber>;
|
|
7
7
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
8
|
-
family: z.ZodOptional<z.ZodEnum<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, {
|
|
16
|
-
page?: number | undefined;
|
|
17
|
-
page_size?: number | undefined;
|
|
18
|
-
family?: "all" | "cpu" | "gpu" | undefined;
|
|
19
|
-
instance_types?: string[] | undefined;
|
|
20
|
-
}>;
|
|
8
|
+
family: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
all: "all";
|
|
10
|
+
cpu: "cpu";
|
|
11
|
+
gpu: "gpu";
|
|
12
|
+
}>>;
|
|
13
|
+
instance_types: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
}, z.core.$strict>;
|
|
21
15
|
export type GetCvmListRequest = z.infer<typeof GetCvmListRequestSchema>;
|
|
22
16
|
/**
|
|
23
17
|
* Get a paginated list of CVMs
|
|
@@ -9,90 +9,58 @@ export declare const CvmNetworkSchema: z.ZodObject<{
|
|
|
9
9
|
public_urls: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
10
10
|
app: z.ZodString;
|
|
11
11
|
instance: z.ZodString;
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
instance: string;
|
|
15
|
-
}, {
|
|
16
|
-
app: string;
|
|
17
|
-
instance: string;
|
|
18
|
-
}>, "many">>;
|
|
19
|
-
}, "strip", z.ZodTypeAny, {
|
|
20
|
-
error: string | null;
|
|
21
|
-
public_urls: {
|
|
22
|
-
app: string;
|
|
23
|
-
instance: string;
|
|
24
|
-
}[] | null;
|
|
25
|
-
is_online: boolean;
|
|
26
|
-
is_public: boolean;
|
|
27
|
-
internal_ip: string | null;
|
|
28
|
-
latest_handshake: string | null;
|
|
29
|
-
}, {
|
|
30
|
-
error: string | null;
|
|
31
|
-
public_urls: {
|
|
32
|
-
app: string;
|
|
33
|
-
instance: string;
|
|
34
|
-
}[] | null;
|
|
35
|
-
is_online: boolean;
|
|
36
|
-
internal_ip: string | null;
|
|
37
|
-
latest_handshake: string | null;
|
|
38
|
-
is_public?: boolean | undefined;
|
|
39
|
-
}>;
|
|
12
|
+
}, z.core.$strip>>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
40
14
|
export type CvmNetwork = z.infer<typeof CvmNetworkSchema>;
|
|
41
|
-
export declare const GetCvmNetworkRequestSchema: z.
|
|
15
|
+
export declare const GetCvmNetworkRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
42
16
|
id: z.ZodOptional<z.ZodString>;
|
|
43
17
|
uuid: z.ZodOptional<z.ZodString>;
|
|
44
18
|
app_id: z.ZodOptional<z.ZodString>;
|
|
45
19
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
46
|
-
name: z.ZodOptional<z.
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
id?: string | undefined;
|
|
50
|
-
uuid?: string | undefined;
|
|
51
|
-
app_id?: string | undefined;
|
|
52
|
-
instance_id?: string | undefined;
|
|
20
|
+
name: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
22
|
+
cvmId: string;
|
|
53
23
|
}, {
|
|
54
|
-
name?: string | undefined;
|
|
55
24
|
id?: string | undefined;
|
|
56
25
|
uuid?: string | undefined;
|
|
57
26
|
app_id?: string | undefined;
|
|
58
27
|
instance_id?: string | undefined;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}, any>;
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
}>>;
|
|
62
30
|
export type GetCvmNetworkRequest = CvmIdInput;
|
|
63
31
|
declare const getCvmNetwork: {
|
|
64
32
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
|
|
33
|
+
is_online: boolean;
|
|
34
|
+
is_public: boolean;
|
|
65
35
|
error: string | null;
|
|
36
|
+
internal_ip: string | null;
|
|
37
|
+
latest_handshake: string | null;
|
|
66
38
|
public_urls: {
|
|
67
39
|
app: string;
|
|
68
40
|
instance: string;
|
|
69
41
|
}[] | null;
|
|
70
|
-
is_online: boolean;
|
|
71
|
-
is_public: boolean;
|
|
72
|
-
internal_ip: string | null;
|
|
73
|
-
latest_handshake: string | null;
|
|
74
42
|
}>;
|
|
75
43
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
76
44
|
schema: T;
|
|
77
|
-
}): Promise<z.
|
|
45
|
+
}): Promise<z.core.output<T>>;
|
|
78
46
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
79
47
|
schema: false;
|
|
80
48
|
}): Promise<unknown>;
|
|
81
49
|
}, safeGetCvmNetwork: {
|
|
82
50
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
51
|
+
is_online: boolean;
|
|
52
|
+
is_public: boolean;
|
|
83
53
|
error: string | null;
|
|
54
|
+
internal_ip: string | null;
|
|
55
|
+
latest_handshake: string | null;
|
|
84
56
|
public_urls: {
|
|
85
57
|
app: string;
|
|
86
58
|
instance: string;
|
|
87
59
|
}[] | null;
|
|
88
|
-
is_online: boolean;
|
|
89
|
-
is_public: boolean;
|
|
90
|
-
internal_ip: string | null;
|
|
91
|
-
latest_handshake: string | null;
|
|
92
60
|
}>>;
|
|
93
61
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
94
62
|
schema: T;
|
|
95
|
-
}): Promise<import("../..").SafeResult<z.
|
|
63
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
96
64
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
97
65
|
schema: false;
|
|
98
66
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
-
export declare const GetCvmPreLaunchScriptRequestSchema: z.
|
|
3
|
+
export declare const GetCvmPreLaunchScriptRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
4
4
|
id: z.ZodOptional<z.ZodString>;
|
|
5
5
|
uuid: z.ZodOptional<z.ZodString>;
|
|
6
6
|
app_id: z.ZodOptional<z.ZodString>;
|
|
7
7
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
8
|
-
name: z.ZodOptional<z.
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
id?: string | undefined;
|
|
12
|
-
uuid?: string | undefined;
|
|
13
|
-
app_id?: string | undefined;
|
|
14
|
-
instance_id?: string | undefined;
|
|
8
|
+
name: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
10
|
+
cvmId: string;
|
|
15
11
|
}, {
|
|
16
|
-
name?: string | undefined;
|
|
17
12
|
id?: string | undefined;
|
|
18
13
|
uuid?: string | undefined;
|
|
19
14
|
app_id?: string | undefined;
|
|
20
15
|
instance_id?: string | undefined;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}, any>;
|
|
16
|
+
name?: string | undefined;
|
|
17
|
+
}>>;
|
|
24
18
|
export type GetCvmPreLaunchScriptRequest = CvmIdInput;
|
|
25
19
|
declare const getCvmPreLaunchScript: {
|
|
26
20
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<string>;
|
|
27
21
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
28
22
|
schema: T;
|
|
29
|
-
}): Promise<z.
|
|
23
|
+
}): Promise<z.core.output<T>>;
|
|
30
24
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
31
25
|
schema: false;
|
|
32
26
|
}): Promise<unknown>;
|
|
@@ -34,7 +28,7 @@ declare const getCvmPreLaunchScript: {
|
|
|
34
28
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<string>>;
|
|
35
29
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
36
30
|
schema: T;
|
|
37
|
-
}): Promise<import("../..").SafeResult<z.
|
|
31
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
38
32
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
39
33
|
schema: false;
|
|
40
34
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
@@ -14,49 +14,23 @@ export declare const CvmStateSchema: z.ZodObject<{
|
|
|
14
14
|
boot_progress: z.ZodOptional<z.ZodString>;
|
|
15
15
|
boot_error: z.ZodOptional<z.ZodString>;
|
|
16
16
|
shutdown_progress: z.ZodOptional<z.ZodString>;
|
|
17
|
-
},
|
|
18
|
-
status: string;
|
|
19
|
-
name: string;
|
|
20
|
-
id?: string | undefined;
|
|
21
|
-
instance_id?: string | undefined;
|
|
22
|
-
uptime?: string | undefined;
|
|
23
|
-
exited_at?: string | undefined;
|
|
24
|
-
boot_progress?: string | undefined;
|
|
25
|
-
boot_error?: string | undefined;
|
|
26
|
-
shutdown_progress?: string | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
status: string;
|
|
29
|
-
name: string;
|
|
30
|
-
id?: string | undefined;
|
|
31
|
-
instance_id?: string | undefined;
|
|
32
|
-
uptime?: string | undefined;
|
|
33
|
-
exited_at?: string | undefined;
|
|
34
|
-
boot_progress?: string | undefined;
|
|
35
|
-
boot_error?: string | undefined;
|
|
36
|
-
shutdown_progress?: string | undefined;
|
|
37
|
-
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
38
18
|
export type CvmState = z.infer<typeof CvmStateSchema>;
|
|
39
|
-
export declare const GetCvmStateRequestSchema: z.
|
|
19
|
+
export declare const GetCvmStateRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
40
20
|
id: z.ZodOptional<z.ZodString>;
|
|
41
21
|
uuid: z.ZodOptional<z.ZodString>;
|
|
42
22
|
app_id: z.ZodOptional<z.ZodString>;
|
|
43
23
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
44
|
-
name: z.ZodOptional<z.
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
id?: string | undefined;
|
|
48
|
-
uuid?: string | undefined;
|
|
49
|
-
app_id?: string | undefined;
|
|
50
|
-
instance_id?: string | undefined;
|
|
24
|
+
name: z.ZodOptional<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
26
|
+
cvmId: string;
|
|
51
27
|
}, {
|
|
52
|
-
name?: string | undefined;
|
|
53
28
|
id?: string | undefined;
|
|
54
29
|
uuid?: string | undefined;
|
|
55
30
|
app_id?: string | undefined;
|
|
56
31
|
instance_id?: string | undefined;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}, any>;
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
}>>;
|
|
60
34
|
export type GetCvmStateRequest = CvmIdInput;
|
|
61
35
|
/**
|
|
62
36
|
* Get current state of a CVM (one-shot, immediate return)
|
|
@@ -78,8 +52,8 @@ export type GetCvmStateRequest = CvmIdInput;
|
|
|
78
52
|
*/
|
|
79
53
|
declare const getCvmState: {
|
|
80
54
|
(client: Client<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
|
|
81
|
-
status: string;
|
|
82
55
|
name: string;
|
|
56
|
+
status: string;
|
|
83
57
|
id?: string | undefined;
|
|
84
58
|
instance_id?: string | undefined;
|
|
85
59
|
uptime?: string | undefined;
|
|
@@ -90,14 +64,14 @@ declare const getCvmState: {
|
|
|
90
64
|
}>;
|
|
91
65
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
92
66
|
schema: T;
|
|
93
|
-
}): Promise<z.
|
|
67
|
+
}): Promise<z.core.output<T>>;
|
|
94
68
|
(client: Client<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
95
69
|
schema: false;
|
|
96
70
|
}): Promise<unknown>;
|
|
97
71
|
}, safeGetCvmState: {
|
|
98
72
|
(client: Client<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
99
|
-
status: string;
|
|
100
73
|
name: string;
|
|
74
|
+
status: string;
|
|
101
75
|
id?: string | undefined;
|
|
102
76
|
instance_id?: string | undefined;
|
|
103
77
|
uptime?: string | undefined;
|
|
@@ -108,7 +82,7 @@ declare const getCvmState: {
|
|
|
108
82
|
}>>;
|
|
109
83
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
110
84
|
schema: T;
|
|
111
|
-
}): Promise<import("../..").SafeResult<z.
|
|
85
|
+
}): Promise<import("../..").SafeResult<z.core.output<T>>>;
|
|
112
86
|
(client: Client<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
113
87
|
schema: false;
|
|
114
88
|
}): Promise<import("../..").SafeResult<unknown>>;
|