// Subscription types from WHMCS import type { SubscriptionStatus } from "../enums/status"; import type { WhmcsEntity } from "../common"; export type SubscriptionBillingCycle = | "Monthly" | "Quarterly" | "Semi-Annually" | "Annually" | "Biennially" | "Triennially" | "One-time"; export interface Subscription extends WhmcsEntity { serviceId: number; productName: string; domain?: string; cycle: SubscriptionBillingCycle; status: SubscriptionStatus; nextDue?: string; // ISO amount: number; currency: string; currencySymbol?: string; // e.g., '¥', '¥' registrationDate: string; // ISO notes?: string; customFields?: Record; // Additional WHMCS fields orderNumber?: string; groupName?: string; paymentMethod?: string; serverName?: string; } export interface SubscriptionList { subscriptions: Subscription[]; totalCount: number; } export interface Product { id: number; name: string; description?: string; group: string; pricing: ProductPricing[]; features?: string[]; configOptions?: ConfigOption[]; available: boolean; } export interface ProductPricing { cycle: string; price: number; currency: string; setup?: number; } export type ConfigOptionType = "dropdown" | "radio" | "quantity"; export interface ConfigOption { id: number; name: string; type: ConfigOptionType; options: ConfigOptionValue[]; } export interface ConfigOptionValue { id: number; name: string; price?: number; }