Compare commits

..

No commits in common. "main" and "0.1.1" have entirely different histories.
main ... 0.1.1

6 changed files with 27 additions and 65 deletions

View File

@ -2,8 +2,8 @@
export { Corpus } from './src/database/corpus'
export { Pis } from './src/database/pis'
export { ReasonCode } from './src/database/reasonCode'
export { Station, NearestStationResponse } from './src/database/station'
export { Service, Stop, SimpleService, ServiceDetail } from './src/database/timetable'
export { Station } from './src/database/station'
export { Service, Stop } 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, OB_Pis_FullObject } from './src/owlboardApi/pis'
export { OB_Pis_SimpleObject } from './src/owlboardApi/pis'
// Upstream API

View File

@ -1,6 +1,6 @@
{
"name": "@owlboard/ts-types",
"version": "1.2.1",
"version": "0.1.1",
"description": "Declares Typescript types for the OwlBoard stack",
"main": "index.ts",
"scripts": {

View File

@ -3,19 +3,6 @@ interface Station {
TIPLOC: string;
"3ALPHA": string;
NLCDESC: string;
location: stationLocation;
operator: string;
}
interface stationLocation {
type: "Point";
coordinates: number[];
}
interface NearestStationResponse {
"3ALPHA": string;
NLCDESC: string;
miles: number;
}
export { Station, NearestStationResponse }
export { Station }

View File

@ -3,43 +3,22 @@ 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[];
serviceDetail: ServiceDetail;
scheduleEndDate: Date;
daysRun: string[];
stops: Stop[];
}
interface ServiceDetail {
firstClass: boolean;
catering: boolean;
sleeper: boolean;
vstp: boolean;
guard: boolean
}
export { Stop, Service, SimpleService, ServiceDetail }
export { Stop, Service }

View File

@ -1,13 +1,15 @@
export interface OB_Pis_SimpleObject {
code: string;
toc: string;
skipCount: number;
skipType?: string;
code: number;
match: "full" | "partial";
skip?: "first" | "last";
skipCount?: number;
msg?: string;
}
/* NOT IN USE YET
export interface OB_Pis_FullObject {
code: string;
stops: string[];
toc: string;
tiplocs?: string[];
code: number;
crs: string[];
tiploc?: string[];
}
*/

View File

@ -1,5 +1,4 @@
import type { OB_Pis_SimpleObject } from "./pis";
import type { ServiceDetail } from "../database/timetable";
export interface OB_TrainTT_service {
stpIndicator: string;
@ -12,8 +11,7 @@ export interface OB_TrainTT_service {
scheduleEnd: Date;
daysRun: string[];
stops: OB_TrainTT_stopDetail[];
pis?: OB_Pis_SimpleObject;
serviceDetail: ServiceDetail;
pis: OB_Pis_SimpleObject;
}
export interface OB_TrainTT_stopDetail {
@ -21,10 +19,6 @@ export interface OB_TrainTT_stopDetail {
publicArrival?: string;
wttDeparture?: string;
wttArrival?: string;
pass?: string;
platform?: string;
arrLine?: string;
depLine?: string;
tiploc: string;
isPublic: boolean;
}