import Stripe from 'stripe'; type RequireAtLeastOne = Pick> & { [K in Keys]-?: Required> & Partial>>; }[Keys]; /** * The mode of Stripe webhook being used */ export declare enum StripeWebhookMode { SNAPSHOT = "snapshot", THIN = "thin" } export interface StripeSecrets { /** * The webhook secret registered in the Stripe Dashboard for events on your accounts */ account?: string; /** * The webhook secret registered in the Stripe Dashboard for events on your accounts in test mode */ accountTest?: string; /** * The webhook secret registered in the Stripe Dashboard for events on Connected accounts */ connect?: string; /** * The webhook secret registered in the Stripe Dashboard for events on Connected accounts in test mode */ connectTest?: string; } export interface StripeModuleConfig extends Partial { readonly apiKey: string; /** * Configuration for processing Stripe Webhooks */ webhookConfig?: { /** * Secrets for validating incoming webhook **snapshot** signatures. At least one secret must be provided. */ stripeSecrets: RequireAtLeastOne; /** * Secrets for validating incoming webhook **thin** signatures. At least one secret must be provided if using thin webhooks. */ stripeThinSecrets?: RequireAtLeastOne; /** * The property on the request that contains the raw message body so that it * can be validated. Defaults to 'body' */ requestBodyProperty?: string; /** * The prefix of the generated webhook handling controller. Defaults to 'stripe' */ controllerPrefix?: string; /** * Any metadata specific decorators you want to apply to the webhook handling controller. * * Note: these decorators must only set metadata that will be read at request time. Decorators like Nest's `@UsePipes()` or `@UseInterceptors()` wll not work, due to the time at which Nest reads the metadata for those, but something that uses `SetMetadata` will be fine, because that metadata is read at request time. */ decorators?: ClassDecorator[]; /** * Logging configuration */ loggingConfiguration?: { /** * If enabled will log information regarding event handlers that match incoming webhook events */ logMatchingEventHandlers: boolean; }; }; } export interface StripeWebhookHandlerConfig { /** * Event type from Stripe that will be used to match this handler */ eventType: string; } export {}; //# sourceMappingURL=stripe.interfaces.d.ts.map