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