manageengine-mdm
Version:
A TypeScript wrapper for the ManageEngine Mobile Device Manager Plus API
266 lines (265 loc) • 7.15 kB
TypeScript
export interface Device {
device_id: string;
os_version: string;
is_lost_mode_enabled: boolean;
owned_by: number;
is_removed: string;
device_capacity: string;
last_contact_time: string;
product_name: string;
device_name: string;
platform_type: string;
platform_type_id: number;
udid: string;
serial_number: string;
model: string;
user?: {
user_name: string;
user_id: string;
user_email: string;
};
imei?: number;
wifi_mac?: string;
summary?: {
profile_count: number;
app_count: number;
doc_count: number;
group_count: number;
};
}
export interface DeviceListResponse {
devices: Device[];
status: {
code: number;
message: string;
};
}
export interface DeviceDetailsResponse {
device: Device;
status: {
code: number;
message: string;
};
}
export interface DeviceQueryParams {
include_all?: boolean;
search?: string;
group_id?: string;
exclude_removed?: boolean;
imei?: string;
owned_by?: 'Corporate' | 'Personal';
device_type?: ('smartphone' | 'Tablet' | 'Laptop' | 'Desktop' | 'Tv')[];
serial_number?: string;
email?: string;
platform?: ('iOS' | 'Android' | 'Windows')[];
limit?: number;
offset?: number;
}
export interface DeviceSummaryResponse {
agent_version: string;
device_name: string;
doc_count: number;
device_id: string;
group_count: number;
platform_type: string;
last_contact_time: number;
profile_count: number;
app_count: number;
group: Array<{
group_id: string;
group_name: string;
}>;
}
export interface DeviceCertificate {
signaturealgorithmoid: string;
certificatename: string;
certificatesubjectname: string;
serialnumber: number;
certificateexpiry: number;
isidentity: boolean;
certificateissuername: string;
signaturealgorithmname: string;
}
export interface DeviceCertificatesResponse {
certificates: {
unmanagedcertificates: DeviceCertificate[];
managedcertificates: DeviceCertificate[];
};
}
export interface DeviceRestrictionsResponse {
[key: string]: number | boolean | {
[key: string]: number | boolean | string;
};
}
export interface DeviceFileVaultResponse {
filevault: {
filevault_status: number;
is_institution_recovery_key: boolean;
is_personal_recovery_key: boolean;
resource_id: number;
is_encryption_enabled: boolean;
};
}
export interface DeviceFirmwareResponse {
is_firmware_change_pending: boolean;
is_roms_allowed: boolean;
is_firmware_password_exists: boolean;
firmware_mode: number;
managed_password_id: number;
}
export interface DeviceFirmwarePasswordResponse {
firmware_password: string;
resource_id: number;
}
export interface DeviceLocation {
added_time: number;
latitude: number;
longitude: number;
located_time: number;
address?: string;
}
export interface DeviceLocationsResponse {
locations: DeviceLocation[];
}
export interface DeviceProfile {
profile_id: number;
profile_name: string;
status: string;
remarks?: string;
localized_remarks?: string;
profile_description?: string;
applied_time?: number;
group_count?: number;
device_count?: number;
created_user?: string;
created_time?: number;
last_modified_user?: string;
last_modified_time?: number;
platform_type?: string;
}
export interface DeviceProfilesResponse {
profiles: DeviceProfile[];
}
export interface DeviceApp {
release_label_details?: {
release_label_name: string;
release_label_id: string;
};
app_version: string;
platform_type: string;
identifier: string;
app_name: string;
app_id: string;
app_version_code?: string;
}
export interface InstalledApp extends DeviceApp {
app_group_id: string;
}
export interface DeviceAppsResponse {
installed_apps: InstalledApp[];
release_label_details?: {
release_label_name: string;
release_label_id: string;
};
apps: DeviceApp[];
}
export interface DeviceAction {
is_enabled: boolean;
localized_name: string;
name: string;
localized_action_info: string;
action_info: string;
status_code?: number;
status_description?: string;
localized_status_description?: string;
}
export interface DeviceActionsResponse {
knox_actions: DeviceAction[];
actions: DeviceAction[];
}
export interface DeviceCommandHistoryResponse {
metadata: {
total_record_count: number;
};
paging: {
next?: string;
previous?: string;
};
'delta-token': string;
commands: Array<{
command_status: number;
managed_status: number;
command_id: number;
command_name: string;
added_time: number;
device_id: string;
added_by: number;
command_history_id: number;
added_by_name: string;
command_life: Array<{
updated_time: number;
status_description: string;
command_id: number;
status_code: number;
added_by: number;
command_name: string;
added_by_name: string;
remarks: string;
}>;
remarks_args: any;
remarks: string;
}>;
}
export interface DevicePrivacyResponse {
fetch_location: number;
view_privacy_settings: boolean;
disable_wipe: number;
fetch_device_name: number;
fetch_installed_app: number;
disable_bug_report: number;
applicable_for: number[];
disable_remote_control: number;
fetch_phone_number: number;
}
export declare type DeviceActionName = 'scan' | 'lock' | 'remote_control' | 'remote_view' | 'remote_alarm' | 'complete_wipe' | 'corporate_wipe' | 'clear_passcode' | 'reset_passcode' | 'fetch_location' | 'shutdown' | 'restart' | 'enable_lost_mode' | 'disable_lost_mode' | 'pause_kiosk' | 're_apply_kiosk' | 'remote_debug' | 'unlock_user_account';
export interface DeviceActionRequest {
send_email_to_user?: boolean;
lock_message?: string;
clear_data_for_all_apps?: boolean;
re_enter_time?: number;
email_sent_to_user?: boolean;
email_sent_to_admin?: boolean;
wipe_but_retain_mdm?: boolean;
description?: string;
wipe_sd_card?: boolean;
audit_message?: string;
ticket_id?: string;
unlock_pin?: string;
inclusion?: boolean;
phone_number?: string;
wipe_lock_pin?: string;
passcode?: string;
retry?: boolean;
remarks?: string;
email_address_list?: string;
}
export interface BulkActionRequest {
devices: number[];
command_name: string;
groups: string[];
}
export interface BulkActionResponse {
success_list: Array<{
device_id: string;
remarks: string;
status: string;
}>;
total_count: number;
not_applicable_count: number;
success_count: number;
na_list: Array<{
device_id: string;
remarks: string;
status: string;
}>;
}