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 { Corpus } from './src/database/corpus'
|
||||||
export { Pis } from './src/database/pis'
|
export { Pis } from './src/database/pis'
|
||||||
export { ReasonCode } from './src/database/reasonCode'
|
export { ReasonCode } from './src/database/reasonCode'
|
||||||
export { Station } from './src/database/station'
|
export { Station, NearestStationResponse } from './src/database/station'
|
||||||
export { Service, Stop } from './src/database/timetable'
|
export { Service, Stop, SimpleService, ServiceDetail } from './src/database/timetable'
|
||||||
export { User } from './src/database/user'
|
export { User } from './src/database/user'
|
||||||
|
|
||||||
// Downstream API
|
// Downstream API
|
||||||
@ -12,6 +12,6 @@ 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_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
|
// Upstream API
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@owlboard/ts-types",
|
"name": "@owlboard/ts-types",
|
||||||
"version": "0.1.1",
|
"version": "1.2.1",
|
||||||
"description": "Declares Typescript types for the OwlBoard stack",
|
"description": "Declares Typescript types for the OwlBoard stack",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -3,6 +3,19 @@ interface Station {
|
|||||||
TIPLOC: string;
|
TIPLOC: string;
|
||||||
"3ALPHA": string;
|
"3ALPHA": string;
|
||||||
NLCDESC: 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;
|
wttDeparture?: string | null;
|
||||||
publicArrival?: string | null;
|
publicArrival?: string | null;
|
||||||
wttArrival?: string | null;
|
wttArrival?: string | null;
|
||||||
|
pass?: string | null;
|
||||||
|
platform?: string | null;
|
||||||
|
arrLine?: string | null;
|
||||||
|
depLine?: string | null;
|
||||||
isPublic: boolean;
|
isPublic: boolean;
|
||||||
tiploc: string;
|
tiploc: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface SimpleService {
|
||||||
|
stpIndicator: string;
|
||||||
|
trainUid: string;
|
||||||
|
operator: string;
|
||||||
|
stops: Stop[];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
interface Service {
|
interface Service {
|
||||||
transactionType: string;
|
transactionType: string;
|
||||||
stpIndicator: string;
|
stpIndicator: string;
|
||||||
operator: string;
|
operator: string;
|
||||||
trainUid: string;
|
trainUid: string;
|
||||||
headcode: string;
|
headcode: string;
|
||||||
powerType: string;
|
powerType: string;
|
||||||
planSpeed: string;
|
planSpeed: string;
|
||||||
scheduleStartDate: Date;
|
scheduleStartDate: Date;
|
||||||
scheduleEndDate: Date;
|
scheduleEndDate: Date;
|
||||||
daysRun: string[];
|
daysRun: string[];
|
||||||
stops: Stop[];
|
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 {
|
export interface OB_Pis_SimpleObject {
|
||||||
code: number;
|
code: string;
|
||||||
match: "full" | "partial";
|
toc: string;
|
||||||
skip?: "first" | "last";
|
skipCount: number;
|
||||||
skipCount?: number;
|
skipType?: string;
|
||||||
msg?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* NOT IN USE YET
|
|
||||||
export interface OB_Pis_FullObject {
|
export interface OB_Pis_FullObject {
|
||||||
code: number;
|
code: string;
|
||||||
crs: string[];
|
stops: string[];
|
||||||
tiploc?: string[];
|
toc: string;
|
||||||
|
tiplocs?: string[];
|
||||||
}
|
}
|
||||||
*/
|
|
@ -1,4 +1,5 @@
|
|||||||
import type { OB_Pis_SimpleObject } from "./pis";
|
import type { OB_Pis_SimpleObject } from "./pis";
|
||||||
|
import type { ServiceDetail } from "../database/timetable";
|
||||||
|
|
||||||
export interface OB_TrainTT_service {
|
export interface OB_TrainTT_service {
|
||||||
stpIndicator: string;
|
stpIndicator: string;
|
||||||
@ -11,7 +12,8 @@ export interface OB_TrainTT_service {
|
|||||||
scheduleEnd: Date;
|
scheduleEnd: Date;
|
||||||
daysRun: string[];
|
daysRun: string[];
|
||||||
stops: OB_TrainTT_stopDetail[];
|
stops: OB_TrainTT_stopDetail[];
|
||||||
pis: OB_Pis_SimpleObject;
|
pis?: OB_Pis_SimpleObject;
|
||||||
|
serviceDetail: ServiceDetail;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OB_TrainTT_stopDetail {
|
export interface OB_TrainTT_stopDetail {
|
||||||
@ -19,6 +21,10 @@ export interface OB_TrainTT_stopDetail {
|
|||||||
publicArrival?: string;
|
publicArrival?: string;
|
||||||
wttDeparture?: string;
|
wttDeparture?: string;
|
||||||
wttArrival?: string;
|
wttArrival?: string;
|
||||||
|
pass?: string;
|
||||||
|
platform?: string;
|
||||||
|
arrLine?: string;
|
||||||
|
depLine?: string;
|
||||||
tiploc: string;
|
tiploc: string;
|
||||||
isPublic: boolean;
|
isPublic: boolean;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user