use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Draft {
#[serde(skip_serializing_if = "Option::is_none")]
pub device_id: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub device_name: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub langs: Option<Vec<String>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub postgate_embedding_rules: Option<Vec<serde_json::Value>>,
pub posts: Vec<DraftPost>,
#[serde(skip_serializing_if = "Option::is_none")]
pub threadgate_allow: Option<Vec<serde_json::Value>>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedCaption {
pub content: String,
pub lang: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedExternal {
pub uri: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedImage {
#[serde(skip_serializing_if = "Option::is_none")]
pub alt: Option<String>,
pub local_ref: DraftEmbedLocalRef,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedLocalRef {
pub path: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedRecord {
pub record: crate::com::atproto::repo::strong_ref::Main,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftEmbedVideo {
#[serde(skip_serializing_if = "Option::is_none")]
pub alt: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub captions: Option<Vec<DraftEmbedCaption>>,
pub local_ref: DraftEmbedLocalRef,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftPost {
#[serde(skip_serializing_if = "Option::is_none")]
pub embed_externals: Option<Vec<DraftEmbedExternal>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub embed_images: Option<Vec<DraftEmbedImage>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub embed_records: Option<Vec<DraftEmbedRecord>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub embed_videos: Option<Vec<DraftEmbedVideo>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<serde_json::Value>,
pub text: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftView {
pub created_at: String,
pub draft: Draft,
pub id: String,
pub updated_at: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct DraftWithId {
pub draft: Draft,
pub id: String,
}