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

1,329 lines • 54.1 kB
"use strict"; /* eslint-disable */ /* tslint:disable */ /* * --------------------------------------------------------------- * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## * ## ## * ## AUTHOR: acacode ## * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## * --------------------------------------------------------------- */ Object.defineProperty(exports, "__esModule", { value: true }); exports.Api = exports.HttpClient = exports.ContentType = void 0; var ContentType; (function (ContentType) { ContentType["Json"] = "application/json"; ContentType["FormData"] = "multipart/form-data"; ContentType["UrlEncoded"] = "application/x-www-form-urlencoded"; ContentType["Text"] = "text/plain"; })(ContentType || (exports.ContentType = ContentType = {})); class HttpClient { constructor(apiConfig = {}) { this.baseUrl = 'https://api.digital.tfl.gov.uk'; this.securityData = null; this.abortControllers = new Map(); this.customFetch = (...fetchParams) => fetch(...fetchParams); this.baseApiParams = { credentials: 'same-origin', headers: {}, redirect: 'follow', referrerPolicy: 'no-referrer', }; this.setSecurityData = (data) => { this.securityData = data; }; this.contentFormatters = { [ContentType.Json]: (input) => input !== null && (typeof input === 'object' || typeof input === 'string') ? JSON.stringify(input) : input, [ContentType.Text]: (input) => input !== null && typeof input !== 'string' ? JSON.stringify(input) : input, [ContentType.FormData]: (input) => Object.keys(input || {}).reduce((formData, key) => { const property = input[key]; formData.append(key, property instanceof Blob ? property : typeof property === 'object' && property !== null ? JSON.stringify(property) : `${property}`); return formData; }, new FormData()), [ContentType.UrlEncoded]: (input) => this.toQueryString(input), }; this.createAbortSignal = (cancelToken) => { if (this.abortControllers.has(cancelToken)) { const abortController = this.abortControllers.get(cancelToken); if (abortController) { return abortController.signal; } return void 0; } const abortController = new AbortController(); this.abortControllers.set(cancelToken, abortController); return abortController.signal; }; this.abortRequest = (cancelToken) => { const abortController = this.abortControllers.get(cancelToken); if (abortController) { abortController.abort(); this.abortControllers.delete(cancelToken); } }; this.request = async ({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }) => { const secureParams = ((typeof secure === 'boolean' ? secure : this.baseApiParams.secure) && this.securityWorker && (await this.securityWorker(this.securityData))) || {}; const requestParams = this.mergeRequestParams(params, secureParams); const queryString = query && this.toQueryString(query); const payloadFormatter = this.contentFormatters[type || ContentType.Json]; const responseFormat = format || requestParams.format; return this.customFetch(`${baseUrl || this.baseUrl || ''}${path}${queryString ? `?${queryString}` : ''}`, { ...requestParams, headers: { ...(requestParams.headers || {}), ...(type && type !== ContentType.FormData ? { 'Content-Type': type } : {}), }, signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null, body: typeof body === 'undefined' || body === null ? null : payloadFormatter(body), }).then(async (response) => { const r = response.clone(); r.data = null; r.error = null; const data = !responseFormat ? r : await response[responseFormat]() .then((data) => { if (r.ok) { r.data = data; } else { r.error = data; } return r; }) .catch((e) => { r.error = e; return r; }); if (cancelToken) { this.abortControllers.delete(cancelToken); } if (!response.ok) throw data; return data; }); }; Object.assign(this, apiConfig); } encodeQueryParam(key, value) { const encodedKey = encodeURIComponent(key); return `${encodedKey}=${encodeURIComponent(typeof value === 'number' ? value : `${value}`)}`; } addQueryParam(query, key) { return this.encodeQueryParam(key, query[key]); } addArrayQueryParam(query, key) { const value = query[key]; return value.map((v) => this.encodeQueryParam(key, v)).join('&'); } toQueryString(rawQuery) { const query = rawQuery || {}; const keys = Object.keys(query).filter((key) => 'undefined' !== typeof query[key]); return keys .map((key) => Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)) .join('&'); } addQueryParams(rawQuery) { const queryString = this.toQueryString(rawQuery); return queryString ? `?${queryString}` : ''; } mergeRequestParams(params1, params2) { return { ...this.baseApiParams, ...params1, ...(params2 || {}), headers: { ...(this.baseApiParams.headers || {}), ...(params1.headers || {}), ...((params2 && params2.headers) || {}), }, }; } } exports.HttpClient = HttpClient; /** * @title Transport for London Unified API * @version v1 * @baseUrl https://api.digital.tfl.gov.uk */ class Api extends HttpClient { constructor() { super(...arguments); this.accidentStats = { /** * No description * * @tags AccidentStats * @name AccidentStatsGet * @summary Gets all accident details for accidents occuring in the specified year * @request GET:/AccidentStats/{year} */ accidentStatsGet: (year, params = {}) => this.request({ path: `/AccidentStats/${year}`, method: 'GET', format: 'json', ...params, }), }; this.airQuality = { /** * No description * * @tags AirQuality * @name AirQualityGet * @summary Gets air quality data feed * @request GET:/AirQuality */ airQualityGet: (params = {}) => this.request({ path: `/AirQuality`, method: 'GET', format: 'json', ...params, }), }; this.bikePoint = { /** * No description * * @tags BikePoint * @name BikePointGetAll * @summary Gets all bike point locations. The Place object has an addtionalProperties array which contains the nbBikes, nbDocks and nbSpaces numbers which give the status of the BikePoint. A mismatch in these numbers i.e. nbDocks - (nbBikes + nbSpaces) != 0 indicates broken docks. * @request GET:/BikePoint */ bikePointGetAll: (params = {}) => this.request({ path: `/BikePoint`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags BikePoint * @name BikePointGet * @summary Gets the bike point with the given id. * @request GET:/BikePoint/{id} */ bikePointGet: (id, params = {}) => this.request({ path: `/BikePoint/${id}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags BikePoint * @name BikePointSearch * @summary Search for bike stations by their name, a bike point's name often contains information about the name of the street or nearby landmarks, for example. Note that the search result does not contain the PlaceProperties i.e. the status or occupancy of the BikePoint, to get that information you should retrieve the BikePoint by its id on /BikePoint/id. * @request GET:/BikePoint/Search */ bikePointSearch: (query, params = {}) => this.request({ path: `/BikePoint/Search`, method: 'GET', query: query, format: 'json', ...params, }), }; this.cabwise = { /** * No description * * @tags Cabwise * @name CabwiseGet * @summary Gets taxis and minicabs contact information * @request GET:/Cabwise/search */ cabwiseGet: (query, params = {}) => this.request({ path: `/Cabwise/search`, method: 'GET', query: query, format: 'json', ...params, }), }; this.journey = { /** * No description * * @tags Journey * @name JourneyMeta * @summary Gets a list of all of the available journey planner modes * @request GET:/Journey/Meta/Modes */ journeyMeta: (params = {}) => this.request({ path: `/Journey/Meta/Modes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Journey * @name JourneyJourneyResults * @summary Perform a Journey Planner search from the parameters specified in simple types * @request GET:/Journey/JourneyResults/{from}/to/{to} */ journeyJourneyResults: ({ from, to, ...query }, params = {}) => this.request({ path: `/Journey/JourneyResults/${from}/to/${to}`, method: 'GET', query: query, format: 'json', ...params, }), }; this.line = { /** * No description * * @tags Line * @name LineMetaModes * @summary Gets a list of valid modes * @request GET:/Line/Meta/Modes */ lineMetaModes: (params = {}) => this.request({ path: `/Line/Meta/Modes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineMetaSeverity * @summary Gets a list of valid severity codes * @request GET:/Line/Meta/Severity */ lineMetaSeverity: (params = {}) => this.request({ path: `/Line/Meta/Severity`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineMetaDisruptionCategories * @summary Gets a list of valid disruption categories * @request GET:/Line/Meta/DisruptionCategories */ lineMetaDisruptionCategories: (params = {}) => this.request({ path: `/Line/Meta/DisruptionCategories`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineMetaServiceTypes * @summary Gets a list of valid ServiceTypes to filter on * @request GET:/Line/Meta/ServiceTypes */ lineMetaServiceTypes: (params = {}) => this.request({ path: `/Line/Meta/ServiceTypes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineGet * @summary Gets lines that match the specified line ids. * @request GET:/Line/{ids} */ lineGet: (ids, params = {}) => this.request({ path: `/Line/${ids}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineGetByMode * @summary Gets lines that serve the given modes. * @request GET:/Line/Mode/{modes} */ lineGetByMode: (modes, params = {}) => this.request({ path: `/Line/Mode/${modes}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineRoute * @summary Get all valid routes for all lines, including the name and id of the originating and terminating stops for each route. * @request GET:/Line/Route */ lineRoute: (query, params = {}) => this.request({ path: `/Line/Route`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineLineRoutesByIds * @summary Get all valid routes for given line ids, including the name and id of the originating and terminating stops for each route. * @request GET:/Line/{ids}/Route */ lineLineRoutesByIds: ({ ids, ...query }, params = {}) => this.request({ path: `/Line/${ids}/Route`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineRouteByMode * @summary Gets all lines and their valid routes for given modes, including the name and id of the originating and terminating stops for each route * @request GET:/Line/Mode/{modes}/Route */ lineRouteByMode: ({ modes, ...query }, params = {}) => this.request({ path: `/Line/Mode/${modes}/Route`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineRouteSequence * @summary Gets all valid routes for given line id, including the sequence of stops on each route. * @request GET:/Line/{id}/Route/Sequence/{direction} */ lineRouteSequence: ({ id, direction, ...query }, params = {}) => this.request({ path: `/Line/${id}/Route/Sequence/${direction}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineStatus * @summary Gets the line status for given line ids during the provided dates e.g Minor Delays * @request GET:/Line/{ids}/Status/{StartDate}/to/{EndDate} */ lineStatus: ({ ids, startDate, endDate, ...query }, params = {}) => this.request({ path: `/Line/${ids}/Status/${startDate}/to/${endDate}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineStatusByIds * @summary Gets the line status of for given line ids e.g Minor Delays * @request GET:/Line/{ids}/Status */ lineStatusByIds: ({ ids, ...query }, params = {}) => this.request({ path: `/Line/${ids}/Status`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineSearch * @summary Search for lines or routes matching the query string * @request GET:/Line/Search/{query} */ lineSearch: ({ query, ...queryParams }, params = {}) => this.request({ path: `/Line/Search/${query}`, method: 'GET', query: queryParams, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineStatusBySeverity * @summary Gets the line status for all lines with a given severity A list of valid severity codes can be obtained from a call to Line/Meta/Severity * @request GET:/Line/Status/{severity} */ lineStatusBySeverity: (severity, params = {}) => this.request({ path: `/Line/Status/${severity}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineStatusByMode * @summary Gets the line status of for all lines for the given modes * @request GET:/Line/Mode/{modes}/Status */ lineStatusByMode: ({ modes, ...query }, params = {}) => this.request({ path: `/Line/Mode/${modes}/Status`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineStopPoints * @summary Gets a list of the stations that serve the given line id * @request GET:/Line/{id}/StopPoints */ lineStopPoints: ({ id, ...query }, params = {}) => this.request({ path: `/Line/${id}/StopPoints`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Line * @name LineTimetable * @summary Gets the timetable for a specified station on the give line * @request GET:/Line/{id}/Timetable/{fromStopPointId} */ lineTimetable: (fromStopPointId, id, params = {}) => this.request({ path: `/Line/${id}/Timetable/${fromStopPointId}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineTimetableTo * @summary Gets the timetable for a specified station on the give line with specified destination * @request GET:/Line/{id}/Timetable/{fromStopPointId}/to/{toStopPointId} */ lineTimetableTo: (fromStopPointId, id, toStopPointId, params = {}) => this.request({ path: `/Line/${id}/Timetable/${fromStopPointId}/to/${toStopPointId}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineDisruption * @summary Get disruptions for the given line ids * @request GET:/Line/{ids}/Disruption */ lineDisruption: (ids, params = {}) => this.request({ path: `/Line/${ids}/Disruption`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineDisruptionByMode * @summary Get disruptions for all lines of the given modes. * @request GET:/Line/Mode/{modes}/Disruption */ lineDisruptionByMode: (modes, params = {}) => this.request({ path: `/Line/Mode/${modes}/Disruption`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Line * @name LineArrivals * @summary Get the list of arrival predictions for given line ids based at the given stop * @request GET:/Line/{ids}/Arrivals/{stopPointId} */ lineArrivals: ({ ids, stopPointId, ...query }, params = {}) => this.request({ path: `/Line/${ids}/Arrivals/${stopPointId}`, method: 'GET', query: query, format: 'json', ...params, }), }; this.mode = { /** * No description * * @tags Mode * @name ModeGetActiveServiceTypes * @summary Returns the service type active for a mode. Currently only supports tube * @request GET:/Mode/ActiveServiceTypes */ modeGetActiveServiceTypes: (params = {}) => this.request({ path: `/Mode/ActiveServiceTypes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Mode * @name ModeArrivals * @summary Gets the next arrival predictions for all stops of a given mode * @request GET:/Mode/{mode}/Arrivals */ modeArrivals: ({ mode, ...query }, params = {}) => this.request({ path: `/Mode/${mode}/Arrivals`, method: 'GET', query: query, format: 'json', ...params, }), }; this.occupancy = { /** * No description * * @tags Occupancy * @name OccupancyGet * @summary Gets the occupancy for a car park with a given id * @request GET:/Occupancy/CarPark/{id} */ occupancyGet: (id, params = {}) => this.request({ path: `/Occupancy/CarPark/${id}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Occupancy * @name OccupancyGet2 * @summary Gets the occupancy for all car parks that have occupancy data * @request GET:/Occupancy/CarPark * @originalName occupancyGet * @duplicate */ occupancyGet2: (params = {}) => this.request({ path: `/Occupancy/CarPark`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Occupancy * @name OccupancyGetChargeConnectorStatus * @summary Gets the occupancy for a charge connectors with a given id (sourceSystemPlaceId) * @request GET:/Occupancy/ChargeConnector/{ids} */ occupancyGetChargeConnectorStatus: (ids, params = {}) => this.request({ path: `/Occupancy/ChargeConnector/${ids}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Occupancy * @name OccupancyGetAllChargeConnectorStatus * @summary Gets the occupancy for all charge connectors * @request GET:/Occupancy/ChargeConnector */ occupancyGetAllChargeConnectorStatus: (params = {}) => this.request({ path: `/Occupancy/ChargeConnector`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Occupancy * @name OccupancyGetBikePointsOccupancies * @summary Get the occupancy for bike points. * @request GET:/Occupancy/BikePoints/{ids} */ occupancyGetBikePointsOccupancies: (ids, params = {}) => this.request({ path: `/Occupancy/BikePoints/${ids}`, method: 'GET', format: 'json', ...params, }), }; this.place = { /** * No description * * @tags Place * @name PlaceMetaCategories * @summary Gets a list of all of the available place property categories and keys. * @request GET:/Place/Meta/Categories */ placeMetaCategories: (params = {}) => this.request({ path: `/Place/Meta/Categories`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceMetaPlaceTypes * @summary Gets a list of the available types of Place. * @request GET:/Place/Meta/PlaceTypes */ placeMetaPlaceTypes: (params = {}) => this.request({ path: `/Place/Meta/PlaceTypes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceGetStreetsByPostCode * @summary Gets the set of streets associated with a post code. * @request GET:/Place/Address/Streets/{Postcode} */ placeGetStreetsByPostCode: ({ postcode, ...query }, params = {}) => this.request({ path: `/Place/Address/Streets/${postcode}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceGetByType * @summary Gets all places of a given type * @request GET:/Place/Type/{types} */ placeGetByType: ({ types, ...query }, params = {}) => this.request({ path: `/Place/Type/${types}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceGet * @summary Gets the place with the given id. * @request GET:/Place/{id} */ placeGet: ({ id, ...query }, params = {}) => this.request({ path: `/Place/${id}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceGetByGeo * @summary Gets the places that lie within a geographic region. The geographic region of interest can either be specified by using a lat/lon geo-point and a radius in metres to return places within the locus defined by the lat/lon of its centre or alternatively, by the use of a bounding box defined by the lat/lon of its north-west and south-east corners. Optionally filters on type and can strip properties for a smaller payload. * @request GET:/Place */ placeGetByGeo: (query, params = {}) => this.request({ path: `/Place`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceGetAt * @summary Gets any places of the given type whose geography intersects the given latitude and longitude. In practice this means the Place must be polygonal e.g. a BoroughBoundary. * @request GET:/Place/{type}/At/{Lat}/{Lon} */ placeGetAt: ({ type, lat, lon, ...query }, params = {}) => this.request({ path: `/Place/${type}/At/${lat}/${lon}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceGetOverlay * @summary Gets the place overlay for a given set of co-ordinates and a given width/height. * @request GET:/Place/{type}/overlay/{z}/{Lat}/{Lon}/{width}/{height} */ placeGetOverlay: ({ z, type, width, height, lat, lon, ...query }, params = {}) => this.request({ path: `/Place/${type}/overlay/{z}/${lat}/${lon}/${width}/${height}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Place * @name PlaceSearch * @summary Gets all places that matches the given query * @request GET:/Place/Search */ placeSearch: (query, params = {}) => this.request({ path: `/Place/Search`, method: 'GET', query: query, format: 'json', ...params, }), }; this.road = { /** * No description * * @tags Road * @name RoadGet * @summary Gets all roads managed by TfL * @request GET:/Road */ roadGet: (params = {}) => this.request({ path: `/Road`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadGet2 * @summary Gets the road with the specified id (e.g. A1) * @request GET:/Road/{ids} * @originalName roadGet * @duplicate */ roadGet2: (ids, params = {}) => this.request({ path: `/Road/${ids}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadStatus * @summary Gets the specified roads with the status aggregated over the date range specified, or now until the end of today if no dates are passed. * @request GET:/Road/{ids}/Status */ roadStatus: ({ ids, ...query }, params = {}) => this.request({ path: `/Road/${ids}/Status`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadDisruption * @summary Get active disruptions, filtered by road ids * @request GET:/Road/{ids}/Disruption */ roadDisruption: ({ ids, ...query }, params = {}) => this.request({ path: `/Road/${ids}/Disruption`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadDisruptedStreets * @summary Gets a list of disrupted streets. If no date filters are provided, current disruptions are returned. * @request GET:/Road/all/Street/Disruption */ roadDisruptedStreets: (query, params = {}) => this.request({ path: `/Road/all/Street/Disruption`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadDisruptionById * @summary Gets a list of active disruptions filtered by disruption Ids. * @request GET:/Road/all/Disruption/{disruptionIds} */ roadDisruptionById: ({ disruptionIds, ...query }, params = {}) => this.request({ path: `/Road/all/Disruption/${disruptionIds}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadMetaCategories * @summary Gets a list of valid RoadDisruption categories * @request GET:/Road/Meta/Categories */ roadMetaCategories: (params = {}) => this.request({ path: `/Road/Meta/Categories`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Road * @name RoadMetaSeverities * @summary Gets a list of valid RoadDisruption severity codes * @request GET:/Road/Meta/Severities */ roadMetaSeverities: (params = {}) => this.request({ path: `/Road/Meta/Severities`, method: 'GET', format: 'json', ...params, }), }; this.search = { /** * No description * * @tags Search * @name SearchGet * @summary Search the site for occurrences of the query string. The maximum number of results returned is equal to the maximum page size of 100. To return subsequent pages, use the paginated overload. * @request GET:/Search */ searchGet: (query, params = {}) => this.request({ path: `/Search`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Search * @name SearchBusSchedules * @summary Searches the bus schedules folder on S3 for a given bus number. * @request GET:/Search/BusSchedules */ searchBusSchedules: (query, params = {}) => this.request({ path: `/Search/BusSchedules`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags Search * @name SearchMetaSearchProviders * @summary Gets the available searchProvider names. * @request GET:/Search/Meta/SearchProviders */ searchMetaSearchProviders: (params = {}) => this.request({ path: `/Search/Meta/SearchProviders`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Search * @name SearchMetaCategories * @summary Gets the available search categories. * @request GET:/Search/Meta/Categories */ searchMetaCategories: (params = {}) => this.request({ path: `/Search/Meta/Categories`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags Search * @name SearchMetaSorts * @summary Gets the available sorting options. * @request GET:/Search/Meta/Sorts */ searchMetaSorts: (params = {}) => this.request({ path: `/Search/Meta/Sorts`, method: 'GET', format: 'json', ...params, }), }; this.stopPoint = { /** * No description * * @tags StopPoint * @name StopPointMetaCategories * @summary Gets the list of available StopPoint additional information categories * @request GET:/StopPoint/Meta/Categories */ stopPointMetaCategories: (params = {}) => this.request({ path: `/StopPoint/Meta/Categories`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointMetaStopTypes * @summary Gets the list of available StopPoint types * @request GET:/StopPoint/Meta/StopTypes */ stopPointMetaStopTypes: (params = {}) => this.request({ path: `/StopPoint/Meta/StopTypes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointMetaModes * @summary Gets the list of available StopPoint modes * @request GET:/StopPoint/Meta/Modes */ stopPointMetaModes: (params = {}) => this.request({ path: `/StopPoint/Meta/Modes`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGet * @summary Gets a list of StopPoints corresponding to the given list of stop ids. * @request GET:/StopPoint/{ids} */ stopPointGet: ({ ids, ...query }, params = {}) => this.request({ path: `/StopPoint/${ids}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGet2 * @summary Get a list of places corresponding to a given id and place types. * @request GET:/StopPoint/{id}/placeTypes * @originalName stopPointGet * @duplicate */ stopPointGet2: ({ id, ...query }, params = {}) => this.request({ path: `/StopPoint/${id}/placeTypes`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointCrowding * @summary Gets all the Crowding data (static) for the StopPointId, plus crowding data for a given line and optionally a particular direction. * @request GET:/StopPoint/{id}/Crowding/{line} */ stopPointCrowding: ({ id, line, ...query }, params = {}) => this.request({ path: `/StopPoint/${id}/Crowding/${line}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGetByType * @summary Gets all stop points of a given type * @request GET:/StopPoint/Type/{types} */ stopPointGetByType: (types, params = {}) => this.request({ path: `/StopPoint/Type/${types}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGetByTypeWithPagination * @summary Gets all the stop points of given type(s) with a page number * @request GET:/StopPoint/Type/{types}/page/{page} */ stopPointGetByTypeWithPagination: (types, page, params = {}) => this.request({ path: `/StopPoint/Type/${types}/page/${page}`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGetServiceTypes * @summary Gets the service types for a given stoppoint * @request GET:/StopPoint/ServiceTypes */ stopPointGetServiceTypes: (query, params = {}) => this.request({ path: `/StopPoint/ServiceTypes`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointArrivals * @summary Gets the list of arrival predictions for the given stop point id * @request GET:/StopPoint/{id}/Arrivals */ stopPointArrivals: (id, params = {}) => this.request({ path: `/StopPoint/${id}/Arrivals`, method: 'GET', format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointArrivalDepartures * @summary Gets the list of arrival and departure predictions for the given stop point id (overground, Elizabeth line and thameslink only) * @request GET:/StopPoint/{id}/ArrivalDepartures */ stopPointArrivalDepartures: ({ id, ...query }, params = {}) => this.request({ path: `/StopPoint/${id}/ArrivalDepartures`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointReachableFrom * @summary Gets Stopoints that are reachable from a station/line combination. * @request GET:/StopPoint/{id}/CanReachOnLine/{lineId} */ stopPointReachableFrom: ({ id, lineId, ...query }, params = {}) => this.request({ path: `/StopPoint/${id}/CanReachOnLine/${lineId}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointRoute * @summary Returns the route sections for all the lines that service the given stop point ids * @request GET:/StopPoint/{id}/Route */ stopPointRoute: ({ id, ...query }, params = {}) => this.request({ path: `/StopPoint/${id}/Route`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointDisruptionByMode * @summary Gets a distinct list of disrupted stop points for the given modes * @request GET:/StopPoint/Mode/{modes}/Disruption */ stopPointDisruptionByMode: ({ modes, ...query }, params = {}) => this.request({ path: `/StopPoint/Mode/${modes}/Disruption`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointDisruption * @summary Gets all disruptions for the specified StopPointId, plus disruptions for any child Naptan records it may have. * @request GET:/StopPoint/{ids}/Disruption */ stopPointDisruption: ({ ids, ...query }, params = {}) => this.request({ path: `/StopPoint/${ids}/Disruption`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointDirection * @summary Returns the canonical direction, "inbound" or "outbound", for a given pair of stop point Ids in the direction from -> to. * @request GET:/StopPoint/{id}/DirectionTo/{toStopPointId} */ stopPointDirection: ({ id, toStopPointId, ...query }, params = {}) => this.request({ path: `/StopPoint/${id}/DirectionTo/${toStopPointId}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGetByGeoPoint * @summary Gets a list of StopPoints within {radius} by the specified criteria * @request GET:/StopPoint */ stopPointGetByGeoPoint: (query, params = {}) => this.request({ path: `/StopPoint`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointGetByMode * @summary Gets a list of StopPoints filtered by the modes available at that StopPoint. * @request GET:/StopPoint/Mode/{modes} */ stopPointGetByMode: ({ modes, ...query }, params = {}) => this.request({ path: `/StopPoint/Mode/${modes}`, method: 'GET', query: query, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointSearch * @summary Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code. * @request GET:/StopPoint/Search/{query} */ stopPointSearch: ({ query, ...queryParams }, params = {}) => this.request({ path: `/StopPoint/Search/${query}`, method: 'GET', query: queryParams, format: 'json', ...params, }), /** * No description * * @tags StopPoint * @name StopPointSearch2 * @summary Search StopPoints by their common name, or their 5-digit Countdown Bus Stop Code. * @request GET:/StopPoint/Search * @originalName stopPointSearch * @duplicate