phala 1.1.18 → 1.1.20-beta.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.
@@ -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;
@@ -91,7 +91,7 @@ declare const composeFileSchema: z.ZodObject<{
91
91
  version: z.ZodOptional<z.ZodString>;
92
92
  }, z.ZodTypeAny, "passthrough">>;
93
93
  declare const postCvmResponseSchema: z.ZodObject<{
94
- id: z.ZodNumber;
94
+ id: z.ZodString;
95
95
  name: z.ZodString;
96
96
  status: z.ZodString;
97
97
  teepod_id: z.ZodNullable<z.ZodNumber>;
@@ -105,7 +105,7 @@ declare const postCvmResponseSchema: z.ZodObject<{
105
105
  name?: string;
106
106
  id?: number;
107
107
  }>>;
108
- user_id: z.ZodNullable<z.ZodNumber>;
108
+ user_id: z.ZodNullable<z.ZodString>;
109
109
  app_id: z.ZodString;
110
110
  vm_uuid: z.ZodNullable<z.ZodString>;
111
111
  instance_id: z.ZodNullable<z.ZodString>;
@@ -126,7 +126,7 @@ declare const postCvmResponseSchema: z.ZodObject<{
126
126
  vcpu?: number;
127
127
  memory?: number;
128
128
  status?: string;
129
- id?: number;
129
+ id?: string;
130
130
  app_id?: string;
131
131
  instance_id?: string;
132
132
  version?: string;
@@ -139,7 +139,7 @@ declare const postCvmResponseSchema: z.ZodObject<{
139
139
  name?: string;
140
140
  id?: number;
141
141
  };
142
- user_id?: number;
142
+ user_id?: string;
143
143
  vm_uuid?: string;
144
144
  app_url?: string;
145
145
  base_image?: string;
@@ -151,7 +151,7 @@ declare const postCvmResponseSchema: z.ZodObject<{
151
151
  vcpu?: number;
152
152
  memory?: number;
153
153
  status?: string;
154
- id?: number;
154
+ id?: string;
155
155
  app_id?: string;
156
156
  instance_id?: string;
157
157
  version?: string;
@@ -164,7 +164,7 @@ declare const postCvmResponseSchema: z.ZodObject<{
164
164
  name?: string;
165
165
  id?: number;
166
166
  };
167
- user_id?: number;
167
+ user_id?: string;
168
168
  vm_uuid?: string;
169
169
  app_url?: string;
170
170
  base_image?: string;
@@ -275,7 +275,7 @@ interface TCBInfo {
275
275
  event_log: TCBEventLogEntry[];
276
276
  }
277
277
  declare const replicateCvmResponseSchema: z.ZodObject<{
278
- id: z.ZodNumber;
278
+ id: z.ZodString;
279
279
  name: z.ZodString;
280
280
  status: z.ZodString;
281
281
  teepod_id: z.ZodNumber;
@@ -289,7 +289,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
289
289
  name?: string;
290
290
  id?: number;
291
291
  }>;
292
- user_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
292
+ user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
293
  app_id: z.ZodString;
294
294
  vm_uuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
295
  instance_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -310,7 +310,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
310
310
  vcpu?: number;
311
311
  memory?: number;
312
312
  status?: string;
313
- id?: number;
313
+ id?: string;
314
314
  app_id?: string;
315
315
  instance_id?: string;
316
316
  version?: string;
@@ -323,7 +323,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
323
323
  name?: string;
324
324
  id?: number;
325
325
  };
326
- user_id?: number;
326
+ user_id?: string;
327
327
  vm_uuid?: string;
328
328
  app_url?: string;
329
329
  base_image?: string;
@@ -335,7 +335,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
335
335
  vcpu?: number;
336
336
  memory?: number;
337
337
  status?: string;
338
- id?: number;
338
+ id?: string;
339
339
  app_id?: string;
340
340
  instance_id?: string;
341
341
  version?: string;
@@ -348,7 +348,7 @@ declare const replicateCvmResponseSchema: z.ZodObject<{
348
348
  name?: string;
349
349
  id?: number;
350
350
  };
351
- user_id?: number;
351
+ user_id?: string;
352
352
  vm_uuid?: string;
353
353
  app_url?: string;
354
354
  base_image?: string;
@@ -766,9 +766,55 @@ interface KmsListItem {
766
766
  slug?: string | null;
767
767
  url: string;
768
768
  version: string;
769
+ kms_type?: string;
770
+ kms_contract_id?: string | null;
769
771
  chain_id?: number | null;
770
772
  kms_contract_address?: string | null;
771
773
  gateway_app_id?: string | null;
774
+ supported_os_images?: string[];
775
+ }
776
+ interface CvmCreateNodeKmsRelation {
777
+ teepod_id: number;
778
+ kms_id: string;
779
+ kms_type: string;
780
+ kms_contract_id?: string | null;
781
+ kms_contract_address?: string | null;
782
+ supported_os_images?: string[];
783
+ }
784
+ interface CvmCreateGatewayResource {
785
+ id: string;
786
+ teepod_id?: number | null;
787
+ kms_contract_id: string;
788
+ rpc_url?: string | null;
789
+ domain_suffix?: string | null;
790
+ enabled: boolean;
791
+ }
792
+ interface CvmCreateInstanceTypeResource {
793
+ id: string;
794
+ name: string;
795
+ vcpu: number;
796
+ memory_mb: number;
797
+ default_disk_size_gb: number;
798
+ requires_gpu: boolean;
799
+ requires_gpu_count: number;
800
+ family?: string | null;
801
+ display_order?: number | null;
802
+ }
803
+ interface GpuAvailability {
804
+ has_reserved_gpus: boolean;
805
+ reserved_gpu_count: number;
806
+ has_public_gpus: boolean;
807
+ public_gpu_count: number;
808
+ }
809
+ interface CvmCreateResourcesResponse {
810
+ tier: string;
811
+ capacity: Record<string, unknown>;
812
+ nodes: TEEPod[];
813
+ kms_nodes: KmsListItem[];
814
+ node_kms_relations: CvmCreateNodeKmsRelation[];
815
+ gateway_nodes: CvmCreateGatewayResource[];
816
+ instance_types: CvmCreateInstanceTypeResource[];
817
+ gpu_availability: GpuAvailability;
772
818
  }
773
819
  interface PubkeyResponse {
774
820
  app_env_encrypt_pubkey: string;
@@ -796,7 +842,7 @@ interface AvailableNodesResponse {
796
842
  * @param appId App ID (with or without app_ prefix)
797
843
  * @returns CVM details
798
844
  */
799
- declare function getCvmByAppId(appId: string): Promise<CvmInfoDetailV20260121>;
845
+ declare function getCvmByAppId(appId: string): Promise<CvmInfoDetailV20260522>;
800
846
  /**
801
847
  * Get CVM network information
802
848
  * @param appId App ID (with or without app_ prefix)
@@ -877,6 +923,11 @@ declare function upgradeCvm(appId: string, vmConfig: VMConfig): Promise<UpgradeR
877
923
  * @returns List of TEEPods with embedded images
878
924
  */
879
925
  declare function getTeepods(v03x_only?: boolean): Promise<TeepodResponse>;
926
+ /**
927
+ * Get the CVM create resource graph.
928
+ * @returns Nodes, KMS resources, gateway resources, and instance types for CVM creation
929
+ */
930
+ declare function getCvmCreateResources(): Promise<CvmCreateResourcesResponse>;
880
931
  interface SerialLogsOptions {
881
932
  tail?: number;
882
933
  timestamps?: boolean;
@@ -939,4 +990,4 @@ declare function streamCvmChannelLogs(appId: string, channel: CvmLogChannel, onD
939
990
  /** Get CVM status string (e.g. "running", "stopped") */
940
991
  declare function getCvmStatus(appId: string): Promise<string>;
941
992
 
942
- export { type AvailableNodesResponse, type CertificateInfo, type CertificateNameInfo, type ComposeFile, type ContainerLogsOptions, type CvmAttestationResponse, type CvmListResponse, type CvmLogChannel, type DockerConfig, type EncryptedEnvItem, type GetCvmNetworkResponse, 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, getCvmLogEndpoint, getCvmNetwork, getCvmNetworkResponseSchema, getCvmStatus, getPubkeyFromCvm, getTeepods, imageSchema, postCvmResponseSchema, replicateCvm, replicateCvmResponseSchema, resizeCvm, selectCvm, streamContainerLogs, streamContainerLogsEntries, streamCvmChannelLogs, streamSerialLogs, teepodSchema, upgradeCvm };
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 };