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