import type { NativeFileRef } from "./types.js"; export type SendBody = Blob | Uint8Array | NativeFileRef; export interface SendRequest { url: string; method: "PUT" | "POST"; headers?: Record; /** Presigned-POST form fields, appended in order before the file. */ fields?: Record; /** * `Uint8Array` appears only on runtimes whose `Blob` cannot wrap raw bytes * (React Native); both XHR and fetch accept it as a request body directly. * A `NativeFileRef` appears only on the presigned-POST path in React * Native, whose `FormData` streams the descriptor from disk. */ body: SendBody | null; signal?: AbortSignal; onProgress?: (loaded: number, total: number) => void; } export interface SendResult { status: number; text: string; } export type Transport = (req: SendRequest) => Promise; export declare const xhrTransport: Transport; export declare const fetchTransport: (fetchImpl: typeof fetch) => Transport; /** Default transport: XHR when available (real progress), else fetch. */ export declare const defaultTransport: (fetchImpl: typeof fetch) => Transport; //# sourceMappingURL=transport.d.ts.map