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
//! Minimal-dependency Rust SDK for the [Scanii](https://www.scanii.com)
//! content security API.
//!
//! See the API reference at <https://scanii.github.io/openapi/v22/>.
//!
//! # Principles
//!
//! 1. **Light.** The smallest viable dependency set for HTTPS in Rust:
//! `ureq`, `serde`, `serde_json`. `rustls` is pulled transitively by
//! ureq's `tls` feature — never depended on directly.
//! 2. **Up to date.** Tracks the latest Scanii API.
//! 3. **Integration-only.** Wraps the REST API. Retries, concurrency, and
//! batching are the caller's responsibility.
//!
//! # Quickstart
//!
//! ```no_run
//! use scanii::{ScaniiClient, ScaniiTarget};
//! # fn main() -> Result<(), scanii::ScaniiError> {
//! let client = ScaniiClient::builder()
//! .key("your-key")
//! .secret("your-secret")
//! .target(ScaniiTarget::us1())
//! .build()?;
//!
//! let result = client.process_file(std::path::Path::new("./file.pdf"), None, None)?;
//! println!("findings: {:?}", result.findings);
//! # Ok(())
//! # }
//! ```
//!
//! # Errors
//!
//! All public methods return [`Result<T, ScaniiError>`]. The error type is
//! an enum: [`ScaniiError::Auth`] for `401/403`, [`ScaniiError::RateLimit`]
//! for `429` (with optional `retry_after`), and [`ScaniiError::Http`] for
//! other non-success statuses.
//!
//! # Local testing with scanii-cli
//!
//! ```bash
//! docker run -d --name scanii-cli -p 4000:4000 ghcr.io/scanii/scanii-cli:latest server
//! cargo test
//! ```
//!
//! Use [`ScaniiTarget::from_url`] for custom endpoints:
//! `ScaniiClient::builder().target(ScaniiTarget::from_url("http://localhost:4000"))`.
//! Set `SCANII_TEST_ENDPOINT` to override the default `http://localhost:4000`.
pub use ;
pub use ScaniiError;
pub use ;
pub use ScaniiTarget;