/* tslint:disable */ /* eslint-disable */ /* auto-generated by NAPI-RS */ export interface Credential { account: string password: string } /** find credentials by service name */ export function findCredentials(service: string, target?: string | undefined | null): Array /** find credentials by service name */ export function findCredentialsAsync(service: string, target?: string | undefined | null, signal?: AbortSignal | undefined | null): Promise> export class AsyncEntry { /** * Create an entry for the given service and username. * * The default credential builder is used. */ constructor(service: string, username: string) /** * Create an entry for the given target, service, and username. * * The default credential builder is used. */ static withTarget(target: string, service: string, username: string): AsyncEntry /** * Set the password for this entry. * * Can return an [Ambiguous](Error::Ambiguous) error * if there is more than one platform credential * that matches this entry. This can only happen * on some platforms, and then only if a third-party * application wrote the ambiguous credential. */ setPassword(password: string, signal?: AbortSignal | undefined | null): Promise /** * Retrieve the password saved for this entry. * * Returns a [NoEntry](Error::NoEntry) error if there isn't one. * * Can return an [Ambiguous](Error::Ambiguous) error * if there is more than one platform credential * that matches this entry. This can only happen * on some platforms, and then only if a third-party * application wrote the ambiguous credential. */ getPassword(signal?: AbortSignal | undefined | null): Promise /** * Delete the password for this entry. * * Returns a [NoEntry](Error::NoEntry) error if there isn't one. * * Can return an [Ambiguous](Error::Ambiguous) error * if there is more than one platform credential * that matches this entry. This can only happen * on some platforms, and then only if a third-party * application wrote the ambiguous credential. */ deletePassword(signal?: AbortSignal | undefined | null): Promise } export class Entry { /** * Create an entry for the given service and username. * * The default credential builder is used. */ constructor(service: string, username: string) /** * Create an entry for the given target, service, and username. * * The default credential builder is used. */ static withTarget(target: string, service: string, username: string): Entry /** * Set the password for this entry. * * Can return an [Ambiguous](Error::Ambiguous) error * if there is more than one platform credential * that matches this entry. This can only happen * on some platforms, and then only if a third-party * application wrote the ambiguous credential. */ setPassword(password: string): void /** * Retrieve the password saved for this entry. * * Returns a [NoEntry](Error::NoEntry) error if there isn't one. * * Can return an [Ambiguous](Error::Ambiguous) error * if there is more than one platform credential * that matches this entry. This can only happen * on some platforms, and then only if a third-party * application wrote the ambiguous credential. */ getPassword(): string | null /** * Delete the password for this entry. * * Returns a [NoEntry](Error::NoEntry) error if there isn't one. * * Can return an [Ambiguous](Error::Ambiguous) error * if there is more than one platform credential * that matches this entry. This can only happen * on some platforms, and then only if a third-party * application wrote the ambiguous credential. */ deletePassword(): boolean }