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, Identifier, Group};
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 jwt = client.generate_jwt(
23//!         "user-123",
24//!         vec![Identifier::new("email", "user@example.com")],
25//!         vec![Group::new("team", "team-1", "Engineering")],
26//!         Some("admin")
27//!     ).unwrap();
28//!
29//!     println!("JWT: {}", jwt);
30//!
31//!     // Get invitations
32//!     let invitations = client
33//!         .get_invitations_by_target("email", "user@example.com")
34//!         .await
35//!         .unwrap();
36//!
37//!     println!("Found {} invitations", invitations.len());
38//! }
39//! ```
40
41mod client;
42mod error;
43mod types;
44
45pub use client::VortexClient;
46pub use error::VortexError;
47pub use types::*;