import { CartService, Customer, CustomerService, LineItem, LineItemTaxLine, Logger, PaymentProcessorContext, PaymentProcessorError, PaymentProcessorSessionResponse, PaymentSessionStatus, Product, ProductService } from "@medusajs/medusa"; import Stripe from "stripe"; import { PaymentIntentOptions } from "medusa-payment-stripe"; import { StripeSubscriptionOptions } from "../types"; import StripeProvider from "medusa-payment-stripe/dist/services/stripe-provider"; import { EntityManager } from "typeorm"; declare abstract class StripeSubscriptionService extends StripeProvider { static identifier: string; protected readonly options_: StripeSubscriptionOptions; protected stripe_: Stripe; cartService: CartService; productService: ProductService; logger: Logger; manager: EntityManager; customerService: CustomerService; constructor(container: { cartService: CartService; productService: ProductService; customerService: CustomerService; logger: Logger; manager: EntityManager; }, options: any); withTransaction(transactionManager: EntityManager): this; protected init(): void; abstract get paymentIntentOptions(): PaymentIntentOptions; get options(): StripeSubscriptionOptions; getStripe(): Stripe; getPaymentIntentOptions(): PaymentIntentOptions; getPaymentStatus(paymentSessionData: Record): Promise; createStripeTaxRate(taxLine: LineItemTaxLine, country_code: string, price_inclusive_tax?: boolean): Promise; getOrCreateStripeTaxRates(i: LineItem, country_code: string): Promise; getStripeSubscriptionItemsFromCart(cartId: string): Promise; isSubscriptionCart(cartId: string): Promise; initiateSubscription(resource_id: string): Promise<{ session_data: Record; customer: Customer; } | PaymentProcessorError>; initiatePayment(context: PaymentProcessorContext): Promise; authorizePayment(paymentSessionData: Record, context: Record): Promise; cancelPayment(paymentSessionData: Record): Promise; capturePayment(paymentSessionData: Record): Promise; deletePayment(paymentSessionData: Record): Promise; retrievePayment(paymentSessionData: Record): Promise; updatePayment(context: PaymentProcessorContext): Promise; findSubscriptionWithProductId(subscriptions: Stripe.Subscription[], stripeProductId: string): Stripe.Subscription; isSubscribed(stripeCustomerId: string, stripeProductIds: string[]): Promise<{ found: string[]; notFound: string[]; }>; updatePaymentSubscription(context: PaymentProcessorContext): Promise; updatePaymentData(sessionId: string, data: Record): Promise | PaymentProcessorError>; createStripeProduct(product: Product): Promise; deleteStripeProduct(product: Product): Promise; updateStripeProduct(product: Product): Promise; } export default StripeSubscriptionService;