import Stripe from "stripe"; import * as dbmage from "dbmage"; import { StripeLiaison } from "../../liaison/types.js"; import { StoreDatabase, StoreDatabaseRaw } from "../../../database/types/schema.js"; type OptionsForDetails = { event: Stripe.Event; stripeLiaison: StripeLiaison; storeDatabaseRaw: StoreDatabaseRaw; }; export declare function getInvoiceDetails({ event, stripeLiaison, storeDatabaseRaw }: OptionsForDetails): Promise<{ appId: dbmage.Id; userId: dbmage.Id; invoice: Stripe.Invoice; storeDatabase: StoreDatabase; stripeCustomerId: string; stripeLiaisonAccount: { billingPortal: { create(params: Stripe.BillingPortal.SessionCreateParams): Promise>; }; customers: { create(params: Stripe.CustomerCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.CustomerUpdateParams): Promise>; listPaymentMethods(customer: string, params: Stripe.CustomerListPaymentMethodsParams): Promise>>; }; products: { create(params: Stripe.ProductCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.ProductUpdateParams): Promise>; }; prices: { list(params: Stripe.PriceListParams): Promise>>; create(params: Stripe.PriceCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.PriceUpdateParams): Promise>; }; paymentMethods: { create(params: Stripe.PaymentMethodCreateParams): Promise>; retrieve(id: string): Promise>; detach(id: string): Promise>; }; setupIntents: { retrieve(id: string): Promise>; create(params: Stripe.SetupIntentCreateParams): Promise>; }; paymentIntents: { retrieve(id: string): Promise>; create(params: Stripe.PaymentIntentCreateParams): Promise>; }; subscriptions: { list(params: Stripe.SubscriptionListParams): Promise>>; create(params: Stripe.SubscriptionCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.SubscriptionUpdateParams): Promise>; }; subscriptionItems: { del(id: string, params: Stripe.SubscriptionItemDeleteParams): Promise>; }; checkout: { sessions: { create(params: Stripe.Checkout.SessionCreateParams): Promise>; }; }; }; }>; export declare function getSubscriptionDetails({ event, stripeLiaison, storeDatabaseRaw }: OptionsForDetails): Promise<{ appId: dbmage.Id; userId: dbmage.Id; subscription: Stripe.Subscription; storeDatabase: StoreDatabase; stripeCustomerId: string; stripeLiaisonAccount: { billingPortal: { create(params: Stripe.BillingPortal.SessionCreateParams): Promise>; }; customers: { create(params: Stripe.CustomerCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.CustomerUpdateParams): Promise>; listPaymentMethods(customer: string, params: Stripe.CustomerListPaymentMethodsParams): Promise>>; }; products: { create(params: Stripe.ProductCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.ProductUpdateParams): Promise>; }; prices: { list(params: Stripe.PriceListParams): Promise>>; create(params: Stripe.PriceCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.PriceUpdateParams): Promise>; }; paymentMethods: { create(params: Stripe.PaymentMethodCreateParams): Promise>; retrieve(id: string): Promise>; detach(id: string): Promise>; }; setupIntents: { retrieve(id: string): Promise>; create(params: Stripe.SetupIntentCreateParams): Promise>; }; paymentIntents: { retrieve(id: string): Promise>; create(params: Stripe.PaymentIntentCreateParams): Promise>; }; subscriptions: { list(params: Stripe.SubscriptionListParams): Promise>>; create(params: Stripe.SubscriptionCreateParams): Promise>; retrieve(id: string): Promise>; update(id: string, params: Stripe.SubscriptionUpdateParams): Promise>; }; subscriptionItems: { del(id: string, params: Stripe.SubscriptionItemDeleteParams): Promise>; }; checkout: { sessions: { create(params: Stripe.Checkout.SessionCreateParams): Promise>; }; }; }; }>; export declare function getReferencedClient(session: Stripe.Checkout.Session): { appId: dbmage.Id; userId: dbmage.Id; }; export declare function getDatabaseForApp(storeDatabaseRaw: StoreDatabaseRaw, appId: dbmage.Id): StoreDatabase; export declare function getConnectAccountDetails({ stripeAccountId, storeDatabaseRaw, }: { stripeAccountId: string; storeDatabaseRaw: StoreDatabaseRaw; }): Promise<{ connectAccount: dbmage.UnconstrainRow<{ "namespace-appId": dbmage.Id; }, { connectId: dbmage.Id; stripeAccountId: string; charges_enabled: boolean; payouts_enabled: boolean; details_submitted: boolean; email: string; paused: boolean; time: number; userId: dbmage.Id; }>; appId: dbmage.Id; storeDatabase: StoreDatabase; }>; export declare function getStripeCustomerDetails(storeDatabaseRaw: StoreDatabaseRaw, stripeCustomerId: string): Promise<{ appId: dbmage.Id; userId: dbmage.Id; storeDatabase: StoreDatabase; }>; export declare function getPriceIdsFromSubscription(subscription: Stripe.Subscription): string[]; export declare function getPriceIdsFromInvoice(invoice: Stripe.Invoice): string[]; export {};