mirror of
https://github.com/bitwarden/directory-connector
synced 2026-02-25 08:53:30 +00:00
29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
/* auto-generated by NAPI-RS */
|
|
/* eslint-disable */
|
|
export declare namespace passwords {
|
|
/**
|
|
* Delete the stored password from the keychain.
|
|
* Throws an Error with message PASSWORD_NOT_FOUND if the password does not exist.
|
|
*/
|
|
export function deletePassword(service: string, account: string): Promise<void>;
|
|
/**
|
|
* Fetch the stored password from the keychain.
|
|
* Throws an Error with message PASSWORD_NOT_FOUND if the password does not exist.
|
|
*/
|
|
export function getPassword(service: string, account: string): Promise<string>;
|
|
/** Check if OS secure storage is available. */
|
|
export function isAvailable(): Promise<boolean>;
|
|
/**
|
|
* Migrate a credential that was stored by keytar (UTF-8 blob) to the new UTF-16 format
|
|
* used by desktop_core on Windows. No-ops on non-Windows platforms.
|
|
*
|
|
* Returns true if a migration was performed, false if the credential was already in the
|
|
* correct format or does not exist.
|
|
*/
|
|
export function migrateKeytarPassword(service: string, account: string): Promise<boolean>;
|
|
/** The error message returned when a password is not found during retrieval or deletion. */
|
|
export const PASSWORD_NOT_FOUND: string;
|
|
/** Save the password to the keychain. Adds an entry if none exists, otherwise updates it. */
|
|
export function setPassword(service: string, account: string, password: string): Promise<void>;
|
|
}
|