import { OutgoingHttpHeaders } from 'http'; import { Readable } from 'stream'; import { HeadersInput } from './utils'; export type MultipartPrimitive = string | number | boolean; export type MultipartPartBody = MultipartPrimitive | Buffer | Uint8Array | Readable; export type MultipartFieldValue = MultipartPartBody | MultipartFile; export type MultipartFields = Record; export interface MultipartPart { name: string; value: MultipartPartBody; filename?: string; contentType?: string; headers?: HeadersInput; } export interface MultipartFile { value: MultipartPartBody; filename: string; contentType?: string; headers?: HeadersInput; } export interface MultipartOptions { boundary?: string; } export declare class MultipartBody { readonly boundary: string; readonly headers: OutgoingHttpHeaders; private readonly parts; constructor(parts: MultipartPart[] | MultipartFields, options?: MultipartOptions); get replayable(): boolean; get contentLength(): number | undefined; stream(): Readable; toBuffer(): Promise; private iterate; } export declare function multipart(parts: MultipartPart[] | MultipartFields, options?: MultipartOptions): MultipartBody; export declare function file(value: MultipartPartBody, filename: string, contentType?: string, headers?: HeadersInput): MultipartFile;