@phala/cloud 0.1.0 → 0.1.1-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/dist/actions/{add_compose_hash.d.ts → blockchains/add_compose_hash.d.ts} +1 -2
- package/dist/actions/{deploy_app_auth.d.ts → blockchains/deploy_app_auth.d.ts} +1 -2
- package/dist/actions/{commit_cvm_compose_file_update.d.ts → cvms/commit_cvm_compose_file_update.d.ts} +10 -11
- package/dist/actions/{commit_cvm_provision.d.ts → cvms/commit_cvm_provision.d.ts} +14 -15
- package/dist/actions/{get_cvm_compose_file.d.ts → cvms/get_cvm_compose_file.d.ts} +74 -6
- package/dist/actions/cvms/get_cvm_info.d.ts +85 -0
- package/dist/actions/{get_cvm_list.d.ts → cvms/get_cvm_list.d.ts} +48 -49
- package/dist/actions/{provision_cvm.d.ts → cvms/provision_cvm.d.ts} +16 -17
- package/dist/actions/{provision_cvm_compose_file_update.d.ts → cvms/provision_cvm_compose_file_update.d.ts} +153 -18
- package/dist/actions/get_available_nodes.d.ts +0 -1
- package/dist/actions/get_current_user.d.ts +35 -16
- package/dist/actions/index.d.ts +13 -14
- package/dist/actions/{get_app_env_encrypt_pubkey.d.ts → kms/get_app_env_encrypt_pubkey.d.ts} +8 -9
- package/dist/actions/{get_kms_info.d.ts → kms/get_kms_info.d.ts} +6 -22
- package/dist/actions/{get_kms_list.d.ts → kms/get_kms_list.d.ts} +6 -35
- package/dist/actions/list-instance-types.d.ts +0 -1
- package/dist/actions/workspaces/get_workspace.d.ts +0 -1
- package/dist/actions/workspaces/list_workspaces.d.ts +0 -1
- package/dist/chunk-O5QBIXBA.mjs +1128 -0
- package/dist/client.d.ts +0 -1
- package/dist/create-client.d.ts +311 -0
- package/dist/create-client.js +1143 -0
- package/dist/create-client.mjs +74 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +870 -888
- package/dist/index.mjs +126 -1133
- package/dist/parse_dotenv.d.ts +0 -1
- package/dist/types/app_compose.d.ts +0 -1
- package/dist/types/client.d.ts +0 -1
- package/dist/types/common.d.ts +0 -1
- package/dist/types/cvm_info.d.ts +34 -35
- package/dist/types/index.d.ts +0 -1
- package/dist/types/kms_info.d.ts +0 -1
- package/dist/types/supported_chains.d.ts +0 -1
- package/dist/utils/as-hex.d.ts +0 -1
- package/dist/utils/client-factories.d.ts +0 -1
- package/dist/utils/define-action.d.ts +7 -8
- package/dist/utils/get_compose_hash.d.ts +0 -1
- package/dist/utils/get_error_message.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/network.d.ts +0 -1
- package/dist/utils/transaction.d.ts +0 -1
- package/dist/utils/validate-parameters.d.ts +0 -1
- package/package.json +70 -66
- package/dist/actions/add_compose_hash.d.ts.map +0 -1
- package/dist/actions/commit_cvm_compose_file_update.d.ts.map +0 -1
- package/dist/actions/commit_cvm_provision.d.ts.map +0 -1
- package/dist/actions/deploy_app_auth.d.ts.map +0 -1
- package/dist/actions/get_app_env_encrypt_pubkey.d.ts.map +0 -1
- package/dist/actions/get_available_nodes.d.ts.map +0 -1
- package/dist/actions/get_current_user.d.ts.map +0 -1
- package/dist/actions/get_cvm_compose_file.d.ts.map +0 -1
- package/dist/actions/get_cvm_info.d.ts +0 -172
- package/dist/actions/get_cvm_info.d.ts.map +0 -1
- package/dist/actions/get_cvm_list.d.ts.map +0 -1
- package/dist/actions/get_kms_info.d.ts.map +0 -1
- package/dist/actions/get_kms_list.d.ts.map +0 -1
- package/dist/actions/index.d.ts.map +0 -1
- package/dist/actions/list-instance-types.d.ts.map +0 -1
- package/dist/actions/provision_cvm.d.ts.map +0 -1
- package/dist/actions/provision_cvm_compose_file_update.d.ts.map +0 -1
- package/dist/actions/workspaces/get_workspace.d.ts.map +0 -1
- package/dist/actions/workspaces/list_workspaces.d.ts.map +0 -1
- package/dist/client.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/parse_dotenv.d.ts.map +0 -1
- package/dist/types/app_compose.d.ts.map +0 -1
- package/dist/types/client.d.ts.map +0 -1
- package/dist/types/common.d.ts.map +0 -1
- package/dist/types/cvm_info.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/kms_info.d.ts.map +0 -1
- package/dist/types/supported_chains.d.ts.map +0 -1
- package/dist/utils/as-hex.d.ts.map +0 -1
- package/dist/utils/client-factories.d.ts.map +0 -1
- package/dist/utils/define-action.d.ts.map +0 -1
- package/dist/utils/get_compose_hash.d.ts.map +0 -1
- package/dist/utils/get_error_message.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/network.d.ts.map +0 -1
- package/dist/utils/transaction.d.ts.map +0 -1
- package/dist/utils/validate-parameters.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type Chain, type Address, type Hash, type Hex, type TransactionReceipt, type PublicClient, type WalletClient } from "viem";
|
|
3
|
-
import { type TransactionTracker, type RetryOptions } from "
|
|
3
|
+
import { type TransactionTracker, type RetryOptions } from "../../utils";
|
|
4
4
|
export type AddComposeHashRequest = {
|
|
5
5
|
chain?: Chain;
|
|
6
6
|
rpcUrl?: string;
|
|
@@ -60,4 +60,3 @@ export type SafeAddComposeHashResult<T = undefined> = {
|
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
export declare function safeAddComposeHash<T extends z.ZodTypeAny | false | undefined = undefined>(request: AddComposeHashRequest, parameters?: AddComposeHashParameters<T>): Promise<SafeAddComposeHashResult<T>>;
|
|
63
|
-
//# sourceMappingURL=add_compose_hash.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type Chain, type Address, type Hash, type Hex, type TransactionReceipt, type PublicClient, type WalletClient } from "viem";
|
|
3
|
-
import { type TransactionTracker, type RetryOptions } from "
|
|
3
|
+
import { type TransactionTracker, type RetryOptions } from "../../utils";
|
|
4
4
|
export declare const DeployAppAuthRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
5
5
|
chain: z.ZodOptional<z.ZodUnknown>;
|
|
6
6
|
rpcUrl: z.ZodOptional<z.ZodString>;
|
|
@@ -161,4 +161,3 @@ export type SafeDeployAppAuthResult<T = undefined> = {
|
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
163
|
export declare function safeDeployAppAuth<T extends z.ZodTypeAny | false | undefined = undefined>(request: DeployAppAuthRequest, parameters?: DeployAppAuthParameters<T>): Promise<SafeDeployAppAuthResult<T>>;
|
|
164
|
-
//# sourceMappingURL=deploy_app_auth.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type Client } from "
|
|
2
|
+
import { type Client } from "../../client";
|
|
3
3
|
/**
|
|
4
4
|
* Commit CVM compose file update
|
|
5
5
|
*
|
|
@@ -83,36 +83,36 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.Zod
|
|
|
83
83
|
id?: string | undefined;
|
|
84
84
|
app_id?: string | undefined;
|
|
85
85
|
instance_id?: string | undefined;
|
|
86
|
+
uuid?: string | undefined;
|
|
86
87
|
env_keys?: string[] | undefined;
|
|
87
88
|
encrypted_env?: string | undefined;
|
|
88
|
-
uuid?: string | undefined;
|
|
89
89
|
update_env_vars?: boolean | null | undefined;
|
|
90
90
|
}, {
|
|
91
91
|
compose_hash: string;
|
|
92
92
|
id?: string | undefined;
|
|
93
93
|
app_id?: string | undefined;
|
|
94
94
|
instance_id?: string | undefined;
|
|
95
|
+
uuid?: string | undefined;
|
|
95
96
|
env_keys?: string[] | undefined;
|
|
96
97
|
encrypted_env?: string | undefined;
|
|
97
|
-
uuid?: string | undefined;
|
|
98
98
|
update_env_vars?: boolean | null | undefined;
|
|
99
99
|
}>, {
|
|
100
100
|
compose_hash: string;
|
|
101
101
|
id?: string | undefined;
|
|
102
102
|
app_id?: string | undefined;
|
|
103
103
|
instance_id?: string | undefined;
|
|
104
|
+
uuid?: string | undefined;
|
|
104
105
|
env_keys?: string[] | undefined;
|
|
105
106
|
encrypted_env?: string | undefined;
|
|
106
|
-
uuid?: string | undefined;
|
|
107
107
|
update_env_vars?: boolean | null | undefined;
|
|
108
108
|
}, {
|
|
109
109
|
compose_hash: string;
|
|
110
110
|
id?: string | undefined;
|
|
111
111
|
app_id?: string | undefined;
|
|
112
112
|
instance_id?: string | undefined;
|
|
113
|
+
uuid?: string | undefined;
|
|
113
114
|
env_keys?: string[] | undefined;
|
|
114
115
|
encrypted_env?: string | undefined;
|
|
115
|
-
uuid?: string | undefined;
|
|
116
116
|
update_env_vars?: boolean | null | undefined;
|
|
117
117
|
}>, {
|
|
118
118
|
cvmId: string | undefined;
|
|
@@ -125,9 +125,9 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.Zod
|
|
|
125
125
|
id?: string | undefined;
|
|
126
126
|
app_id?: string | undefined;
|
|
127
127
|
instance_id?: string | undefined;
|
|
128
|
+
uuid?: string | undefined;
|
|
128
129
|
env_keys?: string[] | undefined;
|
|
129
130
|
encrypted_env?: string | undefined;
|
|
130
|
-
uuid?: string | undefined;
|
|
131
131
|
update_env_vars?: boolean | null | undefined;
|
|
132
132
|
};
|
|
133
133
|
}, {
|
|
@@ -135,9 +135,9 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.Zod
|
|
|
135
135
|
id?: string | undefined;
|
|
136
136
|
app_id?: string | undefined;
|
|
137
137
|
instance_id?: string | undefined;
|
|
138
|
+
uuid?: string | undefined;
|
|
138
139
|
env_keys?: string[] | undefined;
|
|
139
140
|
encrypted_env?: string | undefined;
|
|
140
|
-
uuid?: string | undefined;
|
|
141
141
|
update_env_vars?: boolean | null | undefined;
|
|
142
142
|
}>;
|
|
143
143
|
export declare const CommitCvmComposeFileUpdateSchema: z.ZodEffects<z.ZodAny, undefined, any>;
|
|
@@ -158,13 +158,12 @@ declare const commitCvmComposeFileUpdate: {
|
|
|
158
158
|
schema: false;
|
|
159
159
|
}): Promise<unknown>;
|
|
160
160
|
}, safeCommitCvmComposeFileUpdate: {
|
|
161
|
-
(client: Client, params: CommitCvmComposeFileUpdateRequest): Promise<import("
|
|
161
|
+
(client: Client, params: CommitCvmComposeFileUpdateRequest): Promise<import("../..").SafeResult<undefined>>;
|
|
162
162
|
<T extends z.ZodTypeAny>(client: Client, params: CommitCvmComposeFileUpdateRequest, parameters: {
|
|
163
163
|
schema: T;
|
|
164
|
-
}): Promise<import("
|
|
164
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
165
165
|
(client: Client, params: CommitCvmComposeFileUpdateRequest, parameters: {
|
|
166
166
|
schema: false;
|
|
167
|
-
}): Promise<import("
|
|
167
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
168
168
|
};
|
|
169
169
|
export { commitCvmComposeFileUpdate, safeCommitCvmComposeFileUpdate };
|
|
170
|
-
//# sourceMappingURL=commit_cvm_compose_file_update.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type Client } from "
|
|
2
|
+
import { type Client } from "../../client";
|
|
3
3
|
/**
|
|
4
4
|
* Commit CVM Provision (Create CVM from provisioned data)
|
|
5
5
|
*
|
|
@@ -83,11 +83,11 @@ export declare const CommitCvmProvisionSchema: z.ZodObject<{
|
|
|
83
83
|
id: z.ZodNumber;
|
|
84
84
|
name: z.ZodString;
|
|
85
85
|
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
id: number;
|
|
87
86
|
name: string;
|
|
88
|
-
}, {
|
|
89
87
|
id: number;
|
|
88
|
+
}, {
|
|
90
89
|
name: string;
|
|
90
|
+
id: number;
|
|
91
91
|
}>>;
|
|
92
92
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
93
93
|
app_id: z.ZodNullable<z.ZodString>;
|
|
@@ -116,11 +116,11 @@ export declare const CommitCvmProvisionSchema: z.ZodObject<{
|
|
|
116
116
|
id: z.ZodNumber;
|
|
117
117
|
name: z.ZodString;
|
|
118
118
|
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
id: number;
|
|
120
119
|
name: string;
|
|
121
|
-
}, {
|
|
122
120
|
id: number;
|
|
121
|
+
}, {
|
|
123
122
|
name: string;
|
|
123
|
+
id: number;
|
|
124
124
|
}>>;
|
|
125
125
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
126
126
|
app_id: z.ZodNullable<z.ZodString>;
|
|
@@ -149,11 +149,11 @@ export declare const CommitCvmProvisionSchema: z.ZodObject<{
|
|
|
149
149
|
id: z.ZodNumber;
|
|
150
150
|
name: z.ZodString;
|
|
151
151
|
}, "strip", z.ZodTypeAny, {
|
|
152
|
-
id: number;
|
|
153
152
|
name: string;
|
|
154
|
-
}, {
|
|
155
153
|
id: number;
|
|
154
|
+
}, {
|
|
156
155
|
name: string;
|
|
156
|
+
id: number;
|
|
157
157
|
}>>;
|
|
158
158
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
159
159
|
app_id: z.ZodNullable<z.ZodString>;
|
|
@@ -219,11 +219,11 @@ declare const commitCvmProvision: {
|
|
|
219
219
|
id: z.ZodNumber;
|
|
220
220
|
name: z.ZodString;
|
|
221
221
|
}, "strip", z.ZodTypeAny, {
|
|
222
|
-
id: number;
|
|
223
222
|
name: string;
|
|
224
|
-
}, {
|
|
225
223
|
id: number;
|
|
224
|
+
}, {
|
|
226
225
|
name: string;
|
|
226
|
+
id: number;
|
|
227
227
|
}>>;
|
|
228
228
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
229
229
|
app_id: z.ZodNullable<z.ZodString>;
|
|
@@ -275,7 +275,7 @@ declare const commitCvmProvision: {
|
|
|
275
275
|
contract_address: z.ZodOptional<z.ZodString>;
|
|
276
276
|
deployer_address: z.ZodOptional<z.ZodString>;
|
|
277
277
|
env_keys: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
278
|
-
}, z.ZodTypeAny, "passthrough">): Promise<import("
|
|
278
|
+
}, z.ZodTypeAny, "passthrough">): Promise<import("../..").SafeResult<z.objectOutputType<{
|
|
279
279
|
id: z.ZodNumber;
|
|
280
280
|
name: z.ZodString;
|
|
281
281
|
status: z.ZodString;
|
|
@@ -284,11 +284,11 @@ declare const commitCvmProvision: {
|
|
|
284
284
|
id: z.ZodNumber;
|
|
285
285
|
name: z.ZodString;
|
|
286
286
|
}, "strip", z.ZodTypeAny, {
|
|
287
|
-
id: number;
|
|
288
287
|
name: string;
|
|
289
|
-
}, {
|
|
290
288
|
id: number;
|
|
289
|
+
}, {
|
|
291
290
|
name: string;
|
|
291
|
+
id: number;
|
|
292
292
|
}>>;
|
|
293
293
|
user_id: z.ZodNullable<z.ZodNumber>;
|
|
294
294
|
app_id: z.ZodNullable<z.ZodString>;
|
|
@@ -319,7 +319,7 @@ declare const commitCvmProvision: {
|
|
|
319
319
|
env_keys: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
320
320
|
}, z.ZodTypeAny, "passthrough">, parameters: {
|
|
321
321
|
schema: T;
|
|
322
|
-
}): Promise<import("
|
|
322
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
323
323
|
(client: Client, params: z.objectOutputType<{
|
|
324
324
|
encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
325
325
|
app_id: z.ZodString;
|
|
@@ -330,7 +330,6 @@ declare const commitCvmProvision: {
|
|
|
330
330
|
env_keys: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
331
331
|
}, z.ZodTypeAny, "passthrough">, parameters: {
|
|
332
332
|
schema: false;
|
|
333
|
-
}): Promise<import("
|
|
333
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
334
334
|
};
|
|
335
335
|
export { commitCvmProvision, safeCommitCvmProvision };
|
|
336
|
-
//# sourceMappingURL=commit_cvm_provision.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type Client } from "
|
|
3
|
-
import { LooseAppComposeSchema } from "
|
|
2
|
+
import { type Client } from "../../client";
|
|
3
|
+
import { LooseAppComposeSchema } from "../../types/app_compose";
|
|
4
4
|
/**
|
|
5
5
|
* Get CVM compose file configuration
|
|
6
6
|
*
|
|
@@ -68,6 +68,75 @@ import { LooseAppComposeSchema } from "../types/app_compose";
|
|
|
68
68
|
* }
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
+
export declare const GetCvmComposeFileResultSchema: z.ZodObject<{
|
|
72
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
|
+
docker_compose_file: z.ZodString;
|
|
74
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
75
|
+
name: z.ZodOptional<z.ZodString>;
|
|
76
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
79
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
83
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
|
+
docker_compose_file: z.ZodString;
|
|
85
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
86
|
+
name: z.ZodOptional<z.ZodString>;
|
|
87
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
93
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
94
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
docker_compose_file: z.ZodString;
|
|
96
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
97
|
+
name: z.ZodOptional<z.ZodString>;
|
|
98
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
100
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
102
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
103
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
105
|
+
export declare const CvmComposeFileSchema: z.ZodObject<{
|
|
106
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
107
|
+
docker_compose_file: z.ZodString;
|
|
108
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
109
|
+
name: z.ZodOptional<z.ZodString>;
|
|
110
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
111
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
112
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
113
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
115
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
117
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
118
|
+
docker_compose_file: z.ZodString;
|
|
119
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
120
|
+
name: z.ZodOptional<z.ZodString>;
|
|
121
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
126
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
128
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
129
|
+
docker_compose_file: z.ZodString;
|
|
130
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
131
|
+
name: z.ZodOptional<z.ZodString>;
|
|
132
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
134
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
138
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
139
|
+
export type CvmComposeFile = z.infer<typeof CvmComposeFileSchema>;
|
|
71
140
|
export type GetCvmComposeFileResult = z.infer<typeof LooseAppComposeSchema>;
|
|
72
141
|
export declare const GetCvmComposeFileRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
73
142
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -134,7 +203,7 @@ declare const getCvmComposeFile: {
|
|
|
134
203
|
schema: false;
|
|
135
204
|
}): Promise<unknown>;
|
|
136
205
|
}, safeGetCvmComposeFile: {
|
|
137
|
-
(client: Client, params: GetCvmComposeFileRequest): Promise<import("
|
|
206
|
+
(client: Client, params: GetCvmComposeFileRequest): Promise<import("../..").SafeResult<z.objectOutputType<{
|
|
138
207
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
139
208
|
docker_compose_file: z.ZodString;
|
|
140
209
|
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -148,10 +217,9 @@ declare const getCvmComposeFile: {
|
|
|
148
217
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
149
218
|
<T extends z.ZodTypeAny>(client: Client, params: GetCvmComposeFileRequest, parameters: {
|
|
150
219
|
schema: T;
|
|
151
|
-
}): Promise<import("
|
|
220
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
152
221
|
(client: Client, params: GetCvmComposeFileRequest, parameters: {
|
|
153
222
|
schema: false;
|
|
154
|
-
}): Promise<import("
|
|
223
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
155
224
|
};
|
|
156
225
|
export { getCvmComposeFile, safeGetCvmComposeFile };
|
|
157
|
-
//# sourceMappingURL=get_cvm_compose_file.d.ts.map
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type Client } from "../../client";
|
|
3
|
+
import { CvmLegacyDetailSchema } from "../../types/cvm_info";
|
|
4
|
+
import { type KmsInfo } from "../../types/kms_info";
|
|
5
|
+
export { CvmLegacyDetailSchema };
|
|
6
|
+
export type GetCvmInfoResponse = z.infer<typeof CvmLegacyDetailSchema> & {
|
|
7
|
+
kms_info: KmsInfo;
|
|
8
|
+
};
|
|
9
|
+
export declare const GetCvmInfoRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
10
|
+
id: z.ZodOptional<z.ZodString>;
|
|
11
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
12
|
+
app_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
13
|
+
instance_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
app_id?: string | undefined;
|
|
17
|
+
instance_id?: string | undefined;
|
|
18
|
+
uuid?: string | undefined;
|
|
19
|
+
}, {
|
|
20
|
+
id?: string | undefined;
|
|
21
|
+
app_id?: string | undefined;
|
|
22
|
+
instance_id?: string | undefined;
|
|
23
|
+
uuid?: string | undefined;
|
|
24
|
+
}>, {
|
|
25
|
+
id?: string | undefined;
|
|
26
|
+
app_id?: string | undefined;
|
|
27
|
+
instance_id?: string | undefined;
|
|
28
|
+
uuid?: string | undefined;
|
|
29
|
+
}, {
|
|
30
|
+
id?: string | undefined;
|
|
31
|
+
app_id?: string | undefined;
|
|
32
|
+
instance_id?: string | undefined;
|
|
33
|
+
uuid?: string | undefined;
|
|
34
|
+
}>, {
|
|
35
|
+
cvmId: string | undefined;
|
|
36
|
+
_raw: {
|
|
37
|
+
id?: string | undefined;
|
|
38
|
+
app_id?: string | undefined;
|
|
39
|
+
instance_id?: string | undefined;
|
|
40
|
+
uuid?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
id?: string | undefined;
|
|
44
|
+
app_id?: string | undefined;
|
|
45
|
+
instance_id?: string | undefined;
|
|
46
|
+
uuid?: string | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
export type GetCvmInfoRequest = {
|
|
49
|
+
id?: string;
|
|
50
|
+
uuid?: string;
|
|
51
|
+
app_id?: string;
|
|
52
|
+
instance_id?: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Get information about a specific CVM
|
|
56
|
+
*
|
|
57
|
+
* @param client - The API client
|
|
58
|
+
* @param request - Request parameters
|
|
59
|
+
* @param request.cvmId - ID of the CVM to get information for
|
|
60
|
+
* @param parameters - Optional behavior parameters
|
|
61
|
+
* @returns CVM information
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* const info = await getCvmInfo(client, { cvmId: "cvm-123" })
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
declare const getCvmInfo: {
|
|
69
|
+
(client: Client, params: GetCvmInfoRequest): Promise<GetCvmInfoResponse>;
|
|
70
|
+
<T extends z.ZodTypeAny>(client: Client, params: GetCvmInfoRequest, parameters: {
|
|
71
|
+
schema: T;
|
|
72
|
+
}): Promise<z.TypeOf<T>>;
|
|
73
|
+
(client: Client, params: GetCvmInfoRequest, parameters: {
|
|
74
|
+
schema: false;
|
|
75
|
+
}): Promise<unknown>;
|
|
76
|
+
}, safeGetCvmInfo: {
|
|
77
|
+
(client: Client, params: GetCvmInfoRequest): Promise<import("../..").SafeResult<GetCvmInfoResponse>>;
|
|
78
|
+
<T extends z.ZodTypeAny>(client: Client, params: GetCvmInfoRequest, parameters: {
|
|
79
|
+
schema: T;
|
|
80
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
81
|
+
(client: Client, params: GetCvmInfoRequest, parameters: {
|
|
82
|
+
schema: false;
|
|
83
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
84
|
+
};
|
|
85
|
+
export { getCvmInfo, safeGetCvmInfo };
|