@archildata/api-types 0.0.100 → 0.0.102
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 +166 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -883,7 +883,9 @@ export interface paths {
|
|
|
883
883
|
};
|
|
884
884
|
/**
|
|
885
885
|
* Get an exec's status and result
|
|
886
|
-
* @description `wait` waits up to that many seconds for the exec to end.
|
|
886
|
+
* @description `wait` waits up to that many seconds for the exec to end. Needs the
|
|
887
|
+
* permissions that started the exec: `disk:exec:<id>` for each of its
|
|
888
|
+
* disks, or `workspace:exec` for one without a disk.
|
|
887
889
|
*/
|
|
888
890
|
get: operations["getExec"];
|
|
889
891
|
put?: never;
|
|
@@ -894,6 +896,27 @@ export interface paths {
|
|
|
894
896
|
patch?: never;
|
|
895
897
|
trace?: never;
|
|
896
898
|
};
|
|
899
|
+
"/api/exec/{execId}/cancel": {
|
|
900
|
+
parameters: {
|
|
901
|
+
query?: never;
|
|
902
|
+
header?: never;
|
|
903
|
+
path?: never;
|
|
904
|
+
cookie?: never;
|
|
905
|
+
};
|
|
906
|
+
get?: never;
|
|
907
|
+
put?: never;
|
|
908
|
+
/**
|
|
909
|
+
* Cancel an exec
|
|
910
|
+
* @description Needs the permissions that started the exec: `disk:exec:<id>` for each
|
|
911
|
+
* of its disks, or `workspace:exec` for one without a disk.
|
|
912
|
+
*/
|
|
913
|
+
post: operations["cancelExec"];
|
|
914
|
+
delete?: never;
|
|
915
|
+
options?: never;
|
|
916
|
+
head?: never;
|
|
917
|
+
patch?: never;
|
|
918
|
+
trace?: never;
|
|
919
|
+
};
|
|
897
920
|
"/api/tokens": {
|
|
898
921
|
parameters: {
|
|
899
922
|
query?: never;
|
|
@@ -965,6 +988,12 @@ export interface paths {
|
|
|
965
988
|
* start from a snapshot, and sandboxes created from its `image_id` get
|
|
966
989
|
* that size unless they set their own; other sizes boot from scratch.
|
|
967
990
|
* Each size of a source is a separate image.
|
|
991
|
+
*
|
|
992
|
+
* `dockerfile` builds the image from a Dockerfile instead of pulling
|
|
993
|
+
* `source`, and the image is visible only to its account. Requesting
|
|
994
|
+
* the same Dockerfile, `context` and size again returns the same image;
|
|
995
|
+
* a `ready` one is returned without building again, even if a `FROM`
|
|
996
|
+
* tag has moved since.
|
|
968
997
|
*/
|
|
969
998
|
post: operations["createImage"];
|
|
970
999
|
delete?: never;
|
|
@@ -973,6 +1002,35 @@ export interface paths {
|
|
|
973
1002
|
patch?: never;
|
|
974
1003
|
trace?: never;
|
|
975
1004
|
};
|
|
1005
|
+
"/api/images/contexts": {
|
|
1006
|
+
parameters: {
|
|
1007
|
+
query?: never;
|
|
1008
|
+
header?: never;
|
|
1009
|
+
path?: never;
|
|
1010
|
+
cookie?: never;
|
|
1011
|
+
};
|
|
1012
|
+
get?: never;
|
|
1013
|
+
put?: never;
|
|
1014
|
+
/**
|
|
1015
|
+
* Upload a Dockerfile build context
|
|
1016
|
+
* @description Prepares the upload of a build context: a gzip-compressed tar of the
|
|
1017
|
+
* files a Dockerfile's `COPY` and `ADD` read, named by the SHA-256 of
|
|
1018
|
+
* the compressed archive. If the account already stored that archive,
|
|
1019
|
+
* `present` is true and there is nothing to upload. Otherwise `PUT` the
|
|
1020
|
+
* archive to `upload_url` with every header in `upload_headers` before
|
|
1021
|
+
* `expires_at`; a body of another size or hash is rejected.
|
|
1022
|
+
*
|
|
1023
|
+
* Pass `sha256:<sha256>` as `context` to `POST /api/images`. Contexts
|
|
1024
|
+
* are deleted about a day after upload; a build requested after that
|
|
1025
|
+
* needs the context uploaded again.
|
|
1026
|
+
*/
|
|
1027
|
+
post: operations["createImageContext"];
|
|
1028
|
+
delete?: never;
|
|
1029
|
+
options?: never;
|
|
1030
|
+
head?: never;
|
|
1031
|
+
patch?: never;
|
|
1032
|
+
trace?: never;
|
|
1033
|
+
};
|
|
976
1034
|
"/api/images/{image_id}": {
|
|
977
1035
|
parameters: {
|
|
978
1036
|
query?: never;
|
|
@@ -2492,10 +2550,15 @@ export interface components {
|
|
|
2492
2550
|
/** @description Password or access token, such as a GitHub personal access token with `read:packages`. */
|
|
2493
2551
|
password: string;
|
|
2494
2552
|
};
|
|
2553
|
+
/** @description Set either `source` (with optional `registry_auth`) or `dockerfile`. */
|
|
2495
2554
|
CreateImageRequest: {
|
|
2496
2555
|
/** @description Linux OCI image reference. Docker shorthand and tags are accepted. */
|
|
2497
|
-
source
|
|
2556
|
+
source?: string;
|
|
2498
2557
|
registry_auth?: components["schemas"]["RegistryAuth"];
|
|
2558
|
+
/** @description Dockerfile to build the image from, up to 64 KiB. Its `FROM` images must be public. */
|
|
2559
|
+
dockerfile?: string;
|
|
2560
|
+
/** @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. */
|
|
2561
|
+
context?: string;
|
|
2499
2562
|
/** @default 1 */
|
|
2500
2563
|
vcpu_count: number;
|
|
2501
2564
|
/** @default 2048 */
|
|
@@ -2505,12 +2568,12 @@ export interface components {
|
|
|
2505
2568
|
ImageState: "building" | "ready" | "failed";
|
|
2506
2569
|
Image: {
|
|
2507
2570
|
image_id: string;
|
|
2508
|
-
/** @description Normalized OCI reference the image is pulled from. */
|
|
2571
|
+
/** @description Normalized OCI reference the image is pulled from. For a Dockerfile image, `dockerfile@sha256:` and a digest of the Dockerfile and context. */
|
|
2509
2572
|
source: string;
|
|
2510
2573
|
/** @description The size sandboxes created from this image get by default. */
|
|
2511
2574
|
vcpu_count: number;
|
|
2512
2575
|
mem_size_mib: number;
|
|
2513
|
-
/** @description Whether the image is pulled with registry credentials. */
|
|
2576
|
+
/** @description Whether the image is visible only to its account: it is pulled with registry credentials or built from a Dockerfile. */
|
|
2514
2577
|
private: boolean;
|
|
2515
2578
|
status: components["schemas"]["ImageState"];
|
|
2516
2579
|
/** @description The most recent successful build. Sandboxes created from this `image_id` boot it, and keep it after the image is rebuilt. */
|
|
@@ -2518,10 +2581,12 @@ export interface components {
|
|
|
2518
2581
|
/** @description The pulled manifest, as `repository@sha256:...`. */
|
|
2519
2582
|
canonical_source?: string;
|
|
2520
2583
|
/**
|
|
2521
|
-
* @description Set when `failed`. `invalid_source`: the registry reported the image missing or denied access, so requesting
|
|
2584
|
+
* @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.
|
|
2522
2585
|
* @enum {string}
|
|
2523
2586
|
*/
|
|
2524
2587
|
failure_reason?: "invalid_source" | "interrupted";
|
|
2588
|
+
/** @description The last 64 KiB of a failed Dockerfile build's output, set with `invalid_source`. */
|
|
2589
|
+
build_log?: string;
|
|
2525
2590
|
/** Format: date-time */
|
|
2526
2591
|
created_at: string;
|
|
2527
2592
|
/** Format: date-time */
|
|
@@ -2532,6 +2597,29 @@ export interface components {
|
|
|
2532
2597
|
success: boolean;
|
|
2533
2598
|
data: components["schemas"]["Image"];
|
|
2534
2599
|
};
|
|
2600
|
+
ImageContextRequest: {
|
|
2601
|
+
/** @description SHA-256 of the gzip-compressed tar archive, in hex. */
|
|
2602
|
+
sha256: string;
|
|
2603
|
+
/**
|
|
2604
|
+
* Format: int64
|
|
2605
|
+
* @description Size of the compressed archive, up to 512 MiB.
|
|
2606
|
+
*/
|
|
2607
|
+
size_bytes: number;
|
|
2608
|
+
};
|
|
2609
|
+
ImageContextUpload: {
|
|
2610
|
+
present: boolean;
|
|
2611
|
+
upload_url?: string;
|
|
2612
|
+
upload_headers?: {
|
|
2613
|
+
[key: string]: string;
|
|
2614
|
+
};
|
|
2615
|
+
/** Format: date-time */
|
|
2616
|
+
expires_at?: string;
|
|
2617
|
+
};
|
|
2618
|
+
ApiResponse_ImageContextUpload: {
|
|
2619
|
+
/** @example true */
|
|
2620
|
+
success: boolean;
|
|
2621
|
+
data: components["schemas"]["ImageContextUpload"];
|
|
2622
|
+
};
|
|
2535
2623
|
ApiResponse_Sandbox: {
|
|
2536
2624
|
/** @example true */
|
|
2537
2625
|
success: boolean;
|
|
@@ -3397,7 +3485,7 @@ export interface components {
|
|
|
3397
3485
|
ExecStatus: {
|
|
3398
3486
|
execId: string;
|
|
3399
3487
|
/**
|
|
3400
|
-
* @description `completed` when the command exited, whatever its exit code; `failed` when it timed out or couldn't run.
|
|
3488
|
+
* @description `completed` when the command exited, whatever its exit code; `failed` when it timed out, was cancelled, or couldn't run.
|
|
3401
3489
|
* @enum {string}
|
|
3402
3490
|
*/
|
|
3403
3491
|
status: "running" | "stopping" | "completed" | "failed";
|
|
@@ -3427,7 +3515,7 @@ export interface components {
|
|
|
3427
3515
|
* @description Map of relative path under `/mnt/archil` to the disk to mount
|
|
3428
3516
|
* there. Relative paths must be non-empty, non-absolute, and contain
|
|
3429
3517
|
* no `.` or `..` segments. Running without disks needs the
|
|
3430
|
-
* `
|
|
3518
|
+
* `workspace:exec` permission.
|
|
3431
3519
|
*
|
|
3432
3520
|
* Each value is either a plain disk ID string (mounts the disk's
|
|
3433
3521
|
* root, read-write) or an object that additionally selects a
|
|
@@ -3776,6 +3864,15 @@ export interface components {
|
|
|
3776
3864
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
3777
3865
|
};
|
|
3778
3866
|
};
|
|
3867
|
+
/** @description This fleet cannot build images from Dockerfiles (`dockerfile_builds_unavailable`) */
|
|
3868
|
+
DockerfileBuildsUnavailable: {
|
|
3869
|
+
headers: {
|
|
3870
|
+
[name: string]: unknown;
|
|
3871
|
+
};
|
|
3872
|
+
content: {
|
|
3873
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3874
|
+
};
|
|
3875
|
+
};
|
|
3779
3876
|
/** @description The lifecycle transition is temporarily blocked and can be retried */
|
|
3780
3877
|
RetryableUnavailable: {
|
|
3781
3878
|
headers: {
|
|
@@ -5725,6 +5822,39 @@ export interface operations {
|
|
|
5725
5822
|
404: components["responses"]["NotFound"];
|
|
5726
5823
|
};
|
|
5727
5824
|
};
|
|
5825
|
+
cancelExec: {
|
|
5826
|
+
parameters: {
|
|
5827
|
+
query?: never;
|
|
5828
|
+
header?: never;
|
|
5829
|
+
path: {
|
|
5830
|
+
execId: string;
|
|
5831
|
+
};
|
|
5832
|
+
cookie?: never;
|
|
5833
|
+
};
|
|
5834
|
+
requestBody?: never;
|
|
5835
|
+
responses: {
|
|
5836
|
+
/** @description The exec's status after the cancel */
|
|
5837
|
+
200: {
|
|
5838
|
+
headers: {
|
|
5839
|
+
[name: string]: unknown;
|
|
5840
|
+
};
|
|
5841
|
+
content: {
|
|
5842
|
+
"application/json": components["schemas"]["ApiResponse_ExecStatus"];
|
|
5843
|
+
};
|
|
5844
|
+
};
|
|
5845
|
+
401: components["responses"]["Unauthorized"];
|
|
5846
|
+
/** @description Not allowed to access this exec */
|
|
5847
|
+
403: {
|
|
5848
|
+
headers: {
|
|
5849
|
+
[name: string]: unknown;
|
|
5850
|
+
};
|
|
5851
|
+
content: {
|
|
5852
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5853
|
+
};
|
|
5854
|
+
};
|
|
5855
|
+
404: components["responses"]["NotFound"];
|
|
5856
|
+
};
|
|
5857
|
+
};
|
|
5728
5858
|
listApiTokens: {
|
|
5729
5859
|
parameters: {
|
|
5730
5860
|
query?: {
|
|
@@ -5830,6 +5960,35 @@ export interface operations {
|
|
|
5830
5960
|
400: components["responses"]["ValidationError"];
|
|
5831
5961
|
401: components["responses"]["Unauthorized"];
|
|
5832
5962
|
500: components["responses"]["InternalError"];
|
|
5963
|
+
501: components["responses"]["DockerfileBuildsUnavailable"];
|
|
5964
|
+
};
|
|
5965
|
+
};
|
|
5966
|
+
createImageContext: {
|
|
5967
|
+
parameters: {
|
|
5968
|
+
query?: never;
|
|
5969
|
+
header?: never;
|
|
5970
|
+
path?: never;
|
|
5971
|
+
cookie?: never;
|
|
5972
|
+
};
|
|
5973
|
+
requestBody: {
|
|
5974
|
+
content: {
|
|
5975
|
+
"application/json": components["schemas"]["ImageContextRequest"];
|
|
5976
|
+
};
|
|
5977
|
+
};
|
|
5978
|
+
responses: {
|
|
5979
|
+
/** @description The context is stored, or where to upload it */
|
|
5980
|
+
200: {
|
|
5981
|
+
headers: {
|
|
5982
|
+
[name: string]: unknown;
|
|
5983
|
+
};
|
|
5984
|
+
content: {
|
|
5985
|
+
"application/json": components["schemas"]["ApiResponse_ImageContextUpload"];
|
|
5986
|
+
};
|
|
5987
|
+
};
|
|
5988
|
+
400: components["responses"]["ValidationError"];
|
|
5989
|
+
401: components["responses"]["Unauthorized"];
|
|
5990
|
+
500: components["responses"]["InternalError"];
|
|
5991
|
+
501: components["responses"]["DockerfileBuildsUnavailable"];
|
|
5833
5992
|
};
|
|
5834
5993
|
};
|
|
5835
5994
|
getImage: {
|