fix(LOY-137): now fetches surprises client side in intervals

This commit is contained in:
Christian Andolf
2025-02-17 15:39:47 +01:00
parent a55737617c
commit 0ba71f205d
4 changed files with 130 additions and 110 deletions

View File

@@ -223,6 +223,10 @@ export type RewardWithRedeem = CMSRewardWithRedeem & {
couponCode: string | undefined
}
export interface Surprise extends Omit<Reward, "operaRewardId" | "couponCode"> {
coupons: { couponCode?: string | undefined; expiresAt?: string }[]
}
// New endpoint related types and schemas.
const BaseReward = z.object({
title: z.string().optional(),