shrike 0.1.0

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

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerCreateInviteCodeInput {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub for_account: Option<crate::syntax::Did>,
    pub use_count: i64,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerCreateInviteCodeOutput {
    pub code: String,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// ServerCreateInviteCode — Create an invite code.
pub async fn server_create_invite_code(
    client: &crate::xrpc::Client,
    input: &ServerCreateInviteCodeInput,
) -> Result<ServerCreateInviteCodeOutput, crate::xrpc::Error> {
    client
        .procedure("com.atproto.server.createInviteCode", input)
        .await
}