import { Account } from './Account'; import { AccountType } from './types'; export declare class AccountManager { private store; private encryptionToken; constructor(); /** * Initialize the account manager with electron-store * @param storagePath - Optional custom path for storage file */ initialize(storagePath?: string): void; /** * Ensure store is initialized */ private ensureInitialized; /** * Encrypt account data for storage */ private _encryptAccountData; /** * Decrypt and reconstruct account from stored data */ private _decryptAccountData; /** * Add or update an account in storage * @param account - Account to add/update */ addAccount(account: Account): Promise; /** * Remove an account from storage * @param uuid - UUID of account to remove */ removeAccount(uuid: string): Promise; /** * Get an account by UUID * @param uuid - UUID of account to retrieve * @returns Decrypted account or undefined if not found */ getAccount(uuid: string): Promise; /** * Get an account by username * @param name - Username to search for * @returns Decrypted account or undefined if not found */ getAccountByName(name: string): Promise; /** * Get all stored accounts * @returns Array of all decrypted accounts */ getAllAccounts(): Promise; /** * Get account metadata (without decrypting) * @returns Array of account metadata */ getAccountsMetadata(): Array<{ uuid: string; username: string; type: AccountType; lastUsed: number; addedAt: number; }>; /** * Refresh an account's tokens and update storage * @param uuid - UUID of account to refresh * @returns Refreshed account */ refreshAccount(uuid: string): Promise; /** * Clear all accounts from storage */ clearAll(): Promise; /** * Get the number of stored accounts */ getAccountCount(): number; }