@archildata/api-types 0.0.75 → 0.0.76

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 +108 -0
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -632,6 +632,26 @@ export interface paths {
632
632
  patch?: never;
633
633
  trace?: never;
634
634
  };
635
+ "/api/disks/{id}/prefetch": {
636
+ parameters: {
637
+ query?: never;
638
+ header?: never;
639
+ path?: never;
640
+ cookie?: never;
641
+ };
642
+ get?: never;
643
+ put?: never;
644
+ /**
645
+ * Prefetch file ranges
646
+ * @description Warms byte ranges of files on a disk into Archil's cache, so later reads from any client are served without going to object storage. Each range names one file and an optional offset and length; a file may appear in several ranges. The response reports each range in request order and may arrive before the data is fully fetched. Paths are relative to the disk root. A path that does not exist reports `found: false`; a path that is not a regular file is found but warms nothing. If the disk is not mounted anywhere, prefetching loads it.
647
+ */
648
+ post: operations["prefetchDisk"];
649
+ delete?: never;
650
+ options?: never;
651
+ head?: never;
652
+ patch?: never;
653
+ trace?: never;
654
+ };
635
655
  "/api/disks/{id}/exec": {
636
656
  parameters: {
637
657
  query?: never;
@@ -2820,6 +2840,54 @@ export interface components {
2820
2840
  */
2821
2841
  clientId: string;
2822
2842
  };
2843
+ PrefetchRequest: {
2844
+ /** @description Byte ranges to warm. A request may name at most 1000. */
2845
+ ranges: components["schemas"]["PrefetchRange"][];
2846
+ };
2847
+ PrefetchRange: {
2848
+ /**
2849
+ * @description File path relative to the disk root.
2850
+ * @example models/weights.bin
2851
+ */
2852
+ path: string;
2853
+ /**
2854
+ * Format: int64
2855
+ * @description First byte to warm. Defaults to 0.
2856
+ */
2857
+ offset?: number;
2858
+ /**
2859
+ * Format: int64
2860
+ * @description Bytes to warm from `offset`. Defaults to the end of the file.
2861
+ */
2862
+ length?: number;
2863
+ };
2864
+ PrefetchRangeResult: {
2865
+ /** @description Whether the path exists. */
2866
+ found: boolean;
2867
+ /**
2868
+ * Format: int64
2869
+ * @description Bytes of the range being warmed, including bytes that were already cached.
2870
+ */
2871
+ bytesRequested: number;
2872
+ /**
2873
+ * Format: int64
2874
+ * @description Of `bytesRequested`, the bytes fetched (or still being fetched) from object storage.
2875
+ */
2876
+ bytesWarmed: number;
2877
+ /**
2878
+ * @description Set when this range was not warmed: `retry` for a transient failure worth retrying, `failed` otherwise. Other ranges in the request are unaffected.
2879
+ * @enum {string}
2880
+ */
2881
+ error?: "retry" | "failed";
2882
+ };
2883
+ ApiResponse_Prefetch: {
2884
+ /** @example true */
2885
+ success: boolean;
2886
+ data: {
2887
+ /** @description One result per requested range, in request order. */
2888
+ results: components["schemas"]["PrefetchRangeResult"][];
2889
+ };
2890
+ };
2823
2891
  CreateApiTokenRequest: {
2824
2892
  /** @description Token name */
2825
2893
  name: string;
@@ -4657,6 +4725,46 @@ export interface operations {
4657
4725
  500: components["responses"]["InternalError"];
4658
4726
  };
4659
4727
  };
4728
+ prefetchDisk: {
4729
+ parameters: {
4730
+ query?: never;
4731
+ header?: never;
4732
+ path: {
4733
+ /** @description Disk ID (format `dsk-{16 hex chars}`) */
4734
+ id: components["parameters"]["DiskId"];
4735
+ };
4736
+ cookie?: never;
4737
+ };
4738
+ requestBody: {
4739
+ content: {
4740
+ "application/json": components["schemas"]["PrefetchRequest"];
4741
+ };
4742
+ };
4743
+ responses: {
4744
+ /** @description Per-range prefetch results */
4745
+ 200: {
4746
+ headers: {
4747
+ [name: string]: unknown;
4748
+ };
4749
+ content: {
4750
+ "application/json": components["schemas"]["ApiResponse_Prefetch"];
4751
+ };
4752
+ };
4753
+ 400: components["responses"]["ValidationError"];
4754
+ 401: components["responses"]["Unauthorized"];
4755
+ 404: components["responses"]["NotFound"];
4756
+ 500: components["responses"]["InternalError"];
4757
+ /** @description Temporarily unavailable; safe to retry. */
4758
+ 503: {
4759
+ headers: {
4760
+ [name: string]: unknown;
4761
+ };
4762
+ content: {
4763
+ "application/json": components["schemas"]["ErrorResponse"];
4764
+ };
4765
+ };
4766
+ };
4767
+ };
4660
4768
  execDisk: {
4661
4769
  parameters: {
4662
4770
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archildata/api-types",
3
- "version": "0.0.75",
3
+ "version": "0.0.76",
4
4
  "description": "API types for the Archil control plane",
5
5
  "type": "module",
6
6
  "types": "index.d.ts",