From 7021793f27feb0abe987cf2810093ce7233e0729 Mon Sep 17 00:00:00 2001 From: Tomas Kypta Date: Wed, 20 Mar 2024 12:08:27 +0100 Subject: [PATCH] Improve JSDoc --- .../android/model/rasp/ActiveCallDetection.ts | 20 +++++ .../model/rasp/AppPresenceDetection.ts | 1 + .../android/model/rasp/BiometryDetection.ts | 23 ++++++ .../android/model/rasp/DebuggerDetection.ts | 5 +- .../android/model/rasp/EmulatorDetection.ts | 6 +- .../android/model/rasp/HttpProxyDetection.ts | 2 +- .../android/model/rasp/RepackagingResult.ts | 8 +- scripts/android/model/rasp/RootDetection.ts | 7 +- .../android/model/rasp/TapjackingDetection.ts | 8 +- www/MalwarelyticsPlugin.d.ts | 74 +++++++++++++++++++ www/MalwarelyticsPlugin.js | 43 +++++++++++ www/MalwarelyticsPlugin.module.d.ts | 74 +++++++++++++++++++ 12 files changed, 265 insertions(+), 6 deletions(-) diff --git a/scripts/android/model/rasp/ActiveCallDetection.ts b/scripts/android/model/rasp/ActiveCallDetection.ts index f3d056c..f44d18d 100644 --- a/scripts/android/model/rasp/ActiveCallDetection.ts +++ b/scripts/android/model/rasp/ActiveCallDetection.ts @@ -1,14 +1,34 @@ +/** Active call detection data. */ interface ActiveCallDetection { + /** State of ongoing call. */ readonly callState: CallState; } +/** State of ongoing call. */ enum CallState { + /** Idle state: not ringing and no call established. */ IDLE = "IDLE", + /** Device is ringing. An incoming is being signaled. */ RINGING = "RINGING", + /** In call. A telephony call is established. */ ACTIVE_CALL = "ACTIVE_CALL", + /** In communication. An audio/video chat or VoIP call is established. */ ACTIVE_COMMUNNICATION = "ACTIVE_COMMUNNICATION", + /** + * Call screening in progress. + * Call is connected and audio is accessible to call screening applications + * but other audio use cases are still possible. + */ CALL_SCREENING = "CALL_SCREENING", + /** + * A telephony call is established and its audio is being redirected to another device. + */ ACTIVE_CALL_REDIRECT = "ACTIVE_CALL_REDIRECT", + /** + * An audio/video chat or VoIP call is established + * and its audio is being redirected to another device. + */ ACTIVE_COMMUNICATION_REDIRECT = "ACTIVE_COMMUNICATION_REDIRECT", + /** Unknown state. */ UNKNOWN = "UNKNOWN" } \ No newline at end of file diff --git a/scripts/android/model/rasp/AppPresenceDetection.ts b/scripts/android/model/rasp/AppPresenceDetection.ts index d8953b2..5b57f77 100644 --- a/scripts/android/model/rasp/AppPresenceDetection.ts +++ b/scripts/android/model/rasp/AppPresenceDetection.ts @@ -1,5 +1,6 @@ /** App presence detection data. */ interface AppPresenceDetection { + /** Detected remote desktop apps. */ readonly remoteDesktopApps: [NamedApkItemInfo]; } diff --git a/scripts/android/model/rasp/BiometryDetection.ts b/scripts/android/model/rasp/BiometryDetection.ts index a6bc2e5..308d68f 100644 --- a/scripts/android/model/rasp/BiometryDetection.ts +++ b/scripts/android/model/rasp/BiometryDetection.ts @@ -1,12 +1,35 @@ +/** Biometry config detection data. */ interface BiometryDetection { + /** Status of the biometry config on the device. */ readonly biometricStatus: BiometricStatus; + /** + * Status of the biometry config on the device, raw value obtained + * from 'androidx.biometric.BiometricManager'. + */ readonly androidxLibStatus: number; } enum BiometricStatus { + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS'. + */ CONFIGURED = "CONFIGURED", + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_STATUS_UNKNOWN'. + */ UNKNOWN = "UNKNOWN", + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE'. + */ UNSUPPORTED = "UNSUPPORTED", + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED'. + */ CURRENTLY_UNAVAILABLE = "CURRENTLY_UNAVAILABLE", + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED'. + */ NONE_ENROLLED = "NONE_ENROLLED" } \ No newline at end of file diff --git a/scripts/android/model/rasp/DebuggerDetection.ts b/scripts/android/model/rasp/DebuggerDetection.ts index b932b5d..65fc3b5 100644 --- a/scripts/android/model/rasp/DebuggerDetection.ts +++ b/scripts/android/model/rasp/DebuggerDetection.ts @@ -1,7 +1,10 @@ - +/** Debugger detection data. */ interface DebuggerDetection { + /** Whether a debugger is attached. */ readonly isDebuggerAttached: boolean; + /** Whether one or more threads is waiting for a debugger to attach. */ readonly isWaitingForDebugger: boolean; + /** Type of detected debugger. */ readonly debuggerType: [DebuggerType]; } diff --git a/scripts/android/model/rasp/EmulatorDetection.ts b/scripts/android/model/rasp/EmulatorDetection.ts index 50a9612..bc1a5d4 100644 --- a/scripts/android/model/rasp/EmulatorDetection.ts +++ b/scripts/android/model/rasp/EmulatorDetection.ts @@ -1,10 +1,14 @@ - +/** Emulator detection data. */ interface EmulatorDetection { + /** Whether the device is recognized as an emulator. */ readonly isEmulator: boolean; + /** Type of detected emulator. */ readonly detectedEmulatorType?: EmulatorType; + /** Some troubleshooting information. */ readonly emulatorDetectionProofs: [EmulatorDetectionProof]; } +/** Type of the emulator. */ enum EmulatorType { AVD = "AVD", GENYMOTION = "GENYMOTION", diff --git a/scripts/android/model/rasp/HttpProxyDetection.ts b/scripts/android/model/rasp/HttpProxyDetection.ts index 82f0e3d..38f1b77 100644 --- a/scripts/android/model/rasp/HttpProxyDetection.ts +++ b/scripts/android/model/rasp/HttpProxyDetection.ts @@ -5,7 +5,7 @@ interface HttpProxyDetection { /** Whether the proxy data indicate that a proxy is enabled. */ readonly isHttpProxyEnabled: boolean; - + /** Whether the HTTP proxy is using auto config with a PAC script. */ readonly isUsingAutoConfig: boolean; /** Host of the proxy server or null if proxy is not enabled. */ readonly host?: string; diff --git a/scripts/android/model/rasp/RepackagingResult.ts b/scripts/android/model/rasp/RepackagingResult.ts index fe78ece..5477c49 100644 --- a/scripts/android/model/rasp/RepackagingResult.ts +++ b/scripts/android/model/rasp/RepackagingResult.ts @@ -1,6 +1,12 @@ - +/** Result type of repackaging detection. */ enum RepackagingResult { + /** The app is repackaged. */ REPACKAGED_APP = "REPACKAGED_APP", + /** The app is original, unaltered. */ ORIGINAL_APP = "ORIGINAL_APP", + /** + * Invalid configuration of repackaging detection. + * Repackaging can't be determined. + */ INVALID_CONFIG = "INVALID_CONFIG" } \ No newline at end of file diff --git a/scripts/android/model/rasp/RootDetection.ts b/scripts/android/model/rasp/RootDetection.ts index 6f653eb..dab0b28 100644 --- a/scripts/android/model/rasp/RootDetection.ts +++ b/scripts/android/model/rasp/RootDetection.ts @@ -1,9 +1,14 @@ - +/** Root detection data. */ interface RootDetection { + /** Whether the device is rooted with a non-zero confidence. */ readonly isRooted: boolean; + /** Whether there's an attempt to cloak the root. */ readonly isRootCloaked: boolean; + /** Some troubleshooting information. */ readonly rootDetectionProofs: [RootDetectionProof]; + /** Confidence of root detection, value from 0.0 to 1.0. */ readonly rootDetectionConfidence: number; + /** Confidence of root cloak detection, value from 0.0 to 1.0. */ readonly rootCloakDetectionConfidence: number; } diff --git a/scripts/android/model/rasp/TapjackingDetection.ts b/scripts/android/model/rasp/TapjackingDetection.ts index 423558b..a3e9824 100644 --- a/scripts/android/model/rasp/TapjackingDetection.ts +++ b/scripts/android/model/rasp/TapjackingDetection.ts @@ -1,5 +1,11 @@ - +/** Tapjacking detection data. */ interface TapjackingDetection { + /** Whether the SDK is currently blocking tapjacking. */ readonly isTapjackingBlocked: boolean; + /** + * List of "bad" apps capable of performing tapjacking. + * A bad app is one that has a treat index same or higher + * than @see MalwarelyticsAndroidTapjackingBlockConfig.blockTapjackingSensitivity. + */ readonly tapjackingCapableApps: [string]; } \ No newline at end of file diff --git a/www/MalwarelyticsPlugin.d.ts b/www/MalwarelyticsPlugin.d.ts index 6fc16a2..e077e8c 100644 --- a/www/MalwarelyticsPlugin.d.ts +++ b/www/MalwarelyticsPlugin.d.ts @@ -1000,21 +1000,42 @@ interface UpdateInfoFailure { /** Reason for the last update failure. */ readonly lastFailureReason?: string; } +/** Active call detection data. */ interface ActiveCallDetection { + /** State of ongoing call. */ readonly callState: CallState; } +/** State of ongoing call. */ declare enum CallState { + /** Idle state: not ringing and no call established. */ IDLE = "IDLE", + /** Device is ringing. An incoming is being signaled. */ RINGING = "RINGING", + /** In call. A telephony call is established. */ ACTIVE_CALL = "ACTIVE_CALL", + /** In communication. An audio/video chat or VoIP call is established. */ ACTIVE_COMMUNNICATION = "ACTIVE_COMMUNNICATION", + /** + * Call screening in progress. + * Call is connected and audio is accessible to call screening applications + * but other audio use cases are still possible. + */ CALL_SCREENING = "CALL_SCREENING", + /** + * A telephony call is established and its audio is being redirected to another device. + */ ACTIVE_CALL_REDIRECT = "ACTIVE_CALL_REDIRECT", + /** + * An audio/video chat or VoIP call is established + * and its audio is being redirected to another device. + */ ACTIVE_COMMUNICATION_REDIRECT = "ACTIVE_COMMUNICATION_REDIRECT", + /** Unknown state. */ UNKNOWN = "UNKNOWN" } /** App presence detection data. */ interface AppPresenceDetection { + /** Detected remote desktop apps. */ readonly remoteDesktopApps: [NamedApkItemInfo]; } /** Rasp detection app item. */ @@ -1032,31 +1053,63 @@ interface NamedApkItemInfo { /** Base64 encoded SHA-1 signature hash. */ readonly signatureHash: string; } +/** Biometry config detection data. */ interface BiometryDetection { + /** Status of the biometry config on the device. */ readonly biometricStatus: BiometricStatus; + /** + * Status of the biometry config on the device, raw value obtained + * from 'androidx.biometric.BiometricManager'. + */ readonly androidxLibStatus: number; } declare enum BiometricStatus { + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS'. + */ CONFIGURED = "CONFIGURED", + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_STATUS_UNKNOWN'. + */ UNKNOWN = "UNKNOWN", + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE'. + */ UNSUPPORTED = "UNSUPPORTED", + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED'. + */ CURRENTLY_UNAVAILABLE = "CURRENTLY_UNAVAILABLE", + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED'. + */ NONE_ENROLLED = "NONE_ENROLLED" } +/** Debugger detection data. */ interface DebuggerDetection { + /** Whether a debugger is attached. */ readonly isDebuggerAttached: boolean; + /** Whether one or more threads is waiting for a debugger to attach. */ readonly isWaitingForDebugger: boolean; + /** Type of detected debugger. */ readonly debuggerType: [DebuggerType]; } declare enum DebuggerType { JAVA = "JAVA", NATIVE = "NATIVE" } +/** Emulator detection data. */ interface EmulatorDetection { + /** Whether the device is recognized as an emulator. */ readonly isEmulator: boolean; + /** Type of detected emulator. */ readonly detectedEmulatorType?: EmulatorType; + /** Some troubleshooting information. */ readonly emulatorDetectionProofs: [EmulatorDetectionProof]; } +/** Type of the emulator. */ declare enum EmulatorType { AVD = "AVD", GENYMOTION = "GENYMOTION", @@ -1080,6 +1133,7 @@ declare enum EmulatorDetectionProof { interface HttpProxyDetection { /** Whether the proxy data indicate that a proxy is enabled. */ readonly isHttpProxyEnabled: boolean; + /** Whether the HTTP proxy is using auto config with a PAC script. */ readonly isUsingAutoConfig: boolean; /** Host of the proxy server or null if proxy is not enabled. */ readonly host?: string; @@ -1104,16 +1158,29 @@ declare enum RaspCallbackType { ACTIVE_CALL = "ACTIVE_CALL", APP_PRESENCE = "APP_PRESENCE" } +/** Result type of repackaging detection. */ declare enum RepackagingResult { + /** The app is repackaged. */ REPACKAGED_APP = "REPACKAGED_APP", + /** The app is original, unaltered. */ ORIGINAL_APP = "ORIGINAL_APP", + /** + * Invalid configuration of repackaging detection. + * Repackaging can't be determined. + */ INVALID_CONFIG = "INVALID_CONFIG" } +/** Root detection data. */ interface RootDetection { + /** Whether the device is rooted with a non-zero confidence. */ readonly isRooted: boolean; + /** Whether there's an attempt to cloak the root. */ readonly isRootCloaked: boolean; + /** Some troubleshooting information. */ readonly rootDetectionProofs: [RootDetectionProof]; + /** Confidence of root detection, value from 0.0 to 1.0. */ readonly rootDetectionConfidence: number; + /** Confidence of root cloak detection, value from 0.0 to 1.0. */ readonly rootCloakDetectionConfidence: number; } declare enum RootDetectionProof { @@ -1161,7 +1228,14 @@ interface TransientScreenSharingData { /** Whether a removed display has just been detected. */ readonly displayRemoved: boolean; } +/** Tapjacking detection data. */ interface TapjackingDetection { + /** Whether the SDK is currently blocking tapjacking. */ readonly isTapjackingBlocked: boolean; + /** + * List of "bad" apps capable of performing tapjacking. + * A bad app is one that has a treat index same or higher + * than @see MalwarelyticsAndroidTapjackingBlockConfig.blockTapjackingSensitivity. + */ readonly tapjackingCapableApps: [string]; } diff --git a/www/MalwarelyticsPlugin.js b/www/MalwarelyticsPlugin.js index 60e53c8..d530c95 100644 --- a/www/MalwarelyticsPlugin.js +++ b/www/MalwarelyticsPlugin.js @@ -1102,23 +1102,58 @@ var UpdateType; /** Updating all apps. */ UpdateType["FULL"] = "FULL"; })(UpdateType || (UpdateType = {})); +/** State of ongoing call. */ var CallState; (function (CallState) { + /** Idle state: not ringing and no call established. */ CallState["IDLE"] = "IDLE"; + /** Device is ringing. An incoming is being signaled. */ CallState["RINGING"] = "RINGING"; + /** In call. A telephony call is established. */ CallState["ACTIVE_CALL"] = "ACTIVE_CALL"; + /** In communication. An audio/video chat or VoIP call is established. */ CallState["ACTIVE_COMMUNNICATION"] = "ACTIVE_COMMUNNICATION"; + /** + * Call screening in progress. + * Call is connected and audio is accessible to call screening applications + * but other audio use cases are still possible. + */ CallState["CALL_SCREENING"] = "CALL_SCREENING"; + /** + * A telephony call is established and its audio is being redirected to another device. + */ CallState["ACTIVE_CALL_REDIRECT"] = "ACTIVE_CALL_REDIRECT"; + /** + * An audio/video chat or VoIP call is established + * and its audio is being redirected to another device. + */ CallState["ACTIVE_COMMUNICATION_REDIRECT"] = "ACTIVE_COMMUNICATION_REDIRECT"; + /** Unknown state. */ CallState["UNKNOWN"] = "UNKNOWN"; })(CallState || (CallState = {})); var BiometricStatus; (function (BiometricStatus) { + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS'. + */ BiometricStatus["CONFIGURED"] = "CONFIGURED"; + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_STATUS_UNKNOWN'. + */ BiometricStatus["UNKNOWN"] = "UNKNOWN"; + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE'. + */ BiometricStatus["UNSUPPORTED"] = "UNSUPPORTED"; + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED'. + */ BiometricStatus["CURRENTLY_UNAVAILABLE"] = "CURRENTLY_UNAVAILABLE"; + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED'. + */ BiometricStatus["NONE_ENROLLED"] = "NONE_ENROLLED"; })(BiometricStatus || (BiometricStatus = {})); var DebuggerType; @@ -1126,6 +1161,7 @@ var DebuggerType; DebuggerType["JAVA"] = "JAVA"; DebuggerType["NATIVE"] = "NATIVE"; })(DebuggerType || (DebuggerType = {})); +/** Type of the emulator. */ var EmulatorType; (function (EmulatorType) { EmulatorType["AVD"] = "AVD"; @@ -1160,10 +1196,17 @@ var RaspCallbackType; RaspCallbackType["ACTIVE_CALL"] = "ACTIVE_CALL"; RaspCallbackType["APP_PRESENCE"] = "APP_PRESENCE"; })(RaspCallbackType || (RaspCallbackType = {})); +/** Result type of repackaging detection. */ var RepackagingResult; (function (RepackagingResult) { + /** The app is repackaged. */ RepackagingResult["REPACKAGED_APP"] = "REPACKAGED_APP"; + /** The app is original, unaltered. */ RepackagingResult["ORIGINAL_APP"] = "ORIGINAL_APP"; + /** + * Invalid configuration of repackaging detection. + * Repackaging can't be determined. + */ RepackagingResult["INVALID_CONFIG"] = "INVALID_CONFIG"; })(RepackagingResult || (RepackagingResult = {})); var RootDetectionProof; diff --git a/www/MalwarelyticsPlugin.module.d.ts b/www/MalwarelyticsPlugin.module.d.ts index 326f162..951d438 100644 --- a/www/MalwarelyticsPlugin.module.d.ts +++ b/www/MalwarelyticsPlugin.module.d.ts @@ -1000,21 +1000,42 @@ export interface UpdateInfoFailure { /** Reason for the last update failure. */ readonly lastFailureReason?: string; } +/** Active call detection data. */ export interface ActiveCallDetection { + /** State of ongoing call. */ readonly callState: CallState; } +/** State of ongoing call. */ export declare enum CallState { + /** Idle state: not ringing and no call established. */ IDLE = "IDLE", + /** Device is ringing. An incoming is being signaled. */ RINGING = "RINGING", + /** In call. A telephony call is established. */ ACTIVE_CALL = "ACTIVE_CALL", + /** In communication. An audio/video chat or VoIP call is established. */ ACTIVE_COMMUNNICATION = "ACTIVE_COMMUNNICATION", + /** + * Call screening in progress. + * Call is connected and audio is accessible to call screening applications + * but other audio use cases are still possible. + */ CALL_SCREENING = "CALL_SCREENING", + /** + * A telephony call is established and its audio is being redirected to another device. + */ ACTIVE_CALL_REDIRECT = "ACTIVE_CALL_REDIRECT", + /** + * An audio/video chat or VoIP call is established + * and its audio is being redirected to another device. + */ ACTIVE_COMMUNICATION_REDIRECT = "ACTIVE_COMMUNICATION_REDIRECT", + /** Unknown state. */ UNKNOWN = "UNKNOWN" } /** App presence detection data. */ export interface AppPresenceDetection { + /** Detected remote desktop apps. */ readonly remoteDesktopApps: [NamedApkItemInfo]; } /** Rasp detection app item. */ @@ -1032,31 +1053,63 @@ export interface NamedApkItemInfo { /** Base64 encoded SHA-1 signature hash. */ readonly signatureHash: string; } +/** Biometry config detection data. */ export interface BiometryDetection { + /** Status of the biometry config on the device. */ readonly biometricStatus: BiometricStatus; + /** + * Status of the biometry config on the device, raw value obtained + * from 'androidx.biometric.BiometricManager'. + */ readonly androidxLibStatus: number; } export declare enum BiometricStatus { + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS'. + */ CONFIGURED = "CONFIGURED", + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_STATUS_UNKNOWN'. + */ UNKNOWN = "UNKNOWN", + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_UNSUPPORTED' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NO_HARDWARE'. + */ UNSUPPORTED = "UNSUPPORTED", + /** + * Corresponds to either 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_HW_UNAVAILABLE' + * or 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_SECURITY_UPDATE_REQUIRED'. + */ CURRENTLY_UNAVAILABLE = "CURRENTLY_UNAVAILABLE", + /** + * Corresponds to 'androidx.biometric.BiometricManager.BIOMETRIC_ERROR_NONE_ENROLLED'. + */ NONE_ENROLLED = "NONE_ENROLLED" } +/** Debugger detection data. */ export interface DebuggerDetection { + /** Whether a debugger is attached. */ readonly isDebuggerAttached: boolean; + /** Whether one or more threads is waiting for a debugger to attach. */ readonly isWaitingForDebugger: boolean; + /** Type of detected debugger. */ readonly debuggerType: [DebuggerType]; } export declare enum DebuggerType { JAVA = "JAVA", NATIVE = "NATIVE" } +/** Emulator detection data. */ export interface EmulatorDetection { + /** Whether the device is recognized as an emulator. */ readonly isEmulator: boolean; + /** Type of detected emulator. */ readonly detectedEmulatorType?: EmulatorType; + /** Some troubleshooting information. */ readonly emulatorDetectionProofs: [EmulatorDetectionProof]; } +/** Type of the emulator. */ export declare enum EmulatorType { AVD = "AVD", GENYMOTION = "GENYMOTION", @@ -1080,6 +1133,7 @@ export declare enum EmulatorDetectionProof { export interface HttpProxyDetection { /** Whether the proxy data indicate that a proxy is enabled. */ readonly isHttpProxyEnabled: boolean; + /** Whether the HTTP proxy is using auto config with a PAC script. */ readonly isUsingAutoConfig: boolean; /** Host of the proxy server or null if proxy is not enabled. */ readonly host?: string; @@ -1104,16 +1158,29 @@ export declare enum RaspCallbackType { ACTIVE_CALL = "ACTIVE_CALL", APP_PRESENCE = "APP_PRESENCE" } +/** Result type of repackaging detection. */ export declare enum RepackagingResult { + /** The app is repackaged. */ REPACKAGED_APP = "REPACKAGED_APP", + /** The app is original, unaltered. */ ORIGINAL_APP = "ORIGINAL_APP", + /** + * Invalid configuration of repackaging detection. + * Repackaging can't be determined. + */ INVALID_CONFIG = "INVALID_CONFIG" } +/** Root detection data. */ export interface RootDetection { + /** Whether the device is rooted with a non-zero confidence. */ readonly isRooted: boolean; + /** Whether there's an attempt to cloak the root. */ readonly isRootCloaked: boolean; + /** Some troubleshooting information. */ readonly rootDetectionProofs: [RootDetectionProof]; + /** Confidence of root detection, value from 0.0 to 1.0. */ readonly rootDetectionConfidence: number; + /** Confidence of root cloak detection, value from 0.0 to 1.0. */ readonly rootCloakDetectionConfidence: number; } export declare enum RootDetectionProof { @@ -1161,7 +1228,14 @@ export interface TransientScreenSharingData { /** Whether a removed display has just been detected. */ readonly displayRemoved: boolean; } +/** Tapjacking detection data. */ export interface TapjackingDetection { + /** Whether the SDK is currently blocking tapjacking. */ readonly isTapjackingBlocked: boolean; + /** + * List of "bad" apps capable of performing tapjacking. + * A bad app is one that has a treat index same or higher + * than @see MalwarelyticsAndroidTapjackingBlockConfig.blockTapjackingSensitivity. + */ readonly tapjackingCapableApps: [string]; }