Revision control

Copy as Markdown

Other Tools

[
{
"namespace": "messengerUtilities",
"types": [
{
"id": "ParsedMailbox",
"type": "object",
"description": "Representation of a parsed mailbox string (see RFC 5322, section 3.4).",
"properties": {
"name": {
"type": "string",
"optional": true,
"description": "The <var>display-name</var> associated with the provided address or group, if available."
},
"email": {
"type": "string",
"optional": true,
"description": "The <var>addr-spec</var> associated with the provided address, if available."
},
"group": {
"type": "array",
"optional": true,
"items": {
"$ref": "messengerUtilities.ParsedMailbox"
},
"description": "The members of the group, if available."
}
}
},
{
"id": "MailboxHeaders",
"type": "string",
"description": "MIME headers, which by default are treated as containing one or more mailbox strings.",
"enum": [
"bcc",
"cc",
"from",
"reply-to",
"resent-bcc",
"resent-cc",
"resent-from",
"resent-reply-to",
"resent-sender",
"resent-to",
"sender",
"to",
"approved",
"disposition-notification-to",
"delivered-to",
"return-receipt-to",
"mail-reply-to",
"mail-followup-to"
]
}
],
"functions": [
{
"name": "convertToPlainText",
"type": "function",
"description": "Converts the provided body to readable plain text, without tags and leading/trailing whitespace.",
"async": "callback",
"parameters": [
{
"name": "body",
"type": "string",
"description": "The to-be-converted body."
},
{
"name": "options",
"type": "object",
"optional": true,
"properties": {
"flowed": {
"type": "boolean",
"optional": true,
"description": "The converted plain text will be wrapped to lines not longer than 72 characters and use format flowed, as defined by RFC 2646."
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "string"
}
]
}
]
},
{
"name": "formatFileSize",
"type": "function",
"description": "Returns the provided file size in a human readable format (e.g. <var>12 bytes</var> or <var>11,4 GB</var>).",
"async": "callback",
"parameters": [
{
"type": "integer",
"name": "sizeInBytes",
"description": "The size in bytes."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "string"
}
]
}
]
},
{
"name": "parseMailboxString",
"type": "function",
"description": "Parse a mailbox string containing one or more email addresses (see RFC 5322, section 3.4).",
"async": "callback",
"parameters": [
{
"type": "string",
"name": "mailboxString",
"description": "The string to be parsed (e.g. <var>User <user@example.com>, other-user@example.com</var>)"
},
{
"type": "boolean",
"name": "preserveGroups",
"optional": true,
"description": "Keep grouped hierachies. Groups may be specified in a mailbox string as follows: <var>GroupName : user1 <user1@example.com>, user2@example,com ;</var>."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "messengerUtilities.ParsedMailbox"
}
}
]
}
]
},
{
"name": "decodeMimeHeader",
"type": "function",
"description": "Decode the provided header into a readable format according to RFC 2047.",
"async": "callback",
"parameters": [
{
"name": "headerName",
"type": "string"
},
{
"name": "headerValue",
"choices": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
{
"name": "isMailBoxHeader",
"type": "boolean",
"optional": true,
"description": "Headers containing multiple mailbox strings need special handling. For example the header <var>=?UTF-8?Q?H=C3=B6rst=2C_Kenny?= <K.Hoerst@invalid>, new@thunderbird.bug</var> will be wrongly decoded to <var>Hörst, Kenny <K.Hoerst@invalid>, new@thunderbird.bug</var>, corrupting the structure of the first mailbox string. This option overrides the default behavior of treating the headers defined in $(ref:messengerUtilities.MailboxHeaders) as mailbox headers."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
]
},
{
"name": "encodeMimeHeader",
"type": "function",
"description": "Encode the provided header according to RFC 2047.",
"async": "callback",
"parameters": [
{
"name": "headerName",
"type": "string"
},
{
"name": "headerValue",
"choices": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
{
"name": "isMailBoxHeader",
"type": "boolean",
"optional": true,
"description": "Headers containing multiple mailbox strings need special handling. This option overrides the default behavior of treating the headers defined in $(ref:messengerUtilities.MailboxHeaders) as mailbox headers."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
]
}
]
}
]