@tiducto/spider-sdk-typescript 1.0.0 → 1.2.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/README.md +2 -2
- package/dist/contract/routing/AccessibilityPreferencesInput.d.ts +1 -0
- package/dist/contract/routing/AccessibilityPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/AlightPreferencesInput.d.ts +2 -0
- package/dist/contract/routing/AlightPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/BoardPreferencesInput.d.ts +4 -1
- package/dist/contract/routing/BoardPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/{StopDeparturesStop2.d.ts → DepartureBoard.d.ts} +4 -2
- package/dist/contract/routing/DepartureBoard.d.ts.map +1 -0
- package/dist/contract/routing/DepartureBoard.js +2 -0
- package/dist/contract/routing/DepartureBoard.js.map +1 -0
- package/dist/contract/routing/DeparturesRequest.d.ts +12 -0
- package/dist/contract/routing/DeparturesRequest.d.ts.map +1 -0
- package/dist/contract/routing/DeparturesRequest.js +2 -0
- package/dist/contract/routing/DeparturesRequest.js.map +1 -0
- package/dist/contract/routing/DeparturesResponse.d.ts +6 -0
- package/dist/contract/routing/DeparturesResponse.d.ts.map +1 -0
- package/dist/contract/routing/DeparturesResponse.js +2 -0
- package/dist/contract/routing/DeparturesResponse.js.map +1 -0
- package/dist/contract/routing/ErrorResponse.d.ts +4 -1
- package/dist/contract/routing/ErrorResponse.d.ts.map +1 -1
- package/dist/contract/routing/Geometry.d.ts +1 -0
- package/dist/contract/routing/Geometry.d.ts.map +1 -1
- package/dist/contract/routing/Itinerary.d.ts +4 -1
- package/dist/contract/routing/Itinerary.d.ts.map +1 -1
- package/dist/contract/routing/Leg.d.ts +11 -1
- package/dist/contract/routing/Leg.d.ts.map +1 -1
- package/dist/contract/routing/LegTime.d.ts +1 -0
- package/dist/contract/routing/LegTime.d.ts.map +1 -1
- package/dist/contract/routing/Place.d.ts +1 -0
- package/dist/contract/routing/Place.d.ts.map +1 -1
- package/dist/contract/routing/PlanCoordinateInput.d.ts +3 -0
- package/dist/contract/routing/PlanCoordinateInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanDateTimeInput.d.ts +3 -0
- package/dist/contract/routing/PlanDateTimeInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanLabeledLocationInput.d.ts +1 -1
- package/dist/contract/routing/PlanLabeledLocationInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanLocationInput.d.ts +3 -0
- package/dist/contract/routing/PlanLocationInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanModesInput.d.ts +4 -3
- package/dist/contract/routing/PlanModesInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanPageInfo.d.ts +3 -0
- package/dist/contract/routing/PlanPageInfo.d.ts.map +1 -1
- package/dist/contract/routing/PlanPassThroughViaLocationInput.d.ts +2 -1
- package/dist/contract/routing/PlanPassThroughViaLocationInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanPreferencesInput.d.ts +2 -1
- package/dist/contract/routing/PlanPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanStopLocationInput.d.ts +2 -0
- package/dist/contract/routing/PlanStopLocationInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanStreamChunkEvent.d.ts +13 -0
- package/dist/contract/routing/PlanStreamChunkEvent.d.ts.map +1 -0
- package/dist/contract/routing/PlanStreamChunkEvent.js +2 -0
- package/dist/contract/routing/PlanStreamChunkEvent.js.map +1 -0
- package/dist/contract/routing/PlanStreamDoneEvent.d.ts +12 -0
- package/dist/contract/routing/PlanStreamDoneEvent.d.ts.map +1 -0
- package/dist/contract/routing/PlanStreamDoneEvent.js +2 -0
- package/dist/contract/routing/PlanStreamDoneEvent.js.map +1 -0
- package/dist/contract/routing/PlanStreamPageInfoEvent.d.ts +15 -0
- package/dist/contract/routing/PlanStreamPageInfoEvent.d.ts.map +1 -0
- package/dist/contract/routing/PlanStreamPageInfoEvent.js +2 -0
- package/dist/contract/routing/PlanStreamPageInfoEvent.js.map +1 -0
- package/dist/contract/routing/PlanStreamRequest.d.ts +29 -0
- package/dist/contract/routing/PlanStreamRequest.d.ts.map +1 -0
- package/dist/contract/routing/PlanStreamRequest.js +2 -0
- package/dist/contract/routing/PlanStreamRequest.js.map +1 -0
- package/dist/contract/routing/PlanStreetPreferencesInput.d.ts +1 -6
- package/dist/contract/routing/PlanStreetPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanTransitModePreferenceInput.d.ts +2 -1
- package/dist/contract/routing/PlanTransitModePreferenceInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanTransitModesInput.d.ts +2 -6
- package/dist/contract/routing/PlanTransitModesInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanTripRequest.d.ts +31 -0
- package/dist/contract/routing/PlanTripRequest.d.ts.map +1 -0
- package/dist/contract/routing/PlanTripRequest.js +2 -0
- package/dist/contract/routing/PlanTripRequest.js.map +1 -0
- package/dist/contract/routing/PlanTripResponse.d.ts +13 -0
- package/dist/contract/routing/PlanTripResponse.d.ts.map +1 -0
- package/dist/contract/routing/PlanTripResponse.js +2 -0
- package/dist/contract/routing/PlanTripResponse.js.map +1 -0
- package/dist/contract/routing/PlanViaLocationInput.d.ts +3 -0
- package/dist/contract/routing/PlanViaLocationInput.d.ts.map +1 -1
- package/dist/contract/routing/PlanVisitViaLocationInput.d.ts +4 -4
- package/dist/contract/routing/PlanVisitViaLocationInput.d.ts.map +1 -1
- package/dist/contract/routing/RealTimeEstimate.d.ts +1 -0
- package/dist/contract/routing/RealTimeEstimate.d.ts.map +1 -1
- package/dist/contract/routing/Reliability.d.ts +3 -0
- package/dist/contract/routing/Reliability.d.ts.map +1 -0
- package/dist/contract/routing/Reliability.js +2 -0
- package/dist/contract/routing/Reliability.js.map +1 -0
- package/dist/contract/routing/Route.d.ts +2 -0
- package/dist/contract/routing/Route.d.ts.map +1 -1
- package/dist/contract/routing/RoutingError.d.ts +2 -0
- package/dist/contract/routing/RoutingError.d.ts.map +1 -1
- package/dist/contract/routing/Stop.d.ts +2 -0
- package/dist/contract/routing/Stop.d.ts.map +1 -1
- package/dist/contract/routing/StopDeparturesRoute.d.ts +2 -0
- package/dist/contract/routing/StopDeparturesRoute.d.ts.map +1 -1
- package/dist/contract/routing/StopDeparturesStop.d.ts +1 -0
- package/dist/contract/routing/StopDeparturesStop.d.ts.map +1 -1
- package/dist/contract/routing/StopDeparturesStoptime.d.ts +7 -0
- package/dist/contract/routing/StopDeparturesStoptime.d.ts.map +1 -1
- package/dist/contract/routing/Stoptime.d.ts +8 -0
- package/dist/contract/routing/Stoptime.d.ts.map +1 -1
- package/dist/contract/routing/TransferPreferencesInput.d.ts +5 -2
- package/dist/contract/routing/TransferPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/TransitFilterInput.d.ts +2 -1
- package/dist/contract/routing/TransitFilterInput.d.ts.map +1 -1
- package/dist/contract/routing/TransitFilterSelectInput.d.ts +4 -1
- package/dist/contract/routing/TransitFilterSelectInput.d.ts.map +1 -1
- package/dist/contract/routing/TransitModePreferenceCostInput.d.ts +2 -0
- package/dist/contract/routing/TransitModePreferenceCostInput.d.ts.map +1 -1
- package/dist/contract/routing/TransitPreferencesInput.d.ts +4 -4
- package/dist/contract/routing/TransitPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/TripGeometry.d.ts +2 -0
- package/dist/contract/routing/TripGeometry.d.ts.map +1 -1
- package/dist/contract/routing/TripRequest.d.ts +8 -0
- package/dist/contract/routing/TripRequest.d.ts.map +1 -0
- package/dist/contract/routing/TripRequest.js +2 -0
- package/dist/contract/routing/TripRequest.js.map +1 -0
- package/dist/contract/routing/TripResponse.d.ts +3 -4
- package/dist/contract/routing/TripResponse.d.ts.map +1 -1
- package/dist/contract/routing/TripRoute.d.ts +2 -0
- package/dist/contract/routing/TripRoute.d.ts.map +1 -1
- package/dist/contract/routing/TripStop.d.ts +2 -0
- package/dist/contract/routing/TripStop.d.ts.map +1 -1
- package/dist/contract/routing/{TripTrip.d.ts → TripTimetable.d.ts} +4 -2
- package/dist/contract/routing/TripTimetable.d.ts.map +1 -0
- package/dist/contract/routing/TripTimetable.js +2 -0
- package/dist/contract/routing/TripTimetable.js.map +1 -0
- package/dist/contract/routing/WalkPreferencesInput.d.ts +6 -3
- package/dist/contract/routing/WalkPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/WheelchairPreferencesInput.d.ts +2 -0
- package/dist/contract/routing/WheelchairPreferencesInput.d.ts.map +1 -1
- package/dist/contract/routing/index.d.ts +12 -41
- package/dist/contract/routing/index.d.ts.map +1 -1
- package/dist/contractVersion.d.ts +1 -1
- package/dist/contractVersion.js +1 -1
- package/dist/enums.d.ts +2 -0
- package/dist/enums.d.ts.map +1 -1
- package/dist/enums.js.map +1 -1
- package/dist/errors.d.ts +7 -16
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +11 -17
- package/dist/errors.js.map +1 -1
- package/dist/http.d.ts +2 -29
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +5 -37
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/location.d.ts +4 -2
- package/dist/location.d.ts.map +1 -1
- package/dist/location.js +4 -2
- package/dist/location.js.map +1 -1
- package/dist/realtime.js +4 -4
- package/dist/realtime.js.map +1 -1
- package/dist/routing.d.ts +18 -3
- package/dist/routing.d.ts.map +1 -1
- package/dist/routing.js +61 -90
- package/dist/routing.js.map +1 -1
- package/dist/sdk.d.ts +1 -1
- package/dist/sdkVersion.d.ts +1 -1
- package/dist/sdkVersion.js +1 -1
- package/dist/stops.js +2 -2
- package/dist/stops.js.map +1 -1
- package/package.json +1 -1
- package/dist/contract/routing/BicycleParkingPreferencesInput.d.ts +0 -7
- package/dist/contract/routing/BicycleParkingPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/BicycleParkingPreferencesInput.js +0 -2
- package/dist/contract/routing/BicycleParkingPreferencesInput.js.map +0 -1
- package/dist/contract/routing/BicyclePreferencesInput.d.ts +0 -14
- package/dist/contract/routing/BicyclePreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/BicyclePreferencesInput.js +0 -2
- package/dist/contract/routing/BicyclePreferencesInput.js.map +0 -1
- package/dist/contract/routing/BicycleRentalPreferencesInput.d.ts +0 -7
- package/dist/contract/routing/BicycleRentalPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/BicycleRentalPreferencesInput.js +0 -2
- package/dist/contract/routing/BicycleRentalPreferencesInput.js.map +0 -1
- package/dist/contract/routing/BicycleWalkPreferencesCostInput.d.ts +0 -5
- package/dist/contract/routing/BicycleWalkPreferencesCostInput.d.ts.map +0 -1
- package/dist/contract/routing/BicycleWalkPreferencesCostInput.js +0 -2
- package/dist/contract/routing/BicycleWalkPreferencesCostInput.js.map +0 -1
- package/dist/contract/routing/BicycleWalkPreferencesInput.d.ts +0 -7
- package/dist/contract/routing/BicycleWalkPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/BicycleWalkPreferencesInput.js +0 -2
- package/dist/contract/routing/BicycleWalkPreferencesInput.js.map +0 -1
- package/dist/contract/routing/CarParkingPreferencesInput.d.ts +0 -7
- package/dist/contract/routing/CarParkingPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/CarParkingPreferencesInput.js +0 -2
- package/dist/contract/routing/CarParkingPreferencesInput.js.map +0 -1
- package/dist/contract/routing/CarPreferencesInput.d.ts +0 -9
- package/dist/contract/routing/CarPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/CarPreferencesInput.js +0 -2
- package/dist/contract/routing/CarPreferencesInput.js.map +0 -1
- package/dist/contract/routing/CarRentalPreferencesInput.d.ts +0 -6
- package/dist/contract/routing/CarRentalPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/CarRentalPreferencesInput.js +0 -2
- package/dist/contract/routing/CarRentalPreferencesInput.js.map +0 -1
- package/dist/contract/routing/CyclingOptimizationInput.d.ts +0 -7
- package/dist/contract/routing/CyclingOptimizationInput.d.ts.map +0 -1
- package/dist/contract/routing/CyclingOptimizationInput.js +0 -2
- package/dist/contract/routing/CyclingOptimizationInput.js.map +0 -1
- package/dist/contract/routing/CyclingOptimizationType.d.ts +0 -2
- package/dist/contract/routing/CyclingOptimizationType.d.ts.map +0 -1
- package/dist/contract/routing/CyclingOptimizationType.js +0 -2
- package/dist/contract/routing/CyclingOptimizationType.js.map +0 -1
- package/dist/contract/routing/DestinationBicyclePolicyInput.d.ts +0 -5
- package/dist/contract/routing/DestinationBicyclePolicyInput.d.ts.map +0 -1
- package/dist/contract/routing/DestinationBicyclePolicyInput.js +0 -2
- package/dist/contract/routing/DestinationBicyclePolicyInput.js.map +0 -1
- package/dist/contract/routing/DestinationScooterPolicyInput.d.ts +0 -5
- package/dist/contract/routing/DestinationScooterPolicyInput.d.ts.map +0 -1
- package/dist/contract/routing/DestinationScooterPolicyInput.js +0 -2
- package/dist/contract/routing/DestinationScooterPolicyInput.js.map +0 -1
- package/dist/contract/routing/GraphQLError.d.ts +0 -5
- package/dist/contract/routing/GraphQLError.d.ts.map +0 -1
- package/dist/contract/routing/GraphQLError.js +0 -2
- package/dist/contract/routing/GraphQLError.js.map +0 -1
- package/dist/contract/routing/ParkingFilter.d.ts +0 -6
- package/dist/contract/routing/ParkingFilter.d.ts.map +0 -1
- package/dist/contract/routing/ParkingFilter.js +0 -2
- package/dist/contract/routing/ParkingFilter.js.map +0 -1
- package/dist/contract/routing/ParkingFilterOperation.d.ts +0 -4
- package/dist/contract/routing/ParkingFilterOperation.d.ts.map +0 -1
- package/dist/contract/routing/ParkingFilterOperation.js +0 -2
- package/dist/contract/routing/ParkingFilterOperation.js.map +0 -1
- package/dist/contract/routing/PlanAccessMode.d.ts +0 -2
- package/dist/contract/routing/PlanAccessMode.d.ts.map +0 -1
- package/dist/contract/routing/PlanAccessMode.js +0 -2
- package/dist/contract/routing/PlanAccessMode.js.map +0 -1
- package/dist/contract/routing/PlanConnection.d.ts +0 -10
- package/dist/contract/routing/PlanConnection.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnection.js +0 -2
- package/dist/contract/routing/PlanConnection.js.map +0 -1
- package/dist/contract/routing/PlanConnectionData.d.ts +0 -5
- package/dist/contract/routing/PlanConnectionData.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnectionData.js +0 -2
- package/dist/contract/routing/PlanConnectionData.js.map +0 -1
- package/dist/contract/routing/PlanConnectionResponse.d.ts +0 -7
- package/dist/contract/routing/PlanConnectionResponse.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnectionResponse.js +0 -2
- package/dist/contract/routing/PlanConnectionResponse.js.map +0 -1
- package/dist/contract/routing/PlanConnectionStreamData.d.ts +0 -5
- package/dist/contract/routing/PlanConnectionStreamData.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnectionStreamData.js +0 -2
- package/dist/contract/routing/PlanConnectionStreamData.js.map +0 -1
- package/dist/contract/routing/PlanConnectionStreamResponse.d.ts +0 -7
- package/dist/contract/routing/PlanConnectionStreamResponse.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnectionStreamResponse.js +0 -2
- package/dist/contract/routing/PlanConnectionStreamResponse.js.map +0 -1
- package/dist/contract/routing/PlanConnectionStreamVariables.d.ts +0 -18
- package/dist/contract/routing/PlanConnectionStreamVariables.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnectionStreamVariables.js +0 -2
- package/dist/contract/routing/PlanConnectionStreamVariables.js.map +0 -1
- package/dist/contract/routing/PlanConnectionVariables.d.ts +0 -17
- package/dist/contract/routing/PlanConnectionVariables.d.ts.map +0 -1
- package/dist/contract/routing/PlanConnectionVariables.js +0 -2
- package/dist/contract/routing/PlanConnectionVariables.js.map +0 -1
- package/dist/contract/routing/PlanDirectMode.d.ts +0 -2
- package/dist/contract/routing/PlanDirectMode.d.ts.map +0 -1
- package/dist/contract/routing/PlanDirectMode.js +0 -2
- package/dist/contract/routing/PlanDirectMode.js.map +0 -1
- package/dist/contract/routing/PlanEdge.d.ts +0 -6
- package/dist/contract/routing/PlanEdge.d.ts.map +0 -1
- package/dist/contract/routing/PlanEdge.js +0 -2
- package/dist/contract/routing/PlanEdge.js.map +0 -1
- package/dist/contract/routing/PlanEgressMode.d.ts +0 -2
- package/dist/contract/routing/PlanEgressMode.d.ts.map +0 -1
- package/dist/contract/routing/PlanEgressMode.js +0 -2
- package/dist/contract/routing/PlanEgressMode.js.map +0 -1
- package/dist/contract/routing/PlanTransferMode.d.ts +0 -2
- package/dist/contract/routing/PlanTransferMode.d.ts.map +0 -1
- package/dist/contract/routing/PlanTransferMode.js +0 -2
- package/dist/contract/routing/PlanTransferMode.js.map +0 -1
- package/dist/contract/routing/ScooterOptimizationInput.d.ts +0 -7
- package/dist/contract/routing/ScooterOptimizationInput.d.ts.map +0 -1
- package/dist/contract/routing/ScooterOptimizationInput.js +0 -2
- package/dist/contract/routing/ScooterOptimizationInput.js.map +0 -1
- package/dist/contract/routing/ScooterOptimizationType.d.ts +0 -2
- package/dist/contract/routing/ScooterOptimizationType.d.ts.map +0 -1
- package/dist/contract/routing/ScooterOptimizationType.js +0 -2
- package/dist/contract/routing/ScooterOptimizationType.js.map +0 -1
- package/dist/contract/routing/ScooterPreferencesInput.d.ts +0 -9
- package/dist/contract/routing/ScooterPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/ScooterPreferencesInput.js +0 -2
- package/dist/contract/routing/ScooterPreferencesInput.js.map +0 -1
- package/dist/contract/routing/ScooterRentalPreferencesInput.d.ts +0 -7
- package/dist/contract/routing/ScooterRentalPreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/ScooterRentalPreferencesInput.js +0 -2
- package/dist/contract/routing/ScooterRentalPreferencesInput.js.map +0 -1
- package/dist/contract/routing/StopDeparturesData.d.ts +0 -6
- package/dist/contract/routing/StopDeparturesData.d.ts.map +0 -1
- package/dist/contract/routing/StopDeparturesData.js +0 -2
- package/dist/contract/routing/StopDeparturesData.js.map +0 -1
- package/dist/contract/routing/StopDeparturesResponse.d.ts +0 -7
- package/dist/contract/routing/StopDeparturesResponse.d.ts.map +0 -1
- package/dist/contract/routing/StopDeparturesResponse.js +0 -2
- package/dist/contract/routing/StopDeparturesResponse.js.map +0 -1
- package/dist/contract/routing/StopDeparturesStop2.d.ts.map +0 -1
- package/dist/contract/routing/StopDeparturesStop2.js +0 -2
- package/dist/contract/routing/StopDeparturesStop2.js.map +0 -1
- package/dist/contract/routing/StopDeparturesVariables.d.ts +0 -7
- package/dist/contract/routing/StopDeparturesVariables.d.ts.map +0 -1
- package/dist/contract/routing/StopDeparturesVariables.js +0 -2
- package/dist/contract/routing/StopDeparturesVariables.js.map +0 -1
- package/dist/contract/routing/TimetablePreferencesInput.d.ts +0 -6
- package/dist/contract/routing/TimetablePreferencesInput.d.ts.map +0 -1
- package/dist/contract/routing/TimetablePreferencesInput.js +0 -2
- package/dist/contract/routing/TimetablePreferencesInput.js.map +0 -1
- package/dist/contract/routing/TriangleCyclingFactorsInput.d.ts +0 -6
- package/dist/contract/routing/TriangleCyclingFactorsInput.d.ts.map +0 -1
- package/dist/contract/routing/TriangleCyclingFactorsInput.js +0 -2
- package/dist/contract/routing/TriangleCyclingFactorsInput.js.map +0 -1
- package/dist/contract/routing/TriangleScooterFactorsInput.d.ts +0 -6
- package/dist/contract/routing/TriangleScooterFactorsInput.d.ts.map +0 -1
- package/dist/contract/routing/TriangleScooterFactorsInput.js +0 -2
- package/dist/contract/routing/TriangleScooterFactorsInput.js.map +0 -1
- package/dist/contract/routing/TripData.d.ts +0 -5
- package/dist/contract/routing/TripData.d.ts.map +0 -1
- package/dist/contract/routing/TripData.js +0 -2
- package/dist/contract/routing/TripData.js.map +0 -1
- package/dist/contract/routing/TripTrip.d.ts.map +0 -1
- package/dist/contract/routing/TripTrip.js +0 -2
- package/dist/contract/routing/TripTrip.js.map +0 -1
- package/dist/contract/routing/TripVariables.d.ts +0 -5
- package/dist/contract/routing/TripVariables.d.ts.map +0 -1
- package/dist/contract/routing/TripVariables.js +0 -2
- package/dist/contract/routing/TripVariables.js.map +0 -1
- package/dist/persistedQueries.d.ts +0 -9
- package/dist/persistedQueries.d.ts.map +0 -1
- package/dist/persistedQueries.js +0 -5
- package/dist/persistedQueries.js.map +0 -1
|
@@ -1,43 +1,20 @@
|
|
|
1
1
|
export type { AccessibilityPreferencesInput } from './AccessibilityPreferencesInput.ts';
|
|
2
2
|
export type { AlightPreferencesInput } from './AlightPreferencesInput.ts';
|
|
3
|
-
export type { BicycleParkingPreferencesInput } from './BicycleParkingPreferencesInput.ts';
|
|
4
|
-
export type { BicyclePreferencesInput } from './BicyclePreferencesInput.ts';
|
|
5
|
-
export type { BicycleRentalPreferencesInput } from './BicycleRentalPreferencesInput.ts';
|
|
6
|
-
export type { BicycleWalkPreferencesCostInput } from './BicycleWalkPreferencesCostInput.ts';
|
|
7
|
-
export type { BicycleWalkPreferencesInput } from './BicycleWalkPreferencesInput.ts';
|
|
8
3
|
export type { BikesAllowed } from './BikesAllowed.ts';
|
|
9
4
|
export type { BoardPreferencesInput } from './BoardPreferencesInput.ts';
|
|
10
|
-
export type {
|
|
11
|
-
export type {
|
|
12
|
-
export type {
|
|
13
|
-
export type { CyclingOptimizationInput } from './CyclingOptimizationInput.ts';
|
|
14
|
-
export type { CyclingOptimizationType } from './CyclingOptimizationType.ts';
|
|
15
|
-
export type { DestinationBicyclePolicyInput } from './DestinationBicyclePolicyInput.ts';
|
|
16
|
-
export type { DestinationScooterPolicyInput } from './DestinationScooterPolicyInput.ts';
|
|
5
|
+
export type { DepartureBoard } from './DepartureBoard.ts';
|
|
6
|
+
export type { DeparturesRequest } from './DeparturesRequest.ts';
|
|
7
|
+
export type { DeparturesResponse } from './DeparturesResponse.ts';
|
|
17
8
|
export type { ErrorResponse } from './ErrorResponse.ts';
|
|
18
9
|
export type { Geometry } from './Geometry.ts';
|
|
19
|
-
export type { GraphQLError } from './GraphQLError.ts';
|
|
20
10
|
export type { InputField } from './InputField.ts';
|
|
21
11
|
export type { Itinerary } from './Itinerary.ts';
|
|
22
12
|
export type { Leg } from './Leg.ts';
|
|
23
13
|
export type { LegTime } from './LegTime.ts';
|
|
24
14
|
export type { Mode } from './Mode.ts';
|
|
25
|
-
export type { ParkingFilter } from './ParkingFilter.ts';
|
|
26
|
-
export type { ParkingFilterOperation } from './ParkingFilterOperation.ts';
|
|
27
15
|
export type { Place } from './Place.ts';
|
|
28
|
-
export type { PlanAccessMode } from './PlanAccessMode.ts';
|
|
29
|
-
export type { PlanConnection } from './PlanConnection.ts';
|
|
30
|
-
export type { PlanConnectionData } from './PlanConnectionData.ts';
|
|
31
|
-
export type { PlanConnectionResponse } from './PlanConnectionResponse.ts';
|
|
32
|
-
export type { PlanConnectionStreamData } from './PlanConnectionStreamData.ts';
|
|
33
|
-
export type { PlanConnectionStreamResponse } from './PlanConnectionStreamResponse.ts';
|
|
34
|
-
export type { PlanConnectionStreamVariables } from './PlanConnectionStreamVariables.ts';
|
|
35
|
-
export type { PlanConnectionVariables } from './PlanConnectionVariables.ts';
|
|
36
16
|
export type { PlanCoordinateInput } from './PlanCoordinateInput.ts';
|
|
37
17
|
export type { PlanDateTimeInput } from './PlanDateTimeInput.ts';
|
|
38
|
-
export type { PlanDirectMode } from './PlanDirectMode.ts';
|
|
39
|
-
export type { PlanEdge } from './PlanEdge.ts';
|
|
40
|
-
export type { PlanEgressMode } from './PlanEgressMode.ts';
|
|
41
18
|
export type { PlanLabeledLocationInput } from './PlanLabeledLocationInput.ts';
|
|
42
19
|
export type { PlanLocationInput } from './PlanLocationInput.ts';
|
|
43
20
|
export type { PlanModesInput } from './PlanModesInput.ts';
|
|
@@ -45,48 +22,42 @@ export type { PlanPageInfo } from './PlanPageInfo.ts';
|
|
|
45
22
|
export type { PlanPassThroughViaLocationInput } from './PlanPassThroughViaLocationInput.ts';
|
|
46
23
|
export type { PlanPreferencesInput } from './PlanPreferencesInput.ts';
|
|
47
24
|
export type { PlanStopLocationInput } from './PlanStopLocationInput.ts';
|
|
25
|
+
export type { PlanStreamChunkEvent } from './PlanStreamChunkEvent.ts';
|
|
26
|
+
export type { PlanStreamDoneEvent } from './PlanStreamDoneEvent.ts';
|
|
27
|
+
export type { PlanStreamPageInfoEvent } from './PlanStreamPageInfoEvent.ts';
|
|
28
|
+
export type { PlanStreamRequest } from './PlanStreamRequest.ts';
|
|
48
29
|
export type { PlanStreetPreferencesInput } from './PlanStreetPreferencesInput.ts';
|
|
49
|
-
export type { PlanTransferMode } from './PlanTransferMode.ts';
|
|
50
30
|
export type { PlanTransitModePreferenceInput } from './PlanTransitModePreferenceInput.ts';
|
|
51
31
|
export type { PlanTransitModesInput } from './PlanTransitModesInput.ts';
|
|
32
|
+
export type { PlanTripRequest } from './PlanTripRequest.ts';
|
|
33
|
+
export type { PlanTripResponse } from './PlanTripResponse.ts';
|
|
52
34
|
export type { PlanViaLocationInput } from './PlanViaLocationInput.ts';
|
|
53
35
|
export type { PlanVisitViaLocationInput } from './PlanVisitViaLocationInput.ts';
|
|
54
36
|
export type { RealTimeEstimate } from './RealTimeEstimate.ts';
|
|
55
37
|
export type { RealtimeState } from './RealtimeState.ts';
|
|
38
|
+
export type { Reliability } from './Reliability.ts';
|
|
56
39
|
export type { Route } from './Route.ts';
|
|
57
40
|
export type { RoutingError } from './RoutingError.ts';
|
|
58
41
|
export type { RoutingErrorCode } from './RoutingErrorCode.ts';
|
|
59
|
-
export type { ScooterOptimizationInput } from './ScooterOptimizationInput.ts';
|
|
60
|
-
export type { ScooterOptimizationType } from './ScooterOptimizationType.ts';
|
|
61
|
-
export type { ScooterPreferencesInput } from './ScooterPreferencesInput.ts';
|
|
62
|
-
export type { ScooterRentalPreferencesInput } from './ScooterRentalPreferencesInput.ts';
|
|
63
42
|
export type { Stop } from './Stop.ts';
|
|
64
|
-
export type { StopDeparturesData } from './StopDeparturesData.ts';
|
|
65
|
-
export type { StopDeparturesResponse } from './StopDeparturesResponse.ts';
|
|
66
43
|
export type { StopDeparturesRoute } from './StopDeparturesRoute.ts';
|
|
67
44
|
export type { StopDeparturesStop } from './StopDeparturesStop.ts';
|
|
68
|
-
export type { StopDeparturesStop2 } from './StopDeparturesStop2.ts';
|
|
69
45
|
export type { StopDeparturesStoptime } from './StopDeparturesStoptime.ts';
|
|
70
46
|
export type { StopDeparturesTrip } from './StopDeparturesTrip.ts';
|
|
71
|
-
export type { StopDeparturesVariables } from './StopDeparturesVariables.ts';
|
|
72
47
|
export type { Stoptime } from './Stoptime.ts';
|
|
73
|
-
export type { TimetablePreferencesInput } from './TimetablePreferencesInput.ts';
|
|
74
48
|
export type { TransferPreferencesInput } from './TransferPreferencesInput.ts';
|
|
75
49
|
export type { TransitFilterInput } from './TransitFilterInput.ts';
|
|
76
50
|
export type { TransitFilterSelectInput } from './TransitFilterSelectInput.ts';
|
|
77
51
|
export type { TransitMode } from './TransitMode.ts';
|
|
78
52
|
export type { TransitModePreferenceCostInput } from './TransitModePreferenceCostInput.ts';
|
|
79
53
|
export type { TransitPreferencesInput } from './TransitPreferencesInput.ts';
|
|
80
|
-
export type { TriangleCyclingFactorsInput } from './TriangleCyclingFactorsInput.ts';
|
|
81
|
-
export type { TriangleScooterFactorsInput } from './TriangleScooterFactorsInput.ts';
|
|
82
54
|
export type { Trip } from './Trip.ts';
|
|
83
|
-
export type { TripData } from './TripData.ts';
|
|
84
55
|
export type { TripGeometry } from './TripGeometry.ts';
|
|
56
|
+
export type { TripRequest } from './TripRequest.ts';
|
|
85
57
|
export type { TripResponse } from './TripResponse.ts';
|
|
86
58
|
export type { TripRoute } from './TripRoute.ts';
|
|
87
59
|
export type { TripStop } from './TripStop.ts';
|
|
88
|
-
export type {
|
|
89
|
-
export type { TripVariables } from './TripVariables.ts';
|
|
60
|
+
export type { TripTimetable } from './TripTimetable.ts';
|
|
90
61
|
export type { WalkPreferencesInput } from './WalkPreferencesInput.ts';
|
|
91
62
|
export type { WheelchairBoarding } from './WheelchairBoarding.ts';
|
|
92
63
|
export type { WheelchairPreferencesInput } from './WheelchairPreferencesInput.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/routing/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contract/routing/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AACxF,YAAY,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAC1E,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,YAAY,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,YAAY,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACtC,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,wBAAwB,EAAE,M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ION = "1.2";
|
|
2
2
|
//# sourceMappingURL=contractVersion.d.ts.map
|
package/dist/contractVersion.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const CONTRACT_VERSION = '1.
|
|
1
|
+
export const CONTRACT_VERSION = '1.2';
|
|
2
2
|
//# sourceMappingURL=contractVersion.js.map
|
package/dist/enums.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export type OccupancyStatus = 'EMPTY' | 'MANY_SEATS_AVAILABLE' | 'FEW_SEATS_AVAI
|
|
|
5
5
|
export type RealtimeState = 'ADDED' | 'CANCELED' | 'MODIFIED' | 'SCHEDULED' | 'UPDATED' | 'UNKNOWN';
|
|
6
6
|
export type RoutingErrorCode = 'LOCATION_NOT_FOUND' | 'NO_STOPS_IN_RANGE' | 'NO_TRANSIT_CONNECTION' | 'NO_TRANSIT_CONNECTION_IN_SEARCH_WINDOW' | 'OUTSIDE_BOUNDS' | 'OUTSIDE_SERVICE_PERIOD' | 'WALKING_BETTER_THAN_TRANSIT' | 'UNKNOWN';
|
|
7
7
|
export type InputField = 'DATE_TIME' | 'FROM' | 'TO' | 'VIA' | 'UNKNOWN';
|
|
8
|
+
/** Delay-aware planning level: arrivals are planned with the typical delay at the median (`STANDARD`), 70th (`SAFE`) or 90th (`VERY_SAFE`) percentile. */
|
|
9
|
+
export type Reliability = 'STANDARD' | 'SAFE' | 'VERY_SAFE';
|
|
8
10
|
export declare function transitModeFromWire(raw: string | null | undefined): TransitMode | null;
|
|
9
11
|
export declare function realtimeStateFromWire(raw: string | null | undefined): RealtimeState | null;
|
|
10
12
|
export declare function routingErrorCodeFromWire(raw: string | null | undefined): RoutingErrorCode;
|
package/dist/enums.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,SAAS,GACT,KAAK,GACL,WAAW,GACX,KAAK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AC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAG5F;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,IAAI,CAExF;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAGxF"}
|
package/dist/enums.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,6DAA6D;
|
|
1
|
+
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,4GAA4G;AAC5G,6DAA6D;AA8D7D,MAAM,aAAa,GAAuB;IACxC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI;IAC7G,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;IACxG,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI;CACrH,CAAC;AAEF,MAAM,kBAAkB,GAA2B;IACjD,KAAK,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,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,OAAO,IAAI,CAAC;IAC5D,OAAO,MAAM,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What went wrong. `bad_request` is an invalid or missing input, caught by the SDK before sending or
|
|
3
|
-
* rejected by the server; `field` names it. `query_retired` means the API
|
|
4
|
-
*
|
|
3
|
+
* rejected by the server; `field` names it. `query_retired` means the API part this SDK version calls is
|
|
4
|
+
* retired (HTTP 410 Gone); upgrade the SDK. `planning_limit_reached` means the project has reached the trip
|
|
5
5
|
* planning limit its plan includes; it applies to trip planning only. `agreement_inactive` means the project has
|
|
6
6
|
* no active agreement; it applies to every call made with a client key.
|
|
7
7
|
*/
|
|
@@ -10,12 +10,9 @@ export interface SpiderError {
|
|
|
10
10
|
readonly code: SpiderErrorCode;
|
|
11
11
|
readonly message: string;
|
|
12
12
|
readonly httpStatus?: number;
|
|
13
|
-
/**
|
|
14
|
-
* The server's machine-readable error code, when it sends one: e.g. `persisted_query_rejected` on an
|
|
15
|
-
* `unauthorized` when the environment doesn't recognise the query id, or `query_retired`.
|
|
16
|
-
*/
|
|
13
|
+
/** The server's machine-readable error code, when it sends one: e.g. `bad_request` or `query_retired`. */
|
|
17
14
|
readonly serverCode?: string;
|
|
18
|
-
/** For a `bad_request`, the
|
|
15
|
+
/** For a `bad_request`, the request member it names as a dot path, e.g. `preferences.transit.transfer.maximumTransfers`. */
|
|
19
16
|
readonly field?: string;
|
|
20
17
|
readonly cause?: unknown;
|
|
21
18
|
}
|
|
@@ -29,24 +26,18 @@ export declare class TransportError extends Error {
|
|
|
29
26
|
readonly field: string | undefined;
|
|
30
27
|
/** The response body's own `message`, when it has one. */
|
|
31
28
|
readonly serverMessage: string | undefined;
|
|
32
|
-
/** The code-shaped `error` field of the response body, where the gateway puts its own refusal codes. */
|
|
33
|
-
readonly gatewayCode: string | undefined;
|
|
34
29
|
constructor(kind: TransportErrorKind, message: string, httpStatus?: number, serverCode?: string, field?: string, body?: {
|
|
35
30
|
readonly message?: string;
|
|
36
|
-
readonly gatewayCode?: string;
|
|
37
31
|
});
|
|
38
32
|
}
|
|
39
33
|
export declare function parseErrorEnvelope(text: string): {
|
|
40
34
|
code?: string;
|
|
41
35
|
message?: string;
|
|
42
|
-
|
|
36
|
+
field?: string;
|
|
43
37
|
};
|
|
44
|
-
/** A non-2xx response → an `http` TransportError
|
|
38
|
+
/** A non-2xx response → an `http` TransportError; a 400's field is the body's `field`, else the one its message names. */
|
|
45
39
|
export declare function httpFailure(where: string, status: number, text: string, detail?: string): TransportError;
|
|
46
|
-
/**
|
|
47
|
-
* The plan-limit error an `http` failure's body `error` field names (`planning_limit_reached`,
|
|
48
|
-
* `agreement_inactive`), whatever its status, or `undefined` when it names neither. A `code` field is not read.
|
|
49
|
-
*/
|
|
40
|
+
/** The plan-limit error the body code (`code`, else `error`) names, whatever the status; else `undefined`. */
|
|
50
41
|
export declare function limitRefusal(e: TransportError): SpiderError | undefined;
|
|
51
42
|
export declare class DecodingError extends Error {
|
|
52
43
|
readonly cause: unknown;
|
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,SAAS,GACT,cAAc,GACd,aAAa,GACb,WAAW,GACX,eAAe,GACf,wBAAwB,GACxB,oBAAoB,GACpB,QAAQ,GACR,cAAc,GACd,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["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ACd,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;CAUvC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAkBpG;AAKD,0HAA0H;AAC1H,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,cAAc,CAKxG;AAED,8GAA8G;AAC9G,wBAAgB,YAAY,CAAC,CAAC,EAAE,cAAc,GAAG,WAAW,GAAG,SAAS,CAIvE;AAED,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAkB,KAAK,EAAE,OAAO,CAAC;gBAErB,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAK7C;AAYD,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,GAAG,WAAW,CA4BrD"}
|
package/dist/errors.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const QUERY_RETIRED = 'query_retired';
|
|
2
|
+
const QUERY_RETIRED_MESSAGE = 'this API part is retired';
|
|
2
3
|
// Plan-limit refusals: the body code names the state, and the fixed wording stands in for a body without a message.
|
|
3
4
|
const LIMIT_MESSAGES = {
|
|
4
5
|
planning_limit_reached: 'trip planning limit reached',
|
|
@@ -15,8 +16,6 @@ export class TransportError extends Error {
|
|
|
15
16
|
field;
|
|
16
17
|
/** The response body's own `message`, when it has one. */
|
|
17
18
|
serverMessage;
|
|
18
|
-
/** The code-shaped `error` field of the response body, where the gateway puts its own refusal codes. */
|
|
19
|
-
gatewayCode;
|
|
20
19
|
constructor(kind, message, httpStatus, serverCode, field, body) {
|
|
21
20
|
super(message);
|
|
22
21
|
this.name = 'TransportError';
|
|
@@ -25,7 +24,6 @@ export class TransportError extends Error {
|
|
|
25
24
|
this.serverCode = serverCode;
|
|
26
25
|
this.field = field;
|
|
27
26
|
this.serverMessage = body?.message;
|
|
28
|
-
this.gatewayCode = body?.gatewayCode;
|
|
29
27
|
}
|
|
30
28
|
}
|
|
31
29
|
export function parseErrorEnvelope(text) {
|
|
@@ -38,34 +36,30 @@ export function parseErrorEnvelope(text) {
|
|
|
38
36
|
}
|
|
39
37
|
if (typeof body === 'object' && body !== null) {
|
|
40
38
|
const b = body;
|
|
41
|
-
//
|
|
42
|
-
// services put a human sentence there, so only a code-shaped value counts.
|
|
39
|
+
// Only a code-shaped `error` counts: the gateway puts its refusal codes there, other services a sentence.
|
|
43
40
|
const gatewayCode = typeof b.error === 'string' && /^[a-z][a-z0-9_]*$/.test(b.error) ? b.error : undefined;
|
|
44
41
|
return {
|
|
45
42
|
code: typeof b.code === 'string' ? b.code : gatewayCode,
|
|
46
43
|
message: typeof b.message === 'string' ? b.message : undefined,
|
|
47
|
-
|
|
44
|
+
field: typeof b.field === 'string' ? b.field : undefined,
|
|
48
45
|
};
|
|
49
46
|
}
|
|
50
47
|
return {};
|
|
51
48
|
}
|
|
52
|
-
// The
|
|
53
|
-
const FIELD_PROBLEM = /^([A-Za-z_]
|
|
54
|
-
/** A non-2xx response → an `http` TransportError
|
|
49
|
+
// The platform's own 400 wording, e.g. "preferences.street.bicycle is not allowed".
|
|
50
|
+
const FIELD_PROBLEM = /^([A-Za-z_][A-Za-z0-9_.]*) is (?:out of range|required|invalid|not allowed)$/;
|
|
51
|
+
/** A non-2xx response → an `http` TransportError; a 400's field is the body's `field`, else the one its message names. */
|
|
55
52
|
export function httpFailure(where, status, text, detail) {
|
|
56
53
|
const env = parseErrorEnvelope(text);
|
|
57
54
|
const message = (detail ?? env.message ?? text.slice(0, 300)).trim();
|
|
58
|
-
const field = status === 400 ? FIELD_PROBLEM.exec(message)?.[1] : undefined;
|
|
55
|
+
const field = status === 400 ? env.field ?? FIELD_PROBLEM.exec(message)?.[1] : undefined;
|
|
59
56
|
return new TransportError('http', `${where} -> ${status}: ${message}`, status, env.code, field, env);
|
|
60
57
|
}
|
|
61
|
-
/**
|
|
62
|
-
* The plan-limit error an `http` failure's body `error` field names (`planning_limit_reached`,
|
|
63
|
-
* `agreement_inactive`), whatever its status, or `undefined` when it names neither. A `code` field is not read.
|
|
64
|
-
*/
|
|
58
|
+
/** The plan-limit error the body code (`code`, else `error`) names, whatever the status; else `undefined`. */
|
|
65
59
|
export function limitRefusal(e) {
|
|
66
|
-
if (e.kind !== 'http' || e.
|
|
60
|
+
if (e.kind !== 'http' || e.serverCode == null || !Object.hasOwn(LIMIT_MESSAGES, e.serverCode))
|
|
67
61
|
return undefined;
|
|
68
|
-
const code = e.
|
|
62
|
+
const code = e.serverCode;
|
|
69
63
|
return { code, message: e.serverMessage?.trim() || LIMIT_MESSAGES[code], httpStatus: e.httpStatus, serverCode: code };
|
|
70
64
|
}
|
|
71
65
|
export class DecodingError extends Error {
|
|
@@ -94,7 +88,7 @@ export function toSpiderError(e) {
|
|
|
94
88
|
return refusal;
|
|
95
89
|
const status = e.httpStatus ?? 0;
|
|
96
90
|
if (e.serverCode === QUERY_RETIRED || status === 410) {
|
|
97
|
-
return { code: 'query_retired', message:
|
|
91
|
+
return { code: 'query_retired', message: e.serverMessage?.trim() || QUERY_RETIRED_MESSAGE, httpStatus: status, serverCode: e.serverCode };
|
|
98
92
|
}
|
|
99
93
|
const code = status === 400 ? 'bad_request'
|
|
100
94
|
: status === 401 || status === 403 ? 'unauthorized'
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAgCA,MAAM,aAAa,GAAG,eAAe,CAAC;AACtC,MAAM,qBAAqB,GAAG,0BAA0B,CA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AAC,CAAC,IAAI,KAAK,aAAa;YAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;QACjG,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAChD,CAAC;IACD,IAAI,CAAC,YAAY,aAAa;QAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAChG,IAAI,OAAO,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC5E,IAAI,CAAC,YAAY,SAAS;QAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACxF,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAC9D,CAAC"}
|
package/dist/http.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TransportError } from './errors.ts';
|
|
2
1
|
export type FetchLike = typeof fetch;
|
|
3
2
|
export interface AutoRetryOptions {
|
|
4
3
|
readonly maxAttempts?: number;
|
|
@@ -25,19 +24,6 @@ export interface RawResponse {
|
|
|
25
24
|
readonly status: number;
|
|
26
25
|
readonly text: string;
|
|
27
26
|
}
|
|
28
|
-
export interface GraphQLError {
|
|
29
|
-
message: string;
|
|
30
|
-
extensions?: {
|
|
31
|
-
code?: string;
|
|
32
|
-
field?: string;
|
|
33
|
-
} | null;
|
|
34
|
-
}
|
|
35
|
-
export interface GraphQLEnvelope<D> {
|
|
36
|
-
data?: D | null;
|
|
37
|
-
errors?: ReadonlyArray<GraphQLError> | null;
|
|
38
|
-
}
|
|
39
|
-
/** A GraphQL `errors` array → a typed bad_request for a BAD_REQUEST extension (with its field), else upstream. */
|
|
40
|
-
export declare function graphqlFailure(where: string, errors: ReadonlyArray<GraphQLError>): TransportError;
|
|
41
27
|
export declare function parseJson<T>(text: string, where: string): T;
|
|
42
28
|
export declare class Transport {
|
|
43
29
|
private readonly baseUrl;
|
|
@@ -46,22 +32,9 @@ export declare class Transport {
|
|
|
46
32
|
private readonly timeoutMs;
|
|
47
33
|
private readonly retry?;
|
|
48
34
|
constructor(baseUrl: string, apiKey: string, options?: TransportOptions);
|
|
49
|
-
graphql<D>(op: {
|
|
50
|
-
id: string;
|
|
51
|
-
path: string;
|
|
52
|
-
}, variables: unknown): Promise<D>;
|
|
53
35
|
postJson<D>(path: string, body: unknown, errorMessage?: (raw: string) => string): Promise<D>;
|
|
54
|
-
/**
|
|
55
|
-
|
|
56
|
-
* streaming {@link Response} for the caller to read frame-by-frame. Unlike {@link send}, it does not
|
|
57
|
-
* auto-retry — a streamed response is consumed over time, so retrying (or aborting once the body is
|
|
58
|
-
* flowing) makes no sense; the connect timeout guards only the initial handshake and is cleared the moment
|
|
59
|
-
* the response headers arrive, leaving the body to stream uninterrupted.
|
|
60
|
-
*/
|
|
61
|
-
stream(op: {
|
|
62
|
-
id: string;
|
|
63
|
-
path: string;
|
|
64
|
-
}, variables: unknown): Promise<Response>;
|
|
36
|
+
/** POSTs `body` to `path` for an SSE stream, never auto-retried; the connect timeout covers only the handshake. */
|
|
37
|
+
stream(path: string, body: unknown): Promise<Response>;
|
|
65
38
|
getJson<D>(path: string, query?: Record<string, string>): Promise<D>;
|
|
66
39
|
getRaw(path: string, query?: Record<string, string>): Promise<RawResponse>;
|
|
67
40
|
/**
|
package/dist/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file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,CAAC,OAAO,CAAY;IACpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAmC;gBAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gBAAgB;IAWjE,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAWlG,mHAAmH;IAC7G,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC;IAiBtD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAMpE,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,WAAW,CAAC;IAWhF;;;;;;;;;;;OAWG;IACG,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC;IAc7B,OAAO,CAAC,eAAe;YAOT,IAAI;CAkCnB"}
|
package/dist/http.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { CONTRACT_HEADER, CONTRACT_VERSION } from "./contract.js";
|
|
2
2
|
import { SDK_HEADER, SDK_IDENTITY } from "./sdk.js";
|
|
3
|
-
import { DecodingError,
|
|
4
|
-
/** A GraphQL `errors` array → a typed bad_request for a BAD_REQUEST extension (with its field), else upstream. */
|
|
5
|
-
export function graphqlFailure(where, errors) {
|
|
6
|
-
const bad = errors.find((e) => e.extensions?.code === 'BAD_REQUEST');
|
|
7
|
-
if (bad != null) {
|
|
8
|
-
return new TransportError('bad_request', bad.message, undefined, undefined, bad.extensions?.field);
|
|
9
|
-
}
|
|
10
|
-
return new TransportError('upstream', `${where} errors: ${errors.map((e) => e.message).join(', ')}`);
|
|
11
|
-
}
|
|
3
|
+
import { DecodingError, httpFailure } from "./errors.js";
|
|
12
4
|
export function parseJson(text, where) {
|
|
13
5
|
try {
|
|
14
6
|
return JSON.parse(text);
|
|
@@ -33,24 +25,6 @@ export class Transport {
|
|
|
33
25
|
this.timeoutMs = options?.timeoutMs ?? 30_000;
|
|
34
26
|
this.retry = options?.retry;
|
|
35
27
|
}
|
|
36
|
-
async graphql(op, variables) {
|
|
37
|
-
const res = await this.send(`${this.baseUrl}/routing/${op.path}`, {
|
|
38
|
-
method: 'POST',
|
|
39
|
-
headers: this.contractHeaders({ 'content-type': 'application/json' }),
|
|
40
|
-
body: JSON.stringify({ id: op.id, variables }),
|
|
41
|
-
});
|
|
42
|
-
const text = await res.text();
|
|
43
|
-
if (!res.ok)
|
|
44
|
-
throw httpFailure(`routing ${op.path}`, res.status, text);
|
|
45
|
-
const envelope = parseJson(text, `routing ${op.path}`);
|
|
46
|
-
if (envelope.errors != null && envelope.errors.length > 0) {
|
|
47
|
-
throw graphqlFailure(`routing ${op.path}`, envelope.errors);
|
|
48
|
-
}
|
|
49
|
-
if (envelope.data == null) {
|
|
50
|
-
throw new TransportError('no_data', `routing ${op.path} returned no data`);
|
|
51
|
-
}
|
|
52
|
-
return envelope.data;
|
|
53
|
-
}
|
|
54
28
|
async postJson(path, body, errorMessage) {
|
|
55
29
|
const res = await this.send(`${this.baseUrl}${path}`, {
|
|
56
30
|
method: 'POST',
|
|
@@ -62,23 +36,17 @@ export class Transport {
|
|
|
62
36
|
throw httpFailure(`POST ${path}`, res.status, text, errorMessage?.(text));
|
|
63
37
|
return parseJson(text, `POST ${path}`);
|
|
64
38
|
}
|
|
65
|
-
/**
|
|
66
|
-
|
|
67
|
-
* streaming {@link Response} for the caller to read frame-by-frame. Unlike {@link send}, it does not
|
|
68
|
-
* auto-retry — a streamed response is consumed over time, so retrying (or aborting once the body is
|
|
69
|
-
* flowing) makes no sense; the connect timeout guards only the initial handshake and is cleared the moment
|
|
70
|
-
* the response headers arrive, leaving the body to stream uninterrupted.
|
|
71
|
-
*/
|
|
72
|
-
async stream(op, variables) {
|
|
39
|
+
/** POSTs `body` to `path` for an SSE stream, never auto-retried; the connect timeout covers only the handshake. */
|
|
40
|
+
async stream(path, body) {
|
|
73
41
|
const headers = this.contractHeaders({ 'content-type': 'application/json', accept: 'text/event-stream' });
|
|
74
42
|
headers.set('apikey', this.apiKey);
|
|
75
43
|
const controller = new AbortController();
|
|
76
44
|
const timer = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
77
45
|
try {
|
|
78
|
-
return await this.doFetch(`${this.baseUrl}
|
|
46
|
+
return await this.doFetch(`${this.baseUrl}${path}`, {
|
|
79
47
|
method: 'POST',
|
|
80
48
|
headers,
|
|
81
|
-
body: JSON.stringify(
|
|
49
|
+
body: JSON.stringify(body),
|
|
82
50
|
signal: controller.signal,
|
|
83
51
|
});
|
|
84
52
|
}
|
package/dist/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAgCzD,MAAM,UAAU,SAAS,CAAI,IAAY,EAAE,KAAa;IAC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SpiderResult } from './result.ts';
|
|
4
4
|
export type { SpiderError, SpiderErrorCode } from './errors.ts';
|
|
5
5
|
export { Location, ViaLocation } from './location.ts';
|
|
6
|
-
export type { TransitMode, WheelchairBoarding, BikesAllowed, OccupancyStatus, RealtimeState, RoutingErrorCode, InputField, } from './enums.ts';
|
|
6
|
+
export type { TransitMode, WheelchairBoarding, BikesAllowed, OccupancyStatus, RealtimeState, RoutingErrorCode, InputField, Reliability, } from './enums.ts';
|
|
7
7
|
export { SpiderRouting } from './routing.ts';
|
|
8
8
|
export type { Route, RouteEdge, Itinerary, Leg, LatLon, RoutePageInfo, RoutingError, Departure, TripDetails, TripStop, PlanOptions, PlanStreamRequestOptions, PlanStreamEvent, DeparturesOptions, } from './routing.ts';
|
|
9
9
|
export { SpiderStops } from './stops.ts';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClG,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClG,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,YAAY,EACZ,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,GAAG,EACH,MAAM,EACN,aAAa,EACb,YAAY,EACZ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,WAAW,EACX,wBAAwB,EACxB,eAAe,EACf,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzD,YAAY,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxF,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAWtD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAiB7C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAezD,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/location.d.ts
CHANGED
|
@@ -19,8 +19,10 @@ export type ViaLocation = {
|
|
|
19
19
|
readonly minimumWaitSeconds: number;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* A point the itinerary must pass. How many a request may carry is an environment setting
|
|
23
|
-
* 1 to 10 stop ids
|
|
22
|
+
* A point the itinerary must pass. How many a request may carry is an environment setting. Each pass-through takes
|
|
23
|
+
* 1 to 10 stop ids, else the request fails as `bad_request` on `via`. A visit is to a stop and waits 0 to 3600
|
|
24
|
+
* seconds: a coordinate fails as `bad_request` on `via` (`via is invalid`), and a wait outside that range on
|
|
25
|
+
* `via.visit.minimumWaitTime`.
|
|
24
26
|
*/
|
|
25
27
|
export declare const ViaLocation: {
|
|
26
28
|
readonly passThrough: (...stopIds: string[]) => ViaLocation;
|
package/dist/location.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAChB;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IA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AAC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,WAAW;uCACE,MAAM,EAAE,KAAG,WAAW;+BAG9B,QAAQ,kCAA2B,WAAW;CAGtD,CAAC"}
|
package/dist/location.js
CHANGED
|
@@ -7,8 +7,10 @@ export const Location = {
|
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* A point the itinerary must pass. How many a request may carry is an environment setting
|
|
11
|
-
* 1 to 10 stop ids
|
|
10
|
+
* A point the itinerary must pass. How many a request may carry is an environment setting. Each pass-through takes
|
|
11
|
+
* 1 to 10 stop ids, else the request fails as `bad_request` on `via`. A visit is to a stop and waits 0 to 3600
|
|
12
|
+
* seconds: a coordinate fails as `bad_request` on `via` (`via is invalid`), and a wait outside that range on
|
|
13
|
+
* `via.visit.minimumWaitTime`.
|
|
12
14
|
*/
|
|
13
15
|
export const ViaLocation = {
|
|
14
16
|
passThrough(...stopIds) {
|
package/dist/location.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,UAAU,CAAC,QAAgB,EAAE,SAAiB;QAC5C,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,CAAC,EAAU;QACb,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC9B,CAAC;CACO,CAAC;AAMX
|
|
1
|
+
{"version":3,"file":"location.js","sourceRoot":"","sources":["../src/location.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,UAAU,CAAC,QAAgB,EAAE,SAAiB;QAC5C,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACrD,CAAC;IACD,IAAI,CAAC,EAAU;QACb,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC9B,CAAC;CACO,CAAC;AAMX;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,WAAW,CAAC,GAAG,OAAiB;QAC9B,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;IAC1C,CAAC;IACD,KAAK,CAAC,QAAkB,EAAE,kBAAkB,GAAG,CAAC;QAC9C,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IACzD,CAAC;CACO,CAAC"}
|