aboutsummaryrefslogtreecommitdiffstats
path: root/adenosine-pds/src/models.rs
blob: 9da6104eaf101e2850af41406a74bee915c4f6a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use serde;

#[allow(non_snake_case)]
#[derive(Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq)]
pub struct AccountRequest {
    pub email: String,
    pub username: String,
    pub password: String,
    pub inviteCode: Option<String>,
    pub recoveryKey: Option<String>,
}

#[allow(non_snake_case)]
#[derive(Debug, serde::Deserialize, serde::Serialize, PartialEq, Eq)]
pub struct SessionRequest {
    pub username: String,
    pub password: String,
}

#[allow(non_snake_case)]
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct AtpSession {
    pub did: String,
    pub name: String,
    pub accessJwt: String,
    pub refreshJwt: String,
}

#[allow(non_snake_case)]
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, PartialEq, Eq)]
pub struct RepoDescribe {
    pub name: String,
    pub did: String,
    pub didDoc: serde_json::Value,
    pub collections: Vec<String>,
    pub nameIsCorrect: bool,
}