1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.server.getSession
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[jacquard_derive::lexicon]
9#[derive(
10 serde::Serialize,
11 serde::Deserialize,
12 Debug,
13 Clone,
14 PartialEq,
15 Eq,
16 jacquard_derive::IntoStatic
17)]
18#[serde(rename_all = "camelCase")]
19pub struct GetSessionOutput<'a> {
20 #[serde(skip_serializing_if = "std::option::Option::is_none")]
21 pub active: std::option::Option<bool>,
22 #[serde(borrow)]
23 pub did: jacquard_common::types::string::Did<'a>,
24 #[serde(skip_serializing_if = "std::option::Option::is_none")]
25 #[serde(borrow)]
26 pub did_doc: std::option::Option<jacquard_common::types::value::Data<'a>>,
27 #[serde(skip_serializing_if = "std::option::Option::is_none")]
28 #[serde(borrow)]
29 pub email: std::option::Option<jacquard_common::CowStr<'a>>,
30 #[serde(skip_serializing_if = "std::option::Option::is_none")]
31 pub email_auth_factor: std::option::Option<bool>,
32 #[serde(skip_serializing_if = "std::option::Option::is_none")]
33 pub email_confirmed: std::option::Option<bool>,
34 #[serde(borrow)]
35 pub handle: jacquard_common::types::string::Handle<'a>,
36 /// If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.
37 #[serde(skip_serializing_if = "std::option::Option::is_none")]
38 #[serde(borrow)]
39 pub status: std::option::Option<jacquard_common::CowStr<'a>>,
40}
41
42/// XRPC request marker type
43#[derive(
44 Debug,
45 Clone,
46 Copy,
47 PartialEq,
48 Eq,
49 serde::Serialize,
50 serde::Deserialize,
51 jacquard_derive::IntoStatic
52)]
53pub struct GetSession;
54///Response type for
55///com.atproto.server.getSession
56pub struct GetSessionResponse;
57impl jacquard_common::xrpc::XrpcResp for GetSessionResponse {
58 const NSID: &'static str = "com.atproto.server.getSession";
59 const ENCODING: &'static str = "application/json";
60 type Output<'de> = GetSessionOutput<'de>;
61 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
62}
63
64impl jacquard_common::xrpc::XrpcRequest for GetSession {
65 const NSID: &'static str = "com.atproto.server.getSession";
66 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
67 type Response = GetSessionResponse;
68}
69
70///Endpoint type for
71///com.atproto.server.getSession
72pub struct GetSessionRequest;
73impl jacquard_common::xrpc::XrpcEndpoint for GetSessionRequest {
74 const PATH: &'static str = "/xrpc/com.atproto.server.getSession";
75 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
76 type Request<'de> = GetSession;
77 type Response = GetSessionResponse;
78}