@archildata/api-types 0.0.99 → 0.0.100

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.
Files changed (2) hide show
  1. package/index.d.ts +179 -0
  2. 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;
@@ -1377,6 +1411,75 @@ export interface components {
1377
1411
  success: boolean;
1378
1412
  data: components["schemas"]["BranchResponse"][];
1379
1413
  };
1414
+ CheckpointDiffApiResponse: {
1415
+ /** @example true */
1416
+ success: boolean;
1417
+ data: components["schemas"]["CheckpointDiffPage"];
1418
+ };
1419
+ CheckpointNotFlushedResponse: {
1420
+ /** @example false */
1421
+ success: boolean;
1422
+ error: string;
1423
+ /** @description Stable machine-readable error code. */
1424
+ code?: string;
1425
+ data?: components["schemas"]["CheckpointFlushBacklog"];
1426
+ };
1427
+ /**
1428
+ * @description How far the disk is from flushing a checkpoint. Retry until the
1429
+ * diff is served; `unflushedCommits` falls as flushes land.
1430
+ */
1431
+ CheckpointFlushBacklog: {
1432
+ /** @description Journal commits up to the checkpoint still to flush. */
1433
+ unflushedCommits: number;
1434
+ /** @description How long the oldest of them has waited. */
1435
+ oldestUnflushedSeconds?: number;
1436
+ };
1437
+ CheckpointDiffPage: {
1438
+ entries: components["schemas"]["CheckpointDiffEntry"][];
1439
+ /** @description Pass as `continuation-token` for the next page. Absent on the last. */
1440
+ next?: string;
1441
+ };
1442
+ CheckpointDiffEntry: {
1443
+ /**
1444
+ * @description `copied` is a rename whose old path another file now holds.
1445
+ * @enum {string}
1446
+ */
1447
+ change: "added" | "removed" | "modified" | "renamed" | "copied";
1448
+ /**
1449
+ * @description A path whose kind changed is a removal and an addition.
1450
+ * @enum {string}
1451
+ */
1452
+ kind: "file" | "directory" | "symlink" | "other";
1453
+ /** @description Where a rename or copy came from. */
1454
+ from?: string;
1455
+ /** @description The path at `to`; for a removal, at `from`. */
1456
+ path: string;
1457
+ old?: components["schemas"]["CheckpointDiffSide"];
1458
+ new?: components["schemas"]["CheckpointDiffSide"];
1459
+ replaced?: components["schemas"]["CheckpointDiffSide"];
1460
+ /**
1461
+ * @description What may differ between `old` and `new`. Without `data`, the
1462
+ * bytes differ only if the sizes do, as after a truncate.
1463
+ */
1464
+ changed?: ("metadata" | "data" | "xattrs")[];
1465
+ };
1466
+ /**
1467
+ * @description One side of a change. `old` is at the `from` checkpoint, at the
1468
+ * entry's `from` if set and else at `path`. `new` is at the `to`
1469
+ * checkpoint, at `path`. `replaced` is what a rename or copy
1470
+ * replaced at `path`, at the `from` checkpoint.
1471
+ */
1472
+ CheckpointDiffSide: {
1473
+ /** @description Permission bits, as `st_mode & 0o7777`. */
1474
+ mode: number;
1475
+ /**
1476
+ * Format: int64
1477
+ * @description In bytes.
1478
+ */
1479
+ size: number;
1480
+ /** @description A symlink's target. */
1481
+ target?: string;
1482
+ };
1380
1483
  ErrorResponse: {
1381
1484
  /** @example false */
1382
1485
  success: boolean;
@@ -5008,6 +5111,82 @@ export interface operations {
5008
5111
  };
5009
5112
  };
5010
5113
  };
5114
+ getCheckpointDiff: {
5115
+ parameters: {
5116
+ query?: {
5117
+ /** @description The branch whose checkpoints to diff. Omit for the disk's own. */
5118
+ branch?: components["schemas"]["BranchName"];
5119
+ /** @description The `next` of the page before. */
5120
+ "continuation-token"?: string;
5121
+ /** @description The most entries a page asks for, up to 1000. */
5122
+ "max-keys"?: number;
5123
+ };
5124
+ header?: never;
5125
+ path: {
5126
+ /** @description Disk ID (format `dsk-{16 hex chars}`) */
5127
+ id: components["parameters"]["DiskId"];
5128
+ /** @description The earlier checkpoint's name. */
5129
+ from: string;
5130
+ /** @description The later checkpoint's name. */
5131
+ to: string;
5132
+ };
5133
+ cookie?: never;
5134
+ };
5135
+ requestBody?: never;
5136
+ responses: {
5137
+ /** @description One page of the diff */
5138
+ 200: {
5139
+ headers: {
5140
+ [name: string]: unknown;
5141
+ };
5142
+ content: {
5143
+ "application/json": components["schemas"]["CheckpointDiffApiResponse"];
5144
+ };
5145
+ };
5146
+ 400: components["responses"]["ValidationError"];
5147
+ /** @description Missing or invalid authentication credentials */
5148
+ 401: {
5149
+ headers: {
5150
+ [name: string]: unknown;
5151
+ };
5152
+ content: {
5153
+ "text/plain": string;
5154
+ };
5155
+ };
5156
+ /** @description Disk, branch or checkpoint not found */
5157
+ 404: {
5158
+ headers: {
5159
+ [name: string]: unknown;
5160
+ };
5161
+ content: {
5162
+ "application/json": components["schemas"]["ErrorResponse"];
5163
+ };
5164
+ };
5165
+ 500: components["responses"]["InternalError"];
5166
+ /** @description The disk is not in flat-block format */
5167
+ 501: {
5168
+ headers: {
5169
+ [name: string]: unknown;
5170
+ };
5171
+ content: {
5172
+ "application/json": components["schemas"]["ErrorResponse"];
5173
+ };
5174
+ };
5175
+ /**
5176
+ * @description A checkpoint is not readable yet, as its writes are still being
5177
+ * flushed (code `checkpoint_not_flushed`), or the disk is briefly
5178
+ * unavailable (code `temporarily_unavailable`). Retry.
5179
+ */
5180
+ 503: {
5181
+ headers: {
5182
+ [name: string]: unknown;
5183
+ };
5184
+ content: {
5185
+ "application/json": components["schemas"]["CheckpointNotFlushedResponse"];
5186
+ };
5187
+ };
5188
+ };
5189
+ };
5011
5190
  addDiskUser: {
5012
5191
  parameters: {
5013
5192
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.99",
3
+ "version": "0.0.100",
4
4
  "description": "Public API types for Archil",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",