@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.
Files changed (38) hide show
  1. package/dist/actions/apps/get_app_attestation.d.ts +963 -0
  2. package/dist/actions/apps/get_app_device_allowlist.d.ts +108 -0
  3. package/dist/actions/blockchains/abi/dstack_app.d.ts +101 -0
  4. package/dist/actions/blockchains/add_device.d.ts +62 -0
  5. package/dist/actions/blockchains/check_device_allowed.d.ts +44 -0
  6. package/dist/actions/blockchains/get_allowed_devices.d.ts +65 -0
  7. package/dist/actions/blockchains/remove_device.d.ts +62 -0
  8. package/dist/actions/blockchains/set_allow_any_device.d.ts +62 -0
  9. package/dist/actions/cvms/get_cvm_attestation.d.ts +220 -0
  10. package/dist/actions/cvms/get_cvm_compose_file.d.ts +16 -0
  11. package/dist/actions/cvms/get_cvm_user_config.d.ts +92 -0
  12. package/dist/actions/cvms/provision_cvm.d.ts +26 -1
  13. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +18 -0
  14. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +93 -0
  15. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +194 -0
  16. package/dist/actions/cvms/replicate_cvm.d.ts +126 -0
  17. package/dist/actions/cvms/restart_cvm.d.ts +2 -2
  18. package/dist/actions/cvms/shutdown_cvm.d.ts +2 -2
  19. package/dist/actions/cvms/start_cvm.d.ts +2 -2
  20. package/dist/actions/cvms/stop_cvm.d.ts +2 -2
  21. package/dist/actions/index.d.ts +20 -1
  22. package/dist/actions/kms/get_kms_onchain_detail.d.ts +688 -0
  23. package/dist/actions/os_images/get_os_images.d.ts +217 -0
  24. package/dist/actions/ssh_keys/create_ssh_key.d.ts +104 -0
  25. package/dist/actions/ssh_keys/delete_ssh_key.d.ts +65 -0
  26. package/dist/actions/ssh_keys/import_github_profile.d.ts +93 -0
  27. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +101 -0
  28. package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +78 -0
  29. package/dist/actions/workspaces/get_workspace.d.ts +2 -0
  30. package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
  31. package/dist/create-client.d.ts +106 -0
  32. package/dist/index.js +1500 -322
  33. package/dist/index.mjs +1441 -320
  34. package/dist/types/app_compose.d.ts +5 -0
  35. package/dist/types/app_info_v20260121.d.ts +68 -0
  36. package/dist/types/cvm_info.d.ts +3 -3
  37. package/dist/types/cvm_info_v20260121.d.ts +22 -0
  38. package/package.json +1 -1
@@ -92,6 +92,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
92
92
  public_logs: z.ZodOptional<z.ZodBoolean>;
93
93
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
94
94
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
95
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
95
96
  pre_launch_script: z.ZodOptional<z.ZodString>;
96
97
  env_pubkey: z.ZodOptional<z.ZodString>;
97
98
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -105,6 +106,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
105
106
  public_logs: z.ZodOptional<z.ZodBoolean>;
106
107
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
107
108
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
109
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
108
110
  pre_launch_script: z.ZodOptional<z.ZodString>;
109
111
  env_pubkey: z.ZodOptional<z.ZodString>;
110
112
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -118,6 +120,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
118
120
  public_logs: z.ZodOptional<z.ZodBoolean>;
119
121
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
120
122
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
123
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
121
124
  pre_launch_script: z.ZodOptional<z.ZodString>;
122
125
  env_pubkey: z.ZodOptional<z.ZodString>;
123
126
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -131,6 +134,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
131
134
  public_logs: z.ZodOptional<z.ZodBoolean>;
132
135
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
133
136
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
137
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
134
138
  pre_launch_script: z.ZodOptional<z.ZodString>;
135
139
  env_pubkey: z.ZodOptional<z.ZodString>;
136
140
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -144,6 +148,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
144
148
  public_logs: z.ZodOptional<z.ZodBoolean>;
145
149
  public_sysinfo: z.ZodOptional<z.ZodBoolean>;
146
150
  tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
151
+ storage_fs: z.ZodOptional<z.ZodEnum<["ext4", "zfs"]>>;
147
152
  pre_launch_script: z.ZodOptional<z.ZodString>;
148
153
  env_pubkey: z.ZodOptional<z.ZodString>;
149
154
  salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
@@ -155,6 +160,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
155
160
  name?: string | undefined;
156
161
  public_sysinfo?: boolean | undefined;
157
162
  public_logs?: boolean | undefined;
163
+ storage_fs?: "ext4" | "zfs" | undefined;
158
164
  allowed_envs?: string[] | undefined;
159
165
  features?: string[] | undefined;
160
166
  manifest_version?: number | undefined;
@@ -177,6 +183,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
177
183
  name?: string | undefined;
178
184
  public_sysinfo?: boolean | undefined;
179
185
  public_logs?: boolean | undefined;
186
+ storage_fs?: "ext4" | "zfs" | undefined;
180
187
  allowed_envs?: string[] | undefined;
181
188
  features?: string[] | undefined;
182
189
  manifest_version?: number | undefined;
@@ -199,6 +206,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
199
206
  name?: string | undefined;
200
207
  public_sysinfo?: boolean | undefined;
201
208
  public_logs?: boolean | undefined;
209
+ storage_fs?: "ext4" | "zfs" | undefined;
202
210
  allowed_envs?: string[] | undefined;
203
211
  features?: string[] | undefined;
204
212
  manifest_version?: number | undefined;
@@ -221,6 +229,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
221
229
  name?: string | undefined;
222
230
  public_sysinfo?: boolean | undefined;
223
231
  public_logs?: boolean | undefined;
232
+ storage_fs?: "ext4" | "zfs" | undefined;
224
233
  allowed_envs?: string[] | undefined;
225
234
  features?: string[] | undefined;
226
235
  manifest_version?: number | undefined;
@@ -245,6 +254,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
245
254
  name?: string | undefined;
246
255
  public_sysinfo?: boolean | undefined;
247
256
  public_logs?: boolean | undefined;
257
+ storage_fs?: "ext4" | "zfs" | undefined;
248
258
  allowed_envs?: string[] | undefined;
249
259
  features?: string[] | undefined;
250
260
  manifest_version?: number | undefined;
@@ -260,6 +270,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
260
270
  name?: string | undefined;
261
271
  public_sysinfo?: boolean | undefined;
262
272
  public_logs?: boolean | undefined;
273
+ storage_fs?: "ext4" | "zfs" | undefined;
263
274
  allowed_envs?: string[] | undefined;
264
275
  features?: string[] | undefined;
265
276
  manifest_version?: number | undefined;
@@ -283,6 +294,7 @@ export declare const ProvisionCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.
283
294
  name?: string | undefined;
284
295
  public_sysinfo?: boolean | undefined;
285
296
  public_logs?: boolean | undefined;
297
+ storage_fs?: "ext4" | "zfs" | undefined;
286
298
  allowed_envs?: string[] | undefined;
287
299
  features?: string[] | undefined;
288
300
  manifest_version?: number | undefined;
@@ -589,6 +601,7 @@ declare const provisionCvmComposeFileUpdate: {
589
601
  name?: string | undefined;
590
602
  public_sysinfo?: boolean | undefined;
591
603
  public_logs?: boolean | undefined;
604
+ storage_fs?: "ext4" | "zfs" | undefined;
592
605
  allowed_envs?: string[] | undefined;
593
606
  features?: string[] | undefined;
594
607
  manifest_version?: number | undefined;
@@ -657,6 +670,7 @@ declare const provisionCvmComposeFileUpdate: {
657
670
  name?: string | undefined;
658
671
  public_sysinfo?: boolean | undefined;
659
672
  public_logs?: boolean | undefined;
673
+ storage_fs?: "ext4" | "zfs" | undefined;
660
674
  allowed_envs?: string[] | undefined;
661
675
  features?: string[] | undefined;
662
676
  manifest_version?: number | undefined;
@@ -682,6 +696,7 @@ declare const provisionCvmComposeFileUpdate: {
682
696
  name?: string | undefined;
683
697
  public_sysinfo?: boolean | undefined;
684
698
  public_logs?: boolean | undefined;
699
+ storage_fs?: "ext4" | "zfs" | undefined;
685
700
  allowed_envs?: string[] | undefined;
686
701
  features?: string[] | undefined;
687
702
  manifest_version?: number | undefined;
@@ -708,6 +723,7 @@ declare const provisionCvmComposeFileUpdate: {
708
723
  name?: string | undefined;
709
724
  public_sysinfo?: boolean | undefined;
710
725
  public_logs?: boolean | undefined;
726
+ storage_fs?: "ext4" | "zfs" | undefined;
711
727
  allowed_envs?: string[] | undefined;
712
728
  features?: string[] | undefined;
713
729
  manifest_version?: number | undefined;
@@ -776,6 +792,7 @@ declare const provisionCvmComposeFileUpdate: {
776
792
  name?: string | undefined;
777
793
  public_sysinfo?: boolean | undefined;
778
794
  public_logs?: boolean | undefined;
795
+ storage_fs?: "ext4" | "zfs" | undefined;
779
796
  allowed_envs?: string[] | undefined;
780
797
  features?: string[] | undefined;
781
798
  manifest_version?: number | undefined;
@@ -801,6 +818,7 @@ declare const provisionCvmComposeFileUpdate: {
801
818
  name?: string | undefined;
802
819
  public_sysinfo?: boolean | undefined;
803
820
  public_logs?: boolean | undefined;
821
+ storage_fs?: "ext4" | "zfs" | undefined;
804
822
  allowed_envs?: string[] | undefined;
805
823
  features?: string[] | undefined;
806
824
  manifest_version?: number | undefined;
@@ -0,0 +1,93 @@
1
+ import { z } from "zod";
2
+ export declare const InstanceIdRefreshResultSchema: z.ZodObject<{
3
+ cvm_id: z.ZodNumber;
4
+ identifier: z.ZodString;
5
+ status: z.ZodEnum<["updated", "unchanged", "skipped", "conflict", "error"]>;
6
+ old_instance_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ new_instance_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ source: z.ZodEnum<["teepod_state", "teepod_info", "gateway", "none"]>;
9
+ verified_with_gateway: z.ZodBoolean;
10
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
13
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
14
+ cvm_id: number;
15
+ identifier: string;
16
+ verified_with_gateway: boolean;
17
+ old_instance_id?: string | null | undefined;
18
+ new_instance_id?: string | null | undefined;
19
+ reason?: string | null | undefined;
20
+ }, {
21
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
22
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
23
+ cvm_id: number;
24
+ identifier: string;
25
+ verified_with_gateway: boolean;
26
+ old_instance_id?: string | null | undefined;
27
+ new_instance_id?: string | null | undefined;
28
+ reason?: string | null | undefined;
29
+ }>;
30
+ export type InstanceIdRefreshResult = z.infer<typeof InstanceIdRefreshResultSchema>;
31
+ export declare const RefreshCvmInstanceIdRequestSchema: z.ZodEffects<z.ZodObject<{
32
+ id: z.ZodOptional<z.ZodString>;
33
+ uuid: z.ZodOptional<z.ZodString>;
34
+ app_id: z.ZodOptional<z.ZodString>;
35
+ instance_id: z.ZodOptional<z.ZodString>;
36
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
37
+ } & {
38
+ overwrite: z.ZodOptional<z.ZodBoolean>;
39
+ dry_run: z.ZodOptional<z.ZodBoolean>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ name?: string | undefined;
42
+ id?: string | undefined;
43
+ app_id?: string | undefined;
44
+ instance_id?: string | undefined;
45
+ uuid?: string | undefined;
46
+ overwrite?: boolean | undefined;
47
+ dry_run?: boolean | undefined;
48
+ }, {
49
+ name?: string | undefined;
50
+ id?: string | undefined;
51
+ app_id?: string | undefined;
52
+ instance_id?: string | undefined;
53
+ uuid?: string | undefined;
54
+ overwrite?: boolean | undefined;
55
+ dry_run?: boolean | undefined;
56
+ }>, any, any>;
57
+ export type RefreshCvmInstanceIdRequest = z.infer<typeof RefreshCvmInstanceIdRequestSchema>;
58
+ declare const refreshCvmInstanceId: {
59
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
60
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
61
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
62
+ cvm_id: number;
63
+ identifier: string;
64
+ verified_with_gateway: boolean;
65
+ old_instance_id?: string | null | undefined;
66
+ new_instance_id?: string | null | undefined;
67
+ reason?: string | null | undefined;
68
+ }>;
69
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
70
+ schema: T;
71
+ } | undefined): Promise<z.TypeOf<T>>;
72
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
73
+ schema: false;
74
+ } | undefined): Promise<unknown>;
75
+ }, safeRefreshCvmInstanceId: {
76
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
77
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
78
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
79
+ cvm_id: number;
80
+ identifier: string;
81
+ verified_with_gateway: boolean;
82
+ old_instance_id?: string | null | undefined;
83
+ new_instance_id?: string | null | undefined;
84
+ reason?: string | null | undefined;
85
+ }>>;
86
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
87
+ schema: T;
88
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
89
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
90
+ schema: false;
91
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
92
+ };
93
+ export { refreshCvmInstanceId, safeRefreshCvmInstanceId };
@@ -0,0 +1,194 @@
1
+ import { z } from "zod";
2
+ export declare const RefreshCvmInstanceIdsRequestSchema: z.ZodObject<{
3
+ cvm_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4
+ running_only: z.ZodOptional<z.ZodBoolean>;
5
+ missing_only: z.ZodOptional<z.ZodBoolean>;
6
+ overwrite: z.ZodOptional<z.ZodBoolean>;
7
+ limit: z.ZodOptional<z.ZodNumber>;
8
+ dry_run: z.ZodOptional<z.ZodBoolean>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ limit?: number | undefined;
11
+ overwrite?: boolean | undefined;
12
+ dry_run?: boolean | undefined;
13
+ cvm_ids?: string[] | undefined;
14
+ running_only?: boolean | undefined;
15
+ missing_only?: boolean | undefined;
16
+ }, {
17
+ limit?: number | undefined;
18
+ overwrite?: boolean | undefined;
19
+ dry_run?: boolean | undefined;
20
+ cvm_ids?: string[] | undefined;
21
+ running_only?: boolean | undefined;
22
+ missing_only?: boolean | undefined;
23
+ }>;
24
+ export type RefreshCvmInstanceIdsRequest = z.infer<typeof RefreshCvmInstanceIdsRequestSchema>;
25
+ export declare const RefreshCvmInstanceIdsResponseSchema: z.ZodObject<{
26
+ total: z.ZodNumber;
27
+ scanned: z.ZodNumber;
28
+ updated: z.ZodNumber;
29
+ unchanged: z.ZodNumber;
30
+ skipped: z.ZodNumber;
31
+ conflicts: z.ZodNumber;
32
+ errors: z.ZodNumber;
33
+ items: z.ZodArray<z.ZodObject<{
34
+ cvm_id: z.ZodNumber;
35
+ identifier: z.ZodString;
36
+ status: z.ZodEnum<["updated", "unchanged", "skipped", "conflict", "error"]>;
37
+ old_instance_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
+ new_instance_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
39
+ source: z.ZodEnum<["teepod_state", "teepod_info", "gateway", "none"]>;
40
+ verified_with_gateway: z.ZodBoolean;
41
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
44
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
45
+ cvm_id: number;
46
+ identifier: string;
47
+ verified_with_gateway: boolean;
48
+ old_instance_id?: string | null | undefined;
49
+ new_instance_id?: string | null | undefined;
50
+ reason?: string | null | undefined;
51
+ }, {
52
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
53
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
54
+ cvm_id: number;
55
+ identifier: string;
56
+ verified_with_gateway: boolean;
57
+ old_instance_id?: string | null | undefined;
58
+ new_instance_id?: string | null | undefined;
59
+ reason?: string | null | undefined;
60
+ }>, "many">;
61
+ }, "strip", z.ZodTypeAny, {
62
+ errors: number;
63
+ items: {
64
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
65
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
66
+ cvm_id: number;
67
+ identifier: string;
68
+ verified_with_gateway: boolean;
69
+ old_instance_id?: string | null | undefined;
70
+ new_instance_id?: string | null | undefined;
71
+ reason?: string | null | undefined;
72
+ }[];
73
+ total: number;
74
+ updated: number;
75
+ unchanged: number;
76
+ skipped: number;
77
+ scanned: number;
78
+ conflicts: number;
79
+ }, {
80
+ errors: number;
81
+ items: {
82
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
83
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
84
+ cvm_id: number;
85
+ identifier: string;
86
+ verified_with_gateway: boolean;
87
+ old_instance_id?: string | null | undefined;
88
+ new_instance_id?: string | null | undefined;
89
+ reason?: string | null | undefined;
90
+ }[];
91
+ total: number;
92
+ updated: number;
93
+ unchanged: number;
94
+ skipped: number;
95
+ scanned: number;
96
+ conflicts: number;
97
+ }>;
98
+ export type RefreshCvmInstanceIdsResponse = z.infer<typeof RefreshCvmInstanceIdsResponseSchema>;
99
+ declare const refreshCvmInstanceIds: {
100
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
101
+ limit?: number | undefined;
102
+ overwrite?: boolean | undefined;
103
+ dry_run?: boolean | undefined;
104
+ cvm_ids?: string[] | undefined;
105
+ running_only?: boolean | undefined;
106
+ missing_only?: boolean | undefined;
107
+ }): Promise<{
108
+ errors: number;
109
+ items: {
110
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
111
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
112
+ cvm_id: number;
113
+ identifier: string;
114
+ verified_with_gateway: boolean;
115
+ old_instance_id?: string | null | undefined;
116
+ new_instance_id?: string | null | undefined;
117
+ reason?: string | null | undefined;
118
+ }[];
119
+ total: number;
120
+ updated: number;
121
+ unchanged: number;
122
+ skipped: number;
123
+ scanned: number;
124
+ conflicts: number;
125
+ }>;
126
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
127
+ limit?: number | undefined;
128
+ overwrite?: boolean | undefined;
129
+ dry_run?: boolean | undefined;
130
+ cvm_ids?: string[] | undefined;
131
+ running_only?: boolean | undefined;
132
+ missing_only?: boolean | undefined;
133
+ }, parameters: {
134
+ schema: T;
135
+ }): Promise<z.TypeOf<T>>;
136
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
137
+ limit?: number | undefined;
138
+ overwrite?: boolean | undefined;
139
+ dry_run?: boolean | undefined;
140
+ cvm_ids?: string[] | undefined;
141
+ running_only?: boolean | undefined;
142
+ missing_only?: boolean | undefined;
143
+ }, parameters: {
144
+ schema: false;
145
+ }): Promise<unknown>;
146
+ }, safeRefreshCvmInstanceIds: {
147
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
148
+ limit?: number | undefined;
149
+ overwrite?: boolean | undefined;
150
+ dry_run?: boolean | undefined;
151
+ cvm_ids?: string[] | undefined;
152
+ running_only?: boolean | undefined;
153
+ missing_only?: boolean | undefined;
154
+ }): Promise<import("../..").SafeResult<{
155
+ errors: number;
156
+ items: {
157
+ status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
158
+ source: "gateway" | "teepod_state" | "teepod_info" | "none";
159
+ cvm_id: number;
160
+ identifier: string;
161
+ verified_with_gateway: boolean;
162
+ old_instance_id?: string | null | undefined;
163
+ new_instance_id?: string | null | undefined;
164
+ reason?: string | null | undefined;
165
+ }[];
166
+ total: number;
167
+ updated: number;
168
+ unchanged: number;
169
+ skipped: number;
170
+ scanned: number;
171
+ conflicts: number;
172
+ }>>;
173
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
174
+ limit?: number | undefined;
175
+ overwrite?: boolean | undefined;
176
+ dry_run?: boolean | undefined;
177
+ cvm_ids?: string[] | undefined;
178
+ running_only?: boolean | undefined;
179
+ missing_only?: boolean | undefined;
180
+ }, parameters: {
181
+ schema: T;
182
+ }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
183
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
184
+ limit?: number | undefined;
185
+ overwrite?: boolean | undefined;
186
+ dry_run?: boolean | undefined;
187
+ cvm_ids?: string[] | undefined;
188
+ running_only?: boolean | undefined;
189
+ missing_only?: boolean | undefined;
190
+ }, parameters: {
191
+ schema: false;
192
+ }): Promise<import("../..").SafeResult<unknown>>;
193
+ };
194
+ export { refreshCvmInstanceIds, safeRefreshCvmInstanceIds };
@@ -0,0 +1,126 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Replicate (scale up) a CVM by creating a new replica
4
+ *
5
+ * This action creates a new CVM instance with the same configuration
6
+ * as the source CVM, effectively scaling up the application.
7
+ *
8
+ * @example
9
+ * ```typescript
10
+ * import { createClient, replicateCvm } from '@phala/cloud'
11
+ *
12
+ * const client = createClient();
13
+ * const replica = await replicateCvm(client, { id: 'my-cvm-id' });
14
+ * console.log(replica.vm_uuid); // new replica UUID
15
+ *
16
+ * // Replicate to a specific node
17
+ * const replica2 = await replicateCvm(client, { id: 'my-cvm-id', node_id: 42 });
18
+ * ```
19
+ *
20
+ * ## Safe Version
21
+ *
22
+ * Use `safeReplicateCvm` for error handling without exceptions:
23
+ *
24
+ * ```typescript
25
+ * const result = await safeReplicateCvm(client, { id: 'my-cvm-id' });
26
+ * if (result.success) {
27
+ * console.log('Replica created:', result.data.vm_uuid);
28
+ * } else {
29
+ * console.error('Failed to replicate CVM:', result.error.message);
30
+ * }
31
+ * ```
32
+ */
33
+ export declare const ReplicateCvmRequestSchema: z.ZodEffects<z.ZodObject<{
34
+ id: z.ZodOptional<z.ZodString>;
35
+ uuid: z.ZodOptional<z.ZodString>;
36
+ app_id: z.ZodOptional<z.ZodString>;
37
+ instance_id: z.ZodOptional<z.ZodString>;
38
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
39
+ } & {
40
+ node_id: z.ZodOptional<z.ZodNumber>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ name?: string | undefined;
43
+ id?: string | undefined;
44
+ app_id?: string | undefined;
45
+ instance_id?: string | undefined;
46
+ uuid?: string | undefined;
47
+ node_id?: number | undefined;
48
+ }, {
49
+ name?: string | undefined;
50
+ id?: string | undefined;
51
+ app_id?: string | undefined;
52
+ instance_id?: string | undefined;
53
+ uuid?: string | undefined;
54
+ node_id?: number | undefined;
55
+ }>, any, any>;
56
+ export type ReplicateCvmRequest = z.infer<typeof ReplicateCvmRequestSchema>;
57
+ declare const replicateCvm: {
58
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
59
+ status: string;
60
+ name: string;
61
+ id: number;
62
+ app_id: string;
63
+ instance_id: string | null;
64
+ vcpu: number;
65
+ memory: number;
66
+ disk_size: number;
67
+ teepod_id: number;
68
+ vm_uuid: string | null;
69
+ encrypted_env_pubkey: string | null;
70
+ created_at: string;
71
+ version?: string | null | undefined;
72
+ app_url?: string | null | undefined;
73
+ teepod?: {
74
+ name: string;
75
+ id: number;
76
+ region_identifier?: string | null | undefined;
77
+ } | null | undefined;
78
+ base_image?: string | null | undefined;
79
+ user_id?: number | null | undefined;
80
+ docker_compose_file?: string | null | undefined;
81
+ features?: string[] | null | undefined;
82
+ manifest_version?: number | null | undefined;
83
+ runner?: string | null | undefined;
84
+ }>;
85
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
86
+ schema: T;
87
+ } | undefined): Promise<z.TypeOf<T>>;
88
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
89
+ schema: false;
90
+ } | undefined): Promise<unknown>;
91
+ }, safeReplicateCvm: {
92
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
93
+ status: string;
94
+ name: string;
95
+ id: number;
96
+ app_id: string;
97
+ instance_id: string | null;
98
+ vcpu: number;
99
+ memory: number;
100
+ disk_size: number;
101
+ teepod_id: number;
102
+ vm_uuid: string | null;
103
+ encrypted_env_pubkey: string | null;
104
+ created_at: string;
105
+ version?: string | null | undefined;
106
+ app_url?: string | null | undefined;
107
+ teepod?: {
108
+ name: string;
109
+ id: number;
110
+ region_identifier?: string | null | undefined;
111
+ } | null | undefined;
112
+ base_image?: string | null | undefined;
113
+ user_id?: number | null | undefined;
114
+ docker_compose_file?: string | null | undefined;
115
+ features?: string[] | null | undefined;
116
+ manifest_version?: number | null | undefined;
117
+ runner?: string | null | undefined;
118
+ }>>;
119
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
120
+ schema: T;
121
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
122
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
123
+ schema: false;
124
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
125
+ };
126
+ export { replicateCvm, safeReplicateCvm };
@@ -66,7 +66,6 @@ declare const restartCvm: {
66
66
  disk_size: number;
67
67
  teepod_id: number;
68
68
  vm_uuid: string | null;
69
- base_image: string | null;
70
69
  encrypted_env_pubkey: string | null;
71
70
  created_at: string;
72
71
  version?: string | null | undefined;
@@ -76,6 +75,7 @@ declare const restartCvm: {
76
75
  id: number;
77
76
  region_identifier?: string | null | undefined;
78
77
  } | null | undefined;
78
+ base_image?: string | null | undefined;
79
79
  user_id?: number | null | undefined;
80
80
  docker_compose_file?: string | null | undefined;
81
81
  features?: string[] | null | undefined;
@@ -100,7 +100,6 @@ declare const restartCvm: {
100
100
  disk_size: number;
101
101
  teepod_id: number;
102
102
  vm_uuid: string | null;
103
- base_image: string | null;
104
103
  encrypted_env_pubkey: string | null;
105
104
  created_at: string;
106
105
  version?: string | null | undefined;
@@ -110,6 +109,7 @@ declare const restartCvm: {
110
109
  id: number;
111
110
  region_identifier?: string | null | undefined;
112
111
  } | null | undefined;
112
+ base_image?: string | null | undefined;
113
113
  user_id?: number | null | undefined;
114
114
  docker_compose_file?: string | null | undefined;
115
115
  features?: string[] | null | undefined;
@@ -59,7 +59,6 @@ declare const shutdownCvm: {
59
59
  disk_size: number;
60
60
  teepod_id: number;
61
61
  vm_uuid: string | null;
62
- base_image: string | null;
63
62
  encrypted_env_pubkey: string | null;
64
63
  created_at: string;
65
64
  version?: string | null | undefined;
@@ -69,6 +68,7 @@ declare const shutdownCvm: {
69
68
  id: number;
70
69
  region_identifier?: string | null | undefined;
71
70
  } | null | undefined;
71
+ base_image?: string | null | undefined;
72
72
  user_id?: number | null | undefined;
73
73
  docker_compose_file?: string | null | undefined;
74
74
  features?: string[] | null | undefined;
@@ -93,7 +93,6 @@ declare const shutdownCvm: {
93
93
  disk_size: number;
94
94
  teepod_id: number;
95
95
  vm_uuid: string | null;
96
- base_image: string | null;
97
96
  encrypted_env_pubkey: string | null;
98
97
  created_at: string;
99
98
  version?: string | null | undefined;
@@ -103,6 +102,7 @@ declare const shutdownCvm: {
103
102
  id: number;
104
103
  region_identifier?: string | null | undefined;
105
104
  } | null | undefined;
105
+ base_image?: string | null | undefined;
106
106
  user_id?: number | null | undefined;
107
107
  docker_compose_file?: string | null | undefined;
108
108
  features?: string[] | null | undefined;
@@ -60,7 +60,6 @@ declare const startCvm: {
60
60
  disk_size: number;
61
61
  teepod_id: number;
62
62
  vm_uuid: string | null;
63
- base_image: string | null;
64
63
  encrypted_env_pubkey: string | null;
65
64
  created_at: string;
66
65
  version?: string | null | undefined;
@@ -70,6 +69,7 @@ declare const startCvm: {
70
69
  id: number;
71
70
  region_identifier?: string | null | undefined;
72
71
  } | null | undefined;
72
+ base_image?: string | null | undefined;
73
73
  user_id?: number | null | undefined;
74
74
  docker_compose_file?: string | null | undefined;
75
75
  features?: string[] | null | undefined;
@@ -94,7 +94,6 @@ declare const startCvm: {
94
94
  disk_size: number;
95
95
  teepod_id: number;
96
96
  vm_uuid: string | null;
97
- base_image: string | null;
98
97
  encrypted_env_pubkey: string | null;
99
98
  created_at: string;
100
99
  version?: string | null | undefined;
@@ -104,6 +103,7 @@ declare const startCvm: {
104
103
  id: number;
105
104
  region_identifier?: string | null | undefined;
106
105
  } | null | undefined;
106
+ base_image?: string | null | undefined;
107
107
  user_id?: number | null | undefined;
108
108
  docker_compose_file?: string | null | undefined;
109
109
  features?: string[] | null | undefined;
@@ -61,7 +61,6 @@ declare const stopCvm: {
61
61
  disk_size: number;
62
62
  teepod_id: number;
63
63
  vm_uuid: string | null;
64
- base_image: string | null;
65
64
  encrypted_env_pubkey: string | null;
66
65
  created_at: string;
67
66
  version?: string | null | undefined;
@@ -71,6 +70,7 @@ declare const stopCvm: {
71
70
  id: number;
72
71
  region_identifier?: string | null | undefined;
73
72
  } | null | undefined;
73
+ base_image?: string | null | undefined;
74
74
  user_id?: number | null | undefined;
75
75
  docker_compose_file?: string | null | undefined;
76
76
  features?: string[] | null | undefined;
@@ -95,7 +95,6 @@ declare const stopCvm: {
95
95
  disk_size: number;
96
96
  teepod_id: number;
97
97
  vm_uuid: string | null;
98
- base_image: string | null;
99
98
  encrypted_env_pubkey: string | null;
100
99
  created_at: string;
101
100
  version?: string | null | undefined;
@@ -105,6 +104,7 @@ declare const stopCvm: {
105
104
  id: number;
106
105
  region_identifier?: string | null | undefined;
107
106
  } | null | undefined;
107
+ base_image?: string | null | undefined;
108
108
  user_id?: number | null | undefined;
109
109
  docker_compose_file?: string | null | undefined;
110
110
  features?: string[] | null | undefined;