import { Attachment, AttachmentStore } from '../interfaces/attachment-store.interface'; import { IncomingFile, StoredObject } from '../interfaces/file.interface'; import { StorageService } from '../storage/storage.service'; import { FileValidatorService } from '../validation/file-validator.service'; /** Validate → store a single server-side file, returning a resolved StoredObject. */ export declare function processDirectUpload(file: IncomingFile, storage: StorageService, validator: FileValidatorService, opts?: { category?: string; }): Promise; export interface LinkedUploadArgs { files: IncomingFile[]; storage: StorageService; validator: FileValidatorService; store: AttachmentStore; module?: string; createdBy?: string; replaceAttachmentIds?: string[]; runHandler: () => Promise; recordIdFrom: (result: any) => string | undefined; } /** * Flow-B linked upload with correct ordering: * validate (fail-fast) → upload → run handler → link → (on any failure) compensate by * deleting uploaded blobs. Guarantees no orphan blob; if the handler creates a record and * linking then fails, the blob is still cleaned up. */ export declare function runLinkedUpload(args: LinkedUploadArgs): Promise<{ result: any; attachments: Attachment[]; }>;