@motis-project/motis-client 2.0.92 → 2.1.2
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.
- package/dist/chunk-7PIP6KRC.js +1161 -0
- package/dist/chunk-IHFNO6R3.js +62 -62
- package/dist/chunk-RM52T2X5.js +917 -1056
- package/dist/index.d.ts +3 -128
- package/dist/index.js +103 -103
- package/dist/schemas.gen.d.ts +880 -1051
- package/dist/schemas.gen.js +75 -75
- package/dist/services.gen.d.ts +17 -85
- package/dist/services.gen.js +27 -27
- package/dist/types.gen.d.ts +1693 -1790
- package/dist/types.gen.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,1161 @@
|
|
|
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
|
+
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
|
+
};
|
|
250
|
+
var ElevationCostsSchema = {
|
|
251
|
+
description: `Different elevation cost profiles for street routing.
|
|
252
|
+
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
|
+
|
|
254
|
+
- \`NONE\`: Ignore elevation data for routing. This is the default behavior
|
|
255
|
+
- \`LOW\`: Add a low penalty for inclines. This will favor longer paths, if the elevation increase and incline are smaller.
|
|
256
|
+
- \`HIGH\`: Add a high penalty for inclines. This will favor even longer paths, if the elevation increase and incline are smaller.
|
|
257
|
+
`,
|
|
258
|
+
type: "string",
|
|
259
|
+
enum: ["NONE", "LOW", "HIGH"]
|
|
260
|
+
};
|
|
261
|
+
var PedestrianProfileSchema = {
|
|
262
|
+
description: "Different accessibility profiles for pedestrians.",
|
|
263
|
+
type: "string",
|
|
264
|
+
enum: ["FOOT", "WHEELCHAIR"]
|
|
265
|
+
};
|
|
266
|
+
var ModeSchema = {
|
|
267
|
+
description: `# Street modes
|
|
268
|
+
|
|
269
|
+
- \`WALK\`
|
|
270
|
+
- \`BIKE\`
|
|
271
|
+
- \`RENTAL\` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs.
|
|
272
|
+
- \`CAR\`
|
|
273
|
+
- \`CAR_PARKING\` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs.
|
|
274
|
+
- \`CAR_DROPOFF\` Experimental. Expect unannounced breaking changes (without version bumps) for all perameters and returned structs.
|
|
275
|
+
- \`ODM\` on-demand taxis from the Prima+\xD6V Project
|
|
276
|
+
- \`FLEX\` flexible transports
|
|
277
|
+
|
|
278
|
+
# Transit modes
|
|
279
|
+
|
|
280
|
+
- \`TRANSIT\`: translates to \`RAIL,TRAM,BUS,FERRY,AIRPLANE,COACH,CABLE_CAR,FUNICULAR,AREAL_LIFT,OTHER\`
|
|
281
|
+
- \`TRAM\`: trams
|
|
282
|
+
- \`SUBWAY\`: subway trains
|
|
283
|
+
- \`FERRY\`: ferries
|
|
284
|
+
- \`AIRPLANE\`: airline flights
|
|
285
|
+
- \`BUS\`: short distance buses (does not include \`COACH\`)
|
|
286
|
+
- \`COACH\`: long distance buses (does not include \`BUS\`)
|
|
287
|
+
- \`RAIL\`: translates to \`HIGHSPEED_RAIL,LONG_DISTANCE,NIGHT_RAIL,REGIONAL_RAIL,REGIONAL_FAST_RAIL,METRO,SUBWAY\`
|
|
288
|
+
- \`METRO\`: metro trains
|
|
289
|
+
- \`HIGHSPEED_RAIL\`: long distance high speed trains (e.g. TGV)
|
|
290
|
+
- \`LONG_DISTANCE\`: long distance inter city trains
|
|
291
|
+
- \`NIGHT_RAIL\`: long distance night trains
|
|
292
|
+
- \`REGIONAL_FAST_RAIL\`: regional express routes that skip low traffic stops to be faster
|
|
293
|
+
- \`REGIONAL_RAIL\`: regional train
|
|
294
|
+
- \`CABLE_CAR\`: Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco).
|
|
295
|
+
- \`FUNICULAR\`: Funicular. Any rail system designed for steep inclines.
|
|
296
|
+
- \`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
|
+
`,
|
|
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"]
|
|
300
|
+
};
|
|
301
|
+
var VertexTypeSchema = {
|
|
302
|
+
type: "string",
|
|
303
|
+
description: `- \`NORMAL\` - latitude / longitude coordinate or address
|
|
304
|
+
- \`BIKESHARE\` - bike sharing station
|
|
305
|
+
- \`TRANSIT\` - transit stop
|
|
306
|
+
`,
|
|
307
|
+
enum: ["NORMAL", "BIKESHARE", "TRANSIT"]
|
|
308
|
+
};
|
|
309
|
+
var PickupDropoffTypeSchema = {
|
|
310
|
+
type: "string",
|
|
311
|
+
description: `- \`NORMAL\` - entry/exit is possible normally
|
|
312
|
+
- \`NOT_ALLOWED\` - entry/exit is not allowed
|
|
313
|
+
`,
|
|
314
|
+
enum: ["NORMAL", "NOT_ALLOWED"]
|
|
315
|
+
};
|
|
316
|
+
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.
|
|
366
|
+
Can be missing if neither real-time updates nor the schedule timetable contains track information.
|
|
367
|
+
`,
|
|
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
|
+
}
|
|
415
|
+
};
|
|
416
|
+
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.
|
|
431
|
+
You can think of k as the number of connections used.
|
|
432
|
+
|
|
433
|
+
In more detail:
|
|
434
|
+
|
|
435
|
+
k=0: No connection, e.g. for the one location
|
|
436
|
+
k=1: Direct connection
|
|
437
|
+
k=2: Connection with 1 transfer
|
|
438
|
+
`
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
};
|
|
442
|
+
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
|
+
}
|
|
458
|
+
};
|
|
459
|
+
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.
|
|
478
|
+
For non-transit legs, null
|
|
479
|
+
`,
|
|
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
|
+
}
|
|
520
|
+
};
|
|
521
|
+
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
|
+
}
|
|
535
|
+
};
|
|
536
|
+
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
|
+
}
|
|
593
|
+
};
|
|
594
|
+
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"]
|
|
597
|
+
};
|
|
598
|
+
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)
|
|
608
|
+
Be aware that with precision 7, coordinates with |longitude| > 107.37 are undefined/will overflow.
|
|
609
|
+
`,
|
|
610
|
+
type: "integer"
|
|
611
|
+
},
|
|
612
|
+
length: {
|
|
613
|
+
description: "The number of points in the string",
|
|
614
|
+
type: "integer",
|
|
615
|
+
minimum: 0
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
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!
|
|
651
|
+
When exiting a highway or traffic circle, the exit name/number.
|
|
652
|
+
`,
|
|
653
|
+
type: "string"
|
|
654
|
+
},
|
|
655
|
+
stayOn: {
|
|
656
|
+
description: `Not implemented!
|
|
657
|
+
Indicates whether or not a street changes direction at an intersection.
|
|
658
|
+
`,
|
|
659
|
+
type: "boolean"
|
|
660
|
+
},
|
|
661
|
+
area: {
|
|
662
|
+
description: `Not implemented!
|
|
663
|
+
This step is on an open area, such as a plaza or train platform,
|
|
664
|
+
and thus the directions should say something like "cross"
|
|
665
|
+
`,
|
|
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.
|
|
674
|
+
See: https://wiki.openstreetmap.org/wiki/Conditional_restrictions
|
|
675
|
+
`,
|
|
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
|
+
}
|
|
687
|
+
};
|
|
688
|
+
var RentalFormFactorSchema = {
|
|
689
|
+
type: "string",
|
|
690
|
+
enum: ["BICYCLE", "CARGO_BICYCLE", "CAR", "MOPED", "SCOOTER_STANDING", "SCOOTER_SEATED", "OTHER"]
|
|
691
|
+
};
|
|
692
|
+
var RentalPropulsionTypeSchema = {
|
|
693
|
+
type: "string",
|
|
694
|
+
enum: ["HUMAN", "ELECTRIC_ASSIST", "ELECTRIC", "COMBUSTION", "COMBUSTION_DIESEL", "HYBRID", "PLUG_IN_HYBRID", "HYDROGEN_FUEL_CELL"]
|
|
695
|
+
};
|
|
696
|
+
var RentalReturnConstraintSchema = {
|
|
697
|
+
type: "string",
|
|
698
|
+
enum: ["NONE", "ANY_STATION", "ROUNDTRIP_STATION"]
|
|
699
|
+
};
|
|
700
|
+
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
|
+
}
|
|
751
|
+
};
|
|
752
|
+
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
|
|
768
|
+
|
|
769
|
+
If leg is footpath:
|
|
770
|
+
The footpath duration is derived from the default footpath
|
|
771
|
+
duration using the query parameters \`transferTimeFactor\` and
|
|
772
|
+
\`additionalTransferTime\` as follows:
|
|
773
|
+
\`leg.duration = defaultDuration * transferTimeFactor + additionalTransferTime.\`
|
|
774
|
+
In case the defaultDuration is needed, it can be calculated by
|
|
775
|
+
\`defaultDuration = (leg.duration - additionalTransferTime) / transferTimeFactor\`.
|
|
776
|
+
Note that the default values are \`transferTimeFactor = 1\` and
|
|
777
|
+
\`additionalTransferTime = 0\` in case they are not explicitly
|
|
778
|
+
provided in the query.
|
|
779
|
+
`,
|
|
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.
|
|
808
|
+
Scheduled times will equal realtime times in this case.
|
|
809
|
+
`,
|
|
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.
|
|
822
|
+
For non-transit legs, null
|
|
823
|
+
`,
|
|
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
|
|
860
|
+
and the Place where the leg ends. For non-transit legs, null.
|
|
861
|
+
`,
|
|
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
|
|
872
|
+
used for walking, biking and driving.
|
|
873
|
+
`,
|
|
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
|
|
885
|
+
to identify which fare transfer this leg belongs to
|
|
886
|
+
`
|
|
887
|
+
},
|
|
888
|
+
effectiveFareLegIndex: {
|
|
889
|
+
type: "integer",
|
|
890
|
+
description: `Index into the \`Itinerary.fareTransfers[fareTransferIndex].effectiveFareLegProducts\` array
|
|
891
|
+
to identify which effective fare leg this itinerary leg belongs to
|
|
892
|
+
`
|
|
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
|
|
903
|
+
beyond the feed end date (enabled by config flag \`timetable.dataset.extend_calendar\`)
|
|
904
|
+
by looping active weekdays, e.g. from calendar.txt in GTFS.
|
|
905
|
+
`,
|
|
906
|
+
type: "string",
|
|
907
|
+
format: "date-time"
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
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
|
+
}
|
|
928
|
+
};
|
|
929
|
+
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)
|
|
933
|
+
- \`PAPER_TICKET\`: Physical paper ticket
|
|
934
|
+
- \`TRANSIT_CARD\`: Physical transit card with stored value
|
|
935
|
+
- \`CONTACTLESS_EMV\`: cEMV (contactless payment)
|
|
936
|
+
- \`MOBILE_APP\`: Mobile app with virtual transit cards/passes
|
|
937
|
+
`
|
|
938
|
+
};
|
|
939
|
+
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
|
+
}
|
|
952
|
+
};
|
|
953
|
+
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
|
+
}
|
|
976
|
+
};
|
|
977
|
+
var FareTransferRuleSchema = {
|
|
978
|
+
type: "string",
|
|
979
|
+
enum: ["A_AB", "A_AB_B", "AB"]
|
|
980
|
+
};
|
|
981
|
+
var FareTransferSchema = {
|
|
982
|
+
type: "object",
|
|
983
|
+
description: `The concept is derived from: https://gtfs.org/documentation/schedule/reference/#fare_transfer_rulestxt
|
|
984
|
+
|
|
985
|
+
Terminology:
|
|
986
|
+
- **Leg**: An itinerary leg as described by the \`Leg\` type of this API description.
|
|
987
|
+
- **Effective Fare Leg**: Itinerary legs can be joined together to form one *effective fare leg*.
|
|
988
|
+
- **Fare Transfer**: A fare transfer groups two or more effective fare legs.
|
|
989
|
+
- **A** is the first *effective fare leg* of potentially multiple consecutive legs contained in a fare transfer
|
|
990
|
+
- **B** is any *effective fare leg* following the first *effective fare leg* in this transfer
|
|
991
|
+
- **AB** are all changes between *effective fare legs* contained in this transfer
|
|
992
|
+
|
|
993
|
+
The fare transfer rule is used to derive the final set of products of the itinerary legs contained in this transfer:
|
|
994
|
+
- 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.
|
|
995
|
+
- 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)
|
|
996
|
+
- 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.
|
|
997
|
+
|
|
998
|
+
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
|
+
`,
|
|
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.
|
|
1013
|
+
This is an \`array<array<FareProduct>>\` where the inner array
|
|
1014
|
+
lists all possible fare products that would cover this effective fare leg.
|
|
1015
|
+
Each "effective fare leg" can have multiple options for adult/child/weekly/monthly/day/one-way tickets etc.
|
|
1016
|
+
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
|
+
and the inner array as OR (you can choose which ticket to buy)
|
|
1018
|
+
`,
|
|
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
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
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
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
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
|
|
1081
|
+
transfer duration in minutes according to GTFS (+heuristics)
|
|
1082
|
+
`
|
|
1083
|
+
},
|
|
1084
|
+
foot: {
|
|
1085
|
+
type: "number",
|
|
1086
|
+
description: `optional; missing if no path was found (timetable / osr)
|
|
1087
|
+
transfer duration in minutes for the foot profile
|
|
1088
|
+
`
|
|
1089
|
+
},
|
|
1090
|
+
footRouted: {
|
|
1091
|
+
type: "number",
|
|
1092
|
+
description: `optional; missing if no path was found with foot routing
|
|
1093
|
+
transfer duration in minutes for the foot profile
|
|
1094
|
+
`
|
|
1095
|
+
},
|
|
1096
|
+
wheelchair: {
|
|
1097
|
+
type: "number",
|
|
1098
|
+
description: `optional; missing if no path was found with the wheelchair profile
|
|
1099
|
+
transfer duration in minutes for the wheelchair profile
|
|
1100
|
+
`
|
|
1101
|
+
},
|
|
1102
|
+
wheelchairRouted: {
|
|
1103
|
+
type: "number",
|
|
1104
|
+
description: `optional; missing if no path was found with the wheelchair profile
|
|
1105
|
+
transfer duration in minutes for the wheelchair profile
|
|
1106
|
+
`
|
|
1107
|
+
},
|
|
1108
|
+
wheelchairUsesElevator: {
|
|
1109
|
+
type: "boolean",
|
|
1110
|
+
description: `optional; missing if no path was found with the wheelchair profile
|
|
1111
|
+
true if the wheelchair path uses an elevator
|
|
1112
|
+
`
|
|
1113
|
+
},
|
|
1114
|
+
car: {
|
|
1115
|
+
type: "number",
|
|
1116
|
+
description: `optional; missing if no path was found with car routing
|
|
1117
|
+
transfer duration in minutes for the car profile
|
|
1118
|
+
`
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
};
|
|
1122
|
+
|
|
1123
|
+
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
|
|
1161
|
+
};
|