From 80d5ee004a17346a96d70f9c87b7f97a9b5412fc Mon Sep 17 00:00:00 2001 From: Gary <12258850+gtokman@users.noreply.github.com> Date: Fri, 13 Nov 2026 19:07:35 -0800 Subject: [PATCH 1/3] feat: add Muni and Caltrain clients Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- README.md | 8 +++++++- index.test.ts | 2 ++ index.ts | 4 ++++ src/types.ts | 4 +++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d101039..96764ee 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,8 @@ The hosted API also provides regional methods for PATH, NJ Transit Rail, NYC Ferry, Citi Bike, LIRR, Metro-North, MBTA, BART, King County Metro, CapMetro, Pace, Tri-Rail, Brightline, Denver RTD, Metro Transit, Pittsburgh Regional Transit, MARTA, VIA, GCRTA, CATS, SacRT, MARC, UTA, JTA, Bay Wheels, Divvy, -Bluebikes, Capital Bikeshare, Biketown, Indego, and Metro Bike Share: +Muni, Caltrain, Bluebikes, Capital Bikeshare, Biketown, Indego, and Metro Bike +Share: ```js const pathArrivals = await mta.path.arrivals({ station: "JSQ", direction: "to-ny" }); @@ -116,6 +117,11 @@ const metroNorthDepartures = await mta.metroNorth.departures({ limit: 5, }); const rtdRoutes = await mta.rtd.routes(); +const muniRoutes = await mta.muni.routes(); +const caltrainDepartures = await mta.caltrain.departures({ + stop: "San Francisco Caltrain Station", + limit: 5, +}); const divvyStations = await mta.divvy.stations({ lat: 41.88, lon: -87.63, diff --git a/index.test.ts b/index.test.ts index c7f0be4..a082fc5 100644 --- a/index.test.ts +++ b/index.test.ts @@ -796,6 +796,8 @@ test("hosted new commuter rail clients use exact URLs", async () => { [mta.marc, "marc"], [mta.uta, "uta"], [mta.jta, "jta"], + [mta.muni, "muni"], + [mta.caltrain, "caltrain"], ] as const; for (const [client] of clients) { diff --git a/index.ts b/index.ts index 6c302e0..556a68a 100644 --- a/index.ts +++ b/index.ts @@ -108,6 +108,8 @@ export class MTA { readonly marc: CommuterRailClient; readonly uta: CommuterRailClient; readonly jta: CommuterRailClient; + readonly muni: CommuterRailClient; + readonly caltrain: CommuterRailClient; readonly alerts: AlertsClient; readonly stops: StopsClient; readonly routes: RoutesClient; @@ -173,6 +175,8 @@ export class MTA { this.marc = new CommuterRailClient(this, "/api/v1/marc"); this.uta = new CommuterRailClient(this, "/api/v1/uta"); this.jta = new CommuterRailClient(this, "/api/v1/jta"); + this.muni = new CommuterRailClient(this, "/api/v1/muni"); + this.caltrain = new CommuterRailClient(this, "/api/v1/caltrain"); this.alerts = new AlertsClient(this); this.stops = new StopsClient(this); this.routes = new RoutesClient(this); diff --git a/src/types.ts b/src/types.ts index f600ee1..1b42763 100644 --- a/src/types.ts +++ b/src/types.ts @@ -391,7 +391,9 @@ export type CommuterRailMode = | "sacrt" | "marc" | "uta" - | "jta"; + | "jta" + | "muni" + | "caltrain"; export type HostedArrivalDirection = "north" | "south" | "east" | "west" | "unknown" | "uptown" | "downtown"; export interface PathStation { From 26dd483c36c33bfb38cc76e70b880d764de2f5d4 Mon Sep 17 00:00:00 2001 From: Gary <12258850+gtokman@users.noreply.github.com> Date: Fri, 13 Nov 2026 19:07:40 -0800 Subject: [PATCH 2/3] chore: bump version to 2.7.0 Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce6fed0..95d64db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mta-js", - "version": "2.6.0", + "version": "2.7.0", "description": "A TypeScript client for MTA realtime feeds and the hosted MTA API.", "license": "MIT", "repository": { From 8d25e1e69f853db48026f8ffc32f1dec531aee97 Mon Sep 17 00:00:00 2001 From: Gary <12258850+gtokman@users.noreply.github.com> Date: Fri, 13 Nov 2026 19:08:37 -0800 Subject: [PATCH 3/3] docs: group Muni and Caltrain with transit agencies Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 96764ee..8a98436 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,8 @@ deployments. The hosted API also provides regional methods for PATH, NJ Transit Rail, NYC Ferry, Citi Bike, LIRR, Metro-North, MBTA, BART, King County Metro, CapMetro, Pace, Tri-Rail, Brightline, Denver RTD, Metro Transit, Pittsburgh Regional -Transit, MARTA, VIA, GCRTA, CATS, SacRT, MARC, UTA, JTA, Bay Wheels, Divvy, -Muni, Caltrain, Bluebikes, Capital Bikeshare, Biketown, Indego, and Metro Bike +Transit, MARTA, VIA, GCRTA, CATS, SacRT, MARC, UTA, JTA, Muni, Caltrain, Bay +Wheels, Divvy, Bluebikes, Capital Bikeshare, Biketown, Indego, and Metro Bike Share: ```js