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; authorName?: string;
authorId?: number; authorId?: number;
stopsString?: string;
stockString?: string; stockString?: string;
stockMass?: number; stockMass?: number;
stockLength?: number; stockLength?: number;
+38 -34
View File
@@ -1,35 +1,4 @@
export default interface TrainAPIData { export interface TimetableStop {
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: {
stopName: string; stopName: string;
stopNameRAW: string; stopNameRAW: string;
stopType: string; stopType: string;
@@ -55,10 +24,45 @@ export default interface TrainAPIData {
confirmed: boolean; confirmed: boolean;
stopped: boolean; stopped: boolean;
stopTime: number; stopTime: number;
}[]; }
export interface TrainTimetable {
timetableId: number;
category: string;
route: string;
stopList: TimetableStop[];
TWR: boolean; TWR: boolean;
SKR: boolean; SKR: boolean;
sceneries: string[]; 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 { Socket } from 'socket.io-client';
import { DataStatus } from '../scripts/enums/DataStatus'; import { DataStatus } from '../scripts/enums/DataStatus';
import StationAPIData from '../scripts/interfaces/api/StationAPIData'; 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 Station from '../scripts/interfaces/Station';
import Train from '../scripts/interfaces/Train'; import Train from '../scripts/interfaces/Train';
import { DispatcherStatsAPIData } from '../scripts/interfaces/api/DispatcherStatsAPIData'; import { DispatcherStatsAPIData } from '../scripts/interfaces/api/DispatcherStatsAPIData';