@phala/cloud 0.6.6 → 0.6.7-beta.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.
- package/README.md +19 -0
- package/dist/actions/apps/create_app_instance.d.ts +38 -0
- package/dist/actions/apps/get_app_pending_updates.d.ts +93 -0
- package/dist/actions/blockchains/remove_compose_hash.d.ts +77 -0
- package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +83 -11
- package/dist/actions/cvms/commit_cvm_provision.d.ts +191 -0
- package/dist/actions/cvms/commit_cvm_update.d.ts +77 -3
- package/dist/actions/cvms/confirm_cvm_patch.d.ts +80 -3
- package/dist/actions/cvms/cvm_draft.d.ts +1338 -0
- package/dist/actions/cvms/cvm_update_response.d.ts +154 -0
- package/dist/actions/cvms/get_cvm_init_scripts.d.ts +10 -16
- package/dist/actions/cvms/patch_cvm.d.ts +206 -62
- package/dist/actions/cvms/provision_cvm.d.ts +5 -7
- package/dist/actions/cvms/put_cvm_init_scripts.d.ts +49 -10
- package/dist/actions/cvms/update_cvm_envs.d.ts +129 -19
- package/dist/actions/cvms/update_docker_compose.d.ts +134 -20
- package/dist/actions/cvms/update_prelaunch_script.d.ts +134 -20
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +145 -15
- package/dist/actions/cvms/wait_for_cvm_finality.d.ts +153 -0
- package/dist/actions/index.d.ts +5 -1
- package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +31 -7
- package/dist/create-client.d.ts +1267 -22
- package/dist/index.js +2540 -1784
- package/dist/index.mjs +2509 -1785
- package/dist/types/app_compose.d.ts +8 -6
- package/dist/types/cvm_finality.d.ts +134 -0
- package/dist/types/cvm_info.d.ts +266 -0
- package/dist/types/cvm_info_v20251028.d.ts +37 -0
- package/dist/types/cvm_info_v20260121.d.ts +111 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -11,10 +11,11 @@ export declare const PutCvmInitScriptsRequestSchema: z.ZodObject<{
|
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type PutCvmInitScriptsRequest = z.input<typeof PutCvmInitScriptsRequestSchema>;
|
|
13
13
|
/**
|
|
14
|
-
* Replace
|
|
14
|
+
* Replace the raw init scripts of a CVM
|
|
15
15
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Phala Cloud admins only. Other callers select init scripts by name with
|
|
17
|
+
* `patchCvm({ init_scripts })`. An empty list clears them. Same on-chain
|
|
18
|
+
* two-phase result as `patchCvm`.
|
|
18
19
|
*
|
|
19
20
|
* @example
|
|
20
21
|
* ```typescript
|
|
@@ -23,7 +24,7 @@ export type PutCvmInitScriptsRequest = z.input<typeof PutCvmInitScriptsRequestSc
|
|
|
23
24
|
* const client = createClient()
|
|
24
25
|
* await putCvmInitScripts(client, {
|
|
25
26
|
* id: 'my-cvm',
|
|
26
|
-
* scripts: ['echo
|
|
27
|
+
* scripts: ['echo admin-script\\n'],
|
|
27
28
|
* })
|
|
28
29
|
* ```
|
|
29
30
|
*/
|
|
@@ -37,9 +38,6 @@ declare const putCvmInitScripts: {
|
|
|
37
38
|
scripts: string[];
|
|
38
39
|
prepareOnly?: boolean | undefined;
|
|
39
40
|
}): Promise<{
|
|
40
|
-
requiresOnChainHash: false;
|
|
41
|
-
correlationId: string;
|
|
42
|
-
} | {
|
|
43
41
|
requiresOnChainHash: true;
|
|
44
42
|
composeHash: string;
|
|
45
43
|
appId: string;
|
|
@@ -63,6 +61,28 @@ declare const putCvmInitScripts: {
|
|
|
63
61
|
device_id_allowed: boolean;
|
|
64
62
|
is_allowed: boolean;
|
|
65
63
|
} | undefined;
|
|
64
|
+
} | {
|
|
65
|
+
correlationId: string;
|
|
66
|
+
status?: string | undefined;
|
|
67
|
+
finalityWait?: {
|
|
68
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
69
|
+
correlation_id: string;
|
|
70
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
71
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
72
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
73
|
+
transaction: {
|
|
74
|
+
hash: string;
|
|
75
|
+
block_number: number;
|
|
76
|
+
chain_id: number;
|
|
77
|
+
} | null;
|
|
78
|
+
finality: {
|
|
79
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
80
|
+
policy_block_number: number | null;
|
|
81
|
+
blocks_remaining: number | null;
|
|
82
|
+
eta_seconds: number | null;
|
|
83
|
+
};
|
|
84
|
+
} | undefined;
|
|
85
|
+
requiresOnChainHash: false;
|
|
66
86
|
}>;
|
|
67
87
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
68
88
|
id?: string | undefined;
|
|
@@ -96,9 +116,6 @@ declare const putCvmInitScripts: {
|
|
|
96
116
|
scripts: string[];
|
|
97
117
|
prepareOnly?: boolean | undefined;
|
|
98
118
|
}): Promise<import("../..").SafeResult<{
|
|
99
|
-
requiresOnChainHash: false;
|
|
100
|
-
correlationId: string;
|
|
101
|
-
} | {
|
|
102
119
|
requiresOnChainHash: true;
|
|
103
120
|
composeHash: string;
|
|
104
121
|
appId: string;
|
|
@@ -122,6 +139,28 @@ declare const putCvmInitScripts: {
|
|
|
122
139
|
device_id_allowed: boolean;
|
|
123
140
|
is_allowed: boolean;
|
|
124
141
|
} | undefined;
|
|
142
|
+
} | {
|
|
143
|
+
correlationId: string;
|
|
144
|
+
status?: string | undefined;
|
|
145
|
+
finalityWait?: {
|
|
146
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
147
|
+
correlation_id: string;
|
|
148
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
149
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
150
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
151
|
+
transaction: {
|
|
152
|
+
hash: string;
|
|
153
|
+
block_number: number;
|
|
154
|
+
chain_id: number;
|
|
155
|
+
} | null;
|
|
156
|
+
finality: {
|
|
157
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
158
|
+
policy_block_number: number | null;
|
|
159
|
+
blocks_remaining: number | null;
|
|
160
|
+
eta_seconds: number | null;
|
|
161
|
+
};
|
|
162
|
+
} | undefined;
|
|
163
|
+
requiresOnChainHash: false;
|
|
125
164
|
}>>;
|
|
126
165
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
127
166
|
id?: string | undefined;
|
|
@@ -25,7 +25,7 @@ import { type Client } from "../../client";
|
|
|
25
25
|
* env_keys: ['API_KEY', 'DATABASE_URL']
|
|
26
26
|
* })
|
|
27
27
|
*
|
|
28
|
-
* if (
|
|
28
|
+
* if ('compose_hash' in result) {
|
|
29
29
|
* // Register compose hash on-chain and get transaction hash
|
|
30
30
|
* const txHash = await registerComposeHashOnChain(
|
|
31
31
|
* result.compose_hash,
|
|
@@ -155,9 +155,46 @@ export declare const UpdateCvmEnvsRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
|
155
155
|
transaction_hash?: string | undefined;
|
|
156
156
|
}>>;
|
|
157
157
|
declare const UpdateCvmEnvsInProgressSchema: z.ZodObject<{
|
|
158
|
-
|
|
158
|
+
correlation_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
|
|
159
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
160
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
161
|
+
create: "create";
|
|
162
|
+
update: "update";
|
|
163
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
164
|
+
correlation_id: z.ZodString;
|
|
165
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
166
|
+
applying: "applying";
|
|
167
|
+
awaiting_finality: "awaiting_finality";
|
|
168
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
169
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
170
|
+
finalized: "finalized";
|
|
171
|
+
safe: "safe";
|
|
172
|
+
submitted: "submitted";
|
|
173
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
174
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
175
|
+
applying: "applying";
|
|
176
|
+
finalized: "finalized";
|
|
177
|
+
safe: "safe";
|
|
178
|
+
submitted: "submitted";
|
|
179
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
180
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
181
|
+
hash: z.ZodString;
|
|
182
|
+
block_number: z.ZodNumber;
|
|
183
|
+
chain_id: z.ZodNumber;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
finality: z.ZodObject<{
|
|
186
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
187
|
+
finalized: "finalized";
|
|
188
|
+
latest: "latest";
|
|
189
|
+
safe: "safe";
|
|
190
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
191
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
192
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
193
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
}, z.core.$strip>>>>;
|
|
159
196
|
message: z.ZodString;
|
|
160
|
-
|
|
197
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<"in_progress" | "no_change", string>>;
|
|
161
198
|
allowed_envs_changed: z.ZodBoolean;
|
|
162
199
|
}, z.core.$strip>;
|
|
163
200
|
declare const UpdateCvmEnvsPreconditionRequiredSchema: z.ZodObject<{
|
|
@@ -198,11 +235,6 @@ declare const UpdateCvmEnvsPreconditionRequiredSchema: z.ZodObject<{
|
|
|
198
235
|
}>>;
|
|
199
236
|
}, z.core.$strip>;
|
|
200
237
|
export declare const UpdateCvmEnvsResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
201
|
-
status: z.ZodLiteral<"in_progress">;
|
|
202
|
-
message: z.ZodString;
|
|
203
|
-
correlation_id: z.ZodString;
|
|
204
|
-
allowed_envs_changed: z.ZodBoolean;
|
|
205
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
206
238
|
status: z.ZodLiteral<"precondition_required">;
|
|
207
239
|
message: z.ZodString;
|
|
208
240
|
compose_hash: z.ZodString;
|
|
@@ -238,6 +270,48 @@ export declare const UpdateCvmEnvsResultSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
238
270
|
gateway_app_id: `0x${string}`;
|
|
239
271
|
k256_pubkey?: string | null | undefined;
|
|
240
272
|
}>>;
|
|
273
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
274
|
+
correlation_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
|
|
275
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
276
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
277
|
+
create: "create";
|
|
278
|
+
update: "update";
|
|
279
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
280
|
+
correlation_id: z.ZodString;
|
|
281
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
282
|
+
applying: "applying";
|
|
283
|
+
awaiting_finality: "awaiting_finality";
|
|
284
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
285
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
286
|
+
finalized: "finalized";
|
|
287
|
+
safe: "safe";
|
|
288
|
+
submitted: "submitted";
|
|
289
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
290
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
291
|
+
applying: "applying";
|
|
292
|
+
finalized: "finalized";
|
|
293
|
+
safe: "safe";
|
|
294
|
+
submitted: "submitted";
|
|
295
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
296
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
297
|
+
hash: z.ZodString;
|
|
298
|
+
block_number: z.ZodNumber;
|
|
299
|
+
chain_id: z.ZodNumber;
|
|
300
|
+
}, z.core.$strip>>;
|
|
301
|
+
finality: z.ZodObject<{
|
|
302
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
303
|
+
finalized: "finalized";
|
|
304
|
+
latest: "latest";
|
|
305
|
+
safe: "safe";
|
|
306
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
307
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
308
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
309
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
}, z.core.$strip>>>>;
|
|
312
|
+
message: z.ZodString;
|
|
313
|
+
status: z.ZodPipe<z.ZodString, z.ZodTransform<"in_progress" | "no_change", string>>;
|
|
314
|
+
allowed_envs_changed: z.ZodBoolean;
|
|
241
315
|
}, z.core.$strip>]>;
|
|
242
316
|
export type UpdateCvmEnvsRequest = z.input<typeof UpdateCvmEnvsRequestSchema>;
|
|
243
317
|
export type UpdateCvmEnvsResult = z.infer<typeof UpdateCvmEnvsResultSchema>;
|
|
@@ -249,7 +323,7 @@ export type UpdateCvmEnvsPreconditionRequired = z.infer<typeof UpdateCvmEnvsPrec
|
|
|
249
323
|
* @param client - The API client
|
|
250
324
|
* @param request - Request parameters containing CVM ID and environment data
|
|
251
325
|
* @param parameters - Optional behavior parameters
|
|
252
|
-
* @returns
|
|
326
|
+
* @returns Whether the update was accepted, nothing changed, or registration is required
|
|
253
327
|
*/
|
|
254
328
|
declare const updateCvmEnvs: {
|
|
255
329
|
(client: Client<import("../..").ApiVersion>, params: {
|
|
@@ -263,11 +337,6 @@ declare const updateCvmEnvs: {
|
|
|
263
337
|
compose_hash?: string | undefined;
|
|
264
338
|
transaction_hash?: string | undefined;
|
|
265
339
|
}): Promise<{
|
|
266
|
-
status: "in_progress";
|
|
267
|
-
message: string;
|
|
268
|
-
correlation_id: string;
|
|
269
|
-
allowed_envs_changed: boolean;
|
|
270
|
-
} | {
|
|
271
340
|
status: "precondition_required";
|
|
272
341
|
message: string;
|
|
273
342
|
compose_hash: string;
|
|
@@ -284,6 +353,29 @@ declare const updateCvmEnvs: {
|
|
|
284
353
|
gateway_app_id: `0x${string}`;
|
|
285
354
|
k256_pubkey?: string | null | undefined;
|
|
286
355
|
};
|
|
356
|
+
} | {
|
|
357
|
+
correlation_id: string;
|
|
358
|
+
finality_wait?: {
|
|
359
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
360
|
+
correlation_id: string;
|
|
361
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
362
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
363
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
364
|
+
transaction: {
|
|
365
|
+
hash: string;
|
|
366
|
+
block_number: number;
|
|
367
|
+
chain_id: number;
|
|
368
|
+
} | null;
|
|
369
|
+
finality: {
|
|
370
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
371
|
+
policy_block_number: number | null;
|
|
372
|
+
blocks_remaining: number | null;
|
|
373
|
+
eta_seconds: number | null;
|
|
374
|
+
};
|
|
375
|
+
} | null | undefined;
|
|
376
|
+
message: string;
|
|
377
|
+
status: "in_progress" | "no_change";
|
|
378
|
+
allowed_envs_changed: boolean;
|
|
287
379
|
}>;
|
|
288
380
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: {
|
|
289
381
|
id?: string | undefined;
|
|
@@ -323,11 +415,6 @@ declare const updateCvmEnvs: {
|
|
|
323
415
|
compose_hash?: string | undefined;
|
|
324
416
|
transaction_hash?: string | undefined;
|
|
325
417
|
}): Promise<import("../..").SafeResult<{
|
|
326
|
-
status: "in_progress";
|
|
327
|
-
message: string;
|
|
328
|
-
correlation_id: string;
|
|
329
|
-
allowed_envs_changed: boolean;
|
|
330
|
-
} | {
|
|
331
418
|
status: "precondition_required";
|
|
332
419
|
message: string;
|
|
333
420
|
compose_hash: string;
|
|
@@ -344,6 +431,29 @@ declare const updateCvmEnvs: {
|
|
|
344
431
|
gateway_app_id: `0x${string}`;
|
|
345
432
|
k256_pubkey?: string | null | undefined;
|
|
346
433
|
};
|
|
434
|
+
} | {
|
|
435
|
+
correlation_id: string;
|
|
436
|
+
finality_wait?: {
|
|
437
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
438
|
+
correlation_id: string;
|
|
439
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
440
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
441
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
442
|
+
transaction: {
|
|
443
|
+
hash: string;
|
|
444
|
+
block_number: number;
|
|
445
|
+
chain_id: number;
|
|
446
|
+
} | null;
|
|
447
|
+
finality: {
|
|
448
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
449
|
+
policy_block_number: number | null;
|
|
450
|
+
blocks_remaining: number | null;
|
|
451
|
+
eta_seconds: number | null;
|
|
452
|
+
};
|
|
453
|
+
} | null | undefined;
|
|
454
|
+
message: string;
|
|
455
|
+
status: "in_progress" | "no_change";
|
|
456
|
+
allowed_envs_changed: boolean;
|
|
347
457
|
}>>;
|
|
348
458
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: {
|
|
349
459
|
id?: string | undefined;
|
|
@@ -33,7 +33,7 @@ import { type Client } from "../../client";
|
|
|
33
33
|
* docker_compose_file: composeYaml
|
|
34
34
|
* })
|
|
35
35
|
*
|
|
36
|
-
* if (
|
|
36
|
+
* if ('compose_hash' in result) {
|
|
37
37
|
* // Register compose hash on-chain and get transaction hash
|
|
38
38
|
* const txHash = await registerComposeHashOnChain(
|
|
39
39
|
* result.compose_hash,
|
|
@@ -59,7 +59,7 @@ import { type Client } from "../../client";
|
|
|
59
59
|
* `UpdateDockerComposeResult | unknown`
|
|
60
60
|
*
|
|
61
61
|
* Returns either:
|
|
62
|
-
* - `{ status: "in_progress", ... }` - Update
|
|
62
|
+
* - `{ status: "in_progress", ... }` - Update accepted; `finality_wait` is present while waiting for on-chain finality
|
|
63
63
|
* - `{ status: "precondition_required", compose_hash: "...", ... }` - Compose hash verification required
|
|
64
64
|
*
|
|
65
65
|
* Return type depends on schema parameter.
|
|
@@ -104,12 +104,12 @@ import { type Client } from "../../client";
|
|
|
104
104
|
* })
|
|
105
105
|
*
|
|
106
106
|
* if (result.success) {
|
|
107
|
-
* if (result.data
|
|
107
|
+
* if ('compose_hash' in result.data) {
|
|
108
108
|
* console.log(`Compose hash: ${result.data.compose_hash}`)
|
|
109
109
|
* console.log(`App ID: ${result.data.app_id}`)
|
|
110
110
|
* // Register on-chain and retry with transaction_hash
|
|
111
|
-
* } else {
|
|
112
|
-
* console.log(`Update
|
|
111
|
+
* } else if ('correlation_id' in result.data) {
|
|
112
|
+
* console.log(`Update accepted: ${result.data.correlation_id}`)
|
|
113
113
|
* }
|
|
114
114
|
* } else {
|
|
115
115
|
* if ("isRequestError" in result.error) {
|
|
@@ -157,9 +157,48 @@ export declare const UpdateDockerComposeRequestSchema: z.ZodPipe<z.ZodObject<{
|
|
|
157
157
|
transaction_hash?: string | undefined;
|
|
158
158
|
}>>;
|
|
159
159
|
declare const UpdateDockerComposeInProgressSchema: z.ZodObject<{
|
|
160
|
-
status: z.
|
|
160
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
161
|
+
in_progress: "in_progress";
|
|
162
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
163
|
+
correlation_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
|
|
164
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
165
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
166
|
+
create: "create";
|
|
167
|
+
update: "update";
|
|
168
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
169
|
+
correlation_id: z.ZodString;
|
|
170
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
171
|
+
applying: "applying";
|
|
172
|
+
awaiting_finality: "awaiting_finality";
|
|
173
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
174
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
175
|
+
finalized: "finalized";
|
|
176
|
+
safe: "safe";
|
|
177
|
+
submitted: "submitted";
|
|
178
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
179
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
180
|
+
applying: "applying";
|
|
181
|
+
finalized: "finalized";
|
|
182
|
+
safe: "safe";
|
|
183
|
+
submitted: "submitted";
|
|
184
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
185
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
186
|
+
hash: z.ZodString;
|
|
187
|
+
block_number: z.ZodNumber;
|
|
188
|
+
chain_id: z.ZodNumber;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
finality: z.ZodObject<{
|
|
191
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
192
|
+
finalized: "finalized";
|
|
193
|
+
latest: "latest";
|
|
194
|
+
safe: "safe";
|
|
195
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
196
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
197
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
198
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
199
|
+
}, z.core.$strip>;
|
|
200
|
+
}, z.core.$strip>>>>;
|
|
161
201
|
message: z.ZodString;
|
|
162
|
-
correlation_id: z.ZodString;
|
|
163
202
|
}, z.core.$strip>;
|
|
164
203
|
declare const UpdateDockerComposePreconditionRequiredSchema: z.ZodObject<{
|
|
165
204
|
status: z.ZodLiteral<"precondition_required">;
|
|
@@ -199,10 +238,6 @@ declare const UpdateDockerComposePreconditionRequiredSchema: z.ZodObject<{
|
|
|
199
238
|
}>>;
|
|
200
239
|
}, z.core.$strip>;
|
|
201
240
|
export declare const UpdateDockerComposeResultSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
202
|
-
status: z.ZodLiteral<"in_progress">;
|
|
203
|
-
message: z.ZodString;
|
|
204
|
-
correlation_id: z.ZodString;
|
|
205
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
206
241
|
status: z.ZodLiteral<"precondition_required">;
|
|
207
242
|
message: z.ZodString;
|
|
208
243
|
compose_hash: z.ZodString;
|
|
@@ -241,6 +276,49 @@ export declare const UpdateDockerComposeResultSchema: z.ZodUnion<readonly [z.Zod
|
|
|
241
276
|
}, z.core.$strip>, z.ZodObject<{
|
|
242
277
|
status: z.ZodLiteral<"no_change">;
|
|
243
278
|
message: z.ZodString;
|
|
279
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
280
|
+
status: z.ZodUnion<readonly [z.ZodEnum<{
|
|
281
|
+
in_progress: "in_progress";
|
|
282
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
283
|
+
correlation_id: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
|
|
284
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
285
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
286
|
+
create: "create";
|
|
287
|
+
update: "update";
|
|
288
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
289
|
+
correlation_id: z.ZodString;
|
|
290
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
291
|
+
applying: "applying";
|
|
292
|
+
awaiting_finality: "awaiting_finality";
|
|
293
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
294
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
295
|
+
finalized: "finalized";
|
|
296
|
+
safe: "safe";
|
|
297
|
+
submitted: "submitted";
|
|
298
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
299
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
300
|
+
applying: "applying";
|
|
301
|
+
finalized: "finalized";
|
|
302
|
+
safe: "safe";
|
|
303
|
+
submitted: "submitted";
|
|
304
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
305
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
306
|
+
hash: z.ZodString;
|
|
307
|
+
block_number: z.ZodNumber;
|
|
308
|
+
chain_id: z.ZodNumber;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
finality: z.ZodObject<{
|
|
311
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
312
|
+
finalized: "finalized";
|
|
313
|
+
latest: "latest";
|
|
314
|
+
safe: "safe";
|
|
315
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
316
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
317
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
318
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
}, z.core.$strip>>>>;
|
|
321
|
+
message: z.ZodString;
|
|
244
322
|
}, z.core.$strip>]>;
|
|
245
323
|
export type UpdateDockerComposeRequest = z.input<typeof UpdateDockerComposeRequestSchema>;
|
|
246
324
|
export type UpdateDockerComposeResult = z.infer<typeof UpdateDockerComposeResultSchema>;
|
|
@@ -252,7 +330,7 @@ export type UpdateDockerComposePreconditionRequired = z.infer<typeof UpdateDocke
|
|
|
252
330
|
* @param client - The API client
|
|
253
331
|
* @param request - Request parameters containing CVM ID and Docker Compose content
|
|
254
332
|
* @param parameters - Optional behavior parameters
|
|
255
|
-
* @returns
|
|
333
|
+
* @returns Whether registration is required, the update was accepted, or nothing changed
|
|
256
334
|
*/
|
|
257
335
|
declare const updateDockerCompose: {
|
|
258
336
|
(client: Client<import("../..").ApiVersion>, params: {
|
|
@@ -265,10 +343,6 @@ declare const updateDockerCompose: {
|
|
|
265
343
|
compose_hash?: string | undefined;
|
|
266
344
|
transaction_hash?: string | undefined;
|
|
267
345
|
}): Promise<{
|
|
268
|
-
status: "in_progress";
|
|
269
|
-
message: string;
|
|
270
|
-
correlation_id: string;
|
|
271
|
-
} | {
|
|
272
346
|
status: "precondition_required";
|
|
273
347
|
message: string;
|
|
274
348
|
compose_hash: string;
|
|
@@ -288,6 +362,28 @@ declare const updateDockerCompose: {
|
|
|
288
362
|
} | {
|
|
289
363
|
status: "no_change";
|
|
290
364
|
message: string;
|
|
365
|
+
} | {
|
|
366
|
+
status: "in_progress" | (string & Record<never, never>);
|
|
367
|
+
correlation_id: string;
|
|
368
|
+
finality_wait?: {
|
|
369
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
370
|
+
correlation_id: string;
|
|
371
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
372
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
373
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
374
|
+
transaction: {
|
|
375
|
+
hash: string;
|
|
376
|
+
block_number: number;
|
|
377
|
+
chain_id: number;
|
|
378
|
+
} | null;
|
|
379
|
+
finality: {
|
|
380
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
381
|
+
policy_block_number: number | null;
|
|
382
|
+
blocks_remaining: number | null;
|
|
383
|
+
eta_seconds: number | null;
|
|
384
|
+
};
|
|
385
|
+
} | null | undefined;
|
|
386
|
+
message: string;
|
|
291
387
|
}>;
|
|
292
388
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: {
|
|
293
389
|
id?: string | undefined;
|
|
@@ -324,10 +420,6 @@ declare const updateDockerCompose: {
|
|
|
324
420
|
compose_hash?: string | undefined;
|
|
325
421
|
transaction_hash?: string | undefined;
|
|
326
422
|
}): Promise<import("../..").SafeResult<{
|
|
327
|
-
status: "in_progress";
|
|
328
|
-
message: string;
|
|
329
|
-
correlation_id: string;
|
|
330
|
-
} | {
|
|
331
423
|
status: "precondition_required";
|
|
332
424
|
message: string;
|
|
333
425
|
compose_hash: string;
|
|
@@ -347,6 +439,28 @@ declare const updateDockerCompose: {
|
|
|
347
439
|
} | {
|
|
348
440
|
status: "no_change";
|
|
349
441
|
message: string;
|
|
442
|
+
} | {
|
|
443
|
+
status: "in_progress" | (string & Record<never, never>);
|
|
444
|
+
correlation_id: string;
|
|
445
|
+
finality_wait?: {
|
|
446
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
447
|
+
correlation_id: string;
|
|
448
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
449
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
450
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
451
|
+
transaction: {
|
|
452
|
+
hash: string;
|
|
453
|
+
block_number: number;
|
|
454
|
+
chain_id: number;
|
|
455
|
+
} | null;
|
|
456
|
+
finality: {
|
|
457
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
458
|
+
policy_block_number: number | null;
|
|
459
|
+
blocks_remaining: number | null;
|
|
460
|
+
eta_seconds: number | null;
|
|
461
|
+
};
|
|
462
|
+
} | null | undefined;
|
|
463
|
+
message: string;
|
|
350
464
|
}>>;
|
|
351
465
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: {
|
|
352
466
|
id?: string | undefined;
|