Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
tomrf1 committed Jan 7, 2025
1 parent d6e8de0 commit c70ae42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/create-reminder-signup/lambda/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ const reminderStageSchema = z.union([
export type ReminderStage = 'PRE' | 'POST' | 'WINBACK';

export const baseSignupRequestSchema = z.object({
// Identity’s guest creation endpoint errors if the provided email address is more than 100 characters long
email: z
.string()
// Identity’s guest creation endpoint errors if the provided email address is more than 100 characters long
.max(100)
// The API gateway -> SQS integration encodes + as a space in the email string
.transform((email) => email.replace(' ', '+'))
.pipe(z.string().max(100).email()),
.pipe(z.string().email()),
country: z.string().optional(),
reminderCreatedAt: z.string().datetime().optional(),
reminderPlatform: reminderPlatformSchema,
Expand Down

0 comments on commit c70ae42

Please sign in to comment.