fix: additional backwards compat

This commit is contained in:
David Nguyen
2025-10-14 15:19:09 +11:00
parent bddaa5ec66
commit 0eef4cd7e6
32 changed files with 288 additions and 92 deletions

View File

@ -39,7 +39,16 @@ export const createEmbeddingDocumentRoute = procedure
type: EnvelopeType.DOCUMENT,
title,
externalId,
recipients,
recipients: (recipients || []).map((recipient) => ({
...recipient,
fields: (recipient.fields || []).map((field) => ({
...field,
page: field.pageNumber,
positionX: field.pageX,
positionY: field.pageY,
documentDataId,
})),
})),
envelopeItems: [
{
documentDataId,

View File

@ -42,7 +42,13 @@ export const getMultiSignDocumentRoute = procedure
// Transform fields to match our schema
const transformedFields = fields.map((field) => ({
...field,
recipient,
recipient: {
...recipient,
documentId: document.id,
templateId: null,
},
documentId: document.id,
templateId: null,
}));
return {