mirror of
https://github.com/documenso/documenso.git
synced 2025-11-24 05:32:12 +10:00
Compare commits
2 Commits
main
...
fix/add-ov
| Author | SHA1 | Date | |
|---|---|---|---|
| d7f0e2eec2 | |||
| f071a16682 |
@ -457,8 +457,10 @@ export const templateRouter = router({
|
|||||||
recipients,
|
recipients,
|
||||||
distributeDocument,
|
distributeDocument,
|
||||||
customDocumentDataId,
|
customDocumentDataId,
|
||||||
prefillFields,
|
|
||||||
folderId,
|
folderId,
|
||||||
|
prefillFields,
|
||||||
|
override,
|
||||||
|
attachments,
|
||||||
} = input;
|
} = input;
|
||||||
|
|
||||||
ctx.logger.info({
|
ctx.logger.info({
|
||||||
@ -495,6 +497,8 @@ export const templateRouter = router({
|
|||||||
requestMetadata: ctx.metadata,
|
requestMetadata: ctx.metadata,
|
||||||
folderId,
|
folderId,
|
||||||
prefillFields,
|
prefillFields,
|
||||||
|
override,
|
||||||
|
attachments,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (distributeDocument) {
|
if (distributeDocument) {
|
||||||
|
|||||||
@ -133,12 +133,42 @@ export const ZCreateDocumentFromTemplateRequestSchema = z.object({
|
|||||||
'The ID of the folder to create the document in. If not provided, the document will be created in the root folder.',
|
'The ID of the folder to create the document in. If not provided, the document will be created in the root folder.',
|
||||||
)
|
)
|
||||||
.optional(),
|
.optional(),
|
||||||
|
|
||||||
prefillFields: z
|
prefillFields: z
|
||||||
.array(ZFieldMetaPrefillFieldsSchema)
|
.array(ZFieldMetaPrefillFieldsSchema)
|
||||||
.describe(
|
.describe(
|
||||||
'The fields to prefill on the document before sending it out. Useful when you want to create a document from an existing template and pre-fill the fields with specific values.',
|
'The fields to prefill on the document before sending it out. Useful when you want to create a document from an existing template and pre-fill the fields with specific values.',
|
||||||
)
|
)
|
||||||
.optional(),
|
.optional(),
|
||||||
|
|
||||||
|
override: z
|
||||||
|
.object({
|
||||||
|
title: z.string().min(1).max(255).optional(),
|
||||||
|
subject: ZDocumentMetaSubjectSchema.optional(),
|
||||||
|
message: ZDocumentMetaMessageSchema.optional(),
|
||||||
|
timezone: ZDocumentMetaTimezoneSchema.optional(),
|
||||||
|
dateFormat: ZDocumentMetaDateFormatSchema.optional(),
|
||||||
|
redirectUrl: ZDocumentMetaRedirectUrlSchema.optional(),
|
||||||
|
distributionMethod: ZDocumentMetaDistributionMethodSchema.optional(),
|
||||||
|
emailSettings: ZDocumentEmailSettingsSchema.optional(),
|
||||||
|
language: ZDocumentMetaLanguageSchema.optional(),
|
||||||
|
typedSignatureEnabled: ZDocumentMetaTypedSignatureEnabledSchema.optional(),
|
||||||
|
uploadSignatureEnabled: ZDocumentMetaUploadSignatureEnabledSchema.optional(),
|
||||||
|
drawSignatureEnabled: ZDocumentMetaDrawSignatureEnabledSchema.optional(),
|
||||||
|
allowDictateNextSigner: z.boolean().optional(),
|
||||||
|
})
|
||||||
|
.describe('Override values from the template for the created document.')
|
||||||
|
.optional(),
|
||||||
|
|
||||||
|
attachments: z
|
||||||
|
.array(
|
||||||
|
z.object({
|
||||||
|
label: z.string().min(1, 'Label is required'),
|
||||||
|
data: z.string().url('Must be a valid URL'),
|
||||||
|
type: ZEnvelopeAttachmentTypeSchema.optional().default('link'),
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const ZCreateDocumentFromTemplateResponseSchema = ZDocumentSchema;
|
export const ZCreateDocumentFromTemplateResponseSchema = ZDocumentSchema;
|
||||||
|
|||||||
Reference in New Issue
Block a user