Goal
Update mta-js after the hosted endpoint expansion lands in HumanInterfaceDesign/mta-api, so SDK users get typed methods and response shapes for every new endpoint.
Proposed SDK surface
await mta.subway.arrivalBoard({ lat, lon, limitStations: 5, limitArrivals: 3 })
await mta.bus.arrivalBoard({ lat, lon, route: "M23", limitStops: 8, limitArrivals: 3 })
await mta.stops.byIds({ ids: ["A27", "L06", "308214"], includeRoutes: true })
await mta.routes.list({ modes: ["subway", "bus"] })
await mta.subway.routeStations({
route: "L",
direction: "uptown",
includeArrivals: false,
})
await mta.bus.routeStops({
route: "M23",
direction: 0,
includeArrivals: false,
})
Type work
- Add request types for arrival boards, stop batch lookup, route catalog, subway route stations, and bus route stops.
- Add response types matching the hosted API OpenAPI contract.
- Include
limitStops on route-stops/stations hydration calls.
- Keep subway station terminology and bus stop terminology distinct.
Acceptance criteria
- Add methods to the relevant SDK clients.
- Add request/response types in
src/types.ts.
- Add hosted API tests using mocked fetch responses.
- Update README endpoint list and examples.
Depends on HumanInterfaceDesign/mta-api PR #23.
Goal
Update
mta-jsafter the hosted endpoint expansion lands inHumanInterfaceDesign/mta-api, so SDK users get typed methods and response shapes for every new endpoint.Proposed SDK surface
Type work
limitStopson route-stops/stations hydration calls.Acceptance criteria
src/types.ts.Depends on
HumanInterfaceDesign/mta-apiPR #23.