|
1 |
| -export enum RNSensitiveInfoBiometryType { |
2 |
| - "Touch ID", |
3 |
| - "Face ID", |
4 |
| -} |
| 1 | +type RNSensitiveInfoBiometryType = "Touch ID" | "Face ID"; |
5 | 2 |
|
6 |
| -export enum RNSensitiveInfoAccessControlOptions { |
7 |
| - 'kSecAccessControlApplicationPassword', |
8 |
| - 'kSecAccessControlPrivateKeyUsage', |
9 |
| - 'kSecAccessControlDevicePasscode', |
10 |
| - 'kSecAccessControlTouchIDAny', |
11 |
| - 'kSecAccessControlTouchIDCurrentSet', |
12 |
| - 'kSecAccessControlUserPresence', |
13 |
| - 'kSecAccessControlBiometryAny', |
14 |
| - 'kSecAccessControlBiometryCurrentSet', |
15 |
| -} |
| 3 | +type RNSensitiveInfoAccessControlOptions = |
| 4 | + | "kSecAccessControlApplicationPassword" |
| 5 | + | "kSecAccessControlPrivateKeyUsage" |
| 6 | + | "kSecAccessControlDevicePasscode" |
| 7 | + | "kSecAccessControlTouchIDAny" |
| 8 | + | "kSecAccessControlTouchIDCurrentSet" |
| 9 | + | "kSecAccessControlUserPresence" |
| 10 | + | "kSecAccessControlBiometryAny" |
| 11 | + | "kSecAccessControlBiometryCurrentSet"; |
| 12 | + |
| 13 | +type RNSensitiveInfoAttrAccessibleOptions = |
| 14 | + | "kSecAttrAccessibleAfterFirstUnlock" |
| 15 | + | "kSecAttrAccessibleAlways" |
| 16 | + | "kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly" |
| 17 | + | "kSecAttrAccessibleWhenUnlockedThisDeviceOnly" |
| 18 | + | "kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly" |
| 19 | + | "kSecAttrAccessibleAlwaysThisDeviceOnly" |
| 20 | + | "kSecAttrAccessibleWhenUnlocked"; |
16 | 21 |
|
17 |
| -export enum RNSensitiveInfoAttrAccessibleOptions { |
18 |
| - 'kSecAttrAccessibleAfterFirstUnlock', |
19 |
| - 'kSecAttrAccessibleAlways', |
20 |
| - 'kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly', |
21 |
| - 'kSecAttrAccessibleWhenUnlockedThisDeviceOnly', |
22 |
| - 'kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly', |
23 |
| - 'kSecAttrAccessibleAlwaysThisDeviceOnly', |
24 |
| - 'kSecAttrAccessibleWhenUnlocked', |
| 22 | +interface RNSensitiveInfoAndroidDialogStrings { |
| 23 | + header?: string; |
| 24 | + description?: string; |
| 25 | + hint?: string; |
| 26 | + success?: string; |
| 27 | + notRecognized?: string; |
| 28 | + cancel?: string; |
| 29 | + cancelled?: string; |
25 | 30 | }
|
26 | 31 |
|
27 | 32 | export interface RNSensitiveInfoOptions {
|
28 | 33 | kSecAccessControl?: RNSensitiveInfoAccessControlOptions;
|
29 | 34 | kSecAttrAccessible?: RNSensitiveInfoAttrAccessibleOptions;
|
30 | 35 | keychainService?: string;
|
31 |
| - kSecUseOperationPrompt?: string; |
32 | 36 | sharedPreferencesName?: string;
|
33 | 37 | touchID?: boolean;
|
| 38 | + showModal?: boolean; |
| 39 | + kSecUseOperationPrompt?: string; |
| 40 | + strings?: RNSensitiveInfoAndroidDialogStrings; |
34 | 41 | }
|
35 | 42 |
|
36 |
| -export declare function setItem(key: string, value: string, options: RNSensitiveInfoOptions): Promise<null>; |
37 |
| -export declare function getItem(key: string, options: RNSensitiveInfoOptions): Promise<string>; |
38 |
| -export declare function getAllItems(options: RNSensitiveInfoOptions): Promise<Object>; |
39 |
| -export declare function deleteItem(key: string, options: RNSensitiveInfoOptions): Promise<null>; |
40 |
| -export declare function isSensorAvailable(): Promise<RNSensitiveInfoBiometryType | boolean>; |
| 43 | +export declare function setItem( |
| 44 | + key: string, |
| 45 | + value: string, |
| 46 | + options: RNSensitiveInfoOptions |
| 47 | +): Promise<null>; |
| 48 | +export declare function getItem( |
| 49 | + key: string, |
| 50 | + options: RNSensitiveInfoOptions |
| 51 | +): Promise<string>; |
| 52 | +export declare function getAllItems( |
| 53 | + options: RNSensitiveInfoOptions |
| 54 | +): Promise<Object>; |
| 55 | +export declare function deleteItem( |
| 56 | + key: string, |
| 57 | + options: RNSensitiveInfoOptions |
| 58 | +): Promise<null>; |
| 59 | +export declare function isSensorAvailable(): Promise< |
| 60 | + RNSensitiveInfoBiometryType | boolean |
| 61 | +>; |
41 | 62 | export declare function isHardwareDetected(): Promise<boolean>;
|
42 | 63 | export declare function hasEnrolledFingerprints(): Promise<boolean>;
|
43 | 64 | export declare function cancelFingerprintAuth(): void;
|
| 65 | +export declare function setInvalidatedByBiometricEnrollment(boolean): void; |
0 commit comments