Expand description
Vortex Rust SDK
This crate provides a Rust SDK for the Vortex authentication and invitation management platform.
§Features
- Generate JWTs compatible with React providers
- Full API integration for invitation management
- Async/await support with tokio
- Type-safe API with comprehensive error handling
§Example
use vortex_sdk::{VortexClient, User};
#[tokio::main]
async fn main() {
let client = VortexClient::new(std::env::var("VORTEX_API_KEY").unwrap());
// Generate a JWT
let user = User::new("user-123", "user@example.com")
.with_admin_scopes(vec!["autojoin".to_string()]);
let jwt = client.generate_jwt(&user, None).unwrap();
println!("JWT: {}", jwt);
// Get invitations
let invitations = client
.get_invitations_by_target("email", "user@example.com")
.await
.unwrap();
println!("Found {} invitations", invitations.len());
}Structs§
- Accept
User - User data for accepting invitations (preferred format)
- Create
Invitation Group - Group information for creating invitations
- Create
Invitation Request - Request body for creating an invitation
- Create
Invitation Response - Response from creating an invitation
- Create
Invitation Target - Target for creating an invitation
- Group
- Group information for JWT generation (input) Supports both ‘id’ (legacy) and ‘groupId’ (preferred) for backward compatibility
- Identifier
- Identifier for a user (email, sms, etc.)
- Invitation
- Full invitation details
- Invitation
Acceptance - Invitation acceptance information
- Invitation
Group - Invitation group from API responses This matches the MemberGroups table structure from the API
- Invitation
Target - Invitation target from API responses
- Invitations
Response - Response containing multiple invitations
- Inviter
- Information about the user creating the invitation (the inviter)
- Unfurl
Config - Configuration for link unfurl (Open Graph) metadata Controls how the invitation link appears when shared on social platforms or messaging apps
- User
- User type for JWT generation Optional fields: user_name (max 200 chars), user_avatar_url (HTTPS URL, max 2000 chars), admin_scopes
- Vortex
Client - Vortex Rust SDK Client
Enums§
- Accept
Invitation Param - Accept invitation parameter - supports both new User format and legacy Target format
- Create
Invitation Target Type - Target type for creating invitations
- Delivery
Type - Delivery type for invitations
- Invitation
Status - Current status of an invitation
- Invitation
Target Type - Target type for invitation responses (who was invited)
- Invitation
Type - Type of invitation
- Unfurl
OgType - Valid Open Graph types for unfurl configuration
- Vortex
Error - Error types for Vortex SDK operations