Record the request on the transaction's metadata (approvalRequestId, the
requester as creator, never the approver whose click ran execution), write
the request's note and attach its files. Safe to retry after a crash: the
metadata upserts and a file already attached is returned, not duplicated.
The files keep their request-owned keys (no second copy), which
TransactionMetadataFileService.get serves as it does any transaction
file. A failure throws so execution retries.
created lists the files this call added, for the caller's activity rows.
Copy the cached files out of staging to request-owned keys and return the
value for the request's metadata. Call before the insert, outside any
database transaction, with the apreq_ id the row will get.
Moves a payment's note and attachments onto an approval request when it is created, and from the request onto the transaction when it executes. Promoted files stay when a request ends DECLINED or CANCELLED: Make again may reuse them.