Skip to content

Commit

Permalink
✨ [API] API is extended
Browse files Browse the repository at this point in the history
  • Loading branch information
jxn-30 committed Aug 18, 2020
1 parent 7124068 commit 93f656b
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Mission.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ interface Additional {
expansion_missions_ids?: number[];
followup_missions_ids?: number[];
allow_rw_instead_of_lf?: boolean;
allow_arff_instead_of_lf?: boolean;
only_alliance_mission?: boolean;
max_possible_prisoners?: number;

Expand All @@ -26,7 +27,10 @@ interface Additional {
patient_at_end_of_mission?: boolean;
possible_patient_min?: number;
possible_patient?: number;
patient_allow_first_responder_chance?: number;
allow_ktw_instead_of_rtw?: boolean;
patient_uk_code_possible?: string[]; // en_GB only
patient_us_code_possible?: string[]; // en_US only
possible_patient_specializations: string[]; // it_IT only
patient_it_code_possible: string[]; // it_IT only
}
Expand Down
2 changes: 2 additions & 0 deletions src/api/AllianceInfo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ interface User {
id: number;
name: string;
roles: string[];
caption: string | null;
online: boolean;
}

export interface AllianceInfo {
Expand Down
4 changes: 4 additions & 0 deletions src/api/Building.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ export interface Building {
leitstelle_building_id: number;
small_building: boolean;
enabled: boolean;
generate_own_missions: boolean;
personal_count_target: number;
hiring_phase: 0 | 1 | 2 | 3;
hiring_automatic: boolean;
}
8 changes: 8 additions & 0 deletions src/api/Vehicle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ export interface Vehicle {
fms_real: number; // Background-color
fms_show: number; // Shown number
vehicle_type_caption: string | null;
working_hour_start: number;
working_hour_end: number;
alarm_delay: number;
max_personnel_override: number | null;
assigned_personnel_count: number;
ignore_aao: boolean;
target_type: 'mission' | 'building' | null; // Where the vehicle is currently driving to
target_id: number | null; // The ID of where the vehicle is currently driving to
}
5 changes: 5 additions & 0 deletions src/api/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import { Mission } from '../Mission';

export interface Index {
'api/vehicles': Vehicle[];
// eslint-disable-next-line @typescript-eslint/ban-types
'api/vehicles/ID': Vehicle | {}; // where ID is a number
'api/vehicle_states': VehicleStates;
'api/buildings': Building[];
// eslint-disable-next-line @typescript-eslint/ban-types
'api/buildings/ID': Building | {}; // where ID is a number
'api/buildings/ID/vehicles': Vehicle[]; // where ID is a number
'api/credits': Credits;
'api/allianceinfo': AllianceInfo;
'einsaetze.json': Mission[];
Expand Down

0 comments on commit 93f656b

Please sign in to comment.