@archildata/client 0.8.1 → 0.8.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/archildata-client.darwin-arm64.node +0 -0
- package/archildata-client.linux-arm64-gnu.node +0 -0
- package/archildata-client.linux-x64-gnu.node +0 -0
- package/dist/api/index.d.mts +976 -0
- package/dist/api/index.d.ts +976 -0
- package/dist/api/index.js +312 -0
- package/dist/api/index.mjs +270 -0
- package/native.js +13 -33
- package/package.json +1 -1
|
@@ -0,0 +1,976 @@
|
|
|
1
|
+
import { Client } from 'openapi-fetch';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* This file was auto-generated by openapi-typescript.
|
|
5
|
+
* Do not make direct changes to the file.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
interface paths {
|
|
9
|
+
"/api/disks": {
|
|
10
|
+
parameters: {
|
|
11
|
+
query?: never;
|
|
12
|
+
header?: never;
|
|
13
|
+
path?: never;
|
|
14
|
+
cookie?: never;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* List all disks
|
|
18
|
+
* @description Returns all disks owned by the authenticated account.
|
|
19
|
+
*/
|
|
20
|
+
get: operations["listDisks"];
|
|
21
|
+
put?: never;
|
|
22
|
+
/**
|
|
23
|
+
* Create a new disk
|
|
24
|
+
* @description Creates a new disk with the specified configuration. The disk will be
|
|
25
|
+
* provisioned in the specified region with the given mounts and authentication methods.
|
|
26
|
+
*/
|
|
27
|
+
post: operations["createDisk"];
|
|
28
|
+
delete?: never;
|
|
29
|
+
options?: never;
|
|
30
|
+
head?: never;
|
|
31
|
+
patch?: never;
|
|
32
|
+
trace?: never;
|
|
33
|
+
};
|
|
34
|
+
"/api/disks/{id}": {
|
|
35
|
+
parameters: {
|
|
36
|
+
query?: never;
|
|
37
|
+
header?: never;
|
|
38
|
+
path?: never;
|
|
39
|
+
cookie?: never;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Get disk details
|
|
43
|
+
* @description Returns detailed information about a specific disk.
|
|
44
|
+
*/
|
|
45
|
+
get: operations["getDisk"];
|
|
46
|
+
put?: never;
|
|
47
|
+
post?: never;
|
|
48
|
+
/**
|
|
49
|
+
* Delete a disk
|
|
50
|
+
* @description Deletes a disk and all associated resources.
|
|
51
|
+
*/
|
|
52
|
+
delete: operations["deleteDisk"];
|
|
53
|
+
options?: never;
|
|
54
|
+
head?: never;
|
|
55
|
+
patch?: never;
|
|
56
|
+
trace?: never;
|
|
57
|
+
};
|
|
58
|
+
"/api/disks/{id}/users": {
|
|
59
|
+
parameters: {
|
|
60
|
+
query?: never;
|
|
61
|
+
header?: never;
|
|
62
|
+
path?: never;
|
|
63
|
+
cookie?: never;
|
|
64
|
+
};
|
|
65
|
+
get?: never;
|
|
66
|
+
put?: never;
|
|
67
|
+
/**
|
|
68
|
+
* Add user to disk
|
|
69
|
+
* @description Adds an authorized user to a disk. Users can authenticate via:
|
|
70
|
+
* - **token**: A shared token with a nickname and 4-character suffix
|
|
71
|
+
* - **awssts**: AWS STS role assumption with an IAM principal ARN
|
|
72
|
+
*/
|
|
73
|
+
post: operations["addDiskUser"];
|
|
74
|
+
delete?: never;
|
|
75
|
+
options?: never;
|
|
76
|
+
head?: never;
|
|
77
|
+
patch?: never;
|
|
78
|
+
trace?: never;
|
|
79
|
+
};
|
|
80
|
+
"/api/disks/{id}/users/{userType}": {
|
|
81
|
+
parameters: {
|
|
82
|
+
query?: never;
|
|
83
|
+
header?: never;
|
|
84
|
+
path?: never;
|
|
85
|
+
cookie?: never;
|
|
86
|
+
};
|
|
87
|
+
get?: never;
|
|
88
|
+
put?: never;
|
|
89
|
+
post?: never;
|
|
90
|
+
/**
|
|
91
|
+
* Remove user from disk
|
|
92
|
+
* @description Removes an authorized user from a disk.
|
|
93
|
+
*/
|
|
94
|
+
delete: operations["removeDiskUser"];
|
|
95
|
+
options?: never;
|
|
96
|
+
head?: never;
|
|
97
|
+
patch?: never;
|
|
98
|
+
trace?: never;
|
|
99
|
+
};
|
|
100
|
+
"/api/tokens": {
|
|
101
|
+
parameters: {
|
|
102
|
+
query?: never;
|
|
103
|
+
header?: never;
|
|
104
|
+
path?: never;
|
|
105
|
+
cookie?: never;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* List API tokens
|
|
109
|
+
* @description Returns all API tokens for the authenticated account.
|
|
110
|
+
*/
|
|
111
|
+
get: operations["listApiTokens"];
|
|
112
|
+
put?: never;
|
|
113
|
+
/**
|
|
114
|
+
* Create API token
|
|
115
|
+
* @description Creates a new API token for programmatic access. The full token value
|
|
116
|
+
* is only returned once at creation time.
|
|
117
|
+
*/
|
|
118
|
+
post: operations["createApiToken"];
|
|
119
|
+
delete?: never;
|
|
120
|
+
options?: never;
|
|
121
|
+
head?: never;
|
|
122
|
+
patch?: never;
|
|
123
|
+
trace?: never;
|
|
124
|
+
};
|
|
125
|
+
"/api/tokens/{id}": {
|
|
126
|
+
parameters: {
|
|
127
|
+
query?: never;
|
|
128
|
+
header?: never;
|
|
129
|
+
path?: never;
|
|
130
|
+
cookie?: never;
|
|
131
|
+
};
|
|
132
|
+
get?: never;
|
|
133
|
+
put?: never;
|
|
134
|
+
post?: never;
|
|
135
|
+
/**
|
|
136
|
+
* Delete API token
|
|
137
|
+
* @description Revokes and deletes an API token.
|
|
138
|
+
*/
|
|
139
|
+
delete: operations["deleteApiToken"];
|
|
140
|
+
options?: never;
|
|
141
|
+
head?: never;
|
|
142
|
+
patch?: never;
|
|
143
|
+
trace?: never;
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
interface components {
|
|
147
|
+
schemas: {
|
|
148
|
+
ErrorResponse: {
|
|
149
|
+
/** @example false */
|
|
150
|
+
success: boolean;
|
|
151
|
+
/** @example Invalid request parameters */
|
|
152
|
+
error: string;
|
|
153
|
+
};
|
|
154
|
+
ApiResponse_Empty: {
|
|
155
|
+
/** @example true */
|
|
156
|
+
success: boolean;
|
|
157
|
+
};
|
|
158
|
+
ApiResponse_Message: {
|
|
159
|
+
/** @example true */
|
|
160
|
+
success: boolean;
|
|
161
|
+
data: {
|
|
162
|
+
message?: string;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
CreateDiskRequest: {
|
|
166
|
+
/**
|
|
167
|
+
* @description Disk name (alphanumeric, dashes, underscores)
|
|
168
|
+
* @example my-data-disk
|
|
169
|
+
*/
|
|
170
|
+
name: string;
|
|
171
|
+
/** @description Storage mount to attach (exactly one required) */
|
|
172
|
+
mounts: components["schemas"]["MountConfig"][];
|
|
173
|
+
/** @description Authentication methods for disk access */
|
|
174
|
+
authMethods?: components["schemas"]["DiskUser"][];
|
|
175
|
+
};
|
|
176
|
+
MountConfig: components["schemas"]["S3Mount"] | components["schemas"]["GCSMount"] | components["schemas"]["R2Mount"] | components["schemas"]["S3CompatibleMount"] | components["schemas"]["AzureBlobMount"];
|
|
177
|
+
/**
|
|
178
|
+
* S3
|
|
179
|
+
* @description Mount configuration for Amazon S3 buckets
|
|
180
|
+
*/
|
|
181
|
+
S3Mount: {
|
|
182
|
+
/**
|
|
183
|
+
* @description Mount type identifier (enum property replaced by openapi-typescript)
|
|
184
|
+
* @enum {string}
|
|
185
|
+
*/
|
|
186
|
+
type: "s3";
|
|
187
|
+
/**
|
|
188
|
+
* @description S3 bucket name
|
|
189
|
+
* @example my-bucket
|
|
190
|
+
*/
|
|
191
|
+
bucketName: string;
|
|
192
|
+
/** @description AWS access key ID (optional for public buckets or IAM role auth) */
|
|
193
|
+
accessKeyId?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Format: password
|
|
196
|
+
* @description AWS secret access key
|
|
197
|
+
*/
|
|
198
|
+
secretAccessKey?: string;
|
|
199
|
+
/** @description Session token for temporary credentials */
|
|
200
|
+
sessionToken?: string;
|
|
201
|
+
/**
|
|
202
|
+
* @description Prefix within the bucket
|
|
203
|
+
* @example data/
|
|
204
|
+
*/
|
|
205
|
+
bucketPrefix?: string;
|
|
206
|
+
};
|
|
207
|
+
/**
|
|
208
|
+
* Google Cloud Storage
|
|
209
|
+
* @description Mount configuration for Google Cloud Storage buckets
|
|
210
|
+
*/
|
|
211
|
+
GCSMount: {
|
|
212
|
+
/**
|
|
213
|
+
* @description Mount type identifier (enum property replaced by openapi-typescript)
|
|
214
|
+
* @enum {string}
|
|
215
|
+
*/
|
|
216
|
+
type: "gcs";
|
|
217
|
+
/**
|
|
218
|
+
* @description GCS bucket name
|
|
219
|
+
* @example my-gcs-bucket
|
|
220
|
+
*/
|
|
221
|
+
bucketName: string;
|
|
222
|
+
/** @description HMAC access key ID */
|
|
223
|
+
accessKeyId: string;
|
|
224
|
+
/**
|
|
225
|
+
* Format: password
|
|
226
|
+
* @description HMAC secret access key
|
|
227
|
+
*/
|
|
228
|
+
secretAccessKey: string;
|
|
229
|
+
/**
|
|
230
|
+
* @description Prefix within the bucket (optional)
|
|
231
|
+
* @example data/
|
|
232
|
+
*/
|
|
233
|
+
bucketPrefix?: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Cloudflare R2
|
|
237
|
+
* @description Mount configuration for Cloudflare R2 buckets
|
|
238
|
+
*/
|
|
239
|
+
R2Mount: {
|
|
240
|
+
/**
|
|
241
|
+
* @description Mount type identifier (enum property replaced by openapi-typescript)
|
|
242
|
+
* @enum {string}
|
|
243
|
+
*/
|
|
244
|
+
type: "r2";
|
|
245
|
+
/**
|
|
246
|
+
* @description R2 bucket name
|
|
247
|
+
* @example my-r2-bucket
|
|
248
|
+
*/
|
|
249
|
+
bucketName: string;
|
|
250
|
+
/**
|
|
251
|
+
* @description R2 endpoint URL
|
|
252
|
+
* @example https://accountid.r2.cloudflarestorage.com
|
|
253
|
+
*/
|
|
254
|
+
bucketEndpoint: string;
|
|
255
|
+
/** @description R2 access key ID */
|
|
256
|
+
accessKeyId: string;
|
|
257
|
+
/**
|
|
258
|
+
* Format: password
|
|
259
|
+
* @description R2 secret access key
|
|
260
|
+
*/
|
|
261
|
+
secretAccessKey: string;
|
|
262
|
+
/**
|
|
263
|
+
* @description Prefix within the bucket (optional)
|
|
264
|
+
* @example data/
|
|
265
|
+
*/
|
|
266
|
+
bucketPrefix?: string;
|
|
267
|
+
};
|
|
268
|
+
/**
|
|
269
|
+
* S3-Compatible
|
|
270
|
+
* @description Mount configuration for S3-compatible storage (MinIO, Backblaze B2, etc.)
|
|
271
|
+
*/
|
|
272
|
+
S3CompatibleMount: {
|
|
273
|
+
/**
|
|
274
|
+
* @description Mount type identifier (enum property replaced by openapi-typescript)
|
|
275
|
+
* @enum {string}
|
|
276
|
+
*/
|
|
277
|
+
type: "s3-compatible";
|
|
278
|
+
/**
|
|
279
|
+
* @description Bucket name
|
|
280
|
+
* @example my-bucket
|
|
281
|
+
*/
|
|
282
|
+
bucketName: string;
|
|
283
|
+
/**
|
|
284
|
+
* @description S3-compatible endpoint URL
|
|
285
|
+
* @example https://s3.us-west-001.backblazeb2.com
|
|
286
|
+
*/
|
|
287
|
+
bucketEndpoint: string;
|
|
288
|
+
/** @description Access key ID */
|
|
289
|
+
accessKeyId: string;
|
|
290
|
+
/**
|
|
291
|
+
* Format: password
|
|
292
|
+
* @description Secret access key
|
|
293
|
+
*/
|
|
294
|
+
secretAccessKey: string;
|
|
295
|
+
/**
|
|
296
|
+
* @description Prefix within the bucket (optional)
|
|
297
|
+
* @example data/
|
|
298
|
+
*/
|
|
299
|
+
bucketPrefix?: string;
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Azure Blob Storage
|
|
303
|
+
* @description Mount configuration for Azure Blob Storage containers
|
|
304
|
+
*/
|
|
305
|
+
AzureBlobMount: {
|
|
306
|
+
/**
|
|
307
|
+
* @description Mount type identifier (enum property replaced by openapi-typescript)
|
|
308
|
+
* @enum {string}
|
|
309
|
+
*/
|
|
310
|
+
type: "azure-blob";
|
|
311
|
+
/**
|
|
312
|
+
* @description Azure blob container name
|
|
313
|
+
* @example my-container
|
|
314
|
+
*/
|
|
315
|
+
containerName: string;
|
|
316
|
+
/**
|
|
317
|
+
* @description Azure blob endpoint URL (optional if storageAccountName provided)
|
|
318
|
+
* @example https://myaccount.blob.core.windows.net
|
|
319
|
+
*/
|
|
320
|
+
endpoint?: string;
|
|
321
|
+
/**
|
|
322
|
+
* @description Azure storage account name (used to derive endpoint if not provided)
|
|
323
|
+
* @example myaccount
|
|
324
|
+
*/
|
|
325
|
+
storageAccountName?: string;
|
|
326
|
+
/** @description Azure AD tenant ID */
|
|
327
|
+
tenantId: string;
|
|
328
|
+
/** @description Azure AD application client ID */
|
|
329
|
+
clientId: string;
|
|
330
|
+
/**
|
|
331
|
+
* Format: password
|
|
332
|
+
* @description Azure AD application client secret
|
|
333
|
+
*/
|
|
334
|
+
clientSecret: string;
|
|
335
|
+
/**
|
|
336
|
+
* @description Prefix within the container
|
|
337
|
+
* @example data/
|
|
338
|
+
*/
|
|
339
|
+
bucketPrefix?: string;
|
|
340
|
+
};
|
|
341
|
+
TokenUser: {
|
|
342
|
+
/**
|
|
343
|
+
* @description discriminator enum property added by openapi-typescript
|
|
344
|
+
* @enum {string}
|
|
345
|
+
*/
|
|
346
|
+
type: "token";
|
|
347
|
+
principal: string;
|
|
348
|
+
nickname: string;
|
|
349
|
+
tokenSuffix: string;
|
|
350
|
+
};
|
|
351
|
+
AwsStsUser: {
|
|
352
|
+
/**
|
|
353
|
+
* @description discriminator enum property added by openapi-typescript
|
|
354
|
+
* @enum {string}
|
|
355
|
+
*/
|
|
356
|
+
type: "awssts";
|
|
357
|
+
/** @description IAM principal ARN */
|
|
358
|
+
principal: string;
|
|
359
|
+
};
|
|
360
|
+
DiskUser: components["schemas"]["TokenUser"] | components["schemas"]["AwsStsUser"];
|
|
361
|
+
DiskResponse: {
|
|
362
|
+
/**
|
|
363
|
+
* @description Disk ID
|
|
364
|
+
* @example dsk-0123456789abcdef
|
|
365
|
+
*/
|
|
366
|
+
id: string;
|
|
367
|
+
/** @description Disk name */
|
|
368
|
+
name: string;
|
|
369
|
+
/** @description Owning organization ID */
|
|
370
|
+
organization: string;
|
|
371
|
+
/**
|
|
372
|
+
* @description Disk status
|
|
373
|
+
* @enum {string}
|
|
374
|
+
*/
|
|
375
|
+
status: "available" | "creating" | "deleting" | "deleted" | "failed";
|
|
376
|
+
/** @description Filesystem handler status */
|
|
377
|
+
fsHandlerStatus?: string;
|
|
378
|
+
/** @description Cloud provider */
|
|
379
|
+
provider: string;
|
|
380
|
+
/** @description Disk region (e.g., aws-us-east-1, gcp-us-central1) */
|
|
381
|
+
region: string;
|
|
382
|
+
/**
|
|
383
|
+
* Format: date-time
|
|
384
|
+
* @description Creation timestamp
|
|
385
|
+
*/
|
|
386
|
+
createdAt: string;
|
|
387
|
+
/**
|
|
388
|
+
* Format: date-time
|
|
389
|
+
* @description Last access timestamp
|
|
390
|
+
*/
|
|
391
|
+
lastAccessed?: string;
|
|
392
|
+
/**
|
|
393
|
+
* Format: int64
|
|
394
|
+
* @description Total data size in bytes
|
|
395
|
+
*/
|
|
396
|
+
dataSize?: number;
|
|
397
|
+
/** @description Monthly usage amount formatted as a currency string (e.g., "$1.23") */
|
|
398
|
+
monthlyUsage?: string;
|
|
399
|
+
mounts?: components["schemas"]["MountResponse"][];
|
|
400
|
+
metrics?: components["schemas"]["DiskMetrics"];
|
|
401
|
+
connectedClients?: components["schemas"]["ConnectedClient"][];
|
|
402
|
+
authorizedUsers?: components["schemas"]["AuthorizedUser"][];
|
|
403
|
+
};
|
|
404
|
+
MountResponse: {
|
|
405
|
+
/** @description Mount identifier */
|
|
406
|
+
id?: string;
|
|
407
|
+
/**
|
|
408
|
+
* @description Storage backend type
|
|
409
|
+
* @enum {string}
|
|
410
|
+
*/
|
|
411
|
+
type?: "s3" | "gcs" | "r2" | "s3-compatible" | "azure-blob";
|
|
412
|
+
/** @description Mount path */
|
|
413
|
+
path?: string;
|
|
414
|
+
/** @description Bucket/container name */
|
|
415
|
+
name?: string;
|
|
416
|
+
/**
|
|
417
|
+
* @description Access mode
|
|
418
|
+
* @example rw
|
|
419
|
+
* @enum {string}
|
|
420
|
+
*/
|
|
421
|
+
accessMode?: "rw" | "ro";
|
|
422
|
+
config?: components["schemas"]["MountConfigResponse"];
|
|
423
|
+
/**
|
|
424
|
+
* @description Current connection status
|
|
425
|
+
* @enum {string}
|
|
426
|
+
*/
|
|
427
|
+
connectionStatus?: "connected" | "disconnected";
|
|
428
|
+
/** @description Authentication error message (if disconnected) */
|
|
429
|
+
authError?: string;
|
|
430
|
+
/**
|
|
431
|
+
* @description How the mount authenticates to the storage backend
|
|
432
|
+
* @enum {string}
|
|
433
|
+
*/
|
|
434
|
+
authorizationType?: "iam" | "accessKeys" | "oauth";
|
|
435
|
+
};
|
|
436
|
+
/** @description Mount configuration details (secrets omitted) */
|
|
437
|
+
MountConfigResponse: {
|
|
438
|
+
/** @description Bucket name */
|
|
439
|
+
bucketName?: string;
|
|
440
|
+
/** @description Storage endpoint URL */
|
|
441
|
+
bucketEndpoint?: string;
|
|
442
|
+
/** @description Prefix within the bucket */
|
|
443
|
+
bucketPrefix?: string;
|
|
444
|
+
};
|
|
445
|
+
DiskMetrics: {
|
|
446
|
+
/** @description Data transfer amount with unit (e.g., "1.5 GB") */
|
|
447
|
+
dataTransfer?: string;
|
|
448
|
+
/** @description Total request count as a formatted string (e.g., "1,234") */
|
|
449
|
+
requests?: string;
|
|
450
|
+
/** @description Average response time with unit (e.g., "45ms") */
|
|
451
|
+
avgResponseTime?: string;
|
|
452
|
+
};
|
|
453
|
+
ConnectedClient: {
|
|
454
|
+
id?: string;
|
|
455
|
+
ipAddress?: string;
|
|
456
|
+
/** Format: date-time */
|
|
457
|
+
connectedAt?: string;
|
|
458
|
+
};
|
|
459
|
+
AuthorizedUser: {
|
|
460
|
+
/** @enum {string} */
|
|
461
|
+
type?: "token" | "awssts";
|
|
462
|
+
principal?: string;
|
|
463
|
+
nickname?: string;
|
|
464
|
+
tokenSuffix?: string;
|
|
465
|
+
/** Format: date-time */
|
|
466
|
+
createdAt?: string;
|
|
467
|
+
};
|
|
468
|
+
/** @description All API responses use a standard envelope with `success: boolean` and `data` (on success) or `error: string` (on failure). The ApiResponse_* schemas each define the specific `data` shape for their endpoint. */
|
|
469
|
+
ApiResponse_DiskList: {
|
|
470
|
+
/** @example true */
|
|
471
|
+
success: boolean;
|
|
472
|
+
data: components["schemas"]["DiskResponse"][];
|
|
473
|
+
};
|
|
474
|
+
ApiResponse_Disk: {
|
|
475
|
+
/** @example true */
|
|
476
|
+
success: boolean;
|
|
477
|
+
data: components["schemas"]["DiskResponse"];
|
|
478
|
+
};
|
|
479
|
+
ApiResponse_CreateDisk: {
|
|
480
|
+
/** @example true */
|
|
481
|
+
success: boolean;
|
|
482
|
+
data: {
|
|
483
|
+
/** @example dsk-0123456789abcdef */
|
|
484
|
+
diskId?: string;
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
ApiResponse_AuthorizedUser: {
|
|
488
|
+
/** @example true */
|
|
489
|
+
success: boolean;
|
|
490
|
+
data: components["schemas"]["AuthorizedUser"];
|
|
491
|
+
};
|
|
492
|
+
CreateApiTokenRequest: {
|
|
493
|
+
/** @description Token name */
|
|
494
|
+
name: string;
|
|
495
|
+
/** @description Token description */
|
|
496
|
+
description?: string;
|
|
497
|
+
};
|
|
498
|
+
ApiTokenResponse: {
|
|
499
|
+
/** @description Token hash/ID */
|
|
500
|
+
id?: string;
|
|
501
|
+
name?: string;
|
|
502
|
+
description?: string;
|
|
503
|
+
/** @description Last 4 characters of the token */
|
|
504
|
+
tokenSuffix?: string;
|
|
505
|
+
/** Format: date-time */
|
|
506
|
+
createdAt?: string;
|
|
507
|
+
/** Format: date-time */
|
|
508
|
+
lastUsedAt?: string;
|
|
509
|
+
};
|
|
510
|
+
ApiResponse_TokenList: {
|
|
511
|
+
/** @example true */
|
|
512
|
+
success: boolean;
|
|
513
|
+
data: {
|
|
514
|
+
tokens?: components["schemas"]["ApiTokenResponse"][];
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
ApiResponse_TokenCreated: {
|
|
518
|
+
/** @example true */
|
|
519
|
+
success: boolean;
|
|
520
|
+
data: components["schemas"]["ApiTokenResponse"] & {
|
|
521
|
+
/**
|
|
522
|
+
* @description Full token value (only shown at creation)
|
|
523
|
+
* @example key-abc123...
|
|
524
|
+
*/
|
|
525
|
+
token?: string;
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
responses: {
|
|
530
|
+
/** @description Invalid or missing authentication credentials */
|
|
531
|
+
Unauthorized: {
|
|
532
|
+
headers: {
|
|
533
|
+
[name: string]: unknown;
|
|
534
|
+
};
|
|
535
|
+
content: {
|
|
536
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
537
|
+
};
|
|
538
|
+
};
|
|
539
|
+
/** @description Validation error */
|
|
540
|
+
ValidationError: {
|
|
541
|
+
headers: {
|
|
542
|
+
[name: string]: unknown;
|
|
543
|
+
};
|
|
544
|
+
content: {
|
|
545
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
/** @description Resource not found */
|
|
549
|
+
NotFound: {
|
|
550
|
+
headers: {
|
|
551
|
+
[name: string]: unknown;
|
|
552
|
+
};
|
|
553
|
+
content: {
|
|
554
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
/** @description Internal server error */
|
|
558
|
+
InternalError: {
|
|
559
|
+
headers: {
|
|
560
|
+
[name: string]: unknown;
|
|
561
|
+
};
|
|
562
|
+
content: {
|
|
563
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
parameters: {
|
|
568
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
569
|
+
DiskId: string;
|
|
570
|
+
/** @description Maximum number of items to return */
|
|
571
|
+
Limit: number;
|
|
572
|
+
/** @description Pagination cursor from a previous response */
|
|
573
|
+
Cursor: string;
|
|
574
|
+
};
|
|
575
|
+
requestBodies: never;
|
|
576
|
+
headers: never;
|
|
577
|
+
pathItems: never;
|
|
578
|
+
}
|
|
579
|
+
interface operations {
|
|
580
|
+
listDisks: {
|
|
581
|
+
parameters: {
|
|
582
|
+
query?: {
|
|
583
|
+
/** @description Maximum number of items to return */
|
|
584
|
+
limit?: components["parameters"]["Limit"];
|
|
585
|
+
/** @description Pagination cursor from a previous response */
|
|
586
|
+
cursor?: components["parameters"]["Cursor"];
|
|
587
|
+
/** @description Filter disks by exact name match. */
|
|
588
|
+
name?: string;
|
|
589
|
+
};
|
|
590
|
+
header?: never;
|
|
591
|
+
path?: never;
|
|
592
|
+
cookie?: never;
|
|
593
|
+
};
|
|
594
|
+
requestBody?: never;
|
|
595
|
+
responses: {
|
|
596
|
+
/** @description List of disks */
|
|
597
|
+
200: {
|
|
598
|
+
headers: {
|
|
599
|
+
[name: string]: unknown;
|
|
600
|
+
};
|
|
601
|
+
content: {
|
|
602
|
+
"application/json": components["schemas"]["ApiResponse_DiskList"];
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
401: components["responses"]["Unauthorized"];
|
|
606
|
+
500: components["responses"]["InternalError"];
|
|
607
|
+
};
|
|
608
|
+
};
|
|
609
|
+
createDisk: {
|
|
610
|
+
parameters: {
|
|
611
|
+
query?: never;
|
|
612
|
+
header?: never;
|
|
613
|
+
path?: never;
|
|
614
|
+
cookie?: never;
|
|
615
|
+
};
|
|
616
|
+
requestBody: {
|
|
617
|
+
content: {
|
|
618
|
+
"application/json": components["schemas"]["CreateDiskRequest"];
|
|
619
|
+
};
|
|
620
|
+
};
|
|
621
|
+
responses: {
|
|
622
|
+
/** @description Disk with this name already exists and configuration matches (idempotent) */
|
|
623
|
+
200: {
|
|
624
|
+
headers: {
|
|
625
|
+
[name: string]: unknown;
|
|
626
|
+
};
|
|
627
|
+
content: {
|
|
628
|
+
"application/json": components["schemas"]["ApiResponse_CreateDisk"];
|
|
629
|
+
};
|
|
630
|
+
};
|
|
631
|
+
/** @description Disk created successfully */
|
|
632
|
+
201: {
|
|
633
|
+
headers: {
|
|
634
|
+
[name: string]: unknown;
|
|
635
|
+
};
|
|
636
|
+
content: {
|
|
637
|
+
"application/json": components["schemas"]["ApiResponse_CreateDisk"];
|
|
638
|
+
};
|
|
639
|
+
};
|
|
640
|
+
400: components["responses"]["ValidationError"];
|
|
641
|
+
401: components["responses"]["Unauthorized"];
|
|
642
|
+
/** @description Access denied (e.g., preview region not enabled) */
|
|
643
|
+
403: {
|
|
644
|
+
headers: {
|
|
645
|
+
[name: string]: unknown;
|
|
646
|
+
};
|
|
647
|
+
content: {
|
|
648
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
/** @description Disk with this name already exists but configuration differs */
|
|
652
|
+
409: {
|
|
653
|
+
headers: {
|
|
654
|
+
[name: string]: unknown;
|
|
655
|
+
};
|
|
656
|
+
content: {
|
|
657
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
658
|
+
};
|
|
659
|
+
};
|
|
660
|
+
500: components["responses"]["InternalError"];
|
|
661
|
+
};
|
|
662
|
+
};
|
|
663
|
+
getDisk: {
|
|
664
|
+
parameters: {
|
|
665
|
+
query?: never;
|
|
666
|
+
header?: never;
|
|
667
|
+
path: {
|
|
668
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
669
|
+
id: components["parameters"]["DiskId"];
|
|
670
|
+
};
|
|
671
|
+
cookie?: never;
|
|
672
|
+
};
|
|
673
|
+
requestBody?: never;
|
|
674
|
+
responses: {
|
|
675
|
+
/** @description Disk details */
|
|
676
|
+
200: {
|
|
677
|
+
headers: {
|
|
678
|
+
[name: string]: unknown;
|
|
679
|
+
};
|
|
680
|
+
content: {
|
|
681
|
+
"application/json": components["schemas"]["ApiResponse_Disk"];
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
400: components["responses"]["ValidationError"];
|
|
685
|
+
401: components["responses"]["Unauthorized"];
|
|
686
|
+
404: components["responses"]["NotFound"];
|
|
687
|
+
500: components["responses"]["InternalError"];
|
|
688
|
+
};
|
|
689
|
+
};
|
|
690
|
+
deleteDisk: {
|
|
691
|
+
parameters: {
|
|
692
|
+
query?: never;
|
|
693
|
+
header?: never;
|
|
694
|
+
path: {
|
|
695
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
696
|
+
id: components["parameters"]["DiskId"];
|
|
697
|
+
};
|
|
698
|
+
cookie?: never;
|
|
699
|
+
};
|
|
700
|
+
requestBody?: never;
|
|
701
|
+
responses: {
|
|
702
|
+
/** @description Disk deleted successfully */
|
|
703
|
+
200: {
|
|
704
|
+
headers: {
|
|
705
|
+
[name: string]: unknown;
|
|
706
|
+
};
|
|
707
|
+
content: {
|
|
708
|
+
"application/json": components["schemas"]["ApiResponse_Empty"];
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
400: components["responses"]["ValidationError"];
|
|
712
|
+
401: components["responses"]["Unauthorized"];
|
|
713
|
+
404: components["responses"]["NotFound"];
|
|
714
|
+
500: components["responses"]["InternalError"];
|
|
715
|
+
};
|
|
716
|
+
};
|
|
717
|
+
addDiskUser: {
|
|
718
|
+
parameters: {
|
|
719
|
+
query?: never;
|
|
720
|
+
header?: never;
|
|
721
|
+
path: {
|
|
722
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
723
|
+
id: components["parameters"]["DiskId"];
|
|
724
|
+
};
|
|
725
|
+
cookie?: never;
|
|
726
|
+
};
|
|
727
|
+
requestBody: {
|
|
728
|
+
content: {
|
|
729
|
+
"application/json": components["schemas"]["DiskUser"];
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
responses: {
|
|
733
|
+
/** @description User added successfully */
|
|
734
|
+
201: {
|
|
735
|
+
headers: {
|
|
736
|
+
[name: string]: unknown;
|
|
737
|
+
};
|
|
738
|
+
content: {
|
|
739
|
+
"application/json": components["schemas"]["ApiResponse_AuthorizedUser"];
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
400: components["responses"]["ValidationError"];
|
|
743
|
+
401: components["responses"]["Unauthorized"];
|
|
744
|
+
500: components["responses"]["InternalError"];
|
|
745
|
+
};
|
|
746
|
+
};
|
|
747
|
+
removeDiskUser: {
|
|
748
|
+
parameters: {
|
|
749
|
+
query: {
|
|
750
|
+
/** @description The user's principal identifier. For token type, this is the MD5 hash (hex-encoded) of the token principal. For awssts type, this is the full IAM ARN (e.g., arn:aws:iam::123456789012:role/MyRole). */
|
|
751
|
+
principal: string;
|
|
752
|
+
};
|
|
753
|
+
header?: never;
|
|
754
|
+
path: {
|
|
755
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
756
|
+
id: components["parameters"]["DiskId"];
|
|
757
|
+
/** @description The type of user authentication */
|
|
758
|
+
userType: "token" | "awssts";
|
|
759
|
+
};
|
|
760
|
+
cookie?: never;
|
|
761
|
+
};
|
|
762
|
+
requestBody?: never;
|
|
763
|
+
responses: {
|
|
764
|
+
/** @description User removed successfully */
|
|
765
|
+
200: {
|
|
766
|
+
headers: {
|
|
767
|
+
[name: string]: unknown;
|
|
768
|
+
};
|
|
769
|
+
content: {
|
|
770
|
+
"application/json": components["schemas"]["ApiResponse_Message"];
|
|
771
|
+
};
|
|
772
|
+
};
|
|
773
|
+
400: components["responses"]["ValidationError"];
|
|
774
|
+
401: components["responses"]["Unauthorized"];
|
|
775
|
+
500: components["responses"]["InternalError"];
|
|
776
|
+
};
|
|
777
|
+
};
|
|
778
|
+
listApiTokens: {
|
|
779
|
+
parameters: {
|
|
780
|
+
query?: {
|
|
781
|
+
/** @description Maximum number of items to return */
|
|
782
|
+
limit?: components["parameters"]["Limit"];
|
|
783
|
+
/** @description Pagination cursor from a previous response */
|
|
784
|
+
cursor?: components["parameters"]["Cursor"];
|
|
785
|
+
};
|
|
786
|
+
header?: never;
|
|
787
|
+
path?: never;
|
|
788
|
+
cookie?: never;
|
|
789
|
+
};
|
|
790
|
+
requestBody?: never;
|
|
791
|
+
responses: {
|
|
792
|
+
/** @description List of API tokens */
|
|
793
|
+
200: {
|
|
794
|
+
headers: {
|
|
795
|
+
[name: string]: unknown;
|
|
796
|
+
};
|
|
797
|
+
content: {
|
|
798
|
+
"application/json": components["schemas"]["ApiResponse_TokenList"];
|
|
799
|
+
};
|
|
800
|
+
};
|
|
801
|
+
401: components["responses"]["Unauthorized"];
|
|
802
|
+
500: components["responses"]["InternalError"];
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
createApiToken: {
|
|
806
|
+
parameters: {
|
|
807
|
+
query?: never;
|
|
808
|
+
header?: never;
|
|
809
|
+
path?: never;
|
|
810
|
+
cookie?: never;
|
|
811
|
+
};
|
|
812
|
+
requestBody: {
|
|
813
|
+
content: {
|
|
814
|
+
"application/json": components["schemas"]["CreateApiTokenRequest"];
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
responses: {
|
|
818
|
+
/** @description Token created successfully */
|
|
819
|
+
201: {
|
|
820
|
+
headers: {
|
|
821
|
+
[name: string]: unknown;
|
|
822
|
+
};
|
|
823
|
+
content: {
|
|
824
|
+
"application/json": components["schemas"]["ApiResponse_TokenCreated"];
|
|
825
|
+
};
|
|
826
|
+
};
|
|
827
|
+
400: components["responses"]["ValidationError"];
|
|
828
|
+
401: components["responses"]["Unauthorized"];
|
|
829
|
+
500: components["responses"]["InternalError"];
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
deleteApiToken: {
|
|
833
|
+
parameters: {
|
|
834
|
+
query?: never;
|
|
835
|
+
header?: never;
|
|
836
|
+
path: {
|
|
837
|
+
/** @description The token ID (hash) */
|
|
838
|
+
id: string;
|
|
839
|
+
};
|
|
840
|
+
cookie?: never;
|
|
841
|
+
};
|
|
842
|
+
requestBody?: never;
|
|
843
|
+
responses: {
|
|
844
|
+
/** @description Token deleted successfully */
|
|
845
|
+
200: {
|
|
846
|
+
headers: {
|
|
847
|
+
[name: string]: unknown;
|
|
848
|
+
};
|
|
849
|
+
content: {
|
|
850
|
+
"application/json": components["schemas"]["ApiResponse_Message"];
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
401: components["responses"]["Unauthorized"];
|
|
854
|
+
404: components["responses"]["NotFound"];
|
|
855
|
+
500: components["responses"]["InternalError"];
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
type ApiClient = Client<paths>;
|
|
861
|
+
|
|
862
|
+
type DiskResponse = components["schemas"]["DiskResponse"];
|
|
863
|
+
type MountResponse = components["schemas"]["MountResponse"];
|
|
864
|
+
type MountConfigResponse = components["schemas"]["MountConfigResponse"];
|
|
865
|
+
type DiskMetrics = components["schemas"]["DiskMetrics"];
|
|
866
|
+
type ConnectedClient = components["schemas"]["ConnectedClient"];
|
|
867
|
+
type AuthorizedUser = components["schemas"]["AuthorizedUser"];
|
|
868
|
+
type CreateDiskRequest = components["schemas"]["CreateDiskRequest"];
|
|
869
|
+
type MountConfig = components["schemas"]["MountConfig"];
|
|
870
|
+
type S3Mount = components["schemas"]["S3Mount"];
|
|
871
|
+
type GCSMount = components["schemas"]["GCSMount"];
|
|
872
|
+
type R2Mount = components["schemas"]["R2Mount"];
|
|
873
|
+
type S3CompatibleMount = components["schemas"]["S3CompatibleMount"];
|
|
874
|
+
type AzureBlobMount = components["schemas"]["AzureBlobMount"];
|
|
875
|
+
type DiskUser = components["schemas"]["DiskUser"];
|
|
876
|
+
type TokenUser = components["schemas"]["TokenUser"];
|
|
877
|
+
type AwsStsUser = components["schemas"]["AwsStsUser"];
|
|
878
|
+
type CreateApiTokenRequest = components["schemas"]["CreateApiTokenRequest"];
|
|
879
|
+
type ApiTokenResponse = components["schemas"]["ApiTokenResponse"];
|
|
880
|
+
type DiskStatus = DiskResponse["status"];
|
|
881
|
+
|
|
882
|
+
interface MountOptions {
|
|
883
|
+
authToken?: string;
|
|
884
|
+
logLevel?: string;
|
|
885
|
+
serverAddress?: string;
|
|
886
|
+
insecure?: boolean;
|
|
887
|
+
}
|
|
888
|
+
declare class Disk {
|
|
889
|
+
readonly id: string;
|
|
890
|
+
readonly name: string;
|
|
891
|
+
readonly organization: string;
|
|
892
|
+
readonly status: DiskStatus;
|
|
893
|
+
readonly provider: string;
|
|
894
|
+
readonly region: string;
|
|
895
|
+
readonly createdAt: string;
|
|
896
|
+
readonly fsHandlerStatus?: string;
|
|
897
|
+
readonly lastAccessed?: string;
|
|
898
|
+
readonly dataSize?: number;
|
|
899
|
+
readonly monthlyUsage?: string;
|
|
900
|
+
readonly mounts?: MountResponse[];
|
|
901
|
+
readonly metrics?: DiskMetrics;
|
|
902
|
+
readonly connectedClients?: ConnectedClient[];
|
|
903
|
+
readonly authorizedUsers?: AuthorizedUser[];
|
|
904
|
+
/** @internal */
|
|
905
|
+
private readonly _client;
|
|
906
|
+
/** @internal */
|
|
907
|
+
private readonly _archilRegion;
|
|
908
|
+
/** @internal */
|
|
909
|
+
constructor(data: DiskResponse, client: ApiClient, archilRegion: string);
|
|
910
|
+
addUser(user: DiskUser): Promise<AuthorizedUser>;
|
|
911
|
+
removeUser(userType: "token" | "awssts", principal: string): Promise<void>;
|
|
912
|
+
delete(): Promise<void>;
|
|
913
|
+
/**
|
|
914
|
+
* Connect to this disk's data plane via the native ArchilClient.
|
|
915
|
+
*
|
|
916
|
+
* Requires the native module to be available (platform-specific .node binary).
|
|
917
|
+
*/
|
|
918
|
+
mount(opts?: MountOptions): Promise<unknown>;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
interface ListDisksOptions {
|
|
922
|
+
limit?: number;
|
|
923
|
+
cursor?: string;
|
|
924
|
+
}
|
|
925
|
+
declare class Disks {
|
|
926
|
+
/** @internal */
|
|
927
|
+
private readonly _client;
|
|
928
|
+
/** @internal */
|
|
929
|
+
private readonly _region;
|
|
930
|
+
/** @internal */
|
|
931
|
+
constructor(client: ApiClient, region: string);
|
|
932
|
+
list(opts?: ListDisksOptions): Promise<Disk[]>;
|
|
933
|
+
get(id: string): Promise<Disk>;
|
|
934
|
+
/**
|
|
935
|
+
* Create a new disk and return a Disk object with full details.
|
|
936
|
+
*
|
|
937
|
+
* Internally calls POST /api/disks (returns diskId) then GET /api/disks/{id}.
|
|
938
|
+
*/
|
|
939
|
+
create(req: CreateDiskRequest): Promise<Disk>;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
interface ListTokensOptions {
|
|
943
|
+
limit?: number;
|
|
944
|
+
cursor?: string;
|
|
945
|
+
}
|
|
946
|
+
declare class Tokens {
|
|
947
|
+
/** @internal */
|
|
948
|
+
private readonly _client;
|
|
949
|
+
/** @internal */
|
|
950
|
+
constructor(client: ApiClient);
|
|
951
|
+
list(opts?: ListTokensOptions): Promise<ApiTokenResponse[]>;
|
|
952
|
+
create(req: CreateApiTokenRequest): Promise<ApiTokenResponse & {
|
|
953
|
+
token?: string;
|
|
954
|
+
}>;
|
|
955
|
+
delete(id: string): Promise<void>;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
interface ArchilOptions {
|
|
959
|
+
apiKey: string;
|
|
960
|
+
region: string;
|
|
961
|
+
/** Override the control plane base URL (useful for testing). */
|
|
962
|
+
baseUrl?: string;
|
|
963
|
+
}
|
|
964
|
+
declare class Archil {
|
|
965
|
+
readonly disks: Disks;
|
|
966
|
+
readonly tokens: Tokens;
|
|
967
|
+
constructor(opts: ArchilOptions);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
declare class ArchilApiError extends Error {
|
|
971
|
+
readonly status: number;
|
|
972
|
+
readonly code?: string;
|
|
973
|
+
constructor(message: string, status: number, code?: string);
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
export { type ApiTokenResponse, Archil, ArchilApiError, type ArchilOptions, type AuthorizedUser, type AwsStsUser, type AzureBlobMount, type ConnectedClient, type CreateApiTokenRequest, type CreateDiskRequest, Disk, type DiskMetrics, type DiskResponse, type DiskStatus, type DiskUser, Disks, type GCSMount, type ListDisksOptions, type ListTokensOptions, type MountConfig, type MountConfigResponse, type MountOptions, type MountResponse, type R2Mount, type S3CompatibleMount, type S3Mount, type TokenUser, Tokens };
|