@phala/cloud 0.2.1-beta.3 → 0.2.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.
Files changed (69) hide show
  1. package/LICENSE +201 -0
  2. package/dist/actions/apps/get_app_cvms.d.ts +30 -0
  3. package/dist/actions/apps/get_app_info.d.ts +30 -0
  4. package/dist/actions/apps/get_app_list.d.ts +74 -0
  5. package/dist/actions/apps/get_app_revision_detail.d.ts +48 -0
  6. package/dist/actions/apps/get_app_revisions.d.ts +42 -0
  7. package/dist/actions/cvms/commit_cvm_compose_file_update.d.ts +7 -7
  8. package/dist/actions/cvms/commit_cvm_provision.d.ts +31 -31
  9. package/dist/actions/cvms/delete_cvm.d.ts +10 -7
  10. package/dist/actions/cvms/get_available_os_images.d.ts +10 -7
  11. package/dist/actions/cvms/get_cvm_attestation.d.ts +10 -7
  12. package/dist/actions/cvms/get_cvm_compose_file.d.ts +18 -15
  13. package/dist/actions/cvms/get_cvm_containers_stats.d.ts +14 -11
  14. package/dist/actions/cvms/get_cvm_docker_compose.d.ts +10 -7
  15. package/dist/actions/cvms/get_cvm_info.d.ts +19 -35
  16. package/dist/actions/cvms/get_cvm_list.d.ts +11 -537
  17. package/dist/actions/cvms/get_cvm_network.d.ts +10 -7
  18. package/dist/actions/cvms/get_cvm_prelaunch_script.d.ts +42 -0
  19. package/dist/actions/cvms/get_cvm_state.d.ts +10 -7
  20. package/dist/actions/cvms/get_cvm_stats.d.ts +10 -7
  21. package/dist/actions/cvms/get_cvm_status_batch.d.ts +167 -0
  22. package/dist/actions/cvms/provision_cvm.d.ts +404 -21
  23. package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +32 -32
  24. package/dist/actions/cvms/restart_cvm.d.ts +17 -14
  25. package/dist/actions/cvms/shutdown_cvm.d.ts +18 -15
  26. package/dist/actions/cvms/start_cvm.d.ts +18 -15
  27. package/dist/actions/cvms/stop_cvm.d.ts +18 -15
  28. package/dist/actions/cvms/update_cvm_envs.d.ts +426 -0
  29. package/dist/actions/cvms/update_cvm_resources.d.ts +13 -10
  30. package/dist/actions/cvms/update_cvm_visibility.d.ts +33 -14
  31. package/dist/actions/cvms/update_docker_compose.d.ts +420 -0
  32. package/dist/actions/cvms/update_os_image.d.ts +9 -6
  33. package/dist/actions/cvms/update_prelaunch_script.d.ts +417 -0
  34. package/dist/actions/cvms/watch_cvm_state.d.ts +1 -1
  35. package/dist/actions/get_available_nodes.d.ts +6 -6
  36. package/dist/actions/get_current_user.d.ts +36 -89
  37. package/dist/actions/index.d.ts +14 -2
  38. package/dist/actions/kms/get_app_env_encrypt_pubkey.d.ts +6 -6
  39. package/dist/actions/kms/get_kms_info.d.ts +6 -6
  40. package/dist/actions/kms/get_kms_list.d.ts +6 -6
  41. package/dist/actions/kms/next_app_ids.d.ts +6 -6
  42. package/dist/actions/list-instance-types.d.ts +16 -16
  43. package/dist/actions/workspaces/get_workspace.d.ts +6 -6
  44. package/dist/actions/workspaces/get_workspace_nodes.d.ts +266 -0
  45. package/dist/actions/workspaces/get_workspace_quotas.d.ts +1169 -0
  46. package/dist/actions/workspaces/list_workspaces.d.ts +6 -6
  47. package/dist/client.d.ts +49 -9
  48. package/dist/create-client.d.ts +87 -36
  49. package/dist/credentials/current_user_v20251028.d.ts +30 -0
  50. package/dist/credentials/current_user_v20260121.d.ts +276 -0
  51. package/dist/credentials/index.d.ts +4 -0
  52. package/dist/index.d.ts +1 -0
  53. package/dist/index.js +1782 -633
  54. package/dist/index.mjs +1693 -626
  55. package/dist/types/app_info_v20251028.d.ts +1266 -0
  56. package/dist/types/app_info_v20260121.d.ts +3293 -0
  57. package/dist/types/app_revision.d.ts +453 -0
  58. package/dist/types/client.d.ts +40 -2
  59. package/dist/types/cvm_id.d.ts +45 -10
  60. package/dist/types/cvm_info.d.ts +16 -502
  61. package/dist/types/cvm_info_v20251028.d.ts +988 -0
  62. package/dist/types/cvm_info_v20260121.d.ts +1264 -0
  63. package/dist/types/index.d.ts +6 -0
  64. package/dist/types/version-mappings.d.ts +38 -0
  65. package/dist/utils/define-action.d.ts +15 -14
  66. package/dist/utils/errors.d.ts +2 -2
  67. package/dist/utils/hostname.d.ts +77 -0
  68. package/dist/utils/index.d.ts +1 -0
  69. package/package.json +2 -2
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { ApiVersion } from "../../types/client";
4
+ import type { GetAppCvmsResponse } from "../../types/version-mappings";
5
+ export declare const GetAppCvmsRequestSchema: z.ZodObject<{
6
+ appId: z.ZodString;
7
+ }, "strict", z.ZodTypeAny, {
8
+ appId: string;
9
+ }, {
10
+ appId: string;
11
+ }>;
12
+ export type GetAppCvmsRequest = z.infer<typeof GetAppCvmsRequestSchema>;
13
+ /**
14
+ * Get a list of CVMs for a specific app
15
+ *
16
+ * @param client - The API client
17
+ * @param request - Request parameters
18
+ * @param request.appId - The app ID to get CVMs for
19
+ * @returns List of CVMs with type based on client API version
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const cvms = await getAppCvms(client, { appId: "my-app-id" })
24
+ * ```
25
+ */
26
+ export declare function getAppCvms<V extends ApiVersion>(client: Client<V>, request: GetAppCvmsRequest): Promise<GetAppCvmsResponse<V>>;
27
+ /**
28
+ * Safe version of getAppCvms that returns a SafeResult instead of throwing
29
+ */
30
+ export declare function safeGetAppCvms<V extends ApiVersion>(client: Client<V>, request: GetAppCvmsRequest): Promise<SafeResult<GetAppCvmsResponse<V>>>;
@@ -0,0 +1,30 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { ApiVersion } from "../../types/client";
4
+ import type { GetAppInfoResponse } from "../../types/version-mappings";
5
+ export declare const GetAppInfoRequestSchema: z.ZodObject<{
6
+ appId: z.ZodString;
7
+ }, "strict", z.ZodTypeAny, {
8
+ appId: string;
9
+ }, {
10
+ appId: string;
11
+ }>;
12
+ export type GetAppInfoRequest = z.infer<typeof GetAppInfoRequestSchema>;
13
+ /**
14
+ * Get information about a specific app
15
+ *
16
+ * @param client - The API client
17
+ * @param request - Request parameters
18
+ * @param request.appId - The app ID to get information for
19
+ * @returns App information with type based on client API version
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const info = await getAppInfo(client, { appId: "my-app-id" })
24
+ * ```
25
+ */
26
+ export declare function getAppInfo<V extends ApiVersion>(client: Client<V>, request: GetAppInfoRequest): Promise<GetAppInfoResponse<V>>;
27
+ /**
28
+ * Safe version of getAppInfo that returns a SafeResult instead of throwing
29
+ */
30
+ export declare function safeGetAppInfo<V extends ApiVersion>(client: Client<V>, request: GetAppInfoRequest): Promise<SafeResult<GetAppInfoResponse<V>>>;
@@ -0,0 +1,74 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { ApiVersion } from "../../types/client";
4
+ import type { GetAppListResponse } from "../../types/version-mappings";
5
+ export declare const GetAppListRequestSchema: z.ZodObject<{
6
+ page: z.ZodOptional<z.ZodNumber>;
7
+ page_size: z.ZodOptional<z.ZodNumber>;
8
+ search: z.ZodOptional<z.ZodString>;
9
+ status: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ listed: z.ZodOptional<z.ZodBoolean>;
11
+ base_image: z.ZodOptional<z.ZodString>;
12
+ instance_type: z.ZodOptional<z.ZodString>;
13
+ kms_slug: z.ZodOptional<z.ZodString>;
14
+ kms_type: z.ZodOptional<z.ZodString>;
15
+ teepod_name: z.ZodOptional<z.ZodString>;
16
+ region: z.ZodOptional<z.ZodString>;
17
+ }, "strict", z.ZodTypeAny, {
18
+ status?: string[] | undefined;
19
+ search?: string | undefined;
20
+ listed?: boolean | undefined;
21
+ base_image?: string | undefined;
22
+ instance_type?: string | undefined;
23
+ page?: number | undefined;
24
+ page_size?: number | undefined;
25
+ teepod_name?: string | undefined;
26
+ kms_type?: string | undefined;
27
+ kms_slug?: string | undefined;
28
+ region?: string | undefined;
29
+ }, {
30
+ status?: string[] | undefined;
31
+ search?: string | undefined;
32
+ listed?: boolean | undefined;
33
+ base_image?: string | undefined;
34
+ instance_type?: string | undefined;
35
+ page?: number | undefined;
36
+ page_size?: number | undefined;
37
+ teepod_name?: string | undefined;
38
+ kms_type?: string | undefined;
39
+ kms_slug?: string | undefined;
40
+ region?: string | undefined;
41
+ }>;
42
+ export type GetAppListRequest = z.infer<typeof GetAppListRequestSchema>;
43
+ /**
44
+ * Get a paginated list of apps
45
+ *
46
+ * @param client - The API client
47
+ * @param request - Optional request parameters for pagination and filtering
48
+ * @param request.page - Page number (1-based)
49
+ * @param request.page_size - Number of items per page (max 100)
50
+ * @param request.search - Search term to filter apps
51
+ * @param request.status - Filter by CVM status
52
+ * @param request.listed - Filter by listed status
53
+ * @param request.base_image - Filter by base image
54
+ * @param request.instance_type - Filter by instance type
55
+ * @param request.kms_slug - Filter by KMS slug
56
+ * @param request.kms_type - Filter by KMS type
57
+ * @param request.teepod_name - Filter by node name
58
+ * @param request.region - Filter by region
59
+ * @returns Paginated list of apps with type based on client API version
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * // Get first page with default size
64
+ * const list = await getAppList(client, { page: 1 })
65
+ *
66
+ * // Get with custom page size and search
67
+ * const list = await getAppList(client, { page: 1, page_size: 20, search: "my-app" })
68
+ * ```
69
+ */
70
+ export declare function getAppList<V extends ApiVersion>(client: Client<V>, request?: GetAppListRequest): Promise<GetAppListResponse<V>>;
71
+ /**
72
+ * Safe version of getAppList that returns a SafeResult instead of throwing
73
+ */
74
+ export declare function safeGetAppList<V extends ApiVersion>(client: Client<V>, request?: GetAppListRequest): Promise<SafeResult<GetAppListResponse<V>>>;
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { AppRevisionDetailResponse } from "../../types/app_revision";
4
+ import type { ApiVersion } from "../../types/client";
5
+ export declare const GetAppRevisionDetailRequestSchema: z.ZodObject<{
6
+ appId: z.ZodString;
7
+ composeHash: z.ZodString;
8
+ rawComposeFile: z.ZodOptional<z.ZodBoolean>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ composeHash: string;
11
+ appId: string;
12
+ rawComposeFile?: boolean | undefined;
13
+ }, {
14
+ composeHash: string;
15
+ appId: string;
16
+ rawComposeFile?: boolean | undefined;
17
+ }>;
18
+ export type GetAppRevisionDetailRequest = z.infer<typeof GetAppRevisionDetailRequestSchema>;
19
+ /**
20
+ * Get detailed information about a specific app revision
21
+ *
22
+ * @param client - The API client
23
+ * @param request - Request parameters
24
+ * @param request.appId - The app ID
25
+ * @param request.composeHash - The compose hash of the revision
26
+ * @param request.rawComposeFile - If true, returns compose_file as raw string instead of parsed object
27
+ * @returns Detailed revision information including compose file and encrypted env
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * const detail = await getAppRevisionDetail(client, {
32
+ * appId: "my-app-id",
33
+ * composeHash: "abc123"
34
+ * })
35
+ *
36
+ * // Get with raw compose file
37
+ * const detail = await getAppRevisionDetail(client, {
38
+ * appId: "my-app-id",
39
+ * composeHash: "abc123",
40
+ * rawComposeFile: true
41
+ * })
42
+ * ```
43
+ */
44
+ export declare function getAppRevisionDetail<V extends ApiVersion>(client: Client<V>, request: GetAppRevisionDetailRequest): Promise<AppRevisionDetailResponse>;
45
+ /**
46
+ * Safe version of getAppRevisionDetail that returns a SafeResult instead of throwing
47
+ */
48
+ export declare function safeGetAppRevisionDetail<V extends ApiVersion>(client: Client<V>, request: GetAppRevisionDetailRequest): Promise<SafeResult<AppRevisionDetailResponse>>;
@@ -0,0 +1,42 @@
1
+ import { z } from "zod";
2
+ import { type Client, type SafeResult } from "../../client";
3
+ import type { AppRevisionsResponse } from "../../types/app_revision";
4
+ import type { ApiVersion } from "../../types/client";
5
+ export declare const GetAppRevisionsRequestSchema: z.ZodObject<{
6
+ appId: z.ZodString;
7
+ page: z.ZodOptional<z.ZodNumber>;
8
+ page_size: z.ZodOptional<z.ZodNumber>;
9
+ }, "strict", z.ZodTypeAny, {
10
+ appId: string;
11
+ page?: number | undefined;
12
+ page_size?: number | undefined;
13
+ }, {
14
+ appId: string;
15
+ page?: number | undefined;
16
+ page_size?: number | undefined;
17
+ }>;
18
+ export type GetAppRevisionsRequest = z.infer<typeof GetAppRevisionsRequestSchema>;
19
+ /**
20
+ * Get a paginated list of revisions for a specific app
21
+ *
22
+ * @param client - The API client
23
+ * @param request - Request parameters
24
+ * @param request.appId - The app ID to get revisions for
25
+ * @param request.page - Page number (1-based)
26
+ * @param request.page_size - Number of items per page (max 1000)
27
+ * @returns Paginated list of app revisions
28
+ *
29
+ * @example
30
+ * ```typescript
31
+ * // Get first page of revisions
32
+ * const revisions = await getAppRevisions(client, { appId: "my-app-id" })
33
+ *
34
+ * // Get with pagination
35
+ * const revisions = await getAppRevisions(client, { appId: "my-app-id", page: 2, page_size: 50 })
36
+ * ```
37
+ */
38
+ export declare function getAppRevisions<V extends ApiVersion>(client: Client<V>, request: GetAppRevisionsRequest): Promise<AppRevisionsResponse>;
39
+ /**
40
+ * Safe version of getAppRevisions that returns a SafeResult instead of throwing
41
+ */
42
+ export declare function safeGetAppRevisions<V extends ApiVersion>(client: Client<V>, request: GetAppRevisionsRequest): Promise<SafeResult<AppRevisionsResponse>>;
@@ -119,7 +119,7 @@ export declare const CommitCvmComposeFileUpdateRequestSchema: z.ZodEffects<z.Zod
119
119
  compose_hash: string;
120
120
  encrypted_env: string | undefined;
121
121
  env_keys: string[] | undefined;
122
- update_env_vars: boolean;
122
+ update_env_vars: boolean | undefined;
123
123
  _raw: {
124
124
  compose_hash: string;
125
125
  id?: string | undefined;
@@ -150,19 +150,19 @@ export type CommitCvmComposeFileUpdateRequest = Omit<z.infer<typeof CommitCvmCom
150
150
  };
151
151
  export type CommitCvmComposeFileUpdate = undefined;
152
152
  declare const commitCvmComposeFileUpdate: {
153
- (client: Client, params: CommitCvmComposeFileUpdateRequest): Promise<undefined>;
154
- <T extends z.ZodTypeAny>(client: Client, params: CommitCvmComposeFileUpdateRequest, parameters: {
153
+ (client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest): Promise<undefined>;
154
+ <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest, parameters: {
155
155
  schema: T;
156
156
  }): Promise<z.TypeOf<T>>;
157
- (client: Client, params: CommitCvmComposeFileUpdateRequest, parameters: {
157
+ (client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest, parameters: {
158
158
  schema: false;
159
159
  }): Promise<unknown>;
160
160
  }, safeCommitCvmComposeFileUpdate: {
161
- (client: Client, params: CommitCvmComposeFileUpdateRequest): Promise<import("../..").SafeResult<undefined>>;
162
- <T extends z.ZodTypeAny>(client: Client, params: CommitCvmComposeFileUpdateRequest, parameters: {
161
+ (client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest): Promise<import("../..").SafeResult<undefined>>;
162
+ <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest, parameters: {
163
163
  schema: T;
164
164
  }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
165
- (client: Client, params: CommitCvmComposeFileUpdateRequest, parameters: {
165
+ (client: Client<import("../..").ApiVersion>, params: CommitCvmComposeFileUpdateRequest, parameters: {
166
166
  schema: false;
167
167
  }): Promise<import("../..").SafeResult<unknown>>;
168
168
  };
@@ -141,16 +141,16 @@ export declare const CommitCvmProvisionSchema: z.ZodObject<{
141
141
  app_id: z.ZodNullable<z.ZodString>;
142
142
  vm_uuid: z.ZodNullable<z.ZodString>;
143
143
  instance_id: z.ZodNullable<z.ZodString>;
144
- app_url: z.ZodNullable<z.ZodString>;
144
+ app_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
145
145
  base_image: z.ZodNullable<z.ZodString>;
146
146
  vcpu: z.ZodNumber;
147
147
  memory: z.ZodNumber;
148
148
  disk_size: z.ZodNumber;
149
- manifest_version: z.ZodNullable<z.ZodNumber>;
150
- version: z.ZodNullable<z.ZodString>;
151
- runner: z.ZodNullable<z.ZodString>;
149
+ manifest_version: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
150
+ version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
151
+ runner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
152
152
  docker_compose_file: z.ZodNullable<z.ZodString>;
153
- features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
153
+ features: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
154
154
  created_at: z.ZodString;
155
155
  encrypted_env_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
156
  app_auth_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -174,16 +174,16 @@ export declare const CommitCvmProvisionSchema: z.ZodObject<{
174
174
  app_id: z.ZodNullable<z.ZodString>;
175
175
  vm_uuid: z.ZodNullable<z.ZodString>;
176
176
  instance_id: z.ZodNullable<z.ZodString>;
177
- app_url: z.ZodNullable<z.ZodString>;
177
+ app_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
178
178
  base_image: z.ZodNullable<z.ZodString>;
179
179
  vcpu: z.ZodNumber;
180
180
  memory: z.ZodNumber;
181
181
  disk_size: z.ZodNumber;
182
- manifest_version: z.ZodNullable<z.ZodNumber>;
183
- version: z.ZodNullable<z.ZodString>;
184
- runner: z.ZodNullable<z.ZodString>;
182
+ manifest_version: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
183
+ version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
184
+ runner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
185
185
  docker_compose_file: z.ZodNullable<z.ZodString>;
186
- features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
186
+ features: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
187
187
  created_at: z.ZodString;
188
188
  encrypted_env_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
189
  app_auth_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -207,16 +207,16 @@ export declare const CommitCvmProvisionSchema: z.ZodObject<{
207
207
  app_id: z.ZodNullable<z.ZodString>;
208
208
  vm_uuid: z.ZodNullable<z.ZodString>;
209
209
  instance_id: z.ZodNullable<z.ZodString>;
210
- app_url: z.ZodNullable<z.ZodString>;
210
+ app_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
211
211
  base_image: z.ZodNullable<z.ZodString>;
212
212
  vcpu: z.ZodNumber;
213
213
  memory: z.ZodNumber;
214
214
  disk_size: z.ZodNumber;
215
- manifest_version: z.ZodNullable<z.ZodNumber>;
216
- version: z.ZodNullable<z.ZodString>;
217
- runner: z.ZodNullable<z.ZodString>;
215
+ manifest_version: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
216
+ version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
217
+ runner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
218
218
  docker_compose_file: z.ZodNullable<z.ZodString>;
219
- features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
219
+ features: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
220
220
  created_at: z.ZodString;
221
221
  encrypted_env_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
222
222
  app_auth_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
@@ -250,7 +250,7 @@ export declare const CommitCvmProvisionRequestSchema: z.ZodObject<{
250
250
  }, z.ZodTypeAny, "passthrough">>;
251
251
  export type CommitCvmProvisionRequest = z.infer<typeof CommitCvmProvisionRequestSchema>;
252
252
  declare const commitCvmProvision: {
253
- (client: Client, params: z.objectOutputType<{
253
+ (client: Client<import("../..").ApiVersion>, params: z.objectOutputType<{
254
254
  encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
255
255
  app_id: z.ZodString;
256
256
  compose_hash: z.ZodString;
@@ -277,22 +277,22 @@ declare const commitCvmProvision: {
277
277
  app_id: z.ZodNullable<z.ZodString>;
278
278
  vm_uuid: z.ZodNullable<z.ZodString>;
279
279
  instance_id: z.ZodNullable<z.ZodString>;
280
- app_url: z.ZodNullable<z.ZodString>;
280
+ app_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
281
281
  base_image: z.ZodNullable<z.ZodString>;
282
282
  vcpu: z.ZodNumber;
283
283
  memory: z.ZodNumber;
284
284
  disk_size: z.ZodNumber;
285
- manifest_version: z.ZodNullable<z.ZodNumber>;
286
- version: z.ZodNullable<z.ZodString>;
287
- runner: z.ZodNullable<z.ZodString>;
285
+ manifest_version: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
286
+ version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
287
+ runner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
288
288
  docker_compose_file: z.ZodNullable<z.ZodString>;
289
- features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
289
+ features: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
290
290
  created_at: z.ZodString;
291
291
  encrypted_env_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
292
  app_auth_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
293
293
  deployer_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
294
294
  }, z.ZodTypeAny, "passthrough">>;
295
- <T extends z.ZodTypeAny>(client: Client, params: z.objectOutputType<{
295
+ <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: z.objectOutputType<{
296
296
  encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
297
297
  app_id: z.ZodString;
298
298
  compose_hash: z.ZodString;
@@ -303,7 +303,7 @@ declare const commitCvmProvision: {
303
303
  }, z.ZodTypeAny, "passthrough">, parameters: {
304
304
  schema: T;
305
305
  }): Promise<z.TypeOf<T>>;
306
- (client: Client, params: z.objectOutputType<{
306
+ (client: Client<import("../..").ApiVersion>, params: z.objectOutputType<{
307
307
  encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
308
308
  app_id: z.ZodString;
309
309
  compose_hash: z.ZodString;
@@ -315,7 +315,7 @@ declare const commitCvmProvision: {
315
315
  schema: false;
316
316
  }): Promise<unknown>;
317
317
  }, safeCommitCvmProvision: {
318
- (client: Client, params: z.objectOutputType<{
318
+ (client: Client<import("../..").ApiVersion>, params: z.objectOutputType<{
319
319
  encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
320
320
  app_id: z.ZodString;
321
321
  compose_hash: z.ZodString;
@@ -342,22 +342,22 @@ declare const commitCvmProvision: {
342
342
  app_id: z.ZodNullable<z.ZodString>;
343
343
  vm_uuid: z.ZodNullable<z.ZodString>;
344
344
  instance_id: z.ZodNullable<z.ZodString>;
345
- app_url: z.ZodNullable<z.ZodString>;
345
+ app_url: z.ZodDefault<z.ZodNullable<z.ZodString>>;
346
346
  base_image: z.ZodNullable<z.ZodString>;
347
347
  vcpu: z.ZodNumber;
348
348
  memory: z.ZodNumber;
349
349
  disk_size: z.ZodNumber;
350
- manifest_version: z.ZodNullable<z.ZodNumber>;
351
- version: z.ZodNullable<z.ZodString>;
352
- runner: z.ZodNullable<z.ZodString>;
350
+ manifest_version: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
351
+ version: z.ZodDefault<z.ZodNullable<z.ZodString>>;
352
+ runner: z.ZodDefault<z.ZodNullable<z.ZodString>>;
353
353
  docker_compose_file: z.ZodNullable<z.ZodString>;
354
- features: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
354
+ features: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodString, "many">>>;
355
355
  created_at: z.ZodString;
356
356
  encrypted_env_pubkey: z.ZodOptional<z.ZodNullable<z.ZodString>>;
357
357
  app_auth_contract_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
358
358
  deployer_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
359
359
  }, z.ZodTypeAny, "passthrough">>>;
360
- <T extends z.ZodTypeAny>(client: Client, params: z.objectOutputType<{
360
+ <T extends z.ZodTypeAny>(client: Client<import("../..").ApiVersion>, params: z.objectOutputType<{
361
361
  encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
362
362
  app_id: z.ZodString;
363
363
  compose_hash: z.ZodString;
@@ -368,7 +368,7 @@ declare const commitCvmProvision: {
368
368
  }, z.ZodTypeAny, "passthrough">, parameters: {
369
369
  schema: T;
370
370
  }): Promise<import("../..").SafeResult<z.TypeOf<T>>>;
371
- (client: Client, params: z.objectOutputType<{
371
+ (client: Client<import("../..").ApiVersion>, params: z.objectOutputType<{
372
372
  encrypted_env: z.ZodNullable<z.ZodOptional<z.ZodString>>;
373
373
  app_id: z.ZodString;
374
374
  compose_hash: z.ZodString;