Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
33164cdfb4 | |||
05d0b35417 | |||
4a97a8bd3c | |||
5fde0ce8bf | |||
c4416f66af | |||
899450707a | |||
be062b17e4 | |||
0b4235ef2e | |||
5b46b14607 | |||
a3a4409e1d | |||
61909c0015 | |||
c3094ffcbb | |||
92ec756bf8 | |||
5165bce5a8 | |||
0a60efae8b | |||
8409e28136 | |||
2bab790cf5 | |||
0d46756d8e | |||
8f3501b095 |
6
index.ts
6
index.ts
@ -2,8 +2,8 @@
|
||||
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 { Service, Stop } from './src/database/timetable'
|
||||
export { Station, NearestStationResponse } from './src/database/station'
|
||||
export { Service, Stop, SimpleService, ServiceDetail } from './src/database/timetable'
|
||||
export { User } from './src/database/user'
|
||||
|
||||
// Downstream API
|
||||
@ -12,6 +12,6 @@ export { Versions } from './src/owlboardApi/versions'
|
||||
export { StaffLdb, NrccMessage, TrainServices,
|
||||
ServiceLocation } from './src/owlboardApi/staffLdb'
|
||||
export { OB_TrainTT_service, OB_TrainTT_stopDetail } from './src/owlboardApi/trainTimetable'
|
||||
export { OB_Pis_SimpleObject } from './src/owlboardApi/pis'
|
||||
export { OB_Pis_SimpleObject, OB_Pis_FullObject } from './src/owlboardApi/pis'
|
||||
|
||||
// Upstream API
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@owlboard/ts-types",
|
||||
"version": "0.1.1",
|
||||
"version": "1.2.1",
|
||||
"description": "Declares Typescript types for the OwlBoard stack",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
|
@ -3,6 +3,19 @@ interface Station {
|
||||
TIPLOC: string;
|
||||
"3ALPHA": string;
|
||||
NLCDESC: string;
|
||||
location: stationLocation;
|
||||
operator: string;
|
||||
}
|
||||
|
||||
export { Station }
|
||||
interface stationLocation {
|
||||
type: "Point";
|
||||
coordinates: number[];
|
||||
}
|
||||
|
||||
interface NearestStationResponse {
|
||||
"3ALPHA": string;
|
||||
NLCDESC: string;
|
||||
miles: number;
|
||||
}
|
||||
|
||||
export { Station, NearestStationResponse }
|
@ -3,22 +3,43 @@ interface Stop {
|
||||
wttDeparture?: string | null;
|
||||
publicArrival?: string | null;
|
||||
wttArrival?: string | null;
|
||||
pass?: string | null;
|
||||
platform?: string | null;
|
||||
arrLine?: string | null;
|
||||
depLine?: string | null;
|
||||
isPublic: boolean;
|
||||
tiploc: string;
|
||||
}
|
||||
|
||||
interface SimpleService {
|
||||
stpIndicator: string;
|
||||
trainUid: string;
|
||||
operator: string;
|
||||
stops: Stop[];
|
||||
}
|
||||
|
||||
|
||||
interface Service {
|
||||
transactionType: string;
|
||||
stpIndicator: string;
|
||||
operator: string;
|
||||
trainUid: string;
|
||||
headcode: string;
|
||||
powerType: string;
|
||||
planSpeed: string;
|
||||
transactionType: string;
|
||||
stpIndicator: string;
|
||||
operator: string;
|
||||
trainUid: string;
|
||||
headcode: string;
|
||||
powerType: string;
|
||||
planSpeed: string;
|
||||
scheduleStartDate: Date;
|
||||
scheduleEndDate: Date;
|
||||
daysRun: string[];
|
||||
stops: Stop[];
|
||||
scheduleEndDate: Date;
|
||||
daysRun: string[];
|
||||
stops: Stop[];
|
||||
serviceDetail: ServiceDetail;
|
||||
}
|
||||
|
||||
export { Stop, Service }
|
||||
interface ServiceDetail {
|
||||
firstClass: boolean;
|
||||
catering: boolean;
|
||||
sleeper: boolean;
|
||||
vstp: boolean;
|
||||
guard: boolean
|
||||
}
|
||||
|
||||
export { Stop, Service, SimpleService, ServiceDetail }
|
@ -1,15 +1,13 @@
|
||||
export interface OB_Pis_SimpleObject {
|
||||
code: number;
|
||||
match: "full" | "partial";
|
||||
skip?: "first" | "last";
|
||||
skipCount?: number;
|
||||
msg?: string;
|
||||
code: string;
|
||||
toc: string;
|
||||
skipCount: number;
|
||||
skipType?: string;
|
||||
}
|
||||
|
||||
/* NOT IN USE YET
|
||||
export interface OB_Pis_FullObject {
|
||||
code: number;
|
||||
crs: string[];
|
||||
tiploc?: string[];
|
||||
code: string;
|
||||
stops: string[];
|
||||
toc: string;
|
||||
tiplocs?: string[];
|
||||
}
|
||||
*/
|
@ -1,4 +1,5 @@
|
||||
import type { OB_Pis_SimpleObject } from "./pis";
|
||||
import type { ServiceDetail } from "../database/timetable";
|
||||
|
||||
export interface OB_TrainTT_service {
|
||||
stpIndicator: string;
|
||||
@ -11,7 +12,8 @@ export interface OB_TrainTT_service {
|
||||
scheduleEnd: Date;
|
||||
daysRun: string[];
|
||||
stops: OB_TrainTT_stopDetail[];
|
||||
pis: OB_Pis_SimpleObject;
|
||||
pis?: OB_Pis_SimpleObject;
|
||||
serviceDetail: ServiceDetail;
|
||||
}
|
||||
|
||||
export interface OB_TrainTT_stopDetail {
|
||||
@ -19,6 +21,10 @@ export interface OB_TrainTT_stopDetail {
|
||||
publicArrival?: string;
|
||||
wttDeparture?: string;
|
||||
wttArrival?: string;
|
||||
pass?: string;
|
||||
platform?: string;
|
||||
arrLine?: string;
|
||||
depLine?: string;
|
||||
tiploc: string;
|
||||
isPublic: boolean;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user