@phala/cloud 0.2.9 → 0.3.0
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/dist/actions/apps/check_app_cvms_is_allowed.d.ts +324 -75
- package/dist/actions/apps/check_app_is_allowed.d.ts +16 -16
- package/dist/actions/apps/create_app_instance.d.ts +33 -24
- package/dist/actions/apps/get_app_attestation.d.ts +82 -32
- package/dist/actions/apps/get_app_device_allowlist.d.ts +281 -11
- package/dist/actions/apps/get_app_filter_options.d.ts +2 -2
- package/dist/actions/apps/get_app_list.d.ts +2 -2
- package/dist/actions/cvms/check_cvm_is_allowed.d.ts +142 -74
- package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +12 -12
- package/dist/actions/cvms/commit_cvm_provision.d.ts +424 -277
- package/dist/actions/cvms/commit_cvm_update.d.ts +2 -2
- package/dist/actions/cvms/confirm_cvm_patch.d.ts +2 -2
- 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 +2 -2
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +338 -10
- package/dist/actions/cvms/get_cvm_containers_stats.d.ts +10 -10
- package/dist/actions/cvms/get_cvm_docker_compose.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_info.d.ts +2 -2
- package/dist/actions/cvms/get_cvm_list.d.ts +4 -4
- 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 +6 -6
- package/dist/actions/cvms/get_cvm_user_config.d.ts +2 -2
- package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +93 -0
- package/dist/actions/cvms/patch_cvm.d.ts +18 -18
- package/dist/actions/cvms/provision_cvm.d.ts +243 -225
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +254 -38
- package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +130 -43
- package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +294 -110
- package/dist/actions/cvms/replicate_cvm.d.ts +7 -72
- package/dist/actions/cvms/restart_cvm.d.ts +7 -72
- package/dist/actions/cvms/shutdown_cvm.d.ts +9 -72
- package/dist/actions/cvms/start_cvm.d.ts +7 -72
- package/dist/actions/cvms/stop_cvm.d.ts +7 -72
- package/dist/actions/cvms/update_cvm_envs.d.ts +20 -20
- package/dist/actions/cvms/update_cvm_resources.d.ts +2 -2
- package/dist/actions/cvms/update_cvm_visibility.d.ts +26 -26
- package/dist/actions/cvms/update_docker_compose.d.ts +20 -20
- package/dist/actions/cvms/update_os_image.d.ts +2 -2
- package/dist/actions/cvms/update_prelaunch_script.d.ts +20 -20
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +319 -0
- package/dist/actions/get_cvm_create_resources.d.ts +2412 -0
- package/dist/actions/index.d.ts +3 -0
- package/dist/actions/kms/get_kms_list.d.ts +10 -10
- package/dist/actions/kms/next_app_ids.d.ts +6 -6
- package/dist/actions/list-instance-types.d.ts +12 -12
- package/dist/actions/ssh_keys/create_ssh_key.d.ts +2 -2
- package/dist/actions/ssh_keys/list_ssh_keys.d.ts +4 -4
- package/dist/actions/workspaces/get_workspace.d.ts +2 -0
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +14 -14
- package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
- package/dist/client.d.ts +5 -2
- package/dist/create-client.d.ts +48 -0
- package/dist/index.js +1882 -1257
- package/dist/index.mjs +1850 -1255
- package/dist/types/app_compose.d.ts +125 -0
- package/dist/types/app_info_v20251028.d.ts +136 -259
- package/dist/types/app_info_v20260121.d.ts +4677 -345
- package/dist/types/app_revision.d.ts +8 -8
- package/dist/types/client.d.ts +2 -2
- package/dist/types/cvm_id.d.ts +6 -6
- package/dist/types/cvm_info.d.ts +536 -10
- package/dist/types/cvm_info_v20251028.d.ts +65 -65
- package/dist/types/cvm_info_v20260121.d.ts +1636 -85
- package/dist/types/version-mappings.d.ts +45 -8
- package/dist/utils/errors.d.ts +8 -1
- package/package.json +2 -2
package/dist/client.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { type SafeResult, type ClientConfig, type ResolvedClientConfig, type Ful
|
|
|
4
4
|
import type { Prettify } from "./types/common";
|
|
5
5
|
import { PhalaCloudError } from "./utils/errors";
|
|
6
6
|
export type { SafeResult, FullResponse, RequestOptions, ApiVersion, DefaultApiVersion, } from "./types/client";
|
|
7
|
-
export declare const SUPPORTED_API_VERSIONS: readonly ["2025-10-28", "2026-01-21"];
|
|
7
|
+
export declare const SUPPORTED_API_VERSIONS: readonly ["2025-10-28", "2026-01-21", "2026-05-22"];
|
|
8
8
|
export declare const DEFAULT_API_VERSION: DefaultApiVersion;
|
|
9
9
|
/**
|
|
10
10
|
* Client event types
|
|
@@ -156,7 +156,7 @@ export declare class Client<V extends ApiVersion = DefaultApiVersion> {
|
|
|
156
156
|
*
|
|
157
157
|
* @example
|
|
158
158
|
* ```typescript
|
|
159
|
-
* const client = createClient(); // defaults to 2026-
|
|
159
|
+
* const client = createClient(); // defaults to 2026-05-22
|
|
160
160
|
* const legacyClient = client.withVersion("2025-10-28");
|
|
161
161
|
* const data = await getCvmInfo(legacyClient, { id: "xxx" });
|
|
162
162
|
* ```
|
|
@@ -207,6 +207,9 @@ export declare class Client<V extends ApiVersion = DefaultApiVersion> {
|
|
|
207
207
|
* // DEBUG=phala::api-client node your-script.js
|
|
208
208
|
* ```
|
|
209
209
|
*/
|
|
210
|
+
export declare function createClient(config: ClientConfig<"2026-05-22"> & {
|
|
211
|
+
version: "2026-05-22";
|
|
212
|
+
}): Client<"2026-05-22">;
|
|
210
213
|
export declare function createClient(config: ClientConfig<"2026-01-21"> & {
|
|
211
214
|
version: "2026-01-21";
|
|
212
215
|
}): Client<"2026-01-21">;
|
package/dist/create-client.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ClientConfig, ApiVersion, DefaultApiVersion } from "./types/client
|
|
|
3
3
|
import type { z } from "zod";
|
|
4
4
|
import type { GetCurrentUserResponse, GetCvmListResponse, GetCvmInfoResponse } from "./types/version-mappings";
|
|
5
5
|
import { type AvailableNodes } from "./actions/get_available_nodes";
|
|
6
|
+
import { type GetCvmCreateResourcesResponse } from "./actions/get_cvm_create_resources";
|
|
6
7
|
import { type AllFamiliesResponse, type FamilyInstanceTypesResponse, type ListFamilyInstanceTypesRequest } from "./actions/list-instance-types";
|
|
7
8
|
import { type ListWorkspacesRequest, type ListWorkspaces, type WorkspaceResponse } from "./actions/workspaces/list_workspaces";
|
|
8
9
|
import { type GetCvmInfoRequest } from "./actions/cvms/get_cvm_info";
|
|
@@ -16,6 +17,8 @@ import { type UpdateCvmEnvsRequest, type UpdateCvmEnvsResult } from "./actions/c
|
|
|
16
17
|
import { type UpdateDockerComposeRequest, type UpdateDockerComposeResult } from "./actions/cvms/update_docker_compose";
|
|
17
18
|
import { type UpdatePreLaunchScriptRequest, type UpdatePreLaunchScriptResult } from "./actions/cvms/update_prelaunch_script";
|
|
18
19
|
import { type GetCvmPreLaunchScriptRequest } from "./actions/cvms/get_cvm_prelaunch_script";
|
|
20
|
+
import { type GetPreLaunchScriptUpgradeStatusRequest, type PreLaunchScriptUpgradeStatus } from "./actions/cvms/get_prelaunch_script_upgrade_status";
|
|
21
|
+
import { type UpgradePreLaunchScriptRequest, type UpgradePreLaunchScriptResult } from "./actions/cvms/upgrade_prelaunch_script";
|
|
19
22
|
import { type GetKmsInfoRequest } from "./actions/kms/get_kms_info";
|
|
20
23
|
import { type GetKmsListRequest, type GetKmsListResponse } from "./actions/kms/get_kms_list";
|
|
21
24
|
import { type GetAppEnvEncryptPubKeyRequest, type GetAppEnvEncryptPubKey as GetAppEnvEncryptPubKeyResult } from "./actions/kms/get_app_env_encrypt_pubkey";
|
|
@@ -79,6 +82,9 @@ import type { SafeResult } from "./types/client";
|
|
|
79
82
|
* @param config - Client configuration
|
|
80
83
|
* @returns Client extended with all available actions
|
|
81
84
|
*/
|
|
85
|
+
export declare function createClient(config: ClientConfig<"2026-05-22"> & {
|
|
86
|
+
version: "2026-05-22";
|
|
87
|
+
}): Client<"2026-05-22">;
|
|
82
88
|
export declare function createClient(config: ClientConfig<"2026-01-21"> & {
|
|
83
89
|
version: "2026-01-21";
|
|
84
90
|
}): Client<"2026-01-21">;
|
|
@@ -126,6 +132,20 @@ export interface Client<V extends ApiVersion = DefaultApiVersion> extends BaseCl
|
|
|
126
132
|
safeGetAvailableNodes(parameters: {
|
|
127
133
|
schema: false;
|
|
128
134
|
}): Promise<SafeResult<unknown>>;
|
|
135
|
+
getCvmCreateResources(): Promise<GetCvmCreateResourcesResponse<V>>;
|
|
136
|
+
getCvmCreateResources<T extends z.ZodTypeAny>(parameters: {
|
|
137
|
+
schema: T;
|
|
138
|
+
}): Promise<z.infer<T>>;
|
|
139
|
+
getCvmCreateResources(parameters: {
|
|
140
|
+
schema: false;
|
|
141
|
+
}): Promise<unknown>;
|
|
142
|
+
safeGetCvmCreateResources(): Promise<SafeResult<GetCvmCreateResourcesResponse<V>>>;
|
|
143
|
+
safeGetCvmCreateResources<T extends z.ZodTypeAny>(parameters: {
|
|
144
|
+
schema: T;
|
|
145
|
+
}): Promise<SafeResult<z.infer<T>>>;
|
|
146
|
+
safeGetCvmCreateResources(parameters: {
|
|
147
|
+
schema: false;
|
|
148
|
+
}): Promise<SafeResult<unknown>>;
|
|
129
149
|
listAllInstanceTypeFamilies(): Promise<AllFamiliesResponse>;
|
|
130
150
|
listAllInstanceTypeFamilies<T extends z.ZodTypeAny>(parameters: {
|
|
131
151
|
schema: T;
|
|
@@ -326,6 +346,34 @@ export interface Client<V extends ApiVersion = DefaultApiVersion> extends BaseCl
|
|
|
326
346
|
safeGetCvmPreLaunchScript(request: GetCvmPreLaunchScriptRequest, parameters: {
|
|
327
347
|
schema: false;
|
|
328
348
|
}): Promise<SafeResult<unknown>>;
|
|
349
|
+
getPreLaunchScriptUpgradeStatus(request: GetPreLaunchScriptUpgradeStatusRequest): Promise<PreLaunchScriptUpgradeStatus>;
|
|
350
|
+
getPreLaunchScriptUpgradeStatus<T extends z.ZodTypeAny>(request: GetPreLaunchScriptUpgradeStatusRequest, parameters: {
|
|
351
|
+
schema: T;
|
|
352
|
+
}): Promise<z.infer<T>>;
|
|
353
|
+
getPreLaunchScriptUpgradeStatus(request: GetPreLaunchScriptUpgradeStatusRequest, parameters: {
|
|
354
|
+
schema: false;
|
|
355
|
+
}): Promise<unknown>;
|
|
356
|
+
safeGetPreLaunchScriptUpgradeStatus(request: GetPreLaunchScriptUpgradeStatusRequest): Promise<SafeResult<PreLaunchScriptUpgradeStatus>>;
|
|
357
|
+
safeGetPreLaunchScriptUpgradeStatus<T extends z.ZodTypeAny>(request: GetPreLaunchScriptUpgradeStatusRequest, parameters: {
|
|
358
|
+
schema: T;
|
|
359
|
+
}): Promise<SafeResult<z.infer<T>>>;
|
|
360
|
+
safeGetPreLaunchScriptUpgradeStatus(request: GetPreLaunchScriptUpgradeStatusRequest, parameters: {
|
|
361
|
+
schema: false;
|
|
362
|
+
}): Promise<SafeResult<unknown>>;
|
|
363
|
+
upgradePreLaunchScript(request: UpgradePreLaunchScriptRequest): Promise<UpgradePreLaunchScriptResult>;
|
|
364
|
+
upgradePreLaunchScript<T extends z.ZodTypeAny>(request: UpgradePreLaunchScriptRequest, parameters: {
|
|
365
|
+
schema: T;
|
|
366
|
+
}): Promise<z.infer<T>>;
|
|
367
|
+
upgradePreLaunchScript(request: UpgradePreLaunchScriptRequest, parameters: {
|
|
368
|
+
schema: false;
|
|
369
|
+
}): Promise<unknown>;
|
|
370
|
+
safeUpgradePreLaunchScript(request: UpgradePreLaunchScriptRequest): Promise<SafeResult<UpgradePreLaunchScriptResult>>;
|
|
371
|
+
safeUpgradePreLaunchScript<T extends z.ZodTypeAny>(request: UpgradePreLaunchScriptRequest, parameters: {
|
|
372
|
+
schema: T;
|
|
373
|
+
}): Promise<SafeResult<z.infer<T>>>;
|
|
374
|
+
safeUpgradePreLaunchScript(request: UpgradePreLaunchScriptRequest, parameters: {
|
|
375
|
+
schema: false;
|
|
376
|
+
}): Promise<SafeResult<unknown>>;
|
|
329
377
|
getKmsInfo(request: GetKmsInfoRequest): Promise<KmsInfo>;
|
|
330
378
|
getKmsInfo<T extends z.ZodTypeAny>(request: GetKmsInfoRequest, parameters: {
|
|
331
379
|
schema: T;
|