shrike 0.1.1

AT Protocol library for Rust
Documentation
// Code generated by lexgen. DO NOT EDIT.

#[derive(Debug, Clone, Default, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerGetAccountInviteCodesParams {
    /// Controls whether any new 'earned' but not 'created' invites should be created.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub create_available: Option<bool>,
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub include_used: Option<bool>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerGetAccountInviteCodesOutput {
    #[serde(default, skip_serializing_if = "Vec::is_empty")]
    pub codes: Vec<crate::api::com::atproto::ServerDefsInviteCode>,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// ServerGetAccountInviteCodes — Get all invite codes for the current account. Requires auth.
pub async fn server_get_account_invite_codes(
    client: &crate::xrpc::Client,
    params: &ServerGetAccountInviteCodesParams,
) -> Result<ServerGetAccountInviteCodesOutput, crate::xrpc::Error> {
    client
        .query("com.atproto.server.getAccountInviteCodes", params)
        .await
}