import { ValidationResult, ValidationCheck, ValidationOptions, ValidationConfig } from './validationTypes'; /** * Base class for all format validators * Provides the check-based validation system */ export declare abstract class BaseValidator { protected _errors: number; protected _warnings: number; protected _checks: ValidationCheck[]; protected _sub_checks: ValidationResult[]; protected _blocked: boolean; protected _options: ValidationConfig; constructor(options?: ValidationOptions); /** * Reset validator state */ protected reset(): void; /** * Add a validation check that will be executed * @param type - Category of the check * @param description - Human-readable description * @param checkFn - Async function that performs the check */ protected add_check(type: string, description: string, checkFn: () => Promise): Promise; /** * Add a synchronous validation check */ protected add_check_sync(type: string, description: string, checkFn: () => void): void; /** * Throw a validation error * @param message - Error message * @param blocker - If true, stop further validation */ protected err(message: string, blocker?: boolean): never; /** * Add a warning to the last check * @param message - Warning message */ protected warn(message: string): void; /** * Get the current error count */ get errors(): number; /** * Get the current warning count */ get warnings(): number; /** * Get all checks performed so far */ get checks(): ValidationCheck[]; /** * Get sub-validation results */ get sub_checks(): ValidationResult[]; /** * Check if validation has been blocked */ get isBlocked(): boolean; /** * Build the final validation result */ protected buildResult(filename: string, filesize: number, format: string): ValidationResult; /** * Abstract method - each validator must implement this * @param content - The content to validate (can be string, buffer, object, etc.) * @param filename - Name of the file being validated * @param filesize - Size of the file in bytes */ abstract validate(content: any, filename: string, filesize: number): Promise; /** * Static helper to validate from file path * Must be implemented by subclasses if they support file-based validation */ static validateFile(_filePath: string): Promise; /** * Static helper to identify if content is this validator's format */ static identifyFormat(_content: any, _filename: string): Promise; }