Skip to main content

atrium_api/app/bsky/contact/
get_sync_status.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.contact.getSyncStatus` namespace.
3pub const NSID: &str = "app.bsky.contact.getSyncStatus";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct ParametersData {}
7pub type Parameters = crate::types::Object<ParametersData>;
8#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
9#[serde(rename_all = "camelCase")]
10pub struct OutputData {
11    ///If present, indicates the user has imported their contacts. If not present, indicates the user never used the feature or called `app.bsky.contact.removeData` and didn't import again since.
12    #[serde(skip_serializing_if = "core::option::Option::is_none")]
13    pub sync_status: core::option::Option<crate::app::bsky::contact::defs::SyncStatus>,
14}
15pub type Output = crate::types::Object<OutputData>;
16#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
17#[serde(tag = "error", content = "message")]
18pub enum Error {
19    InvalidDid(Option<String>),
20    InternalError(Option<String>),
21}
22impl std::fmt::Display for Error {
23    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
24        match self {
25            Error::InvalidDid(msg) => {
26                write!(_f, "InvalidDid")?;
27                if let Some(msg) = msg {
28                    write!(_f, ": {msg}")?;
29                }
30            }
31            Error::InternalError(msg) => {
32                write!(_f, "InternalError")?;
33                if let Some(msg) = msg {
34                    write!(_f, ": {msg}")?;
35                }
36            }
37        }
38        Ok(())
39    }
40}