import { IPaymentChoice } from '@/common/rewards/reward-emitter'; import type { PaymentResult } from './payment-helper'; import { RequestCacheService } from '@jolibox/common'; type PaymentPurchaseType = 'JOLI_COIN' | 'JOLI_GEM'; type PaymentRequest = Record; interface PaymentResponse { balance: number; enableAutoDeduct: boolean; paymentChoices: IPaymentChoice[]; } interface PaymentCacheData { paymentChoices: IPaymentChoice[]; } interface PaymentRealTimeData { balance: number; enableAutoDeduct: boolean; } declare class BasePaymentService extends RequestCacheService { private apiEndpoint; private paymentType; private static failureCounters; private static readonly MAX_FAILURE_COUNT; constructor(apiEndpoint: string, paymentType: PaymentPurchaseType); getProductsInfo(): Promise; purchase(productId: string): Promise>; getProductsInfoWithBalance(): Promise; refreshProductsInfo(): Promise; static resetFailureCounters(): void; static getFailureCount(endpoint: string): number; } export declare class JoliCoinPaymentService extends BasePaymentService { constructor(); } export declare class JoliGemPaymentService extends BasePaymentService { constructor(); } export declare const createJoliCoinPaymentService: () => JoliCoinPaymentService; export declare const createJoliGemPaymentService: () => JoliGemPaymentService; export declare const clearNativePriceCache: () => void; export declare const resetFailureCounters: () => void; export declare const getFailureCount: (endpoint: string) => number; export {};