/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { BaseTokenStorage } from './base-token-storage.js'; import type { OAuthCredentials } from './types.js'; interface Keytar { getPassword(service: string, account: string): Promise; setPassword(service: string, account: string, password: string): Promise; deletePassword(service: string, account: string): Promise; findCredentials(service: string): Promise>; } type KeytarModule = Keytar | { default: Keytar; }; export type KeytarLoader = () => Promise; export declare function setKeytarLoader(loader: KeytarLoader): void; export declare function resetKeytarLoader(): void; export declare class KeychainTokenStorage extends BaseTokenStorage { private keychainAvailable; private keytarModule; private keytarLoadAttempted; getKeytar(): Promise; getCredentials(serverName: string): Promise; setCredentials(credentials: OAuthCredentials): Promise; deleteCredentials(serverName: string): Promise; listServers(): Promise; getAllCredentials(): Promise>; clearAll(): Promise; checkKeychainAvailability(): Promise; isAvailable(): Promise; } export {};