@tileflow/routing 0.0.0-bootstrap.0 → 0.1.0-alpha.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,708 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Wire contract of the Tileflow Routing API. Positions are `[longitude, latitude]` in WGS84;
5
+ * distances are metres and durations seconds, estimated without traffic.
6
+ */
7
+ declare const routingModes: readonly ["driving", "walking", "cycling", "truck"];
8
+ type RoutingMode = (typeof routingModes)[number];
9
+ /** Road kinds a request may ask to avoid. Avoidance is a strong preference, not an exclusion. */
10
+ declare const routingAvoidances: readonly ["tolls", "highways", "ferries"];
11
+ type RoutingAvoidance = (typeof routingAvoidances)[number];
12
+ /**
13
+ * Traffic a request may use. Only `none` exists today; `typical` and `live` will join it without
14
+ * changing the shape of requests or answers.
15
+ */
16
+ declare const routingTrafficKinds: readonly ["none"];
17
+ type RoutingTraffic = (typeof routingTrafficKinds)[number];
18
+ /** Languages the instructions can be written in. */
19
+ declare const routingLanguages: readonly ["ar-SA", "bg-BG", "ca-ES", "cs-CZ", "da-DK", "de-DE", "el-GR", "en-AU", "en-GB", "en-US", "es-ES", "et-EE", "fi-FI", "fr-FR", "hi-IN", "hu-HU", "it-IT", "ja-JP", "ko-KR", "mn-MN", "nb-NO", "nl-NL", "pl-PL", "pt-BR", "pt-PT", "ro-RO", "ru-RU", "sk-SK", "sl-SI", "sv-SE", "tr-TR", "uk-UA", "vi-VN"];
20
+ type RoutingLanguage = (typeof routingLanguages)[number];
21
+ declare const routingLimits: Readonly<{
22
+ maximumRequestBytes: number;
23
+ maximumResponseBytes: number;
24
+ minimumLocations: 2;
25
+ maximumLocations: 5;
26
+ maximumAlternatives: 2;
27
+ /** Sum of straight-line distances between consecutive locations, per mode. */
28
+ maximumDirectDistanceMeters: Readonly<{
29
+ driving: number;
30
+ walking: number;
31
+ cycling: number;
32
+ truck: number;
33
+ }>;
34
+ maximumMatrixSources: 25;
35
+ maximumMatrixTargets: 25;
36
+ /** Straight-line distance between any matrix source and target, per mode. */
37
+ maximumMatrixDistanceMeters: Readonly<{
38
+ driving: number;
39
+ walking: number;
40
+ cycling: number;
41
+ truck: number;
42
+ }>;
43
+ minimumTracePositions: 2;
44
+ maximumTracePositions: 100;
45
+ /** Sum of straight-line distances between consecutive trace positions. */
46
+ maximumTraceDistanceMeters: 200000;
47
+ /** Straight-line distance between consecutive trace positions. */
48
+ maximumTraceGapMeters: 2000;
49
+ maximumTraceAccuracyMeters: 100;
50
+ maximumRoads: 2000;
51
+ maximumContours: 4;
52
+ minimumMinutes: 1;
53
+ maximumMinutes: 60;
54
+ maximumSteps: 2000;
55
+ maximumGeometryPositions: 200000;
56
+ maximumIsochroneVertices: 200000;
57
+ }>;
58
+ declare const routingAttribution = "\u00A9 OpenStreetMap contributors";
59
+ declare const routingPositionSchema: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
60
+ type RoutingPosition = z.infer<typeof routingPositionSchema>;
61
+ /** Great-circle distance in metres between two positions. */
62
+ declare function routingDirectDistance(a: RoutingPosition, b: RoutingPosition): number;
63
+ /** Dimensions of a truck, which its route must respect where OpenStreetMap records limits. */
64
+ declare const routingVehicleSchema: z.ZodObject<{
65
+ heightMeters: z.ZodOptional<z.ZodNumber>;
66
+ widthMeters: z.ZodOptional<z.ZodNumber>;
67
+ lengthMeters: z.ZodOptional<z.ZodNumber>;
68
+ weightTonnes: z.ZodOptional<z.ZodNumber>;
69
+ axleLoadTonnes: z.ZodOptional<z.ZodNumber>;
70
+ axleCount: z.ZodOptional<z.ZodNumber>;
71
+ hazardousMaterials: z.ZodOptional<z.ZodBoolean>;
72
+ }, z.core.$strict>;
73
+ type RoutingVehicle = z.infer<typeof routingVehicleSchema>;
74
+ declare const routingRouteRequestSchema: z.ZodObject<{
75
+ mode: z.ZodEnum<{
76
+ cycling: "cycling";
77
+ driving: "driving";
78
+ truck: "truck";
79
+ walking: "walking";
80
+ }>;
81
+ vehicle: z.ZodOptional<z.ZodObject<{
82
+ heightMeters: z.ZodOptional<z.ZodNumber>;
83
+ widthMeters: z.ZodOptional<z.ZodNumber>;
84
+ lengthMeters: z.ZodOptional<z.ZodNumber>;
85
+ weightTonnes: z.ZodOptional<z.ZodNumber>;
86
+ axleLoadTonnes: z.ZodOptional<z.ZodNumber>;
87
+ axleCount: z.ZodOptional<z.ZodNumber>;
88
+ hazardousMaterials: z.ZodOptional<z.ZodBoolean>;
89
+ }, z.core.$strict>>;
90
+ avoid: z.ZodOptional<z.ZodArray<z.ZodEnum<{
91
+ ferries: "ferries";
92
+ highways: "highways";
93
+ tolls: "tolls";
94
+ }>>>;
95
+ traffic: z.ZodOptional<z.ZodEnum<{
96
+ none: "none";
97
+ }>>;
98
+ locations: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
99
+ alternatives: z.ZodOptional<z.ZodNumber>;
100
+ language: z.ZodOptional<z.ZodEnum<{
101
+ "ar-SA": "ar-SA";
102
+ "bg-BG": "bg-BG";
103
+ "ca-ES": "ca-ES";
104
+ "cs-CZ": "cs-CZ";
105
+ "da-DK": "da-DK";
106
+ "de-DE": "de-DE";
107
+ "el-GR": "el-GR";
108
+ "en-AU": "en-AU";
109
+ "en-GB": "en-GB";
110
+ "en-US": "en-US";
111
+ "es-ES": "es-ES";
112
+ "et-EE": "et-EE";
113
+ "fi-FI": "fi-FI";
114
+ "fr-FR": "fr-FR";
115
+ "hi-IN": "hi-IN";
116
+ "hu-HU": "hu-HU";
117
+ "it-IT": "it-IT";
118
+ "ja-JP": "ja-JP";
119
+ "ko-KR": "ko-KR";
120
+ "mn-MN": "mn-MN";
121
+ "nb-NO": "nb-NO";
122
+ "nl-NL": "nl-NL";
123
+ "pl-PL": "pl-PL";
124
+ "pt-BR": "pt-BR";
125
+ "pt-PT": "pt-PT";
126
+ "ro-RO": "ro-RO";
127
+ "ru-RU": "ru-RU";
128
+ "sk-SK": "sk-SK";
129
+ "sl-SI": "sl-SI";
130
+ "sv-SE": "sv-SE";
131
+ "tr-TR": "tr-TR";
132
+ "uk-UA": "uk-UA";
133
+ "vi-VN": "vi-VN";
134
+ }>>;
135
+ }, z.core.$strict>;
136
+ type RoutingRouteRequest = z.input<typeof routingRouteRequestSchema>;
137
+ type NormalizedRoutingRouteRequest = z.output<typeof routingRouteRequestSchema>;
138
+ declare const routingIsochroneRequestSchema: z.ZodObject<{
139
+ mode: z.ZodEnum<{
140
+ cycling: "cycling";
141
+ driving: "driving";
142
+ truck: "truck";
143
+ walking: "walking";
144
+ }>;
145
+ vehicle: z.ZodOptional<z.ZodObject<{
146
+ heightMeters: z.ZodOptional<z.ZodNumber>;
147
+ widthMeters: z.ZodOptional<z.ZodNumber>;
148
+ lengthMeters: z.ZodOptional<z.ZodNumber>;
149
+ weightTonnes: z.ZodOptional<z.ZodNumber>;
150
+ axleLoadTonnes: z.ZodOptional<z.ZodNumber>;
151
+ axleCount: z.ZodOptional<z.ZodNumber>;
152
+ hazardousMaterials: z.ZodOptional<z.ZodBoolean>;
153
+ }, z.core.$strict>>;
154
+ avoid: z.ZodOptional<z.ZodArray<z.ZodEnum<{
155
+ ferries: "ferries";
156
+ highways: "highways";
157
+ tolls: "tolls";
158
+ }>>>;
159
+ traffic: z.ZodOptional<z.ZodEnum<{
160
+ none: "none";
161
+ }>>;
162
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
163
+ minutes: z.ZodArray<z.ZodNumber>;
164
+ }, z.core.$strict>;
165
+ type RoutingIsochroneRequest = z.input<typeof routingIsochroneRequestSchema>;
166
+ type NormalizedRoutingIsochroneRequest = z.output<typeof routingIsochroneRequestSchema>;
167
+ /** Times and distances from every source to every target. */
168
+ declare const routingMatrixRequestSchema: z.ZodObject<{
169
+ mode: z.ZodEnum<{
170
+ cycling: "cycling";
171
+ driving: "driving";
172
+ truck: "truck";
173
+ walking: "walking";
174
+ }>;
175
+ vehicle: z.ZodOptional<z.ZodObject<{
176
+ heightMeters: z.ZodOptional<z.ZodNumber>;
177
+ widthMeters: z.ZodOptional<z.ZodNumber>;
178
+ lengthMeters: z.ZodOptional<z.ZodNumber>;
179
+ weightTonnes: z.ZodOptional<z.ZodNumber>;
180
+ axleLoadTonnes: z.ZodOptional<z.ZodNumber>;
181
+ axleCount: z.ZodOptional<z.ZodNumber>;
182
+ hazardousMaterials: z.ZodOptional<z.ZodBoolean>;
183
+ }, z.core.$strict>>;
184
+ avoid: z.ZodOptional<z.ZodArray<z.ZodEnum<{
185
+ ferries: "ferries";
186
+ highways: "highways";
187
+ tolls: "tolls";
188
+ }>>>;
189
+ traffic: z.ZodOptional<z.ZodEnum<{
190
+ none: "none";
191
+ }>>;
192
+ sources: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
193
+ targets: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
194
+ }, z.core.$strict>;
195
+ type RoutingMatrixRequest = z.input<typeof routingMatrixRequestSchema>;
196
+ type NormalizedRoutingMatrixRequest = z.output<typeof routingMatrixRequestSchema>;
197
+ /** A GPS trace to match to the roads it followed. */
198
+ declare const routingMatchRequestSchema: z.ZodObject<{
199
+ trace: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
200
+ timestamps: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
201
+ accuracy: z.ZodOptional<z.ZodNumber>;
202
+ mode: z.ZodEnum<{
203
+ cycling: "cycling";
204
+ driving: "driving";
205
+ truck: "truck";
206
+ walking: "walking";
207
+ }>;
208
+ vehicle: z.ZodOptional<z.ZodObject<{
209
+ heightMeters: z.ZodOptional<z.ZodNumber>;
210
+ widthMeters: z.ZodOptional<z.ZodNumber>;
211
+ lengthMeters: z.ZodOptional<z.ZodNumber>;
212
+ weightTonnes: z.ZodOptional<z.ZodNumber>;
213
+ axleLoadTonnes: z.ZodOptional<z.ZodNumber>;
214
+ axleCount: z.ZodOptional<z.ZodNumber>;
215
+ hazardousMaterials: z.ZodOptional<z.ZodBoolean>;
216
+ }, z.core.$strict>>;
217
+ }, z.core.$strict>;
218
+ type RoutingMatchRequest = z.input<typeof routingMatchRequestSchema>;
219
+ type NormalizedRoutingMatchRequest = z.output<typeof routingMatchRequestSchema>;
220
+ /** The road nearest to a position that the mode can use. */
221
+ declare const routingNearestRequestSchema: z.ZodObject<{
222
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
223
+ mode: z.ZodEnum<{
224
+ cycling: "cycling";
225
+ driving: "driving";
226
+ truck: "truck";
227
+ walking: "walking";
228
+ }>;
229
+ }, z.core.$strict>;
230
+ type RoutingNearestRequest = z.input<typeof routingNearestRequestSchema>;
231
+ type NormalizedRoutingNearestRequest = z.output<typeof routingNearestRequestSchema>;
232
+ /** What a step asks the traveller to do. */
233
+ declare const routingManeuvers: readonly ["depart", "arrive", "continue", "slight-right", "right", "sharp-right", "u-turn", "sharp-left", "left", "slight-left", "ramp-straight", "ramp-right", "ramp-left", "exit-right", "exit-left", "keep-straight", "keep-right", "keep-left", "merge", "merge-right", "merge-left", "roundabout-enter", "roundabout-exit", "ferry-enter", "ferry-exit", "elevator", "stairs", "escalator", "building-enter", "building-exit"];
234
+ type RoutingManeuver = (typeof routingManeuvers)[number];
235
+ declare const routingStepSchema: z.ZodObject<{
236
+ maneuver: z.ZodEnum<{
237
+ arrive: "arrive";
238
+ "building-enter": "building-enter";
239
+ "building-exit": "building-exit";
240
+ continue: "continue";
241
+ depart: "depart";
242
+ elevator: "elevator";
243
+ escalator: "escalator";
244
+ "exit-left": "exit-left";
245
+ "exit-right": "exit-right";
246
+ "ferry-enter": "ferry-enter";
247
+ "ferry-exit": "ferry-exit";
248
+ "keep-left": "keep-left";
249
+ "keep-right": "keep-right";
250
+ "keep-straight": "keep-straight";
251
+ left: "left";
252
+ merge: "merge";
253
+ "merge-left": "merge-left";
254
+ "merge-right": "merge-right";
255
+ "ramp-left": "ramp-left";
256
+ "ramp-right": "ramp-right";
257
+ "ramp-straight": "ramp-straight";
258
+ right: "right";
259
+ "roundabout-enter": "roundabout-enter";
260
+ "roundabout-exit": "roundabout-exit";
261
+ "sharp-left": "sharp-left";
262
+ "sharp-right": "sharp-right";
263
+ "slight-left": "slight-left";
264
+ "slight-right": "slight-right";
265
+ stairs: "stairs";
266
+ "u-turn": "u-turn";
267
+ }>;
268
+ instruction: z.ZodString;
269
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
270
+ exit: z.ZodOptional<z.ZodString>;
271
+ toward: z.ZodOptional<z.ZodArray<z.ZodString>>;
272
+ roundaboutExit: z.ZodOptional<z.ZodNumber>;
273
+ distance: z.ZodNumber;
274
+ duration: z.ZodNumber;
275
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
276
+ }, z.core.$strict>;
277
+ type RoutingStep = z.infer<typeof routingStepSchema>;
278
+ declare const routingLineStringSchema: z.ZodObject<{
279
+ type: z.ZodLiteral<"LineString">;
280
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
281
+ }, z.core.$strict>;
282
+ declare const routingLegSchema: z.ZodObject<{
283
+ distance: z.ZodNumber;
284
+ duration: z.ZodNumber;
285
+ steps: z.ZodArray<z.ZodObject<{
286
+ maneuver: z.ZodEnum<{
287
+ arrive: "arrive";
288
+ "building-enter": "building-enter";
289
+ "building-exit": "building-exit";
290
+ continue: "continue";
291
+ depart: "depart";
292
+ elevator: "elevator";
293
+ escalator: "escalator";
294
+ "exit-left": "exit-left";
295
+ "exit-right": "exit-right";
296
+ "ferry-enter": "ferry-enter";
297
+ "ferry-exit": "ferry-exit";
298
+ "keep-left": "keep-left";
299
+ "keep-right": "keep-right";
300
+ "keep-straight": "keep-straight";
301
+ left: "left";
302
+ merge: "merge";
303
+ "merge-left": "merge-left";
304
+ "merge-right": "merge-right";
305
+ "ramp-left": "ramp-left";
306
+ "ramp-right": "ramp-right";
307
+ "ramp-straight": "ramp-straight";
308
+ right: "right";
309
+ "roundabout-enter": "roundabout-enter";
310
+ "roundabout-exit": "roundabout-exit";
311
+ "sharp-left": "sharp-left";
312
+ "sharp-right": "sharp-right";
313
+ "slight-left": "slight-left";
314
+ "slight-right": "slight-right";
315
+ stairs: "stairs";
316
+ "u-turn": "u-turn";
317
+ }>;
318
+ instruction: z.ZodString;
319
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
320
+ exit: z.ZodOptional<z.ZodString>;
321
+ toward: z.ZodOptional<z.ZodArray<z.ZodString>>;
322
+ roundaboutExit: z.ZodOptional<z.ZodNumber>;
323
+ distance: z.ZodNumber;
324
+ duration: z.ZodNumber;
325
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
326
+ }, z.core.$strict>>;
327
+ }, z.core.$strict>;
328
+ declare const routingRouteSchema: z.ZodObject<{
329
+ distance: z.ZodNumber;
330
+ duration: z.ZodNumber;
331
+ hasTolls: z.ZodBoolean;
332
+ hasHighways: z.ZodBoolean;
333
+ hasFerries: z.ZodBoolean;
334
+ geometry: z.ZodObject<{
335
+ type: z.ZodLiteral<"LineString">;
336
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
337
+ }, z.core.$strict>;
338
+ legs: z.ZodArray<z.ZodObject<{
339
+ distance: z.ZodNumber;
340
+ duration: z.ZodNumber;
341
+ steps: z.ZodArray<z.ZodObject<{
342
+ maneuver: z.ZodEnum<{
343
+ arrive: "arrive";
344
+ "building-enter": "building-enter";
345
+ "building-exit": "building-exit";
346
+ continue: "continue";
347
+ depart: "depart";
348
+ elevator: "elevator";
349
+ escalator: "escalator";
350
+ "exit-left": "exit-left";
351
+ "exit-right": "exit-right";
352
+ "ferry-enter": "ferry-enter";
353
+ "ferry-exit": "ferry-exit";
354
+ "keep-left": "keep-left";
355
+ "keep-right": "keep-right";
356
+ "keep-straight": "keep-straight";
357
+ left: "left";
358
+ merge: "merge";
359
+ "merge-left": "merge-left";
360
+ "merge-right": "merge-right";
361
+ "ramp-left": "ramp-left";
362
+ "ramp-right": "ramp-right";
363
+ "ramp-straight": "ramp-straight";
364
+ right: "right";
365
+ "roundabout-enter": "roundabout-enter";
366
+ "roundabout-exit": "roundabout-exit";
367
+ "sharp-left": "sharp-left";
368
+ "sharp-right": "sharp-right";
369
+ "slight-left": "slight-left";
370
+ "slight-right": "slight-right";
371
+ stairs: "stairs";
372
+ "u-turn": "u-turn";
373
+ }>;
374
+ instruction: z.ZodString;
375
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
376
+ exit: z.ZodOptional<z.ZodString>;
377
+ toward: z.ZodOptional<z.ZodArray<z.ZodString>>;
378
+ roundaboutExit: z.ZodOptional<z.ZodNumber>;
379
+ distance: z.ZodNumber;
380
+ duration: z.ZodNumber;
381
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
382
+ }, z.core.$strict>>;
383
+ }, z.core.$strict>>;
384
+ }, z.core.$strict>;
385
+ type RoutingRoute = z.infer<typeof routingRouteSchema>;
386
+ declare const routingNetworkSchema: z.ZodObject<{
387
+ releaseId: z.ZodString;
388
+ }, z.core.$strict>;
389
+ declare const routingUsageSchema: z.ZodObject<{
390
+ units: z.ZodNumber;
391
+ }, z.core.$strict>;
392
+ /** Road classes, from the most to the least important. */
393
+ declare const routingRoadClasses: readonly ["motorway", "trunk", "primary", "secondary", "tertiary", "unclassified", "residential", "service"];
394
+ declare const routingRoadSurfaces: readonly ["paved-smooth", "paved", "paved-rough", "compacted", "dirt", "gravel", "path", "impassable"];
395
+ /** A road and what OpenStreetMap records about it. */
396
+ declare const routingRoadSchema: z.ZodObject<{
397
+ names: z.ZodArray<z.ZodString>;
398
+ wayId: z.ZodOptional<z.ZodNumber>;
399
+ class: z.ZodEnum<{
400
+ motorway: "motorway";
401
+ primary: "primary";
402
+ residential: "residential";
403
+ secondary: "secondary";
404
+ service: "service";
405
+ tertiary: "tertiary";
406
+ trunk: "trunk";
407
+ unclassified: "unclassified";
408
+ }>;
409
+ surface: z.ZodOptional<z.ZodEnum<{
410
+ compacted: "compacted";
411
+ dirt: "dirt";
412
+ gravel: "gravel";
413
+ impassable: "impassable";
414
+ path: "path";
415
+ paved: "paved";
416
+ "paved-rough": "paved-rough";
417
+ "paved-smooth": "paved-smooth";
418
+ }>>;
419
+ lanes: z.ZodOptional<z.ZodNumber>;
420
+ speedLimit: z.ZodNullable<z.ZodObject<{
421
+ kmh: z.ZodNumber;
422
+ source: z.ZodLiteral<"tagged">;
423
+ }, z.core.$strict>>;
424
+ toll: z.ZodBoolean;
425
+ bridge: z.ZodBoolean;
426
+ tunnel: z.ZodBoolean;
427
+ roundabout: z.ZodBoolean;
428
+ length: z.ZodNumber;
429
+ }, z.core.$strict>;
430
+ type RoutingRoad = z.infer<typeof routingRoadSchema>;
431
+ declare const routingIsochroneFeatureSchema: z.ZodObject<{
432
+ type: z.ZodLiteral<"Feature">;
433
+ properties: z.ZodObject<{
434
+ minutes: z.ZodNumber;
435
+ }, z.core.$strict>;
436
+ geometry: z.ZodUnion<readonly [z.ZodObject<{
437
+ type: z.ZodLiteral<"Polygon">;
438
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
439
+ }, z.core.$strict>, z.ZodObject<{
440
+ type: z.ZodLiteral<"MultiPolygon">;
441
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
442
+ }, z.core.$strict>]>;
443
+ }, z.core.$strict>;
444
+ declare const routingIsochroneCollectionSchema: z.ZodObject<{
445
+ type: z.ZodLiteral<"FeatureCollection">;
446
+ features: z.ZodArray<z.ZodObject<{
447
+ type: z.ZodLiteral<"Feature">;
448
+ properties: z.ZodObject<{
449
+ minutes: z.ZodNumber;
450
+ }, z.core.$strict>;
451
+ geometry: z.ZodUnion<readonly [z.ZodObject<{
452
+ type: z.ZodLiteral<"Polygon">;
453
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
454
+ }, z.core.$strict>, z.ZodObject<{
455
+ type: z.ZodLiteral<"MultiPolygon">;
456
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
457
+ }, z.core.$strict>]>;
458
+ }, z.core.$strict>>;
459
+ }, z.core.$strict>;
460
+ /** A route answer. */
461
+ declare const routingRouteResponseSchema: z.ZodObject<{
462
+ schemaVersion: z.ZodLiteral<1>;
463
+ network: z.ZodObject<{
464
+ releaseId: z.ZodString;
465
+ }, z.core.$strict>;
466
+ attribution: z.ZodLiteral<"© OpenStreetMap contributors">;
467
+ traffic: z.ZodEnum<{
468
+ none: "none";
469
+ }>;
470
+ routes: z.ZodArray<z.ZodObject<{
471
+ distance: z.ZodNumber;
472
+ duration: z.ZodNumber;
473
+ hasTolls: z.ZodBoolean;
474
+ hasHighways: z.ZodBoolean;
475
+ hasFerries: z.ZodBoolean;
476
+ geometry: z.ZodObject<{
477
+ type: z.ZodLiteral<"LineString">;
478
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
479
+ }, z.core.$strict>;
480
+ legs: z.ZodArray<z.ZodObject<{
481
+ distance: z.ZodNumber;
482
+ duration: z.ZodNumber;
483
+ steps: z.ZodArray<z.ZodObject<{
484
+ maneuver: z.ZodEnum<{
485
+ arrive: "arrive";
486
+ "building-enter": "building-enter";
487
+ "building-exit": "building-exit";
488
+ continue: "continue";
489
+ depart: "depart";
490
+ elevator: "elevator";
491
+ escalator: "escalator";
492
+ "exit-left": "exit-left";
493
+ "exit-right": "exit-right";
494
+ "ferry-enter": "ferry-enter";
495
+ "ferry-exit": "ferry-exit";
496
+ "keep-left": "keep-left";
497
+ "keep-right": "keep-right";
498
+ "keep-straight": "keep-straight";
499
+ left: "left";
500
+ merge: "merge";
501
+ "merge-left": "merge-left";
502
+ "merge-right": "merge-right";
503
+ "ramp-left": "ramp-left";
504
+ "ramp-right": "ramp-right";
505
+ "ramp-straight": "ramp-straight";
506
+ right: "right";
507
+ "roundabout-enter": "roundabout-enter";
508
+ "roundabout-exit": "roundabout-exit";
509
+ "sharp-left": "sharp-left";
510
+ "sharp-right": "sharp-right";
511
+ "slight-left": "slight-left";
512
+ "slight-right": "slight-right";
513
+ stairs: "stairs";
514
+ "u-turn": "u-turn";
515
+ }>;
516
+ instruction: z.ZodString;
517
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
518
+ exit: z.ZodOptional<z.ZodString>;
519
+ toward: z.ZodOptional<z.ZodArray<z.ZodString>>;
520
+ roundaboutExit: z.ZodOptional<z.ZodNumber>;
521
+ distance: z.ZodNumber;
522
+ duration: z.ZodNumber;
523
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
524
+ }, z.core.$strict>>;
525
+ }, z.core.$strict>>;
526
+ }, z.core.$strict>>;
527
+ usage: z.ZodObject<{
528
+ units: z.ZodNumber;
529
+ }, z.core.$strict>;
530
+ }, z.core.$strict>;
531
+ type RoutingRouteResponse = z.infer<typeof routingRouteResponseSchema>;
532
+ /** An isochrone answer. */
533
+ declare const routingIsochroneResponseSchema: z.ZodObject<{
534
+ schemaVersion: z.ZodLiteral<1>;
535
+ network: z.ZodObject<{
536
+ releaseId: z.ZodString;
537
+ }, z.core.$strict>;
538
+ attribution: z.ZodLiteral<"© OpenStreetMap contributors">;
539
+ traffic: z.ZodEnum<{
540
+ none: "none";
541
+ }>;
542
+ isochrones: z.ZodObject<{
543
+ type: z.ZodLiteral<"FeatureCollection">;
544
+ features: z.ZodArray<z.ZodObject<{
545
+ type: z.ZodLiteral<"Feature">;
546
+ properties: z.ZodObject<{
547
+ minutes: z.ZodNumber;
548
+ }, z.core.$strict>;
549
+ geometry: z.ZodUnion<readonly [z.ZodObject<{
550
+ type: z.ZodLiteral<"Polygon">;
551
+ coordinates: z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
552
+ }, z.core.$strict>, z.ZodObject<{
553
+ type: z.ZodLiteral<"MultiPolygon">;
554
+ coordinates: z.ZodArray<z.ZodArray<z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>>;
555
+ }, z.core.$strict>]>;
556
+ }, z.core.$strict>>;
557
+ }, z.core.$strict>;
558
+ usage: z.ZodObject<{
559
+ units: z.ZodNumber;
560
+ }, z.core.$strict>;
561
+ }, z.core.$strict>;
562
+ type RoutingIsochroneResponse = z.infer<typeof routingIsochroneResponseSchema>;
563
+ /** A matrix answer. */
564
+ declare const routingMatrixResponseSchema: z.ZodObject<{
565
+ schemaVersion: z.ZodLiteral<1>;
566
+ network: z.ZodObject<{
567
+ releaseId: z.ZodString;
568
+ }, z.core.$strict>;
569
+ attribution: z.ZodLiteral<"© OpenStreetMap contributors">;
570
+ traffic: z.ZodEnum<{
571
+ none: "none";
572
+ }>;
573
+ durations: z.ZodArray<z.ZodArray<z.ZodNullable<z.ZodNumber>>>;
574
+ distances: z.ZodArray<z.ZodArray<z.ZodNullable<z.ZodNumber>>>;
575
+ usage: z.ZodObject<{
576
+ units: z.ZodNumber;
577
+ }, z.core.$strict>;
578
+ }, z.core.$strict>;
579
+ type RoutingMatrixResponse = z.infer<typeof routingMatrixResponseSchema>;
580
+ /** A map match answer. */
581
+ declare const routingMatchResponseSchema: z.ZodObject<{
582
+ schemaVersion: z.ZodLiteral<1>;
583
+ network: z.ZodObject<{
584
+ releaseId: z.ZodString;
585
+ }, z.core.$strict>;
586
+ attribution: z.ZodLiteral<"© OpenStreetMap contributors">;
587
+ traffic: z.ZodEnum<{
588
+ none: "none";
589
+ }>;
590
+ distance: z.ZodNumber;
591
+ duration: z.ZodNumber;
592
+ geometry: z.ZodObject<{
593
+ type: z.ZodLiteral<"LineString">;
594
+ coordinates: z.ZodArray<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
595
+ }, z.core.$strict>;
596
+ points: z.ZodArray<z.ZodNullable<z.ZodObject<{
597
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
598
+ distance: z.ZodNumber;
599
+ }, z.core.$strict>>>;
600
+ roads: z.ZodArray<z.ZodObject<{
601
+ names: z.ZodArray<z.ZodString>;
602
+ wayId: z.ZodOptional<z.ZodNumber>;
603
+ class: z.ZodEnum<{
604
+ motorway: "motorway";
605
+ primary: "primary";
606
+ residential: "residential";
607
+ secondary: "secondary";
608
+ service: "service";
609
+ tertiary: "tertiary";
610
+ trunk: "trunk";
611
+ unclassified: "unclassified";
612
+ }>;
613
+ surface: z.ZodOptional<z.ZodEnum<{
614
+ compacted: "compacted";
615
+ dirt: "dirt";
616
+ gravel: "gravel";
617
+ impassable: "impassable";
618
+ path: "path";
619
+ paved: "paved";
620
+ "paved-rough": "paved-rough";
621
+ "paved-smooth": "paved-smooth";
622
+ }>>;
623
+ lanes: z.ZodOptional<z.ZodNumber>;
624
+ speedLimit: z.ZodNullable<z.ZodObject<{
625
+ kmh: z.ZodNumber;
626
+ source: z.ZodLiteral<"tagged">;
627
+ }, z.core.$strict>>;
628
+ toll: z.ZodBoolean;
629
+ bridge: z.ZodBoolean;
630
+ tunnel: z.ZodBoolean;
631
+ roundabout: z.ZodBoolean;
632
+ length: z.ZodNumber;
633
+ }, z.core.$strict>>;
634
+ usage: z.ZodObject<{
635
+ units: z.ZodNumber;
636
+ }, z.core.$strict>;
637
+ }, z.core.$strict>;
638
+ type RoutingMatchResponse = z.infer<typeof routingMatchResponseSchema>;
639
+ /** A nearest-road answer. */
640
+ declare const routingNearestResponseSchema: z.ZodObject<{
641
+ schemaVersion: z.ZodLiteral<1>;
642
+ network: z.ZodObject<{
643
+ releaseId: z.ZodString;
644
+ }, z.core.$strict>;
645
+ attribution: z.ZodLiteral<"© OpenStreetMap contributors">;
646
+ traffic: z.ZodEnum<{
647
+ none: "none";
648
+ }>;
649
+ location: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
650
+ distance: z.ZodNumber;
651
+ road: z.ZodObject<{
652
+ names: z.ZodArray<z.ZodString>;
653
+ wayId: z.ZodOptional<z.ZodNumber>;
654
+ class: z.ZodEnum<{
655
+ motorway: "motorway";
656
+ primary: "primary";
657
+ residential: "residential";
658
+ secondary: "secondary";
659
+ service: "service";
660
+ tertiary: "tertiary";
661
+ trunk: "trunk";
662
+ unclassified: "unclassified";
663
+ }>;
664
+ surface: z.ZodOptional<z.ZodEnum<{
665
+ compacted: "compacted";
666
+ dirt: "dirt";
667
+ gravel: "gravel";
668
+ impassable: "impassable";
669
+ path: "path";
670
+ paved: "paved";
671
+ "paved-rough": "paved-rough";
672
+ "paved-smooth": "paved-smooth";
673
+ }>>;
674
+ lanes: z.ZodOptional<z.ZodNumber>;
675
+ speedLimit: z.ZodNullable<z.ZodObject<{
676
+ kmh: z.ZodNumber;
677
+ source: z.ZodLiteral<"tagged">;
678
+ }, z.core.$strict>>;
679
+ toll: z.ZodBoolean;
680
+ bridge: z.ZodBoolean;
681
+ tunnel: z.ZodBoolean;
682
+ roundabout: z.ZodBoolean;
683
+ length: z.ZodNumber;
684
+ }, z.core.$strict>;
685
+ usage: z.ZodObject<{
686
+ units: z.ZodNumber;
687
+ }, z.core.$strict>;
688
+ }, z.core.$strict>;
689
+ type RoutingNearestResponse = z.infer<typeof routingNearestResponseSchema>;
690
+ declare const routingOperations: readonly ["route", "isochrone", "matrix", "match", "nearest"];
691
+ type RoutingOperation = (typeof routingOperations)[number];
692
+ declare const routingErrorCodes: readonly ["ROUTING_INVALID_REQUEST", "ROUTING_REQUEST_TOO_LARGE", "ROUTING_ACCESS_DENIED", "ROUTING_ORIGIN_NOT_ALLOWED", "ROUTING_NO_ROUTE", "ROUTING_RATE_LIMITED", "ROUTING_QUOTA_EXCEEDED", "ROUTING_CANCELLED", "ROUTING_INVALID_RESPONSE", "ROUTING_UNAVAILABLE", "ROUTING_TIMEOUT"];
693
+ type RoutingErrorCode = (typeof routingErrorCodes)[number];
694
+ declare const routingErrorStatus: Readonly<{
695
+ ROUTING_INVALID_REQUEST: number;
696
+ ROUTING_REQUEST_TOO_LARGE: number;
697
+ ROUTING_ACCESS_DENIED: number;
698
+ ROUTING_ORIGIN_NOT_ALLOWED: number;
699
+ ROUTING_NO_ROUTE: number;
700
+ ROUTING_RATE_LIMITED: number;
701
+ ROUTING_QUOTA_EXCEEDED: number;
702
+ ROUTING_CANCELLED: number;
703
+ ROUTING_INVALID_RESPONSE: number;
704
+ ROUTING_UNAVAILABLE: number;
705
+ ROUTING_TIMEOUT: number;
706
+ }>;
707
+
708
+ export { type NormalizedRoutingIsochroneRequest, type NormalizedRoutingMatchRequest, type NormalizedRoutingMatrixRequest, type NormalizedRoutingNearestRequest, type NormalizedRoutingRouteRequest, type RoutingAvoidance, type RoutingErrorCode, type RoutingIsochroneRequest, type RoutingIsochroneResponse, type RoutingLanguage, type RoutingManeuver, type RoutingMatchRequest, type RoutingMatchResponse, type RoutingMatrixRequest, type RoutingMatrixResponse, type RoutingMode, type RoutingNearestRequest, type RoutingNearestResponse, type RoutingOperation, type RoutingPosition, type RoutingRoad, type RoutingRoute, type RoutingRouteRequest, type RoutingRouteResponse, type RoutingStep, type RoutingTraffic, type RoutingVehicle, routingAttribution, routingAvoidances, routingDirectDistance, routingErrorCodes, routingErrorStatus, routingIsochroneCollectionSchema, routingIsochroneFeatureSchema, routingIsochroneRequestSchema, routingIsochroneResponseSchema, routingLanguages, routingLegSchema, routingLimits, routingLineStringSchema, routingManeuvers, routingMatchRequestSchema, routingMatchResponseSchema, routingMatrixRequestSchema, routingMatrixResponseSchema, routingModes, routingNearestRequestSchema, routingNearestResponseSchema, routingNetworkSchema, routingOperations, routingPositionSchema, routingRoadClasses, routingRoadSchema, routingRoadSurfaces, routingRouteRequestSchema, routingRouteResponseSchema, routingRouteSchema, routingStepSchema, routingTrafficKinds, routingUsageSchema, routingVehicleSchema };