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 hook makes. */ signal?: AbortSignal; } export interface UseFilesResult extends FilesClient { /** `true` while any `upload()` started by this hook is in flight. */ isUploading: boolean; /** Per-file live state of the most recent upload. */ uploads: readonly FileUploadState[]; /** Aggregate progress across in-flight uploads. */ progress: AggregateProgress; /** The last error from any verb. */ error: FilesError | undefined; /** Clear the ambient error + upload state (and re-arm after an `abort`). */ reset(): void; /** Abort every in-flight call this hook started. */ abort(reason?: unknown): void; } export declare const useFiles: (opts?: UseFilesOptions) => UseFilesResult; //# sourceMappingURL=use-files.d.ts.map