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: EventDetails<'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 EventDetails<'a> {
92 #[serde(rename = "tools.ozone.hosting.getAccountHistory#accountCreated")]
93 AccountCreated(
94 Box<crate::tools_ozone::hosting::get_account_history::AccountCreated<'a>>,
95 ),
96 #[serde(rename = "tools.ozone.hosting.getAccountHistory#emailUpdated")]
97 EmailUpdated(
98 Box<crate::tools_ozone::hosting::get_account_history::EmailUpdated<'a>>,
99 ),
100 #[serde(rename = "tools.ozone.hosting.getAccountHistory#emailConfirmed")]
101 EmailConfirmed(
102 Box<crate::tools_ozone::hosting::get_account_history::EmailConfirmed<'a>>,
103 ),
104 #[serde(rename = "tools.ozone.hosting.getAccountHistory#passwordUpdated")]
105 PasswordUpdated(
106 Box<crate::tools_ozone::hosting::get_account_history::PasswordUpdated<'a>>,
107 ),
108 #[serde(rename = "tools.ozone.hosting.getAccountHistory#handleUpdated")]
109 HandleUpdated(
110 Box<crate::tools_ozone::hosting::get_account_history::HandleUpdated<'a>>,
111 ),
112}
113
114#[jacquard_derive::lexicon]
115#[derive(
116 serde::Serialize,
117 serde::Deserialize,
118 Debug,
119 Clone,
120 PartialEq,
121 Eq,
122 jacquard_derive::IntoStatic
123)]
124#[serde(rename_all = "camelCase")]
125pub struct HandleUpdated<'a> {
126 #[serde(borrow)]
127 pub handle: jacquard_common::types::string::Handle<'a>,
128}
129
130#[derive(
131 serde::Serialize,
132 serde::Deserialize,
133 Debug,
134 Clone,
135 PartialEq,
136 Eq,
137 bon::Builder,
138 jacquard_derive::IntoStatic
139)]
140#[builder(start_fn = new)]
141#[serde(rename_all = "camelCase")]
142pub struct GetAccountHistory<'a> {
143 #[serde(skip_serializing_if = "std::option::Option::is_none")]
144 #[serde(borrow)]
145 #[builder(into)]
146 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
147 #[serde(borrow)]
148 pub did: jacquard_common::types::string::Did<'a>,
149 #[serde(skip_serializing_if = "std::option::Option::is_none")]
150 #[serde(borrow)]
151 pub events: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
152 ///(default: 50, min: 1, max: 100)
153 #[serde(skip_serializing_if = "std::option::Option::is_none")]
154 pub limit: std::option::Option<i64>,
155}
156
157#[jacquard_derive::lexicon]
158#[derive(
159 serde::Serialize,
160 serde::Deserialize,
161 Debug,
162 Clone,
163 PartialEq,
164 Eq,
165 jacquard_derive::IntoStatic
166)]
167#[serde(rename_all = "camelCase")]
168pub struct GetAccountHistoryOutput<'a> {
169 #[serde(skip_serializing_if = "std::option::Option::is_none")]
170 #[serde(borrow)]
171 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
172 #[serde(borrow)]
173 pub events: Vec<jacquard_common::types::value::Data<'a>>,
174}
175
176///Response type for
177///tools.ozone.hosting.getAccountHistory
178pub struct GetAccountHistoryResponse;
179impl jacquard_common::xrpc::XrpcResp for GetAccountHistoryResponse {
180 const NSID: &'static str = "tools.ozone.hosting.getAccountHistory";
181 const ENCODING: &'static str = "application/json";
182 type Output<'de> = GetAccountHistoryOutput<'de>;
183 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
184}
185
186impl<'a> jacquard_common::xrpc::XrpcRequest for GetAccountHistory<'a> {
187 const NSID: &'static str = "tools.ozone.hosting.getAccountHistory";
188 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
189 type Response = GetAccountHistoryResponse;
190}
191
192///Endpoint type for
193///tools.ozone.hosting.getAccountHistory
194pub struct GetAccountHistoryRequest;
195impl jacquard_common::xrpc::XrpcEndpoint for GetAccountHistoryRequest {
196 const PATH: &'static str = "/xrpc/tools.ozone.hosting.getAccountHistory";
197 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
198 type Request<'de> = GetAccountHistory<'de>;
199 type Response = GetAccountHistoryResponse;
200}
201
202#[jacquard_derive::lexicon]
203#[derive(
204 serde::Serialize,
205 serde::Deserialize,
206 Debug,
207 Clone,
208 PartialEq,
209 Eq,
210 jacquard_derive::IntoStatic
211)]
212#[serde(rename_all = "camelCase")]
213pub struct PasswordUpdated<'a> {}