From 2abf462ca10c4ac8c4f815e608cad31851e966e3 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 26 Feb 2023 21:36:27 +0100 Subject: Specified the interface for qmauth Changes to configuration Added qmauth version written in Python Slight changes to pagination --- README.md | 84 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 06185ec..3ab120c 100644 --- a/README.md +++ b/README.md @@ -143,3 +143,87 @@ Process overview The Webserver acts as a proxy to the Application Server. The Extractor is a stateless process that reads mails from a source. + +## Extractor Interface Definition + +Stateless Service - `net.fehcom.JWebmail.QMAuth.Maildir.repository` v0.1.0 + + struct MailAddress { + display_name: unicode_text, + address: unicode_text, + } + + struct TopHead { + byte_size: uint64, + unread: bool, + date_received: iso8601, + message_handle: unicode_text, + head: Head, + } + + struct Head { + date: iso8601, + + from: Array[MailAddress], + sender: Array[MailAddress], + reply_to: Array[MailAddress], + + to: Array[MailAddress], + cc: Array[MailAddress], + bcc: Array[MailAddress], + + subject: unicode_text, + comments: unicode_text, + keywords: unicode_text, + + mime: MIMEHeader, + } + + sturct MIMEHeader { + content_maintype: unicode_text, + content_subtype: unicode_text, + content_disposition: unicode_text, + filename: unicode_text, + } + + struct MIMEPart { + head: MIMEHeader, + body: Body, + } + + enum Body { + discrete(unicode_text), + multipart{ + preamble: unicode_text, + parts: Array[MIMEPart], + epilogue: unicode_text, + }, + message(Message), + } + + // body is either a string (discrete), an array (multipart) or object (message) + // depending on the content type + struct Message { + head: Head, + body: Body, + } + + struct CountResult { + byte_size: uint64, + total_mails: uint32, + unread_mails: uint32, + } + + fn __start__(maildir_directory: filepath, os_user: unicode_text, mail_user: unicode_text) + + fn list(subfolder: unicode_text, start: uint32, end: uint32, sort_by: unicode_text) -> Array[TopHead] + + fn count(folder: unicode_text) -> CountResult + + fn read(folder: unicode_text, mid: unicode_text) -> Message + + fn folders() -> Array[unicode_text] + + fn move(mid: unicode_text, from_folder: unicode_text, to_folder: unicode_text) + + fn search(pattern: unicode_text, folder: unicode_text) -> Array[Message] -- cgit v1.2.3