@phala/cloud 0.0.12 → 0.1.1-beta.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/{add_compose_hash.d.ts → blockchains/add_compose_hash.d.ts} +6 -7
- package/dist/actions/{deploy_app_auth.d.ts → blockchains/deploy_app_auth.d.ts} +6 -7
- package/dist/actions/{commit_cvm_compose_file_update.d.ts → cvms/commit_cvm_compose_file_update.d.ts} +25 -13
- package/dist/actions/{commit_cvm_provision.d.ts → cvms/commit_cvm_provision.d.ts} +139 -13
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +225 -0
- package/dist/actions/{get_cvm_info.d.ts → cvms/get_cvm_info.d.ts} +21 -12
- package/dist/actions/{get_cvm_list.d.ts → cvms/get_cvm_list.d.ts} +187 -39
- package/dist/actions/{provision_cvm.d.ts → cvms/provision_cvm.d.ts} +75 -20
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +768 -0
- package/dist/actions/get_available_nodes.d.ts +319 -7
- package/dist/actions/get_current_user.d.ts +35 -7
- package/dist/actions/index.d.ts +17 -18
- package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +66 -0
- package/dist/actions/kms/get_kms_info.d.ts +55 -0
- package/dist/actions/{get_kms_list.d.ts → kms/get_kms_list.d.ts} +44 -8
- package/dist/actions/list-instance-types.d.ts +69 -10
- package/dist/actions/workspaces/get_workspace.d.ts +33 -8
- package/dist/actions/workspaces/list_workspaces.d.ts +92 -7
- package/dist/chunk-O5QBIXBA.mjs +1128 -0
- package/dist/client.d.ts +16 -1
- package/dist/create-client.d.ts +311 -0
- package/dist/create-client.js +1143 -0
- package/dist/create-client.mjs +74 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +504 -722
- package/dist/index.mjs +135 -1351
- package/dist/parse_dotenv.d.ts +0 -1
- package/dist/types/app_compose.d.ts +0 -1
- package/dist/types/client.d.ts +0 -1
- package/dist/types/common.d.ts +17 -4
- package/dist/types/cvm_info.d.ts +34 -35
- package/dist/types/index.d.ts +0 -1
- package/dist/types/kms_info.d.ts +0 -1
- package/dist/types/supported_chains.d.ts +0 -1
- package/dist/utils/as-hex.d.ts +0 -1
- package/dist/utils/client-factories.d.ts +0 -1
- package/dist/utils/define-action.d.ts +61 -0
- package/dist/utils/get_compose_hash.d.ts +0 -1
- package/dist/utils/get_error_message.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/network.d.ts +0 -1
- package/dist/utils/transaction.d.ts +0 -1
- package/dist/utils/validate-parameters.d.ts +5 -5
- package/package.json +70 -66
- package/dist/actions/add_compose_hash.d.ts.map +0 -1
- package/dist/actions/commit_cvm_compose_file_update.d.ts.map +0 -1
- package/dist/actions/commit_cvm_provision.d.ts.map +0 -1
- package/dist/actions/deploy_app_auth.d.ts.map +0 -1
- package/dist/actions/get_app_env_encrypt_pubkey.d.ts +0 -30
- package/dist/actions/get_app_env_encrypt_pubkey.d.ts.map +0 -1
- package/dist/actions/get_available_nodes.d.ts.map +0 -1
- package/dist/actions/get_current_user.d.ts.map +0 -1
- package/dist/actions/get_cvm_compose_file.d.ts +0 -122
- package/dist/actions/get_cvm_compose_file.d.ts.map +0 -1
- package/dist/actions/get_cvm_info.d.ts.map +0 -1
- package/dist/actions/get_cvm_list.d.ts.map +0 -1
- package/dist/actions/get_kms_info.d.ts +0 -34
- package/dist/actions/get_kms_info.d.ts.map +0 -1
- package/dist/actions/get_kms_list.d.ts.map +0 -1
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/list-instance-types.d.ts.map +0 -1
- package/dist/actions/provision_cvm.d.ts.map +0 -1
- package/dist/actions/provision_cvm_compose_file_update.d.ts +0 -413
- package/dist/actions/provision_cvm_compose_file_update.d.ts.map +0 -1
- package/dist/actions/workspaces/get_workspace.d.ts.map +0 -1
- package/dist/actions/workspaces/list_workspaces.d.ts.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/parse_dotenv.d.ts.map +0 -1
- package/dist/types/app_compose.d.ts.map +0 -1
- package/dist/types/client.d.ts.map +0 -1
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/cvm_info.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/kms_info.d.ts.map +0 -1
- package/dist/types/supported_chains.d.ts.map +0 -1
- package/dist/utils/as-hex.d.ts.map +0 -1
- package/dist/utils/client-factories.d.ts.map +0 -1
- package/dist/utils/get_compose_hash.d.ts.map +0 -1
- package/dist/utils/get_error_message.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/network.d.ts.map +0 -1
- package/dist/utils/transaction.d.ts.map +0 -1
- package/dist/utils/validate-parameters.d.ts.map +0 -1
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type Client
|
|
3
|
-
import { ActionParameters, ActionReturnType } from "../types/common";
|
|
2
|
+
import { type Client } from "../../client";
|
|
4
3
|
export declare const GetCvmListRequestSchema: z.ZodObject<{
|
|
5
4
|
page: z.ZodOptional<z.ZodNumber>;
|
|
6
5
|
page_size: z.ZodOptional<z.ZodNumber>;
|
|
7
6
|
node_id: z.ZodOptional<z.ZodNumber>;
|
|
8
7
|
}, "strict", z.ZodTypeAny, {
|
|
9
|
-
node_id?: number | undefined;
|
|
10
8
|
page?: number | undefined;
|
|
11
9
|
page_size?: number | undefined;
|
|
12
|
-
}, {
|
|
13
10
|
node_id?: number | undefined;
|
|
11
|
+
}, {
|
|
14
12
|
page?: number | undefined;
|
|
15
13
|
page_size?: number | undefined;
|
|
14
|
+
node_id?: number | undefined;
|
|
16
15
|
}>;
|
|
17
16
|
export declare const GetCvmListSchema: z.ZodObject<{
|
|
18
17
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -32,8 +31,8 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
32
31
|
image_version: z.ZodNullable<z.ZodString>;
|
|
33
32
|
}, "strip", z.ZodTypeAny, {
|
|
34
33
|
status: string;
|
|
35
|
-
id: string;
|
|
36
34
|
name: string;
|
|
35
|
+
id: string;
|
|
37
36
|
uptime: string;
|
|
38
37
|
app_url: string | null;
|
|
39
38
|
app_id: string;
|
|
@@ -46,8 +45,8 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
46
45
|
configuration?: any;
|
|
47
46
|
}, {
|
|
48
47
|
status: string;
|
|
49
|
-
id: string;
|
|
50
48
|
name: string;
|
|
49
|
+
id: string;
|
|
51
50
|
uptime: string;
|
|
52
51
|
app_url: string | null;
|
|
53
52
|
app_id: string;
|
|
@@ -64,23 +63,23 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
64
63
|
id: z.ZodNumber;
|
|
65
64
|
username: z.ZodString;
|
|
66
65
|
}, "strip", z.ZodTypeAny, {
|
|
67
|
-
id: number;
|
|
68
66
|
username: string;
|
|
69
|
-
}, {
|
|
70
67
|
id: number;
|
|
68
|
+
}, {
|
|
71
69
|
username: string;
|
|
70
|
+
id: number;
|
|
72
71
|
}>>>>;
|
|
73
72
|
node: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
74
73
|
id: z.ZodNumber;
|
|
75
74
|
name: z.ZodString;
|
|
76
75
|
region_identifier: z.ZodOptional<z.ZodString>;
|
|
77
76
|
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
id: number;
|
|
79
77
|
name: string;
|
|
78
|
+
id: number;
|
|
80
79
|
region_identifier?: string | undefined;
|
|
81
80
|
}, {
|
|
82
|
-
id: number;
|
|
83
81
|
name: string;
|
|
82
|
+
id: number;
|
|
84
83
|
region_identifier?: string | undefined;
|
|
85
84
|
}>>>>;
|
|
86
85
|
listed: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
@@ -150,10 +149,12 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
150
149
|
}, "strip", z.ZodTypeAny, {
|
|
151
150
|
status?: string | undefined;
|
|
152
151
|
name?: string | undefined;
|
|
152
|
+
listed?: boolean | undefined;
|
|
153
|
+
vcpu?: number | null | undefined;
|
|
153
154
|
hosted?: {
|
|
154
155
|
status: string;
|
|
155
|
-
id: string;
|
|
156
156
|
name: string;
|
|
157
|
+
id: string;
|
|
157
158
|
uptime: string;
|
|
158
159
|
app_url: string | null;
|
|
159
160
|
app_id: string;
|
|
@@ -166,15 +167,14 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
166
167
|
configuration?: any;
|
|
167
168
|
} | undefined;
|
|
168
169
|
managed_user?: {
|
|
169
|
-
id: number;
|
|
170
170
|
username: string;
|
|
171
|
+
id: number;
|
|
171
172
|
} | null | undefined;
|
|
172
173
|
node?: {
|
|
173
|
-
id: number;
|
|
174
174
|
name: string;
|
|
175
|
+
id: number;
|
|
175
176
|
region_identifier?: string | undefined;
|
|
176
177
|
} | null | undefined;
|
|
177
|
-
listed?: boolean | undefined;
|
|
178
178
|
in_progress?: boolean | undefined;
|
|
179
179
|
dapp_dashboard_url?: string | null | undefined;
|
|
180
180
|
syslog_endpoint?: string | null | undefined;
|
|
@@ -191,7 +191,6 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
191
191
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
192
192
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
193
193
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
194
|
-
vcpu?: number | null | undefined;
|
|
195
194
|
memory?: number | null | undefined;
|
|
196
195
|
disk_size?: number | null | undefined;
|
|
197
196
|
gateway_domain?: string | null | undefined;
|
|
@@ -202,10 +201,12 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
202
201
|
}, {
|
|
203
202
|
status?: string | undefined;
|
|
204
203
|
name?: string | undefined;
|
|
204
|
+
listed?: boolean | undefined;
|
|
205
|
+
vcpu?: number | null | undefined;
|
|
205
206
|
hosted?: {
|
|
206
207
|
status: string;
|
|
207
|
-
id: string;
|
|
208
208
|
name: string;
|
|
209
|
+
id: string;
|
|
209
210
|
uptime: string;
|
|
210
211
|
app_url: string | null;
|
|
211
212
|
app_id: string;
|
|
@@ -218,15 +219,14 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
218
219
|
configuration?: any;
|
|
219
220
|
} | undefined;
|
|
220
221
|
managed_user?: {
|
|
221
|
-
id: number;
|
|
222
222
|
username: string;
|
|
223
|
+
id: number;
|
|
223
224
|
} | null | undefined;
|
|
224
225
|
node?: {
|
|
225
|
-
id: number;
|
|
226
226
|
name: string;
|
|
227
|
+
id: number;
|
|
227
228
|
region_identifier?: string | undefined;
|
|
228
229
|
} | null | undefined;
|
|
229
|
-
listed?: boolean | undefined;
|
|
230
230
|
in_progress?: boolean | undefined;
|
|
231
231
|
dapp_dashboard_url?: string | null | undefined;
|
|
232
232
|
syslog_endpoint?: string | null | undefined;
|
|
@@ -243,7 +243,6 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
243
243
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
244
244
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
245
245
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
246
|
-
vcpu?: number | null | undefined;
|
|
247
246
|
memory?: number | null | undefined;
|
|
248
247
|
disk_size?: number | null | undefined;
|
|
249
248
|
gateway_domain?: string | null | undefined;
|
|
@@ -262,10 +261,12 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
262
261
|
items: {
|
|
263
262
|
status?: string | undefined;
|
|
264
263
|
name?: string | undefined;
|
|
264
|
+
listed?: boolean | undefined;
|
|
265
|
+
vcpu?: number | null | undefined;
|
|
265
266
|
hosted?: {
|
|
266
267
|
status: string;
|
|
267
|
-
id: string;
|
|
268
268
|
name: string;
|
|
269
|
+
id: string;
|
|
269
270
|
uptime: string;
|
|
270
271
|
app_url: string | null;
|
|
271
272
|
app_id: string;
|
|
@@ -278,15 +279,14 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
278
279
|
configuration?: any;
|
|
279
280
|
} | undefined;
|
|
280
281
|
managed_user?: {
|
|
281
|
-
id: number;
|
|
282
282
|
username: string;
|
|
283
|
+
id: number;
|
|
283
284
|
} | null | undefined;
|
|
284
285
|
node?: {
|
|
285
|
-
id: number;
|
|
286
286
|
name: string;
|
|
287
|
+
id: number;
|
|
287
288
|
region_identifier?: string | undefined;
|
|
288
289
|
} | null | undefined;
|
|
289
|
-
listed?: boolean | undefined;
|
|
290
290
|
in_progress?: boolean | undefined;
|
|
291
291
|
dapp_dashboard_url?: string | null | undefined;
|
|
292
292
|
syslog_endpoint?: string | null | undefined;
|
|
@@ -303,7 +303,6 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
303
303
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
304
304
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
305
305
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
306
|
-
vcpu?: number | null | undefined;
|
|
307
306
|
memory?: number | null | undefined;
|
|
308
307
|
disk_size?: number | null | undefined;
|
|
309
308
|
gateway_domain?: string | null | undefined;
|
|
@@ -320,10 +319,12 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
320
319
|
items: {
|
|
321
320
|
status?: string | undefined;
|
|
322
321
|
name?: string | undefined;
|
|
322
|
+
listed?: boolean | undefined;
|
|
323
|
+
vcpu?: number | null | undefined;
|
|
323
324
|
hosted?: {
|
|
324
325
|
status: string;
|
|
325
|
-
id: string;
|
|
326
326
|
name: string;
|
|
327
|
+
id: string;
|
|
327
328
|
uptime: string;
|
|
328
329
|
app_url: string | null;
|
|
329
330
|
app_id: string;
|
|
@@ -336,15 +337,14 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
336
337
|
configuration?: any;
|
|
337
338
|
} | undefined;
|
|
338
339
|
managed_user?: {
|
|
339
|
-
id: number;
|
|
340
340
|
username: string;
|
|
341
|
+
id: number;
|
|
341
342
|
} | null | undefined;
|
|
342
343
|
node?: {
|
|
343
|
-
id: number;
|
|
344
344
|
name: string;
|
|
345
|
+
id: number;
|
|
345
346
|
region_identifier?: string | undefined;
|
|
346
347
|
} | null | undefined;
|
|
347
|
-
listed?: boolean | undefined;
|
|
348
348
|
in_progress?: boolean | undefined;
|
|
349
349
|
dapp_dashboard_url?: string | null | undefined;
|
|
350
350
|
syslog_endpoint?: string | null | undefined;
|
|
@@ -361,7 +361,6 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
361
361
|
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
362
362
|
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
363
363
|
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
364
|
-
vcpu?: number | null | undefined;
|
|
365
364
|
memory?: number | null | undefined;
|
|
366
365
|
disk_size?: number | null | undefined;
|
|
367
366
|
gateway_domain?: string | null | undefined;
|
|
@@ -375,8 +374,6 @@ export declare const GetCvmListSchema: z.ZodObject<{
|
|
|
375
374
|
}>;
|
|
376
375
|
export type GetCvmListRequest = z.infer<typeof GetCvmListRequestSchema>;
|
|
377
376
|
export type GetCvmListResponse = z.infer<typeof GetCvmListSchema>;
|
|
378
|
-
export type GetCvmListParameters<T = undefined> = ActionParameters<T>;
|
|
379
|
-
export type GetCvmListReturnType<T = undefined> = ActionReturnType<GetCvmListResponse, T>;
|
|
380
377
|
/**
|
|
381
378
|
* Get a paginated list of CVMs
|
|
382
379
|
*
|
|
@@ -385,7 +382,6 @@ export type GetCvmListReturnType<T = undefined> = ActionReturnType<GetCvmListRes
|
|
|
385
382
|
* @param request.page - Page number (1-based)
|
|
386
383
|
* @param request.page_size - Number of items per page
|
|
387
384
|
* @param request.node_id - Filter by node ID
|
|
388
|
-
* @param parameters - Optional behavior parameters
|
|
389
385
|
* @returns Paginated list of CVMs
|
|
390
386
|
*
|
|
391
387
|
* @example
|
|
@@ -400,9 +396,161 @@ export type GetCvmListReturnType<T = undefined> = ActionReturnType<GetCvmListRes
|
|
|
400
396
|
* const list = await getCvmList(client, { page: 1 }, { schema: customSchema })
|
|
401
397
|
* ```
|
|
402
398
|
*/
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
399
|
+
declare const getCvmList: {
|
|
400
|
+
(client: Client, params?: {
|
|
401
|
+
page?: number | undefined;
|
|
402
|
+
page_size?: number | undefined;
|
|
403
|
+
node_id?: number | undefined;
|
|
404
|
+
} | undefined): Promise<{
|
|
405
|
+
page: number;
|
|
406
|
+
page_size: number;
|
|
407
|
+
items: {
|
|
408
|
+
status?: string | undefined;
|
|
409
|
+
name?: string | undefined;
|
|
410
|
+
listed?: boolean | undefined;
|
|
411
|
+
vcpu?: number | null | undefined;
|
|
412
|
+
hosted?: {
|
|
413
|
+
status: string;
|
|
414
|
+
name: string;
|
|
415
|
+
id: string;
|
|
416
|
+
uptime: string;
|
|
417
|
+
app_url: string | null;
|
|
418
|
+
app_id: string;
|
|
419
|
+
instance_id: string | null;
|
|
420
|
+
exited_at: string | null;
|
|
421
|
+
boot_progress: string | null;
|
|
422
|
+
boot_error: string | null;
|
|
423
|
+
shutdown_progress: string | null;
|
|
424
|
+
image_version: string | null;
|
|
425
|
+
configuration?: any;
|
|
426
|
+
} | undefined;
|
|
427
|
+
managed_user?: {
|
|
428
|
+
username: string;
|
|
429
|
+
id: number;
|
|
430
|
+
} | null | undefined;
|
|
431
|
+
node?: {
|
|
432
|
+
name: string;
|
|
433
|
+
id: number;
|
|
434
|
+
region_identifier?: string | undefined;
|
|
435
|
+
} | null | undefined;
|
|
436
|
+
in_progress?: boolean | undefined;
|
|
437
|
+
dapp_dashboard_url?: string | null | undefined;
|
|
438
|
+
syslog_endpoint?: string | null | undefined;
|
|
439
|
+
allow_upgrade?: boolean | undefined;
|
|
440
|
+
project_id?: string | null | undefined;
|
|
441
|
+
project_type?: string | null | undefined;
|
|
442
|
+
billing_period?: string | null | undefined;
|
|
443
|
+
kms_info?: z.objectOutputType<{
|
|
444
|
+
id: z.ZodString;
|
|
445
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
446
|
+
url: z.ZodString;
|
|
447
|
+
version: z.ZodString;
|
|
448
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
449
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
450
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
451
|
+
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
452
|
+
memory?: number | null | undefined;
|
|
453
|
+
disk_size?: number | null | undefined;
|
|
454
|
+
gateway_domain?: string | null | undefined;
|
|
455
|
+
public_urls?: {
|
|
456
|
+
app: string;
|
|
457
|
+
instance: string;
|
|
458
|
+
}[] | undefined;
|
|
459
|
+
}[];
|
|
460
|
+
total: number;
|
|
461
|
+
pages: number;
|
|
462
|
+
}>;
|
|
463
|
+
<T extends z.ZodTypeAny>(client: Client, params?: {
|
|
464
|
+
page?: number | undefined;
|
|
465
|
+
page_size?: number | undefined;
|
|
466
|
+
node_id?: number | undefined;
|
|
467
|
+
} | undefined, parameters?: {
|
|
468
|
+
schema: T;
|
|
469
|
+
} | undefined): Promise<z.TypeOf<T>>;
|
|
470
|
+
(client: Client, params?: {
|
|
471
|
+
page?: number | undefined;
|
|
472
|
+
page_size?: number | undefined;
|
|
473
|
+
node_id?: number | undefined;
|
|
474
|
+
} | undefined, parameters?: {
|
|
475
|
+
schema: false;
|
|
476
|
+
} | undefined): Promise<unknown>;
|
|
477
|
+
}, safeGetCvmList: {
|
|
478
|
+
(client: Client, params?: {
|
|
479
|
+
page?: number | undefined;
|
|
480
|
+
page_size?: number | undefined;
|
|
481
|
+
node_id?: number | undefined;
|
|
482
|
+
} | undefined): Promise<import("../..").SafeResult<{
|
|
483
|
+
page: number;
|
|
484
|
+
page_size: number;
|
|
485
|
+
items: {
|
|
486
|
+
status?: string | undefined;
|
|
487
|
+
name?: string | undefined;
|
|
488
|
+
listed?: boolean | undefined;
|
|
489
|
+
vcpu?: number | null | undefined;
|
|
490
|
+
hosted?: {
|
|
491
|
+
status: string;
|
|
492
|
+
name: string;
|
|
493
|
+
id: string;
|
|
494
|
+
uptime: string;
|
|
495
|
+
app_url: string | null;
|
|
496
|
+
app_id: string;
|
|
497
|
+
instance_id: string | null;
|
|
498
|
+
exited_at: string | null;
|
|
499
|
+
boot_progress: string | null;
|
|
500
|
+
boot_error: string | null;
|
|
501
|
+
shutdown_progress: string | null;
|
|
502
|
+
image_version: string | null;
|
|
503
|
+
configuration?: any;
|
|
504
|
+
} | undefined;
|
|
505
|
+
managed_user?: {
|
|
506
|
+
username: string;
|
|
507
|
+
id: number;
|
|
508
|
+
} | null | undefined;
|
|
509
|
+
node?: {
|
|
510
|
+
name: string;
|
|
511
|
+
id: number;
|
|
512
|
+
region_identifier?: string | undefined;
|
|
513
|
+
} | null | undefined;
|
|
514
|
+
in_progress?: boolean | undefined;
|
|
515
|
+
dapp_dashboard_url?: string | null | undefined;
|
|
516
|
+
syslog_endpoint?: string | null | undefined;
|
|
517
|
+
allow_upgrade?: boolean | undefined;
|
|
518
|
+
project_id?: string | null | undefined;
|
|
519
|
+
project_type?: string | null | undefined;
|
|
520
|
+
billing_period?: string | null | undefined;
|
|
521
|
+
kms_info?: z.objectOutputType<{
|
|
522
|
+
id: z.ZodString;
|
|
523
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
524
|
+
url: z.ZodString;
|
|
525
|
+
version: z.ZodString;
|
|
526
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
527
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
528
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
529
|
+
}, z.ZodTypeAny, "passthrough"> | null | undefined;
|
|
530
|
+
memory?: number | null | undefined;
|
|
531
|
+
disk_size?: number | null | undefined;
|
|
532
|
+
gateway_domain?: string | null | undefined;
|
|
533
|
+
public_urls?: {
|
|
534
|
+
app: string;
|
|
535
|
+
instance: string;
|
|
536
|
+
}[] | undefined;
|
|
537
|
+
}[];
|
|
538
|
+
total: number;
|
|
539
|
+
pages: number;
|
|
540
|
+
}>>;
|
|
541
|
+
<T extends z.ZodTypeAny>(client: Client, params?: {
|
|
542
|
+
page?: number | undefined;
|
|
543
|
+
page_size?: number | undefined;
|
|
544
|
+
node_id?: number | undefined;
|
|
545
|
+
} | undefined, parameters?: {
|
|
546
|
+
schema: T;
|
|
547
|
+
} | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
548
|
+
(client: Client, params?: {
|
|
549
|
+
page?: number | undefined;
|
|
550
|
+
page_size?: number | undefined;
|
|
551
|
+
node_id?: number | undefined;
|
|
552
|
+
} | undefined, parameters?: {
|
|
553
|
+
schema: false;
|
|
554
|
+
} | undefined): Promise<import("../..").SafeResult<unknown>>;
|
|
555
|
+
};
|
|
556
|
+
export { getCvmList, safeGetCvmList };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type Client
|
|
3
|
-
import { ActionParameters, ActionReturnType } from "../types/common";
|
|
2
|
+
import { type Client } from "../../client";
|
|
4
3
|
/**
|
|
5
4
|
* Provision a CVM (Confidential Virtual Machine)
|
|
6
5
|
*
|
|
@@ -56,13 +55,14 @@ import { ActionParameters, ActionReturnType } from "../types/common";
|
|
|
56
55
|
* }
|
|
57
56
|
* ```
|
|
58
57
|
*/
|
|
59
|
-
export declare const ProvisionCvmSchema: z.ZodObject<{
|
|
58
|
+
export declare const ProvisionCvmSchema: z.ZodEffects<z.ZodObject<{
|
|
60
59
|
app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
60
|
app_env_encrypt_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
61
|
compose_hash: z.ZodString;
|
|
63
62
|
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
63
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
64
|
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
66
66
|
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
67
67
|
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
68
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
@@ -72,6 +72,7 @@ export declare const ProvisionCvmSchema: z.ZodObject<{
|
|
|
72
72
|
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
73
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
74
|
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
75
76
|
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
76
77
|
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
78
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
@@ -81,6 +82,27 @@ export declare const ProvisionCvmSchema: z.ZodObject<{
|
|
|
81
82
|
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
82
83
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
83
84
|
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
85
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
86
|
+
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
87
|
+
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
}, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
|
|
89
|
+
app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
app_env_encrypt_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
compose_hash: z.ZodString;
|
|
92
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
96
|
+
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
97
|
+
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
99
|
+
app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
app_env_encrypt_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
compose_hash: z.ZodString;
|
|
102
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
104
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
84
106
|
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
85
107
|
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
86
108
|
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -107,9 +129,9 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
107
129
|
name?: string | undefined;
|
|
108
130
|
public_sysinfo?: boolean | undefined;
|
|
109
131
|
public_logs?: boolean | undefined;
|
|
110
|
-
docker_compose_file?: string | undefined;
|
|
111
|
-
pre_launch_script?: string | undefined;
|
|
112
132
|
allowed_envs?: string[] | undefined;
|
|
133
|
+
pre_launch_script?: string | undefined;
|
|
134
|
+
docker_compose_file?: string | undefined;
|
|
113
135
|
kms_enabled?: boolean | undefined;
|
|
114
136
|
gateway_enabled?: boolean | undefined;
|
|
115
137
|
tproxy_enabled?: boolean | undefined;
|
|
@@ -117,9 +139,9 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
117
139
|
name?: string | undefined;
|
|
118
140
|
public_sysinfo?: boolean | undefined;
|
|
119
141
|
public_logs?: boolean | undefined;
|
|
120
|
-
docker_compose_file?: string | undefined;
|
|
121
|
-
pre_launch_script?: string | undefined;
|
|
122
142
|
allowed_envs?: string[] | undefined;
|
|
143
|
+
pre_launch_script?: string | undefined;
|
|
144
|
+
docker_compose_file?: string | undefined;
|
|
123
145
|
kms_enabled?: boolean | undefined;
|
|
124
146
|
gateway_enabled?: boolean | undefined;
|
|
125
147
|
tproxy_enabled?: boolean | undefined;
|
|
@@ -150,9 +172,9 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
150
172
|
name?: string | undefined;
|
|
151
173
|
public_sysinfo?: boolean | undefined;
|
|
152
174
|
public_logs?: boolean | undefined;
|
|
153
|
-
docker_compose_file?: string | undefined;
|
|
154
|
-
pre_launch_script?: string | undefined;
|
|
155
175
|
allowed_envs?: string[] | undefined;
|
|
176
|
+
pre_launch_script?: string | undefined;
|
|
177
|
+
docker_compose_file?: string | undefined;
|
|
156
178
|
kms_enabled?: boolean | undefined;
|
|
157
179
|
gateway_enabled?: boolean | undefined;
|
|
158
180
|
tproxy_enabled?: boolean | undefined;
|
|
@@ -160,9 +182,9 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
160
182
|
name?: string | undefined;
|
|
161
183
|
public_sysinfo?: boolean | undefined;
|
|
162
184
|
public_logs?: boolean | undefined;
|
|
163
|
-
docker_compose_file?: string | undefined;
|
|
164
|
-
pre_launch_script?: string | undefined;
|
|
165
185
|
allowed_envs?: string[] | undefined;
|
|
186
|
+
pre_launch_script?: string | undefined;
|
|
187
|
+
docker_compose_file?: string | undefined;
|
|
166
188
|
kms_enabled?: boolean | undefined;
|
|
167
189
|
gateway_enabled?: boolean | undefined;
|
|
168
190
|
tproxy_enabled?: boolean | undefined;
|
|
@@ -193,9 +215,9 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
193
215
|
name?: string | undefined;
|
|
194
216
|
public_sysinfo?: boolean | undefined;
|
|
195
217
|
public_logs?: boolean | undefined;
|
|
196
|
-
docker_compose_file?: string | undefined;
|
|
197
|
-
pre_launch_script?: string | undefined;
|
|
198
218
|
allowed_envs?: string[] | undefined;
|
|
219
|
+
pre_launch_script?: string | undefined;
|
|
220
|
+
docker_compose_file?: string | undefined;
|
|
199
221
|
kms_enabled?: boolean | undefined;
|
|
200
222
|
gateway_enabled?: boolean | undefined;
|
|
201
223
|
tproxy_enabled?: boolean | undefined;
|
|
@@ -203,9 +225,9 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
203
225
|
name?: string | undefined;
|
|
204
226
|
public_sysinfo?: boolean | undefined;
|
|
205
227
|
public_logs?: boolean | undefined;
|
|
206
|
-
docker_compose_file?: string | undefined;
|
|
207
|
-
pre_launch_script?: string | undefined;
|
|
208
228
|
allowed_envs?: string[] | undefined;
|
|
229
|
+
pre_launch_script?: string | undefined;
|
|
230
|
+
docker_compose_file?: string | undefined;
|
|
209
231
|
kms_enabled?: boolean | undefined;
|
|
210
232
|
gateway_enabled?: boolean | undefined;
|
|
211
233
|
tproxy_enabled?: boolean | undefined;
|
|
@@ -224,8 +246,41 @@ export type ProvisionCvmRequest = z.infer<typeof ProvisionCvmRequestSchema> & {
|
|
|
224
246
|
[key: string]: unknown;
|
|
225
247
|
};
|
|
226
248
|
};
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
249
|
+
declare const provisionCvm: {
|
|
250
|
+
(client: Client, params: ProvisionCvmRequest): Promise<z.objectOutputType<{
|
|
251
|
+
app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
252
|
+
app_env_encrypt_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
253
|
+
compose_hash: z.ZodString;
|
|
254
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
255
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
256
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
257
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
258
|
+
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
259
|
+
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
260
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
261
|
+
<T extends z.ZodTypeAny>(client: Client, params: ProvisionCvmRequest, parameters: {
|
|
262
|
+
schema: T;
|
|
263
|
+
}): Promise<z.TypeOf<T>>;
|
|
264
|
+
(client: Client, params: ProvisionCvmRequest, parameters: {
|
|
265
|
+
schema: false;
|
|
266
|
+
}): Promise<unknown>;
|
|
267
|
+
}, safeProvisionCvm: {
|
|
268
|
+
(client: Client, params: ProvisionCvmRequest): Promise<import("../..").SafeResult<z.objectOutputType<{
|
|
269
|
+
app_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
270
|
+
app_env_encrypt_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
|
+
compose_hash: z.ZodString;
|
|
272
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
274
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
275
|
+
teepod_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
276
|
+
node_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
277
|
+
kms_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
279
|
+
<T extends z.ZodTypeAny>(client: Client, params: ProvisionCvmRequest, parameters: {
|
|
280
|
+
schema: T;
|
|
281
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
282
|
+
(client: Client, params: ProvisionCvmRequest, parameters: {
|
|
283
|
+
schema: false;
|
|
284
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
285
|
+
};
|
|
286
|
+
export { provisionCvm, safeProvisionCvm };
|