mox/webmail/api.json
Mechiel Lukkien 879477a01f
webmail: during "send and archive", don't fail with error message when message that is being responded to is already in archive folder
before this change, when archiving, we would move all messages from the thread
that are in the same mailbox as that of the response message to the archive
mailbox. so if the message that was being responsed to was already in the
archive mailbox, the message would be moved from archive mailbox to archive
mailbox, resulting in an error.

with this change, when archiving, we move the thread messages that are in the
same mailbox as is currently open (independent of the mailbox the message lives
in, a common situation in the threading view). if there is no open mailbox
(search results), we still use the mailbox of the message being responded to as
reference.

with this new approach, we won't get errors moving a message to an archive
mailbox when it's already there. well, you can still get that error, but then
you've got the archive mailbox open, or you're in a search result and
responding to an archived message. the error should at least help understand
that nothing is happening.

we are only moving the messages from one active/reference mailbox because we
don't want to move messages from the thread that are in the Sent mailbox, and
we also don't want to move duplicate messages (cross-posts to mailing lists)
that are in other mailboxes. moving only the messages from the current active
mailbox seems safe, and should do what is what users would expect most of the
time.

for issue #233 by mattfbacon, thanks for reporting!
2024-11-01 09:39:40 +01:00

3344 lines
67 KiB
JSON

{
"Name": "Webmail",
"Docs": "",
"Functions": [
{
"Name": "LoginPrep",
"Docs": "LoginPrep returns a login token, and also sets it as cookie. Both must be\npresent in the call to Login.",
"Params": [],
"Returns": [
{
"Name": "r0",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Login",
"Docs": "Login returns a session token for the credentials, or fails with error code\n\"user:badLogin\". Call LoginPrep to get a loginToken.",
"Params": [
{
"Name": "loginToken",
"Typewords": [
"string"
]
},
{
"Name": "username",
"Typewords": [
"string"
]
},
{
"Name": "password",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "r0",
"Typewords": [
"CSRFToken"
]
}
]
},
{
"Name": "Logout",
"Docs": "Logout invalidates the session token.",
"Params": [],
"Returns": []
},
{
"Name": "Token",
"Docs": "Token returns a single-use token to use for an SSE connection. A token can only\nbe used for a single SSE connection. Tokens are stored in memory for a maximum\nof 1 minute, with at most 10 unused tokens (the most recently created) per\naccount.",
"Params": [],
"Returns": [
{
"Name": "r0",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Request",
"Docs": "Requests sends a new request for an open SSE connection. Any currently active\nrequest for the connection will be canceled, but this is done asynchrously, so\nthe SSE connection may still send results for the previous request. Callers\nshould take care to ignore such results. If req.Cancel is set, no new request is\nstarted.",
"Params": [
{
"Name": "req",
"Typewords": [
"Request"
]
}
],
"Returns": []
},
{
"Name": "ParsedMessage",
"Docs": "ParsedMessage returns enough to render the textual body of a message. It is\nassumed the client already has other fields through MessageItem.",
"Params": [
{
"Name": "msgID",
"Typewords": [
"int64"
]
}
],
"Returns": [
{
"Name": "pm",
"Typewords": [
"ParsedMessage"
]
}
]
},
{
"Name": "FromAddressSettingsSave",
"Docs": "FromAddressSettingsSave saves per-\"From\"-address settings.",
"Params": [
{
"Name": "fas",
"Typewords": [
"FromAddressSettings"
]
}
],
"Returns": []
},
{
"Name": "MessageFindMessageID",
"Docs": "MessageFindMessageID looks up a message by Message-Id header, and returns the ID\nof the message in storage. Used when opening a previously saved draft message\nfor editing again.\nIf no message is find, zero is returned, not an error.",
"Params": [
{
"Name": "messageID",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "id",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "MessageCompose",
"Docs": "MessageCompose composes a message and saves it to the mailbox. Used for\nsaving draft messages.",
"Params": [
{
"Name": "m",
"Typewords": [
"ComposeMessage"
]
},
{
"Name": "mailboxID",
"Typewords": [
"int64"
]
}
],
"Returns": [
{
"Name": "id",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "MessageSubmit",
"Docs": "MessageSubmit sends a message by submitting it the outgoing email queue. The\nmessage is sent to all addresses listed in the To, Cc and Bcc addresses, without\nBcc message header.\n\nIf a Sent mailbox is configured, messages are added to it after submitting\nto the delivery queue. If Bcc addresses were present, a header is prepended\nto the message stored in the Sent mailbox.",
"Params": [
{
"Name": "m",
"Typewords": [
"SubmitMessage"
]
}
],
"Returns": []
},
{
"Name": "MessageMove",
"Docs": "MessageMove moves messages to another mailbox. If the message is already in\nthe mailbox an error is returned.",
"Params": [
{
"Name": "messageIDs",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "mailboxID",
"Typewords": [
"int64"
]
}
],
"Returns": []
},
{
"Name": "MessageDelete",
"Docs": "MessageDelete permanently deletes messages, without moving them to the Trash mailbox.",
"Params": [
{
"Name": "messageIDs",
"Typewords": [
"[]",
"int64"
]
}
],
"Returns": []
},
{
"Name": "FlagsAdd",
"Docs": "FlagsAdd adds flags, either system flags like \\Seen or custom keywords. The\nflags should be lower-case, but will be converted and verified.",
"Params": [
{
"Name": "messageIDs",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "flaglist",
"Typewords": [
"[]",
"string"
]
}
],
"Returns": []
},
{
"Name": "FlagsClear",
"Docs": "FlagsClear clears flags, either system flags like \\Seen or custom keywords.",
"Params": [
{
"Name": "messageIDs",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "flaglist",
"Typewords": [
"[]",
"string"
]
}
],
"Returns": []
},
{
"Name": "MailboxCreate",
"Docs": "MailboxCreate creates a new mailbox.",
"Params": [
{
"Name": "name",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "MailboxDelete",
"Docs": "MailboxDelete deletes a mailbox and all its messages.",
"Params": [
{
"Name": "mailboxID",
"Typewords": [
"int64"
]
}
],
"Returns": []
},
{
"Name": "MailboxEmpty",
"Docs": "MailboxEmpty empties a mailbox, removing all messages from the mailbox, but not\nits child mailboxes.",
"Params": [
{
"Name": "mailboxID",
"Typewords": [
"int64"
]
}
],
"Returns": []
},
{
"Name": "MailboxRename",
"Docs": "MailboxRename renames a mailbox, possibly moving it to a new parent. The mailbox\nID and its messages are unchanged.",
"Params": [
{
"Name": "mailboxID",
"Typewords": [
"int64"
]
},
{
"Name": "newName",
"Typewords": [
"string"
]
}
],
"Returns": []
},
{
"Name": "CompleteRecipient",
"Docs": "CompleteRecipient returns autocomplete matches for a recipient, returning the\nmatches, most recently used first, and whether this is the full list and further\nrequests for longer prefixes aren't necessary.",
"Params": [
{
"Name": "search",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "r0",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "r1",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "MailboxSetSpecialUse",
"Docs": "MailboxSetSpecialUse sets the special use flags of a mailbox.",
"Params": [
{
"Name": "mb",
"Typewords": [
"Mailbox"
]
}
],
"Returns": []
},
{
"Name": "ThreadCollapse",
"Docs": "ThreadCollapse saves the ThreadCollapse field for the messages and its\nchildren. The messageIDs are typically thread roots. But not all roots\n(without parent) of a thread need to have the same collapsed state.",
"Params": [
{
"Name": "messageIDs",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "collapse",
"Typewords": [
"bool"
]
}
],
"Returns": []
},
{
"Name": "ThreadMute",
"Docs": "ThreadMute saves the ThreadMute field for the messages and their children.\nIf messages are muted, they are also marked collapsed.",
"Params": [
{
"Name": "messageIDs",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "mute",
"Typewords": [
"bool"
]
}
],
"Returns": []
},
{
"Name": "RecipientSecurity",
"Docs": "RecipientSecurity looks up security properties of the address in the\nsingle-address message addressee (as it appears in a To/Cc/Bcc/etc header).",
"Params": [
{
"Name": "messageAddressee",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "r0",
"Typewords": [
"RecipientSecurity"
]
}
]
},
{
"Name": "DecodeMIMEWords",
"Docs": "DecodeMIMEWords decodes Q/B-encoded words for a mime headers into UTF-8 text.",
"Params": [
{
"Name": "text",
"Typewords": [
"string"
]
}
],
"Returns": [
{
"Name": "r0",
"Typewords": [
"string"
]
}
]
},
{
"Name": "SettingsSave",
"Docs": "SettingsSave saves settings, e.g. for composing.",
"Params": [
{
"Name": "settings",
"Typewords": [
"Settings"
]
}
],
"Returns": []
},
{
"Name": "RulesetSuggestMove",
"Docs": "",
"Params": [
{
"Name": "msgID",
"Typewords": [
"int64"
]
},
{
"Name": "mbSrcID",
"Typewords": [
"int64"
]
},
{
"Name": "mbDstID",
"Typewords": [
"int64"
]
}
],
"Returns": [
{
"Name": "listID",
"Typewords": [
"string"
]
},
{
"Name": "msgFrom",
"Typewords": [
"string"
]
},
{
"Name": "isRemove",
"Typewords": [
"bool"
]
},
{
"Name": "rcptTo",
"Typewords": [
"string"
]
},
{
"Name": "ruleset",
"Typewords": [
"nullable",
"Ruleset"
]
}
]
},
{
"Name": "RulesetAdd",
"Docs": "",
"Params": [
{
"Name": "rcptTo",
"Typewords": [
"string"
]
},
{
"Name": "ruleset",
"Typewords": [
"Ruleset"
]
}
],
"Returns": []
},
{
"Name": "RulesetRemove",
"Docs": "",
"Params": [
{
"Name": "rcptTo",
"Typewords": [
"string"
]
},
{
"Name": "ruleset",
"Typewords": [
"Ruleset"
]
}
],
"Returns": []
},
{
"Name": "RulesetMessageNever",
"Docs": "",
"Params": [
{
"Name": "rcptTo",
"Typewords": [
"string"
]
},
{
"Name": "listID",
"Typewords": [
"string"
]
},
{
"Name": "msgFrom",
"Typewords": [
"string"
]
},
{
"Name": "toInbox",
"Typewords": [
"bool"
]
}
],
"Returns": []
},
{
"Name": "RulesetMailboxNever",
"Docs": "",
"Params": [
{
"Name": "mailboxID",
"Typewords": [
"int64"
]
},
{
"Name": "toMailbox",
"Typewords": [
"bool"
]
}
],
"Returns": []
},
{
"Name": "SSETypes",
"Docs": "SSETypes exists to ensure the generated API contains the types, for use in SSE events.",
"Params": [],
"Returns": [
{
"Name": "start",
"Typewords": [
"EventStart"
]
},
{
"Name": "viewErr",
"Typewords": [
"EventViewErr"
]
},
{
"Name": "viewReset",
"Typewords": [
"EventViewReset"
]
},
{
"Name": "viewMsgs",
"Typewords": [
"EventViewMsgs"
]
},
{
"Name": "viewChanges",
"Typewords": [
"EventViewChanges"
]
},
{
"Name": "msgAdd",
"Typewords": [
"ChangeMsgAdd"
]
},
{
"Name": "msgRemove",
"Typewords": [
"ChangeMsgRemove"
]
},
{
"Name": "msgFlags",
"Typewords": [
"ChangeMsgFlags"
]
},
{
"Name": "msgThread",
"Typewords": [
"ChangeMsgThread"
]
},
{
"Name": "mailboxRemove",
"Typewords": [
"ChangeMailboxRemove"
]
},
{
"Name": "mailboxAdd",
"Typewords": [
"ChangeMailboxAdd"
]
},
{
"Name": "mailboxRename",
"Typewords": [
"ChangeMailboxRename"
]
},
{
"Name": "mailboxCounts",
"Typewords": [
"ChangeMailboxCounts"
]
},
{
"Name": "mailboxSpecialUse",
"Typewords": [
"ChangeMailboxSpecialUse"
]
},
{
"Name": "mailboxKeywords",
"Typewords": [
"ChangeMailboxKeywords"
]
},
{
"Name": "flags",
"Typewords": [
"Flags"
]
}
]
}
],
"Sections": [],
"Structs": [
{
"Name": "Request",
"Docs": "Request is a request to an SSE connection to send messages, either for a new\nview, to continue with an existing view, or to a cancel an ongoing request.",
"Fields": [
{
"Name": "ID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "SSEID",
"Docs": "SSE connection.",
"Typewords": [
"int64"
]
},
{
"Name": "ViewID",
"Docs": "To indicate a request is a continuation (more results) of the previous view. Echoed in events, client checks if it is getting results for the latest request.",
"Typewords": [
"int64"
]
},
{
"Name": "Cancel",
"Docs": "If set, this request and its view are canceled. A new view must be started.",
"Typewords": [
"bool"
]
},
{
"Name": "Query",
"Docs": "",
"Typewords": [
"Query"
]
},
{
"Name": "Page",
"Docs": "",
"Typewords": [
"Page"
]
}
]
},
{
"Name": "Query",
"Docs": "Query is a request for messages that match filters, in a given order.",
"Fields": [
{
"Name": "OrderAsc",
"Docs": "Order by received ascending or desending.",
"Typewords": [
"bool"
]
},
{
"Name": "Threading",
"Docs": "",
"Typewords": [
"ThreadMode"
]
},
{
"Name": "Filter",
"Docs": "",
"Typewords": [
"Filter"
]
},
{
"Name": "NotFilter",
"Docs": "",
"Typewords": [
"NotFilter"
]
}
]
},
{
"Name": "Filter",
"Docs": "Filter selects the messages to return. Fields that are set must all match,\nfor slices each element by match (\"and\").",
"Fields": [
{
"Name": "MailboxID",
"Docs": "If -1, then all mailboxes except Trash/Junk/Rejects. Otherwise, only active if \u003e 0.",
"Typewords": [
"int64"
]
},
{
"Name": "MailboxChildrenIncluded",
"Docs": "If true, also submailboxes are included in the search.",
"Typewords": [
"bool"
]
},
{
"Name": "MailboxName",
"Docs": "In case client doesn't know mailboxes and their IDs yet. Only used during sse connection setup, where it is turned into a MailboxID. Filtering only looks at MailboxID.",
"Typewords": [
"string"
]
},
{
"Name": "Words",
"Docs": "Case insensitive substring match for each string.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "From",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "To",
"Docs": "Including Cc and Bcc.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Oldest",
"Docs": "",
"Typewords": [
"nullable",
"timestamp"
]
},
{
"Name": "Newest",
"Docs": "",
"Typewords": [
"nullable",
"timestamp"
]
},
{
"Name": "Subject",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Attachments",
"Docs": "",
"Typewords": [
"AttachmentType"
]
},
{
"Name": "Labels",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Headers",
"Docs": "Header values can be empty, it's a check if the header is present, regardless of value.",
"Typewords": [
"[]",
"[]",
"string"
]
},
{
"Name": "SizeMin",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "SizeMax",
"Docs": "",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "NotFilter",
"Docs": "NotFilter matches messages that don't match these fields.",
"Fields": [
{
"Name": "Words",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "From",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "To",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Subject",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Attachments",
"Docs": "",
"Typewords": [
"AttachmentType"
]
},
{
"Name": "Labels",
"Docs": "",
"Typewords": [
"[]",
"string"
]
}
]
},
{
"Name": "Page",
"Docs": "Page holds pagination parameters for a request.",
"Fields": [
{
"Name": "AnchorMessageID",
"Docs": "Start returning messages after this ID, if \u003e 0. For pagination, fetching the next set of messages.",
"Typewords": [
"int64"
]
},
{
"Name": "Count",
"Docs": "Number of messages to return, must be \u003e= 1, we never return more than 10000 for one request.",
"Typewords": [
"int32"
]
},
{
"Name": "DestMessageID",
"Docs": "If \u003e 0, return messages until DestMessageID is found. More than Count messages can be returned. For long-running searches, it may take a while before this message if found.",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "ParsedMessage",
"Docs": "ParsedMessage has more parsed/derived information about a message, intended\nfor rendering the (contents of the) message. Information from MessageItem is\nnot duplicated.",
"Fields": [
{
"Name": "ID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Part",
"Docs": "",
"Typewords": [
"Part"
]
},
{
"Name": "Headers",
"Docs": "",
"Typewords": [
"{}",
"[]",
"string"
]
},
{
"Name": "ViewMode",
"Docs": "",
"Typewords": [
"ViewMode"
]
},
{
"Name": "Texts",
"Docs": "Text parts, can be empty.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "HasHTML",
"Docs": "Whether there is an HTML part. The webclient renders HTML message parts through an iframe and a separate request with strict CSP headers to prevent script execution and loading of external resources, which isn't possible when loading in iframe with inline HTML because not all browsers support the iframe csp attribute.",
"Typewords": [
"bool"
]
},
{
"Name": "ListReplyAddress",
"Docs": "From List-Post.",
"Typewords": [
"nullable",
"MessageAddress"
]
}
]
},
{
"Name": "Part",
"Docs": "Part represents a whole mail message, or a part of a multipart message. It\nis designed to handle IMAP requirements efficiently.",
"Fields": [
{
"Name": "BoundaryOffset",
"Docs": "Offset in message where bound starts. -1 for top-level message.",
"Typewords": [
"int64"
]
},
{
"Name": "HeaderOffset",
"Docs": "Offset in message file where header starts.",
"Typewords": [
"int64"
]
},
{
"Name": "BodyOffset",
"Docs": "Offset in message file where body starts.",
"Typewords": [
"int64"
]
},
{
"Name": "EndOffset",
"Docs": "Where body of part ends. Set when part is fully read.",
"Typewords": [
"int64"
]
},
{
"Name": "RawLineCount",
"Docs": "Number of lines in raw, undecoded, body of part. Set when part is fully read.",
"Typewords": [
"int64"
]
},
{
"Name": "DecodedSize",
"Docs": "Number of octets when decoded. If this is a text mediatype, lines ending only in LF are changed end in CRLF and DecodedSize reflects that.",
"Typewords": [
"int64"
]
},
{
"Name": "MediaType",
"Docs": "From Content-Type, upper case. E.g. \"TEXT\". Can be empty because content-type may be absent. In this case, the part may be treated as TEXT/PLAIN.",
"Typewords": [
"string"
]
},
{
"Name": "MediaSubType",
"Docs": "From Content-Type, upper case. E.g. \"PLAIN\".",
"Typewords": [
"string"
]
},
{
"Name": "ContentTypeParams",
"Docs": "E.g. holds \"boundary\" for multipart messages. Has lower-case keys, and original case values.",
"Typewords": [
"{}",
"string"
]
},
{
"Name": "ContentID",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "ContentDescription",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "ContentTransferEncoding",
"Docs": "In upper case.",
"Typewords": [
"string"
]
},
{
"Name": "Envelope",
"Docs": "Email message headers. Not for non-message parts.",
"Typewords": [
"nullable",
"Envelope"
]
},
{
"Name": "Parts",
"Docs": "Parts if this is a multipart.",
"Typewords": [
"[]",
"Part"
]
},
{
"Name": "Message",
"Docs": "Only for message/rfc822 and message/global. This part may have a buffer as backing io.ReaderAt, because a message/global can have a non-identity content-transfer-encoding. This part has a nil parent.",
"Typewords": [
"nullable",
"Part"
]
}
]
},
{
"Name": "Envelope",
"Docs": "Envelope holds the basic/common message headers as used in IMAP4.",
"Fields": [
{
"Name": "Date",
"Docs": "",
"Typewords": [
"timestamp"
]
},
{
"Name": "Subject",
"Docs": "Q/B-word-decoded.",
"Typewords": [
"string"
]
},
{
"Name": "From",
"Docs": "",
"Typewords": [
"[]",
"Address"
]
},
{
"Name": "Sender",
"Docs": "",
"Typewords": [
"[]",
"Address"
]
},
{
"Name": "ReplyTo",
"Docs": "",
"Typewords": [
"[]",
"Address"
]
},
{
"Name": "To",
"Docs": "",
"Typewords": [
"[]",
"Address"
]
},
{
"Name": "CC",
"Docs": "",
"Typewords": [
"[]",
"Address"
]
},
{
"Name": "BCC",
"Docs": "",
"Typewords": [
"[]",
"Address"
]
},
{
"Name": "InReplyTo",
"Docs": "From In-Reply-To header, includes \u003c\u003e.",
"Typewords": [
"string"
]
},
{
"Name": "MessageID",
"Docs": "From Message-Id header, includes \u003c\u003e.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Address",
"Docs": "Address as used in From and To headers.",
"Fields": [
{
"Name": "Name",
"Docs": "Free-form name for display in mail applications.",
"Typewords": [
"string"
]
},
{
"Name": "User",
"Docs": "Localpart, encoded as string. Must be parsed before using as Localpart.",
"Typewords": [
"string"
]
},
{
"Name": "Host",
"Docs": "Domain in ASCII.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "MessageAddress",
"Docs": "MessageAddress is like message.Address, but with a dns.Domain, with unicode name\nincluded.",
"Fields": [
{
"Name": "Name",
"Docs": "Free-form name for display in mail applications.",
"Typewords": [
"string"
]
},
{
"Name": "User",
"Docs": "Localpart, encoded.",
"Typewords": [
"string"
]
},
{
"Name": "Domain",
"Docs": "",
"Typewords": [
"Domain"
]
}
]
},
{
"Name": "Domain",
"Docs": "Domain is a domain name, with one or more labels, with at least an ASCII\nrepresentation, and for IDNA non-ASCII domains a unicode representation.\nThe ASCII string must be used for DNS lookups. The strings do not have a\ntrailing dot. When using with StrictResolver, add the trailing dot.",
"Fields": [
{
"Name": "ASCII",
"Docs": "A non-unicode domain, e.g. with A-labels (xn--...) or NR-LDH (non-reserved letters/digits/hyphens) labels. Always in lower case. No trailing dot.",
"Typewords": [
"string"
]
},
{
"Name": "Unicode",
"Docs": "Name as U-labels, in Unicode NFC. Empty if this is an ASCII-only domain. No trailing dot.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "FromAddressSettings",
"Docs": "FromAddressSettings are webmail client settings per \"From\" address.",
"Fields": [
{
"Name": "FromAddress",
"Docs": "Unicode.",
"Typewords": [
"string"
]
},
{
"Name": "ViewMode",
"Docs": "",
"Typewords": [
"ViewMode"
]
}
]
},
{
"Name": "ComposeMessage",
"Docs": "ComposeMessage is a message to be composed, for saving draft messages.",
"Fields": [
{
"Name": "From",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "To",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Cc",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Bcc",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "ReplyTo",
"Docs": "If non-empty, Reply-To header to add to message.",
"Typewords": [
"string"
]
},
{
"Name": "Subject",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "TextBody",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "ResponseMessageID",
"Docs": "If set, this was a reply or forward, based on IsForward.",
"Typewords": [
"int64"
]
},
{
"Name": "DraftMessageID",
"Docs": "If set, previous draft message that will be removed after composing new message.",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "SubmitMessage",
"Docs": "SubmitMessage is an email message to be sent to one or more recipients.\nAddresses are formatted as just email address, or with a name like \"name\n\u003cuser@host\u003e\".",
"Fields": [
{
"Name": "From",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "To",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Cc",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Bcc",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "ReplyTo",
"Docs": "If non-empty, Reply-To header to add to message.",
"Typewords": [
"string"
]
},
{
"Name": "Subject",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "TextBody",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Attachments",
"Docs": "",
"Typewords": [
"[]",
"File"
]
},
{
"Name": "ForwardAttachments",
"Docs": "",
"Typewords": [
"ForwardAttachments"
]
},
{
"Name": "IsForward",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "ResponseMessageID",
"Docs": "If set, this was a reply or forward, based on IsForward.",
"Typewords": [
"int64"
]
},
{
"Name": "UserAgent",
"Docs": "User-Agent header added if not empty.",
"Typewords": [
"string"
]
},
{
"Name": "RequireTLS",
"Docs": "For \"Require TLS\" extension during delivery.",
"Typewords": [
"nullable",
"bool"
]
},
{
"Name": "FutureRelease",
"Docs": "If set, time (in the future) when message should be delivered from queue.",
"Typewords": [
"nullable",
"timestamp"
]
},
{
"Name": "ArchiveThread",
"Docs": "If set, thread is archived after sending message.",
"Typewords": [
"bool"
]
},
{
"Name": "ArchiveReferenceMailboxID",
"Docs": "If ArchiveThread is set, thread messages from this mailbox ID are moved to the archive mailbox ID. E.g. of Inbox.",
"Typewords": [
"int64"
]
},
{
"Name": "DraftMessageID",
"Docs": "If set, draft message that will be removed after sending.",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "File",
"Docs": "File is a new attachment (not from an existing message that is being\nforwarded) to send with a SubmitMessage.",
"Fields": [
{
"Name": "Filename",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "DataURI",
"Docs": "Full data of the attachment, with base64 encoding and including content-type.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "ForwardAttachments",
"Docs": "ForwardAttachments references attachments by a list of message.Part paths.",
"Fields": [
{
"Name": "MessageID",
"Docs": "Only relevant if MessageID is not 0.",
"Typewords": [
"int64"
]
},
{
"Name": "Paths",
"Docs": "List of attachments, each path is a list of indices into the top-level message.Part.Parts.",
"Typewords": [
"[]",
"[]",
"int32"
]
}
]
},
{
"Name": "Mailbox",
"Docs": "Mailbox is collection of messages, e.g. Inbox or Sent.",
"Fields": [
{
"Name": "ID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Name",
"Docs": "\"Inbox\" is the name for the special IMAP \"INBOX\". Slash separated for hierarchy.",
"Typewords": [
"string"
]
},
{
"Name": "UIDValidity",
"Docs": "If UIDs are invalidated, e.g. when renaming a mailbox to a previously existing name, UIDValidity must be changed. Used by IMAP for synchronization.",
"Typewords": [
"uint32"
]
},
{
"Name": "UIDNext",
"Docs": "UID likely to be assigned to next message. Used by IMAP to detect messages delivered to a mailbox.",
"Typewords": [
"UID"
]
},
{
"Name": "Archive",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Draft",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Junk",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Sent",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Trash",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Keywords",
"Docs": "Keywords as used in messages. Storing a non-system keyword for a message automatically adds it to this list. Used in the IMAP FLAGS response. Only \"atoms\" are allowed (IMAP syntax), keywords are case-insensitive, only stored in lower case (for JMAP), sorted.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "HaveCounts",
"Docs": "Whether MailboxCounts have been initialized.",
"Typewords": [
"bool"
]
},
{
"Name": "Total",
"Docs": "Total number of messages, excluding \\Deleted. For JMAP.",
"Typewords": [
"int64"
]
},
{
"Name": "Deleted",
"Docs": "Number of messages with \\Deleted flag. Used for IMAP message count that includes messages with \\Deleted.",
"Typewords": [
"int64"
]
},
{
"Name": "Unread",
"Docs": "Messages without \\Seen, excluding those with \\Deleted, for JMAP.",
"Typewords": [
"int64"
]
},
{
"Name": "Unseen",
"Docs": "Messages without \\Seen, including those with \\Deleted, for IMAP.",
"Typewords": [
"int64"
]
},
{
"Name": "Size",
"Docs": "Number of bytes for all messages.",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "RecipientSecurity",
"Docs": "RecipientSecurity is a quick analysis of the security properties of delivery to\nthe recipient (domain).",
"Fields": [
{
"Name": "STARTTLS",
"Docs": "Whether recipient domain supports (opportunistic) STARTTLS, as seen during most recent delivery attempt. Will be \"unknown\" if no delivery to the domain has been attempted yet.",
"Typewords": [
"SecurityResult"
]
},
{
"Name": "MTASTS",
"Docs": "Whether we have a stored enforced MTA-STS policy, or domain has MTA-STS DNS record.",
"Typewords": [
"SecurityResult"
]
},
{
"Name": "DNSSEC",
"Docs": "Whether MX lookup response was DNSSEC-signed.",
"Typewords": [
"SecurityResult"
]
},
{
"Name": "DANE",
"Docs": "Whether first delivery destination has DANE records.",
"Typewords": [
"SecurityResult"
]
},
{
"Name": "RequireTLS",
"Docs": "Whether recipient domain is known to implement the REQUIRETLS SMTP extension. Will be \"unknown\" if no delivery to the domain has been attempted yet.",
"Typewords": [
"SecurityResult"
]
}
]
},
{
"Name": "Settings",
"Docs": "Settings are webmail client settings.",
"Fields": [
{
"Name": "ID",
"Docs": "Singleton ID 1.",
"Typewords": [
"uint8"
]
},
{
"Name": "Signature",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Quoting",
"Docs": "",
"Typewords": [
"Quoting"
]
},
{
"Name": "ShowAddressSecurity",
"Docs": "Whether to show the bars underneath the address input fields indicating starttls/dnssec/dane/mtasts/requiretls support by address.",
"Typewords": [
"bool"
]
},
{
"Name": "ShowHTML",
"Docs": "Show HTML version of message by default, instead of plain text.",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "Ruleset",
"Docs": "",
"Fields": [
{
"Name": "SMTPMailFromRegexp",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "MsgFromRegexp",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "VerifiedDomain",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "HeadersRegexp",
"Docs": "",
"Typewords": [
"{}",
"string"
]
},
{
"Name": "IsForward",
"Docs": "todo: once we implement ARC, we can use dkim domains that we cannot verify but that the arc-verified forwarding mail server was able to verify.",
"Typewords": [
"bool"
]
},
{
"Name": "ListAllowDomain",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "AcceptRejectsToMailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Mailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Comment",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "VerifiedDNSDomain",
"Docs": "",
"Typewords": [
"Domain"
]
},
{
"Name": "ListAllowDNSDomain",
"Docs": "",
"Typewords": [
"Domain"
]
}
]
},
{
"Name": "EventStart",
"Docs": "EventStart is the first message sent on an SSE connection, giving the client\nbasic data to populate its UI. After this event, messages will follow quickly in\nan EventViewMsgs event.",
"Fields": [
{
"Name": "SSEID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "LoginAddress",
"Docs": "",
"Typewords": [
"MessageAddress"
]
},
{
"Name": "Addresses",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "DomainAddressConfigs",
"Docs": "ASCII domain to address config.",
"Typewords": [
"{}",
"DomainAddressConfig"
]
},
{
"Name": "MailboxName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Mailboxes",
"Docs": "",
"Typewords": [
"[]",
"Mailbox"
]
},
{
"Name": "RejectsMailbox",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Settings",
"Docs": "",
"Typewords": [
"Settings"
]
},
{
"Name": "AccountPath",
"Docs": "If nonempty, the path on same host to webaccount interface.",
"Typewords": [
"string"
]
},
{
"Name": "Version",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "DomainAddressConfig",
"Docs": "DomainAddressConfig has the address (localpart) configuration for a domain, so\nthe webmail client can decide if an address matches the addresses of the\naccount.",
"Fields": [
{
"Name": "LocalpartCatchallSeparator",
"Docs": "Can be empty.",
"Typewords": [
"string"
]
},
{
"Name": "LocalpartCaseSensitive",
"Docs": "",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "EventViewErr",
"Docs": "EventViewErr indicates an error during a query for messages. The request is\naborted, no more request-related messages will be sent until the next request.",
"Fields": [
{
"Name": "ViewID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "RequestID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Err",
"Docs": "To be displayed in client.",
"Typewords": [
"string"
]
}
]
},
{
"Name": "EventViewReset",
"Docs": "EventViewReset indicates that a request for the next set of messages in a few\ncould not be fulfilled, e.g. because the anchor message does not exist anymore.\nThe client should clear its list of messages. This can happen before\nEventViewMsgs events are sent.",
"Fields": [
{
"Name": "ViewID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "RequestID",
"Docs": "",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "EventViewMsgs",
"Docs": "EventViewMsgs contains messages for a view, possibly a continuation of an\nearlier list of messages.",
"Fields": [
{
"Name": "ViewID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "RequestID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "MessageItems",
"Docs": "If empty, this was the last message for the request. If non-empty, a list of thread messages. Each with the first message being the reason this thread is included and can be used as AnchorID in followup requests. If the threading mode is \"off\" in the query, there will always be only a single message. If a thread is sent, all messages in the thread are sent, including those that don't match the query (e.g. from another mailbox). Threads can be displayed based on the ThreadParentIDs field, with possibly slightly different display based on field ThreadMissingLink.",
"Typewords": [
"[]",
"[]",
"MessageItem"
]
},
{
"Name": "ParsedMessage",
"Docs": "If set, will match the target page.DestMessageID from the request.",
"Typewords": [
"nullable",
"ParsedMessage"
]
},
{
"Name": "ViewEnd",
"Docs": "If set, there are no more messages in this view at this moment. Messages can be added, typically via Change messages, e.g. for new deliveries.",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "MessageItem",
"Docs": "MessageItem is sent by queries, it has derived information analyzed from\nmessage.Part, made for the needs of the message items in the message list.\nmessages.",
"Fields": [
{
"Name": "Message",
"Docs": "Without ParsedBuf and MsgPrefix, for size.",
"Typewords": [
"Message"
]
},
{
"Name": "Envelope",
"Docs": "",
"Typewords": [
"MessageEnvelope"
]
},
{
"Name": "Attachments",
"Docs": "",
"Typewords": [
"[]",
"Attachment"
]
},
{
"Name": "IsSigned",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "IsEncrypted",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "FirstLine",
"Docs": "Of message body, for showing as preview.",
"Typewords": [
"string"
]
},
{
"Name": "MatchQuery",
"Docs": "If message does not match query, it can still be included because of threading.",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "Message",
"Docs": "Message stored in database and per-message file on disk.\n\nContents are always the combined data from MsgPrefix and the on-disk file named\nbased on ID.\n\nMessages always have a header section, even if empty. Incoming messages without\nheader section must get an empty header section added before inserting.",
"Fields": [
{
"Name": "ID",
"Docs": "ID, unchanged over lifetime, determines path to on-disk msg file. Set during deliver.",
"Typewords": [
"int64"
]
},
{
"Name": "UID",
"Docs": "UID, for IMAP. Set during deliver.",
"Typewords": [
"UID"
]
},
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "ModSeq",
"Docs": "Modification sequence, for faster syncing with IMAP QRESYNC and JMAP. ModSeq is the last modification. CreateSeq is the Seq the message was inserted, always \u003c= ModSeq. If Expunged is set, the message has been removed and should not be returned to the user. In this case, ModSeq is the Seq where the message is removed, and will never be changed again. We have an index on both ModSeq (for JMAP that synchronizes per account) and MailboxID+ModSeq (for IMAP that synchronizes per mailbox). The index on CreateSeq helps efficiently finding created messages for JMAP. The value of ModSeq is special for IMAP. Messages that existed before ModSeq was added have 0 as value. But modseq 0 in IMAP is special, so we return it as 1. If we get modseq 1 from a client, the IMAP server will translate it to 0. When we return modseq to clients, we turn 0 into 1.",
"Typewords": [
"ModSeq"
]
},
{
"Name": "CreateSeq",
"Docs": "",
"Typewords": [
"ModSeq"
]
},
{
"Name": "Expunged",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "IsReject",
"Docs": "If set, this message was delivered to a Rejects mailbox. When it is moved to a different mailbox, its MailboxOrigID is set to the destination mailbox and this flag cleared.",
"Typewords": [
"bool"
]
},
{
"Name": "IsForward",
"Docs": "If set, this is a forwarded message (through a ruleset with IsForward). This causes fields used during junk analysis to be moved to their Orig variants, and masked IP fields cleared, so they aren't used in junk classifications for incoming messages. This ensures the forwarded messages don't cause negative reputation for the forwarding mail server, which may also be sending regular messages.",
"Typewords": [
"bool"
]
},
{
"Name": "MailboxOrigID",
"Docs": "MailboxOrigID is the mailbox the message was originally delivered to. Typically Inbox or Rejects, but can also be a mailbox configured in a Ruleset, or Postmaster, TLS/DMARC reporting addresses. MailboxOrigID is not changed when the message is moved to another mailbox, e.g. Archive/Trash/Junk. Used for per-mailbox reputation. MailboxDestinedID is normally 0, but when a message is delivered to the Rejects mailbox, it is set to the intended mailbox according to delivery rules, typically that of Inbox. When such a message is moved out of Rejects, the MailboxOrigID is corrected by setting it to MailboxDestinedID. This ensures the message is used for reputation calculation for future deliveries to that mailbox. These are not bstore references to prevent having to update all messages in a mailbox when the original mailbox is removed. Use of these fields requires checking if the mailbox still exists.",
"Typewords": [
"int64"
]
},
{
"Name": "MailboxDestinedID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Received",
"Docs": "",
"Typewords": [
"timestamp"
]
},
{
"Name": "RemoteIP",
"Docs": "Full IP address of remote SMTP server. Empty if not delivered over SMTP. The masked IPs are used to classify incoming messages. They are left empty for messages matching a ruleset for forwarded messages.",
"Typewords": [
"string"
]
},
{
"Name": "RemoteIPMasked1",
"Docs": "For IPv4 /32, for IPv6 /64, for reputation.",
"Typewords": [
"string"
]
},
{
"Name": "RemoteIPMasked2",
"Docs": "For IPv4 /26, for IPv6 /48.",
"Typewords": [
"string"
]
},
{
"Name": "RemoteIPMasked3",
"Docs": "For IPv4 /21, for IPv6 /32.",
"Typewords": [
"string"
]
},
{
"Name": "EHLODomain",
"Docs": "Only set if present and not an IP address. Unicode string. Empty for forwarded messages.",
"Typewords": [
"string"
]
},
{
"Name": "MailFrom",
"Docs": "With localpart and domain. Can be empty.",
"Typewords": [
"string"
]
},
{
"Name": "MailFromLocalpart",
"Docs": "SMTP \"MAIL FROM\", can be empty.",
"Typewords": [
"Localpart"
]
},
{
"Name": "MailFromDomain",
"Docs": "Only set if it is a domain, not an IP. Unicode string. Empty for forwarded messages, but see OrigMailFromDomain.",
"Typewords": [
"string"
]
},
{
"Name": "RcptToLocalpart",
"Docs": "SMTP \"RCPT TO\", can be empty.",
"Typewords": [
"Localpart"
]
},
{
"Name": "RcptToDomain",
"Docs": "Unicode string.",
"Typewords": [
"string"
]
},
{
"Name": "MsgFromLocalpart",
"Docs": "Parsed \"From\" message header, used for reputation along with domain validation.",
"Typewords": [
"Localpart"
]
},
{
"Name": "MsgFromDomain",
"Docs": "Unicode string.",
"Typewords": [
"string"
]
},
{
"Name": "MsgFromOrgDomain",
"Docs": "Unicode string.",
"Typewords": [
"string"
]
},
{
"Name": "EHLOValidated",
"Docs": "Simplified statements of the Validation fields below, used for incoming messages to check reputation.",
"Typewords": [
"bool"
]
},
{
"Name": "MailFromValidated",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "MsgFromValidated",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "EHLOValidation",
"Docs": "Validation can also take reverse IP lookup into account, not only SPF.",
"Typewords": [
"Validation"
]
},
{
"Name": "MailFromValidation",
"Docs": "Can have SPF-specific validations like ValidationSoftfail.",
"Typewords": [
"Validation"
]
},
{
"Name": "MsgFromValidation",
"Docs": "Desirable validations: Strict, DMARC, Relaxed. Will not be just Pass.",
"Typewords": [
"Validation"
]
},
{
"Name": "DKIMDomains",
"Docs": "Domains with verified DKIM signatures. Unicode string. For forwarded messages, a DKIM domain that matched a ruleset's verified domain is left out, but included in OrigDKIMDomains.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "OrigEHLODomain",
"Docs": "For forwarded messages,",
"Typewords": [
"string"
]
},
{
"Name": "OrigDKIMDomains",
"Docs": "",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "MessageID",
"Docs": "Canonicalized Message-Id, always lower-case and normalized quoting, without \u003c\u003e's. Empty if missing. Used for matching message threads, and to prevent duplicate reject delivery.",
"Typewords": [
"string"
]
},
{
"Name": "SubjectBase",
"Docs": "For matching threads in case there is no References/In-Reply-To header. It is lower-cased, white-space collapsed, mailing list tags and re/fwd tags removed.",
"Typewords": [
"string"
]
},
{
"Name": "MessageHash",
"Docs": "Hash of message. For rejects delivery in case there is no Message-ID, only set when delivered as reject.",
"Typewords": [
"[]",
"uint8"
]
},
{
"Name": "ThreadID",
"Docs": "ID of message starting this thread.",
"Typewords": [
"int64"
]
},
{
"Name": "ThreadParentIDs",
"Docs": "IDs of parent messages, from closest parent to the root message. Parent messages may be in a different mailbox, or may no longer exist. ThreadParentIDs must never contain the message id itself (a cycle), and parent messages must reference the same ancestors.",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "ThreadMissingLink",
"Docs": "ThreadMissingLink is true if there is no match with a direct parent. E.g. first ID in ThreadParentIDs is not the direct ancestor (an intermediate message may have been deleted), or subject-based matching was done.",
"Typewords": [
"bool"
]
},
{
"Name": "ThreadMuted",
"Docs": "If set, newly delivered child messages are automatically marked as read. This field is copied to new child messages. Changes are propagated to the webmail client.",
"Typewords": [
"bool"
]
},
{
"Name": "ThreadCollapsed",
"Docs": "If set, this (sub)thread is collapsed in the webmail client, for threading mode \"on\" (mode \"unread\" ignores it). This field is copied to new child message. Changes are propagated to the webmail client.",
"Typewords": [
"bool"
]
},
{
"Name": "IsMailingList",
"Docs": "If received message was known to match a mailing list rule (with modified junk filtering).",
"Typewords": [
"bool"
]
},
{
"Name": "DSN",
"Docs": "If this message is a DSN, generated by us or received. For DSNs, we don't look at the subject when matching threads.",
"Typewords": [
"bool"
]
},
{
"Name": "ReceivedTLSVersion",
"Docs": "0 if unknown, 1 if plaintext/no TLS, otherwise TLS cipher suite.",
"Typewords": [
"uint16"
]
},
{
"Name": "ReceivedTLSCipherSuite",
"Docs": "",
"Typewords": [
"uint16"
]
},
{
"Name": "ReceivedRequireTLS",
"Docs": "Whether RequireTLS was known to be used for incoming delivery.",
"Typewords": [
"bool"
]
},
{
"Name": "Seen",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Answered",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Flagged",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Forwarded",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Junk",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Notjunk",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Deleted",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Draft",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Phishing",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "MDNSent",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Keywords",
"Docs": "For keywords other than system flags or the basic well-known $-flags. Only in \"atom\" syntax (IMAP), they are case-insensitive, always stored in lower-case (for JMAP), sorted.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "Size",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "TrainedJunk",
"Docs": "If nil, no training done yet. Otherwise, true is trained as junk, false trained as nonjunk.",
"Typewords": [
"nullable",
"bool"
]
},
{
"Name": "MsgPrefix",
"Docs": "Typically holds received headers and/or header separator.",
"Typewords": [
"[]",
"uint8"
]
},
{
"Name": "ParsedBuf",
"Docs": "ParsedBuf message structure. Currently saved as JSON of message.Part because bstore cannot yet store recursive types. Created when first needed, and saved in the database. todo: once replaced with non-json storage, remove date fixup in ../message/part.go.",
"Typewords": [
"[]",
"uint8"
]
}
]
},
{
"Name": "MessageEnvelope",
"Docs": "MessageEnvelope is like message.Envelope, as used in message.Part, but including\nunicode host names for IDNA names.",
"Fields": [
{
"Name": "Date",
"Docs": "todo: should get sherpadoc to understand type embeds and embed the non-MessageAddress fields from message.Envelope.",
"Typewords": [
"timestamp"
]
},
{
"Name": "Subject",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "From",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "Sender",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "ReplyTo",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "To",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "CC",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "BCC",
"Docs": "",
"Typewords": [
"[]",
"MessageAddress"
]
},
{
"Name": "InReplyTo",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "MessageID",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "Attachment",
"Docs": "Attachment is a MIME part is an existing message that is not intended as\nviewable text or HTML part.",
"Fields": [
{
"Name": "Path",
"Docs": "Indices into top-level message.Part.Parts.",
"Typewords": [
"[]",
"int32"
]
},
{
"Name": "Filename",
"Docs": "File name based on \"name\" attribute of \"Content-Type\", or the \"filename\" attribute of \"Content-Disposition\".",
"Typewords": [
"string"
]
},
{
"Name": "Part",
"Docs": "",
"Typewords": [
"Part"
]
}
]
},
{
"Name": "EventViewChanges",
"Docs": "EventViewChanges contain one or more changes relevant for the client, either\nwith new mailbox total/unseen message counts, or messages added/removed/modified\n(flags) for the current view.",
"Fields": [
{
"Name": "ViewID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Changes",
"Docs": "The first field of [2]any is a string, the second of the Change types below.",
"Typewords": [
"[]",
"[]",
"any"
]
}
]
},
{
"Name": "ChangeMsgAdd",
"Docs": "ChangeMsgAdd adds a new message and possibly its thread to the view.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "UID",
"Docs": "",
"Typewords": [
"UID"
]
},
{
"Name": "ModSeq",
"Docs": "",
"Typewords": [
"ModSeq"
]
},
{
"Name": "Flags",
"Docs": "System flags.",
"Typewords": [
"Flags"
]
},
{
"Name": "Keywords",
"Docs": "Other flags.",
"Typewords": [
"[]",
"string"
]
},
{
"Name": "MessageItems",
"Docs": "",
"Typewords": [
"[]",
"MessageItem"
]
}
]
},
{
"Name": "Flags",
"Docs": "Flags for a mail message.",
"Fields": [
{
"Name": "Seen",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Answered",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Flagged",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Forwarded",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Junk",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Notjunk",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Deleted",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Draft",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Phishing",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "MDNSent",
"Docs": "",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "ChangeMsgRemove",
"Docs": "ChangeMsgRemove removes one or more messages from the view.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "UIDs",
"Docs": "Must be in increasing UID order, for IMAP.",
"Typewords": [
"[]",
"UID"
]
},
{
"Name": "ModSeq",
"Docs": "",
"Typewords": [
"ModSeq"
]
}
]
},
{
"Name": "ChangeMsgFlags",
"Docs": "ChangeMsgFlags updates flags for one message.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "UID",
"Docs": "",
"Typewords": [
"UID"
]
},
{
"Name": "ModSeq",
"Docs": "",
"Typewords": [
"ModSeq"
]
},
{
"Name": "Mask",
"Docs": "Which flags are actually modified.",
"Typewords": [
"Flags"
]
},
{
"Name": "Flags",
"Docs": "New flag values. All are set, not just mask.",
"Typewords": [
"Flags"
]
},
{
"Name": "Keywords",
"Docs": "Non-system/well-known flags/keywords/labels.",
"Typewords": [
"[]",
"string"
]
}
]
},
{
"Name": "ChangeMsgThread",
"Docs": "ChangeMsgThread updates muted/collapsed fields for one message.",
"Fields": [
{
"Name": "MessageIDs",
"Docs": "",
"Typewords": [
"[]",
"int64"
]
},
{
"Name": "Muted",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Collapsed",
"Docs": "",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "ChangeMailboxRemove",
"Docs": "ChangeMailboxRemove indicates a mailbox was removed, including all its messages.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "Name",
"Docs": "",
"Typewords": [
"string"
]
}
]
},
{
"Name": "ChangeMailboxAdd",
"Docs": "ChangeMailboxAdd indicates a new mailbox was added, initially without any messages.",
"Fields": [
{
"Name": "Mailbox",
"Docs": "",
"Typewords": [
"Mailbox"
]
}
]
},
{
"Name": "ChangeMailboxRename",
"Docs": "ChangeMailboxRename indicates a mailbox was renamed. Its ID stays the same.\nIt could be under a new parent.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "OldName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "NewName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Flags",
"Docs": "",
"Typewords": [
"[]",
"string"
]
}
]
},
{
"Name": "ChangeMailboxCounts",
"Docs": "ChangeMailboxCounts set new total and unseen message counts for a mailbox.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "MailboxName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Total",
"Docs": "Total number of messages, excluding \\Deleted. For JMAP.",
"Typewords": [
"int64"
]
},
{
"Name": "Deleted",
"Docs": "Number of messages with \\Deleted flag. Used for IMAP message count that includes messages with \\Deleted.",
"Typewords": [
"int64"
]
},
{
"Name": "Unread",
"Docs": "Messages without \\Seen, excluding those with \\Deleted, for JMAP.",
"Typewords": [
"int64"
]
},
{
"Name": "Unseen",
"Docs": "Messages without \\Seen, including those with \\Deleted, for IMAP.",
"Typewords": [
"int64"
]
},
{
"Name": "Size",
"Docs": "Number of bytes for all messages.",
"Typewords": [
"int64"
]
}
]
},
{
"Name": "ChangeMailboxSpecialUse",
"Docs": "ChangeMailboxSpecialUse has updated special-use flags for a mailbox.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "MailboxName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "SpecialUse",
"Docs": "",
"Typewords": [
"SpecialUse"
]
}
]
},
{
"Name": "SpecialUse",
"Docs": "SpecialUse identifies a specific role for a mailbox, used by clients to\nunderstand where messages should go.",
"Fields": [
{
"Name": "Archive",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Draft",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Junk",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Sent",
"Docs": "",
"Typewords": [
"bool"
]
},
{
"Name": "Trash",
"Docs": "",
"Typewords": [
"bool"
]
}
]
},
{
"Name": "ChangeMailboxKeywords",
"Docs": "ChangeMailboxKeywords has an updated list of keywords for a mailbox, e.g. after\na message was added with a keyword that wasn't in the mailbox yet.",
"Fields": [
{
"Name": "MailboxID",
"Docs": "",
"Typewords": [
"int64"
]
},
{
"Name": "MailboxName",
"Docs": "",
"Typewords": [
"string"
]
},
{
"Name": "Keywords",
"Docs": "",
"Typewords": [
"[]",
"string"
]
}
]
}
],
"Ints": [
{
"Name": "UID",
"Docs": "IMAP UID.",
"Values": null
},
{
"Name": "ModSeq",
"Docs": "ModSeq represents a modseq as stored in the database. ModSeq 0 in the\ndatabase is sent to the client as 1, because modseq 0 is special in IMAP.\nModSeq coming from the client are of type int64.",
"Values": null
},
{
"Name": "Validation",
"Docs": "Validation of \"message From\" domain.",
"Values": [
{
"Name": "ValidationUnknown",
"Value": 0,
"Docs": ""
},
{
"Name": "ValidationStrict",
"Value": 1,
"Docs": "Like DMARC, with strict policies."
},
{
"Name": "ValidationDMARC",
"Value": 2,
"Docs": "Actual DMARC policy."
},
{
"Name": "ValidationRelaxed",
"Value": 3,
"Docs": "Like DMARC, with relaxed policies."
},
{
"Name": "ValidationPass",
"Value": 4,
"Docs": "For SPF."
},
{
"Name": "ValidationNeutral",
"Value": 5,
"Docs": "For SPF."
},
{
"Name": "ValidationTemperror",
"Value": 6,
"Docs": ""
},
{
"Name": "ValidationPermerror",
"Value": 7,
"Docs": ""
},
{
"Name": "ValidationFail",
"Value": 8,
"Docs": ""
},
{
"Name": "ValidationSoftfail",
"Value": 9,
"Docs": "For SPF."
},
{
"Name": "ValidationNone",
"Value": 10,
"Docs": "E.g. No records."
}
]
}
],
"Strings": [
{
"Name": "CSRFToken",
"Docs": "",
"Values": null
},
{
"Name": "ThreadMode",
"Docs": "",
"Values": [
{
"Name": "ThreadOff",
"Value": "off",
"Docs": ""
},
{
"Name": "ThreadOn",
"Value": "on",
"Docs": ""
},
{
"Name": "ThreadUnread",
"Value": "unread",
"Docs": ""
}
]
},
{
"Name": "AttachmentType",
"Docs": "AttachmentType is for filtering by attachment type.",
"Values": [
{
"Name": "AttachmentIndifferent",
"Value": "",
"Docs": ""
},
{
"Name": "AttachmentNone",
"Value": "none",
"Docs": ""
},
{
"Name": "AttachmentAny",
"Value": "any",
"Docs": ""
},
{
"Name": "AttachmentImage",
"Value": "image",
"Docs": "png, jpg, gif, ..."
},
{
"Name": "AttachmentPDF",
"Value": "pdf",
"Docs": ""
},
{
"Name": "AttachmentArchive",
"Value": "archive",
"Docs": "zip files, tgz, ..."
},
{
"Name": "AttachmentSpreadsheet",
"Value": "spreadsheet",
"Docs": "ods, xlsx, ..."
},
{
"Name": "AttachmentDocument",
"Value": "document",
"Docs": "odt, docx, ..."
},
{
"Name": "AttachmentPresentation",
"Value": "presentation",
"Docs": "odp, pptx, ..."
}
]
},
{
"Name": "ViewMode",
"Docs": "ViewMode how a message should be viewed: its text parts, html parts, or html\nwith loading external resources.",
"Values": [
{
"Name": "ModeText",
"Value": "text",
"Docs": ""
},
{
"Name": "ModeHTML",
"Value": "html",
"Docs": ""
},
{
"Name": "ModeHTMLExt",
"Value": "htmlext",
"Docs": "HTML with external resources."
}
]
},
{
"Name": "SecurityResult",
"Docs": "SecurityResult indicates whether a security feature is supported.",
"Values": [
{
"Name": "SecurityResultError",
"Value": "error",
"Docs": ""
},
{
"Name": "SecurityResultNo",
"Value": "no",
"Docs": ""
},
{
"Name": "SecurityResultYes",
"Value": "yes",
"Docs": ""
},
{
"Name": "SecurityResultUnknown",
"Value": "unknown",
"Docs": "Unknown whether supported. Finding out may only be (reasonably) possible when\ntrying (e.g. SMTP STARTTLS). Once tried, the result may be cached for future\nlookups."
}
]
},
{
"Name": "Quoting",
"Docs": "Quoting is a setting for how to quote in replies/forwards.",
"Values": [
{
"Name": "Default",
"Value": "",
"Docs": "Bottom-quote if text is selected, top-quote otherwise."
},
{
"Name": "Bottom",
"Value": "bottom",
"Docs": ""
},
{
"Name": "Top",
"Value": "top",
"Docs": ""
}
]
},
{
"Name": "Localpart",
"Docs": "Localpart is a decoded local part of an email address, before the \"@\".\nFor quoted strings, values do not hold the double quote or escaping backslashes.\nAn empty string can be a valid localpart.\nLocalparts are in Unicode NFC.",
"Values": null
}
],
"SherpaVersion": 0,
"SherpadocVersion": 1
}