Skip to main content

atrium_api/app/bsky/embed/
external.rs

1// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
2//!Definitions for the `app.bsky.embed.external` namespace.
3///A representation of some externally linked content (eg, a URL and 'card'), embedded in a Bluesky record (eg, a post).
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct MainData {
7    pub external: External,
8}
9pub type Main = crate::types::Object<MainData>;
10///RGB color definition, inspired by site.standard.theme.color#rgb
11#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
12#[serde(rename_all = "camelCase")]
13pub struct ColorRgbData {
14    pub b: u8,
15    pub g: u8,
16    pub r: u8,
17}
18pub type ColorRgb = crate::types::Object<ColorRgbData>;
19#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
20#[serde(rename_all = "camelCase")]
21pub struct ExternalData {
22    ///StrongRefs (uri+cid) of the Atmosphere records that backed this view.
23    #[serde(skip_serializing_if = "core::option::Option::is_none")]
24    pub associated_refs: core::option::Option<
25        Vec<crate::com::atproto::repo::strong_ref::Main>,
26    >,
27    pub description: String,
28    #[serde(skip_serializing_if = "core::option::Option::is_none")]
29    pub thumb: core::option::Option<crate::types::BlobRef>,
30    pub title: String,
31    pub uri: String,
32}
33pub type External = crate::types::Object<ExternalData>;
34#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
35#[serde(rename_all = "camelCase")]
36pub struct ViewData {
37    pub external: ViewExternal,
38}
39pub type View = crate::types::Object<ViewData>;
40#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
41#[serde(rename_all = "camelCase")]
42pub struct ViewExternalData {
43    ///Profiles of the owners of the Atmosphere records that backed this view.
44    #[serde(skip_serializing_if = "core::option::Option::is_none")]
45    pub associated_profiles: core::option::Option<
46        Vec<crate::app::bsky::actor::defs::ProfileViewBasic>,
47    >,
48    ///StrongRefs (uri+cid) of the Atmosphere records that backed this view.
49    #[serde(skip_serializing_if = "core::option::Option::is_none")]
50    pub associated_refs: core::option::Option<
51        Vec<crate::com::atproto::repo::strong_ref::Main>,
52    >,
53    ///When the external content was created, if available. Example: a publication date, for an article.
54    #[serde(skip_serializing_if = "core::option::Option::is_none")]
55    pub created_at: core::option::Option<crate::types::string::Datetime>,
56    pub description: String,
57    #[serde(skip_serializing_if = "core::option::Option::is_none")]
58    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
59    ///Estimated reading time in minutes, if applicable and available.
60    #[serde(skip_serializing_if = "core::option::Option::is_none")]
61    pub reading_time: core::option::Option<i64>,
62    #[serde(skip_serializing_if = "core::option::Option::is_none")]
63    pub source: core::option::Option<ViewExternalSource>,
64    #[serde(skip_serializing_if = "core::option::Option::is_none")]
65    pub thumb: core::option::Option<String>,
66    pub title: String,
67    ///When the external content was updated, if available.
68    #[serde(skip_serializing_if = "core::option::Option::is_none")]
69    pub updated_at: core::option::Option<crate::types::string::Datetime>,
70    pub uri: String,
71}
72pub type ViewExternal = crate::types::Object<ViewExternalData>;
73///The source of an external embed, such as a standard.site publication.
74#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
75#[serde(rename_all = "camelCase")]
76pub struct ViewExternalSourceData {
77    #[serde(skip_serializing_if = "core::option::Option::is_none")]
78    pub description: core::option::Option<String>,
79    ///Fully-qualified URL where an icon representing the source can be fetched. For example, CDN location provided by the App View.
80    #[serde(skip_serializing_if = "core::option::Option::is_none")]
81    pub icon: core::option::Option<String>,
82    #[serde(skip_serializing_if = "core::option::Option::is_none")]
83    pub theme: core::option::Option<ViewExternalSourceTheme>,
84    pub title: String,
85    ///URI of the source, if available. Example: the https:// URL of a site.standard.publication record.
86    pub uri: String,
87}
88pub type ViewExternalSource = crate::types::Object<ViewExternalSourceData>;
89///The theme colors of an external source, such as a site.standard.publication. These colors may be used when rendering an embed from that source.
90#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
91#[serde(rename_all = "camelCase")]
92pub struct ViewExternalSourceThemeData {
93    #[serde(skip_serializing_if = "core::option::Option::is_none")]
94    pub accent_foreground_rgb: core::option::Option<ColorRgb>,
95    #[serde(skip_serializing_if = "core::option::Option::is_none")]
96    pub accent_rgb: core::option::Option<ColorRgb>,
97    #[serde(skip_serializing_if = "core::option::Option::is_none")]
98    pub background_rgb: core::option::Option<ColorRgb>,
99    #[serde(skip_serializing_if = "core::option::Option::is_none")]
100    pub foreground_rgb: core::option::Option<ColorRgb>,
101}
102pub type ViewExternalSourceTheme = crate::types::Object<ViewExternalSourceThemeData>;