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
83
84
85
86
87
//! The Rust client for the [HEY](https://www.hey.com) API.
//!
//! Types, routes and service methods are generated from the Smithy model in the
//! repository's `spec/` directory; everything else in this crate is the plumbing they
//! share: authentication, retries, redirects, the response cache, pagination and account
//! scope. All of it sends through one [`http::HttpClient`], which an application may
//! replace with its own; the `reqwest` feature, on by default, ships one.
//!
//! ```no_run
//! use hey_sdk::{Client, Config, StaticTokenProvider};
//!
//! # async fn run() -> Result<(), hey_sdk::Error> {
//! let client = Client::new(Config::default(), StaticTokenProvider::new(std::env::var("HEY_TOKEN").unwrap()))?;
//! for mailbox in client.boxes().list().await?.iter() {
//! println!("{} ({})", mailbox.name, mailbox.kind);
//! }
//! # Ok(())
//! # }
//! ```
// docs.rs builds with `--cfg docsrs` on nightly, where `doc_cfg` badges the items that
// exist only with a feature on.
/// Who a request goes out as: the token it carries and the strategy that puts it on.
/// The response cache: JSON reads kept by `ETag`, so a repeated one is answered from a 304.
/// The client, how it is built, and the send every call goes through.
/// What a client needs to know before it can talk to HEY, and where that is read from.
/// The error every call can answer with, its categories, and the exit status each maps to.
/// Signing in to HEY over OAuth 2.0: discovery, the authorization code flow with PKCE, and
/// refresh.
/// A request the client has not sent yet, and everything a caller may say about it first.
/// Paginated reads: one page with the cursor for the next, and the walks that follow it.
/// What the model says about an operation: its method, its path template and how it behaves.
/// The checks that keep credentials on the HEY origin, and the redaction that keeps them out
/// of logs.
/// The scalars HEY's records are made of: dates, instants, and strings that must not be
/// logged.
/// Recognizing HEY paths and URLs as pasted from the web app, offline.
/// The SDK's version, the API contract it was built against, and the `User-Agent` naming
/// both.
pub use ;
pub use ;
pub use Config;
pub use ;
pub use FormResponse;
pub use HttpClient;
pub use Operation;
pub use Page;
pub use ;
pub use ;
/// The request and response types HEY speaks, generated from the model.
/// Every modelled route, generated from the model.