// Type definitions for react-native-keychain 3.0 // Project: https://github.com/oblador/react-native-keychain // Definitions by: David Evans Farinha // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.1 export interface UserCredentials { username: string; password: string; } export interface SharedWebCredentials { server: string; username: string; password: string; } export interface Options { accessControl?: SecAccessControl; accessGroup?: string; accessible?: SecAccessible; authenticationPrompt?: string; authenticationType?: LAPolicy; service?: string; } export type SecAccessible = 'AccessibleWhenUnlocked' | 'AccessibleAfterFirstUnlock' | 'AccessibleAlways' | 'AccessibleWhenPasscodeSetThisDeviceOnly' | 'AccessibleWhenUnlockedThisDeviceOnly' | 'AccessibleAfterFirstUnlockThisDeviceOnly' | 'AccessibleAlwaysThisDeviceOnly'; export type SecAccessControl = 'UserPresence' | 'BiometryAny' | 'BiometryCurrentSet' | 'DevicePasscode' | 'ApplicationPassword' | 'BiometryAnyOrDevicePasscode' | 'BiometryCurrentSetOrDevicePasscode'; export type LAPolicy = 'Authentication' | 'AuthenticationWithBiometrics'; export function canImplyAuthentication(options?: Options): Promise; export function getSupportedBiometryType(): Promise; export function setInternetCredentials( server: string, username: string, password: string, options?: Options ): Promise; export function getInternetCredentials( server: string ): Promise; export function resetInternetCredentials( server: string ): Promise; export function setGenericPassword( username: string, password: string, serviceOrOptions?: string | Options ): Promise; export function getGenericPassword( serviceOrOptions?: string | Options ): Promise; export function resetGenericPassword( serviceOrOptions?: string | Options ): Promise; export function requestSharedWebCredentials( ): Promise; export function setSharedWebCredentials( server: string, username: string, password: string ): Promise;