@opentripplanner/types 1.2.3 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -3,20 +3,21 @@
3
3
  * used across more than one package in this repo.
4
4
  */
5
5
  import React, { FunctionComponent, ReactElement } from "react";
6
+ declare type ZeroOrOne = 0 | 1;
6
7
  /**
7
8
  * Shape for a transportation company.
8
9
  */
9
- export interface Company {
10
+ export declare type Company = {
10
11
  id: string;
11
12
  label: string;
12
13
  /** a comma-separated string listing the modes that this company has */
13
14
  modes: string;
14
- }
15
+ };
15
16
  /**
16
17
  * Describes some options to help display data about a transit agency that is
17
18
  * configured in an opentripplanner instance.
18
19
  */
19
- export interface TransitOperator {
20
+ export declare type TransitOperator = {
20
21
  agencyId: string;
21
22
  defaultRouteColor?: string;
22
23
  defaultRouteTextColor?: string;
@@ -25,19 +26,19 @@ export interface TransitOperator {
25
26
  longNameSplitter?: string;
26
27
  name?: string;
27
28
  order?: number;
28
- }
29
+ };
29
30
  /**
30
31
  * Describes a map entity to be rendered.
31
32
  */
32
- export interface LayerEntity {
33
+ export declare type LayerEntity = {
33
34
  id: string;
34
35
  lat: number;
35
36
  lon: number;
36
- }
37
- interface SymbolComponentBaseProps {
37
+ };
38
+ declare type SymbolComponentBaseProps = {
38
39
  entity: LayerEntity;
39
40
  zoom: number;
40
- }
41
+ };
41
42
  /**
42
43
  * The symbol-representing component to draw; with the signature
43
44
  * ({ entity: object; zoom: number }) => Element
@@ -48,7 +49,7 @@ declare type SymbolComponent = React.ComponentType<SymbolComponentBaseProps>;
48
49
  * Defines which symbol to render based on a zoom level; and optionally by entity type.
49
50
  * (Only one symbol is rendered for any zoom level.)
50
51
  */
51
- export interface ZoomBasedSymbol {
52
+ export declare type ZoomBasedSymbol = {
52
53
  /**
53
54
  * A function with the signature (entity: object) => string
54
55
  * that determines the type of an entity.
@@ -75,11 +76,11 @@ export interface ZoomBasedSymbol {
75
76
  symbolByType?: {
76
77
  [name: string]: SymbolComponent;
77
78
  };
78
- }
79
+ };
79
80
  /**
80
81
  * Describes the objects from the real-time vehicle service.
81
82
  */
82
- export interface TransitVehicle {
83
+ export declare type TransitVehicle = {
83
84
  routeShortName?: string;
84
85
  routeLongName?: string;
85
86
  routeType?: string;
@@ -94,7 +95,7 @@ export interface TransitVehicle {
94
95
  lat?: number;
95
96
  lon?: number;
96
97
  heading?: number;
97
- }
98
+ };
98
99
  export declare type VehicleRentalMapOverlaySymbol = {
99
100
  dockStrokeColor?: string;
100
101
  fillColor?: string;
@@ -107,13 +108,14 @@ export declare type VehicleRentalMapOverlaySymbol = {
107
108
  *
108
109
  * Note: this is an incomplete type mapping.
109
110
  */
110
- export interface Config {
111
+ export declare type Config = {
111
112
  companies?: Company[];
112
113
  dateTime: {
113
114
  timeFormat?: string;
114
115
  dateFormat?: string;
115
116
  longDateFormat?: string;
116
117
  };
118
+ modes: ConfiguredModes;
117
119
  map?: {
118
120
  overlays?: {
119
121
  /**
@@ -148,31 +150,31 @@ export interface Config {
148
150
  }[];
149
151
  };
150
152
  transitOperators?: TransitOperator[];
151
- }
152
- interface FeedScopedId {
153
+ };
154
+ declare type FeedScopedId = {
153
155
  agencyId?: string;
154
156
  id?: string;
155
- }
156
- export interface EncodedPolyline {
157
+ };
158
+ export declare type EncodedPolyline = {
157
159
  length: number;
158
160
  points: string;
159
- }
160
- declare type ElevationData = {
161
+ };
162
+ export declare type ElevationData = {
161
163
  first: number;
162
164
  second: number;
163
165
  }[];
164
- export interface Alert {
166
+ export declare type Alert = {
165
167
  alertHeaderText?: string;
166
168
  alertDescriptionText?: string;
167
169
  alertUrl?: string;
168
170
  effectiveStartDate?: number;
169
- }
171
+ };
170
172
  /**
171
173
  * Represents steps in a leg in an itinerary of an OTP plan response. These are
172
174
  * only for non-transit modes.
173
175
  * See documentation here: http://otp-docs.ibi-transit.com/api/json_WalkStep.html
174
176
  */
175
- export interface Step {
177
+ export declare type Step = {
176
178
  absoluteDirection?: string;
177
179
  alerts?: Alert[];
178
180
  area: boolean;
@@ -184,11 +186,11 @@ export interface Step {
184
186
  relativeDirection: string;
185
187
  stayOn: boolean;
186
188
  streetName: string;
187
- }
189
+ };
188
190
  /**
189
191
  * Describe an origin, destination, or intermediate location in an itinerary.
190
192
  */
191
- export interface Place {
193
+ export declare type Place = {
192
194
  address?: string;
193
195
  arrival?: number;
194
196
  bikeShareId?: string;
@@ -203,28 +205,28 @@ export interface Place {
203
205
  stopSequence?: number;
204
206
  vertexType: string;
205
207
  zoneId?: string;
206
- }
208
+ };
207
209
  /**
208
210
  * Holds contact info and lead time for flex transit bookings.
209
211
  * The information is optional and is for reminding the end-user
210
212
  * of any advance reservations required prior to travel.
211
213
  */
212
- export interface FlexBookingInfo {
214
+ export declare type FlexBookingInfo = {
213
215
  contactInfo?: {
214
216
  phoneNumber: string;
215
217
  };
216
218
  latestBookingTime?: {
217
219
  daysPrior: number;
218
220
  };
219
- }
221
+ };
220
222
  /** Dropoff-specific flex booking information */
221
- interface FlexDropOffBookingInfo extends FlexBookingInfo {
223
+ declare type FlexDropOffBookingInfo = {
222
224
  dropOffMessage?: string;
223
- }
225
+ } & FlexBookingInfo;
224
226
  /** Pickup-specific flex booking information */
225
- interface FlexPickupBookingInfo extends FlexBookingInfo {
227
+ declare type FlexPickupBookingInfo = {
226
228
  pickupMessage?: string;
227
- }
229
+ } & FlexBookingInfo;
228
230
  /**
229
231
  * Represents a leg in an itinerary of an OTP plan response. Each leg represents
230
232
  * a portion of the overall itinerary that is done until either reaching the
@@ -232,7 +234,7 @@ interface FlexPickupBookingInfo extends FlexBookingInfo {
232
234
  * documentation here:
233
235
  * http://otp-docs.ibi-transit.com/api/json_Leg.html
234
236
  */
235
- export interface Leg {
237
+ export declare type Leg = {
236
238
  accessibilityScore?: number;
237
239
  agencyBrandingUrl?: string;
238
240
  agencyId?: string;
@@ -240,6 +242,8 @@ export interface Leg {
240
242
  agencyTimeZoneOffset: number;
241
243
  agencyUrl?: string;
242
244
  alerts?: Alert[];
245
+ boardRule?: string;
246
+ alightRule?: string;
243
247
  arrivalDelay: number;
244
248
  averageWait?: number;
245
249
  departureDelay: number;
@@ -285,11 +289,11 @@ export interface Leg {
285
289
  tripBlockId?: string;
286
290
  tripId?: string;
287
291
  walkingBike?: boolean;
288
- }
292
+ };
289
293
  /**
290
294
  * Describes the cost of an itinerary leg.
291
295
  */
292
- interface Money {
296
+ export declare type Money = {
293
297
  cents: number;
294
298
  currency: {
295
299
  defaultFractionDigits: number;
@@ -297,7 +301,7 @@ interface Money {
297
301
  symbol: string;
298
302
  currency: string;
299
303
  };
300
- }
304
+ };
301
305
  /**
302
306
  * Describes a fare id or route to which a fare applies.
303
307
  */
@@ -310,7 +314,7 @@ declare type ApplicableId = string | FeedScopedId;
310
314
  * NOTE: so far the fare includes ONLY a fare encountered on public transit and
311
315
  * not any bike rental or TNC rental fees.
312
316
  */
313
- export interface Fare {
317
+ export declare type Fare = {
314
318
  details: {
315
319
  [name: string]: {
316
320
  fareId: ApplicableId;
@@ -321,13 +325,13 @@ export interface Fare {
321
325
  fare?: {
322
326
  [name: string]: Money;
323
327
  };
324
- }
328
+ };
325
329
  /**
326
330
  * Represents an itinerary of an OTP plan response. See detailed documentation
327
331
  * in OTP webservice documentation here:
328
332
  * http://otp-docs.ibi-transit.com/api/json_Itinerary.html
329
333
  */
330
- export interface Itinerary {
334
+ export declare type Itinerary = {
331
335
  duration: number;
332
336
  elevationGained: number;
333
337
  elevationLost: number;
@@ -342,33 +346,236 @@ export interface Itinerary {
342
346
  walkDistance: number;
343
347
  walkLimitExceeded: boolean;
344
348
  walkTime: number;
345
- }
349
+ };
350
+ export declare type ElevationProfile = {
351
+ maxElev: number;
352
+ minElev: number;
353
+ points: number[];
354
+ traversed: number;
355
+ gain: number;
356
+ loss: number;
357
+ };
346
358
  /**
347
359
  * Used to model a location that is used in planning a trip.
348
360
  */
349
- export interface Location {
361
+ export declare type Location = {
350
362
  lat: number;
351
363
  lon: number;
352
- name: string;
364
+ name?: string;
353
365
  /**
354
366
  * This is only used location that a user has saved. Can be either:
355
- * "home" or "work"
367
+ * One of: 'home', 'work', 'stop' or 'recent'
356
368
  */
357
- type?: string;
358
- }
369
+ type?: "home" | "work" | "stop" | "recent" | string;
370
+ category?: string;
371
+ /**
372
+ * This represents the last time that this location was selected in a
373
+ * search
374
+ */
375
+ timestamp?: number;
376
+ main?: string;
377
+ secondary?: string;
378
+ };
379
+ /**
380
+ * Alias for a commonly used basic type
381
+ */
382
+ export declare type LatLngArray = [number, number];
359
383
  /**
360
384
  * Describes a transit stop entity to be rendered on the map.
361
385
  */
362
- export interface StopLayerStop extends LayerEntity {
386
+ export declare type StopLayerStop = LayerEntity & {
363
387
  name: string;
364
- }
388
+ };
389
+ /**
390
+ * This models data about a stop and it's associated routes that is obtained
391
+ * from a transit index API.
392
+ */
393
+ export declare type Stop = {
394
+ /**
395
+ * The stop code if the stop has one
396
+ */
397
+ code?: string;
398
+ dist?: number;
399
+ lat: number;
400
+ lon: number;
401
+ name: string;
402
+ routes?: Route[];
403
+ };
404
+ export declare type Agency = {
405
+ id: string;
406
+ name?: string;
407
+ url?: string;
408
+ timezone?: string;
409
+ lang?: string;
410
+ phone?: string;
411
+ fareUrl?: string;
412
+ };
413
+ export declare type Route = {
414
+ agency: Agency;
415
+ agencyId?: string | number;
416
+ agencyName?: string | number;
417
+ shortName: string;
418
+ longName?: string;
419
+ mode?: string;
420
+ id: string;
421
+ type?: number;
422
+ color?: string;
423
+ textColor?: string;
424
+ routeBikesAllowed?: ZeroOrOne;
425
+ bikesAllowed?: ZeroOrOne;
426
+ sortOrder: number;
427
+ eligibilityRestricted?: ZeroOrOne;
428
+ sortOrderSet: boolean;
429
+ };
365
430
  /**
431
+ * Used to help display the time of day within the context of a particular itinerary.
366
432
  * Describes time options, including time format and timezone-related offset.
433
+ * @deprecated
367
434
  */
368
- export interface TimeOptions {
369
- format?: string;
370
- offset?: string;
371
- }
435
+ export declare type TimeOptions = {
436
+ /**
437
+ * A format string template to be used to display a date using moment.js
438
+ */
439
+ format: string;
440
+ offset: number;
441
+ };
442
+ export declare type TransitivePlace = {
443
+ placeId: string;
444
+ type: string;
445
+ };
446
+ export declare type TransitiveJourney = {
447
+ journey_id: string;
448
+ journey_name: string;
449
+ segments: {
450
+ arc?: boolean;
451
+ from: TransitivePlace;
452
+ patterns?: {
453
+ pattern_id: string;
454
+ from_stop_index: number;
455
+ to_stop_index: number;
456
+ }[];
457
+ streetEdges: number[];
458
+ to: TransitivePlace;
459
+ type: string;
460
+ }[];
461
+ };
462
+ export declare type TransitivePattern = {
463
+ pattern_id: string;
464
+ pattern_name: string;
465
+ route_id: string;
466
+ stops: {
467
+ geometry?: string;
468
+ stop_id: string;
469
+ }[];
470
+ };
471
+ export declare type TransitiveRoute = {
472
+ agency_id: string;
473
+ route_id: string;
474
+ route_short_name: string;
475
+ route_long_name: string;
476
+ route_type: number;
477
+ route_color?: string;
478
+ };
479
+ export declare type TransitiveStop = {
480
+ stop_id: string;
481
+ stop_name: string;
482
+ stop_lat: number;
483
+ stop_lon: number;
484
+ };
485
+ export declare type TransitiveStreetEdge = {
486
+ edge_id: number;
487
+ geometry: EncodedPolyline;
488
+ };
489
+ export declare type TransitiveData = {
490
+ journeys: TransitiveJourney[];
491
+ patterns: TransitivePattern[];
492
+ places: TransitivePlace[];
493
+ routes: TransitiveRoute[];
494
+ stops: TransitiveStop[];
495
+ streetEdges: TransitiveStreetEdge[];
496
+ };
497
+ export declare type Station = {
498
+ bikesAvailable?: number;
499
+ id: string;
500
+ isFloatingBike?: boolean;
501
+ isFloatingCar?: boolean;
502
+ isFloatingVehicle?: boolean;
503
+ name?: string;
504
+ networks: string[];
505
+ spacesAvailable?: number;
506
+ x: number;
507
+ y: number;
508
+ };
509
+ export declare type ModeOption = {
510
+ id: string;
511
+ selected?: boolean;
512
+ showTitle?: boolean;
513
+ text: JSX.Element;
514
+ title?: string;
515
+ };
516
+ export declare type ModeSelectorOptions = {
517
+ primary: ModeOption;
518
+ secondary?: ModeOption[];
519
+ tertiary?: ModeOption[];
520
+ };
521
+ export declare type ConfiguredMode = string | {
522
+ mode: string;
523
+ label: string;
524
+ company?: string;
525
+ };
526
+ export declare type ConfiguredModes = {
527
+ transitModes: ConfiguredMode[];
528
+ accessModes: ConfiguredMode[];
529
+ exlcusiveModes: ConfiguredMode[];
530
+ bicycleModes: ConfiguredMode[];
531
+ micromobilityModes: ConfiguredMode[];
532
+ };
533
+ export declare type ConfiguredCompany = {
534
+ /**
535
+ * The id of the company. This is typically in all-caps.
536
+ */
537
+ id: string;
538
+ /**
539
+ * A human readable text value that can be displayed to users.
540
+ */
541
+ label: string;
542
+ /**
543
+ * A comma-separated list of applicable modes of travel that the company
544
+ * offers.
545
+ */
546
+ modes: string;
547
+ };
548
+ /**
549
+ * Depending on the geocoder that is used, more properties than just the `label`
550
+ * property might be provided by the geocoder. For example, with the Pelias
551
+ * geocoder, properties such as `id`, `layer`, `source` are also included.
552
+ */
553
+ export declare type GeocodedFeature = {
554
+ geometry: {
555
+ coordinates: LatLngArray;
556
+ type: string;
557
+ };
558
+ properties: {
559
+ label: string;
560
+ layer?: string;
561
+ source?: string;
562
+ };
563
+ };
564
+ export declare type TncFare = {
565
+ maxTNCFare: number;
566
+ minTNCFare: number;
567
+ tncCurrencyCode: string;
568
+ };
569
+ export declare type UserPosition = {
570
+ coords?: {
571
+ latitude: number;
572
+ longitude: number;
573
+ };
574
+ error?: {
575
+ message: string;
576
+ } | string;
577
+ fetching?: boolean;
578
+ };
372
579
  /**
373
580
  * Describes a user location such as "home", "work" etc.
374
581
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,M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"TypeScript types used across multiple OTP-UI packages",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/index.ts CHANGED
@@ -5,21 +5,23 @@
5
5
 
6
6
  import React, { FunctionComponent, ReactElement } from "react";
7
7
 
8
+ type ZeroOrOne = 0 | 1;
9
+
8
10
  /**
9
11
  * Shape for a transportation company.
10
12
  */
11
- export interface Company {
13
+ export type Company = {
12
14
  id: string;
13
15
  label: string;
14
16
  /** a comma-separated string listing the modes that this company has */
15
17
  modes: string;
16
- }
18
+ };
17
19
 
18
20
  /**
19
21
  * Describes some options to help display data about a transit agency that is
20
22
  * configured in an opentripplanner instance.
21
23
  */
22
- export interface TransitOperator {
24
+ export type TransitOperator = {
23
25
  agencyId: string;
24
26
  defaultRouteColor?: string;
25
27
  defaultRouteTextColor?: string;
@@ -28,21 +30,21 @@ export interface TransitOperator {
28
30
  longNameSplitter?: string;
29
31
  name?: string;
30
32
  order?: number;
31
- }
33
+ };
32
34
 
33
35
  /**
34
36
  * Describes a map entity to be rendered.
35
37
  */
36
- export interface LayerEntity {
38
+ export type LayerEntity = {
37
39
  id: string;
38
40
  lat: number;
39
41
  lon: number;
40
- }
42
+ };
41
43
 
42
- interface SymbolComponentBaseProps {
44
+ type SymbolComponentBaseProps = {
43
45
  entity: LayerEntity;
44
46
  zoom: number;
45
- }
47
+ };
46
48
 
47
49
  /**
48
50
  * The symbol-representing component to draw; with the signature
@@ -55,7 +57,7 @@ type SymbolComponent = React.ComponentType<SymbolComponentBaseProps>;
55
57
  * Defines which symbol to render based on a zoom level; and optionally by entity type.
56
58
  * (Only one symbol is rendered for any zoom level.)
57
59
  */
58
- export interface ZoomBasedSymbol {
60
+ export type ZoomBasedSymbol = {
59
61
  /**
60
62
  * A function with the signature (entity: object) => string
61
63
  * that determines the type of an entity.
@@ -82,12 +84,12 @@ export interface ZoomBasedSymbol {
82
84
  symbolByType?: {
83
85
  [name: string]: SymbolComponent;
84
86
  };
85
- }
87
+ };
86
88
 
87
89
  /**
88
90
  * Describes the objects from the real-time vehicle service.
89
91
  */
90
- export interface TransitVehicle {
92
+ export type TransitVehicle = {
91
93
  routeShortName?: string;
92
94
  routeLongName?: string;
93
95
  routeType?: string;
@@ -105,7 +107,7 @@ export interface TransitVehicle {
105
107
  lat?: number;
106
108
  lon?: number;
107
109
  heading?: number;
108
- }
110
+ };
109
111
 
110
112
  export type VehicleRentalMapOverlaySymbol =
111
113
  | {
@@ -122,13 +124,14 @@ export type VehicleRentalMapOverlaySymbol =
122
124
  *
123
125
  * Note: this is an incomplete type mapping.
124
126
  */
125
- export interface Config {
127
+ export type Config = {
126
128
  companies?: Company[];
127
129
  dateTime: {
128
130
  timeFormat?: string;
129
131
  dateFormat?: string;
130
132
  longDateFormat?: string;
131
133
  };
134
+ modes: ConfiguredModes;
132
135
  // TODO: add full typing
133
136
  map?: {
134
137
  overlays?: {
@@ -164,36 +167,36 @@ export interface Config {
164
167
  }[];
165
168
  };
166
169
  transitOperators?: TransitOperator[];
167
- }
170
+ };
168
171
 
169
- interface FeedScopedId {
172
+ type FeedScopedId = {
170
173
  agencyId?: string;
171
174
  id?: string;
172
- }
175
+ };
173
176
 
174
- export interface EncodedPolyline {
177
+ export type EncodedPolyline = {
175
178
  length: number;
176
179
  points: string;
177
- }
180
+ };
178
181
 
179
- type ElevationData = {
182
+ export type ElevationData = {
180
183
  first: number;
181
184
  second: number;
182
185
  }[];
183
186
 
184
- export interface Alert {
187
+ export type Alert = {
185
188
  alertHeaderText?: string;
186
189
  alertDescriptionText?: string;
187
190
  alertUrl?: string;
188
191
  effectiveStartDate?: number;
189
- }
192
+ };
190
193
 
191
194
  /**
192
195
  * Represents steps in a leg in an itinerary of an OTP plan response. These are
193
196
  * only for non-transit modes.
194
197
  * See documentation here: http://otp-docs.ibi-transit.com/api/json_WalkStep.html
195
198
  */
196
- export interface Step {
199
+ export type Step = {
197
200
  absoluteDirection?: string;
198
201
  alerts?: Alert[];
199
202
  area: boolean;
@@ -205,12 +208,12 @@ export interface Step {
205
208
  relativeDirection: string;
206
209
  stayOn: boolean;
207
210
  streetName: string;
208
- }
211
+ };
209
212
 
210
213
  /**
211
214
  * Describe an origin, destination, or intermediate location in an itinerary.
212
215
  */
213
- export interface Place {
216
+ export type Place = {
214
217
  address?: string;
215
218
  arrival?: number;
216
219
  bikeShareId?: string;
@@ -225,31 +228,31 @@ export interface Place {
225
228
  stopSequence?: number;
226
229
  vertexType: string;
227
230
  zoneId?: string;
228
- }
231
+ };
229
232
 
230
233
  /**
231
234
  * Holds contact info and lead time for flex transit bookings.
232
235
  * The information is optional and is for reminding the end-user
233
236
  * of any advance reservations required prior to travel.
234
237
  */
235
- export interface FlexBookingInfo {
238
+ export type FlexBookingInfo = {
236
239
  contactInfo?: {
237
240
  phoneNumber: string;
238
241
  };
239
242
  latestBookingTime?: {
240
243
  daysPrior: number;
241
244
  };
242
- }
245
+ };
243
246
 
244
247
  /** Dropoff-specific flex booking information */
245
- interface FlexDropOffBookingInfo extends FlexBookingInfo {
248
+ type FlexDropOffBookingInfo = {
246
249
  dropOffMessage?: string;
247
- }
250
+ } & FlexBookingInfo;
248
251
 
249
252
  /** Pickup-specific flex booking information */
250
- interface FlexPickupBookingInfo extends FlexBookingInfo {
253
+ type FlexPickupBookingInfo = {
251
254
  pickupMessage?: string;
252
- }
255
+ } & FlexBookingInfo;
253
256
 
254
257
  /**
255
258
  * Represents a leg in an itinerary of an OTP plan response. Each leg represents
@@ -258,7 +261,7 @@ interface FlexPickupBookingInfo extends FlexBookingInfo {
258
261
  * documentation here:
259
262
  * http://otp-docs.ibi-transit.com/api/json_Leg.html
260
263
  */
261
- export interface Leg {
264
+ export type Leg = {
262
265
  accessibilityScore?: number;
263
266
  agencyBrandingUrl?: string;
264
267
  agencyId?: string;
@@ -266,6 +269,8 @@ export interface Leg {
266
269
  agencyTimeZoneOffset: number;
267
270
  agencyUrl?: string;
268
271
  alerts?: Alert[];
272
+ boardRule?: string;
273
+ alightRule?: string;
269
274
  arrivalDelay: number;
270
275
  averageWait?: number;
271
276
  departureDelay: number;
@@ -311,12 +316,12 @@ export interface Leg {
311
316
  tripBlockId?: string;
312
317
  tripId?: string;
313
318
  walkingBike?: boolean;
314
- }
319
+ };
315
320
 
316
321
  /**
317
322
  * Describes the cost of an itinerary leg.
318
323
  */
319
- interface Money {
324
+ export type Money = {
320
325
  cents: number;
321
326
  currency: {
322
327
  defaultFractionDigits: number;
@@ -324,7 +329,7 @@ interface Money {
324
329
  symbol: string;
325
330
  currency: string;
326
331
  };
327
- }
332
+ };
328
333
 
329
334
  /**
330
335
  * Describes a fare id or route to which a fare applies.
@@ -339,7 +344,7 @@ type ApplicableId = string | FeedScopedId;
339
344
  * NOTE: so far the fare includes ONLY a fare encountered on public transit and
340
345
  * not any bike rental or TNC rental fees.
341
346
  */
342
- export interface Fare {
347
+ export type Fare = {
343
348
  details: {
344
349
  [name: string]: {
345
350
  fareId: ApplicableId;
@@ -350,14 +355,14 @@ export interface Fare {
350
355
  fare?: {
351
356
  [name: string]: Money;
352
357
  };
353
- }
358
+ };
354
359
 
355
360
  /**
356
361
  * Represents an itinerary of an OTP plan response. See detailed documentation
357
362
  * in OTP webservice documentation here:
358
363
  * http://otp-docs.ibi-transit.com/api/json_Itinerary.html
359
364
  */
360
- export interface Itinerary {
365
+ export type Itinerary = {
361
366
  duration: number;
362
367
  elevationGained: number;
363
368
  elevationLost: number;
@@ -372,36 +377,264 @@ export interface Itinerary {
372
377
  walkDistance: number;
373
378
  walkLimitExceeded: boolean;
374
379
  walkTime: number;
375
- }
380
+ };
381
+
382
+ export type ElevationProfile = {
383
+ maxElev: number;
384
+ minElev: number;
385
+ points: number[];
386
+ traversed: number;
387
+ gain: number;
388
+ loss: number;
389
+ };
376
390
 
377
391
  /**
378
392
  * Used to model a location that is used in planning a trip.
379
393
  */
380
- export interface Location {
394
+ export type Location = {
381
395
  lat: number;
382
396
  lon: number;
383
- name: string;
397
+ name?: string;
384
398
  /**
385
399
  * This is only used location that a user has saved. Can be either:
386
- * "home" or "work"
400
+ * One of: 'home', 'work', 'stop' or 'recent'
387
401
  */
388
- type?: string;
389
- }
402
+ type?: "home" | "work" | "stop" | "recent" | string;
403
+ category?: string;
404
+
405
+ /**
406
+ * This represents the last time that this location was selected in a
407
+ * search
408
+ */
409
+ timestamp?: number;
410
+
411
+ /* Sometimes used for displaying subinfo */
412
+ main?: string;
413
+ secondary?: string;
414
+ };
415
+
416
+ /**
417
+ * Alias for a commonly used basic type
418
+ */
419
+ export type LatLngArray = [number, number];
390
420
 
391
421
  /**
392
422
  * Describes a transit stop entity to be rendered on the map.
393
423
  */
394
- export interface StopLayerStop extends LayerEntity {
424
+ export type StopLayerStop = LayerEntity & {
395
425
  name: string;
396
- }
426
+ };
397
427
 
398
428
  /**
429
+ * This models data about a stop and it's associated routes that is obtained
430
+ * from a transit index API.
431
+ */
432
+ export type Stop = {
433
+ /**
434
+ * The stop code if the stop has one
435
+ */
436
+ code?: string;
437
+ dist?: number;
438
+ lat: number;
439
+ lon: number;
440
+ name: string;
441
+ routes?: Route[];
442
+ };
443
+
444
+ export type Agency = {
445
+ id: string;
446
+ name?: string;
447
+ url?: string;
448
+ timezone?: string;
449
+ lang?: string;
450
+ phone?: string;
451
+ fareUrl?: string;
452
+ };
453
+ export type Route = {
454
+ agency: Agency;
455
+ agencyId?: string | number;
456
+ agencyName?: string | number;
457
+ shortName: string;
458
+ longName?: string;
459
+ mode?: string;
460
+ id: string;
461
+ // TS TODO: route type enum
462
+ type?: number;
463
+ color?: string;
464
+ textColor?: string;
465
+ routeBikesAllowed?: ZeroOrOne;
466
+ bikesAllowed?: ZeroOrOne;
467
+ sortOrder: number;
468
+ eligibilityRestricted?: ZeroOrOne;
469
+ sortOrderSet: boolean;
470
+ };
471
+
472
+ /**
473
+ * Used to help display the time of day within the context of a particular itinerary.
399
474
  * Describes time options, including time format and timezone-related offset.
475
+ * @deprecated
400
476
  */
401
- export interface TimeOptions {
402
- format?: string;
403
- offset?: string;
404
- }
477
+ export type TimeOptions = {
478
+ /**
479
+ * A format string template to be used to display a date using moment.js
480
+ */
481
+ format: string;
482
+ /*
483
+ * The timezone offset in milliseconds if any should be added. This is
484
+ * typically calculated using the itinerary.js#getTimeZoneOffset function.
485
+ */
486
+ offset: number;
487
+ };
488
+
489
+ export type TransitivePlace = {
490
+ placeId: string;
491
+ type: string;
492
+ };
493
+ export type TransitiveJourney = {
494
+ journey_id: string;
495
+ journey_name: string;
496
+ segments: {
497
+ arc?: boolean;
498
+ from: TransitivePlace;
499
+ patterns?: {
500
+ pattern_id: string;
501
+ from_stop_index: number;
502
+ to_stop_index: number;
503
+ }[];
504
+ streetEdges: number[];
505
+ to: TransitivePlace;
506
+ type: string;
507
+ }[];
508
+ };
509
+ export type TransitivePattern = {
510
+ pattern_id: string;
511
+ pattern_name: string;
512
+ route_id: string;
513
+ stops: {
514
+ geometry?: string;
515
+ stop_id: string;
516
+ }[];
517
+ };
518
+ export type TransitiveRoute = {
519
+ agency_id: string;
520
+ route_id: string;
521
+ route_short_name: string;
522
+ route_long_name: string;
523
+ route_type: number;
524
+ route_color?: string;
525
+ };
526
+ export type TransitiveStop = {
527
+ stop_id: string;
528
+ stop_name: string;
529
+ stop_lat: number;
530
+ stop_lon: number;
531
+ };
532
+
533
+ export type TransitiveStreetEdge = {
534
+ edge_id: number;
535
+ geometry: EncodedPolyline;
536
+ };
537
+
538
+ export type TransitiveData = {
539
+ journeys: TransitiveJourney[];
540
+ patterns: TransitivePattern[];
541
+ places: TransitivePlace[];
542
+ routes: TransitiveRoute[];
543
+ stops: TransitiveStop[];
544
+ streetEdges: TransitiveStreetEdge[];
545
+ };
546
+
547
+ export type Station = {
548
+ bikesAvailable?: number;
549
+ id: string;
550
+ isFloatingBike?: boolean;
551
+ isFloatingCar?: boolean;
552
+ isFloatingVehicle?: boolean;
553
+ name?: string;
554
+ networks: string[];
555
+ spacesAvailable?: number;
556
+ // TS TODO coordinate type
557
+ x: number;
558
+ y: number;
559
+ };
560
+
561
+ export type ModeOption = {
562
+ id: string;
563
+ selected?: boolean;
564
+ showTitle?: boolean;
565
+ text: JSX.Element;
566
+ title?: string;
567
+ };
568
+
569
+ export type ModeSelectorOptions = {
570
+ primary: ModeOption;
571
+ secondary?: ModeOption[];
572
+ tertiary?: ModeOption[];
573
+ };
574
+
575
+ export type ConfiguredMode =
576
+ | string
577
+ | {
578
+ mode: string;
579
+ label: string;
580
+ company?: string;
581
+ };
582
+
583
+ export type ConfiguredModes = {
584
+ transitModes: ConfiguredMode[];
585
+ accessModes: ConfiguredMode[];
586
+ exlcusiveModes: ConfiguredMode[];
587
+ bicycleModes: ConfiguredMode[];
588
+ micromobilityModes: ConfiguredMode[];
589
+ };
590
+
591
+ export type ConfiguredCompany = {
592
+ /**
593
+ * The id of the company. This is typically in all-caps.
594
+ */
595
+ id: string;
596
+ /**
597
+ * A human readable text value that can be displayed to users.
598
+ */
599
+ label: string;
600
+ /**
601
+ * A comma-separated list of applicable modes of travel that the company
602
+ * offers.
603
+ */
604
+ modes: string;
605
+ };
606
+
607
+ /**
608
+ * Depending on the geocoder that is used, more properties than just the `label`
609
+ * property might be provided by the geocoder. For example, with the Pelias
610
+ * geocoder, properties such as `id`, `layer`, `source` are also included.
611
+ */
612
+ export type GeocodedFeature = {
613
+ geometry: {
614
+ coordinates: LatLngArray;
615
+ type: string;
616
+ };
617
+ properties: {
618
+ label: string;
619
+ layer?: string;
620
+ source?: string;
621
+ };
622
+ };
623
+
624
+ export type TncFare = {
625
+ maxTNCFare: number;
626
+ minTNCFare: number;
627
+ tncCurrencyCode: string;
628
+ };
629
+
630
+ export type UserPosition = {
631
+ coords?: {
632
+ latitude: number;
633
+ longitude: number;
634
+ };
635
+ error?: { message: string } | string;
636
+ fetching?: boolean;
637
+ };
405
638
 
406
639
  /**
407
640
  * Describes a user location such as "home", "work" etc.
@@ -182,8 +182,8 @@
182
182
  "affectsGlobalScope": true
183
183
  },
184
184
  "./src/index.ts": {
185
- "version": "64b26d82606b748a127f4127af8352a719a006ea0ee0b4bf2dd57ec808c72ff1",
186
- "signature": "8022575f13fc37fe46787c9ef30a42c648907ab7b4c9bf6163ae40588e6af057",
185
+ "version": "4081b313b118ef315f4f7418fdcd85184229dd84b4a0914f7caff92b0693a94b",
186
+ "signature": "287e0f47e8583e44a7ff3ff2f4f0ec15065efda3aa710b656e49894ee9b9cfda",
187
187
  "affectsGlobalScope": false
188
188
  },
189
189
  "../../node_modules/@babel/types/lib/index.d.ts": {