feat: add empty emails for envelopes (#2267)

This commit is contained in:
David Nguyen
2025-12-06 13:38:10 +11:00
committed by GitHub
parent f80aa4bf72
commit b51f562224
37 changed files with 1018 additions and 215 deletions
+5
View File
@@ -1,5 +1,6 @@
import type { Envelope } from '@prisma/client';
import { type Field, type Recipient, RecipientRole, SigningStatus } from '@prisma/client';
import { z } from 'zod';
import { NEXT_PUBLIC_WEBAPP_URL } from '../constants/app';
import { extractLegacyIds } from '../universal/id';
@@ -58,3 +59,7 @@ export const mapRecipientToLegacyRecipient = (
...legacyId,
};
};
export const isRecipientEmailValidForSending = (recipient: Pick<Recipient, 'email'>) => {
return z.string().email().safeParse(recipient.email).success;
};