58 lines
958 B
TypeScript
58 lines
958 B
TypeScript
import { Mission } from "../../generated/client";
|
|
import { PublicUser } from "./User";
|
|
|
|
export interface ValidationFailed {
|
|
type: "hpg-validation";
|
|
status: "failed";
|
|
message: string;
|
|
data: {
|
|
mission: Mission;
|
|
};
|
|
}
|
|
|
|
export interface ValidationSuccess {
|
|
type: "hpg-validation";
|
|
status: "success";
|
|
message: string;
|
|
data: {
|
|
mission: Mission;
|
|
};
|
|
}
|
|
|
|
export interface AdminMessage {
|
|
type: "admin-message";
|
|
status: "kick" | "ban";
|
|
message: string;
|
|
data?: {
|
|
admin: PublicUser;
|
|
reason: string;
|
|
};
|
|
}
|
|
|
|
export interface StationStatus {
|
|
type: "station-status";
|
|
status: string;
|
|
message: string;
|
|
data?: {
|
|
stationId: number;
|
|
aircraftId: number;
|
|
};
|
|
}
|
|
|
|
export type MissionAutoClose = {
|
|
type: "mission-auto-close";
|
|
status: "chron";
|
|
message: string;
|
|
data: {
|
|
missionId: number;
|
|
publicMissionId: string;
|
|
};
|
|
};
|
|
|
|
export type NotificationPayload =
|
|
| ValidationFailed
|
|
| ValidationSuccess
|
|
| AdminMessage
|
|
| StationStatus
|
|
| MissionAutoClose;
|