atrium_api/com/atproto/server/
refresh_session.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `com.atproto.server.refreshSession` namespace.
3pub const NSID: &str = "com.atproto.server.refreshSession";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct OutputData {
7    pub access_jwt: String,
8    #[serde(skip_serializing_if = "core::option::Option::is_none")]
9    pub active: core::option::Option<bool>,
10    pub did: crate::types::string::Did,
11    #[serde(skip_serializing_if = "core::option::Option::is_none")]
12    pub did_doc: core::option::Option<crate::types::Unknown>,
13    pub handle: crate::types::string::Handle,
14    pub refresh_jwt: String,
15    ///Hosting status of the account. If not specified, then assume 'active'.
16    #[serde(skip_serializing_if = "core::option::Option::is_none")]
17    pub status: core::option::Option<String>,
18}
19pub type Output = crate::types::Object<OutputData>;
20#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
21#[serde(tag = "error", content = "message")]
22pub enum Error {
23    AccountTakedown(Option<String>),
24}
25impl std::fmt::Display for Error {
26    fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
27        match self {
28            Error::AccountTakedown(msg) => {
29                write!(_f, "AccountTakedown")?;
30                if let Some(msg) = msg {
31                    write!(_f, ": {msg}")?;
32                }
33            }
34        }
35        Ok(())
36    }
37}