@phala/cloud 0.2.9 → 0.3.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 (70) hide show
  1. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +324 -75
  2. package/dist/actions/apps/check_app_is_allowed.d.ts +16 -16
  3. package/dist/actions/apps/create_app_instance.d.ts +33 -24
  4. package/dist/actions/apps/get_app_attestation.d.ts +82 -32
  5. package/dist/actions/apps/get_app_device_allowlist.d.ts +281 -11
  6. package/dist/actions/apps/get_app_filter_options.d.ts +2 -2
  7. package/dist/actions/apps/get_app_list.d.ts +2 -2
  8. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +142 -74
  9. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +12 -12
  10. package/dist/actions/cvms/commit_cvm_provision.d.ts +424 -277
  11. package/dist/actions/cvms/commit_cvm_update.d.ts +2 -2
  12. package/dist/actions/cvms/confirm_cvm_patch.d.ts +2 -2
  13. package/dist/actions/cvms/delete_cvm.d.ts +2 -2
  14. package/dist/actions/cvms/get_available_os_images.d.ts +2 -2
  15. package/dist/actions/cvms/get_cvm_attestation.d.ts +2 -2
  16. package/dist/actions/cvms/get_cvm_compose_file.d.ts +338 -10
  17. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +10 -10
  18. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +2 -2
  19. package/dist/actions/cvms/get_cvm_info.d.ts +2 -2
  20. package/dist/actions/cvms/get_cvm_list.d.ts +4 -4
  21. package/dist/actions/cvms/get_cvm_network.d.ts +2 -2
  22. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +2 -2
  23. package/dist/actions/cvms/get_cvm_state.d.ts +6 -6
  24. package/dist/actions/cvms/get_cvm_stats.d.ts +2 -2
  25. package/dist/actions/cvms/get_cvm_status_batch.d.ts +6 -6
  26. package/dist/actions/cvms/get_cvm_user_config.d.ts +2 -2
  27. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +93 -0
  28. package/dist/actions/cvms/patch_cvm.d.ts +18 -18
  29. package/dist/actions/cvms/provision_cvm.d.ts +243 -225
  30. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +254 -38
  31. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +130 -43
  32. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +294 -110
  33. package/dist/actions/cvms/replicate_cvm.d.ts +7 -72
  34. package/dist/actions/cvms/restart_cvm.d.ts +7 -72
  35. package/dist/actions/cvms/shutdown_cvm.d.ts +9 -72
  36. package/dist/actions/cvms/start_cvm.d.ts +7 -72
  37. package/dist/actions/cvms/stop_cvm.d.ts +7 -72
  38. package/dist/actions/cvms/update_cvm_envs.d.ts +20 -20
  39. package/dist/actions/cvms/update_cvm_resources.d.ts +2 -2
  40. package/dist/actions/cvms/update_cvm_visibility.d.ts +26 -26
  41. package/dist/actions/cvms/update_docker_compose.d.ts +20 -20
  42. package/dist/actions/cvms/update_os_image.d.ts +2 -2
  43. package/dist/actions/cvms/update_prelaunch_script.d.ts +20 -20
  44. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +319 -0
  45. package/dist/actions/get_cvm_create_resources.d.ts +2412 -0
  46. package/dist/actions/index.d.ts +3 -0
  47. package/dist/actions/kms/get_kms_list.d.ts +10 -10
  48. package/dist/actions/kms/next_app_ids.d.ts +6 -6
  49. package/dist/actions/list-instance-types.d.ts +12 -12
  50. package/dist/actions/ssh_keys/create_ssh_key.d.ts +2 -2
  51. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +4 -4
  52. package/dist/actions/workspaces/get_workspace.d.ts +2 -0
  53. package/dist/actions/workspaces/get_workspace_nodes.d.ts +14 -14
  54. package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
  55. package/dist/client.d.ts +5 -2
  56. package/dist/create-client.d.ts +48 -0
  57. package/dist/index.js +1882 -1257
  58. package/dist/index.mjs +1850 -1255
  59. package/dist/types/app_compose.d.ts +125 -0
  60. package/dist/types/app_info_v20251028.d.ts +136 -259
  61. package/dist/types/app_info_v20260121.d.ts +4677 -345
  62. package/dist/types/app_revision.d.ts +8 -8
  63. package/dist/types/client.d.ts +2 -2
  64. package/dist/types/cvm_id.d.ts +6 -6
  65. package/dist/types/cvm_info.d.ts +536 -10
  66. package/dist/types/cvm_info_v20251028.d.ts +65 -65
  67. package/dist/types/cvm_info_v20260121.d.ts +1636 -85
  68. package/dist/types/version-mappings.d.ts +45 -8
  69. package/dist/utils/errors.d.ts +8 -1
  70. package/package.json +2 -2
@@ -1,76 +1,347 @@
1
1
  import { z } from "zod";
2
2
  import { type Client, type SafeResult } from "../../client";
3
3
  import type { ApiVersion } from "../../types/client";
4
- declare const DeviceAllowlistItemSchema: z.ZodObject<{
4
+ import type { GetAppDeviceAllowlistResponse } from "../../types/version-mappings";
5
+ export declare const DeviceAllowlistItemV20260121Schema: z.ZodObject<{
5
6
  device_id: z.ZodString;
6
7
  node_name: z.ZodNullable<z.ZodString>;
7
- cvm_ids: z.ZodArray<z.ZodNumber, "many">;
8
8
  allowed_onchain: z.ZodBoolean;
9
9
  status: z.ZodString;
10
+ } & {
11
+ cvm_ids: z.ZodArray<z.ZodNumber, "many">;
10
12
  }, "strip", z.ZodTypeAny, {
11
13
  status: string;
12
14
  device_id: string;
13
15
  node_name: string | null;
14
- cvm_ids: number[];
15
16
  allowed_onchain: boolean;
17
+ cvm_ids: number[];
16
18
  }, {
17
19
  status: string;
18
20
  device_id: string;
19
21
  node_name: string | null;
22
+ allowed_onchain: boolean;
20
23
  cvm_ids: number[];
24
+ }>;
25
+ export type DeviceAllowlistItemV20260121 = z.infer<typeof DeviceAllowlistItemV20260121Schema>;
26
+ export declare const DeviceAllowlistItemV20260522Schema: z.ZodObject<{
27
+ device_id: z.ZodString;
28
+ node_name: z.ZodNullable<z.ZodString>;
29
+ allowed_onchain: z.ZodBoolean;
30
+ status: z.ZodString;
31
+ } & {
32
+ cvm_ids: z.ZodArray<z.ZodString, "many">;
33
+ }, "strip", z.ZodTypeAny, {
34
+ status: string;
35
+ device_id: string;
36
+ node_name: string | null;
37
+ allowed_onchain: boolean;
38
+ cvm_ids: string[];
39
+ }, {
40
+ status: string;
41
+ device_id: string;
42
+ node_name: string | null;
21
43
  allowed_onchain: boolean;
44
+ cvm_ids: string[];
22
45
  }>;
23
- declare const DeviceAllowlistResponseSchema: z.ZodObject<{
46
+ export type DeviceAllowlistItemV20260522 = z.infer<typeof DeviceAllowlistItemV20260522Schema>;
47
+ export declare const DeviceAllowlistResponseV20260121Schema: z.ZodObject<{
24
48
  is_onchain_kms: z.ZodBoolean;
25
49
  allow_any_device: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
26
50
  chain_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
27
51
  app_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ } & {
28
53
  devices: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
29
54
  device_id: z.ZodString;
30
55
  node_name: z.ZodNullable<z.ZodString>;
31
- cvm_ids: z.ZodArray<z.ZodNumber, "many">;
32
56
  allowed_onchain: z.ZodBoolean;
33
57
  status: z.ZodString;
58
+ } & {
59
+ cvm_ids: z.ZodArray<z.ZodNumber, "many">;
34
60
  }, "strip", z.ZodTypeAny, {
35
61
  status: string;
36
62
  device_id: string;
37
63
  node_name: string | null;
38
- cvm_ids: number[];
39
64
  allowed_onchain: boolean;
65
+ cvm_ids: number[];
40
66
  }, {
41
67
  status: string;
42
68
  device_id: string;
43
69
  node_name: string | null;
44
- cvm_ids: number[];
45
70
  allowed_onchain: boolean;
71
+ cvm_ids: number[];
46
72
  }>, "many">>>;
47
73
  }, "strip", z.ZodTypeAny, {
74
+ is_onchain_kms: boolean;
48
75
  devices: {
49
76
  status: string;
50
77
  device_id: string;
51
78
  node_name: string | null;
79
+ allowed_onchain: boolean;
52
80
  cvm_ids: number[];
81
+ }[];
82
+ app_contract_address?: string | null | undefined;
83
+ allow_any_device?: boolean | null | undefined;
84
+ chain_id?: number | null | undefined;
85
+ }, {
86
+ is_onchain_kms: boolean;
87
+ app_contract_address?: string | null | undefined;
88
+ allow_any_device?: boolean | null | undefined;
89
+ chain_id?: number | null | undefined;
90
+ devices?: {
91
+ status: string;
92
+ device_id: string;
93
+ node_name: string | null;
53
94
  allowed_onchain: boolean;
95
+ cvm_ids: number[];
96
+ }[] | undefined;
97
+ }>;
98
+ export type DeviceAllowlistResponseV20260121 = z.infer<typeof DeviceAllowlistResponseV20260121Schema>;
99
+ export declare const DeviceAllowlistResponseV20260522Schema: z.ZodObject<{
100
+ is_onchain_kms: z.ZodBoolean;
101
+ allow_any_device: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
102
+ chain_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
103
+ app_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
+ } & {
105
+ devices: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
106
+ device_id: z.ZodString;
107
+ node_name: z.ZodNullable<z.ZodString>;
108
+ allowed_onchain: z.ZodBoolean;
109
+ status: z.ZodString;
110
+ } & {
111
+ cvm_ids: z.ZodArray<z.ZodString, "many">;
112
+ }, "strip", z.ZodTypeAny, {
113
+ status: string;
114
+ device_id: string;
115
+ node_name: string | null;
116
+ allowed_onchain: boolean;
117
+ cvm_ids: string[];
118
+ }, {
119
+ status: string;
120
+ device_id: string;
121
+ node_name: string | null;
122
+ allowed_onchain: boolean;
123
+ cvm_ids: string[];
124
+ }>, "many">>>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ is_onchain_kms: boolean;
127
+ devices: {
128
+ status: string;
129
+ device_id: string;
130
+ node_name: string | null;
131
+ allowed_onchain: boolean;
132
+ cvm_ids: string[];
54
133
  }[];
134
+ app_contract_address?: string | null | undefined;
135
+ allow_any_device?: boolean | null | undefined;
136
+ chain_id?: number | null | undefined;
137
+ }, {
55
138
  is_onchain_kms: boolean;
139
+ app_contract_address?: string | null | undefined;
140
+ allow_any_device?: boolean | null | undefined;
56
141
  chain_id?: number | null | undefined;
142
+ devices?: {
143
+ status: string;
144
+ device_id: string;
145
+ node_name: string | null;
146
+ allowed_onchain: boolean;
147
+ cvm_ids: string[];
148
+ }[] | undefined;
149
+ }>;
150
+ export type DeviceAllowlistResponseV20260522 = z.infer<typeof DeviceAllowlistResponseV20260522Schema>;
151
+ declare const DeviceAllowlistItemAnySchema: z.ZodUnion<[z.ZodObject<{
152
+ device_id: z.ZodString;
153
+ node_name: z.ZodNullable<z.ZodString>;
154
+ allowed_onchain: z.ZodBoolean;
155
+ status: z.ZodString;
156
+ } & {
157
+ cvm_ids: z.ZodArray<z.ZodNumber, "many">;
158
+ }, "strip", z.ZodTypeAny, {
159
+ status: string;
160
+ device_id: string;
161
+ node_name: string | null;
162
+ allowed_onchain: boolean;
163
+ cvm_ids: number[];
164
+ }, {
165
+ status: string;
166
+ device_id: string;
167
+ node_name: string | null;
168
+ allowed_onchain: boolean;
169
+ cvm_ids: number[];
170
+ }>, z.ZodObject<{
171
+ device_id: z.ZodString;
172
+ node_name: z.ZodNullable<z.ZodString>;
173
+ allowed_onchain: z.ZodBoolean;
174
+ status: z.ZodString;
175
+ } & {
176
+ cvm_ids: z.ZodArray<z.ZodString, "many">;
177
+ }, "strip", z.ZodTypeAny, {
178
+ status: string;
179
+ device_id: string;
180
+ node_name: string | null;
181
+ allowed_onchain: boolean;
182
+ cvm_ids: string[];
183
+ }, {
184
+ status: string;
185
+ device_id: string;
186
+ node_name: string | null;
187
+ allowed_onchain: boolean;
188
+ cvm_ids: string[];
189
+ }>]>;
190
+ declare const DeviceAllowlistResponseAnySchema: z.ZodUnion<[z.ZodObject<{
191
+ is_onchain_kms: z.ZodBoolean;
192
+ allow_any_device: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
193
+ chain_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
194
+ app_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
195
+ } & {
196
+ devices: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
197
+ device_id: z.ZodString;
198
+ node_name: z.ZodNullable<z.ZodString>;
199
+ allowed_onchain: z.ZodBoolean;
200
+ status: z.ZodString;
201
+ } & {
202
+ cvm_ids: z.ZodArray<z.ZodNumber, "many">;
203
+ }, "strip", z.ZodTypeAny, {
204
+ status: string;
205
+ device_id: string;
206
+ node_name: string | null;
207
+ allowed_onchain: boolean;
208
+ cvm_ids: number[];
209
+ }, {
210
+ status: string;
211
+ device_id: string;
212
+ node_name: string | null;
213
+ allowed_onchain: boolean;
214
+ cvm_ids: number[];
215
+ }>, "many">>>;
216
+ }, "strip", z.ZodTypeAny, {
217
+ is_onchain_kms: boolean;
218
+ devices: {
219
+ status: string;
220
+ device_id: string;
221
+ node_name: string | null;
222
+ allowed_onchain: boolean;
223
+ cvm_ids: number[];
224
+ }[];
57
225
  app_contract_address?: string | null | undefined;
58
226
  allow_any_device?: boolean | null | undefined;
227
+ chain_id?: number | null | undefined;
59
228
  }, {
60
229
  is_onchain_kms: boolean;
230
+ app_contract_address?: string | null | undefined;
231
+ allow_any_device?: boolean | null | undefined;
61
232
  chain_id?: number | null | undefined;
62
233
  devices?: {
63
234
  status: string;
64
235
  device_id: string;
65
236
  node_name: string | null;
237
+ allowed_onchain: boolean;
66
238
  cvm_ids: number[];
239
+ }[] | undefined;
240
+ }>, z.ZodObject<{
241
+ is_onchain_kms: z.ZodBoolean;
242
+ allow_any_device: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
243
+ chain_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
244
+ app_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ } & {
246
+ devices: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
247
+ device_id: z.ZodString;
248
+ node_name: z.ZodNullable<z.ZodString>;
249
+ allowed_onchain: z.ZodBoolean;
250
+ status: z.ZodString;
251
+ } & {
252
+ cvm_ids: z.ZodArray<z.ZodString, "many">;
253
+ }, "strip", z.ZodTypeAny, {
254
+ status: string;
255
+ device_id: string;
256
+ node_name: string | null;
257
+ allowed_onchain: boolean;
258
+ cvm_ids: string[];
259
+ }, {
260
+ status: string;
261
+ device_id: string;
262
+ node_name: string | null;
263
+ allowed_onchain: boolean;
264
+ cvm_ids: string[];
265
+ }>, "many">>>;
266
+ }, "strip", z.ZodTypeAny, {
267
+ is_onchain_kms: boolean;
268
+ devices: {
269
+ status: string;
270
+ device_id: string;
271
+ node_name: string | null;
67
272
  allowed_onchain: boolean;
273
+ cvm_ids: string[];
274
+ }[];
275
+ app_contract_address?: string | null | undefined;
276
+ allow_any_device?: boolean | null | undefined;
277
+ chain_id?: number | null | undefined;
278
+ }, {
279
+ is_onchain_kms: boolean;
280
+ app_contract_address?: string | null | undefined;
281
+ allow_any_device?: boolean | null | undefined;
282
+ chain_id?: number | null | undefined;
283
+ devices?: {
284
+ status: string;
285
+ device_id: string;
286
+ node_name: string | null;
287
+ allowed_onchain: boolean;
288
+ cvm_ids: string[];
68
289
  }[] | undefined;
290
+ }>]>;
291
+ declare const DeviceAllowlistResponseSchema: z.ZodObject<{
292
+ is_onchain_kms: z.ZodBoolean;
293
+ allow_any_device: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
294
+ chain_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
295
+ app_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
296
+ } & {
297
+ devices: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
298
+ device_id: z.ZodString;
299
+ node_name: z.ZodNullable<z.ZodString>;
300
+ allowed_onchain: z.ZodBoolean;
301
+ status: z.ZodString;
302
+ } & {
303
+ cvm_ids: z.ZodArray<z.ZodString, "many">;
304
+ }, "strip", z.ZodTypeAny, {
305
+ status: string;
306
+ device_id: string;
307
+ node_name: string | null;
308
+ allowed_onchain: boolean;
309
+ cvm_ids: string[];
310
+ }, {
311
+ status: string;
312
+ device_id: string;
313
+ node_name: string | null;
314
+ allowed_onchain: boolean;
315
+ cvm_ids: string[];
316
+ }>, "many">>>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ is_onchain_kms: boolean;
319
+ devices: {
320
+ status: string;
321
+ device_id: string;
322
+ node_name: string | null;
323
+ allowed_onchain: boolean;
324
+ cvm_ids: string[];
325
+ }[];
326
+ app_contract_address?: string | null | undefined;
327
+ allow_any_device?: boolean | null | undefined;
328
+ chain_id?: number | null | undefined;
329
+ }, {
330
+ is_onchain_kms: boolean;
69
331
  app_contract_address?: string | null | undefined;
70
332
  allow_any_device?: boolean | null | undefined;
333
+ chain_id?: number | null | undefined;
334
+ devices?: {
335
+ status: string;
336
+ device_id: string;
337
+ node_name: string | null;
338
+ allowed_onchain: boolean;
339
+ cvm_ids: string[];
340
+ }[] | undefined;
71
341
  }>;
72
- export type DeviceAllowlistItem = z.infer<typeof DeviceAllowlistItemSchema>;
342
+ export type DeviceAllowlistItem = z.infer<typeof DeviceAllowlistItemV20260522Schema>;
73
343
  export type DeviceAllowlistResponse = z.infer<typeof DeviceAllowlistResponseSchema>;
344
+ export { DeviceAllowlistItemAnySchema, DeviceAllowlistResponseAnySchema };
74
345
  export declare const GetAppDeviceAllowlistRequestSchema: z.ZodObject<{
75
346
  appId: z.ZodString;
76
347
  }, "strict", z.ZodTypeAny, {
@@ -100,9 +371,8 @@ export type GetAppDeviceAllowlistRequest = z.infer<typeof GetAppDeviceAllowlistR
100
371
  * }
101
372
  * ```
102
373
  */
103
- export declare function getAppDeviceAllowlist<V extends ApiVersion>(client: Client<V>, request: GetAppDeviceAllowlistRequest): Promise<DeviceAllowlistResponse>;
374
+ export declare function getAppDeviceAllowlist<V extends ApiVersion>(client: Client<V>, request: GetAppDeviceAllowlistRequest): Promise<GetAppDeviceAllowlistResponse<V>>;
104
375
  /**
105
376
  * Safe version of getAppDeviceAllowlist that returns a SafeResult instead of throwing
106
377
  */
107
- export declare function safeGetAppDeviceAllowlist<V extends ApiVersion>(client: Client<V>, request: GetAppDeviceAllowlistRequest): Promise<SafeResult<DeviceAllowlistResponse>>;
108
- export {};
378
+ export declare function safeGetAppDeviceAllowlist<V extends ApiVersion>(client: Client<V>, request: GetAppDeviceAllowlistRequest): Promise<SafeResult<GetAppDeviceAllowlistResponse<V>>>;
@@ -11,17 +11,17 @@ export declare const AppFilterOptionsSchema: z.ZodObject<{
11
11
  nodes: z.ZodArray<z.ZodString, "many">;
12
12
  }, "strip", z.ZodTypeAny, {
13
13
  nodes: string[];
14
+ instance_types: string[];
14
15
  statuses: string[];
15
16
  image_versions: string[];
16
- instance_types: string[];
17
17
  kms_slugs: string[];
18
18
  kms_types: string[];
19
19
  regions: string[];
20
20
  }, {
21
21
  nodes: string[];
22
+ instance_types: string[];
22
23
  statuses: string[];
23
24
  image_versions: string[];
24
- instance_types: string[];
25
25
  kms_slugs: string[];
26
26
  kms_types: string[];
27
27
  regions: string[];
@@ -16,10 +16,10 @@ export declare const GetAppListRequestSchema: z.ZodObject<{
16
16
  region: z.ZodOptional<z.ZodString>;
17
17
  }, "strict", z.ZodTypeAny, {
18
18
  status?: string[] | undefined;
19
+ base_image?: string | undefined;
19
20
  search?: string | undefined;
20
21
  node?: string | undefined;
21
22
  listed?: boolean | undefined;
22
- base_image?: string | undefined;
23
23
  instance_type?: string | undefined;
24
24
  page?: number | undefined;
25
25
  page_size?: number | undefined;
@@ -28,10 +28,10 @@ export declare const GetAppListRequestSchema: z.ZodObject<{
28
28
  region?: string | undefined;
29
29
  }, {
30
30
  status?: string[] | undefined;
31
+ base_image?: string | undefined;
31
32
  search?: string | undefined;
32
33
  node?: string | undefined;
33
34
  listed?: boolean | undefined;
34
- base_image?: string | undefined;
35
35
  instance_type?: string | undefined;
36
36
  page?: number | undefined;
37
37
  page_size?: number | undefined;
@@ -1,6 +1,41 @@
1
1
  import { z } from "zod";
2
- export declare const IsAllowedResultSchema: z.ZodObject<{
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { ApiVersion } from "../../types/client";
4
+ import type { CheckCvmIsAllowedResponse } from "../../types/version-mappings";
5
+ export declare const IsAllowedResultV20260121Schema: z.ZodObject<{
6
+ app_contract_address: z.ZodString;
7
+ compose_hash: z.ZodString;
8
+ device_id: z.ZodString;
9
+ compose_hash_allowed: z.ZodBoolean;
10
+ allow_any_device: z.ZodBoolean;
11
+ device_id_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
12
+ is_allowed: z.ZodBoolean;
13
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
14
+ } & {
3
15
  cvm_id: z.ZodOptional<z.ZodNumber>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ app_contract_address: string;
18
+ compose_hash: string;
19
+ device_id: string;
20
+ compose_hash_allowed: boolean;
21
+ allow_any_device: boolean;
22
+ is_allowed: boolean;
23
+ error?: string | null | undefined;
24
+ device_id_allowed?: boolean | null | undefined;
25
+ cvm_id?: number | undefined;
26
+ }, {
27
+ app_contract_address: string;
28
+ compose_hash: string;
29
+ device_id: string;
30
+ compose_hash_allowed: boolean;
31
+ allow_any_device: boolean;
32
+ is_allowed: boolean;
33
+ error?: string | null | undefined;
34
+ device_id_allowed?: boolean | null | undefined;
35
+ cvm_id?: number | undefined;
36
+ }>;
37
+ export type IsAllowedResultV20260121 = z.infer<typeof IsAllowedResultV20260121Schema>;
38
+ export declare const IsAllowedResultV20260522Schema: z.ZodObject<{
4
39
  app_contract_address: z.ZodString;
5
40
  compose_hash: z.ZodString;
6
41
  device_id: z.ZodString;
@@ -9,26 +44,124 @@ export declare const IsAllowedResultSchema: z.ZodObject<{
9
44
  device_id_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10
45
  is_allowed: z.ZodBoolean;
11
46
  error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
+ } & {
48
+ cvm_id: z.ZodOptional<z.ZodString>;
12
49
  }, "strip", z.ZodTypeAny, {
50
+ app_contract_address: string;
51
+ compose_hash: string;
13
52
  device_id: string;
53
+ compose_hash_allowed: boolean;
54
+ allow_any_device: boolean;
55
+ is_allowed: boolean;
56
+ error?: string | null | undefined;
57
+ device_id_allowed?: boolean | null | undefined;
58
+ cvm_id?: string | undefined;
59
+ }, {
60
+ app_contract_address: string;
14
61
  compose_hash: string;
62
+ device_id: string;
15
63
  compose_hash_allowed: boolean;
64
+ allow_any_device: boolean;
16
65
  is_allowed: boolean;
66
+ error?: string | null | undefined;
67
+ device_id_allowed?: boolean | null | undefined;
68
+ cvm_id?: string | undefined;
69
+ }>;
70
+ export type IsAllowedResultV20260522 = z.infer<typeof IsAllowedResultV20260522Schema>;
71
+ export declare const IsAllowedResultAnySchema: z.ZodUnion<[z.ZodObject<{
72
+ app_contract_address: z.ZodString;
73
+ compose_hash: z.ZodString;
74
+ device_id: z.ZodString;
75
+ compose_hash_allowed: z.ZodBoolean;
76
+ allow_any_device: z.ZodBoolean;
77
+ device_id_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
78
+ is_allowed: z.ZodBoolean;
79
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ } & {
81
+ cvm_id: z.ZodOptional<z.ZodNumber>;
82
+ }, "strip", z.ZodTypeAny, {
17
83
  app_contract_address: string;
84
+ compose_hash: string;
85
+ device_id: string;
86
+ compose_hash_allowed: boolean;
18
87
  allow_any_device: boolean;
88
+ is_allowed: boolean;
19
89
  error?: string | null | undefined;
20
90
  device_id_allowed?: boolean | null | undefined;
21
91
  cvm_id?: number | undefined;
22
92
  }, {
93
+ app_contract_address: string;
94
+ compose_hash: string;
23
95
  device_id: string;
96
+ compose_hash_allowed: boolean;
97
+ allow_any_device: boolean;
98
+ is_allowed: boolean;
99
+ error?: string | null | undefined;
100
+ device_id_allowed?: boolean | null | undefined;
101
+ cvm_id?: number | undefined;
102
+ }>, z.ZodObject<{
103
+ app_contract_address: z.ZodString;
104
+ compose_hash: z.ZodString;
105
+ device_id: z.ZodString;
106
+ compose_hash_allowed: z.ZodBoolean;
107
+ allow_any_device: z.ZodBoolean;
108
+ device_id_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
109
+ is_allowed: z.ZodBoolean;
110
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
111
+ } & {
112
+ cvm_id: z.ZodOptional<z.ZodString>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ app_contract_address: string;
24
115
  compose_hash: string;
116
+ device_id: string;
25
117
  compose_hash_allowed: boolean;
118
+ allow_any_device: boolean;
26
119
  is_allowed: boolean;
120
+ error?: string | null | undefined;
121
+ device_id_allowed?: boolean | null | undefined;
122
+ cvm_id?: string | undefined;
123
+ }, {
27
124
  app_contract_address: string;
125
+ compose_hash: string;
126
+ device_id: string;
127
+ compose_hash_allowed: boolean;
28
128
  allow_any_device: boolean;
129
+ is_allowed: boolean;
29
130
  error?: string | null | undefined;
30
131
  device_id_allowed?: boolean | null | undefined;
31
- cvm_id?: number | undefined;
132
+ cvm_id?: string | undefined;
133
+ }>]>;
134
+ export declare const IsAllowedResultSchema: z.ZodObject<{
135
+ app_contract_address: z.ZodString;
136
+ compose_hash: z.ZodString;
137
+ device_id: z.ZodString;
138
+ compose_hash_allowed: z.ZodBoolean;
139
+ allow_any_device: z.ZodBoolean;
140
+ device_id_allowed: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
141
+ is_allowed: z.ZodBoolean;
142
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
143
+ } & {
144
+ cvm_id: z.ZodOptional<z.ZodString>;
145
+ }, "strip", z.ZodTypeAny, {
146
+ app_contract_address: string;
147
+ compose_hash: string;
148
+ device_id: string;
149
+ compose_hash_allowed: boolean;
150
+ allow_any_device: boolean;
151
+ is_allowed: boolean;
152
+ error?: string | null | undefined;
153
+ device_id_allowed?: boolean | null | undefined;
154
+ cvm_id?: string | undefined;
155
+ }, {
156
+ app_contract_address: string;
157
+ compose_hash: string;
158
+ device_id: string;
159
+ compose_hash_allowed: boolean;
160
+ allow_any_device: boolean;
161
+ is_allowed: boolean;
162
+ error?: string | null | undefined;
163
+ device_id_allowed?: boolean | null | undefined;
164
+ cvm_id?: string | undefined;
32
165
  }>;
33
166
  export type IsAllowedResult = z.infer<typeof IsAllowedResultSchema>;
34
167
  declare const CheckCvmIsAllowedInputSchema: z.ZodObject<{
@@ -38,13 +171,13 @@ declare const CheckCvmIsAllowedInputSchema: z.ZodObject<{
38
171
  device_id: z.ZodOptional<z.ZodString>;
39
172
  }, "strip", z.ZodTypeAny, {
40
173
  cvmId: string;
41
- device_id?: string | undefined;
42
174
  compose_hash?: string | undefined;
175
+ device_id?: string | undefined;
43
176
  node_id?: number | undefined;
44
177
  }, {
45
178
  cvmId: string;
46
- device_id?: string | undefined;
47
179
  compose_hash?: string | undefined;
180
+ device_id?: string | undefined;
48
181
  node_id?: number | undefined;
49
182
  }>;
50
183
  export declare const CheckCvmIsAllowedRequestSchema: z.ZodObject<{
@@ -54,13 +187,13 @@ export declare const CheckCvmIsAllowedRequestSchema: z.ZodObject<{
54
187
  device_id: z.ZodOptional<z.ZodString>;
55
188
  }, "strip", z.ZodTypeAny, {
56
189
  cvmId: string;
57
- device_id?: string | undefined;
58
190
  compose_hash?: string | undefined;
191
+ device_id?: string | undefined;
59
192
  node_id?: number | undefined;
60
193
  }, {
61
194
  cvmId: string;
62
- device_id?: string | undefined;
63
195
  compose_hash?: string | undefined;
196
+ device_id?: string | undefined;
64
197
  node_id?: number | undefined;
65
198
  }>;
66
199
  export type CheckCvmIsAllowedRequest = z.infer<typeof CheckCvmIsAllowedInputSchema>;
@@ -75,71 +208,6 @@ export type CheckCvmIsAllowedRequest = z.infer<typeof CheckCvmIsAllowedInputSche
75
208
  * @param request.device_id - Optional device ID override
76
209
  * @returns On-chain allowance check result
77
210
  */
78
- declare const checkCvmIsAllowed: {
79
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
80
- cvmId: string;
81
- device_id?: string | undefined;
82
- compose_hash?: string | undefined;
83
- node_id?: number | undefined;
84
- }): Promise<{
85
- device_id: string;
86
- compose_hash: string;
87
- compose_hash_allowed: boolean;
88
- is_allowed: boolean;
89
- app_contract_address: string;
90
- allow_any_device: boolean;
91
- error?: string | null | undefined;
92
- device_id_allowed?: boolean | null | undefined;
93
- cvm_id?: number | undefined;
94
- }>;
95
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
96
- cvmId: string;
97
- device_id?: string | undefined;
98
- compose_hash?: string | undefined;
99
- node_id?: number | undefined;
100
- }, parameters: {
101
- schema: T;
102
- }): Promise<z.TypeOf<T>>;
103
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
104
- cvmId: string;
105
- device_id?: string | undefined;
106
- compose_hash?: string | undefined;
107
- node_id?: number | undefined;
108
- }, parameters: {
109
- schema: false;
110
- }): Promise<unknown>;
111
- }, safeCheckCvmIsAllowed: {
112
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
113
- cvmId: string;
114
- device_id?: string | undefined;
115
- compose_hash?: string | undefined;
116
- node_id?: number | undefined;
117
- }): Promise<import("../..").SafeResult<{
118
- device_id: string;
119
- compose_hash: string;
120
- compose_hash_allowed: boolean;
121
- is_allowed: boolean;
122
- app_contract_address: string;
123
- allow_any_device: boolean;
124
- error?: string | null | undefined;
125
- device_id_allowed?: boolean | null | undefined;
126
- cvm_id?: number | undefined;
127
- }>>;
128
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
129
- cvmId: string;
130
- device_id?: string | undefined;
131
- compose_hash?: string | undefined;
132
- node_id?: number | undefined;
133
- }, parameters: {
134
- schema: T;
135
- }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
136
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
137
- cvmId: string;
138
- device_id?: string | undefined;
139
- compose_hash?: string | undefined;
140
- node_id?: number | undefined;
141
- }, parameters: {
142
- schema: false;
143
- }): Promise<import("../..").SafeResult<unknown>>;
144
- };
145
- export { checkCvmIsAllowed, safeCheckCvmIsAllowed };
211
+ export declare function checkCvmIsAllowed<V extends ApiVersion>(client: Client<V>, request: CheckCvmIsAllowedRequest): Promise<CheckCvmIsAllowedResponse<V>>;
212
+ export declare function safeCheckCvmIsAllowed<V extends ApiVersion>(client: Client<V>, request: CheckCvmIsAllowedRequest): Promise<SafeResult<CheckCvmIsAllowedResponse<V>>>;
213
+ export {};