proto_blue_api/generated/app/bsky/draft/
defs.rs1use serde::{Deserialize, Serialize};
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(tag = "$type")]
8pub enum DraftPostgateEmbeddingRulesItemRefs {
9 #[serde(rename = "app.bsky.feed.postgate#disableRule")]
10 BskyFeedPostgateDisableRule(Box<crate::app::bsky::feed::postgate::DisableRule>),
11 #[serde(other)]
12 Other,
13}
14
15#[derive(Debug, Clone, Serialize, Deserialize)]
16#[serde(tag = "$type")]
17pub enum DraftThreadgateAllowItemRefs {
18 #[serde(rename = "app.bsky.feed.threadgate#mentionRule")]
19 BskyFeedThreadgateMentionRule(Box<crate::app::bsky::feed::threadgate::MentionRule>),
20 #[serde(rename = "app.bsky.feed.threadgate#followerRule")]
21 BskyFeedThreadgateFollowerRule(Box<crate::app::bsky::feed::threadgate::FollowerRule>),
22 #[serde(rename = "app.bsky.feed.threadgate#followingRule")]
23 BskyFeedThreadgateFollowingRule(Box<crate::app::bsky::feed::threadgate::FollowingRule>),
24 #[serde(rename = "app.bsky.feed.threadgate#listRule")]
25 BskyFeedThreadgateListRule(Box<crate::app::bsky::feed::threadgate::ListRule>),
26 #[serde(other)]
27 Other,
28}
29
30#[derive(Debug, Clone, Serialize, Deserialize)]
32#[serde(rename_all = "camelCase")]
33pub struct Draft {
34 #[serde(skip_serializing_if = "Option::is_none")]
35 pub device_id: Option<String>,
36 #[serde(skip_serializing_if = "Option::is_none")]
37 pub device_name: Option<String>,
38 #[serde(skip_serializing_if = "Option::is_none")]
39 pub langs: Option<Vec<String>>,
40 #[serde(skip_serializing_if = "Option::is_none")]
41 pub postgate_embedding_rules: Option<Vec<DraftPostgateEmbeddingRulesItemRefs>>,
42 pub posts: Vec<DraftPost>,
43 #[serde(skip_serializing_if = "Option::is_none")]
44 pub threadgate_allow: Option<Vec<DraftThreadgateAllowItemRefs>>,
45}
46
47#[derive(Debug, Clone, Serialize, Deserialize)]
48#[serde(rename_all = "camelCase")]
49pub struct DraftEmbedCaption {
50 pub content: String,
51 pub lang: String,
52}
53
54#[derive(Debug, Clone, Serialize, Deserialize)]
55#[serde(rename_all = "camelCase")]
56pub struct DraftEmbedExternal {
57 pub uri: String,
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
61#[serde(rename_all = "camelCase")]
62pub struct DraftEmbedImage {
63 #[serde(skip_serializing_if = "Option::is_none")]
64 pub alt: Option<String>,
65 pub local_ref: DraftEmbedLocalRef,
66}
67
68#[derive(Debug, Clone, Serialize, Deserialize)]
69#[serde(rename_all = "camelCase")]
70pub struct DraftEmbedLocalRef {
71 pub path: String,
72}
73
74#[derive(Debug, Clone, Serialize, Deserialize)]
75#[serde(rename_all = "camelCase")]
76pub struct DraftEmbedRecord {
77 pub record: crate::com::atproto::repo::strong_ref::Main,
78}
79
80#[derive(Debug, Clone, Serialize, Deserialize)]
81#[serde(rename_all = "camelCase")]
82pub struct DraftEmbedVideo {
83 #[serde(skip_serializing_if = "Option::is_none")]
84 pub alt: Option<String>,
85 #[serde(skip_serializing_if = "Option::is_none")]
86 pub captions: Option<Vec<DraftEmbedCaption>>,
87 pub local_ref: DraftEmbedLocalRef,
88}
89
90#[derive(Debug, Clone, Serialize, Deserialize)]
92#[serde(tag = "$type")]
93pub enum DraftPostLabelsRefs {
94 #[serde(rename = "com.atproto.label.defs#selfLabels")]
95 AtprotoLabelDefsSelfLabels(Box<crate::com::atproto::label::defs::SelfLabels>),
96 #[serde(other)]
97 Other,
98}
99
100#[derive(Debug, Clone, Serialize, Deserialize)]
102#[serde(rename_all = "camelCase")]
103pub struct DraftPost {
104 #[serde(skip_serializing_if = "Option::is_none")]
105 pub embed_externals: Option<Vec<DraftEmbedExternal>>,
106 #[serde(skip_serializing_if = "Option::is_none")]
107 pub embed_images: Option<Vec<DraftEmbedImage>>,
108 #[serde(skip_serializing_if = "Option::is_none")]
109 pub embed_records: Option<Vec<DraftEmbedRecord>>,
110 #[serde(skip_serializing_if = "Option::is_none")]
111 pub embed_videos: Option<Vec<DraftEmbedVideo>>,
112 #[serde(skip_serializing_if = "Option::is_none")]
113 pub labels: Option<DraftPostLabelsRefs>,
114 pub text: String,
115}
116
117#[derive(Debug, Clone, Serialize, Deserialize)]
119#[serde(rename_all = "camelCase")]
120pub struct DraftView {
121 pub created_at: proto_blue_syntax::Datetime,
122 pub draft: Draft,
123 pub id: proto_blue_syntax::Tid,
124 pub updated_at: proto_blue_syntax::Datetime,
125}
126
127#[derive(Debug, Clone, Serialize, Deserialize)]
129#[serde(rename_all = "camelCase")]
130pub struct DraftWithId {
131 pub draft: Draft,
132 pub id: proto_blue_syntax::Tid,
133}