@phala/cloud 0.1.1-beta.2 → 0.1.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/cvms/delete_cvm.d.ts +67 -0
- package/dist/actions/cvms/get_cvm_attestation.d.ts +393 -0
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +126 -64
- package/dist/actions/cvms/get_cvm_containers_stats.d.ts +161 -0
- package/dist/actions/cvms/get_cvm_docker_compose.d.ts +39 -0
- package/dist/actions/cvms/get_cvm_info.d.ts +13 -38
- package/dist/actions/cvms/get_cvm_list.d.ts +195 -177
- package/dist/actions/cvms/get_cvm_network.d.ts +97 -0
- package/dist/actions/cvms/get_cvm_stats.d.ts +257 -0
- package/dist/actions/cvms/provision_cvm.d.ts +7 -7
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +58 -26
- package/dist/actions/cvms/restart_cvm.d.ts +123 -0
- package/dist/actions/cvms/shutdown_cvm.d.ts +116 -0
- package/dist/actions/cvms/start_cvm.d.ts +117 -0
- package/dist/actions/cvms/stop_cvm.d.ts +118 -0
- package/dist/actions/cvms/update_cvm_resources.d.ts +73 -0
- package/dist/actions/cvms/update_cvm_visibility.d.ts +147 -0
- package/dist/actions/index.d.ts +12 -0
- package/dist/create-client.d.ts +181 -0
- package/dist/index.js +615 -175
- package/dist/index.mjs +563 -172
- package/dist/types/app_compose.d.ts +6 -0
- package/dist/types/cvm_id.d.ts +110 -0
- package/dist/types/cvm_info.d.ts +243 -155
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/get_compose_hash.d.ts +21 -4
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type Client } from "../../client";
|
|
3
|
-
import {
|
|
3
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
4
4
|
/**
|
|
5
5
|
* Get CVM compose file configuration
|
|
6
6
|
*
|
|
@@ -68,7 +68,7 @@ import { LooseAppComposeSchema } from "../../types/app_compose";
|
|
|
68
68
|
* }
|
|
69
69
|
* ```
|
|
70
70
|
*/
|
|
71
|
-
export declare const GetCvmComposeFileResultSchema: z.ZodObject<{
|
|
71
|
+
export declare const GetCvmComposeFileResultSchema: z.ZodEffects<z.ZodObject<{
|
|
72
72
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
73
73
|
docker_compose_file: z.ZodString;
|
|
74
74
|
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -79,6 +79,8 @@ export declare const GetCvmComposeFileResultSchema: z.ZodObject<{
|
|
|
79
79
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
80
80
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
81
81
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
82
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
83
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
82
84
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
83
85
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
84
86
|
docker_compose_file: z.ZodString;
|
|
@@ -90,6 +92,8 @@ export declare const GetCvmComposeFileResultSchema: z.ZodObject<{
|
|
|
90
92
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
91
93
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
92
94
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
95
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
96
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
93
97
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
94
98
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
99
|
docker_compose_file: z.ZodString;
|
|
@@ -101,8 +105,41 @@ export declare const GetCvmComposeFileResultSchema: z.ZodObject<{
|
|
|
101
105
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
102
106
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
103
107
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
108
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
109
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
110
|
+
}, z.ZodTypeAny, "passthrough">>, {
|
|
111
|
+
docker_compose_file: string;
|
|
112
|
+
name?: string | undefined;
|
|
113
|
+
public_sysinfo?: boolean | undefined;
|
|
114
|
+
public_logs?: boolean | undefined;
|
|
115
|
+
manifest_version?: number | undefined;
|
|
116
|
+
features?: string[] | undefined;
|
|
117
|
+
allowed_envs?: string[] | undefined;
|
|
118
|
+
pre_launch_script?: string | undefined;
|
|
119
|
+
kms_enabled?: boolean | undefined;
|
|
120
|
+
tproxy_enabled?: boolean | undefined;
|
|
121
|
+
env_pubkey?: string | undefined;
|
|
122
|
+
salt?: string | null | undefined;
|
|
123
|
+
} & {
|
|
124
|
+
[k: string]: unknown;
|
|
125
|
+
} & {
|
|
126
|
+
getHash: () => string;
|
|
127
|
+
toString: () => string;
|
|
128
|
+
}, z.objectInputType<{
|
|
129
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
130
|
+
docker_compose_file: z.ZodString;
|
|
131
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
132
|
+
name: z.ZodOptional<z.ZodString>;
|
|
133
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
138
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
139
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
140
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
141
|
}, z.ZodTypeAny, "passthrough">>;
|
|
105
|
-
export declare const CvmComposeFileSchema: z.ZodObject<{
|
|
142
|
+
export declare const CvmComposeFileSchema: z.ZodEffects<z.ZodObject<{
|
|
106
143
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
107
144
|
docker_compose_file: z.ZodString;
|
|
108
145
|
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
@@ -113,6 +150,8 @@ export declare const CvmComposeFileSchema: z.ZodObject<{
|
|
|
113
150
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
114
151
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
115
152
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
153
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
154
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
116
155
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
117
156
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
118
157
|
docker_compose_file: z.ZodString;
|
|
@@ -124,6 +163,8 @@ export declare const CvmComposeFileSchema: z.ZodObject<{
|
|
|
124
163
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
125
164
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
126
165
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
166
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
167
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
127
168
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
128
169
|
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
129
170
|
docker_compose_file: z.ZodString;
|
|
@@ -135,14 +176,47 @@ export declare const CvmComposeFileSchema: z.ZodObject<{
|
|
|
135
176
|
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
136
177
|
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
137
178
|
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
179
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
180
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
181
|
+
}, z.ZodTypeAny, "passthrough">>, {
|
|
182
|
+
docker_compose_file: string;
|
|
183
|
+
name?: string | undefined;
|
|
184
|
+
public_sysinfo?: boolean | undefined;
|
|
185
|
+
public_logs?: boolean | undefined;
|
|
186
|
+
manifest_version?: number | undefined;
|
|
187
|
+
features?: string[] | undefined;
|
|
188
|
+
allowed_envs?: string[] | undefined;
|
|
189
|
+
pre_launch_script?: string | undefined;
|
|
190
|
+
kms_enabled?: boolean | undefined;
|
|
191
|
+
tproxy_enabled?: boolean | undefined;
|
|
192
|
+
env_pubkey?: string | undefined;
|
|
193
|
+
salt?: string | null | undefined;
|
|
194
|
+
} & {
|
|
195
|
+
[k: string]: unknown;
|
|
196
|
+
} & {
|
|
197
|
+
getHash: () => string;
|
|
198
|
+
toString: () => string;
|
|
199
|
+
}, z.objectInputType<{
|
|
200
|
+
allowed_envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
201
|
+
docker_compose_file: z.ZodString;
|
|
202
|
+
features: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
203
|
+
name: z.ZodOptional<z.ZodString>;
|
|
204
|
+
manifest_version: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
kms_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
public_logs: z.ZodOptional<z.ZodBoolean>;
|
|
207
|
+
public_sysinfo: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
tproxy_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
209
|
+
pre_launch_script: z.ZodOptional<z.ZodString>;
|
|
210
|
+
env_pubkey: z.ZodOptional<z.ZodString>;
|
|
211
|
+
salt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
138
212
|
}, z.ZodTypeAny, "passthrough">>;
|
|
139
213
|
export type CvmComposeFile = z.infer<typeof CvmComposeFileSchema>;
|
|
140
|
-
export type GetCvmComposeFileResult = z.infer<typeof
|
|
214
|
+
export type GetCvmComposeFileResult = z.infer<typeof GetCvmComposeFileResultSchema>;
|
|
141
215
|
export declare const GetCvmComposeFileRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
142
216
|
id: z.ZodOptional<z.ZodString>;
|
|
143
217
|
uuid: z.ZodOptional<z.ZodString>;
|
|
144
|
-
app_id: z.ZodOptional<z.
|
|
145
|
-
instance_id: z.ZodOptional<z.
|
|
218
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
219
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
146
220
|
}, "strip", z.ZodTypeAny, {
|
|
147
221
|
id?: string | undefined;
|
|
148
222
|
app_id?: string | undefined;
|
|
@@ -153,72 +227,60 @@ export declare const GetCvmComposeFileRequestSchema: z.ZodEffects<z.ZodEffects<z
|
|
|
153
227
|
app_id?: string | undefined;
|
|
154
228
|
instance_id?: string | undefined;
|
|
155
229
|
uuid?: string | undefined;
|
|
156
|
-
}>, {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
uuid?: string | undefined;
|
|
161
|
-
}, {
|
|
162
|
-
id?: string | undefined;
|
|
163
|
-
app_id?: string | undefined;
|
|
164
|
-
instance_id?: string | undefined;
|
|
165
|
-
uuid?: string | undefined;
|
|
166
|
-
}>, {
|
|
167
|
-
cvmId: string | undefined;
|
|
168
|
-
_raw: {
|
|
169
|
-
id?: string | undefined;
|
|
170
|
-
app_id?: string | undefined;
|
|
171
|
-
instance_id?: string | undefined;
|
|
172
|
-
uuid?: string | undefined;
|
|
173
|
-
};
|
|
174
|
-
}, {
|
|
175
|
-
id?: string | undefined;
|
|
176
|
-
app_id?: string | undefined;
|
|
177
|
-
instance_id?: string | undefined;
|
|
178
|
-
uuid?: string | undefined;
|
|
179
|
-
}>;
|
|
180
|
-
export type GetCvmComposeFileRequest = {
|
|
181
|
-
id?: string;
|
|
182
|
-
uuid?: string;
|
|
183
|
-
app_id?: string;
|
|
184
|
-
instance_id?: string;
|
|
185
|
-
};
|
|
230
|
+
}>, any, any>, {
|
|
231
|
+
cvmId: string;
|
|
232
|
+
}, any>;
|
|
233
|
+
export type GetCvmComposeFileRequest = CvmIdInput;
|
|
186
234
|
declare const getCvmComposeFile: {
|
|
187
|
-
(client: Client, params:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
manifest_version
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
235
|
+
(client: Client, params: CvmIdInput): Promise<{
|
|
236
|
+
docker_compose_file: string;
|
|
237
|
+
name?: string | undefined;
|
|
238
|
+
public_sysinfo?: boolean | undefined;
|
|
239
|
+
public_logs?: boolean | undefined;
|
|
240
|
+
manifest_version?: number | undefined;
|
|
241
|
+
features?: string[] | undefined;
|
|
242
|
+
allowed_envs?: string[] | undefined;
|
|
243
|
+
pre_launch_script?: string | undefined;
|
|
244
|
+
kms_enabled?: boolean | undefined;
|
|
245
|
+
tproxy_enabled?: boolean | undefined;
|
|
246
|
+
env_pubkey?: string | undefined;
|
|
247
|
+
salt?: string | null | undefined;
|
|
248
|
+
} & {
|
|
249
|
+
[k: string]: unknown;
|
|
250
|
+
} & {
|
|
251
|
+
getHash: () => string;
|
|
252
|
+
toString: () => string;
|
|
253
|
+
}>;
|
|
254
|
+
<T extends z.ZodTypeAny>(client: Client, params: CvmIdInput, parameters: {
|
|
200
255
|
schema: T;
|
|
201
256
|
}): Promise<z.TypeOf<T>>;
|
|
202
|
-
(client: Client, params:
|
|
257
|
+
(client: Client, params: CvmIdInput, parameters: {
|
|
203
258
|
schema: false;
|
|
204
259
|
}): Promise<unknown>;
|
|
205
260
|
}, safeGetCvmComposeFile: {
|
|
206
|
-
(client: Client, params:
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
manifest_version
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
261
|
+
(client: Client, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
262
|
+
docker_compose_file: string;
|
|
263
|
+
name?: string | undefined;
|
|
264
|
+
public_sysinfo?: boolean | undefined;
|
|
265
|
+
public_logs?: boolean | undefined;
|
|
266
|
+
manifest_version?: number | undefined;
|
|
267
|
+
features?: string[] | undefined;
|
|
268
|
+
allowed_envs?: string[] | undefined;
|
|
269
|
+
pre_launch_script?: string | undefined;
|
|
270
|
+
kms_enabled?: boolean | undefined;
|
|
271
|
+
tproxy_enabled?: boolean | undefined;
|
|
272
|
+
env_pubkey?: string | undefined;
|
|
273
|
+
salt?: string | null | undefined;
|
|
274
|
+
} & {
|
|
275
|
+
[k: string]: unknown;
|
|
276
|
+
} & {
|
|
277
|
+
getHash: () => string;
|
|
278
|
+
toString: () => string;
|
|
279
|
+
}>>;
|
|
280
|
+
<T extends z.ZodTypeAny>(client: Client, params: CvmIdInput, parameters: {
|
|
219
281
|
schema: T;
|
|
220
282
|
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
221
|
-
(client: Client, params:
|
|
283
|
+
(client: Client, params: CvmIdInput, parameters: {
|
|
222
284
|
schema: false;
|
|
223
285
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
224
286
|
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
+
export declare const CvmContainersStatsSchema: z.ZodObject<{
|
|
4
|
+
is_online: z.ZodBoolean;
|
|
5
|
+
is_public: z.ZodDefault<z.ZodBoolean>;
|
|
6
|
+
error: z.ZodNullable<z.ZodString>;
|
|
7
|
+
docker_compose_file: z.ZodNullable<z.ZodString>;
|
|
8
|
+
manifest_version: z.ZodNullable<z.ZodNumber>;
|
|
9
|
+
version: z.ZodNullable<z.ZodString>;
|
|
10
|
+
runner: z.ZodNullable<z.ZodString>;
|
|
11
|
+
features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
|
|
12
|
+
containers: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
13
|
+
id: z.ZodString;
|
|
14
|
+
names: z.ZodArray<z.ZodString, "many">;
|
|
15
|
+
image: z.ZodString;
|
|
16
|
+
image_id: z.ZodString;
|
|
17
|
+
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
18
|
+
created: z.ZodNumber;
|
|
19
|
+
state: z.ZodString;
|
|
20
|
+
status: z.ZodString;
|
|
21
|
+
log_endpoint: z.ZodNullable<z.ZodString>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
status: string;
|
|
24
|
+
image: string;
|
|
25
|
+
id: string;
|
|
26
|
+
names: string[];
|
|
27
|
+
image_id: string;
|
|
28
|
+
created: number;
|
|
29
|
+
state: string;
|
|
30
|
+
log_endpoint: string | null;
|
|
31
|
+
command?: string | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
status: string;
|
|
34
|
+
image: string;
|
|
35
|
+
id: string;
|
|
36
|
+
names: string[];
|
|
37
|
+
image_id: string;
|
|
38
|
+
created: number;
|
|
39
|
+
state: string;
|
|
40
|
+
log_endpoint: string | null;
|
|
41
|
+
command?: string | null | undefined;
|
|
42
|
+
}>, "many">>;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
error: string | null;
|
|
45
|
+
version: string | null;
|
|
46
|
+
manifest_version: number | null;
|
|
47
|
+
runner: string | null;
|
|
48
|
+
docker_compose_file: string | null;
|
|
49
|
+
features: string[] | null;
|
|
50
|
+
is_online: boolean;
|
|
51
|
+
is_public: boolean;
|
|
52
|
+
containers: {
|
|
53
|
+
status: string;
|
|
54
|
+
image: string;
|
|
55
|
+
id: string;
|
|
56
|
+
names: string[];
|
|
57
|
+
image_id: string;
|
|
58
|
+
created: number;
|
|
59
|
+
state: string;
|
|
60
|
+
log_endpoint: string | null;
|
|
61
|
+
command?: string | null | undefined;
|
|
62
|
+
}[] | null;
|
|
63
|
+
}, {
|
|
64
|
+
error: string | null;
|
|
65
|
+
version: string | null;
|
|
66
|
+
manifest_version: number | null;
|
|
67
|
+
runner: string | null;
|
|
68
|
+
docker_compose_file: string | null;
|
|
69
|
+
features: string[] | null;
|
|
70
|
+
is_online: boolean;
|
|
71
|
+
containers: {
|
|
72
|
+
status: string;
|
|
73
|
+
image: string;
|
|
74
|
+
id: string;
|
|
75
|
+
names: string[];
|
|
76
|
+
image_id: string;
|
|
77
|
+
created: number;
|
|
78
|
+
state: string;
|
|
79
|
+
log_endpoint: string | null;
|
|
80
|
+
command?: string | null | undefined;
|
|
81
|
+
}[] | null;
|
|
82
|
+
is_public?: boolean | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
export type CvmContainersStats = z.infer<typeof CvmContainersStatsSchema>;
|
|
85
|
+
export declare const GetCvmContainersStatsRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
86
|
+
id: z.ZodOptional<z.ZodString>;
|
|
87
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
88
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
89
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, "strip", z.ZodTypeAny, {
|
|
91
|
+
id?: string | undefined;
|
|
92
|
+
app_id?: string | undefined;
|
|
93
|
+
instance_id?: string | undefined;
|
|
94
|
+
uuid?: string | undefined;
|
|
95
|
+
}, {
|
|
96
|
+
id?: string | undefined;
|
|
97
|
+
app_id?: string | undefined;
|
|
98
|
+
instance_id?: string | undefined;
|
|
99
|
+
uuid?: string | undefined;
|
|
100
|
+
}>, any, any>, {
|
|
101
|
+
cvmId: string;
|
|
102
|
+
}, any>;
|
|
103
|
+
export type GetCvmContainersStatsRequest = CvmIdInput;
|
|
104
|
+
declare const getCvmContainersStats: {
|
|
105
|
+
(client: import("../..").BaseClient, params: CvmIdInput): Promise<{
|
|
106
|
+
error: string | null;
|
|
107
|
+
version: string | null;
|
|
108
|
+
manifest_version: number | null;
|
|
109
|
+
runner: string | null;
|
|
110
|
+
docker_compose_file: string | null;
|
|
111
|
+
features: string[] | null;
|
|
112
|
+
is_online: boolean;
|
|
113
|
+
is_public: boolean;
|
|
114
|
+
containers: {
|
|
115
|
+
status: string;
|
|
116
|
+
image: string;
|
|
117
|
+
id: string;
|
|
118
|
+
names: string[];
|
|
119
|
+
image_id: string;
|
|
120
|
+
created: number;
|
|
121
|
+
state: string;
|
|
122
|
+
log_endpoint: string | null;
|
|
123
|
+
command?: string | null | undefined;
|
|
124
|
+
}[] | null;
|
|
125
|
+
}>;
|
|
126
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
127
|
+
schema: T;
|
|
128
|
+
}): Promise<z.TypeOf<T>>;
|
|
129
|
+
(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
130
|
+
schema: false;
|
|
131
|
+
}): Promise<unknown>;
|
|
132
|
+
}, safeGetCvmContainersStats: {
|
|
133
|
+
(client: import("../..").BaseClient, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
134
|
+
error: string | null;
|
|
135
|
+
version: string | null;
|
|
136
|
+
manifest_version: number | null;
|
|
137
|
+
runner: string | null;
|
|
138
|
+
docker_compose_file: string | null;
|
|
139
|
+
features: string[] | null;
|
|
140
|
+
is_online: boolean;
|
|
141
|
+
is_public: boolean;
|
|
142
|
+
containers: {
|
|
143
|
+
status: string;
|
|
144
|
+
image: string;
|
|
145
|
+
id: string;
|
|
146
|
+
names: string[];
|
|
147
|
+
image_id: string;
|
|
148
|
+
created: number;
|
|
149
|
+
state: string;
|
|
150
|
+
log_endpoint: string | null;
|
|
151
|
+
command?: string | null | undefined;
|
|
152
|
+
}[] | null;
|
|
153
|
+
}>>;
|
|
154
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
155
|
+
schema: T;
|
|
156
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
157
|
+
(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
158
|
+
schema: false;
|
|
159
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
160
|
+
};
|
|
161
|
+
export { getCvmContainersStats, safeGetCvmContainersStats };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
3
|
+
export declare const GetCvmDockerComposeRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
4
|
+
id: z.ZodOptional<z.ZodString>;
|
|
5
|
+
uuid: z.ZodOptional<z.ZodString>;
|
|
6
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
7
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id?: string | undefined;
|
|
10
|
+
app_id?: string | undefined;
|
|
11
|
+
instance_id?: string | undefined;
|
|
12
|
+
uuid?: string | undefined;
|
|
13
|
+
}, {
|
|
14
|
+
id?: string | undefined;
|
|
15
|
+
app_id?: string | undefined;
|
|
16
|
+
instance_id?: string | undefined;
|
|
17
|
+
uuid?: string | undefined;
|
|
18
|
+
}>, any, any>, {
|
|
19
|
+
cvmId: string;
|
|
20
|
+
}, any>;
|
|
21
|
+
export type GetCvmDockerComposeRequest = CvmIdInput;
|
|
22
|
+
declare const getCvmDockerCompose: {
|
|
23
|
+
(client: import("../..").BaseClient, params: CvmIdInput): Promise<string>;
|
|
24
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
25
|
+
schema: T;
|
|
26
|
+
}): Promise<z.TypeOf<T>>;
|
|
27
|
+
(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
28
|
+
schema: false;
|
|
29
|
+
}): Promise<unknown>;
|
|
30
|
+
}, safeGetCvmDockerCompose: {
|
|
31
|
+
(client: import("../..").BaseClient, params: CvmIdInput): Promise<import("../..").SafeResult<string>>;
|
|
32
|
+
<T extends z.ZodTypeAny>(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
33
|
+
schema: T;
|
|
34
|
+
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
35
|
+
(client: import("../..").BaseClient, params: CvmIdInput, parameters: {
|
|
36
|
+
schema: false;
|
|
37
|
+
}): Promise<import("../..").SafeResult<unknown>>;
|
|
38
|
+
};
|
|
39
|
+
export { getCvmDockerCompose, safeGetCvmDockerCompose };
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { type Client } from "../../client";
|
|
3
3
|
import { CvmLegacyDetailSchema } from "../../types/cvm_info";
|
|
4
4
|
import { type KmsInfo } from "../../types/kms_info";
|
|
5
|
+
import { type CvmIdInput } from "../../types/cvm_id";
|
|
5
6
|
export { CvmLegacyDetailSchema };
|
|
6
7
|
export type GetCvmInfoResponse = z.infer<typeof CvmLegacyDetailSchema> & {
|
|
7
8
|
kms_info: KmsInfo;
|
|
@@ -9,8 +10,8 @@ export type GetCvmInfoResponse = z.infer<typeof CvmLegacyDetailSchema> & {
|
|
|
9
10
|
export declare const GetCvmInfoRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
10
11
|
id: z.ZodOptional<z.ZodString>;
|
|
11
12
|
uuid: z.ZodOptional<z.ZodString>;
|
|
12
|
-
app_id: z.ZodOptional<z.
|
|
13
|
-
instance_id: z.ZodOptional<z.
|
|
13
|
+
app_id: z.ZodOptional<z.ZodString>;
|
|
14
|
+
instance_id: z.ZodOptional<z.ZodString>;
|
|
14
15
|
}, "strip", z.ZodTypeAny, {
|
|
15
16
|
id?: string | undefined;
|
|
16
17
|
app_id?: string | undefined;
|
|
@@ -21,36 +22,10 @@ export declare const GetCvmInfoRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObj
|
|
|
21
22
|
app_id?: string | undefined;
|
|
22
23
|
instance_id?: string | undefined;
|
|
23
24
|
uuid?: string | undefined;
|
|
24
|
-
}>, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
};
|
|
25
|
+
}>, any, any>, {
|
|
26
|
+
cvmId: string;
|
|
27
|
+
}, any>;
|
|
28
|
+
export type GetCvmInfoRequest = CvmIdInput;
|
|
54
29
|
/**
|
|
55
30
|
* Get information about a specific CVM
|
|
56
31
|
*
|
|
@@ -66,19 +41,19 @@ export type GetCvmInfoRequest = {
|
|
|
66
41
|
* ```
|
|
67
42
|
*/
|
|
68
43
|
declare const getCvmInfo: {
|
|
69
|
-
(client: Client, params:
|
|
70
|
-
<T extends z.ZodTypeAny>(client: Client, params:
|
|
44
|
+
(client: Client, params: CvmIdInput): Promise<GetCvmInfoResponse>;
|
|
45
|
+
<T extends z.ZodTypeAny>(client: Client, params: CvmIdInput, parameters: {
|
|
71
46
|
schema: T;
|
|
72
47
|
}): Promise<z.TypeOf<T>>;
|
|
73
|
-
(client: Client, params:
|
|
48
|
+
(client: Client, params: CvmIdInput, parameters: {
|
|
74
49
|
schema: false;
|
|
75
50
|
}): Promise<unknown>;
|
|
76
51
|
}, safeGetCvmInfo: {
|
|
77
|
-
(client: Client, params:
|
|
78
|
-
<T extends z.ZodTypeAny>(client: Client, params:
|
|
52
|
+
(client: Client, params: CvmIdInput): Promise<import("../..").SafeResult<GetCvmInfoResponse>>;
|
|
53
|
+
<T extends z.ZodTypeAny>(client: Client, params: CvmIdInput, parameters: {
|
|
79
54
|
schema: T;
|
|
80
55
|
}): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
|
|
81
|
-
(client: Client, params:
|
|
56
|
+
(client: Client, params: CvmIdInput, parameters: {
|
|
82
57
|
schema: false;
|
|
83
58
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
84
59
|
};
|