@phala/cloud 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/apps/get_app_attestation.d.ts +17 -7
- package/dist/actions/cvms/commit_cvm_provision.d.ts +6 -0
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +156 -12
- package/dist/actions/cvms/get_cvm_list.d.ts +8 -10
- package/dist/actions/cvms/get_cvm_status_batch.d.ts +247 -24
- package/dist/actions/cvms/patch_cvm.d.ts +16 -0
- package/dist/actions/cvms/provision_cvm.d.ts +900 -51
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +215 -5
- package/dist/actions/cvms/update_cvm_envs.d.ts +16 -0
- package/dist/actions/cvms/update_cvm_resources.d.ts +24 -2
- package/dist/actions/cvms/update_cvm_visibility.d.ts +2 -0
- package/dist/actions/cvms/update_docker_compose.d.ts +31 -0
- package/dist/actions/cvms/update_prelaunch_script.d.ts +31 -0
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +16 -0
- package/dist/actions/get_available_nodes.d.ts +259 -0
- package/dist/actions/get_cvm_create_resources.d.ts +351 -0
- package/dist/actions/index.d.ts +6 -2
- package/dist/actions/kms/get_kms_contract.d.ts +59 -0
- package/dist/actions/kms/get_kms_list.d.ts +15 -0
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +54 -0
- package/dist/actions/kms/list_kms_contract_nodes.d.ts +98 -0
- package/dist/actions/kms/list_kms_contracts.d.ts +152 -0
- package/dist/actions/workspaces/get_workspace.d.ts +4 -0
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +161 -0
- package/dist/actions/workspaces/list_workspaces.d.ts +126 -0
- package/dist/client.d.ts +4 -1
- package/dist/create-client.d.ts +48 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1527 -1207
- package/dist/index.mjs +1452 -1151
- package/dist/types/app_compose.d.ts +50 -5
- package/dist/types/app_info_v20251028.d.ts +44 -0
- package/dist/types/app_info_v20260121.d.ts +2324 -0
- package/dist/types/client.d.ts +2 -2
- package/dist/types/cvm_info_v20251028.d.ts +23 -0
- package/dist/types/cvm_info_v20260121.d.ts +977 -0
- package/dist/types/kms_contract.d.ts +64 -0
- package/dist/types/kms_info.d.ts +8 -0
- package/dist/types/version-mappings.d.ts +6 -6
- package/dist/utils/error_codes.d.ts +1 -0
- package/dist/utils/errors.d.ts +30 -1
- package/dist/utils/get_compose_hash.d.ts +24 -0
- package/dist/utils/get_mr_config_id.d.ts +55 -0
- package/dist/utils/index.d.ts +3 -2
- package/package.json +3 -3
|
@@ -69,11 +69,29 @@ export declare const NodeRefSchema: z.ZodObject<{
|
|
|
69
69
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
70
70
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
71
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
73
|
+
device_id: z.ZodString;
|
|
74
|
+
algorithm_version: z.ZodString;
|
|
75
|
+
enabled: z.ZodBoolean;
|
|
76
|
+
}, "strip", z.ZodTypeAny, {
|
|
77
|
+
device_id: string;
|
|
78
|
+
algorithm_version: string;
|
|
79
|
+
enabled: boolean;
|
|
80
|
+
}, {
|
|
81
|
+
device_id: string;
|
|
82
|
+
algorithm_version: string;
|
|
83
|
+
enabled: boolean;
|
|
84
|
+
}>, "many">>;
|
|
72
85
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
86
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
87
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
88
|
}, "strip", z.ZodTypeAny, {
|
|
76
89
|
object_type: "node";
|
|
90
|
+
device_ids: {
|
|
91
|
+
device_id: string;
|
|
92
|
+
algorithm_version: string;
|
|
93
|
+
enabled: boolean;
|
|
94
|
+
}[];
|
|
77
95
|
status?: string | null | undefined;
|
|
78
96
|
name?: string | null | undefined;
|
|
79
97
|
version?: string | null | undefined;
|
|
@@ -89,6 +107,11 @@ export declare const NodeRefSchema: z.ZodObject<{
|
|
|
89
107
|
id?: number | null | undefined;
|
|
90
108
|
device_id?: string | null | undefined;
|
|
91
109
|
region?: string | null | undefined;
|
|
110
|
+
device_ids?: {
|
|
111
|
+
device_id: string;
|
|
112
|
+
algorithm_version: string;
|
|
113
|
+
enabled: boolean;
|
|
114
|
+
}[] | undefined;
|
|
92
115
|
ppid?: string | null | undefined;
|
|
93
116
|
}>;
|
|
94
117
|
export declare const NodeInfoSchema: z.ZodObject<{
|
|
@@ -97,11 +120,29 @@ export declare const NodeInfoSchema: z.ZodObject<{
|
|
|
97
120
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
121
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
99
122
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
123
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
124
|
+
device_id: z.ZodString;
|
|
125
|
+
algorithm_version: z.ZodString;
|
|
126
|
+
enabled: z.ZodBoolean;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
device_id: string;
|
|
129
|
+
algorithm_version: string;
|
|
130
|
+
enabled: boolean;
|
|
131
|
+
}, {
|
|
132
|
+
device_id: string;
|
|
133
|
+
algorithm_version: string;
|
|
134
|
+
enabled: boolean;
|
|
135
|
+
}>, "many">>;
|
|
100
136
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
137
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
102
138
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
103
139
|
}, "strip", z.ZodTypeAny, {
|
|
104
140
|
object_type: "node";
|
|
141
|
+
device_ids: {
|
|
142
|
+
device_id: string;
|
|
143
|
+
algorithm_version: string;
|
|
144
|
+
enabled: boolean;
|
|
145
|
+
}[];
|
|
105
146
|
status?: string | null | undefined;
|
|
106
147
|
name?: string | null | undefined;
|
|
107
148
|
version?: string | null | undefined;
|
|
@@ -117,6 +158,11 @@ export declare const NodeInfoSchema: z.ZodObject<{
|
|
|
117
158
|
id?: number | null | undefined;
|
|
118
159
|
device_id?: string | null | undefined;
|
|
119
160
|
region?: string | null | undefined;
|
|
161
|
+
device_ids?: {
|
|
162
|
+
device_id: string;
|
|
163
|
+
algorithm_version: string;
|
|
164
|
+
enabled: boolean;
|
|
165
|
+
}[] | undefined;
|
|
120
166
|
ppid?: string | null | undefined;
|
|
121
167
|
}>;
|
|
122
168
|
export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
@@ -126,11 +172,29 @@ export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
|
126
172
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
127
173
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
128
174
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
175
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
176
|
+
device_id: z.ZodString;
|
|
177
|
+
algorithm_version: z.ZodString;
|
|
178
|
+
enabled: z.ZodBoolean;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
device_id: string;
|
|
181
|
+
algorithm_version: string;
|
|
182
|
+
enabled: boolean;
|
|
183
|
+
}, {
|
|
184
|
+
device_id: string;
|
|
185
|
+
algorithm_version: string;
|
|
186
|
+
enabled: boolean;
|
|
187
|
+
}>, "many">>;
|
|
129
188
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
130
189
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
131
190
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
132
191
|
}, "strip", z.ZodTypeAny, {
|
|
133
192
|
object_type: "node";
|
|
193
|
+
device_ids: {
|
|
194
|
+
device_id: string;
|
|
195
|
+
algorithm_version: string;
|
|
196
|
+
enabled: boolean;
|
|
197
|
+
}[];
|
|
134
198
|
status?: string | null | undefined;
|
|
135
199
|
name?: string | null | undefined;
|
|
136
200
|
version?: string | null | undefined;
|
|
@@ -146,6 +210,11 @@ export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
|
146
210
|
id?: number | null | undefined;
|
|
147
211
|
device_id?: string | null | undefined;
|
|
148
212
|
region?: string | null | undefined;
|
|
213
|
+
device_ids?: {
|
|
214
|
+
device_id: string;
|
|
215
|
+
algorithm_version: string;
|
|
216
|
+
enabled: boolean;
|
|
217
|
+
}[] | undefined;
|
|
149
218
|
ppid?: string | null | undefined;
|
|
150
219
|
}>, "many">;
|
|
151
220
|
total: z.ZodNumber;
|
|
@@ -159,11 +228,29 @@ export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
|
159
228
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
160
229
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
230
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
231
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
232
|
+
device_id: z.ZodString;
|
|
233
|
+
algorithm_version: z.ZodString;
|
|
234
|
+
enabled: z.ZodBoolean;
|
|
235
|
+
}, "strip", z.ZodTypeAny, {
|
|
236
|
+
device_id: string;
|
|
237
|
+
algorithm_version: string;
|
|
238
|
+
enabled: boolean;
|
|
239
|
+
}, {
|
|
240
|
+
device_id: string;
|
|
241
|
+
algorithm_version: string;
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
}>, "many">>;
|
|
162
244
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
245
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
246
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
247
|
}, "strip", z.ZodTypeAny, {
|
|
166
248
|
object_type: "node";
|
|
249
|
+
device_ids: {
|
|
250
|
+
device_id: string;
|
|
251
|
+
algorithm_version: string;
|
|
252
|
+
enabled: boolean;
|
|
253
|
+
}[];
|
|
167
254
|
status?: string | null | undefined;
|
|
168
255
|
name?: string | null | undefined;
|
|
169
256
|
version?: string | null | undefined;
|
|
@@ -179,6 +266,11 @@ export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
|
179
266
|
id?: number | null | undefined;
|
|
180
267
|
device_id?: string | null | undefined;
|
|
181
268
|
region?: string | null | undefined;
|
|
269
|
+
device_ids?: {
|
|
270
|
+
device_id: string;
|
|
271
|
+
algorithm_version: string;
|
|
272
|
+
enabled: boolean;
|
|
273
|
+
}[] | undefined;
|
|
182
274
|
ppid?: string | null | undefined;
|
|
183
275
|
}>, "many">;
|
|
184
276
|
total: z.ZodNumber;
|
|
@@ -192,11 +284,29 @@ export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
|
192
284
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
285
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
194
286
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
287
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
288
|
+
device_id: z.ZodString;
|
|
289
|
+
algorithm_version: z.ZodString;
|
|
290
|
+
enabled: z.ZodBoolean;
|
|
291
|
+
}, "strip", z.ZodTypeAny, {
|
|
292
|
+
device_id: string;
|
|
293
|
+
algorithm_version: string;
|
|
294
|
+
enabled: boolean;
|
|
295
|
+
}, {
|
|
296
|
+
device_id: string;
|
|
297
|
+
algorithm_version: string;
|
|
298
|
+
enabled: boolean;
|
|
299
|
+
}>, "many">>;
|
|
195
300
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
301
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
197
302
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
303
|
}, "strip", z.ZodTypeAny, {
|
|
199
304
|
object_type: "node";
|
|
305
|
+
device_ids: {
|
|
306
|
+
device_id: string;
|
|
307
|
+
algorithm_version: string;
|
|
308
|
+
enabled: boolean;
|
|
309
|
+
}[];
|
|
200
310
|
status?: string | null | undefined;
|
|
201
311
|
name?: string | null | undefined;
|
|
202
312
|
version?: string | null | undefined;
|
|
@@ -212,6 +322,11 @@ export declare const GetWorkspaceNodesSchema: z.ZodObject<{
|
|
|
212
322
|
id?: number | null | undefined;
|
|
213
323
|
device_id?: string | null | undefined;
|
|
214
324
|
region?: string | null | undefined;
|
|
325
|
+
device_ids?: {
|
|
326
|
+
device_id: string;
|
|
327
|
+
algorithm_version: string;
|
|
328
|
+
enabled: boolean;
|
|
329
|
+
}[] | undefined;
|
|
215
330
|
ppid?: string | null | undefined;
|
|
216
331
|
}>, "many">;
|
|
217
332
|
total: z.ZodNumber;
|
|
@@ -235,11 +350,29 @@ declare const getWorkspaceNodes: {
|
|
|
235
350
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
236
351
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
237
352
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
354
|
+
device_id: z.ZodString;
|
|
355
|
+
algorithm_version: z.ZodString;
|
|
356
|
+
enabled: z.ZodBoolean;
|
|
357
|
+
}, "strip", z.ZodTypeAny, {
|
|
358
|
+
device_id: string;
|
|
359
|
+
algorithm_version: string;
|
|
360
|
+
enabled: boolean;
|
|
361
|
+
}, {
|
|
362
|
+
device_id: string;
|
|
363
|
+
algorithm_version: string;
|
|
364
|
+
enabled: boolean;
|
|
365
|
+
}>, "many">>;
|
|
238
366
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
239
367
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
240
368
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
241
369
|
}, "strip", z.ZodTypeAny, {
|
|
242
370
|
object_type: "node";
|
|
371
|
+
device_ids: {
|
|
372
|
+
device_id: string;
|
|
373
|
+
algorithm_version: string;
|
|
374
|
+
enabled: boolean;
|
|
375
|
+
}[];
|
|
243
376
|
status?: string | null | undefined;
|
|
244
377
|
name?: string | null | undefined;
|
|
245
378
|
version?: string | null | undefined;
|
|
@@ -255,6 +388,11 @@ declare const getWorkspaceNodes: {
|
|
|
255
388
|
id?: number | null | undefined;
|
|
256
389
|
device_id?: string | null | undefined;
|
|
257
390
|
region?: string | null | undefined;
|
|
391
|
+
device_ids?: {
|
|
392
|
+
device_id: string;
|
|
393
|
+
algorithm_version: string;
|
|
394
|
+
enabled: boolean;
|
|
395
|
+
}[] | undefined;
|
|
258
396
|
ppid?: string | null | undefined;
|
|
259
397
|
}>, "many">;
|
|
260
398
|
total: z.ZodNumber;
|
|
@@ -276,11 +414,29 @@ declare const getWorkspaceNodes: {
|
|
|
276
414
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
277
415
|
region: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
278
416
|
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
417
|
+
device_ids: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
418
|
+
device_id: z.ZodString;
|
|
419
|
+
algorithm_version: z.ZodString;
|
|
420
|
+
enabled: z.ZodBoolean;
|
|
421
|
+
}, "strip", z.ZodTypeAny, {
|
|
422
|
+
device_id: string;
|
|
423
|
+
algorithm_version: string;
|
|
424
|
+
enabled: boolean;
|
|
425
|
+
}, {
|
|
426
|
+
device_id: string;
|
|
427
|
+
algorithm_version: string;
|
|
428
|
+
enabled: boolean;
|
|
429
|
+
}>, "many">>;
|
|
279
430
|
ppid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
280
431
|
status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
281
432
|
version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
282
433
|
}, "strip", z.ZodTypeAny, {
|
|
283
434
|
object_type: "node";
|
|
435
|
+
device_ids: {
|
|
436
|
+
device_id: string;
|
|
437
|
+
algorithm_version: string;
|
|
438
|
+
enabled: boolean;
|
|
439
|
+
}[];
|
|
284
440
|
status?: string | null | undefined;
|
|
285
441
|
name?: string | null | undefined;
|
|
286
442
|
version?: string | null | undefined;
|
|
@@ -296,6 +452,11 @@ declare const getWorkspaceNodes: {
|
|
|
296
452
|
id?: number | null | undefined;
|
|
297
453
|
device_id?: string | null | undefined;
|
|
298
454
|
region?: string | null | undefined;
|
|
455
|
+
device_ids?: {
|
|
456
|
+
device_id: string;
|
|
457
|
+
algorithm_version: string;
|
|
458
|
+
enabled: boolean;
|
|
459
|
+
}[] | undefined;
|
|
299
460
|
ppid?: string | null | undefined;
|
|
300
461
|
}>, "many">;
|
|
301
462
|
total: z.ZodNumber;
|
|
@@ -71,6 +71,13 @@ export declare const WorkspaceResponseSchema: z.ZodObject<{
|
|
|
71
71
|
is_default: z.ZodBoolean;
|
|
72
72
|
created_at: z.ZodString;
|
|
73
73
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
/**
|
|
75
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
76
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
77
|
+
*/
|
|
78
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
79
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
80
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
74
81
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
75
82
|
id: z.ZodString;
|
|
76
83
|
name: z.ZodString;
|
|
@@ -81,6 +88,13 @@ export declare const WorkspaceResponseSchema: z.ZodObject<{
|
|
|
81
88
|
is_default: z.ZodBoolean;
|
|
82
89
|
created_at: z.ZodString;
|
|
83
90
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
93
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
94
|
+
*/
|
|
95
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
96
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
97
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
84
98
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
85
99
|
id: z.ZodString;
|
|
86
100
|
name: z.ZodString;
|
|
@@ -91,6 +105,13 @@ export declare const WorkspaceResponseSchema: z.ZodObject<{
|
|
|
91
105
|
is_default: z.ZodBoolean;
|
|
92
106
|
created_at: z.ZodString;
|
|
93
107
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
/**
|
|
109
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
110
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
111
|
+
*/
|
|
112
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
113
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
114
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
115
|
}, z.ZodTypeAny, "passthrough">>;
|
|
95
116
|
export declare const PaginationMetadataSchema: z.ZodObject<{
|
|
96
117
|
has_more: z.ZodBoolean;
|
|
@@ -116,6 +137,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
116
137
|
is_default: z.ZodBoolean;
|
|
117
138
|
created_at: z.ZodString;
|
|
118
139
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
140
|
+
/**
|
|
141
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
142
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
143
|
+
*/
|
|
144
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
145
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
146
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
147
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
120
148
|
id: z.ZodString;
|
|
121
149
|
name: z.ZodString;
|
|
@@ -126,6 +154,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
126
154
|
is_default: z.ZodBoolean;
|
|
127
155
|
created_at: z.ZodString;
|
|
128
156
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
+
/**
|
|
158
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
159
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
160
|
+
*/
|
|
161
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
162
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
163
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
164
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
130
165
|
id: z.ZodString;
|
|
131
166
|
name: z.ZodString;
|
|
@@ -136,6 +171,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
136
171
|
is_default: z.ZodBoolean;
|
|
137
172
|
created_at: z.ZodString;
|
|
138
173
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
/**
|
|
175
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
176
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
177
|
+
*/
|
|
178
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
179
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
180
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
139
181
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
140
182
|
pagination: z.ZodObject<{
|
|
141
183
|
has_more: z.ZodBoolean;
|
|
@@ -161,6 +203,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
161
203
|
is_default: z.ZodBoolean;
|
|
162
204
|
created_at: z.ZodString;
|
|
163
205
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
206
|
+
/**
|
|
207
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
208
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
209
|
+
*/
|
|
210
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
211
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
212
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
164
213
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
165
214
|
id: z.ZodString;
|
|
166
215
|
name: z.ZodString;
|
|
@@ -171,6 +220,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
171
220
|
is_default: z.ZodBoolean;
|
|
172
221
|
created_at: z.ZodString;
|
|
173
222
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
/**
|
|
224
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
225
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
226
|
+
*/
|
|
227
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
228
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
229
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
174
230
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
175
231
|
id: z.ZodString;
|
|
176
232
|
name: z.ZodString;
|
|
@@ -181,6 +237,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
181
237
|
is_default: z.ZodBoolean;
|
|
182
238
|
created_at: z.ZodString;
|
|
183
239
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
240
|
+
/**
|
|
241
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
242
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
243
|
+
*/
|
|
244
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
245
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
246
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
184
247
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
185
248
|
pagination: z.ZodObject<{
|
|
186
249
|
has_more: z.ZodBoolean;
|
|
@@ -206,6 +269,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
206
269
|
is_default: z.ZodBoolean;
|
|
207
270
|
created_at: z.ZodString;
|
|
208
271
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
272
|
+
/**
|
|
273
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
274
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
275
|
+
*/
|
|
276
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
277
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
278
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
209
279
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
210
280
|
id: z.ZodString;
|
|
211
281
|
name: z.ZodString;
|
|
@@ -216,6 +286,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
216
286
|
is_default: z.ZodBoolean;
|
|
217
287
|
created_at: z.ZodString;
|
|
218
288
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
289
|
+
/**
|
|
290
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
291
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
292
|
+
*/
|
|
293
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
294
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
295
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
219
296
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
220
297
|
id: z.ZodString;
|
|
221
298
|
name: z.ZodString;
|
|
@@ -226,6 +303,13 @@ export declare const ListWorkspacesSchema: z.ZodObject<{
|
|
|
226
303
|
is_default: z.ZodBoolean;
|
|
227
304
|
created_at: z.ZodString;
|
|
228
305
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
306
|
+
/**
|
|
307
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
308
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
309
|
+
*/
|
|
310
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
311
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
312
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
229
313
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
230
314
|
pagination: z.ZodObject<{
|
|
231
315
|
has_more: z.ZodBoolean;
|
|
@@ -260,6 +344,13 @@ declare const listWorkspaces: {
|
|
|
260
344
|
is_default: z.ZodBoolean;
|
|
261
345
|
created_at: z.ZodString;
|
|
262
346
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
347
|
+
/**
|
|
348
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
349
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
350
|
+
*/
|
|
351
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
352
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
353
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
263
354
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
264
355
|
id: z.ZodString;
|
|
265
356
|
name: z.ZodString;
|
|
@@ -270,6 +361,13 @@ declare const listWorkspaces: {
|
|
|
270
361
|
is_default: z.ZodBoolean;
|
|
271
362
|
created_at: z.ZodString;
|
|
272
363
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
364
|
+
/**
|
|
365
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
366
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
367
|
+
*/
|
|
368
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
369
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
370
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
273
371
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
274
372
|
id: z.ZodString;
|
|
275
373
|
name: z.ZodString;
|
|
@@ -280,6 +378,13 @@ declare const listWorkspaces: {
|
|
|
280
378
|
is_default: z.ZodBoolean;
|
|
281
379
|
created_at: z.ZodString;
|
|
282
380
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
381
|
+
/**
|
|
382
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
383
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
384
|
+
*/
|
|
385
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
386
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
387
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
283
388
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
284
389
|
pagination: z.ZodObject<{
|
|
285
390
|
has_more: z.ZodBoolean;
|
|
@@ -313,6 +418,13 @@ declare const listWorkspaces: {
|
|
|
313
418
|
is_default: z.ZodBoolean;
|
|
314
419
|
created_at: z.ZodString;
|
|
315
420
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
421
|
+
/**
|
|
422
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
423
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
424
|
+
*/
|
|
425
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
426
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
427
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
316
428
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
317
429
|
id: z.ZodString;
|
|
318
430
|
name: z.ZodString;
|
|
@@ -323,6 +435,13 @@ declare const listWorkspaces: {
|
|
|
323
435
|
is_default: z.ZodBoolean;
|
|
324
436
|
created_at: z.ZodString;
|
|
325
437
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
438
|
+
/**
|
|
439
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
440
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
441
|
+
*/
|
|
442
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
443
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
444
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
326
445
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
327
446
|
id: z.ZodString;
|
|
328
447
|
name: z.ZodString;
|
|
@@ -333,6 +452,13 @@ declare const listWorkspaces: {
|
|
|
333
452
|
is_default: z.ZodBoolean;
|
|
334
453
|
created_at: z.ZodString;
|
|
335
454
|
confidential_models_enabled: z.ZodOptional<z.ZodBoolean>;
|
|
455
|
+
/**
|
|
456
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
457
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
458
|
+
*/
|
|
459
|
+
billing_status: z.ZodDefault<z.ZodEnum<["active", "suspended", "abandoned"]>>;
|
|
460
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
461
|
+
suspended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
336
462
|
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
337
463
|
pagination: z.ZodObject<{
|
|
338
464
|
has_more: z.ZodBoolean;
|
package/dist/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type SafeResult, type ClientConfig, type ResolvedClientConfig, type Ful
|
|
|
4
4
|
import type { Prettify } from "./types/common";
|
|
5
5
|
import { PhalaCloudError } from "./utils/errors";
|
|
6
6
|
export type { SafeResult, FullResponse, RequestOptions, ApiVersion, DefaultApiVersion, } from "./types/client";
|
|
7
|
-
export declare const SUPPORTED_API_VERSIONS: readonly ["2025-10-28", "2026-01-21", "2026-05-22"];
|
|
7
|
+
export declare const SUPPORTED_API_VERSIONS: readonly ["2025-10-28", "2026-01-21", "2026-05-22", "2026-06-23"];
|
|
8
8
|
export declare const DEFAULT_API_VERSION: DefaultApiVersion;
|
|
9
9
|
/**
|
|
10
10
|
* Client event types
|
|
@@ -207,6 +207,9 @@ export declare class Client<V extends ApiVersion = DefaultApiVersion> {
|
|
|
207
207
|
* // DEBUG=phala::api-client node your-script.js
|
|
208
208
|
* ```
|
|
209
209
|
*/
|
|
210
|
+
export declare function createClient(config: ClientConfig<"2026-06-23"> & {
|
|
211
|
+
version: "2026-06-23";
|
|
212
|
+
}): Client<"2026-06-23">;
|
|
210
213
|
export declare function createClient(config: ClientConfig<"2026-05-22"> & {
|
|
211
214
|
version: "2026-05-22";
|
|
212
215
|
}): Client<"2026-05-22">;
|
package/dist/create-client.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ import { type GetPreLaunchScriptUpgradeStatusRequest, type PreLaunchScriptUpgrad
|
|
|
21
21
|
import { type UpgradePreLaunchScriptRequest, type UpgradePreLaunchScriptResult } from "./actions/cvms/upgrade_prelaunch_script";
|
|
22
22
|
import { type GetKmsInfoRequest } from "./actions/kms/get_kms_info";
|
|
23
23
|
import { type GetKmsListRequest, type GetKmsListResponse } from "./actions/kms/get_kms_list";
|
|
24
|
+
import { type ListKmsContractsRequest, type ListKmsContractsResponse } from "./actions/kms/list_kms_contracts";
|
|
25
|
+
import { type GetKmsContractRequest, type GetKmsContract } from "./actions/kms/get_kms_contract";
|
|
26
|
+
import { type ListKmsContractNodesRequest, type ListKmsContractNodesResponse } from "./actions/kms/list_kms_contract_nodes";
|
|
24
27
|
import { type GetAppEnvEncryptPubKeyRequest, type GetAppEnvEncryptPubKey as GetAppEnvEncryptPubKeyResult } from "./actions/kms/get_app_env_encrypt_pubkey";
|
|
25
28
|
import { type NextAppIdsRequest, type NextAppIds } from "./actions/kms/next_app_ids";
|
|
26
29
|
import { type StartCvmRequest } from "./actions/cvms/start_cvm";
|
|
@@ -82,6 +85,9 @@ import type { SafeResult } from "./types/client";
|
|
|
82
85
|
* @param config - Client configuration
|
|
83
86
|
* @returns Client extended with all available actions
|
|
84
87
|
*/
|
|
88
|
+
export declare function createClient(config: ClientConfig<"2026-06-23"> & {
|
|
89
|
+
version: "2026-06-23";
|
|
90
|
+
}): Client<"2026-06-23">;
|
|
85
91
|
export declare function createClient(config: ClientConfig<"2026-05-22"> & {
|
|
86
92
|
version: "2026-05-22";
|
|
87
93
|
}): Client<"2026-05-22">;
|
|
@@ -204,6 +210,48 @@ export interface Client<V extends ApiVersion = DefaultApiVersion> extends BaseCl
|
|
|
204
210
|
safeGetKmsList(request: GetKmsListRequest | undefined, parameters: {
|
|
205
211
|
schema: false;
|
|
206
212
|
}): Promise<SafeResult<unknown>>;
|
|
213
|
+
listKmsContracts(request?: ListKmsContractsRequest): Promise<ListKmsContractsResponse>;
|
|
214
|
+
listKmsContracts<T extends z.ZodTypeAny>(request: ListKmsContractsRequest | undefined, parameters: {
|
|
215
|
+
schema: T;
|
|
216
|
+
}): Promise<z.infer<T>>;
|
|
217
|
+
listKmsContracts(request: ListKmsContractsRequest | undefined, parameters: {
|
|
218
|
+
schema: false;
|
|
219
|
+
}): Promise<unknown>;
|
|
220
|
+
safeListKmsContracts(request?: ListKmsContractsRequest): Promise<SafeResult<ListKmsContractsResponse>>;
|
|
221
|
+
safeListKmsContracts<T extends z.ZodTypeAny>(request: ListKmsContractsRequest | undefined, parameters: {
|
|
222
|
+
schema: T;
|
|
223
|
+
}): Promise<SafeResult<z.infer<T>>>;
|
|
224
|
+
safeListKmsContracts(request: ListKmsContractsRequest | undefined, parameters: {
|
|
225
|
+
schema: false;
|
|
226
|
+
}): Promise<SafeResult<unknown>>;
|
|
227
|
+
getKmsContract(request: GetKmsContractRequest): Promise<GetKmsContract>;
|
|
228
|
+
getKmsContract<T extends z.ZodTypeAny>(request: GetKmsContractRequest, parameters: {
|
|
229
|
+
schema: T;
|
|
230
|
+
}): Promise<z.infer<T>>;
|
|
231
|
+
getKmsContract(request: GetKmsContractRequest, parameters: {
|
|
232
|
+
schema: false;
|
|
233
|
+
}): Promise<unknown>;
|
|
234
|
+
safeGetKmsContract(request: GetKmsContractRequest): Promise<SafeResult<GetKmsContract>>;
|
|
235
|
+
safeGetKmsContract<T extends z.ZodTypeAny>(request: GetKmsContractRequest, parameters: {
|
|
236
|
+
schema: T;
|
|
237
|
+
}): Promise<SafeResult<z.infer<T>>>;
|
|
238
|
+
safeGetKmsContract(request: GetKmsContractRequest, parameters: {
|
|
239
|
+
schema: false;
|
|
240
|
+
}): Promise<SafeResult<unknown>>;
|
|
241
|
+
listKmsContractNodes(request: ListKmsContractNodesRequest): Promise<ListKmsContractNodesResponse>;
|
|
242
|
+
listKmsContractNodes<T extends z.ZodTypeAny>(request: ListKmsContractNodesRequest, parameters: {
|
|
243
|
+
schema: T;
|
|
244
|
+
}): Promise<z.infer<T>>;
|
|
245
|
+
listKmsContractNodes(request: ListKmsContractNodesRequest, parameters: {
|
|
246
|
+
schema: false;
|
|
247
|
+
}): Promise<unknown>;
|
|
248
|
+
safeListKmsContractNodes(request: ListKmsContractNodesRequest): Promise<SafeResult<ListKmsContractNodesResponse>>;
|
|
249
|
+
safeListKmsContractNodes<T extends z.ZodTypeAny>(request: ListKmsContractNodesRequest, parameters: {
|
|
250
|
+
schema: T;
|
|
251
|
+
}): Promise<SafeResult<z.infer<T>>>;
|
|
252
|
+
safeListKmsContractNodes(request: ListKmsContractNodesRequest, parameters: {
|
|
253
|
+
schema: false;
|
|
254
|
+
}): Promise<SafeResult<unknown>>;
|
|
207
255
|
getWorkspace(teamSlug: string): Promise<WorkspaceResponse>;
|
|
208
256
|
getWorkspace<T extends z.ZodTypeAny>(teamSlug: string, parameters: {
|
|
209
257
|
schema: T;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ export { defineAction, defineSimpleAction } from "./utils/define-action";
|
|
|
8
8
|
export { parseEnv, parseEnvVars } from "./parse_dotenv";
|
|
9
9
|
export { encryptEnvVars, type EnvVar, } from "@phala/dstack-sdk/encrypt-env-vars";
|
|
10
10
|
export { getComposeHash } from "@phala/dstack-sdk/get-compose-hash";
|
|
11
|
-
export { verifyEnvEncryptPublicKey } from "@phala/dstack-sdk/verify-env-encrypt-public-key";
|
|
11
|
+
export { verifyEnvEncryptPublicKey, verifyEnvEncryptPublicKeyLegacy, } from "@phala/dstack-sdk/verify-env-encrypt-public-key";
|