import { ISubscriptionCancellationPolicy, ISubscriptionStatus, PaymentMethodType, ProviderType } from './enums'; export * from './providers/stripe/interfaces'; export interface IPlanResponse { id: string; externalId: string; name: string; description: string; price: IPlanResponsePriceResponse; slug: string; } export interface IPlanResponsePriceResponse { id: string; externalId: string; currency: string; amount: number; } export interface ISubscriptionResponse { id: string; externalId: string; externallyManaged: boolean; startDate: string; currentPeriodStart: string; currentPeriodEnd: string; status: ISubscriptionStatus; cancellation: ISubscriptionCancellationResponse | null; trialEnd?: string; plan: ISubscriptionPlanResponse; } export interface ISubscriptionPlanResponse { slug: string; } export interface ISubscriptionCancellationResponse { policy: ISubscriptionCancellationPolicy; } export interface ISubscriptionInvoiceResponse { id: string; externalId: string; subscriptionId: string; paymentDate: string; totalAmount: number; currency: string; paid: boolean; receiptNumber: string; } export type ISubscriptionPaymentMethodResponse = ISubscriptionPaymentMethodDefaultResponse | ISubscriptionPaymentMethodCardResponse; export interface ISubscriptionPaymentMethodDefaultResponse { id: string; externalId: string; type: PaymentMethodType.UNKNWON; isDefault: boolean; } export interface ISubscriptionPaymentMethodCardResponse { id: string; externalId: string; type: PaymentMethodType.CARD; isDefault: boolean; last4: string; expMonth: number; expYear: number; brand: string; billingDetails: BillingDetailsResponse; } export interface ISubscriptionSummariesResponse { tenantConfigurationId: string; providerType: ProviderType; subscriptionId: string; externallyManaged: boolean; currentPlanId: string; paymentMethodId: string; defaultPlanId: string; } export interface BillingDetailsResponse { name: string; email?: string; address?: BillingDetailsAddress; } export interface BillingDetailsAddress { addressLine1?: string; addressLine2?: string; city?: string; state?: string; postalCode?: string; country?: string; } export interface ISubscriptionUpdatePaymentMethodBillingDetails { email?: string; address?: BillingDetailsAddress; } export interface ITenantConfigurationResponse { id: string; vendorId: string; tenantId: string; externallyManaged: string; paymentProviderType: ProviderType; mappingId: string; } export interface ICreateTenantConfigurationRequest { tenantId: string; externallyManaged?: string; providerType: ProviderType; } export interface ICreateTenantConfigurationResponse { id: string; } export interface IPaymentProviderResponse { providerType: ProviderType; name: string; status: string; } export interface IUpdateSubscriptionRequest { paymentMethodId: string; planId: string; } export interface IUpdateManagedSubscriptionRequest { paymentMethodId: string; planId: string; } export interface IVendorPublicConfigurationResponse { allowPlanDowngrade: boolean; allowPlanCancellation: boolean; }