/**
 * CSV Format Handler
 *
 * Handles CSV serialization/deserialization with streaming support
 */
import { EventEmitter } from "node:events";
import type { IFormatHandler, SupportedFormat, ValidationResult } from "../../types/porter-types";
export interface CSVOptions {
    delimiter?: string;
    quote?: string;
    escape?: string;
    lineEnd?: string;
    header?: boolean;
    skipEmptyLines?: boolean;
    trim?: boolean;
    columns?: string[];
    maxFieldSize?: number;
    maxRecords?: number;
}
export declare class CSVFormatHandler extends EventEmitter implements IFormatHandler {
    readonly format: SupportedFormat;
    readonly supportedOperations: ("read" | "write" | "stream")[];
    private readonly defaultOptions;
    /**
     * Validate CSV data
     */
    validate(data: unknown, schema?: unknown): Promise<ValidationResult>;
    /**
     * Serialize array of objects to CSV
     */
    serialize(data: unknown[], options?: CSVOptions): Promise<string>;
    /**
     * Deserialize CSV string to array of objects
     */
    deserialize(data: string, options?: CSVOptions): Promise<Array<Record<string, unknown>>>;
    /**
     * Stream serialize array of objects to CSV
     */
    streamSerialize(data: AsyncIterable<Record<string, unknown>>, options?: CSVOptions): AsyncIterable<Buffer>;
    /**
     * Stream deserialize CSV to objects
     */
    streamDeserialize(data: AsyncIterable<Buffer>, options?: CSVOptions): AsyncIterable<Record<string, unknown>>;
    /**
     * Parse CSV string into records
     */
    private parseCSVString;
    /**
     * Parse single CSV line into fields
     */
    private parseLine;
    /**
     * Serialize record to CSV line
     */
    private serializeRecord;
    /**
     * Get format-specific health status
     */
    getHealthStatus(): {
        status: "healthy" | "degraded" | "unhealthy";
        details: unknown;
    };
}
