@motis-project/motis-client 2.0.0 → 2.0.83
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 +3 -3
- package/dist/chunk-CAW6R2LI.js +1149 -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 +3 -3
- package/dist/index.js +6 -6
- package/dist/schemas.gen.d.ts +61 -13
- package/dist/schemas.gen.js +3 -3
- package/dist/services.gen.d.ts +4 -4
- package/dist/services.gen.js +3 -3
- package/dist/types.gen.d.ts +124 -20
- package/package.json +2 -3
package/dist/types.gen.d.ts
CHANGED
|
@@ -231,10 +231,11 @@ type PedestrianProfile = 'FOOT' | 'WHEELCHAIR';
|
|
|
231
231
|
*
|
|
232
232
|
* - `WALK`
|
|
233
233
|
* - `BIKE`
|
|
234
|
-
* - `RENTAL` Experimental. Expect unannounced breaking changes (without version bumps).
|
|
234
|
+
* - `RENTAL` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs.
|
|
235
235
|
* - `CAR`
|
|
236
|
-
* - `CAR_PARKING`
|
|
237
|
-
* - `ODM`
|
|
236
|
+
* - `CAR_PARKING` Experimental. Expect unannounced breaking changes (without version bumps) for all parameters and returned structs.
|
|
237
|
+
* - `ODM` on-demand taxis from the Prima+ÖV Project
|
|
238
|
+
* - `FLEX` flexible transports
|
|
238
239
|
*
|
|
239
240
|
* # Transit modes
|
|
240
241
|
*
|
|
@@ -252,9 +253,12 @@ type PedestrianProfile = 'FOOT' | 'WHEELCHAIR';
|
|
|
252
253
|
* - `NIGHT_RAIL`: long distance night trains
|
|
253
254
|
* - `REGIONAL_FAST_RAIL`: regional express routes that skip low traffic stops to be faster
|
|
254
255
|
* - `REGIONAL_RAIL`: regional train
|
|
256
|
+
* - `CABLE_CAR`: Cable tram. Used for street-level rail cars where the cable runs beneath the vehicle (e.g., cable car in San Francisco).
|
|
257
|
+
* - `FUNICULAR`: Funicular. Any rail system designed for steep inclines.
|
|
258
|
+
* - `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
259
|
*
|
|
256
260
|
*/
|
|
257
|
-
type Mode = 'WALK' | 'BIKE' | 'RENTAL' | 'CAR' | 'CAR_PARKING' | 'ODM' | 'TRANSIT' | 'TRAM' | 'SUBWAY' | 'FERRY' | 'AIRPLANE' | 'METRO' | 'BUS' | 'COACH' | 'RAIL' | 'HIGHSPEED_RAIL' | 'LONG_DISTANCE' | 'NIGHT_RAIL' | 'REGIONAL_FAST_RAIL' | 'REGIONAL_RAIL' | 'OTHER';
|
|
261
|
+
type Mode = 'WALK' | 'BIKE' | 'RENTAL' | 'CAR' | 'CAR_PARKING' | 'ODM' | 'FLEX' | 'TRANSIT' | 'TRAM' | 'SUBWAY' | 'FERRY' | 'AIRPLANE' | 'METRO' | 'BUS' | 'COACH' | 'RAIL' | 'HIGHSPEED_RAIL' | 'LONG_DISTANCE' | 'NIGHT_RAIL' | 'REGIONAL_FAST_RAIL' | 'REGIONAL_RAIL' | 'CABLE_CAR' | 'FUNICULAR' | 'AREAL_LIFT' | 'OTHER';
|
|
258
262
|
/**
|
|
259
263
|
* - `NORMAL` - latitude / longitude coordinate or address
|
|
260
264
|
* - `BIKESHARE` - bike sharing station
|
|
@@ -315,6 +319,10 @@ type Place = {
|
|
|
315
319
|
*
|
|
316
320
|
*/
|
|
317
321
|
track?: string;
|
|
322
|
+
/**
|
|
323
|
+
* description of the location that provides more detailed information
|
|
324
|
+
*/
|
|
325
|
+
description?: string;
|
|
318
326
|
vertexType?: VertexType;
|
|
319
327
|
/**
|
|
320
328
|
* Type of pickup. It could be disallowed due to schedule, skipped stops or cancellations.
|
|
@@ -332,6 +340,22 @@ type Place = {
|
|
|
332
340
|
* Alerts for this stop.
|
|
333
341
|
*/
|
|
334
342
|
alerts?: Array<Alert>;
|
|
343
|
+
/**
|
|
344
|
+
* for `FLEX` transports, the flex location area or location group name
|
|
345
|
+
*/
|
|
346
|
+
flex?: string;
|
|
347
|
+
/**
|
|
348
|
+
* for `FLEX` transports, the flex location area ID or location group ID
|
|
349
|
+
*/
|
|
350
|
+
flexId?: string;
|
|
351
|
+
/**
|
|
352
|
+
* Time that on-demand service becomes available
|
|
353
|
+
*/
|
|
354
|
+
flexStartPickupDropOffWindow?: string;
|
|
355
|
+
/**
|
|
356
|
+
* Time that on-demand service ends
|
|
357
|
+
*/
|
|
358
|
+
flexEndPickupDropOffWindow?: string;
|
|
335
359
|
};
|
|
336
360
|
/**
|
|
337
361
|
* Place reachable by One-to-All
|
|
@@ -526,6 +550,24 @@ type StepInstruction = {
|
|
|
526
550
|
*
|
|
527
551
|
*/
|
|
528
552
|
area: boolean;
|
|
553
|
+
/**
|
|
554
|
+
* Indicates that a fee must be paid by general traffic to use a road, road bridge or road tunnel.
|
|
555
|
+
*/
|
|
556
|
+
toll?: boolean;
|
|
557
|
+
/**
|
|
558
|
+
* Experimental. Indicates whether access to this part of the route is restricted.
|
|
559
|
+
* See: https://wiki.openstreetmap.org/wiki/Conditional_restrictions
|
|
560
|
+
*
|
|
561
|
+
*/
|
|
562
|
+
accessRestriction?: string;
|
|
563
|
+
/**
|
|
564
|
+
* incline in meters across this path segment
|
|
565
|
+
*/
|
|
566
|
+
elevationUp?: number;
|
|
567
|
+
/**
|
|
568
|
+
* decline in meters across this path segment
|
|
569
|
+
*/
|
|
570
|
+
elevationDown?: number;
|
|
529
571
|
};
|
|
530
572
|
type RentalFormFactor = 'BICYCLE' | 'CARGO_BICYCLE' | 'CAR' | 'MOPED' | 'SCOOTER_STANDING' | 'SCOOTER_SEATED' | 'OTHER';
|
|
531
573
|
type RentalPropulsionType = 'HUMAN' | 'ELECTRIC_ASSIST' | 'ELECTRIC' | 'COMBUSTION' | 'COMBUSTION_DIESEL' | 'HYBRID' | 'PLUG_IN_HYBRID' | 'HYDROGEN_FUEL_CELL';
|
|
@@ -747,7 +789,7 @@ type FareTransferRule = 'A_AB' | 'A_AB_B' | 'AB';
|
|
|
747
789
|
*/
|
|
748
790
|
type FareTransfer = {
|
|
749
791
|
rule?: FareTransferRule;
|
|
750
|
-
|
|
792
|
+
transferProducts?: Array<FareProduct>;
|
|
751
793
|
/**
|
|
752
794
|
* Lists all valid fare products for the effective fare legs.
|
|
753
795
|
* This is an `array<array<FareProduct>>` where the inner array
|
|
@@ -757,7 +799,7 @@ type FareTransfer = {
|
|
|
757
799
|
* and the inner array as OR (you can choose which ticket to buy)
|
|
758
800
|
*
|
|
759
801
|
*/
|
|
760
|
-
effectiveFareLegProducts: Array<Array<FareProduct
|
|
802
|
+
effectiveFareLegProducts: Array<Array<Array<FareProduct>>>;
|
|
761
803
|
};
|
|
762
804
|
type Itinerary = {
|
|
763
805
|
/**
|
|
@@ -786,37 +828,37 @@ type Itinerary = {
|
|
|
786
828
|
fareTransfers?: Array<FareTransfer>;
|
|
787
829
|
};
|
|
788
830
|
/**
|
|
789
|
-
*
|
|
831
|
+
* transfer from one location to another
|
|
790
832
|
*/
|
|
791
|
-
type
|
|
833
|
+
type Transfer = {
|
|
792
834
|
to: Place;
|
|
793
835
|
/**
|
|
794
|
-
* optional; missing if the GTFS did not contain a
|
|
795
|
-
*
|
|
836
|
+
* optional; missing if the GTFS did not contain a transfer
|
|
837
|
+
* transfer duration in minutes according to GTFS (+heuristics)
|
|
796
838
|
*
|
|
797
839
|
*/
|
|
798
840
|
default?: number;
|
|
799
841
|
/**
|
|
800
842
|
* optional; missing if no path was found (timetable / osr)
|
|
801
|
-
*
|
|
843
|
+
* transfer duration in minutes for the foot profile
|
|
802
844
|
*
|
|
803
845
|
*/
|
|
804
846
|
foot?: number;
|
|
805
847
|
/**
|
|
806
848
|
* optional; missing if no path was found with foot routing
|
|
807
|
-
*
|
|
849
|
+
* transfer duration in minutes for the foot profile
|
|
808
850
|
*
|
|
809
851
|
*/
|
|
810
852
|
footRouted?: number;
|
|
811
853
|
/**
|
|
812
854
|
* optional; missing if no path was found with the wheelchair profile
|
|
813
|
-
*
|
|
855
|
+
* transfer duration in minutes for the wheelchair profile
|
|
814
856
|
*
|
|
815
857
|
*/
|
|
816
858
|
wheelchair?: number;
|
|
817
859
|
/**
|
|
818
860
|
* optional; missing if no path was found with the wheelchair profile
|
|
819
|
-
*
|
|
861
|
+
* transfer duration in minutes for the wheelchair profile
|
|
820
862
|
*
|
|
821
863
|
*/
|
|
822
864
|
wheelchairRouted?: number;
|
|
@@ -826,6 +868,12 @@ type Footpath = {
|
|
|
826
868
|
*
|
|
827
869
|
*/
|
|
828
870
|
wheelchairUsesElevator?: boolean;
|
|
871
|
+
/**
|
|
872
|
+
* optional; missing if no path was found with car routing
|
|
873
|
+
* transfer duration in minutes for the car profile
|
|
874
|
+
*
|
|
875
|
+
*/
|
|
876
|
+
car?: number;
|
|
829
877
|
};
|
|
830
878
|
type PlanData = {
|
|
831
879
|
query: {
|
|
@@ -862,6 +910,8 @@ type PlanData = {
|
|
|
862
910
|
* This is being used as a cut-off during transit routing to speed up the search.
|
|
863
911
|
* To prevent this, it's possible to send two separate requests (one with only `transitModes` and one with only `directModes`).
|
|
864
912
|
*
|
|
913
|
+
* Note: the output `direct` array will stay empty if the input param `maxDirectTime` makes any direct trip impossible.
|
|
914
|
+
*
|
|
865
915
|
* Only non-transit modes such as `WALK`, `BIKE`, `CAR`, `BIKE_SHARING`, etc. can be used.
|
|
866
916
|
*
|
|
867
917
|
*/
|
|
@@ -936,6 +986,36 @@ type PlanData = {
|
|
|
936
986
|
*
|
|
937
987
|
*/
|
|
938
988
|
fromPlace: string;
|
|
989
|
+
/**
|
|
990
|
+
* Experimental. Expect unannounced breaking changes (without version bumps).
|
|
991
|
+
*
|
|
992
|
+
* Optional. Default is `false`.
|
|
993
|
+
*
|
|
994
|
+
* If set to `true`, the routing will ignore rental return constraints for direct connections,
|
|
995
|
+
* allowing the rental vehicle to be parked anywhere.
|
|
996
|
+
*
|
|
997
|
+
*/
|
|
998
|
+
ignoreDirectRentalReturnConstraints?: boolean;
|
|
999
|
+
/**
|
|
1000
|
+
* Experimental. Expect unannounced breaking changes (without version bumps).
|
|
1001
|
+
*
|
|
1002
|
+
* Optional. Default is `false`.
|
|
1003
|
+
*
|
|
1004
|
+
* If set to `true`, the routing will ignore rental return constraints for the part from the last transit stop to the `to` coordinate,
|
|
1005
|
+
* allowing the rental vehicle to be parked anywhere.
|
|
1006
|
+
*
|
|
1007
|
+
*/
|
|
1008
|
+
ignorePostTransitRentalReturnConstraints?: boolean;
|
|
1009
|
+
/**
|
|
1010
|
+
* Experimental. Expect unannounced breaking changes (without version bumps).
|
|
1011
|
+
*
|
|
1012
|
+
* Optional. Default is `false`.
|
|
1013
|
+
*
|
|
1014
|
+
* If set to `true`, the routing will ignore rental return constraints for the part from the `from` coordinate to the first transit stop,
|
|
1015
|
+
* allowing the rental vehicle to be parked anywhere.
|
|
1016
|
+
*
|
|
1017
|
+
*/
|
|
1018
|
+
ignorePreTransitRentalReturnConstraints?: boolean;
|
|
939
1019
|
/**
|
|
940
1020
|
* Optional. Experimental. Number of luggage pieces; base unit: airline cabin luggage (e.g. for ODM or price calculation)
|
|
941
1021
|
*
|
|
@@ -1125,6 +1205,10 @@ type PlanData = {
|
|
|
1125
1205
|
*
|
|
1126
1206
|
*/
|
|
1127
1207
|
searchWindow?: number;
|
|
1208
|
+
/**
|
|
1209
|
+
* Optional. Experimental. Adds overtaken direct connections.
|
|
1210
|
+
*/
|
|
1211
|
+
slowDirect?: boolean;
|
|
1128
1212
|
/**
|
|
1129
1213
|
* Optional. Defaults to the current time.
|
|
1130
1214
|
*
|
|
@@ -1555,6 +1639,14 @@ type StoptimesData = {
|
|
|
1555
1639
|
*
|
|
1556
1640
|
*/
|
|
1557
1641
|
direction?: 'EARLIER' | 'LATER';
|
|
1642
|
+
/**
|
|
1643
|
+
* Optional. Default is `false`.
|
|
1644
|
+
*
|
|
1645
|
+
* If set to `true`, only stations that are phyiscally in the radius are considered.
|
|
1646
|
+
* If set to `false`, additionally to the stations in the radius, equivalences with the same name and children are considered.
|
|
1647
|
+
*
|
|
1648
|
+
*/
|
|
1649
|
+
exactRadius?: boolean;
|
|
1558
1650
|
/**
|
|
1559
1651
|
* Optional. Default is all transit modes.
|
|
1560
1652
|
*
|
|
@@ -1683,7 +1775,7 @@ type LevelsData = {
|
|
|
1683
1775
|
};
|
|
1684
1776
|
type LevelsResponse = (Array<(number)>);
|
|
1685
1777
|
type LevelsError = unknown;
|
|
1686
|
-
type
|
|
1778
|
+
type TransfersData = {
|
|
1687
1779
|
query: {
|
|
1688
1780
|
/**
|
|
1689
1781
|
* location id
|
|
@@ -1691,13 +1783,25 @@ type FootpathsData = {
|
|
|
1691
1783
|
id: string;
|
|
1692
1784
|
};
|
|
1693
1785
|
};
|
|
1694
|
-
type
|
|
1786
|
+
type TransfersResponse = ({
|
|
1695
1787
|
place: Place;
|
|
1696
1788
|
/**
|
|
1697
|
-
*
|
|
1789
|
+
* true if the server has foot transfers computed
|
|
1790
|
+
*/
|
|
1791
|
+
hasFootTransfers: boolean;
|
|
1792
|
+
/**
|
|
1793
|
+
* true if the server has wheelchair transfers computed
|
|
1794
|
+
*/
|
|
1795
|
+
hasWheelchairTransfers: boolean;
|
|
1796
|
+
/**
|
|
1797
|
+
* true if the server has car transfers computed
|
|
1798
|
+
*/
|
|
1799
|
+
hasCarTransfers: boolean;
|
|
1800
|
+
/**
|
|
1801
|
+
* all outgoing transfers of this location
|
|
1698
1802
|
*/
|
|
1699
|
-
|
|
1803
|
+
transfers: Array<Transfer>;
|
|
1700
1804
|
});
|
|
1701
|
-
type
|
|
1805
|
+
type TransfersError = unknown;
|
|
1702
1806
|
|
|
1703
|
-
export type { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, Direction, Duration, ElevationCosts, EncodedPolyline, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule,
|
|
1807
|
+
export type { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, Direction, Duration, ElevationCosts, EncodedPolyline, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule, GeocodeData, GeocodeError, GeocodeResponse, InitialError, InitialResponse, Itinerary, Leg, LevelsData, LevelsError, LevelsResponse, LocationType, Match, Mode, OneToAllData, OneToAllError, OneToAllResponse, OneToManyData, OneToManyError, OneToManyResponse, PedestrianProfile, PickupDropoffType, Place, PlanData, PlanError, PlanResponse, Reachable, ReachablePlace, Rental, RentalFormFactor, RentalPropulsionType, RentalReturnConstraint, ReverseGeocodeData, ReverseGeocodeError, ReverseGeocodeResponse, RiderCategory, StepInstruction, StopTime, StopsData, StopsError, StopsResponse, StoptimesData, StoptimesError, StoptimesResponse, TimeRange, Token, Transfer, TransfersData, TransfersError, TransfersResponse, TripData, TripError, TripInfo, TripResponse, TripSegment, TripsData, TripsError, TripsResponse, VertexType };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@motis-project/motis-client",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.83",
|
|
4
4
|
"description": "A JS client for the MOTIS API.",
|
|
5
5
|
"public": true,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
"scripts": {
|
|
12
12
|
"generate": "npx @hey-api/openapi-ts -i ../../../../openapi.yaml -o ./openapi/ -c @hey-api/client-fetch",
|
|
13
13
|
"transpile": "tsup openapi/**/*.ts --format esm --dts -d=./dist",
|
|
14
|
-
"build": "npm run generate && npm run transpile"
|
|
15
|
-
"publish": "npm publish --access public"
|
|
14
|
+
"build": "npm run generate && npm run transpile"
|
|
16
15
|
},
|
|
17
16
|
"repository": {
|
|
18
17
|
"type": "git",
|