@archildata/api-types 0.0.101 → 0.0.103
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/index.d.ts +205 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -654,6 +654,26 @@ export interface paths {
|
|
|
654
654
|
patch?: never;
|
|
655
655
|
trace?: never;
|
|
656
656
|
};
|
|
657
|
+
"/api/disks/{id}/metrics": {
|
|
658
|
+
parameters: {
|
|
659
|
+
query?: never;
|
|
660
|
+
header?: never;
|
|
661
|
+
path?: never;
|
|
662
|
+
cookie?: never;
|
|
663
|
+
};
|
|
664
|
+
/**
|
|
665
|
+
* Get a disk's metrics
|
|
666
|
+
* @description Returns points in time order, omitting intervals with no samples. The current interval updates about once a minute. History follows usage retention (90 days by default).
|
|
667
|
+
*/
|
|
668
|
+
get: operations["getDiskMetrics"];
|
|
669
|
+
put?: never;
|
|
670
|
+
post?: never;
|
|
671
|
+
delete?: never;
|
|
672
|
+
options?: never;
|
|
673
|
+
head?: never;
|
|
674
|
+
patch?: never;
|
|
675
|
+
trace?: never;
|
|
676
|
+
};
|
|
657
677
|
"/api/disks/{id}/sandbox-mount": {
|
|
658
678
|
parameters: {
|
|
659
679
|
query?: never;
|
|
@@ -988,6 +1008,12 @@ export interface paths {
|
|
|
988
1008
|
* start from a snapshot, and sandboxes created from its `image_id` get
|
|
989
1009
|
* that size unless they set their own; other sizes boot from scratch.
|
|
990
1010
|
* Each size of a source is a separate image.
|
|
1011
|
+
*
|
|
1012
|
+
* `dockerfile` builds the image from a Dockerfile instead of pulling
|
|
1013
|
+
* `source`, and the image is visible only to its account. Requesting
|
|
1014
|
+
* the same Dockerfile, `context` and size again returns the same image;
|
|
1015
|
+
* a `ready` one is returned without building again, even if a `FROM`
|
|
1016
|
+
* tag has moved since.
|
|
991
1017
|
*/
|
|
992
1018
|
post: operations["createImage"];
|
|
993
1019
|
delete?: never;
|
|
@@ -996,6 +1022,35 @@ export interface paths {
|
|
|
996
1022
|
patch?: never;
|
|
997
1023
|
trace?: never;
|
|
998
1024
|
};
|
|
1025
|
+
"/api/images/contexts": {
|
|
1026
|
+
parameters: {
|
|
1027
|
+
query?: never;
|
|
1028
|
+
header?: never;
|
|
1029
|
+
path?: never;
|
|
1030
|
+
cookie?: never;
|
|
1031
|
+
};
|
|
1032
|
+
get?: never;
|
|
1033
|
+
put?: never;
|
|
1034
|
+
/**
|
|
1035
|
+
* Upload a Dockerfile build context
|
|
1036
|
+
* @description Prepares the upload of a build context: a gzip-compressed tar of the
|
|
1037
|
+
* files a Dockerfile's `COPY` and `ADD` read, named by the SHA-256 of
|
|
1038
|
+
* the compressed archive. If the account already stored that archive,
|
|
1039
|
+
* `present` is true and there is nothing to upload. Otherwise `PUT` the
|
|
1040
|
+
* archive to `upload_url` with every header in `upload_headers` before
|
|
1041
|
+
* `expires_at`; a body of another size or hash is rejected.
|
|
1042
|
+
*
|
|
1043
|
+
* Pass `sha256:<sha256>` as `context` to `POST /api/images`. Contexts
|
|
1044
|
+
* are deleted about a day after upload; a build requested after that
|
|
1045
|
+
* needs the context uploaded again.
|
|
1046
|
+
*/
|
|
1047
|
+
post: operations["createImageContext"];
|
|
1048
|
+
delete?: never;
|
|
1049
|
+
options?: never;
|
|
1050
|
+
head?: never;
|
|
1051
|
+
patch?: never;
|
|
1052
|
+
trace?: never;
|
|
1053
|
+
};
|
|
999
1054
|
"/api/images/{image_id}": {
|
|
1000
1055
|
parameters: {
|
|
1001
1056
|
query?: never;
|
|
@@ -2515,10 +2570,15 @@ export interface components {
|
|
|
2515
2570
|
/** @description Password or access token, such as a GitHub personal access token with `read:packages`. */
|
|
2516
2571
|
password: string;
|
|
2517
2572
|
};
|
|
2573
|
+
/** @description Set either `source` (with optional `registry_auth`) or `dockerfile`. */
|
|
2518
2574
|
CreateImageRequest: {
|
|
2519
2575
|
/** @description Linux OCI image reference. Docker shorthand and tags are accepted. */
|
|
2520
|
-
source
|
|
2576
|
+
source?: string;
|
|
2521
2577
|
registry_auth?: components["schemas"]["RegistryAuth"];
|
|
2578
|
+
/** @description Dockerfile to build the image from, up to 64 KiB. Its `FROM` images must be public. */
|
|
2579
|
+
dockerfile?: string;
|
|
2580
|
+
/** @description Build context uploaded with `POST /api/images/contexts`, as `sha256:` and the archive's SHA-256. Without it, the Dockerfile builds with an empty context. */
|
|
2581
|
+
context?: string;
|
|
2522
2582
|
/** @default 1 */
|
|
2523
2583
|
vcpu_count: number;
|
|
2524
2584
|
/** @default 2048 */
|
|
@@ -2528,12 +2588,12 @@ export interface components {
|
|
|
2528
2588
|
ImageState: "building" | "ready" | "failed";
|
|
2529
2589
|
Image: {
|
|
2530
2590
|
image_id: string;
|
|
2531
|
-
/** @description Normalized OCI reference the image is pulled from. */
|
|
2591
|
+
/** @description Normalized OCI reference the image is pulled from. For a Dockerfile image, `dockerfile@sha256:` and a digest of the Dockerfile and context. */
|
|
2532
2592
|
source: string;
|
|
2533
2593
|
/** @description The size sandboxes created from this image get by default. */
|
|
2534
2594
|
vcpu_count: number;
|
|
2535
2595
|
mem_size_mib: number;
|
|
2536
|
-
/** @description Whether the image is pulled with registry credentials. */
|
|
2596
|
+
/** @description Whether the image is visible only to its account: it is pulled with registry credentials or built from a Dockerfile. */
|
|
2537
2597
|
private: boolean;
|
|
2538
2598
|
status: components["schemas"]["ImageState"];
|
|
2539
2599
|
/** @description The most recent successful build. Sandboxes created from this `image_id` boot it, and keep it after the image is rebuilt. */
|
|
@@ -2541,10 +2601,12 @@ export interface components {
|
|
|
2541
2601
|
/** @description The pulled manifest, as `repository@sha256:...`. */
|
|
2542
2602
|
canonical_source?: string;
|
|
2543
2603
|
/**
|
|
2544
|
-
* @description Set when `failed`. `invalid_source`: the registry reported the image missing or denied access, so requesting
|
|
2604
|
+
* @description Set when `failed`. `invalid_source`: the registry reported the image missing or denied access, or the Dockerfile build failed (see `build_log`), so requesting the same image again will not help. `interrupted`: the build did not finish; request the image again.
|
|
2545
2605
|
* @enum {string}
|
|
2546
2606
|
*/
|
|
2547
2607
|
failure_reason?: "invalid_source" | "interrupted";
|
|
2608
|
+
/** @description The last 64 KiB of a failed Dockerfile build's output, set with `invalid_source`. */
|
|
2609
|
+
build_log?: string;
|
|
2548
2610
|
/** Format: date-time */
|
|
2549
2611
|
created_at: string;
|
|
2550
2612
|
/** Format: date-time */
|
|
@@ -2555,6 +2617,29 @@ export interface components {
|
|
|
2555
2617
|
success: boolean;
|
|
2556
2618
|
data: components["schemas"]["Image"];
|
|
2557
2619
|
};
|
|
2620
|
+
ImageContextRequest: {
|
|
2621
|
+
/** @description SHA-256 of the gzip-compressed tar archive, in hex. */
|
|
2622
|
+
sha256: string;
|
|
2623
|
+
/**
|
|
2624
|
+
* Format: int64
|
|
2625
|
+
* @description Size of the compressed archive, up to 512 MiB.
|
|
2626
|
+
*/
|
|
2627
|
+
size_bytes: number;
|
|
2628
|
+
};
|
|
2629
|
+
ImageContextUpload: {
|
|
2630
|
+
present: boolean;
|
|
2631
|
+
upload_url?: string;
|
|
2632
|
+
upload_headers?: {
|
|
2633
|
+
[key: string]: string;
|
|
2634
|
+
};
|
|
2635
|
+
/** Format: date-time */
|
|
2636
|
+
expires_at?: string;
|
|
2637
|
+
};
|
|
2638
|
+
ApiResponse_ImageContextUpload: {
|
|
2639
|
+
/** @example true */
|
|
2640
|
+
success: boolean;
|
|
2641
|
+
data: components["schemas"]["ImageContextUpload"];
|
|
2642
|
+
};
|
|
2558
2643
|
ApiResponse_Sandbox: {
|
|
2559
2644
|
/** @example true */
|
|
2560
2645
|
success: boolean;
|
|
@@ -3216,6 +3301,50 @@ export interface components {
|
|
|
3216
3301
|
allowedIps: string[];
|
|
3217
3302
|
};
|
|
3218
3303
|
};
|
|
3304
|
+
ApiResponse_DiskMetricSeries: {
|
|
3305
|
+
/** @example true */
|
|
3306
|
+
success: boolean;
|
|
3307
|
+
data: components["schemas"]["DiskMetricSeries"];
|
|
3308
|
+
};
|
|
3309
|
+
DiskMetricSeries: {
|
|
3310
|
+
/** @example dsk-0123456789abcdef */
|
|
3311
|
+
diskId: string;
|
|
3312
|
+
/**
|
|
3313
|
+
* Format: int64
|
|
3314
|
+
* @description Start of the range served, in Unix seconds.
|
|
3315
|
+
* @example 1794268800
|
|
3316
|
+
*/
|
|
3317
|
+
from: number;
|
|
3318
|
+
/**
|
|
3319
|
+
* Format: int64
|
|
3320
|
+
* @description End of the range served, in Unix seconds, exclusive.
|
|
3321
|
+
* @example 1794355200
|
|
3322
|
+
*/
|
|
3323
|
+
to: number;
|
|
3324
|
+
/**
|
|
3325
|
+
* @description Seconds each point covers.
|
|
3326
|
+
* @example 600
|
|
3327
|
+
*/
|
|
3328
|
+
step: number;
|
|
3329
|
+
/** @description Only metrics recorded in this region appear here. */
|
|
3330
|
+
series: {
|
|
3331
|
+
/** @description Mean active bytes over the sampled portion of each interval. */
|
|
3332
|
+
activeBytes?: components["schemas"]["DiskMetricPoint"][];
|
|
3333
|
+
};
|
|
3334
|
+
};
|
|
3335
|
+
DiskMetricPoint: {
|
|
3336
|
+
/**
|
|
3337
|
+
* Format: int64
|
|
3338
|
+
* @description Start of the interval, in Unix seconds.
|
|
3339
|
+
* @example 1794268800
|
|
3340
|
+
*/
|
|
3341
|
+
t: number;
|
|
3342
|
+
/**
|
|
3343
|
+
* Format: int64
|
|
3344
|
+
* @example 1073741824
|
|
3345
|
+
*/
|
|
3346
|
+
v: number;
|
|
3347
|
+
};
|
|
3219
3348
|
ApiResponse_SandboxMount: {
|
|
3220
3349
|
/** @example true */
|
|
3221
3350
|
success: boolean;
|
|
@@ -3799,6 +3928,15 @@ export interface components {
|
|
|
3799
3928
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
3800
3929
|
};
|
|
3801
3930
|
};
|
|
3931
|
+
/** @description This fleet cannot build images from Dockerfiles (`dockerfile_builds_unavailable`) */
|
|
3932
|
+
DockerfileBuildsUnavailable: {
|
|
3933
|
+
headers: {
|
|
3934
|
+
[name: string]: unknown;
|
|
3935
|
+
};
|
|
3936
|
+
content: {
|
|
3937
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3938
|
+
};
|
|
3939
|
+
};
|
|
3802
3940
|
/** @description The lifecycle transition is temporarily blocked and can be retried */
|
|
3803
3941
|
RetryableUnavailable: {
|
|
3804
3942
|
headers: {
|
|
@@ -5342,6 +5480,40 @@ export interface operations {
|
|
|
5342
5480
|
500: components["responses"]["InternalError"];
|
|
5343
5481
|
};
|
|
5344
5482
|
};
|
|
5483
|
+
getDiskMetrics: {
|
|
5484
|
+
parameters: {
|
|
5485
|
+
query?: {
|
|
5486
|
+
/** @description Start of the range, in Unix seconds. Defaults to 24 hours before `to`. Rounded down to a multiple of `step`. */
|
|
5487
|
+
from?: number;
|
|
5488
|
+
/** @description End of the range, in Unix seconds, exclusive. Defaults to now. */
|
|
5489
|
+
to?: number;
|
|
5490
|
+
/** @description Seconds each point covers, a multiple of 600. Defaults to 600 for a range up to a day, 1800 up to a week, and 3600 beyond. A range of more than 3,000 steps is refused. */
|
|
5491
|
+
step?: number;
|
|
5492
|
+
};
|
|
5493
|
+
header?: never;
|
|
5494
|
+
path: {
|
|
5495
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
5496
|
+
id: components["parameters"]["DiskId"];
|
|
5497
|
+
};
|
|
5498
|
+
cookie?: never;
|
|
5499
|
+
};
|
|
5500
|
+
requestBody?: never;
|
|
5501
|
+
responses: {
|
|
5502
|
+
/** @description The disk's metric series */
|
|
5503
|
+
200: {
|
|
5504
|
+
headers: {
|
|
5505
|
+
[name: string]: unknown;
|
|
5506
|
+
};
|
|
5507
|
+
content: {
|
|
5508
|
+
"application/json": components["schemas"]["ApiResponse_DiskMetricSeries"];
|
|
5509
|
+
};
|
|
5510
|
+
};
|
|
5511
|
+
400: components["responses"]["ValidationError"];
|
|
5512
|
+
401: components["responses"]["Unauthorized"];
|
|
5513
|
+
404: components["responses"]["NotFound"];
|
|
5514
|
+
500: components["responses"]["InternalError"];
|
|
5515
|
+
};
|
|
5516
|
+
};
|
|
5345
5517
|
getSandboxMount: {
|
|
5346
5518
|
parameters: {
|
|
5347
5519
|
query?: never;
|
|
@@ -5886,6 +6058,35 @@ export interface operations {
|
|
|
5886
6058
|
400: components["responses"]["ValidationError"];
|
|
5887
6059
|
401: components["responses"]["Unauthorized"];
|
|
5888
6060
|
500: components["responses"]["InternalError"];
|
|
6061
|
+
501: components["responses"]["DockerfileBuildsUnavailable"];
|
|
6062
|
+
};
|
|
6063
|
+
};
|
|
6064
|
+
createImageContext: {
|
|
6065
|
+
parameters: {
|
|
6066
|
+
query?: never;
|
|
6067
|
+
header?: never;
|
|
6068
|
+
path?: never;
|
|
6069
|
+
cookie?: never;
|
|
6070
|
+
};
|
|
6071
|
+
requestBody: {
|
|
6072
|
+
content: {
|
|
6073
|
+
"application/json": components["schemas"]["ImageContextRequest"];
|
|
6074
|
+
};
|
|
6075
|
+
};
|
|
6076
|
+
responses: {
|
|
6077
|
+
/** @description The context is stored, or where to upload it */
|
|
6078
|
+
200: {
|
|
6079
|
+
headers: {
|
|
6080
|
+
[name: string]: unknown;
|
|
6081
|
+
};
|
|
6082
|
+
content: {
|
|
6083
|
+
"application/json": components["schemas"]["ApiResponse_ImageContextUpload"];
|
|
6084
|
+
};
|
|
6085
|
+
};
|
|
6086
|
+
400: components["responses"]["ValidationError"];
|
|
6087
|
+
401: components["responses"]["Unauthorized"];
|
|
6088
|
+
500: components["responses"]["InternalError"];
|
|
6089
|
+
501: components["responses"]["DockerfileBuildsUnavailable"];
|
|
5889
6090
|
};
|
|
5890
6091
|
};
|
|
5891
6092
|
getImage: {
|