/** * Environment Variable Parser (D-009) * * Type-safe environment variable parsing with validation. * Centralizes all env var access and provides clear error messages * for misconfiguration. */ import { type LogConfig, type DatabaseConfig, type BrowserProviderConfig, type RedisConfig, type ProxyConfig, type ApiServerConfig, type StripeConfig, type McpServerConfig, type SdkConfig } from './config-schemas.js'; /** * Parse and validate logging configuration from environment. */ export declare function parseLogConfig(): LogConfig; /** * Parse and validate database configuration from environment. */ export declare function parseDatabaseConfig(): DatabaseConfig; /** * Parse and validate browser provider configuration from environment. */ export declare function parseBrowserProviderConfig(): BrowserProviderConfig; /** * Parse and validate Redis configuration from environment. */ export declare function parseRedisConfig(): RedisConfig; /** * Parse and validate proxy configuration from environment. */ export declare function parseProxyConfig(): ProxyConfig; /** * Parse and validate API server configuration from environment. */ export declare function parseApiServerConfig(): ApiServerConfig; /** * Parse and validate Stripe configuration from environment. */ export declare function parseStripeConfig(): StripeConfig; /** * Parse and validate MCP server configuration from environment. */ export declare function parseMcpServerConfig(): McpServerConfig; /** * Parse and validate SDK configuration from environment. */ export declare function parseSdkConfig(): SdkConfig; /** * Safe integer parsing with validation. * Returns default if value is undefined, NaN, or out of bounds. * * @deprecated Use Zod schemas with integerStringSchema instead */ export declare function safeParseInt(value: string | undefined, defaultVal: number, options?: { min?: number; max?: number; }): number; /** * Safe float parsing with validation. * Returns default if value is undefined, NaN, or out of bounds. * * @deprecated Use Zod schemas with rateSchema instead */ export declare function safeParseFloat(value: string | undefined, defaultVal: number, options?: { min?: number; max?: number; }): number; /** * Parse a boolean from environment variable. * Recognizes 'true', '1', 'yes' as true; everything else as false. * * @deprecated Use Zod schemas with booleanStringSchema instead */ export declare function parseBoolean(value: string | undefined): boolean; /** * Parse a comma-separated list from environment variable. * * @deprecated Use Zod schemas with commaSeparatedListSchema instead */ export declare function parseCommaSeparated(value: string | undefined): string[]; /** * Get cached log configuration (parses once on first call). */ export declare function getLogConfig(): LogConfig; /** * Get cached database configuration (parses once on first call). */ export declare function getDatabaseConfig(): DatabaseConfig; /** * Get cached browser provider configuration (parses once on first call). */ export declare function getBrowserProviderConfig(): BrowserProviderConfig; /** * Get cached Redis configuration (parses once on first call). */ export declare function getRedisConfig(): RedisConfig; /** * Get cached proxy configuration (parses once on first call). */ export declare function getProxyConfig(): ProxyConfig; /** * Get cached API server configuration (parses once on first call). */ export declare function getApiServerConfig(): ApiServerConfig; /** * Get cached Stripe configuration (parses once on first call). */ export declare function getStripeConfig(): StripeConfig; /** * Get cached MCP server configuration (parses once on first call). */ export declare function getMcpServerConfig(): McpServerConfig; /** * Get cached SDK configuration (parses once on first call). */ export declare function getSdkConfig(): SdkConfig; /** * Clear all cached configurations. * Useful for testing when environment variables change. */ export declare function clearConfigCache(): void; /** * Validate all configurations at startup. * Call this early in application bootstrap to fail fast on misconfig. * * @param sections - Optional array of section names to validate. * If not provided, validates all sections. * @throws ConfigValidationError if any configuration is invalid. */ export declare function validateAllConfigs(sections?: Array<'log' | 'database' | 'browserProvider' | 'redis' | 'proxy' | 'apiServer' | 'stripe' | 'mcpServer' | 'sdk'>): void; /** * Check if a configuration section is valid without throwing. * * @returns Object with success boolean and optional error message. */ export declare function isConfigValid(section: 'log' | 'database' | 'browserProvider' | 'redis' | 'proxy' | 'apiServer' | 'stripe' | 'mcpServer' | 'sdk'): { valid: boolean; error?: string; }; //# sourceMappingURL=env-parser.d.ts.map