import { IncomingFile, StoredObject } from '../interfaces/file.interface'; import { StorageAdapter } from '../interfaces/storage-adapter.interface'; import { StorageConfig, UploadOptions, UrlMode } from '../interfaces/upload-options.interface'; export declare function createStorageAdapter(config: StorageConfig): StorageAdapter; /** Facade over the active adapter: uploads, key/staging helpers, and urlMode-aware URL resolution. */ export declare class StorageService { readonly options: UploadOptions; readonly adapter: StorageAdapter; readonly urlMode: UrlMode; readonly stagingPrefix: string; readonly expiresIn: number; private readonly keyStrategy; constructor(options: UploadOptions); buildKey(input: { originalName: string; mime: string; category?: string; }): string; stagingKey(key: string): string; isStaged(key: string): boolean; permanentKey(key: string): string; upload(file: IncomingFile, key: string, meta?: Record): Promise; delete(key: string): Promise; copy(src: string, dest: string): Promise; exists(key: string): Promise; resolveDownloadUrl(key: string): Promise; /** * Stamp a fresh `.url` next to every `.key` found at `path` (e.g. after an aggregation * `$lookup`). Mutates and returns `docs`. Works on a single object or an array. */ resolveDownloadUrls(docs: any, opts: { path: string; expiresIn?: number; }): Promise; }