This commit is contained in:
efrilm
2025-09-18 03:04:06 +07:00
parent 3a56e56c69
commit 4640d14cb7
7 changed files with 1232 additions and 509 deletions
+36 -9
View File
@@ -1,12 +1,39 @@
export interface RewardCatalogType {
id: string
export interface Reward {
id: string // uuid
name: string
description?: string
pointCost: number
reward_type: 'VOUCHER' | 'PHYSICAL' | 'DIGITAL'
cost_points: number
stock?: number
isActive: boolean
validUntil?: Date
imageUrl?: string
createdAt: Date
updatedAt: Date
max_per_customer: number
tnc?: TermsAndConditions
metadata?: Record<string, any>
images?: string[]
created_at: string // ISO date-time
updated_at: string // ISO date-time
}
export interface Rewards {
rewards: Reward[]
total: number
page: number
limit: number
}
export interface TermsAndConditions {
sections: TncSection[]
expiry_days: number
}
export interface TncSection {
title: string
rules: string[]
}
export interface RewardRequest {
name: string // required, 1150 chars
reward_type: 'VOUCHER' | 'PHYSICAL' | 'DIGITAL' // enum
cost_points: number // min 1
stock?: number
max_per_customer: number // min 1
tnc?: TermsAndConditions
}