UNPKG

@vladimirdukelic/revolutionary-ui-factory

Version:

Revolutionary UI Factory System v2 - Generate ANY UI component for ANY framework with 60-95% code reduction

104 lines (103 loc) 2.67 kB
/** * Authentication Manager for Revolutionary UI Factory * Handles user authentication, token storage, and premium feature access */ interface AuthConfig { accessToken?: string; refreshToken?: string; userId?: string; userEmail?: string; subscriptionPlan?: 'free' | 'starter' | 'pro' | 'enterprise'; subscriptionStatus?: 'active' | 'trialing' | 'canceled' | 'expired'; expiresAt?: string; features?: PremiumFeatures; } interface PremiumFeatures { marketplaceAccess: boolean; aiGenerator: boolean; customAI: boolean; teamCollaboration: boolean; customComponents: boolean; advancedAnalytics: boolean; prioritySupport: boolean; cloudSync: boolean; versionControl: boolean; privateRegistry: boolean; whiteLabel: boolean; apiAccess: boolean; ssoIntegration: boolean; auditLogs: boolean; unlimitedProjects: boolean; } export declare class AuthManager { private static CONFIG_DIR; private static AUTH_FILE; private static AUTH_PATH; private static LOGIN_URL; private static API_BASE; /** * Initialize auth manager and ensure config directory exists */ static init(): Promise<void>; /** * Check if user is authenticated */ static isAuthenticated(): Promise<boolean>; /** * Get current auth configuration */ static getAuth(): Promise<AuthConfig | null>; /** * Start login process */ static login(): Promise<boolean>; /** * Logout user */ static logout(): Promise<void>; /** * Check if user has access to a specific feature */ static hasFeature(feature: keyof PremiumFeatures): Promise<boolean>; /** * Get user's subscription plan */ static getSubscriptionPlan(): Promise<string>; /** * Check if subscription is active */ static isSubscriptionActive(): Promise<boolean>; /** * Save authentication config */ private static saveConfig; /** * Load authentication config */ private static loadConfig; /** * Generate unique session ID */ private static generateSessionId; /** * Open browser with URL */ private static openBrowser; /** * Poll for authentication completion */ private static pollForAuth; /** * Refresh authentication token */ private static refreshAuth; /** * Get list of enabled features */ private static getEnabledFeatures; /** * Make authenticated API request */ static apiRequest(endpoint: string, options?: RequestInit): Promise<Response | null>; } export {};