@phala/cloud 0.4.0 → 0.5.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 (110) hide show
  1. package/README.md +20 -0
  2. package/dist/actions/api_tokens/revoke_current_api_token.d.ts +47 -0
  3. package/dist/actions/apps/app_launch_token.d.ts +121 -0
  4. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +17 -311
  5. package/dist/actions/apps/check_app_is_allowed.d.ts +20 -32
  6. package/dist/actions/apps/create_app_instance.d.ts +43 -63
  7. package/dist/actions/apps/get_app_attestation.d.ts +113 -779
  8. package/dist/actions/apps/get_app_cvms.d.ts +1 -5
  9. package/dist/actions/apps/get_app_device_allowlist.d.ts +26 -272
  10. package/dist/actions/apps/get_app_filter_options.d.ts +8 -24
  11. package/dist/actions/apps/get_app_info.d.ts +1 -5
  12. package/dist/actions/apps/get_app_list.d.ts +2 -26
  13. package/dist/actions/apps/get_app_revision_detail.d.ts +1 -9
  14. package/dist/actions/apps/get_app_revisions.d.ts +1 -9
  15. package/dist/actions/blockchains/add_compose_hash.d.ts +1 -13
  16. package/dist/actions/blockchains/add_device.d.ts +1 -13
  17. package/dist/actions/blockchains/deploy_app_auth.d.ts +3 -95
  18. package/dist/actions/blockchains/get_allowed_devices.d.ts +2 -12
  19. package/dist/actions/blockchains/remove_device.d.ts +1 -13
  20. package/dist/actions/blockchains/set_allow_any_device.d.ts +1 -13
  21. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +13 -138
  22. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +9 -45
  23. package/dist/actions/cvms/commit_cvm_provision.d.ts +32 -422
  24. package/dist/actions/cvms/commit_cvm_update.d.ts +70 -41
  25. package/dist/actions/cvms/confirm_cvm_patch.d.ts +62 -35
  26. package/dist/actions/cvms/cvm_annotations.d.ts +152 -0
  27. package/dist/actions/cvms/delete_cvm.d.ts +8 -14
  28. package/dist/actions/cvms/get_available_os_images.d.ts +70 -111
  29. package/dist/actions/cvms/get_cvm_attestation.d.ts +34 -392
  30. package/dist/actions/cvms/get_cvm_compose_file.d.ts +384 -614
  31. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +25 -91
  32. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +8 -14
  33. package/dist/actions/cvms/get_cvm_info.d.ts +6 -12
  34. package/dist/actions/cvms/get_cvm_init_scripts.d.ts +87 -0
  35. package/dist/actions/cvms/get_cvm_list.d.ts +7 -13
  36. package/dist/actions/cvms/get_cvm_network.d.ts +18 -50
  37. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +8 -14
  38. package/dist/actions/cvms/get_cvm_state.d.ts +11 -37
  39. package/dist/actions/cvms/get_cvm_stats.d.ts +23 -149
  40. package/dist/actions/cvms/get_cvm_status_batch.d.ts +19 -209
  41. package/dist/actions/cvms/get_cvm_user_config.d.ts +13 -24
  42. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +9 -27
  43. package/dist/actions/cvms/patch_cvm.d.ts +658 -295
  44. package/dist/actions/cvms/provision_cvm.d.ts +326 -1561
  45. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +550 -953
  46. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +74 -131
  47. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +77 -297
  48. package/dist/actions/cvms/replicate_cvm.d.ts +7 -21
  49. package/dist/actions/cvms/restart_cvm.d.ts +3 -18
  50. package/dist/actions/cvms/shutdown_cvm.d.ts +6 -12
  51. package/dist/actions/cvms/start_cvm.d.ts +6 -12
  52. package/dist/actions/cvms/stop_cvm.d.ts +6 -12
  53. package/dist/actions/cvms/update_cvm_envs.d.ts +136 -203
  54. package/dist/actions/cvms/update_cvm_resources.d.ts +82 -48
  55. package/dist/actions/cvms/update_cvm_visibility.d.ts +90 -132
  56. package/dist/actions/cvms/update_docker_compose.d.ts +127 -202
  57. package/dist/actions/cvms/update_os_image.d.ts +55 -28
  58. package/dist/actions/cvms/update_prelaunch_script.d.ts +127 -202
  59. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +118 -193
  60. package/dist/actions/cvms/watch_cvm_state.d.ts +5 -15
  61. package/dist/actions/get_available_nodes.d.ts +186 -1067
  62. package/dist/actions/get_cvm_create_resources.d.ts +138 -2489
  63. package/dist/actions/index.d.ts +8 -2
  64. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +11 -23
  65. package/dist/actions/kms/get_kms_contract.d.ts +25 -27
  66. package/dist/actions/kms/get_kms_info.d.ts +3 -7
  67. package/dist/actions/kms/get_kms_list.d.ts +34 -88
  68. package/dist/actions/kms/get_kms_onchain_detail.d.ts +66 -664
  69. package/dist/actions/kms/list_kms_contract_nodes.d.ts +21 -53
  70. package/dist/actions/kms/list_kms_contracts.d.ts +33 -87
  71. package/dist/actions/kms/next_app_ids.d.ts +5 -25
  72. package/dist/actions/list-instance-types.d.ts +77 -257
  73. package/dist/actions/os_images/get_os_images.d.ts +38 -152
  74. package/dist/actions/ssh_keys/create_ssh_key.d.ts +11 -17
  75. package/dist/actions/ssh_keys/delete_ssh_key.d.ts +3 -7
  76. package/dist/actions/ssh_keys/get_cvm_ssh_keys.d.ts +113 -0
  77. package/dist/actions/ssh_keys/import_github_profile.d.ts +7 -21
  78. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +2 -50
  79. package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +8 -20
  80. package/dist/actions/ssh_keys/update_cvm_ssh_keys.d.ts +140 -0
  81. package/dist/actions/workspaces/get_workspace.d.ts +32 -28
  82. package/dist/actions/workspaces/get_workspace_nodes.d.ts +34 -321
  83. package/dist/actions/workspaces/get_workspace_quotas.d.ts +107 -1021
  84. package/dist/actions/workspaces/list_workspaces.d.ts +67 -369
  85. package/dist/client.d.ts +23 -4
  86. package/dist/create-client.d.ts +1772 -1
  87. package/dist/credentials/current_user_v20251028.d.ts +1 -17
  88. package/dist/credentials/current_user_v20260121.d.ts +22 -227
  89. package/dist/index.d.ts +0 -1
  90. package/dist/index.js +5010 -4265
  91. package/dist/index.mjs +4892 -4192
  92. package/dist/types/app_compose.d.ts +108 -221
  93. package/dist/types/app_info_v20251028.d.ts +22 -1067
  94. package/dist/types/app_info_v20260121.d.ts +430 -8900
  95. package/dist/types/app_revision.d.ts +15 -371
  96. package/dist/types/client.d.ts +16 -0
  97. package/dist/types/common.d.ts +6 -0
  98. package/dist/types/cvm_id.d.ts +12 -57
  99. package/dist/types/cvm_info.d.ts +33 -460
  100. package/dist/types/cvm_info_v20251028.d.ts +99 -820
  101. package/dist/types/cvm_info_v20260121.d.ts +247 -3160
  102. package/dist/types/kms_contract.d.ts +2 -32
  103. package/dist/types/kms_info.d.ts +34 -68
  104. package/dist/utils/define-action.d.ts +4 -4
  105. package/dist/utils/errors.d.ts +4 -36
  106. package/dist/utils/get_compose_hash.d.ts +36 -5
  107. package/dist/utils/get_mr_config_id.d.ts +94 -3
  108. package/dist/utils/index.d.ts +1 -1
  109. package/dist/utils/placement-request.d.ts +3 -0
  110. package/package.json +4 -4
@@ -1,4 +1,5 @@
1
1
  import { Client as BaseClient } from "./client";
2
+ import * as actions from "./actions";
2
3
  import type { ClientConfig, ApiVersion, DefaultApiVersion } from "./types/client";
3
4
  import type { z } from "zod";
4
5
  import type { GetCurrentUserResponse, GetCvmListResponse, GetCvmInfoResponse } from "./types/version-mappings";
@@ -52,6 +53,1750 @@ import { type GetKmsOnChainDetailRequest, type GetKmsOnChainDetailResponse } fro
52
53
  import type { KmsInfo } from "./types/kms_info";
53
54
  import type { VM } from "./types/cvm_info";
54
55
  import type { SafeResult } from "./types/client";
56
+ declare const additionalActions: {
57
+ getWorkspaceNodes: {
58
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceNodesRequest): Promise<{
59
+ [x: string]: unknown;
60
+ items: {
61
+ object_type: "node";
62
+ device_ids: {
63
+ device_id: string;
64
+ algorithm_version: string;
65
+ enabled: boolean;
66
+ }[];
67
+ node: string;
68
+ id?: number | null | undefined;
69
+ name?: string | null | undefined;
70
+ region?: string | null | undefined;
71
+ device_id?: string | null | undefined;
72
+ ppid?: string | null | undefined;
73
+ status?: string | null | undefined;
74
+ version?: string | null | undefined;
75
+ }[];
76
+ total: number;
77
+ page: number;
78
+ page_size: number;
79
+ pages: number;
80
+ }>;
81
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: actions.GetWorkspaceNodesRequest, parameters: {
82
+ schema: T;
83
+ }): Promise<z.core.output<T>>;
84
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceNodesRequest, parameters: {
85
+ schema: false;
86
+ }): Promise<unknown>;
87
+ };
88
+ safeGetWorkspaceNodes: {
89
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceNodesRequest): Promise<SafeResult<{
90
+ [x: string]: unknown;
91
+ items: {
92
+ object_type: "node";
93
+ device_ids: {
94
+ device_id: string;
95
+ algorithm_version: string;
96
+ enabled: boolean;
97
+ }[];
98
+ node: string;
99
+ id?: number | null | undefined;
100
+ name?: string | null | undefined;
101
+ region?: string | null | undefined;
102
+ device_id?: string | null | undefined;
103
+ ppid?: string | null | undefined;
104
+ status?: string | null | undefined;
105
+ version?: string | null | undefined;
106
+ }[];
107
+ total: number;
108
+ page: number;
109
+ page_size: number;
110
+ pages: number;
111
+ }>>;
112
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: actions.GetWorkspaceNodesRequest, parameters: {
113
+ schema: T;
114
+ }): Promise<SafeResult<z.core.output<T>>>;
115
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceNodesRequest, parameters: {
116
+ schema: false;
117
+ }): Promise<SafeResult<unknown>>;
118
+ };
119
+ getWorkspaceQuotas: {
120
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceQuotasRequest): Promise<{
121
+ [x: string]: unknown;
122
+ team_slug: string;
123
+ tier: string;
124
+ quotas: {
125
+ [x: string]: unknown;
126
+ vm_slots: {
127
+ [x: string]: unknown;
128
+ limit: number;
129
+ remaining: number;
130
+ };
131
+ vcpu: {
132
+ [x: string]: unknown;
133
+ limit: number;
134
+ remaining: number;
135
+ };
136
+ memory_mb: {
137
+ [x: string]: unknown;
138
+ limit: number;
139
+ remaining: number;
140
+ };
141
+ disk_gb: {
142
+ [x: string]: unknown;
143
+ limit: number;
144
+ remaining: number;
145
+ };
146
+ };
147
+ reserved_nodes: {
148
+ [x: string]: unknown;
149
+ limit: number;
150
+ remaining: number;
151
+ };
152
+ reserved_gpu: {
153
+ [x: string]: unknown;
154
+ gpus: {
155
+ [x: string]: unknown;
156
+ limit: number;
157
+ remaining: number;
158
+ };
159
+ in_use: number;
160
+ misconfigured: number;
161
+ };
162
+ as_of: string;
163
+ }>;
164
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: actions.GetWorkspaceQuotasRequest, parameters: {
165
+ schema: T;
166
+ }): Promise<z.core.output<T>>;
167
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceQuotasRequest, parameters: {
168
+ schema: false;
169
+ }): Promise<unknown>;
170
+ };
171
+ safeGetWorkspaceQuotas: {
172
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceQuotasRequest): Promise<SafeResult<{
173
+ [x: string]: unknown;
174
+ team_slug: string;
175
+ tier: string;
176
+ quotas: {
177
+ [x: string]: unknown;
178
+ vm_slots: {
179
+ [x: string]: unknown;
180
+ limit: number;
181
+ remaining: number;
182
+ };
183
+ vcpu: {
184
+ [x: string]: unknown;
185
+ limit: number;
186
+ remaining: number;
187
+ };
188
+ memory_mb: {
189
+ [x: string]: unknown;
190
+ limit: number;
191
+ remaining: number;
192
+ };
193
+ disk_gb: {
194
+ [x: string]: unknown;
195
+ limit: number;
196
+ remaining: number;
197
+ };
198
+ };
199
+ reserved_nodes: {
200
+ [x: string]: unknown;
201
+ limit: number;
202
+ remaining: number;
203
+ };
204
+ reserved_gpu: {
205
+ [x: string]: unknown;
206
+ gpus: {
207
+ [x: string]: unknown;
208
+ limit: number;
209
+ remaining: number;
210
+ };
211
+ in_use: number;
212
+ misconfigured: number;
213
+ };
214
+ as_of: string;
215
+ }>>;
216
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: actions.GetWorkspaceQuotasRequest, parameters: {
217
+ schema: T;
218
+ }): Promise<SafeResult<z.core.output<T>>>;
219
+ (client: BaseClient<ApiVersion>, params: actions.GetWorkspaceQuotasRequest, parameters: {
220
+ schema: false;
221
+ }): Promise<SafeResult<unknown>>;
222
+ };
223
+ replicateCvm: typeof actions.replicateCvm;
224
+ safeReplicateCvm: typeof actions.safeReplicateCvm;
225
+ watchCvmState: typeof actions.watchCvmState;
226
+ patchCvm: {
227
+ (client: BaseClient<ApiVersion>, params: {
228
+ id?: string | undefined;
229
+ uuid?: string | undefined;
230
+ app_id?: string | undefined;
231
+ instance_id?: string | undefined;
232
+ name?: string | undefined;
233
+ docker_compose_file?: string | undefined;
234
+ pre_launch_script?: string | undefined;
235
+ allowed_envs?: string[] | undefined;
236
+ public_logs?: boolean | undefined;
237
+ public_sysinfo?: boolean | undefined;
238
+ public_tcbinfo?: boolean | undefined;
239
+ compose?: {
240
+ [x: string]: unknown;
241
+ secure_time?: boolean | null | undefined;
242
+ swap_size?: string | null | undefined;
243
+ storage_discard?: boolean | null | undefined;
244
+ snapshotter?: "overlayfs" | "stargz" | null | undefined;
245
+ gateway_enabled?: boolean | null | undefined;
246
+ port_policy?: {
247
+ ports?: {
248
+ port: number;
249
+ pp?: boolean | undefined;
250
+ }[] | undefined;
251
+ restrict_mode?: boolean | undefined;
252
+ } | null | undefined;
253
+ event_log_version?: 1 | 2 | null | undefined;
254
+ requirements?: {
255
+ [x: string]: unknown;
256
+ ephemeral_data_disk?: boolean | null | undefined;
257
+ health_check?: boolean | null | undefined;
258
+ health_status_file?: string | null | undefined;
259
+ launch_token_hash?: string | null | undefined;
260
+ platforms?: string[] | null | undefined;
261
+ tdx_measure_acpi_tables?: boolean | null | undefined;
262
+ } | null | undefined;
263
+ kms_enabled?: boolean | null | undefined;
264
+ key_provider?: "none" | "kms" | "local" | "tpm" | null | undefined;
265
+ key_provider_id?: string | null | undefined;
266
+ local_key_provider_enabled?: boolean | null | undefined;
267
+ manifest_version?: string | number | null | undefined;
268
+ no_instance_id?: boolean | null | undefined;
269
+ runner?: string | null | undefined;
270
+ storage_fs?: "ext4" | "zfs" | null | undefined;
271
+ verity_volumes?: {
272
+ source: string;
273
+ target: string;
274
+ verity_root: string;
275
+ }[] | null | undefined;
276
+ tproxy_enabled?: boolean | null | undefined;
277
+ features?: string[] | null | undefined;
278
+ } | undefined;
279
+ init_scripts?: ("docker_cleanup" | "env_merge")[] | undefined;
280
+ confirm_data_wipe?: boolean | undefined;
281
+ encrypted_env?: string | undefined;
282
+ user_config?: string | undefined;
283
+ gpus?: {
284
+ gpus: {
285
+ slot: string;
286
+ product_id?: string | undefined;
287
+ }[];
288
+ attach_mode?: string | undefined;
289
+ } | undefined;
290
+ vcpu?: number | undefined;
291
+ memory?: number | undefined;
292
+ disk_size?: number | undefined;
293
+ instance_type?: string | undefined;
294
+ image?: string | undefined;
295
+ shutdown_timeout?: number | undefined;
296
+ allow_force_stop?: boolean | undefined;
297
+ prepareOnly?: boolean | undefined;
298
+ }): Promise<{
299
+ requiresOnChainHash: false;
300
+ correlationId: string;
301
+ } | {
302
+ requiresOnChainHash: true;
303
+ composeHash: string;
304
+ appId: string;
305
+ deviceId: string;
306
+ kmsInfo: {
307
+ [x: string]: unknown;
308
+ id: string;
309
+ slug: string | null;
310
+ url: string;
311
+ version: string;
312
+ chain_id: number | null;
313
+ kms_contract_address: `0x${string}`;
314
+ gateway_app_id: `0x${string}`;
315
+ k256_pubkey?: string | null | undefined;
316
+ };
317
+ commitToken?: string | undefined;
318
+ commitUrl?: string | undefined;
319
+ apiCommitUrl?: string | undefined;
320
+ onchainStatus?: {
321
+ compose_hash_allowed: boolean;
322
+ device_id_allowed: boolean;
323
+ is_allowed: boolean;
324
+ } | undefined;
325
+ }>;
326
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
327
+ id?: string | undefined;
328
+ uuid?: string | undefined;
329
+ app_id?: string | undefined;
330
+ instance_id?: string | undefined;
331
+ name?: string | undefined;
332
+ docker_compose_file?: string | undefined;
333
+ pre_launch_script?: string | undefined;
334
+ allowed_envs?: string[] | undefined;
335
+ public_logs?: boolean | undefined;
336
+ public_sysinfo?: boolean | undefined;
337
+ public_tcbinfo?: boolean | undefined;
338
+ compose?: {
339
+ [x: string]: unknown;
340
+ secure_time?: boolean | null | undefined;
341
+ swap_size?: string | null | undefined;
342
+ storage_discard?: boolean | null | undefined;
343
+ snapshotter?: "overlayfs" | "stargz" | null | undefined;
344
+ gateway_enabled?: boolean | null | undefined;
345
+ port_policy?: {
346
+ ports?: {
347
+ port: number;
348
+ pp?: boolean | undefined;
349
+ }[] | undefined;
350
+ restrict_mode?: boolean | undefined;
351
+ } | null | undefined;
352
+ event_log_version?: 1 | 2 | null | undefined;
353
+ requirements?: {
354
+ [x: string]: unknown;
355
+ ephemeral_data_disk?: boolean | null | undefined;
356
+ health_check?: boolean | null | undefined;
357
+ health_status_file?: string | null | undefined;
358
+ launch_token_hash?: string | null | undefined;
359
+ platforms?: string[] | null | undefined;
360
+ tdx_measure_acpi_tables?: boolean | null | undefined;
361
+ } | null | undefined;
362
+ kms_enabled?: boolean | null | undefined;
363
+ key_provider?: "none" | "kms" | "local" | "tpm" | null | undefined;
364
+ key_provider_id?: string | null | undefined;
365
+ local_key_provider_enabled?: boolean | null | undefined;
366
+ manifest_version?: string | number | null | undefined;
367
+ no_instance_id?: boolean | null | undefined;
368
+ runner?: string | null | undefined;
369
+ storage_fs?: "ext4" | "zfs" | null | undefined;
370
+ verity_volumes?: {
371
+ source: string;
372
+ target: string;
373
+ verity_root: string;
374
+ }[] | null | undefined;
375
+ tproxy_enabled?: boolean | null | undefined;
376
+ features?: string[] | null | undefined;
377
+ } | undefined;
378
+ init_scripts?: ("docker_cleanup" | "env_merge")[] | undefined;
379
+ confirm_data_wipe?: boolean | undefined;
380
+ encrypted_env?: string | undefined;
381
+ user_config?: string | undefined;
382
+ gpus?: {
383
+ gpus: {
384
+ slot: string;
385
+ product_id?: string | undefined;
386
+ }[];
387
+ attach_mode?: string | undefined;
388
+ } | undefined;
389
+ vcpu?: number | undefined;
390
+ memory?: number | undefined;
391
+ disk_size?: number | undefined;
392
+ instance_type?: string | undefined;
393
+ image?: string | undefined;
394
+ shutdown_timeout?: number | undefined;
395
+ allow_force_stop?: boolean | undefined;
396
+ prepareOnly?: boolean | undefined;
397
+ }, parameters: {
398
+ schema: T;
399
+ }): Promise<z.core.output<T>>;
400
+ (client: BaseClient<ApiVersion>, params: {
401
+ id?: string | undefined;
402
+ uuid?: string | undefined;
403
+ app_id?: string | undefined;
404
+ instance_id?: string | undefined;
405
+ name?: string | undefined;
406
+ docker_compose_file?: string | undefined;
407
+ pre_launch_script?: string | undefined;
408
+ allowed_envs?: string[] | undefined;
409
+ public_logs?: boolean | undefined;
410
+ public_sysinfo?: boolean | undefined;
411
+ public_tcbinfo?: boolean | undefined;
412
+ compose?: {
413
+ [x: string]: unknown;
414
+ secure_time?: boolean | null | undefined;
415
+ swap_size?: string | null | undefined;
416
+ storage_discard?: boolean | null | undefined;
417
+ snapshotter?: "overlayfs" | "stargz" | null | undefined;
418
+ gateway_enabled?: boolean | null | undefined;
419
+ port_policy?: {
420
+ ports?: {
421
+ port: number;
422
+ pp?: boolean | undefined;
423
+ }[] | undefined;
424
+ restrict_mode?: boolean | undefined;
425
+ } | null | undefined;
426
+ event_log_version?: 1 | 2 | null | undefined;
427
+ requirements?: {
428
+ [x: string]: unknown;
429
+ ephemeral_data_disk?: boolean | null | undefined;
430
+ health_check?: boolean | null | undefined;
431
+ health_status_file?: string | null | undefined;
432
+ launch_token_hash?: string | null | undefined;
433
+ platforms?: string[] | null | undefined;
434
+ tdx_measure_acpi_tables?: boolean | null | undefined;
435
+ } | null | undefined;
436
+ kms_enabled?: boolean | null | undefined;
437
+ key_provider?: "none" | "kms" | "local" | "tpm" | null | undefined;
438
+ key_provider_id?: string | null | undefined;
439
+ local_key_provider_enabled?: boolean | null | undefined;
440
+ manifest_version?: string | number | null | undefined;
441
+ no_instance_id?: boolean | null | undefined;
442
+ runner?: string | null | undefined;
443
+ storage_fs?: "ext4" | "zfs" | null | undefined;
444
+ verity_volumes?: {
445
+ source: string;
446
+ target: string;
447
+ verity_root: string;
448
+ }[] | null | undefined;
449
+ tproxy_enabled?: boolean | null | undefined;
450
+ features?: string[] | null | undefined;
451
+ } | undefined;
452
+ init_scripts?: ("docker_cleanup" | "env_merge")[] | undefined;
453
+ confirm_data_wipe?: boolean | undefined;
454
+ encrypted_env?: string | undefined;
455
+ user_config?: string | undefined;
456
+ gpus?: {
457
+ gpus: {
458
+ slot: string;
459
+ product_id?: string | undefined;
460
+ }[];
461
+ attach_mode?: string | undefined;
462
+ } | undefined;
463
+ vcpu?: number | undefined;
464
+ memory?: number | undefined;
465
+ disk_size?: number | undefined;
466
+ instance_type?: string | undefined;
467
+ image?: string | undefined;
468
+ shutdown_timeout?: number | undefined;
469
+ allow_force_stop?: boolean | undefined;
470
+ prepareOnly?: boolean | undefined;
471
+ }, parameters: {
472
+ schema: false;
473
+ }): Promise<unknown>;
474
+ };
475
+ safePatchCvm: {
476
+ (client: BaseClient<ApiVersion>, params: {
477
+ id?: string | undefined;
478
+ uuid?: string | undefined;
479
+ app_id?: string | undefined;
480
+ instance_id?: string | undefined;
481
+ name?: string | undefined;
482
+ docker_compose_file?: string | undefined;
483
+ pre_launch_script?: string | undefined;
484
+ allowed_envs?: string[] | undefined;
485
+ public_logs?: boolean | undefined;
486
+ public_sysinfo?: boolean | undefined;
487
+ public_tcbinfo?: boolean | undefined;
488
+ compose?: {
489
+ [x: string]: unknown;
490
+ secure_time?: boolean | null | undefined;
491
+ swap_size?: string | null | undefined;
492
+ storage_discard?: boolean | null | undefined;
493
+ snapshotter?: "overlayfs" | "stargz" | null | undefined;
494
+ gateway_enabled?: boolean | null | undefined;
495
+ port_policy?: {
496
+ ports?: {
497
+ port: number;
498
+ pp?: boolean | undefined;
499
+ }[] | undefined;
500
+ restrict_mode?: boolean | undefined;
501
+ } | null | undefined;
502
+ event_log_version?: 1 | 2 | null | undefined;
503
+ requirements?: {
504
+ [x: string]: unknown;
505
+ ephemeral_data_disk?: boolean | null | undefined;
506
+ health_check?: boolean | null | undefined;
507
+ health_status_file?: string | null | undefined;
508
+ launch_token_hash?: string | null | undefined;
509
+ platforms?: string[] | null | undefined;
510
+ tdx_measure_acpi_tables?: boolean | null | undefined;
511
+ } | null | undefined;
512
+ kms_enabled?: boolean | null | undefined;
513
+ key_provider?: "none" | "kms" | "local" | "tpm" | null | undefined;
514
+ key_provider_id?: string | null | undefined;
515
+ local_key_provider_enabled?: boolean | null | undefined;
516
+ manifest_version?: string | number | null | undefined;
517
+ no_instance_id?: boolean | null | undefined;
518
+ runner?: string | null | undefined;
519
+ storage_fs?: "ext4" | "zfs" | null | undefined;
520
+ verity_volumes?: {
521
+ source: string;
522
+ target: string;
523
+ verity_root: string;
524
+ }[] | null | undefined;
525
+ tproxy_enabled?: boolean | null | undefined;
526
+ features?: string[] | null | undefined;
527
+ } | undefined;
528
+ init_scripts?: ("docker_cleanup" | "env_merge")[] | undefined;
529
+ confirm_data_wipe?: boolean | undefined;
530
+ encrypted_env?: string | undefined;
531
+ user_config?: string | undefined;
532
+ gpus?: {
533
+ gpus: {
534
+ slot: string;
535
+ product_id?: string | undefined;
536
+ }[];
537
+ attach_mode?: string | undefined;
538
+ } | undefined;
539
+ vcpu?: number | undefined;
540
+ memory?: number | undefined;
541
+ disk_size?: number | undefined;
542
+ instance_type?: string | undefined;
543
+ image?: string | undefined;
544
+ shutdown_timeout?: number | undefined;
545
+ allow_force_stop?: boolean | undefined;
546
+ prepareOnly?: boolean | undefined;
547
+ }): Promise<SafeResult<{
548
+ requiresOnChainHash: false;
549
+ correlationId: string;
550
+ } | {
551
+ requiresOnChainHash: true;
552
+ composeHash: string;
553
+ appId: string;
554
+ deviceId: string;
555
+ kmsInfo: {
556
+ [x: string]: unknown;
557
+ id: string;
558
+ slug: string | null;
559
+ url: string;
560
+ version: string;
561
+ chain_id: number | null;
562
+ kms_contract_address: `0x${string}`;
563
+ gateway_app_id: `0x${string}`;
564
+ k256_pubkey?: string | null | undefined;
565
+ };
566
+ commitToken?: string | undefined;
567
+ commitUrl?: string | undefined;
568
+ apiCommitUrl?: string | undefined;
569
+ onchainStatus?: {
570
+ compose_hash_allowed: boolean;
571
+ device_id_allowed: boolean;
572
+ is_allowed: boolean;
573
+ } | undefined;
574
+ }>>;
575
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
576
+ id?: string | undefined;
577
+ uuid?: string | undefined;
578
+ app_id?: string | undefined;
579
+ instance_id?: string | undefined;
580
+ name?: string | undefined;
581
+ docker_compose_file?: string | undefined;
582
+ pre_launch_script?: string | undefined;
583
+ allowed_envs?: string[] | undefined;
584
+ public_logs?: boolean | undefined;
585
+ public_sysinfo?: boolean | undefined;
586
+ public_tcbinfo?: boolean | undefined;
587
+ compose?: {
588
+ [x: string]: unknown;
589
+ secure_time?: boolean | null | undefined;
590
+ swap_size?: string | null | undefined;
591
+ storage_discard?: boolean | null | undefined;
592
+ snapshotter?: "overlayfs" | "stargz" | null | undefined;
593
+ gateway_enabled?: boolean | null | undefined;
594
+ port_policy?: {
595
+ ports?: {
596
+ port: number;
597
+ pp?: boolean | undefined;
598
+ }[] | undefined;
599
+ restrict_mode?: boolean | undefined;
600
+ } | null | undefined;
601
+ event_log_version?: 1 | 2 | null | undefined;
602
+ requirements?: {
603
+ [x: string]: unknown;
604
+ ephemeral_data_disk?: boolean | null | undefined;
605
+ health_check?: boolean | null | undefined;
606
+ health_status_file?: string | null | undefined;
607
+ launch_token_hash?: string | null | undefined;
608
+ platforms?: string[] | null | undefined;
609
+ tdx_measure_acpi_tables?: boolean | null | undefined;
610
+ } | null | undefined;
611
+ kms_enabled?: boolean | null | undefined;
612
+ key_provider?: "none" | "kms" | "local" | "tpm" | null | undefined;
613
+ key_provider_id?: string | null | undefined;
614
+ local_key_provider_enabled?: boolean | null | undefined;
615
+ manifest_version?: string | number | null | undefined;
616
+ no_instance_id?: boolean | null | undefined;
617
+ runner?: string | null | undefined;
618
+ storage_fs?: "ext4" | "zfs" | null | undefined;
619
+ verity_volumes?: {
620
+ source: string;
621
+ target: string;
622
+ verity_root: string;
623
+ }[] | null | undefined;
624
+ tproxy_enabled?: boolean | null | undefined;
625
+ features?: string[] | null | undefined;
626
+ } | undefined;
627
+ init_scripts?: ("docker_cleanup" | "env_merge")[] | undefined;
628
+ confirm_data_wipe?: boolean | undefined;
629
+ encrypted_env?: string | undefined;
630
+ user_config?: string | undefined;
631
+ gpus?: {
632
+ gpus: {
633
+ slot: string;
634
+ product_id?: string | undefined;
635
+ }[];
636
+ attach_mode?: string | undefined;
637
+ } | undefined;
638
+ vcpu?: number | undefined;
639
+ memory?: number | undefined;
640
+ disk_size?: number | undefined;
641
+ instance_type?: string | undefined;
642
+ image?: string | undefined;
643
+ shutdown_timeout?: number | undefined;
644
+ allow_force_stop?: boolean | undefined;
645
+ prepareOnly?: boolean | undefined;
646
+ }, parameters: {
647
+ schema: T;
648
+ }): Promise<SafeResult<z.core.output<T>>>;
649
+ (client: BaseClient<ApiVersion>, params: {
650
+ id?: string | undefined;
651
+ uuid?: string | undefined;
652
+ app_id?: string | undefined;
653
+ instance_id?: string | undefined;
654
+ name?: string | undefined;
655
+ docker_compose_file?: string | undefined;
656
+ pre_launch_script?: string | undefined;
657
+ allowed_envs?: string[] | undefined;
658
+ public_logs?: boolean | undefined;
659
+ public_sysinfo?: boolean | undefined;
660
+ public_tcbinfo?: boolean | undefined;
661
+ compose?: {
662
+ [x: string]: unknown;
663
+ secure_time?: boolean | null | undefined;
664
+ swap_size?: string | null | undefined;
665
+ storage_discard?: boolean | null | undefined;
666
+ snapshotter?: "overlayfs" | "stargz" | null | undefined;
667
+ gateway_enabled?: boolean | null | undefined;
668
+ port_policy?: {
669
+ ports?: {
670
+ port: number;
671
+ pp?: boolean | undefined;
672
+ }[] | undefined;
673
+ restrict_mode?: boolean | undefined;
674
+ } | null | undefined;
675
+ event_log_version?: 1 | 2 | null | undefined;
676
+ requirements?: {
677
+ [x: string]: unknown;
678
+ ephemeral_data_disk?: boolean | null | undefined;
679
+ health_check?: boolean | null | undefined;
680
+ health_status_file?: string | null | undefined;
681
+ launch_token_hash?: string | null | undefined;
682
+ platforms?: string[] | null | undefined;
683
+ tdx_measure_acpi_tables?: boolean | null | undefined;
684
+ } | null | undefined;
685
+ kms_enabled?: boolean | null | undefined;
686
+ key_provider?: "none" | "kms" | "local" | "tpm" | null | undefined;
687
+ key_provider_id?: string | null | undefined;
688
+ local_key_provider_enabled?: boolean | null | undefined;
689
+ manifest_version?: string | number | null | undefined;
690
+ no_instance_id?: boolean | null | undefined;
691
+ runner?: string | null | undefined;
692
+ storage_fs?: "ext4" | "zfs" | null | undefined;
693
+ verity_volumes?: {
694
+ source: string;
695
+ target: string;
696
+ verity_root: string;
697
+ }[] | null | undefined;
698
+ tproxy_enabled?: boolean | null | undefined;
699
+ features?: string[] | null | undefined;
700
+ } | undefined;
701
+ init_scripts?: ("docker_cleanup" | "env_merge")[] | undefined;
702
+ confirm_data_wipe?: boolean | undefined;
703
+ encrypted_env?: string | undefined;
704
+ user_config?: string | undefined;
705
+ gpus?: {
706
+ gpus: {
707
+ slot: string;
708
+ product_id?: string | undefined;
709
+ }[];
710
+ attach_mode?: string | undefined;
711
+ } | undefined;
712
+ vcpu?: number | undefined;
713
+ memory?: number | undefined;
714
+ disk_size?: number | undefined;
715
+ instance_type?: string | undefined;
716
+ image?: string | undefined;
717
+ shutdown_timeout?: number | undefined;
718
+ allow_force_stop?: boolean | undefined;
719
+ prepareOnly?: boolean | undefined;
720
+ }, parameters: {
721
+ schema: false;
722
+ }): Promise<SafeResult<unknown>>;
723
+ };
724
+ confirmCvmPatch: {
725
+ (client: BaseClient<ApiVersion>, params: {
726
+ composeHash: string;
727
+ transactionHash: string;
728
+ id?: string | undefined;
729
+ uuid?: string | undefined;
730
+ app_id?: string | undefined;
731
+ instance_id?: string | undefined;
732
+ name?: string | undefined;
733
+ }): Promise<{
734
+ correlationId: string;
735
+ }>;
736
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
737
+ composeHash: string;
738
+ transactionHash: string;
739
+ id?: string | undefined;
740
+ uuid?: string | undefined;
741
+ app_id?: string | undefined;
742
+ instance_id?: string | undefined;
743
+ name?: string | undefined;
744
+ }, parameters: {
745
+ schema: T;
746
+ }): Promise<z.core.output<T>>;
747
+ (client: BaseClient<ApiVersion>, params: {
748
+ composeHash: string;
749
+ transactionHash: string;
750
+ id?: string | undefined;
751
+ uuid?: string | undefined;
752
+ app_id?: string | undefined;
753
+ instance_id?: string | undefined;
754
+ name?: string | undefined;
755
+ }, parameters: {
756
+ schema: false;
757
+ }): Promise<unknown>;
758
+ };
759
+ safeConfirmCvmPatch: {
760
+ (client: BaseClient<ApiVersion>, params: {
761
+ composeHash: string;
762
+ transactionHash: string;
763
+ id?: string | undefined;
764
+ uuid?: string | undefined;
765
+ app_id?: string | undefined;
766
+ instance_id?: string | undefined;
767
+ name?: string | undefined;
768
+ }): Promise<SafeResult<{
769
+ correlationId: string;
770
+ }>>;
771
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
772
+ composeHash: string;
773
+ transactionHash: string;
774
+ id?: string | undefined;
775
+ uuid?: string | undefined;
776
+ app_id?: string | undefined;
777
+ instance_id?: string | undefined;
778
+ name?: string | undefined;
779
+ }, parameters: {
780
+ schema: T;
781
+ }): Promise<SafeResult<z.core.output<T>>>;
782
+ (client: BaseClient<ApiVersion>, params: {
783
+ composeHash: string;
784
+ transactionHash: string;
785
+ id?: string | undefined;
786
+ uuid?: string | undefined;
787
+ app_id?: string | undefined;
788
+ instance_id?: string | undefined;
789
+ name?: string | undefined;
790
+ }, parameters: {
791
+ schema: false;
792
+ }): Promise<SafeResult<unknown>>;
793
+ };
794
+ commitCvmUpdate: {
795
+ (client: BaseClient<ApiVersion>, params: {
796
+ token: string;
797
+ composeHash: string;
798
+ transactionHash: string;
799
+ id?: string | undefined;
800
+ uuid?: string | undefined;
801
+ app_id?: string | undefined;
802
+ instance_id?: string | undefined;
803
+ name?: string | undefined;
804
+ }): Promise<{
805
+ correlationId: string;
806
+ status: string;
807
+ }>;
808
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
809
+ token: string;
810
+ composeHash: string;
811
+ transactionHash: string;
812
+ id?: string | undefined;
813
+ uuid?: string | undefined;
814
+ app_id?: string | undefined;
815
+ instance_id?: string | undefined;
816
+ name?: string | undefined;
817
+ }, parameters: {
818
+ schema: T;
819
+ }): Promise<z.core.output<T>>;
820
+ (client: BaseClient<ApiVersion>, params: {
821
+ token: string;
822
+ composeHash: string;
823
+ transactionHash: string;
824
+ id?: string | undefined;
825
+ uuid?: string | undefined;
826
+ app_id?: string | undefined;
827
+ instance_id?: string | undefined;
828
+ name?: string | undefined;
829
+ }, parameters: {
830
+ schema: false;
831
+ }): Promise<unknown>;
832
+ };
833
+ safeCommitCvmUpdate: {
834
+ (client: BaseClient<ApiVersion>, params: {
835
+ token: string;
836
+ composeHash: string;
837
+ transactionHash: string;
838
+ id?: string | undefined;
839
+ uuid?: string | undefined;
840
+ app_id?: string | undefined;
841
+ instance_id?: string | undefined;
842
+ name?: string | undefined;
843
+ }): Promise<SafeResult<{
844
+ correlationId: string;
845
+ status: string;
846
+ }>>;
847
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
848
+ token: string;
849
+ composeHash: string;
850
+ transactionHash: string;
851
+ id?: string | undefined;
852
+ uuid?: string | undefined;
853
+ app_id?: string | undefined;
854
+ instance_id?: string | undefined;
855
+ name?: string | undefined;
856
+ }, parameters: {
857
+ schema: T;
858
+ }): Promise<SafeResult<z.core.output<T>>>;
859
+ (client: BaseClient<ApiVersion>, params: {
860
+ token: string;
861
+ composeHash: string;
862
+ transactionHash: string;
863
+ id?: string | undefined;
864
+ uuid?: string | undefined;
865
+ app_id?: string | undefined;
866
+ instance_id?: string | undefined;
867
+ name?: string | undefined;
868
+ }, parameters: {
869
+ schema: false;
870
+ }): Promise<SafeResult<unknown>>;
871
+ };
872
+ refreshCvmInstanceId: typeof actions.refreshCvmInstanceId;
873
+ safeRefreshCvmInstanceId: typeof actions.safeRefreshCvmInstanceId;
874
+ refreshCvmInstanceIds: typeof actions.refreshCvmInstanceIds;
875
+ safeRefreshCvmInstanceIds: typeof actions.safeRefreshCvmInstanceIds;
876
+ getCvmStatusBatch: {
877
+ (client: BaseClient<ApiVersion>, params: {
878
+ vmUuids: string[];
879
+ }): Promise<Record<string, {
880
+ vm_uuid: string;
881
+ status: string;
882
+ in_progress: boolean;
883
+ events: {
884
+ event: string;
885
+ body: string;
886
+ timestamp: number;
887
+ }[];
888
+ uptime?: string | null | undefined;
889
+ boot_progress?: string | null | undefined;
890
+ boot_error?: string | null | undefined;
891
+ shutdown_progress?: string | null | undefined;
892
+ operation?: {
893
+ type?: string | null | undefined;
894
+ phase?: string | null | undefined;
895
+ started_at?: string | null | undefined;
896
+ correlation_id?: string | null | undefined;
897
+ } | null | undefined;
898
+ resource_usage?: {
899
+ cpu_percent?: number | null | undefined;
900
+ memory_used_bytes?: number | null | undefined;
901
+ memory_total_bytes?: number | null | undefined;
902
+ disk_used_bytes?: number | null | undefined;
903
+ disk_total_bytes?: number | null | undefined;
904
+ egress_bytes?: number | null | undefined;
905
+ } | null | undefined;
906
+ }>>;
907
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
908
+ vmUuids: string[];
909
+ }, parameters: {
910
+ schema: T;
911
+ }): Promise<z.core.output<T>>;
912
+ (client: BaseClient<ApiVersion>, params: {
913
+ vmUuids: string[];
914
+ }, parameters: {
915
+ schema: false;
916
+ }): Promise<unknown>;
917
+ };
918
+ safeGetCvmStatusBatch: {
919
+ (client: BaseClient<ApiVersion>, params: {
920
+ vmUuids: string[];
921
+ }): Promise<SafeResult<Record<string, {
922
+ vm_uuid: string;
923
+ status: string;
924
+ in_progress: boolean;
925
+ events: {
926
+ event: string;
927
+ body: string;
928
+ timestamp: number;
929
+ }[];
930
+ uptime?: string | null | undefined;
931
+ boot_progress?: string | null | undefined;
932
+ boot_error?: string | null | undefined;
933
+ shutdown_progress?: string | null | undefined;
934
+ operation?: {
935
+ type?: string | null | undefined;
936
+ phase?: string | null | undefined;
937
+ started_at?: string | null | undefined;
938
+ correlation_id?: string | null | undefined;
939
+ } | null | undefined;
940
+ resource_usage?: {
941
+ cpu_percent?: number | null | undefined;
942
+ memory_used_bytes?: number | null | undefined;
943
+ memory_total_bytes?: number | null | undefined;
944
+ disk_used_bytes?: number | null | undefined;
945
+ disk_total_bytes?: number | null | undefined;
946
+ egress_bytes?: number | null | undefined;
947
+ } | null | undefined;
948
+ }>>>;
949
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
950
+ vmUuids: string[];
951
+ }, parameters: {
952
+ schema: T;
953
+ }): Promise<SafeResult<z.core.output<T>>>;
954
+ (client: BaseClient<ApiVersion>, params: {
955
+ vmUuids: string[];
956
+ }, parameters: {
957
+ schema: false;
958
+ }): Promise<SafeResult<unknown>>;
959
+ };
960
+ getCvmUserConfig: {
961
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<{
962
+ ssh_authorized_keys: string[];
963
+ hostname?: string | null | undefined;
964
+ default_gateway_domain?: string | null | undefined;
965
+ launch_token?: string | null | undefined;
966
+ }>;
967
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
968
+ schema: T;
969
+ }): Promise<z.core.output<T>>;
970
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
971
+ schema: false;
972
+ }): Promise<unknown>;
973
+ };
974
+ safeGetCvmUserConfig: {
975
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<SafeResult<{
976
+ ssh_authorized_keys: string[];
977
+ hostname?: string | null | undefined;
978
+ default_gateway_domain?: string | null | undefined;
979
+ launch_token?: string | null | undefined;
980
+ }>>;
981
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
982
+ schema: T;
983
+ }): Promise<SafeResult<z.core.output<T>>>;
984
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
985
+ schema: false;
986
+ }): Promise<SafeResult<unknown>>;
987
+ };
988
+ getCvmAnnotations: {
989
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<{
990
+ annotations: Record<string, string>;
991
+ }>;
992
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
993
+ schema: T;
994
+ }): Promise<z.core.output<T>>;
995
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
996
+ schema: false;
997
+ }): Promise<unknown>;
998
+ };
999
+ safeGetCvmAnnotations: {
1000
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<SafeResult<{
1001
+ annotations: Record<string, string>;
1002
+ }>>;
1003
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1004
+ schema: T;
1005
+ }): Promise<SafeResult<z.core.output<T>>>;
1006
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1007
+ schema: false;
1008
+ }): Promise<SafeResult<unknown>>;
1009
+ };
1010
+ updateCvmAnnotations: {
1011
+ (client: BaseClient<ApiVersion>, params: {
1012
+ annotations: Record<string, string>;
1013
+ id?: string | undefined;
1014
+ uuid?: string | undefined;
1015
+ app_id?: string | undefined;
1016
+ instance_id?: string | undefined;
1017
+ name?: string | undefined;
1018
+ }): Promise<{
1019
+ annotations: Record<string, string>;
1020
+ }>;
1021
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1022
+ annotations: Record<string, string>;
1023
+ id?: string | undefined;
1024
+ uuid?: string | undefined;
1025
+ app_id?: string | undefined;
1026
+ instance_id?: string | undefined;
1027
+ name?: string | undefined;
1028
+ }, parameters: {
1029
+ schema: T;
1030
+ }): Promise<z.core.output<T>>;
1031
+ (client: BaseClient<ApiVersion>, params: {
1032
+ annotations: Record<string, string>;
1033
+ id?: string | undefined;
1034
+ uuid?: string | undefined;
1035
+ app_id?: string | undefined;
1036
+ instance_id?: string | undefined;
1037
+ name?: string | undefined;
1038
+ }, parameters: {
1039
+ schema: false;
1040
+ }): Promise<unknown>;
1041
+ };
1042
+ safeUpdateCvmAnnotations: {
1043
+ (client: BaseClient<ApiVersion>, params: {
1044
+ annotations: Record<string, string>;
1045
+ id?: string | undefined;
1046
+ uuid?: string | undefined;
1047
+ app_id?: string | undefined;
1048
+ instance_id?: string | undefined;
1049
+ name?: string | undefined;
1050
+ }): Promise<SafeResult<{
1051
+ annotations: Record<string, string>;
1052
+ }>>;
1053
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1054
+ annotations: Record<string, string>;
1055
+ id?: string | undefined;
1056
+ uuid?: string | undefined;
1057
+ app_id?: string | undefined;
1058
+ instance_id?: string | undefined;
1059
+ name?: string | undefined;
1060
+ }, parameters: {
1061
+ schema: T;
1062
+ }): Promise<SafeResult<z.core.output<T>>>;
1063
+ (client: BaseClient<ApiVersion>, params: {
1064
+ annotations: Record<string, string>;
1065
+ id?: string | undefined;
1066
+ uuid?: string | undefined;
1067
+ app_id?: string | undefined;
1068
+ instance_id?: string | undefined;
1069
+ name?: string | undefined;
1070
+ }, parameters: {
1071
+ schema: false;
1072
+ }): Promise<SafeResult<unknown>>;
1073
+ };
1074
+ getCvmInitScripts: {
1075
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<{
1076
+ items: {
1077
+ slug: "docker_cleanup" | "env_merge";
1078
+ selected: boolean;
1079
+ selectable: boolean;
1080
+ reason?: string | null | undefined;
1081
+ }[];
1082
+ }>;
1083
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1084
+ schema: T;
1085
+ }): Promise<z.core.output<T>>;
1086
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1087
+ schema: false;
1088
+ }): Promise<unknown>;
1089
+ };
1090
+ safeGetCvmInitScripts: {
1091
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<SafeResult<{
1092
+ items: {
1093
+ slug: "docker_cleanup" | "env_merge";
1094
+ selected: boolean;
1095
+ selectable: boolean;
1096
+ reason?: string | null | undefined;
1097
+ }[];
1098
+ }>>;
1099
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1100
+ schema: T;
1101
+ }): Promise<SafeResult<z.core.output<T>>>;
1102
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1103
+ schema: false;
1104
+ }): Promise<SafeResult<unknown>>;
1105
+ };
1106
+ setAppLaunchToken: {
1107
+ (client: BaseClient<ApiVersion>, params: {
1108
+ appId: string;
1109
+ launchToken?: string | undefined;
1110
+ }): Promise<{
1111
+ launch_token: string;
1112
+ launch_token_hash: string;
1113
+ }>;
1114
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1115
+ appId: string;
1116
+ launchToken?: string | undefined;
1117
+ }, parameters: {
1118
+ schema: T;
1119
+ }): Promise<z.core.output<T>>;
1120
+ (client: BaseClient<ApiVersion>, params: {
1121
+ appId: string;
1122
+ launchToken?: string | undefined;
1123
+ }, parameters: {
1124
+ schema: false;
1125
+ }): Promise<unknown>;
1126
+ };
1127
+ safeSetAppLaunchToken: {
1128
+ (client: BaseClient<ApiVersion>, params: {
1129
+ appId: string;
1130
+ launchToken?: string | undefined;
1131
+ }): Promise<SafeResult<{
1132
+ launch_token: string;
1133
+ launch_token_hash: string;
1134
+ }>>;
1135
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1136
+ appId: string;
1137
+ launchToken?: string | undefined;
1138
+ }, parameters: {
1139
+ schema: T;
1140
+ }): Promise<SafeResult<z.core.output<T>>>;
1141
+ (client: BaseClient<ApiVersion>, params: {
1142
+ appId: string;
1143
+ launchToken?: string | undefined;
1144
+ }, parameters: {
1145
+ schema: false;
1146
+ }): Promise<SafeResult<unknown>>;
1147
+ };
1148
+ clearAppLaunchToken: {
1149
+ (client: BaseClient<ApiVersion>, params: {
1150
+ appId: string;
1151
+ }): Promise<void>;
1152
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1153
+ appId: string;
1154
+ }, parameters: {
1155
+ schema: T;
1156
+ }): Promise<z.core.output<T>>;
1157
+ (client: BaseClient<ApiVersion>, params: {
1158
+ appId: string;
1159
+ }, parameters: {
1160
+ schema: false;
1161
+ }): Promise<unknown>;
1162
+ };
1163
+ safeClearAppLaunchToken: {
1164
+ (client: BaseClient<ApiVersion>, params: {
1165
+ appId: string;
1166
+ }): Promise<SafeResult<void>>;
1167
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1168
+ appId: string;
1169
+ }, parameters: {
1170
+ schema: T;
1171
+ }): Promise<SafeResult<z.core.output<T>>>;
1172
+ (client: BaseClient<ApiVersion>, params: {
1173
+ appId: string;
1174
+ }, parameters: {
1175
+ schema: false;
1176
+ }): Promise<SafeResult<unknown>>;
1177
+ };
1178
+ getCvmSshKeys: {
1179
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<{
1180
+ keys: {
1181
+ id: string;
1182
+ owner_user_id: string;
1183
+ owner_username: string;
1184
+ added_by_user_id: string;
1185
+ name: string;
1186
+ public_key: string;
1187
+ fingerprint: string;
1188
+ key_type: string;
1189
+ }[];
1190
+ restart_required: boolean;
1191
+ }>;
1192
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1193
+ schema: T;
1194
+ }): Promise<z.core.output<T>>;
1195
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1196
+ schema: false;
1197
+ }): Promise<unknown>;
1198
+ };
1199
+ safeGetCvmSshKeys: {
1200
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput): Promise<SafeResult<{
1201
+ keys: {
1202
+ id: string;
1203
+ owner_user_id: string;
1204
+ owner_username: string;
1205
+ added_by_user_id: string;
1206
+ name: string;
1207
+ public_key: string;
1208
+ fingerprint: string;
1209
+ key_type: string;
1210
+ }[];
1211
+ restart_required: boolean;
1212
+ }>>;
1213
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1214
+ schema: T;
1215
+ }): Promise<SafeResult<z.core.output<T>>>;
1216
+ (client: BaseClient<ApiVersion>, params: import("./types").CvmIdInput, parameters: {
1217
+ schema: false;
1218
+ }): Promise<SafeResult<unknown>>;
1219
+ };
1220
+ updateCvmSshKeys: {
1221
+ (client: BaseClient<ApiVersion>, params: {
1222
+ ssh_key_ids: string[];
1223
+ id?: string | undefined;
1224
+ uuid?: string | undefined;
1225
+ app_id?: string | undefined;
1226
+ instance_id?: string | undefined;
1227
+ name?: string | undefined;
1228
+ usernames?: string[] | undefined;
1229
+ apply_now?: boolean | undefined;
1230
+ }): Promise<{
1231
+ keys: {
1232
+ id: string;
1233
+ owner_user_id: string;
1234
+ owner_username: string;
1235
+ added_by_user_id: string;
1236
+ name: string;
1237
+ public_key: string;
1238
+ fingerprint: string;
1239
+ key_type: string;
1240
+ }[];
1241
+ restart_required: boolean;
1242
+ }>;
1243
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1244
+ ssh_key_ids: string[];
1245
+ id?: string | undefined;
1246
+ uuid?: string | undefined;
1247
+ app_id?: string | undefined;
1248
+ instance_id?: string | undefined;
1249
+ name?: string | undefined;
1250
+ usernames?: string[] | undefined;
1251
+ apply_now?: boolean | undefined;
1252
+ }, parameters: {
1253
+ schema: T;
1254
+ }): Promise<z.core.output<T>>;
1255
+ (client: BaseClient<ApiVersion>, params: {
1256
+ ssh_key_ids: string[];
1257
+ id?: string | undefined;
1258
+ uuid?: string | undefined;
1259
+ app_id?: string | undefined;
1260
+ instance_id?: string | undefined;
1261
+ name?: string | undefined;
1262
+ usernames?: string[] | undefined;
1263
+ apply_now?: boolean | undefined;
1264
+ }, parameters: {
1265
+ schema: false;
1266
+ }): Promise<unknown>;
1267
+ };
1268
+ safeUpdateCvmSshKeys: {
1269
+ (client: BaseClient<ApiVersion>, params: {
1270
+ ssh_key_ids: string[];
1271
+ id?: string | undefined;
1272
+ uuid?: string | undefined;
1273
+ app_id?: string | undefined;
1274
+ instance_id?: string | undefined;
1275
+ name?: string | undefined;
1276
+ usernames?: string[] | undefined;
1277
+ apply_now?: boolean | undefined;
1278
+ }): Promise<SafeResult<{
1279
+ keys: {
1280
+ id: string;
1281
+ owner_user_id: string;
1282
+ owner_username: string;
1283
+ added_by_user_id: string;
1284
+ name: string;
1285
+ public_key: string;
1286
+ fingerprint: string;
1287
+ key_type: string;
1288
+ }[];
1289
+ restart_required: boolean;
1290
+ }>>;
1291
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1292
+ ssh_key_ids: string[];
1293
+ id?: string | undefined;
1294
+ uuid?: string | undefined;
1295
+ app_id?: string | undefined;
1296
+ instance_id?: string | undefined;
1297
+ name?: string | undefined;
1298
+ usernames?: string[] | undefined;
1299
+ apply_now?: boolean | undefined;
1300
+ }, parameters: {
1301
+ schema: T;
1302
+ }): Promise<SafeResult<z.core.output<T>>>;
1303
+ (client: BaseClient<ApiVersion>, params: {
1304
+ ssh_key_ids: string[];
1305
+ id?: string | undefined;
1306
+ uuid?: string | undefined;
1307
+ app_id?: string | undefined;
1308
+ instance_id?: string | undefined;
1309
+ name?: string | undefined;
1310
+ usernames?: string[] | undefined;
1311
+ apply_now?: boolean | undefined;
1312
+ }, parameters: {
1313
+ schema: false;
1314
+ }): Promise<SafeResult<unknown>>;
1315
+ };
1316
+ revokeCurrentApiToken: {
1317
+ (client: BaseClient<ApiVersion>, parameters: {
1318
+ schema: false;
1319
+ }): Promise<unknown>;
1320
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, parameters: {
1321
+ schema: T;
1322
+ }): Promise<z.core.output<T>>;
1323
+ (client: BaseClient<ApiVersion>): Promise<void>;
1324
+ };
1325
+ safeRevokeCurrentApiToken: {
1326
+ (client: BaseClient<ApiVersion>, parameters: {
1327
+ schema: false;
1328
+ }): Promise<SafeResult<unknown>>;
1329
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, parameters: {
1330
+ schema: T;
1331
+ }): Promise<SafeResult<z.core.output<T>>>;
1332
+ (client: BaseClient<ApiVersion>): Promise<SafeResult<void>>;
1333
+ };
1334
+ checkCvmIsAllowed: typeof actions.checkCvmIsAllowed;
1335
+ safeCheckCvmIsAllowed: typeof actions.safeCheckCvmIsAllowed;
1336
+ checkAppIsAllowed: {
1337
+ (client: BaseClient<ApiVersion>, params: {
1338
+ appId: string;
1339
+ compose_hash: string;
1340
+ node?: string | undefined;
1341
+ device_id?: string | undefined;
1342
+ chain_id?: number | undefined;
1343
+ }): Promise<{
1344
+ app_contract_address: string;
1345
+ compose_hash: string;
1346
+ device_id: string;
1347
+ compose_hash_allowed: boolean;
1348
+ allow_any_device: boolean;
1349
+ is_allowed: boolean;
1350
+ device_id_allowed?: boolean | null | undefined;
1351
+ error?: string | null | undefined;
1352
+ cvm_id?: string | undefined;
1353
+ }>;
1354
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1355
+ appId: string;
1356
+ compose_hash: string;
1357
+ node?: string | undefined;
1358
+ device_id?: string | undefined;
1359
+ chain_id?: number | undefined;
1360
+ }, parameters: {
1361
+ schema: T;
1362
+ }): Promise<z.core.output<T>>;
1363
+ (client: BaseClient<ApiVersion>, params: {
1364
+ appId: string;
1365
+ compose_hash: string;
1366
+ node?: string | undefined;
1367
+ device_id?: string | undefined;
1368
+ chain_id?: number | undefined;
1369
+ }, parameters: {
1370
+ schema: false;
1371
+ }): Promise<unknown>;
1372
+ };
1373
+ safeCheckAppIsAllowed: {
1374
+ (client: BaseClient<ApiVersion>, params: {
1375
+ appId: string;
1376
+ compose_hash: string;
1377
+ node?: string | undefined;
1378
+ device_id?: string | undefined;
1379
+ chain_id?: number | undefined;
1380
+ }): Promise<SafeResult<{
1381
+ app_contract_address: string;
1382
+ compose_hash: string;
1383
+ device_id: string;
1384
+ compose_hash_allowed: boolean;
1385
+ allow_any_device: boolean;
1386
+ is_allowed: boolean;
1387
+ device_id_allowed?: boolean | null | undefined;
1388
+ error?: string | null | undefined;
1389
+ cvm_id?: string | undefined;
1390
+ }>>;
1391
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1392
+ appId: string;
1393
+ compose_hash: string;
1394
+ node?: string | undefined;
1395
+ device_id?: string | undefined;
1396
+ chain_id?: number | undefined;
1397
+ }, parameters: {
1398
+ schema: T;
1399
+ }): Promise<SafeResult<z.core.output<T>>>;
1400
+ (client: BaseClient<ApiVersion>, params: {
1401
+ appId: string;
1402
+ compose_hash: string;
1403
+ node?: string | undefined;
1404
+ device_id?: string | undefined;
1405
+ chain_id?: number | undefined;
1406
+ }, parameters: {
1407
+ schema: false;
1408
+ }): Promise<SafeResult<unknown>>;
1409
+ };
1410
+ checkAppCvmsIsAllowed: typeof actions.checkAppCvmsIsAllowed;
1411
+ safeCheckAppCvmsIsAllowed: typeof actions.safeCheckAppCvmsIsAllowed;
1412
+ getAppList: typeof actions.getAppList;
1413
+ safeGetAppList: typeof actions.safeGetAppList;
1414
+ getAppInfo: typeof actions.getAppInfo;
1415
+ safeGetAppInfo: typeof actions.safeGetAppInfo;
1416
+ getAppCvms: typeof actions.getAppCvms;
1417
+ safeGetAppCvms: typeof actions.safeGetAppCvms;
1418
+ createAppInstance: {
1419
+ (client: BaseClient<ApiVersion>, params: {
1420
+ appId: string;
1421
+ name?: string | undefined;
1422
+ node?: string | undefined;
1423
+ docker_compose_file?: string | undefined;
1424
+ pre_launch_script?: string | undefined;
1425
+ encrypted_env?: string | undefined;
1426
+ compose_hash?: string | undefined;
1427
+ token?: string | undefined;
1428
+ transaction_hash?: string | undefined;
1429
+ }): Promise<{
1430
+ name: string;
1431
+ status: string;
1432
+ teepod_id: number;
1433
+ app_id: string;
1434
+ vm_uuid: string | null;
1435
+ instance_id: string | null;
1436
+ vcpu: number;
1437
+ memory: number;
1438
+ disk_size: number;
1439
+ created_at: string;
1440
+ encrypted_env_pubkey: string | null;
1441
+ id: string;
1442
+ teepod?: {
1443
+ id: number;
1444
+ name: string;
1445
+ region_identifier?: string | null | undefined;
1446
+ } | null | undefined;
1447
+ app_url?: string | null | undefined;
1448
+ base_image?: string | null | undefined;
1449
+ manifest_version?: number | null | undefined;
1450
+ version?: string | null | undefined;
1451
+ runner?: string | null | undefined;
1452
+ docker_compose_file?: string | null | undefined;
1453
+ features?: string[] | null | undefined;
1454
+ user_id?: string | null | undefined;
1455
+ }>;
1456
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1457
+ appId: string;
1458
+ name?: string | undefined;
1459
+ node?: string | undefined;
1460
+ docker_compose_file?: string | undefined;
1461
+ pre_launch_script?: string | undefined;
1462
+ encrypted_env?: string | undefined;
1463
+ compose_hash?: string | undefined;
1464
+ token?: string | undefined;
1465
+ transaction_hash?: string | undefined;
1466
+ }, parameters: {
1467
+ schema: T;
1468
+ }): Promise<z.core.output<T>>;
1469
+ (client: BaseClient<ApiVersion>, params: {
1470
+ appId: string;
1471
+ name?: string | undefined;
1472
+ node?: string | undefined;
1473
+ docker_compose_file?: string | undefined;
1474
+ pre_launch_script?: string | undefined;
1475
+ encrypted_env?: string | undefined;
1476
+ compose_hash?: string | undefined;
1477
+ token?: string | undefined;
1478
+ transaction_hash?: string | undefined;
1479
+ }, parameters: {
1480
+ schema: false;
1481
+ }): Promise<unknown>;
1482
+ };
1483
+ safeCreateAppInstance: {
1484
+ (client: BaseClient<ApiVersion>, params: {
1485
+ appId: string;
1486
+ name?: string | undefined;
1487
+ node?: string | undefined;
1488
+ docker_compose_file?: string | undefined;
1489
+ pre_launch_script?: string | undefined;
1490
+ encrypted_env?: string | undefined;
1491
+ compose_hash?: string | undefined;
1492
+ token?: string | undefined;
1493
+ transaction_hash?: string | undefined;
1494
+ }): Promise<SafeResult<{
1495
+ name: string;
1496
+ status: string;
1497
+ teepod_id: number;
1498
+ app_id: string;
1499
+ vm_uuid: string | null;
1500
+ instance_id: string | null;
1501
+ vcpu: number;
1502
+ memory: number;
1503
+ disk_size: number;
1504
+ created_at: string;
1505
+ encrypted_env_pubkey: string | null;
1506
+ id: string;
1507
+ teepod?: {
1508
+ id: number;
1509
+ name: string;
1510
+ region_identifier?: string | null | undefined;
1511
+ } | null | undefined;
1512
+ app_url?: string | null | undefined;
1513
+ base_image?: string | null | undefined;
1514
+ manifest_version?: number | null | undefined;
1515
+ version?: string | null | undefined;
1516
+ runner?: string | null | undefined;
1517
+ docker_compose_file?: string | null | undefined;
1518
+ features?: string[] | null | undefined;
1519
+ user_id?: string | null | undefined;
1520
+ }>>;
1521
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1522
+ appId: string;
1523
+ name?: string | undefined;
1524
+ node?: string | undefined;
1525
+ docker_compose_file?: string | undefined;
1526
+ pre_launch_script?: string | undefined;
1527
+ encrypted_env?: string | undefined;
1528
+ compose_hash?: string | undefined;
1529
+ token?: string | undefined;
1530
+ transaction_hash?: string | undefined;
1531
+ }, parameters: {
1532
+ schema: T;
1533
+ }): Promise<SafeResult<z.core.output<T>>>;
1534
+ (client: BaseClient<ApiVersion>, params: {
1535
+ appId: string;
1536
+ name?: string | undefined;
1537
+ node?: string | undefined;
1538
+ docker_compose_file?: string | undefined;
1539
+ pre_launch_script?: string | undefined;
1540
+ encrypted_env?: string | undefined;
1541
+ compose_hash?: string | undefined;
1542
+ token?: string | undefined;
1543
+ transaction_hash?: string | undefined;
1544
+ }, parameters: {
1545
+ schema: false;
1546
+ }): Promise<SafeResult<unknown>>;
1547
+ };
1548
+ getAppDeviceAllowlist: typeof actions.getAppDeviceAllowlist;
1549
+ safeGetAppDeviceAllowlist: typeof actions.safeGetAppDeviceAllowlist;
1550
+ getAppRevisions: typeof actions.getAppRevisions;
1551
+ safeGetAppRevisions: typeof actions.safeGetAppRevisions;
1552
+ getAppRevisionDetail: typeof actions.getAppRevisionDetail;
1553
+ safeGetAppRevisionDetail: typeof actions.safeGetAppRevisionDetail;
1554
+ getAppFilterOptions: typeof actions.getAppFilterOptions;
1555
+ safeGetAppFilterOptions: typeof actions.safeGetAppFilterOptions;
1556
+ getAppAttestation: {
1557
+ (client: BaseClient<ApiVersion>, params: {
1558
+ appId: string;
1559
+ }): Promise<{
1560
+ app_id: string;
1561
+ contract_address: string;
1562
+ kms_info: {
1563
+ contract_address: string;
1564
+ chain_id: number | null;
1565
+ version: string;
1566
+ url: string;
1567
+ gateway_app_id: string | null;
1568
+ gateway_app_url: string;
1569
+ kms_type: string;
1570
+ };
1571
+ instances: {
1572
+ vm_uuid?: string | null | undefined;
1573
+ name?: string | undefined;
1574
+ instance_id?: string | null | undefined;
1575
+ status?: string | undefined;
1576
+ image_version?: string | null | undefined;
1577
+ quote?: string | null | undefined;
1578
+ ppid?: string | undefined;
1579
+ ppid_sha256?: string | null | undefined;
1580
+ device_id?: string | undefined;
1581
+ fmspc?: string | null | undefined;
1582
+ tee_tcb_svn?: string | null | undefined;
1583
+ mr_config_id?: string | null | undefined;
1584
+ cpusvn?: string | null | undefined;
1585
+ pcesvn?: number | null | undefined;
1586
+ tcb_info?: {
1587
+ mrtd: string;
1588
+ rtmr0: string;
1589
+ rtmr1: string;
1590
+ rtmr2: string;
1591
+ rtmr3: string;
1592
+ event_log: {
1593
+ imr: number;
1594
+ event_type: number;
1595
+ digest: string;
1596
+ event: string;
1597
+ event_payload: string;
1598
+ }[];
1599
+ app_compose: string;
1600
+ rootfs_hash?: string | null | undefined;
1601
+ } | null | undefined;
1602
+ app_certificates?: {
1603
+ subject: {
1604
+ common_name: string | null;
1605
+ organization: string | null;
1606
+ country: string | null;
1607
+ state: string | null;
1608
+ locality: string | null;
1609
+ };
1610
+ issuer: {
1611
+ common_name: string | null;
1612
+ organization: string | null;
1613
+ country: string | null;
1614
+ };
1615
+ serial_number: string;
1616
+ not_before: string;
1617
+ not_after: string;
1618
+ version: string;
1619
+ fingerprint: string;
1620
+ signature_algorithm: string;
1621
+ sans: string[] | null;
1622
+ is_ca: boolean;
1623
+ position_in_chain: number | null;
1624
+ quote: string | null;
1625
+ app_id?: string | null | undefined;
1626
+ cert_usage?: string | null | undefined;
1627
+ }[] | null | undefined;
1628
+ compose_file?: string | null | undefined;
1629
+ error?: string | null | undefined;
1630
+ }[];
1631
+ kms_guest_agent_info: {
1632
+ [x: string]: unknown;
1633
+ app_id?: string | undefined;
1634
+ instance_id?: string | undefined;
1635
+ app_name?: string | undefined;
1636
+ device_id?: string | undefined;
1637
+ } | null;
1638
+ gateway_guest_agent_info: {
1639
+ [x: string]: unknown;
1640
+ app_id?: string | undefined;
1641
+ instance_id?: string | undefined;
1642
+ app_name?: string | undefined;
1643
+ device_id?: string | undefined;
1644
+ } | null;
1645
+ qemu_version: string | null;
1646
+ }>;
1647
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1648
+ appId: string;
1649
+ }, parameters: {
1650
+ schema: T;
1651
+ }): Promise<z.core.output<T>>;
1652
+ (client: BaseClient<ApiVersion>, params: {
1653
+ appId: string;
1654
+ }, parameters: {
1655
+ schema: false;
1656
+ }): Promise<unknown>;
1657
+ };
1658
+ safeGetAppAttestation: {
1659
+ (client: BaseClient<ApiVersion>, params: {
1660
+ appId: string;
1661
+ }): Promise<SafeResult<{
1662
+ app_id: string;
1663
+ contract_address: string;
1664
+ kms_info: {
1665
+ contract_address: string;
1666
+ chain_id: number | null;
1667
+ version: string;
1668
+ url: string;
1669
+ gateway_app_id: string | null;
1670
+ gateway_app_url: string;
1671
+ kms_type: string;
1672
+ };
1673
+ instances: {
1674
+ vm_uuid?: string | null | undefined;
1675
+ name?: string | undefined;
1676
+ instance_id?: string | null | undefined;
1677
+ status?: string | undefined;
1678
+ image_version?: string | null | undefined;
1679
+ quote?: string | null | undefined;
1680
+ ppid?: string | undefined;
1681
+ ppid_sha256?: string | null | undefined;
1682
+ device_id?: string | undefined;
1683
+ fmspc?: string | null | undefined;
1684
+ tee_tcb_svn?: string | null | undefined;
1685
+ mr_config_id?: string | null | undefined;
1686
+ cpusvn?: string | null | undefined;
1687
+ pcesvn?: number | null | undefined;
1688
+ tcb_info?: {
1689
+ mrtd: string;
1690
+ rtmr0: string;
1691
+ rtmr1: string;
1692
+ rtmr2: string;
1693
+ rtmr3: string;
1694
+ event_log: {
1695
+ imr: number;
1696
+ event_type: number;
1697
+ digest: string;
1698
+ event: string;
1699
+ event_payload: string;
1700
+ }[];
1701
+ app_compose: string;
1702
+ rootfs_hash?: string | null | undefined;
1703
+ } | null | undefined;
1704
+ app_certificates?: {
1705
+ subject: {
1706
+ common_name: string | null;
1707
+ organization: string | null;
1708
+ country: string | null;
1709
+ state: string | null;
1710
+ locality: string | null;
1711
+ };
1712
+ issuer: {
1713
+ common_name: string | null;
1714
+ organization: string | null;
1715
+ country: string | null;
1716
+ };
1717
+ serial_number: string;
1718
+ not_before: string;
1719
+ not_after: string;
1720
+ version: string;
1721
+ fingerprint: string;
1722
+ signature_algorithm: string;
1723
+ sans: string[] | null;
1724
+ is_ca: boolean;
1725
+ position_in_chain: number | null;
1726
+ quote: string | null;
1727
+ app_id?: string | null | undefined;
1728
+ cert_usage?: string | null | undefined;
1729
+ }[] | null | undefined;
1730
+ compose_file?: string | null | undefined;
1731
+ error?: string | null | undefined;
1732
+ }[];
1733
+ kms_guest_agent_info: {
1734
+ [x: string]: unknown;
1735
+ app_id?: string | undefined;
1736
+ instance_id?: string | undefined;
1737
+ app_name?: string | undefined;
1738
+ device_id?: string | undefined;
1739
+ } | null;
1740
+ gateway_guest_agent_info: {
1741
+ [x: string]: unknown;
1742
+ app_id?: string | undefined;
1743
+ instance_id?: string | undefined;
1744
+ app_name?: string | undefined;
1745
+ device_id?: string | undefined;
1746
+ } | null;
1747
+ qemu_version: string | null;
1748
+ }>>;
1749
+ <T extends z.ZodTypeAny>(client: BaseClient<ApiVersion>, params: {
1750
+ appId: string;
1751
+ }, parameters: {
1752
+ schema: T;
1753
+ }): Promise<SafeResult<z.core.output<T>>>;
1754
+ (client: BaseClient<ApiVersion>, params: {
1755
+ appId: string;
1756
+ }, parameters: {
1757
+ schema: false;
1758
+ }): Promise<SafeResult<unknown>>;
1759
+ };
1760
+ };
1761
+ declare const onChainActions: {
1762
+ addComposeHash: typeof actions.addComposeHash;
1763
+ safeAddComposeHash: typeof actions.safeAddComposeHash;
1764
+ deployAppAuth: typeof actions.deployAppAuth;
1765
+ safeDeployAppAuth: typeof actions.safeDeployAppAuth;
1766
+ addDevice: typeof actions.addDevice;
1767
+ safeAddDevice: typeof actions.safeAddDevice;
1768
+ removeDevice: typeof actions.removeDevice;
1769
+ safeRemoveDevice: typeof actions.safeRemoveDevice;
1770
+ setAllowAnyDevice: typeof actions.setAllowAnyDevice;
1771
+ safeSetAllowAnyDevice: typeof actions.safeSetAllowAnyDevice;
1772
+ getAllowedDevices: typeof actions.getAllowedDevices;
1773
+ safeGetAllowedDevices: typeof actions.safeGetAllowedDevices;
1774
+ checkDeviceAllowed: typeof actions.checkDeviceAllowed;
1775
+ safeCheckDeviceAllowed: typeof actions.safeCheckDeviceAllowed;
1776
+ checkComposeHashAllowed: typeof actions.checkComposeHashAllowed;
1777
+ safeCheckComposeHashAllowed: typeof actions.safeCheckComposeHashAllowed;
1778
+ checkOnChainPrerequisites: typeof actions.checkOnChainPrerequisites;
1779
+ safeCheckOnChainPrerequisites: typeof actions.safeCheckOnChainPrerequisites;
1780
+ };
1781
+ type OnChainActions = typeof onChainActions;
1782
+ type VersionedAppAction = "getAppList" | "safeGetAppList" | "getAppInfo" | "safeGetAppInfo" | "getAppCvms" | "safeGetAppCvms" | "replicateCvm" | "safeReplicateCvm";
1783
+ type SimpleAdditionalAction = "revokeCurrentApiToken" | "safeRevokeCurrentApiToken";
1784
+ type SchemaAction = "getWorkspaceNodes" | "safeGetWorkspaceNodes" | "getWorkspaceQuotas" | "safeGetWorkspaceQuotas" | "patchCvm" | "safePatchCvm" | "confirmCvmPatch" | "safeConfirmCvmPatch" | "commitCvmUpdate" | "safeCommitCvmUpdate" | "getCvmStatusBatch" | "safeGetCvmStatusBatch" | "getCvmUserConfig" | "safeGetCvmUserConfig" | "getCvmAnnotations" | "safeGetCvmAnnotations" | "updateCvmAnnotations" | "safeUpdateCvmAnnotations" | "getCvmInitScripts" | "safeGetCvmInitScripts" | "setAppLaunchToken" | "safeSetAppLaunchToken" | "clearAppLaunchToken" | "safeClearAppLaunchToken" | "getCvmSshKeys" | "safeGetCvmSshKeys" | "updateCvmSshKeys" | "safeUpdateCvmSshKeys" | "checkAppIsAllowed" | "safeCheckAppIsAllowed" | "createAppInstance" | "safeCreateAppInstance" | "getAppAttestation" | "safeGetAppAttestation";
1785
+ type SchemaBoundAction<F, Safe extends boolean> = F extends {
1786
+ (client: never, ...args: infer P): infer R;
1787
+ (client: never, ...args: never[]): unknown;
1788
+ (client: never, ...args: never[]): unknown;
1789
+ } ? ((...args: P) => R) & {
1790
+ <T extends z.ZodTypeAny>(...args: [...P, {
1791
+ schema: T;
1792
+ }]): Promise<Safe extends true ? SafeResult<z.infer<T>> : z.infer<T>>;
1793
+ (...args: [...P, {
1794
+ schema: false;
1795
+ }]): Promise<Safe extends true ? SafeResult<unknown> : unknown>;
1796
+ } : never;
1797
+ type BoundAdditionalActions = {
1798
+ [K in Exclude<keyof typeof additionalActions, VersionedAppAction | SimpleAdditionalAction>]: K extends SchemaAction ? SchemaBoundAction<(typeof additionalActions)[K], K extends `safe${string}` ? true : false> : (typeof additionalActions)[K] extends (client: never, ...args: infer P) => infer R ? (...args: P) => R : never;
1799
+ };
55
1800
  /**
56
1801
  * Create a full-featured Phala Cloud client with all actions
57
1802
  *
@@ -97,6 +1842,9 @@ export declare function createClient(config: ClientConfig<"2026-01-21"> & {
97
1842
  export declare function createClient(config: ClientConfig<"2025-10-28"> & {
98
1843
  version: "2025-10-28";
99
1844
  }): Client<"2025-10-28">;
1845
+ export declare function createClient<V extends ApiVersion>(config: ClientConfig<V> & {
1846
+ version: V;
1847
+ }): Client<V>;
100
1848
  export declare function createClient(config?: ClientConfig): Client<DefaultApiVersion>;
101
1849
  /**
102
1850
  * Extended client type with all action methods
@@ -104,7 +1852,29 @@ export declare function createClient(config?: ClientConfig): Client<DefaultApiVe
104
1852
  * This type definition ensures proper type inference for all action methods,
105
1853
  * including their overload signatures for schema parameters.
106
1854
  */
107
- export interface Client<V extends ApiVersion = DefaultApiVersion> extends BaseClient<V> {
1855
+ export interface Client<V extends ApiVersion = DefaultApiVersion> extends BaseClient<V>, BoundAdditionalActions, OnChainActions {
1856
+ replicateCvm(request: actions.ReplicateCvmRequest): Promise<import("./types/cvm_info").VMForVersion<V>>;
1857
+ safeReplicateCvm(request: actions.ReplicateCvmRequest): Promise<SafeResult<import("./types/cvm_info").VMForVersion<V>>>;
1858
+ revokeCurrentApiToken(): Promise<void>;
1859
+ revokeCurrentApiToken<T extends z.ZodTypeAny>(parameters: {
1860
+ schema: T;
1861
+ }): Promise<z.infer<T>>;
1862
+ revokeCurrentApiToken(parameters: {
1863
+ schema: false;
1864
+ }): Promise<unknown>;
1865
+ safeRevokeCurrentApiToken(): Promise<SafeResult<void>>;
1866
+ safeRevokeCurrentApiToken<T extends z.ZodTypeAny>(parameters: {
1867
+ schema: T;
1868
+ }): Promise<SafeResult<z.infer<T>>>;
1869
+ safeRevokeCurrentApiToken(parameters: {
1870
+ schema: false;
1871
+ }): Promise<SafeResult<unknown>>;
1872
+ getAppList(request?: actions.GetAppListRequest): Promise<import("./types/version-mappings").GetAppListResponse<V>>;
1873
+ safeGetAppList(request?: actions.GetAppListRequest): Promise<SafeResult<import("./types/version-mappings").GetAppListResponse<V>>>;
1874
+ getAppInfo(request: actions.GetAppInfoRequest): Promise<import("./types/version-mappings").GetAppInfoResponse<V>>;
1875
+ safeGetAppInfo(request: actions.GetAppInfoRequest): Promise<SafeResult<import("./types/version-mappings").GetAppInfoResponse<V>>>;
1876
+ getAppCvms(request: actions.GetAppCvmsRequest): Promise<import("./types/version-mappings").GetAppCvmsResponse<V>>;
1877
+ safeGetAppCvms(request: actions.GetAppCvmsRequest): Promise<SafeResult<import("./types/version-mappings").GetAppCvmsResponse<V>>>;
108
1878
  withVersion<NewV extends ApiVersion>(version: NewV): Client<NewV>;
109
1879
  request<T = unknown>(url: string, options?: import("./types/client").RequestOptions): Promise<T>;
110
1880
  requestFull<T = unknown>(url: string, options?: import("./types/client").RequestOptions): Promise<import("./types/client").FullResponse<T>>;
@@ -773,3 +2543,4 @@ export interface Client<V extends ApiVersion = DefaultApiVersion> extends BaseCl
773
2543
  schema: false;
774
2544
  }): Promise<SafeResult<unknown>>;
775
2545
  }
2546
+ export {};