From 4a97a8bd3cd6927ceb85dab059bd5ed2d04c561c Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Sun, 30 Jun 2024 21:35:30 +0100 Subject: [PATCH] Add new station types --- index.ts | 2 +- package.json | 2 +- src/database/station.ts | 15 ++++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 121cf1a..271d944 100644 --- a/index.ts +++ b/index.ts @@ -2,7 +2,7 @@ export { Corpus } from './src/database/corpus' export { Pis } from './src/database/pis' export { ReasonCode } from './src/database/reasonCode' -export { Station } from './src/database/station' +export { Station, NearestStationResponse } from './src/database/station' export { Service, Stop, SimpleService, ServiceDetail } from './src/database/timetable' export { User } from './src/database/user' diff --git a/package.json b/package.json index 8340408..bde691e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@owlboard/ts-types", - "version": "1.1.0", + "version": "1.2.0", "description": "Declares Typescript types for the OwlBoard stack", "main": "index.ts", "scripts": { diff --git a/src/database/station.ts b/src/database/station.ts index ed6691f..7dd9193 100644 --- a/src/database/station.ts +++ b/src/database/station.ts @@ -3,6 +3,19 @@ interface Station { TIPLOC: string; "3ALPHA": string; NLCDESC: string; + location: stationLocation; + operator: string; } -export { Station } \ No newline at end of file +interface stationLocation { + type: "Point"; + coordinates: number[]; +} + +interface NearestStationResponse { + "3ALPHA": string; + NLCDESC: string; + miles: number; +} + +export { Station, NearestStationResponse } \ No newline at end of file