import type { UserModel } from '@stacksjs/orm'; import type Stripe from 'stripe'; /** * The provider statuses that mean the customer currently has what they paid for. * * Kept as one list because `isValid` is the question every entitlement check * ultimately asks, and the answer has to be the same everywhere it is asked. */ export declare const ENTITLING_STATUSES: readonly ['active', 'trialing']; /** Statuses meaning payment was started but never completed. */ export declare const INCOMPLETE_STATUSES: readonly ['incomplete']; export declare const manageSubscription: SubscriptionManager; export declare interface SubscriptionManager { create: (user: UserModel, type: string, lookupKey: string, params: Partial) => Promise> update: (user: UserModel, type: string, lookupKey: string, params: Partial) => Promise> cancel: (subscriptionId: string, params?: Partial) => Promise> retrieve: (user: UserModel, subscriptionId: string) => Promise> isValid: (user: UserModel, type: string) => Promise isIncomplete: (user: UserModel, type: string) => Promise } declare type SubscriptionsTable = Record;