mirror of
https://github.com/documenso/documenso.git
synced 2025-11-26 06:32:08 +10:00
21 lines
670 B
TypeScript
21 lines
670 B
TypeScript
import { z } from 'zod';
|
|
|
|
import { ZBaseEmbedDataSchema } from '../../base-schema';
|
|
|
|
export const ZDirectTemplateEmbedDataSchema = ZBaseEmbedDataSchema.extend({
|
|
email: z
|
|
.union([z.literal(''), z.string().email()])
|
|
.optional()
|
|
.transform((value) => value || undefined),
|
|
lockEmail: z.boolean().optional().default(false),
|
|
name: z
|
|
.string()
|
|
.optional()
|
|
.transform((value) => value || undefined),
|
|
lockName: z.boolean().optional().default(false),
|
|
});
|
|
|
|
export type TDirectTemplateEmbedDataSchema = z.infer<typeof ZDirectTemplateEmbedDataSchema>;
|
|
|
|
export type TDirectTemplateEmbedDataInputSchema = z.input<typeof ZDirectTemplateEmbedDataSchema>;
|