use serde::{Deserialize, Serialize};

/// Request body for the login endpoint.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct AuthRequest {
    pub message: String,       // Arbitrary message signed by the client
    pub client_pubkey: String, // Client's public key as a string
    pub signature: String,     // Base64 URL encoded signature of the message string
}

/// Request body for updating a user's username.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct UsernameUpdateRequest {
    pub username: String,
}

/// Request body for validating a username.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct UsernameValidateRequest {
    pub username: String,
    pub authority: String, // The authority checking the username (to allow validating their own username)
}

/// Request body for verifying a Discord code.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct DiscordAuthRequest {
    pub code: String,
    pub redirect_uri: String,
}

/// Request body for Google OAuth authentication.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct GoogleAuthRequest {
    pub id_token: String,
}

/// Request body for adding/removing a reaction to a chat message.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct ChatReactRequest {
    pub message_id: u64,
    pub emoji: String,
}

/// Request body for typing indicator.
#[derive(Deserialize, Serialize, Debug, Clone)]
pub struct ChatTypingRequest {
    pub typing: bool, // true = started typing, false = stopped typing
}
