Revision control

Copy as Markdown

Other Tools

[
{
"namespace": "mailTabs",
"types": [
{
"id": "FolderMode",
"description": "A supported folder mode in the folder pane.",
"type": "string",
"enum": ["all", "unified", "tags", "unread", "favorite", "recent"]
},
{
"id": "MailTab",
"type": "object",
"properties": {
"id": {
"max_manifest_version": 2,
"type": "integer"
},
"tabId": {
"min_manifest_version": 3,
"type": "integer"
},
"windowId": {
"type": "integer"
},
"active": {
"type": "boolean"
},
"groupType": {
"type": "string",
"min_manifest_version": 3,
"description": "Grouping type of the message list.",
"optional": true,
"enum": ["ungrouped", "groupedByThread", "groupedBySortType"]
},
"sortType": {
"type": "string",
"description": "The primary sort column of the message list.",
"optional": true,
"enum": [
"none",
"date",
"subject",
"author",
"id",
"thread",
"priority",
"status",
"size",
"flagged",
"unread",
"recipient",
"location",
"tags",
"junkStatus",
"attachments",
"account",
"custom",
"received",
"correspondent"
]
},
"sortOrder": {
"type": "string",
"description": "The sort order of the message list.",
"optional": true,
"enum": ["none", "ascending", "descending"]
},
"viewType": {
"type": "string",
"max_manifest_version": 2,
"description": "Grouping type of the message list.",
"optional": true,
"enum": ["ungrouped", "groupedByThread", "groupedBySortType"]
},
"layout": {
"type": "string",
"description": "The arrangement of the folder pane, message list pane, and message display pane.",
"enum": ["standard", "wide", "vertical"]
},
"folderMode": {
"description": "The folder mode of the currently displayed folder.",
"$ref": "mailTabs.FolderMode",
"optional": true
},
"folderModesEnabled": {
"type": "array",
"description": "The enabled folder modes in the folder pane, and their sort order.",
"minItems": 1,
"optional": true,
"items": {
"$ref": "mailTabs.FolderMode"
}
},
"folderPaneVisible": {
"type": "boolean",
"description": "Whether the folder pane is visible or not.",
"optional": true
},
"messagePaneVisible": {
"type": "boolean",
"description": "Whether the message pane is visible or not.",
"optional": true
},
"displayedFolder": {
"$ref": "folders.MailFolder",
"description": "The folder displayed in the mail tab. The <permission>accountsRead</permission> permission is required for this property to be included.",
"optional": true
}
}
},
{
"id": "MailTabProperties",
"type": "object",
"properties": {
"groupType": {
"type": "string",
"min_manifest_version": 3,
"description": "Grouping type of the message list.",
"optional": true,
"enum": ["ungrouped", "groupedByThread", "groupedBySortType"]
},
"sortType": {
"type": "string",
"description": "Sorts the list of messages. <var>sortOrder</var> must also be given.",
"optional": true,
"enum": [
"none",
"date",
"subject",
"author",
"id",
"thread",
"priority",
"status",
"size",
"flagged",
"unread",
"recipient",
"location",
"tags",
"junkStatus",
"attachments",
"account",
"custom",
"received",
"correspondent"
]
},
"sortOrder": {
"type": "string",
"description": "Sorts the list of messages. <var>sortType</var> must also be given.",
"optional": true,
"enum": ["none", "ascending", "descending"]
},
"viewType": {
"type": "string",
"max_manifest_version": 2,
"description": "Sets the grouping type of displayed messages.",
"optional": true,
"enum": ["ungrouped", "groupedByThread", "groupedBySortType"]
},
"layout": {
"type": "string",
"description": "Sets the arrangement of the folder pane, message list pane, and message display pane. Note that setting this applies it to all mail tabs.",
"optional": true,
"enum": ["standard", "wide", "vertical"]
},
"folderPaneVisible": {
"type": "boolean",
"description": "Shows or hides the folder pane.",
"optional": true
},
"folderMode": {
"description": "Sets the currently used folder mode, enabling it if required. If used without also specifying <var>displayedFolder</var>, the currently selected folder is re-selected in the new folder mode, if possible.",
"$ref": "mailTabs.FolderMode",
"optional": true
},
"folderModesEnabled": {
"type": "array",
"description": "Set the enabled folder modes in the folder pane, and their sort order.",
"minItems": 1,
"optional": true,
"items": {
"$ref": "mailTabs.FolderMode"
}
},
"messagePaneVisible": {
"type": "boolean",
"description": "Shows or hides the message display pane.",
"optional": true
},
"displayedFolderId": {
"$ref": "folders.MailFolderId",
"min_manifest_version": 3,
"description": "Sets the folder displayed in the mail tab. Requires the <permission>accountsRead</permission> permission. The previous message selection in the given folder will be restored, if any.",
"optional": true
},
"displayedFolder": {
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: MailTabProperties.displayedFolder needs to be specified as a MailFolderId instead of as a full MailFolder object.",
"$ref": "folders.MailFolder"
}
],
"max_manifest_version": 2,
"description": "Sets the folder displayed in the mail tab. Requires the <permission>accountsRead</permission> permission. The previous message selection in the given folder will be restored, if any.",
"optional": true
}
}
},
{
"id": "QuickFilterTextDetail",
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "String to match against the <var>recipients</var>, <var>author</var>, <var>subject</var>, or <var>body</var>."
},
"recipients": {
"type": "boolean",
"description": "Shows messages where <var>text</var> matches the recipients.",
"optional": true
},
"author": {
"type": "boolean",
"description": "Shows messages where <var>text</var> matches the author.",
"optional": true
},
"subject": {
"type": "boolean",
"description": "Shows messages where <var>text</var> matches the subject.",
"optional": true
},
"body": {
"type": "boolean",
"description": "Shows messages where <var>text</var> matches the message body.",
"optional": true
}
}
}
],
"functions": [
{
"name": "query",
"type": "function",
"description": "Gets all mail tabs that have the specified properties, or all mail tabs if no properties are specified.",
"async": "callback",
"parameters": [
{
"type": "object",
"name": "queryInfo",
"optional": true,
"default": {},
"properties": {
"active": {
"type": "boolean",
"optional": true,
"description": "Whether the tabs are active in their windows."
},
"currentWindow": {
"type": "boolean",
"optional": true,
"description": "Whether the tabs are in the current window."
},
"lastFocusedWindow": {
"type": "boolean",
"optional": true,
"description": "Whether the tabs are in the last focused window."
},
"windowId": {
"type": "integer",
"optional": true,
"minimum": -2,
"description": "The ID of the parent window, or $(ref:windows.WINDOW_ID_CURRENT) for the current window."
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "mailTabs.MailTab"
}
}
]
}
]
},
{
"name": "get",
"type": "function",
"description": "Get the $(ref:mailTabs.MailTab) properties of a mail tab.",
"async": "callback",
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "ID of the requested mail tab. Throws if the requested <var>tabId</var> does not belong to a mail tab."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "mailTabs.MailTab"
}
]
}
]
},
{
"name": "getCurrent",
"type": "function",
"max_manifest_version": 2,
"description": "Get the $(ref:mailTabs.MailTab) properties of the active mail tab. Returns <var>undefined</var>, if the active tab is not a mail tab.",
"async": "callback",
"parameters": [
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "mailTabs.MailTab",
"optional": true
}
]
}
]
},
{
"name": "create",
"type": "function",
"description": "Creates a new mail tab. Standard tab properties can be adjusted via $(ref:tabs.update) after the mail tab has been created. **Note:** A new mail window can be created via $(ref:windows.create).",
"async": "callback",
"parameters": [
{
"name": "createProperties",
"$ref": "mailTabs.MailTabProperties",
"optional": true,
"default": {}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "mailTab",
"$ref": "mailTabs.MailTab",
"description": "Details about the created mail tab. Will contain the ID of the new tab."
}
]
}
]
},
{
"name": "update",
"type": "function",
"description": "Modifies the properties of a mail tab. Properties that are not specified in <var>updateProperties</var> are not modified.",
"async": "callback",
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "Defaults to the active tab of the current window.",
"optional": true,
"minimum": 1
},
{
"name": "updateProperties",
"$ref": "mailTabs.MailTabProperties"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"name": "mailTab",
"$ref": "mailTabs.MailTab",
"description": "Details about the updated mail tab."
}
]
}
]
},
{
"name": "getListedMessages",
"type": "function",
"description": "Lists the messages in the current view, honoring sort order and filters.",
"permissions": ["messagesRead"],
"async": "callback",
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "Defaults to the active tab of the current window.",
"optional": true,
"minimum": 1
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "messages.MessageList"
}
]
}
]
},
{
"name": "getSelectedFolders",
"type": "function",
"description": "Lists the selected folders in the folder pane. Does not include folders which are context-clicked, but not selected. The context-clicked folders are always returned by the $(ref:menus.onClicked) event of the menus API.",
"permissions": ["accountsRead"],
"async": "callback",
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "Defaults to the active tab of the current window.",
"optional": true,
"minimum": 1
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "folders.MailFolder"
}
}
]
}
]
},
{
"name": "getSelectedMessages",
"type": "function",
"description": "Lists the selected messages in the current folder. Includes messages in collapsed threads. Does not include messages which are context-clicked, but not selected. The context-clicked messages are always returned by the $(ref:menus.onClicked) event of the menus API.",
"permissions": ["messagesRead"],
"async": "callback",
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "Defaults to the active tab of the current window.",
"optional": true,
"minimum": 1
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "messages.MessageList"
}
]
}
]
},
{
"name": "setSelectedMessages",
"type": "function",
"description": "Selects none, one or multiple messages. Opens collapsed threads to show the selection, if required.",
"permissions": ["messagesRead", "accountsRead"],
"async": true,
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "Defaults to the active tab of the current window.",
"optional": true,
"minimum": 1
},
{
"name": "messageIds",
"type": "array",
"description": "The IDs of the messages, which should be selected. The mail tab will switch to the folder of the selected messages. Throws if they belong to different folders. Array can be empty to deselect any currently selected message.",
"items": {
"$ref": "messages.MessageId"
}
}
]
},
{
"name": "setQuickFilter",
"type": "function",
"description": "Sets the Quick Filter user interface based on the options specified.",
"async": true,
"parameters": [
{
"name": "tabId",
"type": "integer",
"description": "Defaults to the active tab of the current window.",
"optional": true,
"minimum": 1
},
{
"name": "properties",
"type": "object",
"properties": {
"show": {
"type": "boolean",
"description": "Shows or hides the Quick Filter bar.",
"optional": true
},
"unread": {
"type": "boolean",
"description": "Shows only unread messages.",
"optional": true
},
"flagged": {
"type": "boolean",
"description": "Shows only flagged messages.",
"optional": true
},
"contact": {
"type": "boolean",
"description": "Shows only messages from people in the address book.",
"optional": true
},
"tags": {
"optional": true,
"choices": [
{
"type": "boolean"
},
{
"$ref": "messages.tags.TagsDetail"
}
],
"description": "Shows only messages with tags on them."
},
"attachment": {
"type": "boolean",
"description": "Shows only messages with attachments.",
"optional": true
},
"text": {
"$ref": "mailTabs.QuickFilterTextDetail",
"description": "Shows only messages matching the supplied text.",
"optional": true
}
}
}
]
}
],
"events": [
{
"name": "onDisplayedFolderChanged",
"type": "function",
"description": "Fired when the displayed folder changes in any mail tab.",
"permissions": ["accountsRead"],
"parameters": [
{
"name": "tab",
"$ref": "tabs.Tab"
},
{
"name": "displayedFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onSelectedMessagesChanged",
"type": "function",
"description": "Fired when the selected messages change in any mail tab.",
"permissions": ["messagesRead"],
"parameters": [
{
"name": "tab",
"$ref": "tabs.Tab"
},
{
"name": "selectedMessages",
"$ref": "messages.MessageList"
}
]
}
]
}
]