diff options
Diffstat (limited to 'adenosine/src/com_atproto')
-rw-r--r-- | adenosine/src/com_atproto/mod.rs | 6 | ||||
-rw-r--r-- | adenosine/src/com_atproto/repo/mod.rs | 20 |
2 files changed, 19 insertions, 7 deletions
diff --git a/adenosine/src/com_atproto/mod.rs b/adenosine/src/com_atproto/mod.rs index 8e2317a..7a6cbc0 100644 --- a/adenosine/src/com_atproto/mod.rs +++ b/adenosine/src/com_atproto/mod.rs @@ -7,15 +7,16 @@ pub mod repo; pub struct AccountRequest { pub email: String, pub handle: String, - pub password: String, + pub did: Option<String>, pub inviteCode: Option<String>, + pub password: String, pub recoveryKey: Option<String>, } #[allow(non_snake_case)] #[derive(Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq)] pub struct SessionRequest { - pub handle: String, + pub identifier: String, pub password: String, } @@ -24,6 +25,7 @@ pub struct SessionRequest { pub struct Session { pub did: String, pub name: String, + pub email: Option<String>, pub accessJwt: String, pub refreshJwt: String, } 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>, } |