@phala/cloud 0.1.1-beta.1 → 0.1.1-beta.3

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.
@@ -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.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
13
- instance_id: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
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
- 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
- };
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: GetCvmInfoRequest): Promise<GetCvmInfoResponse>;
70
- <T extends z.ZodTypeAny>(client: Client, params: GetCvmInfoRequest, parameters: {
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: GetCvmInfoRequest, parameters: {
48
+ (client: Client, params: CvmIdInput, parameters: {
74
49
  schema: false;
75
50
  }): Promise<unknown>;
76
51
  }, safeGetCvmInfo: {
77
- (client: Client, params: GetCvmInfoRequest): Promise<import("../..").SafeResult<GetCvmInfoResponse>>;
78
- <T extends z.ZodTypeAny>(client: Client, params: GetCvmInfoRequest, parameters: {
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: GetCvmInfoRequest, parameters: {
56
+ (client: Client, params: CvmIdInput, parameters: {
82
57
  schema: false;
83
58
  }): Promise<import("../..").SafeResult<unknown>>;
84
59
  };