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
119 lines (118 loc) • 5.86 kB
TypeScript
export declare const ROAD_DATA: {
readonly section: "Road";
readonly endpoints: readonly [{
readonly path: "/Road";
readonly method: "GET";
readonly summary: "Gets all roads managed by TfL";
readonly parameters: readonly [];
readonly returnType: "RoadCorridor[]";
readonly deprecated: false;
readonly tags: readonly ["Road"];
}, {
readonly path: "/Road/{ids}";
readonly method: "GET";
readonly summary: "Gets the road with the specified id (e.g. A1)";
readonly parameters: readonly [{
readonly name: "ids";
readonly type: "any";
readonly required: true;
readonly description: "Comma-separated list of road identifiers e.g. \"A406, A2\" (a full list of supported road identifiers can be found at the /Road/ endpoint)";
}];
readonly returnType: "RoadCorridor[]";
readonly deprecated: false;
readonly tags: readonly ["Road"];
}, {
readonly path: "/Road/{ids}/Status";
readonly method: "GET";
readonly 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.";
readonly parameters: readonly [{
readonly name: "ids";
readonly type: "any";
readonly required: true;
readonly description: "Comma-separated list of road identifiers e.g. \"A406, A2\" or use \"all\" to ignore id filter (a full list of supported road identifiers can be found at the /Road/ endpoint)";
}, {
readonly name: "dateRangeNullable.startDate";
readonly type: "string";
readonly required: false;
}, {
readonly name: "dateRangeNullable.endDate";
readonly type: "string";
readonly required: false;
}];
readonly returnType: "RoadCorridor[]";
readonly deprecated: false;
readonly tags: readonly ["Road"];
}, {
readonly path: "/Road/{ids}/Disruption";
readonly method: "GET";
readonly summary: "Get active disruptions, filtered by road ids";
readonly parameters: readonly [{
readonly name: "ids";
readonly type: "any";
readonly required: true;
readonly description: "Comma-separated list of road identifiers e.g. \"A406, A2\" use all for all to ignore id filter (a full list of supported road identifiers can be found at the /Road/ endpoint)";
}, {
readonly name: "stripContent";
readonly type: "boolean";
readonly required: false;
readonly description: "Optional, defaults to false. When true, removes every property/node except for id, point, severity, severityDescription, startDate, endDate, corridor details, location, comments and streets";
}, {
readonly name: "severities";
readonly type: "any";
readonly required: false;
readonly description: "an optional list of Severity names to filter on (a valid list of severities can be obtained from the /Road/Meta/severities endpoint)";
}, {
readonly name: "categories";
readonly type: "any";
readonly required: false;
readonly description: "an optional list of category names to filter on (a valid list of categories can be obtained from the /Road/Meta/categories endpoint)";
}, {
readonly name: "closures";
readonly type: "boolean";
readonly required: false;
readonly description: "Optional, defaults to true. When true, always includes disruptions that have road closures, regardless of the severity filter. When false, the severity filter works as normal.";
}];
readonly returnType: "RoadDisruption[]";
readonly deprecated: false;
readonly tags: readonly ["Road"];
}, {
readonly path: "/Road/all/Street/Disruption";
readonly method: "GET";
readonly summary: "Gets a list of disrupted streets. If no date filters are provided, current disruptions are returned.";
readonly parameters: readonly [{
readonly name: "startDate";
readonly type: "string";
readonly required: true;
readonly description: "Optional, the start time to filter on.";
}, {
readonly name: "endDate";
readonly type: "string";
readonly required: true;
readonly description: "Optional, The end time to filter on.";
}];
readonly returnType: "Object";
readonly deprecated: false;
readonly tags: readonly ["Road"];
}, {
readonly path: "/Road/all/Disruption/{disruptionIds}";
readonly method: "GET";
readonly summary: "Gets a list of active disruptions filtered by disruption Ids.";
readonly parameters: readonly [{
readonly name: "disruptionIds";
readonly type: "any";
readonly required: true;
readonly description: "Comma-separated list of disruption identifiers to filter by.";
}, {
readonly name: "stripContent";
readonly type: "boolean";
readonly required: false;
readonly description: "Optional, defaults to false. When true, removes every property/node except for id, point, severity, severityDescription, startDate, endDate, corridor details, location and comments.";
}];
readonly returnType: "RoadDisruption";
readonly deprecated: false;
readonly tags: readonly ["Road"];
}];
readonly totalEndpoints: 6;
readonly generatedAt: "2025-07-10T01:28:59.106Z";
};
export type ROAD_DATAType = typeof ROAD_DATA;