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
//! # ghl-sdk
//!
//! Unofficial async Rust SDK for the [GoHighLevel](https://www.gohighlevel.com)
//! (HighLevel) API 2.0.
//!
//! - **Auth**: Private Integration Tokens, raw OAuth access tokens, or full
//! OAuth 2.0 with automatic refresh ([`auth`]).
//! - **Resilience**: rate-limit-aware retries with exponential backoff and
//! `Retry-After` support; idempotent-only retry on 5xx/transport errors.
//! - **Pagination**: cursor handling exposed as [`futures_util::Stream`]s.
//! - **Config**: everything works via explicit builder parameters *or*
//! environment variables ([`Ghl::from_env`]).
//! - **Secret hygiene**: tokens live in [`secrecy`] types and are redacted
//! from all `Debug` output.
//!
//! ```no_run
//! use ghl_sdk::{Ghl, contacts::CreateContact};
//!
//! # async fn demo() -> Result<(), ghl_sdk::Error> {
//! let ghl = Ghl::from_env()?; // GHL_PIT_TOKEN or GHL_ACCESS_TOKEN
//! let contact = ghl.contacts().create(CreateContact {
//! location_id: "LOCATION_ID".into(),
//! email: Some("ada@example.com".into()),
//! ..Default::default()
//! }).await?;
//! println!("created {}", contact.id);
//! # Ok(()) }
//! ```
//!
//! *Not affiliated with HighLevel Inc.*
/// Generated data models (DTOs) for the whole GoHighLevel API, re-exported from
/// the [`ghl-models`](https://docs.rs/ghl-models) crate.
///
/// Enable the `models` feature, then pick the API modules you need through
/// `ghl-models`' own per-module features:
///
/// ```toml
/// ghl-sdk = { version = "0.3", features = ["models"] }
/// ghl-models = { version = "0.3", features = ["invoices", "payments"] }
/// ```
///
/// Types live under `models::v2::*` and `models::v3::*`.
pub use ghl_models as models;
pub use ;
pub use ;
pub use ;