1// @generated by jacquard-lexicon. DO NOT EDIT.
2//
3// Lexicon: buzz.bookhive.defs
4//
5// This file was automatically generated from Lexicon schemas.
6// Any manual changes will be overwritten on the next regeneration.
7
8pub mod book;
9pub mod buzz;
10pub mod get_book;
11pub mod get_profile;
12pub mod hive_book;
13pub mod search_books;
14
15#[jacquard_derive::lexicon]
16#[derive(
17 serde::Serialize,
18 serde::Deserialize,
19 Debug,
20 Clone,
21 PartialEq,
22 Eq,
23 jacquard_derive::IntoStatic
24)]
25#[serde(rename_all = "camelCase")]
26pub struct Activity<'a> {
27 pub created_at: jacquard_common::types::string::Datetime,
28 ///The hive id of the book
29 #[serde(borrow)]
30 pub hive_id: jacquard_common::CowStr<'a>,
31 ///The title of the book
32 #[serde(borrow)]
33 pub title: jacquard_common::CowStr<'a>,
34 #[serde(borrow)]
35 pub r#type: jacquard_common::CowStr<'a>,
36}
37
38#[jacquard_derive::lexicon]
39#[derive(
40 serde::Serialize,
41 serde::Deserialize,
42 Debug,
43 Clone,
44 PartialEq,
45 Eq,
46 jacquard_derive::IntoStatic
47)]
48#[serde(rename_all = "camelCase")]
49pub struct Comment<'a> {
50 #[serde(borrow)]
51 pub book: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
52 ///The content of the comment.
53 #[serde(borrow)]
54 pub comment: jacquard_common::CowStr<'a>,
55 ///Client-declared timestamp when this comment was originally created.
56 pub created_at: jacquard_common::types::string::Datetime,
57 ///The DID of the user who made the comment
58 #[serde(borrow)]
59 pub did: jacquard_common::CowStr<'a>,
60 ///The handle of the user who made the comment
61 #[serde(borrow)]
62 pub handle: jacquard_common::CowStr<'a>,
63 #[serde(borrow)]
64 pub parent: crate::com_atproto::repo::strong_ref::StrongRef<'a>,
65}
66
67#[jacquard_derive::lexicon]
68#[derive(
69 serde::Serialize,
70 serde::Deserialize,
71 Debug,
72 Clone,
73 PartialEq,
74 Eq,
75 jacquard_derive::IntoStatic
76)]
77#[serde(rename_all = "camelCase")]
78pub struct Profile<'a> {
79 #[serde(skip_serializing_if = "std::option::Option::is_none")]
80 #[serde(borrow)]
81 pub avatar: std::option::Option<jacquard_common::CowStr<'a>>,
82 pub books_read: i64,
83 #[serde(skip_serializing_if = "std::option::Option::is_none")]
84 #[serde(borrow)]
85 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
86 #[serde(borrow)]
87 pub display_name: jacquard_common::CowStr<'a>,
88 #[serde(borrow)]
89 pub handle: jacquard_common::CowStr<'a>,
90 pub reviews: i64,
91}
92
93#[jacquard_derive::lexicon]
94#[derive(
95 serde::Serialize,
96 serde::Deserialize,
97 Debug,
98 Clone,
99 PartialEq,
100 Eq,
101 jacquard_derive::IntoStatic
102)]
103#[serde(rename_all = "camelCase")]
104pub struct Review<'a> {
105 ///The date the review was created
106 pub created_at: jacquard_common::types::string::Datetime,
107 ///The DID of the user who made the review
108 #[serde(borrow)]
109 pub did: jacquard_common::CowStr<'a>,
110 ///The handle of the user who made the review
111 #[serde(borrow)]
112 pub handle: jacquard_common::CowStr<'a>,
113 ///The review content
114 #[serde(borrow)]
115 pub review: jacquard_common::CowStr<'a>,
116 ///The number of stars given to the book
117 #[serde(skip_serializing_if = "std::option::Option::is_none")]
118 pub stars: std::option::Option<i64>,
119}
120
121#[jacquard_derive::lexicon]
122#[derive(
123 serde::Serialize,
124 serde::Deserialize,
125 Debug,
126 Clone,
127 PartialEq,
128 Eq,
129 jacquard_derive::IntoStatic
130)]
131#[serde(rename_all = "camelCase")]
132pub struct UserBook<'a> {
133 ///The authors of the book (tab separated)
134 #[serde(borrow)]
135 pub authors: jacquard_common::CowStr<'a>,
136 ///Cover image of the book
137 #[serde(skip_serializing_if = "std::option::Option::is_none")]
138 #[serde(borrow)]
139 pub cover: std::option::Option<jacquard_common::CowStr<'a>>,
140 pub created_at: jacquard_common::types::string::Datetime,
141 ///Book description/summary
142 #[serde(skip_serializing_if = "std::option::Option::is_none")]
143 #[serde(borrow)]
144 pub description: std::option::Option<jacquard_common::CowStr<'a>>,
145 ///The date the user finished reading the book
146 #[serde(skip_serializing_if = "std::option::Option::is_none")]
147 pub finished_at: std::option::Option<jacquard_common::types::string::Datetime>,
148 ///The book's hive id, used to correlate user's books with the hive
149 #[serde(borrow)]
150 pub hive_id: jacquard_common::CowStr<'a>,
151 ///Average rating (0-1000)
152 #[serde(skip_serializing_if = "std::option::Option::is_none")]
153 pub rating: std::option::Option<i64>,
154 ///The book's review
155 #[serde(skip_serializing_if = "std::option::Option::is_none")]
156 #[serde(borrow)]
157 pub review: std::option::Option<jacquard_common::CowStr<'a>>,
158 ///Number of stars given to the book (1-10) which will be mapped to 1-5 stars
159 #[serde(skip_serializing_if = "std::option::Option::is_none")]
160 pub stars: std::option::Option<i64>,
161 ///The date the user started reading the book
162 #[serde(skip_serializing_if = "std::option::Option::is_none")]
163 pub started_at: std::option::Option<jacquard_common::types::string::Datetime>,
164 #[serde(skip_serializing_if = "std::option::Option::is_none")]
165 #[serde(borrow)]
166 pub status: std::option::Option<jacquard_common::CowStr<'a>>,
167 ///Cover image of the book
168 #[serde(borrow)]
169 pub thumbnail: jacquard_common::CowStr<'a>,
170 ///The title of the book
171 #[serde(borrow)]
172 pub title: jacquard_common::CowStr<'a>,
173}