fix: persist formValues in document creation endpoints (#2419)

This commit is contained in:
Lucas Smith 2026-01-27 16:21:09 +11:00 committed by GitHub
parent 9c6ee88cc4
commit 65e30b88be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 0 deletions

View file

@ -796,6 +796,7 @@ export const ApiContractV1Implementation = tsr.router(ApiContractV1, {
title: body.title,
},
attachments: body.attachments,
formValues: body.formValues,
requestMetadata: metadata,
});

View file

@ -38,6 +38,7 @@ export const createDocumentTemporaryRoute = authenticatedProcedure
meta,
folderId,
attachments,
formValues,
} = input;
const { remaining } = await getServerLimits({ userId: user.id, teamId });
@ -68,6 +69,7 @@ export const createDocumentTemporaryRoute = authenticatedProcedure
title,
externalId,
visibility,
formValues,
globalAccessAuth,
globalActionAuth,
recipients: (recipients || []).map((recipient) => ({

View file

@ -27,6 +27,7 @@ import {
/**
* Temporariy endpoint for V2 Beta until we allow passthrough documents on create.
* @deprecated
*/
export const createDocumentTemporaryMeta: TrpcRouteMeta = {
openapi: {
@ -36,6 +37,7 @@ export const createDocumentTemporaryMeta: TrpcRouteMeta = {
description:
'You will need to upload the PDF to the provided URL returned. Note: Once V2 API is released, this will be removed since we will allow direct uploads, instead of using an upload URL.',
tags: ['Document'],
deprecated: true,
},
};

View file

@ -78,6 +78,7 @@ export const createDocumentRoute = authenticatedProcedure
visibility,
globalAccessAuth,
globalActionAuth,
formValues,
recipients: (recipients || []).map((recipient) => ({
...recipient,
fields: (recipient.fields || []).map((field) => ({