@phala/cloud 0.1.1-beta.2 → 0.1.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/dist/actions/cvms/delete_cvm.d.ts +67 -0
- package/dist/actions/cvms/get_cvm_attestation.d.ts +393 -0
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +126 -64
- package/dist/actions/cvms/get_cvm_containers_stats.d.ts +161 -0
- package/dist/actions/cvms/get_cvm_docker_compose.d.ts +39 -0
- package/dist/actions/cvms/get_cvm_info.d.ts +13 -38
- package/dist/actions/cvms/get_cvm_list.d.ts +195 -177
- package/dist/actions/cvms/get_cvm_network.d.ts +97 -0
- package/dist/actions/cvms/get_cvm_stats.d.ts +257 -0
- package/dist/actions/cvms/provision_cvm.d.ts +7 -7
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +58 -26
- package/dist/actions/cvms/restart_cvm.d.ts +123 -0
- package/dist/actions/cvms/shutdown_cvm.d.ts +116 -0
- package/dist/actions/cvms/start_cvm.d.ts +117 -0
- package/dist/actions/cvms/stop_cvm.d.ts +118 -0
- package/dist/actions/cvms/update_cvm_resources.d.ts +73 -0
- package/dist/actions/cvms/update_cvm_visibility.d.ts +147 -0
- package/dist/actions/index.d.ts +12 -0
- package/dist/create-client.d.ts +181 -0
- package/dist/index.js +615 -175
- package/dist/index.mjs +563 -172
- package/dist/types/app_compose.d.ts +6 -0
- package/dist/types/cvm_id.d.ts +110 -0
- package/dist/types/cvm_info.d.ts +243 -155
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/get_compose_hash.d.ts +21 -4
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/types/cvm_info.d.ts
CHANGED
|
@@ -56,15 +56,15 @@ export declare const ManagedUserSchema: z.ZodObject<{
|
|
|
56
56
|
export declare const CvmNodeSchema: z.ZodObject<{
|
|
57
57
|
id: z.ZodNumber;
|
|
58
58
|
name: z.ZodString;
|
|
59
|
-
region_identifier: z.ZodOptional<z.ZodString
|
|
59
|
+
region_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
60
60
|
}, "strip", z.ZodTypeAny, {
|
|
61
61
|
name: string;
|
|
62
62
|
id: number;
|
|
63
|
-
region_identifier?: string | undefined;
|
|
63
|
+
region_identifier?: string | null | undefined;
|
|
64
64
|
}, {
|
|
65
65
|
name: string;
|
|
66
66
|
id: number;
|
|
67
|
-
region_identifier?: string | undefined;
|
|
67
|
+
region_identifier?: string | null | undefined;
|
|
68
68
|
}>;
|
|
69
69
|
export declare const CvmNetworkUrlsSchema: z.ZodObject<{
|
|
70
70
|
app: z.ZodString;
|
|
@@ -77,7 +77,7 @@ export declare const CvmNetworkUrlsSchema: z.ZodObject<{
|
|
|
77
77
|
instance: string;
|
|
78
78
|
}>;
|
|
79
79
|
export declare const CvmInfoSchema: z.ZodObject<{
|
|
80
|
-
hosted: z.
|
|
80
|
+
hosted: z.ZodObject<{
|
|
81
81
|
id: z.ZodString;
|
|
82
82
|
name: z.ZodString;
|
|
83
83
|
status: z.ZodString;
|
|
@@ -119,9 +119,9 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
119
119
|
shutdown_progress: string | null;
|
|
120
120
|
image_version: string | null;
|
|
121
121
|
configuration?: any;
|
|
122
|
-
}
|
|
123
|
-
name: z.
|
|
124
|
-
managed_user: z.
|
|
122
|
+
}>;
|
|
123
|
+
name: z.ZodString;
|
|
124
|
+
managed_user: z.ZodNullable<z.ZodObject<{
|
|
125
125
|
id: z.ZodNumber;
|
|
126
126
|
username: z.ZodString;
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -130,30 +130,30 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
130
130
|
}, {
|
|
131
131
|
username: string;
|
|
132
132
|
id: number;
|
|
133
|
-
}
|
|
134
|
-
node: z.
|
|
133
|
+
}>>;
|
|
134
|
+
node: z.ZodNullable<z.ZodObject<{
|
|
135
135
|
id: z.ZodNumber;
|
|
136
136
|
name: z.ZodString;
|
|
137
|
-
region_identifier: z.ZodOptional<z.ZodString
|
|
137
|
+
region_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
139
|
name: string;
|
|
140
140
|
id: number;
|
|
141
|
-
region_identifier?: string | undefined;
|
|
141
|
+
region_identifier?: string | null | undefined;
|
|
142
142
|
}, {
|
|
143
143
|
name: string;
|
|
144
144
|
id: number;
|
|
145
|
-
region_identifier?: string | undefined;
|
|
146
|
-
}
|
|
147
|
-
listed: z.
|
|
148
|
-
status: z.
|
|
149
|
-
in_progress: z.
|
|
150
|
-
dapp_dashboard_url: z.
|
|
151
|
-
syslog_endpoint: z.
|
|
152
|
-
allow_upgrade: z.
|
|
153
|
-
project_id: z.
|
|
154
|
-
project_type: z.
|
|
155
|
-
billing_period: z.
|
|
156
|
-
kms_info: z.
|
|
145
|
+
region_identifier?: string | null | undefined;
|
|
146
|
+
}>>;
|
|
147
|
+
listed: z.ZodDefault<z.ZodBoolean>;
|
|
148
|
+
status: z.ZodString;
|
|
149
|
+
in_progress: z.ZodDefault<z.ZodBoolean>;
|
|
150
|
+
dapp_dashboard_url: z.ZodNullable<z.ZodString>;
|
|
151
|
+
syslog_endpoint: z.ZodNullable<z.ZodString>;
|
|
152
|
+
allow_upgrade: z.ZodDefault<z.ZodBoolean>;
|
|
153
|
+
project_id: z.ZodNullable<z.ZodString>;
|
|
154
|
+
project_type: z.ZodNullable<z.ZodString>;
|
|
155
|
+
billing_period: z.ZodNullable<z.ZodString>;
|
|
156
|
+
kms_info: z.ZodNullable<z.ZodEffects<z.ZodObject<{
|
|
157
157
|
id: z.ZodString;
|
|
158
158
|
slug: z.ZodNullable<z.ZodString>;
|
|
159
159
|
url: z.ZodString;
|
|
@@ -193,12 +193,12 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
193
193
|
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
194
194
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
195
195
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
196
|
-
}, z.ZodTypeAny, "passthrough"
|
|
197
|
-
vcpu: z.
|
|
198
|
-
memory: z.
|
|
199
|
-
disk_size: z.
|
|
200
|
-
gateway_domain: z.
|
|
201
|
-
public_urls: z.
|
|
196
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
197
|
+
vcpu: z.ZodNullable<z.ZodNumber>;
|
|
198
|
+
memory: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
disk_size: z.ZodNullable<z.ZodNumber>;
|
|
200
|
+
gateway_domain: z.ZodNullable<z.ZodString>;
|
|
201
|
+
public_urls: z.ZodArray<z.ZodObject<{
|
|
202
202
|
app: z.ZodString;
|
|
203
203
|
instance: z.ZodString;
|
|
204
204
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -207,13 +207,13 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
207
207
|
}, {
|
|
208
208
|
app: string;
|
|
209
209
|
instance: string;
|
|
210
|
-
}>, "many"
|
|
210
|
+
}>, "many">;
|
|
211
211
|
}, "strip", z.ZodTypeAny, {
|
|
212
|
-
status
|
|
213
|
-
name
|
|
214
|
-
listed
|
|
215
|
-
vcpu
|
|
216
|
-
hosted
|
|
212
|
+
status: string;
|
|
213
|
+
name: string;
|
|
214
|
+
listed: boolean;
|
|
215
|
+
vcpu: number | null;
|
|
216
|
+
hosted: {
|
|
217
217
|
status: string;
|
|
218
218
|
name: string;
|
|
219
219
|
id: string;
|
|
@@ -227,24 +227,24 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
227
227
|
shutdown_progress: string | null;
|
|
228
228
|
image_version: string | null;
|
|
229
229
|
configuration?: any;
|
|
230
|
-
}
|
|
231
|
-
managed_user
|
|
230
|
+
};
|
|
231
|
+
managed_user: {
|
|
232
232
|
username: string;
|
|
233
233
|
id: number;
|
|
234
|
-
} | null
|
|
235
|
-
node
|
|
234
|
+
} | null;
|
|
235
|
+
node: {
|
|
236
236
|
name: string;
|
|
237
237
|
id: number;
|
|
238
|
-
region_identifier?: string | undefined;
|
|
239
|
-
} | null
|
|
240
|
-
in_progress
|
|
241
|
-
dapp_dashboard_url
|
|
242
|
-
syslog_endpoint
|
|
243
|
-
allow_upgrade
|
|
244
|
-
project_id
|
|
245
|
-
project_type
|
|
246
|
-
billing_period
|
|
247
|
-
kms_info
|
|
238
|
+
region_identifier?: string | null | undefined;
|
|
239
|
+
} | null;
|
|
240
|
+
in_progress: boolean;
|
|
241
|
+
dapp_dashboard_url: string | null;
|
|
242
|
+
syslog_endpoint: string | null;
|
|
243
|
+
allow_upgrade: boolean;
|
|
244
|
+
project_id: string | null;
|
|
245
|
+
project_type: string | null;
|
|
246
|
+
billing_period: string | null;
|
|
247
|
+
kms_info: z.objectOutputType<{
|
|
248
248
|
id: z.ZodString;
|
|
249
249
|
slug: z.ZodNullable<z.ZodString>;
|
|
250
250
|
url: z.ZodString;
|
|
@@ -252,20 +252,19 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
252
252
|
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
253
253
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
254
254
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
255
|
-
}, z.ZodTypeAny, "passthrough"> | null
|
|
256
|
-
memory
|
|
257
|
-
disk_size
|
|
258
|
-
gateway_domain
|
|
259
|
-
public_urls
|
|
255
|
+
}, z.ZodTypeAny, "passthrough"> | null;
|
|
256
|
+
memory: number | null;
|
|
257
|
+
disk_size: number | null;
|
|
258
|
+
gateway_domain: string | null;
|
|
259
|
+
public_urls: {
|
|
260
260
|
app: string;
|
|
261
261
|
instance: string;
|
|
262
|
-
}[]
|
|
262
|
+
}[];
|
|
263
263
|
}, {
|
|
264
|
-
status
|
|
265
|
-
name
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
hosted?: {
|
|
264
|
+
status: string;
|
|
265
|
+
name: string;
|
|
266
|
+
vcpu: number | null;
|
|
267
|
+
hosted: {
|
|
269
268
|
status: string;
|
|
270
269
|
name: string;
|
|
271
270
|
id: string;
|
|
@@ -279,24 +278,22 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
279
278
|
shutdown_progress: string | null;
|
|
280
279
|
image_version: string | null;
|
|
281
280
|
configuration?: any;
|
|
282
|
-
}
|
|
283
|
-
managed_user
|
|
281
|
+
};
|
|
282
|
+
managed_user: {
|
|
284
283
|
username: string;
|
|
285
284
|
id: number;
|
|
286
|
-
} | null
|
|
287
|
-
node
|
|
285
|
+
} | null;
|
|
286
|
+
node: {
|
|
288
287
|
name: string;
|
|
289
288
|
id: number;
|
|
290
|
-
region_identifier?: string | undefined;
|
|
291
|
-
} | null
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
billing_period?: string | null | undefined;
|
|
299
|
-
kms_info?: z.objectInputType<{
|
|
289
|
+
region_identifier?: string | null | undefined;
|
|
290
|
+
} | null;
|
|
291
|
+
dapp_dashboard_url: string | null;
|
|
292
|
+
syslog_endpoint: string | null;
|
|
293
|
+
project_id: string | null;
|
|
294
|
+
project_type: string | null;
|
|
295
|
+
billing_period: string | null;
|
|
296
|
+
kms_info: z.objectInputType<{
|
|
300
297
|
id: z.ZodString;
|
|
301
298
|
slug: z.ZodNullable<z.ZodString>;
|
|
302
299
|
url: z.ZodString;
|
|
@@ -304,51 +301,54 @@ export declare const CvmInfoSchema: z.ZodObject<{
|
|
|
304
301
|
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
305
302
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
306
303
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
307
|
-
}, z.ZodTypeAny, "passthrough"> | null
|
|
308
|
-
memory
|
|
309
|
-
disk_size
|
|
310
|
-
gateway_domain
|
|
311
|
-
public_urls
|
|
304
|
+
}, z.ZodTypeAny, "passthrough"> | null;
|
|
305
|
+
memory: number | null;
|
|
306
|
+
disk_size: number | null;
|
|
307
|
+
gateway_domain: string | null;
|
|
308
|
+
public_urls: {
|
|
312
309
|
app: string;
|
|
313
310
|
instance: string;
|
|
314
|
-
}[]
|
|
311
|
+
}[];
|
|
312
|
+
listed?: boolean | undefined;
|
|
313
|
+
in_progress?: boolean | undefined;
|
|
314
|
+
allow_upgrade?: boolean | undefined;
|
|
315
315
|
}>;
|
|
316
316
|
export type CvmInfo = z.infer<typeof CvmInfoSchema>;
|
|
317
317
|
export declare const CvmLegacyDetailSchema: z.ZodObject<{
|
|
318
318
|
id: z.ZodNumber;
|
|
319
319
|
name: z.ZodString;
|
|
320
320
|
status: z.ZodString;
|
|
321
|
-
in_progress: z.ZodBoolean
|
|
321
|
+
in_progress: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
322
322
|
teepod_id: z.ZodNullable<z.ZodNumber>;
|
|
323
|
-
teepod: z.ZodObject<{
|
|
323
|
+
teepod: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
324
324
|
id: z.ZodNumber;
|
|
325
325
|
name: z.ZodString;
|
|
326
|
-
region_identifier: z.ZodOptional<z.ZodString
|
|
326
|
+
region_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
327
327
|
}, "strip", z.ZodTypeAny, {
|
|
328
328
|
name: string;
|
|
329
329
|
id: number;
|
|
330
|
-
region_identifier?: string | undefined;
|
|
330
|
+
region_identifier?: string | null | undefined;
|
|
331
331
|
}, {
|
|
332
332
|
name: string;
|
|
333
333
|
id: number;
|
|
334
|
-
region_identifier?: string | undefined;
|
|
335
|
-
}
|
|
334
|
+
region_identifier?: string | null | undefined;
|
|
335
|
+
}>>>;
|
|
336
336
|
app_id: z.ZodString;
|
|
337
337
|
vm_uuid: z.ZodNullable<z.ZodString>;
|
|
338
338
|
instance_id: z.ZodNullable<z.ZodString>;
|
|
339
|
-
vcpu: z.
|
|
340
|
-
memory: z.
|
|
341
|
-
disk_size: z.
|
|
342
|
-
base_image: z.ZodString
|
|
339
|
+
vcpu: z.ZodNumber;
|
|
340
|
+
memory: z.ZodNumber;
|
|
341
|
+
disk_size: z.ZodNumber;
|
|
342
|
+
base_image: z.ZodNullable<z.ZodString>;
|
|
343
343
|
encrypted_env_pubkey: z.ZodNullable<z.ZodString>;
|
|
344
|
-
listed: z.ZodBoolean
|
|
345
|
-
project_id: z.ZodNullable<z.ZodString
|
|
346
|
-
project_type: z.ZodNullable<z.ZodString
|
|
347
|
-
public_sysinfo: z.ZodBoolean
|
|
348
|
-
public_logs: z.ZodBoolean
|
|
349
|
-
dapp_dashboard_url: z.ZodNullable<z.ZodString
|
|
350
|
-
syslog_endpoint: z.ZodNullable<z.ZodString
|
|
351
|
-
kms_info: z.ZodNullable<z.ZodEffects<z.ZodObject<{
|
|
344
|
+
listed: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
345
|
+
project_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
346
|
+
project_type: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
347
|
+
public_sysinfo: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
348
|
+
public_logs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
349
|
+
dapp_dashboard_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
350
|
+
syslog_endpoint: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
351
|
+
kms_info: z.ZodNullable<z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
352
352
|
id: z.ZodString;
|
|
353
353
|
slug: z.ZodNullable<z.ZodString>;
|
|
354
354
|
url: z.ZodString;
|
|
@@ -388,11 +388,11 @@ export declare const CvmLegacyDetailSchema: z.ZodObject<{
|
|
|
388
388
|
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
389
389
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
390
390
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
391
|
-
}, z.ZodTypeAny, "passthrough"
|
|
392
|
-
contract_address: z.ZodNullable<z.ZodString
|
|
393
|
-
deployer_address: z.ZodNullable<z.ZodString
|
|
394
|
-
scheduled_delete_at: z.ZodNullable<z.ZodString
|
|
395
|
-
public_urls: z.ZodArray<z.ZodObject<{
|
|
391
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
392
|
+
contract_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
393
|
+
deployer_address: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
394
|
+
scheduled_delete_at: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
395
|
+
public_urls: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
396
396
|
app: z.ZodString;
|
|
397
397
|
instance: z.ZodString;
|
|
398
398
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -401,23 +401,34 @@ export declare const CvmLegacyDetailSchema: z.ZodObject<{
|
|
|
401
401
|
}, {
|
|
402
402
|
app: string;
|
|
403
403
|
instance: string;
|
|
404
|
-
}>, "many"
|
|
405
|
-
gateway_domain: z.ZodNullable<z.ZodString
|
|
404
|
+
}>, "many">>>;
|
|
405
|
+
gateway_domain: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
406
406
|
}, "strip", z.ZodTypeAny, {
|
|
407
407
|
status: string;
|
|
408
408
|
name: string;
|
|
409
409
|
id: number;
|
|
410
410
|
teepod_id: number | null;
|
|
411
411
|
listed: boolean;
|
|
412
|
-
vcpu: number
|
|
412
|
+
vcpu: number;
|
|
413
413
|
app_id: string;
|
|
414
414
|
instance_id: string | null;
|
|
415
415
|
in_progress: boolean;
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
416
|
+
memory: number;
|
|
417
|
+
disk_size: number;
|
|
418
|
+
public_urls: {
|
|
419
|
+
app: string;
|
|
420
|
+
instance: string;
|
|
421
|
+
}[];
|
|
422
|
+
vm_uuid: string | null;
|
|
423
|
+
base_image: string | null;
|
|
424
|
+
encrypted_env_pubkey: string | null;
|
|
425
|
+
public_sysinfo: boolean;
|
|
426
|
+
public_logs: boolean;
|
|
427
|
+
dapp_dashboard_url?: string | null | undefined;
|
|
428
|
+
syslog_endpoint?: string | null | undefined;
|
|
429
|
+
project_id?: string | null | undefined;
|
|
430
|
+
project_type?: string | null | undefined;
|
|
431
|
+
kms_info?: z.objectOutputType<{
|
|
421
432
|
id: z.ZodString;
|
|
422
433
|
slug: z.ZodNullable<z.ZodString>;
|
|
423
434
|
url: z.ZodString;
|
|
@@ -425,42 +436,36 @@ export declare const CvmLegacyDetailSchema: z.ZodObject<{
|
|
|
425
436
|
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
426
437
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
427
438
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
428
|
-
}, z.ZodTypeAny, "passthrough"> | null;
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
gateway_domain: string | null;
|
|
432
|
-
public_urls: {
|
|
433
|
-
app: string;
|
|
434
|
-
instance: string;
|
|
435
|
-
}[];
|
|
436
|
-
teepod: {
|
|
439
|
+
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
440
|
+
gateway_domain?: string | null | undefined;
|
|
441
|
+
teepod?: {
|
|
437
442
|
name: string;
|
|
438
443
|
id: number;
|
|
439
|
-
region_identifier?: string | undefined;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
public_sysinfo: boolean;
|
|
445
|
-
public_logs: boolean;
|
|
446
|
-
contract_address: string | null;
|
|
447
|
-
deployer_address: string | null;
|
|
448
|
-
scheduled_delete_at: string | null;
|
|
444
|
+
region_identifier?: string | null | undefined;
|
|
445
|
+
} | null | undefined;
|
|
446
|
+
contract_address?: string | null | undefined;
|
|
447
|
+
deployer_address?: string | null | undefined;
|
|
448
|
+
scheduled_delete_at?: string | null | undefined;
|
|
449
449
|
}, {
|
|
450
450
|
status: string;
|
|
451
451
|
name: string;
|
|
452
452
|
id: number;
|
|
453
453
|
teepod_id: number | null;
|
|
454
|
-
|
|
455
|
-
vcpu: number | null;
|
|
454
|
+
vcpu: number;
|
|
456
455
|
app_id: string;
|
|
457
456
|
instance_id: string | null;
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
457
|
+
memory: number;
|
|
458
|
+
disk_size: number;
|
|
459
|
+
vm_uuid: string | null;
|
|
460
|
+
base_image: string | null;
|
|
461
|
+
encrypted_env_pubkey: string | null;
|
|
462
|
+
listed?: boolean | undefined;
|
|
463
|
+
in_progress?: boolean | undefined;
|
|
464
|
+
dapp_dashboard_url?: string | null | undefined;
|
|
465
|
+
syslog_endpoint?: string | null | undefined;
|
|
466
|
+
project_id?: string | null | undefined;
|
|
467
|
+
project_type?: string | null | undefined;
|
|
468
|
+
kms_info?: z.objectInputType<{
|
|
464
469
|
id: z.ZodString;
|
|
465
470
|
slug: z.ZodNullable<z.ZodString>;
|
|
466
471
|
url: z.ZodString;
|
|
@@ -468,28 +473,111 @@ export declare const CvmLegacyDetailSchema: z.ZodObject<{
|
|
|
468
473
|
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
469
474
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
470
475
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
471
|
-
}, z.ZodTypeAny, "passthrough"> | null;
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
gateway_domain: string | null;
|
|
475
|
-
public_urls: {
|
|
476
|
+
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
477
|
+
gateway_domain?: string | null | undefined;
|
|
478
|
+
public_urls?: {
|
|
476
479
|
app: string;
|
|
477
480
|
instance: string;
|
|
478
|
-
}[];
|
|
479
|
-
teepod
|
|
481
|
+
}[] | undefined;
|
|
482
|
+
teepod?: {
|
|
480
483
|
name: string;
|
|
481
484
|
id: number;
|
|
482
|
-
region_identifier?: string | undefined;
|
|
483
|
-
};
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
contract_address: string | null;
|
|
490
|
-
deployer_address: string | null;
|
|
491
|
-
scheduled_delete_at: string | null;
|
|
485
|
+
region_identifier?: string | null | undefined;
|
|
486
|
+
} | null | undefined;
|
|
487
|
+
public_sysinfo?: boolean | undefined;
|
|
488
|
+
public_logs?: boolean | undefined;
|
|
489
|
+
contract_address?: string | null | undefined;
|
|
490
|
+
deployer_address?: string | null | undefined;
|
|
491
|
+
scheduled_delete_at?: string | null | undefined;
|
|
492
492
|
}>;
|
|
493
493
|
export type CvmLegacyDetail = z.infer<typeof CvmLegacyDetailSchema> & {
|
|
494
494
|
kms_info: KmsInfo;
|
|
495
495
|
};
|
|
496
|
+
export declare const VMSchema: z.ZodObject<{
|
|
497
|
+
id: z.ZodNumber;
|
|
498
|
+
name: z.ZodString;
|
|
499
|
+
status: z.ZodString;
|
|
500
|
+
teepod_id: z.ZodNumber;
|
|
501
|
+
teepod: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
502
|
+
id: z.ZodNumber;
|
|
503
|
+
name: z.ZodString;
|
|
504
|
+
region_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
505
|
+
}, "strip", z.ZodTypeAny, {
|
|
506
|
+
name: string;
|
|
507
|
+
id: number;
|
|
508
|
+
region_identifier?: string | null | undefined;
|
|
509
|
+
}, {
|
|
510
|
+
name: string;
|
|
511
|
+
id: number;
|
|
512
|
+
region_identifier?: string | null | undefined;
|
|
513
|
+
}>>>;
|
|
514
|
+
user_id: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
515
|
+
app_id: z.ZodString;
|
|
516
|
+
vm_uuid: z.ZodNullable<z.ZodString>;
|
|
517
|
+
instance_id: z.ZodNullable<z.ZodString>;
|
|
518
|
+
app_url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
519
|
+
base_image: z.ZodNullable<z.ZodString>;
|
|
520
|
+
vcpu: z.ZodNumber;
|
|
521
|
+
memory: z.ZodNumber;
|
|
522
|
+
disk_size: z.ZodNumber;
|
|
523
|
+
manifest_version: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
524
|
+
version: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
525
|
+
runner: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
526
|
+
docker_compose_file: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
527
|
+
features: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
528
|
+
created_at: z.ZodString;
|
|
529
|
+
encrypted_env_pubkey: z.ZodNullable<z.ZodString>;
|
|
530
|
+
}, "strip", z.ZodTypeAny, {
|
|
531
|
+
status: string;
|
|
532
|
+
name: string;
|
|
533
|
+
id: number;
|
|
534
|
+
teepod_id: number;
|
|
535
|
+
vcpu: number;
|
|
536
|
+
created_at: string;
|
|
537
|
+
app_id: string;
|
|
538
|
+
instance_id: string | null;
|
|
539
|
+
memory: number;
|
|
540
|
+
disk_size: number;
|
|
541
|
+
vm_uuid: string | null;
|
|
542
|
+
base_image: string | null;
|
|
543
|
+
encrypted_env_pubkey: string | null;
|
|
544
|
+
version?: string | null | undefined;
|
|
545
|
+
app_url?: string | null | undefined;
|
|
546
|
+
teepod?: {
|
|
547
|
+
name: string;
|
|
548
|
+
id: number;
|
|
549
|
+
region_identifier?: string | null | undefined;
|
|
550
|
+
} | null | undefined;
|
|
551
|
+
user_id?: number | null | undefined;
|
|
552
|
+
manifest_version?: number | null | undefined;
|
|
553
|
+
runner?: string | null | undefined;
|
|
554
|
+
docker_compose_file?: string | null | undefined;
|
|
555
|
+
features?: string[] | null | undefined;
|
|
556
|
+
}, {
|
|
557
|
+
status: string;
|
|
558
|
+
name: string;
|
|
559
|
+
id: number;
|
|
560
|
+
teepod_id: number;
|
|
561
|
+
vcpu: number;
|
|
562
|
+
created_at: string;
|
|
563
|
+
app_id: string;
|
|
564
|
+
instance_id: string | null;
|
|
565
|
+
memory: number;
|
|
566
|
+
disk_size: number;
|
|
567
|
+
vm_uuid: string | null;
|
|
568
|
+
base_image: string | null;
|
|
569
|
+
encrypted_env_pubkey: string | null;
|
|
570
|
+
version?: string | null | undefined;
|
|
571
|
+
app_url?: string | null | undefined;
|
|
572
|
+
teepod?: {
|
|
573
|
+
name: string;
|
|
574
|
+
id: number;
|
|
575
|
+
region_identifier?: string | null | undefined;
|
|
576
|
+
} | null | undefined;
|
|
577
|
+
user_id?: number | null | undefined;
|
|
578
|
+
manifest_version?: number | null | undefined;
|
|
579
|
+
runner?: string | null | undefined;
|
|
580
|
+
docker_compose_file?: string | null | undefined;
|
|
581
|
+
features?: string[] | null | undefined;
|
|
582
|
+
}>;
|
|
583
|
+
export type VM = z.infer<typeof VMSchema>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
type SortableValue = string | number | boolean | null | undefined | SortableObject | SortableArray;
|
|
2
|
-
interface SortableObject {
|
|
1
|
+
export type SortableValue = string | number | boolean | null | undefined | SortableObject | SortableArray;
|
|
2
|
+
export interface SortableObject {
|
|
3
3
|
[key: string]: SortableValue;
|
|
4
4
|
}
|
|
5
|
-
interface SortableArray extends Array<SortableValue> {
|
|
5
|
+
export interface SortableArray extends Array<SortableValue> {
|
|
6
6
|
}
|
|
7
|
+
export declare function sortObject(obj: SortableValue): SortableValue;
|
|
7
8
|
export interface AppCompose extends SortableObject {
|
|
8
9
|
runner?: string;
|
|
9
10
|
docker_compose_file?: string;
|
|
10
11
|
bash_script?: string;
|
|
11
12
|
pre_launch_script?: string;
|
|
12
13
|
}
|
|
14
|
+
export declare function preprocessAppCompose(dic: AppCompose): AppCompose;
|
|
15
|
+
export declare function dumpAppCompose(dic: AppCompose): string;
|
|
13
16
|
export declare function getComposeHash(app_compose: AppCompose): string;
|
|
14
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Attach utility methods to an AppCompose-compatible object
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const compose = withComposeMethods(rawCompose);
|
|
23
|
+
* console.log(compose.getHash());
|
|
24
|
+
* console.log(compose.dump());
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function withComposeMethods<T extends Record<string, unknown>>(compose: T): T & {
|
|
28
|
+
getHash: () => string;
|
|
29
|
+
toString: () => string;
|
|
30
|
+
};
|
|
31
|
+
export type AppComposeWithMethods = ReturnType<typeof withComposeMethods>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { encryptEnvVars } from "@phala/dstack-sdk/encrypt-env-vars";
|
|
2
|
-
export { getComposeHash, type AppCompose } from "./get_compose_hash";
|
|
2
|
+
export { getComposeHash, dumpAppCompose, preprocessAppCompose, sortObject, withComposeMethods, type AppCompose, type AppComposeWithMethods, type SortableValue, type SortableObject, type SortableArray, } from "./get_compose_hash";
|
|
3
3
|
export { getErrorMessage } from "./get_error_message";
|
|
4
4
|
export { asHex } from "./as-hex";
|
|
5
5
|
export { validateActionParameters, safeValidateActionParameters } from "./validate-parameters";
|