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