Implement email change

This commit is contained in:
adilallo
2026-04-26 07:47:25 -06:00
parent 68517796a9
commit 0ce05372bf
15 changed files with 1072 additions and 13 deletions
@@ -0,0 +1,15 @@
import { z } from "zod";
/** POST `/api/user/email-change/request` body (CR-103). */
export const emailChangeRequestBodySchema = z.object({
newEmail: z
.string()
.trim()
.min(1, "Email is required")
.transform((s) => s.toLowerCase())
.pipe(z.string().email({ message: "Valid email required" })),
});
export type EmailChangeRequestBody = z.infer<
typeof emailChangeRequestBodySchema
>;