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 SyncGetRepoStatusParams {
    /// The DID of the repo.
    pub did: String,
}

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SyncGetRepoStatusOutput {
    pub active: bool,
    pub did: crate::syntax::Did,
    /// Optional field, the current rev of the repo, if active=true
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub rev: Option<crate::syntax::Tid>,
    /// If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// SyncGetRepoStatus — Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.
pub async fn sync_get_repo_status(
    client: &crate::xrpc::Client,
    params: &SyncGetRepoStatusParams,
) -> Result<SyncGetRepoStatusOutput, crate::xrpc::Error> {
    client.query("com.atproto.sync.getRepoStatus", params).await
}