import type { Ref } from "vue"; import type { AggregateProgress, FileUploadState, FilesClient, FilesClientConfig } from "../client/index.js"; import { FilesError } from "../internal/errors.js"; export interface UseFilesOptions extends FilesClientConfig { /** External signal merged into every call this composable makes. */ signal?: AbortSignal; } /** `TData`: what the gateway's `onUploadComplete` returns — see `InferUploadData`. */ export interface UseFilesReturn extends FilesClient { /** `true` while any `upload()` started here is in flight. */ isUploading: Ref; /** * One entry per file uploaded through this composable — accumulated across * every `upload()` call (keyless, keyed, and each item of a bulk * `upload([...])`, concurrent or sequential) until `reset()` clears the * finished ones. An entry keeps its position for the file's whole upload and * is replaced by a fresh snapshot on each change; its `status` always ends * `"success"`, `"error"` (with `error` set), or `"aborted"`. */ uploads: Ref[]>; /** Aggregate progress over the current `uploads` entries. */ progress: Ref; /** The last error from any verb (including errors thrown while iterating `listAll`/`search`). */ error: Ref; /** * Clear the ambient error and the finished `uploads` entries (in-flight ones * stay, as does `isUploading`), and re-arm after an `abort`. */ reset: () => void; /** Abort every in-flight call started here; `cause` becomes the abort reason. */ abort: (cause?: unknown) => void; } export declare const useFiles: (opts?: UseFilesOptions) => UseFilesReturn; //# sourceMappingURL=use-files.d.ts.map