import { IncomingFile, PresignedUpload, StoredObject } from './file.interface'; export interface ExistsResult { exists: boolean; size?: number; contentType?: string; } /** * The pluggability core. Every storage backend (Azure Blob, S3, local disk, or a * user-supplied class) implements this contract; the rest of the pipeline is agnostic. */ export interface StorageAdapter { readonly name: string; upload(file: IncomingFile, key: string, meta?: Record): Promise; download(key: string): Promise; delete(key: string): Promise; exists(key: string): Promise; /** Presigned PUT URL for client-direct upload. */ getSignedUploadUrl(key: string, opts: { expiresIn: number; contentType?: string; }): Promise; /** Presigned/SAS GET URL for reads under urlMode:'signed'. */ getSignedDownloadUrl(key: string, opts: { expiresIn: number; }): Promise; copy(srcKey: string, destKey: string): Promise; /** Permanent public URL (used under urlMode:'public'). */ publicUrl(key: string): string; /** Read the first bytes of an object — used to magic-sniff a presigned upload at confirm time. */ readRange(key: string, start: number, end: number): Promise; }