use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Mailbox {
pub id: i64,
pub name: String,
}
#[derive(Debug, Clone, Copy, Default)]
pub struct MailboxCounts {
pub total: u32,
pub unread: u32,
}
#[derive(Debug, Clone)]
pub struct Message {
pub id: i64,
pub mailbox_id: i64,
pub uid: u32,
pub sender: String,
pub recipients: String,
pub subject: String,
pub date: i64,
pub size: u32,
pub flags: u32,
pub internal_date: i64,
pub message_id: String,
pub in_reply_to: String,
pub thread_id: String,
pub user_address: String,
pub new_content: Option<String>,
pub blob_id: String,
}
#[derive(Debug, Clone, Default)]
pub struct ParsedBody {
pub text: Option<String>,
pub html: Option<String>,
pub attachments: Vec<Attachment>,
}
#[derive(Debug, Clone)]
pub struct Attachment {
pub filename: String,
pub content_type: String,
pub size: u32,
}
#[derive(Debug, Clone)]
pub struct SubmissionResult {
pub success: bool,
pub message: Option<String>,
}
pub const FLAG_SEEN: u32 = 0b0000_0001;
pub const FLAG_ANSWERED: u32 = 0b0000_0010;
pub const FLAG_FLAGGED: u32 = 0b0000_0100;
pub const FLAG_DELETED: u32 = 0b0000_1000;
pub const FLAG_DRAFT: u32 = 0b0001_0000;