atproto blogging
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
29fn lexicon_doc_tools_ozone_hosting_getAccountHistory() -> ::jacquard_lexicon::lexicon::LexiconDoc<
30 'static,
31> {
32 ::jacquard_lexicon::lexicon::LexiconDoc {
33 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
34 id: ::jacquard_common::CowStr::new_static(
35 "tools.ozone.hosting.getAccountHistory",
36 ),
37 revision: None,
38 description: None,
39 defs: {
40 let mut map = ::alloc::collections::BTreeMap::new();
41 map.insert(
42 ::jacquard_common::smol_str::SmolStr::new_static("accountCreated"),
43 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
44 description: None,
45 required: Some(vec![]),
46 nullable: None,
47 properties: {
48 #[allow(unused_mut)]
49 let mut map = ::alloc::collections::BTreeMap::new();
50 map.insert(
51 ::jacquard_common::smol_str::SmolStr::new_static("email"),
52 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
53 description: None,
54 format: None,
55 default: None,
56 min_length: None,
57 max_length: None,
58 min_graphemes: None,
59 max_graphemes: None,
60 r#enum: None,
61 r#const: None,
62 known_values: None,
63 }),
64 );
65 map.insert(
66 ::jacquard_common::smol_str::SmolStr::new_static("handle"),
67 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
68 description: None,
69 format: Some(
70 ::jacquard_lexicon::lexicon::LexStringFormat::Handle,
71 ),
72 default: None,
73 min_length: None,
74 max_length: None,
75 min_graphemes: None,
76 max_graphemes: None,
77 r#enum: None,
78 r#const: None,
79 known_values: None,
80 }),
81 );
82 map
83 },
84 }),
85 );
86 map.insert(
87 ::jacquard_common::smol_str::SmolStr::new_static("emailConfirmed"),
88 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
89 description: None,
90 required: Some(
91 vec![::jacquard_common::smol_str::SmolStr::new_static("email")],
92 ),
93 nullable: None,
94 properties: {
95 #[allow(unused_mut)]
96 let mut map = ::alloc::collections::BTreeMap::new();
97 map.insert(
98 ::jacquard_common::smol_str::SmolStr::new_static("email"),
99 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
100 description: None,
101 format: None,
102 default: None,
103 min_length: None,
104 max_length: None,
105 min_graphemes: None,
106 max_graphemes: None,
107 r#enum: None,
108 r#const: None,
109 known_values: None,
110 }),
111 );
112 map
113 },
114 }),
115 );
116 map.insert(
117 ::jacquard_common::smol_str::SmolStr::new_static("emailUpdated"),
118 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
119 description: None,
120 required: Some(
121 vec![::jacquard_common::smol_str::SmolStr::new_static("email")],
122 ),
123 nullable: None,
124 properties: {
125 #[allow(unused_mut)]
126 let mut map = ::alloc::collections::BTreeMap::new();
127 map.insert(
128 ::jacquard_common::smol_str::SmolStr::new_static("email"),
129 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
130 description: None,
131 format: None,
132 default: None,
133 min_length: None,
134 max_length: None,
135 min_graphemes: None,
136 max_graphemes: None,
137 r#enum: None,
138 r#const: None,
139 known_values: None,
140 }),
141 );
142 map
143 },
144 }),
145 );
146 map.insert(
147 ::jacquard_common::smol_str::SmolStr::new_static("event"),
148 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
149 description: None,
150 required: Some(
151 vec![
152 ::jacquard_common::smol_str::SmolStr::new_static("details"),
153 ::jacquard_common::smol_str::SmolStr::new_static("createdBy"),
154 ::jacquard_common::smol_str::SmolStr::new_static("createdAt")
155 ],
156 ),
157 nullable: None,
158 properties: {
159 #[allow(unused_mut)]
160 let mut map = ::alloc::collections::BTreeMap::new();
161 map.insert(
162 ::jacquard_common::smol_str::SmolStr::new_static(
163 "createdAt",
164 ),
165 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
166 description: None,
167 format: Some(
168 ::jacquard_lexicon::lexicon::LexStringFormat::Datetime,
169 ),
170 default: None,
171 min_length: None,
172 max_length: None,
173 min_graphemes: None,
174 max_graphemes: None,
175 r#enum: None,
176 r#const: None,
177 known_values: None,
178 }),
179 );
180 map.insert(
181 ::jacquard_common::smol_str::SmolStr::new_static(
182 "createdBy",
183 ),
184 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
185 description: None,
186 format: None,
187 default: None,
188 min_length: None,
189 max_length: None,
190 min_graphemes: None,
191 max_graphemes: None,
192 r#enum: None,
193 r#const: None,
194 known_values: None,
195 }),
196 );
197 map.insert(
198 ::jacquard_common::smol_str::SmolStr::new_static("details"),
199 ::jacquard_lexicon::lexicon::LexObjectProperty::Union(::jacquard_lexicon::lexicon::LexRefUnion {
200 description: None,
201 refs: vec![
202 ::jacquard_common::CowStr::new_static("#accountCreated"),
203 ::jacquard_common::CowStr::new_static("#emailUpdated"),
204 ::jacquard_common::CowStr::new_static("#emailConfirmed"),
205 ::jacquard_common::CowStr::new_static("#passwordUpdated"),
206 ::jacquard_common::CowStr::new_static("#handleUpdated")
207 ],
208 closed: None,
209 }),
210 );
211 map
212 },
213 }),
214 );
215 map.insert(
216 ::jacquard_common::smol_str::SmolStr::new_static("handleUpdated"),
217 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
218 description: None,
219 required: Some(
220 vec![::jacquard_common::smol_str::SmolStr::new_static("handle")],
221 ),
222 nullable: None,
223 properties: {
224 #[allow(unused_mut)]
225 let mut map = ::alloc::collections::BTreeMap::new();
226 map.insert(
227 ::jacquard_common::smol_str::SmolStr::new_static("handle"),
228 ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString {
229 description: None,
230 format: Some(
231 ::jacquard_lexicon::lexicon::LexStringFormat::Handle,
232 ),
233 default: None,
234 min_length: None,
235 max_length: None,
236 min_graphemes: None,
237 max_graphemes: None,
238 r#enum: None,
239 r#const: None,
240 known_values: None,
241 }),
242 );
243 map
244 },
245 }),
246 );
247 map.insert(
248 ::jacquard_common::smol_str::SmolStr::new_static("main"),
249 ::jacquard_lexicon::lexicon::LexUserType::XrpcQuery(::jacquard_lexicon::lexicon::LexXrpcQuery {
250 description: None,
251 parameters: Some(
252 ::jacquard_lexicon::lexicon::LexXrpcQueryParameter::Params(::jacquard_lexicon::lexicon::LexXrpcParameters {
253 description: None,
254 required: Some(
255 vec![
256 ::jacquard_common::smol_str::SmolStr::new_static("did")
257 ],
258 ),
259 properties: {
260 #[allow(unused_mut)]
261 let mut map = ::alloc::collections::BTreeMap::new();
262 map.insert(
263 ::jacquard_common::smol_str::SmolStr::new_static("cursor"),
264 ::jacquard_lexicon::lexicon::LexXrpcParametersProperty::String(::jacquard_lexicon::lexicon::LexString {
265 description: None,
266 format: None,
267 default: None,
268 min_length: None,
269 max_length: None,
270 min_graphemes: None,
271 max_graphemes: None,
272 r#enum: None,
273 r#const: None,
274 known_values: None,
275 }),
276 );
277 map.insert(
278 ::jacquard_common::smol_str::SmolStr::new_static("did"),
279 ::jacquard_lexicon::lexicon::LexXrpcParametersProperty::String(::jacquard_lexicon::lexicon::LexString {
280 description: None,
281 format: Some(
282 ::jacquard_lexicon::lexicon::LexStringFormat::Did,
283 ),
284 default: None,
285 min_length: None,
286 max_length: None,
287 min_graphemes: None,
288 max_graphemes: None,
289 r#enum: None,
290 r#const: None,
291 known_values: None,
292 }),
293 );
294 map.insert(
295 ::jacquard_common::smol_str::SmolStr::new_static("events"),
296 ::jacquard_lexicon::lexicon::LexXrpcParametersProperty::Array(::jacquard_lexicon::lexicon::LexPrimitiveArray {
297 description: None,
298 items: ::jacquard_lexicon::lexicon::LexPrimitiveArrayItem::String(::jacquard_lexicon::lexicon::LexString {
299 description: None,
300 format: None,
301 default: None,
302 min_length: None,
303 max_length: None,
304 min_graphemes: None,
305 max_graphemes: None,
306 r#enum: None,
307 r#const: None,
308 known_values: None,
309 }),
310 min_length: None,
311 max_length: None,
312 }),
313 );
314 map.insert(
315 ::jacquard_common::smol_str::SmolStr::new_static("limit"),
316 ::jacquard_lexicon::lexicon::LexXrpcParametersProperty::Integer(::jacquard_lexicon::lexicon::LexInteger {
317 description: None,
318 default: None,
319 minimum: None,
320 maximum: None,
321 r#enum: None,
322 r#const: None,
323 }),
324 );
325 map
326 },
327 }),
328 ),
329 output: None,
330 errors: None,
331 }),
332 );
333 map.insert(
334 ::jacquard_common::smol_str::SmolStr::new_static("passwordUpdated"),
335 ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject {
336 description: None,
337 required: Some(vec![]),
338 nullable: None,
339 properties: {
340 #[allow(unused_mut)]
341 let mut map = ::alloc::collections::BTreeMap::new();
342 map
343 },
344 }),
345 );
346 map
347 },
348 }
349}
350
351impl<'a> ::jacquard_lexicon::schema::LexiconSchema for AccountCreated<'a> {
352 fn nsid() -> &'static str {
353 "tools.ozone.hosting.getAccountHistory"
354 }
355 fn def_name() -> &'static str {
356 "accountCreated"
357 }
358 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
359 lexicon_doc_tools_ozone_hosting_getAccountHistory()
360 }
361 fn validate(
362 &self,
363 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
364 Ok(())
365 }
366}
367
368#[jacquard_derive::lexicon]
369#[derive(
370 serde::Serialize,
371 serde::Deserialize,
372 Debug,
373 Clone,
374 PartialEq,
375 Eq,
376 jacquard_derive::IntoStatic,
377 Default
378)]
379#[serde(rename_all = "camelCase")]
380pub struct EmailConfirmed<'a> {
381 #[serde(borrow)]
382 pub email: jacquard_common::CowStr<'a>,
383}
384
385impl<'a> ::jacquard_lexicon::schema::LexiconSchema for EmailConfirmed<'a> {
386 fn nsid() -> &'static str {
387 "tools.ozone.hosting.getAccountHistory"
388 }
389 fn def_name() -> &'static str {
390 "emailConfirmed"
391 }
392 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
393 lexicon_doc_tools_ozone_hosting_getAccountHistory()
394 }
395 fn validate(
396 &self,
397 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
398 Ok(())
399 }
400}
401
402#[jacquard_derive::lexicon]
403#[derive(
404 serde::Serialize,
405 serde::Deserialize,
406 Debug,
407 Clone,
408 PartialEq,
409 Eq,
410 jacquard_derive::IntoStatic,
411 Default
412)]
413#[serde(rename_all = "camelCase")]
414pub struct EmailUpdated<'a> {
415 #[serde(borrow)]
416 pub email: jacquard_common::CowStr<'a>,
417}
418
419impl<'a> ::jacquard_lexicon::schema::LexiconSchema for EmailUpdated<'a> {
420 fn nsid() -> &'static str {
421 "tools.ozone.hosting.getAccountHistory"
422 }
423 fn def_name() -> &'static str {
424 "emailUpdated"
425 }
426 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
427 lexicon_doc_tools_ozone_hosting_getAccountHistory()
428 }
429 fn validate(
430 &self,
431 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
432 Ok(())
433 }
434}
435
436#[jacquard_derive::lexicon]
437#[derive(
438 serde::Serialize,
439 serde::Deserialize,
440 Debug,
441 Clone,
442 PartialEq,
443 Eq,
444 jacquard_derive::IntoStatic
445)]
446#[serde(rename_all = "camelCase")]
447pub struct Event<'a> {
448 pub created_at: jacquard_common::types::string::Datetime,
449 #[serde(borrow)]
450 pub created_by: jacquard_common::CowStr<'a>,
451 #[serde(borrow)]
452 pub details: EventDetails<'a>,
453}
454
455pub mod event_state {
456
457 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
458 #[allow(unused)]
459 use ::core::marker::PhantomData;
460 mod sealed {
461 pub trait Sealed {}
462 }
463 /// State trait tracking which required fields have been set
464 pub trait State: sealed::Sealed {
465 type CreatedAt;
466 type Details;
467 type CreatedBy;
468 }
469 /// Empty state - all required fields are unset
470 pub struct Empty(());
471 impl sealed::Sealed for Empty {}
472 impl State for Empty {
473 type CreatedAt = Unset;
474 type Details = Unset;
475 type CreatedBy = Unset;
476 }
477 ///State transition - sets the `created_at` field to Set
478 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
479 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
480 impl<S: State> State for SetCreatedAt<S> {
481 type CreatedAt = Set<members::created_at>;
482 type Details = S::Details;
483 type CreatedBy = S::CreatedBy;
484 }
485 ///State transition - sets the `details` field to Set
486 pub struct SetDetails<S: State = Empty>(PhantomData<fn() -> S>);
487 impl<S: State> sealed::Sealed for SetDetails<S> {}
488 impl<S: State> State for SetDetails<S> {
489 type CreatedAt = S::CreatedAt;
490 type Details = Set<members::details>;
491 type CreatedBy = S::CreatedBy;
492 }
493 ///State transition - sets the `created_by` field to Set
494 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
495 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
496 impl<S: State> State for SetCreatedBy<S> {
497 type CreatedAt = S::CreatedAt;
498 type Details = S::Details;
499 type CreatedBy = Set<members::created_by>;
500 }
501 /// Marker types for field names
502 #[allow(non_camel_case_types)]
503 pub mod members {
504 ///Marker type for the `created_at` field
505 pub struct created_at(());
506 ///Marker type for the `details` field
507 pub struct details(());
508 ///Marker type for the `created_by` field
509 pub struct created_by(());
510 }
511}
512
513/// Builder for constructing an instance of this type
514pub struct EventBuilder<'a, S: event_state::State> {
515 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
516 __unsafe_private_named: (
517 ::core::option::Option<jacquard_common::types::string::Datetime>,
518 ::core::option::Option<jacquard_common::CowStr<'a>>,
519 ::core::option::Option<EventDetails<'a>>,
520 ),
521 _phantom: ::core::marker::PhantomData<&'a ()>,
522}
523
524impl<'a> Event<'a> {
525 /// Create a new builder for this type
526 pub fn new() -> EventBuilder<'a, event_state::Empty> {
527 EventBuilder::new()
528 }
529}
530
531impl<'a> EventBuilder<'a, event_state::Empty> {
532 /// Create a new builder with all fields unset
533 pub fn new() -> Self {
534 EventBuilder {
535 _phantom_state: ::core::marker::PhantomData,
536 __unsafe_private_named: (None, None, None),
537 _phantom: ::core::marker::PhantomData,
538 }
539 }
540}
541
542impl<'a, S> EventBuilder<'a, S>
543where
544 S: event_state::State,
545 S::CreatedAt: event_state::IsUnset,
546{
547 /// Set the `createdAt` field (required)
548 pub fn created_at(
549 mut self,
550 value: impl Into<jacquard_common::types::string::Datetime>,
551 ) -> EventBuilder<'a, event_state::SetCreatedAt<S>> {
552 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
553 EventBuilder {
554 _phantom_state: ::core::marker::PhantomData,
555 __unsafe_private_named: self.__unsafe_private_named,
556 _phantom: ::core::marker::PhantomData,
557 }
558 }
559}
560
561impl<'a, S> EventBuilder<'a, S>
562where
563 S: event_state::State,
564 S::CreatedBy: event_state::IsUnset,
565{
566 /// Set the `createdBy` field (required)
567 pub fn created_by(
568 mut self,
569 value: impl Into<jacquard_common::CowStr<'a>>,
570 ) -> EventBuilder<'a, event_state::SetCreatedBy<S>> {
571 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
572 EventBuilder {
573 _phantom_state: ::core::marker::PhantomData,
574 __unsafe_private_named: self.__unsafe_private_named,
575 _phantom: ::core::marker::PhantomData,
576 }
577 }
578}
579
580impl<'a, S> EventBuilder<'a, S>
581where
582 S: event_state::State,
583 S::Details: event_state::IsUnset,
584{
585 /// Set the `details` field (required)
586 pub fn details(
587 mut self,
588 value: impl Into<EventDetails<'a>>,
589 ) -> EventBuilder<'a, event_state::SetDetails<S>> {
590 self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into());
591 EventBuilder {
592 _phantom_state: ::core::marker::PhantomData,
593 __unsafe_private_named: self.__unsafe_private_named,
594 _phantom: ::core::marker::PhantomData,
595 }
596 }
597}
598
599impl<'a, S> EventBuilder<'a, S>
600where
601 S: event_state::State,
602 S::CreatedAt: event_state::IsSet,
603 S::Details: event_state::IsSet,
604 S::CreatedBy: event_state::IsSet,
605{
606 /// Build the final struct
607 pub fn build(self) -> Event<'a> {
608 Event {
609 created_at: self.__unsafe_private_named.0.unwrap(),
610 created_by: self.__unsafe_private_named.1.unwrap(),
611 details: self.__unsafe_private_named.2.unwrap(),
612 extra_data: Default::default(),
613 }
614 }
615 /// Build the final struct with custom extra_data
616 pub fn build_with_data(
617 self,
618 extra_data: std::collections::BTreeMap<
619 jacquard_common::smol_str::SmolStr,
620 jacquard_common::types::value::Data<'a>,
621 >,
622 ) -> Event<'a> {
623 Event {
624 created_at: self.__unsafe_private_named.0.unwrap(),
625 created_by: self.__unsafe_private_named.1.unwrap(),
626 details: self.__unsafe_private_named.2.unwrap(),
627 extra_data: Some(extra_data),
628 }
629 }
630}
631
632#[jacquard_derive::open_union]
633#[derive(
634 serde::Serialize,
635 serde::Deserialize,
636 Debug,
637 Clone,
638 PartialEq,
639 Eq,
640 jacquard_derive::IntoStatic
641)]
642#[serde(tag = "$type")]
643#[serde(bound(deserialize = "'de: 'a"))]
644pub enum EventDetails<'a> {
645 #[serde(rename = "tools.ozone.hosting.getAccountHistory#accountCreated")]
646 AccountCreated(
647 Box<crate::tools_ozone::hosting::get_account_history::AccountCreated<'a>>,
648 ),
649 #[serde(rename = "tools.ozone.hosting.getAccountHistory#emailUpdated")]
650 EmailUpdated(
651 Box<crate::tools_ozone::hosting::get_account_history::EmailUpdated<'a>>,
652 ),
653 #[serde(rename = "tools.ozone.hosting.getAccountHistory#emailConfirmed")]
654 EmailConfirmed(
655 Box<crate::tools_ozone::hosting::get_account_history::EmailConfirmed<'a>>,
656 ),
657 #[serde(rename = "tools.ozone.hosting.getAccountHistory#passwordUpdated")]
658 PasswordUpdated(
659 Box<crate::tools_ozone::hosting::get_account_history::PasswordUpdated<'a>>,
660 ),
661 #[serde(rename = "tools.ozone.hosting.getAccountHistory#handleUpdated")]
662 HandleUpdated(
663 Box<crate::tools_ozone::hosting::get_account_history::HandleUpdated<'a>>,
664 ),
665}
666
667impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Event<'a> {
668 fn nsid() -> &'static str {
669 "tools.ozone.hosting.getAccountHistory"
670 }
671 fn def_name() -> &'static str {
672 "event"
673 }
674 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
675 lexicon_doc_tools_ozone_hosting_getAccountHistory()
676 }
677 fn validate(
678 &self,
679 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
680 Ok(())
681 }
682}
683
684#[jacquard_derive::lexicon]
685#[derive(
686 serde::Serialize,
687 serde::Deserialize,
688 Debug,
689 Clone,
690 PartialEq,
691 Eq,
692 jacquard_derive::IntoStatic
693)]
694#[serde(rename_all = "camelCase")]
695pub struct HandleUpdated<'a> {
696 #[serde(borrow)]
697 pub handle: jacquard_common::types::string::Handle<'a>,
698}
699
700pub mod handle_updated_state {
701
702 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
703 #[allow(unused)]
704 use ::core::marker::PhantomData;
705 mod sealed {
706 pub trait Sealed {}
707 }
708 /// State trait tracking which required fields have been set
709 pub trait State: sealed::Sealed {
710 type Handle;
711 }
712 /// Empty state - all required fields are unset
713 pub struct Empty(());
714 impl sealed::Sealed for Empty {}
715 impl State for Empty {
716 type Handle = Unset;
717 }
718 ///State transition - sets the `handle` field to Set
719 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
720 impl<S: State> sealed::Sealed for SetHandle<S> {}
721 impl<S: State> State for SetHandle<S> {
722 type Handle = Set<members::handle>;
723 }
724 /// Marker types for field names
725 #[allow(non_camel_case_types)]
726 pub mod members {
727 ///Marker type for the `handle` field
728 pub struct handle(());
729 }
730}
731
732/// Builder for constructing an instance of this type
733pub struct HandleUpdatedBuilder<'a, S: handle_updated_state::State> {
734 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
735 __unsafe_private_named: (
736 ::core::option::Option<jacquard_common::types::string::Handle<'a>>,
737 ),
738 _phantom: ::core::marker::PhantomData<&'a ()>,
739}
740
741impl<'a> HandleUpdated<'a> {
742 /// Create a new builder for this type
743 pub fn new() -> HandleUpdatedBuilder<'a, handle_updated_state::Empty> {
744 HandleUpdatedBuilder::new()
745 }
746}
747
748impl<'a> HandleUpdatedBuilder<'a, handle_updated_state::Empty> {
749 /// Create a new builder with all fields unset
750 pub fn new() -> Self {
751 HandleUpdatedBuilder {
752 _phantom_state: ::core::marker::PhantomData,
753 __unsafe_private_named: (None,),
754 _phantom: ::core::marker::PhantomData,
755 }
756 }
757}
758
759impl<'a, S> HandleUpdatedBuilder<'a, S>
760where
761 S: handle_updated_state::State,
762 S::Handle: handle_updated_state::IsUnset,
763{
764 /// Set the `handle` field (required)
765 pub fn handle(
766 mut self,
767 value: impl Into<jacquard_common::types::string::Handle<'a>>,
768 ) -> HandleUpdatedBuilder<'a, handle_updated_state::SetHandle<S>> {
769 self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into());
770 HandleUpdatedBuilder {
771 _phantom_state: ::core::marker::PhantomData,
772 __unsafe_private_named: self.__unsafe_private_named,
773 _phantom: ::core::marker::PhantomData,
774 }
775 }
776}
777
778impl<'a, S> HandleUpdatedBuilder<'a, S>
779where
780 S: handle_updated_state::State,
781 S::Handle: handle_updated_state::IsSet,
782{
783 /// Build the final struct
784 pub fn build(self) -> HandleUpdated<'a> {
785 HandleUpdated {
786 handle: self.__unsafe_private_named.0.unwrap(),
787 extra_data: Default::default(),
788 }
789 }
790 /// Build the final struct with custom extra_data
791 pub fn build_with_data(
792 self,
793 extra_data: std::collections::BTreeMap<
794 jacquard_common::smol_str::SmolStr,
795 jacquard_common::types::value::Data<'a>,
796 >,
797 ) -> HandleUpdated<'a> {
798 HandleUpdated {
799 handle: self.__unsafe_private_named.0.unwrap(),
800 extra_data: Some(extra_data),
801 }
802 }
803}
804
805impl<'a> ::jacquard_lexicon::schema::LexiconSchema for HandleUpdated<'a> {
806 fn nsid() -> &'static str {
807 "tools.ozone.hosting.getAccountHistory"
808 }
809 fn def_name() -> &'static str {
810 "handleUpdated"
811 }
812 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
813 lexicon_doc_tools_ozone_hosting_getAccountHistory()
814 }
815 fn validate(
816 &self,
817 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
818 Ok(())
819 }
820}
821
822#[derive(
823 serde::Serialize,
824 serde::Deserialize,
825 Debug,
826 Clone,
827 PartialEq,
828 Eq,
829 jacquard_derive::IntoStatic
830)]
831#[serde(rename_all = "camelCase")]
832pub struct GetAccountHistory<'a> {
833 #[serde(skip_serializing_if = "std::option::Option::is_none")]
834 #[serde(borrow)]
835 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
836 #[serde(borrow)]
837 pub did: jacquard_common::types::string::Did<'a>,
838 #[serde(skip_serializing_if = "std::option::Option::is_none")]
839 #[serde(borrow)]
840 pub events: std::option::Option<Vec<jacquard_common::CowStr<'a>>>,
841 ///(default: 50, min: 1, max: 100)
842 #[serde(skip_serializing_if = "std::option::Option::is_none")]
843 pub limit: std::option::Option<i64>,
844}
845
846pub mod get_account_history_state {
847
848 pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
849 #[allow(unused)]
850 use ::core::marker::PhantomData;
851 mod sealed {
852 pub trait Sealed {}
853 }
854 /// State trait tracking which required fields have been set
855 pub trait State: sealed::Sealed {
856 type Did;
857 }
858 /// Empty state - all required fields are unset
859 pub struct Empty(());
860 impl sealed::Sealed for Empty {}
861 impl State for Empty {
862 type Did = Unset;
863 }
864 ///State transition - sets the `did` field to Set
865 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
866 impl<S: State> sealed::Sealed for SetDid<S> {}
867 impl<S: State> State for SetDid<S> {
868 type Did = Set<members::did>;
869 }
870 /// Marker types for field names
871 #[allow(non_camel_case_types)]
872 pub mod members {
873 ///Marker type for the `did` field
874 pub struct did(());
875 }
876}
877
878/// Builder for constructing an instance of this type
879pub struct GetAccountHistoryBuilder<'a, S: get_account_history_state::State> {
880 _phantom_state: ::core::marker::PhantomData<fn() -> S>,
881 __unsafe_private_named: (
882 ::core::option::Option<jacquard_common::CowStr<'a>>,
883 ::core::option::Option<jacquard_common::types::string::Did<'a>>,
884 ::core::option::Option<Vec<jacquard_common::CowStr<'a>>>,
885 ::core::option::Option<i64>,
886 ),
887 _phantom: ::core::marker::PhantomData<&'a ()>,
888}
889
890impl<'a> GetAccountHistory<'a> {
891 /// Create a new builder for this type
892 pub fn new() -> GetAccountHistoryBuilder<'a, get_account_history_state::Empty> {
893 GetAccountHistoryBuilder::new()
894 }
895}
896
897impl<'a> GetAccountHistoryBuilder<'a, get_account_history_state::Empty> {
898 /// Create a new builder with all fields unset
899 pub fn new() -> Self {
900 GetAccountHistoryBuilder {
901 _phantom_state: ::core::marker::PhantomData,
902 __unsafe_private_named: (None, None, None, None),
903 _phantom: ::core::marker::PhantomData,
904 }
905 }
906}
907
908impl<'a, S: get_account_history_state::State> GetAccountHistoryBuilder<'a, S> {
909 /// Set the `cursor` field (optional)
910 pub fn cursor(
911 mut self,
912 value: impl Into<Option<jacquard_common::CowStr<'a>>>,
913 ) -> Self {
914 self.__unsafe_private_named.0 = value.into();
915 self
916 }
917 /// Set the `cursor` field to an Option value (optional)
918 pub fn maybe_cursor(mut self, value: Option<jacquard_common::CowStr<'a>>) -> Self {
919 self.__unsafe_private_named.0 = value;
920 self
921 }
922}
923
924impl<'a, S> GetAccountHistoryBuilder<'a, S>
925where
926 S: get_account_history_state::State,
927 S::Did: get_account_history_state::IsUnset,
928{
929 /// Set the `did` field (required)
930 pub fn did(
931 mut self,
932 value: impl Into<jacquard_common::types::string::Did<'a>>,
933 ) -> GetAccountHistoryBuilder<'a, get_account_history_state::SetDid<S>> {
934 self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
935 GetAccountHistoryBuilder {
936 _phantom_state: ::core::marker::PhantomData,
937 __unsafe_private_named: self.__unsafe_private_named,
938 _phantom: ::core::marker::PhantomData,
939 }
940 }
941}
942
943impl<'a, S: get_account_history_state::State> GetAccountHistoryBuilder<'a, S> {
944 /// Set the `events` field (optional)
945 pub fn events(
946 mut self,
947 value: impl Into<Option<Vec<jacquard_common::CowStr<'a>>>>,
948 ) -> Self {
949 self.__unsafe_private_named.2 = value.into();
950 self
951 }
952 /// Set the `events` field to an Option value (optional)
953 pub fn maybe_events(
954 mut self,
955 value: Option<Vec<jacquard_common::CowStr<'a>>>,
956 ) -> Self {
957 self.__unsafe_private_named.2 = value;
958 self
959 }
960}
961
962impl<'a, S: get_account_history_state::State> GetAccountHistoryBuilder<'a, S> {
963 /// Set the `limit` field (optional)
964 pub fn limit(mut self, value: impl Into<Option<i64>>) -> Self {
965 self.__unsafe_private_named.3 = value.into();
966 self
967 }
968 /// Set the `limit` field to an Option value (optional)
969 pub fn maybe_limit(mut self, value: Option<i64>) -> Self {
970 self.__unsafe_private_named.3 = value;
971 self
972 }
973}
974
975impl<'a, S> GetAccountHistoryBuilder<'a, S>
976where
977 S: get_account_history_state::State,
978 S::Did: get_account_history_state::IsSet,
979{
980 /// Build the final struct
981 pub fn build(self) -> GetAccountHistory<'a> {
982 GetAccountHistory {
983 cursor: self.__unsafe_private_named.0,
984 did: self.__unsafe_private_named.1.unwrap(),
985 events: self.__unsafe_private_named.2,
986 limit: self.__unsafe_private_named.3,
987 }
988 }
989}
990
991#[jacquard_derive::lexicon]
992#[derive(
993 serde::Serialize,
994 serde::Deserialize,
995 Debug,
996 Clone,
997 PartialEq,
998 Eq,
999 jacquard_derive::IntoStatic
1000)]
1001#[serde(rename_all = "camelCase")]
1002pub struct GetAccountHistoryOutput<'a> {
1003 #[serde(skip_serializing_if = "std::option::Option::is_none")]
1004 #[serde(borrow)]
1005 pub cursor: std::option::Option<jacquard_common::CowStr<'a>>,
1006 #[serde(borrow)]
1007 pub events: Vec<crate::tools_ozone::hosting::get_account_history::Event<'a>>,
1008}
1009
1010/// Response type for
1011///tools.ozone.hosting.getAccountHistory
1012pub struct GetAccountHistoryResponse;
1013impl jacquard_common::xrpc::XrpcResp for GetAccountHistoryResponse {
1014 const NSID: &'static str = "tools.ozone.hosting.getAccountHistory";
1015 const ENCODING: &'static str = "application/json";
1016 type Output<'de> = GetAccountHistoryOutput<'de>;
1017 type Err<'de> = jacquard_common::xrpc::GenericError<'de>;
1018}
1019
1020impl<'a> jacquard_common::xrpc::XrpcRequest for GetAccountHistory<'a> {
1021 const NSID: &'static str = "tools.ozone.hosting.getAccountHistory";
1022 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
1023 type Response = GetAccountHistoryResponse;
1024}
1025
1026/// Endpoint type for
1027///tools.ozone.hosting.getAccountHistory
1028pub struct GetAccountHistoryRequest;
1029impl jacquard_common::xrpc::XrpcEndpoint for GetAccountHistoryRequest {
1030 const PATH: &'static str = "/xrpc/tools.ozone.hosting.getAccountHistory";
1031 const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query;
1032 type Request<'de> = GetAccountHistory<'de>;
1033 type Response = GetAccountHistoryResponse;
1034}
1035
1036#[jacquard_derive::lexicon]
1037#[derive(
1038 serde::Serialize,
1039 serde::Deserialize,
1040 Debug,
1041 Clone,
1042 PartialEq,
1043 Eq,
1044 jacquard_derive::IntoStatic,
1045 Default
1046)]
1047#[serde(rename_all = "camelCase")]
1048pub struct PasswordUpdated<'a> {}
1049impl<'a> ::jacquard_lexicon::schema::LexiconSchema for PasswordUpdated<'a> {
1050 fn nsid() -> &'static str {
1051 "tools.ozone.hosting.getAccountHistory"
1052 }
1053 fn def_name() -> &'static str {
1054 "passwordUpdated"
1055 }
1056 fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
1057 lexicon_doc_tools_ozone_hosting_getAccountHistory()
1058 }
1059 fn validate(
1060 &self,
1061 ) -> ::core::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> {
1062 Ok(())
1063 }
1064}