@phala/cloud 0.2.1-beta.1 → 0.2.1-beta.2
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.
|
@@ -5,23 +5,35 @@ import { type CvmIdInput } from "../../types/cvm_id";
|
|
|
5
5
|
* CVM state response schema
|
|
6
6
|
*/
|
|
7
7
|
export declare const CvmStateSchema: z.ZodObject<{
|
|
8
|
-
|
|
9
|
-
derived_status: z.ZodOptional<z.ZodString>;
|
|
10
|
-
vm_uuid: z.ZodOptional<z.ZodString>;
|
|
8
|
+
id: z.ZodOptional<z.ZodString>;
|
|
11
9
|
instance_id: z.ZodOptional<z.ZodString>;
|
|
10
|
+
name: z.ZodString;
|
|
11
|
+
status: z.ZodString;
|
|
12
12
|
uptime: z.ZodOptional<z.ZodString>;
|
|
13
|
+
exited_at: z.ZodOptional<z.ZodString>;
|
|
14
|
+
boot_progress: z.ZodOptional<z.ZodString>;
|
|
15
|
+
boot_error: z.ZodOptional<z.ZodString>;
|
|
16
|
+
shutdown_progress: z.ZodOptional<z.ZodString>;
|
|
13
17
|
}, "strip", z.ZodTypeAny, {
|
|
14
18
|
status: string;
|
|
19
|
+
name: string;
|
|
20
|
+
id?: string | undefined;
|
|
15
21
|
uptime?: string | undefined;
|
|
16
22
|
instance_id?: string | undefined;
|
|
17
|
-
|
|
18
|
-
|
|
23
|
+
exited_at?: string | undefined;
|
|
24
|
+
boot_progress?: string | undefined;
|
|
25
|
+
boot_error?: string | undefined;
|
|
26
|
+
shutdown_progress?: string | undefined;
|
|
19
27
|
}, {
|
|
20
28
|
status: string;
|
|
29
|
+
name: string;
|
|
30
|
+
id?: string | undefined;
|
|
21
31
|
uptime?: string | undefined;
|
|
22
32
|
instance_id?: string | undefined;
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
exited_at?: string | undefined;
|
|
34
|
+
boot_progress?: string | undefined;
|
|
35
|
+
boot_error?: string | undefined;
|
|
36
|
+
shutdown_progress?: string | undefined;
|
|
25
37
|
}>;
|
|
26
38
|
export type CvmState = z.infer<typeof CvmStateSchema>;
|
|
27
39
|
export declare const GetCvmStateRequestSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
@@ -64,10 +76,14 @@ export type GetCvmStateRequest = CvmIdInput;
|
|
|
64
76
|
declare const getCvmState: {
|
|
65
77
|
(client: Client, params: CvmIdInput): Promise<{
|
|
66
78
|
status: string;
|
|
79
|
+
name: string;
|
|
80
|
+
id?: string | undefined;
|
|
67
81
|
uptime?: string | undefined;
|
|
68
82
|
instance_id?: string | undefined;
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
exited_at?: string | undefined;
|
|
84
|
+
boot_progress?: string | undefined;
|
|
85
|
+
boot_error?: string | undefined;
|
|
86
|
+
shutdown_progress?: string | undefined;
|
|
71
87
|
}>;
|
|
72
88
|
<T extends z.ZodTypeAny>(client: Client, params: CvmIdInput, parameters: {
|
|
73
89
|
schema: T;
|
|
@@ -78,10 +94,14 @@ declare const getCvmState: {
|
|
|
78
94
|
}, safeGetCvmState: {
|
|
79
95
|
(client: Client, params: CvmIdInput): Promise<import("../..").SafeResult<{
|
|
80
96
|
status: string;
|
|
97
|
+
name: string;
|
|
98
|
+
id?: string | undefined;
|
|
81
99
|
uptime?: string | undefined;
|
|
82
100
|
instance_id?: string | undefined;
|
|
83
|
-
|
|
84
|
-
|
|
101
|
+
exited_at?: string | undefined;
|
|
102
|
+
boot_progress?: string | undefined;
|
|
103
|
+
boot_error?: string | undefined;
|
|
104
|
+
shutdown_progress?: string | undefined;
|
|
85
105
|
}>>;
|
|
86
106
|
<T extends z.ZodTypeAny>(client: Client, params: CvmIdInput, parameters: {
|
|
87
107
|
schema: T;
|
|
@@ -317,7 +317,7 @@ export declare const ProvisionCvmRequestSchema: z.ZodObject<{
|
|
|
317
317
|
kms_contract: z.ZodOptional<z.ZodString>;
|
|
318
318
|
env_keys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
319
319
|
}, z.ZodTypeAny, "passthrough">>;
|
|
320
|
-
export type ProvisionCvmRequest = z.
|
|
320
|
+
export type ProvisionCvmRequest = z.input<typeof ProvisionCvmRequestSchema> & {
|
|
321
321
|
node_id?: number;
|
|
322
322
|
teepod_id?: number;
|
|
323
323
|
compose_file?: {
|
package/dist/index.js
CHANGED
|
@@ -2004,12 +2004,15 @@ var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(impo
|
|
|
2004
2004
|
// src/actions/cvms/get_cvm_state.ts
|
|
2005
2005
|
var import_zod30 = require("zod");
|
|
2006
2006
|
var CvmStateSchema = import_zod30.z.object({
|
|
2007
|
-
|
|
2008
|
-
derived_status: import_zod30.z.string().optional(),
|
|
2009
|
-
vm_uuid: import_zod30.z.string().optional(),
|
|
2007
|
+
id: import_zod30.z.string().optional(),
|
|
2010
2008
|
instance_id: import_zod30.z.string().optional(),
|
|
2011
|
-
|
|
2012
|
-
|
|
2009
|
+
name: import_zod30.z.string(),
|
|
2010
|
+
status: import_zod30.z.string(),
|
|
2011
|
+
uptime: import_zod30.z.string().optional(),
|
|
2012
|
+
exited_at: import_zod30.z.string().optional(),
|
|
2013
|
+
boot_progress: import_zod30.z.string().optional(),
|
|
2014
|
+
boot_error: import_zod30.z.string().optional(),
|
|
2015
|
+
shutdown_progress: import_zod30.z.string().optional()
|
|
2013
2016
|
});
|
|
2014
2017
|
var GetCvmStateRequestSchema = CvmIdSchema;
|
|
2015
2018
|
var { action: getCvmState, safeAction: safeGetCvmState } = defineAction(CvmStateSchema, async (client, request) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1780,12 +1780,15 @@ var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(z29.
|
|
|
1780
1780
|
// src/actions/cvms/get_cvm_state.ts
|
|
1781
1781
|
import { z as z30 } from "zod";
|
|
1782
1782
|
var CvmStateSchema = z30.object({
|
|
1783
|
-
|
|
1784
|
-
derived_status: z30.string().optional(),
|
|
1785
|
-
vm_uuid: z30.string().optional(),
|
|
1783
|
+
id: z30.string().optional(),
|
|
1786
1784
|
instance_id: z30.string().optional(),
|
|
1787
|
-
|
|
1788
|
-
|
|
1785
|
+
name: z30.string(),
|
|
1786
|
+
status: z30.string(),
|
|
1787
|
+
uptime: z30.string().optional(),
|
|
1788
|
+
exited_at: z30.string().optional(),
|
|
1789
|
+
boot_progress: z30.string().optional(),
|
|
1790
|
+
boot_error: z30.string().optional(),
|
|
1791
|
+
shutdown_progress: z30.string().optional()
|
|
1789
1792
|
});
|
|
1790
1793
|
var GetCvmStateRequestSchema = CvmIdSchema;
|
|
1791
1794
|
var { action: getCvmState, safeAction: safeGetCvmState } = defineAction(CvmStateSchema, async (client, request) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phala/cloud",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.2",
|
|
4
4
|
"description": "TypeScript SDK for Phala Cloud API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"author": "Leechael Yim",
|
|
39
39
|
"license": "Apache-2.0",
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@phala/dstack-sdk": "0.5.
|
|
41
|
+
"@phala/dstack-sdk": "0.5.7",
|
|
42
42
|
"debug": "^4.4.1",
|
|
43
43
|
"mitt": "^3.0.1",
|
|
44
44
|
"ofetch": "^1.3.3",
|