Add types for new trainService(Timetable) data
This commit is contained in:
parent
fd6eb64cc4
commit
c5f5b07ddb
2
index.ts
2
index.ts
|
@ -11,5 +11,7 @@ export { ApiResponse } from './src/owlboardApi/apiResponse'
|
||||||
export { Versions } from './src/owlboardApi/versions'
|
export { Versions } from './src/owlboardApi/versions'
|
||||||
export { StaffLdb, NrccMessage, TrainServices,
|
export { StaffLdb, NrccMessage, TrainServices,
|
||||||
ServiceLocation } from './src/owlboardApi/staffLdb'
|
ServiceLocation } from './src/owlboardApi/staffLdb'
|
||||||
|
export { OB_TrainTT_service, OB_TrainTT_stopDetail } from './src/owlboardApi/trainTimetable'
|
||||||
|
export { OB_Pis_SimpleObject } from './src/owlboardApi/pis'
|
||||||
|
|
||||||
// Upstream API
|
// Upstream API
|
|
@ -0,0 +1,13 @@
|
||||||
|
export interface OB_Pis_SimpleObject {
|
||||||
|
code: number;
|
||||||
|
match: "full" | "partial";
|
||||||
|
msg: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* NOT IN USE YET
|
||||||
|
export interface OB_Pis_FullObject {
|
||||||
|
code: number;
|
||||||
|
crs: string[];
|
||||||
|
tiploc?: string[];
|
||||||
|
}
|
||||||
|
*/
|
|
@ -0,0 +1,24 @@
|
||||||
|
import type { OB_Pis_SimpleObject } from "./pis";
|
||||||
|
|
||||||
|
export interface OB_TrainTT_service {
|
||||||
|
stpIndicator: string;
|
||||||
|
operator: string;
|
||||||
|
trainUid: string;
|
||||||
|
headcode: string;
|
||||||
|
powerType: string;
|
||||||
|
planSpeed: number;
|
||||||
|
scheduleStart: Date;
|
||||||
|
scheduleEnd: Date;
|
||||||
|
daysRun: string[];
|
||||||
|
stops: OB_TrainTT_stopDetail[];
|
||||||
|
pis: OB_Pis_SimpleObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface OB_TrainTT_stopDetail {
|
||||||
|
publicDeparture?: string;
|
||||||
|
publicArrival?: string;
|
||||||
|
wttDeparture?: string;
|
||||||
|
wttArrival?: string;
|
||||||
|
tiploc: string;
|
||||||
|
isPublic: boolean;
|
||||||
|
}
|
Loading…
Reference in New Issue