refactor(SW-556): added a few missing pieces like translations and properties.

removed unneeded changes
This commit is contained in:
Christian Andolf
2024-10-22 12:29:32 +02:00
parent e6db1b17c6
commit b6cb3855c2
11 changed files with 37 additions and 40 deletions

View File

@@ -11,7 +11,15 @@ const Coupon = z.object({
}),
name: z.string().optional(),
claimedAt: z.string().datetime({ offset: true }).optional(),
// redeemedAt: z.string().datetime({ offset: true }).optional(),
redeemedAt: z
.date({ coerce: true })
.optional()
.transform((value) => {
if (value?.getFullYear() === 1) {
return null
}
return value
}),
type: z.string().optional(),
value: z.number().optional(),
pool: z.string().optional(),