import { IExecuteFunctions } from 'n8n-workflow';
interface JsonTextResult {
    text: string;
    warning?: string;
    metadata: Record<string, unknown>;
}
interface JsonSheetResult {
    sheets: Record<string, unknown>;
    warning?: string;
    metadata: Record<string, unknown>;
}
type JsonResult = JsonTextResult | JsonSheetResult;
interface ProcessingOptions {
    includeOriginalRowNumbers?: boolean;
    includeFileName?: boolean;
    includeSheetName?: boolean;
    outputSheetsAsSeparateItems?: boolean;
}
/**
 * Собирает структуру { sheets: { [name]: { fileName?, sheetName?, data } } }
 * из массива строк, где каждая строка — массив значений ячеек.
 * Ключи ячеек — буквы колонок (A, B, C...), как в остальном ноде.
 */
declare function buildSheetsFromRows(perSheetRows: Array<{
    sheetName: string;
    rows: unknown[][];
}>, options?: ProcessingOptions, fileName?: string): Record<string, unknown>;
/**
 * Основной парсер XLSX через ExcelJS (богатая модель ячеек).
 * Бросает исключение, если ExcelJS не смог разобрать книгу.
 */
declare function parseXlsxWithExcelJS(buf: Buffer, options?: ProcessingOptions, fileName?: string): Promise<Partial<JsonResult>>;
/**
 * Fallback-парсер XLSX через SheetJS (xlsx).
 * Самый толерантный парсер: разбирает файлы с namespace-префиксами
 * (`<x:workbook><x:sheet>`), Strict-OOXML и вывод не-Excel генераторов,
 * на которых ExcelJS падает с "reading 'sheets'", а read-excel-file — с "reading 'trim'".
 * Ленивая загрузка: сбой зависимости не должен ломать ЗАГРУЗКУ ноды.
 */
declare function parseXlsxWithSheetJS(buf: Buffer, options?: ProcessingOptions, fileName?: string): Promise<Partial<JsonResult>>;
/**
 * Custom n8n node: convert files to JSON/text
 * Supports DOCX, XML, YML, XLSX, CSV, PDF, TXT, PPTX, HTML
 */
declare class FileToJsonNode {
    description: {
        displayName: string;
        name: string;
        icon: string;
        group: string[];
        version: number;
        description: string;
        defaults: {
            name: string;
        };
        inputs: string[];
        outputs: string[];
        properties: ({
            displayName: string;
            name: string;
            type: string;
            default: string;
            description: string;
            typeOptions?: undefined;
            displayOptions?: undefined;
        } | {
            displayName: string;
            name: string;
            type: string;
            default: number;
            description: string;
            typeOptions: {
                minValue: number;
                maxValue: number;
            };
            displayOptions?: undefined;
        } | {
            displayName: string;
            name: string;
            type: string;
            default: boolean;
            description: string;
            displayOptions: {
                show: {};
            };
            typeOptions?: undefined;
        })[];
    };
    /**
     * Main execution method for n8n node
     */
    execute(this: IExecuteFunctions): Promise<unknown[]>;
}
declare const nodeClass: typeof FileToJsonNode;
export { nodeClass as FileToJsonNode };
export { parseXlsxWithExcelJS, parseXlsxWithSheetJS, buildSheetsFromRows };
