@nspot/geo-engine 0.4.0 → 0.5.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.
package/dist/types.d.ts CHANGED
@@ -64,7 +64,122 @@ export interface Region extends RegionSummary {
64
64
  export declare const countryCodeSchema: z.ZodEffects<z.ZodString, string, string>;
65
65
  export declare const packSlugSchema: z.ZodString;
66
66
  export declare const packVersionSchema: z.ZodString;
67
- export declare const packSchema: z.ZodObject<{
67
+ /**
68
+ * One locality of a pack (schema 9): a named point, keyed by `(country, code)`. Its geometry is
69
+ * a GeoJSON Point (the label point) or null, and exactly one of a point and a non-empty
70
+ * `point_gap` (the pack's reason for having none) is given.
71
+ */
72
+ export declare const localityFeatureSchema: z.ZodEffects<z.ZodObject<{
73
+ type: z.ZodLiteral<"Feature">;
74
+ geometry: z.ZodNullable<z.ZodObject<{
75
+ type: z.ZodLiteral<"Point">;
76
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
77
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
78
+ type: z.ZodLiteral<"Point">;
79
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
80
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
81
+ type: z.ZodLiteral<"Point">;
82
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
83
+ }, z.ZodTypeAny, "passthrough">>>;
84
+ properties: z.ZodObject<{
85
+ country: z.ZodEffects<z.ZodString, string, string>;
86
+ code: z.ZodString;
87
+ name: z.ZodString;
88
+ parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
89
+ parent_country: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
90
+ point_gap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
92
+ properties: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ code: string;
95
+ properties: Record<string, unknown>;
96
+ country: string;
97
+ name: string;
98
+ tags: string[];
99
+ parent?: string | null | undefined;
100
+ parent_country?: string | null | undefined;
101
+ point_gap?: string | null | undefined;
102
+ }, {
103
+ code: string;
104
+ country: string;
105
+ name: string;
106
+ properties?: Record<string, unknown> | undefined;
107
+ parent?: string | null | undefined;
108
+ parent_country?: string | null | undefined;
109
+ point_gap?: string | null | undefined;
110
+ tags?: string[] | undefined;
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ type: "Feature";
114
+ geometry: z.objectOutputType<{
115
+ type: z.ZodLiteral<"Point">;
116
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
117
+ }, z.ZodTypeAny, "passthrough"> | null;
118
+ properties: {
119
+ code: string;
120
+ properties: Record<string, unknown>;
121
+ country: string;
122
+ name: string;
123
+ tags: string[];
124
+ parent?: string | null | undefined;
125
+ parent_country?: string | null | undefined;
126
+ point_gap?: string | null | undefined;
127
+ };
128
+ }, {
129
+ type: "Feature";
130
+ geometry: z.objectInputType<{
131
+ type: z.ZodLiteral<"Point">;
132
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
133
+ }, z.ZodTypeAny, "passthrough"> | null;
134
+ properties: {
135
+ code: string;
136
+ country: string;
137
+ name: string;
138
+ properties?: Record<string, unknown> | undefined;
139
+ parent?: string | null | undefined;
140
+ parent_country?: string | null | undefined;
141
+ point_gap?: string | null | undefined;
142
+ tags?: string[] | undefined;
143
+ };
144
+ }>, {
145
+ type: "Feature";
146
+ geometry: z.objectOutputType<{
147
+ type: z.ZodLiteral<"Point">;
148
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
149
+ }, z.ZodTypeAny, "passthrough"> | null;
150
+ properties: {
151
+ code: string;
152
+ properties: Record<string, unknown>;
153
+ country: string;
154
+ name: string;
155
+ tags: string[];
156
+ parent?: string | null | undefined;
157
+ parent_country?: string | null | undefined;
158
+ point_gap?: string | null | undefined;
159
+ };
160
+ }, {
161
+ type: "Feature";
162
+ geometry: z.objectInputType<{
163
+ type: z.ZodLiteral<"Point">;
164
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
165
+ }, z.ZodTypeAny, "passthrough"> | null;
166
+ properties: {
167
+ code: string;
168
+ country: string;
169
+ name: string;
170
+ properties?: Record<string, unknown> | undefined;
171
+ parent?: string | null | undefined;
172
+ parent_country?: string | null | undefined;
173
+ point_gap?: string | null | undefined;
174
+ tags?: string[] | undefined;
175
+ };
176
+ }>;
177
+ /**
178
+ * A pack document. `regions` may be left out (a pack holding only localities) and reads as an
179
+ * empty collection. `localities` stays absent when absent: a pack without the key leaves the
180
+ * localities it installed alone, while an empty section removes them, so no default is given.
181
+ */
182
+ export declare const packSchema: z.ZodEffects<z.ZodObject<{
68
183
  pack: z.ZodObject<{
69
184
  slug: z.ZodString;
70
185
  version: z.ZodString;
@@ -104,7 +219,7 @@ export declare const packSchema: z.ZodObject<{
104
219
  type: z.ZodString;
105
220
  }, z.ZodTypeAny, "passthrough"> | null | undefined;
106
221
  }>, "many">>;
107
- regions: z.ZodObject<{
222
+ regions: z.ZodDefault<z.ZodObject<{
108
223
  type: z.ZodLiteral<"FeatureCollection">;
109
224
  features: z.ZodArray<z.ZodObject<{
110
225
  type: z.ZodLiteral<"Feature">;
@@ -128,26 +243,26 @@ export declare const packSchema: z.ZodObject<{
128
243
  properties: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
129
244
  }, "strip", z.ZodTypeAny, {
130
245
  type: "admin" | "cultural" | "natural" | "custom";
131
- slug: string;
132
- name: string;
133
246
  properties: Record<string, unknown>;
134
247
  country: string;
248
+ name: string;
135
249
  tags: string[];
250
+ slug: string;
136
251
  code?: string | null | undefined;
137
- level?: number | null | undefined;
138
252
  parent?: string | null | undefined;
139
253
  parent_country?: string | null | undefined;
254
+ level?: number | null | undefined;
140
255
  }, {
141
256
  type: "admin" | "cultural" | "natural" | "custom";
142
- slug: string;
143
- name: string;
144
257
  country: string;
258
+ name: string;
259
+ slug: string;
145
260
  code?: string | null | undefined;
146
261
  properties?: Record<string, unknown> | undefined;
147
- level?: number | null | undefined;
148
262
  parent?: string | null | undefined;
149
263
  parent_country?: string | null | undefined;
150
264
  tags?: string[] | undefined;
265
+ level?: number | null | undefined;
151
266
  }>;
152
267
  }, "strip", z.ZodTypeAny, {
153
268
  type: "Feature";
@@ -158,15 +273,15 @@ export declare const packSchema: z.ZodObject<{
158
273
  };
159
274
  properties: {
160
275
  type: "admin" | "cultural" | "natural" | "custom";
161
- slug: string;
162
- name: string;
163
276
  properties: Record<string, unknown>;
164
277
  country: string;
278
+ name: string;
165
279
  tags: string[];
280
+ slug: string;
166
281
  code?: string | null | undefined;
167
- level?: number | null | undefined;
168
282
  parent?: string | null | undefined;
169
283
  parent_country?: string | null | undefined;
284
+ level?: number | null | undefined;
170
285
  };
171
286
  }, {
172
287
  type: "Feature";
@@ -177,15 +292,15 @@ export declare const packSchema: z.ZodObject<{
177
292
  };
178
293
  properties: {
179
294
  type: "admin" | "cultural" | "natural" | "custom";
180
- slug: string;
181
- name: string;
182
295
  country: string;
296
+ name: string;
297
+ slug: string;
183
298
  code?: string | null | undefined;
184
299
  properties?: Record<string, unknown> | undefined;
185
- level?: number | null | undefined;
186
300
  parent?: string | null | undefined;
187
301
  parent_country?: string | null | undefined;
188
302
  tags?: string[] | undefined;
303
+ level?: number | null | undefined;
189
304
  };
190
305
  }>, "many">;
191
306
  }, "strip", z.ZodTypeAny, {
@@ -199,15 +314,15 @@ export declare const packSchema: z.ZodObject<{
199
314
  };
200
315
  properties: {
201
316
  type: "admin" | "cultural" | "natural" | "custom";
202
- slug: string;
203
- name: string;
204
317
  properties: Record<string, unknown>;
205
318
  country: string;
319
+ name: string;
206
320
  tags: string[];
321
+ slug: string;
207
322
  code?: string | null | undefined;
208
- level?: number | null | undefined;
209
323
  parent?: string | null | undefined;
210
324
  parent_country?: string | null | undefined;
325
+ level?: number | null | undefined;
211
326
  };
212
327
  }[];
213
328
  }, {
@@ -221,18 +336,202 @@ export declare const packSchema: z.ZodObject<{
221
336
  };
222
337
  properties: {
223
338
  type: "admin" | "cultural" | "natural" | "custom";
224
- slug: string;
225
- name: string;
226
339
  country: string;
340
+ name: string;
341
+ slug: string;
227
342
  code?: string | null | undefined;
228
343
  properties?: Record<string, unknown> | undefined;
344
+ parent?: string | null | undefined;
345
+ parent_country?: string | null | undefined;
346
+ tags?: string[] | undefined;
229
347
  level?: number | null | undefined;
348
+ };
349
+ }[];
350
+ }>>;
351
+ localities: z.ZodOptional<z.ZodEffects<z.ZodObject<{
352
+ type: z.ZodLiteral<"FeatureCollection">;
353
+ features: z.ZodArray<z.ZodEffects<z.ZodObject<{
354
+ type: z.ZodLiteral<"Feature">;
355
+ geometry: z.ZodNullable<z.ZodObject<{
356
+ type: z.ZodLiteral<"Point">;
357
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
358
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
359
+ type: z.ZodLiteral<"Point">;
360
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
361
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
362
+ type: z.ZodLiteral<"Point">;
363
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
364
+ }, z.ZodTypeAny, "passthrough">>>;
365
+ properties: z.ZodObject<{
366
+ country: z.ZodEffects<z.ZodString, string, string>;
367
+ code: z.ZodString;
368
+ name: z.ZodString;
369
+ parent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
370
+ parent_country: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>>;
371
+ point_gap: z.ZodOptional<z.ZodNullable<z.ZodString>>;
372
+ tags: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
373
+ properties: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
374
+ }, "strip", z.ZodTypeAny, {
375
+ code: string;
376
+ properties: Record<string, unknown>;
377
+ country: string;
378
+ name: string;
379
+ tags: string[];
380
+ parent?: string | null | undefined;
381
+ parent_country?: string | null | undefined;
382
+ point_gap?: string | null | undefined;
383
+ }, {
384
+ code: string;
385
+ country: string;
386
+ name: string;
387
+ properties?: Record<string, unknown> | undefined;
388
+ parent?: string | null | undefined;
389
+ parent_country?: string | null | undefined;
390
+ point_gap?: string | null | undefined;
391
+ tags?: string[] | undefined;
392
+ }>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ type: "Feature";
395
+ geometry: z.objectOutputType<{
396
+ type: z.ZodLiteral<"Point">;
397
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
398
+ }, z.ZodTypeAny, "passthrough"> | null;
399
+ properties: {
400
+ code: string;
401
+ properties: Record<string, unknown>;
402
+ country: string;
403
+ name: string;
404
+ tags: string[];
405
+ parent?: string | null | undefined;
406
+ parent_country?: string | null | undefined;
407
+ point_gap?: string | null | undefined;
408
+ };
409
+ }, {
410
+ type: "Feature";
411
+ geometry: z.objectInputType<{
412
+ type: z.ZodLiteral<"Point">;
413
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
414
+ }, z.ZodTypeAny, "passthrough"> | null;
415
+ properties: {
416
+ code: string;
417
+ country: string;
418
+ name: string;
419
+ properties?: Record<string, unknown> | undefined;
420
+ parent?: string | null | undefined;
421
+ parent_country?: string | null | undefined;
422
+ point_gap?: string | null | undefined;
423
+ tags?: string[] | undefined;
424
+ };
425
+ }>, {
426
+ type: "Feature";
427
+ geometry: z.objectOutputType<{
428
+ type: z.ZodLiteral<"Point">;
429
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
430
+ }, z.ZodTypeAny, "passthrough"> | null;
431
+ properties: {
432
+ code: string;
433
+ properties: Record<string, unknown>;
434
+ country: string;
435
+ name: string;
436
+ tags: string[];
437
+ parent?: string | null | undefined;
438
+ parent_country?: string | null | undefined;
439
+ point_gap?: string | null | undefined;
440
+ };
441
+ }, {
442
+ type: "Feature";
443
+ geometry: z.objectInputType<{
444
+ type: z.ZodLiteral<"Point">;
445
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
446
+ }, z.ZodTypeAny, "passthrough"> | null;
447
+ properties: {
448
+ code: string;
449
+ country: string;
450
+ name: string;
451
+ properties?: Record<string, unknown> | undefined;
452
+ parent?: string | null | undefined;
453
+ parent_country?: string | null | undefined;
454
+ point_gap?: string | null | undefined;
455
+ tags?: string[] | undefined;
456
+ };
457
+ }>, "many">;
458
+ }, "strip", z.ZodTypeAny, {
459
+ type: "FeatureCollection";
460
+ features: {
461
+ type: "Feature";
462
+ geometry: z.objectOutputType<{
463
+ type: z.ZodLiteral<"Point">;
464
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
465
+ }, z.ZodTypeAny, "passthrough"> | null;
466
+ properties: {
467
+ code: string;
468
+ properties: Record<string, unknown>;
469
+ country: string;
470
+ name: string;
471
+ tags: string[];
472
+ parent?: string | null | undefined;
473
+ parent_country?: string | null | undefined;
474
+ point_gap?: string | null | undefined;
475
+ };
476
+ }[];
477
+ }, {
478
+ type: "FeatureCollection";
479
+ features: {
480
+ type: "Feature";
481
+ geometry: z.objectInputType<{
482
+ type: z.ZodLiteral<"Point">;
483
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
484
+ }, z.ZodTypeAny, "passthrough"> | null;
485
+ properties: {
486
+ code: string;
487
+ country: string;
488
+ name: string;
489
+ properties?: Record<string, unknown> | undefined;
230
490
  parent?: string | null | undefined;
231
491
  parent_country?: string | null | undefined;
492
+ point_gap?: string | null | undefined;
232
493
  tags?: string[] | undefined;
233
494
  };
234
495
  }[];
235
- }>;
496
+ }>, {
497
+ type: "FeatureCollection";
498
+ features: {
499
+ type: "Feature";
500
+ geometry: z.objectOutputType<{
501
+ type: z.ZodLiteral<"Point">;
502
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
503
+ }, z.ZodTypeAny, "passthrough"> | null;
504
+ properties: {
505
+ code: string;
506
+ properties: Record<string, unknown>;
507
+ country: string;
508
+ name: string;
509
+ tags: string[];
510
+ parent?: string | null | undefined;
511
+ parent_country?: string | null | undefined;
512
+ point_gap?: string | null | undefined;
513
+ };
514
+ }[];
515
+ }, {
516
+ type: "FeatureCollection";
517
+ features: {
518
+ type: "Feature";
519
+ geometry: z.objectInputType<{
520
+ type: z.ZodLiteral<"Point">;
521
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
522
+ }, z.ZodTypeAny, "passthrough"> | null;
523
+ properties: {
524
+ code: string;
525
+ country: string;
526
+ name: string;
527
+ properties?: Record<string, unknown> | undefined;
528
+ parent?: string | null | undefined;
529
+ parent_country?: string | null | undefined;
530
+ point_gap?: string | null | undefined;
531
+ tags?: string[] | undefined;
532
+ };
533
+ }[];
534
+ }>>;
236
535
  }, "strip", z.ZodTypeAny, {
237
536
  pack: {
238
537
  slug: string;
@@ -258,18 +557,38 @@ export declare const packSchema: z.ZodObject<{
258
557
  };
259
558
  properties: {
260
559
  type: "admin" | "cultural" | "natural" | "custom";
261
- slug: string;
262
- name: string;
263
560
  properties: Record<string, unknown>;
264
561
  country: string;
562
+ name: string;
265
563
  tags: string[];
564
+ slug: string;
266
565
  code?: string | null | undefined;
267
- level?: number | null | undefined;
268
566
  parent?: string | null | undefined;
269
567
  parent_country?: string | null | undefined;
568
+ level?: number | null | undefined;
270
569
  };
271
570
  }[];
272
571
  };
572
+ localities?: {
573
+ type: "FeatureCollection";
574
+ features: {
575
+ type: "Feature";
576
+ geometry: z.objectOutputType<{
577
+ type: z.ZodLiteral<"Point">;
578
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
579
+ }, z.ZodTypeAny, "passthrough"> | null;
580
+ properties: {
581
+ code: string;
582
+ properties: Record<string, unknown>;
583
+ country: string;
584
+ name: string;
585
+ tags: string[];
586
+ parent?: string | null | undefined;
587
+ parent_country?: string | null | undefined;
588
+ point_gap?: string | null | undefined;
589
+ };
590
+ }[];
591
+ } | undefined;
273
592
  }, {
274
593
  pack: {
275
594
  slug: string;
@@ -277,7 +596,14 @@ export declare const packSchema: z.ZodObject<{
277
596
  schema_version: number;
278
597
  published_at?: string | undefined;
279
598
  };
280
- regions: {
599
+ countries?: {
600
+ code: string;
601
+ name: string;
602
+ geometry?: z.objectInputType<{
603
+ type: z.ZodString;
604
+ }, z.ZodTypeAny, "passthrough"> | null | undefined;
605
+ }[] | undefined;
606
+ regions?: {
281
607
  type: "FeatureCollection";
282
608
  features: {
283
609
  type: "Feature";
@@ -288,17 +614,101 @@ export declare const packSchema: z.ZodObject<{
288
614
  };
289
615
  properties: {
290
616
  type: "admin" | "cultural" | "natural" | "custom";
291
- slug: string;
292
- name: string;
293
617
  country: string;
618
+ name: string;
619
+ slug: string;
294
620
  code?: string | null | undefined;
295
621
  properties?: Record<string, unknown> | undefined;
622
+ parent?: string | null | undefined;
623
+ parent_country?: string | null | undefined;
624
+ tags?: string[] | undefined;
296
625
  level?: number | null | undefined;
626
+ };
627
+ }[];
628
+ } | undefined;
629
+ localities?: {
630
+ type: "FeatureCollection";
631
+ features: {
632
+ type: "Feature";
633
+ geometry: z.objectInputType<{
634
+ type: z.ZodLiteral<"Point">;
635
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
636
+ }, z.ZodTypeAny, "passthrough"> | null;
637
+ properties: {
638
+ code: string;
639
+ country: string;
640
+ name: string;
641
+ properties?: Record<string, unknown> | undefined;
297
642
  parent?: string | null | undefined;
298
643
  parent_country?: string | null | undefined;
644
+ point_gap?: string | null | undefined;
299
645
  tags?: string[] | undefined;
300
646
  };
301
647
  }[];
648
+ } | undefined;
649
+ }>, {
650
+ pack: {
651
+ slug: string;
652
+ version: string;
653
+ schema_version: number;
654
+ published_at?: string | undefined;
655
+ };
656
+ countries: {
657
+ code: string;
658
+ name: string;
659
+ geometry?: z.objectOutputType<{
660
+ type: z.ZodString;
661
+ }, z.ZodTypeAny, "passthrough"> | null | undefined;
662
+ }[];
663
+ regions: {
664
+ type: "FeatureCollection";
665
+ features: {
666
+ type: "Feature";
667
+ geometry: {
668
+ type: string;
669
+ } & {
670
+ [k: string]: unknown;
671
+ };
672
+ properties: {
673
+ type: "admin" | "cultural" | "natural" | "custom";
674
+ properties: Record<string, unknown>;
675
+ country: string;
676
+ name: string;
677
+ tags: string[];
678
+ slug: string;
679
+ code?: string | null | undefined;
680
+ parent?: string | null | undefined;
681
+ parent_country?: string | null | undefined;
682
+ level?: number | null | undefined;
683
+ };
684
+ }[];
685
+ };
686
+ localities?: {
687
+ type: "FeatureCollection";
688
+ features: {
689
+ type: "Feature";
690
+ geometry: z.objectOutputType<{
691
+ type: z.ZodLiteral<"Point">;
692
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
693
+ }, z.ZodTypeAny, "passthrough"> | null;
694
+ properties: {
695
+ code: string;
696
+ properties: Record<string, unknown>;
697
+ country: string;
698
+ name: string;
699
+ tags: string[];
700
+ parent?: string | null | undefined;
701
+ parent_country?: string | null | undefined;
702
+ point_gap?: string | null | undefined;
703
+ };
704
+ }[];
705
+ } | undefined;
706
+ }, {
707
+ pack: {
708
+ slug: string;
709
+ version: string;
710
+ schema_version: number;
711
+ published_at?: string | undefined;
302
712
  };
303
713
  countries?: {
304
714
  code: string;
@@ -307,6 +717,49 @@ export declare const packSchema: z.ZodObject<{
307
717
  type: z.ZodString;
308
718
  }, z.ZodTypeAny, "passthrough"> | null | undefined;
309
719
  }[] | undefined;
720
+ regions?: {
721
+ type: "FeatureCollection";
722
+ features: {
723
+ type: "Feature";
724
+ geometry: {
725
+ type: string;
726
+ } & {
727
+ [k: string]: unknown;
728
+ };
729
+ properties: {
730
+ type: "admin" | "cultural" | "natural" | "custom";
731
+ country: string;
732
+ name: string;
733
+ slug: string;
734
+ code?: string | null | undefined;
735
+ properties?: Record<string, unknown> | undefined;
736
+ parent?: string | null | undefined;
737
+ parent_country?: string | null | undefined;
738
+ tags?: string[] | undefined;
739
+ level?: number | null | undefined;
740
+ };
741
+ }[];
742
+ } | undefined;
743
+ localities?: {
744
+ type: "FeatureCollection";
745
+ features: {
746
+ type: "Feature";
747
+ geometry: z.objectInputType<{
748
+ type: z.ZodLiteral<"Point">;
749
+ coordinates: z.ZodArray<z.ZodNumber, "many">;
750
+ }, z.ZodTypeAny, "passthrough"> | null;
751
+ properties: {
752
+ code: string;
753
+ country: string;
754
+ name: string;
755
+ properties?: Record<string, unknown> | undefined;
756
+ parent?: string | null | undefined;
757
+ parent_country?: string | null | undefined;
758
+ point_gap?: string | null | undefined;
759
+ tags?: string[] | undefined;
760
+ };
761
+ }[];
762
+ } | undefined;
310
763
  }>;
311
764
  export type Pack = z.infer<typeof packSchema>;
312
765
  export interface PackInfo {
@@ -316,6 +769,7 @@ export interface PackInfo {
316
769
  schema_version: number;
317
770
  installed_at: string;
318
771
  region_count: number;
772
+ locality_count: number;
319
773
  }
320
774
  export interface InstallPackResult {
321
775
  pack: string;
@@ -323,4 +777,27 @@ export interface InstallPackResult {
323
777
  countries: number;
324
778
  regions: number;
325
779
  memberships: number;
780
+ /** How many localities the pack holds; present only when the document had a `localities` section. */
781
+ localities?: number;
782
+ }
783
+ /** What every locality read returns, and what `upsertLocality` answers. */
784
+ export interface LocalitySummary {
785
+ /** ISO country code, upper case. With `code`, the key a host's foreign key references. */
786
+ country: string;
787
+ code: string;
788
+ name: string;
789
+ /** The label point, [lng, lat]; null when the locality has a `point_gap` instead. */
790
+ point: [number, number] | null;
791
+ point_gap: string | null;
792
+ /** The parent region; null when it has none or its pack is not installed. */
793
+ parent: {
794
+ slug: string;
795
+ name: string;
796
+ } | null;
797
+ tags: string[];
798
+ properties: Record<string, unknown>;
799
+ /** The slug of the pack that owns it; null for a local locality. */
800
+ pack: string | null;
801
+ /** Geodesic metres from the point asked about, to 0.1 m: `localitiesNear` only. */
802
+ distance_m?: number;
326
803
  }