@phala/cloud 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/apps/get_app_attestation.d.ts +963 -0
- package/dist/actions/apps/get_app_device_allowlist.d.ts +108 -0
- package/dist/actions/blockchains/abi/dstack_app.d.ts +101 -0
- package/dist/actions/blockchains/add_device.d.ts +62 -0
- package/dist/actions/blockchains/check_device_allowed.d.ts +44 -0
- package/dist/actions/blockchains/get_allowed_devices.d.ts +65 -0
- package/dist/actions/blockchains/remove_device.d.ts +62 -0
- package/dist/actions/blockchains/set_allow_any_device.d.ts +62 -0
- package/dist/actions/cvms/get_cvm_attestation.d.ts +220 -0
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +16 -0
- package/dist/actions/cvms/get_cvm_user_config.d.ts +92 -0
- package/dist/actions/cvms/provision_cvm.d.ts +26 -1
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +18 -0
- package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +93 -0
- package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +194 -0
- package/dist/actions/cvms/replicate_cvm.d.ts +126 -0
- package/dist/actions/cvms/restart_cvm.d.ts +2 -2
- package/dist/actions/cvms/shutdown_cvm.d.ts +2 -2
- package/dist/actions/cvms/start_cvm.d.ts +2 -2
- package/dist/actions/cvms/stop_cvm.d.ts +2 -2
- package/dist/actions/index.d.ts +20 -1
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +688 -0
- package/dist/actions/os_images/get_os_images.d.ts +217 -0
- package/dist/actions/ssh_keys/create_ssh_key.d.ts +104 -0
- package/dist/actions/ssh_keys/delete_ssh_key.d.ts +65 -0
- package/dist/actions/ssh_keys/import_github_profile.d.ts +93 -0
- package/dist/actions/ssh_keys/list_ssh_keys.d.ts +101 -0
- package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +78 -0
- package/dist/actions/workspaces/get_workspace.d.ts +2 -0
- package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
- package/dist/create-client.d.ts +106 -0
- package/dist/index.js +1500 -322
- package/dist/index.mjs +1441 -320
- package/dist/types/app_compose.d.ts +5 -0
- package/dist/types/app_info_v20260121.d.ts +68 -0
- package/dist/types/cvm_info.d.ts +3 -3
- package/dist/types/cvm_info_v20260121.d.ts +22 -0
- package/package.json +1 -1
|
@@ -1,5 +1,225 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
+
/**
|
|
4
|
+
* Get CVM attestation and TEE security information
|
|
5
|
+
*
|
|
6
|
+
* This action retrieves detailed attestation information including
|
|
7
|
+
* certificates, TCB info, and measurement values for a CVM instance.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { createClient, getCvmAttestation } from '@phala/cloud'
|
|
12
|
+
*
|
|
13
|
+
* const client = createClient();
|
|
14
|
+
* const attestation = await getCvmAttestation(client, { id: 'my-cvm-id' });
|
|
15
|
+
* console.log(attestation.tcb_info?.mrtd);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const CertificateSubjectSchema: z.ZodObject<{
|
|
19
|
+
common_name: z.ZodNullable<z.ZodString>;
|
|
20
|
+
organization: z.ZodNullable<z.ZodString>;
|
|
21
|
+
country: z.ZodNullable<z.ZodString>;
|
|
22
|
+
state: z.ZodNullable<z.ZodString>;
|
|
23
|
+
locality: z.ZodNullable<z.ZodString>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
state: string | null;
|
|
26
|
+
common_name: string | null;
|
|
27
|
+
organization: string | null;
|
|
28
|
+
country: string | null;
|
|
29
|
+
locality: string | null;
|
|
30
|
+
}, {
|
|
31
|
+
state: string | null;
|
|
32
|
+
common_name: string | null;
|
|
33
|
+
organization: string | null;
|
|
34
|
+
country: string | null;
|
|
35
|
+
locality: string | null;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const CertificateIssuerSchema: z.ZodObject<{
|
|
38
|
+
common_name: z.ZodNullable<z.ZodString>;
|
|
39
|
+
organization: z.ZodNullable<z.ZodString>;
|
|
40
|
+
country: z.ZodNullable<z.ZodString>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
common_name: string | null;
|
|
43
|
+
organization: string | null;
|
|
44
|
+
country: string | null;
|
|
45
|
+
}, {
|
|
46
|
+
common_name: string | null;
|
|
47
|
+
organization: string | null;
|
|
48
|
+
country: string | null;
|
|
49
|
+
}>;
|
|
50
|
+
export declare const CertificateSchema: z.ZodObject<{
|
|
51
|
+
subject: z.ZodObject<{
|
|
52
|
+
common_name: z.ZodNullable<z.ZodString>;
|
|
53
|
+
organization: z.ZodNullable<z.ZodString>;
|
|
54
|
+
country: z.ZodNullable<z.ZodString>;
|
|
55
|
+
state: z.ZodNullable<z.ZodString>;
|
|
56
|
+
locality: z.ZodNullable<z.ZodString>;
|
|
57
|
+
}, "strip", z.ZodTypeAny, {
|
|
58
|
+
state: string | null;
|
|
59
|
+
common_name: string | null;
|
|
60
|
+
organization: string | null;
|
|
61
|
+
country: string | null;
|
|
62
|
+
locality: string | null;
|
|
63
|
+
}, {
|
|
64
|
+
state: string | null;
|
|
65
|
+
common_name: string | null;
|
|
66
|
+
organization: string | null;
|
|
67
|
+
country: string | null;
|
|
68
|
+
locality: string | null;
|
|
69
|
+
}>;
|
|
70
|
+
issuer: z.ZodObject<{
|
|
71
|
+
common_name: z.ZodNullable<z.ZodString>;
|
|
72
|
+
organization: z.ZodNullable<z.ZodString>;
|
|
73
|
+
country: z.ZodNullable<z.ZodString>;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
common_name: string | null;
|
|
76
|
+
organization: string | null;
|
|
77
|
+
country: string | null;
|
|
78
|
+
}, {
|
|
79
|
+
common_name: string | null;
|
|
80
|
+
organization: string | null;
|
|
81
|
+
country: string | null;
|
|
82
|
+
}>;
|
|
83
|
+
serial_number: z.ZodString;
|
|
84
|
+
not_before: z.ZodString;
|
|
85
|
+
not_after: z.ZodString;
|
|
86
|
+
version: z.ZodString;
|
|
87
|
+
fingerprint: z.ZodString;
|
|
88
|
+
signature_algorithm: z.ZodString;
|
|
89
|
+
sans: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
90
|
+
is_ca: z.ZodBoolean;
|
|
91
|
+
position_in_chain: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
quote: z.ZodNullable<z.ZodString>;
|
|
93
|
+
app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
cert_usage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
version: string;
|
|
97
|
+
subject: {
|
|
98
|
+
state: string | null;
|
|
99
|
+
common_name: string | null;
|
|
100
|
+
organization: string | null;
|
|
101
|
+
country: string | null;
|
|
102
|
+
locality: string | null;
|
|
103
|
+
};
|
|
104
|
+
issuer: {
|
|
105
|
+
common_name: string | null;
|
|
106
|
+
organization: string | null;
|
|
107
|
+
country: string | null;
|
|
108
|
+
};
|
|
109
|
+
serial_number: string;
|
|
110
|
+
not_before: string;
|
|
111
|
+
not_after: string;
|
|
112
|
+
fingerprint: string;
|
|
113
|
+
signature_algorithm: string;
|
|
114
|
+
sans: string[] | null;
|
|
115
|
+
is_ca: boolean;
|
|
116
|
+
position_in_chain: number | null;
|
|
117
|
+
quote: string | null;
|
|
118
|
+
app_id?: string | null | undefined;
|
|
119
|
+
cert_usage?: string | null | undefined;
|
|
120
|
+
}, {
|
|
121
|
+
version: string;
|
|
122
|
+
subject: {
|
|
123
|
+
state: string | null;
|
|
124
|
+
common_name: string | null;
|
|
125
|
+
organization: string | null;
|
|
126
|
+
country: string | null;
|
|
127
|
+
locality: string | null;
|
|
128
|
+
};
|
|
129
|
+
issuer: {
|
|
130
|
+
common_name: string | null;
|
|
131
|
+
organization: string | null;
|
|
132
|
+
country: string | null;
|
|
133
|
+
};
|
|
134
|
+
serial_number: string;
|
|
135
|
+
not_before: string;
|
|
136
|
+
not_after: string;
|
|
137
|
+
fingerprint: string;
|
|
138
|
+
signature_algorithm: string;
|
|
139
|
+
sans: string[] | null;
|
|
140
|
+
is_ca: boolean;
|
|
141
|
+
position_in_chain: number | null;
|
|
142
|
+
quote: string | null;
|
|
143
|
+
app_id?: string | null | undefined;
|
|
144
|
+
cert_usage?: string | null | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
export declare const EventLogSchema: z.ZodObject<{
|
|
147
|
+
imr: z.ZodNumber;
|
|
148
|
+
event_type: z.ZodNumber;
|
|
149
|
+
digest: z.ZodString;
|
|
150
|
+
event: z.ZodString;
|
|
151
|
+
event_payload: z.ZodString;
|
|
152
|
+
}, "strip", z.ZodTypeAny, {
|
|
153
|
+
imr: number;
|
|
154
|
+
event_type: number;
|
|
155
|
+
digest: string;
|
|
156
|
+
event: string;
|
|
157
|
+
event_payload: string;
|
|
158
|
+
}, {
|
|
159
|
+
imr: number;
|
|
160
|
+
event_type: number;
|
|
161
|
+
digest: string;
|
|
162
|
+
event: string;
|
|
163
|
+
event_payload: string;
|
|
164
|
+
}>;
|
|
165
|
+
export declare const TcbInfoSchema: z.ZodObject<{
|
|
166
|
+
mrtd: z.ZodString;
|
|
167
|
+
rootfs_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
168
|
+
rtmr0: z.ZodString;
|
|
169
|
+
rtmr1: z.ZodString;
|
|
170
|
+
rtmr2: z.ZodString;
|
|
171
|
+
rtmr3: z.ZodString;
|
|
172
|
+
event_log: z.ZodArray<z.ZodObject<{
|
|
173
|
+
imr: z.ZodNumber;
|
|
174
|
+
event_type: z.ZodNumber;
|
|
175
|
+
digest: z.ZodString;
|
|
176
|
+
event: z.ZodString;
|
|
177
|
+
event_payload: z.ZodString;
|
|
178
|
+
}, "strip", z.ZodTypeAny, {
|
|
179
|
+
imr: number;
|
|
180
|
+
event_type: number;
|
|
181
|
+
digest: string;
|
|
182
|
+
event: string;
|
|
183
|
+
event_payload: string;
|
|
184
|
+
}, {
|
|
185
|
+
imr: number;
|
|
186
|
+
event_type: number;
|
|
187
|
+
digest: string;
|
|
188
|
+
event: string;
|
|
189
|
+
event_payload: string;
|
|
190
|
+
}>, "many">;
|
|
191
|
+
app_compose: z.ZodString;
|
|
192
|
+
}, "strip", z.ZodTypeAny, {
|
|
193
|
+
app_compose: string;
|
|
194
|
+
mrtd: string;
|
|
195
|
+
rtmr0: string;
|
|
196
|
+
rtmr1: string;
|
|
197
|
+
rtmr2: string;
|
|
198
|
+
rtmr3: string;
|
|
199
|
+
event_log: {
|
|
200
|
+
imr: number;
|
|
201
|
+
event_type: number;
|
|
202
|
+
digest: string;
|
|
203
|
+
event: string;
|
|
204
|
+
event_payload: string;
|
|
205
|
+
}[];
|
|
206
|
+
rootfs_hash?: string | null | undefined;
|
|
207
|
+
}, {
|
|
208
|
+
app_compose: string;
|
|
209
|
+
mrtd: string;
|
|
210
|
+
rtmr0: string;
|
|
211
|
+
rtmr1: string;
|
|
212
|
+
rtmr2: string;
|
|
213
|
+
rtmr3: string;
|
|
214
|
+
event_log: {
|
|
215
|
+
imr: number;
|
|
216
|
+
event_type: number;
|
|
217
|
+
digest: string;
|
|
218
|
+
event: string;
|
|
219
|
+
event_payload: string;
|
|
220
|
+
}[];
|
|
221
|
+
rootfs_hash?: string | null | undefined;
|
|
222
|
+
}>;
|
|
3
223
|
export declare const CvmAttestationSchema: z.ZodObject<{
|
|
4
224
|
name: z.ZodNullable<z.ZodString>;
|
|
5
225
|
is_online: z.ZodBoolean;
|
|
@@ -78,6 +78,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
78
78
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
79
79
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
80
80
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
81
82
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
82
83
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
83
84
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -91,6 +92,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
91
92
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
92
93
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
93
94
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
95
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
94
96
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
95
97
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
96
98
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -104,6 +106,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
104
106
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
105
107
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
106
108
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
107
110
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
108
111
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
109
112
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -117,6 +120,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
117
120
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
118
121
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
119
122
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
120
124
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
121
125
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
122
126
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -130,6 +134,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
130
134
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
131
135
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
132
136
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
133
138
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
134
139
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
135
140
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -138,6 +143,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
138
143
|
name?: string | undefined;
|
|
139
144
|
public_sysinfo?: boolean | undefined;
|
|
140
145
|
public_logs?: boolean | undefined;
|
|
146
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
141
147
|
allowed_envs?: string[] | undefined;
|
|
142
148
|
features?: string[] | undefined;
|
|
143
149
|
manifest_version?: number | undefined;
|
|
@@ -161,6 +167,7 @@ export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodEffects<z.
|
|
|
161
167
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
162
168
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
163
169
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
170
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
164
171
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
165
172
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
166
173
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -175,6 +182,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
175
182
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
176
183
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
177
184
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
185
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
178
186
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
179
187
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
180
188
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -188,6 +196,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
188
196
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
189
197
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
190
198
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
191
200
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
192
201
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
193
202
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -201,6 +210,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
201
210
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
202
211
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
203
212
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
213
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
204
214
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
205
215
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
206
216
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -214,6 +224,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
214
224
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
215
225
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
216
226
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
227
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
217
228
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
218
229
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
219
230
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -227,6 +238,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
227
238
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
228
239
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
229
240
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
230
242
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
231
243
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
232
244
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -235,6 +247,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
235
247
|
name?: string | undefined;
|
|
236
248
|
public_sysinfo?: boolean | undefined;
|
|
237
249
|
public_logs?: boolean | undefined;
|
|
250
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
238
251
|
allowed_envs?: string[] | undefined;
|
|
239
252
|
features?: string[] | undefined;
|
|
240
253
|
manifest_version?: number | undefined;
|
|
@@ -258,6 +271,7 @@ export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodEffects<z.ZodObject
|
|
|
258
271
|
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
259
272
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
260
273
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
261
275
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
262
276
|
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
263
277
|
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
@@ -292,6 +306,7 @@ declare const getCvmComposeFile: {
|
|
|
292
306
|
name?: string | undefined;
|
|
293
307
|
public_sysinfo?: boolean | undefined;
|
|
294
308
|
public_logs?: boolean | undefined;
|
|
309
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
295
310
|
allowed_envs?: string[] | undefined;
|
|
296
311
|
features?: string[] | undefined;
|
|
297
312
|
manifest_version?: number | undefined;
|
|
@@ -318,6 +333,7 @@ declare const getCvmComposeFile: {
|
|
|
318
333
|
name?: string | undefined;
|
|
319
334
|
public_sysinfo?: boolean | undefined;
|
|
320
335
|
public_logs?: boolean | undefined;
|
|
336
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
321
337
|
allowed_envs?: string[] | undefined;
|
|
322
338
|
features?: string[] | undefined;
|
|
323
339
|
manifest_version?: number | undefined;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
+
export declare const CvmUserConfigSchema: z.ZodObject<{
|
|
4
|
+
hostname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
ssh_authorized_keys: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
6
|
+
default_gateway_domain: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
ssh_authorized_keys: string[];
|
|
9
|
+
hostname?: string | null | undefined;
|
|
10
|
+
default_gateway_domain?: string | null | undefined;
|
|
11
|
+
}, {
|
|
12
|
+
hostname?: string | null | undefined;
|
|
13
|
+
ssh_authorized_keys?: string[] | undefined;
|
|
14
|
+
default_gateway_domain?: string | null | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export type CvmUserConfig = z.infer<typeof CvmUserConfigSchema>;
|
|
17
|
+
export declare const GetCvmUserConfigRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
18
|
+
id: z.ZodOptional<z.ZodString>;
|
|
19
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
20
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
21
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
22
|
+
name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
name?: string | undefined;
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
app_id?: string | undefined;
|
|
27
|
+
instance_id?: string | undefined;
|
|
28
|
+
uuid?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
app_id?: string | undefined;
|
|
33
|
+
instance_id?: string | undefined;
|
|
34
|
+
uuid?: string | undefined;
|
|
35
|
+
}>, any, any>, {
|
|
36
|
+
cvmId: any;
|
|
37
|
+
}, any>;
|
|
38
|
+
export type GetCvmUserConfigRequest = CvmIdInput;
|
|
39
|
+
/**
|
|
40
|
+
* Get the runtime user_config of a CVM
|
|
41
|
+
*
|
|
42
|
+
* Reads the live user_config stored in Teepod for the given CVM.
|
|
43
|
+
* Contains the hostname, injected SSH authorized keys, and default gateway domain
|
|
44
|
+
* set at launch time.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { createClient, getCvmUserConfig } from '@phala/cloud'
|
|
49
|
+
*
|
|
50
|
+
* const client = createClient({ apiKey: 'your-api-key' })
|
|
51
|
+
* const config = await getCvmUserConfig(client, { cvmId: 'app_123' })
|
|
52
|
+
* console.log(config.hostname)
|
|
53
|
+
* console.log(config.ssh_authorized_keys) // string[]
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* ## Safe Version
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* const result = await safeGetCvmUserConfig(client, { cvmId: 'app_123' })
|
|
60
|
+
* if (result.success) {
|
|
61
|
+
* console.log(result.data.ssh_authorized_keys.length, 'keys')
|
|
62
|
+
* } else {
|
|
63
|
+
* console.error(result.error.message)
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare const getCvmUserConfig: {
|
|
68
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
|
|
69
|
+
ssh_authorized_keys: string[];
|
|
70
|
+
hostname?: string | null | undefined;
|
|
71
|
+
default_gateway_domain?: string | null | undefined;
|
|
72
|
+
}>;
|
|
73
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
74
|
+
schema: T;
|
|
75
|
+
}): Promise<z.TypeOf<T>>;
|
|
76
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
77
|
+
schema: false;
|
|
78
|
+
}): Promise<unknown>;
|
|
79
|
+
}, safeGetCvmUserConfig: {
|
|
80
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
81
|
+
ssh_authorized_keys: string[];
|
|
82
|
+
hostname?: string | null | undefined;
|
|
83
|
+
default_gateway_domain?: string | null | undefined;
|
|
84
|
+
}>>;
|
|
85
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
86
|
+
schema: T;
|
|
87
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
88
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
|
|
89
|
+
schema: false;
|
|
90
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
91
|
+
};
|
|
92
|
+
export { getCvmUserConfig, safeGetCvmUserConfig };
|
|
@@ -50,7 +50,7 @@ import { type Client } from "../../client";
|
|
|
50
50
|
* const provision = await provisionCvm(client, {
|
|
51
51
|
* name: 'my-app',
|
|
52
52
|
* node_id: 123, // Specific node
|
|
53
|
-
* kms: 'PHALA', // KMS type (PHALA, BASE,
|
|
53
|
+
* kms: 'PHALA', // KMS type (PHALA, BASE, ETHEREUM)
|
|
54
54
|
* disk_size: 40,
|
|
55
55
|
* image: 'dstack-0.5.5',
|
|
56
56
|
* compose_file: { /* ... *\/ },
|
|
@@ -435,11 +435,13 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
435
435
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
436
436
|
gateway_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
437
437
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
438
439
|
}, "strip", z.ZodTypeAny, {
|
|
439
440
|
name: string;
|
|
440
441
|
public_sysinfo?: boolean | undefined;
|
|
441
442
|
public_logs?: boolean | undefined;
|
|
442
443
|
gateway_enabled?: boolean | undefined;
|
|
444
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
443
445
|
allowed_envs?: string[] | undefined;
|
|
444
446
|
docker_compose_file?: string | undefined;
|
|
445
447
|
kms_enabled?: boolean | undefined;
|
|
@@ -450,6 +452,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
450
452
|
public_sysinfo?: boolean | undefined;
|
|
451
453
|
public_logs?: boolean | undefined;
|
|
452
454
|
gateway_enabled?: boolean | undefined;
|
|
455
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
453
456
|
allowed_envs?: string[] | undefined;
|
|
454
457
|
docker_compose_file?: string | undefined;
|
|
455
458
|
kms_enabled?: boolean | undefined;
|
|
@@ -460,6 +463,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
460
463
|
public_sysinfo?: boolean | undefined;
|
|
461
464
|
public_logs?: boolean | undefined;
|
|
462
465
|
gateway_enabled?: boolean | undefined;
|
|
466
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
463
467
|
allowed_envs?: string[] | undefined;
|
|
464
468
|
docker_compose_file?: string | undefined;
|
|
465
469
|
kms_enabled?: boolean | undefined;
|
|
@@ -470,6 +474,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
470
474
|
public_sysinfo?: boolean | undefined;
|
|
471
475
|
public_logs?: boolean | undefined;
|
|
472
476
|
gateway_enabled?: boolean | undefined;
|
|
477
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
473
478
|
allowed_envs?: string[] | undefined;
|
|
474
479
|
docker_compose_file?: string | undefined;
|
|
475
480
|
kms_enabled?: boolean | undefined;
|
|
@@ -503,11 +508,13 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
503
508
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
504
509
|
gateway_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
505
510
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
511
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
506
512
|
}, "strip", z.ZodTypeAny, {
|
|
507
513
|
name: string;
|
|
508
514
|
public_sysinfo?: boolean | undefined;
|
|
509
515
|
public_logs?: boolean | undefined;
|
|
510
516
|
gateway_enabled?: boolean | undefined;
|
|
517
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
511
518
|
allowed_envs?: string[] | undefined;
|
|
512
519
|
docker_compose_file?: string | undefined;
|
|
513
520
|
kms_enabled?: boolean | undefined;
|
|
@@ -518,6 +525,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
518
525
|
public_sysinfo?: boolean | undefined;
|
|
519
526
|
public_logs?: boolean | undefined;
|
|
520
527
|
gateway_enabled?: boolean | undefined;
|
|
528
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
521
529
|
allowed_envs?: string[] | undefined;
|
|
522
530
|
docker_compose_file?: string | undefined;
|
|
523
531
|
kms_enabled?: boolean | undefined;
|
|
@@ -528,6 +536,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
528
536
|
public_sysinfo?: boolean | undefined;
|
|
529
537
|
public_logs?: boolean | undefined;
|
|
530
538
|
gateway_enabled?: boolean | undefined;
|
|
539
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
531
540
|
allowed_envs?: string[] | undefined;
|
|
532
541
|
docker_compose_file?: string | undefined;
|
|
533
542
|
kms_enabled?: boolean | undefined;
|
|
@@ -538,6 +547,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
538
547
|
public_sysinfo?: boolean | undefined;
|
|
539
548
|
public_logs?: boolean | undefined;
|
|
540
549
|
gateway_enabled?: boolean | undefined;
|
|
550
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
541
551
|
allowed_envs?: string[] | undefined;
|
|
542
552
|
docker_compose_file?: string | undefined;
|
|
543
553
|
kms_enabled?: boolean | undefined;
|
|
@@ -571,11 +581,13 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
571
581
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
572
582
|
gateway_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
573
583
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
584
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
574
585
|
}, "strip", z.ZodTypeAny, {
|
|
575
586
|
name: string;
|
|
576
587
|
public_sysinfo?: boolean | undefined;
|
|
577
588
|
public_logs?: boolean | undefined;
|
|
578
589
|
gateway_enabled?: boolean | undefined;
|
|
590
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
579
591
|
allowed_envs?: string[] | undefined;
|
|
580
592
|
docker_compose_file?: string | undefined;
|
|
581
593
|
kms_enabled?: boolean | undefined;
|
|
@@ -586,6 +598,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
586
598
|
public_sysinfo?: boolean | undefined;
|
|
587
599
|
public_logs?: boolean | undefined;
|
|
588
600
|
gateway_enabled?: boolean | undefined;
|
|
601
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
589
602
|
allowed_envs?: string[] | undefined;
|
|
590
603
|
docker_compose_file?: string | undefined;
|
|
591
604
|
kms_enabled?: boolean | undefined;
|
|
@@ -596,6 +609,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
596
609
|
public_sysinfo?: boolean | undefined;
|
|
597
610
|
public_logs?: boolean | undefined;
|
|
598
611
|
gateway_enabled?: boolean | undefined;
|
|
612
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
599
613
|
allowed_envs?: string[] | undefined;
|
|
600
614
|
docker_compose_file?: string | undefined;
|
|
601
615
|
kms_enabled?: boolean | undefined;
|
|
@@ -606,6 +620,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
606
620
|
public_sysinfo?: boolean | undefined;
|
|
607
621
|
public_logs?: boolean | undefined;
|
|
608
622
|
gateway_enabled?: boolean | undefined;
|
|
623
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
609
624
|
allowed_envs?: string[] | undefined;
|
|
610
625
|
docker_compose_file?: string | undefined;
|
|
611
626
|
kms_enabled?: boolean | undefined;
|
|
@@ -639,11 +654,13 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
639
654
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
640
655
|
gateway_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
641
656
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
657
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
642
658
|
}, "strip", z.ZodTypeAny, {
|
|
643
659
|
name: string;
|
|
644
660
|
public_sysinfo?: boolean | undefined;
|
|
645
661
|
public_logs?: boolean | undefined;
|
|
646
662
|
gateway_enabled?: boolean | undefined;
|
|
663
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
647
664
|
allowed_envs?: string[] | undefined;
|
|
648
665
|
docker_compose_file?: string | undefined;
|
|
649
666
|
kms_enabled?: boolean | undefined;
|
|
@@ -654,6 +671,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
654
671
|
public_sysinfo?: boolean | undefined;
|
|
655
672
|
public_logs?: boolean | undefined;
|
|
656
673
|
gateway_enabled?: boolean | undefined;
|
|
674
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
657
675
|
allowed_envs?: string[] | undefined;
|
|
658
676
|
docker_compose_file?: string | undefined;
|
|
659
677
|
kms_enabled?: boolean | undefined;
|
|
@@ -664,6 +682,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
664
682
|
public_sysinfo?: boolean | undefined;
|
|
665
683
|
public_logs?: boolean | undefined;
|
|
666
684
|
gateway_enabled?: boolean | undefined;
|
|
685
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
667
686
|
allowed_envs?: string[] | undefined;
|
|
668
687
|
docker_compose_file?: string | undefined;
|
|
669
688
|
kms_enabled?: boolean | undefined;
|
|
@@ -674,6 +693,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
674
693
|
public_sysinfo?: boolean | undefined;
|
|
675
694
|
public_logs?: boolean | undefined;
|
|
676
695
|
gateway_enabled?: boolean | undefined;
|
|
696
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
677
697
|
allowed_envs?: string[] | undefined;
|
|
678
698
|
docker_compose_file?: string | undefined;
|
|
679
699
|
kms_enabled?: boolean | undefined;
|
|
@@ -707,11 +727,13 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
707
727
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
708
728
|
gateway_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
709
729
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
730
|
+
storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
|
|
710
731
|
}, "strip", z.ZodTypeAny, {
|
|
711
732
|
name: string;
|
|
712
733
|
public_sysinfo?: boolean | undefined;
|
|
713
734
|
public_logs?: boolean | undefined;
|
|
714
735
|
gateway_enabled?: boolean | undefined;
|
|
736
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
715
737
|
allowed_envs?: string[] | undefined;
|
|
716
738
|
docker_compose_file?: string | undefined;
|
|
717
739
|
kms_enabled?: boolean | undefined;
|
|
@@ -722,6 +744,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
722
744
|
public_sysinfo?: boolean | undefined;
|
|
723
745
|
public_logs?: boolean | undefined;
|
|
724
746
|
gateway_enabled?: boolean | undefined;
|
|
747
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
725
748
|
allowed_envs?: string[] | undefined;
|
|
726
749
|
docker_compose_file?: string | undefined;
|
|
727
750
|
kms_enabled?: boolean | undefined;
|
|
@@ -732,6 +755,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
732
755
|
public_sysinfo?: boolean | undefined;
|
|
733
756
|
public_logs?: boolean | undefined;
|
|
734
757
|
gateway_enabled?: boolean | undefined;
|
|
758
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
735
759
|
allowed_envs?: string[] | undefined;
|
|
736
760
|
docker_compose_file?: string | undefined;
|
|
737
761
|
kms_enabled?: boolean | undefined;
|
|
@@ -742,6 +766,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
742
766
|
public_sysinfo?: boolean | undefined;
|
|
743
767
|
public_logs?: boolean | undefined;
|
|
744
768
|
gateway_enabled?: boolean | undefined;
|
|
769
|
+
storage_fs?: "ext4" | "zfs" | undefined;
|
|
745
770
|
allowed_envs?: string[] | undefined;
|
|
746
771
|
docker_compose_file?: string | undefined;
|
|
747
772
|
kms_enabled?: boolean | undefined;
|