fix(DELIGHT-11001): do not require address key in user profile

This commit is contained in:
Michael Zetterberg
2024-12-09 15:13:30 +01:00
parent 886be166ef
commit 594a279186
3 changed files with 19 additions and 16 deletions

View File

@@ -22,13 +22,16 @@ export const getUserSchema = z
.object({
data: z.object({
attributes: z.object({
address: z.object({
city: z.string().optional(),
country: z.string().optional(),
countryCode: z.nativeEnum(countriesMap).optional(),
streetAddress: z.string().optional(),
zipCode: z.string().optional(),
}),
address: z
.object({
city: z.string().optional(),
country: z.string().optional(),
countryCode: z.nativeEnum(countriesMap).optional(),
streetAddress: z.string().optional(),
zipCode: z.string().optional(),
})
.optional()
.nullable(),
dateOfBirth: z.string().optional().default("1900-01-01"),
email: z.string().email(),
firstName: z.string(),