import { IReferralCode, DiscountType } from '../models/ReferralCode'; export interface CreateReferralCodeInput { clientId: string; discountType: DiscountType; discountValue: number; usageLimit?: number; codePrefix?: string; codeLength?: number; code?: string; } export interface VerifyReferralCodeResult { isValid: boolean; referralCode?: IReferralCode; error?: string; } export interface ServiceResponse { success: boolean; data?: T; error?: string; message?: string; } /** * Service class for managing referral codes */ export declare class ReferralService { /** * Generates a unique referral code with client prefix and saves it to MongoDB * @param input - Referral code creation parameters * @returns ServiceResponse with the created referral code or error */ static createReferralCode(input: CreateReferralCodeInput): Promise>; /** * Verifies if a referral code is valid * Checks active status, usage limit, and returns the referral code if valid * @param code - The referral code to verify * @returns VerifyReferralCodeResult with validation status */ static verifyReferralCode(code: string): Promise; /** * Gets a referral code by code string * @param code - The referral code to retrieve * @returns ServiceResponse with the referral code or error */ static getReferralCodeByCode(code: string): Promise>; /** * Gets all referral codes for a specific client * @param clientId - The client ID * @returns ServiceResponse with array of referral codes */ static getReferralCodesByClientId(clientId: string): Promise>; /** * Increments the usage count of a referral code * @param code - The referral code to increment * @returns ServiceResponse with updated referral code */ static incrementUsageCount(code: string): Promise>; /** * Deactivates a referral code * @param code - The referral code to deactivate * @returns ServiceResponse with updated referral code */ static deactivateReferralCode(code: string): Promise>; }