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
//! # sf-client
//!
//! Core HTTP client infrastructure for Salesforce APIs.
//!
//! This crate provides the foundational HTTP client with:
//! - Automatic retry with exponential backoff and jitter
//! - Compression support (gzip, deflate)
//! - Rate limit detection and handling
//! - ETag/conditional request support
//! - Connection pooling
//! - Request/response tracing
//!
//! ## Architecture
//!
//! ```text
//! ┌─────────────────────────────────────────────────────────────┐
//! │ Application Layer │
//! │ (sf-rest, sf-bulk, sf-metadata, sf-tooling) │
//! └─────────────────────────────────────────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────────────────────────────────────────┐
//! │ SalesforceClient │
//! │ - Holds credentials + HTTP client │
//! │ - Provides typed JSON methods (get_json, post_json, etc.) │
//! │ - Handles authentication headers │
//! └─────────────────────────────────────────────────────────────┘
//! │
//! ▼
//! ┌─────────────────────────────────────────────────────────────┐
//! │ SfHttpClient │
//! │ - Raw HTTP with retry, compression, rate limiting │
//! │ - Request building with conditionals │
//! │ - Response handling │
//! └─────────────────────────────────────────────────────────────┘
//! ```
//!
//! ## Example
//!
//! ```rust,ignore
//! use sf_client::{SalesforceClient, ClientConfig};
//! use sf_auth::SalesforceCredentials;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), sf_client::Error> {
//! let creds = SalesforceCredentials::from_env()?;
//! let client = SalesforceClient::new(creds)?;
//!
//! // Typed JSON request
//! let user: serde_json::Value = client
//! .get_json("/services/oauth2/userinfo")
//! .await?;
//!
//! // POST with body
//! let result: CreateResult = client
//! .post_json("/services/data/v62.0/sobjects/Account", &new_account)
//! .await?;
//!
//! Ok(())
//! }
//! ```
pub use SfHttpClient;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use MetadataComponentDependency;
/// Default Salesforce API version
pub const DEFAULT_API_VERSION: &str = "62.0";
/// User-Agent string for the client
pub const USER_AGENT: &str = concat!;