@motis-project/motis-client 2.7.2 → 2.7.3
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 +2 -2
- package/dist/{chunk-UREEG3GO.js → chunk-47ZS6OWZ.js} +74 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/schemas.gen.d.ts +57 -2
- package/dist/schemas.gen.js +3 -1
- package/dist/types.gen.d.ts +64 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# motis-client
|
|
2
2
|
|
|
3
|
-
Pre-generated JS client for [MOTIS](https://github.com/motis-project/motis) based on the [OpenAPI definition](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/motis-project/motis/refs/heads/master/openapi.yaml#tag/routing/operation/plan).
|
|
3
|
+
Pre-generated JS client for [MOTIS](https://github.com/motis-project/motis) based on the [OpenAPI definition](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/motis-project/motis/refs/heads/master/openapi.yaml#tag/routing/operation/plan). See there for parameters, responses and changes between API versions depending on MOTIS versions (correlating to motis-client versions).
|
|
4
4
|
|
|
5
5
|
For example:
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ For example:
|
|
|
8
8
|
const response = await stoptimes({
|
|
9
9
|
throwOnError: true,
|
|
10
10
|
baseUrl: 'https://api.transitous.org',
|
|
11
|
-
headers
|
|
11
|
+
headers: {
|
|
12
12
|
'User-Agent': 'my-user-agent'
|
|
13
13
|
},
|
|
14
14
|
query: {
|
|
@@ -364,6 +364,10 @@ var PlaceSchema = {
|
|
|
364
364
|
description: "The ID of the stop. This is often something that users don't care about.",
|
|
365
365
|
type: "string"
|
|
366
366
|
},
|
|
367
|
+
parentId: {
|
|
368
|
+
description: "If it's not a root stop, this field contains the `stopId` of the parent stop.",
|
|
369
|
+
type: "string"
|
|
370
|
+
},
|
|
367
371
|
importance: {
|
|
368
372
|
description: "The importance of the stop between 0-1.",
|
|
369
373
|
type: "number"
|
|
@@ -506,7 +510,7 @@ var ReachableSchema = {
|
|
|
506
510
|
var StopTimeSchema = {
|
|
507
511
|
description: "departure or arrival event at a stop",
|
|
508
512
|
type: "object",
|
|
509
|
-
required: ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"],
|
|
513
|
+
required: ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeId", "directionId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"],
|
|
510
514
|
properties: {
|
|
511
515
|
place: {
|
|
512
516
|
"$ref": "#/components/schemas/Place",
|
|
@@ -539,6 +543,12 @@ For non-transit legs, null
|
|
|
539
543
|
agencyUrl: {
|
|
540
544
|
type: "string"
|
|
541
545
|
},
|
|
546
|
+
routeId: {
|
|
547
|
+
type: "string"
|
|
548
|
+
},
|
|
549
|
+
directionId: {
|
|
550
|
+
type: "string"
|
|
551
|
+
},
|
|
542
552
|
routeColor: {
|
|
543
553
|
type: "string"
|
|
544
554
|
},
|
|
@@ -1311,6 +1321,12 @@ For non-transit legs, null
|
|
|
1311
1321
|
description: "final stop of this trip (can differ from headsign)",
|
|
1312
1322
|
"$ref": "#/components/schemas/Place"
|
|
1313
1323
|
},
|
|
1324
|
+
routeId: {
|
|
1325
|
+
type: "string"
|
|
1326
|
+
},
|
|
1327
|
+
directionId: {
|
|
1328
|
+
type: "string"
|
|
1329
|
+
},
|
|
1314
1330
|
routeColor: {
|
|
1315
1331
|
type: "string"
|
|
1316
1332
|
},
|
|
@@ -1616,6 +1632,62 @@ transfer duration in minutes for the car profile
|
|
|
1616
1632
|
}
|
|
1617
1633
|
}
|
|
1618
1634
|
};
|
|
1635
|
+
var OneToManyParamsSchema = {
|
|
1636
|
+
type: "object",
|
|
1637
|
+
required: ["one", "many", "mode", "max", "maxMatchingDistance", "elevationCosts", "arriveBy"],
|
|
1638
|
+
properties: {
|
|
1639
|
+
one: {
|
|
1640
|
+
description: "geo location as latitude;longitude",
|
|
1641
|
+
type: "string"
|
|
1642
|
+
},
|
|
1643
|
+
many: {
|
|
1644
|
+
description: "geo locations as latitude;longitude,latitude;longitude,...",
|
|
1645
|
+
type: "array",
|
|
1646
|
+
items: {
|
|
1647
|
+
type: "string"
|
|
1648
|
+
},
|
|
1649
|
+
explode: false
|
|
1650
|
+
},
|
|
1651
|
+
mode: {
|
|
1652
|
+
description: `routing profile to use (currently supported: \`WALK\`, \`BIKE\`, \`CAR\`)
|
|
1653
|
+
`,
|
|
1654
|
+
"$ref": "#/components/schemas/Mode"
|
|
1655
|
+
},
|
|
1656
|
+
max: {
|
|
1657
|
+
description: "maximum travel time in seconds",
|
|
1658
|
+
type: "number"
|
|
1659
|
+
},
|
|
1660
|
+
maxMatchingDistance: {
|
|
1661
|
+
description: "maximum matching distance in meters to match geo coordinates to the street network",
|
|
1662
|
+
type: "number"
|
|
1663
|
+
},
|
|
1664
|
+
elevationCosts: {
|
|
1665
|
+
description: `Optional. Default is \`NONE\`.
|
|
1666
|
+
|
|
1667
|
+
Set an elevation cost profile, to penalize routes with incline.
|
|
1668
|
+
- \`NONE\`: No additional costs for elevations. This is the default behavior
|
|
1669
|
+
- \`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.
|
|
1670
|
+
- \`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.
|
|
1671
|
+
|
|
1672
|
+
As using an elevation costs profile will increase the travel duration,
|
|
1673
|
+
routing through steep terrain may exceed the maximal allowed duration,
|
|
1674
|
+
causing a location to appear unreachable.
|
|
1675
|
+
Increasing the maximum travel time for these segments may resolve this issue.
|
|
1676
|
+
|
|
1677
|
+
Elevation cost profiles are currently used by following street modes:
|
|
1678
|
+
- \`BIKE\`
|
|
1679
|
+
`,
|
|
1680
|
+
"$ref": "#/components/schemas/ElevationCosts",
|
|
1681
|
+
default: "NONE"
|
|
1682
|
+
},
|
|
1683
|
+
arriveBy: {
|
|
1684
|
+
description: `true = many to one
|
|
1685
|
+
false = one to many
|
|
1686
|
+
`,
|
|
1687
|
+
type: "boolean"
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
};
|
|
1619
1691
|
var ErrorSchema = {
|
|
1620
1692
|
type: "object",
|
|
1621
1693
|
properties: {
|
|
@@ -1673,5 +1745,6 @@ export {
|
|
|
1673
1745
|
FareTransferSchema,
|
|
1674
1746
|
ItinerarySchema,
|
|
1675
1747
|
TransferSchema,
|
|
1748
|
+
OneToManyParamsSchema,
|
|
1676
1749
|
ErrorSchema
|
|
1677
1750
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AlertCauseSchema, AlertEffectSchema, AlertSchema, AlertSeverityLevelSchema, AreaSchema, CyclingSpeedSchema, DirectionSchema, DurationSchema, ElevationCostsSchema, EncodedPolylineSchema, ErrorSchema, FareMediaSchema, FareMediaTypeSchema, FareProductSchema, FareTransferRuleSchema, FareTransferSchema, ItinerarySchema, LegSchema, LocationTypeSchema, MatchSchema, ModeSchema, MultiPolygonSchema, PedestrianProfileSchema, PedestrianSpeedSchema, PickupDropoffTypeSchema, PlaceSchema, ReachablePlaceSchema, ReachableSchema, RentalFormFactorSchema, RentalPropulsionTypeSchema, RentalProviderGroupSchema, RentalProviderSchema, RentalReturnConstraintSchema, RentalSchema, RentalStationSchema, RentalVehicleSchema, RentalVehicleTypeSchema, RentalZoneRestrictionsSchema, RentalZoneSchema, RiderCategorySchema, StepInstructionSchema, StopTimeSchema, TimeRangeSchema, TokenSchema, TransferSchema, TripInfoSchema, TripSegmentSchema, VertexTypeSchema } from './schemas.gen.js';
|
|
1
|
+
export { AlertCauseSchema, AlertEffectSchema, AlertSchema, AlertSeverityLevelSchema, AreaSchema, CyclingSpeedSchema, DirectionSchema, DurationSchema, ElevationCostsSchema, EncodedPolylineSchema, ErrorSchema, FareMediaSchema, FareMediaTypeSchema, FareProductSchema, FareTransferRuleSchema, FareTransferSchema, ItinerarySchema, LegSchema, LocationTypeSchema, MatchSchema, ModeSchema, MultiPolygonSchema, OneToManyParamsSchema, PedestrianProfileSchema, PedestrianSpeedSchema, PickupDropoffTypeSchema, PlaceSchema, ReachablePlaceSchema, ReachableSchema, RentalFormFactorSchema, RentalPropulsionTypeSchema, RentalProviderGroupSchema, RentalProviderSchema, RentalReturnConstraintSchema, RentalSchema, RentalStationSchema, RentalVehicleSchema, RentalVehicleTypeSchema, RentalZoneRestrictionsSchema, RentalZoneSchema, RiderCategorySchema, StepInstructionSchema, StopTimeSchema, TimeRangeSchema, TokenSchema, TransferSchema, TripInfoSchema, TripSegmentSchema, VertexTypeSchema } from './schemas.gen.js';
|
|
2
2
|
export { client, geocode, initial, levels, oneToAll, oneToMany, plan, rentals, reverseGeocode, stops, stoptimes, transfers, trip, trips } from './services.gen.js';
|
|
3
|
-
export { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, CyclingSpeed, Direction, Duration, ElevationCosts, EncodedPolyline, Error, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule, GeocodeData, GeocodeError, GeocodeResponse, InitialError, InitialResponse, Itinerary, Leg, LevelsData, LevelsError, LevelsResponse, LocationType, Match, Mode, MultiPolygon, OneToAllData, OneToAllError, OneToAllResponse, OneToManyData, OneToManyError, OneToManyResponse, PedestrianProfile, PedestrianSpeed, PickupDropoffType, Place, PlanData, PlanError, PlanResponse, Reachable, ReachablePlace, Rental, RentalFormFactor, RentalPropulsionType, RentalProvider, RentalProviderGroup, RentalReturnConstraint, RentalStation, RentalVehicle, RentalVehicleType, RentalZone, RentalZoneRestrictions, RentalsData, RentalsError, RentalsResponse, 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 } from './types.gen.js';
|
|
3
|
+
export { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, CyclingSpeed, Direction, Duration, ElevationCosts, EncodedPolyline, Error, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule, GeocodeData, GeocodeError, GeocodeResponse, InitialError, InitialResponse, Itinerary, Leg, LevelsData, LevelsError, LevelsResponse, LocationType, Match, Mode, MultiPolygon, OneToAllData, OneToAllError, OneToAllResponse, OneToManyData, OneToManyError, OneToManyParams, OneToManyResponse, PedestrianProfile, PedestrianSpeed, PickupDropoffType, Place, PlanData, PlanError, PlanResponse, Reachable, ReachablePlace, Rental, RentalFormFactor, RentalPropulsionType, RentalProvider, RentalProviderGroup, RentalReturnConstraint, RentalStation, RentalVehicle, RentalVehicleType, RentalZone, RentalZoneRestrictions, RentalsData, RentalsError, RentalsResponse, 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 } from './types.gen.js';
|
|
4
4
|
import '@hey-api/client-fetch';
|
package/dist/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
MatchSchema,
|
|
22
22
|
ModeSchema,
|
|
23
23
|
MultiPolygonSchema,
|
|
24
|
+
OneToManyParamsSchema,
|
|
24
25
|
PedestrianProfileSchema,
|
|
25
26
|
PedestrianSpeedSchema,
|
|
26
27
|
PickupDropoffTypeSchema,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
TripInfoSchema,
|
|
48
49
|
TripSegmentSchema,
|
|
49
50
|
VertexTypeSchema
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-47ZS6OWZ.js";
|
|
51
52
|
import {
|
|
52
53
|
client,
|
|
53
54
|
geocode,
|
|
@@ -88,6 +89,7 @@ export {
|
|
|
88
89
|
MatchSchema,
|
|
89
90
|
ModeSchema,
|
|
90
91
|
MultiPolygonSchema,
|
|
92
|
+
OneToManyParamsSchema,
|
|
91
93
|
PedestrianProfileSchema,
|
|
92
94
|
PedestrianSpeedSchema,
|
|
93
95
|
PickupDropoffTypeSchema,
|
package/dist/schemas.gen.d.ts
CHANGED
|
@@ -280,6 +280,10 @@ declare const PlaceSchema: {
|
|
|
280
280
|
readonly description: "The ID of the stop. This is often something that users don't care about.";
|
|
281
281
|
readonly type: "string";
|
|
282
282
|
};
|
|
283
|
+
readonly parentId: {
|
|
284
|
+
readonly description: "If it's not a root stop, this field contains the `stopId` of the parent stop.";
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
};
|
|
283
287
|
readonly importance: {
|
|
284
288
|
readonly description: "The importance of the stop between 0-1.";
|
|
285
289
|
readonly type: "number";
|
|
@@ -412,7 +416,7 @@ declare const ReachableSchema: {
|
|
|
412
416
|
declare const StopTimeSchema: {
|
|
413
417
|
readonly description: "departure or arrival event at a stop";
|
|
414
418
|
readonly type: "object";
|
|
415
|
-
readonly required: readonly ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"];
|
|
419
|
+
readonly required: readonly ["place", "mode", "realTime", "headsign", "tripTo", "agencyId", "agencyName", "agencyUrl", "tripId", "routeId", "directionId", "routeShortName", "routeLongName", "tripShortName", "displayName", "pickupDropoffType", "cancelled", "tripCancelled", "source"];
|
|
416
420
|
readonly properties: {
|
|
417
421
|
readonly place: {
|
|
418
422
|
readonly $ref: "#/components/schemas/Place";
|
|
@@ -443,6 +447,12 @@ declare const StopTimeSchema: {
|
|
|
443
447
|
readonly agencyUrl: {
|
|
444
448
|
readonly type: "string";
|
|
445
449
|
};
|
|
450
|
+
readonly routeId: {
|
|
451
|
+
readonly type: "string";
|
|
452
|
+
};
|
|
453
|
+
readonly directionId: {
|
|
454
|
+
readonly type: "string";
|
|
455
|
+
};
|
|
446
456
|
readonly routeColor: {
|
|
447
457
|
readonly type: "string";
|
|
448
458
|
};
|
|
@@ -1162,6 +1172,12 @@ declare const LegSchema: {
|
|
|
1162
1172
|
readonly description: "final stop of this trip (can differ from headsign)";
|
|
1163
1173
|
readonly $ref: "#/components/schemas/Place";
|
|
1164
1174
|
};
|
|
1175
|
+
readonly routeId: {
|
|
1176
|
+
readonly type: "string";
|
|
1177
|
+
};
|
|
1178
|
+
readonly directionId: {
|
|
1179
|
+
readonly type: "string";
|
|
1180
|
+
};
|
|
1165
1181
|
readonly routeColor: {
|
|
1166
1182
|
readonly type: "string";
|
|
1167
1183
|
};
|
|
@@ -1415,6 +1431,45 @@ declare const TransferSchema: {
|
|
|
1415
1431
|
};
|
|
1416
1432
|
};
|
|
1417
1433
|
};
|
|
1434
|
+
declare const OneToManyParamsSchema: {
|
|
1435
|
+
readonly type: "object";
|
|
1436
|
+
readonly required: readonly ["one", "many", "mode", "max", "maxMatchingDistance", "elevationCosts", "arriveBy"];
|
|
1437
|
+
readonly properties: {
|
|
1438
|
+
readonly one: {
|
|
1439
|
+
readonly description: "geo location as latitude;longitude";
|
|
1440
|
+
readonly type: "string";
|
|
1441
|
+
};
|
|
1442
|
+
readonly many: {
|
|
1443
|
+
readonly description: "geo locations as latitude;longitude,latitude;longitude,...";
|
|
1444
|
+
readonly type: "array";
|
|
1445
|
+
readonly items: {
|
|
1446
|
+
readonly type: "string";
|
|
1447
|
+
};
|
|
1448
|
+
readonly explode: false;
|
|
1449
|
+
};
|
|
1450
|
+
readonly mode: {
|
|
1451
|
+
readonly description: "routing profile to use (currently supported: `WALK`, `BIKE`, `CAR`)\n";
|
|
1452
|
+
readonly $ref: "#/components/schemas/Mode";
|
|
1453
|
+
};
|
|
1454
|
+
readonly max: {
|
|
1455
|
+
readonly description: "maximum travel time in seconds";
|
|
1456
|
+
readonly type: "number";
|
|
1457
|
+
};
|
|
1458
|
+
readonly maxMatchingDistance: {
|
|
1459
|
+
readonly description: "maximum matching distance in meters to match geo coordinates to the street network";
|
|
1460
|
+
readonly type: "number";
|
|
1461
|
+
};
|
|
1462
|
+
readonly elevationCosts: {
|
|
1463
|
+
readonly description: "Optional. Default is `NONE`.\n\nSet an elevation cost profile, to penalize routes with incline.\n- `NONE`: No additional costs for elevations. This is the default behavior\n- `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.\n- `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.\n\nAs using an elevation costs profile will increase the travel duration,\nrouting through steep terrain may exceed the maximal allowed duration,\ncausing a location to appear unreachable.\nIncreasing the maximum travel time for these segments may resolve this issue.\n\nElevation cost profiles are currently used by following street modes:\n- `BIKE`\n";
|
|
1464
|
+
readonly $ref: "#/components/schemas/ElevationCosts";
|
|
1465
|
+
readonly default: "NONE";
|
|
1466
|
+
};
|
|
1467
|
+
readonly arriveBy: {
|
|
1468
|
+
readonly description: "true = many to one\nfalse = one to many\n";
|
|
1469
|
+
readonly type: "boolean";
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
};
|
|
1418
1473
|
declare const ErrorSchema: {
|
|
1419
1474
|
readonly type: "object";
|
|
1420
1475
|
readonly properties: {
|
|
@@ -1424,4 +1479,4 @@ declare const ErrorSchema: {
|
|
|
1424
1479
|
};
|
|
1425
1480
|
};
|
|
1426
1481
|
|
|
1427
|
-
export { AlertCauseSchema, AlertEffectSchema, AlertSchema, AlertSeverityLevelSchema, AreaSchema, CyclingSpeedSchema, DirectionSchema, DurationSchema, ElevationCostsSchema, EncodedPolylineSchema, ErrorSchema, FareMediaSchema, FareMediaTypeSchema, FareProductSchema, FareTransferRuleSchema, FareTransferSchema, ItinerarySchema, LegSchema, LocationTypeSchema, MatchSchema, ModeSchema, MultiPolygonSchema, PedestrianProfileSchema, PedestrianSpeedSchema, PickupDropoffTypeSchema, PlaceSchema, ReachablePlaceSchema, ReachableSchema, RentalFormFactorSchema, RentalPropulsionTypeSchema, RentalProviderGroupSchema, RentalProviderSchema, RentalReturnConstraintSchema, RentalSchema, RentalStationSchema, RentalVehicleSchema, RentalVehicleTypeSchema, RentalZoneRestrictionsSchema, RentalZoneSchema, RiderCategorySchema, StepInstructionSchema, StopTimeSchema, TimeRangeSchema, TokenSchema, TransferSchema, TripInfoSchema, TripSegmentSchema, VertexTypeSchema };
|
|
1482
|
+
export { AlertCauseSchema, AlertEffectSchema, AlertSchema, AlertSeverityLevelSchema, AreaSchema, CyclingSpeedSchema, DirectionSchema, DurationSchema, ElevationCostsSchema, EncodedPolylineSchema, ErrorSchema, FareMediaSchema, FareMediaTypeSchema, FareProductSchema, FareTransferRuleSchema, FareTransferSchema, ItinerarySchema, LegSchema, LocationTypeSchema, MatchSchema, ModeSchema, MultiPolygonSchema, OneToManyParamsSchema, PedestrianProfileSchema, PedestrianSpeedSchema, PickupDropoffTypeSchema, PlaceSchema, ReachablePlaceSchema, ReachableSchema, RentalFormFactorSchema, RentalPropulsionTypeSchema, RentalProviderGroupSchema, RentalProviderSchema, RentalReturnConstraintSchema, RentalSchema, RentalStationSchema, RentalVehicleSchema, RentalVehicleTypeSchema, RentalZoneRestrictionsSchema, RentalZoneSchema, RiderCategorySchema, StepInstructionSchema, StopTimeSchema, TimeRangeSchema, TokenSchema, TransferSchema, TripInfoSchema, TripSegmentSchema, VertexTypeSchema };
|
package/dist/schemas.gen.js
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
MatchSchema,
|
|
22
22
|
ModeSchema,
|
|
23
23
|
MultiPolygonSchema,
|
|
24
|
+
OneToManyParamsSchema,
|
|
24
25
|
PedestrianProfileSchema,
|
|
25
26
|
PedestrianSpeedSchema,
|
|
26
27
|
PickupDropoffTypeSchema,
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
TripInfoSchema,
|
|
48
49
|
TripSegmentSchema,
|
|
49
50
|
VertexTypeSchema
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-47ZS6OWZ.js";
|
|
51
52
|
export {
|
|
52
53
|
AlertCauseSchema,
|
|
53
54
|
AlertEffectSchema,
|
|
@@ -71,6 +72,7 @@ export {
|
|
|
71
72
|
MatchSchema,
|
|
72
73
|
ModeSchema,
|
|
73
74
|
MultiPolygonSchema,
|
|
75
|
+
OneToManyParamsSchema,
|
|
74
76
|
PedestrianProfileSchema,
|
|
75
77
|
PedestrianSpeedSchema,
|
|
76
78
|
PickupDropoffTypeSchema,
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -317,6 +317,10 @@ type Place = {
|
|
|
317
317
|
* The ID of the stop. This is often something that users don't care about.
|
|
318
318
|
*/
|
|
319
319
|
stopId?: string;
|
|
320
|
+
/**
|
|
321
|
+
* If it's not a root stop, this field contains the `stopId` of the parent stop.
|
|
322
|
+
*/
|
|
323
|
+
parentId?: string;
|
|
320
324
|
/**
|
|
321
325
|
* The importance of the stop between 0-1.
|
|
322
326
|
*/
|
|
@@ -468,6 +472,8 @@ type StopTime = {
|
|
|
468
472
|
agencyId: string;
|
|
469
473
|
agencyName: string;
|
|
470
474
|
agencyUrl: string;
|
|
475
|
+
routeId: string;
|
|
476
|
+
directionId: string;
|
|
471
477
|
routeColor?: string;
|
|
472
478
|
routeTextColor?: string;
|
|
473
479
|
tripId: string;
|
|
@@ -1070,6 +1076,8 @@ type Leg = {
|
|
|
1070
1076
|
* final stop of this trip (can differ from headsign)
|
|
1071
1077
|
*/
|
|
1072
1078
|
tripTo?: Place;
|
|
1079
|
+
routeId?: string;
|
|
1080
|
+
directionId?: string;
|
|
1073
1081
|
routeColor?: string;
|
|
1074
1082
|
routeTextColor?: string;
|
|
1075
1083
|
routeType?: number;
|
|
@@ -1284,6 +1292,53 @@ type Transfer = {
|
|
|
1284
1292
|
*/
|
|
1285
1293
|
car?: number;
|
|
1286
1294
|
};
|
|
1295
|
+
type OneToManyParams = {
|
|
1296
|
+
/**
|
|
1297
|
+
* geo location as latitude;longitude
|
|
1298
|
+
*/
|
|
1299
|
+
one: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* geo locations as latitude;longitude,latitude;longitude,...
|
|
1302
|
+
*/
|
|
1303
|
+
many: Array<(string)>;
|
|
1304
|
+
/**
|
|
1305
|
+
* routing profile to use (currently supported: \`WALK\`, \`BIKE\`, \`CAR\`)
|
|
1306
|
+
*
|
|
1307
|
+
*/
|
|
1308
|
+
mode: Mode;
|
|
1309
|
+
/**
|
|
1310
|
+
* maximum travel time in seconds
|
|
1311
|
+
*/
|
|
1312
|
+
max: number;
|
|
1313
|
+
/**
|
|
1314
|
+
* maximum matching distance in meters to match geo coordinates to the street network
|
|
1315
|
+
*/
|
|
1316
|
+
maxMatchingDistance: number;
|
|
1317
|
+
/**
|
|
1318
|
+
* Optional. Default is `NONE`.
|
|
1319
|
+
*
|
|
1320
|
+
* Set an elevation cost profile, to penalize routes with incline.
|
|
1321
|
+
* - `NONE`: No additional costs for elevations. This is the default behavior
|
|
1322
|
+
* - `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.
|
|
1323
|
+
* - `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.
|
|
1324
|
+
*
|
|
1325
|
+
* As using an elevation costs profile will increase the travel duration,
|
|
1326
|
+
* routing through steep terrain may exceed the maximal allowed duration,
|
|
1327
|
+
* causing a location to appear unreachable.
|
|
1328
|
+
* Increasing the maximum travel time for these segments may resolve this issue.
|
|
1329
|
+
*
|
|
1330
|
+
* Elevation cost profiles are currently used by following street modes:
|
|
1331
|
+
* - `BIKE`
|
|
1332
|
+
*
|
|
1333
|
+
*/
|
|
1334
|
+
elevationCosts: ElevationCosts;
|
|
1335
|
+
/**
|
|
1336
|
+
* true = many to one
|
|
1337
|
+
* false = one to many
|
|
1338
|
+
*
|
|
1339
|
+
*/
|
|
1340
|
+
arriveBy: boolean;
|
|
1341
|
+
};
|
|
1287
1342
|
type Error = {
|
|
1288
1343
|
error?: string;
|
|
1289
1344
|
};
|
|
@@ -1708,9 +1763,9 @@ type PlanData = {
|
|
|
1708
1763
|
*/
|
|
1709
1764
|
requireCarTransport?: boolean;
|
|
1710
1765
|
/**
|
|
1711
|
-
* Optional. Default is
|
|
1766
|
+
* Optional. Default is 15 minutes which is `900`.
|
|
1712
1767
|
*
|
|
1713
|
-
* The length of the search-window in seconds. Default value
|
|
1768
|
+
* The length of the search-window in seconds. Default value 15 minutes.
|
|
1714
1769
|
*
|
|
1715
1770
|
* - `arriveBy=true`: number of seconds between the earliest departure time and latest departure time
|
|
1716
1771
|
* - `arriveBy=false`: number of seconds between the earliest arrival time and the latest arrival time
|
|
@@ -2118,6 +2173,12 @@ type GeocodeData = {
|
|
|
2118
2173
|
*
|
|
2119
2174
|
*/
|
|
2120
2175
|
language?: Array<(string)>;
|
|
2176
|
+
/**
|
|
2177
|
+
* Optional. Filter stops by available transport modes.
|
|
2178
|
+
* Defaults to applying no filter.
|
|
2179
|
+
*
|
|
2180
|
+
*/
|
|
2181
|
+
mode?: Array<Mode>;
|
|
2121
2182
|
/**
|
|
2122
2183
|
* Optional. Used for biasing results towards the coordinate.
|
|
2123
2184
|
*
|
|
@@ -2442,4 +2503,4 @@ type TransfersResponse = ({
|
|
|
2442
2503
|
});
|
|
2443
2504
|
type TransfersError = unknown;
|
|
2444
2505
|
|
|
2445
|
-
export type { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, CyclingSpeed, Direction, Duration, ElevationCosts, EncodedPolyline, Error, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule, GeocodeData, GeocodeError, GeocodeResponse, InitialError, InitialResponse, Itinerary, Leg, LevelsData, LevelsError, LevelsResponse, LocationType, Match, Mode, MultiPolygon, OneToAllData, OneToAllError, OneToAllResponse, OneToManyData, OneToManyError, OneToManyResponse, PedestrianProfile, PedestrianSpeed, PickupDropoffType, Place, PlanData, PlanError, PlanResponse, Reachable, ReachablePlace, Rental, RentalFormFactor, RentalPropulsionType, RentalProvider, RentalProviderGroup, RentalReturnConstraint, RentalStation, RentalVehicle, RentalVehicleType, RentalZone, RentalZoneRestrictions, RentalsData, RentalsError, RentalsResponse, 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 };
|
|
2506
|
+
export type { Alert, AlertCause, AlertEffect, AlertSeverityLevel, Area, CyclingSpeed, Direction, Duration, ElevationCosts, EncodedPolyline, Error, FareMedia, FareMediaType, FareProduct, FareTransfer, FareTransferRule, GeocodeData, GeocodeError, GeocodeResponse, InitialError, InitialResponse, Itinerary, Leg, LevelsData, LevelsError, LevelsResponse, LocationType, Match, Mode, MultiPolygon, OneToAllData, OneToAllError, OneToAllResponse, OneToManyData, OneToManyError, OneToManyParams, OneToManyResponse, PedestrianProfile, PedestrianSpeed, PickupDropoffType, Place, PlanData, PlanError, PlanResponse, Reachable, ReachablePlace, Rental, RentalFormFactor, RentalPropulsionType, RentalProvider, RentalProviderGroup, RentalReturnConstraint, RentalStation, RentalVehicle, RentalVehicleType, RentalZone, RentalZoneRestrictions, RentalsData, RentalsError, RentalsResponse, 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 };
|