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

335 lines (334 loc) • 15.6 kB
export declare const LINE_DATA: { readonly section: "Line"; readonly endpoints: readonly [{ readonly path: "/Line/{ids}"; readonly method: "GET"; readonly summary: "Gets lines that match the specified line ids."; readonly parameters: readonly [{ readonly name: "ids"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids."; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Mode/{modes}"; readonly method: "GET"; readonly summary: "Gets lines that serve the given modes."; readonly parameters: readonly [{ readonly name: "modes"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of modes e.g. tube,dlr"; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Route"; readonly method: "GET"; readonly summary: "Get all valid routes for all lines, including the name and id of the originating and terminating stops for each route."; readonly parameters: readonly [{ readonly name: "serviceTypes"; readonly type: "any"; readonly required: false; readonly description: "A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified"; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{ids}/Route"; readonly method: "GET"; readonly summary: "Get all valid routes for given line ids, including the name and id of the originating and terminating stops for each route."; readonly parameters: readonly [{ readonly name: "ids"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids."; }, { readonly name: "serviceTypes"; readonly type: "any"; readonly required: false; readonly description: "A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified"; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Mode/{modes}/Route"; readonly method: "GET"; readonly 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"; readonly parameters: readonly [{ readonly name: "modes"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of modes e.g. tube,dlr"; }, { readonly name: "serviceTypes"; readonly type: "any"; readonly required: false; readonly description: "A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified"; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{id}/Route/Sequence/{direction}"; readonly method: "GET"; readonly summary: "Gets all valid routes for given line id, including the sequence of stops on each route."; readonly parameters: readonly [{ readonly name: "id"; readonly type: "string"; readonly required: true; readonly description: "A single line id e.g. victoria"; }, { readonly name: "direction"; readonly type: "string"; readonly required: true; readonly description: "The direction of travel. Can be inbound or outbound."; }, { readonly name: "serviceTypes"; readonly type: "any"; readonly required: false; readonly description: "A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified"; }, { readonly name: "excludeCrowding"; readonly type: "boolean"; readonly required: false; readonly description: "That excludes crowding from line disruptions. Can be true or false."; }]; readonly returnType: "RouteSequence"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{ids}/Status/{StartDate}/to/{EndDate}"; readonly method: "GET"; readonly summary: "Gets the line status for given line ids during the provided dates e.g Minor Delays"; readonly parameters: readonly [{ readonly name: "ids"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids."; }, { readonly name: "detail"; readonly type: "boolean"; readonly required: false; readonly description: "Include details of the disruptions that are causing the line status including the affected stops and routes"; }, { readonly name: "startDate"; readonly type: "string"; readonly required: true; }, { readonly name: "endDate"; readonly type: "string"; readonly required: true; }, { readonly name: "dateRange.startDate"; readonly type: "string"; readonly required: false; }, { readonly name: "dateRange.endDate"; readonly type: "string"; readonly required: false; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{ids}/Status"; readonly method: "GET"; readonly summary: "Gets the line status of for given line ids e.g Minor Delays"; readonly parameters: readonly [{ readonly name: "ids"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids."; }, { readonly name: "detail"; readonly type: "boolean"; readonly required: false; readonly description: "Include details of the disruptions that are causing the line status including the affected stops and routes"; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Search/{query}"; readonly method: "GET"; readonly summary: "Search for lines or routes matching the query string"; readonly parameters: readonly [{ readonly name: "query"; readonly type: "string"; readonly required: true; readonly description: "Search term e.g victoria"; }, { readonly name: "modes"; readonly type: "any"; readonly required: false; readonly description: "Optionally filter by the specified modes"; }, { readonly name: "serviceTypes"; readonly type: "any"; readonly required: false; readonly description: "A comma seperated list of service types to filter on. Supported values: Regular, Night. Defaulted to 'Regular' if not specified"; }]; readonly returnType: "RouteSearchResponse"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Status/{severity}"; readonly method: "GET"; readonly summary: "Gets the line status for all lines with a given severity\r\n A list of valid severity codes can be obtained from a call to Line/Meta/Severity"; readonly parameters: readonly [{ readonly name: "severity"; readonly type: "number"; readonly required: true; readonly description: "The level of severity (eg: a number from 0 to 14)"; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Mode/{modes}/Status"; readonly method: "GET"; readonly summary: "Gets the line status of for all lines for the given modes"; readonly parameters: readonly [{ readonly name: "modes"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of modes to filter by. e.g. tube,dlr"; }, { readonly name: "detail"; readonly type: "boolean"; readonly required: false; readonly description: "Include details of the disruptions that are causing the line status including the affected stops and routes"; }, { readonly name: "severityLevel"; readonly type: "string"; readonly required: false; readonly description: "If specified, ensures that only those line status(es) are returned within the lines that have disruptions with the matching severity level."; }]; readonly returnType: "Line[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{id}/StopPoints"; readonly method: "GET"; readonly summary: "Gets a list of the stations that serve the given line id"; readonly parameters: readonly [{ readonly name: "id"; readonly type: "string"; readonly required: true; readonly description: "A single line id e.g. victoria"; }, { readonly name: "tflOperatedNationalRailStationsOnly"; readonly type: "boolean"; readonly required: false; readonly description: "If the national-rail line is requested, this flag will filter the national rail stations so that only those operated by TfL are returned"; }]; readonly returnType: "StopPoint[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{id}/Timetable/{fromStopPointId}"; readonly method: "GET"; readonly summary: "Gets the timetable for a specified station on the give line"; readonly parameters: readonly [{ readonly name: "fromStopPointId"; readonly type: "string"; readonly required: true; readonly description: "The originating station's stop point id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)"; }, { readonly name: "id"; readonly type: "string"; readonly required: true; readonly description: "A single line id e.g. victoria"; }]; readonly returnType: "TimetableResponse"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{id}/Timetable/{fromStopPointId}/to/{toStopPointId}"; readonly method: "GET"; readonly summary: "Gets the timetable for a specified station on the give line with specified destination"; readonly parameters: readonly [{ readonly name: "fromStopPointId"; readonly type: "string"; readonly required: true; readonly description: "The originating station's stop point id (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)"; }, { readonly name: "id"; readonly type: "string"; readonly required: true; readonly description: "A single line id e.g. victoria"; }, { readonly name: "toStopPointId"; readonly type: "string"; readonly required: true; readonly description: "The destination stations's Naptan code"; }]; readonly returnType: "TimetableResponse"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{ids}/Disruption"; readonly method: "GET"; readonly summary: "Get disruptions for the given line ids"; readonly parameters: readonly [{ readonly name: "ids"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids."; }]; readonly returnType: "Disruption[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/Mode/{modes}/Disruption"; readonly method: "GET"; readonly summary: "Get disruptions for all lines of the given modes."; readonly parameters: readonly [{ readonly name: "modes"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of modes e.g. tube,dlr"; }]; readonly returnType: "Disruption[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }, { readonly path: "/Line/{ids}/Arrivals/{stopPointId}"; readonly method: "GET"; readonly summary: "Get the list of arrival predictions for given line ids based at the given stop"; readonly parameters: readonly [{ readonly name: "ids"; readonly type: "any"; readonly required: true; readonly description: "A comma-separated list of line ids e.g. victoria,circle,N133. Max. approx. 20 ids."; }, { readonly name: "stopPointId"; readonly type: "string"; readonly required: true; readonly description: "Optional. Id of stop to get arrival predictions for (station naptan code e.g. 940GZZLUASL, you can use /StopPoint/Search/{query} endpoint to find a stop point id from a station name)"; }, { readonly name: "direction"; readonly type: "string"; readonly required: false; readonly description: "Optional. The direction of travel. Can be inbound or outbound or all. If left blank, and destinationStopId is set, will default to all"; }, { readonly name: "destinationStationId"; readonly type: "string"; readonly required: false; readonly description: "Optional. Id of destination stop"; }]; readonly returnType: "Prediction[]"; readonly deprecated: false; readonly tags: readonly ["Line"]; }]; readonly totalEndpoints: 17; readonly generatedAt: "2025-07-10T01:28:59.105Z"; }; export type LINE_DATAType = typeof LINE_DATA;