1 |
use std::collections::HashMap;
|
2 |
|
3 |
use serde::{Deserialize, Serialize};
|
4 |
|
5 |
use crate::model::{repository::RepositorySummary, user::User};
|
6 |
|
7 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
8 |
pub struct UserDisplayNameRequest {
|
9 |
pub user: User,
|
10 |
}
|
11 |
|
12 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
13 |
pub struct UserDisplayNameResponse {
|
14 |
pub display_name: Option<String>,
|
15 |
}
|
16 |
|
17 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
18 |
pub struct UserDisplayImageRequest {
|
19 |
pub user: User,
|
20 |
}
|
21 |
|
22 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
23 |
pub struct UserDisplayImageResponse {
|
24 |
pub image_url: Option<String>,
|
25 |
}
|
26 |
|
27 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
28 |
pub struct UserBioRequest {
|
29 |
pub user: User,
|
30 |
}
|
31 |
|
32 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
33 |
pub struct UserBioResponse {
|
34 |
pub bio: Option<String>,
|
35 |
}
|
36 |
|
37 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
38 |
pub struct UserRepositoriesRequest {
|
39 |
pub user: User,
|
40 |
}
|
41 |
|
42 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
43 |
pub struct UserRepositoriesResponse {
|
44 |
pub repositories: Vec<RepositorySummary>,
|
45 |
}
|
46 |
|
47 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
48 |
pub struct UserSettingsRequest {
|
49 |
pub user: User,
|
50 |
}
|
51 |
|
52 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
53 |
pub struct UserSettingsResponse {
|
54 |
pub settings: HashMap<String, serde_json::Value>,
|
55 |
}
|
56 |
|
57 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
58 |
pub struct UserWriteSettingsRequest {
|
59 |
pub user: User,
|
60 |
pub settings: Vec<(String, serde_json::Value)>,
|
61 |
}
|
62 |
|
63 |
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
|
64 |
pub struct UserWriteSettingsResponse {
|
65 |
|
66 |
}
|
67 |
|