@motis-project/motis-client 2.0.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,1703 @@
1
+ /**
2
+ * Cause of this alert.
3
+ */
4
+ type AlertCause = 'UNKNOWN_CAUSE' | 'OTHER_CAUSE' | 'TECHNICAL_PROBLEM' | 'STRIKE' | 'DEMONSTRATION' | 'ACCIDENT' | 'HOLIDAY' | 'WEATHER' | 'MAINTENANCE' | 'CONSTRUCTION' | 'POLICE_ACTIVITY' | 'MEDICAL_EMERGENCY';
5
+ /**
6
+ * The effect of this problem on the affected entity.
7
+ */
8
+ type AlertEffect = 'NO_SERVICE' | 'REDUCED_SERVICE' | 'SIGNIFICANT_DELAYS' | 'DETOUR' | 'ADDITIONAL_SERVICE' | 'MODIFIED_SERVICE' | 'OTHER_EFFECT' | 'UNKNOWN_EFFECT' | 'STOP_MOVED' | 'NO_EFFECT' | 'ACCESSIBILITY_ISSUE';
9
+ /**
10
+ * The severity of the alert.
11
+ */
12
+ type AlertSeverityLevel = 'UNKNOWN_SEVERITY' | 'INFO' | 'WARNING' | 'SEVERE';
13
+ /**
14
+ * A time interval.
15
+ * The interval is considered active at time t if t is greater than or equal to the start time and less than the end time.
16
+ *
17
+ */
18
+ type TimeRange = {
19
+ /**
20
+ * If missing, the interval starts at minus infinity.
21
+ * If a TimeRange is provided, either start or end must be provided - both fields cannot be empty.
22
+ *
23
+ */
24
+ start?: string;
25
+ /**
26
+ * If missing, the interval ends at plus infinity.
27
+ * If a TimeRange is provided, either start or end must be provided - both fields cannot be empty.
28
+ *
29
+ */
30
+ end?: string;
31
+ };
32
+ /**
33
+ * An alert, indicating some sort of incident in the public transit network.
34
+ */
35
+ type Alert = {
36
+ /**
37
+ * Time when the alert should be shown to the user.
38
+ * If missing, the alert will be shown as long as it appears in the feed.
39
+ * If multiple ranges are given, the alert will be shown during all of them.
40
+ *
41
+ */
42
+ communicationPeriod?: Array<TimeRange>;
43
+ /**
44
+ * Time when the services are affected by the disruption mentioned in the alert.
45
+ */
46
+ impactPeriod?: Array<TimeRange>;
47
+ cause?: AlertCause;
48
+ /**
49
+ * Description of the cause of the alert that allows for agency-specific language;
50
+ * more specific than the Cause.
51
+ *
52
+ */
53
+ causeDetail?: string;
54
+ effect?: AlertEffect;
55
+ /**
56
+ * Description of the effect of the alert that allows for agency-specific language;
57
+ * more specific than the Effect.
58
+ *
59
+ */
60
+ effectDetail?: string;
61
+ /**
62
+ * The URL which provides additional information about the alert.
63
+ */
64
+ url?: string;
65
+ /**
66
+ * Header for the alert. This plain-text string will be highlighted, for example in boldface.
67
+ *
68
+ */
69
+ headerText: string;
70
+ /**
71
+ * Description for the alert.
72
+ * This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user).
73
+ * The information in the description should add to the information of the header.
74
+ *
75
+ */
76
+ descriptionText: string;
77
+ /**
78
+ * Text containing the alert's header to be used for text-to-speech implementations.
79
+ * This field is the text-to-speech version of header_text.
80
+ * It should contain the same information as headerText but formatted such that it can read as text-to-speech
81
+ * (for example, abbreviations removed, numbers spelled out, etc.)
82
+ *
83
+ */
84
+ ttsHeaderText?: string;
85
+ /**
86
+ * Text containing a description for the alert to be used for text-to-speech implementations.
87
+ * This field is the text-to-speech version of description_text.
88
+ * It should contain the same information as description_text but formatted such that it can be read as text-to-speech
89
+ * (for example, abbreviations removed, numbers spelled out, etc.)
90
+ *
91
+ */
92
+ ttsDescriptionText?: string;
93
+ /**
94
+ * Severity of the alert.
95
+ */
96
+ severityLevel?: AlertSeverityLevel;
97
+ /**
98
+ * String containing an URL linking to an image.
99
+ */
100
+ imageUrl?: string;
101
+ /**
102
+ * IANA media type as to specify the type of image to be displayed. The type must start with "image/"
103
+ *
104
+ */
105
+ imageMediaType?: string;
106
+ /**
107
+ * Text describing the appearance of the linked image in the image field
108
+ * (e.g., in case the image can't be displayed or the user can't see the image for accessibility reasons).
109
+ * See the HTML spec for alt image text.
110
+ *
111
+ */
112
+ imageAlternativeText?: string;
113
+ };
114
+ /**
115
+ * Object containing duration if a path was found or none if no path was found
116
+ */
117
+ type Duration = {
118
+ /**
119
+ * duration in seconds if a path was found, otherwise missing
120
+ */
121
+ duration?: number;
122
+ };
123
+ /**
124
+ * Administrative area
125
+ */
126
+ type Area = {
127
+ /**
128
+ * Name of the area
129
+ */
130
+ name: string;
131
+ /**
132
+ * [OpenStreetMap `admin_level`](https://wiki.openstreetmap.org/wiki/Key:admin_level)
133
+ * of the area
134
+ *
135
+ */
136
+ adminLevel: number;
137
+ /**
138
+ * Whether this area was matched by the input text
139
+ */
140
+ matched: boolean;
141
+ /**
142
+ * Set for the first area after the `default` area that distinguishes areas
143
+ * if the match is ambiguous regarding (`default` area + place name / street [+ house number]).
144
+ *
145
+ */
146
+ unique?: boolean;
147
+ /**
148
+ * Whether this area should be displayed as default area (area with admin level closest 7)
149
+ */
150
+ default?: boolean;
151
+ };
152
+ /**
153
+ * Matched token range (from index, length)
154
+ */
155
+ type Token = [
156
+ number,
157
+ number
158
+ ];
159
+ /**
160
+ * location type
161
+ */
162
+ type LocationType = 'ADDRESS' | 'PLACE' | 'STOP';
163
+ /**
164
+ * GeoCoding match
165
+ */
166
+ type Match = {
167
+ type: LocationType;
168
+ /**
169
+ * list of non-overlapping tokens that were matched
170
+ */
171
+ tokens: Array<Token>;
172
+ /**
173
+ * name of the location (transit stop / PoI / address)
174
+ */
175
+ name: string;
176
+ /**
177
+ * unique ID of the location
178
+ */
179
+ id: string;
180
+ /**
181
+ * latitude
182
+ */
183
+ lat: number;
184
+ /**
185
+ * longitude
186
+ */
187
+ lon: number;
188
+ /**
189
+ * level according to OpenStreetMap
190
+ * (at the moment only for public transport)
191
+ *
192
+ */
193
+ level?: number;
194
+ /**
195
+ * street name
196
+ */
197
+ street?: string;
198
+ /**
199
+ * house number
200
+ */
201
+ houseNumber?: string;
202
+ /**
203
+ * zip code
204
+ */
205
+ zip?: string;
206
+ /**
207
+ * list of areas
208
+ */
209
+ areas: Array<Area>;
210
+ /**
211
+ * score according to the internal scoring system (the scoring algorithm might change in the future)
212
+ */
213
+ score: number;
214
+ };
215
+ /**
216
+ * Different elevation cost profiles for street routing.
217
+ * Using a elevation cost profile will prefer routes with a smaller incline and smaller difference in elevation, even if the routed way is longer.
218
+ *
219
+ * - `NONE`: Ignore elevation data for routing. This is the default behavior
220
+ * - `LOW`: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller.
221
+ * - `HIGH`: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller.
222
+ *
223
+ */
224
+ type ElevationCosts = 'NONE' | 'LOW' | 'HIGH';
225
+ /**
226
+ * Different accessibility profiles for pedestrians.
227
+ */
228
+ type PedestrianProfile = 'FOOT' | 'WHEELCHAIR';
229
+ /**
230
+ * # Street modes
231
+ *
232
+ * - `WALK`
233
+ * - `BIKE`
234
+ * - `RENTAL` Experimental. Expect unannounced breaking changes (without version bumps).
235
+ * - `CAR`
236
+ * - `CAR_PARKING`
237
+ * - `ODM`
238
+ *
239
+ * # Transit modes
240
+ *
241
+ * - `TRANSIT`: translates to `RAIL,SUBWAY,TRAM,BUS,FERRY,AIRPLANE,COACH`
242
+ * - `TRAM`: trams
243
+ * - `SUBWAY`: subway trains
244
+ * - `FERRY`: ferries
245
+ * - `AIRPLANE`: airline flights
246
+ * - `BUS`: short distance buses (does not include `COACH`)
247
+ * - `COACH`: long distance buses (does not include `BUS`)
248
+ * - `RAIL`: translates to `HIGHSPEED_RAIL,LONG_DISTANCE_RAIL,NIGHT_RAIL,REGIONAL_RAIL,REGIONAL_FAST_RAIL`
249
+ * - `METRO`: metro trains
250
+ * - `HIGHSPEED_RAIL`: long distance high speed trains (e.g. TGV)
251
+ * - `LONG_DISTANCE`: long distance inter city trains
252
+ * - `NIGHT_RAIL`: long distance night trains
253
+ * - `REGIONAL_FAST_RAIL`: regional express routes that skip low traffic stops to be faster
254
+ * - `REGIONAL_RAIL`: regional train
255
+ *
256
+ */
257
+ type Mode = 'WALK' | 'BIKE' | 'RENTAL' | 'CAR' | 'CAR_PARKING' | 'ODM' | 'TRANSIT' | 'TRAM' | 'SUBWAY' | 'FERRY' | 'AIRPLANE' | 'METRO' | 'BUS' | 'COACH' | 'RAIL' | 'HIGHSPEED_RAIL' | 'LONG_DISTANCE' | 'NIGHT_RAIL' | 'REGIONAL_FAST_RAIL' | 'REGIONAL_RAIL' | 'OTHER';
258
+ /**
259
+ * - `NORMAL` - latitude / longitude coordinate or address
260
+ * - `BIKESHARE` - bike sharing station
261
+ * - `TRANSIT` - transit stop
262
+ *
263
+ */
264
+ type VertexType = 'NORMAL' | 'BIKESHARE' | 'TRANSIT';
265
+ /**
266
+ * - `NORMAL` - entry/exit is possible normally
267
+ * - `NOT_ALLOWED` - entry/exit is not allowed
268
+ *
269
+ */
270
+ type PickupDropoffType = 'NORMAL' | 'NOT_ALLOWED';
271
+ type Place = {
272
+ /**
273
+ * name of the transit stop / PoI / address
274
+ */
275
+ name: string;
276
+ /**
277
+ * The ID of the stop. This is often something that users don't care about.
278
+ */
279
+ stopId?: string;
280
+ /**
281
+ * latitude
282
+ */
283
+ lat: number;
284
+ /**
285
+ * longitude
286
+ */
287
+ lon: number;
288
+ /**
289
+ * level according to OpenStreetMap
290
+ */
291
+ level: number;
292
+ /**
293
+ * arrival time
294
+ */
295
+ arrival?: string;
296
+ /**
297
+ * departure time
298
+ */
299
+ departure?: string;
300
+ /**
301
+ * scheduled arrival time
302
+ */
303
+ scheduledArrival?: string;
304
+ /**
305
+ * scheduled departure time
306
+ */
307
+ scheduledDeparture?: string;
308
+ /**
309
+ * scheduled track from the static schedule timetable dataset
310
+ */
311
+ scheduledTrack?: string;
312
+ /**
313
+ * The current track/platform information, updated with real-time updates if available.
314
+ * Can be missing if neither real-time updates nor the schedule timetable contains track information.
315
+ *
316
+ */
317
+ track?: string;
318
+ vertexType?: VertexType;
319
+ /**
320
+ * Type of pickup. It could be disallowed due to schedule, skipped stops or cancellations.
321
+ */
322
+ pickupType?: PickupDropoffType;
323
+ /**
324
+ * Type of dropoff. It could be disallowed due to schedule, skipped stops or cancellations.
325
+ */
326
+ dropoffType?: PickupDropoffType;
327
+ /**
328
+ * Whether this stop is cancelled due to the realtime situation.
329
+ */
330
+ cancelled?: boolean;
331
+ /**
332
+ * Alerts for this stop.
333
+ */
334
+ alerts?: Array<Alert>;
335
+ };
336
+ /**
337
+ * Place reachable by One-to-All
338
+ */
339
+ type ReachablePlace = {
340
+ /**
341
+ * Place reached by One-to-All
342
+ */
343
+ place?: Place;
344
+ /**
345
+ * Total travel duration
346
+ */
347
+ duration?: number;
348
+ /**
349
+ * k is the smallest number, for which a journey with the shortest duration and at most k-1 transfers exist.
350
+ * You can think of k as the number of connections used.
351
+ *
352
+ * In more detail:
353
+ *
354
+ * k=0: No connection, e.g. for the one location
355
+ * k=1: Direct connection
356
+ * k=2: Connection with 1 transfer
357
+ *
358
+ */
359
+ k?: number;
360
+ };
361
+ /**
362
+ * Object containing all reachable places by One-to-All search
363
+ */
364
+ type Reachable = {
365
+ /**
366
+ * One location used in One-to-All search
367
+ */
368
+ one?: Place;
369
+ /**
370
+ * List of locations reachable by One-to-All
371
+ */
372
+ all?: Array<ReachablePlace>;
373
+ };
374
+ /**
375
+ * departure or arrival event at a stop
376
+ */
377
+ type StopTime = {
378
+ /**
379
+ * information about the stop place and time
380
+ */
381
+ place: Place;
382
+ /**
383
+ * Transport mode for this leg
384
+ */
385
+ mode: Mode;
386
+ /**
387
+ * Whether there is real-time data about this leg
388
+ */
389
+ realTime: boolean;
390
+ /**
391
+ * For transit legs, the headsign of the bus or train being used.
392
+ * For non-transit legs, null
393
+ *
394
+ */
395
+ headsign: string;
396
+ agencyId: string;
397
+ agencyName: string;
398
+ agencyUrl: string;
399
+ routeColor?: string;
400
+ routeTextColor?: string;
401
+ tripId: string;
402
+ routeShortName: string;
403
+ /**
404
+ * Type of pickup (for departures) or dropoff (for arrivals), may be disallowed either due to schedule, skipped stops or cancellations
405
+ */
406
+ pickupDropoffType: PickupDropoffType;
407
+ /**
408
+ * Whether the departure/arrival is cancelled due to the realtime situation.
409
+ */
410
+ cancelled: boolean;
411
+ /**
412
+ * Filename and line number where this trip is from
413
+ */
414
+ source: string;
415
+ };
416
+ /**
417
+ * trip id and name
418
+ */
419
+ type TripInfo = {
420
+ /**
421
+ * trip ID (dataset trip id prefixed with the dataset tag)
422
+ */
423
+ tripId: string;
424
+ /**
425
+ * trip display name
426
+ */
427
+ routeShortName: string;
428
+ };
429
+ /**
430
+ * trip segment between two stops to show a trip on a map
431
+ */
432
+ type TripSegment = {
433
+ trips: Array<TripInfo>;
434
+ routeColor?: string;
435
+ /**
436
+ * Transport mode for this leg
437
+ */
438
+ mode: Mode;
439
+ /**
440
+ * distance in meters
441
+ */
442
+ distance: number;
443
+ from: Place;
444
+ to: Place;
445
+ /**
446
+ * departure time
447
+ */
448
+ departure: string;
449
+ /**
450
+ * arrival time
451
+ */
452
+ arrival: string;
453
+ /**
454
+ * scheduled departure time
455
+ */
456
+ scheduledDeparture: string;
457
+ /**
458
+ * scheduled arrival time
459
+ */
460
+ scheduledArrival: string;
461
+ /**
462
+ * Whether there is real-time data about this leg
463
+ */
464
+ realTime: boolean;
465
+ /**
466
+ * Google polyline encoded coordinate sequence (with precision 5) where the trip travels on this segment.
467
+ */
468
+ polyline: string;
469
+ };
470
+ type Direction = 'DEPART' | 'HARD_LEFT' | 'LEFT' | 'SLIGHTLY_LEFT' | 'CONTINUE' | 'SLIGHTLY_RIGHT' | 'RIGHT' | 'HARD_RIGHT' | 'CIRCLE_CLOCKWISE' | 'CIRCLE_COUNTERCLOCKWISE' | 'STAIRS' | 'ELEVATOR' | 'UTURN_LEFT' | 'UTURN_RIGHT';
471
+ type EncodedPolyline = {
472
+ /**
473
+ * The encoded points of the polyline using the Google polyline encoding.
474
+ */
475
+ points: string;
476
+ /**
477
+ * The precision of the returned polyline (7 for /v1, 6 for /v2)
478
+ * Be aware that with precision 7, coordinates with |longitude| > 107.37 are undefined/will overflow.
479
+ *
480
+ */
481
+ precision: number;
482
+ /**
483
+ * The number of points in the string
484
+ */
485
+ length: number;
486
+ };
487
+ type StepInstruction = {
488
+ relativeDirection: Direction;
489
+ /**
490
+ * The distance in meters that this step takes.
491
+ */
492
+ distance: number;
493
+ /**
494
+ * level where this segment starts, based on OpenStreetMap data
495
+ */
496
+ fromLevel: number;
497
+ /**
498
+ * level where this segment starts, based on OpenStreetMap data
499
+ */
500
+ toLevel: number;
501
+ /**
502
+ * OpenStreetMap way index
503
+ */
504
+ osmWay?: number;
505
+ polyline: EncodedPolyline;
506
+ /**
507
+ * The name of the street.
508
+ */
509
+ streetName: string;
510
+ /**
511
+ * Not implemented!
512
+ * When exiting a highway or traffic circle, the exit name/number.
513
+ *
514
+ */
515
+ exit: string;
516
+ /**
517
+ * Not implemented!
518
+ * Indicates whether or not a street changes direction at an intersection.
519
+ *
520
+ */
521
+ stayOn: boolean;
522
+ /**
523
+ * Not implemented!
524
+ * This step is on an open area, such as a plaza or train platform,
525
+ * and thus the directions should say something like "cross"
526
+ *
527
+ */
528
+ area: boolean;
529
+ };
530
+ type RentalFormFactor = 'BICYCLE' | 'CARGO_BICYCLE' | 'CAR' | 'MOPED' | 'SCOOTER_STANDING' | 'SCOOTER_SEATED' | 'OTHER';
531
+ type RentalPropulsionType = 'HUMAN' | 'ELECTRIC_ASSIST' | 'ELECTRIC' | 'COMBUSTION' | 'COMBUSTION_DIESEL' | 'HYBRID' | 'PLUG_IN_HYBRID' | 'HYDROGEN_FUEL_CELL';
532
+ type RentalReturnConstraint = 'NONE' | 'ANY_STATION' | 'ROUNDTRIP_STATION';
533
+ /**
534
+ * Vehicle rental
535
+ */
536
+ type Rental = {
537
+ /**
538
+ * Vehicle share system ID
539
+ */
540
+ systemId: string;
541
+ /**
542
+ * Vehicle share system name
543
+ */
544
+ systemName?: string;
545
+ /**
546
+ * URL of the vehicle share system
547
+ */
548
+ url?: string;
549
+ /**
550
+ * Name of the station
551
+ */
552
+ stationName?: string;
553
+ /**
554
+ * Name of the station where the vehicle is picked up (empty for free floating vehicles)
555
+ */
556
+ fromStationName?: string;
557
+ /**
558
+ * Name of the station where the vehicle is returned (empty for free floating vehicles)
559
+ */
560
+ toStationName?: string;
561
+ /**
562
+ * Rental URI for Android (deep link to the specific station or vehicle)
563
+ */
564
+ rentalUriAndroid?: string;
565
+ /**
566
+ * Rental URI for iOS (deep link to the specific station or vehicle)
567
+ */
568
+ rentalUriIOS?: string;
569
+ /**
570
+ * Rental URI for web (deep link to the specific station or vehicle)
571
+ */
572
+ rentalUriWeb?: string;
573
+ formFactor?: RentalFormFactor;
574
+ propulsionType?: RentalPropulsionType;
575
+ returnConstraint?: RentalReturnConstraint;
576
+ };
577
+ type Leg = {
578
+ /**
579
+ * Transport mode for this leg
580
+ */
581
+ mode: Mode;
582
+ from: Place;
583
+ to: Place;
584
+ /**
585
+ * Leg duration in seconds
586
+ *
587
+ * If leg is footpath:
588
+ * The footpath duration is derived from the default footpath
589
+ * duration using the query parameters `transferTimeFactor` and
590
+ * `additionalTransferTime` as follows:
591
+ * `leg.duration = defaultDuration * transferTimeFactor + additionalTransferTime.`
592
+ * In case the defaultDuration is needed, it can be calculated by
593
+ * `defaultDuration = (leg.duration - additionalTransferTime) / transferTimeFactor`.
594
+ * Note that the default values are `transferTimeFactor = 1` and
595
+ * `additionalTransferTime = 0` in case they are not explicitly
596
+ * provided in the query.
597
+ *
598
+ */
599
+ duration: number;
600
+ /**
601
+ * leg departure time
602
+ */
603
+ startTime: string;
604
+ /**
605
+ * leg arrival time
606
+ */
607
+ endTime: string;
608
+ /**
609
+ * scheduled leg departure time
610
+ */
611
+ scheduledStartTime: string;
612
+ /**
613
+ * scheduled leg arrival time
614
+ */
615
+ scheduledEndTime: string;
616
+ /**
617
+ * Whether there is real-time data about this leg
618
+ */
619
+ realTime: boolean;
620
+ /**
621
+ * Whether this leg was originally scheduled to run or is an additional service.
622
+ * Scheduled times will equal realtime times in this case.
623
+ *
624
+ */
625
+ scheduled: boolean;
626
+ /**
627
+ * For non-transit legs the distance traveled while traversing this leg in meters.
628
+ */
629
+ distance?: number;
630
+ /**
631
+ * For transit legs, if the rider should stay on the vehicle as it changes route names.
632
+ */
633
+ interlineWithPreviousLeg?: boolean;
634
+ /**
635
+ * For transit legs, the headsign of the bus or train being used.
636
+ * For non-transit legs, null
637
+ *
638
+ */
639
+ headsign?: string;
640
+ routeColor?: string;
641
+ routeTextColor?: string;
642
+ routeType?: string;
643
+ agencyName?: string;
644
+ agencyUrl?: string;
645
+ agencyId?: string;
646
+ tripId?: string;
647
+ routeShortName?: string;
648
+ /**
649
+ * Whether this trip is cancelled
650
+ */
651
+ cancelled?: boolean;
652
+ /**
653
+ * Filename and line number where this trip is from
654
+ */
655
+ source?: string;
656
+ /**
657
+ * For transit legs, intermediate stops between the Place where the leg originates
658
+ * and the Place where the leg ends. For non-transit legs, null.
659
+ *
660
+ */
661
+ intermediateStops?: Array<Place>;
662
+ legGeometry: EncodedPolyline;
663
+ /**
664
+ * A series of turn by turn instructions
665
+ * used for walking, biking and driving.
666
+ *
667
+ */
668
+ steps?: Array<StepInstruction>;
669
+ rental?: Rental;
670
+ /**
671
+ * Index into `Itinerary.fareTransfers` array
672
+ * to identify which fare transfer this leg belongs to
673
+ *
674
+ */
675
+ fareTransferIndex?: number;
676
+ /**
677
+ * Index into the `Itinerary.fareTransfers[fareTransferIndex].effectiveFareLegProducts` array
678
+ * to identify which effective fare leg this itinerary leg belongs to
679
+ *
680
+ */
681
+ effectiveFareLegIndex?: number;
682
+ /**
683
+ * Alerts for this stop.
684
+ */
685
+ alerts?: Array<Alert>;
686
+ };
687
+ type RiderCategory = {
688
+ /**
689
+ * Rider category name as displayed to the rider.
690
+ */
691
+ riderCategoryName: string;
692
+ /**
693
+ * Specifies if this category should be considered the default (i.e. the main category displayed to riders).
694
+ */
695
+ isDefaultFareCategory: boolean;
696
+ /**
697
+ * URL to a web page providing detailed information about the rider category and/or its eligibility criteria.
698
+ */
699
+ eligibilityUrl?: string;
700
+ };
701
+ type FareMediaType = 'NONE' | 'PAPER_TICKET' | 'TRANSIT_CARD' | 'CONTACTLESS_EMV' | 'MOBILE_APP';
702
+ type FareMedia = {
703
+ /**
704
+ * Name of the fare media. Required for transit cards and mobile apps.
705
+ */
706
+ fareMediaName?: string;
707
+ /**
708
+ * The type of fare media.
709
+ */
710
+ fareMediaType: FareMediaType;
711
+ };
712
+ type FareProduct = {
713
+ /**
714
+ * The name of the fare product as displayed to riders.
715
+ */
716
+ name: string;
717
+ /**
718
+ * The cost of the fare product. May be negative to represent transfer discounts. May be zero to represent a fare product that is free.
719
+ */
720
+ amount: number;
721
+ /**
722
+ * ISO 4217 currency code. The currency of the cost of the fare product.
723
+ */
724
+ currency: string;
725
+ riderCategory?: RiderCategory;
726
+ media?: FareMedia;
727
+ };
728
+ type FareTransferRule = 'A_AB' | 'A_AB_B' | 'AB';
729
+ /**
730
+ * The concept is derived from: https://gtfs.org/documentation/schedule/reference/#fare_transfer_rulestxt
731
+ *
732
+ * Terminology:
733
+ * - **Leg**: An itinerary leg as described by the `Leg` type of this API description.
734
+ * - **Effective Fare Leg**: Itinerary legs can be joined together to form one *effective fare leg*.
735
+ * - **Fare Transfer**: A fare transfer groups two or more effective fare legs.
736
+ * - **A** is the first *effective fare leg* of potentially multiple consecutive legs contained in a fare transfer
737
+ * - **B** is any *effective fare leg* following the first *effective fare leg* in this transfer
738
+ * - **AB** are all changes between *effective fare legs* contained in this transfer
739
+ *
740
+ * The fare transfer rule is used to derive the final set of products of the itinerary legs contained in this transfer:
741
+ * - A_AB means that any product from the first effective fare leg combined with the product attached to the transfer itself (AB) which can be empty (= free). Note that all subsequent effective fare leg products need to be ignored in this case.
742
+ * - A_AB_B mean that a product for each effective fare leg needs to be purchased in a addition to the product attached to the transfer itself (AB) which can be empty (= free)
743
+ * - AB only the transfer product itself has to be purchased. Note that all fare products attached to the contained effective fare legs need to be ignored in this case.
744
+ *
745
+ * An itinerary `Leg` references the index of the fare transfer and the index of the effective fare leg in this transfer it belongs to.
746
+ *
747
+ */
748
+ type FareTransfer = {
749
+ rule?: FareTransferRule;
750
+ transferProduct?: FareProduct;
751
+ /**
752
+ * Lists all valid fare products for the effective fare legs.
753
+ * This is an `array<array<FareProduct>>` where the inner array
754
+ * lists all possible fare products that would cover this effective fare leg.
755
+ * Each "effective fare leg" can have multiple options for adult/child/weekly/monthly/day/one-way tickets etc.
756
+ * You can see the outer array as AND (you need one ticket for each effective fare leg (`A_AB_B`), the first effective fare leg (`A_AB`) or no fare leg at all but only the transfer product (`AB`)
757
+ * and the inner array as OR (you can choose which ticket to buy)
758
+ *
759
+ */
760
+ effectiveFareLegProducts: Array<Array<FareProduct>>;
761
+ };
762
+ type Itinerary = {
763
+ /**
764
+ * journey duration in seconds
765
+ */
766
+ duration: number;
767
+ /**
768
+ * journey departure time
769
+ */
770
+ startTime: string;
771
+ /**
772
+ * journey arrival time
773
+ */
774
+ endTime: string;
775
+ /**
776
+ * The number of transfers this trip has.
777
+ */
778
+ transfers: number;
779
+ /**
780
+ * Journey legs
781
+ */
782
+ legs: Array<Leg>;
783
+ /**
784
+ * Fare information
785
+ */
786
+ fareTransfers?: Array<FareTransfer>;
787
+ };
788
+ /**
789
+ * footpath from one location to another
790
+ */
791
+ type Footpath = {
792
+ to: Place;
793
+ /**
794
+ * optional; missing if the GTFS did not contain a footpath
795
+ * footpath duration in minutes according to GTFS (+heuristics)
796
+ *
797
+ */
798
+ default?: number;
799
+ /**
800
+ * optional; missing if no path was found (timetable / osr)
801
+ * footpath duration in minutes for the foot profile
802
+ *
803
+ */
804
+ foot?: number;
805
+ /**
806
+ * optional; missing if no path was found with foot routing
807
+ * footpath duration in minutes for the foot profile
808
+ *
809
+ */
810
+ footRouted?: number;
811
+ /**
812
+ * optional; missing if no path was found with the wheelchair profile
813
+ * footpath duration in minutes for the wheelchair profile
814
+ *
815
+ */
816
+ wheelchair?: number;
817
+ /**
818
+ * optional; missing if no path was found with the wheelchair profile
819
+ * footpath duration in minutes for the wheelchair profile
820
+ *
821
+ */
822
+ wheelchairRouted?: number;
823
+ /**
824
+ * optional; missing if no path was found with the wheelchair profile
825
+ * true if the wheelchair path uses an elevator
826
+ *
827
+ */
828
+ wheelchairUsesElevator?: boolean;
829
+ };
830
+ type PlanData = {
831
+ query: {
832
+ /**
833
+ * Optional. Default is 0 minutes.
834
+ *
835
+ * Additional transfer time reserved for each transfer in minutes.
836
+ *
837
+ */
838
+ additionalTransferTime?: number;
839
+ /**
840
+ * Optional. Default is `false`.
841
+ *
842
+ * - `arriveBy=true`: the parameters `date` and `time` refer to the arrival time
843
+ * - `arriveBy=false`: the parameters `date` and `time` refer to the departure time
844
+ *
845
+ */
846
+ arriveBy?: boolean;
847
+ /**
848
+ * - true: Compute transfer polylines and step instructions.
849
+ * - false: Only return basic information (start time, end time, duration) for transfers.
850
+ *
851
+ */
852
+ detailedTransfers: boolean;
853
+ /**
854
+ * Optional. Default is `WALK` which will compute walking routes as direct connections.
855
+ *
856
+ * Modes used for direction connections from start to destination without using transit.
857
+ * Results will be returned on the `direct` key.
858
+ *
859
+ * Note: Direct connections will only be returned on the first call. For paging calls, they can be omitted.
860
+ *
861
+ * Note: Transit connections that are slower than the fastest direct connection will not show up.
862
+ * This is being used as a cut-off during transit routing to speed up the search.
863
+ * To prevent this, it's possible to send two separate requests (one with only `transitModes` and one with only `directModes`).
864
+ *
865
+ * Only non-transit modes such as `WALK`, `BIKE`, `CAR`, `BIKE_SHARING`, etc. can be used.
866
+ *
867
+ */
868
+ directModes?: Array<Mode>;
869
+ /**
870
+ * Experimental. Expect unannounced breaking changes (without version bumps).
871
+ *
872
+ * Optional. Only applies to direct connections.
873
+ *
874
+ * A list of vehicle type form factors that are allowed to be used for direct connections.
875
+ * If empty (the default), all form factors are allowed.
876
+ * Example: `BICYCLE,SCOOTER_STANDING`.
877
+ *
878
+ */
879
+ directRentalFormFactors?: Array<RentalFormFactor>;
880
+ /**
881
+ * Experimental. Expect unannounced breaking changes (without version bumps).
882
+ *
883
+ * Optional. Only applies to direct connections.
884
+ *
885
+ * A list of vehicle type form factors that are allowed to be used for direct connections.
886
+ * If empty (the default), all propulsion types are allowed.
887
+ * Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`.
888
+ *
889
+ */
890
+ directRentalPropulsionTypes?: Array<RentalPropulsionType>;
891
+ /**
892
+ * Experimental. Expect unannounced breaking changes (without version bumps).
893
+ *
894
+ * Optional. Only applies to direct connections.
895
+ *
896
+ * A list of rental providers that are allowed to be used for direct connections.
897
+ * If empty (the default), all providers are allowed.
898
+ *
899
+ */
900
+ directRentalProviders?: Array<(string)>;
901
+ /**
902
+ * Optional. Default is `NONE`.
903
+ *
904
+ * Set an elevation cost profile, to penalize routes with incline.
905
+ * - `NONE`: No additional costs for elevations. This is the default behavior
906
+ * - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required.
907
+ * - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required.
908
+ *
909
+ * As using an elevation costs profile will increase the travel duration,
910
+ * routing through steep terrain may exceed the maximal allowed duration,
911
+ * causing a location to appear unreachable.
912
+ * Increasing the maximum travel time for these segments may resolve this issue.
913
+ *
914
+ * The profile is used for direct routing, on the first mile, and last mile.
915
+ *
916
+ * Elevation cost profiles are currently used by following street modes:
917
+ * - `BIKE`
918
+ *
919
+ */
920
+ elevationCosts?: ElevationCosts;
921
+ /**
922
+ * Optional. Experimental. Default is `1.0`.
923
+ * Factor with which the duration of the fastest direct connection is multiplied.
924
+ * Values > 1.0 allow connections that are slower than the fastest direct connection to be found.
925
+ *
926
+ */
927
+ fastestDirectFactor?: number;
928
+ /**
929
+ * \`latitude,longitude[,level]\` tuple with
930
+ * - latitude and longitude in degrees
931
+ * - (optional) level: the OSM level (default: 0)
932
+ *
933
+ * OR
934
+ *
935
+ * stop id
936
+ *
937
+ */
938
+ fromPlace: string;
939
+ /**
940
+ * Optional. Experimental. Number of luggage pieces; base unit: airline cabin luggage (e.g. for ODM or price calculation)
941
+ *
942
+ */
943
+ luggage?: number;
944
+ /**
945
+ * Optional. Default is 30min which is `1800`.
946
+ * Maximum time in seconds for direct connections.
947
+ *
948
+ */
949
+ maxDirectTime?: number;
950
+ /**
951
+ * Optional. Default is 25 meters.
952
+ *
953
+ * Maximum matching distance in meters to match geo coordinates to the street network.
954
+ *
955
+ */
956
+ maxMatchingDistance?: number;
957
+ /**
958
+ * Optional. Default is 15min which is `900`.
959
+ * Maximum time in seconds for the last street leg.
960
+ *
961
+ */
962
+ maxPostTransitTime?: number;
963
+ /**
964
+ * Optional. Default is 15min which is `900`.
965
+ * Maximum time in seconds for the first street leg.
966
+ *
967
+ */
968
+ maxPreTransitTime?: number;
969
+ /**
970
+ * The maximum number of allowed transfers.
971
+ * If not provided, the routing uses the server-side default value
972
+ * which is hardcoded and very high to cover all use cases.
973
+ *
974
+ * *Warning*: Use with care. Setting this too low can lead to
975
+ * optimal (e.g. the fastest) journeys not being found.
976
+ * If this value is too low to reach the destination at all,
977
+ * it can lead to slow routing performance.
978
+ *
979
+ */
980
+ maxTransfers?: number;
981
+ /**
982
+ * The maximum travel time in minutes.
983
+ * If not provided, the routing to uses the value
984
+ * hardcoded in the server which is usually quite high.
985
+ *
986
+ * *Warning*: Use with care. Setting this too low can lead to
987
+ * optimal (e.g. the least transfers) journeys not being found.
988
+ * If this value is too low to reach the destination at all,
989
+ * it can lead to slow routing performance.
990
+ *
991
+ */
992
+ maxTravelTime?: number;
993
+ /**
994
+ * Optional. Default is 0 minutes.
995
+ *
996
+ * Minimum transfer time for each transfer in minutes.
997
+ *
998
+ */
999
+ minTransferTime?: number;
1000
+ /**
1001
+ * The minimum number of itineraries to compute.
1002
+ * This is only relevant if `timetableView=true`.
1003
+ * The default value is 5.
1004
+ *
1005
+ */
1006
+ numItineraries?: number;
1007
+ /**
1008
+ * Use the cursor to go to the next "page" of itineraries.
1009
+ * Copy the cursor from the last response and keep the original request as is.
1010
+ * This will enable you to search for itineraries in the next or previous time-window.
1011
+ *
1012
+ */
1013
+ pageCursor?: string;
1014
+ /**
1015
+ * Optional. Experimental. Number of passengers (e.g. for ODM or price calculation)
1016
+ */
1017
+ passengers?: number;
1018
+ /**
1019
+ * Optional. Default is `FOOT`.
1020
+ *
1021
+ * Accessibility profile to use for pedestrian routing in transfers
1022
+ * between transit connections, on the first mile, and last mile.
1023
+ *
1024
+ */
1025
+ pedestrianProfile?: PedestrianProfile;
1026
+ /**
1027
+ * Optional. Default is `WALK`. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`).
1028
+ *
1029
+ * A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`.
1030
+ *
1031
+ */
1032
+ postTransitModes?: Array<Mode>;
1033
+ /**
1034
+ * Experimental. Expect unannounced breaking changes (without version bumps).
1035
+ *
1036
+ * Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalFormFactors`).
1037
+ *
1038
+ * A list of vehicle type form factors that are allowed to be used from the last transit stop to the `to` coordinate.
1039
+ * If empty (the default), all form factors are allowed.
1040
+ * Example: `BICYCLE,SCOOTER_STANDING`.
1041
+ *
1042
+ */
1043
+ postTransitRentalFormFactors?: Array<RentalFormFactor>;
1044
+ /**
1045
+ * Experimental. Expect unannounced breaking changes (without version bumps).
1046
+ *
1047
+ * Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalPropulsionTypes`).
1048
+ *
1049
+ * A list of vehicle propulsion types that are allowed to be used from the last transit stop to the `to` coordinate.
1050
+ * If empty (the default), all propulsion types are allowed.
1051
+ * Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`.
1052
+ *
1053
+ */
1054
+ postTransitRentalPropulsionTypes?: Array<RentalPropulsionType>;
1055
+ /**
1056
+ * Experimental. Expect unannounced breaking changes (without version bumps).
1057
+ *
1058
+ * Optional. Only applies if the `to` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviders`).
1059
+ *
1060
+ * A list of rental providers that are allowed to be used from the last transit stop to the `to` coordinate.
1061
+ * If empty (the default), all providers are allowed.
1062
+ *
1063
+ */
1064
+ postTransitRentalProviders?: Array<(string)>;
1065
+ /**
1066
+ * Optional. Default is `WALK`. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directModes`).
1067
+ *
1068
+ * A list of modes that are allowed to be used from the `from` coordinate to the first transit stop. Example: `WALK,BIKE_SHARING`.
1069
+ *
1070
+ */
1071
+ preTransitModes?: Array<Mode>;
1072
+ /**
1073
+ * Experimental. Expect unannounced breaking changes (without version bumps).
1074
+ *
1075
+ * Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalFormFactors`).
1076
+ *
1077
+ * A list of vehicle type form factors that are allowed to be used from the `from` coordinate to the first transit stop.
1078
+ * If empty (the default), all form factors are allowed.
1079
+ * Example: `BICYCLE,SCOOTER_STANDING`.
1080
+ *
1081
+ */
1082
+ preTransitRentalFormFactors?: Array<RentalFormFactor>;
1083
+ /**
1084
+ * Experimental. Expect unannounced breaking changes (without version bumps).
1085
+ *
1086
+ * Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalPropulsionTypes`).
1087
+ *
1088
+ * A list of vehicle propulsion types that are allowed to be used from the `from` coordinate to the first transit stop.
1089
+ * If empty (the default), all propulsion types are allowed.
1090
+ * Example: `HUMAN,ELECTRIC,ELECTRIC_ASSIST`.
1091
+ *
1092
+ */
1093
+ preTransitRentalPropulsionTypes?: Array<RentalPropulsionType>;
1094
+ /**
1095
+ * Experimental. Expect unannounced breaking changes (without version bumps).
1096
+ *
1097
+ * Optional. Only applies if the `from` place is a coordinate (not a transit stop). Does not apply to direct connections (see `directRentalProviders`).
1098
+ *
1099
+ * A list of rental providers that are allowed to be used from the `from` coordinate to the first transit stop.
1100
+ * If empty (the default), all providers are allowed.
1101
+ *
1102
+ */
1103
+ preTransitRentalProviders?: Array<(string)>;
1104
+ /**
1105
+ * Optional. Default is `false`.
1106
+ *
1107
+ * If set to `true`, all used transit trips are required to allow bike carriage.
1108
+ *
1109
+ */
1110
+ requireBikeTransport?: boolean;
1111
+ /**
1112
+ * Optional. Default is `false`.
1113
+ *
1114
+ * If set to `true`, all used transit trips are required to allow car carriage.
1115
+ *
1116
+ */
1117
+ requireCarTransport?: boolean;
1118
+ /**
1119
+ * Optional. Default is 2 hours which is `7200`.
1120
+ *
1121
+ * The length of the search-window in seconds. Default value two hours.
1122
+ *
1123
+ * - `arriveBy=true`: number of seconds between the earliest departure time and latest departure time
1124
+ * - `arriveBy=false`: number of seconds between the earliest arrival time and the latest arrival time
1125
+ *
1126
+ */
1127
+ searchWindow?: number;
1128
+ /**
1129
+ * Optional. Defaults to the current time.
1130
+ *
1131
+ * Departure time ($arriveBy=false) / arrival date ($arriveBy=true),
1132
+ *
1133
+ */
1134
+ time?: string;
1135
+ /**
1136
+ * Optional. Query timeout in seconds.
1137
+ */
1138
+ timeout?: number;
1139
+ /**
1140
+ * Optional. Default is `true`.
1141
+ *
1142
+ * Search for the best trip options within a time window.
1143
+ * If true two itineraries are considered optimal
1144
+ * if one is better on arrival time (earliest wins)
1145
+ * and the other is better on departure time (latest wins).
1146
+ * In combination with arriveBy this parameter cover the following use cases:
1147
+ *
1148
+ * `timetable=false` = waiting for the first transit departure/arrival is considered travel time:
1149
+ * - `arriveBy=true`: event (e.g. a meeting) starts at 10:00 am,
1150
+ * compute the best journeys that arrive by that time (maximizes departure time)
1151
+ * - `arriveBy=false`: event (e.g. a meeting) ends at 11:00 am,
1152
+ * compute the best journeys that depart after that time
1153
+ *
1154
+ * `timetable=true` = optimize "later departure" + "earlier arrival" and give all options over a time window:
1155
+ * - `arriveBy=true`: the time window around `date` and `time` refers to the arrival time window
1156
+ * - `arriveBy=false`: the time window around `date` and `time` refers to the departure time window
1157
+ *
1158
+ */
1159
+ timetableView?: boolean;
1160
+ /**
1161
+ * \`latitude,longitude[,level]\` tuple with
1162
+ * - latitude and longitude in degrees
1163
+ * - (optional) level: the OSM level (default: 0)
1164
+ *
1165
+ * OR
1166
+ *
1167
+ * stop id
1168
+ *
1169
+ */
1170
+ toPlace: string;
1171
+ /**
1172
+ * Optional. Default is 1.0
1173
+ *
1174
+ * Factor to multiply minimum required transfer times with.
1175
+ * Values smaller than 1.0 are not supported.
1176
+ *
1177
+ */
1178
+ transferTimeFactor?: number;
1179
+ /**
1180
+ * Optional. Default is `TRANSIT` which allows all transit modes (no restriction).
1181
+ * Allowed modes for the transit part. If empty, no transit connections will be computed.
1182
+ * For example, this can be used to allow only `METRO,SUBWAY,TRAM`.
1183
+ *
1184
+ */
1185
+ transitModes?: Array<Mode>;
1186
+ /**
1187
+ * Optional. Default is `false`.
1188
+ *
1189
+ * Whether to use transfers routed on OpenStreetMap data.
1190
+ *
1191
+ */
1192
+ useRoutedTransfers?: boolean;
1193
+ /**
1194
+ * List of via stops to visit (only stop IDs, no coordinates allowed for now).
1195
+ * Also see the optional parameter `viaMinimumStay` to set a set a minimum stay duration for each via stop.
1196
+ *
1197
+ */
1198
+ via?: Array<(string)>;
1199
+ /**
1200
+ * Optional. If not set, the default is `0,0` - no stay required.
1201
+ *
1202
+ * For each `via` stop a minimum stay duration in minutes.
1203
+ *
1204
+ * The value `0` signals that it's allowed to stay in the same trip.
1205
+ * This enables via stays without counting a transfer and can lead
1206
+ * to better connections with less transfers. Transfer connections can
1207
+ * still be found with `viaMinimumStay=0`.
1208
+ *
1209
+ */
1210
+ viaMinimumStay?: Array<(number)>;
1211
+ /**
1212
+ * Optional. Experimental. If set to true, the response will contain fare information.
1213
+ */
1214
+ withFares?: boolean;
1215
+ };
1216
+ };
1217
+ type PlanResponse = ({
1218
+ /**
1219
+ * the routing query
1220
+ */
1221
+ requestParameters: {
1222
+ [key: string]: (string);
1223
+ };
1224
+ /**
1225
+ * debug statistics
1226
+ */
1227
+ debugOutput: {
1228
+ [key: string]: (number);
1229
+ };
1230
+ from: Place;
1231
+ to: Place;
1232
+ /**
1233
+ * Direct trips by `WALK`, `BIKE`, `CAR`, etc. without time-dependency.
1234
+ * The starting time (`arriveBy=false`) / arrival time (`arriveBy=true`) is always the queried `time` parameter (set to \"now\" if not set).
1235
+ * But all `direct` connections are meant to be independent of absolute times.
1236
+ *
1237
+ */
1238
+ direct: Array<Itinerary>;
1239
+ /**
1240
+ * list of itineraries
1241
+ */
1242
+ itineraries: Array<Itinerary>;
1243
+ /**
1244
+ * Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page.
1245
+ * The previous page is a set of itineraries departing BEFORE the first itinerary in the result for a depart after search. When using the default sort order the previous set of itineraries is inserted before the current result.
1246
+ *
1247
+ */
1248
+ previousPageCursor: string;
1249
+ /**
1250
+ * Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page.
1251
+ * The next page is a set of itineraries departing AFTER the last itinerary in this result.
1252
+ *
1253
+ */
1254
+ nextPageCursor: string;
1255
+ });
1256
+ type PlanError = unknown;
1257
+ type OneToManyData = {
1258
+ query: {
1259
+ /**
1260
+ * true = many to one
1261
+ * false = one to many
1262
+ *
1263
+ */
1264
+ arriveBy: boolean;
1265
+ /**
1266
+ * Optional. Default is `NONE`.
1267
+ *
1268
+ * Set an elevation cost profile, to penalize routes with incline.
1269
+ * - `NONE`: No additional costs for elevations. This is the default behavior
1270
+ * - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required.
1271
+ * - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required.
1272
+ *
1273
+ * As using an elevation costs profile will increase the travel duration,
1274
+ * routing through steep terrain may exceed the maximal allowed duration,
1275
+ * causing a location to appear unreachable.
1276
+ * Increasing the maximum travel time for these segments may resolve this issue.
1277
+ *
1278
+ * Elevation cost profiles are currently used by following street modes:
1279
+ * - `BIKE`
1280
+ *
1281
+ */
1282
+ elevationCosts?: ElevationCosts;
1283
+ /**
1284
+ * geo locations as latitude;longitude,latitude;longitude,...
1285
+ */
1286
+ many: Array<(string)>;
1287
+ /**
1288
+ * maximum travel time in seconds
1289
+ */
1290
+ max: number;
1291
+ /**
1292
+ * maximum matching distance in meters to match geo coordinates to the street network
1293
+ */
1294
+ maxMatchingDistance: number;
1295
+ /**
1296
+ * routing profile to use (currently supported: \`WALK\`, \`BIKE\`, \`CAR\`)
1297
+ *
1298
+ */
1299
+ mode: Mode;
1300
+ /**
1301
+ * geo location as latitude;longitude
1302
+ */
1303
+ one: string;
1304
+ };
1305
+ };
1306
+ type OneToManyResponse = (Array<Duration>);
1307
+ type OneToManyError = unknown;
1308
+ type OneToAllData = {
1309
+ query: {
1310
+ /**
1311
+ * Optional. Default is 0 minutes.
1312
+ *
1313
+ * Additional transfer time reserved for each transfer in minutes.
1314
+ *
1315
+ */
1316
+ additionalTransferTime?: number;
1317
+ /**
1318
+ * true = all to one,
1319
+ * false = one to all
1320
+ *
1321
+ */
1322
+ arriveBy?: boolean;
1323
+ /**
1324
+ * Optional. Default is `NONE`.
1325
+ *
1326
+ * Set an elevation cost profile, to penalize routes with incline.
1327
+ * - `NONE`: No additional costs for elevations. This is the default behavior
1328
+ * - `LOW`: Add a low cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if small detours are required.
1329
+ * - `HIGH`: Add a high cost for increase in elevation and incline along the way. This will prefer routes with less ascent, if larger detours are required.
1330
+ *
1331
+ * As using an elevation costs profile will increase the travel duration,
1332
+ * routing through steep terrain may exceed the maximal allowed duration,
1333
+ * causing a location to appear unreachable.
1334
+ * Increasing the maximum travel time for these segments may resolve this issue.
1335
+ *
1336
+ * The profile is used for routing on both the first and last mile.
1337
+ *
1338
+ * Elevation cost profiles are currently used by following street modes:
1339
+ * - `BIKE`
1340
+ *
1341
+ */
1342
+ elevationCosts?: ElevationCosts;
1343
+ /**
1344
+ * Optional. Default is 25 meters.
1345
+ *
1346
+ * Maximum matching distance in meters to match geo coordinates to the street network.
1347
+ *
1348
+ */
1349
+ maxMatchingDistance?: number;
1350
+ /**
1351
+ * Optional. Default is 15min which is `900`.
1352
+ * - `arriveBy=true`: Maximum time in seconds for the street leg at `one` location.
1353
+ * - `arriveBy=false`: Currently not used
1354
+ *
1355
+ */
1356
+ maxPostTransitTime?: number;
1357
+ /**
1358
+ * Optional. Default is 15min which is `900`.
1359
+ * - `arriveBy=true`: Currently not used
1360
+ * - `arriveBy=false`: Maximum time in seconds for the street leg at `one` location.
1361
+ *
1362
+ */
1363
+ maxPreTransitTime?: number;
1364
+ /**
1365
+ * The maximum number of allowed transfers.
1366
+ * If not provided, the routing uses the server-side default value
1367
+ * which is hardcoded and very high to cover all use cases.
1368
+ *
1369
+ * *Warning*: Use with care. Setting this too low can lead to
1370
+ * optimal (e.g. the fastest) journeys not being found.
1371
+ * If this value is too low to reach the destination at all,
1372
+ * it can lead to slow routing performance.
1373
+ *
1374
+ */
1375
+ maxTransfers?: number;
1376
+ /**
1377
+ * maximum travel time in minutes
1378
+ */
1379
+ maxTravelTime: number;
1380
+ /**
1381
+ * Optional. Default is 0 minutes.
1382
+ *
1383
+ * Minimum transfer time for each transfer in minutes.
1384
+ *
1385
+ */
1386
+ minTransferTime?: number;
1387
+ /**
1388
+ * \`latitude,longitude[,level]\` tuple with
1389
+ * - latitude and longitude in degrees
1390
+ * - (optional) level: the OSM level (default: 0)
1391
+ *
1392
+ * OR
1393
+ *
1394
+ * stop id
1395
+ *
1396
+ */
1397
+ one: string;
1398
+ /**
1399
+ * Optional. Default is `FOOT`.
1400
+ *
1401
+ * Accessibility profile to use for pedestrian routing in transfers
1402
+ * between transit connections and the first and last mile respectively.
1403
+ *
1404
+ */
1405
+ pedestrianProfile?: PedestrianProfile;
1406
+ /**
1407
+ * Optional. Default is `WALK`. The behavior depends on whether `arriveBy` is set:
1408
+ * - `arriveBy=true`: Only applies if the `one` place is a coordinate (not a transit stop).
1409
+ * - `arriveBy=false`: Currently not used
1410
+ *
1411
+ * A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`.
1412
+ *
1413
+ */
1414
+ postTransitModes?: Array<Mode>;
1415
+ /**
1416
+ * Optional. Default is `WALK`. The behavior depends on whether `arriveBy` is set:
1417
+ * - `arriveBy=true`: Currently not used
1418
+ * - `arriveBy=false`: Only applies if the `one` place is a coordinate (not a transit stop).
1419
+ *
1420
+ * A list of modes that are allowed to be used from the last transit stop to the `to` coordinate. Example: `WALK,BIKE_SHARING`.
1421
+ *
1422
+ */
1423
+ preTransitModes?: Array<Mode>;
1424
+ /**
1425
+ * Optional. Default is `false`.
1426
+ *
1427
+ * If set to `true`, all used transit trips are required to allow bike carriage.
1428
+ *
1429
+ */
1430
+ requireBikeTransport?: boolean;
1431
+ /**
1432
+ * Optional. Default is `false`.
1433
+ *
1434
+ * If set to `true`, all used transit trips are required to allow car carriage.
1435
+ *
1436
+ */
1437
+ requireCarTransport?: boolean;
1438
+ /**
1439
+ * Optional. Defaults to the current time.
1440
+ *
1441
+ * Departure time ($arriveBy=false) / arrival date ($arriveBy=true),
1442
+ *
1443
+ */
1444
+ time?: string;
1445
+ /**
1446
+ * Optional. Default is 1.0
1447
+ *
1448
+ * Factor to multiply minimum required transfer times with.
1449
+ * Values smaller than 1.0 are not supported.
1450
+ *
1451
+ */
1452
+ transferTimeFactor?: number;
1453
+ /**
1454
+ * Optional. Default is `TRANSIT` which allows all transit modes (no restriction).
1455
+ * Allowed modes for the transit part. If empty, no transit connections will be computed.
1456
+ * For example, this can be used to allow only `METRO,SUBWAY,TRAM`.
1457
+ *
1458
+ */
1459
+ transitModes?: Array<Mode>;
1460
+ /**
1461
+ * Optional. Default is `false`.
1462
+ *
1463
+ * Whether to use transfers routed on OpenStreetMap data.
1464
+ *
1465
+ */
1466
+ useRoutedTransfers?: boolean;
1467
+ };
1468
+ };
1469
+ type OneToAllResponse = (Reachable);
1470
+ type OneToAllError = unknown;
1471
+ type ReverseGeocodeData = {
1472
+ query: {
1473
+ /**
1474
+ * latitude, longitude in degrees
1475
+ */
1476
+ place: string;
1477
+ /**
1478
+ * Optional. Default is all types.
1479
+ *
1480
+ * Only return results of the given type.
1481
+ * For example, this can be used to allow only `ADDRESS` and `STOP` results.
1482
+ *
1483
+ */
1484
+ type?: LocationType;
1485
+ };
1486
+ };
1487
+ type ReverseGeocodeResponse = (Array<Match>);
1488
+ type ReverseGeocodeError = unknown;
1489
+ type GeocodeData = {
1490
+ query: {
1491
+ /**
1492
+ * language tags as used in OpenStreetMap
1493
+ * (usually ISO 639-1, or ISO 639-2 if there's no ISO 639-1)
1494
+ *
1495
+ */
1496
+ language?: string;
1497
+ /**
1498
+ * Optional. Used for biasing results towards the coordinate.
1499
+ *
1500
+ * Format: latitude,longitude in degrees
1501
+ *
1502
+ */
1503
+ place?: string;
1504
+ /**
1505
+ * Optional. Used for biasing results towards the coordinate. Higher number = higher bias.
1506
+ *
1507
+ */
1508
+ placeBias?: number;
1509
+ /**
1510
+ * the (potentially partially typed) address to resolve
1511
+ */
1512
+ text: string;
1513
+ /**
1514
+ * Optional. Default is all types.
1515
+ *
1516
+ * Only return results of the given types.
1517
+ * For example, this can be used to allow only `ADDRESS` and `STOP` results.
1518
+ *
1519
+ */
1520
+ type?: LocationType;
1521
+ };
1522
+ };
1523
+ type GeocodeResponse = (Array<Match>);
1524
+ type GeocodeError = unknown;
1525
+ type TripData = {
1526
+ query: {
1527
+ /**
1528
+ * trip identifier (e.g. from an itinerary leg or stop event)
1529
+ */
1530
+ tripId: string;
1531
+ };
1532
+ };
1533
+ type TripResponse = (Itinerary);
1534
+ type TripError = unknown;
1535
+ type StoptimesData = {
1536
+ query: {
1537
+ /**
1538
+ * Optional. Default is `false`.
1539
+ *
1540
+ * - `arriveBy=true`: the parameters `date` and `time` refer to the arrival time
1541
+ * - `arriveBy=false`: the parameters `date` and `time` refer to the departure time
1542
+ *
1543
+ */
1544
+ arriveBy?: boolean;
1545
+ /**
1546
+ * This parameter will be ignored in case `pageCursor` is set.
1547
+ *
1548
+ * Optional. Default is
1549
+ * - `LATER` for `arriveBy=false`
1550
+ * - `EARLIER` for `arriveBy=true`
1551
+ *
1552
+ * The response will contain the next `n` arrivals / departures
1553
+ * in case `EARLIER` is selected and the previous `n`
1554
+ * arrivals / departures if `LATER` is selected.
1555
+ *
1556
+ */
1557
+ direction?: 'EARLIER' | 'LATER';
1558
+ /**
1559
+ * Optional. Default is all transit modes.
1560
+ *
1561
+ * Only return arrivals/departures of the given modes.
1562
+ *
1563
+ */
1564
+ mode?: Array<Mode>;
1565
+ /**
1566
+ * the number of events
1567
+ */
1568
+ n: number;
1569
+ /**
1570
+ * Use the cursor to go to the next "page" of stop times.
1571
+ * Copy the cursor from the last response and keep the original request as is.
1572
+ * This will enable you to search for stop times in the next or previous time-window.
1573
+ *
1574
+ */
1575
+ pageCursor?: string;
1576
+ /**
1577
+ * Optional. Radius in meters.
1578
+ *
1579
+ * Default is that only stop times of the parent of the stop itself
1580
+ * and all stops with the same name (+ their child stops) are returned.
1581
+ *
1582
+ * If set, all stops at parent stations and their child stops in the specified radius
1583
+ * are returned.
1584
+ *
1585
+ */
1586
+ radius?: number;
1587
+ /**
1588
+ * stop id of the stop to retrieve departures/arrivals for
1589
+ */
1590
+ stopId: string;
1591
+ /**
1592
+ * Optional. Defaults to the current time.
1593
+ *
1594
+ */
1595
+ time?: string;
1596
+ };
1597
+ };
1598
+ type StoptimesResponse = ({
1599
+ /**
1600
+ * list of stop times
1601
+ */
1602
+ stopTimes: Array<StopTime>;
1603
+ /**
1604
+ * Use the cursor to get the previous page of results. Insert the cursor into the request and post it to get the previous page.
1605
+ * The previous page is a set of stop times BEFORE the first stop time in the result.
1606
+ *
1607
+ */
1608
+ previousPageCursor: string;
1609
+ /**
1610
+ * Use the cursor to get the next page of results. Insert the cursor into the request and post it to get the next page.
1611
+ * The next page is a set of stop times AFTER the last stop time in this result.
1612
+ *
1613
+ */
1614
+ nextPageCursor: string;
1615
+ });
1616
+ type StoptimesError = unknown;
1617
+ type TripsData = {
1618
+ query: {
1619
+ /**
1620
+ * end if the time window
1621
+ */
1622
+ endTime: string;
1623
+ /**
1624
+ * latitude,longitude pair of the upper left coordinate
1625
+ */
1626
+ max: string;
1627
+ /**
1628
+ * latitude,longitude pair of the lower right coordinate
1629
+ */
1630
+ min: string;
1631
+ /**
1632
+ * start of the time window
1633
+ */
1634
+ startTime: string;
1635
+ /**
1636
+ * current zoom level
1637
+ */
1638
+ zoom: number;
1639
+ };
1640
+ };
1641
+ type TripsResponse = (Array<TripSegment>);
1642
+ type TripsError = unknown;
1643
+ type InitialResponse = ({
1644
+ /**
1645
+ * latitude
1646
+ */
1647
+ lat: number;
1648
+ /**
1649
+ * longitude
1650
+ */
1651
+ lon: number;
1652
+ /**
1653
+ * zoom level
1654
+ */
1655
+ zoom: number;
1656
+ });
1657
+ type InitialError = unknown;
1658
+ type StopsData = {
1659
+ query: {
1660
+ /**
1661
+ * latitude,longitude pair of the upper left coordinate
1662
+ */
1663
+ max: string;
1664
+ /**
1665
+ * latitude,longitude pair of the lower right coordinate
1666
+ */
1667
+ min: string;
1668
+ };
1669
+ };
1670
+ type StopsResponse = (Array<Place>);
1671
+ type StopsError = unknown;
1672
+ type LevelsData = {
1673
+ query: {
1674
+ /**
1675
+ * latitude,longitude pair of the upper left coordinate
1676
+ */
1677
+ max: string;
1678
+ /**
1679
+ * latitude,longitude pair of the lower right coordinate
1680
+ */
1681
+ min: string;
1682
+ };
1683
+ };
1684
+ type LevelsResponse = (Array<(number)>);
1685
+ type LevelsError = unknown;
1686
+ type FootpathsData = {
1687
+ query: {
1688
+ /**
1689
+ * location id
1690
+ */
1691
+ id: string;
1692
+ };
1693
+ };
1694
+ type FootpathsResponse = ({
1695
+ place: Place;
1696
+ /**
1697
+ * all outgoing footpaths of this location
1698
+ */
1699
+ footpaths: Array<Footpath>;
1700
+ });
1701
+ type FootpathsError = unknown;
1702
+
1703
+ export type { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, Direction, Duration, ElevationCosts, EncodedPolyline, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule, Footpath, FootpathsData, FootpathsError, FootpathsResponse, GeocodeData, GeocodeError, GeocodeResponse, InitialError, InitialResponse, Itinerary, Leg, LevelsData, LevelsError, LevelsResponse, LocationType, Match, Mode, OneToAllData, OneToAllError, OneToAllResponse, OneToManyData, OneToManyError, OneToManyResponse, PedestrianProfile, PickupDropoffType, Place, PlanData, PlanError, PlanResponse, Reachable, ReachablePlace, Rental, RentalFormFactor, RentalPropulsionType, RentalReturnConstraint, ReverseGeocodeData, ReverseGeocodeError, ReverseGeocodeResponse, RiderCategory, StepInstruction, StopTime, StopsData, StopsError, StopsResponse, StoptimesData, StoptimesError, StoptimesResponse, TimeRange, Token, TripData, TripError, TripInfo, TripResponse, TripSegment, TripsData, TripsError, TripsResponse, VertexType };