48 lines
877 B
TypeScript
48 lines
877 B
TypeScript
export enum BackendReturnStatus {
|
|
Ok,
|
|
Unauthorized,
|
|
Failure,
|
|
};
|
|
|
|
export interface AirportOverview {
|
|
icao: string;
|
|
name: string;
|
|
flightInformationRegion: string;
|
|
};
|
|
|
|
export interface AirportOverviewBackend {
|
|
status: BackendReturnStatus;
|
|
airports: AirportOverview[];
|
|
};
|
|
|
|
export interface User {
|
|
vatsimId: string;
|
|
fullName: string;
|
|
radarScopeKey: string;
|
|
administrator: boolean;
|
|
airportConfigurationAccess: string[];
|
|
};
|
|
|
|
export const DefaultUser: User = {
|
|
vatsimId: '',
|
|
fullName: '',
|
|
radarScopeKey: '',
|
|
administrator: false,
|
|
airportConfigurationAccess: [],
|
|
};
|
|
|
|
export interface UserBackend {
|
|
status: BackendReturnStatus;
|
|
user: User;
|
|
}
|
|
|
|
export interface IAuthState {
|
|
valid: boolean,
|
|
user: User,
|
|
};
|
|
|
|
export interface TimestampBackend {
|
|
status: BackendReturnStatus;
|
|
timestamp: number;
|
|
};
|