@mapka/tilestats 0.0.0-stage → 0.1.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.
@@ -0,0 +1,667 @@
1
+ import { z } from "zod";
2
+ /** `zoom`: an archive, counted per zoom of its tiles. `total`: a feature stream, counted in rows. */
3
+ export type CountMode = "zoom" | "total";
4
+ export interface CountsJSON {
5
+ /** Keyed by zoom, ascending. */
6
+ zoom: Record<string, number>;
7
+ total: number;
8
+ }
9
+ /** An integer outside the safe range, as text that `JSON.stringify` writes unquoted. */
10
+ export type RawInteger = ReturnType<typeof JSON.rawJSON>;
11
+ /** Names for the `$defs` of the generated JSON Schema, and extra keywords zod cannot express. */
12
+ export declare const jsonSchemaMetadata: z.core.$ZodRegistry<{
13
+ id: string;
14
+ } & Record<string, unknown>, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
15
+ declare const GeometrySchema: z.ZodObject<{
16
+ Point: z.ZodInt;
17
+ LineString: z.ZodInt;
18
+ Polygon: z.ZodInt;
19
+ }, z.core.$strict>;
20
+ declare const TypesSchema: z.ZodObject<{
21
+ string: z.ZodInt;
22
+ number: z.ZodInt;
23
+ bigint: z.ZodInt;
24
+ boolean: z.ZodInt;
25
+ }, z.core.$strict>;
26
+ export type GeometryCounts = z.infer<typeof GeometrySchema>;
27
+ export type TypeCounts = z.infer<typeof TypesSchema>;
28
+ export declare const RawIntegerSchema: z.ZodCustom<{
29
+ readonly rawJSON: string;
30
+ }, {
31
+ readonly rawJSON: string;
32
+ }>;
33
+ export type OutputValue = string | number | boolean | RawInteger;
34
+ declare const PlainBodySchema: z.ZodObject<{
35
+ type: z.ZodEnum<{
36
+ boolean: "boolean";
37
+ mixed: "mixed";
38
+ string: "string";
39
+ }>;
40
+ types: z.ZodObject<{
41
+ string: z.ZodInt;
42
+ number: z.ZodInt;
43
+ bigint: z.ZodInt;
44
+ boolean: z.ZodInt;
45
+ }, z.core.$strict>;
46
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
47
+ exact: z.ZodLiteral<true>;
48
+ distinct: z.ZodInt;
49
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
50
+ readonly rawJSON: string;
51
+ }, {
52
+ readonly rawJSON: string;
53
+ }>]>, z.ZodInt], null>>;
54
+ }, z.core.$strict>, z.ZodObject<{
55
+ exact: z.ZodLiteral<false>;
56
+ distinct: z.ZodInt;
57
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
58
+ readonly rawJSON: string;
59
+ }, {
60
+ readonly rawJSON: string;
61
+ }>]>>;
62
+ }, z.core.$strict>], "exact">;
63
+ }, z.core.$strict>;
64
+ declare const NumericBodySchema: z.ZodObject<{
65
+ type: z.ZodEnum<{
66
+ integer: "integer";
67
+ number: "number";
68
+ }>;
69
+ types: z.ZodObject<{
70
+ string: z.ZodInt;
71
+ number: z.ZodInt;
72
+ bigint: z.ZodInt;
73
+ boolean: z.ZodInt;
74
+ }, z.core.$strict>;
75
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
76
+ readonly rawJSON: string;
77
+ }, {
78
+ readonly rawJSON: string;
79
+ }>]>;
80
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
81
+ readonly rawJSON: string;
82
+ }, {
83
+ readonly rawJSON: string;
84
+ }>]>;
85
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
86
+ exact: z.ZodLiteral<true>;
87
+ distinct: z.ZodInt;
88
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
89
+ readonly rawJSON: string;
90
+ }, {
91
+ readonly rawJSON: string;
92
+ }>]>, z.ZodInt], null>>;
93
+ }, z.core.$strict>, z.ZodObject<{
94
+ exact: z.ZodLiteral<false>;
95
+ distinct: z.ZodInt;
96
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
97
+ readonly rawJSON: string;
98
+ }, {
99
+ readonly rawJSON: string;
100
+ }>]>>;
101
+ }, z.core.$strict>], "exact">;
102
+ }, z.core.$strict>;
103
+ declare const MixedNumericBodySchema: z.ZodObject<{
104
+ type: z.ZodLiteral<"mixed-numeric">;
105
+ types: z.ZodObject<{
106
+ string: z.ZodInt;
107
+ number: z.ZodInt;
108
+ bigint: z.ZodInt;
109
+ boolean: z.ZodInt;
110
+ }, z.core.$strict>;
111
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
112
+ readonly rawJSON: string;
113
+ }, {
114
+ readonly rawJSON: string;
115
+ }>]>;
116
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
117
+ readonly rawJSON: string;
118
+ }, {
119
+ readonly rawJSON: string;
120
+ }>]>;
121
+ integer: z.ZodBoolean;
122
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
123
+ exact: z.ZodLiteral<true>;
124
+ distinct: z.ZodInt;
125
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
126
+ readonly rawJSON: string;
127
+ }, {
128
+ readonly rawJSON: string;
129
+ }>]>, z.ZodInt], null>>;
130
+ }, z.core.$strict>, z.ZodObject<{
131
+ exact: z.ZodLiteral<false>;
132
+ distinct: z.ZodInt;
133
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
134
+ readonly rawJSON: string;
135
+ }, {
136
+ readonly rawJSON: string;
137
+ }>]>>;
138
+ }, z.core.$strict>], "exact">;
139
+ }, z.core.$strict>;
140
+ export type AttributeBody = z.infer<typeof PlainBodySchema> | z.infer<typeof NumericBodySchema> | z.infer<typeof MixedNumericBodySchema>;
141
+ declare const ZoomVectorStatsSchema: z.ZodObject<{
142
+ version: z.ZodLiteral<1>;
143
+ counts: z.ZodLiteral<"zoom">;
144
+ layers: z.ZodArray<z.ZodObject<{
145
+ layer: z.ZodString;
146
+ count: z.ZodRecord<z.ZodString, z.ZodInt>;
147
+ geometry: z.ZodObject<{
148
+ Point: z.ZodInt;
149
+ LineString: z.ZodInt;
150
+ Polygon: z.ZodInt;
151
+ }, z.core.$strict>;
152
+ attributes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
153
+ type: z.ZodEnum<{
154
+ boolean: "boolean";
155
+ mixed: "mixed";
156
+ string: "string";
157
+ }>;
158
+ types: z.ZodObject<{
159
+ string: z.ZodInt;
160
+ number: z.ZodInt;
161
+ bigint: z.ZodInt;
162
+ boolean: z.ZodInt;
163
+ }, z.core.$strict>;
164
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
165
+ exact: z.ZodLiteral<true>;
166
+ distinct: z.ZodInt;
167
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
168
+ readonly rawJSON: string;
169
+ }, {
170
+ readonly rawJSON: string;
171
+ }>]>, z.ZodInt], null>>;
172
+ }, z.core.$strict>, z.ZodObject<{
173
+ exact: z.ZodLiteral<false>;
174
+ distinct: z.ZodInt;
175
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
176
+ readonly rawJSON: string;
177
+ }, {
178
+ readonly rawJSON: string;
179
+ }>]>>;
180
+ }, z.core.$strict>], "exact">;
181
+ attribute: z.ZodString;
182
+ present: z.ZodRecord<z.ZodString, z.ZodInt>;
183
+ }, z.core.$strict>, z.ZodObject<{
184
+ type: z.ZodEnum<{
185
+ integer: "integer";
186
+ number: "number";
187
+ }>;
188
+ types: z.ZodObject<{
189
+ string: z.ZodInt;
190
+ number: z.ZodInt;
191
+ bigint: z.ZodInt;
192
+ boolean: z.ZodInt;
193
+ }, z.core.$strict>;
194
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
195
+ readonly rawJSON: string;
196
+ }, {
197
+ readonly rawJSON: string;
198
+ }>]>;
199
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
200
+ readonly rawJSON: string;
201
+ }, {
202
+ readonly rawJSON: string;
203
+ }>]>;
204
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
205
+ exact: z.ZodLiteral<true>;
206
+ distinct: z.ZodInt;
207
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
208
+ readonly rawJSON: string;
209
+ }, {
210
+ readonly rawJSON: string;
211
+ }>]>, z.ZodInt], null>>;
212
+ }, z.core.$strict>, z.ZodObject<{
213
+ exact: z.ZodLiteral<false>;
214
+ distinct: z.ZodInt;
215
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
216
+ readonly rawJSON: string;
217
+ }, {
218
+ readonly rawJSON: string;
219
+ }>]>>;
220
+ }, z.core.$strict>], "exact">;
221
+ attribute: z.ZodString;
222
+ present: z.ZodRecord<z.ZodString, z.ZodInt>;
223
+ }, z.core.$strict>, z.ZodObject<{
224
+ type: z.ZodLiteral<"mixed-numeric">;
225
+ types: z.ZodObject<{
226
+ string: z.ZodInt;
227
+ number: z.ZodInt;
228
+ bigint: z.ZodInt;
229
+ boolean: z.ZodInt;
230
+ }, z.core.$strict>;
231
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
232
+ readonly rawJSON: string;
233
+ }, {
234
+ readonly rawJSON: string;
235
+ }>]>;
236
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
237
+ readonly rawJSON: string;
238
+ }, {
239
+ readonly rawJSON: string;
240
+ }>]>;
241
+ integer: z.ZodBoolean;
242
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
243
+ exact: z.ZodLiteral<true>;
244
+ distinct: z.ZodInt;
245
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
246
+ readonly rawJSON: string;
247
+ }, {
248
+ readonly rawJSON: string;
249
+ }>]>, z.ZodInt], null>>;
250
+ }, z.core.$strict>, z.ZodObject<{
251
+ exact: z.ZodLiteral<false>;
252
+ distinct: z.ZodInt;
253
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
254
+ readonly rawJSON: string;
255
+ }, {
256
+ readonly rawJSON: string;
257
+ }>]>>;
258
+ }, z.core.$strict>], "exact">;
259
+ attribute: z.ZodString;
260
+ present: z.ZodRecord<z.ZodString, z.ZodInt>;
261
+ }, z.core.$strict>], "type">>;
262
+ }, z.core.$strict>>;
263
+ }, z.core.$strict>;
264
+ declare const TotalVectorStatsSchema: z.ZodObject<{
265
+ version: z.ZodLiteral<1>;
266
+ counts: z.ZodLiteral<"total">;
267
+ layers: z.ZodArray<z.ZodObject<{
268
+ layer: z.ZodString;
269
+ count: z.ZodInt;
270
+ geometry: z.ZodObject<{
271
+ Point: z.ZodInt;
272
+ LineString: z.ZodInt;
273
+ Polygon: z.ZodInt;
274
+ }, z.core.$strict>;
275
+ attributes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
276
+ type: z.ZodEnum<{
277
+ boolean: "boolean";
278
+ mixed: "mixed";
279
+ string: "string";
280
+ }>;
281
+ types: z.ZodObject<{
282
+ string: z.ZodInt;
283
+ number: z.ZodInt;
284
+ bigint: z.ZodInt;
285
+ boolean: z.ZodInt;
286
+ }, z.core.$strict>;
287
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
288
+ exact: z.ZodLiteral<true>;
289
+ distinct: z.ZodInt;
290
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
291
+ readonly rawJSON: string;
292
+ }, {
293
+ readonly rawJSON: string;
294
+ }>]>, z.ZodInt], null>>;
295
+ }, z.core.$strict>, z.ZodObject<{
296
+ exact: z.ZodLiteral<false>;
297
+ distinct: z.ZodInt;
298
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
299
+ readonly rawJSON: string;
300
+ }, {
301
+ readonly rawJSON: string;
302
+ }>]>>;
303
+ }, z.core.$strict>], "exact">;
304
+ attribute: z.ZodString;
305
+ present: z.ZodInt;
306
+ }, z.core.$strict>, z.ZodObject<{
307
+ type: z.ZodEnum<{
308
+ integer: "integer";
309
+ number: "number";
310
+ }>;
311
+ types: z.ZodObject<{
312
+ string: z.ZodInt;
313
+ number: z.ZodInt;
314
+ bigint: z.ZodInt;
315
+ boolean: z.ZodInt;
316
+ }, z.core.$strict>;
317
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
318
+ readonly rawJSON: string;
319
+ }, {
320
+ readonly rawJSON: string;
321
+ }>]>;
322
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
323
+ readonly rawJSON: string;
324
+ }, {
325
+ readonly rawJSON: string;
326
+ }>]>;
327
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
328
+ exact: z.ZodLiteral<true>;
329
+ distinct: z.ZodInt;
330
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
331
+ readonly rawJSON: string;
332
+ }, {
333
+ readonly rawJSON: string;
334
+ }>]>, z.ZodInt], null>>;
335
+ }, z.core.$strict>, z.ZodObject<{
336
+ exact: z.ZodLiteral<false>;
337
+ distinct: z.ZodInt;
338
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
339
+ readonly rawJSON: string;
340
+ }, {
341
+ readonly rawJSON: string;
342
+ }>]>>;
343
+ }, z.core.$strict>], "exact">;
344
+ attribute: z.ZodString;
345
+ present: z.ZodInt;
346
+ }, z.core.$strict>, z.ZodObject<{
347
+ type: z.ZodLiteral<"mixed-numeric">;
348
+ types: z.ZodObject<{
349
+ string: z.ZodInt;
350
+ number: z.ZodInt;
351
+ bigint: z.ZodInt;
352
+ boolean: z.ZodInt;
353
+ }, z.core.$strict>;
354
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
355
+ readonly rawJSON: string;
356
+ }, {
357
+ readonly rawJSON: string;
358
+ }>]>;
359
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
360
+ readonly rawJSON: string;
361
+ }, {
362
+ readonly rawJSON: string;
363
+ }>]>;
364
+ integer: z.ZodBoolean;
365
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
366
+ exact: z.ZodLiteral<true>;
367
+ distinct: z.ZodInt;
368
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
369
+ readonly rawJSON: string;
370
+ }, {
371
+ readonly rawJSON: string;
372
+ }>]>, z.ZodInt], null>>;
373
+ }, z.core.$strict>, z.ZodObject<{
374
+ exact: z.ZodLiteral<false>;
375
+ distinct: z.ZodInt;
376
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
377
+ readonly rawJSON: string;
378
+ }, {
379
+ readonly rawJSON: string;
380
+ }>]>>;
381
+ }, z.core.$strict>], "exact">;
382
+ attribute: z.ZodString;
383
+ present: z.ZodInt;
384
+ }, z.core.$strict>], "type">>;
385
+ }, z.core.$strict>>;
386
+ }, z.core.$strict>;
387
+ export declare const VectorStatsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
388
+ version: z.ZodLiteral<1>;
389
+ counts: z.ZodLiteral<"zoom">;
390
+ layers: z.ZodArray<z.ZodObject<{
391
+ layer: z.ZodString;
392
+ count: z.ZodRecord<z.ZodString, z.ZodInt>;
393
+ geometry: z.ZodObject<{
394
+ Point: z.ZodInt;
395
+ LineString: z.ZodInt;
396
+ Polygon: z.ZodInt;
397
+ }, z.core.$strict>;
398
+ attributes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
399
+ type: z.ZodEnum<{
400
+ boolean: "boolean";
401
+ mixed: "mixed";
402
+ string: "string";
403
+ }>;
404
+ types: z.ZodObject<{
405
+ string: z.ZodInt;
406
+ number: z.ZodInt;
407
+ bigint: z.ZodInt;
408
+ boolean: z.ZodInt;
409
+ }, z.core.$strict>;
410
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
411
+ exact: z.ZodLiteral<true>;
412
+ distinct: z.ZodInt;
413
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
414
+ readonly rawJSON: string;
415
+ }, {
416
+ readonly rawJSON: string;
417
+ }>]>, z.ZodInt], null>>;
418
+ }, z.core.$strict>, z.ZodObject<{
419
+ exact: z.ZodLiteral<false>;
420
+ distinct: z.ZodInt;
421
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
422
+ readonly rawJSON: string;
423
+ }, {
424
+ readonly rawJSON: string;
425
+ }>]>>;
426
+ }, z.core.$strict>], "exact">;
427
+ attribute: z.ZodString;
428
+ present: z.ZodRecord<z.ZodString, z.ZodInt>;
429
+ }, z.core.$strict>, z.ZodObject<{
430
+ type: z.ZodEnum<{
431
+ integer: "integer";
432
+ number: "number";
433
+ }>;
434
+ types: z.ZodObject<{
435
+ string: z.ZodInt;
436
+ number: z.ZodInt;
437
+ bigint: z.ZodInt;
438
+ boolean: z.ZodInt;
439
+ }, z.core.$strict>;
440
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
441
+ readonly rawJSON: string;
442
+ }, {
443
+ readonly rawJSON: string;
444
+ }>]>;
445
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
446
+ readonly rawJSON: string;
447
+ }, {
448
+ readonly rawJSON: string;
449
+ }>]>;
450
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
451
+ exact: z.ZodLiteral<true>;
452
+ distinct: z.ZodInt;
453
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
454
+ readonly rawJSON: string;
455
+ }, {
456
+ readonly rawJSON: string;
457
+ }>]>, z.ZodInt], null>>;
458
+ }, z.core.$strict>, z.ZodObject<{
459
+ exact: z.ZodLiteral<false>;
460
+ distinct: z.ZodInt;
461
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
462
+ readonly rawJSON: string;
463
+ }, {
464
+ readonly rawJSON: string;
465
+ }>]>>;
466
+ }, z.core.$strict>], "exact">;
467
+ attribute: z.ZodString;
468
+ present: z.ZodRecord<z.ZodString, z.ZodInt>;
469
+ }, z.core.$strict>, z.ZodObject<{
470
+ type: z.ZodLiteral<"mixed-numeric">;
471
+ types: z.ZodObject<{
472
+ string: z.ZodInt;
473
+ number: z.ZodInt;
474
+ bigint: z.ZodInt;
475
+ boolean: z.ZodInt;
476
+ }, z.core.$strict>;
477
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
478
+ readonly rawJSON: string;
479
+ }, {
480
+ readonly rawJSON: string;
481
+ }>]>;
482
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
483
+ readonly rawJSON: string;
484
+ }, {
485
+ readonly rawJSON: string;
486
+ }>]>;
487
+ integer: z.ZodBoolean;
488
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
489
+ exact: z.ZodLiteral<true>;
490
+ distinct: z.ZodInt;
491
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
492
+ readonly rawJSON: string;
493
+ }, {
494
+ readonly rawJSON: string;
495
+ }>]>, z.ZodInt], null>>;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ exact: z.ZodLiteral<false>;
498
+ distinct: z.ZodInt;
499
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
500
+ readonly rawJSON: string;
501
+ }, {
502
+ readonly rawJSON: string;
503
+ }>]>>;
504
+ }, z.core.$strict>], "exact">;
505
+ attribute: z.ZodString;
506
+ present: z.ZodRecord<z.ZodString, z.ZodInt>;
507
+ }, z.core.$strict>], "type">>;
508
+ }, z.core.$strict>>;
509
+ }, z.core.$strict>, z.ZodObject<{
510
+ version: z.ZodLiteral<1>;
511
+ counts: z.ZodLiteral<"total">;
512
+ layers: z.ZodArray<z.ZodObject<{
513
+ layer: z.ZodString;
514
+ count: z.ZodInt;
515
+ geometry: z.ZodObject<{
516
+ Point: z.ZodInt;
517
+ LineString: z.ZodInt;
518
+ Polygon: z.ZodInt;
519
+ }, z.core.$strict>;
520
+ attributes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
521
+ type: z.ZodEnum<{
522
+ boolean: "boolean";
523
+ mixed: "mixed";
524
+ string: "string";
525
+ }>;
526
+ types: z.ZodObject<{
527
+ string: z.ZodInt;
528
+ number: z.ZodInt;
529
+ bigint: z.ZodInt;
530
+ boolean: z.ZodInt;
531
+ }, z.core.$strict>;
532
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
533
+ exact: z.ZodLiteral<true>;
534
+ distinct: z.ZodInt;
535
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
536
+ readonly rawJSON: string;
537
+ }, {
538
+ readonly rawJSON: string;
539
+ }>]>, z.ZodInt], null>>;
540
+ }, z.core.$strict>, z.ZodObject<{
541
+ exact: z.ZodLiteral<false>;
542
+ distinct: z.ZodInt;
543
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
544
+ readonly rawJSON: string;
545
+ }, {
546
+ readonly rawJSON: string;
547
+ }>]>>;
548
+ }, z.core.$strict>], "exact">;
549
+ attribute: z.ZodString;
550
+ present: z.ZodInt;
551
+ }, z.core.$strict>, z.ZodObject<{
552
+ type: z.ZodEnum<{
553
+ integer: "integer";
554
+ number: "number";
555
+ }>;
556
+ types: z.ZodObject<{
557
+ string: z.ZodInt;
558
+ number: z.ZodInt;
559
+ bigint: z.ZodInt;
560
+ boolean: z.ZodInt;
561
+ }, z.core.$strict>;
562
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
563
+ readonly rawJSON: string;
564
+ }, {
565
+ readonly rawJSON: string;
566
+ }>]>;
567
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
568
+ readonly rawJSON: string;
569
+ }, {
570
+ readonly rawJSON: string;
571
+ }>]>;
572
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
573
+ exact: z.ZodLiteral<true>;
574
+ distinct: z.ZodInt;
575
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
576
+ readonly rawJSON: string;
577
+ }, {
578
+ readonly rawJSON: string;
579
+ }>]>, z.ZodInt], null>>;
580
+ }, z.core.$strict>, z.ZodObject<{
581
+ exact: z.ZodLiteral<false>;
582
+ distinct: z.ZodInt;
583
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
584
+ readonly rawJSON: string;
585
+ }, {
586
+ readonly rawJSON: string;
587
+ }>]>>;
588
+ }, z.core.$strict>], "exact">;
589
+ attribute: z.ZodString;
590
+ present: z.ZodInt;
591
+ }, z.core.$strict>, z.ZodObject<{
592
+ type: z.ZodLiteral<"mixed-numeric">;
593
+ types: z.ZodObject<{
594
+ string: z.ZodInt;
595
+ number: z.ZodInt;
596
+ bigint: z.ZodInt;
597
+ boolean: z.ZodInt;
598
+ }, z.core.$strict>;
599
+ min: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
600
+ readonly rawJSON: string;
601
+ }, {
602
+ readonly rawJSON: string;
603
+ }>]>;
604
+ max: z.ZodUnion<readonly [z.ZodNumber, z.ZodCustom<{
605
+ readonly rawJSON: string;
606
+ }, {
607
+ readonly rawJSON: string;
608
+ }>]>;
609
+ integer: z.ZodBoolean;
610
+ values: z.ZodDiscriminatedUnion<[z.ZodObject<{
611
+ exact: z.ZodLiteral<true>;
612
+ distinct: z.ZodInt;
613
+ top: z.ZodArray<z.ZodTuple<[z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
614
+ readonly rawJSON: string;
615
+ }, {
616
+ readonly rawJSON: string;
617
+ }>]>, z.ZodInt], null>>;
618
+ }, z.core.$strict>, z.ZodObject<{
619
+ exact: z.ZodLiteral<false>;
620
+ distinct: z.ZodInt;
621
+ examples: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodCustom<{
622
+ readonly rawJSON: string;
623
+ }, {
624
+ readonly rawJSON: string;
625
+ }>]>>;
626
+ }, z.core.$strict>], "exact">;
627
+ attribute: z.ZodString;
628
+ present: z.ZodInt;
629
+ }, z.core.$strict>], "type">>;
630
+ }, z.core.$strict>>;
631
+ }, z.core.$strict>], "counts">;
632
+ interface VectorStatsByMode {
633
+ zoom: z.infer<typeof ZoomVectorStatsSchema>;
634
+ total: z.infer<typeof TotalVectorStatsSchema>;
635
+ }
636
+ export type VectorStats<M extends CountMode = CountMode> = VectorStatsByMode[M];
637
+ export type VectorStatsAttribute<M extends CountMode = CountMode> = {
638
+ attribute: string;
639
+ present: CountsJSON[M];
640
+ } & AttributeBody;
641
+ export interface VectorStatsLayer<M extends CountMode = CountMode> {
642
+ layer: string;
643
+ count: CountsJSON[M];
644
+ geometry: GeometryCounts;
645
+ attributes: VectorStatsAttribute<M>[];
646
+ }
647
+ declare const LimitsSchema: z.ZodObject<{
648
+ maxAttributes: z.ZodDefault<z.ZodInt>;
649
+ maxDistinct: z.ZodDefault<z.ZodInt>;
650
+ maxTop: z.ZodDefault<z.ZodInt>;
651
+ maxExamples: z.ZodDefault<z.ZodInt>;
652
+ maxStringLength: z.ZodDefault<z.ZodInt>;
653
+ }, z.core.$strict>;
654
+ /** Any subset of the limits; the rest take their defaults. */
655
+ export declare const OptionsSchema: z.ZodObject<{
656
+ limits: z.ZodPrefault<z.ZodObject<{
657
+ maxAttributes: z.ZodDefault<z.ZodInt>;
658
+ maxDistinct: z.ZodDefault<z.ZodInt>;
659
+ maxTop: z.ZodDefault<z.ZodInt>;
660
+ maxExamples: z.ZodDefault<z.ZodInt>;
661
+ maxStringLength: z.ZodDefault<z.ZodInt>;
662
+ }, z.core.$strict>>;
663
+ }, z.core.$strict>;
664
+ export type Options = z.input<typeof OptionsSchema>;
665
+ export type Limits = z.output<typeof LimitsSchema>;
666
+ export {};
667
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qGAAqG;AACrG,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEzC,MAAM,WAAW,UAAU;IACzB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wFAAwF;AACxF,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AAEzD,iGAAiG;AACjG,eAAO,MAAM,kBAAkB;QAAoB,MAAM;2GAA+B,CAAC;A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