jacquard_api/com_atproto/server/
describe_server.rs

1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.server.describeServer
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 Contact<'a> {
20    #[serde(skip_serializing_if = "std::option::Option::is_none")]
21    #[serde(borrow)]
22    pub email: std::option::Option<jacquard_common::CowStr<'a>>,
23}
24
25#[jacquard_derive::lexicon]
26#[derive(
27    serde::Serialize,
28    serde::Deserialize,
29    Debug,
30    Clone,
31    PartialEq,
32    Eq,
33    jacquard_derive::IntoStatic
34)]
35#[serde(rename_all = "camelCase")]
36pub struct Links<'a> {
37    #[serde(skip_serializing_if = "std::option::Option::is_none")]
38    #[serde(borrow)]
39    pub privacy_policy: std::option::Option<jacquard_common::types::string::Uri<'a>>,
40    #[serde(skip_serializing_if = "std::option::Option::is_none")]
41    #[serde(borrow)]
42    pub terms_of_service: std::option::Option<jacquard_common::types::string::Uri<'a>>,
43}
44
45#[jacquard_derive::lexicon]
46#[derive(
47    serde::Serialize,
48    serde::Deserialize,
49    Debug,
50    Clone,
51    PartialEq,
52    Eq,
53    jacquard_derive::IntoStatic
54)]
55#[serde(rename_all = "camelCase")]
56pub struct DescribeServerOutput<'a> {
57    ///List of domain suffixes that can be used in account handles.
58    #[serde(borrow)]
59    pub available_user_domains: Vec<jacquard_common::CowStr<'a>>,
60    ///Contact information
61    #[serde(skip_serializing_if = "std::option::Option::is_none")]
62    #[serde(borrow)]
63    pub contact: std::option::Option<jacquard_common::types::value::Data<'a>>,
64    #[serde(borrow)]
65    pub did: jacquard_common::types::string::Did<'a>,
66    ///If true, an invite code must be supplied to create an account on this instance.
67    #[serde(skip_serializing_if = "std::option::Option::is_none")]
68    pub invite_code_required: std::option::Option<bool>,
69    ///URLs of service policy documents.
70    #[serde(skip_serializing_if = "std::option::Option::is_none")]
71    #[serde(borrow)]
72    pub links: std::option::Option<jacquard_common::types::value::Data<'a>>,
73    ///If true, a phone verification token must be supplied to create an account on this instance.
74    #[serde(skip_serializing_if = "std::option::Option::is_none")]
75    pub phone_verification_required: std::option::Option<bool>,
76}
77
78/// XRPC request marker type
79#[derive(
80    Debug,
81    Clone,
82    Copy,
83    PartialEq,
84    Eq,
85    serde::Serialize,
86    serde::Deserialize,
87    jacquard_derive::IntoStatic
88)]
89pub struct DescribeServer;
90///Response type for
91///com.atproto.server.describeServer
92pub struct DescribeServerResponse;
93impl jacquard_common::xrpc::XrpcResp for DescribeServerResponse {
94    const NSID: &'static str = "com.atproto.server.describeServer";
95    const ENCODING: &'static str = "application/json";
96    type Output<'de> = DescribeServerOutput<'de>;
97    type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
98}
99
100impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for DescribeServer {
101    const NSID: &'static str = "com.atproto.server.describeServer";
102    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
103    type Response = DescribeServerResponse;
104}
105
106///Endpoint type for
107///com.atproto.server.describeServer
108pub struct DescribeServerRequest;
109impl jacquard_common::xrpc::XrpcEndpoint for DescribeServerRequest {
110    const PATH: &'static str = "/xrpc/com.atproto.server.describeServer";
111    const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
112    type Request<'de> = DescribeServer;
113    type Response = DescribeServerResponse;
114}