diff options
Diffstat (limited to 'adenosine/src/com_atproto/repo/mod.rs')
-rw-r--r-- | adenosine/src/com_atproto/repo/mod.rs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/adenosine/src/com_atproto/repo/mod.rs b/adenosine/src/com_atproto/repo/mod.rs index aa66e98..de5b56b 100644 --- a/adenosine/src/com_atproto/repo/mod.rs +++ b/adenosine/src/com_atproto/repo/mod.rs @@ -3,11 +3,11 @@ #[allow(non_snake_case)] #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct Describe { - pub name: String, + pub handle: String, pub did: String, pub didDoc: serde_json::Value, pub collections: Vec<String>, - pub nameIsCorrect: bool, + pub handleIsCorrect: bool, } #[allow(non_snake_case)] @@ -15,7 +15,10 @@ pub struct Describe { pub struct CreateRecord { pub did: String, pub collection: String, + pub rkey: Option<String>, + pub validate: Option<bool>, pub record: serde_json::Value, + pub swapCommit: Option<String>, } #[allow(non_snake_case)] @@ -24,7 +27,10 @@ pub struct PutRecord { pub did: String, pub collection: String, pub rkey: String, + pub validate: Option<bool>, pub record: serde_json::Value, + pub swapRecord: Option<String>, + pub swapCommit: Option<String>, } #[allow(non_snake_case)] @@ -33,21 +39,25 @@ pub struct DeleteRecord { pub did: String, pub collection: String, pub rkey: String, + pub swapRecord: Option<String>, + pub swapCommit: Option<String>, } #[allow(non_snake_case)] #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct BatchWriteBody { - pub did: String, + pub repo: String, + pub validate: Option<bool>, pub writes: Vec<BatchWrite>, + pub swapCommit: Option<String>, } #[allow(non_snake_case)] #[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)] pub struct BatchWrite { - #[serde(rename = "type")] + #[serde(rename = "$type")] pub op_type: String, pub collection: String, pub rkey: Option<String>, - pub value: serde_json::Value, + pub value: Option<serde_json::Value>, } |