import { JWSRenewalInfoDecodedPayload, JWSTransactionDecodedPayload, NotificationTypeV2, ResponseBodyV2DecodedPayload } from "@apple/app-store-server-library"; //#region src/app-store/handler.d.ts interface AppStoreNotificationEvent { payload: ResponseBodyV2DecodedPayload; transaction: JWSTransactionDecodedPayload | null; renewalInfo: JWSRenewalInfoDecodedPayload | null; } type NotificationHandlerFn = (event: AppStoreNotificationEvent) => Promise; /** * App Store Server Notification dispatcher keyed by notificationType, the app-store counterpart * of StripeEventHandler. The caller verifies and decodes the notification (payload, transaction, * renewalInfo) first and passes the decoded event in. Subtype branching stays inside each * handler: Apple subtypes share the handler's derived context and are usually a few lines each. */ declare class AppStoreNotificationHandler { private readonly handlers; private constructor(); static create(): AppStoreNotificationHandler; on: (type: NotificationTypeV2, handler: NotificationHandlerFn) => this; process: (event: AppStoreNotificationEvent) => Promise; } //#endregion export { AppStoreNotificationEvent, AppStoreNotificationHandler }; //# sourceMappingURL=handler.d.mts.map