forked from simrail/simrail.pro
Upload files to "src/types"
This commit is contained in:
parent
a74d75d6db
commit
71b873faf7
4
src/types/payload.ts
Normal file
4
src/types/payload.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export type ISimrailPayload = {
|
||||||
|
result: boolean;
|
||||||
|
description: string;
|
||||||
|
}
|
26
src/types/player.ts
Normal file
26
src/types/player.ts
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
export type IPlayer = {
|
||||||
|
steamid: string,
|
||||||
|
communityvisibilitystate: number,
|
||||||
|
profilestate: number,
|
||||||
|
personaname: string,
|
||||||
|
commentpermission: number,
|
||||||
|
profileurl: string,
|
||||||
|
avatar: string,
|
||||||
|
avatarmedium: string,
|
||||||
|
avatarfull: string,
|
||||||
|
avatarhash: string,
|
||||||
|
personastate: number,
|
||||||
|
primaryclanid: string,
|
||||||
|
timecreated: number,
|
||||||
|
personastateflags: number,
|
||||||
|
gameextrainfo: string,
|
||||||
|
gameid: string,
|
||||||
|
loccountrycode: string,
|
||||||
|
locstatecode: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IPlayerPayload = {
|
||||||
|
response: {
|
||||||
|
players: IPlayer[]
|
||||||
|
}
|
||||||
|
}
|
23
src/types/station.ts
Normal file
23
src/types/station.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { ISimrailPayload } from './payload.js';
|
||||||
|
|
||||||
|
export type IStation = {
|
||||||
|
Name: string;
|
||||||
|
Prefix: string;
|
||||||
|
DifficultyLevel: number;
|
||||||
|
Latititude: number;
|
||||||
|
Longitude: number;
|
||||||
|
MainImageURL: string;
|
||||||
|
AdditionalImage1URL: string;
|
||||||
|
AdditionalImage2URL: string;
|
||||||
|
DispatchedBy: IStationDispatch[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IStationDispatch = {
|
||||||
|
ServerCode: string,
|
||||||
|
SteamId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IStationPayload = {
|
||||||
|
data: IStation[];
|
||||||
|
count: number;
|
||||||
|
} & ISimrailPayload;
|
9
src/types/typings.d.ts
vendored
Normal file
9
src/types/typings.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { RedisClient, RedisClientType } from 'redis'
|
||||||
|
import { SimrailClient } from '../util/SimrailClient.ts'
|
||||||
|
/* eslint no-var: off */
|
||||||
|
declare global
|
||||||
|
{
|
||||||
|
declare var redis: RedisClientType,
|
||||||
|
client: SimrailClient;
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user