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