/** * Zod Schemas for Performance Configuration * * Runtime validation schemas for performance configuration. * Replaces manual validatePerformanceConfig() function with declarative schemas. * * @module assessment/config/performanceConfigSchemas * @see performanceConfig.ts for the interface definitions * @see sharedSchemas.ts for PERF_CONFIG_RANGES constants */ import { z } from "zod"; import { PERF_CONFIG_RANGES } from "../../../lib/assessment/sharedSchemas.js"; export { PERF_CONFIG_RANGES }; /** * Schema for performance configuration fields. * All fields are optional since partial configs are merged with defaults. * * Validation ranges are defined in PERF_CONFIG_RANGES (sharedSchemas.ts). */ export declare const PerformanceConfigSchema: z.ZodObject<{ /** * Interval in milliseconds between progress batch flushes. */ batchFlushIntervalMs: z.ZodOptional; /** * Batch size for functionality assessment progress events. */ functionalityBatchSize: z.ZodOptional; /** * Batch size for security assessment progress events. */ securityBatchSize: z.ZodOptional; /** * Timeout for individual test scenario execution in milliseconds. */ testTimeoutMs: z.ZodOptional; /** * Timeout for individual security payload tests in milliseconds. */ securityTestTimeoutMs: z.ZodOptional; /** * Warning threshold for queue depth monitoring. */ queueWarningThreshold: z.ZodOptional; /** * Maximum EventEmitter listeners to prevent Node.js warnings. */ eventEmitterMaxListeners: z.ZodOptional; /** * Maximum retry attempts for transient errors in security tests. * Issue #157: Connection retry logic for reliability */ securityRetryMaxAttempts: z.ZodOptional; /** * Initial backoff delay in milliseconds for security test retries. * Issue #157: Connection retry logic for reliability */ securityRetryBackoffMs: z.ZodOptional; }, "strip", z.ZodTypeAny, { batchFlushIntervalMs?: number; functionalityBatchSize?: number; securityBatchSize?: number; testTimeoutMs?: number; securityTestTimeoutMs?: number; queueWarningThreshold?: number; eventEmitterMaxListeners?: number; securityRetryMaxAttempts?: number; securityRetryBackoffMs?: number; }, { batchFlushIntervalMs?: number; functionalityBatchSize?: number; securityBatchSize?: number; testTimeoutMs?: number; securityTestTimeoutMs?: number; queueWarningThreshold?: number; eventEmitterMaxListeners?: number; securityRetryMaxAttempts?: number; securityRetryBackoffMs?: number; }>; /** * Type inferred from the schema. * Equivalent to Partial from performanceConfig.ts */ export type PartialPerformanceConfig = z.infer; /** * Validate a partial performance config using Zod. * Drop-in replacement for the manual validatePerformanceConfig() function. * * @param config - Partial config to validate * @returns Array of validation error messages (empty if valid) */ export declare function validatePerformanceConfigWithZod(config: unknown): string[]; /** * Parse and validate a performance config, returning the validated data. * Throws ZodError if validation fails. * * @param config - Config to parse and validate * @returns Validated partial config * @throws ZodError if validation fails */ export declare function parsePerformanceConfig(config: unknown): PartialPerformanceConfig; /** * Safely parse a performance config without throwing. * * @param config - Config to parse and validate * @returns SafeParseResult with success status and data/error */ export declare function safeParsePerformanceConfig(config: unknown): z.SafeParseReturnType<{ batchFlushIntervalMs?: number; functionalityBatchSize?: number; securityBatchSize?: number; testTimeoutMs?: number; securityTestTimeoutMs?: number; queueWarningThreshold?: number; eventEmitterMaxListeners?: number; securityRetryMaxAttempts?: number; securityRetryBackoffMs?: number; }, { batchFlushIntervalMs?: number; functionalityBatchSize?: number; securityBatchSize?: number; testTimeoutMs?: number; securityTestTimeoutMs?: number; queueWarningThreshold?: number; eventEmitterMaxListeners?: number; securityRetryMaxAttempts?: number; securityRetryBackoffMs?: number; }>; //# sourceMappingURL=performanceConfigSchemas.d.ts.map