import { a as LITTERBOX_DURATIONS, o as LITTERBOX_FILENAME_LENGTHS } from "./constants.mjs"; //#region src/lib/litterbox.d.ts /** * Litterbox file duration after which the file is deleted. */ type LitterboxDuration = (typeof LITTERBOX_DURATIONS)[number]; /** * Litterbox filename length to be used in the file URL. */ type LitterboxFilenameLength = (typeof LITTERBOX_FILENAME_LENGTHS)[number]; /** * Uploads a temporary file to Litterbox from a `File`. * * To override default `duration` from `"1h"` supply it in `options`. * * To override default `filenameLength` from `6` supply it in `options`. * * Use `signal` for timeout/retries logic. * * @example * const file = new File(["content"], "file.txt", { type: "text/plain" }); * const controller = new AbortController(); * setTimeout(() => controller.abort(), 5000); * * const result = await uploadFile(file, { * duration: "1h", * filenameLength: 6, * signal: controller.signal, * }); * * @param file `File` to upload. * @param options Options with `duration`, `filenameLength`, `signal`. * * @returns Litterbox file URL. * @throws For invalid inputs or upload failures and error responses. */ declare const uploadFile: (file: File, options?: { duration?: LitterboxDuration; filenameLength?: LitterboxFilenameLength; signal?: AbortSignal; }) => Promise; //#endregion export { LitterboxDuration, LitterboxFilenameLength, uploadFile };