shrike 0.1.1

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 RepoDeleteRecordInput {
    /// The NSID of the record collection.
    pub collection: crate::syntax::Nsid,
    /// The handle or DID of the repo (aka, current account).
    pub repo: crate::syntax::AtIdentifier,
    /// The Record Key.
    pub rkey: crate::syntax::RecordKey,
    /// Compare and swap with the previous commit by CID.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub swap_commit: Option<String>,
    /// Compare and swap with the previous record by CID.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub swap_record: Option<String>,
    /// 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 RepoDeleteRecordOutput {
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub commit: Option<crate::api::com::atproto::RepoDefsCommitMeta>,
    /// Extra fields not defined in the schema.
    #[serde(flatten)]
    pub extra: std::collections::HashMap<String, serde_json::Value>,
}

/// RepoDeleteRecord — Delete a repository record, or ensure it doesn't exist. Requires auth, implemented by PDS.
pub async fn repo_delete_record(
    client: &crate::xrpc::Client,
    input: &RepoDeleteRecordInput,
) -> Result<RepoDeleteRecordOutput, crate::xrpc::Error> {
    client
        .procedure("com.atproto.repo.deleteRecord", input)
        .await
}