1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: com.atproto.sync.listRepos
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8#[derive(
9 serde::Serialize,
10 serde::Deserialize,
11 Debug,
12 Clone,
13 PartialEq,
14 Eq,
15 bon::Builder,
16 jacquard_derive::IntoStatic
17)]
18#[builder(start_fn = new)]
19#[serde(rename_all = "camelCase")]
20pub struct ListRepos<'a> {
21 #[serde(skip_serializing_if = "std::option::Option::is_none")]
22 #[serde(borrow)]
23 #[builder(into)]
24 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
25 ///(default: 500, min: 1, max: 1000)
26 #[serde(skip_serializing_if = "std::option::Option::is_none")]
27 pub limit: std::option::Option<i64>,
28}
29
30#[jacquard_derive::lexicon]
31#[derive(
32 serde::Serialize,
33 serde::Deserialize,
34 Debug,
35 Clone,
36 PartialEq,
37 Eq,
38 jacquard_derive::IntoStatic
39)]
40#[serde(rename_all = "camelCase")]
41pub struct ListReposOutput<'a> {
42 #[serde(skip_serializing_if = "std::option::Option::is_none")]
43 #[serde(borrow)]
44 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
45 #[serde(borrow)]
46 pub repos: Vec<jacquard_common::types::value::Data<'a>>,
47}
48
49///Response type for
50///com.atproto.sync.listRepos
51pub struct ListReposResponse;
52impl jacquard_common::xrpc::XrpcResp for ListReposResponse {
53 const NSID: &'static str = "com.atproto.sync.listRepos";
54 const ENCODING: &'static str = "application/json";
55 type Output<'de> = ListReposOutput<'de>;
56 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
57}
58
59impl<'a> jacquard_common::xrpc::XrpcRequest for ListRepos<'a> {
60 const NSID: &'static str = "com.atproto.sync.listRepos";
61 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
62 type Response = ListReposResponse;
63}
64
65///Endpoint type for
66///com.atproto.sync.listRepos
67pub struct ListReposRequest;
68impl jacquard_common::xrpc::XrpcEndpoint for ListReposRequest {
69 const PATH: &'static str = "/xrpc/com.atproto.sync.listRepos";
70 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
71 type Request<'de> = ListRepos<'de>;
72 type Response = ListReposResponse;
73}
74
75#[jacquard_derive::lexicon]
76#[derive(
77 serde::Serialize,
78 serde::Deserialize,
79 Debug,
80 Clone,
81 PartialEq,
82 Eq,
83 jacquard_derive::IntoStatic,
84 bon::Builder
85)]
86#[serde(rename_all = "camelCase")]
87pub struct Repo<'a> {
88 #[serde(skip_serializing_if = "std::option::Option::is_none")]
89 #[builder(into)]
90 pub active: Option<bool>,
91 #[serde(borrow)]
92 pub did: jacquard_common::types::string::Did<'a>,
93 /// Current repo commit CID
94 #[serde(borrow)]
95 pub head: jacquard_common::types::string::Cid<'a>,
96 pub rev: jacquard_common::types::string::Tid,
97 /// 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.
98 #[serde(skip_serializing_if = "std::option::Option::is_none")]
99 #[builder(into)]
100 #[serde(borrow)]
101 pub status: Option<jacquard_common::CowStr<'a>>,
102}