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