@phala/cloud 0.2.10 → 0.4.0

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 (81) hide show
  1. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +100 -161
  2. package/dist/actions/apps/check_app_is_allowed.d.ts +14 -14
  3. package/dist/actions/apps/create_app_instance.d.ts +22 -22
  4. package/dist/actions/apps/get_app_attestation.d.ts +43 -33
  5. package/dist/actions/apps/get_app_device_allowlist.d.ts +51 -50
  6. package/dist/actions/apps/get_app_list.d.ts +2 -2
  7. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +40 -102
  8. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +12 -12
  9. package/dist/actions/cvms/commit_cvm_provision.d.ts +11 -135
  10. package/dist/actions/cvms/commit_cvm_update.d.ts +2 -2
  11. package/dist/actions/cvms/confirm_cvm_patch.d.ts +2 -2
  12. package/dist/actions/cvms/delete_cvm.d.ts +2 -2
  13. package/dist/actions/cvms/get_available_os_images.d.ts +2 -2
  14. package/dist/actions/cvms/get_cvm_attestation.d.ts +2 -2
  15. package/dist/actions/cvms/get_cvm_compose_file.d.ts +166 -22
  16. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +10 -10
  17. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +2 -2
  18. package/dist/actions/cvms/get_cvm_info.d.ts +2 -2
  19. package/dist/actions/cvms/get_cvm_list.d.ts +8 -10
  20. package/dist/actions/cvms/get_cvm_network.d.ts +2 -2
  21. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +2 -2
  22. package/dist/actions/cvms/get_cvm_state.d.ts +6 -6
  23. package/dist/actions/cvms/get_cvm_stats.d.ts +2 -2
  24. package/dist/actions/cvms/get_cvm_status_batch.d.ts +253 -30
  25. package/dist/actions/cvms/get_cvm_user_config.d.ts +2 -2
  26. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +2 -2
  27. package/dist/actions/cvms/patch_cvm.d.ts +34 -18
  28. package/dist/actions/cvms/provision_cvm.d.ts +900 -51
  29. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +253 -43
  30. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +27 -58
  31. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +120 -165
  32. package/dist/actions/cvms/replicate_cvm.d.ts +7 -72
  33. package/dist/actions/cvms/restart_cvm.d.ts +7 -72
  34. package/dist/actions/cvms/shutdown_cvm.d.ts +9 -72
  35. package/dist/actions/cvms/start_cvm.d.ts +7 -72
  36. package/dist/actions/cvms/stop_cvm.d.ts +7 -72
  37. package/dist/actions/cvms/update_cvm_envs.d.ts +36 -20
  38. package/dist/actions/cvms/update_cvm_resources.d.ts +26 -4
  39. package/dist/actions/cvms/update_cvm_visibility.d.ts +26 -24
  40. package/dist/actions/cvms/update_docker_compose.d.ts +51 -20
  41. package/dist/actions/cvms/update_os_image.d.ts +2 -2
  42. package/dist/actions/cvms/update_prelaunch_script.d.ts +51 -20
  43. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +36 -20
  44. package/dist/actions/get_available_nodes.d.ts +259 -0
  45. package/dist/actions/get_cvm_create_resources.d.ts +351 -0
  46. package/dist/actions/index.d.ts +6 -2
  47. package/dist/actions/kms/get_kms_contract.d.ts +59 -0
  48. package/dist/actions/kms/get_kms_list.d.ts +25 -10
  49. package/dist/actions/kms/get_kms_onchain_detail.d.ts +54 -0
  50. package/dist/actions/kms/list_kms_contract_nodes.d.ts +98 -0
  51. package/dist/actions/kms/list_kms_contracts.d.ts +152 -0
  52. package/dist/actions/kms/next_app_ids.d.ts +6 -6
  53. package/dist/actions/list-instance-types.d.ts +12 -12
  54. package/dist/actions/ssh_keys/create_ssh_key.d.ts +2 -2
  55. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +4 -4
  56. package/dist/actions/workspaces/get_workspace.d.ts +4 -0
  57. package/dist/actions/workspaces/get_workspace_nodes.d.ts +175 -14
  58. package/dist/actions/workspaces/list_workspaces.d.ts +126 -0
  59. package/dist/client.d.ts +4 -1
  60. package/dist/create-client.d.ts +48 -0
  61. package/dist/index.d.ts +1 -1
  62. package/dist/index.js +1779 -1250
  63. package/dist/index.mjs +1704 -1194
  64. package/dist/types/app_compose.d.ts +50 -5
  65. package/dist/types/app_info_v20251028.d.ts +172 -128
  66. package/dist/types/app_info_v20260121.d.ts +2814 -490
  67. package/dist/types/app_revision.d.ts +8 -8
  68. package/dist/types/client.d.ts +2 -2
  69. package/dist/types/cvm_id.d.ts +6 -6
  70. package/dist/types/cvm_info.d.ts +98 -98
  71. package/dist/types/cvm_info_v20251028.d.ts +70 -47
  72. package/dist/types/cvm_info_v20260121.d.ts +1125 -148
  73. package/dist/types/kms_contract.d.ts +64 -0
  74. package/dist/types/kms_info.d.ts +8 -0
  75. package/dist/types/version-mappings.d.ts +43 -6
  76. package/dist/utils/error_codes.d.ts +1 -0
  77. package/dist/utils/errors.d.ts +30 -1
  78. package/dist/utils/get_compose_hash.d.ts +24 -0
  79. package/dist/utils/get_mr_config_id.d.ts +55 -0
  80. package/dist/utils/index.d.ts +3 -2
  81. package/package.json +3 -3
@@ -1,4 +1,7 @@
1
1
  import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { ApiVersion } from "../../types/client";
4
+ import type { RefreshCvmInstanceIdResponse } from "../../types/version-mappings";
2
5
  export declare const InstanceIdRefreshResultV20260121Schema: z.ZodObject<{
3
6
  identifier: z.ZodString;
4
7
  status: z.ZodEnum<["updated", "unchanged", "skipped", "conflict", "error"]>;
@@ -11,19 +14,19 @@ export declare const InstanceIdRefreshResultV20260121Schema: z.ZodObject<{
11
14
  cvm_id: z.ZodNullable<z.ZodNumber>;
12
15
  }, "strip", z.ZodTypeAny, {
13
16
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
14
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
17
+ cvm_id: number | null;
15
18
  identifier: string;
19
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
16
20
  verified_with_gateway: boolean;
17
- cvm_id: number | null;
18
21
  old_instance_id?: string | null | undefined;
19
22
  new_instance_id?: string | null | undefined;
20
23
  reason?: string | null | undefined;
21
24
  }, {
22
25
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
23
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
26
+ cvm_id: number | null;
24
27
  identifier: string;
28
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
25
29
  verified_with_gateway: boolean;
26
- cvm_id: number | null;
27
30
  old_instance_id?: string | null | undefined;
28
31
  new_instance_id?: string | null | undefined;
29
32
  reason?: string | null | undefined;
@@ -41,19 +44,19 @@ export declare const InstanceIdRefreshResultV20260522Schema: z.ZodObject<{
41
44
  cvm_id: z.ZodNullable<z.ZodString>;
42
45
  }, "strip", z.ZodTypeAny, {
43
46
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
44
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
47
+ cvm_id: string | null;
45
48
  identifier: string;
49
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
46
50
  verified_with_gateway: boolean;
47
- cvm_id: string | null;
48
51
  old_instance_id?: string | null | undefined;
49
52
  new_instance_id?: string | null | undefined;
50
53
  reason?: string | null | undefined;
51
54
  }, {
52
55
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
53
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
56
+ cvm_id: string | null;
54
57
  identifier: string;
58
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
55
59
  verified_with_gateway: boolean;
56
- cvm_id: string | null;
57
60
  old_instance_id?: string | null | undefined;
58
61
  new_instance_id?: string | null | undefined;
59
62
  reason?: string | null | undefined;
@@ -71,19 +74,19 @@ export declare const InstanceIdRefreshResultAnySchema: z.ZodUnion<[z.ZodObject<{
71
74
  cvm_id: z.ZodNullable<z.ZodNumber>;
72
75
  }, "strip", z.ZodTypeAny, {
73
76
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
74
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
77
+ cvm_id: number | null;
75
78
  identifier: string;
79
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
76
80
  verified_with_gateway: boolean;
77
- cvm_id: number | null;
78
81
  old_instance_id?: string | null | undefined;
79
82
  new_instance_id?: string | null | undefined;
80
83
  reason?: string | null | undefined;
81
84
  }, {
82
85
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
83
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
86
+ cvm_id: number | null;
84
87
  identifier: string;
88
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
85
89
  verified_with_gateway: boolean;
86
- cvm_id: number | null;
87
90
  old_instance_id?: string | null | undefined;
88
91
  new_instance_id?: string | null | undefined;
89
92
  reason?: string | null | undefined;
@@ -99,19 +102,19 @@ export declare const InstanceIdRefreshResultAnySchema: z.ZodUnion<[z.ZodObject<{
99
102
  cvm_id: z.ZodNullable<z.ZodString>;
100
103
  }, "strip", z.ZodTypeAny, {
101
104
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
102
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
105
+ cvm_id: string | null;
103
106
  identifier: string;
107
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
104
108
  verified_with_gateway: boolean;
105
- cvm_id: string | null;
106
109
  old_instance_id?: string | null | undefined;
107
110
  new_instance_id?: string | null | undefined;
108
111
  reason?: string | null | undefined;
109
112
  }, {
110
113
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
111
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
114
+ cvm_id: string | null;
112
115
  identifier: string;
116
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
113
117
  verified_with_gateway: boolean;
114
- cvm_id: string | null;
115
118
  old_instance_id?: string | null | undefined;
116
119
  new_instance_id?: string | null | undefined;
117
120
  reason?: string | null | undefined;
@@ -128,19 +131,19 @@ export declare const InstanceIdRefreshResultSchema: z.ZodObject<{
128
131
  cvm_id: z.ZodNullable<z.ZodString>;
129
132
  }, "strip", z.ZodTypeAny, {
130
133
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
131
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
134
+ cvm_id: string | null;
132
135
  identifier: string;
136
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
133
137
  verified_with_gateway: boolean;
134
- cvm_id: string | null;
135
138
  old_instance_id?: string | null | undefined;
136
139
  new_instance_id?: string | null | undefined;
137
140
  reason?: string | null | undefined;
138
141
  }, {
139
142
  status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
140
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
143
+ cvm_id: string | null;
141
144
  identifier: string;
145
+ source: "teepod_state" | "teepod_info" | "gateway" | "none";
142
146
  verified_with_gateway: boolean;
143
- cvm_id: string | null;
144
147
  old_instance_id?: string | null | undefined;
145
148
  new_instance_id?: string | null | undefined;
146
149
  reason?: string | null | undefined;
@@ -158,54 +161,20 @@ export declare const RefreshCvmInstanceIdRequestSchema: z.ZodEffects<z.ZodObject
158
161
  }, "strip", z.ZodTypeAny, {
159
162
  name?: string | undefined;
160
163
  id?: string | undefined;
164
+ uuid?: string | undefined;
161
165
  app_id?: string | undefined;
162
166
  instance_id?: string | undefined;
163
- uuid?: string | undefined;
164
167
  overwrite?: boolean | undefined;
165
168
  dry_run?: boolean | undefined;
166
169
  }, {
167
170
  name?: string | undefined;
168
171
  id?: string | undefined;
172
+ uuid?: string | undefined;
169
173
  app_id?: string | undefined;
170
174
  instance_id?: string | undefined;
171
- uuid?: string | undefined;
172
175
  overwrite?: boolean | undefined;
173
176
  dry_run?: boolean | undefined;
174
177
  }>, any, any>;
175
178
  export type RefreshCvmInstanceIdRequest = z.infer<typeof RefreshCvmInstanceIdRequestSchema>;
176
- declare const refreshCvmInstanceId: {
177
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
178
- status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
179
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
180
- identifier: string;
181
- verified_with_gateway: boolean;
182
- cvm_id: string | null;
183
- old_instance_id?: string | null | undefined;
184
- new_instance_id?: string | null | undefined;
185
- reason?: string | null | undefined;
186
- }>;
187
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
188
- schema: T;
189
- } | undefined): Promise<z.TypeOf<T>>;
190
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
191
- schema: false;
192
- } | undefined): Promise<unknown>;
193
- }, safeRefreshCvmInstanceId: {
194
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
195
- status: "error" | "updated" | "unchanged" | "skipped" | "conflict";
196
- source: "gateway" | "teepod_state" | "teepod_info" | "none";
197
- identifier: string;
198
- verified_with_gateway: boolean;
199
- cvm_id: string | null;
200
- old_instance_id?: string | null | undefined;
201
- new_instance_id?: string | null | undefined;
202
- reason?: string | null | undefined;
203
- }>>;
204
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
205
- schema: T;
206
- } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
207
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
208
- schema: false;
209
- } | undefined): Promise<import("../..").SafeResult<unknown>>;
210
- };
211
- export { refreshCvmInstanceId, safeRefreshCvmInstanceId };
179
+ export declare function refreshCvmInstanceId<V extends ApiVersion>(client: Client<V>, request: RefreshCvmInstanceIdRequest): Promise<RefreshCvmInstanceIdResponse<V>>;
180
+ export declare function safeRefreshCvmInstanceId<V extends ApiVersion>(client: Client<V>, request: RefreshCvmInstanceIdRequest): Promise<SafeResult<RefreshCvmInstanceIdResponse<V>>>;