1mod authorization;
9mod entitlement;
10mod error;
11mod license_file;
12mod login;
13mod preferences;
14mod session;
15mod state;
16mod transport;
17
18pub const UNCLASSIFIED_ERROR: &str = "sdk_response_unclassified";
26
27pub use authorization::{holds, Authorization, MenuButton, MenuNode};
28pub use entitlement::{
29 unix_now, Entitlement, Feature, InactiveReason, LicenseState, Limit, LimitGrant, PlanRef,
30};
31pub use error::SnaplinkError;
32pub use license_file::{EntitlementFile, LicenseError, LicenseTrust};
33pub use login::{
34 AccountContext, ActivationPreparation, LoginOptions, LoginResult, LoginSetupOptions,
35 SetupOptions, SnaplinkClient, TokenResponse,
36};
37pub use preferences::{
38 build_login_preference_handoff, from_stored_preferences, to_update_request, PreferenceError,
39 PresentationPreferences, PresentationPreferencesPatch, ThemeMode,
40};
41pub use state::{MemoryStateStore, StateStore};
42
43pub fn error_from_response(status: u16, body: &str) -> SnaplinkError {
50 parse_oauth_error(status, body)
51}
52#[cfg(feature = "blocking")]
53pub use transport::BlockingTransport;
54pub use transport::{
55 Method, ReqwestTransport, Transport, TransportError, TransportRequest, TransportResponse,
56};
57
58pub(crate) use login::{decode_token, parse_oauth_error, token_endpoint};