import type { Logger } from '@budarin/pluggable-serviceworker'; import type { FolderName, Pathname } from '../types.js'; export declare const OPFS_ERROR_FOLDER_NOT_REGISTERED = "OPFS_FOLDER_NOT_REGISTERED"; export declare const OPFS_ERROR_SERVICE_WORKER_UNAVAILABLE = "OPFS_SERVICE_WORKER_UNAVAILABLE"; export declare function getBackgroundFetchFilter(): Promise<{ include?: string[]; exclude?: string[]; }>; export declare function getRegisteredFolders(): Promise; export declare function filterAssetsForOpfs(assets: Pathname[], include?: string[], exclude?: string[]): Pathname[]; export interface DownloadAssetsToOpfsResult { registrationId: string; assets?: Pathname[]; written?: Pathname[]; failedOrSkipped?: Pathname[]; filteredOut?: Pathname[]; } export interface DownloadAssetsToOpfsRejected { registrationId: string; reason: 'fail' | 'abort'; } export type StartDownloadError = (Error & { code?: string; }) | DownloadAssetsToOpfsRejected; export interface StartDownloadAssetsToOpfsOptions { folderName: FolderName; assets: Pathname[]; title?: string; icons?: { src: string; sizes?: string; type?: string; }[]; totalDownloadSizeInBytes?: number; onProgress?: (downloaded: number, total: number) => void; onFileWritten?: (loadedAssets: Pathname[], totalCount: number) => void; signal?: AbortSignal; logger?: Logger; } export declare function startDownloadAssetsToOpfs(options: StartDownloadAssetsToOpfsOptions): Promise; export declare function estimateAssetsSizeInBytes(assets: Pathname[]): Promise<{ totalSize: number; sizes: Record; }>;