import type { Proof } from '../entities/Proof.js'; export const buildProofUrl = (storedName: string | null) => storedName ? `/uploads/${storedName}` : null; export const serializeProof = (proof: Proof, _expenseId?: string) => ({ id: proof.id, type: proof.type, label: proof.label, note: proof.note, originalName: proof.originalName, mimeType: proof.mimeType, fileSize: proof.fileSize, fileUrl: buildProofUrl(proof.storedName), previewUrl: buildProofUrl(proof.storedName), createdAt: proof.createdAt });