import { IMultipartBody, IBlobMeta, IFileMeta } from '../../lib/transformers/PayloadSerializer.js';
export interface FormDataResult {
    /**
     * The contents of the form data
     */
    buffer: Buffer;
    /**
     * Content type for the form data.
     */
    type: string;
}
interface IPart {
    name: string;
    type: 'file' | 'string';
    meta?: IBlobMeta | IFileMeta;
    contents: Buffer;
}
/**
 * In API Client (old old version of ARC) multipart data is encoded
 * as serializable array of buffer views. This class transforms these data
 * into a valid form data contents as a Buffer and generates content type header with the proper boundary.
 */
export declare class FormDataNode {
    protected _boundary?: string;
    protected _parts: IPart[];
    get boundary(): string;
    protected _generateBoundary(): string;
    /**
     *
     * @param parts The serialized FormData body
     * @returns
     */
    getBody(parts: IMultipartBody[]): FormDataResult;
    /**
     * @returns The value of the content type header with the generate boundary.
     */
    getContentType(): string;
    protected _append(part: IMultipartBody): void;
    protected _appendLegacy(part: IMultipartBody): void;
    protected _readDataUrlMime(dataUrl: string): string | undefined;
    protected _generate(): Buffer;
    protected _getHeader(part: IPart): Buffer;
    protected _getFooter(): Buffer;
}
/**
 * Processes the form data.
 */
export default function (parts: IMultipartBody[]): FormDataResult;
export {};
//# sourceMappingURL=FormData.d.ts.map