@archildata/api-types 0.0.99 → 0.0.101
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 +238 -3
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -550,6 +550,40 @@ export interface paths {
|
|
|
550
550
|
patch?: never;
|
|
551
551
|
trace?: never;
|
|
552
552
|
};
|
|
553
|
+
"/api/disks/{id}/checkpoints/{from}/diff/{to}": {
|
|
554
|
+
parameters: {
|
|
555
|
+
query?: never;
|
|
556
|
+
header?: never;
|
|
557
|
+
path?: never;
|
|
558
|
+
cookie?: never;
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* What changed between two checkpoints
|
|
562
|
+
* @description Lists the paths that changed between two checkpoints of a disk, or
|
|
563
|
+
* of one of its branches, one entry per path, in pages. Each entry
|
|
564
|
+
* gives both sides' modes and symlink targets. Read a file's bytes
|
|
565
|
+
* at a checkpoint from the S3 gateway, as `GET /{disk}/{key}` with
|
|
566
|
+
* `versionId={checkpoint}`, in the bucket `{disk}.{branch}` for a
|
|
567
|
+
* branch. Directories are listed too. A renamed directory is one
|
|
568
|
+
* entry, plus one for each path under it.
|
|
569
|
+
*
|
|
570
|
+
* Pages come in no path order. A page can hold fewer than `max-keys`
|
|
571
|
+
* entries, even none, and still not be the last. Past `max-keys` it
|
|
572
|
+
* holds only more paths of the inode at its end, such as a file's
|
|
573
|
+
* other hard links. Pass `next` back as `continuation-token` until a
|
|
574
|
+
* page has none.
|
|
575
|
+
*
|
|
576
|
+
* Only disks in Archil's flat-block format can be diffed.
|
|
577
|
+
*/
|
|
578
|
+
get: operations["getCheckpointDiff"];
|
|
579
|
+
put?: never;
|
|
580
|
+
post?: never;
|
|
581
|
+
delete?: never;
|
|
582
|
+
options?: never;
|
|
583
|
+
head?: never;
|
|
584
|
+
patch?: never;
|
|
585
|
+
trace?: never;
|
|
586
|
+
};
|
|
553
587
|
"/api/disks/{id}/users": {
|
|
554
588
|
parameters: {
|
|
555
589
|
query?: never;
|
|
@@ -849,7 +883,9 @@ export interface paths {
|
|
|
849
883
|
};
|
|
850
884
|
/**
|
|
851
885
|
* Get an exec's status and result
|
|
852
|
-
* @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.
|
|
853
889
|
*/
|
|
854
890
|
get: operations["getExec"];
|
|
855
891
|
put?: never;
|
|
@@ -860,6 +896,27 @@ export interface paths {
|
|
|
860
896
|
patch?: never;
|
|
861
897
|
trace?: never;
|
|
862
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
|
+
};
|
|
863
920
|
"/api/tokens": {
|
|
864
921
|
parameters: {
|
|
865
922
|
query?: never;
|
|
@@ -1377,6 +1434,75 @@ export interface components {
|
|
|
1377
1434
|
success: boolean;
|
|
1378
1435
|
data: components["schemas"]["BranchResponse"][];
|
|
1379
1436
|
};
|
|
1437
|
+
CheckpointDiffApiResponse: {
|
|
1438
|
+
/** @example true */
|
|
1439
|
+
success: boolean;
|
|
1440
|
+
data: components["schemas"]["CheckpointDiffPage"];
|
|
1441
|
+
};
|
|
1442
|
+
CheckpointNotFlushedResponse: {
|
|
1443
|
+
/** @example false */
|
|
1444
|
+
success: boolean;
|
|
1445
|
+
error: string;
|
|
1446
|
+
/** @description Stable machine-readable error code. */
|
|
1447
|
+
code?: string;
|
|
1448
|
+
data?: components["schemas"]["CheckpointFlushBacklog"];
|
|
1449
|
+
};
|
|
1450
|
+
/**
|
|
1451
|
+
* @description How far the disk is from flushing a checkpoint. Retry until the
|
|
1452
|
+
* diff is served; `unflushedCommits` falls as flushes land.
|
|
1453
|
+
*/
|
|
1454
|
+
CheckpointFlushBacklog: {
|
|
1455
|
+
/** @description Journal commits up to the checkpoint still to flush. */
|
|
1456
|
+
unflushedCommits: number;
|
|
1457
|
+
/** @description How long the oldest of them has waited. */
|
|
1458
|
+
oldestUnflushedSeconds?: number;
|
|
1459
|
+
};
|
|
1460
|
+
CheckpointDiffPage: {
|
|
1461
|
+
entries: components["schemas"]["CheckpointDiffEntry"][];
|
|
1462
|
+
/** @description Pass as `continuation-token` for the next page. Absent on the last. */
|
|
1463
|
+
next?: string;
|
|
1464
|
+
};
|
|
1465
|
+
CheckpointDiffEntry: {
|
|
1466
|
+
/**
|
|
1467
|
+
* @description `copied` is a rename whose old path another file now holds.
|
|
1468
|
+
* @enum {string}
|
|
1469
|
+
*/
|
|
1470
|
+
change: "added" | "removed" | "modified" | "renamed" | "copied";
|
|
1471
|
+
/**
|
|
1472
|
+
* @description A path whose kind changed is a removal and an addition.
|
|
1473
|
+
* @enum {string}
|
|
1474
|
+
*/
|
|
1475
|
+
kind: "file" | "directory" | "symlink" | "other";
|
|
1476
|
+
/** @description Where a rename or copy came from. */
|
|
1477
|
+
from?: string;
|
|
1478
|
+
/** @description The path at `to`; for a removal, at `from`. */
|
|
1479
|
+
path: string;
|
|
1480
|
+
old?: components["schemas"]["CheckpointDiffSide"];
|
|
1481
|
+
new?: components["schemas"]["CheckpointDiffSide"];
|
|
1482
|
+
replaced?: components["schemas"]["CheckpointDiffSide"];
|
|
1483
|
+
/**
|
|
1484
|
+
* @description What may differ between `old` and `new`. Without `data`, the
|
|
1485
|
+
* bytes differ only if the sizes do, as after a truncate.
|
|
1486
|
+
*/
|
|
1487
|
+
changed?: ("metadata" | "data" | "xattrs")[];
|
|
1488
|
+
};
|
|
1489
|
+
/**
|
|
1490
|
+
* @description One side of a change. `old` is at the `from` checkpoint, at the
|
|
1491
|
+
* entry's `from` if set and else at `path`. `new` is at the `to`
|
|
1492
|
+
* checkpoint, at `path`. `replaced` is what a rename or copy
|
|
1493
|
+
* replaced at `path`, at the `from` checkpoint.
|
|
1494
|
+
*/
|
|
1495
|
+
CheckpointDiffSide: {
|
|
1496
|
+
/** @description Permission bits, as `st_mode & 0o7777`. */
|
|
1497
|
+
mode: number;
|
|
1498
|
+
/**
|
|
1499
|
+
* Format: int64
|
|
1500
|
+
* @description In bytes.
|
|
1501
|
+
*/
|
|
1502
|
+
size: number;
|
|
1503
|
+
/** @description A symlink's target. */
|
|
1504
|
+
target?: string;
|
|
1505
|
+
};
|
|
1380
1506
|
ErrorResponse: {
|
|
1381
1507
|
/** @example false */
|
|
1382
1508
|
success: boolean;
|
|
@@ -3294,7 +3420,7 @@ export interface components {
|
|
|
3294
3420
|
ExecStatus: {
|
|
3295
3421
|
execId: string;
|
|
3296
3422
|
/**
|
|
3297
|
-
* @description `completed` when the command exited, whatever its exit code; `failed` when it timed out or couldn't run.
|
|
3423
|
+
* @description `completed` when the command exited, whatever its exit code; `failed` when it timed out, was cancelled, or couldn't run.
|
|
3298
3424
|
* @enum {string}
|
|
3299
3425
|
*/
|
|
3300
3426
|
status: "running" | "stopping" | "completed" | "failed";
|
|
@@ -3324,7 +3450,7 @@ export interface components {
|
|
|
3324
3450
|
* @description Map of relative path under `/mnt/archil` to the disk to mount
|
|
3325
3451
|
* there. Relative paths must be non-empty, non-absolute, and contain
|
|
3326
3452
|
* no `.` or `..` segments. Running without disks needs the
|
|
3327
|
-
* `
|
|
3453
|
+
* `workspace:exec` permission.
|
|
3328
3454
|
*
|
|
3329
3455
|
* Each value is either a plain disk ID string (mounts the disk's
|
|
3330
3456
|
* root, read-write) or an object that additionally selects a
|
|
@@ -5008,6 +5134,82 @@ export interface operations {
|
|
|
5008
5134
|
};
|
|
5009
5135
|
};
|
|
5010
5136
|
};
|
|
5137
|
+
getCheckpointDiff: {
|
|
5138
|
+
parameters: {
|
|
5139
|
+
query?: {
|
|
5140
|
+
/** @description The branch whose checkpoints to diff. Omit for the disk's own. */
|
|
5141
|
+
branch?: components["schemas"]["BranchName"];
|
|
5142
|
+
/** @description The `next` of the page before. */
|
|
5143
|
+
"continuation-token"?: string;
|
|
5144
|
+
/** @description The most entries a page asks for, up to 1000. */
|
|
5145
|
+
"max-keys"?: number;
|
|
5146
|
+
};
|
|
5147
|
+
header?: never;
|
|
5148
|
+
path: {
|
|
5149
|
+
/** @description Disk ID (format `dsk-{16 hex chars}`) */
|
|
5150
|
+
id: components["parameters"]["DiskId"];
|
|
5151
|
+
/** @description The earlier checkpoint's name. */
|
|
5152
|
+
from: string;
|
|
5153
|
+
/** @description The later checkpoint's name. */
|
|
5154
|
+
to: string;
|
|
5155
|
+
};
|
|
5156
|
+
cookie?: never;
|
|
5157
|
+
};
|
|
5158
|
+
requestBody?: never;
|
|
5159
|
+
responses: {
|
|
5160
|
+
/** @description One page of the diff */
|
|
5161
|
+
200: {
|
|
5162
|
+
headers: {
|
|
5163
|
+
[name: string]: unknown;
|
|
5164
|
+
};
|
|
5165
|
+
content: {
|
|
5166
|
+
"application/json": components["schemas"]["CheckpointDiffApiResponse"];
|
|
5167
|
+
};
|
|
5168
|
+
};
|
|
5169
|
+
400: components["responses"]["ValidationError"];
|
|
5170
|
+
/** @description Missing or invalid authentication credentials */
|
|
5171
|
+
401: {
|
|
5172
|
+
headers: {
|
|
5173
|
+
[name: string]: unknown;
|
|
5174
|
+
};
|
|
5175
|
+
content: {
|
|
5176
|
+
"text/plain": string;
|
|
5177
|
+
};
|
|
5178
|
+
};
|
|
5179
|
+
/** @description Disk, branch or checkpoint not found */
|
|
5180
|
+
404: {
|
|
5181
|
+
headers: {
|
|
5182
|
+
[name: string]: unknown;
|
|
5183
|
+
};
|
|
5184
|
+
content: {
|
|
5185
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5186
|
+
};
|
|
5187
|
+
};
|
|
5188
|
+
500: components["responses"]["InternalError"];
|
|
5189
|
+
/** @description The disk is not in flat-block format */
|
|
5190
|
+
501: {
|
|
5191
|
+
headers: {
|
|
5192
|
+
[name: string]: unknown;
|
|
5193
|
+
};
|
|
5194
|
+
content: {
|
|
5195
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5196
|
+
};
|
|
5197
|
+
};
|
|
5198
|
+
/**
|
|
5199
|
+
* @description A checkpoint is not readable yet, as its writes are still being
|
|
5200
|
+
* flushed (code `checkpoint_not_flushed`), or the disk is briefly
|
|
5201
|
+
* unavailable (code `temporarily_unavailable`). Retry.
|
|
5202
|
+
*/
|
|
5203
|
+
503: {
|
|
5204
|
+
headers: {
|
|
5205
|
+
[name: string]: unknown;
|
|
5206
|
+
};
|
|
5207
|
+
content: {
|
|
5208
|
+
"application/json": components["schemas"]["CheckpointNotFlushedResponse"];
|
|
5209
|
+
};
|
|
5210
|
+
};
|
|
5211
|
+
};
|
|
5212
|
+
};
|
|
5011
5213
|
addDiskUser: {
|
|
5012
5214
|
parameters: {
|
|
5013
5215
|
query?: never;
|
|
@@ -5546,6 +5748,39 @@ export interface operations {
|
|
|
5546
5748
|
404: components["responses"]["NotFound"];
|
|
5547
5749
|
};
|
|
5548
5750
|
};
|
|
5751
|
+
cancelExec: {
|
|
5752
|
+
parameters: {
|
|
5753
|
+
query?: never;
|
|
5754
|
+
header?: never;
|
|
5755
|
+
path: {
|
|
5756
|
+
execId: string;
|
|
5757
|
+
};
|
|
5758
|
+
cookie?: never;
|
|
5759
|
+
};
|
|
5760
|
+
requestBody?: never;
|
|
5761
|
+
responses: {
|
|
5762
|
+
/** @description The exec's status after the cancel */
|
|
5763
|
+
200: {
|
|
5764
|
+
headers: {
|
|
5765
|
+
[name: string]: unknown;
|
|
5766
|
+
};
|
|
5767
|
+
content: {
|
|
5768
|
+
"application/json": components["schemas"]["ApiResponse_ExecStatus"];
|
|
5769
|
+
};
|
|
5770
|
+
};
|
|
5771
|
+
401: components["responses"]["Unauthorized"];
|
|
5772
|
+
/** @description Not allowed to access this exec */
|
|
5773
|
+
403: {
|
|
5774
|
+
headers: {
|
|
5775
|
+
[name: string]: unknown;
|
|
5776
|
+
};
|
|
5777
|
+
content: {
|
|
5778
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
5779
|
+
};
|
|
5780
|
+
};
|
|
5781
|
+
404: components["responses"]["NotFound"];
|
|
5782
|
+
};
|
|
5783
|
+
};
|
|
5549
5784
|
listApiTokens: {
|
|
5550
5785
|
parameters: {
|
|
5551
5786
|
query?: {
|