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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//! # `bibby` — The Official Rust SDK for Bytebury
//!
//! `bibby` provides strongly-typed async clients, smart `.env` initialization,
//! constant-time webhook signature verification, and ergonomic macros for every
//! [Bytebury](https://bytebury.com) developer product:
//!
//! | Service | Accessor | What it does |
//! |---|---|---|
//! | **Geo** | [`Bibby::geo`] | IPv4/IPv6 geolocation, SVG maps, random IPs, corrections |
//! | **Images** | [`Bibby::images`] | Resize, crop, transform, vectorize, analyze, icons, diff, QR codes |
//! | **PDF** | [`Bibby::pdf`] | HTML/CSS (MiniJinja) and live URL to PDF rendering |
//! | **Mailer** | [`Bibby::mailer`] | Transactional email sending (with idempotency) and email validation |
//! | **Uploader** | [`Bibby::uploader`] | Private/public file storage, signed URLs, share links, one-time upload links |
//! | **Cron** | [`Bibby::cron`] | Scheduled UTC HTTP jobs, manual runs, run history, schedule previews |
//! | **Forms** | [`Bibby::forms`] | HTML form backends, submissions, CSV export |
//! | **Webhooks** | [`Bibby::webhooks`] | Signed outgoing webhooks, event publishing, replay, HMAC verification |
//! | **Monitors** | [`Bibby::monitors`] | Uptime monitors, on-demand checks, 90-day status summaries, incidents, heartbeats |
//! | **Vault** | [`Bibby::vault`] | Encrypted secrets, `.env` import/export, versions, burn-after-reading shares |
//!
//! ## Smart `.env` Initialization
//!
//! Add `BYTEBURY_API_TOKEN=bb_live_...` to your `.env` file (or environment), then call
//! [`Bibby::init()`]:
//!
//! ```no_run
//! use bibby::prelude::*;
//!
//! #[tokio::main]
//! async fn main() -> Result<()> {
//! // Automatically loads `.env` (if present) and reads `BYTEBURY_API_TOKEN`.
//! // Optionally honors `BYTEBURY_API_URL` for local/staging gateways.
//! let client = Bibby::init()?;
//!
//! let geo = client.geo().lookup("1.1.1.1").await?;
//! println!("{} — {}", geo.ip, geo.country.name);
//!
//! let email = email! {
//! to: "ada@example.com",
//! subject: "Hello from Bibby",
//! html: "<h1>Welcome to Bytebury!</h1>",
//! };
//! client.mailer().send(&email).await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ## Ergonomic Macros
//!
//! - [`email!`] — concise [`mailer::SendEmailRequest`] construction
//! - [`image_ops!`] — readable [`images::Operation`] pipeline DSL
//! - [`pdf!`] — concise [`pdf::RenderPdfRequest`] with inline JSON template data
//! - [`webhook_event!`] — concise [`webhooks::PublishEventRequest`] with inline JSON payload
//! - [`headers!`] — `BTreeMap<String, String>` header literal for Cron, Webhooks, and Monitors
//! - [`vault_ref!`] — builds `{{vault:project/environment/KEY}}` header placeholders
pub use ;
pub use ;
pub use ;
// Re-export every service module at the crate root for ergonomic imports
// (e.g. `use bibby::geo::IpLocation;` or `use bibby::webhooks::verify_signature;`).
pub use ;
/// Hidden re-export used by declarative macros (`pdf!`, `webhook_event!`).
pub use serde_json as __serde_json;