From 83569230701b17a0c24c1c9bdd197629649d92bc Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 19 Dec 2022 22:19:49 -0800 Subject: update bsky getProfile schema --- adenosine-pds/src/models.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'adenosine-pds/src/models.rs') diff --git a/adenosine-pds/src/models.rs b/adenosine-pds/src/models.rs index 32f9f71..5bf4329 100644 --- a/adenosine-pds/src/models.rs +++ b/adenosine-pds/src/models.rs @@ -118,15 +118,35 @@ pub struct ProfileRecord { pub description: Option, } +// app.bsky.system.actorUser or app.bsky.system.actorScene +#[allow(non_snake_case)] +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] +pub struct Declaration { + pub actorType: String, +} + +// actorType: app.bsky.system.actorUser +// cid: bafyreid27zk7lbis4zw5fz4podbvbs4fc5ivwji3dmrwa6zggnj4bnd57u +#[allow(non_snake_case)] +#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] +pub struct DeclRef { + pub actorType: String, + pub cid: String, +} + #[allow(non_snake_case)] #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct Profile { pub did: String, + pub declaration: DeclRef, pub handle: String, + // for simple accounts, 'creator' is just the did + pub creator: String, pub displayName: Option, pub description: Option, pub followersCount: u64, pub followsCount: u64, + pub membersCount: u64, pub postsCount: u64, pub myState: serde_json::Value, } -- cgit v1.2.3