1.0.4 • Published 5 years ago

privacypal-local-client v1.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

PrivacyPal Local Client

Class Hierarchy

Methods

Methods

constructor

constructor(fileInterface: FileInterface, path: string): Promise‹boolean›

Parameters:

NameType
fileInterfaceFileInterface
pathstring

Returns: void


addAccount

addAccount(entry: Entry): Promise‹boolean›

Parameters:

NameType
entryEntry

Returns: Promise‹boolean›


getAccounts

getAccounts(): Promise‹Entry

Returns: Promise


getAccountCredentials

getAccountCredentials(): Promise‹EntryCredentials

Returns: Promise


login

login(username: string, password: string): Promise‹void›

Parameters:

NameType
usernamestring
passwordstring

Returns: Promise‹void›

Type aliases

FileInterface

Ƭ FileInterface:

{
    readFile: (path: string) => Promise<string>;
    writeFile: (path: string, data: string) => Promise<void>;
    findFile: (path: string) => Promise<boolean>;
    createFile: (path: string) => Promise<void>;
    deleteFile: (path: string) => Promise<void>;
}

Entry

Ƭ Entry: Record‹EntryFields, string›


EntryFields

Ƭ EntryFields: _"name" | "url" | "type"


###EntryCredentials

Ƭ EntryCredentials: Record‹EntryCredentialsFields, string›


###EntryCredentialsFields

Ƭ EntryCredentialsFields: _"username" | "password" | "otp";


1.0.4

5 years ago