import type { H3Event } from 'h3'; import type Stripe from 'stripe'; export interface StripeWebhookHandlerContext { /** * The {@link H3Event} event. */ $event: H3Event; /** * The {@link Stripe} instance. */ stripe: Stripe; } export interface StripeWebhookHandler { (event: Stripe.Event, context: StripeWebhookHandlerContext): Promise | any; } /** * Create a {@link Stripe.Event}. * * ### Note: * This method uses {@link readRawBody} and thus only accepts `POST`, `PUT`, `PATCH`, `DELETE` requests. * * ### Example: * ```ts * export default stripeWebhookHandler(async (event) => { * switch (event.type) { * case 'payment_intent.succeeded': { * // * } * } * }) * ``` */ export declare function stripeWebhookHandler(handler: StripeWebhookHandler): import("h3").EventHandler>;