/** * Configuration Manager * * Handles reading/writing configuration and credentials files * with proper security measures. */ import { CredentialsFile, GlobalConfigFile, ProjectLinkFile, SyncQueueFile, SyncQueueItem } from "./types"; /** * Global Configuration Manager */ export declare const globalConfig: { /** * Read global configuration, merging defaults and environment variables */ read(): GlobalConfigFile; /** * Write global configuration */ write(config: Partial): void; /** * Get a specific configuration value */ get(key: K): GlobalConfigFile[K]; /** * Set a specific configuration value */ set(key: K_1, value: GlobalConfigFile[K_1]): void; /** * Reset configuration to defaults */ reset(): void; }; /** * Credentials Manager */ export declare const credentials: { /** * Read stored credentials */ read(): CredentialsFile | null; /** * Write credentials (with secure file permissions) */ write(creds: Omit): void; /** * Clear stored credentials */ clear(): void; /** * Check if credentials exist and are not expired */ isValid(): boolean; /** * Check if credentials exist (may be expired) */ exists(): boolean; /** * Check if token needs refresh (expires within 5 minutes) */ needsRefresh(): boolean; }; /** * Project Link Manager */ export declare const projectLink: { /** * Read project link configuration */ read(projectDir?: string): ProjectLinkFile | null; /** * Write project link configuration */ write(link: ProjectLinkFile, projectDir?: string): void; /** * Remove project link */ remove(projectDir?: string): void; /** * Check if project is linked */ exists(projectDir?: string): boolean; /** * Update sync metadata after successful sync */ updateSyncMetadata(metadata: { lastSyncedAt: string; localSchemaHash: string; remoteSchemaHash: string; }, projectDir?: string): void; }; /** * Sync Queue Manager */ export declare const syncQueue: { /** * Read sync queue */ read(projectDir?: string): SyncQueueFile; /** * Write sync queue */ write(queue: SyncQueueFile, projectDir?: string): void; /** * Add operation to queue */ add(operation: Omit, projectDir?: string): string; /** * Remove operation from queue */ remove(id: string, projectDir?: string): void; /** * Get pending operations count */ count(projectDir?: string): number; /** * Clear all operations */ clear(projectDir?: string): void; /** * Update operation retry count and error */ updateRetry(id: string, error: string, projectDir?: string): void; }; /** * Create a backup of a file */ export declare function createBackup(filePath: string, projectDir?: string): string;