import { SubscriptionStatus } from "../subscription/index.mjs"; import { Stripe } from "stripe"; //#region src/stripe/mapper.d.ts declare function mapTime(stripeTimestampSeconds: T): T extends number ? string : null; type Price = { id: string; type: Stripe.Price.Type; active: boolean; billing_scheme: Stripe.Price.BillingScheme; currency: Stripe.Price['currency']; unit_amount: number | null; unit_amount_decimal: string | null; recurring: Stripe.Price.Recurring | null; }; declare function mapPrice(price: Stripe.Price): Price; interface LineItem { id: string; currency: string; quantity: number | null; description: string | null; amount_tax: number; amount_total: number; amount_subtotal: number; amount_discount: number; price: Price | null; } declare function mapLineItem(item: Stripe.LineItem): LineItem; type PaymentStatus = Stripe.Checkout.Session.PaymentStatus; interface CheckoutSession { id: string; url: string | null; coupon: string | undefined; livemode: boolean; expires_at: number; payment_status: PaymentStatus; currency: string | null; amount_total: number | null; line_items: LineItem[] | undefined; } declare function mapCheckoutSession(session: Stripe.Checkout.Session): CheckoutSession; declare function mapInvoice(i: Stripe.Invoice): { id: string; number: string | null; total: number; subtotal: number; amount_due: number; amount_paid: number; amount_remaining: number; currency: string; billing_reason: Stripe.Invoice.BillingReason | null; hosted_invoice_url: string | null | undefined; invoice_pdf: string | null | undefined; receipt_number: string | null; status: Stripe.Invoice.Status | null; created: number; period_start: number; period_end: number; }; declare function mapPaymentIntent(intent: Stripe.PaymentIntent): { id: string; amount: number; amount_capturable: number; amount_received: number; currency: string; client_secret: string | null; description: string | null; status: Stripe.PaymentIntent.Status; created: number; }; declare function mapCharge(charge: Stripe.Charge): { id: string; description: string | null; currency: string; amount: number; amount_captured: number; amount_refunded: number; receipt_email: string | null; receipt_number: string | null; receipt_url: string | null; status: Stripe.Charge.Status; created: number; payment_intent: { id: string; amount: number; amount_capturable: number; amount_received: number; currency: string; client_secret: string | null; description: string | null; status: Stripe.PaymentIntent.Status; created: number; } | undefined; }; type ProductPrice = { id: string; type: Stripe.Price.Type; unit_amount: number; currency: Stripe.Price['currency']; product: { id: Stripe.Product['id']; name: Stripe.Product['name']; description: Stripe.Product['description']; livemode: Stripe.Product['livemode']; }; }; declare function mapSubscriptionStatus(status: Stripe.Subscription.Status): SubscriptionStatus; declare const ZERO_DECIMAL_CURRENCIES: string[]; declare function minorUnits(currency: string): 1 | 100; declare function price(value: number, currency: string): number; interface Item { item_id: string; item_name: string; affiliation?: 'Google Store' | (string & {}); coupon?: string; discount?: number; index?: number; item_brand?: string; item_category?: string; item_category2?: string; item_category3?: string; item_category4?: string; item_category5?: string; item_list_id?: string; item_list_name?: string; item_variant?: string; location_id?: string; price?: number; quantity?: number; } interface PurchaseProperties { currency: string; value: number; transaction_id: string; coupon?: string; shipping?: number; tax?: number; items?: Item[]; } interface BeginCheckoutProperties { currency: string; value: number; coupon?: string; items: Item[]; } declare function getPurchaseProperties(session: CheckoutSession): PurchaseProperties; declare function getBeginCheckoutProperties(p: ProductPrice): BeginCheckoutProperties; //#endregion export { BeginCheckoutProperties, CheckoutSession, Item, LineItem, PaymentStatus, Price, ProductPrice, PurchaseProperties, ZERO_DECIMAL_CURRENCIES, getBeginCheckoutProperties, getPurchaseProperties, mapCharge, mapCheckoutSession, mapInvoice, mapLineItem, mapPaymentIntent, mapPrice, mapSubscriptionStatus, mapTime, minorUnits, price }; //# sourceMappingURL=mapper.d.mts.map