mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
feat: add controls for sending completion emails to document owners (#1534)
Adds a new `ownerDocumentCompleted` to the email settings that controls whether a document will be sent to the owner upon completion. This was previously the only email you couldn't disable and didn't account for users integrating with just the API and Webhooks. Also adds a flag to the public `sendDocument` endpoint which will adjust this setting while sendint the document for users who aren't using `emailSettings` on the `createDocument` endpoint.
This commit is contained in:
@ -88,8 +88,12 @@ export const ZSendDocumentForSigningMutationSchema = z
|
||||
description:
|
||||
'Whether to send an email to the recipients asking them to action the document. If you disable this, you will need to manually distribute the document to the recipients using the generated signing links.',
|
||||
}),
|
||||
sendCompletionEmails: z.boolean().optional().openapi({
|
||||
description:
|
||||
'Whether to send completion emails when the document is fully signed. This will override the document email settings.',
|
||||
}),
|
||||
})
|
||||
.or(z.literal('').transform(() => ({ sendEmail: true })));
|
||||
.or(z.literal('').transform(() => ({ sendEmail: true, sendCompletionEmails: undefined })));
|
||||
|
||||
export type TSendDocumentForSigningMutationSchema = typeof ZSendDocumentForSigningMutationSchema;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user