@phala/cloud 0.2.1-beta.3 → 0.2.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.
Files changed (69) hide show
  1. package/LICENSE +201 -0
  2. package/dist/actions/apps/get_app_cvms.d.ts +30 -0
  3. package/dist/actions/apps/get_app_info.d.ts +30 -0
  4. package/dist/actions/apps/get_app_list.d.ts +74 -0
  5. package/dist/actions/apps/get_app_revision_detail.d.ts +48 -0
  6. package/dist/actions/apps/get_app_revisions.d.ts +42 -0
  7. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +7 -7
  8. package/dist/actions/cvms/commit_cvm_provision.d.ts +31 -31
  9. package/dist/actions/cvms/delete_cvm.d.ts +10 -7
  10. package/dist/actions/cvms/get_available_os_images.d.ts +10 -7
  11. package/dist/actions/cvms/get_cvm_attestation.d.ts +10 -7
  12. package/dist/actions/cvms/get_cvm_compose_file.d.ts +18 -15
  13. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +14 -11
  14. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +10 -7
  15. package/dist/actions/cvms/get_cvm_info.d.ts +19 -35
  16. package/dist/actions/cvms/get_cvm_list.d.ts +11 -537
  17. package/dist/actions/cvms/get_cvm_network.d.ts +10 -7
  18. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +42 -0
  19. package/dist/actions/cvms/get_cvm_state.d.ts +10 -7
  20. package/dist/actions/cvms/get_cvm_stats.d.ts +10 -7
  21. package/dist/actions/cvms/get_cvm_status_batch.d.ts +167 -0
  22. package/dist/actions/cvms/provision_cvm.d.ts +404 -21
  23. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +32 -32
  24. package/dist/actions/cvms/restart_cvm.d.ts +17 -14
  25. package/dist/actions/cvms/shutdown_cvm.d.ts +18 -15
  26. package/dist/actions/cvms/start_cvm.d.ts +18 -15
  27. package/dist/actions/cvms/stop_cvm.d.ts +18 -15
  28. package/dist/actions/cvms/update_cvm_envs.d.ts +426 -0
  29. package/dist/actions/cvms/update_cvm_resources.d.ts +13 -10
  30. package/dist/actions/cvms/update_cvm_visibility.d.ts +33 -14
  31. package/dist/actions/cvms/update_docker_compose.d.ts +420 -0
  32. package/dist/actions/cvms/update_os_image.d.ts +9 -6
  33. package/dist/actions/cvms/update_prelaunch_script.d.ts +417 -0
  34. package/dist/actions/cvms/watch_cvm_state.d.ts +1 -1
  35. package/dist/actions/get_available_nodes.d.ts +6 -6
  36. package/dist/actions/get_current_user.d.ts +36 -89
  37. package/dist/actions/index.d.ts +14 -2
  38. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +6 -6
  39. package/dist/actions/kms/get_kms_info.d.ts +6 -6
  40. package/dist/actions/kms/get_kms_list.d.ts +6 -6
  41. package/dist/actions/kms/next_app_ids.d.ts +6 -6
  42. package/dist/actions/list-instance-types.d.ts +16 -16
  43. package/dist/actions/workspaces/get_workspace.d.ts +6 -6
  44. package/dist/actions/workspaces/get_workspace_nodes.d.ts +266 -0
  45. package/dist/actions/workspaces/get_workspace_quotas.d.ts +1169 -0
  46. package/dist/actions/workspaces/list_workspaces.d.ts +6 -6
  47. package/dist/client.d.ts +49 -9
  48. package/dist/create-client.d.ts +87 -36
  49. package/dist/credentials/current_user_v20251028.d.ts +30 -0
  50. package/dist/credentials/current_user_v20260121.d.ts +276 -0
  51. package/dist/credentials/index.d.ts +4 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +1782 -633
  54. package/dist/index.mjs +1693 -626
  55. package/dist/types/app_info_v20251028.d.ts +1266 -0
  56. package/dist/types/app_info_v20260121.d.ts +3293 -0
  57. package/dist/types/app_revision.d.ts +453 -0
  58. package/dist/types/client.d.ts +40 -2
  59. package/dist/types/cvm_id.d.ts +45 -10
  60. package/dist/types/cvm_info.d.ts +16 -502
  61. package/dist/types/cvm_info_v20251028.d.ts +988 -0
  62. package/dist/types/cvm_info_v20260121.d.ts +1264 -0
  63. package/dist/types/index.d.ts +6 -0
  64. package/dist/types/version-mappings.d.ts +38 -0
  65. package/dist/utils/define-action.d.ts +15 -14
  66. package/dist/utils/errors.d.ts +2 -2
  67. package/dist/utils/hostname.d.ts +77 -0
  68. package/dist/utils/index.d.ts +1 -0
  69. package/package.json +2 -2
@@ -1,5 +1,7 @@
1
1
  import { z } from "zod";
2
- import { type Client } from "../../client";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { ApiVersion } from "../../types/client";
4
+ import type { GetCvmListResponse } from "../../types/version-mappings";
3
5
  export declare const GetCvmListRequestSchema: z.ZodObject<{
4
6
  page: z.ZodOptional<z.ZodNumber>;
5
7
  page_size: z.ZodOptional<z.ZodNumber>;
@@ -8,378 +10,18 @@ export declare const GetCvmListRequestSchema: z.ZodObject<{
8
10
  user_id: z.ZodOptional<z.ZodString>;
9
11
  }, "strict", z.ZodTypeAny, {
10
12
  teepod_id?: number | undefined;
11
- user_id?: string | undefined;
12
13
  page?: number | undefined;
13
14
  page_size?: number | undefined;
14
15
  node_id?: number | undefined;
16
+ user_id?: string | undefined;
15
17
  }, {
16
18
  teepod_id?: number | undefined;
17
- user_id?: string | undefined;
18
19
  page?: number | undefined;
19
20
  page_size?: number | undefined;
20
21
  node_id?: number | undefined;
21
- }>;
22
- export declare const GetCvmListSchema: z.ZodObject<{
23
- items: z.ZodArray<z.ZodObject<{
24
- hosted: z.ZodObject<{
25
- id: z.ZodString;
26
- name: z.ZodString;
27
- status: z.ZodString;
28
- uptime: z.ZodString;
29
- app_url: z.ZodNullable<z.ZodString>;
30
- app_id: z.ZodString;
31
- instance_id: z.ZodNullable<z.ZodString>;
32
- configuration: z.ZodOptional<z.ZodAny>;
33
- exited_at: z.ZodNullable<z.ZodString>;
34
- boot_progress: z.ZodNullable<z.ZodString>;
35
- boot_error: z.ZodNullable<z.ZodString>;
36
- shutdown_progress: z.ZodNullable<z.ZodString>;
37
- image_version: z.ZodNullable<z.ZodString>;
38
- }, "strip", z.ZodTypeAny, {
39
- status: string;
40
- name: string;
41
- id: string;
42
- uptime: string;
43
- app_url: string | null;
44
- app_id: string;
45
- instance_id: string | null;
46
- exited_at: string | null;
47
- boot_progress: string | null;
48
- boot_error: string | null;
49
- shutdown_progress: string | null;
50
- image_version: string | null;
51
- configuration?: any;
52
- }, {
53
- status: string;
54
- name: string;
55
- id: string;
56
- uptime: string;
57
- app_url: string | null;
58
- app_id: string;
59
- instance_id: string | null;
60
- exited_at: string | null;
61
- boot_progress: string | null;
62
- boot_error: string | null;
63
- shutdown_progress: string | null;
64
- image_version: string | null;
65
- configuration?: any;
66
- }>;
67
- name: z.ZodString;
68
- managed_user: z.ZodNullable<z.ZodObject<{
69
- id: z.ZodNumber;
70
- username: z.ZodString;
71
- }, "strip", z.ZodTypeAny, {
72
- username: string;
73
- id: number;
74
- }, {
75
- username: string;
76
- id: number;
77
- }>>;
78
- node: z.ZodNullable<z.ZodObject<{
79
- id: z.ZodNumber;
80
- name: z.ZodString;
81
- region_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
- }, "strip", z.ZodTypeAny, {
83
- name: string;
84
- id: number;
85
- region_identifier?: string | null | undefined;
86
- }, {
87
- name: string;
88
- id: number;
89
- region_identifier?: string | null | undefined;
90
- }>>;
91
- listed: z.ZodDefault<z.ZodBoolean>;
92
- status: z.ZodString;
93
- in_progress: z.ZodDefault<z.ZodBoolean>;
94
- dapp_dashboard_url: z.ZodNullable<z.ZodString>;
95
- syslog_endpoint: z.ZodNullable<z.ZodString>;
96
- allow_upgrade: z.ZodDefault<z.ZodBoolean>;
97
- project_id: z.ZodNullable<z.ZodString>;
98
- project_type: z.ZodNullable<z.ZodString>;
99
- billing_period: z.ZodNullable<z.ZodString>;
100
- kms_info: z.ZodNullable<z.ZodEffects<z.ZodObject<{
101
- id: z.ZodString;
102
- slug: z.ZodNullable<z.ZodString>;
103
- url: z.ZodString;
104
- version: z.ZodString;
105
- chain_id: z.ZodNullable<z.ZodNumber>;
106
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
107
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
108
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
109
- id: z.ZodString;
110
- slug: z.ZodNullable<z.ZodString>;
111
- url: z.ZodString;
112
- version: z.ZodString;
113
- chain_id: z.ZodNullable<z.ZodNumber>;
114
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
115
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
116
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
117
- id: z.ZodString;
118
- slug: z.ZodNullable<z.ZodString>;
119
- url: z.ZodString;
120
- version: z.ZodString;
121
- chain_id: z.ZodNullable<z.ZodNumber>;
122
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
123
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
124
- }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
125
- id: z.ZodString;
126
- slug: z.ZodNullable<z.ZodString>;
127
- url: z.ZodString;
128
- version: z.ZodString;
129
- chain_id: z.ZodNullable<z.ZodNumber>;
130
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
131
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
132
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
133
- id: z.ZodString;
134
- slug: z.ZodNullable<z.ZodString>;
135
- url: z.ZodString;
136
- version: z.ZodString;
137
- chain_id: z.ZodNullable<z.ZodNumber>;
138
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
139
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
140
- }, z.ZodTypeAny, "passthrough">>>;
141
- vcpu: z.ZodNullable<z.ZodNumber>;
142
- memory: z.ZodNullable<z.ZodNumber>;
143
- disk_size: z.ZodNullable<z.ZodNumber>;
144
- gateway_domain: z.ZodNullable<z.ZodString>;
145
- public_urls: z.ZodArray<z.ZodObject<{
146
- app: z.ZodString;
147
- instance: z.ZodString;
148
- }, "strip", z.ZodTypeAny, {
149
- app: string;
150
- instance: string;
151
- }, {
152
- app: string;
153
- instance: string;
154
- }>, "many">;
155
- }, "strip", z.ZodTypeAny, {
156
- status: string;
157
- name: string;
158
- listed: boolean;
159
- vcpu: number | null;
160
- hosted: {
161
- status: string;
162
- name: string;
163
- id: string;
164
- uptime: string;
165
- app_url: string | null;
166
- app_id: string;
167
- instance_id: string | null;
168
- exited_at: string | null;
169
- boot_progress: string | null;
170
- boot_error: string | null;
171
- shutdown_progress: string | null;
172
- image_version: string | null;
173
- configuration?: any;
174
- };
175
- managed_user: {
176
- username: string;
177
- id: number;
178
- } | null;
179
- node: {
180
- name: string;
181
- id: number;
182
- region_identifier?: string | null | undefined;
183
- } | null;
184
- in_progress: boolean;
185
- dapp_dashboard_url: string | null;
186
- syslog_endpoint: string | null;
187
- allow_upgrade: boolean;
188
- project_id: string | null;
189
- project_type: string | null;
190
- billing_period: string | null;
191
- kms_info: z.objectOutputType<{
192
- id: z.ZodString;
193
- slug: z.ZodNullable<z.ZodString>;
194
- url: z.ZodString;
195
- version: z.ZodString;
196
- chain_id: z.ZodNullable<z.ZodNumber>;
197
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
198
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
199
- }, z.ZodTypeAny, "passthrough"> | null;
200
- memory: number | null;
201
- disk_size: number | null;
202
- gateway_domain: string | null;
203
- public_urls: {
204
- app: string;
205
- instance: string;
206
- }[];
207
- }, {
208
- status: string;
209
- name: string;
210
- vcpu: number | null;
211
- hosted: {
212
- status: string;
213
- name: string;
214
- id: string;
215
- uptime: string;
216
- app_url: string | null;
217
- app_id: string;
218
- instance_id: string | null;
219
- exited_at: string | null;
220
- boot_progress: string | null;
221
- boot_error: string | null;
222
- shutdown_progress: string | null;
223
- image_version: string | null;
224
- configuration?: any;
225
- };
226
- managed_user: {
227
- username: string;
228
- id: number;
229
- } | null;
230
- node: {
231
- name: string;
232
- id: number;
233
- region_identifier?: string | null | undefined;
234
- } | null;
235
- dapp_dashboard_url: string | null;
236
- syslog_endpoint: string | null;
237
- project_id: string | null;
238
- project_type: string | null;
239
- billing_period: string | null;
240
- kms_info: z.objectInputType<{
241
- id: z.ZodString;
242
- slug: z.ZodNullable<z.ZodString>;
243
- url: z.ZodString;
244
- version: z.ZodString;
245
- chain_id: z.ZodNullable<z.ZodNumber>;
246
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
247
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
248
- }, z.ZodTypeAny, "passthrough"> | null;
249
- memory: number | null;
250
- disk_size: number | null;
251
- gateway_domain: string | null;
252
- public_urls: {
253
- app: string;
254
- instance: string;
255
- }[];
256
- listed?: boolean | undefined;
257
- in_progress?: boolean | undefined;
258
- allow_upgrade?: boolean | undefined;
259
- }>, "many">;
260
- total: z.ZodNumber;
261
- page: z.ZodNumber;
262
- page_size: z.ZodNumber;
263
- pages: z.ZodNumber;
264
- }, "strict", z.ZodTypeAny, {
265
- items: {
266
- status: string;
267
- name: string;
268
- listed: boolean;
269
- vcpu: number | null;
270
- hosted: {
271
- status: string;
272
- name: string;
273
- id: string;
274
- uptime: string;
275
- app_url: string | null;
276
- app_id: string;
277
- instance_id: string | null;
278
- exited_at: string | null;
279
- boot_progress: string | null;
280
- boot_error: string | null;
281
- shutdown_progress: string | null;
282
- image_version: string | null;
283
- configuration?: any;
284
- };
285
- managed_user: {
286
- username: string;
287
- id: number;
288
- } | null;
289
- node: {
290
- name: string;
291
- id: number;
292
- region_identifier?: string | null | undefined;
293
- } | null;
294
- in_progress: boolean;
295
- dapp_dashboard_url: string | null;
296
- syslog_endpoint: string | null;
297
- allow_upgrade: boolean;
298
- project_id: string | null;
299
- project_type: string | null;
300
- billing_period: string | null;
301
- kms_info: z.objectOutputType<{
302
- id: z.ZodString;
303
- slug: z.ZodNullable<z.ZodString>;
304
- url: z.ZodString;
305
- version: z.ZodString;
306
- chain_id: z.ZodNullable<z.ZodNumber>;
307
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
308
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
309
- }, z.ZodTypeAny, "passthrough"> | null;
310
- memory: number | null;
311
- disk_size: number | null;
312
- gateway_domain: string | null;
313
- public_urls: {
314
- app: string;
315
- instance: string;
316
- }[];
317
- }[];
318
- total: number;
319
- page: number;
320
- page_size: number;
321
- pages: number;
322
- }, {
323
- items: {
324
- status: string;
325
- name: string;
326
- vcpu: number | null;
327
- hosted: {
328
- status: string;
329
- name: string;
330
- id: string;
331
- uptime: string;
332
- app_url: string | null;
333
- app_id: string;
334
- instance_id: string | null;
335
- exited_at: string | null;
336
- boot_progress: string | null;
337
- boot_error: string | null;
338
- shutdown_progress: string | null;
339
- image_version: string | null;
340
- configuration?: any;
341
- };
342
- managed_user: {
343
- username: string;
344
- id: number;
345
- } | null;
346
- node: {
347
- name: string;
348
- id: number;
349
- region_identifier?: string | null | undefined;
350
- } | null;
351
- dapp_dashboard_url: string | null;
352
- syslog_endpoint: string | null;
353
- project_id: string | null;
354
- project_type: string | null;
355
- billing_period: string | null;
356
- kms_info: z.objectInputType<{
357
- id: z.ZodString;
358
- slug: z.ZodNullable<z.ZodString>;
359
- url: z.ZodString;
360
- version: z.ZodString;
361
- chain_id: z.ZodNullable<z.ZodNumber>;
362
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
363
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
364
- }, z.ZodTypeAny, "passthrough"> | null;
365
- memory: number | null;
366
- disk_size: number | null;
367
- gateway_domain: string | null;
368
- public_urls: {
369
- app: string;
370
- instance: string;
371
- }[];
372
- listed?: boolean | undefined;
373
- in_progress?: boolean | undefined;
374
- allow_upgrade?: boolean | undefined;
375
- }[];
376
- total: number;
377
- page: number;
378
- page_size: number;
379
- pages: number;
22
+ user_id?: string | undefined;
380
23
  }>;
381
24
  export type GetCvmListRequest = z.infer<typeof GetCvmListRequestSchema>;
382
- export type GetCvmListResponse = z.infer<typeof GetCvmListSchema>;
383
25
  /**
384
26
  * Get a paginated list of CVMs
385
27
  *
@@ -388,7 +30,7 @@ export type GetCvmListResponse = z.infer<typeof GetCvmListSchema>;
388
30
  * @param request.page - Page number (1-based)
389
31
  * @param request.page_size - Number of items per page
390
32
  * @param request.node_id - Filter by node ID
391
- * @returns Paginated list of CVMs
33
+ * @returns Paginated list of CVMs with type based on client API version
392
34
  *
393
35
  * @example
394
36
  * ```typescript
@@ -397,178 +39,10 @@ export type GetCvmListResponse = z.infer<typeof GetCvmListSchema>;
397
39
  *
398
40
  * // Get with custom page size
399
41
  * const list = await getCvmList(client, { page: 1, page_size: 20 })
400
- *
401
- * // Get with custom schema
402
- * const list = await getCvmList(client, { page: 1 }, { schema: customSchema })
403
42
  * ```
404
43
  */
405
- declare const getCvmList: {
406
- (client: Client, params?: {
407
- teepod_id?: number | undefined;
408
- user_id?: string | undefined;
409
- page?: number | undefined;
410
- page_size?: number | undefined;
411
- node_id?: number | undefined;
412
- } | undefined): Promise<{
413
- items: {
414
- status: string;
415
- name: string;
416
- listed: boolean;
417
- vcpu: number | null;
418
- hosted: {
419
- status: string;
420
- name: string;
421
- id: string;
422
- uptime: string;
423
- app_url: string | null;
424
- app_id: string;
425
- instance_id: string | null;
426
- exited_at: string | null;
427
- boot_progress: string | null;
428
- boot_error: string | null;
429
- shutdown_progress: string | null;
430
- image_version: string | null;
431
- configuration?: any;
432
- };
433
- managed_user: {
434
- username: string;
435
- id: number;
436
- } | null;
437
- node: {
438
- name: string;
439
- id: number;
440
- region_identifier?: string | null | undefined;
441
- } | null;
442
- in_progress: boolean;
443
- dapp_dashboard_url: string | null;
444
- syslog_endpoint: string | null;
445
- allow_upgrade: boolean;
446
- project_id: string | null;
447
- project_type: string | null;
448
- billing_period: string | null;
449
- kms_info: z.objectOutputType<{
450
- id: z.ZodString;
451
- slug: z.ZodNullable<z.ZodString>;
452
- url: z.ZodString;
453
- version: z.ZodString;
454
- chain_id: z.ZodNullable<z.ZodNumber>;
455
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
456
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
457
- }, z.ZodTypeAny, "passthrough"> | null;
458
- memory: number | null;
459
- disk_size: number | null;
460
- gateway_domain: string | null;
461
- public_urls: {
462
- app: string;
463
- instance: string;
464
- }[];
465
- }[];
466
- total: number;
467
- page: number;
468
- page_size: number;
469
- pages: number;
470
- }>;
471
- <T extends z.ZodTypeAny>(client: Client, params?: {
472
- teepod_id?: number | undefined;
473
- user_id?: string | undefined;
474
- page?: number | undefined;
475
- page_size?: number | undefined;
476
- node_id?: number | undefined;
477
- } | undefined, parameters?: {
478
- schema: T;
479
- } | undefined): Promise<z.TypeOf<T>>;
480
- (client: Client, params?: {
481
- teepod_id?: number | undefined;
482
- user_id?: string | undefined;
483
- page?: number | undefined;
484
- page_size?: number | undefined;
485
- node_id?: number | undefined;
486
- } | undefined, parameters?: {
487
- schema: false;
488
- } | undefined): Promise<unknown>;
489
- }, safeGetCvmList: {
490
- (client: Client, params?: {
491
- teepod_id?: number | undefined;
492
- user_id?: string | undefined;
493
- page?: number | undefined;
494
- page_size?: number | undefined;
495
- node_id?: number | undefined;
496
- } | undefined): Promise<import("../..").SafeResult<{
497
- items: {
498
- status: string;
499
- name: string;
500
- listed: boolean;
501
- vcpu: number | null;
502
- hosted: {
503
- status: string;
504
- name: string;
505
- id: string;
506
- uptime: string;
507
- app_url: string | null;
508
- app_id: string;
509
- instance_id: string | null;
510
- exited_at: string | null;
511
- boot_progress: string | null;
512
- boot_error: string | null;
513
- shutdown_progress: string | null;
514
- image_version: string | null;
515
- configuration?: any;
516
- };
517
- managed_user: {
518
- username: string;
519
- id: number;
520
- } | null;
521
- node: {
522
- name: string;
523
- id: number;
524
- region_identifier?: string | null | undefined;
525
- } | null;
526
- in_progress: boolean;
527
- dapp_dashboard_url: string | null;
528
- syslog_endpoint: string | null;
529
- allow_upgrade: boolean;
530
- project_id: string | null;
531
- project_type: string | null;
532
- billing_period: string | null;
533
- kms_info: z.objectOutputType<{
534
- id: z.ZodString;
535
- slug: z.ZodNullable<z.ZodString>;
536
- url: z.ZodString;
537
- version: z.ZodString;
538
- chain_id: z.ZodNullable<z.ZodNumber>;
539
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
540
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
541
- }, z.ZodTypeAny, "passthrough"> | null;
542
- memory: number | null;
543
- disk_size: number | null;
544
- gateway_domain: string | null;
545
- public_urls: {
546
- app: string;
547
- instance: string;
548
- }[];
549
- }[];
550
- total: number;
551
- page: number;
552
- page_size: number;
553
- pages: number;
554
- }>>;
555
- <T extends z.ZodTypeAny>(client: Client, params?: {
556
- teepod_id?: number | undefined;
557
- user_id?: string | undefined;
558
- page?: number | undefined;
559
- page_size?: number | undefined;
560
- node_id?: number | undefined;
561
- } | undefined, parameters?: {
562
- schema: T;
563
- } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
564
- (client: Client, params?: {
565
- teepod_id?: number | undefined;
566
- user_id?: string | undefined;
567
- page?: number | undefined;
568
- page_size?: number | undefined;
569
- node_id?: number | undefined;
570
- } | undefined, parameters?: {
571
- schema: false;
572
- } | undefined): Promise<import("../..").SafeResult<unknown>>;
573
- };
574
- export { getCvmList, safeGetCvmList };
44
+ export declare function getCvmList<V extends ApiVersion>(client: Client<V>, request?: GetCvmListRequest): Promise<GetCvmListResponse<V>>;
45
+ /**
46
+ * Safe version of getCvmList that returns a SafeResult instead of throwing
47
+ */
48
+ export declare function safeGetCvmList<V extends ApiVersion>(client: Client<V>, request?: GetCvmListRequest): Promise<SafeResult<GetCvmListResponse<V>>>;
@@ -43,22 +43,25 @@ export declare const GetCvmNetworkRequestSchema: z.ZodEffects<z.ZodEffects<z.Zod
43
43
  uuid: z.ZodOptional<z.ZodString>;
44
44
  app_id: z.ZodOptional<z.ZodString>;
45
45
  instance_id: z.ZodOptional<z.ZodString>;
46
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
46
47
  }, "strip", z.ZodTypeAny, {
48
+ name?: string | undefined;
47
49
  id?: string | undefined;
48
50
  app_id?: string | undefined;
49
51
  instance_id?: string | undefined;
50
52
  uuid?: string | undefined;
51
53
  }, {
54
+ name?: string | undefined;
52
55
  id?: string | undefined;
53
56
  app_id?: string | undefined;
54
57
  instance_id?: string | undefined;
55
58
  uuid?: string | undefined;
56
59
  }>, any, any>, {
57
- cvmId: string;
60
+ cvmId: any;
58
61
  }, any>;
59
62
  export type GetCvmNetworkRequest = CvmIdInput;
60
63
  declare const getCvmNetwork: {
61
- (client: import("../..").BaseClient, params: CvmIdInput): Promise<{
64
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<{
62
65
  error: string | null;
63
66
  public_urls: {
64
67
  app: string;
@@ -69,14 +72,14 @@ declare const getCvmNetwork: {
69
72
  internal_ip: string | null;
70
73
  latest_handshake: string | null;
71
74
  }>;
72
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
75
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
73
76
  schema: T;
74
77
  }): Promise<z.TypeOf<T>>;
75
- (client: import("../..").BaseClient, params: CvmIdInput, parameters: {
78
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
76
79
  schema: false;
77
80
  }): Promise<unknown>;
78
81
  }, safeGetCvmNetwork: {
79
- (client: import("../..").BaseClient, params: CvmIdInput): Promise<import("../..").SafeResult<{
82
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<{
80
83
  error: string | null;
81
84
  public_urls: {
82
85
  app: string;
@@ -87,10 +90,10 @@ declare const getCvmNetwork: {
87
90
  internal_ip: string | null;
88
91
  latest_handshake: string | null;
89
92
  }>>;
90
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
93
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
91
94
  schema: T;
92
95
  }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
93
- (client: import("../..").BaseClient, params: CvmIdInput, parameters: {
96
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
94
97
  schema: false;
95
98
  }): Promise<import("../..").SafeResult<unknown>>;
96
99
  };
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { type CvmIdInput } from "../../types/cvm_id";
3
+ export declare const GetCvmPreLaunchScriptRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
4
+ id: z.ZodOptional<z.ZodString>;
5
+ uuid: z.ZodOptional<z.ZodString>;
6
+ app_id: z.ZodOptional<z.ZodString>;
7
+ instance_id: z.ZodOptional<z.ZodString>;
8
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ name?: string | undefined;
11
+ id?: string | undefined;
12
+ app_id?: string | undefined;
13
+ instance_id?: string | undefined;
14
+ uuid?: string | undefined;
15
+ }, {
16
+ name?: string | undefined;
17
+ id?: string | undefined;
18
+ app_id?: string | undefined;
19
+ instance_id?: string | undefined;
20
+ uuid?: string | undefined;
21
+ }>, any, any>, {
22
+ cvmId: any;
23
+ }, any>;
24
+ export type GetCvmPreLaunchScriptRequest = CvmIdInput;
25
+ declare const getCvmPreLaunchScript: {
26
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<string>;
27
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
28
+ schema: T;
29
+ }): Promise<z.TypeOf<T>>;
30
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
31
+ schema: false;
32
+ }): Promise<unknown>;
33
+ }, safeGetCvmPreLaunchScript: {
34
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput): Promise<import("../..").SafeResult<string>>;
35
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
36
+ schema: T;
37
+ }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
38
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: CvmIdInput, parameters: {
39
+ schema: false;
40
+ }): Promise<import("../..").SafeResult<unknown>>;
41
+ };
42
+ export { getCvmPreLaunchScript, safeGetCvmPreLaunchScript };