@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
package/README.md
CHANGED
|
@@ -119,6 +119,25 @@ The SDK enforces `redirect: "manual"` at the fetch boundary, even if configurati
|
|
|
119
119
|
- `client.safePatch<T>(request, body?, options?): Promise<SafeResult<T>>`
|
|
120
120
|
- `client.safeDelete<T>(request, options?): Promise<SafeResult<T>>`
|
|
121
121
|
|
|
122
|
+
### How do I get an encryption key after on-chain registration?
|
|
123
|
+
|
|
124
|
+
Use `waitForAppEnvEncryptPubKey` to wait for the app's registration to finalize.
|
|
125
|
+
Use `getAppEnvEncryptPubKey` or `safeGetAppEnvEncryptPubKey` to check without waiting.
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { waitForAppEnvEncryptPubKey } from "@phala/cloud";
|
|
129
|
+
|
|
130
|
+
const key = await waitForAppEnvEncryptPubKey(client, { kms, app_id }, { signal });
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
By default, the SDK starts waiting only after HTTP 409 (`ERR-12-008`).
|
|
134
|
+
It follows the server's `Retry-After` interval and keeps waiting through
|
|
135
|
+
temporary network or server failures. The SDK allows the first estimate
|
|
136
|
+
plus 15 minutes. Without an estimate, it allows 45 minutes. Pass an
|
|
137
|
+
`AbortSignal` to cancel sooner, or `onFinalityWait` to read the first
|
|
138
|
+
response's details. HTTP 404 (`ERR-12-009`) means the app is not registered
|
|
139
|
+
on the named chain and is returned immediately.
|
|
140
|
+
|
|
122
141
|
## How do I upgrade to these SDK changes?
|
|
123
142
|
|
|
124
143
|
- `watchCvmState` with `maxRetries: N` now makes up to N+1 attempts, and `MaxRetriesExceededError.attempts` is N+1.
|
|
@@ -67,6 +67,25 @@ declare const createAppInstance: {
|
|
|
67
67
|
}): Promise<{
|
|
68
68
|
name: string;
|
|
69
69
|
status: string;
|
|
70
|
+
correlation_id?: string | null | undefined;
|
|
71
|
+
finality_wait?: {
|
|
72
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
73
|
+
correlation_id: string;
|
|
74
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
75
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
76
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
77
|
+
transaction: {
|
|
78
|
+
hash: string;
|
|
79
|
+
block_number: number;
|
|
80
|
+
chain_id: number;
|
|
81
|
+
} | null;
|
|
82
|
+
finality: {
|
|
83
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
84
|
+
policy_block_number: number | null;
|
|
85
|
+
blocks_remaining: number | null;
|
|
86
|
+
eta_seconds: number | null;
|
|
87
|
+
};
|
|
88
|
+
} | null | undefined;
|
|
70
89
|
teepod_id: number;
|
|
71
90
|
teepod?: {
|
|
72
91
|
id: number;
|
|
@@ -131,6 +150,25 @@ declare const createAppInstance: {
|
|
|
131
150
|
}): Promise<import("../..").SafeResult<{
|
|
132
151
|
name: string;
|
|
133
152
|
status: string;
|
|
153
|
+
correlation_id?: string | null | undefined;
|
|
154
|
+
finality_wait?: {
|
|
155
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
156
|
+
correlation_id: string;
|
|
157
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
158
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
159
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
160
|
+
transaction: {
|
|
161
|
+
hash: string;
|
|
162
|
+
block_number: number;
|
|
163
|
+
chain_id: number;
|
|
164
|
+
} | null;
|
|
165
|
+
finality: {
|
|
166
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
167
|
+
policy_block_number: number | null;
|
|
168
|
+
blocks_remaining: number | null;
|
|
169
|
+
eta_seconds: number | null;
|
|
170
|
+
};
|
|
171
|
+
} | null | undefined;
|
|
134
172
|
teepod_id: number;
|
|
135
173
|
teepod?: {
|
|
136
174
|
id: number;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const GetAppPendingUpdatesRequestSchema: z.ZodObject<{
|
|
3
|
+
appId: z.ZodString;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export type GetAppPendingUpdatesRequest = z.input<typeof GetAppPendingUpdatesRequestSchema>;
|
|
6
|
+
export declare const AppPendingUpdateSchema: z.ZodObject<{
|
|
7
|
+
vm_uuid: z.ZodString;
|
|
8
|
+
compose_hash: z.ZodString;
|
|
9
|
+
on_chain: z.ZodBoolean;
|
|
10
|
+
instance_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type AppPendingUpdate = z.infer<typeof AppPendingUpdateSchema>;
|
|
13
|
+
export declare const RegisteredUnusedComposeHashSchema: z.ZodObject<{
|
|
14
|
+
compose_hash: z.ZodString;
|
|
15
|
+
state: z.ZodEnum<{
|
|
16
|
+
pending: "pending";
|
|
17
|
+
unused: "unused";
|
|
18
|
+
}>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type RegisteredUnusedComposeHash = z.infer<typeof RegisteredUnusedComposeHashSchema>;
|
|
21
|
+
export declare const AppPendingUpdatesSchema: z.ZodObject<{
|
|
22
|
+
items: z.ZodArray<z.ZodObject<{
|
|
23
|
+
vm_uuid: z.ZodString;
|
|
24
|
+
compose_hash: z.ZodString;
|
|
25
|
+
on_chain: z.ZodBoolean;
|
|
26
|
+
instance_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
}, z.core.$strip>>;
|
|
28
|
+
registered_unused: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
29
|
+
compose_hash: z.ZodString;
|
|
30
|
+
state: z.ZodEnum<{
|
|
31
|
+
pending: "pending";
|
|
32
|
+
unused: "unused";
|
|
33
|
+
}>;
|
|
34
|
+
}, z.core.$strip>>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type AppPendingUpdates = z.infer<typeof AppPendingUpdatesSchema>;
|
|
37
|
+
/**
|
|
38
|
+
* Read the app's pending updates and registered compose hashes not used by a live CVM.
|
|
39
|
+
* Only hashes marked `unused` are candidates for revocation. This list is a snapshot;
|
|
40
|
+
* reading it does not sign a transaction or change an on-chain registration.
|
|
41
|
+
*/
|
|
42
|
+
declare const getAppPendingUpdates: {
|
|
43
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
44
|
+
appId: string;
|
|
45
|
+
}): Promise<{
|
|
46
|
+
items: {
|
|
47
|
+
vm_uuid: string;
|
|
48
|
+
compose_hash: string;
|
|
49
|
+
on_chain: boolean;
|
|
50
|
+
instance_name?: string | null | undefined;
|
|
51
|
+
}[];
|
|
52
|
+
registered_unused: {
|
|
53
|
+
compose_hash: string;
|
|
54
|
+
state: "pending" | "unused";
|
|
55
|
+
}[];
|
|
56
|
+
}>;
|
|
57
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
58
|
+
appId: string;
|
|
59
|
+
}, parameters: {
|
|
60
|
+
schema: T;
|
|
61
|
+
}): Promise<z.infer<T>>;
|
|
62
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
63
|
+
appId: string;
|
|
64
|
+
}, parameters: {
|
|
65
|
+
schema: false;
|
|
66
|
+
}): Promise<unknown>;
|
|
67
|
+
}, safeGetAppPendingUpdates: {
|
|
68
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
69
|
+
appId: string;
|
|
70
|
+
}): Promise<import("../..").SafeResult<{
|
|
71
|
+
items: {
|
|
72
|
+
vm_uuid: string;
|
|
73
|
+
compose_hash: string;
|
|
74
|
+
on_chain: boolean;
|
|
75
|
+
instance_name?: string | null | undefined;
|
|
76
|
+
}[];
|
|
77
|
+
registered_unused: {
|
|
78
|
+
compose_hash: string;
|
|
79
|
+
state: "pending" | "unused";
|
|
80
|
+
}[];
|
|
81
|
+
}>>;
|
|
82
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
83
|
+
appId: string;
|
|
84
|
+
}, parameters: {
|
|
85
|
+
schema: T;
|
|
86
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
87
|
+
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
88
|
+
appId: string;
|
|
89
|
+
}, parameters: {
|
|
90
|
+
schema: false;
|
|
91
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
92
|
+
};
|
|
93
|
+
export { getAppPendingUpdates, safeGetAppPendingUpdates };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type Address, type Chain, type Hash, type Hex, type PublicClient, type TransactionReceipt, type WalletClient } from "viem";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export type RemoveComposeHashRequest = {
|
|
4
|
+
/** Chain configuration. Required when the SDK creates either client. */
|
|
5
|
+
chain?: Chain;
|
|
6
|
+
rpcUrl?: string;
|
|
7
|
+
/** Address of the app's authorization contract. */
|
|
8
|
+
appAddress: Address;
|
|
9
|
+
/** 32-byte hex string, with or without the 0x prefix. */
|
|
10
|
+
composeHash: string;
|
|
11
|
+
/**
|
|
12
|
+
* Revoke only this epoch, between 0 and the current app epoch plus one.
|
|
13
|
+
* Omit to revoke that entire range. Older contracts do not accept an epoch.
|
|
14
|
+
*/
|
|
15
|
+
epoch?: number;
|
|
16
|
+
/** The app owner's private key. Set either this or `walletClient`, not both. */
|
|
17
|
+
privateKey?: Hex;
|
|
18
|
+
/** A wallet client that can send a transaction from the app owner's account. */
|
|
19
|
+
walletClient?: WalletClient;
|
|
20
|
+
publicClient?: PublicClient;
|
|
21
|
+
/** Time to wait for a receipt, in milliseconds. Defaults to 120,000. */
|
|
22
|
+
timeout?: number;
|
|
23
|
+
/** Stops waiting but does not cancel a transaction that has already been sent. */
|
|
24
|
+
signal?: AbortSignal;
|
|
25
|
+
onTransactionSubmitted?: (hash: Hash) => void;
|
|
26
|
+
onTransactionConfirmed?: (receipt: TransactionReceipt) => void;
|
|
27
|
+
};
|
|
28
|
+
export declare const RemoveComposeHashSchema: z.ZodObject<{
|
|
29
|
+
appAddress: z.ZodString;
|
|
30
|
+
composeHash: z.ZodString;
|
|
31
|
+
transactionHash: z.ZodString;
|
|
32
|
+
blockNumber: z.ZodBigInt;
|
|
33
|
+
gasUsed: z.ZodBigInt;
|
|
34
|
+
epochsWritten: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export type RemoveComposeHash = z.infer<typeof RemoveComposeHashSchema>;
|
|
37
|
+
export type RemoveComposeHashParameters<T = undefined> = T extends z.ZodTypeAny ? {
|
|
38
|
+
schema: T;
|
|
39
|
+
} : T extends false ? {
|
|
40
|
+
schema: false;
|
|
41
|
+
} : {
|
|
42
|
+
schema?: z.ZodTypeAny | false;
|
|
43
|
+
};
|
|
44
|
+
export type RemoveComposeHashReturnType<T = undefined> = T extends z.ZodTypeAny ? z.infer<T> : T extends false ? unknown : RemoveComposeHash;
|
|
45
|
+
/**
|
|
46
|
+
* Revoke an allowed compose hash with a transaction signed by the app owner's wallet.
|
|
47
|
+
* This is a new on-chain change, not an undo. It cannot take back keys already released.
|
|
48
|
+
*
|
|
49
|
+
* Revoke only a hash that no CVM or pending update uses. A CVM that uses the hash
|
|
50
|
+
* can be denied keys when it starts again. Phala Cloud's list of unused registered
|
|
51
|
+
* hashes is a snapshot. This action does not check usage or change any CVM or draft.
|
|
52
|
+
*
|
|
53
|
+
* By default, the transaction revokes the hash from epoch zero through the next
|
|
54
|
+
* app epoch as of the pre-signing check. Revoking just one epoch can leave the hash
|
|
55
|
+
* allowed in others. On older contracts, the transaction removes the single entry.
|
|
56
|
+
*
|
|
57
|
+
* This action waits for a successful transaction receipt, not for finality.
|
|
58
|
+
* The KMS may continue to allow the hash until it reads the block with the revocation.
|
|
59
|
+
* Keep the hash from `onTransactionSubmitted` so you can track the transaction if waiting times out.
|
|
60
|
+
*
|
|
61
|
+
* @group Actions
|
|
62
|
+
*/
|
|
63
|
+
export declare function removeComposeHash<T extends z.ZodTypeAny | false | undefined = undefined>(request: RemoveComposeHashRequest, parameters?: RemoveComposeHashParameters<T>): Promise<RemoveComposeHashReturnType<T>>;
|
|
64
|
+
export type SafeRemoveComposeHashResult<T = undefined> = {
|
|
65
|
+
success: true;
|
|
66
|
+
data: RemoveComposeHashReturnType<T>;
|
|
67
|
+
} | {
|
|
68
|
+
success: false;
|
|
69
|
+
error: {
|
|
70
|
+
isRequestError: true;
|
|
71
|
+
message: string;
|
|
72
|
+
status: number;
|
|
73
|
+
detail: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/** Revoke a compose hash and return errors instead of throwing them. */
|
|
77
|
+
export declare function safeRemoveComposeHash<T extends z.ZodTypeAny | false | undefined = undefined>(request: RemoveComposeHashRequest, parameters?: RemoveComposeHashParameters<T>): Promise<SafeRemoveComposeHashResult<T>>;
|
|
@@ -22,16 +22,17 @@ import { type Client } from "../../client";
|
|
|
22
22
|
*
|
|
23
23
|
* ## Returns
|
|
24
24
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* The update is processed asynchronously. If the response includes a correlation ID,
|
|
26
|
+
* the SDK returns the acknowledgment, including any usable `finality_wait` data.
|
|
27
|
+
* Older servers may return no body; the default return value in that case is `undefined`.
|
|
28
28
|
*
|
|
29
29
|
* ## Parameters
|
|
30
30
|
*
|
|
31
31
|
* ### request (required)
|
|
32
|
-
* - **Type:** `
|
|
32
|
+
* - **Type:** `CommitCvmComposeFileUpdateRequest`
|
|
33
33
|
*
|
|
34
|
-
*
|
|
34
|
+
* Provide the CVM ID, the provisioned compose hash, and the registration transaction
|
|
35
|
+
* hash if the update requires an on-chain registration.
|
|
35
36
|
*
|
|
36
37
|
* ### parameters (optional)
|
|
37
38
|
* - **Type:** `CommitCvmComposeFileUpdateParameters`
|
|
@@ -39,7 +40,7 @@ import { type Client } from "../../client";
|
|
|
39
40
|
* Optional behavior parameters for schema validation.
|
|
40
41
|
*
|
|
41
42
|
* ```typescript
|
|
42
|
-
* // Use default schema
|
|
43
|
+
* // Use the default response schema
|
|
43
44
|
* await commitCvmComposeFileUpdate(client, { cvmId: 'cvm-123', request: commitRequest })
|
|
44
45
|
*
|
|
45
46
|
* // Return raw data without validation
|
|
@@ -75,12 +76,14 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodPipe<z.ZodObj
|
|
|
75
76
|
app_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
76
77
|
instance_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
77
78
|
compose_hash: z.ZodString;
|
|
79
|
+
transaction_hash: z.ZodOptional<z.ZodString>;
|
|
78
80
|
encrypted_env: z.ZodOptional<z.ZodString>;
|
|
79
81
|
env_keys: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
80
82
|
update_env_vars: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
81
83
|
}, z.core.$strip>, z.ZodTransform<{
|
|
82
84
|
cvmId: string | undefined;
|
|
83
85
|
compose_hash: string;
|
|
86
|
+
transaction_hash: string | undefined;
|
|
84
87
|
encrypted_env: string | undefined;
|
|
85
88
|
env_keys: string[] | undefined;
|
|
86
89
|
update_env_vars: boolean | undefined;
|
|
@@ -90,6 +93,7 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodPipe<z.ZodObj
|
|
|
90
93
|
app_id?: string | undefined;
|
|
91
94
|
instance_id?: string | undefined;
|
|
92
95
|
compose_hash: string;
|
|
96
|
+
transaction_hash?: string | undefined;
|
|
93
97
|
encrypted_env?: string | undefined;
|
|
94
98
|
env_keys?: string[] | undefined;
|
|
95
99
|
update_env_vars?: boolean | null | undefined;
|
|
@@ -100,21 +104,67 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodPipe<z.ZodObj
|
|
|
100
104
|
app_id?: string | undefined;
|
|
101
105
|
instance_id?: string | undefined;
|
|
102
106
|
compose_hash: string;
|
|
107
|
+
transaction_hash?: string | undefined;
|
|
103
108
|
encrypted_env?: string | undefined;
|
|
104
109
|
env_keys?: string[] | undefined;
|
|
105
110
|
update_env_vars?: boolean | null | undefined;
|
|
106
111
|
}>>;
|
|
107
|
-
export declare const CommitCvmComposeFileUpdateSchema: z.ZodPipe<z.
|
|
108
|
-
|
|
112
|
+
export declare const CommitCvmComposeFileUpdateSchema: z.ZodPipe<z.ZodUnknown, z.ZodTransform<{
|
|
113
|
+
status: "in_progress" | (string & Record<never, never>);
|
|
114
|
+
message?: string | undefined;
|
|
115
|
+
correlation_id: string;
|
|
116
|
+
finality_wait?: {
|
|
117
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
118
|
+
correlation_id: string;
|
|
119
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
120
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
121
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
122
|
+
transaction: {
|
|
123
|
+
hash: string;
|
|
124
|
+
block_number: number;
|
|
125
|
+
chain_id: number;
|
|
126
|
+
} | null;
|
|
127
|
+
finality: {
|
|
128
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
129
|
+
policy_block_number: number | null;
|
|
130
|
+
blocks_remaining: number | null;
|
|
131
|
+
eta_seconds: number | null;
|
|
132
|
+
};
|
|
133
|
+
} | null | undefined;
|
|
134
|
+
} | undefined, unknown>>;
|
|
135
|
+
export type CommitCvmComposeFileUpdateRequest = Omit<z.infer<typeof CommitCvmComposeFileUpdateRequestSchema>, "cvmId" | "_raw" | "update_env_vars" | "transaction_hash"> & {
|
|
136
|
+
transaction_hash?: string;
|
|
109
137
|
id?: string;
|
|
110
138
|
uuid?: string;
|
|
111
139
|
app_id?: string;
|
|
112
140
|
instance_id?: string;
|
|
113
141
|
update_env_vars?: boolean | null;
|
|
114
142
|
};
|
|
115
|
-
export type CommitCvmComposeFileUpdate =
|
|
143
|
+
export type CommitCvmComposeFileUpdate = z.infer<typeof CommitCvmComposeFileUpdateSchema>;
|
|
116
144
|
declare const commitCvmComposeFileUpdate: {
|
|
117
|
-
(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest): Promise<
|
|
145
|
+
(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest): Promise<{
|
|
146
|
+
status: "in_progress" | (string & Record<never, never>);
|
|
147
|
+
message?: string | undefined;
|
|
148
|
+
correlation_id: string;
|
|
149
|
+
finality_wait?: {
|
|
150
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
151
|
+
correlation_id: string;
|
|
152
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
153
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
154
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
155
|
+
transaction: {
|
|
156
|
+
hash: string;
|
|
157
|
+
block_number: number;
|
|
158
|
+
chain_id: number;
|
|
159
|
+
} | null;
|
|
160
|
+
finality: {
|
|
161
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
162
|
+
policy_block_number: number | null;
|
|
163
|
+
blocks_remaining: number | null;
|
|
164
|
+
eta_seconds: number | null;
|
|
165
|
+
};
|
|
166
|
+
} | null | undefined;
|
|
167
|
+
} | undefined>;
|
|
118
168
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest, parameters: {
|
|
119
169
|
schema: T;
|
|
120
170
|
}): Promise<z.infer<T>>;
|
|
@@ -122,7 +172,29 @@ declare const commitCvmComposeFileUpdate: {
|
|
|
122
172
|
schema: false;
|
|
123
173
|
}): Promise<unknown>;
|
|
124
174
|
}, safeCommitCvmComposeFileUpdate: {
|
|
125
|
-
(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest): Promise<import("../..").SafeResult<
|
|
175
|
+
(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest): Promise<import("../..").SafeResult<{
|
|
176
|
+
status: "in_progress" | (string & Record<never, never>);
|
|
177
|
+
message?: string | undefined;
|
|
178
|
+
correlation_id: string;
|
|
179
|
+
finality_wait?: {
|
|
180
|
+
operation: "create" | "update" | (string & Record<never, never>);
|
|
181
|
+
correlation_id: string;
|
|
182
|
+
phase: "applying" | "awaiting_finality" | (string & Record<never, never>);
|
|
183
|
+
stage: "finalized" | "safe" | "submitted" | (string & Record<never, never>);
|
|
184
|
+
stages?: ("applying" | "finalized" | "safe" | "submitted" | (string & Record<never, never>))[] | undefined;
|
|
185
|
+
transaction: {
|
|
186
|
+
hash: string;
|
|
187
|
+
block_number: number;
|
|
188
|
+
chain_id: number;
|
|
189
|
+
} | null;
|
|
190
|
+
finality: {
|
|
191
|
+
block_tag: "finalized" | "latest" | "safe" | (string & Record<never, never>) | null;
|
|
192
|
+
policy_block_number: number | null;
|
|
193
|
+
blocks_remaining: number | null;
|
|
194
|
+
eta_seconds: number | null;
|
|
195
|
+
};
|
|
196
|
+
} | null | undefined;
|
|
197
|
+
} | undefined>>;
|
|
126
198
|
<T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest, parameters: {
|
|
127
199
|
schema: T;
|
|
128
200
|
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
@@ -5,6 +5,44 @@ import type { CommitCvmProvisionResponse } from "../../types/version-mappings";
|
|
|
5
5
|
export declare const CommitCvmProvisionV20260121Schema: z.ZodObject<{
|
|
6
6
|
name: z.ZodString;
|
|
7
7
|
status: z.ZodString;
|
|
8
|
+
correlation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
10
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
11
|
+
create: "create";
|
|
12
|
+
update: "update";
|
|
13
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
14
|
+
correlation_id: z.ZodString;
|
|
15
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
16
|
+
applying: "applying";
|
|
17
|
+
awaiting_finality: "awaiting_finality";
|
|
18
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
19
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
20
|
+
finalized: "finalized";
|
|
21
|
+
safe: "safe";
|
|
22
|
+
submitted: "submitted";
|
|
23
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
24
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
25
|
+
applying: "applying";
|
|
26
|
+
finalized: "finalized";
|
|
27
|
+
safe: "safe";
|
|
28
|
+
submitted: "submitted";
|
|
29
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
30
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
31
|
+
hash: z.ZodString;
|
|
32
|
+
block_number: z.ZodNumber;
|
|
33
|
+
chain_id: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
finality: z.ZodObject<{
|
|
36
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
37
|
+
finalized: "finalized";
|
|
38
|
+
latest: "latest";
|
|
39
|
+
safe: "safe";
|
|
40
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
41
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
42
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
43
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>>>>;
|
|
8
46
|
teepod_id: z.ZodNumber;
|
|
9
47
|
teepod: z.ZodNullable<z.ZodObject<{
|
|
10
48
|
id: z.ZodNumber;
|
|
@@ -35,6 +73,44 @@ export type CommitCvmProvisionV20260121 = z.infer<typeof CommitCvmProvisionV2026
|
|
|
35
73
|
export declare const CommitCvmProvisionV20260522Schema: z.ZodObject<{
|
|
36
74
|
name: z.ZodString;
|
|
37
75
|
status: z.ZodString;
|
|
76
|
+
correlation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
78
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
79
|
+
create: "create";
|
|
80
|
+
update: "update";
|
|
81
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
82
|
+
correlation_id: z.ZodString;
|
|
83
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
84
|
+
applying: "applying";
|
|
85
|
+
awaiting_finality: "awaiting_finality";
|
|
86
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
87
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
88
|
+
finalized: "finalized";
|
|
89
|
+
safe: "safe";
|
|
90
|
+
submitted: "submitted";
|
|
91
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
92
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
93
|
+
applying: "applying";
|
|
94
|
+
finalized: "finalized";
|
|
95
|
+
safe: "safe";
|
|
96
|
+
submitted: "submitted";
|
|
97
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
98
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
99
|
+
hash: z.ZodString;
|
|
100
|
+
block_number: z.ZodNumber;
|
|
101
|
+
chain_id: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
finality: z.ZodObject<{
|
|
104
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
105
|
+
finalized: "finalized";
|
|
106
|
+
latest: "latest";
|
|
107
|
+
safe: "safe";
|
|
108
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
109
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
110
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
111
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
112
|
+
}, z.core.$strip>;
|
|
113
|
+
}, z.core.$strip>>>>;
|
|
38
114
|
teepod_id: z.ZodNumber;
|
|
39
115
|
teepod: z.ZodNullable<z.ZodObject<{
|
|
40
116
|
id: z.ZodNumber;
|
|
@@ -65,6 +141,44 @@ export type CommitCvmProvisionV20260522 = z.infer<typeof CommitCvmProvisionV2026
|
|
|
65
141
|
export declare const CommitCvmProvisionAnySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
66
142
|
name: z.ZodString;
|
|
67
143
|
status: z.ZodString;
|
|
144
|
+
correlation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
146
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
147
|
+
create: "create";
|
|
148
|
+
update: "update";
|
|
149
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
150
|
+
correlation_id: z.ZodString;
|
|
151
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
152
|
+
applying: "applying";
|
|
153
|
+
awaiting_finality: "awaiting_finality";
|
|
154
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
155
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
156
|
+
finalized: "finalized";
|
|
157
|
+
safe: "safe";
|
|
158
|
+
submitted: "submitted";
|
|
159
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
160
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
161
|
+
applying: "applying";
|
|
162
|
+
finalized: "finalized";
|
|
163
|
+
safe: "safe";
|
|
164
|
+
submitted: "submitted";
|
|
165
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
166
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
167
|
+
hash: z.ZodString;
|
|
168
|
+
block_number: z.ZodNumber;
|
|
169
|
+
chain_id: z.ZodNumber;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
finality: z.ZodObject<{
|
|
172
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
173
|
+
finalized: "finalized";
|
|
174
|
+
latest: "latest";
|
|
175
|
+
safe: "safe";
|
|
176
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
177
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
178
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
179
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
180
|
+
}, z.core.$strip>;
|
|
181
|
+
}, z.core.$strip>>>>;
|
|
68
182
|
teepod_id: z.ZodNumber;
|
|
69
183
|
teepod: z.ZodNullable<z.ZodObject<{
|
|
70
184
|
id: z.ZodNumber;
|
|
@@ -93,6 +207,44 @@ export declare const CommitCvmProvisionAnySchema: z.ZodUnion<readonly [z.ZodObje
|
|
|
93
207
|
}, z.core.$loose>, z.ZodObject<{
|
|
94
208
|
name: z.ZodString;
|
|
95
209
|
status: z.ZodString;
|
|
210
|
+
correlation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
211
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
212
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
213
|
+
create: "create";
|
|
214
|
+
update: "update";
|
|
215
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
216
|
+
correlation_id: z.ZodString;
|
|
217
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
218
|
+
applying: "applying";
|
|
219
|
+
awaiting_finality: "awaiting_finality";
|
|
220
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
221
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
222
|
+
finalized: "finalized";
|
|
223
|
+
safe: "safe";
|
|
224
|
+
submitted: "submitted";
|
|
225
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
226
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
227
|
+
applying: "applying";
|
|
228
|
+
finalized: "finalized";
|
|
229
|
+
safe: "safe";
|
|
230
|
+
submitted: "submitted";
|
|
231
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
232
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
233
|
+
hash: z.ZodString;
|
|
234
|
+
block_number: z.ZodNumber;
|
|
235
|
+
chain_id: z.ZodNumber;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
finality: z.ZodObject<{
|
|
238
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
239
|
+
finalized: "finalized";
|
|
240
|
+
latest: "latest";
|
|
241
|
+
safe: "safe";
|
|
242
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
243
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
244
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
245
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
}, z.core.$strip>>>>;
|
|
96
248
|
teepod_id: z.ZodNumber;
|
|
97
249
|
teepod: z.ZodNullable<z.ZodObject<{
|
|
98
250
|
id: z.ZodNumber;
|
|
@@ -122,6 +274,44 @@ export declare const CommitCvmProvisionAnySchema: z.ZodUnion<readonly [z.ZodObje
|
|
|
122
274
|
export declare const CommitCvmProvisionSchema: z.ZodObject<{
|
|
123
275
|
name: z.ZodString;
|
|
124
276
|
status: z.ZodString;
|
|
277
|
+
correlation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
|
+
finality_wait: z.ZodCatch<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
279
|
+
operation: z.ZodUnion<readonly [z.ZodEnum<{
|
|
280
|
+
create: "create";
|
|
281
|
+
update: "update";
|
|
282
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
283
|
+
correlation_id: z.ZodString;
|
|
284
|
+
phase: z.ZodUnion<readonly [z.ZodEnum<{
|
|
285
|
+
applying: "applying";
|
|
286
|
+
awaiting_finality: "awaiting_finality";
|
|
287
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
288
|
+
stage: z.ZodUnion<readonly [z.ZodEnum<{
|
|
289
|
+
finalized: "finalized";
|
|
290
|
+
safe: "safe";
|
|
291
|
+
submitted: "submitted";
|
|
292
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>;
|
|
293
|
+
stages: z.ZodCatch<z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodEnum<{
|
|
294
|
+
applying: "applying";
|
|
295
|
+
finalized: "finalized";
|
|
296
|
+
safe: "safe";
|
|
297
|
+
submitted: "submitted";
|
|
298
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>>>;
|
|
299
|
+
transaction: z.ZodNullable<z.ZodObject<{
|
|
300
|
+
hash: z.ZodString;
|
|
301
|
+
block_number: z.ZodNumber;
|
|
302
|
+
chain_id: z.ZodNumber;
|
|
303
|
+
}, z.core.$strip>>;
|
|
304
|
+
finality: z.ZodObject<{
|
|
305
|
+
block_tag: z.ZodNullable<z.ZodUnion<readonly [z.ZodEnum<{
|
|
306
|
+
finalized: "finalized";
|
|
307
|
+
latest: "latest";
|
|
308
|
+
safe: "safe";
|
|
309
|
+
}>, z.ZodCustom<string & Record<never, never>, string & Record<never, never>>]>>;
|
|
310
|
+
policy_block_number: z.ZodNullable<z.ZodNumber>;
|
|
311
|
+
blocks_remaining: z.ZodNullable<z.ZodNumber>;
|
|
312
|
+
eta_seconds: z.ZodNullable<z.ZodNumber>;
|
|
313
|
+
}, z.core.$strip>;
|
|
314
|
+
}, z.core.$strip>>>>;
|
|
125
315
|
teepod_id: z.ZodNumber;
|
|
126
316
|
teepod: z.ZodNullable<z.ZodObject<{
|
|
127
317
|
id: z.ZodNumber;
|
|
@@ -154,6 +344,7 @@ export declare const CommitCvmProvisionRequestSchema: z.ZodObject<{
|
|
|
154
344
|
token: z.ZodOptional<z.ZodString>;
|
|
155
345
|
app_id: z.ZodOptional<z.ZodString>;
|
|
156
346
|
compose_hash: z.ZodOptional<z.ZodString>;
|
|
347
|
+
transaction_hash: z.ZodOptional<z.ZodString>;
|
|
157
348
|
kms_id: z.ZodOptional<z.ZodString>;
|
|
158
349
|
kms_contract_id: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
159
350
|
contract_address: z.ZodOptional<z.ZodString>;
|