atrium_api/app/bsky/draft/
defs.rs1#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct DraftData {
7 #[serde(skip_serializing_if = "core::option::Option::is_none")]
9 pub device_id: core::option::Option<String>,
10 #[serde(skip_serializing_if = "core::option::Option::is_none")]
12 pub device_name: core::option::Option<String>,
13 #[serde(skip_serializing_if = "core::option::Option::is_none")]
15 pub langs: core::option::Option<Vec<crate::types::string::Language>>,
16 #[serde(skip_serializing_if = "core::option::Option::is_none")]
18 pub postgate_embedding_rules: core::option::Option<
19 Vec<crate::types::Union<DraftPostgateEmbeddingRulesItem>>,
20 >,
21 pub posts: Vec<DraftPost>,
23 #[serde(skip_serializing_if = "core::option::Option::is_none")]
25 pub threadgate_allow: core::option::Option<
26 Vec<crate::types::Union<DraftThreadgateAllowItem>>,
27 >,
28}
29pub type Draft = crate::types::Object<DraftData>;
30#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
31#[serde(rename_all = "camelCase")]
32pub struct DraftEmbedCaptionData {
33 pub content: String,
34 pub lang: crate::types::string::Language,
35}
36pub type DraftEmbedCaption = crate::types::Object<DraftEmbedCaptionData>;
37#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
38#[serde(rename_all = "camelCase")]
39pub struct DraftEmbedExternalData {
40 pub uri: String,
41}
42pub type DraftEmbedExternal = crate::types::Object<DraftEmbedExternalData>;
43#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
44#[serde(rename_all = "camelCase")]
45pub struct DraftEmbedGalleryData {
46 pub items: DraftEmbedGalleryItems,
47}
48pub type DraftEmbedGallery = crate::types::Object<DraftEmbedGalleryData>;
49pub type DraftEmbedGalleryItems = Vec<crate::types::Union<DraftEmbedGalleryItemsItem>>;
51#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
52#[serde(rename_all = "camelCase")]
53pub struct DraftEmbedImageData {
54 #[serde(skip_serializing_if = "core::option::Option::is_none")]
55 pub alt: core::option::Option<String>,
56 pub local_ref: DraftEmbedLocalRef,
57}
58pub type DraftEmbedImage = crate::types::Object<DraftEmbedImageData>;
59#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
60#[serde(rename_all = "camelCase")]
61pub struct DraftEmbedLocalRefData {
62 pub path: String,
64}
65pub type DraftEmbedLocalRef = crate::types::Object<DraftEmbedLocalRefData>;
66#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
67#[serde(rename_all = "camelCase")]
68pub struct DraftEmbedRecordData {
69 pub record: crate::com::atproto::repo::strong_ref::Main,
70}
71pub type DraftEmbedRecord = crate::types::Object<DraftEmbedRecordData>;
72#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
73#[serde(rename_all = "camelCase")]
74pub struct DraftEmbedVideoData {
75 #[serde(skip_serializing_if = "core::option::Option::is_none")]
76 pub alt: core::option::Option<String>,
77 #[serde(skip_serializing_if = "core::option::Option::is_none")]
78 pub captions: core::option::Option<Vec<DraftEmbedCaption>>,
79 pub local_ref: DraftEmbedLocalRef,
80}
81pub type DraftEmbedVideo = crate::types::Object<DraftEmbedVideoData>;
82#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
84#[serde(rename_all = "camelCase")]
85pub struct DraftPostData {
86 #[serde(skip_serializing_if = "core::option::Option::is_none")]
87 pub embed_externals: core::option::Option<Vec<DraftEmbedExternal>>,
88 #[serde(skip_serializing_if = "core::option::Option::is_none")]
89 pub embed_gallery: core::option::Option<DraftEmbedGallery>,
90 #[serde(skip_serializing_if = "core::option::Option::is_none")]
91 pub embed_images: core::option::Option<Vec<DraftEmbedImage>>,
92 #[serde(skip_serializing_if = "core::option::Option::is_none")]
93 pub embed_records: core::option::Option<Vec<DraftEmbedRecord>>,
94 #[serde(skip_serializing_if = "core::option::Option::is_none")]
95 pub embed_videos: core::option::Option<Vec<DraftEmbedVideo>>,
96 #[serde(skip_serializing_if = "core::option::Option::is_none")]
98 pub labels: core::option::Option<crate::types::Union<DraftPostLabelsRefs>>,
99 pub text: String,
101}
102pub type DraftPost = crate::types::Object<DraftPostData>;
103#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
105#[serde(rename_all = "camelCase")]
106pub struct DraftViewData {
107 pub created_at: crate::types::string::Datetime,
109 pub draft: Draft,
110 pub id: crate::types::string::Tid,
112 pub updated_at: crate::types::string::Datetime,
114}
115pub type DraftView = crate::types::Object<DraftViewData>;
116#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
118#[serde(rename_all = "camelCase")]
119pub struct DraftWithIdData {
120 pub draft: Draft,
121 pub id: crate::types::string::Tid,
123}
124pub type DraftWithId = crate::types::Object<DraftWithIdData>;
125#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
126#[serde(tag = "$type")]
127pub enum DraftEmbedGalleryItemsItem {
128 #[serde(rename = "app.bsky.draft.defs#draftEmbedImage")]
129 DraftEmbedImage(Box<DraftEmbedImage>),
130}
131#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
132#[serde(tag = "$type")]
133pub enum DraftPostLabelsRefs {
134 #[serde(rename = "com.atproto.label.defs#selfLabels")]
135 ComAtprotoLabelDefsSelfLabels(Box<crate::com::atproto::label::defs::SelfLabels>),
136}
137#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
138#[serde(tag = "$type")]
139pub enum DraftPostgateEmbeddingRulesItem {
140 #[serde(rename = "app.bsky.feed.postgate#disableRule")]
141 AppBskyFeedPostgateDisableRule(Box<crate::app::bsky::feed::postgate::DisableRule>),
142}
143#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
144#[serde(tag = "$type")]
145pub enum DraftThreadgateAllowItem {
146 #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
147 AppBskyFeedThreadgateMentionRule(
148 Box<crate::app::bsky::feed::threadgate::MentionRule>,
149 ),
150 #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
151 AppBskyFeedThreadgateFollowerRule(
152 Box<crate::app::bsky::feed::threadgate::FollowerRule>,
153 ),
154 #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
155 AppBskyFeedThreadgateFollowingRule(
156 Box<crate::app::bsky::feed::threadgate::FollowingRule>,
157 ),
158 #[serde(rename = "app.bsky.feed.threadgate#listRule")]
159 AppBskyFeedThreadgateListRule(Box<crate::app::bsky::feed::threadgate::ListRule>),
160}