diff options
author | bryan newbold <bnewbold@robocracy.org> | 2023-08-20 19:56:22 -0700 |
---|---|---|
committer | bryan newbold <bnewbold@robocracy.org> | 2023-08-20 19:56:22 -0700 |
commit | 23416af782a179a658711e958e977e19ae97067b (patch) | |
tree | 09e605dbd105c0628f6614e421c0dd43bb8ce3dc /adenosine/src/com_atproto/repo | |
parent | cc1dea6ea34260201c1df09959c7c4566d16d918 (diff) | |
download | adenosine-23416af782a179a658711e958e977e19ae97067b.tar.gz adenosine-23416af782a179a658711e958e977e19ae97067b.zip |
many updates from spring 2023 lex refactor
Diffstat (limited to 'adenosine/src/com_atproto/repo')
-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>, } |