vortex_sdk/lib.rs
1//! Vortex Rust SDK
2//!
3//! This crate provides a Rust SDK for the Vortex authentication and invitation management platform.
4//!
5//! # Features
6//!
7//! - Generate JWTs compatible with React providers
8//! - Full API integration for invitation management
9//! - Async/await support with tokio
10//! - Type-safe API with comprehensive error handling
11//!
12//! # Example
13//!
14//! ```no_run
15//! use vortex_sdk::{VortexClient, User};
16//!
17//! #[tokio::main]
18//! async fn main() {
19//! let client = VortexClient::new(std::env::var("VORTEX_API_KEY").unwrap());
20//!
21//! // Generate a JWT
22//! let user = User::new("user-123", "user@example.com")
23//! .with_admin_scopes(vec!["autojoin".to_string()]);
24//! let jwt = client.generate_jwt(&user, None).unwrap();
25//!
26//! println!("JWT: {}", jwt);
27//!
28//! // Get invitations
29//! let invitations = client
30//! .get_invitations_by_target("email", "user@example.com")
31//! .await
32//! .unwrap();
33//!
34//! println!("Found {} invitations", invitations.len());
35//! }
36//! ```
37
38mod client;
39mod error;
40mod types;
41
42pub use client::VortexClient;
43pub use error::VortexError;
44pub use types::*;