/** * Configuration Schemas (D-009) * * Centralized Zod schemas for type-safe runtime configuration validation. * All environment variable parsing goes through these schemas for consistent * validation and clear error messages. */ import { z } from 'zod'; /** * Schema for parsing a string as a boolean. * Recognizes 'true', '1', 'yes' as true; everything else as false. */ export declare const booleanStringSchema: z.ZodPipe, z.ZodTransform>; /** * Schema for parsing a string as an integer with bounds. */ export declare function integerStringSchema(options?: { min?: number; max?: number; default?: number; }): z.ZodCoercedNumber | z.ZodDefault>; /** * Schema for parsing a string as a float between 0 and 1 (percentage/rate). */ export declare function rateSchema(defaultVal?: number): z.ZodCoercedNumber | z.ZodDefault>; /** * Schema for a valid URL string. */ export declare const urlSchema: z.ZodString; /** * Schema for a valid PostgreSQL URL. */ export declare const postgresUrlSchema: z.ZodString; /** * Schema for a valid WebSocket URL. */ export declare const websocketUrlSchema: z.ZodString; /** * Schema for a comma-separated list of strings. */ export declare const commaSeparatedListSchema: z.ZodPipe>; export declare const logLevelSchema: z.ZodEnum<{ error: "error"; info: "info"; warn: "warn"; debug: "debug"; silent: "silent"; }>; export type LogLevel = z.infer; export declare const logConfigSchema: z.ZodObject<{ level: z.ZodDefault>; prettyPrint: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; export type LogConfig = z.infer; export declare const databaseConfigSchema: z.ZodPipe; sqlitePath: z.ZodDefault; vectorDbPath: z.ZodDefault; poolSize: z.ZodCoercedNumber | z.ZodDefault>; debugPrisma: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>, z.ZodTransform<{ backend: "postgres"; databaseUrl: string; pooling: boolean; poolSize: number; debugPrisma: boolean; sqlitePath?: undefined; vectorDbPath?: undefined; } | { backend: "sqlite"; sqlitePath: string; vectorDbPath: string; pooling: boolean; debugPrisma: boolean; databaseUrl?: undefined; poolSize?: undefined; }, { sqlitePath: string; vectorDbPath: string; poolSize: number; debugPrisma: boolean; databaseUrl?: string | undefined; }>>; export type DatabaseConfig = z.infer; export declare const browserProviderTypeSchema: z.ZodEnum<{ custom: "custom"; local: "local"; browserless: "browserless"; brightdata: "brightdata"; }>; export type BrowserProviderType = z.infer; export declare const browserProviderConfigSchema: z.ZodObject<{ type: z.ZodDefault>; browserlessToken: z.ZodOptional; browserlessUrl: z.ZodDefault>; brightdataAuth: z.ZodOptional; brightdataZone: z.ZodDefault>>; brightdataCountry: z.ZodOptional; customEndpoint: z.ZodOptional; timeout: z.ZodCoercedNumber | z.ZodDefault>; }, z.core.$strip>; export type BrowserProviderConfig = z.infer; export declare const redisConfigSchema: z.ZodObject<{ url: z.ZodOptional; host: z.ZodDefault>; port: z.ZodCoercedNumber | z.ZodDefault>; password: z.ZodOptional; db: z.ZodCoercedNumber | z.ZodDefault>; keyPrefix: z.ZodDefault>; connectTimeout: z.ZodCoercedNumber | z.ZodDefault>; maxRetriesPerRequest: z.ZodCoercedNumber | z.ZodDefault>; enableOfflineQueue: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; export type RedisConfig = z.infer; export declare const brightDataZoneSchema: z.ZodEnum<{ residential: "residential"; unblocker: "unblocker"; datacenter: "datacenter"; isp: "isp"; }>; export type BrightDataZone = z.infer; export declare const proxyConfigSchema: z.ZodObject<{ datacenterUrls: z.ZodOptional>>; ispUrls: z.ZodOptional>>; brightdataAuth: z.ZodOptional; brightdataZone: z.ZodDefault>>; brightdataCountry: z.ZodOptional; brightdataCountries: z.ZodOptional>>; brightdataSessionRotation: z.ZodDefault, z.ZodTransform>>; brightdataPort: z.ZodCoercedNumber | z.ZodDefault>; healthWindow: z.ZodCoercedNumber | z.ZodDefault>; cooldownMinutes: z.ZodCoercedNumber | z.ZodDefault>; blockThreshold: z.ZodCoercedNumber | z.ZodDefault>; riskCacheMinutes: z.ZodCoercedNumber | z.ZodDefault>; enableRiskLearning: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; export type ProxyConfig = z.infer; export declare const nodeEnvSchema: z.ZodEnum<{ test: "test"; development: "development"; production: "production"; }>; export type NodeEnv = z.infer; export declare const apiServerConfigSchema: z.ZodObject<{ nodeEnv: z.ZodDefault>; port: z.ZodCoercedNumber | z.ZodDefault>; corsOrigins: z.ZodOptional>>; }, z.core.$strip>; export type ApiServerConfig = z.infer; export declare const stripeConfigSchema: z.ZodObject<{ secretKey: z.ZodOptional; webhookSecret: z.ZodOptional; priceId: z.ZodOptional; meterEventName: z.ZodOptional; }, z.core.$strip>; export type StripeConfig = z.infer; export declare const mcpServerConfigSchema: z.ZodObject<{ debugMode: z.ZodDefault, z.ZodTransform>>; adminMode: z.ZodDefault, z.ZodTransform>>; tenantId: z.ZodDefault>; }, z.core.$strip>; export type McpServerConfig = z.infer; export declare const sdkConfigSchema: z.ZodObject<{ sessionsDir: z.ZodDefault>; learningEnginePath: z.ZodDefault>; disableProceduralMemory: z.ZodDefault, z.ZodTransform>>; disableLearning: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; export type SdkConfig = z.infer; /** * Complete validated configuration for the application. * All environment variables are parsed and validated through this schema. */ export declare const appConfigSchema: z.ZodObject<{ log: z.ZodObject<{ level: z.ZodDefault>; prettyPrint: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; database: z.ZodPipe; sqlitePath: z.ZodDefault; vectorDbPath: z.ZodDefault; poolSize: z.ZodCoercedNumber | z.ZodDefault>; debugPrisma: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>, z.ZodTransform<{ backend: "postgres"; databaseUrl: string; pooling: boolean; poolSize: number; debugPrisma: boolean; sqlitePath?: undefined; vectorDbPath?: undefined; } | { backend: "sqlite"; sqlitePath: string; vectorDbPath: string; pooling: boolean; debugPrisma: boolean; databaseUrl?: undefined; poolSize?: undefined; }, { sqlitePath: string; vectorDbPath: string; poolSize: number; debugPrisma: boolean; databaseUrl?: string | undefined; }>>; browserProvider: z.ZodObject<{ type: z.ZodDefault>; browserlessToken: z.ZodOptional; browserlessUrl: z.ZodDefault>; brightdataAuth: z.ZodOptional; brightdataZone: z.ZodDefault>>; brightdataCountry: z.ZodOptional; customEndpoint: z.ZodOptional; timeout: z.ZodCoercedNumber | z.ZodDefault>; }, z.core.$strip>; redis: z.ZodObject<{ url: z.ZodOptional; host: z.ZodDefault>; port: z.ZodCoercedNumber | z.ZodDefault>; password: z.ZodOptional; db: z.ZodCoercedNumber | z.ZodDefault>; keyPrefix: z.ZodDefault>; connectTimeout: z.ZodCoercedNumber | z.ZodDefault>; maxRetriesPerRequest: z.ZodCoercedNumber | z.ZodDefault>; enableOfflineQueue: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; proxy: z.ZodObject<{ datacenterUrls: z.ZodOptional>>; ispUrls: z.ZodOptional>>; brightdataAuth: z.ZodOptional; brightdataZone: z.ZodDefault>>; brightdataCountry: z.ZodOptional; brightdataCountries: z.ZodOptional>>; brightdataSessionRotation: z.ZodDefault, z.ZodTransform>>; brightdataPort: z.ZodCoercedNumber | z.ZodDefault>; healthWindow: z.ZodCoercedNumber | z.ZodDefault>; cooldownMinutes: z.ZodCoercedNumber | z.ZodDefault>; blockThreshold: z.ZodCoercedNumber | z.ZodDefault>; riskCacheMinutes: z.ZodCoercedNumber | z.ZodDefault>; enableRiskLearning: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; apiServer: z.ZodObject<{ nodeEnv: z.ZodDefault>; port: z.ZodCoercedNumber | z.ZodDefault>; corsOrigins: z.ZodOptional>>; }, z.core.$strip>; stripe: z.ZodObject<{ secretKey: z.ZodOptional; webhookSecret: z.ZodOptional; priceId: z.ZodOptional; meterEventName: z.ZodOptional; }, z.core.$strip>; mcpServer: z.ZodObject<{ debugMode: z.ZodDefault, z.ZodTransform>>; adminMode: z.ZodDefault, z.ZodTransform>>; tenantId: z.ZodDefault>; }, z.core.$strip>; sdk: z.ZodObject<{ sessionsDir: z.ZodDefault>; learningEnginePath: z.ZodDefault>; disableProceduralMemory: z.ZodDefault, z.ZodTransform>>; disableLearning: z.ZodDefault, z.ZodTransform>>; }, z.core.$strip>; }, z.core.$strip>; export type AppConfig = z.infer; /** * Format Zod validation errors into readable messages. */ export declare function formatConfigErrors(error: z.ZodError): string; /** * Create a configuration validation error with helpful messages. */ export declare class ConfigValidationError extends Error { readonly section: string; readonly zodError: z.ZodError; constructor(section: string, zodError: z.ZodError); } //# sourceMappingURL=config-schemas.d.ts.map