Overview

The InvitationListResponse struct represents the response returned when fetching a paginated list of user invitations.

Definition

pub struct InvitationListResponse {
    pub data: Vec<UserInvitation>,
    pub has_more: bool,
}

Fields

data
Vec<UserInvitation>
required
A vector containing the invitations for the current page.
has_more
bool
required
Indicates whether there are more invitations available beyond the current page.

Usage Example

use wacht::api::users::*;

// Fetch pending invitations with pagination
let options = ListInvitationsOptions {
    page: Some(1),
    per_page: Some(50),
    status: Some("pending".to_string()),
};

let response = fetch_invitations(Some(options)).await?;

println!("Found {} invitations", response.data.len());

if response.has_more {
    println!("More invitations available on next page");
}

// Process invitations
for invitation in response.data {
    println!("Invitation: {} -> {}", invitation.id, invitation.email);
}

See Also