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
78
79
80
81
82
//! Unofficial Rust SDK for [Loops.so](https://loops.so), the email platform
//! for SaaS.
//!
//! Two layers:
//!
//! - [`LoopsClient`] wraps every Loops endpoint with typed arguments, maps
//! failures to [`LoopsError`], and enforces [safe mode](LoopsClientBuilder::safe_mode).
//! This is what most code should use.
//! - [`generated`] is generated from the Loops OpenAPI spec by [oas3-gen]. It
//! holds the request and response models the client returns, plus the raw
//! `LoopsOpenApiSpecClient` (see [`LoopsClient::low_level`]).
//!
//! ```no_run
//! # async fn run() -> loops_so::Result<()> {
//! use loops_so::{ConfigureOptions, TransactionalOptions};
//!
//! // Or set the LOOPS_API_KEY environment variable.
//! loops_so::configure(ConfigureOptions::new().api_key("your_api_key"));
//! let client = loops_so::get_client()?;
//!
//! let variables = client.get_transactional_variables("clfq6dinn000yl70fgwwyp82l").await?;
//! client
//! .send_transactional_email(
//! "clfq6dinn000yl70fgwwyp82l",
//! "user@example.com",
//! TransactionalOptions::new()
//! .data_variable("firstName", "Jane")
//! .data_variable("inviteLink", "https://myapp.com/invite/abc123"),
//! )
//! .await?;
//! # let _ = variables;
//! # Ok(())
//! # }
//! ```
//!
//! [oas3-gen]: https://github.com/eklipse2k8/oas3-gen
/// Code generated from the Loops OpenAPI spec. Never edit by hand: `just
/// regenerate` replaces the whole directory.
///
/// Two oas3-gen limitations matter if you use these models directly:
///
/// - A decoded member of a discriminated union (a workflow node, an audience
/// filter condition) does not re-emit its tag (`typeName`, `type`) when
/// serialized again. Build request JSON yourself rather than re-sending a
/// decoded model.
/// - The low-level client decodes some failure bodies into untagged enums
/// that keep only the fields the first matching variant knows. The
/// high-level [`LoopsClient`] never does this: its [`LoopsError::Api`]
/// carries the raw JSON body.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;