capacitor-biometric-authentication
Version:
Framework-agnostic biometric authentication library. Works with React, Vue, Angular, or vanilla JS. No providers required!
58 lines • 2.75 kB
JavaScript
/**
* Capacitor Plugin Definitions
*
* Note: For new code, prefer importing from './types' which provides
* the unified type system with UPPER_CASE error codes.
*
* These types are maintained for backward compatibility with existing
* Capacitor plugin implementations.
*/
// Re-export unified types for consumers who want the new API
export * from './types';
export var BiometricType;
(function (BiometricType) {
BiometricType["FINGERPRINT"] = "fingerprint";
BiometricType["FACE_ID"] = "faceId";
BiometricType["TOUCH_ID"] = "touchId";
BiometricType["IRIS"] = "iris";
BiometricType["FACE_AUTHENTICATION"] = "faceAuthentication";
BiometricType["PASSCODE"] = "passcode";
BiometricType["PATTERN"] = "pattern";
BiometricType["PIN"] = "pin";
})(BiometricType || (BiometricType = {}));
export var BiometricUnavailableReason;
(function (BiometricUnavailableReason) {
BiometricUnavailableReason["NO_HARDWARE"] = "noHardware";
BiometricUnavailableReason["HARDWARE_UNAVAILABLE"] = "hardwareUnavailable";
BiometricUnavailableReason["NO_ENROLLED_BIOMETRICS"] = "noEnrolledBiometrics";
BiometricUnavailableReason["PERMISSION_DENIED"] = "permissionDenied";
BiometricUnavailableReason["NOT_SUPPORTED"] = "notSupported";
BiometricUnavailableReason["LOCKED_OUT"] = "lockedOut";
BiometricUnavailableReason["USER_DISABLED"] = "userDisabled";
})(BiometricUnavailableReason || (BiometricUnavailableReason = {}));
export var FallbackMethod;
(function (FallbackMethod) {
FallbackMethod["PASSCODE"] = "passcode";
FallbackMethod["PASSWORD"] = "password";
FallbackMethod["PATTERN"] = "pattern";
FallbackMethod["PIN"] = "pin";
FallbackMethod["SECURITY_QUESTION"] = "securityQuestion";
})(FallbackMethod || (FallbackMethod = {}));
/**
* Legacy error codes with camelCase values
* @deprecated Use BiometricErrorCode from './types' instead (UPPER_CASE values)
*/
export var LegacyBiometricErrorCode;
(function (LegacyBiometricErrorCode) {
LegacyBiometricErrorCode["AUTHENTICATION_FAILED"] = "authenticationFailed";
LegacyBiometricErrorCode["USER_CANCELLED"] = "userCancelled";
LegacyBiometricErrorCode["SYSTEM_CANCELLED"] = "systemCancelled";
LegacyBiometricErrorCode["NOT_AVAILABLE"] = "notAvailable";
LegacyBiometricErrorCode["PERMISSION_DENIED"] = "permissionDenied";
LegacyBiometricErrorCode["LOCKED_OUT"] = "lockedOut";
LegacyBiometricErrorCode["INVALID_CONTEXT"] = "invalidContext";
LegacyBiometricErrorCode["NOT_ENROLLED"] = "notEnrolled";
LegacyBiometricErrorCode["TIMEOUT"] = "timeout";
LegacyBiometricErrorCode["UNKNOWN"] = "unknown";
})(LegacyBiometricErrorCode || (LegacyBiometricErrorCode = {}));
//# sourceMappingURL=definitions.js.map