import { DiscountType } from '../models/ReferralCode'; export interface CreateCodeResponse { success: boolean; code?: string; error?: string; message?: string; } export interface VerifyCodeResponse { isValid: boolean; discountInfo?: { discountType: DiscountType; discountValue: number; discountAmount?: number; finalAmount?: number; }; error?: string; message?: string; } export interface IncrementUsageResponse { success: boolean; usedCount?: number; isActive?: boolean; error?: string; message?: string; } /** * Controller for Referral Code API */ export declare class ReferralController { /** * Creates a new referral code * @param clientId - ID of the client using the package * @param discountType - Type of discount ('percentage' | 'amount') * @param discountValue - Discount value (percentage 0-100 or fixed amount) * @param usageLimit - Optional maximum usage limit * @param code - Optional custom referral code. If provided, will validate it with clientId and check if it's available * @returns CreateCodeResponse with generated code or error */ static createCode(clientId: string, discountType: DiscountType, discountValue: number, usageLimit?: number, code?: string): Promise; /** * Verifies a referral code and returns validation status with discount information * @param code - The referral code to verify * @param originalAmount - Optional original amount for discount calculation * @returns VerifyCodeResponse with validation status and discount info */ static verifyCode(code: string, originalAmount?: number): Promise; /** * Increments the usage count of a referral code * Automatically deactivates the code if usage limit is reached * @param code - The referral code to increment usage for * @returns IncrementUsageResponse with updated usage count and active status */ static incrementUsage(code: string): Promise; }