Skip to main content

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