import { A as ApiDataInterface } from './ApiDataInterface-BcZeXy5X.js'; import { F as FeatureInterface } from './feature.interface-BO25VLlx.js'; interface StripeUsageInterface extends ApiDataInterface { get subscriptionId(): string; get meterId(): string; get meterEventName(): string; get stripeEventId(): string; get quantity(): number; get timestamp(): Date | undefined; } interface MeterInterface { id: string; displayName: string; eventName: string; status: string; } interface MeterSummaryInterface { meterId: string; start: Date; end: Date; aggregatedValue: number; } interface UsageSummaryInterface { subscriptionItemId: string; period: { start: Date; end: Date; }; totalUsage: number; } type ReportUsageInput = { subscriptionItemId: string; quantity: number; timestamp?: number; action?: "increment" | "set"; }; type UsageRecordInterface = StripeUsageInterface; interface PaymentMethodInterface { id: string; type: string; card?: { brand: string; last4: string; expMonth: number; expYear: number; }; billingDetails?: { name?: string; email?: string; phone?: string; address?: { city?: string; country?: string; line1?: string; line2?: string; postalCode?: string; state?: string; }; }; } interface StripeCustomerInterface extends ApiDataInterface { get stripeCustomerId(): string; get email(): string | undefined; get name(): string | undefined; get defaultPaymentMethodId(): string | undefined; get currency(): string | undefined; get balance(): number | undefined; get delinquent(): boolean; get metadata(): Record | undefined; } declare enum InvoiceStatus { DRAFT = "draft", OPEN = "open", PAID = "paid", UNCOLLECTIBLE = "uncollectible", VOID = "void" } interface StripeInvoiceInterface extends ApiDataInterface { get stripeInvoiceId(): string; get stripeInvoiceNumber(): string | undefined; get customerId(): string | undefined; get subscriptionId(): string | undefined; get subscription(): StripeSubscriptionInterface | undefined; get status(): InvoiceStatus; get amountDue(): number; get amountPaid(): number; get amountRemaining(): number; get subtotal(): number; get total(): number; get tax(): number | undefined; get currency(): string; get periodStart(): Date; get periodEnd(): Date; get dueDate(): Date | undefined; get paidAt(): Date | undefined; get attemptCount(): number; get attempted(): boolean; get stripeHostedInvoiceUrl(): string | undefined; get stripePdfUrl(): string | undefined; get paid(): boolean; get metadata(): Record | undefined; } interface ProrationPreviewInterface { amountDue: number; currency: string; immediateCharge: number; prorationDate: Date; lineItems: ProrationLineItem[]; isTrialUpgrade?: boolean; } interface ProrationLineItem { description: string; amount: number; proration: boolean; period: { start: Date; end: Date; }; } interface StripeProductInterface extends ApiDataInterface { get stripeProductId(): string; get name(): string; get description(): string | undefined; get active(): boolean; get metadata(): Record | undefined; get stripePrices(): StripePriceInterface[]; } type StripeProductInput = { id: string; name?: string; description?: string; active?: boolean; metadata?: Record; }; interface StripePriceInterface extends ApiDataInterface { get stripePriceId(): string; get productId(): string; get product(): StripeProductInterface | undefined; get active(): boolean; get currency(): string; get unitAmount(): number | undefined; get recurring(): PriceRecurring | undefined; get priceType(): "one_time" | "recurring"; get nickname(): string | undefined; get lookupKey(): string | undefined; get metadata(): Record | undefined; get description(): string | undefined; get features(): string[] | undefined; get token(): number | undefined; get isTrial(): boolean | undefined; get priceFeatures(): FeatureInterface[]; } interface PriceRecurring { interval: "day" | "week" | "month" | "year"; intervalCount: number; usageType?: "metered" | "licensed"; } type StripePriceInput = { id: string; productId?: string; currency?: string; unitAmount?: number; nickname?: string; recurring?: { interval: "day" | "week" | "month" | "year"; intervalCount?: number; usageType?: "metered" | "licensed"; }; metadata?: Record; description?: string; features?: string[]; token?: number; isTrial?: boolean; featureIds?: string[]; }; declare enum SubscriptionStatus { ACTIVE = "active", PAST_DUE = "past_due", UNPAID = "unpaid", CANCELED = "canceled", INCOMPLETE = "incomplete", INCOMPLETE_EXPIRED = "incomplete_expired", TRIALING = "trialing", PAUSED = "paused" } interface StripeSubscriptionInterface extends ApiDataInterface { get stripeSubscriptionId(): string; get status(): SubscriptionStatus; get currentPeriodStart(): Date; get currentPeriodEnd(): Date; get cancelAtPeriodEnd(): boolean; get canceledAt(): Date | undefined; get trialStart(): Date | undefined; get trialEnd(): Date | undefined; get price(): StripePriceInterface | undefined; } type StripeSubscriptionInput = { id: string; priceId?: string; newPriceId?: string; cancelImmediately?: boolean; quantity?: number; trialPeriodDays?: number; paymentMethodId?: string; metadata?: Record; promotionCode?: string; }; interface StripeSubscriptionCreateMeta { clientSecret: string | null; paymentIntentId: string | null; requiresAction: boolean; } interface StripeSubscriptionCreateResponse { subscription: StripeSubscriptionInterface; meta: StripeSubscriptionCreateMeta; } /** * Promotion code validation result from the backend */ interface PromotionCodeValidationResult { valid: boolean; promotionCodeId?: string; code: string; discountType?: "percent_off" | "amount_off"; discountValue?: number; currency?: string; duration?: "forever" | "once" | "repeating"; durationInMonths?: number; errorMessage?: string; } export { InvoiceStatus as I, type MeterInterface as M, type PaymentMethodInterface as P, type ReportUsageInput as R, type StripeCustomerInterface as S, type UsageSummaryInterface as U, type StripeInvoiceInterface as a, type ProrationPreviewInterface as b, type ProrationLineItem as c, type StripePriceInterface as d, type PriceRecurring as e, type StripePriceInput as f, type StripeProductInterface as g, type StripeProductInput as h, SubscriptionStatus as i, type StripeSubscriptionInterface as j, type StripeSubscriptionInput as k, type StripeSubscriptionCreateMeta as l, type StripeSubscriptionCreateResponse as m, type StripeUsageInterface as n, type MeterSummaryInterface as o, type UsageRecordInterface as p, type PromotionCodeValidationResult as q };