01 · Before and afterThe pattern
Translate at the API boundary, field by field, so a renamed field can't silently fall through.
// before: public shape handed to the service as-is; service ignores keys it doesn't know
await updateFields({ fields: input.fields });
// after: explicit mapping, so a missing name is a type error, not a silent no-op
await updateFields({
fields: input.fields.map((f) => ({ id: f.id, pageNumber: f.page, pageX: f.positionX, pageY: f.positionY })),
});02 · Run it on your appThe check
For each update endpoint, does a test read the record back and assert the new value, not just a 200 response?
If the honest answer is no or not sure, this is worth a look before it reaches production.