#![doc = "Definitions for the `com.atproto.admin.getModerationReports` namespace."]
#[doc = "`com.atproto.admin.getModerationReports`"]
#[doc = "List moderation reports related to a subject."]
#[async_trait::async_trait]
pub trait GetModerationReports: crate::xrpc::XrpcClient {
async fn get_moderation_reports(
&self,
params: Parameters,
) -> Result<Output, Box<dyn std::error::Error>> {
let body = crate::xrpc::XrpcClient::send::<Error>(
self,
http::Method::GET,
"com.atproto.admin.getModerationReports",
Some(serde_qs::to_string(¶ms)?),
None,
None,
)
.await?;
serde_json::from_slice(&body).map_err(|e| e.into())
}
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Parameters {
#[serde(skip_serializing_if = "Option::is_none")]
pub action_type: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub resolved: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub subject: Option<String>,
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Output {
#[serde(skip_serializing_if = "Option::is_none")]
pub cursor: Option<String>,
pub reports: Vec<crate::com::atproto::admin::defs::ReportView>,
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {}