summaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src/models.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-11-09 15:35:17 -0800
committerBryan Newbold <bnewbold@robocracy.org>2022-11-09 15:35:38 -0800
commit7af51292ddfc81d55dd5beff07c557757bb0075f (patch)
tree6601cc2c73adab784f791f650e08fd9dc92aa65b /adenosine-pds/src/models.rs
parentb8eea211866766aabde8c5e55d1061deb799ddc6 (diff)
downloadadenosine-7af51292ddfc81d55dd5beff07c557757bb0075f.tar.gz
adenosine-7af51292ddfc81d55dd5beff07c557757bb0075f.zip
pds: more bsky posts/feeds/follow/like progress
Diffstat (limited to 'adenosine-pds/src/models.rs')
-rw-r--r--adenosine-pds/src/models.rs17
1 files changed, 14 insertions, 3 deletions
diff --git a/adenosine-pds/src/models.rs b/adenosine-pds/src/models.rs
index 116ac53..0f47c2d 100644
--- a/adenosine-pds/src/models.rs
+++ b/adenosine-pds/src/models.rs
@@ -59,7 +59,8 @@ pub struct RepoBatchWrite {
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct Subject {
pub uri: String,
- pub cid: String,
+ // TODO: CID is required
+ pub cid: Option<String>,
}
/// Generic over Re-post and Like
@@ -122,7 +123,8 @@ pub struct User {
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct FeedItem {
pub uri: String,
- pub cid: String,
+ // TODO: cid is required
+ pub cid: Option<String>,
pub author: User,
pub repostedBy: Option<User>,
pub record: Value,
@@ -139,11 +141,19 @@ pub struct FeedItem {
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct Post {
pub text: String,
+ pub reply: Option<PostReply>,
pub createdAt: Option<String>,
}
#[allow(non_snake_case)]
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
+pub struct PostReply {
+ pub parent: Subject,
+ pub root: Subject,
+}
+
+#[allow(non_snake_case)]
+#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct PostThread {
pub thread: ThreadItem,
}
@@ -152,7 +162,8 @@ pub struct PostThread {
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct ThreadItem {
pub uri: String,
- pub cid: String,
+ // TODO: CID is required
+ pub cid: Option<String>,
pub author: User,
pub record: Value,
//pub embed?: RecordEmbed | ExternalEmbed | UnknownEmbed,