/** * Shared Configuration Framework * * Provides common configuration patterns and utilities to reduce * duplication across configuration-related modules. */ export interface Configuration { [key: string]: any; } export interface ConfigSchema { required?: string[]; type?: 'object' | 'string' | 'number' | 'boolean'; default?: any; validate?: (value: any) => boolean | string; transform?: (value: any) => any; env?: string; } export interface MergeOptions { deep?: boolean; overwrite?: boolean; arrays?: 'replace' | 'merge'; } /** * Configuration Manager Class */ export declare class ConfigurationManager { private static config; private static schema; private static watchers; /** * Set configuration schema */ static setSchema(schema: Record): void; /** * Get configuration value */ static get(key: string, defaultValue?: any): any; /** * Set configuration value */ static set(key: string, value: any): void; /** * Load configuration from environment variables */ static loadFromEnv(prefix?: string): void; /** * Load configuration from file */ static loadFromFile(filePath: string): Promise; /** * Save configuration to file */ static saveToFile(filePath: string): Promise; /** * Merge configuration objects */ static merge(newConfig: Configuration, options?: MergeOptions): void; /** * Watch for configuration changes */ static watch(key: string, callback: (value: any, oldValue: any) => void): void; /** * Stop watching configuration changes */ static unwatch(key: string): void; /** * Validate entire configuration */ static validate(): { valid: boolean; errors: string[]; }; /** * Get all configuration */ static getAll(): Configuration; /** * Reset configuration */ static reset(): void; /** * Deep merge utility */ private static deepMerge; } export declare const commonSchemas: { server: { port: { type: string; default: number; }; host: { type: string; default: string; }; timeout: { type: string; default: number; }; }; database: { host: { type: string; env: string; }; port: { type: string; env: string; }; name: { type: string; env: string; }; ssl: { type: string; default: boolean; env: string; }; }; logging: { level: { type: string; default: string; validate: (val: any) => boolean; }; file: { type: string; }; maxFiles: { type: string; default: number; }; }; testing: { timeout: { type: string; default: number; }; retries: { type: string; default: number; }; parallel: { type: string; default: boolean; }; }; }; export declare const configUtils: { setupWithCommonSchemas: () => void; loadFromMultipleSources: (sources: { env?: string; file?: string; }[]) => Promise; getCategory: (category: keyof typeof commonSchemas) => Configuration; setCategoryDefaults: (category: keyof typeof commonSchemas) => void; }; //# sourceMappingURL=configurationFramework.d.ts.map