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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
auto_derived!(
/// # Change Email Data
pub struct DataChangeEmail {
/// Valid email address
pub email: String,
/// Current password
pub current_password: String,
}
/// # Change Data
pub struct DataChangePassword {
/// New password
pub password: String,
/// Current password
pub current_password: String,
}
/// # Account Deletion Token
pub struct DataAccountDeletion {
/// Deletion token
pub token: String,
}
/// # Account Data
pub struct DataCreateAccount {
/// Valid email address
pub email: String,
/// Password
pub password: String,
/// Invite code
pub invite: Option<String>,
/// Captcha verification code
pub captcha: Option<String>,
}
pub struct AccountInfo {
#[serde(rename = "_id")]
pub id: String,
pub email: String,
}
/// # Password Reset
pub struct DataPasswordReset {
/// Reset token
pub token: String,
/// New password
pub password: String,
/// Whether to logout all sessions
#[serde(default)]
pub remove_sessions: bool,
}
/// # Resend Information
pub struct DataResendVerification {
/// Email associated with the account
pub email: String,
/// Captcha verification code
pub captcha: Option<String>,
}
/// # Reset Information
pub struct DataSendPasswordReset {
/// Email associated with the account
pub email: String,
/// Captcha verification code
pub captcha: Option<String>,
}
);