207 lines
4.3 KiB
TypeScript
207 lines
4.3 KiB
TypeScript
export enum Route {
|
|
LOGIN = "/api/login",
|
|
GROUPS = "/api/sdk/account/$1/groups",
|
|
}
|
|
|
|
export enum Method {
|
|
GET,
|
|
POST,
|
|
}
|
|
|
|
export enum LogLevel {
|
|
INFO,
|
|
WARNING,
|
|
ERROR,
|
|
}
|
|
|
|
export interface UserResponse {
|
|
success: boolean;
|
|
data: UserData;
|
|
}
|
|
|
|
export interface UserData {
|
|
id: number;
|
|
version: number;
|
|
account_id: number;
|
|
date_created: string;
|
|
is_admin: boolean;
|
|
is_deactivated: boolean;
|
|
is_deleted: boolean;
|
|
last_updated: string;
|
|
login: string;
|
|
user_settings_id: number;
|
|
note: null | string;
|
|
asset_id: number;
|
|
role_id: number;
|
|
is_latency_measurement: boolean;
|
|
user_role: UserRole;
|
|
user_setting: UserSetting;
|
|
last_status: LastStatus;
|
|
account: Account;
|
|
asset: Asset;
|
|
token: string;
|
|
}
|
|
|
|
export interface UserRole {
|
|
id: number;
|
|
name: string;
|
|
}
|
|
|
|
export interface UserSetting {
|
|
id: number;
|
|
version: string;
|
|
last_tab: string;
|
|
is_mph: boolean;
|
|
opened_tabs: string;
|
|
is_military_time: boolean;
|
|
refresh_interval_sec: number;
|
|
history_limit: number;
|
|
report_limit: number;
|
|
is_show_label_overlay: boolean;
|
|
is_ars_timeout: boolean;
|
|
is_show_speed: boolean;
|
|
is_clustering: boolean;
|
|
timezone_id: number;
|
|
language_id: number;
|
|
map_limit: number;
|
|
old_gps_map_limit: number;
|
|
is_cyrn_continue_play: boolean;
|
|
is_video_upload: boolean;
|
|
}
|
|
|
|
export interface LastStatus {
|
|
id: number;
|
|
address_id: null | number;
|
|
ars_time: string;
|
|
digital_in: null;
|
|
digital_out: null;
|
|
is_on: boolean;
|
|
latitude: null | number;
|
|
longitude: null | number;
|
|
position_time: null;
|
|
speed: null;
|
|
asset_id: number;
|
|
no_gps_fix_time: null;
|
|
position_id: null;
|
|
is_stolen: boolean;
|
|
is_enabled: boolean;
|
|
is_dnd: boolean;
|
|
is_emergency: boolean;
|
|
last_private_asset_id: number;
|
|
is_emergency_action: boolean;
|
|
beacon_id: null;
|
|
distance_cm: null;
|
|
beacon_info_json: null;
|
|
battery_status_date: null;
|
|
battery_percentage: null;
|
|
is_charging_date: null;
|
|
is_charging: boolean;
|
|
}
|
|
|
|
export interface Account {
|
|
id: number;
|
|
version: string;
|
|
parent: null;
|
|
configuration_id: number;
|
|
name: string;
|
|
date_created: string;
|
|
license_id: number;
|
|
is_deactivated: boolean;
|
|
last_updated: string;
|
|
configuration: Configuration;
|
|
license: License;
|
|
video_configuration: VideoConfiguration;
|
|
}
|
|
|
|
export interface Configuration {
|
|
id: number;
|
|
hub_address: string;
|
|
api_address: string;
|
|
voice_address: string;
|
|
sip_id_prefix: number;
|
|
logo_login_image_path: null | string;
|
|
logo_account_image_path: null | string;
|
|
voice_rtp_port: number;
|
|
voice_ws_port: null | number;
|
|
hub_port: null | number;
|
|
custom_config: null | string;
|
|
mobile_hub_address: null | string;
|
|
mobile_api_address: null | string;
|
|
mobile_voice_address: null | string;
|
|
max_private_channels: number;
|
|
is_mumble: boolean;
|
|
mumble_voice_address: string;
|
|
mumble_voice_proxy_address: string;
|
|
map_address: null | string;
|
|
mumble_username: string;
|
|
mumble_password: string;
|
|
geocoding_provider_id: number;
|
|
master_license: null | string;
|
|
is_latency_measurement: boolean;
|
|
hangtime_ms: number;
|
|
disconnect_timeout_ms: number;
|
|
mumble_address: string;
|
|
max_file_size_mb: number;
|
|
}
|
|
|
|
export interface License {
|
|
id: number;
|
|
date_created: string;
|
|
version: string;
|
|
max_dispatch: number;
|
|
max_assets: number;
|
|
is_demo: boolean;
|
|
max_talk_groups: number;
|
|
expires_on: null | Date;
|
|
maintenance_begin: null | Date;
|
|
maintenance_end: null | Date;
|
|
max_arcgis_licenses: number;
|
|
system_id: null | string;
|
|
is_suspended: boolean;
|
|
modified_on: string;
|
|
crc: string;
|
|
expires_on_ISO: string;
|
|
maintenance_end_ISO: string;
|
|
}
|
|
|
|
export interface VideoConfiguration {
|
|
id: number;
|
|
account_id: number;
|
|
video_server: string;
|
|
missed_call_timeout: number;
|
|
max_call_duration: number;
|
|
}
|
|
|
|
export interface Asset {
|
|
id: number;
|
|
version: number;
|
|
account_id: number;
|
|
date_created: string;
|
|
email_address: null | string;
|
|
bridge_id: null | number;
|
|
icon_id: number;
|
|
imei: string;
|
|
is_deactivated: boolean;
|
|
last_updated: string;
|
|
name: string;
|
|
asset_type_id: number;
|
|
sip_id: number;
|
|
is_deleted: boolean;
|
|
contact_id: number;
|
|
profile_id: number;
|
|
bridge_radio_id: null | number;
|
|
radio_id: null | number;
|
|
priority: number;
|
|
asset_profile: AssetProfile;
|
|
}
|
|
|
|
export interface AssetProfile {
|
|
id: number;
|
|
version: number;
|
|
account_id: number;
|
|
date_created: string;
|
|
name: string;
|
|
reporting_sec: number;
|
|
is_default: boolean;
|
|
}
|