@phala/cloud 0.2.1-beta.3 → 0.2.1

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 (69) hide show
  1. package/LICENSE +201 -0
  2. package/dist/actions/apps/get_app_cvms.d.ts +30 -0
  3. package/dist/actions/apps/get_app_info.d.ts +30 -0
  4. package/dist/actions/apps/get_app_list.d.ts +74 -0
  5. package/dist/actions/apps/get_app_revision_detail.d.ts +48 -0
  6. package/dist/actions/apps/get_app_revisions.d.ts +42 -0
  7. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +7 -7
  8. package/dist/actions/cvms/commit_cvm_provision.d.ts +31 -31
  9. package/dist/actions/cvms/delete_cvm.d.ts +10 -7
  10. package/dist/actions/cvms/get_available_os_images.d.ts +10 -7
  11. package/dist/actions/cvms/get_cvm_attestation.d.ts +10 -7
  12. package/dist/actions/cvms/get_cvm_compose_file.d.ts +18 -15
  13. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +14 -11
  14. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +10 -7
  15. package/dist/actions/cvms/get_cvm_info.d.ts +19 -35
  16. package/dist/actions/cvms/get_cvm_list.d.ts +11 -537
  17. package/dist/actions/cvms/get_cvm_network.d.ts +10 -7
  18. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +42 -0
  19. package/dist/actions/cvms/get_cvm_state.d.ts +10 -7
  20. package/dist/actions/cvms/get_cvm_stats.d.ts +10 -7
  21. package/dist/actions/cvms/get_cvm_status_batch.d.ts +167 -0
  22. package/dist/actions/cvms/provision_cvm.d.ts +404 -21
  23. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +32 -32
  24. package/dist/actions/cvms/restart_cvm.d.ts +17 -14
  25. package/dist/actions/cvms/shutdown_cvm.d.ts +18 -15
  26. package/dist/actions/cvms/start_cvm.d.ts +18 -15
  27. package/dist/actions/cvms/stop_cvm.d.ts +18 -15
  28. package/dist/actions/cvms/update_cvm_envs.d.ts +426 -0
  29. package/dist/actions/cvms/update_cvm_resources.d.ts +13 -10
  30. package/dist/actions/cvms/update_cvm_visibility.d.ts +33 -14
  31. package/dist/actions/cvms/update_docker_compose.d.ts +420 -0
  32. package/dist/actions/cvms/update_os_image.d.ts +9 -6
  33. package/dist/actions/cvms/update_prelaunch_script.d.ts +417 -0
  34. package/dist/actions/cvms/watch_cvm_state.d.ts +1 -1
  35. package/dist/actions/get_available_nodes.d.ts +6 -6
  36. package/dist/actions/get_current_user.d.ts +36 -89
  37. package/dist/actions/index.d.ts +14 -2
  38. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +6 -6
  39. package/dist/actions/kms/get_kms_info.d.ts +6 -6
  40. package/dist/actions/kms/get_kms_list.d.ts +6 -6
  41. package/dist/actions/kms/next_app_ids.d.ts +6 -6
  42. package/dist/actions/list-instance-types.d.ts +16 -16
  43. package/dist/actions/workspaces/get_workspace.d.ts +6 -6
  44. package/dist/actions/workspaces/get_workspace_nodes.d.ts +266 -0
  45. package/dist/actions/workspaces/get_workspace_quotas.d.ts +1169 -0
  46. package/dist/actions/workspaces/list_workspaces.d.ts +6 -6
  47. package/dist/client.d.ts +49 -9
  48. package/dist/create-client.d.ts +87 -36
  49. package/dist/credentials/current_user_v20251028.d.ts +30 -0
  50. package/dist/credentials/current_user_v20260121.d.ts +276 -0
  51. package/dist/credentials/index.d.ts +4 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +1782 -633
  54. package/dist/index.mjs +1693 -626
  55. package/dist/types/app_info_v20251028.d.ts +1266 -0
  56. package/dist/types/app_info_v20260121.d.ts +3293 -0
  57. package/dist/types/app_revision.d.ts +453 -0
  58. package/dist/types/client.d.ts +40 -2
  59. package/dist/types/cvm_id.d.ts +45 -10
  60. package/dist/types/cvm_info.d.ts +16 -502
  61. package/dist/types/cvm_info_v20251028.d.ts +988 -0
  62. package/dist/types/cvm_info_v20260121.d.ts +1264 -0
  63. package/dist/types/index.d.ts +6 -0
  64. package/dist/types/version-mappings.d.ts +38 -0
  65. package/dist/utils/define-action.d.ts +15 -14
  66. package/dist/utils/errors.d.ts +2 -2
  67. package/dist/utils/hostname.d.ts +77 -0
  68. package/dist/utils/index.d.ts +1 -0
  69. package/package.json +2 -2
@@ -0,0 +1,426 @@
1
+ import { z } from "zod";
2
+ import { type Client } from "../../client";
3
+ /**
4
+ * Update CVM environment variables
5
+ *
6
+ * Updates environment variables for a CVM. Supports two scenarios:
7
+ * 1. Encrypted environment only: Direct update without compose hash verification
8
+ * 2. Allowed environment keys change: Requires compose hash verification (two-phase)
9
+ *
10
+ * When allowed_envs changes and compose_hash/transaction_hash are not provided,
11
+ * the API returns HTTP 465 with the compose hash to sign.
12
+ * The client should then register the compose hash on-chain and retry the request
13
+ * with both compose_hash and transaction_hash.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * import { createClient, updateCvmEnvs } from '@phala/cloud'
18
+ *
19
+ * const client = createClient({ apiKey: 'your-api-key' })
20
+ *
21
+ * // Phase 1: Initial update (may return precondition_required)
22
+ * const result = await updateCvmEnvs(client, {
23
+ * id: 'cvm-123',
24
+ * encrypted_env: 'hex-encoded-encrypted-data',
25
+ * env_keys: ['API_KEY', 'DATABASE_URL']
26
+ * })
27
+ *
28
+ * if (result.status === 'precondition_required') {
29
+ * // Register compose hash on-chain and get transaction hash
30
+ * const txHash = await registerComposeHashOnChain(
31
+ * result.compose_hash,
32
+ * result.kms_info
33
+ * )
34
+ *
35
+ * // Phase 2: Retry with compose hash and transaction hash
36
+ * const finalResult = await updateCvmEnvs(client, {
37
+ * id: 'cvm-123',
38
+ * encrypted_env: 'hex-encoded-encrypted-data',
39
+ * env_keys: ['API_KEY', 'DATABASE_URL'],
40
+ * compose_hash: result.compose_hash,
41
+ * transaction_hash: txHash
42
+ * })
43
+ *
44
+ * if (finalResult.status === 'in_progress') {
45
+ * console.log(`Update started: ${finalResult.correlation_id}`)
46
+ * }
47
+ * }
48
+ * ```
49
+ *
50
+ * ## Returns
51
+ *
52
+ * `UpdateCvmEnvsResult | unknown`
53
+ *
54
+ * Returns either:
55
+ * - `{ status: "in_progress", ... }` - Update initiated successfully
56
+ * - `{ status: "precondition_required", compose_hash: "...", ... }` - Compose hash verification required
57
+ *
58
+ * Return type depends on schema parameter.
59
+ *
60
+ * ## Parameters
61
+ *
62
+ * ### request (required)
63
+ * - **Type:** `UpdateCvmEnvsRequest`
64
+ *
65
+ * Request parameters containing CVM ID, encrypted environment, and optional env_keys/compose_hash.
66
+ *
67
+ * ### parameters (optional)
68
+ * - **Type:** `UpdateCvmEnvsParameters`
69
+ *
70
+ * Optional behavior parameters for schema validation.
71
+ *
72
+ * ```typescript
73
+ * // Use default schema
74
+ * const result = await updateCvmEnvs(client, {
75
+ * id: 'cvm-123',
76
+ * encrypted_env: 'hex-data'
77
+ * })
78
+ *
79
+ * // Return raw data without validation
80
+ * const raw = await updateCvmEnvs(client, request, { schema: false })
81
+ *
82
+ * // Use custom schema
83
+ * const customSchema = z.object({ status: z.string() })
84
+ * const custom = await updateCvmEnvs(client, request, { schema: customSchema })
85
+ * ```
86
+ *
87
+ * ## Safe Version
88
+ *
89
+ * Use `safeUpdateCvmEnvs` for error handling without exceptions:
90
+ *
91
+ * ```typescript
92
+ * import { safeUpdateCvmEnvs } from '@phala/cloud'
93
+ *
94
+ * const result = await safeUpdateCvmEnvs(client, {
95
+ * id: 'cvm-123',
96
+ * encrypted_env: 'hex-data',
97
+ * env_keys: ['API_KEY']
98
+ * })
99
+ *
100
+ * if (result.success) {
101
+ * if (result.data.status === 'precondition_required') {
102
+ * console.log(`Compose hash: ${result.data.compose_hash}`)
103
+ * console.log(`App ID: ${result.data.app_id}`)
104
+ * // Register on-chain and retry with transaction_hash
105
+ * } else {
106
+ * console.log(`Update started: ${result.data.correlation_id}`)
107
+ * }
108
+ * } else {
109
+ * if ("isRequestError" in result.error) {
110
+ * console.error(`HTTP ${result.error.status}: ${result.error.message}`)
111
+ * } else {
112
+ * console.error(`Validation error: ${result.error.issues}`)
113
+ * }
114
+ * }
115
+ * ```
116
+ */
117
+ export declare const UpdateCvmEnvsRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
118
+ id: z.ZodOptional<z.ZodString>;
119
+ uuid: z.ZodOptional<z.ZodString>;
120
+ app_id: z.ZodOptional<z.ZodString>;
121
+ instance_id: z.ZodOptional<z.ZodString>;
122
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
123
+ } & {
124
+ encrypted_env: z.ZodString;
125
+ env_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
126
+ compose_hash: z.ZodOptional<z.ZodString>;
127
+ transaction_hash: z.ZodOptional<z.ZodString>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ encrypted_env: string;
130
+ name?: string | undefined;
131
+ id?: string | undefined;
132
+ app_id?: string | undefined;
133
+ instance_id?: string | undefined;
134
+ compose_hash?: string | undefined;
135
+ uuid?: string | undefined;
136
+ env_keys?: string[] | undefined;
137
+ transaction_hash?: string | undefined;
138
+ }, {
139
+ encrypted_env: string;
140
+ name?: string | undefined;
141
+ id?: string | undefined;
142
+ app_id?: string | undefined;
143
+ instance_id?: string | undefined;
144
+ compose_hash?: string | undefined;
145
+ uuid?: string | undefined;
146
+ env_keys?: string[] | undefined;
147
+ transaction_hash?: string | undefined;
148
+ }>, any, any>, {
149
+ cvmId: any;
150
+ request: {
151
+ encrypted_env: any;
152
+ env_keys: any;
153
+ compose_hash: any;
154
+ transaction_hash: any;
155
+ };
156
+ _raw: any;
157
+ }, any>;
158
+ declare const UpdateCvmEnvsInProgressSchema: z.ZodObject<{
159
+ status: z.ZodLiteral<"in_progress">;
160
+ message: z.ZodString;
161
+ correlation_id: z.ZodString;
162
+ allowed_envs_changed: z.ZodBoolean;
163
+ }, "strip", z.ZodTypeAny, {
164
+ status: "in_progress";
165
+ message: string;
166
+ correlation_id: string;
167
+ allowed_envs_changed: boolean;
168
+ }, {
169
+ status: "in_progress";
170
+ message: string;
171
+ correlation_id: string;
172
+ allowed_envs_changed: boolean;
173
+ }>;
174
+ declare const UpdateCvmEnvsPreconditionRequiredSchema: z.ZodObject<{
175
+ status: z.ZodLiteral<"precondition_required">;
176
+ message: z.ZodString;
177
+ compose_hash: z.ZodString;
178
+ app_id: z.ZodString;
179
+ device_id: z.ZodString;
180
+ kms_info: z.ZodEffects<z.ZodObject<{
181
+ id: z.ZodString;
182
+ slug: z.ZodNullable<z.ZodString>;
183
+ url: z.ZodString;
184
+ version: z.ZodString;
185
+ chain_id: z.ZodNullable<z.ZodNumber>;
186
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
187
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
188
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
189
+ id: z.ZodString;
190
+ slug: z.ZodNullable<z.ZodString>;
191
+ url: z.ZodString;
192
+ version: z.ZodString;
193
+ chain_id: z.ZodNullable<z.ZodNumber>;
194
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
195
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
196
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
197
+ id: z.ZodString;
198
+ slug: z.ZodNullable<z.ZodString>;
199
+ url: z.ZodString;
200
+ version: z.ZodString;
201
+ chain_id: z.ZodNullable<z.ZodNumber>;
202
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
203
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
204
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
205
+ id: z.ZodString;
206
+ slug: z.ZodNullable<z.ZodString>;
207
+ url: z.ZodString;
208
+ version: z.ZodString;
209
+ chain_id: z.ZodNullable<z.ZodNumber>;
210
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
211
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
212
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
213
+ id: z.ZodString;
214
+ slug: z.ZodNullable<z.ZodString>;
215
+ url: z.ZodString;
216
+ version: z.ZodString;
217
+ chain_id: z.ZodNullable<z.ZodNumber>;
218
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
219
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
220
+ }, z.ZodTypeAny, "passthrough">>;
221
+ }, "strip", z.ZodTypeAny, {
222
+ status: "precondition_required";
223
+ message: string;
224
+ app_id: string;
225
+ kms_info: {
226
+ version: string;
227
+ id: string;
228
+ slug: string | null;
229
+ url: string;
230
+ chain_id: number | null;
231
+ kms_contract_address: `0x${string}`;
232
+ gateway_app_id: `0x${string}`;
233
+ } & {
234
+ [k: string]: unknown;
235
+ };
236
+ device_id: string;
237
+ compose_hash: string;
238
+ }, {
239
+ status: "precondition_required";
240
+ message: string;
241
+ app_id: string;
242
+ kms_info: {
243
+ version: string;
244
+ id: string;
245
+ slug: string | null;
246
+ url: string;
247
+ chain_id: number | null;
248
+ kms_contract_address: string | null;
249
+ gateway_app_id: string | null;
250
+ } & {
251
+ [k: string]: unknown;
252
+ };
253
+ device_id: string;
254
+ compose_hash: string;
255
+ }>;
256
+ export declare const UpdateCvmEnvsResultSchema: z.ZodUnion<[z.ZodObject<{
257
+ status: z.ZodLiteral<"in_progress">;
258
+ message: z.ZodString;
259
+ correlation_id: z.ZodString;
260
+ allowed_envs_changed: z.ZodBoolean;
261
+ }, "strip", z.ZodTypeAny, {
262
+ status: "in_progress";
263
+ message: string;
264
+ correlation_id: string;
265
+ allowed_envs_changed: boolean;
266
+ }, {
267
+ status: "in_progress";
268
+ message: string;
269
+ correlation_id: string;
270
+ allowed_envs_changed: boolean;
271
+ }>, z.ZodObject<{
272
+ status: z.ZodLiteral<"precondition_required">;
273
+ message: z.ZodString;
274
+ compose_hash: z.ZodString;
275
+ app_id: z.ZodString;
276
+ device_id: z.ZodString;
277
+ kms_info: z.ZodEffects<z.ZodObject<{
278
+ id: z.ZodString;
279
+ slug: z.ZodNullable<z.ZodString>;
280
+ url: z.ZodString;
281
+ version: z.ZodString;
282
+ chain_id: z.ZodNullable<z.ZodNumber>;
283
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
284
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
285
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
286
+ id: z.ZodString;
287
+ slug: z.ZodNullable<z.ZodString>;
288
+ url: z.ZodString;
289
+ version: z.ZodString;
290
+ chain_id: z.ZodNullable<z.ZodNumber>;
291
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
292
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
293
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
294
+ id: z.ZodString;
295
+ slug: z.ZodNullable<z.ZodString>;
296
+ url: z.ZodString;
297
+ version: z.ZodString;
298
+ chain_id: z.ZodNullable<z.ZodNumber>;
299
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
300
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
301
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
302
+ id: z.ZodString;
303
+ slug: z.ZodNullable<z.ZodString>;
304
+ url: z.ZodString;
305
+ version: z.ZodString;
306
+ chain_id: z.ZodNullable<z.ZodNumber>;
307
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
308
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
309
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
310
+ id: z.ZodString;
311
+ slug: z.ZodNullable<z.ZodString>;
312
+ url: z.ZodString;
313
+ version: z.ZodString;
314
+ chain_id: z.ZodNullable<z.ZodNumber>;
315
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
316
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
317
+ }, z.ZodTypeAny, "passthrough">>;
318
+ }, "strip", z.ZodTypeAny, {
319
+ status: "precondition_required";
320
+ message: string;
321
+ app_id: string;
322
+ kms_info: {
323
+ version: string;
324
+ id: string;
325
+ slug: string | null;
326
+ url: string;
327
+ chain_id: number | null;
328
+ kms_contract_address: `0x${string}`;
329
+ gateway_app_id: `0x${string}`;
330
+ } & {
331
+ [k: string]: unknown;
332
+ };
333
+ device_id: string;
334
+ compose_hash: string;
335
+ }, {
336
+ status: "precondition_required";
337
+ message: string;
338
+ app_id: string;
339
+ kms_info: {
340
+ version: string;
341
+ id: string;
342
+ slug: string | null;
343
+ url: string;
344
+ chain_id: number | null;
345
+ kms_contract_address: string | null;
346
+ gateway_app_id: string | null;
347
+ } & {
348
+ [k: string]: unknown;
349
+ };
350
+ device_id: string;
351
+ compose_hash: string;
352
+ }>]>;
353
+ export type UpdateCvmEnvsRequest = z.input<typeof UpdateCvmEnvsRequestSchema>;
354
+ export type UpdateCvmEnvsResult = z.infer<typeof UpdateCvmEnvsResultSchema>;
355
+ export type UpdateCvmEnvsInProgress = z.infer<typeof UpdateCvmEnvsInProgressSchema>;
356
+ export type UpdateCvmEnvsPreconditionRequired = z.infer<typeof UpdateCvmEnvsPreconditionRequiredSchema>;
357
+ /**
358
+ * Update CVM environment variables
359
+ *
360
+ * @param client - The API client
361
+ * @param request - Request parameters containing CVM ID and environment data
362
+ * @param parameters - Optional behavior parameters
363
+ * @returns Update result (either in_progress or precondition_required)
364
+ */
365
+ declare const updateCvmEnvs: {
366
+ (client: Client<import("../..").ApiVersion>, params?: any): Promise<{
367
+ status: "in_progress";
368
+ message: string;
369
+ correlation_id: string;
370
+ allowed_envs_changed: boolean;
371
+ } | {
372
+ status: "precondition_required";
373
+ message: string;
374
+ app_id: string;
375
+ kms_info: {
376
+ version: string;
377
+ id: string;
378
+ slug: string | null;
379
+ url: string;
380
+ chain_id: number | null;
381
+ kms_contract_address: `0x${string}`;
382
+ gateway_app_id: `0x${string}`;
383
+ } & {
384
+ [k: string]: unknown;
385
+ };
386
+ device_id: string;
387
+ compose_hash: string;
388
+ }>;
389
+ <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
390
+ schema: T;
391
+ } | undefined): Promise<z.TypeOf<T>>;
392
+ (client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
393
+ schema: false;
394
+ } | undefined): Promise<unknown>;
395
+ }, safeUpdateCvmEnvs: {
396
+ (client: Client<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
397
+ status: "in_progress";
398
+ message: string;
399
+ correlation_id: string;
400
+ allowed_envs_changed: boolean;
401
+ } | {
402
+ status: "precondition_required";
403
+ message: string;
404
+ app_id: string;
405
+ kms_info: {
406
+ version: string;
407
+ id: string;
408
+ slug: string | null;
409
+ url: string;
410
+ chain_id: number | null;
411
+ kms_contract_address: `0x${string}`;
412
+ gateway_app_id: `0x${string}`;
413
+ } & {
414
+ [k: string]: unknown;
415
+ };
416
+ device_id: string;
417
+ compose_hash: string;
418
+ }>>;
419
+ <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
420
+ schema: T;
421
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
422
+ (client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
423
+ schema: false;
424
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
425
+ };
426
+ export { updateCvmEnvs, safeUpdateCvmEnvs };
@@ -25,6 +25,7 @@ export declare const UpdateCvmResourcesRequestSchema: z.ZodEffects<z.ZodObject<{
25
25
  uuid: z.ZodOptional<z.ZodString>;
26
26
  app_id: z.ZodOptional<z.ZodString>;
27
27
  instance_id: z.ZodOptional<z.ZodString>;
28
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
28
29
  } & {
29
30
  vcpu: z.ZodOptional<z.ZodNumber>;
30
31
  memory: z.ZodOptional<z.ZodNumber>;
@@ -32,41 +33,43 @@ export declare const UpdateCvmResourcesRequestSchema: z.ZodEffects<z.ZodObject<{
32
33
  instance_type: z.ZodOptional<z.ZodString>;
33
34
  allow_restart: z.ZodOptional<z.ZodBoolean>;
34
35
  }, "strip", z.ZodTypeAny, {
36
+ name?: string | undefined;
35
37
  id?: string | undefined;
36
- vcpu?: number | undefined;
37
38
  app_id?: string | undefined;
38
39
  instance_id?: string | undefined;
40
+ vcpu?: number | undefined;
39
41
  memory?: number | undefined;
40
42
  disk_size?: number | undefined;
41
- uuid?: string | undefined;
42
43
  instance_type?: string | undefined;
44
+ uuid?: string | undefined;
43
45
  allow_restart?: boolean | undefined;
44
46
  }, {
47
+ name?: string | undefined;
45
48
  id?: string | undefined;
46
- vcpu?: number | undefined;
47
49
  app_id?: string | undefined;
48
50
  instance_id?: string | undefined;
51
+ vcpu?: number | undefined;
49
52
  memory?: number | undefined;
50
53
  disk_size?: number | undefined;
51
- uuid?: string | undefined;
52
54
  instance_type?: string | undefined;
55
+ uuid?: string | undefined;
53
56
  allow_restart?: boolean | undefined;
54
57
  }>, any, any>;
55
58
  export type UpdateCvmResourcesRequest = z.infer<typeof UpdateCvmResourcesRequestSchema>;
56
59
  declare const updateCvmResources: {
57
- (client: import("../..").BaseClient, params?: any): Promise<void>;
58
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient, params?: any, parameters?: {
60
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<void>;
61
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
59
62
  schema: T;
60
63
  } | undefined): Promise<z.TypeOf<T>>;
61
- (client: import("../..").BaseClient, params?: any, parameters?: {
64
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
62
65
  schema: false;
63
66
  } | undefined): Promise<unknown>;
64
67
  }, safeUpdateCvmResources: {
65
- (client: import("../..").BaseClient, params?: any): Promise<import("../..").SafeResult<void>>;
66
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient, params?: any, parameters?: {
68
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<void>>;
69
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
67
70
  schema: T;
68
71
  } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
69
- (client: import("../..").BaseClient, params?: any, parameters?: {
72
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
70
73
  schema: false;
71
74
  } | undefined): Promise<import("../..").SafeResult<unknown>>;
72
75
  };
@@ -22,12 +22,14 @@ export declare const UpdateCvmVisibilityRequestSchema: z.ZodEffects<z.ZodObject<
22
22
  uuid: z.ZodOptional<z.ZodString>;
23
23
  app_id: z.ZodOptional<z.ZodString>;
24
24
  instance_id: z.ZodOptional<z.ZodString>;
25
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
25
26
  } & {
26
27
  public_sysinfo: z.ZodBoolean;
27
28
  public_logs: z.ZodBoolean;
28
29
  }, "strip", z.ZodTypeAny, {
29
30
  public_sysinfo: boolean;
30
31
  public_logs: boolean;
32
+ name?: string | undefined;
31
33
  id?: string | undefined;
32
34
  app_id?: string | undefined;
33
35
  instance_id?: string | undefined;
@@ -35,6 +37,7 @@ export declare const UpdateCvmVisibilityRequestSchema: z.ZodEffects<z.ZodObject<
35
37
  }, {
36
38
  public_sysinfo: boolean;
37
39
  public_logs: boolean;
40
+ name?: string | undefined;
38
41
  id?: string | undefined;
39
42
  app_id?: string | undefined;
40
43
  instance_id?: string | undefined;
@@ -42,22 +45,22 @@ export declare const UpdateCvmVisibilityRequestSchema: z.ZodEffects<z.ZodObject<
42
45
  }>, any, any>;
43
46
  export type UpdateCvmVisibilityRequest = z.infer<typeof UpdateCvmVisibilityRequestSchema>;
44
47
  declare const updateCvmVisibility: {
45
- (client: import("../..").BaseClient, params?: any): Promise<{
48
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
46
49
  status: string;
47
50
  name: string;
48
51
  id: number;
49
- teepod_id: number | null;
50
- listed: boolean;
51
- vcpu: number;
52
52
  app_id: string;
53
53
  instance_id: string | null;
54
- in_progress: boolean;
54
+ vcpu: number;
55
55
  memory: number;
56
56
  disk_size: number;
57
+ listed: boolean;
58
+ in_progress: boolean;
57
59
  public_urls: {
58
60
  app: string;
59
61
  instance: string;
60
62
  }[];
63
+ teepod_id: number | null;
61
64
  vm_uuid: string | null;
62
65
  base_image: string | null;
63
66
  encrypted_env_pubkey: string | null;
@@ -77,38 +80,46 @@ declare const updateCvmVisibility: {
77
80
  gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
78
81
  }, z.ZodTypeAny, "passthrough"> | null | undefined;
79
82
  gateway_domain?: string | null | undefined;
83
+ machine_info?: {
84
+ vcpu: number;
85
+ memory: number;
86
+ disk_size: number;
87
+ gpu_count: number;
88
+ } | null | undefined;
89
+ updated_at?: string | null | undefined;
80
90
  teepod?: {
81
91
  name: string;
82
92
  id: number;
83
93
  region_identifier?: string | null | undefined;
84
94
  } | null | undefined;
95
+ instance_type?: string | null | undefined;
85
96
  contract_address?: string | null | undefined;
86
97
  deployer_address?: string | null | undefined;
87
98
  scheduled_delete_at?: string | null | undefined;
88
99
  }>;
89
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient, params?: any, parameters?: {
100
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
90
101
  schema: T;
91
102
  } | undefined): Promise<z.TypeOf<T>>;
92
- (client: import("../..").BaseClient, params?: any, parameters?: {
103
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
93
104
  schema: false;
94
105
  } | undefined): Promise<unknown>;
95
106
  }, safeUpdateCvmVisibility: {
96
- (client: import("../..").BaseClient, params?: any): Promise<import("../..").SafeResult<{
107
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
97
108
  status: string;
98
109
  name: string;
99
110
  id: number;
100
- teepod_id: number | null;
101
- listed: boolean;
102
- vcpu: number;
103
111
  app_id: string;
104
112
  instance_id: string | null;
105
- in_progress: boolean;
113
+ vcpu: number;
106
114
  memory: number;
107
115
  disk_size: number;
116
+ listed: boolean;
117
+ in_progress: boolean;
108
118
  public_urls: {
109
119
  app: string;
110
120
  instance: string;
111
121
  }[];
122
+ teepod_id: number | null;
112
123
  vm_uuid: string | null;
113
124
  base_image: string | null;
114
125
  encrypted_env_pubkey: string | null;
@@ -128,19 +139,27 @@ declare const updateCvmVisibility: {
128
139
  gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
129
140
  }, z.ZodTypeAny, "passthrough"> | null | undefined;
130
141
  gateway_domain?: string | null | undefined;
142
+ machine_info?: {
143
+ vcpu: number;
144
+ memory: number;
145
+ disk_size: number;
146
+ gpu_count: number;
147
+ } | null | undefined;
148
+ updated_at?: string | null | undefined;
131
149
  teepod?: {
132
150
  name: string;
133
151
  id: number;
134
152
  region_identifier?: string | null | undefined;
135
153
  } | null | undefined;
154
+ instance_type?: string | null | undefined;
136
155
  contract_address?: string | null | undefined;
137
156
  deployer_address?: string | null | undefined;
138
157
  scheduled_delete_at?: string | null | undefined;
139
158
  }>>;
140
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient, params?: any, parameters?: {
159
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
141
160
  schema: T;
142
161
  } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
143
- (client: import("../..").BaseClient, params?: any, parameters?: {
162
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
144
163
  schema: false;
145
164
  } | undefined): Promise<import("../..").SafeResult<unknown>>;
146
165
  };