import { Currency } from '@/types'; export interface SubscriptionRequest { id?: number; userId: number; psp: number; purpose: string; amount: number; currency: Currency; paymentInterval: string; period: string; cancellationInterval: string; referenceId?: string; offset?: number; limit?: number; } export interface SubscriptionResponse extends SubscriptionRequest { id: number; status: string; pspSubscriptionId: string; start: string; end: string | null; validUntil: string | null; cancelledDate: number; firstCancelDate: number; nextPayDate: number; } export interface SubscriptionListResponse { data: SubscriptionResponse[]; count: number; offset?: number; limit?: number; } export type SubscriptionStatus = 'active' | 'cancelled' | 'expired' | 'pending' | 'suspended' | 'failed'; export interface SubscriptionCreateOptions { userId: number; psp: number; purpose: string; amount: number; currency: Currency; paymentInterval: string; period: string; cancellationInterval: string; referenceId?: string; } export interface SubscriptionUpdateOptions { purpose?: string; amount?: number; paymentInterval?: string; period?: string; cancellationInterval?: string; referenceId?: string; } export interface SubscriptionSearchFilters { userId?: number; status?: SubscriptionStatus | SubscriptionStatus[]; currency?: Currency; psp?: number; amountFrom?: number; amountTo?: number; purpose?: string; referenceId?: string; startAfter?: string; startBefore?: string; endAfter?: string; endBefore?: string; createdAfter?: string; createdBefore?: string; } export interface SubscriptionAnalytics { subscriptionId: number; totalRevenue: number; currency: Currency; paymentsCount: number; failedPayments: number; successRate: number; averagePaymentAmount: number; nextBillingDate: string; customerLifetimeValue: number; churnRisk: 'low' | 'medium' | 'high'; } export interface SubscriptionBilling { subscriptionId: number; billingCycle: string; nextBillingDate: string; lastBillingDate?: string; billingAmount: number; currency: Currency; prorationEnabled: boolean; discounts?: SubscriptionDiscount[]; } export interface SubscriptionDiscount { type: 'percentage' | 'fixed_amount'; value: number; description?: string; validFrom?: string; validUntil?: string; maxRedemptions?: number; currentRedemptions?: number; } export interface SubscriptionTrial { enabled: boolean; duration?: string; amount?: number; } export interface SubscriptionCancellation { reason?: string; cancelAtPeriodEnd: boolean; immediateCancel: boolean; refundProration: boolean; feedbackRequested: boolean; } export interface SubscriptionMetrics { totalSubscriptions: number; activeSubscriptions: number; cancelledSubscriptions: number; monthlyRecurringRevenue: number; annualRecurringRevenue: number; churnRate: number; lifetimeValue: number; averageRevenuePerUser: number; } export declare const SUBSCRIPTION_INTERVALS: { readonly DAILY: "P1D"; readonly WEEKLY: "P1W"; readonly BIWEEKLY: "P2W"; readonly MONTHLY: "P1M"; readonly BIMONTHLY: "P2M"; readonly QUARTERLY: "P3M"; readonly SEMIANNUALLY: "P6M"; readonly ANNUALLY: "P1Y"; readonly BIENNIALLY: "P2Y"; }; export declare const SUBSCRIPTION_PERIODS: { readonly ONE_MONTH: "P1M"; readonly THREE_MONTHS: "P3M"; readonly SIX_MONTHS: "P6M"; readonly ONE_YEAR: "P1Y"; readonly TWO_YEARS: "P2Y"; readonly THREE_YEARS: "P3Y"; readonly INDEFINITE: "P99Y"; }; export declare const CANCELLATION_INTERVALS: { readonly IMMEDIATE: "P0D"; readonly ONE_DAY: "P1D"; readonly ONE_WEEK: "P1W"; readonly ONE_MONTH: "P1M"; readonly THREE_MONTHS: "P3M"; }; //# sourceMappingURL=subscription.d.ts.map