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
88
89
90
91
92
93
94
95
//! # Assinafy Rust SDK
//!
//! Idiomatic, async Rust client for the [Assinafy](https://assinafy.com.br)
//! electronic-signature API (`https://api.assinafy.com.br/v1`).
//!
//! The SDK is organised around a single [`Client`] that exposes a resource
//! module per API surface — signers, documents, assignments, templates, tags,
//! activities, API keys, and authentication helpers. Every call is `async`,
//! returns a strongly-typed [`Result`], and uses the same response envelope
//! the API itself uses (`{ status, message, data }`).
//!
//! ## Quick start
//!
//! ```no_run
//! use assinafy::Client;
//!
//! # async fn run() -> assinafy::Result<()> {
//! let client = Client::builder()
//! .api_key("your-api-key")
//! .build()?;
//!
//! // List signers in an account.
//! let signers = client
//! .signers("102d25a489f34a275d31a16045fd")
//! .list()
//! .send()
//! .await?;
//!
//! for s in &signers.data {
//! println!("{} <{:?}>", s.full_name, s.email);
//! }
//! # Ok(()) }
//! ```
//!
//! ## Authentication
//!
//! The SDK supports the three credential schemes the API accepts:
//!
//! * [`Auth::ApiKey`] — sent as the `X-Api-Key` header (recommended for
//! server-to-server use).
//! * [`Auth::Bearer`] — sent as `Authorization: Bearer <token>` (for tokens
//! obtained from [`AuthApi::login`](crate::resources::AuthApi::login)).
//! * [`Auth::AccessToken`] — sent as the documented `?access-token=...` query
//! parameter when that legacy form is required.
//! * [`Auth::AccessCode`] — sent as the `?signer-access-code=...` query
//! parameter for signer-facing endpoints.
//!
//! Switch credentials at runtime with [`Client::with_auth`].
//!
//! ## Environments
//!
//! Both production and sandbox base URLs are first-class:
//!
//! ```
//! use assinafy::Client;
//!
//! let sandbox = Client::builder()
//! .api_key("test-key")
//! .sandbox()
//! .build()
//! .unwrap();
//! ```
//!
//! ## Errors
//!
//! All operations return [`Result<T, Error>`](Error). API failures preserve
//! the HTTP status, the server-provided message and the raw `data` payload so
//! callers can branch on specific error codes without losing fidelity.
//!
//! ## Cargo features
//!
//! * `rustls-tls` *(default)* — TLS via [rustls].
//! * `native-tls` — TLS via the operating system's native stack.
//!
//! [rustls]: https://docs.rs/rustls
pub use Auth;
pub use ;
pub use BaseUrl;
pub use ;
pub use Envelope;
pub use ;