@motis-project/motis-client 2.0.98 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1232 @@
1
+ // openapi/schemas.gen.ts
2
+ var AlertCauseSchema = {
3
+ description: "Cause of this alert.",
4
+ type: "string",
5
+ enum: ["UNKNOWN_CAUSE", "OTHER_CAUSE", "TECHNICAL_PROBLEM", "STRIKE", "DEMONSTRATION", "ACCIDENT", "HOLIDAY", "WEATHER", "MAINTENANCE", "CONSTRUCTION", "POLICE_ACTIVITY", "MEDICAL_EMERGENCY"]
6
+ };
7
+ var AlertEffectSchema = {
8
+ description: "The effect of this problem on the affected entity.",
9
+ type: "string",
10
+ enum: ["NO_SERVICE", "REDUCED_SERVICE", "SIGNIFICANT_DELAYS", "DETOUR", "ADDITIONAL_SERVICE", "MODIFIED_SERVICE", "OTHER_EFFECT", "UNKNOWN_EFFECT", "STOP_MOVED", "NO_EFFECT", "ACCESSIBILITY_ISSUE"]
11
+ };
12
+ var AlertSeverityLevelSchema = {
13
+ description: "The severity of the alert.",
14
+ type: "string",
15
+ enum: ["UNKNOWN_SEVERITY", "INFO", "WARNING", "SEVERE"]
16
+ };
17
+ var TimeRangeSchema = {
18
+ description: `A time interval.
19
+ 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.
20
+ `,
21
+ type: "object",
22
+ properties: {
23
+ start: {
24
+ description: `If missing, the interval starts at minus infinity.
25
+ If a TimeRange is provided, either start or end must be provided - both fields cannot be empty.
26
+ `,
27
+ type: "string",
28
+ format: "date-time"
29
+ },
30
+ end: {
31
+ description: `If missing, the interval ends at plus infinity.
32
+ If a TimeRange is provided, either start or end must be provided - both fields cannot be empty.
33
+ `,
34
+ type: "string",
35
+ format: "date-time"
36
+ }
37
+ }
38
+ };
39
+ var AlertSchema = {
40
+ description: "An alert, indicating some sort of incident in the public transit network.",
41
+ type: "object",
42
+ required: ["headerText", "descriptionText"],
43
+ properties: {
44
+ communicationPeriod: {
45
+ description: `Time when the alert should be shown to the user.
46
+ If missing, the alert will be shown as long as it appears in the feed.
47
+ If multiple ranges are given, the alert will be shown during all of them.
48
+ `,
49
+ type: "array",
50
+ items: {
51
+ "$ref": "#/components/schemas/TimeRange"
52
+ }
53
+ },
54
+ impactPeriod: {
55
+ description: "Time when the services are affected by the disruption mentioned in the alert.",
56
+ type: "array",
57
+ items: {
58
+ "$ref": "#/components/schemas/TimeRange"
59
+ }
60
+ },
61
+ cause: {
62
+ "$ref": "#/components/schemas/AlertCause"
63
+ },
64
+ causeDetail: {
65
+ type: "string",
66
+ description: `Description of the cause of the alert that allows for agency-specific language;
67
+ more specific than the Cause.
68
+ `
69
+ },
70
+ effect: {
71
+ "$ref": "#/components/schemas/AlertEffect"
72
+ },
73
+ effectDetail: {
74
+ type: "string",
75
+ description: `Description of the effect of the alert that allows for agency-specific language;
76
+ more specific than the Effect.
77
+ `
78
+ },
79
+ url: {
80
+ type: "string",
81
+ description: "The URL which provides additional information about the alert."
82
+ },
83
+ headerText: {
84
+ type: "string",
85
+ description: `Header for the alert. This plain-text string will be highlighted, for example in boldface.
86
+ `
87
+ },
88
+ descriptionText: {
89
+ type: "string",
90
+ description: `Description for the alert.
91
+ This plain-text string will be formatted as the body of the alert (or shown on an explicit "expand" request by the user).
92
+ The information in the description should add to the information of the header.
93
+ `
94
+ },
95
+ ttsHeaderText: {
96
+ type: "string",
97
+ description: `Text containing the alert's header to be used for text-to-speech implementations.
98
+ This field is the text-to-speech version of header_text.
99
+ It should contain the same information as headerText but formatted such that it can read as text-to-speech
100
+ (for example, abbreviations removed, numbers spelled out, etc.)
101
+ `
102
+ },
103
+ ttsDescriptionText: {
104
+ type: "string",
105
+ description: `Text containing a description for the alert to be used for text-to-speech implementations.
106
+ This field is the text-to-speech version of description_text.
107
+ It should contain the same information as description_text but formatted such that it can be read as text-to-speech
108
+ (for example, abbreviations removed, numbers spelled out, etc.)
109
+ `
110
+ },
111
+ severityLevel: {
112
+ description: "Severity of the alert.",
113
+ "$ref": "#/components/schemas/AlertSeverityLevel"
114
+ },
115
+ imageUrl: {
116
+ description: "String containing an URL linking to an image.",
117
+ type: "string"
118
+ },
119
+ imageMediaType: {
120
+ description: `IANA media type as to specify the type of image to be displayed. The type must start with "image/"
121
+ `,
122
+ type: "string"
123
+ },
124
+ imageAlternativeText: {
125
+ description: `Text describing the appearance of the linked image in the image field
126
+ (e.g., in case the image can't be displayed or the user can't see the image for accessibility reasons).
127
+ See the HTML spec for alt image text.
128
+ `,
129
+ type: "string"
130
+ }
131
+ }
132
+ };
133
+ var DurationSchema = {
134
+ description: "Object containing duration if a path was found or none if no path was found",
135
+ type: "object",
136
+ properties: {
137
+ duration: {
138
+ type: "number",
139
+ description: "duration in seconds if a path was found, otherwise missing"
140
+ }
141
+ }
142
+ };
143
+ var AreaSchema = {
144
+ description: "Administrative area",
145
+ type: "object",
146
+ required: ["name", "adminLevel", "matched"],
147
+ properties: {
148
+ name: {
149
+ type: "string",
150
+ description: "Name of the area"
151
+ },
152
+ adminLevel: {
153
+ type: "number",
154
+ description: `[OpenStreetMap \`admin_level\`](https://wiki.openstreetmap.org/wiki/Key:admin_level)
155
+ of the area
156
+ `
157
+ },
158
+ matched: {
159
+ type: "boolean",
160
+ description: "Whether this area was matched by the input text"
161
+ },
162
+ unique: {
163
+ type: "boolean",
164
+ description: `Set for the first area after the \`default\` area that distinguishes areas
165
+ if the match is ambiguous regarding (\`default\` area + place name / street [+ house number]).
166
+ `
167
+ },
168
+ default: {
169
+ type: "boolean",
170
+ description: "Whether this area should be displayed as default area (area with admin level closest 7)"
171
+ }
172
+ }
173
+ };
174
+ var TokenSchema = {
175
+ description: "Matched token range (from index, length)",
176
+ type: "array",
177
+ minItems: 2,
178
+ maxItems: 2,
179
+ items: {
180
+ type: "number"
181
+ }
182
+ };
183
+ var LocationTypeSchema = {
184
+ description: "location type",
185
+ type: "string",
186
+ enum: ["ADDRESS", "PLACE", "STOP"]
187
+ };
188
+ var MatchSchema = {
189
+ description: "GeoCoding match",
190
+ type: "object",
191
+ required: ["type", "name", "id", "lat", "lon", "tokens", "areas", "score"],
192
+ properties: {
193
+ type: {
194
+ "$ref": "#/components/schemas/LocationType"
195
+ },
196
+ tokens: {
197
+ description: "list of non-overlapping tokens that were matched",
198
+ type: "array",
199
+ items: {
200
+ "$ref": "#/components/schemas/Token"
201
+ }
202
+ },
203
+ name: {
204
+ description: "name of the location (transit stop / PoI / address)",
205
+ type: "string"
206
+ },
207
+ id: {
208
+ description: "unique ID of the location",
209
+ type: "string"
210
+ },
211
+ lat: {
212
+ description: "latitude",
213
+ type: "number"
214
+ },
215
+ lon: {
216
+ description: "longitude",
217
+ type: "number"
218
+ },
219
+ level: {
220
+ description: `level according to OpenStreetMap
221
+ (at the moment only for public transport)
222
+ `,
223
+ type: "number"
224
+ },
225
+ street: {
226
+ description: "street name",
227
+ type: "string"
228
+ },
229
+ houseNumber: {
230
+ description: "house number",
231
+ type: "string"
232
+ },
233
+ zip: {
234
+ description: "zip code",
235
+ type: "string"
236
+ },
237
+ tz: {
238
+ description: 'timezone name (e.g. "Europe/Berlin")',
239
+ type: "string"
240
+ },
241
+ areas: {
242
+ description: "list of areas",
243
+ type: "array",
244
+ items: {
245
+ "$ref": "#/components/schemas/Area"
246
+ }
247
+ },
248
+ score: {
249
+ description: "score according to the internal scoring system (the scoring algorithm might change in the future)",
250
+ type: "number"
251
+ }
252
+ }
253
+ };
254
+ var ElevationCostsSchema = {
255
+ description: `Different elevation cost profiles for street routing.
256
+ Using a elevation cost profile will prefer routes with a smaller incline and smaller difference in elevation, even if the routed way is longer.
257
+
258
+ - \`NONE\`: Ignore elevation data for routing. This is the default behavior
259
+ - \`LOW\`: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller.
260
+ - \`HIGH\`: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller.
261
+ `,
262
+ type: "string",
263
+ enum: ["NONE", "LOW", "HIGH"]
264
+ };
265
+ var PedestrianProfileSchema = {
266
+ description: "Different accessibility profiles for pedestrians.",
267
+ type: "string",
268
+ enum: ["FOOT", "WHEELCHAIR"]
269
+ };
270
+ var PedestrianSpeedSchema = {
271
+ description: "Average speed for pedestrian routing in meters per second",
272
+ type: "number"
273
+ };
274
+ var CyclingSpeedSchema = {
275
+ description: "Average speed for bike routing in meters per second",
276
+ type: "number"
277
+ };
278
+ var ModeSchema = {
279
+ description: `# Street modes
280
+
281
+ - \`WALK\`
282
+ - \`BIKE\`
283
+ - \`RENTAL\` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs.
284
+ - \`CAR\`
285
+ - \`CAR_PARKING\` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs.
286
+ - \`CAR_DROPOFF\` Experimental. Expect unannounced breaking changes (without version bumps) for all perameters and returned structs.
287
+ - \`ODM\` on-demand taxis from the Prima+\xD6V Project
288
+ - \`FLEX\` flexible transports
289
+
290
+ # Transit modes
291
+
292
+ - \`TRANSIT\`: translates to \`RAIL,TRAM,BUS,FERRY,AIRPLANE,COACH,CABLE_CAR,FUNICULAR,AREAL_LIFT,OTHER\`
293
+ - \`TRAM\`: trams
294
+ - \`SUBWAY\`: subway trains
295
+ - \`FERRY\`: ferries
296
+ - \`AIRPLANE\`: airline flights
297
+ - \`BUS\`: short distance buses (does not include \`COACH\`)
298
+ - \`COACH\`: long distance buses (does not include \`BUS\`)
299
+ - \`RAIL\`: translates to \`HIGHSPEED_RAIL,LONG_DISTANCE,NIGHT_RAIL,REGIONAL_RAIL,REGIONAL_FAST_RAIL,METRO,SUBWAY\`
300
+ - \`METRO\`: metro trains
301
+ - \`HIGHSPEED_RAIL\`: long distance high speed trains (e.g. TGV)
302
+ - \`LONG_DISTANCE\`: long distance inter city trains
303
+ - \`NIGHT_RAIL\`: long distance night trains
304
+ - \`REGIONAL_FAST_RAIL\`: regional express routes that skip low traffic stops to be faster
305
+ - \`REGIONAL_RAIL\`: regional train
306
+ - \`CABLE_CAR\`: Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco).
307
+ - \`FUNICULAR\`: Funicular. Any rail system designed for steep inclines.
308
+ - \`AREAL_LIFT\`: Aerial lift, suspended cable car (e.g., gondola lift, aerial tramway). Cable transport where cabins, cars, gondolas or open chairs are suspended by means of one or more cables.
309
+ `,
310
+ type: "string",
311
+ enum: ["WALK", "BIKE", "RENTAL", "CAR", "CAR_PARKING", "CAR_DROPOFF", "ODM", "FLEX", "TRANSIT", "TRAM", "SUBWAY", "FERRY", "AIRPLANE", "METRO", "BUS", "COACH", "RAIL", "HIGHSPEED_RAIL", "LONG_DISTANCE", "NIGHT_RAIL", "REGIONAL_FAST_RAIL", "REGIONAL_RAIL", "CABLE_CAR", "FUNICULAR", "AREAL_LIFT", "OTHER"]
312
+ };
313
+ var VertexTypeSchema = {
314
+ type: "string",
315
+ description: `- \`NORMAL\` - latitude / longitude coordinate or address
316
+ - \`BIKESHARE\` - bike sharing station
317
+ - \`TRANSIT\` - transit stop
318
+ `,
319
+ enum: ["NORMAL", "BIKESHARE", "TRANSIT"]
320
+ };
321
+ var PickupDropoffTypeSchema = {
322
+ type: "string",
323
+ description: `- \`NORMAL\` - entry/exit is possible normally
324
+ - \`NOT_ALLOWED\` - entry/exit is not allowed
325
+ `,
326
+ enum: ["NORMAL", "NOT_ALLOWED"]
327
+ };
328
+ var PlaceSchema = {
329
+ type: "object",
330
+ required: ["name", "lat", "lon", "level"],
331
+ properties: {
332
+ name: {
333
+ description: "name of the transit stop / PoI / address",
334
+ type: "string"
335
+ },
336
+ stopId: {
337
+ description: "The ID of the stop. This is often something that users don't care about.",
338
+ type: "string"
339
+ },
340
+ lat: {
341
+ description: "latitude",
342
+ type: "number"
343
+ },
344
+ lon: {
345
+ description: "longitude",
346
+ type: "number"
347
+ },
348
+ level: {
349
+ description: "level according to OpenStreetMap",
350
+ type: "number"
351
+ },
352
+ tz: {
353
+ description: 'timezone name (e.g. "Europe/Berlin")',
354
+ type: "string"
355
+ },
356
+ arrival: {
357
+ description: "arrival time",
358
+ type: "string",
359
+ format: "date-time"
360
+ },
361
+ departure: {
362
+ description: "departure time",
363
+ type: "string",
364
+ format: "date-time"
365
+ },
366
+ scheduledArrival: {
367
+ description: "scheduled arrival time",
368
+ type: "string",
369
+ format: "date-time"
370
+ },
371
+ scheduledDeparture: {
372
+ description: "scheduled departure time",
373
+ type: "string",
374
+ format: "date-time"
375
+ },
376
+ scheduledTrack: {
377
+ description: "scheduled track from the static schedule timetable dataset",
378
+ type: "string"
379
+ },
380
+ track: {
381
+ description: `The current track/platform information, updated with real-time updates if available.
382
+ Can be missing if neither real-time updates nor the schedule timetable contains track information.
383
+ `,
384
+ type: "string"
385
+ },
386
+ description: {
387
+ description: "description of the location that provides more detailed information",
388
+ type: "string"
389
+ },
390
+ vertexType: {
391
+ "$ref": "#/components/schemas/VertexType"
392
+ },
393
+ pickupType: {
394
+ description: "Type of pickup. It could be disallowed due to schedule, skipped stops or cancellations.",
395
+ "$ref": "#/components/schemas/PickupDropoffType"
396
+ },
397
+ dropoffType: {
398
+ description: "Type of dropoff. It could be disallowed due to schedule, skipped stops or cancellations.",
399
+ "$ref": "#/components/schemas/PickupDropoffType"
400
+ },
401
+ cancelled: {
402
+ description: "Whether this stop is cancelled due to the realtime situation.",
403
+ type: "boolean"
404
+ },
405
+ alerts: {
406
+ description: "Alerts for this stop.",
407
+ type: "array",
408
+ items: {
409
+ "$ref": "#/components/schemas/Alert"
410
+ }
411
+ },
412
+ flex: {
413
+ description: "for `FLEX` transports, the flex location area or location group name",
414
+ type: "string"
415
+ },
416
+ flexId: {
417
+ description: "for `FLEX` transports, the flex location area ID or location group ID",
418
+ type: "string"
419
+ },
420
+ flexStartPickupDropOffWindow: {
421
+ description: "Time that on-demand service becomes available",
422
+ type: "string",
423
+ format: "date-time"
424
+ },
425
+ flexEndPickupDropOffWindow: {
426
+ description: "Time that on-demand service ends",
427
+ type: "string",
428
+ format: "date-time"
429
+ }
430
+ }
431
+ };
432
+ var ReachablePlaceSchema = {
433
+ description: "Place reachable by One-to-All",
434
+ type: "object",
435
+ properties: {
436
+ place: {
437
+ "$ref": "#/components/schemas/Place",
438
+ description: "Place reached by One-to-All"
439
+ },
440
+ duration: {
441
+ type: "integer",
442
+ description: "Total travel duration"
443
+ },
444
+ k: {
445
+ type: "integer",
446
+ description: `k is the smallest number, for which a journey with the shortest duration and at most k-1 transfers exist.
447
+ You can think of k as the number of connections used.
448
+
449
+ In more detail:
450
+
451
+ k=0: No connection, e.g. for the one location
452
+ k=1: Direct connection
453
+ k=2: Connection with 1 transfer
454
+ `
455
+ }
456
+ }
457
+ };
458
+ var ReachableSchema = {
459
+ description: "Object containing all reachable places by One-to-All search",
460
+ type: "object",
461
+ properties: {
462
+ one: {
463
+ "$ref": "#/components/schemas/Place",
464
+ description: "One location used in One-to-All search"
465
+ },
466
+ all: {
467
+ description: "List of locations reachable by One-to-All",
468
+ type: "array",
469
+ items: {
470
+ "$ref": "#/components/schemas/ReachablePlace"
471
+ }
472
+ }
473
+ }
474
+ };
475
+ var StopTimeSchema = {
476
+ description: "departure or arrival event at a stop",
477
+ type: "object",
478
+ required: ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"],
479
+ properties: {
480
+ place: {
481
+ "$ref": "#/components/schemas/Place",
482
+ description: "information about the stop place and time"
483
+ },
484
+ mode: {
485
+ "$ref": "#/components/schemas/Mode",
486
+ description: "Transport mode for this leg"
487
+ },
488
+ realTime: {
489
+ description: "Whether there is real-time data about this leg",
490
+ type: "boolean"
491
+ },
492
+ headsign: {
493
+ description: `The headsign of the bus or train being used.
494
+ For non-transit legs, null
495
+ `,
496
+ type: "string"
497
+ },
498
+ tripTo: {
499
+ description: "final stop of this trip",
500
+ "$ref": "#/components/schemas/Place"
501
+ },
502
+ agencyId: {
503
+ type: "string"
504
+ },
505
+ agencyName: {
506
+ type: "string"
507
+ },
508
+ agencyUrl: {
509
+ type: "string"
510
+ },
511
+ routeColor: {
512
+ type: "string"
513
+ },
514
+ routeTextColor: {
515
+ type: "string"
516
+ },
517
+ tripId: {
518
+ type: "string"
519
+ },
520
+ routeType: {
521
+ type: "integer"
522
+ },
523
+ routeShortName: {
524
+ type: "string"
525
+ },
526
+ routeLongName: {
527
+ type: "string"
528
+ },
529
+ tripShortName: {
530
+ type: "string"
531
+ },
532
+ displayName: {
533
+ type: "string"
534
+ },
535
+ previousStops: {
536
+ type: "array",
537
+ description: `Experimental. Expect unannounced breaking changes (without version bumps).
538
+
539
+ Stops on the trips before this stop. Returned only if \`fetchStop\` and \`arriveBy\` are \`true\`.
540
+ `,
541
+ items: {
542
+ "$ref": "#/components/schemas/Place"
543
+ }
544
+ },
545
+ nextStops: {
546
+ type: "array",
547
+ description: `Experimental. Expect unannounced breaking changes (without version bumps).
548
+
549
+ Stops on the trips after this stop. Returned only if \`fetchStop\` is \`true\` and \`arriveBy\` is \`false\`.
550
+ `,
551
+ items: {
552
+ "$ref": "#/components/schemas/Place"
553
+ }
554
+ },
555
+ pickupDropoffType: {
556
+ description: "Type of pickup (for departures) or dropoff (for arrivals), may be disallowed either due to schedule, skipped stops or cancellations",
557
+ "$ref": "#/components/schemas/PickupDropoffType"
558
+ },
559
+ cancelled: {
560
+ description: "Whether the departure/arrival is cancelled due to the realtime situation (either because the stop is skipped or because the entire trip is cancelled).",
561
+ type: "boolean"
562
+ },
563
+ tripCancelled: {
564
+ description: "Whether the entire trip is cancelled due to the realtime situation.",
565
+ type: "boolean"
566
+ },
567
+ source: {
568
+ description: "Filename and line number where this trip is from",
569
+ type: "string"
570
+ }
571
+ }
572
+ };
573
+ var TripInfoSchema = {
574
+ description: "trip id and name",
575
+ type: "object",
576
+ required: ["tripId"],
577
+ properties: {
578
+ tripId: {
579
+ description: "trip ID (dataset trip id prefixed with the dataset tag)",
580
+ type: "string"
581
+ },
582
+ routeShortName: {
583
+ description: "trip display name (api version < 4)",
584
+ type: "string"
585
+ },
586
+ displayName: {
587
+ description: "trip display name (api version >= 4)",
588
+ type: "string"
589
+ }
590
+ }
591
+ };
592
+ var TripSegmentSchema = {
593
+ description: "trip segment between two stops to show a trip on a map",
594
+ type: "object",
595
+ required: ["trips", "mode", "distance", "from", "to", "departure", "arrival", "scheduledArrival", "scheduledDeparture", "realTime", "polyline"],
596
+ properties: {
597
+ trips: {
598
+ type: "array",
599
+ items: {
600
+ "$ref": "#/components/schemas/TripInfo"
601
+ }
602
+ },
603
+ routeColor: {
604
+ type: "string"
605
+ },
606
+ mode: {
607
+ "$ref": "#/components/schemas/Mode",
608
+ description: "Transport mode for this leg"
609
+ },
610
+ distance: {
611
+ type: "number",
612
+ description: "distance in meters"
613
+ },
614
+ from: {
615
+ "$ref": "#/components/schemas/Place"
616
+ },
617
+ to: {
618
+ "$ref": "#/components/schemas/Place"
619
+ },
620
+ departure: {
621
+ description: "departure time",
622
+ type: "string",
623
+ format: "date-time"
624
+ },
625
+ arrival: {
626
+ description: "arrival time",
627
+ type: "string",
628
+ format: "date-time"
629
+ },
630
+ scheduledDeparture: {
631
+ description: "scheduled departure time",
632
+ type: "string",
633
+ format: "date-time"
634
+ },
635
+ scheduledArrival: {
636
+ description: "scheduled arrival time",
637
+ type: "string",
638
+ format: "date-time"
639
+ },
640
+ realTime: {
641
+ description: "Whether there is real-time data about this leg",
642
+ type: "boolean"
643
+ },
644
+ polyline: {
645
+ description: "Google polyline encoded coordinate sequence (with precision 5) where the trip travels on this segment.",
646
+ type: "string"
647
+ }
648
+ }
649
+ };
650
+ var DirectionSchema = {
651
+ type: "string",
652
+ enum: ["DEPART", "HARD_LEFT", "LEFT", "SLIGHTLY_LEFT", "CONTINUE", "SLIGHTLY_RIGHT", "RIGHT", "HARD_RIGHT", "CIRCLE_CLOCKWISE", "CIRCLE_COUNTERCLOCKWISE", "STAIRS", "ELEVATOR", "UTURN_LEFT", "UTURN_RIGHT"]
653
+ };
654
+ var EncodedPolylineSchema = {
655
+ type: "object",
656
+ required: ["points", "precision", "length"],
657
+ properties: {
658
+ points: {
659
+ description: "The encoded points of the polyline using the Google polyline encoding.",
660
+ type: "string"
661
+ },
662
+ precision: {
663
+ description: `The precision of the returned polyline (7 for /v1, 6 for /v2)
664
+ Be aware that with precision 7, coordinates with |longitude| > 107.37 are undefined/will overflow.
665
+ `,
666
+ type: "integer"
667
+ },
668
+ length: {
669
+ description: "The number of points in the string",
670
+ type: "integer",
671
+ minimum: 0
672
+ }
673
+ }
674
+ };
675
+ var StepInstructionSchema = {
676
+ type: "object",
677
+ required: ["fromLevel", "toLevel", "polyline", "relativeDirection", "distance", "streetName", "exit", "stayOn", "area"],
678
+ properties: {
679
+ relativeDirection: {
680
+ "$ref": "#/components/schemas/Direction"
681
+ },
682
+ distance: {
683
+ description: "The distance in meters that this step takes.",
684
+ type: "number"
685
+ },
686
+ fromLevel: {
687
+ description: "level where this segment starts, based on OpenStreetMap data",
688
+ type: "number"
689
+ },
690
+ toLevel: {
691
+ description: "level where this segment starts, based on OpenStreetMap data",
692
+ type: "number"
693
+ },
694
+ osmWay: {
695
+ description: "OpenStreetMap way index",
696
+ type: "integer"
697
+ },
698
+ polyline: {
699
+ "$ref": "#/components/schemas/EncodedPolyline"
700
+ },
701
+ streetName: {
702
+ description: "The name of the street.",
703
+ type: "string"
704
+ },
705
+ exit: {
706
+ description: `Not implemented!
707
+ When exiting a highway or traffic circle, the exit name/number.
708
+ `,
709
+ type: "string"
710
+ },
711
+ stayOn: {
712
+ description: `Not implemented!
713
+ Indicates whether or not a street changes direction at an intersection.
714
+ `,
715
+ type: "boolean"
716
+ },
717
+ area: {
718
+ description: `Not implemented!
719
+ This step is on an open area, such as a plaza or train platform,
720
+ and thus the directions should say something like "cross"
721
+ `,
722
+ type: "boolean"
723
+ },
724
+ toll: {
725
+ description: "Indicates that a fee must be paid by general traffic to use a road, road bridge or road tunnel.",
726
+ type: "boolean"
727
+ },
728
+ accessRestriction: {
729
+ description: `Experimental. Indicates whether access to this part of the route is restricted.
730
+ See: https://wiki.openstreetmap.org/wiki/Conditional_restrictions
731
+ `,
732
+ type: "string"
733
+ },
734
+ elevationUp: {
735
+ type: "integer",
736
+ description: "incline in meters across this path segment"
737
+ },
738
+ elevationDown: {
739
+ type: "integer",
740
+ description: "decline in meters across this path segment"
741
+ }
742
+ }
743
+ };
744
+ var RentalFormFactorSchema = {
745
+ type: "string",
746
+ enum: ["BICYCLE", "CARGO_BICYCLE", "CAR", "MOPED", "SCOOTER_STANDING", "SCOOTER_SEATED", "OTHER"]
747
+ };
748
+ var RentalPropulsionTypeSchema = {
749
+ type: "string",
750
+ enum: ["HUMAN", "ELECTRIC_ASSIST", "ELECTRIC", "COMBUSTION", "COMBUSTION_DIESEL", "HYBRID", "PLUG_IN_HYBRID", "HYDROGEN_FUEL_CELL"]
751
+ };
752
+ var RentalReturnConstraintSchema = {
753
+ type: "string",
754
+ enum: ["NONE", "ANY_STATION", "ROUNDTRIP_STATION"]
755
+ };
756
+ var RentalSchema = {
757
+ description: "Vehicle rental",
758
+ type: "object",
759
+ required: ["systemId"],
760
+ properties: {
761
+ systemId: {
762
+ type: "string",
763
+ description: "Vehicle share system ID"
764
+ },
765
+ systemName: {
766
+ type: "string",
767
+ description: "Vehicle share system name"
768
+ },
769
+ url: {
770
+ type: "string",
771
+ description: "URL of the vehicle share system"
772
+ },
773
+ stationName: {
774
+ type: "string",
775
+ description: "Name of the station"
776
+ },
777
+ fromStationName: {
778
+ type: "string",
779
+ description: "Name of the station where the vehicle is picked up (empty for free floating vehicles)"
780
+ },
781
+ toStationName: {
782
+ type: "string",
783
+ description: "Name of the station where the vehicle is returned (empty for free floating vehicles)"
784
+ },
785
+ rentalUriAndroid: {
786
+ type: "string",
787
+ description: "Rental URI for Android (deep link to the specific station or vehicle)"
788
+ },
789
+ rentalUriIOS: {
790
+ type: "string",
791
+ description: "Rental URI for iOS (deep link to the specific station or vehicle)"
792
+ },
793
+ rentalUriWeb: {
794
+ type: "string",
795
+ description: "Rental URI for web (deep link to the specific station or vehicle)"
796
+ },
797
+ formFactor: {
798
+ "$ref": "#/components/schemas/RentalFormFactor"
799
+ },
800
+ propulsionType: {
801
+ "$ref": "#/components/schemas/RentalPropulsionType"
802
+ },
803
+ returnConstraint: {
804
+ "$ref": "#/components/schemas/RentalReturnConstraint"
805
+ }
806
+ }
807
+ };
808
+ var LegSchema = {
809
+ type: "object",
810
+ required: ["mode", "startTime", "endTime", "scheduledStartTime", "scheduledEndTime", "realTime", "scheduled", "duration", "from", "to", "legGeometry"],
811
+ properties: {
812
+ mode: {
813
+ "$ref": "#/components/schemas/Mode",
814
+ description: "Transport mode for this leg"
815
+ },
816
+ from: {
817
+ "$ref": "#/components/schemas/Place"
818
+ },
819
+ to: {
820
+ "$ref": "#/components/schemas/Place"
821
+ },
822
+ duration: {
823
+ description: `Leg duration in seconds
824
+
825
+ If leg is footpath:
826
+ The footpath duration is derived from the default footpath
827
+ duration using the query parameters \`transferTimeFactor\` and
828
+ \`additionalTransferTime\` as follows:
829
+ \`leg.duration = defaultDuration * transferTimeFactor + additionalTransferTime.\`
830
+ In case the defaultDuration is needed, it can be calculated by
831
+ \`defaultDuration = (leg.duration - additionalTransferTime) / transferTimeFactor\`.
832
+ Note that the default values are \`transferTimeFactor = 1\` and
833
+ \`additionalTransferTime = 0\` in case they are not explicitly
834
+ provided in the query.
835
+ `,
836
+ type: "integer"
837
+ },
838
+ startTime: {
839
+ type: "string",
840
+ format: "date-time",
841
+ description: "leg departure time"
842
+ },
843
+ endTime: {
844
+ type: "string",
845
+ format: "date-time",
846
+ description: "leg arrival time"
847
+ },
848
+ scheduledStartTime: {
849
+ type: "string",
850
+ format: "date-time",
851
+ description: "scheduled leg departure time"
852
+ },
853
+ scheduledEndTime: {
854
+ type: "string",
855
+ format: "date-time",
856
+ description: "scheduled leg arrival time"
857
+ },
858
+ realTime: {
859
+ description: "Whether there is real-time data about this leg",
860
+ type: "boolean"
861
+ },
862
+ scheduled: {
863
+ description: `Whether this leg was originally scheduled to run or is an additional service.
864
+ Scheduled times will equal realtime times in this case.
865
+ `,
866
+ type: "boolean"
867
+ },
868
+ distance: {
869
+ description: "For non-transit legs the distance traveled while traversing this leg in meters.",
870
+ type: "number"
871
+ },
872
+ interlineWithPreviousLeg: {
873
+ description: "For transit legs, if the rider should stay on the vehicle as it changes route names.",
874
+ type: "boolean"
875
+ },
876
+ headsign: {
877
+ description: `For transit legs, the headsign of the bus or train being used.
878
+ For non-transit legs, null
879
+ `,
880
+ type: "string"
881
+ },
882
+ tripTo: {
883
+ description: "final stop of this trip (can differ from headsign)",
884
+ "$ref": "#/components/schemas/Place"
885
+ },
886
+ routeColor: {
887
+ type: "string"
888
+ },
889
+ routeTextColor: {
890
+ type: "string"
891
+ },
892
+ routeType: {
893
+ type: "integer"
894
+ },
895
+ agencyName: {
896
+ type: "string"
897
+ },
898
+ agencyUrl: {
899
+ type: "string"
900
+ },
901
+ agencyId: {
902
+ type: "string"
903
+ },
904
+ tripId: {
905
+ type: "string"
906
+ },
907
+ routeShortName: {
908
+ type: "string"
909
+ },
910
+ routeLongName: {
911
+ type: "string"
912
+ },
913
+ tripShortName: {
914
+ type: "string"
915
+ },
916
+ displayName: {
917
+ type: "string"
918
+ },
919
+ cancelled: {
920
+ description: "Whether this trip is cancelled",
921
+ type: "boolean"
922
+ },
923
+ source: {
924
+ description: "Filename and line number where this trip is from",
925
+ type: "string"
926
+ },
927
+ intermediateStops: {
928
+ description: `For transit legs, intermediate stops between the Place where the leg originates
929
+ and the Place where the leg ends. For non-transit legs, null.
930
+ `,
931
+ type: "array",
932
+ items: {
933
+ "$ref": "#/components/schemas/Place"
934
+ }
935
+ },
936
+ legGeometry: {
937
+ "$ref": "#/components/schemas/EncodedPolyline"
938
+ },
939
+ steps: {
940
+ description: `A series of turn by turn instructions
941
+ used for walking, biking and driving.
942
+ `,
943
+ type: "array",
944
+ items: {
945
+ "$ref": "#/components/schemas/StepInstruction"
946
+ }
947
+ },
948
+ rental: {
949
+ "$ref": "#/components/schemas/Rental"
950
+ },
951
+ fareTransferIndex: {
952
+ type: "integer",
953
+ description: `Index into \`Itinerary.fareTransfers\` array
954
+ to identify which fare transfer this leg belongs to
955
+ `
956
+ },
957
+ effectiveFareLegIndex: {
958
+ type: "integer",
959
+ description: `Index into the \`Itinerary.fareTransfers[fareTransferIndex].effectiveFareLegProducts\` array
960
+ to identify which effective fare leg this itinerary leg belongs to
961
+ `
962
+ },
963
+ alerts: {
964
+ description: "Alerts for this stop.",
965
+ type: "array",
966
+ items: {
967
+ "$ref": "#/components/schemas/Alert"
968
+ }
969
+ },
970
+ loopedCalendarSince: {
971
+ description: `If set, this attribute indicates that this trip has been expanded
972
+ beyond the feed end date (enabled by config flag \`timetable.dataset.extend_calendar\`)
973
+ by looping active weekdays, e.g. from calendar.txt in GTFS.
974
+ `,
975
+ type: "string",
976
+ format: "date-time"
977
+ }
978
+ }
979
+ };
980
+ var RiderCategorySchema = {
981
+ type: "object",
982
+ required: ["riderCategoryName", "isDefaultFareCategory"],
983
+ properties: {
984
+ riderCategoryName: {
985
+ description: "Rider category name as displayed to the rider.",
986
+ type: "string"
987
+ },
988
+ isDefaultFareCategory: {
989
+ description: "Specifies if this category should be considered the default (i.e. the main category displayed to riders).",
990
+ type: "boolean"
991
+ },
992
+ eligibilityUrl: {
993
+ description: "URL to a web page providing detailed information about the rider category and/or its eligibility criteria.",
994
+ type: "string"
995
+ }
996
+ }
997
+ };
998
+ var FareMediaTypeSchema = {
999
+ type: "string",
1000
+ enum: ["NONE", "PAPER_TICKET", "TRANSIT_CARD", "CONTACTLESS_EMV", "MOBILE_APP"],
1001
+ description: `- \`NONE\`: No fare media involved (e.g., cash payment)
1002
+ - \`PAPER_TICKET\`: Physical paper ticket
1003
+ - \`TRANSIT_CARD\`: Physical transit card with stored value
1004
+ - \`CONTACTLESS_EMV\`: cEMV (contactless payment)
1005
+ - \`MOBILE_APP\`: Mobile app with virtual transit cards/passes
1006
+ `
1007
+ };
1008
+ var FareMediaSchema = {
1009
+ type: "object",
1010
+ required: ["fareMediaType"],
1011
+ properties: {
1012
+ fareMediaName: {
1013
+ description: "Name of the fare media. Required for transit cards and mobile apps.",
1014
+ type: "string"
1015
+ },
1016
+ fareMediaType: {
1017
+ description: "The type of fare media.",
1018
+ "$ref": "#/components/schemas/FareMediaType"
1019
+ }
1020
+ }
1021
+ };
1022
+ var FareProductSchema = {
1023
+ type: "object",
1024
+ required: ["name", "amount", "currency"],
1025
+ properties: {
1026
+ name: {
1027
+ description: "The name of the fare product as displayed to riders.",
1028
+ type: "string"
1029
+ },
1030
+ amount: {
1031
+ description: "The cost of the fare product. May be negative to represent transfer discounts. May be zero to represent a fare product that is free.",
1032
+ type: "number"
1033
+ },
1034
+ currency: {
1035
+ description: "ISO 4217 currency code. The currency of the cost of the fare product.",
1036
+ type: "string"
1037
+ },
1038
+ riderCategory: {
1039
+ "$ref": "#/components/schemas/RiderCategory"
1040
+ },
1041
+ media: {
1042
+ "$ref": "#/components/schemas/FareMedia"
1043
+ }
1044
+ }
1045
+ };
1046
+ var FareTransferRuleSchema = {
1047
+ type: "string",
1048
+ enum: ["A_AB", "A_AB_B", "AB"]
1049
+ };
1050
+ var FareTransferSchema = {
1051
+ type: "object",
1052
+ description: `The concept is derived from: https://gtfs.org/documentation/schedule/reference/#fare_transfer_rulestxt
1053
+
1054
+ Terminology:
1055
+ - **Leg**: An itinerary leg as described by the \`Leg\` type of this API description.
1056
+ - **Effective Fare Leg**: Itinerary legs can be joined together to form one *effective fare leg*.
1057
+ - **Fare Transfer**: A fare transfer groups two or more effective fare legs.
1058
+ - **A** is the first *effective fare leg* of potentially multiple consecutive legs contained in a fare transfer
1059
+ - **B** is any *effective fare leg* following the first *effective fare leg* in this transfer
1060
+ - **AB** are all changes between *effective fare legs* contained in this transfer
1061
+
1062
+ The fare transfer rule is used to derive the final set of products of the itinerary legs contained in this transfer:
1063
+ - 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.
1064
+ - 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)
1065
+ - 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.
1066
+
1067
+ An itinerary \`Leg\` references the index of the fare transfer and the index of the effective fare leg in this transfer it belongs to.
1068
+ `,
1069
+ required: ["effectiveFareLegProducts"],
1070
+ properties: {
1071
+ rule: {
1072
+ "$ref": "#/components/schemas/FareTransferRule"
1073
+ },
1074
+ transferProducts: {
1075
+ type: "array",
1076
+ items: {
1077
+ "$ref": "#/components/schemas/FareProduct"
1078
+ }
1079
+ },
1080
+ effectiveFareLegProducts: {
1081
+ description: `Lists all valid fare products for the effective fare legs.
1082
+ This is an \`array<array<FareProduct>>\` where the inner array
1083
+ lists all possible fare products that would cover this effective fare leg.
1084
+ Each "effective fare leg" can have multiple options for adult/child/weekly/monthly/day/one-way tickets etc.
1085
+ 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\`)
1086
+ and the inner array as OR (you can choose which ticket to buy)
1087
+ `,
1088
+ type: "array",
1089
+ items: {
1090
+ type: "array",
1091
+ items: {
1092
+ type: "array",
1093
+ items: {
1094
+ "$ref": "#/components/schemas/FareProduct"
1095
+ }
1096
+ }
1097
+ }
1098
+ }
1099
+ }
1100
+ };
1101
+ var ItinerarySchema = {
1102
+ type: "object",
1103
+ required: ["duration", "startTime", "endTime", "transfers", "legs"],
1104
+ properties: {
1105
+ duration: {
1106
+ description: "journey duration in seconds",
1107
+ type: "integer"
1108
+ },
1109
+ startTime: {
1110
+ type: "string",
1111
+ format: "date-time",
1112
+ description: "journey departure time"
1113
+ },
1114
+ endTime: {
1115
+ type: "string",
1116
+ format: "date-time",
1117
+ description: "journey arrival time"
1118
+ },
1119
+ transfers: {
1120
+ type: "integer",
1121
+ description: "The number of transfers this trip has."
1122
+ },
1123
+ legs: {
1124
+ description: "Journey legs",
1125
+ type: "array",
1126
+ items: {
1127
+ "$ref": "#/components/schemas/Leg"
1128
+ }
1129
+ },
1130
+ fareTransfers: {
1131
+ description: "Fare information",
1132
+ type: "array",
1133
+ items: {
1134
+ "$ref": "#/components/schemas/FareTransfer"
1135
+ }
1136
+ }
1137
+ }
1138
+ };
1139
+ var TransferSchema = {
1140
+ description: "transfer from one location to another",
1141
+ type: "object",
1142
+ required: ["to"],
1143
+ properties: {
1144
+ to: {
1145
+ "$ref": "#/components/schemas/Place"
1146
+ },
1147
+ default: {
1148
+ type: "number",
1149
+ description: `optional; missing if the GTFS did not contain a transfer
1150
+ transfer duration in minutes according to GTFS (+heuristics)
1151
+ `
1152
+ },
1153
+ foot: {
1154
+ type: "number",
1155
+ description: `optional; missing if no path was found (timetable / osr)
1156
+ transfer duration in minutes for the foot profile
1157
+ `
1158
+ },
1159
+ footRouted: {
1160
+ type: "number",
1161
+ description: `optional; missing if no path was found with foot routing
1162
+ transfer duration in minutes for the foot profile
1163
+ `
1164
+ },
1165
+ wheelchair: {
1166
+ type: "number",
1167
+ description: `optional; missing if no path was found with the wheelchair profile
1168
+ transfer duration in minutes for the wheelchair profile
1169
+ `
1170
+ },
1171
+ wheelchairRouted: {
1172
+ type: "number",
1173
+ description: `optional; missing if no path was found with the wheelchair profile
1174
+ transfer duration in minutes for the wheelchair profile
1175
+ `
1176
+ },
1177
+ wheelchairUsesElevator: {
1178
+ type: "boolean",
1179
+ description: `optional; missing if no path was found with the wheelchair profile
1180
+ true if the wheelchair path uses an elevator
1181
+ `
1182
+ },
1183
+ car: {
1184
+ type: "number",
1185
+ description: `optional; missing if no path was found with car routing
1186
+ transfer duration in minutes for the car profile
1187
+ `
1188
+ }
1189
+ }
1190
+ };
1191
+
1192
+ export {
1193
+ AlertCauseSchema,
1194
+ AlertEffectSchema,
1195
+ AlertSeverityLevelSchema,
1196
+ TimeRangeSchema,
1197
+ AlertSchema,
1198
+ DurationSchema,
1199
+ AreaSchema,
1200
+ TokenSchema,
1201
+ LocationTypeSchema,
1202
+ MatchSchema,
1203
+ ElevationCostsSchema,
1204
+ PedestrianProfileSchema,
1205
+ PedestrianSpeedSchema,
1206
+ CyclingSpeedSchema,
1207
+ ModeSchema,
1208
+ VertexTypeSchema,
1209
+ PickupDropoffTypeSchema,
1210
+ PlaceSchema,
1211
+ ReachablePlaceSchema,
1212
+ ReachableSchema,
1213
+ StopTimeSchema,
1214
+ TripInfoSchema,
1215
+ TripSegmentSchema,
1216
+ DirectionSchema,
1217
+ EncodedPolylineSchema,
1218
+ StepInstructionSchema,
1219
+ RentalFormFactorSchema,
1220
+ RentalPropulsionTypeSchema,
1221
+ RentalReturnConstraintSchema,
1222
+ RentalSchema,
1223
+ LegSchema,
1224
+ RiderCategorySchema,
1225
+ FareMediaTypeSchema,
1226
+ FareMediaSchema,
1227
+ FareProductSchema,
1228
+ FareTransferRuleSchema,
1229
+ FareTransferSchema,
1230
+ ItinerarySchema,
1231
+ TransferSchema
1232
+ };