Merge branch 'main' into feat/api-key-ip-restriction

This commit is contained in:
Edric Li
2026-01-10 18:49:50 +08:00
108 changed files with 18223 additions and 144 deletions

View File

@@ -50,6 +50,7 @@ export interface RegisterRequest {
password: string
verify_code?: string
turnstile_token?: string
promo_code?: string
}
export interface SendVerifyCodeRequest {
@@ -961,3 +962,44 @@ export interface UpdateUserAttributeRequest {
export interface UserAttributeValuesMap {
[attributeId: number]: string
}
// ==================== Promo Code Types ====================
export interface PromoCode {
id: number
code: string
bonus_amount: number
max_uses: number
used_count: number
status: 'active' | 'disabled'
expires_at: string | null
notes: string | null
created_at: string
updated_at: string
}
export interface PromoCodeUsage {
id: number
promo_code_id: number
user_id: number
bonus_amount: number
used_at: string
user?: User
}
export interface CreatePromoCodeRequest {
code?: string
bonus_amount: number
max_uses?: number
expires_at?: number | null
notes?: string
}
export interface UpdatePromoCodeRequest {
code?: string
bonus_amount?: number
max_uses?: number
status?: 'active' | 'disabled'
expires_at?: number | null
notes?: string
}