import { StoredToken } from '../types'; /** * TokenManager handles storing, retrieving, and refreshing tokens. * Supports both in-memory storage and custom storage implementations. */ export declare class TokenManager { private tokens; private storageKey; /** * Initialize TokenManager with optional persisted tokens * @param persistedTokens - Previously stored tokens to restore */ constructor(persistedTokens?: Record); /** * Store a token * @param key - Identifier for the token (e.g., username or 'default') * @param token - Token data to store */ setToken(key: string, token: StoredToken): void; /** * Retrieve a stored token * @param key - Identifier for the token * @returns Stored token or undefined if not found */ getToken(key: string): StoredToken | undefined; /** * Get a valid access token, returns null if expired or not found * @param key - Identifier for the token * @returns Access token string or null if not valid */ getValidAccessToken(key: string): string | null; /** * Check if a refresh token is available and valid * @param key - Identifier for the token * @returns true if refresh token exists and is not expired */ hasValidRefreshToken(key: string): boolean; /** * Get refresh token * @param key - Identifier for the token * @returns Refresh token string or null if not available */ getRefreshToken(key: string): string | null; /** * Clear all stored tokens */ clear(): void; /** * Clear a specific token * @param key - Identifier for the token */ clearToken(key: string): void; /** * Get all stored tokens for export/persistence * @returns Object with all stored tokens */ exportTokens(): Record; } //# sourceMappingURL=token-manager.d.ts.map