import type { Files, UrlOptions } from "../../index.js"; import type { ResultModel } from "../router-core/web.js"; import type { Scope } from "./authorize.js"; export interface DownloadConfig { files: Files; downloadMode: "auto" | "redirect" | "proxy"; onUnsupportedRange: "reject" | "ignore"; forceDisposition: boolean; defaultExpiresIn: number; } /** The byte-range request headers the proxy path honours. */ export interface RangeRequest { range: string | null; ifRange: string | null; } /** A download request: its range headers, and whether it's a `HEAD`. */ export interface DownloadRequest extends RangeRequest { /** A `HEAD`: answer with the `GET`'s headers and no body. */ head: boolean; } /** * `files.url()` carrying `disposition`. When the adapter refuses to bind any * disposition into its URLs (see `isDispositionUnsupported`) and the * disposition is `authorize`'s inline policy, the URL is minted without one; * any other refusal — the gateway's own `attachment` default — is rethrown, * because the gateway can't guarantee that disposition. */ export declare const urlWithDisposition: (files: Files, key: string, opts: UrlOptions, disposition: string | undefined, policy: string | undefined) => Promise; export declare const handleDownload: (cfg: DownloadConfig, storageKey: string, unscopedKey: string, request: DownloadRequest, scope: Scope, signal: AbortSignal) => Promise; //# sourceMappingURL=download.d.ts.map