phala 1.1.19 → 1.1.20

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.
@@ -1,4 +1,4 @@
1
- import { CvmInfoDetailV20260121 } from '@phala/cloud';
1
+ import { CvmInfoDetailV20260522 } from '@phala/cloud';
2
2
  import { z } from 'zod';
3
3
 
4
4
  declare const dockerConfigSchema: z.ZodObject<{
@@ -6,13 +6,13 @@ declare const dockerConfigSchema: z.ZodObject<{
6
6
  registry: z.ZodNullable<z.ZodString>;
7
7
  username: z.ZodString;
8
8
  }, "strip", z.ZodTypeAny, {
9
- username?: string;
10
- password?: string;
11
9
  registry?: string;
12
- }, {
13
- username?: string;
14
10
  password?: string;
11
+ username?: string;
12
+ }, {
15
13
  registry?: string;
14
+ password?: string;
15
+ username?: string;
16
16
  }>;
17
17
  declare const composeFileSchema: z.ZodObject<{
18
18
  docker_compose_file: z.ZodString;
@@ -21,13 +21,13 @@ declare const composeFileSchema: z.ZodObject<{
21
21
  registry: z.ZodNullable<z.ZodString>;
22
22
  username: z.ZodString;
23
23
  }, "strip", z.ZodTypeAny, {
24
- username?: string;
25
- password?: string;
26
24
  registry?: string;
27
- }, {
28
- username?: string;
29
25
  password?: string;
26
+ username?: string;
27
+ }, {
30
28
  registry?: string;
29
+ password?: string;
30
+ username?: string;
31
31
  }>>>;
32
32
  features: z.ZodArray<z.ZodString, "many">;
33
33
  kms_enabled: z.ZodBoolean;
@@ -46,13 +46,13 @@ declare const composeFileSchema: z.ZodObject<{
46
46
  registry: z.ZodNullable<z.ZodString>;
47
47
  username: z.ZodString;
48
48
  }, "strip", z.ZodTypeAny, {
49
- username?: string;
50
- password?: string;
51
49
  registry?: string;
52
- }, {
53
- username?: string;
54
50
  password?: string;
51
+ username?: string;
52
+ }, {
55
53
  registry?: string;
54
+ password?: string;
55
+ username?: string;
56
56
  }>>>;
57
57
  features: z.ZodArray<z.ZodString, "many">;
58
58
  kms_enabled: z.ZodBoolean;
@@ -71,13 +71,13 @@ declare const composeFileSchema: z.ZodObject<{
71
71
  registry: z.ZodNullable<z.ZodString>;
72
72
  username: z.ZodString;
73
73
  }, "strip", z.ZodTypeAny, {
74
- username?: string;
75
- password?: string;
76
74
  registry?: string;
77
- }, {
78
- username?: string;
79
75
  password?: string;
76
+ username?: string;
77
+ }, {
80
78
  registry?: string;
79
+ password?: string;
80
+ username?: string;
81
81
  }>>>;
82
82
  features: z.ZodArray<z.ZodString, "many">;
83
83
  kms_enabled: z.ZodBoolean;
@@ -90,88 +90,6 @@ declare const composeFileSchema: z.ZodObject<{
90
90
  tproxy_enabled: z.ZodBoolean;
91
91
  version: z.ZodOptional<z.ZodString>;
92
92
  }, z.ZodTypeAny, "passthrough">>;
93
- declare const postCvmResponseSchema: z.ZodObject<{
94
- id: z.ZodNumber;
95
- name: z.ZodString;
96
- status: z.ZodString;
97
- teepod_id: z.ZodNullable<z.ZodNumber>;
98
- teepod: z.ZodNullable<z.ZodObject<{
99
- id: z.ZodNumber;
100
- name: z.ZodString;
101
- }, "strip", z.ZodTypeAny, {
102
- name?: string;
103
- id?: number;
104
- }, {
105
- name?: string;
106
- id?: number;
107
- }>>;
108
- user_id: z.ZodNullable<z.ZodNumber>;
109
- app_id: z.ZodString;
110
- vm_uuid: z.ZodNullable<z.ZodString>;
111
- instance_id: z.ZodNullable<z.ZodString>;
112
- app_url: z.ZodNullable<z.ZodString>;
113
- base_image: z.ZodNullable<z.ZodString>;
114
- vcpu: z.ZodNumber;
115
- memory: z.ZodNumber;
116
- disk_size: z.ZodNumber;
117
- manifest_version: z.ZodNullable<z.ZodNumber>;
118
- version: z.ZodNullable<z.ZodString>;
119
- runner: z.ZodNullable<z.ZodString>;
120
- docker_compose_file: z.ZodNullable<z.ZodString>;
121
- features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
122
- created_at: z.ZodString;
123
- encrypted_env_pubkey: z.ZodNullable<z.ZodString>;
124
- }, "strip", z.ZodTypeAny, {
125
- name?: string;
126
- vcpu?: number;
127
- memory?: number;
128
- status?: string;
129
- id?: number;
130
- app_id?: string;
131
- instance_id?: string;
132
- version?: string;
133
- runner?: string;
134
- docker_compose_file?: string;
135
- features?: string[];
136
- manifest_version?: number;
137
- teepod_id?: number;
138
- teepod?: {
139
- name?: string;
140
- id?: number;
141
- };
142
- user_id?: number;
143
- vm_uuid?: string;
144
- app_url?: string;
145
- base_image?: string;
146
- disk_size?: number;
147
- created_at?: string;
148
- encrypted_env_pubkey?: string;
149
- }, {
150
- name?: string;
151
- vcpu?: number;
152
- memory?: number;
153
- status?: string;
154
- id?: number;
155
- app_id?: string;
156
- instance_id?: string;
157
- version?: string;
158
- runner?: string;
159
- docker_compose_file?: string;
160
- features?: string[];
161
- manifest_version?: number;
162
- teepod_id?: number;
163
- teepod?: {
164
- name?: string;
165
- id?: number;
166
- };
167
- user_id?: number;
168
- vm_uuid?: string;
169
- app_url?: string;
170
- base_image?: string;
171
- disk_size?: number;
172
- created_at?: string;
173
- encrypted_env_pubkey?: string;
174
- }>;
175
93
  declare const encryptedEnvItemSchema: z.ZodObject<{
176
94
  key: z.ZodString;
177
95
  value: z.ZodString;
@@ -221,7 +139,6 @@ declare const getCvmNetworkResponseSchema: z.ZodObject<{
221
139
  }>;
222
140
  type DockerConfig = z.infer<typeof dockerConfigSchema>;
223
141
  type ComposeFile = z.infer<typeof composeFileSchema>;
224
- type PostCvmResponse = z.infer<typeof postCvmResponseSchema>;
225
142
  type EncryptedEnvItem = z.infer<typeof encryptedEnvItemSchema>;
226
143
  type CvmAttestationResponse = z.infer<typeof cvmAttestationResponseSchema>;
227
144
  type GetCvmNetworkResponse = z.infer<typeof getCvmNetworkResponseSchema>;
@@ -275,7 +192,7 @@ interface TCBInfo {
275
192
  event_log: TCBEventLogEntry[];
276
193
  }
277
194
  declare const replicateCvmResponseSchema: z.ZodObject<{
278
- id: z.ZodNumber;
195
+ id: z.ZodString;
279
196
  name: z.ZodString;
280
197
  status: z.ZodString;
281
198
  teepod_id: z.ZodNumber;
@@ -289,7 +206,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
289
206
  name?: string;
290
207
  id?: number;
291
208
  }>;
292
- user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
209
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
210
  app_id: z.ZodString;
294
211
  vm_uuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
212
  instance_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -310,7 +227,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
310
227
  vcpu?: number;
311
228
  memory?: number;
312
229
  status?: string;
313
- id?: number;
230
+ id?: string;
314
231
  app_id?: string;
315
232
  instance_id?: string;
316
233
  version?: string;
@@ -323,7 +240,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
323
240
  name?: string;
324
241
  id?: number;
325
242
  };
326
- user_id?: number;
243
+ user_id?: string;
327
244
  vm_uuid?: string;
328
245
  app_url?: string;
329
246
  base_image?: string;
@@ -335,7 +252,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
335
252
  vcpu?: number;
336
253
  memory?: number;
337
254
  status?: string;
338
- id?: number;
255
+ id?: string;
339
256
  app_id?: string;
340
257
  instance_id?: string;
341
258
  version?: string;
@@ -348,7 +265,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
348
265
  name?: string;
349
266
  id?: number;
350
267
  };
351
- user_id?: number;
268
+ user_id?: string;
352
269
  vm_uuid?: string;
353
270
  app_url?: string;
354
271
  base_image?: string;
@@ -757,17 +674,13 @@ declare const teepodSchema: z.ZodObject<{
757
674
  }>;
758
675
  type TEEPod = z.infer<typeof teepodSchema>;
759
676
  type Image = z.infer<typeof imageSchema>;
760
- interface TeepodResponse {
761
- nodes: TEEPod[];
762
- kms_list?: KmsListItem[];
763
- }
764
677
  interface KmsListItem {
765
678
  id?: string;
766
679
  slug?: string | null;
767
680
  url: string;
768
681
  version: string;
769
682
  kms_type?: string;
770
- kms_contract_id?: string | number | null;
683
+ kms_contract_id?: string | null;
771
684
  chain_id?: number | null;
772
685
  kms_contract_address?: string | null;
773
686
  gateway_app_id?: string | null;
@@ -775,16 +688,16 @@ interface KmsListItem {
775
688
  }
776
689
  interface CvmCreateNodeKmsRelation {
777
690
  teepod_id: number;
778
- kms_id: string | number;
691
+ kms_id: string;
779
692
  kms_type: string;
780
- kms_contract_id?: string | number | null;
693
+ kms_contract_id?: string | null;
781
694
  kms_contract_address?: string | null;
782
695
  supported_os_images?: string[];
783
696
  }
784
697
  interface CvmCreateGatewayResource {
785
- id: string | number;
698
+ id: string;
786
699
  teepod_id?: number | null;
787
- kms_contract_id: string | number;
700
+ kms_contract_id: string;
788
701
  rpc_url?: string | null;
789
702
  domain_suffix?: string | null;
790
703
  enabled: boolean;
@@ -816,10 +729,6 @@ interface CvmCreateResourcesResponse {
816
729
  instance_types: CvmCreateInstanceTypeResource[];
817
730
  gpu_availability: GpuAvailability;
818
731
  }
819
- interface PubkeyResponse {
820
- app_env_encrypt_pubkey: string;
821
- app_id_salt: string;
822
- }
823
732
  interface UpgradeResponse {
824
733
  detail?: string;
825
734
  [key: string]: unknown;
@@ -842,7 +751,7 @@ interface AvailableNodesResponse {
842
751
  * @param appId App ID (with or without app_ prefix)
843
752
  * @returns CVM details
844
753
  */
845
- declare function getCvmByAppId(appId: string): Promise<CvmInfoDetailV20260121>;
754
+ declare function getCvmByAppId(appId: string): Promise<CvmInfoDetailV20260522>;
846
755
  /**
847
756
  * Get CVM network information
848
757
  * @param appId App ID (with or without app_ prefix)
@@ -894,20 +803,6 @@ declare function resizeCvm(appId: string, vcpu?: number, memory?: number, diskSi
894
803
  interface VMConfig {
895
804
  [key: string]: unknown;
896
805
  }
897
- /**
898
- * Get public key from CVM (Legacy)
899
- * @deprecated This is a legacy function for create command
900
- * @param vmConfig VM configuration
901
- * @returns Public key
902
- */
903
- declare function getPubkeyFromCvm(vmConfig: VMConfig): Promise<PubkeyResponse>;
904
- /**
905
- * Create a new CVM (Legacy)
906
- * @deprecated This is a legacy function, consider using SDK's provisionCvm
907
- * @param vmConfig VM configuration
908
- * @returns Created CVM details
909
- */
910
- declare function createCvm(vmConfig: VMConfig): Promise<PostCvmResponse>;
911
806
  /**
912
807
  * Upgrade a CVM (Legacy)
913
808
  * @deprecated This is a legacy function, consider using SDK's provisionCvmComposeFileUpdate
@@ -916,13 +811,6 @@ declare function createCvm(vmConfig: VMConfig): Promise<PostCvmResponse>;
916
811
  * @returns Upgrade response
917
812
  */
918
813
  declare function upgradeCvm(appId: string, vmConfig: VMConfig): Promise<UpgradeResponse>;
919
- /**
920
- * Get all TEEPods with their images (Legacy)
921
- * @deprecated This is a legacy function for create command, use SDK's safeGetAvailableNodes instead
922
- * @param v03x_only Only get v0.3.x compatible nodes
923
- * @returns List of TEEPods with embedded images
924
- */
925
- declare function getTeepods(v03x_only?: boolean): Promise<TeepodResponse>;
926
814
  /**
927
815
  * Get the CVM create resource graph.
928
816
  * @returns Nodes, KMS resources, gateway resources, and instance types for CVM creation
@@ -990,4 +878,4 @@ declare function streamCvmChannelLogs(appId: string, channel: CvmLogChannel, onD
990
878
  /** Get CVM status string (e.g. "running", "stopped") */
991
879
  declare function getCvmStatus(appId: string): Promise<string>;
992
880
 
993
- export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type ContainerLogsOptions, type CvmAttestationResponse, type CvmCreateGatewayResource, type CvmCreateInstanceTypeResource, type CvmCreateNodeKmsRelation, type CvmCreateResourcesResponse, type CvmListResponse, type CvmLogChannel, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, type GpuAvailability, type Image, type KmsListItem, type LogChannel, type LogEntry, type PostCvmResponse, type PubkeyResponse, type ReplicateCvmResponse, type ResizeCvmPayload, type SerialLogsOptions, type TCBEventLogEntry, type TCBInfo, type TEEPod, type TeepodResponse, type UpgradeResponse, type UserInfoResponse, type VMConfig, composeFileSchema, createCvm, cvmAttestationResponseSchema, dockerConfigSchema, encryptedEnvItemSchema, fetchContainerLogs, fetchContainerLogsEntries, fetchCvmChannelLogs, fetchSerialLogs, getCvmAttestation, getCvmByAppId, getCvmCreateResources, getCvmLogEndpoint, getCvmNetwork, getCvmNetworkResponseSchema, getCvmStatus, getPubkeyFromCvm, getTeepods, imageSchema, postCvmResponseSchema, replicateCvm, replicateCvmResponseSchema, resizeCvm, selectCvm, streamContainerLogs, streamContainerLogsEntries, streamCvmChannelLogs, streamSerialLogs, teepodSchema, upgradeCvm };
881
+ export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type ContainerLogsOptions, type CvmAttestationResponse, type CvmCreateGatewayResource, type CvmCreateInstanceTypeResource, type CvmCreateNodeKmsRelation, type CvmCreateResourcesResponse, type CvmListResponse, type CvmLogChannel, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, type GpuAvailability, type Image, type KmsListItem, type LogChannel, type LogEntry, type ReplicateCvmResponse, type ResizeCvmPayload, type SerialLogsOptions, type TCBEventLogEntry, type TCBInfo, type TEEPod, type UpgradeResponse, type UserInfoResponse, type VMConfig, composeFileSchema, cvmAttestationResponseSchema, dockerConfigSchema, encryptedEnvItemSchema, fetchContainerLogs, fetchContainerLogsEntries, fetchCvmChannelLogs, fetchSerialLogs, getCvmAttestation, getCvmByAppId, getCvmCreateResources, getCvmLogEndpoint, getCvmNetwork, getCvmNetworkResponseSchema, getCvmStatus, imageSchema, replicateCvm, replicateCvmResponseSchema, resizeCvm, selectCvm, streamContainerLogs, streamContainerLogsEntries, streamCvmChannelLogs, streamSerialLogs, teepodSchema, upgradeCvm };