//! Webhook 模块 — 事件通知系统 //! //! 允许 SaaS 平台在事件发生时向外部 URL 发送 HTTP POST 通知。 //! 支持 HMAC-SHA256 签名验证、投递日志和自动重试。 pub mod types; pub mod service; pub mod handlers; use crate::state::AppState; /// Webhook 路由 (需要认证) pub fn routes() -> axum::Router { axum::Router::new() .route("/api/v1/webhooks", axum::routing::get(handlers::list_subscriptions).post(handlers::create_subscription)) .route("/api/v1/webhooks/:id", axum::routing::patch(handlers::update_subscription).delete(handlers::delete_subscription)) .route("/api/v1/webhooks/:id/deliveries", axum::routing::get(handlers::list_deliveries)) }