/** * Storage Webhooks Module * * Provides webhook handling infrastructure for storage events from external services. * Supports signature verification, idempotency, middleware, and integration with storage events. * * @example * ```ts * import { * WebhookManager, * MediaProcessingWebhook, * BaseWebhookAdapter, * IdempotencyStore, * RedisIdempotencyStore, * } from '@plyaz/storage/webhooks'; * * // Create webhook manager * const webhookManager = new WebhookManager(eventManager, logger, { * enabled: true, * timeout: 30000, * idempotency: { * defaultTTL: 3600000, // 1 hour * maxKeys: 10000, * }, * }); * * // Register adapters * const mediaWebhook = new MediaProcessingWebhook({ * secret: process.env.MEDIA_PROCESSING_SECRET!, * signatureMethod: STORAGE_SIGNATURE_METHOD.HmacSha256, * logger, * }); * * webhookManager.registerAdapter(mediaWebhook); * * // Handle incoming webhook * const result = await webhookManager.handleWebhook( * 'media-processing', * 'transcode.complete', * { * method: 'POST', * url: '/webhooks/media', * headers: req.headers, * body: req.body, * rawBody: req.rawBody, * } * ); * ``` */ export { WebhookManager } from './WebhookManager'; export { BaseWebhookAdapter } from './base/BaseWebhookAdapter'; export { MediaProcessingWebhook } from './adapters/MediaProcessingWebhook'; export { CloudflareR2Webhook } from './adapters/CloudflareR2Webhook'; export { SupabaseStorageWebhook } from './adapters/SupabaseStorageWebhook';