feat(LOY-23): redeem benefit modal

This commit is contained in:
Christian Andolf
2024-12-05 14:15:44 +01:00
parent af3c68e464
commit 7be90facd0
16 changed files with 484 additions and 24 deletions
+9 -1
View File
@@ -106,6 +106,10 @@ export const validateCmsRewardsSchema = z
reward_id: z.string(),
grouped_label: z.string().optional(),
description: z.string().optional(),
redeem_description: z
.string()
.nullable()
.transform((val) => val || ""),
grouped_description: z.string().optional(),
value: z.string().optional(),
})
@@ -121,7 +125,11 @@ export type SurpriseReward = z.output<typeof SurpriseReward>
export type CmsRewardsResponse = z.input<typeof validateCmsRewardsSchema>
export type Reward = z.output<typeof validateCmsRewardsSchema>[0]
export type CMSReward = z.output<typeof validateCmsRewardsSchema>[0]
export type Reward = CMSReward & {
id: string | undefined
}
// New endpoint related types and schemas.