keepset 0.18.0 → 0.20.0

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.
@@ -70,7 +70,7 @@ declare const ArchiveMemberSchema: z.ZodUnion<readonly [z.ZodObject<{
70
70
  extensions: z.ZodArray<z.ZodString>;
71
71
  }, z.core.$strict>]>;
72
72
  type ArchiveMember = z.infer<typeof ArchiveMemberSchema>;
73
- /** How the downloaded bytes unpack into the one file the parser reads. */
73
+ /** How the downloaded bytes unpack into the one file the parser reads. A workbook (`xlsx`) is read as the CSV of its named sheet, with dates as ISO 8601 text, for the `csv-table` parser. */
74
74
  declare const ArchiveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
75
75
  kind: z.ZodLiteral<"none">;
76
76
  }, z.core.$strict>, z.ZodObject<{
@@ -96,6 +96,9 @@ declare const ArchiveSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
96
96
  }, z.core.$strict>, z.ZodObject<{
97
97
  extensions: z.ZodArray<z.ZodString>;
98
98
  }, z.core.$strict>]>;
99
+ }, z.core.$strict>, z.ZodObject<{
100
+ kind: z.ZodLiteral<"xlsx">;
101
+ sheet: z.ZodString;
99
102
  }, z.core.$strict>], "kind">;
100
103
  type Archive = z.infer<typeof ArchiveSchema>;
101
104
  /** A column of a table as the table parser names it: the header with every run of characters outside letters, digits and underscore replaced by one underscore, so it is a valid segment of a twindex path. */
@@ -154,12 +157,26 @@ declare const ParserSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
154
157
  factor: z.ZodNumber;
155
158
  }, z.core.$strict>>;
156
159
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
160
+ }, z.core.$strict>, z.ZodObject<{
161
+ format: z.ZodLiteral<"geojson">;
162
+ encoding: z.ZodLiteral<"utf-8">;
163
+ idColumn: z.ZodNullable<z.ZodString>;
164
+ numericColumns: z.ZodArray<z.ZodObject<{
165
+ column: z.ZodString;
166
+ factor: z.ZodNumber;
167
+ }, z.core.$strict>>;
168
+ dateColumns: z.ZodArray<z.ZodString>;
169
+ columns: z.ZodArray<z.ZodString>;
157
170
  }, z.core.$strict>], "format">;
158
171
  type Parser = z.infer<typeof ParserSchema>;
159
172
  /** How to obtain the dataset: a fetchable recipe naming the source (by index into `sources`), the archive layout and the parser, or a statement that no declarative recipe exists yet and why. */
160
173
  declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
161
174
  status: z.ZodLiteral<"fetchable">;
162
175
  source: z.ZodInt;
176
+ paging: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
177
+ kind: z.ZodLiteral<"arcgis-query">;
178
+ orderBy: z.ZodString;
179
+ }, z.core.$strict>], "kind">>;
163
180
  archive: z.ZodDiscriminatedUnion<[z.ZodObject<{
164
181
  kind: z.ZodLiteral<"none">;
165
182
  }, z.core.$strict>, z.ZodObject<{
@@ -185,6 +202,9 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
185
202
  }, z.core.$strict>, z.ZodObject<{
186
203
  extensions: z.ZodArray<z.ZodString>;
187
204
  }, z.core.$strict>]>;
205
+ }, z.core.$strict>, z.ZodObject<{
206
+ kind: z.ZodLiteral<"xlsx">;
207
+ sheet: z.ZodString;
188
208
  }, z.core.$strict>], "kind">;
189
209
  parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
190
210
  format: z.ZodLiteral<"edge-list">;
@@ -239,6 +259,16 @@ declare const RecipeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
239
259
  factor: z.ZodNumber;
240
260
  }, z.core.$strict>>;
241
261
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ }, z.core.$strict>, z.ZodObject<{
263
+ format: z.ZodLiteral<"geojson">;
264
+ encoding: z.ZodLiteral<"utf-8">;
265
+ idColumn: z.ZodNullable<z.ZodString>;
266
+ numericColumns: z.ZodArray<z.ZodObject<{
267
+ column: z.ZodString;
268
+ factor: z.ZodNumber;
269
+ }, z.core.$strict>>;
270
+ dateColumns: z.ZodArray<z.ZodString>;
271
+ columns: z.ZodArray<z.ZodString>;
242
272
  }, z.core.$strict>], "format">;
243
273
  }, z.core.$strict>, z.ZodObject<{
244
274
  status: z.ZodLiteral<"not-fetchable">;
@@ -299,6 +329,10 @@ declare const EntrySchema: z.ZodObject<{
299
329
  recipe: z.ZodDiscriminatedUnion<[z.ZodObject<{
300
330
  status: z.ZodLiteral<"fetchable">;
301
331
  source: z.ZodInt;
332
+ paging: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
333
+ kind: z.ZodLiteral<"arcgis-query">;
334
+ orderBy: z.ZodString;
335
+ }, z.core.$strict>], "kind">>;
302
336
  archive: z.ZodDiscriminatedUnion<[z.ZodObject<{
303
337
  kind: z.ZodLiteral<"none">;
304
338
  }, z.core.$strict>, z.ZodObject<{
@@ -324,6 +358,9 @@ declare const EntrySchema: z.ZodObject<{
324
358
  }, z.core.$strict>, z.ZodObject<{
325
359
  extensions: z.ZodArray<z.ZodString>;
326
360
  }, z.core.$strict>]>;
361
+ }, z.core.$strict>, z.ZodObject<{
362
+ kind: z.ZodLiteral<"xlsx">;
363
+ sheet: z.ZodString;
327
364
  }, z.core.$strict>], "kind">;
328
365
  parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
329
366
  format: z.ZodLiteral<"edge-list">;
@@ -378,6 +415,16 @@ declare const EntrySchema: z.ZodObject<{
378
415
  factor: z.ZodNumber;
379
416
  }, z.core.$strict>>;
380
417
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
418
+ }, z.core.$strict>, z.ZodObject<{
419
+ format: z.ZodLiteral<"geojson">;
420
+ encoding: z.ZodLiteral<"utf-8">;
421
+ idColumn: z.ZodNullable<z.ZodString>;
422
+ numericColumns: z.ZodArray<z.ZodObject<{
423
+ column: z.ZodString;
424
+ factor: z.ZodNumber;
425
+ }, z.core.$strict>>;
426
+ dateColumns: z.ZodArray<z.ZodString>;
427
+ columns: z.ZodArray<z.ZodString>;
381
428
  }, z.core.$strict>], "format">;
382
429
  }, z.core.$strict>, z.ZodObject<{
383
430
  status: z.ZodLiteral<"not-fetchable">;
@@ -448,6 +495,9 @@ declare const EntrySchema: z.ZodObject<{
448
495
  } | {
449
496
  extensions: string[];
450
497
  };
498
+ } | {
499
+ kind: "xlsx";
500
+ sheet: string;
451
501
  };
452
502
  parser: {
453
503
  format: "edge-list";
@@ -468,6 +518,16 @@ declare const EntrySchema: z.ZodObject<{
468
518
  factor: number;
469
519
  }[];
470
520
  columns?: string[] | undefined;
521
+ } | {
522
+ format: "geojson";
523
+ encoding: "utf-8";
524
+ idColumn: string | null;
525
+ numericColumns: {
526
+ column: string;
527
+ factor: number;
528
+ }[];
529
+ dateColumns: string[];
530
+ columns: string[];
471
531
  } | {
472
532
  format: "matrix-market";
473
533
  encoding: "utf-8" | "latin1";
@@ -478,6 +538,10 @@ declare const EntrySchema: z.ZodObject<{
478
538
  format: "pajek";
479
539
  encoding: "utf-8" | "latin1";
480
540
  };
541
+ paging?: {
542
+ kind: "arcgis-query";
543
+ orderBy: string;
544
+ } | undefined;
481
545
  } | {
482
546
  status: "not-fetchable";
483
547
  reason: string;
@@ -628,6 +692,10 @@ declare const CatalogueIndexSchema: z.ZodObject<{
628
692
  recipe: z.ZodDiscriminatedUnion<[z.ZodObject<{
629
693
  status: z.ZodLiteral<"fetchable">;
630
694
  source: z.ZodInt;
695
+ paging: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
696
+ kind: z.ZodLiteral<"arcgis-query">;
697
+ orderBy: z.ZodString;
698
+ }, z.core.$strict>], "kind">>;
631
699
  archive: z.ZodDiscriminatedUnion<[z.ZodObject<{
632
700
  kind: z.ZodLiteral<"none">;
633
701
  }, z.core.$strict>, z.ZodObject<{
@@ -653,6 +721,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
653
721
  }, z.core.$strict>, z.ZodObject<{
654
722
  extensions: z.ZodArray<z.ZodString>;
655
723
  }, z.core.$strict>]>;
724
+ }, z.core.$strict>, z.ZodObject<{
725
+ kind: z.ZodLiteral<"xlsx">;
726
+ sheet: z.ZodString;
656
727
  }, z.core.$strict>], "kind">;
657
728
  parser: z.ZodDiscriminatedUnion<[z.ZodObject<{
658
729
  format: z.ZodLiteral<"edge-list">;
@@ -707,6 +778,16 @@ declare const CatalogueIndexSchema: z.ZodObject<{
707
778
  factor: z.ZodNumber;
708
779
  }, z.core.$strict>>;
709
780
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
781
+ }, z.core.$strict>, z.ZodObject<{
782
+ format: z.ZodLiteral<"geojson">;
783
+ encoding: z.ZodLiteral<"utf-8">;
784
+ idColumn: z.ZodNullable<z.ZodString>;
785
+ numericColumns: z.ZodArray<z.ZodObject<{
786
+ column: z.ZodString;
787
+ factor: z.ZodNumber;
788
+ }, z.core.$strict>>;
789
+ dateColumns: z.ZodArray<z.ZodString>;
790
+ columns: z.ZodArray<z.ZodString>;
710
791
  }, z.core.$strict>], "format">;
711
792
  }, z.core.$strict>, z.ZodObject<{
712
793
  status: z.ZodLiteral<"not-fetchable">;
@@ -777,6 +858,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
777
858
  } | {
778
859
  extensions: string[];
779
860
  };
861
+ } | {
862
+ kind: "xlsx";
863
+ sheet: string;
780
864
  };
781
865
  parser: {
782
866
  format: "edge-list";
@@ -797,6 +881,16 @@ declare const CatalogueIndexSchema: z.ZodObject<{
797
881
  factor: number;
798
882
  }[];
799
883
  columns?: string[] | undefined;
884
+ } | {
885
+ format: "geojson";
886
+ encoding: "utf-8";
887
+ idColumn: string | null;
888
+ numericColumns: {
889
+ column: string;
890
+ factor: number;
891
+ }[];
892
+ dateColumns: string[];
893
+ columns: string[];
800
894
  } | {
801
895
  format: "matrix-market";
802
896
  encoding: "utf-8" | "latin1";
@@ -807,6 +901,10 @@ declare const CatalogueIndexSchema: z.ZodObject<{
807
901
  format: "pajek";
808
902
  encoding: "utf-8" | "latin1";
809
903
  };
904
+ paging?: {
905
+ kind: "arcgis-query";
906
+ orderBy: string;
907
+ } | undefined;
810
908
  } | {
811
909
  status: "not-fetchable";
812
910
  reason: string;
@@ -895,6 +993,9 @@ declare const CatalogueIndexSchema: z.ZodObject<{
895
993
  } | {
896
994
  extensions: string[];
897
995
  };
996
+ } | {
997
+ kind: "xlsx";
998
+ sheet: string;
898
999
  };
899
1000
  parser: {
900
1001
  format: "edge-list";
@@ -915,6 +1016,16 @@ declare const CatalogueIndexSchema: z.ZodObject<{
915
1016
  factor: number;
916
1017
  }[];
917
1018
  columns?: string[] | undefined;
1019
+ } | {
1020
+ format: "geojson";
1021
+ encoding: "utf-8";
1022
+ idColumn: string | null;
1023
+ numericColumns: {
1024
+ column: string;
1025
+ factor: number;
1026
+ }[];
1027
+ dateColumns: string[];
1028
+ columns: string[];
918
1029
  } | {
919
1030
  format: "matrix-market";
920
1031
  encoding: "utf-8" | "latin1";
@@ -925,6 +1036,10 @@ declare const CatalogueIndexSchema: z.ZodObject<{
925
1036
  format: "pajek";
926
1037
  encoding: "utf-8" | "latin1";
927
1038
  };
1039
+ paging?: {
1040
+ kind: "arcgis-query";
1041
+ orderBy: string;
1042
+ } | undefined;
928
1043
  } | {
929
1044
  status: "not-fetchable";
930
1045
  reason: string;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as Parser, A as LineageSchema, B as Citation, C as CatalogueIndex, D as NamespaceNode, E as DatasetQuery, F as AliasSchema, G as Entry, H as ColumnNameSchema, I as Archive, J as IdSchema, K as EntrySchema, L as ArchiveMember, M as ManifestSchema, N as SemVerSchema, O as createCatalogue, P as parseManifest, Q as NamespaceSchema, R as ArchiveMemberSchema, S as Catalogue, T as Dataset, U as CrosswalkReference, V as CitationSchema, W as CrosswalkReferenceSchema, X as LicenceSchema, Y as Licence, Z as Namespace, _ as GraphEdgeSchema, a as CategoryTargets, at as Snapshot, b as GraphV1, c as getCategory, ct as SourceSchema, d as listCategories, dt as waybackUrl, et as ParserSchema, f as OrNode, g as GraphEdge, h as OrV1Schema, i as CategoryTarget, it as RelativePathSchema, j as Manifest, k as Lineage, l as getTarget, lt as WaybackTimestampSchema, m as OrV1, n as CategoryId, nt as Recipe, o as CountedKey, ot as SnapshotSchema, p as OrNodeSchema, q as HttpUrlSchema, r as CategoryIdSchema, rt as RecipeSchema, s as countTarget, st as Source, t as Category, tt as RESERVED_META_KEYS, u as kindOf, ut as parseEntry, v as GraphNode, w as CatalogueIndexSchema, x as GraphV1Schema, y as GraphNodeSchema, z as ArchiveSchema } from "./categories-CiJbssql.js";
1
+ import { $ as Parser, A as LineageSchema, B as Citation, C as CatalogueIndex, D as NamespaceNode, E as DatasetQuery, F as AliasSchema, G as Entry, H as ColumnNameSchema, I as Archive, J as IdSchema, K as EntrySchema, L as ArchiveMember, M as ManifestSchema, N as SemVerSchema, O as createCatalogue, P as parseManifest, Q as NamespaceSchema, R as ArchiveMemberSchema, S as Catalogue, T as Dataset, U as CrosswalkReference, V as CitationSchema, W as CrosswalkReferenceSchema, X as LicenceSchema, Y as Licence, Z as Namespace, _ as GraphEdgeSchema, a as CategoryTargets, at as Snapshot, b as GraphV1, c as getCategory, ct as SourceSchema, d as listCategories, dt as waybackUrl, et as ParserSchema, f as OrNode, g as GraphEdge, h as OrV1Schema, i as CategoryTarget, it as RelativePathSchema, j as Manifest, k as Lineage, l as getTarget, lt as WaybackTimestampSchema, m as OrV1, n as CategoryId, nt as Recipe, o as CountedKey, ot as SnapshotSchema, p as OrNodeSchema, q as HttpUrlSchema, r as CategoryIdSchema, rt as RecipeSchema, s as countTarget, st as Source, t as Category, tt as RESERVED_META_KEYS, u as kindOf, ut as parseEntry, v as GraphNode, w as CatalogueIndexSchema, x as GraphV1Schema, y as GraphNodeSchema, z as ArchiveSchema } from "./categories-BVROO4tM.js";
2
2
  import { Crosswalk } from "twindex";
3
3
  import { z } from "zod";
4
4
  //#region src/errors.d.ts
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as NativeParseError, A as toIssues, B as kindOf, C as RESERVED_META_KEYS, D as SourceSchema, E as SnapshotSchema, G as GraphNodeSchema, H as OrNodeSchema, I as CategoryIdSchema, J as ArchiveError, K as GraphV1Schema, L as countTarget, M as NAME_SEPARATOR, N as groupsOf, O as WaybackTimestampSchema, P as namesOf, Q as KeepsetError, R as getCategory, S as ParserSchema, T as RelativePathSchema, U as OrV1Schema, V as listCategories, W as GraphEdgeSchema, X as DatasetAmbiguousError, Y as CatalogueSyntaxError, Z as DatasetNotFoundError, _ as EntrySchema, a as CatalogueIndexSchema, b as LicenceSchema, c as ManifestSchema, d as AliasSchema, et as RecipeError, f as ArchiveMemberSchema, g as CrosswalkReferenceSchema, h as ColumnNameSchema, i as listNamespaces, j as waybackUrl, k as parseEntry, l as SemVerSchema, m as CitationSchema, n as getManifest, o as createCatalogue, p as ArchiveSchema, q as JsonScalarSchema, r as listDatasets, s as LineageSchema, t as getDataset, tt as UnknownCategoryError, u as parseManifest, v as HttpUrlSchema, w as RecipeSchema, x as NamespaceSchema, y as IdSchema, z as getTarget } from "./bundled-BiuG_xLd.js";
1
+ import { $ as NativeParseError, A as toIssues, B as kindOf, C as RESERVED_META_KEYS, D as SourceSchema, E as SnapshotSchema, G as GraphNodeSchema, H as OrNodeSchema, I as CategoryIdSchema, J as ArchiveError, K as GraphV1Schema, L as countTarget, M as NAME_SEPARATOR, N as groupsOf, O as WaybackTimestampSchema, P as namesOf, Q as KeepsetError, R as getCategory, S as ParserSchema, T as RelativePathSchema, U as OrV1Schema, V as listCategories, W as GraphEdgeSchema, X as DatasetAmbiguousError, Y as CatalogueSyntaxError, Z as DatasetNotFoundError, _ as EntrySchema, a as CatalogueIndexSchema, b as LicenceSchema, c as ManifestSchema, d as AliasSchema, et as RecipeError, f as ArchiveMemberSchema, g as CrosswalkReferenceSchema, h as ColumnNameSchema, i as listNamespaces, j as waybackUrl, k as parseEntry, l as SemVerSchema, m as CitationSchema, n as getManifest, o as createCatalogue, p as ArchiveSchema, q as JsonScalarSchema, r as listDatasets, s as LineageSchema, t as getDataset, tt as UnknownCategoryError, u as parseManifest, v as HttpUrlSchema, w as RecipeSchema, x as NamespaceSchema, y as IdSchema, z as getTarget } from "./bundled-BmqpHjOH.js";
2
2
  import { validateCrosswalk } from "twindex";
3
3
  //#region src/serialise.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { G as Entry, T as Dataset, at as Snapshot, i as CategoryTarget, st as Source } from "../categories-CiJbssql.js";
1
+ import { G as Entry, T as Dataset, at as Snapshot, i as CategoryTarget, st as Source } from "../categories-BVROO4tM.js";
2
2
  //#region src/node/fetch-dataset.d.ts
3
3
  /** The network port a recipe downloads through: `downloadRaw` by default, which returns the bytes exactly as served, or a stand-in under test. */
4
4
  export type FetchPort = (url: string, init: {