feat(LOY-64): add ActiveRedeemedBadge UI for on site tier rewards
This commit is contained in:
@@ -161,10 +161,14 @@ export type CMSRewardWithRedeem = z.output<
|
||||
|
||||
export type Reward = CMSReward & {
|
||||
id: string | undefined
|
||||
rewardType: string | undefined
|
||||
redeemLocation: string | undefined
|
||||
}
|
||||
|
||||
export type RewardWithRedeem = CMSRewardWithRedeem & {
|
||||
id: string | undefined
|
||||
rewardType: string | undefined
|
||||
redeemLocation: string | undefined
|
||||
}
|
||||
|
||||
// New endpoint related types and schemas.
|
||||
@@ -172,10 +176,11 @@ export type RewardWithRedeem = CMSRewardWithRedeem & {
|
||||
const BenefitReward = z.object({
|
||||
title: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
status: z.string().optional(),
|
||||
redeemLocation: z.string().optional(),
|
||||
rewardId: z.string().optional(),
|
||||
rewardType: z.string().optional(),
|
||||
rewardTierLevel: z.string().optional(),
|
||||
status: z.string().optional(),
|
||||
})
|
||||
|
||||
const CouponState = z.enum(["claimed", "redeemed", "viewed"])
|
||||
@@ -191,6 +196,7 @@ const CouponReward = z.object({
|
||||
id: z.string().optional(),
|
||||
rewardId: z.string().optional(),
|
||||
rewardType: z.string().optional(),
|
||||
redeemLocation: z.string().optional(),
|
||||
status: z.string().optional(),
|
||||
coupon: z.array(CouponData).optional(),
|
||||
})
|
||||
@@ -224,3 +230,7 @@ export const validateApiAllTiersSchema = z.record(
|
||||
}),
|
||||
z.array(BenefitReward)
|
||||
)
|
||||
|
||||
export type RedeemLocation = "Non-redeemable" | "On-site" | "Online"
|
||||
|
||||
export type RewardType = "Tier" | "Member-voucher" | "Surprise" | "Campaign"
|
||||
|
||||
Reference in New Issue
Block a user