feat(gmail): make search API

This commit is contained in:
rustmailer
2025-09-24 13:30:25 +08:00
parent 4c00e45657
commit 08ef77c23c
11 changed files with 365 additions and 69 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ pub struct EmailEnvelopeV3 {
pub mid: Option<String>,
/// A list of labels applied to the message.
///
/// Each element is a string representing a Gmail label ID (e.g., "INBOX", "UNREAD").
/// Each element is a string representing a Gmail label name (e.g., "INBOX", "UNREAD").
/// This field reflects the current labels associated with the email.
///
/// Note: This field is populated only for Gmail API accounts. For other account types, it will be empty.
+1 -1
View File
@@ -10,4 +10,4 @@ use ahash::AHashMap;
use crate::modules::common::lru::TimedLruCache;
pub static GMAIL_LABELS_CACHE: LazyLock<TimedLruCache<u64, AHashMap<String, String>>> =
LazyLock::new(|| TimedLruCache::new(100, Duration::from_secs(3600)));
LazyLock::new(|| TimedLruCache::new(100, Duration::from_secs(60)));
+1 -1
View File
@@ -32,7 +32,7 @@ pub struct MessageList {
pub next_page_token: Option<String>,
#[serde(rename = "resultSizeEstimate")]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub result_size_estimate: Option<i64>,
pub result_size_estimate: Option<u64>,
}
#[derive(Debug, Clone, Serialize, Deserialize, Default)]