interface AutumnError { message: string; code: string; } declare enum AppEnv { Sandbox = "sandbox", Live = "live" } declare const Infinite = "inf"; declare enum FreeTrialDuration { Day = "day" } declare enum UsageModel { Prepaid = "prepaid", PayPerUse = "pay_per_use" } declare enum ProductItemInterval { Minute = "minute", Hour = "hour", Day = "day", Week = "week", Month = "month", Quarter = "quarter", SemiAnnual = "semi_annual", Year = "year" } type ProductItemIntervalType = "minute" | "hour" | "day" | "week" | "month" | "quarter" | "semi_annual" | "year"; declare enum ProductStatus { Active = "active", Expired = "expired", Trialing = "trialing", Scheduled = "scheduled" } interface CustomerFeature { feature_id: string; unlimited?: boolean; interval?: ProductItemInterval | null; balance?: number; usage?: number; included_usage?: number; next_reset_at?: number; } interface CustomerProduct { id: string; name: string | null; group: string | null; status: ProductStatus; started_at: number; canceled_at: number | null; subscription_ids?: string[] | null; current_period_start?: number | null; current_period_end?: number | null; } interface Customer { autumn_id: string; created_at: number; env: AppEnv; id: string | null; name: string | null; email: string | null; fingerprint: string | null; stripe_id: string | null; products: CustomerProduct[]; add_ons: CustomerProduct[]; features: CustomerFeature[]; } interface CustomerData { name?: string; email?: string; fingerprint?: string; } interface CreateCustomerParams { id?: string | null; email?: string | null; name?: string | null; fingerprint?: string | null; } interface UpdateCustomerParams { id?: string | null; name?: string | null; email?: string | null; fingerprint?: string | null; } interface BillingPortalParams { return_url?: string; } interface BillingPortalResponse { customer_id: string; url: string; } interface AttachFeatureOptions { feature_id: string; quantity: number; } interface AttachParams { customer_id: string; product_id: string; options?: AttachFeatureOptions[]; product_ids?: string[]; free_trial?: boolean; success_url?: string; metadata?: Record; force_checkout?: boolean; } interface AttachResult { checkout_url?: string; customer_id: string; product_ids: string[]; code: string; message: string; } interface EventParams { customer_id: string; customer_data?: CustomerData; value?: number; feature_id?: string; event_name?: string; } interface EventResult { id: string; code: string; customer_id: string; feature_id?: string; event_name?: string; } interface EntitledParams { customer_id: string; feature_id: string; required_quantity?: number; customer_data?: CustomerData; } interface EntitledBalance { feature_id: string; unlimited: boolean; usage_allowed: boolean; required_quantity: number | null; balance: number | null; } interface EntitledResult { customer_id: string; feature_id: string; code: string; allowed: boolean; balances: EntitledBalance[]; } export { type AutumnError as A, type BillingPortalParams as B, type Customer as C, type EntitledParams as E, FreeTrialDuration as F, Infinite as I, type ProductItemIntervalType as P, type UpdateCustomerParams as U, type CreateCustomerParams as a, type BillingPortalResponse as b, type AttachParams as c, type AttachResult as d, type EntitledResult as e, type EventParams as f, type EventResult as g, AppEnv as h, UsageModel as i, type CustomerData as j };