Skip to main content

spatie_laravel_webhook_client/
lib.rs

1#![doc = include_str!("../README.md")]
2
3mod attachment;
4mod command;
5mod config;
6mod error;
7mod job;
8mod model;
9mod processor;
10mod profile;
11mod response;
12mod signature;
13
14pub use attachment::Attachment;
15pub use command::PruneWebhookCalls;
16pub use config::{Config, StoreHeaders, WebhookConfig, WebhookConfigRepository};
17pub use error::Error;
18pub use job::{ProcessWebhookJob, QueuedJob};
19pub use model::{DatabaseWebhookCallModel, WebhookCall, WebhookCallModel};
20pub use processor::{InvalidWebhookSignatureEvent, WebhookProcessor};
21pub use profile::{ProcessEverythingWebhookProfile, WebhookProfile};
22pub use response::{DefaultRespondsTo, RespondsToWebhook};
23pub use signature::{DefaultSignatureValidator, SignatureValidator};
24
25use spatie_package_tools::Package;
26
27/// Register configuration and the webhook calls migration, without running it.
28/// Call `.without_migrations()` when the application owns the schema.
29pub fn service_provider() -> Package {
30    Package::new("webhook-client")
31        .config_defaults(Config::default())
32        .migrations(spatie_package_tools::migrations!("database/migrations"))
33        .command::<PruneWebhookCalls>()
34}
35
36#[cfg(doctest)]
37mod guide {
38    include!(concat!(env!("OUT_DIR"), "/documentation.rs"));
39}