import { Loader } from 'astro/loaders';
import Stripe from 'stripe';

type StripeLoaderOptions<T> = T & {
    limit?: number;
};

type StripeProductLoaderOptions = StripeLoaderOptions<Stripe.ProductListParams>;
declare function stripeProductLoader(stripe: Stripe, options?: StripeProductLoaderOptions): Loader;

type StripePriceLoaderOptions = StripeLoaderOptions<Stripe.PriceListParams>;
declare function stripePriceLoader(stripe: Stripe, options?: StripePriceLoaderOptions): Loader;

type StripePlanLoaderOptions = StripeLoaderOptions<Stripe.PlanListParams>;
declare function stripePlanLoader(stripe: Stripe, options?: StripePlanLoaderOptions): Loader;

export { type StripeLoaderOptions, stripePlanLoader, stripePriceLoader, stripeProductLoader };
