feat: allow switching document when using templates (#1571)

Adds the ability to upload a custom document when using a template.

This is useful when you have a given fixed template with placeholder
values that you want to decorate with Documenso fields but will then
create a final specialised document when sending it out to a given
recipient.
This commit is contained in:
Lucas Smith
2025-01-07 16:13:35 +11:00
committed by GitHub
parent 18ca0cf3d6
commit 4fab98c633
5 changed files with 528 additions and 87 deletions

View File

@ -47,6 +47,7 @@ export const ZCreateDocumentFromTemplateMutationSchema = z.object({
return new Set(emails).size === emails.length;
}, 'Recipients must have unique emails'),
distributeDocument: z.boolean().optional(),
customDocumentDataId: z.string().optional(),
});
export const ZDuplicateTemplateMutationSchema = z.object({