-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
74 lines (66 loc) · 2.17 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
type RNSensitiveInfoBiometryType = 'Touch ID' | 'Face ID';
type RNSensitiveInfoAccessControlOptions =
| 'kSecAccessControlApplicationPassword'
| 'kSecAccessControlPrivateKeyUsage'
| 'kSecAccessControlDevicePasscode'
| 'kSecAccessControlTouchIDAny'
| 'kSecAccessControlTouchIDCurrentSet'
| 'kSecAccessControlUserPresence'
| 'kSecAccessControlBiometryAny'
| 'kSecAccessControlBiometryCurrentSet';
type RNSensitiveInfoAttrAccessibleOptions =
| 'kSecAttrAccessibleAfterFirstUnlock'
| 'kSecAttrAccessibleAlways'
| 'kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly'
| 'kSecAttrAccessibleWhenUnlockedThisDeviceOnly'
| 'kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly'
| 'kSecAttrAccessibleAlwaysThisDeviceOnly'
| 'kSecAttrAccessibleWhenUnlocked';
interface RNSensitiveInfoAndroidDialogStrings {
header?: string;
description?: string;
hint?: string;
success?: string;
notRecognized?: string;
cancel?: string;
cancelled?: string;
}
export interface RNSensitiveInfoOptions {
kSecAccessControl?: RNSensitiveInfoAccessControlOptions;
kSecAttrAccessible?: RNSensitiveInfoAttrAccessibleOptions;
kSecAttrSynchronizable?: boolean;
keychainService?: string;
sharedPreferencesName?: string;
touchID?: boolean;
showModal?: boolean;
kSecUseOperationPrompt?: string;
kLocalizedFallbackTitle?: string;
strings?: RNSensitiveInfoAndroidDialogStrings;
}
export declare function setItem(
key: string,
value: string,
options: RNSensitiveInfoOptions,
): Promise<null>;
export declare function getItem(
key: string,
options: RNSensitiveInfoOptions,
): Promise<string>;
interface SensitiveInfoEntry {
key: string;
value: string;
service: string;
}
export declare function getAllItems(
options: RNSensitiveInfoOptions,
): Promise<[SensitiveInfoEntry[]]>;
export declare function deleteItem(
key: string,
options: RNSensitiveInfoOptions,
): Promise<null>;
export declare function isSensorAvailable(): Promise<
RNSensitiveInfoBiometryType | boolean
>;
export declare function hasEnrolledFingerprints(): Promise<boolean>;
export declare function cancelFingerprintAuth(): void;
export declare function setInvalidatedByBiometricEnrollment(set: boolean): void;