atrium_api/app/bsky/feed/
defs.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.feed.defs` namespace.
3#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
4#[serde(rename_all = "camelCase")]
5pub struct BlockedAuthorData {
6    pub did: crate::types::string::Did,
7    #[serde(skip_serializing_if = "core::option::Option::is_none")]
8    pub viewer: core::option::Option<crate::app::bsky::actor::defs::ViewerState>,
9}
10pub type BlockedAuthor = crate::types::Object<BlockedAuthorData>;
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct BlockedPostData {
14    pub author: BlockedAuthor,
15    pub blocked: bool,
16    pub uri: String,
17}
18pub type BlockedPost = crate::types::Object<BlockedPostData>;
19///User clicked through to the author of the feed item
20pub const CLICKTHROUGH_AUTHOR: &str = "app.bsky.feed.defs#clickthroughAuthor";
21///User clicked through to the embedded content of the feed item
22pub const CLICKTHROUGH_EMBED: &str = "app.bsky.feed.defs#clickthroughEmbed";
23///User clicked through to the feed item
24pub const CLICKTHROUGH_ITEM: &str = "app.bsky.feed.defs#clickthroughItem";
25///User clicked through to the reposter of the feed item
26pub const CLICKTHROUGH_REPOSTER: &str = "app.bsky.feed.defs#clickthroughReposter";
27///Declares the feed generator returns any types of posts.
28pub const CONTENT_MODE_UNSPECIFIED: &str = "app.bsky.feed.defs#contentModeUnspecified";
29///Declares the feed generator returns posts containing app.bsky.embed.video embeds.
30pub const CONTENT_MODE_VIDEO: &str = "app.bsky.feed.defs#contentModeVideo";
31#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
32#[serde(rename_all = "camelCase")]
33pub struct FeedViewPostData {
34    ///Context provided by feed generator that may be passed back alongside interactions.
35    #[serde(skip_serializing_if = "core::option::Option::is_none")]
36    pub feed_context: core::option::Option<String>,
37    pub post: PostView,
38    #[serde(skip_serializing_if = "core::option::Option::is_none")]
39    pub reason: core::option::Option<crate::types::Union<FeedViewPostReasonRefs>>,
40    #[serde(skip_serializing_if = "core::option::Option::is_none")]
41    pub reply: core::option::Option<ReplyRef>,
42}
43pub type FeedViewPost = crate::types::Object<FeedViewPostData>;
44#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
45#[serde(rename_all = "camelCase")]
46pub struct GeneratorViewData {
47    #[serde(skip_serializing_if = "core::option::Option::is_none")]
48    pub accepts_interactions: core::option::Option<bool>,
49    #[serde(skip_serializing_if = "core::option::Option::is_none")]
50    pub avatar: core::option::Option<String>,
51    pub cid: crate::types::string::Cid,
52    #[serde(skip_serializing_if = "core::option::Option::is_none")]
53    pub content_mode: core::option::Option<String>,
54    pub creator: crate::app::bsky::actor::defs::ProfileView,
55    #[serde(skip_serializing_if = "core::option::Option::is_none")]
56    pub description: core::option::Option<String>,
57    #[serde(skip_serializing_if = "core::option::Option::is_none")]
58    pub description_facets: core::option::Option<
59        Vec<crate::app::bsky::richtext::facet::Main>,
60    >,
61    pub did: crate::types::string::Did,
62    pub display_name: String,
63    pub indexed_at: crate::types::string::Datetime,
64    #[serde(skip_serializing_if = "core::option::Option::is_none")]
65    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
66    #[serde(skip_serializing_if = "core::option::Option::is_none")]
67    pub like_count: core::option::Option<usize>,
68    pub uri: String,
69    #[serde(skip_serializing_if = "core::option::Option::is_none")]
70    pub viewer: core::option::Option<GeneratorViewerState>,
71}
72pub type GeneratorView = crate::types::Object<GeneratorViewData>;
73#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
74#[serde(rename_all = "camelCase")]
75pub struct GeneratorViewerStateData {
76    #[serde(skip_serializing_if = "core::option::Option::is_none")]
77    pub like: core::option::Option<String>,
78}
79pub type GeneratorViewerState = crate::types::Object<GeneratorViewerStateData>;
80#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
81#[serde(rename_all = "camelCase")]
82pub struct InteractionData {
83    #[serde(skip_serializing_if = "core::option::Option::is_none")]
84    pub event: core::option::Option<String>,
85    ///Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.
86    #[serde(skip_serializing_if = "core::option::Option::is_none")]
87    pub feed_context: core::option::Option<String>,
88    #[serde(skip_serializing_if = "core::option::Option::is_none")]
89    pub item: core::option::Option<String>,
90}
91pub type Interaction = crate::types::Object<InteractionData>;
92///User liked the feed item
93pub const INTERACTION_LIKE: &str = "app.bsky.feed.defs#interactionLike";
94///User quoted the feed item
95pub const INTERACTION_QUOTE: &str = "app.bsky.feed.defs#interactionQuote";
96///User replied to the feed item
97pub const INTERACTION_REPLY: &str = "app.bsky.feed.defs#interactionReply";
98///User reposted the feed item
99pub const INTERACTION_REPOST: &str = "app.bsky.feed.defs#interactionRepost";
100///Feed item was seen by user
101pub const INTERACTION_SEEN: &str = "app.bsky.feed.defs#interactionSeen";
102///User shared the feed item
103pub const INTERACTION_SHARE: &str = "app.bsky.feed.defs#interactionShare";
104#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
105#[serde(rename_all = "camelCase")]
106pub struct NotFoundPostData {
107    pub not_found: bool,
108    pub uri: String,
109}
110pub type NotFoundPost = crate::types::Object<NotFoundPostData>;
111#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
112#[serde(rename_all = "camelCase")]
113pub struct PostViewData {
114    pub author: crate::app::bsky::actor::defs::ProfileViewBasic,
115    pub cid: crate::types::string::Cid,
116    #[serde(skip_serializing_if = "core::option::Option::is_none")]
117    pub embed: core::option::Option<crate::types::Union<PostViewEmbedRefs>>,
118    pub indexed_at: crate::types::string::Datetime,
119    #[serde(skip_serializing_if = "core::option::Option::is_none")]
120    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
121    #[serde(skip_serializing_if = "core::option::Option::is_none")]
122    pub like_count: core::option::Option<i64>,
123    #[serde(skip_serializing_if = "core::option::Option::is_none")]
124    pub quote_count: core::option::Option<i64>,
125    pub record: crate::types::Unknown,
126    #[serde(skip_serializing_if = "core::option::Option::is_none")]
127    pub reply_count: core::option::Option<i64>,
128    #[serde(skip_serializing_if = "core::option::Option::is_none")]
129    pub repost_count: core::option::Option<i64>,
130    #[serde(skip_serializing_if = "core::option::Option::is_none")]
131    pub threadgate: core::option::Option<ThreadgateView>,
132    pub uri: String,
133    #[serde(skip_serializing_if = "core::option::Option::is_none")]
134    pub viewer: core::option::Option<ViewerState>,
135}
136pub type PostView = crate::types::Object<PostViewData>;
137#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
138#[serde(rename_all = "camelCase")]
139pub struct ReasonPinData {}
140pub type ReasonPin = crate::types::Object<ReasonPinData>;
141#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
142#[serde(rename_all = "camelCase")]
143pub struct ReasonRepostData {
144    pub by: crate::app::bsky::actor::defs::ProfileViewBasic,
145    pub indexed_at: crate::types::string::Datetime,
146}
147pub type ReasonRepost = crate::types::Object<ReasonRepostData>;
148#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
149#[serde(rename_all = "camelCase")]
150pub struct ReplyRefData {
151    ///When parent is a reply to another post, this is the author of that post.
152    #[serde(skip_serializing_if = "core::option::Option::is_none")]
153    pub grandparent_author: core::option::Option<
154        crate::app::bsky::actor::defs::ProfileViewBasic,
155    >,
156    pub parent: crate::types::Union<ReplyRefParentRefs>,
157    pub root: crate::types::Union<ReplyRefRootRefs>,
158}
159pub type ReplyRef = crate::types::Object<ReplyRefData>;
160///Request that less content like the given feed item be shown in the feed
161pub const REQUEST_LESS: &str = "app.bsky.feed.defs#requestLess";
162///Request that more content like the given feed item be shown in the feed
163pub const REQUEST_MORE: &str = "app.bsky.feed.defs#requestMore";
164#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
165#[serde(rename_all = "camelCase")]
166pub struct SkeletonFeedPostData {
167    ///Context that will be passed through to client and may be passed to feed generator back alongside interactions.
168    #[serde(skip_serializing_if = "core::option::Option::is_none")]
169    pub feed_context: core::option::Option<String>,
170    pub post: String,
171    #[serde(skip_serializing_if = "core::option::Option::is_none")]
172    pub reason: core::option::Option<crate::types::Union<SkeletonFeedPostReasonRefs>>,
173}
174pub type SkeletonFeedPost = crate::types::Object<SkeletonFeedPostData>;
175#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
176#[serde(rename_all = "camelCase")]
177pub struct SkeletonReasonPinData {}
178pub type SkeletonReasonPin = crate::types::Object<SkeletonReasonPinData>;
179#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
180#[serde(rename_all = "camelCase")]
181pub struct SkeletonReasonRepostData {
182    pub repost: String,
183}
184pub type SkeletonReasonRepost = crate::types::Object<SkeletonReasonRepostData>;
185///Metadata about this post within the context of the thread it is in.
186#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
187#[serde(rename_all = "camelCase")]
188pub struct ThreadContextData {
189    #[serde(skip_serializing_if = "core::option::Option::is_none")]
190    pub root_author_like: core::option::Option<String>,
191}
192pub type ThreadContext = crate::types::Object<ThreadContextData>;
193#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
194#[serde(rename_all = "camelCase")]
195pub struct ThreadViewPostData {
196    #[serde(skip_serializing_if = "core::option::Option::is_none")]
197    pub parent: core::option::Option<crate::types::Union<ThreadViewPostParentRefs>>,
198    pub post: PostView,
199    #[serde(skip_serializing_if = "core::option::Option::is_none")]
200    pub replies: core::option::Option<
201        Vec<crate::types::Union<ThreadViewPostRepliesItem>>,
202    >,
203    #[serde(skip_serializing_if = "core::option::Option::is_none")]
204    pub thread_context: core::option::Option<ThreadContext>,
205}
206pub type ThreadViewPost = crate::types::Object<ThreadViewPostData>;
207#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
208#[serde(rename_all = "camelCase")]
209pub struct ThreadgateViewData {
210    #[serde(skip_serializing_if = "core::option::Option::is_none")]
211    pub cid: core::option::Option<crate::types::string::Cid>,
212    #[serde(skip_serializing_if = "core::option::Option::is_none")]
213    pub lists: core::option::Option<Vec<crate::app::bsky::graph::defs::ListViewBasic>>,
214    #[serde(skip_serializing_if = "core::option::Option::is_none")]
215    pub record: core::option::Option<crate::types::Unknown>,
216    #[serde(skip_serializing_if = "core::option::Option::is_none")]
217    pub uri: core::option::Option<String>,
218}
219pub type ThreadgateView = crate::types::Object<ThreadgateViewData>;
220///Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.
221#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
222#[serde(rename_all = "camelCase")]
223pub struct ViewerStateData {
224    #[serde(skip_serializing_if = "core::option::Option::is_none")]
225    pub embedding_disabled: core::option::Option<bool>,
226    #[serde(skip_serializing_if = "core::option::Option::is_none")]
227    pub like: core::option::Option<String>,
228    #[serde(skip_serializing_if = "core::option::Option::is_none")]
229    pub pinned: core::option::Option<bool>,
230    #[serde(skip_serializing_if = "core::option::Option::is_none")]
231    pub reply_disabled: core::option::Option<bool>,
232    #[serde(skip_serializing_if = "core::option::Option::is_none")]
233    pub repost: core::option::Option<String>,
234    #[serde(skip_serializing_if = "core::option::Option::is_none")]
235    pub thread_muted: core::option::Option<bool>,
236}
237pub type ViewerState = crate::types::Object<ViewerStateData>;
238#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
239#[serde(tag = "$type")]
240pub enum FeedViewPostReasonRefs {
241    #[serde(rename = "app.bsky.feed.defs#reasonRepost")]
242    ReasonRepost(Box<ReasonRepost>),
243    #[serde(rename = "app.bsky.feed.defs#reasonPin")]
244    ReasonPin(Box<ReasonPin>),
245}
246#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
247#[serde(tag = "$type")]
248pub enum PostViewEmbedRefs {
249    #[serde(rename = "app.bsky.embed.images#view")]
250    AppBskyEmbedImagesView(Box<crate::app::bsky::embed::images::View>),
251    #[serde(rename = "app.bsky.embed.video#view")]
252    AppBskyEmbedVideoView(Box<crate::app::bsky::embed::video::View>),
253    #[serde(rename = "app.bsky.embed.external#view")]
254    AppBskyEmbedExternalView(Box<crate::app::bsky::embed::external::View>),
255    #[serde(rename = "app.bsky.embed.record#view")]
256    AppBskyEmbedRecordView(Box<crate::app::bsky::embed::record::View>),
257    #[serde(rename = "app.bsky.embed.recordWithMedia#view")]
258    AppBskyEmbedRecordWithMediaView(
259        Box<crate::app::bsky::embed::record_with_media::View>,
260    ),
261}
262#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
263#[serde(tag = "$type")]
264pub enum ReplyRefParentRefs {
265    #[serde(rename = "app.bsky.feed.defs#postView")]
266    PostView(Box<PostView>),
267    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
268    NotFoundPost(Box<NotFoundPost>),
269    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
270    BlockedPost(Box<BlockedPost>),
271}
272#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
273#[serde(tag = "$type")]
274pub enum ReplyRefRootRefs {
275    #[serde(rename = "app.bsky.feed.defs#postView")]
276    PostView(Box<PostView>),
277    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
278    NotFoundPost(Box<NotFoundPost>),
279    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
280    BlockedPost(Box<BlockedPost>),
281}
282#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
283#[serde(tag = "$type")]
284pub enum SkeletonFeedPostReasonRefs {
285    #[serde(rename = "app.bsky.feed.defs#skeletonReasonRepost")]
286    SkeletonReasonRepost(Box<SkeletonReasonRepost>),
287    #[serde(rename = "app.bsky.feed.defs#skeletonReasonPin")]
288    SkeletonReasonPin(Box<SkeletonReasonPin>),
289}
290#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
291#[serde(tag = "$type")]
292pub enum ThreadViewPostParentRefs {
293    #[serde(rename = "app.bsky.feed.defs#threadViewPost")]
294    ThreadViewPost(Box<ThreadViewPost>),
295    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
296    NotFoundPost(Box<NotFoundPost>),
297    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
298    BlockedPost(Box<BlockedPost>),
299}
300#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
301#[serde(tag = "$type")]
302pub enum ThreadViewPostRepliesItem {
303    #[serde(rename = "app.bsky.feed.defs#threadViewPost")]
304    ThreadViewPost(Box<ThreadViewPost>),
305    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
306    NotFoundPost(Box<NotFoundPost>),
307    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
308    BlockedPost(Box<BlockedPost>),
309}