pub const NSID: &str = "app.bsky.contact.getMatches";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ParametersData {
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub cursor: core::option::Option<String>,
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub limit: core::option::Option<crate::types::LimitedNonZeroU8<100u8>>,
}
pub type Parameters = crate::types::Object<ParametersData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct OutputData {
#[serde(skip_serializing_if = "core::option::Option::is_none")]
pub cursor: core::option::Option<String>,
pub matches: Vec<crate::app::bsky::actor::defs::ProfileView>,
}
pub type Output = crate::types::Object<OutputData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "error", content = "message")]
pub enum Error {
InvalidDid(Option<String>),
InvalidLimit(Option<String>),
InvalidCursor(Option<String>),
InternalError(Option<String>),
}
impl std::fmt::Display for Error {
fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Error::InvalidDid(msg) => {
write!(_f, "InvalidDid")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
Error::InvalidLimit(msg) => {
write!(_f, "InvalidLimit")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
Error::InvalidCursor(msg) => {
write!(_f, "InvalidCursor")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
Error::InternalError(msg) => {
write!(_f, "InternalError")?;
if let Some(msg) = msg {
write!(_f, ": {msg}")?;
}
}
}
Ok(())
}
}