/** * Unified Authentication Client for Recoder.xyz * Supports all platforms: CLI, Web, Mobile, Desktop, Extension */ import { EventEmitter } from 'events'; export interface User { id: string; email: string; name: string; organization?: string; isActive: boolean; emailVerified: boolean; lastLoginAt?: string; createdAt: string; } export interface AuthTokens { accessToken: string; refreshToken: string; } export interface AuthResponse { success: boolean; data: { user: User; accessToken: string; refreshToken: string; isNewUser?: boolean; }; message: string; } export interface DeviceInfo { deviceId: string; name: string; deviceType: 'cli' | 'web' | 'mobile' | 'extension' | 'desktop'; platform: string; pushToken?: string; } export interface OAuthAccount { id: string; provider: string; email?: string; createdAt: string; } export declare class AuthClient extends EventEmitter { private api; private baseURL; private currentUser; private tokens; private deviceInfo; private refreshPromise; constructor(baseURL?: string); private getUserAgent; private getVersion; private setupInterceptors; register(email: string, password: string, name: string, organization?: string): Promise; login(email: string, password: string): Promise; loginWithGoogle(authCode: string, redirectUri: string): Promise; loginWithGitHub(authCode: string, state?: string): Promise; refreshAccessToken(): Promise; private _performRefresh; logout(): Promise; registerDevice(deviceInfo: Omit): Promise; getDevices(): Promise; sendHeartbeat(metadata?: object): Promise; getOAuthAccounts(): Promise; disconnectOAuthProvider(provider: string): Promise; getCurrentUser(): Promise; updateProfile(updates: Partial>): Promise; changePassword(currentPassword: string, newPassword: string): Promise; isAuthenticated(): boolean; getUser(): User | null; getTokens(): AuthTokens | null; getDeviceInfo(): DeviceInfo | null; private handleAuthSuccess; private handleAuthError; private clearAuth; private generateDeviceId; protected saveToStorage(): void; protected loadFromStorage(): void; protected removeFromStorage(): void; } export declare const authClient: AuthClient; export default AuthClient; //# sourceMappingURL=auth-client.d.ts.map