Add @aris/data-source-tfl package

TfL data source for tube, overground, and Elizabeth line alerts.

- Fetches line statuses and filters to minor/major delays and closures
- Sorts alerts by severity, then by proximity to user location
- Caches station data after first fetch
- Uses arktype for API response validation
- Supports API injection for testing

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-01-16 23:57:29 +00:00
parent 90fd137b77
commit 8ec8b9a13e
10 changed files with 41132 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
export { TflDataSource } from "./data-source.ts"
export { TflApi, type ITflApi, type TflLineStatus } from "./tfl-api.ts"
export type {
TflAlertData,
TflAlertFeedItem,
TflAlertSeverity,
TflDataSourceConfig,
TflDataSourceOptions,
TflLineId,
StationLocation,
} from "./types.ts"