UNPKG

tfl-ts

Version:

🚇 Fully-typed TypeScript client for Transport for London (TfL) API • Zero dependencies • Auto-generated types • Real-time arrivals • Journey planning • Universal compatibility

171 lines (170 loc) • 9.48 kB
export declare const JOURNEY_DATA: { readonly section: "Journey"; readonly endpoints: readonly [{ readonly path: "/Journey/JourneyResults/{from}/to/{to}"; readonly method: "GET"; readonly summary: "Perform a Journey Planner search from the parameters specified in simple types"; readonly parameters: readonly [{ readonly name: "from"; readonly type: "string"; readonly required: true; readonly description: "Origin of the journey. Can be WGS84 coordinates expressed as \"lat,long\", a UK postcode, a Naptan (StopPoint) id, an ICS StopId, or a free-text string (will cause disambiguation unless it exactly matches a point of interest name)."; }, { readonly name: "to"; readonly type: "string"; readonly required: true; readonly description: "Destination of the journey. Can be WGS84 coordinates expressed as \"lat,long\", a UK postcode, a Naptan (StopPoint) id, an ICS StopId, or a free-text string (will cause disambiguation unless it exactly matches a point of interest name)."; }, { readonly name: "via"; readonly type: "string"; readonly required: false; readonly description: "Travel through point on the journey. Can be WGS84 coordinates expressed as \"lat,long\", a UK postcode, a Naptan (StopPoint) id, an ICS StopId, or a free-text string (will cause disambiguation unless it exactly matches a point of interest name)."; }, { readonly name: "nationalSearch"; readonly type: "boolean"; readonly required: false; readonly description: "Does the journey cover stops outside London? eg. \"nationalSearch=true\""; }, { readonly name: "date"; readonly type: "string"; readonly required: false; readonly description: "The date must be in yyyyMMdd format"; }, { readonly name: "time"; readonly type: "string"; readonly required: false; readonly description: "The time must be in HHmm format"; }, { readonly name: "timeIs"; readonly type: "string"; readonly required: false; readonly description: "Does the time given relate to arrival or leaving time? Possible options: \"departing\" | \"arriving\""; }, { readonly name: "journeyPreference"; readonly type: "string"; readonly required: false; readonly description: "The journey preference eg possible options: \"leastinterchange\" | \"leasttime\" | \"leastwalking\""; }, { readonly name: "mode"; readonly type: "any"; readonly required: false; readonly description: "The mode must be a comma separated list of modes. eg possible options: \"public-bus,overground,train,tube,coach,dlr,cablecar,tram,river,walking,cycle\""; }, { readonly name: "accessibilityPreference"; readonly type: "any"; readonly required: false; readonly description: "The accessibility preference must be a comma separated list eg. \"noSolidStairs,noEscalators,noElevators,stepFreeToVehicle,stepFreeToPlatform\""; }, { readonly name: "fromName"; readonly type: "string"; readonly required: false; readonly description: "An optional name to associate with the origin of the journey in the results."; }, { readonly name: "toName"; readonly type: "string"; readonly required: false; readonly description: "An optional name to associate with the destination of the journey in the results."; }, { readonly name: "viaName"; readonly type: "string"; readonly required: false; readonly description: "An optional name to associate with the via point of the journey in the results."; }, { readonly name: "maxTransferMinutes"; readonly type: "string"; readonly required: false; readonly description: "The max walking time in minutes for transfer eg. \"120\""; }, { readonly name: "maxWalkingMinutes"; readonly type: "string"; readonly required: false; readonly description: "The max walking time in minutes for journeys eg. \"120\""; }, { readonly name: "walkingSpeed"; readonly type: "string"; readonly required: false; readonly description: "The walking speed. eg possible options: \"slow\" | \"average\" | \"fast\"."; }, { readonly name: "cyclePreference"; readonly type: "string"; readonly required: false; readonly description: "The cycle preference. eg possible options: \"allTheWay\" | \"leaveAtStation\" | \"takeOnTransport\" | \"cycleHire\""; }, { readonly name: "adjustment"; readonly type: "string"; readonly required: false; readonly description: "Time adjustment command. eg possible options: \"TripFirst\" | \"TripLast\""; }, { readonly name: "bikeProficiency"; readonly type: "any"; readonly required: false; readonly description: "A comma separated list of cycling proficiency levels. eg possible options: \"easy,moderate,fast\""; }, { readonly name: "alternativeCycle"; readonly type: "boolean"; readonly required: false; readonly description: "Option to determine whether to return alternative cycling journey"; }, { readonly name: "alternativeWalking"; readonly type: "boolean"; readonly required: false; readonly description: "Option to determine whether to return alternative walking journey"; }, { readonly name: "applyHtmlMarkup"; readonly type: "boolean"; readonly required: false; readonly description: "Flag to determine whether certain text (e.g. walking instructions) should be output with HTML tags or not."; }, { readonly name: "useMultiModalCall"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to indicate whether or not to return 3 public transport journeys, a bus journey, a cycle hire journey, a personal cycle journey and a walking journey"; }, { readonly name: "walkingOptimization"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to indicate whether to optimize journeys using walking"; }, { readonly name: "taxiOnlyTrip"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to indicate whether to return one or more taxi journeys. Note, setting this to true will override \"useMultiModalCall\"."; }, { readonly name: "routeBetweenEntrances"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to indicate whether public transport routes should include directions between platforms and station entrances."; }, { readonly name: "useRealTimeLiveArrivals"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to indicate if we want to receive real time live arrivals data where available."; }, { readonly name: "calcOneDirection"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to make Journey Planner calculate journeys in one temporal direction only. In other words, only calculate journeys after the 'depart' time, or before the 'arrive' time. By default, the Journey Planner engine (EFA) calculates journeys in both temporal directions."; }, { readonly name: "includeAlternativeRoutes"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to make Journey Planner return alternative routes. Alternative routes are calculated by removing one or more lines included in the fastest route and re-calculating. By default, these journeys will not be returned."; }, { readonly name: "overrideMultiModalScenario"; readonly type: "number"; readonly required: false; readonly description: "An optional integer to indicate what multi modal scenario we want to use."; }, { readonly name: "combineTransferLegs"; readonly type: "boolean"; readonly required: false; readonly description: "A boolean to indicate whether walking leg to station entrance and walking leg from station entrance to platform should be combined. Defaults to true"; }]; readonly returnType: "ItineraryResult"; readonly deprecated: false; readonly tags: readonly ["Journey"]; }]; readonly totalEndpoints: 1; readonly generatedAt: "2025-07-10T01:28:59.105Z"; }; export type JOURNEY_DATAType = typeof JOURNEY_DATA;