/** * Auth Helper Functions * * Higher-level authentication functions that combine storage and login * functionality for common auth operations. */ import { type CredentialManager, type StoredCredentials } from "../storage"; /** * Refresh an access token using the refresh token */ export declare function refreshAccessToken(refreshToken: string, endpoint?: string): Promise<{ accessToken: string; refreshToken: string; } | null>; /** * Get a valid access token, refreshing if necessary */ export declare function getValidAccessToken(credentialManager: CredentialManager, endpoint?: string): Promise; /** * Authenticate using an API key */ export declare function authenticateWithApiKey(credentialManager: CredentialManager, apiKey: string, options?: { endpoint?: string; }): Promise; /** * Authenticate using a direct token (no refresh token) */ export declare function authenticateWithToken(credentialManager: CredentialManager, token: string): Promise; /** * Check if the user is authenticated with a valid token */ export declare function isAuthenticated(credentialManager: CredentialManager): Promise; /** * Get stored credentials */ export declare function getStoredCredentials(credentialManager: CredentialManager): Promise; /** * Clear all credentials */ export declare function clearCredentials(credentialManager: CredentialManager): Promise;