import type { ApiConfig } from '@plyaz/types/api'; /** * Get the current global configuration. * Returns our stored ApiConfig, not fetchff's global config. * * @returns Current global configuration * * @example * ```typescript * const config = getGlobalConfig(); * console.log('Current timeout:', config.timeout); * console.log('Retry attempts:', config.retry?.attempts); * ``` * * @since 1.0.0 */ export declare function getGlobalConfig(): ApiConfig; export declare function setGlobalConfig(config: ApiConfig): void; /** * Update the global configuration with partial values. * Merges the provided configuration with the existing global configuration. * * @param config - Partial configuration to merge * * @example * ```typescript * // Update only timeout, keeping other settings * updateGlobalConfig({ * timeout: 45000 * }); * // eslint-disable-next-line complexity * // Update retry configuration * updateGlobalConfig({ * retry: { attempts: 5 } * }); * ``` * * @since 1.0.0 */ export declare function updateGlobalConfig(config: Partial): void; /** * Reset global configuration to defaults. * Clears all global configuration settings. * * @example * ```typescript * // Reset to empty defaults * resetGlobalConfig(); * ``` * * @since 1.0.0 */ export declare function resetGlobalConfig(): void; /** * Configure global settings based on environment. * Helper function for common environment-based setup patterns. * * @param env - Environment name ('production', 'development', 'test') * @param config - Configuration for the environment * * @example * ```typescript * // Configure for current environment * import { getEnv } from '@utils/environment'; * configureForEnvironment(getEnv('NODE_ENV'), { * production: { * timeout: 15000, * retry: { attempts: 3 }, * debug: false * }, * development: { * timeout: 60000, * retry: { attempts: 5 }, * debug: true * }, * test: { * timeout: 5000, * retry: { attempts: 0 }, * debug: false * } * }); * ``` * * @since 1.0.0 */ export declare function configureForEnvironment(env: string | undefined, config: Record): void; /** * Apply a preset configuration template. * Combines existing cache and polling strategies for common use cases. * * @param preset - Name of the preset to apply * * @example * ```typescript * // Apply mobile-optimized settings * applyConfigPreset('mobile'); * * // Apply high-reliability settings * applyConfigPreset('reliable'); * ``` * * @since 1.0.0 */ export declare function applyConfigPreset(preset: 'default' | 'mobile' | 'reliable' | 'fast' | 'offline-first'): void; //# sourceMappingURL=global.d.ts.map