add fetchFullMessage, fetchSection to IMAPClient for MIME attachment retrieval

This commit is contained in:
2026-03-14 13:31:38 +01:00
parent 0a564a05fd
commit 968dd91f80
4 changed files with 97 additions and 0 deletions
@@ -9,6 +9,10 @@ public protocol IMAPClientProtocol: Sendable {
func fetchFlags(uids: ClosedRange<Int>) async throws -> [UIDFlagsPair]
func fetchBody(uid: Int) async throws -> (text: String?, html: String?)
// v0.5 attachment/MIME operations
func fetchFullMessage(uid: Int) async throws -> String
func fetchSection(uid: Int, mailbox: String, section: String) async throws -> Data
// v0.3 write operations
func storeFlags(uid: Int, mailbox: String, add: [String], remove: [String]) async throws
func moveMessage(uid: Int, from: String, to: String) async throws