export interface MediaUploadResult { /** Durable public URL (extension preserved). */ url: string; mediaId?: number; mediaKind?: string; format?: string; mimeType?: string; sizeBytes?: number; /** Best-effort; returned by GB for mp4/mov/m4a/wav. */ durationSeconds?: number; width?: number; height?: number; } export interface MediaHostOptions { /** GO_BANANAS_API_KEY (defaults to the env var). */ apiKey?: string; /** Base URL (defaults to GO_BANANAS_API_URL or gobananasai.com). */ apiUrl?: string; /** Injected fetch (tests). */ fetchImpl?: typeof fetch; } export declare class MediaHostError extends Error { readonly code: string; constructor(code: string, message: string); } /** * Upload a local media file to Go Bananas and return its durable public URL. * Throws `MediaHostError` when the key is missing or the upload fails (e.g. the * endpoint is not deployed yet). Prefer `tryUploadMediaToGoBananas` for graceful, * fall-back-to-local behavior. */ export declare function uploadMediaToGoBananas(filePath: string, options?: MediaHostOptions): Promise; /** * Graceful variant: returns the upload result, or `null` if hosting is unavailable * (no key, endpoint not deployed, network error). The `onWarn` callback receives a * one-line reason so the caller can surface it without failing the operation. */ export declare function tryUploadMediaToGoBananas(filePath: string, options?: MediaHostOptions & { onWarn?: (message: string) => void; }): Promise; //# sourceMappingURL=media-host.d.ts.map