/**
 * CSV Streaming Support - Cross-Platform
 *
 * Provides true streaming CSV parsing and formatting using our cross-platform stream module.
 * Works identically in both Node.js and Browser environments.
 */
import { Transform } from "@stream";
import type { IReadable } from "@stream/types";
import type { CsvParseOptions, CsvFormatOptions, RowTransformFunction, RowValidateFunction, Row } from "@csv/csv-core";
/**
 * Transform stream that parses CSV data row by row
 *
 * @example
 * ```ts
 * const parser = new CsvParserStream({ headers: true });
 * readable.pipe(parser).on('data', (row) => console.log(row));
 * ```
 */
export declare class CsvParserStream extends Transform {
    private options;
    private buffer;
    private currentRow;
    private currentField;
    private currentFieldParts;
    private currentFieldLength;
    private inQuotes;
    private lineNumber;
    private rowCount;
    private skippedDataRows;
    private headerRow;
    private headersEmitted;
    private delimiter;
    private quote;
    private escape;
    private quoteEnabled;
    private trimField;
    private decoder;
    private _rowTransform;
    private _rowValidator;
    constructor(options?: CsvParseOptions);
    /**
     * Set a transform function to modify rows before emitting
     * Supports both sync and async transforms
     */
    transform<I extends Row = Row, O extends Row = Row>(transformFunction: RowTransformFunction<I, O>): this;
    /**
     * Set a validate function to filter rows
     * Invalid rows emit 'data-invalid' event
     */
    validate<T extends Row = Row>(validateFunction: RowValidateFunction<T>): this;
    _transform(chunk: Uint8Array | string, _encoding: string, callback: (error?: Error | null, data?: Row) => void): void;
    _flush(callback: (error?: Error | null) => void): void;
    private flushCurrentRow;
    private appendToField;
    private takeCurrentField;
    private processBuffer;
    private buildRow;
    private processPendingRows;
    private transformAndValidateRow;
    private validateRow;
    private emitRow;
}
/**
 * Options for CSV formatter stream
 */
export interface CsvFormatterStreamOptions extends CsvFormatOptions {
    /** Whether input is objects (vs arrays) */
    objectMode?: boolean;
}
/**
 * Transform stream that formats rows to CSV
 *
 * @example
 * ```ts
 * const formatter = new CsvFormatterStream({ headers: ['name', 'age'] });
 * formatter.pipe(writable);
 * formatter.write(['Alice', 30]);
 * formatter.write(['Bob', 25]);
 * formatter.end();
 * ```
 */
export declare class CsvFormatterStream extends Transform {
    private options;
    private delimiter;
    private quote;
    private escape;
    private rowDelimiter;
    private quoteEnabled;
    private alwaysQuote;
    private decimalSeparator;
    private headerWritten;
    private headers;
    private shouldWriteHeaders;
    private rowCount;
    private _rowTransform;
    private escapeQuoteRegex;
    private escapedQuote;
    constructor(options?: CsvFormatterStreamOptions);
    /**
     * Set a transform function to modify rows before formatting
     */
    transform<I extends Row = Row, O extends Row = Row>(transformFunction: RowTransformFunction<I, O>): this;
    _transform(chunk: Row, _encoding: string, callback: (error?: Error | null, data?: string) => void): void;
    _flush(callback: (error?: Error | null) => void): void;
    private formatAndPush;
    private formatRow;
    private shouldQuoteField;
    private formatField;
}
/**
 * Create a readable stream from an array of rows
 */
export declare function createCsvReadableStream(rows: unknown[][], options?: CsvFormatOptions): IReadable<any>;
/**
 * Create parser stream factory
 */
export declare function createCsvParserStream(options?: CsvParseOptions): CsvParserStream;
/**
 * Create formatter stream factory
 */
export declare function createCsvFormatterStream(options?: CsvFormatterStreamOptions): CsvFormatterStream;
