@opentripplanner/core-utils 9.0.0-alpha.26 → 9.0.0-alpha.28
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/esm/query-gen.js +1 -1
- package/lib/core-utils.story.d.ts +22 -0
- package/lib/core-utils.story.d.ts.map +1 -0
- package/lib/core-utils.story.js +69 -0
- package/lib/core-utils.story.js.map +1 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/itinerary.d.ts +160 -0
- package/lib/itinerary.d.ts.map +1 -0
- package/lib/map.d.ts +20 -0
- package/lib/map.d.ts.map +1 -0
- package/lib/query-gen.d.ts +75 -0
- package/lib/query-gen.d.ts.map +1 -0
- package/lib/query-gen.js +1 -1
- package/lib/route.d.ts +112 -0
- package/lib/route.d.ts.map +1 -0
- package/lib/storage.d.ts +19 -0
- package/lib/storage.d.ts.map +1 -0
- package/lib/time.d.ts +50 -0
- package/lib/time.d.ts.map +1 -0
- package/lib/ui.d.ts +13 -0
- package/lib/ui.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/otpSchema.json +12940 -0
- package/src/planQuery.graphql +142 -113
- package/tsconfig.tsbuildinfo +1 -0
package/esm/query-gen.js
CHANGED
|
@@ -6,7 +6,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
6
6
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
7
7
|
|
|
8
8
|
import { print } from "graphql";
|
|
9
|
-
var PlanQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlanQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "toPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "modes" } }, type: { kind: "ListType", type: { kind: "NamedType", name: { kind: "Name", value: "TransportMode" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "time" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "date" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "intermediatePlaces" } }, type: { kind: "ListType", type: { kind: "NamedType", name: { kind: "Name", value: "InputCoordinates" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "preferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputPreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputUnpreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "banned" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputBanned" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "plan" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "fromPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "toPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "toPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "transportModes" }, value: { kind: "Variable", name: { kind: "Name", value: "modes" } } }, { kind: "Argument", name: { kind: "Name", value: "locale" }, value: { kind: "StringValue", value: "en", block: false } }, { kind: "Argument", name: { kind: "Name", value: "time" }, value: { kind: "Variable", name: { kind: "Name", value: "time" } } }, { kind: "Argument", name: { kind: "Name", value: "date" }, value: { kind: "Variable", name: { kind: "Name", value: "date" } } }, { kind: "Argument", name: { kind: "Name", value: "wheelchair" }, value: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } } }, { kind: "Argument", name: { kind: "Name", value: "bikeReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "carReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "walkReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "arriveBy" }, value: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } } }, { kind: "Argument", name: { kind: "Name", value: "intermediatePlaces" }, value: { kind: "Variable", name: { kind: "Name", value: "intermediatePlaces" } } }, { kind: "Argument", name: { kind: "Name", value: "preferred" }, value: { kind: "Variable", name: { kind: "Name", value: "preferred" } } }, { kind: "Argument", name: { kind: "Name", value: "unpreferred" }, value: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } } }, { kind: "Argument", name: { kind: "Name", value: "banned" }, value: { kind: "Variable", name: { kind: "Name", value: "banned" } } }, { kind: "Argument", name: { kind: "Name", value: "numItineraries" }, value: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "routingErrors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputField" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "itineraries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "waitingTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "walkTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "legs" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "pickupType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "dropoffType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "pickupBookingInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "earliestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "rentedBike" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "interlineWithPreviousLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "departureDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "arrivalDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rideHailingEstimate" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "provider" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "arrival" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "minPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "realTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realtimeState" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "transitLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "trip" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "tripHeadsign" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "agency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timezone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "legGeometry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "length" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "points" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "intermediateStops" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopCode" }, name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopId" }, name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locationType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "route" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shortName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "longName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "color" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "textColor" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "from" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "to" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "steps" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "relativeDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "absoluteDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "stayOn" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "streetName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "area" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "elevationProfile" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevation" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 3834, source: { body: "query PlanQuery(\n $fromPlace: String!\n $toPlace: String!\n $modes: [TransportMode]\n $time: String\n $date: String\n $wheelchair: Boolean\n $bikeReluctance: Float\n $carReluctance: Float\n $walkReluctance: Float\n $arriveBy: Boolean\n $intermediatePlaces: [InputCoordinates]\n $preferred: InputPreferred\n $unpreferred: InputUnpreferred\n $banned: InputBanned\n $numItineraries: Int\n) {\n plan(\n fromPlace: $fromPlace\n toPlace: $toPlace\n transportModes: $modes\n # Currently only supporting EN locale, used for times and text\n locale: \"en\"\n time: $time\n date: $date\n wheelchair: $wheelchair\n bikeReluctance: $bikeReluctance\n carReluctance: $carReluctance\n walkReluctance: $walkReluctance\n arriveBy: $arriveBy\n intermediatePlaces: $intermediatePlaces\n preferred: $preferred\n unpreferred: $unpreferred\n banned: $banned\n numItineraries: $numItineraries\n ) {\n routingErrors {\n code\n inputField\n description\n }\n itineraries {\n duration\n endTime\n startTime\n waitingTime\n walkTime\n accessibilityScore\n legs {\n pickupType\n dropoffType\n pickupBookingInfo {\n earliestBookingTime {\n daysPrior\n }\n }\n rentedBike\n interlineWithPreviousLeg\n departureDelay\n arrivalDelay\n distance\n duration\n endTime\n mode\n rideHailingEstimate {\n provider {\n id\n }\n arrival\n minPrice {\n currency {\n code\n }\n amount\n }\n maxPrice {\n currency {\n code\n }\n amount\n }\n }\n realTime\n realtimeState\n startTime\n transitLeg\n accessibilityScore\n trip {\n id\n gtfsId\n tripHeadsign\n }\n agency {\n name\n id\n timezone\n url\n alerts {\n alertHeaderText\n alertDescriptionText\n alertUrl\n effectiveStartDate\n }\n }\n legGeometry {\n length\n points\n }\n intermediateStops {\n lat\n lon\n name\n stopCode: code\n stopId: id\n locationType\n }\n route {\n shortName\n longName\n color\n textColor\n id\n type\n alerts {\n alertHeaderText\n alertDescriptionText\n alertUrl\n effectiveStartDate\n }\n }\n from {\n lat\n lon\n name\n vertexType\n rentalVehicle {\n network\n }\n stop {\n id\n code\n gtfsId\n alerts {\n alertHeaderText\n alertDescriptionText\n alertUrl\n effectiveStartDate\n }\n }\n }\n to {\n lat\n lon\n name\n vertexType\n rentalVehicle {\n network\n }\n stop {\n id\n code\n gtfsId\n alerts {\n alertHeaderText\n alertDescriptionText\n alertUrl\n effectiveStartDate\n }\n }\n }\n steps {\n distance\n lat\n lon\n relativeDirection\n absoluteDirection\n stayOn\n streetName\n area\n alerts {\n alertHeaderText\n alertDescriptionText\n alertUrl\n effectiveStartDate\n }\n elevationProfile {\n distance\n elevation\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9
|
+
var PlanQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "Plan" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "toPlace" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "modes" } }, type: { kind: "ListType", type: { kind: "NamedType", name: { kind: "Name", value: "TransportMode" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "time" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "date" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Float" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "intermediatePlaces" } }, type: { kind: "ListType", type: { kind: "NamedType", name: { kind: "Name", value: "InputCoordinates" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "preferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputPreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputUnpreferred" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "banned" } }, type: { kind: "NamedType", name: { kind: "Name", value: "InputBanned" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "plan" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "arriveBy" }, value: { kind: "Variable", name: { kind: "Name", value: "arriveBy" } } }, { kind: "Argument", name: { kind: "Name", value: "banned" }, value: { kind: "Variable", name: { kind: "Name", value: "banned" } } }, { kind: "Argument", name: { kind: "Name", value: "bikeReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "bikeReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "carReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "carReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "date" }, value: { kind: "Variable", name: { kind: "Name", value: "date" } } }, { kind: "Argument", name: { kind: "Name", value: "fromPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "fromPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "intermediatePlaces" }, value: { kind: "Variable", name: { kind: "Name", value: "intermediatePlaces" } } }, { kind: "Argument", name: { kind: "Name", value: "locale" }, value: { kind: "StringValue", value: "en", block: false } }, { kind: "Argument", name: { kind: "Name", value: "numItineraries" }, value: { kind: "Variable", name: { kind: "Name", value: "numItineraries" } } }, { kind: "Argument", name: { kind: "Name", value: "preferred" }, value: { kind: "Variable", name: { kind: "Name", value: "preferred" } } }, { kind: "Argument", name: { kind: "Name", value: "time" }, value: { kind: "Variable", name: { kind: "Name", value: "time" } } }, { kind: "Argument", name: { kind: "Name", value: "toPlace" }, value: { kind: "Variable", name: { kind: "Name", value: "toPlace" } } }, { kind: "Argument", name: { kind: "Name", value: "transportModes" }, value: { kind: "Variable", name: { kind: "Name", value: "modes" } } }, { kind: "Argument", name: { kind: "Name", value: "unpreferred" }, value: { kind: "Variable", name: { kind: "Name", value: "unpreferred" } } }, { kind: "Argument", name: { kind: "Name", value: "walkReluctance" }, value: { kind: "Variable", name: { kind: "Name", value: "walkReluctance" } } }, { kind: "Argument", name: { kind: "Name", value: "wheelchair" }, value: { kind: "Variable", name: { kind: "Name", value: "wheelchair" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "itineraries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "legs" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "accessibilityScore" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "agency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "timezone" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "url" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "arrivalDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "departureDelay" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "dropoffType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "duration" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "endTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "fareProducts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "product" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "medium" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "price" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "digits" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "riderCategory" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "Field", name: { kind: "Name", value: "from" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "interlineWithPreviousLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "intermediateStops" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locationType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopCode" }, name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", alias: { kind: "Name", value: "stopId" }, name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "legGeometry" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "length" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "points" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "pickupBookingInfo" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "earliestBookingTime" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "daysPrior" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "pickupType" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "realtimeState" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentedBike" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rideHailingEstimate" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "arrival" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "maxPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "minPrice" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "amount" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "currency" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "provider" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "route" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "color" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "longName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "shortName" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "textColor" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "steps" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "absoluteDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "area" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevationProfile" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "distance" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "elevation" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "relativeDirection" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "stayOn" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "streetName" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "to" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "lat" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lon" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "rentalVehicle" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "network" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stop" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alerts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "alertDescriptionText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertHeaderText" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "alertUrl" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "effectiveStartDate" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "vertexType" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "transitLeg" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "trip" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "gtfsId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "tripHeadsign" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "startTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "waitingTime" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "walkTime" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "routingErrors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "description" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputField" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 4335, source: { body: "query Plan(\n $fromPlace: String!\n $toPlace: String!\n $modes: [TransportMode]\n $time: String\n $date: String\n $wheelchair: Boolean\n $bikeReluctance: Float\n $carReluctance: Float\n $walkReluctance: Float\n $arriveBy: Boolean\n $intermediatePlaces: [InputCoordinates]\n $preferred: InputPreferred\n $unpreferred: InputUnpreferred\n $banned: InputBanned\n $numItineraries: Int\n) {\n plan(\n arriveBy: $arriveBy\n banned: $banned\n bikeReluctance: $bikeReluctance\n carReluctance: $carReluctance\n date: $date\n fromPlace: $fromPlace\n intermediatePlaces: $intermediatePlaces\n # Currently only supporting EN locale, used for times and text\n locale: \"en\"\n numItineraries: $numItineraries\n preferred: $preferred\n time: $time\n toPlace: $toPlace\n transportModes: $modes\n unpreferred: $unpreferred\n walkReluctance: $walkReluctance\n wheelchair: $wheelchair\n ) {\n itineraries {\n accessibilityScore\n duration\n endTime\n legs {\n accessibilityScore\n agency {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n id\n name\n timezone\n url\n }\n arrivalDelay\n departureDelay\n distance\n dropoffType\n duration\n endTime\n fareProducts {\n id\n product {\n id\n medium {\n id\n name\n }\n name\n price {\n amount\n currency {\n code\n digits\n }\n }\n riderCategory {\n id\n name\n }\n }\n }\n from {\n lat\n lon\n name\n rentalVehicle {\n id\n network\n }\n stop {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n code\n gtfsId\n id\n }\n vertexType\n }\n interlineWithPreviousLeg\n intermediateStops {\n lat\n locationType\n lon\n name\n stopCode: code\n stopId: id\n }\n legGeometry {\n length\n points\n }\n mode\n pickupBookingInfo {\n earliestBookingTime {\n daysPrior\n }\n }\n pickupType\n realTime\n realtimeState\n rentedBike\n rideHailingEstimate {\n arrival\n maxPrice {\n amount\n currency {\n code\n }\n }\n minPrice {\n amount\n currency {\n code\n }\n }\n provider {\n id\n }\n }\n route {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n color\n id\n longName\n shortName\n textColor\n type\n }\n startTime\n steps {\n absoluteDirection\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n area\n distance\n elevationProfile {\n distance\n elevation\n }\n lat\n lon\n relativeDirection\n stayOn\n streetName\n }\n to {\n lat\n lon\n name\n rentalVehicle {\n id\n network\n }\n stop {\n alerts {\n alertDescriptionText\n alertHeaderText\n alertUrl\n effectiveStartDate\n id\n }\n code\n gtfsId\n id\n }\n vertexType\n }\n transitLeg\n trip {\n gtfsId\n id\n tripHeadsign\n }\n }\n startTime\n waitingTime\n walkTime\n }\n routingErrors {\n code\n description\n inputField\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Mode Settings can contain additional modes to add to the query,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const RouteColorTester: {
|
|
7
|
+
(): JSX.Element;
|
|
8
|
+
parameters: {
|
|
9
|
+
a11y: {
|
|
10
|
+
config: {
|
|
11
|
+
rules: {
|
|
12
|
+
id: string;
|
|
13
|
+
reviewOnFail: boolean;
|
|
14
|
+
}[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
storyshots: {
|
|
18
|
+
disable: boolean;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=core-utils.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-utils.story.d.ts","sourceRoot":"","sources":["../src/core-utils.story.tsx"],"names":[],"mappings":";;;;AAIA,wBAEE;AA2BF,eAAO,MAAM,gBAAgB;QAAO,WAAW;;;;;;;;;;;;;;CAkB9C,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.RouteColorTester = void 0;
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const styled_components_1 = __importDefault(require("styled-components"));
|
|
32
|
+
const route_1 = require("./route");
|
|
33
|
+
exports.default = {
|
|
34
|
+
title: "core-utils"
|
|
35
|
+
};
|
|
36
|
+
const ColorBlock = styled_components_1.default.div `
|
|
37
|
+
background: ${props => props.bg};
|
|
38
|
+
color: ${props => props.fg};
|
|
39
|
+
padding: 10px;
|
|
40
|
+
`;
|
|
41
|
+
const ColorBlockWrapper = styled_components_1.default.div `
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: row;
|
|
44
|
+
gap: 10px;
|
|
45
|
+
`;
|
|
46
|
+
const ColorPair = ({ fg, bg }) => {
|
|
47
|
+
return (react_1.default.createElement(ColorBlockWrapper, null,
|
|
48
|
+
react_1.default.createElement(ColorBlock, { fg: fg, bg: bg }, "Provided color pair"),
|
|
49
|
+
react_1.default.createElement(ColorBlock, { fg: (0, route_1.getMostReadableTextColor)(bg, fg), bg: bg }, "Corrected color pair")));
|
|
50
|
+
};
|
|
51
|
+
const RouteColorTester = () => {
|
|
52
|
+
const [fg, setFg] = (0, react_1.useState)("#333333");
|
|
53
|
+
const [bg, setBg] = (0, react_1.useState)("#cbeb55");
|
|
54
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
55
|
+
react_1.default.createElement(ColorPair, { bg: bg, fg: fg }),
|
|
56
|
+
react_1.default.createElement("label", null,
|
|
57
|
+
"Foreground Color",
|
|
58
|
+
react_1.default.createElement("input", { onChange: e => setFg(e.target.value), type: "color", value: fg })),
|
|
59
|
+
react_1.default.createElement("label", null,
|
|
60
|
+
"Background Color",
|
|
61
|
+
react_1.default.createElement("input", { onChange: e => setBg(e.target.value), type: "color", value: bg }))));
|
|
62
|
+
};
|
|
63
|
+
exports.RouteColorTester = RouteColorTester;
|
|
64
|
+
// Disable color contrast checking for the uncorrected color pairs.
|
|
65
|
+
exports.RouteColorTester.parameters = {
|
|
66
|
+
a11y: { config: { rules: [{ id: "color-contrast", reviewOnFail: true }] } },
|
|
67
|
+
storyshots: { disable: true }
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=core-utils.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core-utils.story.js","sourceRoot":"","sources":["../src/core-utils.story.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AACxC,0EAAuC;AACvC,mCAAmD;AAEnD,kBAAe;IACb,KAAK,EAAE,YAAY;CACpB,CAAC;AAEF,MAAM,UAAU,GAAG,2BAAM,CAAC,GAAG,CAA4B;gBACzC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;WACtB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;;CAE3B,CAAC;AAEF,MAAM,iBAAiB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;CAInC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC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CAC9B,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as itinerary from "./itinerary";
|
|
2
|
+
import * as map from "./map";
|
|
3
|
+
import * as route from "./route";
|
|
4
|
+
import * as storage from "./storage";
|
|
5
|
+
import * as time from "./time";
|
|
6
|
+
import * as ui from "./ui";
|
|
7
|
+
import * as queryGen from "./query-gen";
|
|
8
|
+
declare const core: {
|
|
9
|
+
itinerary: typeof itinerary;
|
|
10
|
+
map: typeof map;
|
|
11
|
+
profile: any;
|
|
12
|
+
query: any;
|
|
13
|
+
queryGen: typeof queryGen;
|
|
14
|
+
queryParams: any;
|
|
15
|
+
route: typeof route;
|
|
16
|
+
storage: typeof storage;
|
|
17
|
+
time: typeof time;
|
|
18
|
+
ui: typeof ui;
|
|
19
|
+
};
|
|
20
|
+
export default core;
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,GAAG,MAAM,OAAO,CAAC;AAI7B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAC3B,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,IAAI;;;;;;;;;;;CAWT,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Company, Config, ElevationProfile, FlexBookingInfo, Itinerary, ItineraryOnlyLegsRequired, LatLngArray, Leg, MassUnitOption, Money, Place, Step, Stop, TncFare } from "@opentripplanner/types";
|
|
2
|
+
export declare const transitModes: string[];
|
|
3
|
+
/**
|
|
4
|
+
* @param {config} config OTP-RR configuration object
|
|
5
|
+
* @return {Array} List of all transit modes defined in config; otherwise default mode list
|
|
6
|
+
*/
|
|
7
|
+
export declare function getTransitModes(config: Config): string[];
|
|
8
|
+
export declare function isTransit(mode: string): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Returns true if the leg pickup rules enabled which require
|
|
11
|
+
* calling ahead for the service to run. "mustPhone" is the only
|
|
12
|
+
* property which encodes this info.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isReservationRequired(leg: Leg): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Returns true if a user must ask the driver to let the user off
|
|
17
|
+
* or if the user must flag the driver down for pickup.
|
|
18
|
+
* "coordinateWithDriver" in board/alight rule encodes this info.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isCoordinationRequired(leg: Leg): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The two rules checked by the above two functions are the only values
|
|
23
|
+
* returned by OTP when a leg is a flex leg.
|
|
24
|
+
*/
|
|
25
|
+
export declare function isFlex(leg: Leg): boolean;
|
|
26
|
+
export declare function isAdvanceBookingRequired(info: FlexBookingInfo): boolean;
|
|
27
|
+
export declare function legDropoffRequiresAdvanceBooking(leg: Leg): boolean;
|
|
28
|
+
export declare function isRideshareLeg(leg: Leg): boolean;
|
|
29
|
+
export declare function isWalk(mode: string): boolean;
|
|
30
|
+
export declare function isBicycle(mode: string): boolean;
|
|
31
|
+
export declare function isBicycleRent(mode: string): boolean;
|
|
32
|
+
export declare function isCar(mode: string): boolean;
|
|
33
|
+
export declare function isMicromobility(mode: string): boolean;
|
|
34
|
+
export declare function isAccessMode(mode: string): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* @param {string} modesStr a comma-separated list of OTP modes
|
|
37
|
+
* @return {boolean} whether any of the modes are transit modes
|
|
38
|
+
*/
|
|
39
|
+
export declare function hasTransit(modesStr: string): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* @param {string} modesStr a comma-separated list of OTP modes
|
|
42
|
+
* @return {boolean} whether any of the modes are car-based modes
|
|
43
|
+
*/
|
|
44
|
+
export declare function hasCar(modesStr: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* @param {string} modesStr a comma-separated list of OTP modes
|
|
47
|
+
* @return {boolean} whether any of the modes are bicycle-based modes
|
|
48
|
+
*/
|
|
49
|
+
export declare function hasBike(modesStr: string): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* @param {string} modesStr a comma-separated list of OTP modes
|
|
52
|
+
* @return {boolean} whether any of the modes are micromobility-based modes
|
|
53
|
+
*/
|
|
54
|
+
export declare function hasMicromobility(modesStr: string): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* @param {string} modesStr a comma-separated list of OTP modes
|
|
57
|
+
* @return {boolean} whether any of the modes is a hailing mode
|
|
58
|
+
*/
|
|
59
|
+
export declare function hasHail(modesStr: string): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* @param {string} modesStr a comma-separated list of OTP modes
|
|
62
|
+
* @return {boolean} whether any of the modes is a rental mode
|
|
63
|
+
*/
|
|
64
|
+
export declare function hasRental(modesStr: string): boolean;
|
|
65
|
+
export declare function getMapColor(mode: string): string;
|
|
66
|
+
export declare function toSentenceCase(str: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Derive the company string based on mode and network associated with leg.
|
|
69
|
+
*/
|
|
70
|
+
export declare function getCompanyFromLeg(leg: Leg): string;
|
|
71
|
+
export declare function getItineraryBounds(itinerary: ItineraryOnlyLegsRequired): LatLngArray[];
|
|
72
|
+
/**
|
|
73
|
+
* Return a coords object that encloses the given leg's geometry.
|
|
74
|
+
*/
|
|
75
|
+
export declare function getLegBounds(leg: Leg): number[][];
|
|
76
|
+
export declare function legLocationAtDistance(leg: Leg, distance: number): number[];
|
|
77
|
+
export declare function legElevationAtDistance(points: number[][], distance: number): number;
|
|
78
|
+
export declare function getElevationProfile(steps: Step[], unitConversion?: number): ElevationProfile;
|
|
79
|
+
/**
|
|
80
|
+
* Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} text The text to be rendered.
|
|
83
|
+
* @param {string} font The css font descriptor that text is to be rendered with (e.g. "bold 14px verdana").
|
|
84
|
+
*
|
|
85
|
+
* @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
|
|
86
|
+
*/
|
|
87
|
+
export declare function getTextWidth(text: string, font?: string): number;
|
|
88
|
+
/**
|
|
89
|
+
* Get the configured company object for the given network string if the company
|
|
90
|
+
* has been defined in the provided companies array config.
|
|
91
|
+
*/
|
|
92
|
+
export declare function getCompanyForNetwork(networkString: string, companies?: Company[]): Company;
|
|
93
|
+
/**
|
|
94
|
+
* Get a string label to display from a list of vehicle rental networks.
|
|
95
|
+
*
|
|
96
|
+
* @param {Array<string>} networks A list of network ids.
|
|
97
|
+
* @param {Array<object>} [companies=[]] An optional list of the companies config.
|
|
98
|
+
* @return {string} A label for use in presentation on a website.
|
|
99
|
+
*/
|
|
100
|
+
export declare function getCompaniesLabelFromNetworks(networks: string | string[], companies?: Company[]): string;
|
|
101
|
+
export declare function getTNCLocation(leg: Leg, type: string): string;
|
|
102
|
+
export declare function calculatePhysicalActivity(itinerary: ItineraryOnlyLegsRequired): {
|
|
103
|
+
bikeDuration: number;
|
|
104
|
+
caloriesBurned: number;
|
|
105
|
+
walkDuration: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* For an itinerary, calculates the TNC fares and returns an object with
|
|
109
|
+
* these values and currency info.
|
|
110
|
+
* It is assumed that the same currency is used for all TNC legs.
|
|
111
|
+
*/
|
|
112
|
+
export declare function calculateTncFares(itinerary: ItineraryOnlyLegsRequired): TncFare;
|
|
113
|
+
/**
|
|
114
|
+
* For a given fare component (either total fare or component parts), returns
|
|
115
|
+
* an object with the fare value (in cents).
|
|
116
|
+
*/
|
|
117
|
+
export declare function getTransitFare(fareComponent: Money): {
|
|
118
|
+
currencyCode: string;
|
|
119
|
+
transitFare: number;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* @param {itinerary} itinerary OTP trip itinierary, only legs is required.
|
|
123
|
+
* @param {carbonIntensity} carbonIntensity carbon intensity by mode in grams/meter
|
|
124
|
+
* @param {units} units units to be used in return value
|
|
125
|
+
* @return Amount of carbon in chosen unit
|
|
126
|
+
*/
|
|
127
|
+
export declare function calculateEmissions(itinerary: ItineraryOnlyLegsRequired, carbonIntensity?: Record<string, number>, units?: MassUnitOption): number;
|
|
128
|
+
/**
|
|
129
|
+
* Returns the user-facing stop id to display for a stop or place, using the following priority:
|
|
130
|
+
* 1. stop code,
|
|
131
|
+
* 2. stop id without the agency id portion, if stop id contains an agency portion,
|
|
132
|
+
* 3. stop id, whether null or not (this is the fallback case).
|
|
133
|
+
*/
|
|
134
|
+
export declare function getDisplayedStopId(placeOrStop: Place | Stop): string;
|
|
135
|
+
/**
|
|
136
|
+
* Adds the fare product info to each leg in an itinerary, from the itinerary's fare property
|
|
137
|
+
* @param itinerary Itinerary with legProducts in fare object
|
|
138
|
+
* @returns Itinerary with legs that have fare products attached to them
|
|
139
|
+
*/
|
|
140
|
+
export declare function getLegsWithFares(itinerary: Itinerary): Leg[];
|
|
141
|
+
/**
|
|
142
|
+
* Extracts useful data from the fare products on a leg, such as the leg cost and transfer info.
|
|
143
|
+
* @param leg Leg with fare products (must have used getLegsWithFares)
|
|
144
|
+
* @param category Rider category
|
|
145
|
+
* @param container Fare container (cash, electronic)
|
|
146
|
+
* @returns Object containing price as well as the transfer discount amount, if a transfer was used.
|
|
147
|
+
*/
|
|
148
|
+
export declare function getLegCost(leg: Leg, category: string, container: string): {
|
|
149
|
+
price?: Money;
|
|
150
|
+
transferAmount?: number;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Returns the total itinerary cost for a given set of legs.
|
|
154
|
+
* @param legs Itinerary legs with fare products (must have used getLegsWithFares)
|
|
155
|
+
* @param category Rider category (youth, regular, senior)
|
|
156
|
+
* @param container Fare container (cash, electronic)
|
|
157
|
+
* @returns Money object for the total itinerary cost.
|
|
158
|
+
*/
|
|
159
|
+
export declare function getItineraryCost(legs: Leg[], category: string, container: string): Money;
|
|
160
|
+
//# sourceMappingURL=itinerary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itinerary.d.ts","sourceRoot":"","sources":["../src/itinerary.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,MAAM,EACN,gBAAgB,EAChB,eAAe,EACf,SAAS,EACT,yBAAyB,EACzB,WAAW,EACX,GAAG,EACH,cAAc,EACd,KAAK,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACR,MAAM,wBAAwB,CAAC;AAIhC,eAAO,MAAM,YAAY,UAOxB,CAAC;AAEF;;;GAGG;AAEH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAOxD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAEvD;AACD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAKxD;AACD;;;GAGG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAExC;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAEvE;AACD,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAElE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAEhD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI/C;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE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AO5D;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB;IAAE,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,CAgB5C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,GAAG,EAAE,EACX,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAChB,KAAK,CAWP"}
|
package/lib/map.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LatLngArray, Location, UserPosition } from "@opentripplanner/types";
|
|
2
|
+
export declare function currentPositionToLocation(currentPosition: UserPosition): Location;
|
|
3
|
+
export declare function coordsToString(coords: number[]): string;
|
|
4
|
+
export declare function stringToCoords(str: string): number[];
|
|
5
|
+
export declare function constructLocation(latlng: {
|
|
6
|
+
lat: number;
|
|
7
|
+
lng: number;
|
|
8
|
+
}): Location;
|
|
9
|
+
export declare function matchLatLon(location1: Location, location2: Location): boolean;
|
|
10
|
+
declare type TransitivePlaceRaw = {
|
|
11
|
+
place_id: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function isBikeshareStation(place: TransitivePlaceRaw): boolean;
|
|
14
|
+
export declare function isEScooterStation(place: TransitivePlaceRaw): boolean;
|
|
15
|
+
export declare function isCarWalkTransition(place: TransitivePlaceRaw): boolean;
|
|
16
|
+
export declare function isValidLat(lat: number): boolean;
|
|
17
|
+
export declare function isValidLng(lng: number): boolean;
|
|
18
|
+
export declare function isValidLatLng(arr: LatLngArray): boolean;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=map.d.ts.map
|
package/lib/map.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../src/map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE7E,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,YAAY,GAC5B,QAAQ,CAYV;AAID,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAEvD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAEpD;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,GAAG,QAAQ,CAKX;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,GAAG,OAAO,CAG7E;AAED,aAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAErE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAEpE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAEtE;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,OAAO,CAOvD"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { LonLatOutput } from "@conveyal/lonlat";
|
|
2
|
+
import { ModeSetting, TransportMode } from "@opentripplanner/types";
|
|
3
|
+
declare type InputBanned = {
|
|
4
|
+
routes?: string;
|
|
5
|
+
agencies?: string;
|
|
6
|
+
trips?: string;
|
|
7
|
+
stops?: string;
|
|
8
|
+
stopsHard?: string;
|
|
9
|
+
};
|
|
10
|
+
declare type InputPreferred = {
|
|
11
|
+
routes?: string;
|
|
12
|
+
agencies?: string;
|
|
13
|
+
unpreferredCost?: string;
|
|
14
|
+
};
|
|
15
|
+
declare type OTPQueryParams = {
|
|
16
|
+
arriveBy: boolean;
|
|
17
|
+
date?: string;
|
|
18
|
+
from: LonLatOutput & {
|
|
19
|
+
name?: string;
|
|
20
|
+
};
|
|
21
|
+
modes: TransportMode[];
|
|
22
|
+
modeSettings: ModeSetting[];
|
|
23
|
+
time?: string;
|
|
24
|
+
numItineraries?: number;
|
|
25
|
+
to: LonLatOutput & {
|
|
26
|
+
name?: string;
|
|
27
|
+
};
|
|
28
|
+
banned?: InputBanned;
|
|
29
|
+
preferred?: InputPreferred;
|
|
30
|
+
};
|
|
31
|
+
declare type GraphQLQuery = {
|
|
32
|
+
query: string;
|
|
33
|
+
variables: Record<string, unknown>;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Mode Settings can contain additional modes to add to the query,
|
|
37
|
+
* this function extracts those additional modes from the settings
|
|
38
|
+
* and returns them in an array.
|
|
39
|
+
* @param modeSettings List of mode settings with values populated
|
|
40
|
+
* @returns Additional transport modes to add to query
|
|
41
|
+
*/
|
|
42
|
+
export declare function extractAdditionalModes(modeSettings: ModeSetting[], enabledModes: TransportMode[]): TransportMode[];
|
|
43
|
+
/**
|
|
44
|
+
* This constant maps all the transport mode to a broader mode type,
|
|
45
|
+
* which is used to determine the valid combinations of modes used in query generation.
|
|
46
|
+
*/
|
|
47
|
+
export declare const SIMPLIFICATIONS: {
|
|
48
|
+
AIRPLANE: string;
|
|
49
|
+
BICYCLE: string;
|
|
50
|
+
BUS: string;
|
|
51
|
+
CABLE_CAR: string;
|
|
52
|
+
CAR: string;
|
|
53
|
+
FERRY: string;
|
|
54
|
+
FLEX: string;
|
|
55
|
+
FUNICULAR: string;
|
|
56
|
+
GONDOLA: string;
|
|
57
|
+
RAIL: string;
|
|
58
|
+
SCOOTER: string;
|
|
59
|
+
SUBWAY: string;
|
|
60
|
+
TRAM: string;
|
|
61
|
+
TRANSIT: string;
|
|
62
|
+
WALK: string;
|
|
63
|
+
};
|
|
64
|
+
export declare const TRANSIT_SUBMODES: string[];
|
|
65
|
+
export declare const TRANSIT_SUBMODES_AND_TRANSIT: string[];
|
|
66
|
+
/**
|
|
67
|
+
* Generates a list of queries for OTP to get a comprehensive
|
|
68
|
+
* set of results based on the modes input.
|
|
69
|
+
* @param params OTP Query Params
|
|
70
|
+
* @returns Set of parameters to generate queries
|
|
71
|
+
*/
|
|
72
|
+
export declare function generateCombinations(params: OTPQueryParams): OTPQueryParams[];
|
|
73
|
+
export declare function generateOtp2Query({ arriveBy, banned, date, from, modes, modeSettings, numItineraries, preferred, time, to }: OTPQueryParams): GraphQLQuery;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=query-gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-gen.d.ts","sourceRoot":"","sources":["../src/query-gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EACL,WAAW,EAEX,aAAa,EACd,MAAM,wBAAwB,CAAC;AAIhC,aAAK,WAAW,GAAG;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,aAAK,cAAc,GAAG;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,aAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAA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