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