@phala/cloud 0.3.0 → 0.5.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.
Files changed (112) hide show
  1. package/README.md +20 -0
  2. package/dist/actions/api_tokens/revoke_current_api_token.d.ts +47 -0
  3. package/dist/actions/apps/app_launch_token.d.ts +121 -0
  4. package/dist/actions/apps/check_app_cvms_is_allowed.d.ts +17 -311
  5. package/dist/actions/apps/check_app_is_allowed.d.ts +20 -32
  6. package/dist/actions/apps/create_app_instance.d.ts +43 -63
  7. package/dist/actions/apps/get_app_attestation.d.ts +116 -772
  8. package/dist/actions/apps/get_app_cvms.d.ts +1 -5
  9. package/dist/actions/apps/get_app_device_allowlist.d.ts +26 -272
  10. package/dist/actions/apps/get_app_filter_options.d.ts +8 -24
  11. package/dist/actions/apps/get_app_info.d.ts +1 -5
  12. package/dist/actions/apps/get_app_list.d.ts +2 -26
  13. package/dist/actions/apps/get_app_revision_detail.d.ts +1 -9
  14. package/dist/actions/apps/get_app_revisions.d.ts +1 -9
  15. package/dist/actions/blockchains/add_compose_hash.d.ts +1 -13
  16. package/dist/actions/blockchains/add_device.d.ts +1 -13
  17. package/dist/actions/blockchains/deploy_app_auth.d.ts +3 -95
  18. package/dist/actions/blockchains/get_allowed_devices.d.ts +2 -12
  19. package/dist/actions/blockchains/remove_device.d.ts +1 -13
  20. package/dist/actions/blockchains/set_allow_any_device.d.ts +1 -13
  21. package/dist/actions/cvms/check_cvm_is_allowed.d.ts +13 -138
  22. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +9 -45
  23. package/dist/actions/cvms/commit_cvm_provision.d.ts +32 -416
  24. package/dist/actions/cvms/commit_cvm_update.d.ts +70 -41
  25. package/dist/actions/cvms/confirm_cvm_patch.d.ts +62 -35
  26. package/dist/actions/cvms/cvm_annotations.d.ts +152 -0
  27. package/dist/actions/cvms/delete_cvm.d.ts +8 -14
  28. package/dist/actions/cvms/get_available_os_images.d.ts +70 -111
  29. package/dist/actions/cvms/get_cvm_attestation.d.ts +34 -392
  30. package/dist/actions/cvms/get_cvm_compose_file.d.ts +426 -512
  31. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +25 -91
  32. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +8 -14
  33. package/dist/actions/cvms/get_cvm_info.d.ts +6 -12
  34. package/dist/actions/cvms/get_cvm_init_scripts.d.ts +87 -0
  35. package/dist/actions/cvms/get_cvm_list.d.ts +9 -17
  36. package/dist/actions/cvms/get_cvm_network.d.ts +18 -50
  37. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +8 -14
  38. package/dist/actions/cvms/get_cvm_state.d.ts +11 -37
  39. package/dist/actions/cvms/get_cvm_stats.d.ts +23 -149
  40. package/dist/actions/cvms/get_cvm_status_batch.d.ts +97 -64
  41. package/dist/actions/cvms/get_cvm_user_config.d.ts +13 -24
  42. package/dist/actions/cvms/get_prelaunch_script_upgrade_status.d.ts +9 -27
  43. package/dist/actions/cvms/patch_cvm.d.ts +666 -287
  44. package/dist/actions/cvms/provision_cvm.d.ts +339 -725
  45. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +584 -777
  46. package/dist/actions/cvms/refresh_cvm_instance_id.d.ts +74 -131
  47. package/dist/actions/cvms/refresh_cvm_instance_ids.d.ts +77 -297
  48. package/dist/actions/cvms/replicate_cvm.d.ts +7 -21
  49. package/dist/actions/cvms/restart_cvm.d.ts +3 -18
  50. package/dist/actions/cvms/shutdown_cvm.d.ts +6 -12
  51. package/dist/actions/cvms/start_cvm.d.ts +6 -12
  52. package/dist/actions/cvms/stop_cvm.d.ts +6 -12
  53. package/dist/actions/cvms/update_cvm_envs.d.ts +144 -195
  54. package/dist/actions/cvms/update_cvm_resources.d.ts +93 -37
  55. package/dist/actions/cvms/update_cvm_visibility.d.ts +90 -130
  56. package/dist/actions/cvms/update_docker_compose.d.ts +143 -187
  57. package/dist/actions/cvms/update_os_image.d.ts +55 -28
  58. package/dist/actions/cvms/update_prelaunch_script.d.ts +143 -187
  59. package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +126 -185
  60. package/dist/actions/cvms/watch_cvm_state.d.ts +5 -15
  61. package/dist/actions/get_available_nodes.d.ts +201 -823
  62. package/dist/actions/get_cvm_create_resources.d.ts +150 -2150
  63. package/dist/actions/index.d.ts +14 -4
  64. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +11 -23
  65. package/dist/actions/kms/get_kms_contract.d.ts +57 -0
  66. package/dist/actions/kms/get_kms_info.d.ts +3 -7
  67. package/dist/actions/kms/get_kms_list.d.ts +43 -82
  68. package/dist/actions/kms/get_kms_onchain_detail.d.ts +72 -616
  69. package/dist/actions/kms/list_kms_contract_nodes.d.ts +66 -0
  70. package/dist/actions/kms/list_kms_contracts.d.ts +98 -0
  71. package/dist/actions/kms/next_app_ids.d.ts +5 -25
  72. package/dist/actions/list-instance-types.d.ts +77 -257
  73. package/dist/actions/os_images/get_os_images.d.ts +38 -152
  74. package/dist/actions/ssh_keys/create_ssh_key.d.ts +11 -17
  75. package/dist/actions/ssh_keys/delete_ssh_key.d.ts +3 -7
  76. package/dist/actions/ssh_keys/get_cvm_ssh_keys.d.ts +113 -0
  77. package/dist/actions/ssh_keys/import_github_profile.d.ts +7 -21
  78. package/dist/actions/ssh_keys/list_ssh_keys.d.ts +2 -50
  79. package/dist/actions/ssh_keys/sync_github_ssh_keys.d.ts +8 -20
  80. package/dist/actions/ssh_keys/update_cvm_ssh_keys.d.ts +140 -0
  81. package/dist/actions/workspaces/get_workspace.d.ts +32 -24
  82. package/dist/actions/workspaces/get_workspace_nodes.d.ts +56 -182
  83. package/dist/actions/workspaces/get_workspace_quotas.d.ts +107 -1021
  84. package/dist/actions/workspaces/list_workspaces.d.ts +69 -245
  85. package/dist/client.d.ts +27 -5
  86. package/dist/create-client.d.ts +1820 -1
  87. package/dist/credentials/current_user_v20251028.d.ts +1 -17
  88. package/dist/credentials/current_user_v20260121.d.ts +22 -227
  89. package/dist/index.d.ts +1 -2
  90. package/dist/index.js +5454 -4389
  91. package/dist/index.mjs +5396 -4395
  92. package/dist/types/app_compose.d.ts +116 -184
  93. package/dist/types/app_info_v20251028.d.ts +29 -1030
  94. package/dist/types/app_info_v20260121.d.ts +686 -6832
  95. package/dist/types/app_revision.d.ts +15 -371
  96. package/dist/types/client.d.ts +18 -2
  97. package/dist/types/common.d.ts +6 -0
  98. package/dist/types/cvm_id.d.ts +12 -57
  99. package/dist/types/cvm_info.d.ts +33 -460
  100. package/dist/types/cvm_info_v20251028.d.ts +102 -800
  101. package/dist/types/cvm_info_v20260121.d.ts +411 -2347
  102. package/dist/types/kms_contract.d.ts +34 -0
  103. package/dist/types/kms_info.d.ts +34 -60
  104. package/dist/types/version-mappings.d.ts +6 -6
  105. package/dist/utils/define-action.d.ts +4 -4
  106. package/dist/utils/error_codes.d.ts +1 -0
  107. package/dist/utils/errors.d.ts +34 -37
  108. package/dist/utils/get_compose_hash.d.ts +59 -4
  109. package/dist/utils/get_mr_config_id.d.ts +146 -0
  110. package/dist/utils/index.d.ts +3 -2
  111. package/dist/utils/placement-request.d.ts +3 -0
  112. package/package.json +4 -4
@@ -2,7 +2,20 @@ import { z } from "zod";
2
2
  /**
3
3
  * Update CVM visibility settings
4
4
  *
5
- * This action updates whether system info and logs are publicly accessible.
5
+ * This action updates whether system info, logs and TCB info are publicly
6
+ * accessible. It sends the flags to the unified `PATCH /cvms/{cvmId}` endpoint
7
+ * and returns the accepted update (202) or `status: "no_change"` when the flags
8
+ * already match.
9
+ *
10
+ * Visibility flags are part of the compose hash. For a CVM on contract-owned
11
+ * KMS the request fails with HTTP 465 until the new compose hash is registered
12
+ * on-chain; register it and call this action again, or use `patchCvm` and
13
+ * `confirmCvmPatch` for the two-phase flow.
14
+ *
15
+ * On a 465 the compose hash to register is in `error.detail.details` (the entry
16
+ * with field `compose_hash`). Register it on-chain, then call this action
17
+ * again. Alternatively use `patchCvm`, which parses the 465 payload for you and
18
+ * supports `prepareOnly`.
6
19
  *
7
20
  * @example
8
21
  * ```typescript
@@ -14,156 +27,103 @@ import { z } from "zod";
14
27
  * public_sysinfo: true,
15
28
  * public_logs: false
16
29
  * });
17
- * console.log(result.public_sysinfo, result.public_logs);
30
+ * console.log(result.status, result.correlation_id);
18
31
  * ```
19
32
  */
20
- export declare const UpdateCvmVisibilityRequestSchema: z.ZodEffects<z.ZodObject<{
33
+ export declare const UpdateCvmVisibilityRequestSchema: z.ZodObject<{
21
34
  id: z.ZodOptional<z.ZodString>;
22
35
  uuid: z.ZodOptional<z.ZodString>;
23
36
  app_id: z.ZodOptional<z.ZodString>;
24
37
  instance_id: z.ZodOptional<z.ZodString>;
25
- name: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
26
- } & {
38
+ name: z.ZodOptional<z.ZodString>;
27
39
  public_sysinfo: z.ZodBoolean;
28
40
  public_logs: z.ZodBoolean;
29
41
  public_tcbinfo: z.ZodOptional<z.ZodBoolean>;
30
- }, "strip", z.ZodTypeAny, {
31
- public_sysinfo: boolean;
32
- public_logs: boolean;
33
- name?: string | undefined;
34
- id?: string | undefined;
35
- uuid?: string | undefined;
36
- app_id?: string | undefined;
37
- instance_id?: string | undefined;
38
- public_tcbinfo?: boolean | undefined;
39
- }, {
40
- public_sysinfo: boolean;
41
- public_logs: boolean;
42
- name?: string | undefined;
43
- id?: string | undefined;
44
- uuid?: string | undefined;
45
- app_id?: string | undefined;
46
- instance_id?: string | undefined;
47
- public_tcbinfo?: boolean | undefined;
48
- }>, any, any>;
42
+ }, z.core.$strip>;
49
43
  export type UpdateCvmVisibilityRequest = z.infer<typeof UpdateCvmVisibilityRequestSchema>;
44
+ export declare const UpdateCvmVisibilityResponseSchema: z.ZodObject<{
45
+ message: z.ZodString;
46
+ correlation_id: z.ZodString;
47
+ status: z.ZodString;
48
+ }, z.core.$strip>;
49
+ export type UpdateCvmVisibilityResponse = z.infer<typeof UpdateCvmVisibilityResponseSchema>;
50
50
  declare const updateCvmVisibility: {
51
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<{
52
- status: string;
53
- name: string;
54
- id: string | number;
55
- app_id: string;
56
- instance_id: string | null;
57
- teepod_id: number | null;
58
- vm_uuid: string | null;
59
- base_image: string | null;
60
- vcpu: number;
61
- memory: number;
62
- disk_size: number;
63
- encrypted_env_pubkey: string | null;
64
- listed: boolean;
65
- in_progress: boolean;
66
- public_urls: {
67
- app: string;
68
- instance: string;
69
- }[];
51
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
70
52
  public_sysinfo: boolean;
71
53
  public_logs: boolean;
72
- teepod?: {
73
- name: string;
74
- id: number;
75
- region_identifier?: string | null | undefined;
76
- } | null | undefined;
77
- deployer_address?: string | null | undefined;
78
- contract_address?: string | null | undefined;
79
- dapp_dashboard_url?: string | null | undefined;
80
- syslog_endpoint?: string | null | undefined;
81
- project_id?: string | null | undefined;
82
- project_type?: string | null | undefined;
83
- kms_info?: z.objectOutputType<{
84
- id: z.ZodString;
85
- slug: z.ZodNullable<z.ZodString>;
86
- url: z.ZodString;
87
- version: z.ZodString;
88
- chain_id: z.ZodNullable<z.ZodNumber>;
89
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
90
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
91
- }, z.ZodTypeAny, "passthrough"> | null | undefined;
92
- gateway_domain?: string | null | undefined;
93
- machine_info?: {
94
- vcpu: number;
95
- memory: number;
96
- disk_size: number;
97
- gpu_count: number;
98
- } | null | undefined;
99
- updated_at?: string | null | undefined;
100
- instance_type?: string | null | undefined;
101
- scheduled_delete_at?: string | null | undefined;
54
+ id?: string | undefined;
55
+ uuid?: string | undefined;
56
+ app_id?: string | undefined;
57
+ instance_id?: string | undefined;
58
+ name?: string | undefined;
59
+ public_tcbinfo?: boolean | undefined;
60
+ }): Promise<{
61
+ message: string;
62
+ correlation_id: string;
63
+ status: string;
102
64
  }>;
103
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
65
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
66
+ public_sysinfo: boolean;
67
+ public_logs: boolean;
68
+ id?: string | undefined;
69
+ uuid?: string | undefined;
70
+ app_id?: string | undefined;
71
+ instance_id?: string | undefined;
72
+ name?: string | undefined;
73
+ public_tcbinfo?: boolean | undefined;
74
+ }, parameters: {
104
75
  schema: T;
105
- } | undefined): Promise<z.TypeOf<T>>;
106
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
76
+ }): Promise<z.core.output<T>>;
77
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
78
+ public_sysinfo: boolean;
79
+ public_logs: boolean;
80
+ id?: string | undefined;
81
+ uuid?: string | undefined;
82
+ app_id?: string | undefined;
83
+ instance_id?: string | undefined;
84
+ name?: string | undefined;
85
+ public_tcbinfo?: boolean | undefined;
86
+ }, parameters: {
107
87
  schema: false;
108
- } | undefined): Promise<unknown>;
88
+ }): Promise<unknown>;
109
89
  }, safeUpdateCvmVisibility: {
110
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any): Promise<import("../..").SafeResult<{
111
- status: string;
112
- name: string;
113
- id: string | number;
114
- app_id: string;
115
- instance_id: string | null;
116
- teepod_id: number | null;
117
- vm_uuid: string | null;
118
- base_image: string | null;
119
- vcpu: number;
120
- memory: number;
121
- disk_size: number;
122
- encrypted_env_pubkey: string | null;
123
- listed: boolean;
124
- in_progress: boolean;
125
- public_urls: {
126
- app: string;
127
- instance: string;
128
- }[];
90
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
129
91
  public_sysinfo: boolean;
130
92
  public_logs: boolean;
131
- teepod?: {
132
- name: string;
133
- id: number;
134
- region_identifier?: string | null | undefined;
135
- } | null | undefined;
136
- deployer_address?: string | null | undefined;
137
- contract_address?: string | null | undefined;
138
- dapp_dashboard_url?: string | null | undefined;
139
- syslog_endpoint?: string | null | undefined;
140
- project_id?: string | null | undefined;
141
- project_type?: string | null | undefined;
142
- kms_info?: z.objectOutputType<{
143
- id: z.ZodString;
144
- slug: z.ZodNullable<z.ZodString>;
145
- url: z.ZodString;
146
- version: z.ZodString;
147
- chain_id: z.ZodNullable<z.ZodNumber>;
148
- kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
149
- gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
150
- }, z.ZodTypeAny, "passthrough"> | null | undefined;
151
- gateway_domain?: string | null | undefined;
152
- machine_info?: {
153
- vcpu: number;
154
- memory: number;
155
- disk_size: number;
156
- gpu_count: number;
157
- } | null | undefined;
158
- updated_at?: string | null | undefined;
159
- instance_type?: string | null | undefined;
160
- scheduled_delete_at?: string | null | undefined;
93
+ id?: string | undefined;
94
+ uuid?: string | undefined;
95
+ app_id?: string | undefined;
96
+ instance_id?: string | undefined;
97
+ name?: string | undefined;
98
+ public_tcbinfo?: boolean | undefined;
99
+ }): Promise<import("../..").SafeResult<{
100
+ message: string;
101
+ correlation_id: string;
102
+ status: string;
161
103
  }>>;
162
- <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
104
+ <T extends z.ZodTypeAny>(client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
105
+ public_sysinfo: boolean;
106
+ public_logs: boolean;
107
+ id?: string | undefined;
108
+ uuid?: string | undefined;
109
+ app_id?: string | undefined;
110
+ instance_id?: string | undefined;
111
+ name?: string | undefined;
112
+ public_tcbinfo?: boolean | undefined;
113
+ }, parameters: {
163
114
  schema: T;
164
- } | undefined): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
165
- (client: import("../..").BaseClient<import("../..").ApiVersion>, params?: any, parameters?: {
115
+ }): Promise<import("../..").SafeResult<z.core.output<T>>>;
116
+ (client: import("../..").BaseClient<import("../..").ApiVersion>, params: {
117
+ public_sysinfo: boolean;
118
+ public_logs: boolean;
119
+ id?: string | undefined;
120
+ uuid?: string | undefined;
121
+ app_id?: string | undefined;
122
+ instance_id?: string | undefined;
123
+ name?: string | undefined;
124
+ public_tcbinfo?: boolean | undefined;
125
+ }, parameters: {
166
126
  schema: false;
167
- } | undefined): Promise<import("../..").SafeResult<unknown>>;
127
+ }): Promise<import("../..").SafeResult<unknown>>;
168
128
  };
169
129
  export { updateCvmVisibility, safeUpdateCvmVisibility };