pub password: Sensitive<String>,
pub password_verify: Sensitive<String>,
pub show_nsfw: bool,
+ /// email is mandatory if email verification is enabled on the server
pub email: Option<Sensitive<String>>,
pub captcha_uuid: Option<String>,
pub captcha_answer: Option<String>,
pub honeypot: Option<String>,
+ /// An answer is mandatory if require application is enabled on the server
+ pub answer: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
#[derive(Debug, Serialize, Deserialize)]
pub struct LoginResponse {
- pub jwt: Sensitive<String>,
+ /// This is None in response to `Register` if email verification is enabled, or the server requires registration applications.
+ pub jwt: Option<Sensitive<String>>,
+ pub registration_created: bool,
+ pub verify_email_sent: bool,
}
#[derive(Debug, Serialize, Deserialize)]
pub auth: Sensitive<String>,
}
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct DeleteAccountResponse {}
+
#[derive(Debug, Serialize, Deserialize)]
pub struct PasswordReset {
pub email: Sensitive<String>,
pub mentions: i64,
pub private_messages: i64,
}
+
+#[derive(Serialize, Deserialize)]
+pub struct VerifyEmail {
+ pub token: String,
+}
+
+#[derive(Debug, Serialize, Deserialize, Clone)]
+pub struct VerifyEmailResponse {}