|
|
|
@ -20,7 +20,7 @@ use serde_with::skip_serializing_none;
|
|
|
|
|
use ts_rs::TS;
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Logging into lemmy.
|
|
|
|
@ -32,7 +32,7 @@ pub struct Login {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Register / Sign up to lemmy.
|
|
|
|
@ -77,7 +77,7 @@ pub struct CaptchaResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Saves settings for your user.
|
|
|
|
@ -131,7 +131,7 @@ pub struct SaveUserSettings {
|
|
|
|
|
pub collapse_bot_comments: Option<bool>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Changes your account password.
|
|
|
|
@ -156,7 +156,7 @@ pub struct LoginResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Gets a person's details.
|
|
|
|
@ -186,7 +186,7 @@ pub struct GetPersonDetailsResponse {
|
|
|
|
|
pub moderates: Vec<CommunityModeratorView>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Adds an admin to a site.
|
|
|
|
@ -204,7 +204,7 @@ pub struct AddAdminResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Ban a person from the site.
|
|
|
|
@ -238,7 +238,7 @@ pub struct BanPersonResponse {
|
|
|
|
|
pub banned: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Block a person.
|
|
|
|
@ -257,7 +257,7 @@ pub struct BlockPersonResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Get comment replies.
|
|
|
|
@ -278,7 +278,7 @@ pub struct GetRepliesResponse {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Get mentions for your user.
|
|
|
|
@ -297,7 +297,7 @@ pub struct GetPersonMentionsResponse {
|
|
|
|
|
pub mentions: Vec<PersonMentionView>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Mark a person mention as read.
|
|
|
|
@ -314,7 +314,7 @@ pub struct PersonMentionResponse {
|
|
|
|
|
pub person_mention_view: PersonMentionView,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Mark a comment reply as read.
|
|
|
|
@ -331,7 +331,7 @@ pub struct CommentReplyResponse {
|
|
|
|
|
pub comment_reply_view: CommentReplyView,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Delete your account.
|
|
|
|
@ -340,7 +340,7 @@ pub struct DeleteAccount {
|
|
|
|
|
pub delete_content: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Reset your password via email.
|
|
|
|
@ -348,7 +348,7 @@ pub struct PasswordReset {
|
|
|
|
|
pub email: Sensitive<String>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Change your password after receiving a reset request.
|
|
|
|
@ -359,7 +359,7 @@ pub struct PasswordChangeAfterReset {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[skip_serializing_none]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Get a count of the number of reports.
|
|
|
|
@ -389,7 +389,7 @@ pub struct GetUnreadCountResponse {
|
|
|
|
|
pub private_messages: i64,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Serialize, Deserialize, Clone, Default, Debug)]
|
|
|
|
|
#[derive(Serialize, Deserialize, Clone, Default, Debug, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
/// Verify your email.
|
|
|
|
@ -404,7 +404,7 @@ pub struct GenerateTotpSecretResponse {
|
|
|
|
|
pub totp_secret_url: Sensitive<String>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone)]
|
|
|
|
|
#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)]
|
|
|
|
|
#[cfg_attr(feature = "full", derive(TS))]
|
|
|
|
|
#[cfg_attr(feature = "full", ts(export))]
|
|
|
|
|
pub struct UpdateTotp {
|
|
|
|
|