@phala/cloud 0.6.4 → 0.6.6-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.
- package/README.md +6 -6
- package/dist/actions/api_tokens/revoke_current_api_token.d.ts +2 -2
- package/dist/actions/apps/app_launch_token.d.ts +4 -4
- package/dist/actions/apps/check_app_is_allowed.d.ts +4 -4
- package/dist/actions/apps/create_app_instance.d.ts +20 -20
- package/dist/actions/apps/get_app_attestation.d.ts +4 -4
- package/dist/actions/blockchains/abi/dstack_app.d.ts +403 -1
- package/dist/actions/blockchains/add_compose_hash.d.ts +7 -0
- package/dist/actions/blockchains/add_device.d.ts +7 -0
- package/dist/actions/blockchains/check_compose_hash_allowed.d.ts +4 -1
- package/dist/actions/blockchains/check_device_allowed.d.ts +5 -2
- package/dist/actions/blockchains/check_on_chain_prerequisites.d.ts +7 -2
- package/dist/actions/blockchains/epoch_compat.d.ts +106 -0
- package/dist/actions/blockchains/get_allowed_devices.d.ts +10 -2
- package/dist/actions/blockchains/remove_device.d.ts +7 -0
- package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +4 -4
- package/dist/actions/cvms/commit_cvm_update.d.ts +20 -20
- package/dist/actions/cvms/confirm_cvm_patch.d.ts +14 -14
- package/dist/actions/cvms/cvm_annotations.d.ts +10 -10
- package/dist/actions/cvms/delete_cvm.d.ts +2 -2
- package/dist/actions/cvms/get_available_os_images.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_attestation.d.ts +4 -4
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +10 -10
- package/dist/actions/cvms/get_cvm_containers_stats.d.ts +4 -4
- package/dist/actions/cvms/get_cvm_docker_compose.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_info.d.ts +24 -8
- package/dist/actions/cvms/get_cvm_init_scripts.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_network.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_state.d.ts +6 -6
- package/dist/actions/cvms/get_cvm_stats.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_status_batch.d.ts +10 -10
- package/dist/actions/cvms/get_cvm_user_config.d.ts +4 -4
- package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +2 -2
- package/dist/actions/cvms/logs.d.ts +10 -9
- package/dist/actions/cvms/patch_cvm.d.ts +10 -10
- package/dist/actions/cvms/provision_cvm.d.ts +23 -20
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +49 -49
- package/dist/actions/cvms/put_cvm_init_scripts.d.ts +8 -8
- package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +25 -25
- package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +25 -25
- package/dist/actions/cvms/update_cvm_envs.d.ts +10 -10
- package/dist/actions/cvms/update_cvm_resources.d.ts +2 -2
- package/dist/actions/cvms/update_cvm_visibility.d.ts +14 -14
- package/dist/actions/cvms/update_docker_compose.d.ts +10 -10
- package/dist/actions/cvms/update_os_image.d.ts +8 -8
- package/dist/actions/cvms/update_prelaunch_script.d.ts +10 -10
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +2 -2
- package/dist/actions/cvms/watch_cvm_state.d.ts +2 -2
- package/dist/actions/domains/create_app_domain.d.ts +139 -0
- package/dist/actions/domains/delete_app_domain.d.ts +120 -0
- package/dist/actions/domains/get_app_domain_guide.d.ts +67 -0
- package/dist/actions/domains/list_app_domains.d.ts +107 -0
- package/dist/actions/domains/list_domains.d.ts +157 -0
- package/dist/actions/domains/merge_app_domain_ingress.d.ts +120 -0
- package/dist/actions/domains/preflight_app_domain.d.ts +110 -0
- package/dist/actions/domains/schemas.d.ts +82 -0
- package/dist/actions/domains/verify_app_domain.d.ts +142 -0
- package/dist/actions/get_available_nodes.d.ts +16 -16
- package/dist/actions/index.d.ts +11 -1
- package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +2 -2
- package/dist/actions/kms/get_kms_contract.d.ts +2 -2
- package/dist/actions/kms/get_kms_info.d.ts +2 -2
- package/dist/actions/kms/get_kms_list.d.ts +2 -2
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +10 -10
- package/dist/actions/kms/list_kms_contract_nodes.d.ts +2 -2
- package/dist/actions/kms/list_kms_contracts.d.ts +2 -2
- package/dist/actions/kms/next_app_ids.d.ts +2 -2
- package/dist/actions/list-instance-types.d.ts +8 -8
- package/dist/actions/os_images/get_os_images.d.ts +2 -2
- package/dist/actions/ssh_keys/create_ssh_key.d.ts +6 -6
- package/dist/actions/ssh_keys/delete_ssh_key.d.ts +2 -2
- package/dist/actions/ssh_keys/get_cvm_ssh_keys.d.ts +2 -2
- package/dist/actions/ssh_keys/import_github_profile.d.ts +2 -2
- package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +2 -2
- package/dist/actions/ssh_keys/update_cvm_ssh_keys.d.ts +8 -8
- package/dist/actions/workspaces/get_workspace.d.ts +8 -8
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +12 -12
- package/dist/actions/workspaces/get_workspace_quotas.d.ts +2 -2
- package/dist/actions/workspaces/list_workspaces.d.ts +10 -10
- package/dist/client.d.ts +1 -1
- package/dist/create-client.d.ts +263 -134
- package/dist/index.js +2468 -1497
- package/dist/index.mjs +2447 -1520
- package/dist/types/app_compose.d.ts +2 -2
- package/dist/types/app_info_v20260121.d.ts +84 -36
- package/dist/types/client.d.ts +3 -3
- package/dist/types/cvm_info_v20251028.d.ts +1 -0
- package/dist/types/cvm_info_v20260121.d.ts +225 -22
- package/dist/types/version-mappings.d.ts +11 -11
- package/dist/utils/define-action.d.ts +4 -4
- package/dist/utils/errors.d.ts +4 -0
- package/dist/utils/network.d.ts +6 -6
- package/dist/version.d.ts +1 -0
- package/package.json +25 -12
package/README.md
CHANGED
|
@@ -23,25 +23,25 @@ bun add @phala/cloud
|
|
|
23
23
|
### Basic Usage
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
|
-
import { createClient } from
|
|
26
|
+
import { createClient } from "@phala/cloud";
|
|
27
27
|
|
|
28
28
|
// Create client with API key
|
|
29
29
|
const client = createClient({
|
|
30
|
-
apiKey:
|
|
30
|
+
apiKey: "your-api-key",
|
|
31
31
|
// Optional: override base URL
|
|
32
32
|
// baseURL: 'https://custom-api.example.com'
|
|
33
33
|
});
|
|
34
34
|
|
|
35
35
|
// Make API requests
|
|
36
|
-
const result = await client.get(
|
|
36
|
+
const result = await client.get("/kms");
|
|
37
37
|
console.log(result);
|
|
38
38
|
|
|
39
39
|
// Using safe methods that return a SafeResult
|
|
40
|
-
const safeResult = await client.safeGet(
|
|
40
|
+
const safeResult = await client.safeGet("/kms");
|
|
41
41
|
if (safeResult.success) {
|
|
42
|
-
console.log(
|
|
42
|
+
console.log("Success:", safeResult.data);
|
|
43
43
|
} else {
|
|
44
|
-
console.error(
|
|
44
|
+
console.error("Error:", safeResult.error);
|
|
45
45
|
}
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -33,7 +33,7 @@ declare const revokeCurrentApiToken: {
|
|
|
33
33
|
}): Promise<unknown>;
|
|
34
34
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, parameters: {
|
|
35
35
|
schema: T;
|
|
36
|
-
}): Promise<z.
|
|
36
|
+
}): Promise<z.infer<T>>;
|
|
37
37
|
(client: import("../..").BaseClient<import("../..").ApiVersion>): Promise<void>;
|
|
38
38
|
}, safeRevokeCurrentApiToken: {
|
|
39
39
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, parameters: {
|
|
@@ -41,7 +41,7 @@ declare const revokeCurrentApiToken: {
|
|
|
41
41
|
}): Promise<import("../..").SafeResult<unknown>>;
|
|
42
42
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, parameters: {
|
|
43
43
|
schema: T;
|
|
44
|
-
}): Promise<import("../..").SafeResult<z.
|
|
44
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
45
45
|
(client: import("../..").BaseClient<import("../..").ApiVersion>): Promise<import("../..").SafeResult<void>>;
|
|
46
46
|
};
|
|
47
47
|
export { revokeCurrentApiToken, safeRevokeCurrentApiToken };
|
|
@@ -43,7 +43,7 @@ declare const setAppLaunchToken: {
|
|
|
43
43
|
launchToken?: string | undefined;
|
|
44
44
|
}, parameters: {
|
|
45
45
|
schema: T;
|
|
46
|
-
}): Promise<z.
|
|
46
|
+
}): Promise<z.infer<T>>;
|
|
47
47
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
48
48
|
appId: string;
|
|
49
49
|
launchToken?: string | undefined;
|
|
@@ -63,7 +63,7 @@ declare const setAppLaunchToken: {
|
|
|
63
63
|
launchToken?: string | undefined;
|
|
64
64
|
}, parameters: {
|
|
65
65
|
schema: T;
|
|
66
|
-
}): Promise<import("../..").SafeResult<z.
|
|
66
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
67
67
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
68
68
|
appId: string;
|
|
69
69
|
launchToken?: string | undefined;
|
|
@@ -97,7 +97,7 @@ declare const clearAppLaunchToken: {
|
|
|
97
97
|
appId: string;
|
|
98
98
|
}, parameters: {
|
|
99
99
|
schema: T;
|
|
100
|
-
}): Promise<z.
|
|
100
|
+
}): Promise<z.infer<T>>;
|
|
101
101
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
102
102
|
appId: string;
|
|
103
103
|
}, parameters: {
|
|
@@ -111,7 +111,7 @@ declare const clearAppLaunchToken: {
|
|
|
111
111
|
appId: string;
|
|
112
112
|
}, parameters: {
|
|
113
113
|
schema: T;
|
|
114
|
-
}): Promise<import("../..").SafeResult<z.
|
|
114
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
115
115
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
116
116
|
appId: string;
|
|
117
117
|
}, parameters: {
|
|
@@ -34,8 +34,8 @@ declare const checkAppIsAllowed: {
|
|
|
34
34
|
device_id: string;
|
|
35
35
|
compose_hash_allowed: boolean;
|
|
36
36
|
allow_any_device: boolean;
|
|
37
|
-
is_allowed: boolean;
|
|
38
37
|
device_id_allowed?: boolean | null | undefined;
|
|
38
|
+
is_allowed: boolean;
|
|
39
39
|
error?: string | null | undefined;
|
|
40
40
|
cvm_id?: string | undefined;
|
|
41
41
|
}>;
|
|
@@ -47,7 +47,7 @@ declare const checkAppIsAllowed: {
|
|
|
47
47
|
chain_id?: number | undefined;
|
|
48
48
|
}, parameters: {
|
|
49
49
|
schema: T;
|
|
50
|
-
}): Promise<z.
|
|
50
|
+
}): Promise<z.infer<T>>;
|
|
51
51
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
52
52
|
appId: string;
|
|
53
53
|
compose_hash: string;
|
|
@@ -70,8 +70,8 @@ declare const checkAppIsAllowed: {
|
|
|
70
70
|
device_id: string;
|
|
71
71
|
compose_hash_allowed: boolean;
|
|
72
72
|
allow_any_device: boolean;
|
|
73
|
-
is_allowed: boolean;
|
|
74
73
|
device_id_allowed?: boolean | null | undefined;
|
|
74
|
+
is_allowed: boolean;
|
|
75
75
|
error?: string | null | undefined;
|
|
76
76
|
cvm_id?: string | undefined;
|
|
77
77
|
}>>;
|
|
@@ -83,7 +83,7 @@ declare const checkAppIsAllowed: {
|
|
|
83
83
|
chain_id?: number | undefined;
|
|
84
84
|
}, parameters: {
|
|
85
85
|
schema: T;
|
|
86
|
-
}): Promise<import("../..").SafeResult<z.
|
|
86
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
87
87
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
88
88
|
appId: string;
|
|
89
89
|
compose_hash: string;
|
|
@@ -68,27 +68,27 @@ declare const createAppInstance: {
|
|
|
68
68
|
name: string;
|
|
69
69
|
status: string;
|
|
70
70
|
teepod_id: number;
|
|
71
|
-
app_id: string;
|
|
72
|
-
vm_uuid: string | null;
|
|
73
|
-
instance_id: string | null;
|
|
74
|
-
vcpu: number;
|
|
75
|
-
memory: number;
|
|
76
|
-
disk_size: number;
|
|
77
|
-
created_at: string;
|
|
78
|
-
encrypted_env_pubkey: string | null;
|
|
79
|
-
id: string;
|
|
80
71
|
teepod?: {
|
|
81
72
|
id: number;
|
|
82
73
|
name: string;
|
|
83
74
|
region_identifier?: string | null | undefined;
|
|
84
75
|
} | null | undefined;
|
|
76
|
+
app_id: string;
|
|
77
|
+
vm_uuid: string | null;
|
|
78
|
+
instance_id: string | null;
|
|
85
79
|
app_url?: string | null | undefined;
|
|
86
80
|
base_image?: string | null | undefined;
|
|
81
|
+
vcpu: number;
|
|
82
|
+
memory: number;
|
|
83
|
+
disk_size: number;
|
|
87
84
|
manifest_version?: number | null | undefined;
|
|
88
85
|
version?: string | null | undefined;
|
|
89
86
|
runner?: string | null | undefined;
|
|
90
87
|
docker_compose_file?: string | null | undefined;
|
|
91
88
|
features?: string[] | null | undefined;
|
|
89
|
+
created_at: string;
|
|
90
|
+
encrypted_env_pubkey: string | null;
|
|
91
|
+
id: string;
|
|
92
92
|
user_id?: string | null | undefined;
|
|
93
93
|
}>;
|
|
94
94
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
@@ -103,7 +103,7 @@ declare const createAppInstance: {
|
|
|
103
103
|
transaction_hash?: string | undefined;
|
|
104
104
|
}, parameters: {
|
|
105
105
|
schema: T;
|
|
106
|
-
}): Promise<z.
|
|
106
|
+
}): Promise<z.infer<T>>;
|
|
107
107
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
108
108
|
appId: string;
|
|
109
109
|
name?: string | undefined;
|
|
@@ -132,27 +132,27 @@ declare const createAppInstance: {
|
|
|
132
132
|
name: string;
|
|
133
133
|
status: string;
|
|
134
134
|
teepod_id: number;
|
|
135
|
-
app_id: string;
|
|
136
|
-
vm_uuid: string | null;
|
|
137
|
-
instance_id: string | null;
|
|
138
|
-
vcpu: number;
|
|
139
|
-
memory: number;
|
|
140
|
-
disk_size: number;
|
|
141
|
-
created_at: string;
|
|
142
|
-
encrypted_env_pubkey: string | null;
|
|
143
|
-
id: string;
|
|
144
135
|
teepod?: {
|
|
145
136
|
id: number;
|
|
146
137
|
name: string;
|
|
147
138
|
region_identifier?: string | null | undefined;
|
|
148
139
|
} | null | undefined;
|
|
140
|
+
app_id: string;
|
|
141
|
+
vm_uuid: string | null;
|
|
142
|
+
instance_id: string | null;
|
|
149
143
|
app_url?: string | null | undefined;
|
|
150
144
|
base_image?: string | null | undefined;
|
|
145
|
+
vcpu: number;
|
|
146
|
+
memory: number;
|
|
147
|
+
disk_size: number;
|
|
151
148
|
manifest_version?: number | null | undefined;
|
|
152
149
|
version?: string | null | undefined;
|
|
153
150
|
runner?: string | null | undefined;
|
|
154
151
|
docker_compose_file?: string | null | undefined;
|
|
155
152
|
features?: string[] | null | undefined;
|
|
153
|
+
created_at: string;
|
|
154
|
+
encrypted_env_pubkey: string | null;
|
|
155
|
+
id: string;
|
|
156
156
|
user_id?: string | null | undefined;
|
|
157
157
|
}>>;
|
|
158
158
|
<T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
@@ -167,7 +167,7 @@ declare const createAppInstance: {
|
|
|
167
167
|
transaction_hash?: string | undefined;
|
|
168
168
|
}, parameters: {
|
|
169
169
|
schema: T;
|
|
170
|
-
}): Promise<import("../..").SafeResult<z.
|
|
170
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
171
171
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
172
172
|
appId: string;
|
|
173
173
|
name?: string | undefined;
|
|
@@ -183,6 +183,7 @@ declare const getAppAttestation: {
|
|
|
183
183
|
pcesvn?: number | null | undefined;
|
|
184
184
|
tcb_info?: {
|
|
185
185
|
mrtd: string;
|
|
186
|
+
rootfs_hash?: string | null | undefined;
|
|
186
187
|
rtmr0: string;
|
|
187
188
|
rtmr1: string;
|
|
188
189
|
rtmr2: string;
|
|
@@ -195,7 +196,6 @@ declare const getAppAttestation: {
|
|
|
195
196
|
event_payload: string;
|
|
196
197
|
}[];
|
|
197
198
|
app_compose: string;
|
|
198
|
-
rootfs_hash?: string | null | undefined;
|
|
199
199
|
} | null | undefined;
|
|
200
200
|
app_certificates?: {
|
|
201
201
|
subject: {
|
|
@@ -246,7 +246,7 @@ declare const getAppAttestation: {
|
|
|
246
246
|
appId: string;
|
|
247
247
|
}, parameters: {
|
|
248
248
|
schema: T;
|
|
249
|
-
}): Promise<z.
|
|
249
|
+
}): Promise<z.infer<T>>;
|
|
250
250
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
251
251
|
appId: string;
|
|
252
252
|
}, parameters: {
|
|
@@ -284,6 +284,7 @@ declare const getAppAttestation: {
|
|
|
284
284
|
pcesvn?: number | null | undefined;
|
|
285
285
|
tcb_info?: {
|
|
286
286
|
mrtd: string;
|
|
287
|
+
rootfs_hash?: string | null | undefined;
|
|
287
288
|
rtmr0: string;
|
|
288
289
|
rtmr1: string;
|
|
289
290
|
rtmr2: string;
|
|
@@ -296,7 +297,6 @@ declare const getAppAttestation: {
|
|
|
296
297
|
event_payload: string;
|
|
297
298
|
}[];
|
|
298
299
|
app_compose: string;
|
|
299
|
-
rootfs_hash?: string | null | undefined;
|
|
300
300
|
} | null | undefined;
|
|
301
301
|
app_certificates?: {
|
|
302
302
|
subject: {
|
|
@@ -347,7 +347,7 @@ declare const getAppAttestation: {
|
|
|
347
347
|
appId: string;
|
|
348
348
|
}, parameters: {
|
|
349
349
|
schema: T;
|
|
350
|
-
}): Promise<import("../..").SafeResult<z.
|
|
350
|
+
}): Promise<import("../..").SafeResult<z.infer<T>>>;
|
|
351
351
|
(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
|
|
352
352
|
appId: string;
|
|
353
353
|
}, parameters: {
|