A better Rust ATProto crate
at lifetimes 5.1 kB view raw
1// @generated by jacquard-lexicon. DO NOT EDIT. 2// 3// Lexicon: tools.ozone.hosting.getAccountHistory 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 AccountCreated<'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 #[serde(skip_serializing_if = "std::option::Option::is_none")] 24 #[serde(borrow)] 25 pub handle: std::option::Option<jacquard_common::types::string::Handle<'a>>, 26} 27 28#[jacquard_derive::lexicon] 29#[derive( 30 serde::Serialize, 31 serde::Deserialize, 32 Debug, 33 Clone, 34 PartialEq, 35 Eq, 36 jacquard_derive::IntoStatic 37)] 38#[serde(rename_all = "camelCase")] 39pub struct EmailConfirmed<'a> { 40 #[serde(borrow)] 41 pub email: jacquard_common::CowStr<'a>, 42} 43 44#[jacquard_derive::lexicon] 45#[derive( 46 serde::Serialize, 47 serde::Deserialize, 48 Debug, 49 Clone, 50 PartialEq, 51 Eq, 52 jacquard_derive::IntoStatic 53)] 54#[serde(rename_all = "camelCase")] 55pub struct EmailUpdated<'a> { 56 #[serde(borrow)] 57 pub email: jacquard_common::CowStr<'a>, 58} 59 60#[jacquard_derive::lexicon] 61#[derive( 62 serde::Serialize, 63 serde::Deserialize, 64 Debug, 65 Clone, 66 PartialEq, 67 Eq, 68 jacquard_derive::IntoStatic 69)] 70#[serde(rename_all = "camelCase")] 71pub struct Event<'a> { 72 pub created_at: jacquard_common::types::string::Datetime, 73 #[serde(borrow)] 74 pub created_by: jacquard_common::CowStr<'a>, 75 #[serde(borrow)] 76 pub details: EventRecordDetails<'a>, 77} 78 79#[jacquard_derive::open_union] 80#[derive( 81 serde::Serialize, 82 serde::Deserialize, 83 Debug, 84 Clone, 85 PartialEq, 86 Eq, 87 jacquard_derive::IntoStatic 88)] 89#[serde(tag = "$type")] 90#[serde(bound(deserialize = "'de: 'a"))] 91pub enum EventRecordDetails<'a> {} 92#[jacquard_derive::lexicon] 93#[derive( 94 serde::Serialize, 95 serde::Deserialize, 96 Debug, 97 Clone, 98 PartialEq, 99 Eq, 100 jacquard_derive::IntoStatic 101)] 102#[serde(rename_all = "camelCase")] 103pub struct HandleUpdated<'a> { 104 #[serde(borrow)] 105 pub handle: jacquard_common::types::string::Handle<'a>, 106} 107 108#[derive( 109 serde::Serialize, 110 serde::Deserialize, 111 Debug, 112 Clone, 113 PartialEq, 114 Eq, 115 bon::Builder, 116 jacquard_derive::IntoStatic 117)] 118#[builder(start_fn = new)] 119#[serde(rename_all = "camelCase")] 120pub struct GetAccountHistory<'a> { 121 #[serde(skip_serializing_if = "std::option::Option::is_none")] 122 #[serde(borrow)] 123 #[builder(into)] 124 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>, 125 #[serde(borrow)] 126 pub did: jacquard_common::types::string::Did<'a>, 127 #[serde(skip_serializing_if = "std::option::Option::is_none")] 128 #[serde(borrow)] 129 pub events: std::option::Option<Vec<jacquard_common::CowStr<'a>>>, 130 ///(default: 50, min: 1, max: 100) 131 #[serde(skip_serializing_if = "std::option::Option::is_none")] 132 pub limit: std::option::Option<i64>, 133} 134 135#[jacquard_derive::lexicon] 136#[derive( 137 serde::Serialize, 138 serde::Deserialize, 139 Debug, 140 Clone, 141 PartialEq, 142 Eq, 143 jacquard_derive::IntoStatic 144)] 145#[serde(rename_all = "camelCase")] 146pub struct GetAccountHistoryOutput<'a> { 147 #[serde(skip_serializing_if = "std::option::Option::is_none")] 148 #[serde(borrow)] 149 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>, 150 #[serde(borrow)] 151 pub events: Vec<jacquard_common::types::value::Data<'a>>, 152} 153 154///Response type for 155///tools.ozone.hosting.getAccountHistory 156pub struct GetAccountHistoryResponse; 157impl jacquard_common::xrpc::XrpcResp for GetAccountHistoryResponse { 158 const NSID: &'static str = "tools.ozone.hosting.getAccountHistory"; 159 const ENCODING: &'static str = "application/json"; 160 type Output<'de> = GetAccountHistoryOutput<'de>; 161 type Err<'de> = jacquard_common::xrpc::GenericError<'de>; 162} 163 164impl<'de> jacquard_common::xrpc::XrpcRequest<'de> for GetAccountHistory<'de> { 165 const NSID: &'static str = "tools.ozone.hosting.getAccountHistory"; 166 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 167 type Response = GetAccountHistoryResponse; 168} 169 170///Endpoint type for 171///tools.ozone.hosting.getAccountHistory 172pub struct GetAccountHistoryRequest; 173impl jacquard_common::xrpc::XrpcEndpoint for GetAccountHistoryRequest { 174 const PATH: &'static str = "/xrpc/tools.ozone.hosting.getAccountHistory"; 175 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; 176 type Request<'de> = GetAccountHistory<'de>; 177 type Response = GetAccountHistoryResponse; 178} 179 180#[jacquard_derive::lexicon] 181#[derive( 182 serde::Serialize, 183 serde::Deserialize, 184 Debug, 185 Clone, 186 PartialEq, 187 Eq, 188 jacquard_derive::IntoStatic 189)] 190#[serde(rename_all = "camelCase")] 191pub struct PasswordUpdated<'a> {}