declare const MEDIA: unique symbol; /** anything `media.stream()` accepts — a web stream or any async chunk iterable. */ export type MediaStream = ReadableStream | AsyncIterable; export type MediaSource = { readonly [MEDIA]: true; } & ({ kind: "path"; path: string; } | { kind: "url"; url: string; } | { kind: "buffer"; buffer: Uint8Array; filename?: string; } | { kind: "stream"; stream: MediaStream; filename?: string; } | { kind: "text"; text: string; filename?: string; } | { kind: "fileId"; fileId: string; }); /** build a {@link MediaSource}. `media.path("./a.jpg")`, `media.url(...)`, etc. */ export declare const media: { path: (path: string) => MediaSource; url: (url: string) => MediaSource; buffer: (buffer: Uint8Array, filename?: string) => MediaSource; /** upload from a stream. buffered right before the request — multipart needs a sized body. */ stream: (stream: MediaStream, filename?: string) => MediaSource; /** upload a string as a text file (`media.text("hi", "notes.txt")`). */ text: (text: string, filename?: string) => MediaSource; fileId: (fileId: string) => MediaSource; }; export declare function isMediaSource(x: unknown): x is MediaSource; export {}; //# sourceMappingURL=media.d.ts.map