@phala/cloud 0.2.9 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +324 -75
  2. package/dist/actions/apps/check_app_is_allowed.d.ts +16 -16
  3. package/dist/actions/apps/create_app_instance.d.ts +33 -24
  4. package/dist/actions/apps/get_app_attestation.d.ts +82 -32
  5. package/dist/actions/apps/get_app_device_allowlist.d.ts +281 -11
  6. package/dist/actions/apps/get_app_filter_options.d.ts +2 -2
  7. package/dist/actions/apps/get_app_list.d.ts +2 -2
  8. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +142 -74
  9. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +12 -12
  10. package/dist/actions/cvms/commit_cvm_provision.d.ts +424 -277
  11. package/dist/actions/cvms/commit_cvm_update.d.ts +2 -2
  12. package/dist/actions/cvms/confirm_cvm_patch.d.ts +2 -2
  13. package/dist/actions/cvms/delete_cvm.d.ts +2 -2
  14. package/dist/actions/cvms/get_available_os_images.d.ts +2 -2
  15. package/dist/actions/cvms/get_cvm_attestation.d.ts +2 -2
  16. package/dist/actions/cvms/get_cvm_compose_file.d.ts +338 -10
  17. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +10 -10
  18. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +2 -2
  19. package/dist/actions/cvms/get_cvm_info.d.ts +2 -2
  20. package/dist/actions/cvms/get_cvm_list.d.ts +4 -4
  21. package/dist/actions/cvms/get_cvm_network.d.ts +2 -2
  22. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +2 -2
  23. package/dist/actions/cvms/get_cvm_state.d.ts +6 -6
  24. package/dist/actions/cvms/get_cvm_stats.d.ts +2 -2
  25. package/dist/actions/cvms/get_cvm_status_batch.d.ts +6 -6
  26. package/dist/actions/cvms/get_cvm_user_config.d.ts +2 -2
  27. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +93 -0
  28. package/dist/actions/cvms/patch_cvm.d.ts +18 -18
  29. package/dist/actions/cvms/provision_cvm.d.ts +243 -225
  30. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +254 -38
  31. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +130 -43
  32. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +294 -110
  33. package/dist/actions/cvms/replicate_cvm.d.ts +7 -72
  34. package/dist/actions/cvms/restart_cvm.d.ts +7 -72
  35. package/dist/actions/cvms/shutdown_cvm.d.ts +9 -72
  36. package/dist/actions/cvms/start_cvm.d.ts +7 -72
  37. package/dist/actions/cvms/stop_cvm.d.ts +7 -72
  38. package/dist/actions/cvms/update_cvm_envs.d.ts +20 -20
  39. package/dist/actions/cvms/update_cvm_resources.d.ts +2 -2
  40. package/dist/actions/cvms/update_cvm_visibility.d.ts +26 -26
  41. package/dist/actions/cvms/update_docker_compose.d.ts +20 -20
  42. package/dist/actions/cvms/update_os_image.d.ts +2 -2
  43. package/dist/actions/cvms/update_prelaunch_script.d.ts +20 -20
  44. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +319 -0
  45. package/dist/actions/get_cvm_create_resources.d.ts +2412 -0
  46. package/dist/actions/index.d.ts +3 -0
  47. package/dist/actions/kms/get_kms_list.d.ts +10 -10
  48. package/dist/actions/kms/next_app_ids.d.ts +6 -6
  49. package/dist/actions/list-instance-types.d.ts +12 -12
  50. package/dist/actions/ssh_keys/create_ssh_key.d.ts +2 -2
  51. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +4 -4
  52. package/dist/actions/workspaces/get_workspace.d.ts +2 -0
  53. package/dist/actions/workspaces/get_workspace_nodes.d.ts +14 -14
  54. package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
  55. package/dist/client.d.ts +5 -2
  56. package/dist/create-client.d.ts +48 -0
  57. package/dist/index.js +1882 -1257
  58. package/dist/index.mjs +1850 -1255
  59. package/dist/types/app_compose.d.ts +125 -0
  60. package/dist/types/app_info_v20251028.d.ts +136 -259
  61. package/dist/types/app_info_v20260121.d.ts +4677 -345
  62. package/dist/types/app_revision.d.ts +8 -8
  63. package/dist/types/client.d.ts +2 -2
  64. package/dist/types/cvm_id.d.ts +6 -6
  65. package/dist/types/cvm_info.d.ts +536 -10
  66. package/dist/types/cvm_info_v20251028.d.ts +65 -65
  67. package/dist/types/cvm_info_v20260121.d.ts +1636 -85
  68. package/dist/types/version-mappings.d.ts +45 -8
  69. package/dist/utils/errors.d.ts +8 -1
  70. package/package.json +2 -2
@@ -134,19 +134,19 @@ export declare const UpdateDockerComposeRequestSchema: z.ZodEffects<z.ZodEffects
134
134
  docker_compose_file: string;
135
135
  name?: string | undefined;
136
136
  id?: string | undefined;
137
+ uuid?: string | undefined;
137
138
  app_id?: string | undefined;
138
139
  instance_id?: string | undefined;
139
140
  compose_hash?: string | undefined;
140
- uuid?: string | undefined;
141
141
  transaction_hash?: string | undefined;
142
142
  }, {
143
143
  docker_compose_file: string;
144
144
  name?: string | undefined;
145
145
  id?: string | undefined;
146
+ uuid?: string | undefined;
146
147
  app_id?: string | undefined;
147
148
  instance_id?: string | undefined;
148
149
  compose_hash?: string | undefined;
149
- uuid?: string | undefined;
150
150
  transaction_hash?: string | undefined;
151
151
  }>, any, any>, {
152
152
  cvmId: any;
@@ -221,36 +221,36 @@ declare const UpdateDockerComposePreconditionRequiredSchema: z.ZodObject<{
221
221
  status: "precondition_required";
222
222
  message: string;
223
223
  app_id: string;
224
+ compose_hash: string;
225
+ device_id: string;
224
226
  kms_info: {
225
227
  version: string;
226
228
  id: string;
227
229
  slug: string | null;
228
- url: string;
229
230
  chain_id: number | null;
231
+ url: string;
230
232
  kms_contract_address: `0x${string}`;
231
233
  gateway_app_id: `0x${string}`;
232
234
  } & {
233
235
  [k: string]: unknown;
234
236
  };
235
- device_id: string;
236
- compose_hash: string;
237
237
  }, {
238
238
  status: "precondition_required";
239
239
  message: string;
240
240
  app_id: string;
241
+ compose_hash: string;
242
+ device_id: string;
241
243
  kms_info: {
242
244
  version: string;
243
245
  id: string;
244
246
  slug: string | null;
245
- url: string;
246
247
  chain_id: number | null;
248
+ url: string;
247
249
  kms_contract_address: string | null;
248
250
  gateway_app_id: string | null;
249
251
  } & {
250
252
  [k: string]: unknown;
251
253
  };
252
- device_id: string;
253
- compose_hash: string;
254
254
  }>;
255
255
  export declare const UpdateDockerComposeResultSchema: z.ZodUnion<[z.ZodObject<{
256
256
  status: z.ZodLiteral<"in_progress">;
@@ -315,36 +315,36 @@ export declare const UpdateDockerComposeResultSchema: z.ZodUnion<[z.ZodObject<{
315
315
  status: "precondition_required";
316
316
  message: string;
317
317
  app_id: string;
318
+ compose_hash: string;
319
+ device_id: string;
318
320
  kms_info: {
319
321
  version: string;
320
322
  id: string;
321
323
  slug: string | null;
322
- url: string;
323
324
  chain_id: number | null;
325
+ url: string;
324
326
  kms_contract_address: `0x${string}`;
325
327
  gateway_app_id: `0x${string}`;
326
328
  } & {
327
329
  [k: string]: unknown;
328
330
  };
329
- device_id: string;
330
- compose_hash: string;
331
331
  }, {
332
332
  status: "precondition_required";
333
333
  message: string;
334
334
  app_id: string;
335
+ compose_hash: string;
336
+ device_id: string;
335
337
  kms_info: {
336
338
  version: string;
337
339
  id: string;
338
340
  slug: string | null;
339
- url: string;
340
341
  chain_id: number | null;
342
+ url: string;
341
343
  kms_contract_address: string | null;
342
344
  gateway_app_id: string | null;
343
345
  } & {
344
346
  [k: string]: unknown;
345
347
  };
346
- device_id: string;
347
- compose_hash: string;
348
348
  }>]>;
349
349
  export type UpdateDockerComposeRequest = z.input<typeof UpdateDockerComposeRequestSchema>;
350
350
  export type UpdateDockerComposeResult = z.infer<typeof UpdateDockerComposeResultSchema>;
@@ -367,19 +367,19 @@ declare const updateDockerCompose: {
367
367
  status: "precondition_required";
368
368
  message: string;
369
369
  app_id: string;
370
+ compose_hash: string;
371
+ device_id: string;
370
372
  kms_info: {
371
373
  version: string;
372
374
  id: string;
373
375
  slug: string | null;
374
- url: string;
375
376
  chain_id: number | null;
377
+ url: string;
376
378
  kms_contract_address: `0x${string}`;
377
379
  gateway_app_id: `0x${string}`;
378
380
  } & {
379
381
  [k: string]: unknown;
380
382
  };
381
- device_id: string;
382
- compose_hash: string;
383
383
  }>;
384
384
  <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
385
385
  schema: T;
@@ -396,19 +396,19 @@ declare const updateDockerCompose: {
396
396
  status: "precondition_required";
397
397
  message: string;
398
398
  app_id: string;
399
+ compose_hash: string;
400
+ device_id: string;
399
401
  kms_info: {
400
402
  version: string;
401
403
  id: string;
402
404
  slug: string | null;
403
- url: string;
404
405
  chain_id: number | null;
406
+ url: string;
405
407
  kms_contract_address: `0x${string}`;
406
408
  gateway_app_id: `0x${string}`;
407
409
  } & {
408
410
  [k: string]: unknown;
409
411
  };
410
- device_id: string;
411
- compose_hash: string;
412
412
  }>>;
413
413
  <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
414
414
  schema: T;
@@ -32,16 +32,16 @@ export declare const UpdateOsImageRequestSchema: z.ZodEffects<z.ZodObject<{
32
32
  os_image_name: string;
33
33
  name?: string | undefined;
34
34
  id?: string | undefined;
35
+ uuid?: string | undefined;
35
36
  app_id?: string | undefined;
36
37
  instance_id?: string | undefined;
37
- uuid?: string | undefined;
38
38
  }, {
39
39
  os_image_name: string;
40
40
  name?: string | undefined;
41
41
  id?: string | undefined;
42
+ uuid?: string | undefined;
42
43
  app_id?: string | undefined;
43
44
  instance_id?: string | undefined;
44
- uuid?: string | undefined;
45
45
  }>, any, any>;
46
46
  export type UpdateOsImageRequest = z.infer<typeof UpdateOsImageRequestSchema>;
47
47
  declare const updateOsImage: {
@@ -131,19 +131,19 @@ export declare const UpdatePreLaunchScriptRequestSchema: z.ZodEffects<z.ZodEffec
131
131
  pre_launch_script: string;
132
132
  name?: string | undefined;
133
133
  id?: string | undefined;
134
+ uuid?: string | undefined;
134
135
  app_id?: string | undefined;
135
136
  instance_id?: string | undefined;
136
137
  compose_hash?: string | undefined;
137
- uuid?: string | undefined;
138
138
  transaction_hash?: string | undefined;
139
139
  }, {
140
140
  pre_launch_script: string;
141
141
  name?: string | undefined;
142
142
  id?: string | undefined;
143
+ uuid?: string | undefined;
143
144
  app_id?: string | undefined;
144
145
  instance_id?: string | undefined;
145
146
  compose_hash?: string | undefined;
146
- uuid?: string | undefined;
147
147
  transaction_hash?: string | undefined;
148
148
  }>, any, any>, {
149
149
  cvmId: any;
@@ -218,36 +218,36 @@ declare const UpdatePreLaunchScriptPreconditionRequiredSchema: z.ZodObject<{
218
218
  status: "precondition_required";
219
219
  message: string;
220
220
  app_id: string;
221
+ compose_hash: string;
222
+ device_id: string;
221
223
  kms_info: {
222
224
  version: string;
223
225
  id: string;
224
226
  slug: string | null;
225
- url: string;
226
227
  chain_id: number | null;
228
+ url: string;
227
229
  kms_contract_address: `0x${string}`;
228
230
  gateway_app_id: `0x${string}`;
229
231
  } & {
230
232
  [k: string]: unknown;
231
233
  };
232
- device_id: string;
233
- compose_hash: string;
234
234
  }, {
235
235
  status: "precondition_required";
236
236
  message: string;
237
237
  app_id: string;
238
+ compose_hash: string;
239
+ device_id: string;
238
240
  kms_info: {
239
241
  version: string;
240
242
  id: string;
241
243
  slug: string | null;
242
- url: string;
243
244
  chain_id: number | null;
245
+ url: string;
244
246
  kms_contract_address: string | null;
245
247
  gateway_app_id: string | null;
246
248
  } & {
247
249
  [k: string]: unknown;
248
250
  };
249
- device_id: string;
250
- compose_hash: string;
251
251
  }>;
252
252
  export declare const UpdatePreLaunchScriptResultSchema: z.ZodUnion<[z.ZodObject<{
253
253
  status: z.ZodLiteral<"in_progress">;
@@ -312,36 +312,36 @@ export declare const UpdatePreLaunchScriptResultSchema: z.ZodUnion<[z.ZodObject<
312
312
  status: "precondition_required";
313
313
  message: string;
314
314
  app_id: string;
315
+ compose_hash: string;
316
+ device_id: string;
315
317
  kms_info: {
316
318
  version: string;
317
319
  id: string;
318
320
  slug: string | null;
319
- url: string;
320
321
  chain_id: number | null;
322
+ url: string;
321
323
  kms_contract_address: `0x${string}`;
322
324
  gateway_app_id: `0x${string}`;
323
325
  } & {
324
326
  [k: string]: unknown;
325
327
  };
326
- device_id: string;
327
- compose_hash: string;
328
328
  }, {
329
329
  status: "precondition_required";
330
330
  message: string;
331
331
  app_id: string;
332
+ compose_hash: string;
333
+ device_id: string;
332
334
  kms_info: {
333
335
  version: string;
334
336
  id: string;
335
337
  slug: string | null;
336
- url: string;
337
338
  chain_id: number | null;
339
+ url: string;
338
340
  kms_contract_address: string | null;
339
341
  gateway_app_id: string | null;
340
342
  } & {
341
343
  [k: string]: unknown;
342
344
  };
343
- device_id: string;
344
- compose_hash: string;
345
345
  }>]>;
346
346
  export type UpdatePreLaunchScriptRequest = z.input<typeof UpdatePreLaunchScriptRequestSchema>;
347
347
  export type UpdatePreLaunchScriptResult = z.infer<typeof UpdatePreLaunchScriptResultSchema>;
@@ -364,19 +364,19 @@ declare const updatePreLaunchScript: {
364
364
  status: "precondition_required";
365
365
  message: string;
366
366
  app_id: string;
367
+ compose_hash: string;
368
+ device_id: string;
367
369
  kms_info: {
368
370
  version: string;
369
371
  id: string;
370
372
  slug: string | null;
371
- url: string;
372
373
  chain_id: number | null;
374
+ url: string;
373
375
  kms_contract_address: `0x${string}`;
374
376
  gateway_app_id: `0x${string}`;
375
377
  } & {
376
378
  [k: string]: unknown;
377
379
  };
378
- device_id: string;
379
- compose_hash: string;
380
380
  }>;
381
381
  <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
382
382
  schema: T;
@@ -393,19 +393,19 @@ declare const updatePreLaunchScript: {
393
393
  status: "precondition_required";
394
394
  message: string;
395
395
  app_id: string;
396
+ compose_hash: string;
397
+ device_id: string;
396
398
  kms_info: {
397
399
  version: string;
398
400
  id: string;
399
401
  slug: string | null;
400
- url: string;
401
402
  chain_id: number | null;
403
+ url: string;
402
404
  kms_contract_address: `0x${string}`;
403
405
  gateway_app_id: `0x${string}`;
404
406
  } & {
405
407
  [k: string]: unknown;
406
408
  };
407
- device_id: string;
408
- compose_hash: string;
409
409
  }>>;
410
410
  <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params?: any, parameters?: {
411
411
  schema: T;
@@ -0,0 +1,319 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Upgrade a CVM's pre-launch script to the latest official version.
4
+ *
5
+ * Replaces the CVM's current pre-launch script with the latest official
6
+ * version maintained by Phala and triggers the standard update workflow.
7
+ * The official script content is held server-side; clients only need to
8
+ * call this endpoint with the CVM ID.
9
+ *
10
+ * For contract-owned KMS (ETHEREUM/BASE), the first call returns
11
+ * `precondition_required` with a compose hash to register on-chain. After
12
+ * registration, retry with `compose_hash` and `transaction_hash`.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * import { createClient, upgradePreLaunchScript } from '@phala/cloud'
17
+ *
18
+ * const client = createClient({ apiKey: 'your-api-key' })
19
+ *
20
+ * // Phase 1: kick off the upgrade
21
+ * const result = await upgradePreLaunchScript(client, { id: 'cvm-123' })
22
+ *
23
+ * if (result.status === 'precondition_required') {
24
+ * // Register compose hash on-chain, then retry with the headers
25
+ * const txHash = await registerComposeHashOnChain(result.compose_hash, result.kms_info)
26
+ * await upgradePreLaunchScript(client, {
27
+ * id: 'cvm-123',
28
+ * compose_hash: result.compose_hash,
29
+ * transaction_hash: txHash,
30
+ * })
31
+ * }
32
+ * ```
33
+ */
34
+ export declare const UpgradePreLaunchScriptRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
35
+ id: z.ZodOptional<z.ZodString>;
36
+ uuid: z.ZodOptional<z.ZodString>;
37
+ app_id: z.ZodOptional<z.ZodString>;
38
+ instance_id: z.ZodOptional<z.ZodString>;
39
+ name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
40
+ } & {
41
+ compose_hash: z.ZodOptional<z.ZodString>;
42
+ transaction_hash: z.ZodOptional<z.ZodString>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ name?: string | undefined;
45
+ id?: string | undefined;
46
+ uuid?: string | undefined;
47
+ app_id?: string | undefined;
48
+ instance_id?: string | undefined;
49
+ compose_hash?: string | undefined;
50
+ transaction_hash?: string | undefined;
51
+ }, {
52
+ name?: string | undefined;
53
+ id?: string | undefined;
54
+ uuid?: string | undefined;
55
+ app_id?: string | undefined;
56
+ instance_id?: string | undefined;
57
+ compose_hash?: string | undefined;
58
+ transaction_hash?: string | undefined;
59
+ }>, any, any>, {
60
+ cvmId: any;
61
+ request: {
62
+ compose_hash: any;
63
+ transaction_hash: any;
64
+ };
65
+ _raw: any;
66
+ }, any>;
67
+ declare const UpgradePreLaunchScriptInProgressSchema: z.ZodObject<{
68
+ status: z.ZodLiteral<"in_progress">;
69
+ message: z.ZodString;
70
+ correlation_id: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ status: "in_progress";
73
+ message: string;
74
+ correlation_id: string;
75
+ }, {
76
+ status: "in_progress";
77
+ message: string;
78
+ correlation_id: string;
79
+ }>;
80
+ declare const UpgradePreLaunchScriptPreconditionRequiredSchema: z.ZodObject<{
81
+ status: z.ZodLiteral<"precondition_required">;
82
+ message: z.ZodString;
83
+ compose_hash: z.ZodString;
84
+ app_id: z.ZodString;
85
+ device_id: z.ZodString;
86
+ kms_info: z.ZodEffects<z.ZodObject<{
87
+ id: z.ZodString;
88
+ slug: z.ZodNullable<z.ZodString>;
89
+ url: z.ZodString;
90
+ version: z.ZodString;
91
+ chain_id: z.ZodNullable<z.ZodNumber>;
92
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
93
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
94
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
95
+ id: z.ZodString;
96
+ slug: z.ZodNullable<z.ZodString>;
97
+ url: z.ZodString;
98
+ version: z.ZodString;
99
+ chain_id: z.ZodNullable<z.ZodNumber>;
100
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
101
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
102
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
103
+ id: z.ZodString;
104
+ slug: z.ZodNullable<z.ZodString>;
105
+ url: z.ZodString;
106
+ version: z.ZodString;
107
+ chain_id: z.ZodNullable<z.ZodNumber>;
108
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
109
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
110
+ }, z.ZodTypeAny, "passthrough">>, z.objectOutputType<{
111
+ id: z.ZodString;
112
+ slug: z.ZodNullable<z.ZodString>;
113
+ url: z.ZodString;
114
+ version: z.ZodString;
115
+ chain_id: z.ZodNullable<z.ZodNumber>;
116
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
117
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
118
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
119
+ id: z.ZodString;
120
+ slug: z.ZodNullable<z.ZodString>;
121
+ url: z.ZodString;
122
+ version: z.ZodString;
123
+ chain_id: z.ZodNullable<z.ZodNumber>;
124
+ kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
125
+ gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
126
+ }, z.ZodTypeAny, "passthrough">>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ status: "precondition_required";
129
+ message: string;
130
+ app_id: string;
131
+ compose_hash: string;
132
+ device_id: string;
133
+ kms_info: {
134
+ version: string;
135
+ id: string;
136
+ slug: string | null;
137
+ chain_id: number | null;
138
+ url: string;
139
+ kms_contract_address: `0x${string}`;
140
+ gateway_app_id: `0x${string}`;
141
+ } & {
142
+ [k: string]: unknown;
143
+ };
144
+ }, {
145
+ status: "precondition_required";
146
+ message: string;
147
+ app_id: string;
148
+ compose_hash: string;
149
+ device_id: string;
150
+ kms_info: {
151
+ version: string;
152
+ id: string;
153
+ slug: string | null;
154
+ chain_id: number | null;
155
+ url: string;
156
+ kms_contract_address: string | null;
157
+ gateway_app_id: string | null;
158
+ } & {
159
+ [k: string]: unknown;
160
+ };
161
+ }>;
162
+ export declare const UpgradePreLaunchScriptResultSchema: z.ZodUnion<[z.ZodObject<{
163
+ status: z.ZodLiteral<"in_progress">;
164
+ message: z.ZodString;
165
+ correlation_id: z.ZodString;
166
+ }, "strip", z.ZodTypeAny, {
167
+ status: "in_progress";
168
+ message: string;
169
+ correlation_id: string;
170
+ }, {
171
+ status: "in_progress";
172
+ message: string;
173
+ correlation_id: string;
174
+ }>, 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
+ compose_hash: string;
226
+ device_id: string;
227
+ kms_info: {
228
+ version: string;
229
+ id: string;
230
+ slug: string | null;
231
+ chain_id: number | null;
232
+ url: string;
233
+ kms_contract_address: `0x${string}`;
234
+ gateway_app_id: `0x${string}`;
235
+ } & {
236
+ [k: string]: unknown;
237
+ };
238
+ }, {
239
+ status: "precondition_required";
240
+ message: string;
241
+ app_id: string;
242
+ compose_hash: string;
243
+ device_id: string;
244
+ kms_info: {
245
+ version: string;
246
+ id: string;
247
+ slug: string | null;
248
+ chain_id: number | null;
249
+ url: string;
250
+ kms_contract_address: string | null;
251
+ gateway_app_id: string | null;
252
+ } & {
253
+ [k: string]: unknown;
254
+ };
255
+ }>]>;
256
+ export type UpgradePreLaunchScriptRequest = z.input<typeof UpgradePreLaunchScriptRequestSchema>;
257
+ export type UpgradePreLaunchScriptResult = z.infer<typeof UpgradePreLaunchScriptResultSchema>;
258
+ export type UpgradePreLaunchScriptInProgress = z.infer<typeof UpgradePreLaunchScriptInProgressSchema>;
259
+ export type UpgradePreLaunchScriptPreconditionRequired = z.infer<typeof UpgradePreLaunchScriptPreconditionRequiredSchema>;
260
+ declare const upgradePreLaunchScript: {
261
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
262
+ status: "in_progress";
263
+ message: string;
264
+ correlation_id: string;
265
+ } | {
266
+ status: "precondition_required";
267
+ message: string;
268
+ app_id: string;
269
+ compose_hash: string;
270
+ device_id: string;
271
+ kms_info: {
272
+ version: string;
273
+ id: string;
274
+ slug: string | null;
275
+ chain_id: number | null;
276
+ url: string;
277
+ kms_contract_address: `0x${string}`;
278
+ gateway_app_id: `0x${string}`;
279
+ } & {
280
+ [k: string]: unknown;
281
+ };
282
+ }>;
283
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
284
+ schema: T;
285
+ } | undefined): Promise<z.TypeOf<T>>;
286
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
287
+ schema: false;
288
+ } | undefined): Promise<unknown>;
289
+ }, safeUpgradePreLaunchScript: {
290
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
291
+ status: "in_progress";
292
+ message: string;
293
+ correlation_id: string;
294
+ } | {
295
+ status: "precondition_required";
296
+ message: string;
297
+ app_id: string;
298
+ compose_hash: string;
299
+ device_id: string;
300
+ kms_info: {
301
+ version: string;
302
+ id: string;
303
+ slug: string | null;
304
+ chain_id: number | null;
305
+ url: string;
306
+ kms_contract_address: `0x${string}`;
307
+ gateway_app_id: `0x${string}`;
308
+ } & {
309
+ [k: string]: unknown;
310
+ };
311
+ }>>;
312
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
313
+ schema: T;
314
+ } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
315
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
316
+ schema: false;
317
+ } | undefined): Promise<import("../..").SafeResult<unknown>>;
318
+ };
319
+ export { upgradePreLaunchScript, safeUpgradePreLaunchScript };