atrium-api 0.25.8

API library for AT Protocol (Bluesky)
Documentation
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `app.bsky.feed.defs` namespace.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct BlockedAuthorData {
    pub did: crate::types::string::Did,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub viewer: core::option::Option<crate::app::bsky::actor::defs::ViewerState>,
}
pub type BlockedAuthor = crate::types::Object<BlockedAuthorData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct BlockedPostData {
    pub author: BlockedAuthor,
    pub blocked: bool,
    pub uri: String,
}
pub type BlockedPost = crate::types::Object<BlockedPostData>;
///User clicked through to the author of the feed item
pub const CLICKTHROUGH_AUTHOR: &str = "app.bsky.feed.defs#clickthroughAuthor";
///User clicked through to the embedded content of the feed item
pub const CLICKTHROUGH_EMBED: &str = "app.bsky.feed.defs#clickthroughEmbed";
///User clicked through to the feed item
pub const CLICKTHROUGH_ITEM: &str = "app.bsky.feed.defs#clickthroughItem";
///User clicked through to the reposter of the feed item
pub const CLICKTHROUGH_REPOSTER: &str = "app.bsky.feed.defs#clickthroughReposter";
///Declares the feed generator returns any types of posts.
pub const CONTENT_MODE_UNSPECIFIED: &str = "app.bsky.feed.defs#contentModeUnspecified";
///Declares the feed generator returns posts containing app.bsky.embed.video embeds.
pub const CONTENT_MODE_VIDEO: &str = "app.bsky.feed.defs#contentModeVideo";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct FeedViewPostData {
    ///Context provided by feed generator that may be passed back alongside interactions.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub feed_context: core::option::Option<String>,
    pub post: PostView,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reason: core::option::Option<crate::types::Union<FeedViewPostReasonRefs>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reply: core::option::Option<ReplyRef>,
    ///Unique identifier per request that may be passed back alongside interactions.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub req_id: core::option::Option<String>,
}
pub type FeedViewPost = crate::types::Object<FeedViewPostData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct GeneratorViewData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub accepts_interactions: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub avatar: core::option::Option<String>,
    pub cid: crate::types::string::Cid,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub content_mode: core::option::Option<String>,
    pub creator: crate::app::bsky::actor::defs::ProfileView,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub description: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub description_facets: core::option::Option<Vec<crate::app::bsky::richtext::facet::Main>>,
    pub did: crate::types::string::Did,
    pub display_name: String,
    pub indexed_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub like_count: core::option::Option<usize>,
    pub uri: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub viewer: core::option::Option<GeneratorViewerState>,
}
pub type GeneratorView = crate::types::Object<GeneratorViewData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct GeneratorViewerStateData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub like: core::option::Option<String>,
}
pub type GeneratorViewerState = crate::types::Object<GeneratorViewerStateData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct InteractionData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub event: core::option::Option<String>,
    ///Context on a feed item that was originally supplied by the feed generator on getFeedSkeleton.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub feed_context: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub item: core::option::Option<String>,
    ///Unique identifier per request that may be passed back alongside interactions.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub req_id: core::option::Option<String>,
}
pub type Interaction = crate::types::Object<InteractionData>;
///User liked the feed item
pub const INTERACTION_LIKE: &str = "app.bsky.feed.defs#interactionLike";
///User quoted the feed item
pub const INTERACTION_QUOTE: &str = "app.bsky.feed.defs#interactionQuote";
///User replied to the feed item
pub const INTERACTION_REPLY: &str = "app.bsky.feed.defs#interactionReply";
///User reposted the feed item
pub const INTERACTION_REPOST: &str = "app.bsky.feed.defs#interactionRepost";
///Feed item was seen by user
pub const INTERACTION_SEEN: &str = "app.bsky.feed.defs#interactionSeen";
///User shared the feed item
pub const INTERACTION_SHARE: &str = "app.bsky.feed.defs#interactionShare";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct NotFoundPostData {
    pub not_found: bool,
    pub uri: String,
}
pub type NotFoundPost = crate::types::Object<NotFoundPostData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct PostViewData {
    pub author: crate::app::bsky::actor::defs::ProfileViewBasic,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub bookmark_count: core::option::Option<i64>,
    pub cid: crate::types::string::Cid,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub embed: core::option::Option<crate::types::Union<PostViewEmbedRefs>>,
    pub indexed_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub like_count: core::option::Option<i64>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub quote_count: core::option::Option<i64>,
    pub record: crate::types::Unknown,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reply_count: core::option::Option<i64>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub repost_count: core::option::Option<i64>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub threadgate: core::option::Option<ThreadgateView>,
    pub uri: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub viewer: core::option::Option<ViewerState>,
}
pub type PostView = crate::types::Object<PostViewData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ReasonPinData {}
pub type ReasonPin = crate::types::Object<ReasonPinData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ReasonRepostData {
    pub by: crate::app::bsky::actor::defs::ProfileViewBasic,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub cid: core::option::Option<crate::types::string::Cid>,
    pub indexed_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub uri: core::option::Option<String>,
}
pub type ReasonRepost = crate::types::Object<ReasonRepostData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ReplyRefData {
    ///When parent is a reply to another post, this is the author of that post.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub grandparent_author: core::option::Option<crate::app::bsky::actor::defs::ProfileViewBasic>,
    pub parent: crate::types::Union<ReplyRefParentRefs>,
    pub root: crate::types::Union<ReplyRefRootRefs>,
}
pub type ReplyRef = crate::types::Object<ReplyRefData>;
///Request that less content like the given feed item be shown in the feed
pub const REQUEST_LESS: &str = "app.bsky.feed.defs#requestLess";
///Request that more content like the given feed item be shown in the feed
pub const REQUEST_MORE: &str = "app.bsky.feed.defs#requestMore";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SkeletonFeedPostData {
    ///Context that will be passed through to client and may be passed to feed generator back alongside interactions.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub feed_context: core::option::Option<String>,
    pub post: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reason: core::option::Option<crate::types::Union<SkeletonFeedPostReasonRefs>>,
}
pub type SkeletonFeedPost = crate::types::Object<SkeletonFeedPostData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SkeletonReasonPinData {}
pub type SkeletonReasonPin = crate::types::Object<SkeletonReasonPinData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SkeletonReasonRepostData {
    pub repost: String,
}
pub type SkeletonReasonRepost = crate::types::Object<SkeletonReasonRepostData>;
///Metadata about this post within the context of the thread it is in.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ThreadContextData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub root_author_like: core::option::Option<String>,
}
pub type ThreadContext = crate::types::Object<ThreadContextData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ThreadViewPostData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub parent: core::option::Option<crate::types::Union<ThreadViewPostParentRefs>>,
    pub post: PostView,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub replies: core::option::Option<Vec<crate::types::Union<ThreadViewPostRepliesItem>>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub thread_context: core::option::Option<ThreadContext>,
}
pub type ThreadViewPost = crate::types::Object<ThreadViewPostData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ThreadgateViewData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub cid: core::option::Option<crate::types::string::Cid>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub lists: core::option::Option<Vec<crate::app::bsky::graph::defs::ListViewBasic>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub record: core::option::Option<crate::types::Unknown>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub uri: core::option::Option<String>,
}
pub type ThreadgateView = crate::types::Object<ThreadgateViewData>;
///Metadata about the requesting account's relationship with the subject content. Only has meaningful content for authed requests.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ViewerStateData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub bookmarked: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub embedding_disabled: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub like: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub pinned: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reply_disabled: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub repost: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub thread_muted: core::option::Option<bool>,
}
pub type ViewerState = crate::types::Object<ViewerStateData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum FeedViewPostReasonRefs {
    #[serde(rename = "app.bsky.feed.defs#reasonRepost")]
    ReasonRepost(Box<ReasonRepost>),
    #[serde(rename = "app.bsky.feed.defs#reasonPin")]
    ReasonPin(Box<ReasonPin>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum PostViewEmbedRefs {
    #[serde(rename = "app.bsky.embed.images#view")]
    AppBskyEmbedImagesView(Box<crate::app::bsky::embed::images::View>),
    #[serde(rename = "app.bsky.embed.video#view")]
    AppBskyEmbedVideoView(Box<crate::app::bsky::embed::video::View>),
    #[serde(rename = "app.bsky.embed.external#view")]
    AppBskyEmbedExternalView(Box<crate::app::bsky::embed::external::View>),
    #[serde(rename = "app.bsky.embed.record#view")]
    AppBskyEmbedRecordView(Box<crate::app::bsky::embed::record::View>),
    #[serde(rename = "app.bsky.embed.recordWithMedia#view")]
    AppBskyEmbedRecordWithMediaView(Box<crate::app::bsky::embed::record_with_media::View>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ReplyRefParentRefs {
    #[serde(rename = "app.bsky.feed.defs#postView")]
    PostView(Box<PostView>),
    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
    NotFoundPost(Box<NotFoundPost>),
    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
    BlockedPost(Box<BlockedPost>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ReplyRefRootRefs {
    #[serde(rename = "app.bsky.feed.defs#postView")]
    PostView(Box<PostView>),
    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
    NotFoundPost(Box<NotFoundPost>),
    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
    BlockedPost(Box<BlockedPost>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum SkeletonFeedPostReasonRefs {
    #[serde(rename = "app.bsky.feed.defs#skeletonReasonRepost")]
    SkeletonReasonRepost(Box<SkeletonReasonRepost>),
    #[serde(rename = "app.bsky.feed.defs#skeletonReasonPin")]
    SkeletonReasonPin(Box<SkeletonReasonPin>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ThreadViewPostParentRefs {
    #[serde(rename = "app.bsky.feed.defs#threadViewPost")]
    ThreadViewPost(Box<ThreadViewPost>),
    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
    NotFoundPost(Box<NotFoundPost>),
    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
    BlockedPost(Box<BlockedPost>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ThreadViewPostRepliesItem {
    #[serde(rename = "app.bsky.feed.defs#threadViewPost")]
    ThreadViewPost(Box<ThreadViewPost>),
    #[serde(rename = "app.bsky.feed.defs#notFoundPost")]
    NotFoundPost(Box<NotFoundPost>),
    #[serde(rename = "app.bsky.feed.defs#blockedPost")]
    BlockedPost(Box<BlockedPost>),
}