This commit is contained in:
2023-03-10 16:30:36 +01:00
parent a02f9804b1
commit 14ca48a90d
3 changed files with 49 additions and 43 deletions
@@ -35,6 +35,8 @@ export interface TimetableHistory {
authorName?: string;
authorId?: number;
stopsString?: string;
stockString?: string;
stockMass?: number;
stockLength?: number;
+38 -34
View File
@@ -1,35 +1,4 @@
export default interface TrainAPIData {
trainNo: number;
mass: number;
length: number;
speed: number;
stockString: string;
signal: string;
distance: number;
connectedTrack: string;
driverName: string;
driverId: number;
driverIsSupporter: boolean;
driverLevel?: number;
currentStationName: string;
currentStationHash: string;
online: boolean;
lastSeen: number;
region: string;
isTimeout: boolean;
timetable?: {
timetableId: number;
category: string;
route: string;
stopList: {
export interface TimetableStop {
stopName: string;
stopNameRAW: string;
stopType: string;
@@ -55,10 +24,45 @@ export default interface TrainAPIData {
confirmed: boolean;
stopped: boolean;
stopTime: number;
}[];
}
export interface TrainTimetable {
timetableId: number;
category: string;
route: string;
stopList: TimetableStop[];
TWR: boolean;
SKR: boolean;
sceneries: string[];
};
}
export interface TrainAPIData {
trainNo: number;
mass: number;
length: number;
speed: number;
stockString: string;
signal: string;
distance: number;
connectedTrack: string;
driverName: string;
driverId: number;
driverIsSupporter: boolean;
driverLevel?: number;
currentStationName: string;
currentStationHash: string;
online: boolean;
lastSeen: number;
region: string;
isTimeout: boolean;
timetable?: TrainTimetable;
}
+1 -1
View File
@@ -1,7 +1,7 @@
import { Socket } from 'socket.io-client';
import { DataStatus } from '../scripts/enums/DataStatus';
import StationAPIData from '../scripts/interfaces/api/StationAPIData';
import TrainAPIData from '../scripts/interfaces/api/TrainAPIData';
import { TrainAPIData } from '../scripts/interfaces/api/TrainAPIData';
import Station from '../scripts/interfaces/Station';
import Train from '../scripts/interfaces/Train';
import { DispatcherStatsAPIData } from '../scripts/interfaces/api/DispatcherStatsAPIData';