mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
chore: fetching & caching vehicles data information
This commit is contained in:
+6
-1
@@ -1,4 +1,4 @@
|
||||
import { Status } from './common';
|
||||
import { Status, VehiclesData } from './common';
|
||||
|
||||
export enum APIDataStatus {
|
||||
OK = 'OK',
|
||||
@@ -19,6 +19,7 @@ export namespace API {
|
||||
apiStatuses?: APIStatuses;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace DispatcherHistory {
|
||||
export type Response = Data[];
|
||||
|
||||
@@ -316,6 +317,10 @@ export namespace API {
|
||||
export namespace Donators {
|
||||
export type Response = string[];
|
||||
}
|
||||
|
||||
export namespace Vehicles {
|
||||
export type Response = VehiclesData;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace GithubAPI {
|
||||
|
||||
@@ -189,3 +189,27 @@ export interface CheckpointTrain {
|
||||
checkpointStop: TrainStop;
|
||||
train: Train;
|
||||
}
|
||||
|
||||
// Vehicles Data
|
||||
export interface VehiclesData {
|
||||
simulatorVersion: string;
|
||||
|
||||
vehicleList: any[][];
|
||||
|
||||
vehicleProps: VehicleProps[];
|
||||
}
|
||||
|
||||
export interface VehicleProps {
|
||||
type: string;
|
||||
speed: number;
|
||||
length: number;
|
||||
weight: number;
|
||||
cargoTypes?: VehicleCargo[];
|
||||
coldStart?: boolean;
|
||||
doubleManned?: boolean;
|
||||
}
|
||||
|
||||
export interface VehicleCargo {
|
||||
id: string;
|
||||
weight: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user