1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! # Hivehook Rust SDK
//!
//! Typed Rust client for the [Hivehook](https://hivehook.com) GraphQL API.
//!
//! ## Quick start
//!
//! ```rust,no_run
//! # #[cfg(feature = "blocking")]
//! # fn run() -> Result<(), hivehook::HivehookError> {
//! use hivehook::HivehookClient;
//! use hivehook::resources::sources::CreateSourceInput;
//! use serde_json::json;
//!
//! let client = HivehookClient::new(
//! "http://localhost:8080",
//! Some("hh_xxx".into()),
//! )?;
//!
//! let mut input = CreateSourceInput::default();
//! input.name = "Stripe production".into();
//! input.slug = "stripe-prod".into();
//! input.provider_type = "stripe".into();
//! input.verify_config = Some(json!({ "secret": "whsec_..." }));
//! let source = client.sources().create(input)?;
//!
//! println!("created source {}. POST webhooks to /ingest/{}", source.id, source.slug);
//! # Ok(()) }
//! ```
//!
//! Resource services live under [`resources`] and return typed structs from
//! [`types`]. Inbound webhook signature verification lives in [`webhook`].
pub use AsyncHivehookClient;
pub use HivehookClient;
pub use HivehookError;
pub use Webhook;