@phala/cloud 0.0.1 → 0.0.3
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/add_compose_hash.d.ts +63 -0
- package/dist/actions/add_compose_hash.d.ts.map +1 -0
- package/dist/actions/commit_cvm_compose_file_update.d.ts +143 -0
- package/dist/actions/commit_cvm_compose_file_update.d.ts.map +1 -0
- package/dist/actions/commit_cvm_provision.d.ts +209 -0
- package/dist/actions/commit_cvm_provision.d.ts.map +1 -0
- package/dist/actions/deploy_app_auth.d.ts +164 -0
- package/dist/actions/deploy_app_auth.d.ts.map +1 -0
- package/dist/actions/get_app_env_encrypt_pubkey.d.ts +30 -0
- package/dist/actions/get_app_env_encrypt_pubkey.d.ts.map +1 -0
- package/dist/actions/get_available_nodes.d.ts +572 -0
- package/dist/actions/get_available_nodes.d.ts.map +1 -0
- package/dist/actions/get_current_user.d.ts +92 -0
- package/dist/actions/get_current_user.d.ts.map +1 -0
- package/dist/actions/get_cvm_compose_file.d.ts +190 -0
- package/dist/actions/get_cvm_compose_file.d.ts.map +1 -0
- package/dist/actions/get_cvm_info.d.ts +73 -0
- package/dist/actions/get_cvm_info.d.ts.map +1 -0
- package/dist/actions/get_cvm_list.d.ts +392 -0
- package/dist/actions/get_cvm_list.d.ts.map +1 -0
- package/dist/actions/get_kms_info.d.ts +34 -0
- package/dist/actions/get_kms_info.d.ts.map +1 -0
- package/dist/actions/get_kms_list.d.ts +82 -0
- package/dist/actions/get_kms_list.d.ts.map +1 -0
- package/dist/actions/index.d.ts +15 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/provision_cvm.d.ts +228 -0
- package/dist/actions/provision_cvm.d.ts.map +1 -0
- package/dist/actions/provision_cvm_compose_file_update.d.ts +313 -0
- package/dist/actions/provision_cvm_compose_file_update.d.ts.map +1 -0
- package/dist/client.d.ts +80 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/index.d.ts +9 -2978
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +91 -20
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +89 -18
- package/dist/index.mjs.map +1 -0
- package/dist/parse_dotenv.d.ts +14 -0
- package/dist/parse_dotenv.d.ts.map +1 -0
- package/dist/types/client.d.ts +126 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/common.d.ts +17 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/cvm_info.d.ts +486 -0
- package/dist/types/cvm_info.d.ts.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/kms_info.d.ts +28 -0
- package/dist/types/kms_info.d.ts.map +1 -0
- package/dist/utils/as-hex.d.ts +17 -0
- package/dist/utils/as-hex.d.ts.map +1 -0
- package/dist/utils/client-factories.d.ts +44 -0
- package/dist/utils/client-factories.d.ts.map +1 -0
- package/dist/utils/get_compose_hash.d.ts +15 -0
- package/dist/utils/get_compose_hash.d.ts.map +1 -0
- package/dist/utils/get_error_message.d.ts +3 -0
- package/dist/utils/get_error_message.d.ts.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/network.d.ts +101 -0
- package/dist/utils/network.d.ts.map +1 -0
- package/dist/utils/transaction.d.ts +81 -0
- package/dist/utils/transaction.d.ts.map +1 -0
- package/dist/utils/validate-parameters.d.ts +20 -0
- package/dist/utils/validate-parameters.d.ts.map +1 -0
- package/package.json +10 -4
- package/dist/index.d.mts +0 -2978
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type Client, type SafeResult } from "../client";
|
|
3
|
+
import { ActionParameters, ActionReturnType } from "../types/common";
|
|
4
|
+
/**
|
|
5
|
+
* Get available teepods and their capacity information
|
|
6
|
+
*
|
|
7
|
+
* Returns a list of available teepods with their capacity and KMS information.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { createClient, getAvailableNodes } from '@phala/cloud'
|
|
12
|
+
*
|
|
13
|
+
* const client = createClient({ apiKey: 'your-api-key' })
|
|
14
|
+
* const result = await getAvailableNodes(client)
|
|
15
|
+
* // Output: { tier: 'free', capacity: { ... }, nodes: [...], kms_list: [...] }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* ## Returns
|
|
19
|
+
*
|
|
20
|
+
* `AvailableNodes | unknown`
|
|
21
|
+
*
|
|
22
|
+
* List of available teepods and their capacity. Return type depends on schema parameter.
|
|
23
|
+
*
|
|
24
|
+
* ## Parameters
|
|
25
|
+
*
|
|
26
|
+
* ### parameters (optional)
|
|
27
|
+
* - **Type:** `GetAvailableNodesParameters`
|
|
28
|
+
*
|
|
29
|
+
* Optional behavior parameters for schema validation.
|
|
30
|
+
*
|
|
31
|
+
* ```typescript
|
|
32
|
+
* // Use default schema
|
|
33
|
+
* const result = await getAvailableNodes(client)
|
|
34
|
+
*
|
|
35
|
+
* // Return raw data without validation
|
|
36
|
+
* const raw = await getAvailableNodes(client, { schema: false })
|
|
37
|
+
*
|
|
38
|
+
* // Use custom schema
|
|
39
|
+
* const customSchema = z.object({ tier: z.string() })
|
|
40
|
+
* const custom = await getAvailableNodes(client, { schema: customSchema })
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* ## Safe Version
|
|
44
|
+
*
|
|
45
|
+
* Use `safeGetAvailableNodes` for error handling without exceptions:
|
|
46
|
+
*
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { safeGetAvailableNodes } from '@phala/cloud'
|
|
49
|
+
*
|
|
50
|
+
* const result = await safeGetAvailableNodes(client)
|
|
51
|
+
* if (result.success) {
|
|
52
|
+
* console.log(result.data.tier)
|
|
53
|
+
* } else {
|
|
54
|
+
* if ("isRequestError" in result.error) {
|
|
55
|
+
* console.error(`HTTP ${result.error.status}: ${result.error.message}`)
|
|
56
|
+
* } else {
|
|
57
|
+
* console.error(`Validation error: ${result.error.issues}`)
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const AvailableOSImageSchema: z.ZodObject<{
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
is_dev: z.ZodBoolean;
|
|
65
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
66
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
67
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
68
|
+
name: z.ZodString;
|
|
69
|
+
is_dev: z.ZodBoolean;
|
|
70
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
71
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
73
|
+
name: z.ZodString;
|
|
74
|
+
is_dev: z.ZodBoolean;
|
|
75
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
76
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
78
|
+
export declare const TeepodCapacitySchema: z.ZodObject<{
|
|
79
|
+
teepod_id: z.ZodNumber;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
listed: z.ZodBoolean;
|
|
82
|
+
resource_score: z.ZodNumber;
|
|
83
|
+
remaining_vcpu: z.ZodNumber;
|
|
84
|
+
remaining_memory: z.ZodNumber;
|
|
85
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
86
|
+
images: z.ZodArray<z.ZodObject<{
|
|
87
|
+
name: z.ZodString;
|
|
88
|
+
is_dev: z.ZodBoolean;
|
|
89
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
90
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
92
|
+
name: z.ZodString;
|
|
93
|
+
is_dev: z.ZodBoolean;
|
|
94
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
95
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
97
|
+
name: z.ZodString;
|
|
98
|
+
is_dev: z.ZodBoolean;
|
|
99
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
100
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
102
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
103
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
107
|
+
teepod_id: z.ZodNumber;
|
|
108
|
+
name: z.ZodString;
|
|
109
|
+
listed: z.ZodBoolean;
|
|
110
|
+
resource_score: z.ZodNumber;
|
|
111
|
+
remaining_vcpu: z.ZodNumber;
|
|
112
|
+
remaining_memory: z.ZodNumber;
|
|
113
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
114
|
+
images: z.ZodArray<z.ZodObject<{
|
|
115
|
+
name: z.ZodString;
|
|
116
|
+
is_dev: z.ZodBoolean;
|
|
117
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
118
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
is_dev: z.ZodBoolean;
|
|
122
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
123
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
124
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
125
|
+
name: z.ZodString;
|
|
126
|
+
is_dev: z.ZodBoolean;
|
|
127
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
128
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
130
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
131
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
132
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
133
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
135
|
+
teepod_id: z.ZodNumber;
|
|
136
|
+
name: z.ZodString;
|
|
137
|
+
listed: z.ZodBoolean;
|
|
138
|
+
resource_score: z.ZodNumber;
|
|
139
|
+
remaining_vcpu: z.ZodNumber;
|
|
140
|
+
remaining_memory: z.ZodNumber;
|
|
141
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
142
|
+
images: z.ZodArray<z.ZodObject<{
|
|
143
|
+
name: z.ZodString;
|
|
144
|
+
is_dev: z.ZodBoolean;
|
|
145
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
146
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
147
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
148
|
+
name: z.ZodString;
|
|
149
|
+
is_dev: z.ZodBoolean;
|
|
150
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
151
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
is_dev: z.ZodBoolean;
|
|
155
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
156
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
157
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
158
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
159
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
160
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
161
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
162
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
163
|
+
export declare const ResourceThresholdSchema: z.ZodObject<{
|
|
164
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
165
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
166
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
167
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
168
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
169
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
170
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
171
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
172
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
173
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
174
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
175
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
176
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
177
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
178
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
179
|
+
export declare const AvailableNodesSchema: z.ZodObject<{
|
|
180
|
+
tier: z.ZodString;
|
|
181
|
+
capacity: z.ZodObject<{
|
|
182
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
183
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
184
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
185
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
186
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
187
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
188
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
189
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
190
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
191
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
192
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
193
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
194
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
195
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
196
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
197
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
198
|
+
teepod_id: z.ZodNumber;
|
|
199
|
+
name: z.ZodString;
|
|
200
|
+
listed: z.ZodBoolean;
|
|
201
|
+
resource_score: z.ZodNumber;
|
|
202
|
+
remaining_vcpu: z.ZodNumber;
|
|
203
|
+
remaining_memory: z.ZodNumber;
|
|
204
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
205
|
+
images: z.ZodArray<z.ZodObject<{
|
|
206
|
+
name: z.ZodString;
|
|
207
|
+
is_dev: z.ZodBoolean;
|
|
208
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
209
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
210
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
211
|
+
name: z.ZodString;
|
|
212
|
+
is_dev: z.ZodBoolean;
|
|
213
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
214
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
216
|
+
name: z.ZodString;
|
|
217
|
+
is_dev: z.ZodBoolean;
|
|
218
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
219
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
220
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
221
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
222
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
224
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
225
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
226
|
+
teepod_id: z.ZodNumber;
|
|
227
|
+
name: z.ZodString;
|
|
228
|
+
listed: z.ZodBoolean;
|
|
229
|
+
resource_score: z.ZodNumber;
|
|
230
|
+
remaining_vcpu: z.ZodNumber;
|
|
231
|
+
remaining_memory: z.ZodNumber;
|
|
232
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
233
|
+
images: z.ZodArray<z.ZodObject<{
|
|
234
|
+
name: z.ZodString;
|
|
235
|
+
is_dev: z.ZodBoolean;
|
|
236
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
237
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
238
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
239
|
+
name: z.ZodString;
|
|
240
|
+
is_dev: z.ZodBoolean;
|
|
241
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
242
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
243
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
is_dev: z.ZodBoolean;
|
|
246
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
247
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
248
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
249
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
250
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
252
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
253
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
254
|
+
teepod_id: z.ZodNumber;
|
|
255
|
+
name: z.ZodString;
|
|
256
|
+
listed: z.ZodBoolean;
|
|
257
|
+
resource_score: z.ZodNumber;
|
|
258
|
+
remaining_vcpu: z.ZodNumber;
|
|
259
|
+
remaining_memory: z.ZodNumber;
|
|
260
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
261
|
+
images: z.ZodArray<z.ZodObject<{
|
|
262
|
+
name: z.ZodString;
|
|
263
|
+
is_dev: z.ZodBoolean;
|
|
264
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
265
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
266
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
267
|
+
name: z.ZodString;
|
|
268
|
+
is_dev: z.ZodBoolean;
|
|
269
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
270
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
271
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
272
|
+
name: z.ZodString;
|
|
273
|
+
is_dev: z.ZodBoolean;
|
|
274
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
275
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
276
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
277
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
278
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
279
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
280
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
281
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
282
|
+
kms_list: z.ZodArray<z.ZodObject<{
|
|
283
|
+
id: z.ZodString;
|
|
284
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
285
|
+
url: z.ZodString;
|
|
286
|
+
version: z.ZodString;
|
|
287
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
288
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
289
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
290
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
291
|
+
id: z.ZodString;
|
|
292
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
293
|
+
url: z.ZodString;
|
|
294
|
+
version: z.ZodString;
|
|
295
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
296
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
297
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
298
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
299
|
+
id: z.ZodString;
|
|
300
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
301
|
+
url: z.ZodString;
|
|
302
|
+
version: z.ZodString;
|
|
303
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
304
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
305
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
306
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
307
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
308
|
+
tier: z.ZodString;
|
|
309
|
+
capacity: z.ZodObject<{
|
|
310
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
311
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
312
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
313
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
314
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
315
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
316
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
317
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
318
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
319
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
320
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
321
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
322
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
323
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
324
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
325
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
326
|
+
teepod_id: z.ZodNumber;
|
|
327
|
+
name: z.ZodString;
|
|
328
|
+
listed: z.ZodBoolean;
|
|
329
|
+
resource_score: z.ZodNumber;
|
|
330
|
+
remaining_vcpu: z.ZodNumber;
|
|
331
|
+
remaining_memory: z.ZodNumber;
|
|
332
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
333
|
+
images: z.ZodArray<z.ZodObject<{
|
|
334
|
+
name: z.ZodString;
|
|
335
|
+
is_dev: z.ZodBoolean;
|
|
336
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
337
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
338
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
339
|
+
name: z.ZodString;
|
|
340
|
+
is_dev: z.ZodBoolean;
|
|
341
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
342
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
343
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
344
|
+
name: z.ZodString;
|
|
345
|
+
is_dev: z.ZodBoolean;
|
|
346
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
347
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
348
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
349
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
350
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
351
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
352
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
354
|
+
teepod_id: z.ZodNumber;
|
|
355
|
+
name: z.ZodString;
|
|
356
|
+
listed: z.ZodBoolean;
|
|
357
|
+
resource_score: z.ZodNumber;
|
|
358
|
+
remaining_vcpu: z.ZodNumber;
|
|
359
|
+
remaining_memory: z.ZodNumber;
|
|
360
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
361
|
+
images: z.ZodArray<z.ZodObject<{
|
|
362
|
+
name: z.ZodString;
|
|
363
|
+
is_dev: z.ZodBoolean;
|
|
364
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
365
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
366
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
367
|
+
name: z.ZodString;
|
|
368
|
+
is_dev: z.ZodBoolean;
|
|
369
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
370
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
371
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
372
|
+
name: z.ZodString;
|
|
373
|
+
is_dev: z.ZodBoolean;
|
|
374
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
375
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
376
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
377
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
378
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
379
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
380
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
382
|
+
teepod_id: z.ZodNumber;
|
|
383
|
+
name: z.ZodString;
|
|
384
|
+
listed: z.ZodBoolean;
|
|
385
|
+
resource_score: z.ZodNumber;
|
|
386
|
+
remaining_vcpu: z.ZodNumber;
|
|
387
|
+
remaining_memory: z.ZodNumber;
|
|
388
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
389
|
+
images: z.ZodArray<z.ZodObject<{
|
|
390
|
+
name: z.ZodString;
|
|
391
|
+
is_dev: z.ZodBoolean;
|
|
392
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
393
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
394
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
395
|
+
name: z.ZodString;
|
|
396
|
+
is_dev: z.ZodBoolean;
|
|
397
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
398
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
399
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
400
|
+
name: z.ZodString;
|
|
401
|
+
is_dev: z.ZodBoolean;
|
|
402
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
403
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
404
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
405
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
406
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
407
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
408
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
409
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
410
|
+
kms_list: z.ZodArray<z.ZodObject<{
|
|
411
|
+
id: z.ZodString;
|
|
412
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
413
|
+
url: z.ZodString;
|
|
414
|
+
version: z.ZodString;
|
|
415
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
416
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
417
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
418
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
419
|
+
id: z.ZodString;
|
|
420
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
421
|
+
url: z.ZodString;
|
|
422
|
+
version: z.ZodString;
|
|
423
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
424
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
425
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
426
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
427
|
+
id: z.ZodString;
|
|
428
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
429
|
+
url: z.ZodString;
|
|
430
|
+
version: z.ZodString;
|
|
431
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
432
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
433
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
434
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
435
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
436
|
+
tier: z.ZodString;
|
|
437
|
+
capacity: z.ZodObject<{
|
|
438
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
439
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
440
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
441
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
442
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
443
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
444
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
445
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
446
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
447
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
448
|
+
max_instances: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
449
|
+
max_vcpu: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
450
|
+
max_memory: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
451
|
+
max_disk: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
452
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
453
|
+
nodes: z.ZodArray<z.ZodObject<{
|
|
454
|
+
teepod_id: z.ZodNumber;
|
|
455
|
+
name: z.ZodString;
|
|
456
|
+
listed: z.ZodBoolean;
|
|
457
|
+
resource_score: z.ZodNumber;
|
|
458
|
+
remaining_vcpu: z.ZodNumber;
|
|
459
|
+
remaining_memory: z.ZodNumber;
|
|
460
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
461
|
+
images: z.ZodArray<z.ZodObject<{
|
|
462
|
+
name: z.ZodString;
|
|
463
|
+
is_dev: z.ZodBoolean;
|
|
464
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
465
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
466
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
467
|
+
name: z.ZodString;
|
|
468
|
+
is_dev: z.ZodBoolean;
|
|
469
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
470
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
471
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
472
|
+
name: z.ZodString;
|
|
473
|
+
is_dev: z.ZodBoolean;
|
|
474
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
475
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
476
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
477
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
478
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
479
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
480
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
481
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
482
|
+
teepod_id: z.ZodNumber;
|
|
483
|
+
name: z.ZodString;
|
|
484
|
+
listed: z.ZodBoolean;
|
|
485
|
+
resource_score: z.ZodNumber;
|
|
486
|
+
remaining_vcpu: z.ZodNumber;
|
|
487
|
+
remaining_memory: z.ZodNumber;
|
|
488
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
489
|
+
images: z.ZodArray<z.ZodObject<{
|
|
490
|
+
name: z.ZodString;
|
|
491
|
+
is_dev: z.ZodBoolean;
|
|
492
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
493
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
494
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
495
|
+
name: z.ZodString;
|
|
496
|
+
is_dev: z.ZodBoolean;
|
|
497
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
498
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
499
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
500
|
+
name: z.ZodString;
|
|
501
|
+
is_dev: z.ZodBoolean;
|
|
502
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
503
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
504
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
505
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
506
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
507
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
508
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
509
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
510
|
+
teepod_id: z.ZodNumber;
|
|
511
|
+
name: z.ZodString;
|
|
512
|
+
listed: z.ZodBoolean;
|
|
513
|
+
resource_score: z.ZodNumber;
|
|
514
|
+
remaining_vcpu: z.ZodNumber;
|
|
515
|
+
remaining_memory: z.ZodNumber;
|
|
516
|
+
remaining_cvm_slots: z.ZodNumber;
|
|
517
|
+
images: z.ZodArray<z.ZodObject<{
|
|
518
|
+
name: z.ZodString;
|
|
519
|
+
is_dev: z.ZodBoolean;
|
|
520
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
521
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
522
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
523
|
+
name: z.ZodString;
|
|
524
|
+
is_dev: z.ZodBoolean;
|
|
525
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
526
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
527
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
528
|
+
name: z.ZodString;
|
|
529
|
+
is_dev: z.ZodBoolean;
|
|
530
|
+
version: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
|
|
531
|
+
os_image_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
532
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
533
|
+
dedicated_for_team_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
534
|
+
support_onchain_kms: z.ZodOptional<z.ZodBoolean>;
|
|
535
|
+
fmspc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
536
|
+
device_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
537
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
538
|
+
kms_list: z.ZodArray<z.ZodObject<{
|
|
539
|
+
id: z.ZodString;
|
|
540
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
541
|
+
url: z.ZodString;
|
|
542
|
+
version: z.ZodString;
|
|
543
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
544
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
545
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
546
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
547
|
+
id: z.ZodString;
|
|
548
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
549
|
+
url: z.ZodString;
|
|
550
|
+
version: z.ZodString;
|
|
551
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
552
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
553
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
554
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
555
|
+
id: z.ZodString;
|
|
556
|
+
slug: z.ZodNullable<z.ZodString>;
|
|
557
|
+
url: z.ZodString;
|
|
558
|
+
version: z.ZodString;
|
|
559
|
+
chain_id: z.ZodNullable<z.ZodNumber>;
|
|
560
|
+
kms_contract_address: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
561
|
+
gateway_app_id: z.ZodEffects<z.ZodNullable<z.ZodString>, `0x${string}`, string | null>;
|
|
562
|
+
}, z.ZodTypeAny, "passthrough">>, "many">;
|
|
563
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
564
|
+
export type AvailableOSImage = z.infer<typeof AvailableOSImageSchema>;
|
|
565
|
+
export type TeepodCapacity = z.infer<typeof TeepodCapacitySchema>;
|
|
566
|
+
export type ResourceThreshold = z.infer<typeof ResourceThresholdSchema>;
|
|
567
|
+
export type AvailableNodes = z.infer<typeof AvailableNodesSchema>;
|
|
568
|
+
export type GetAvailableNodesParameters<T = undefined> = ActionParameters<T>;
|
|
569
|
+
export type GetAvailableNodesReturnType<T = undefined> = ActionReturnType<AvailableNodes, T>;
|
|
570
|
+
export declare function getAvailableNodes<T extends z.ZodSchema | false | undefined = undefined>(client: Client, parameters?: GetAvailableNodesParameters<T>): Promise<GetAvailableNodesReturnType<T>>;
|
|
571
|
+
export declare function safeGetAvailableNodes<T extends z.ZodSchema | false | undefined = undefined>(client: Client, parameters?: GetAvailableNodesParameters<T>): Promise<SafeResult<GetAvailableNodesReturnType<T>>>;
|
|
572
|
+
//# sourceMappingURL=get_available_nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_available_nodes.d.ts","sourceRoot":"","sources":["../../src/actions/get_available_nodes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;gCAOnB,CAAC;AAEjB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAejB,CAAC;AAEjB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;gCAOpB,CAAC;AAEjB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAOjB,CAAC;AAEjB,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,MAAM,MAAM,2BAA2B,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAE7E,MAAM,MAAM,2BAA2B,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;AAE7F,wBAAsB,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EAC3F,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAC1C,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CASzC;AAED,wBAAsB,qBAAqB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EAC/F,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAC1C,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAarD"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type Client, type SafeResult } from "../client";
|
|
3
|
+
import { ActionParameters, ActionReturnType } from "../types/common";
|
|
4
|
+
/**
|
|
5
|
+
* Get current user information and validate API token
|
|
6
|
+
*
|
|
7
|
+
* Returns information about the current authenticated user.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { createClient, getCurrentUser } from '@phala/cloud'
|
|
12
|
+
*
|
|
13
|
+
* const client = createClient({ apiKey: 'your-api-key' })
|
|
14
|
+
* const user = await getCurrentUser(client)
|
|
15
|
+
* // Output: { username: 'alice', email: 'alice@example.com', credits: 1000, ... }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* ## Returns
|
|
19
|
+
*
|
|
20
|
+
* `CurrentUser | unknown`
|
|
21
|
+
*
|
|
22
|
+
* Information about the current user. Return type depends on schema parameter.
|
|
23
|
+
*
|
|
24
|
+
* ## Parameters
|
|
25
|
+
*
|
|
26
|
+
* ### parameters (optional)
|
|
27
|
+
* - **Type:** `GetCurrentUserParameters`
|
|
28
|
+
*
|
|
29
|
+
* Optional behavior parameters for schema validation.
|
|
30
|
+
*
|
|
31
|
+
* ```typescript
|
|
32
|
+
* // Use default schema
|
|
33
|
+
* const user = await getCurrentUser(client)
|
|
34
|
+
*
|
|
35
|
+
* // Return raw data without validation
|
|
36
|
+
* const raw = await getCurrentUser(client, { schema: false })
|
|
37
|
+
*
|
|
38
|
+
* // Use custom schema
|
|
39
|
+
* const customSchema = z.object({ id: z.number(), name: z.string() })
|
|
40
|
+
* const custom = await getCurrentUser(client, { schema: customSchema })
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* ## Safe Version
|
|
44
|
+
*
|
|
45
|
+
* Use `safeGetCurrentUser` for error handling without exceptions:
|
|
46
|
+
*
|
|
47
|
+
* ```typescript
|
|
48
|
+
* import { safeGetCurrentUser } from '@phala/cloud'
|
|
49
|
+
*
|
|
50
|
+
* const result = await safeGetCurrentUser(client)
|
|
51
|
+
* if (result.success) {
|
|
52
|
+
* console.log(result.data.username)
|
|
53
|
+
* } else {
|
|
54
|
+
* if ("isRequestError" in result.error) {
|
|
55
|
+
* console.error(`HTTP ${result.error.status}: ${result.error.message}`)
|
|
56
|
+
* } else {
|
|
57
|
+
* console.error(`Validation error: ${result.error.issues}`)
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare const CurrentUserSchema: z.ZodObject<{
|
|
63
|
+
username: z.ZodString;
|
|
64
|
+
email: z.ZodString;
|
|
65
|
+
credits: z.ZodNumber;
|
|
66
|
+
granted_credits: z.ZodNumber;
|
|
67
|
+
avatar: z.ZodString;
|
|
68
|
+
team_name: z.ZodString;
|
|
69
|
+
team_tier: z.ZodString;
|
|
70
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
71
|
+
username: z.ZodString;
|
|
72
|
+
email: z.ZodString;
|
|
73
|
+
credits: z.ZodNumber;
|
|
74
|
+
granted_credits: z.ZodNumber;
|
|
75
|
+
avatar: z.ZodString;
|
|
76
|
+
team_name: z.ZodString;
|
|
77
|
+
team_tier: z.ZodString;
|
|
78
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
79
|
+
username: z.ZodString;
|
|
80
|
+
email: z.ZodString;
|
|
81
|
+
credits: z.ZodNumber;
|
|
82
|
+
granted_credits: z.ZodNumber;
|
|
83
|
+
avatar: z.ZodString;
|
|
84
|
+
team_name: z.ZodString;
|
|
85
|
+
team_tier: z.ZodString;
|
|
86
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
87
|
+
export type CurrentUser = z.infer<typeof CurrentUserSchema>;
|
|
88
|
+
export type GetCurrentUserParameters<T = undefined> = ActionParameters<T>;
|
|
89
|
+
export type GetCurrentUserReturnType<T = undefined> = ActionReturnType<CurrentUser, T>;
|
|
90
|
+
export declare function getCurrentUser<T extends z.ZodSchema | false | undefined = undefined>(client: Client, parameters?: GetCurrentUserParameters<T>): Promise<GetCurrentUserReturnType<T>>;
|
|
91
|
+
export declare function safeGetCurrentUser<T extends z.ZodSchema | false | undefined = undefined>(client: Client, parameters?: GetCurrentUserParameters<T>): Promise<SafeResult<GetCurrentUserReturnType<T>>>;
|
|
92
|
+
//# sourceMappingURL=get_current_user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_current_user.d.ts","sourceRoot":"","sources":["../../src/actions/get_current_user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;gCAUd,CAAC;AAEjB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,MAAM,MAAM,wBAAwB,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAE1E,MAAM,MAAM,wBAAwB,CAAC,CAAC,GAAG,SAAS,IAAI,gBAAgB,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAEvF,wBAAsB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EACxF,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAWtC;AAED,wBAAsB,kBAAkB,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,EAC5F,MAAM,EAAE,MAAM,EACd,UAAU,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,GACvC,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,CAiBlD"}
|