@phala/cloud 0.2.9 → 0.2.10

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.
Files changed (39) hide show
  1. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +315 -5
  2. package/dist/actions/apps/check_app_is_allowed.d.ts +2 -2
  3. package/dist/actions/apps/create_app_instance.d.ts +13 -4
  4. package/dist/actions/apps/get_app_attestation.d.ts +50 -0
  5. package/dist/actions/apps/get_app_device_allowlist.d.ts +274 -5
  6. package/dist/actions/apps/get_app_filter_options.d.ts +2 -2
  7. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +133 -3
  8. package/dist/actions/cvms/commit_cvm_provision.d.ts +425 -148
  9. package/dist/actions/cvms/get_cvm_compose_file.d.ts +328 -0
  10. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +93 -0
  11. package/dist/actions/cvms/provision_cvm.d.ts +243 -225
  12. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +216 -0
  13. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +123 -5
  14. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +236 -7
  15. package/dist/actions/cvms/replicate_cvm.d.ts +4 -4
  16. package/dist/actions/cvms/restart_cvm.d.ts +4 -4
  17. package/dist/actions/cvms/shutdown_cvm.d.ts +4 -4
  18. package/dist/actions/cvms/start_cvm.d.ts +4 -4
  19. package/dist/actions/cvms/stop_cvm.d.ts +4 -4
  20. package/dist/actions/cvms/update_cvm_visibility.d.ts +2 -2
  21. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +319 -0
  22. package/dist/actions/get_cvm_create_resources.d.ts +2412 -0
  23. package/dist/actions/index.d.ts +3 -0
  24. package/dist/actions/workspaces/get_workspace.d.ts +2 -0
  25. package/dist/actions/workspaces/list_workspaces.d.ts +18 -0
  26. package/dist/client.d.ts +5 -2
  27. package/dist/create-client.d.ts +48 -0
  28. package/dist/index.js +1634 -1218
  29. package/dist/index.mjs +1602 -1216
  30. package/dist/types/app_compose.d.ts +125 -0
  31. package/dist/types/app_info_v20251028.d.ts +8 -131
  32. package/dist/types/app_info_v20260121.d.ts +4500 -168
  33. package/dist/types/client.d.ts +2 -2
  34. package/dist/types/cvm_info.d.ts +533 -7
  35. package/dist/types/cvm_info_v20251028.d.ts +18 -18
  36. package/dist/types/cvm_info_v20260121.d.ts +1640 -89
  37. package/dist/types/version-mappings.d.ts +8 -8
  38. package/dist/utils/errors.d.ts +8 -1
  39. package/package.json +2 -2
@@ -8,31 +8,31 @@
8
8
  import type { CurrentUserV20260121 } from "../credentials/current_user_v20260121";
9
9
  import type { CurrentUserV20251028 } from "../credentials/current_user_v20251028";
10
10
  import type { DstackAppListResponseV20251028, DstackAppWithCvmResponseV20251028 } from "./app_info_v20251028";
11
- import type { DstackAppListResponseV20260121, DstackAppWithCvmResponseV20260121 } from "./app_info_v20260121";
11
+ import type { DstackAppListResponseV20260121, DstackAppListResponseV20260522, DstackAppWithCvmResponseV20260121, DstackAppWithCvmResponseV20260522 } from "./app_info_v20260121";
12
12
  import type { ApiVersion } from "./client";
13
13
  import type { CvmDetailV20251028, CvmInfoV20251028, PaginatedCvmInfosV20251028 } from "./cvm_info_v20251028";
14
- import type { CvmInfoDetailV20260121, CvmInfoV20260121, PaginatedCvmInfosV20260121 } from "./cvm_info_v20260121";
14
+ import type { CvmInfoDetailV20260121, CvmInfoDetailV20260522, CvmInfoV20260121, CvmInfoV20260522, PaginatedCvmInfosV20260121, PaginatedCvmInfosV20260522 } from "./cvm_info_v20260121";
15
15
  /**
16
16
  * Maps API version to the auth/me response type
17
17
  */
18
- export type GetCurrentUserResponse<V extends ApiVersion> = V extends "2026-01-21" ? CurrentUserV20260121 : V extends "2025-10-28" ? CurrentUserV20251028 : CurrentUserV20260121;
18
+ export type GetCurrentUserResponse<V extends ApiVersion> = V extends "2026-05-22" ? CurrentUserV20260121 : V extends "2026-01-21" ? CurrentUserV20260121 : V extends "2025-10-28" ? CurrentUserV20251028 : CurrentUserV20260121;
19
19
  /**
20
20
  * Maps API version to the paginated CVM list response type
21
21
  */
22
- export type GetCvmListResponse<V extends ApiVersion> = V extends "2026-01-21" ? PaginatedCvmInfosV20260121 : V extends "2025-10-28" ? PaginatedCvmInfosV20251028 : PaginatedCvmInfosV20260121;
22
+ export type GetCvmListResponse<V extends ApiVersion> = V extends "2026-05-22" ? PaginatedCvmInfosV20260522 : V extends "2026-01-21" ? PaginatedCvmInfosV20260121 : V extends "2025-10-28" ? PaginatedCvmInfosV20251028 : PaginatedCvmInfosV20260121;
23
23
  /**
24
24
  * Maps API version to the CVM info detail response type
25
25
  */
26
- export type GetCvmInfoResponse<V extends ApiVersion> = V extends "2026-01-21" ? CvmInfoDetailV20260121 : V extends "2025-10-28" ? CvmDetailV20251028 : CvmInfoDetailV20260121;
26
+ export type GetCvmInfoResponse<V extends ApiVersion> = V extends "2026-05-22" ? CvmInfoDetailV20260522 : V extends "2026-01-21" ? CvmInfoDetailV20260121 : V extends "2025-10-28" ? CvmDetailV20251028 : CvmInfoDetailV20260121;
27
27
  /**
28
28
  * Maps API version to the app list response type
29
29
  */
30
- export type GetAppListResponse<V extends ApiVersion> = V extends "2026-01-21" ? DstackAppListResponseV20260121 : V extends "2025-10-28" ? DstackAppListResponseV20251028 : DstackAppListResponseV20260121;
30
+ export type GetAppListResponse<V extends ApiVersion> = V extends "2026-05-22" ? DstackAppListResponseV20260522 : V extends "2026-01-21" ? DstackAppListResponseV20260121 : V extends "2025-10-28" ? DstackAppListResponseV20251028 : DstackAppListResponseV20260121;
31
31
  /**
32
32
  * Maps API version to the app info response type
33
33
  */
34
- export type GetAppInfoResponse<V extends ApiVersion> = V extends "2026-01-21" ? DstackAppWithCvmResponseV20260121 : V extends "2025-10-28" ? DstackAppWithCvmResponseV20251028 : DstackAppWithCvmResponseV20260121;
34
+ export type GetAppInfoResponse<V extends ApiVersion> = V extends "2026-05-22" ? DstackAppWithCvmResponseV20260522 : V extends "2026-01-21" ? DstackAppWithCvmResponseV20260121 : V extends "2025-10-28" ? DstackAppWithCvmResponseV20251028 : DstackAppWithCvmResponseV20260121;
35
35
  /**
36
36
  * Maps API version to the app CVMs list response type
37
37
  */
38
- export type GetAppCvmsResponse<V extends ApiVersion> = V extends "2026-01-21" ? CvmInfoV20260121[] : V extends "2025-10-28" ? CvmInfoV20251028[] : CvmInfoV20260121[];
38
+ export type GetAppCvmsResponse<V extends ApiVersion> = V extends "2026-05-22" ? CvmInfoV20260522[] : V extends "2026-01-21" ? CvmInfoV20260121[] : V extends "2025-10-28" ? CvmInfoV20251028[] : CvmInfoV20260121[];
@@ -71,6 +71,9 @@ export declare class PhalaCloudError extends Error {
71
71
  type?: string;
72
72
  ctx?: Record<string, unknown>;
73
73
  }>;
74
+ readonly requestId?: string;
75
+ /** Machine-readable error code (e.g. "TIMEOUT", HTTP status as string). */
76
+ readonly code?: string;
74
77
  constructor(message: string, data: {
75
78
  status: number;
76
79
  statusText: string;
@@ -79,6 +82,8 @@ export declare class PhalaCloudError extends Error {
79
82
  type?: string;
80
83
  ctx?: Record<string, unknown>;
81
84
  }>;
85
+ requestId?: string;
86
+ code?: string;
82
87
  });
83
88
  }
84
89
  /**
@@ -91,7 +96,6 @@ export declare class RequestError extends PhalaCloudError implements ApiError {
91
96
  readonly data?: unknown;
92
97
  readonly request?: FetchRequest | undefined;
93
98
  readonly response?: Response | undefined;
94
- readonly code?: string | undefined;
95
99
  readonly type?: string | undefined;
96
100
  constructor(message: string, options?: {
97
101
  status?: number | undefined;
@@ -110,6 +114,7 @@ export declare class RequestError extends PhalaCloudError implements ApiError {
110
114
  }>;
111
115
  code?: string | undefined;
112
116
  type?: string | undefined;
117
+ requestId?: string | undefined;
113
118
  });
114
119
  /**
115
120
  * Create RequestError from FetchError
@@ -303,6 +308,7 @@ export interface ErrorLink {
303
308
  export interface StructuredErrorResponse {
304
309
  error_code: string;
305
310
  message: string;
311
+ request_id?: string;
306
312
  details?: StructuredErrorDetail[];
307
313
  suggestions?: string[];
308
314
  links?: ErrorLink[];
@@ -331,6 +337,7 @@ export declare class ResourceError extends BusinessError {
331
337
  input?: unknown;
332
338
  [key: string]: unknown;
333
339
  }>;
340
+ requestId?: string;
334
341
  errorCode?: string;
335
342
  structuredDetails?: StructuredErrorDetail[];
336
343
  suggestions?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phala/cloud",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "TypeScript SDK for Phala Cloud API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -43,7 +43,7 @@
43
43
  "author": "Leechael Yim",
44
44
  "license": "Apache-2.0",
45
45
  "dependencies": {
46
- "@phala/dstack-sdk": "0.5.7",
46
+ "@phala/dstack-sdk": "0.5.8",
47
47
  "debug": "^4.4.1",
48
48
  "mitt": "^3.0.1",
49
49
  "ofetch": "^1.3.3",