Revision control
Copy as Markdown
Other Tools
[
{
"namespace": "manifest",
"types": [
{
"$extend": "OptionalPermission",
"choices": [
{
"type": "string",
"enum": ["accountsFolders"]
}
]
}
]
},
{
"namespace": "folders",
"permissions": ["accountsRead"],
"types": [
{
"id": "MailFolder",
"description": "An object describing a folder.",
"choices": [
{
"max_manifest_version": 2,
"type": "object",
"properties": {
"accountId": {
"$ref": "accounts.MailAccountId",
"optional": true,
"description": "The id of the account this folder belongs to."
},
"id": {
"$ref": "folders.MailFolderId",
"optional": true,
"description": "An identifier for the folder."
},
"isFavorite": {
"type": "boolean",
"optional": true,
"description": "Whether this folder is a favorite folder."
},
"isRoot": {
"type": "boolean",
"optional": true,
"description": "Whether this folder is a root folder."
},
"isTag": {
"type": "boolean",
"optional": true,
"description": "Whether this folder is a virtual tag folder."
},
"isUnified": {
"type": "boolean",
"optional": true,
"description": "Whether this folder is a unified mailbox folder."
},
"isVirtual": {
"type": "boolean",
"optional": true,
"description": "Whether this folder is a virtual search folder."
},
"name": {
"type": "string",
"optional": true,
"description": "The human-friendly name of this folder."
},
"path": {
"type": "string",
"description": "Path to this folder in the account. Although paths look predictable, never guess a folder's path, as there are a number of reasons why it may not be what you think it is. Use $(ref:folders.getParentFolders) or $(ref:folders.getSubFolders) to obtain hierarchy information."
},
"specialUse": {
"type": "array",
"items": {
"$ref": "folders.MailFolderSpecialUse"
},
"optional": true,
"description": "The special use of this folder. A folder can have multiple special uses."
},
"subFolders": {
"description": "Subfolders of this folder. This property is optional and only present if the inclusion of subfolders had been requested. The folders will be returned in the same order as used in Thunderbird's folder pane.",
"type": "array",
"items": {
"$ref": "folders.MailFolder"
},
"optional": true
},
"type": {
"$ref": "folders.MailFolderSpecialUse",
"optional": true,
"description": "Deprecated. Was used to represent the type of this folder."
}
}
},
{
"min_manifest_version": 3,
"type": "object",
"properties": {
"accountId": {
"$ref": "accounts.MailAccountId",
"description": "The id of the account this folder belongs to. This property is optional and not available for unified mailbox folders or virtual tag folders.",
"optional": true
},
"id": {
"$ref": "folders.MailFolderId",
"description": "An identifier for the folder."
},
"isFavorite": {
"type": "boolean",
"description": "Whether this folder is a favorite folder."
},
"isRoot": {
"type": "boolean",
"description": "Whether this folder is a root folder."
},
"isTag": {
"type": "boolean",
"description": "Whether this folder is a virtual tag folder."
},
"isUnified": {
"type": "boolean",
"description": "Whether this folder is a unified mailbox folder."
},
"isVirtual": {
"type": "boolean",
"description": "Whether this folder is a virtual search folder."
},
"name": {
"type": "string",
"description": "The human-friendly name of this folder."
},
"path": {
"type": "string",
"description": "Path to this folder in the account. Although paths look predictable, never guess a folder's path, as there are a number of reasons why it may not be what you think it is. Use $(ref:folders.getParentFolders) or $(ref:folders.getSubFolders) to obtain hierarchy information."
},
"specialUse": {
"type": "array",
"items": {
"$ref": "folders.MailFolderSpecialUse"
},
"description": "The special use of this folder. A folder can have multiple special uses."
},
"subFolders": {
"description": "Subfolders of this folder. This property is optional and only present if the inclusion of subfolders had been requested. The folders will be returned in the same order as used in Thunderbird's folder pane.",
"type": "array",
"items": {
"$ref": "folders.MailFolder"
},
"optional": true
}
}
}
]
},
{
"id": "MailFolderId",
"type": "string",
"description": "A unique id representing a $(ref:folders.MailFolder) throughout a session. Renaming or moving a folder will invalidate its id."
},
{
"id": "MailFolderInfo",
"type": "object",
"description": "An object containing additional information about a folder.",
"properties": {
"favorite": {
"type": "boolean",
"optional": true,
"max_manifest_version": 2,
"description": "Deprecated. This information is now available in $(ref:folders.MailFolder)."
},
"lastUsed": {
"$ref": "extensionTypes.Date",
"optional": true,
"description": "Date the folder was last used (precision: seconds)."
},
"quota": {
"type": "array",
"items": {
"$ref": "folders.MailFolderQuota"
},
"optional": true,
"description": "Quota information, if available."
},
"newMessageCount": {
"type": "integer",
"optional": true,
"description": "Number of new messages in this folder."
},
"totalMessageCount": {
"type": "integer",
"optional": true,
"description": "Number of messages in this folder."
},
"unreadMessageCount": {
"type": "integer",
"optional": true,
"description": "Number of unread messages in this folder."
}
}
},
{
"id": "MailFolderCapabilities",
"type": "object",
"description": "An object containing capability information about a folder.",
"properties": {
"canAddMessages": {
"type": "boolean",
"optional": true,
"description": "Whether this folder supports adding new messages."
},
"canAddSubfolders": {
"type": "boolean",
"optional": true,
"description": "Whether this folder supports adding new subfolders."
},
"canBeDeleted": {
"type": "boolean",
"optional": true,
"description": "Whether this folder can be deleted."
},
"canBeRenamed": {
"type": "boolean",
"optional": true,
"description": "Whether this folder can be renamed."
},
"canDeleteMessages": {
"type": "boolean",
"optional": true,
"description": "Whether this folder supports deleting messages."
}
}
},
{
"id": "MailFolderSpecialUse",
"type": "string",
"description": "Supported values for the special use of a folder.",
"enum": [
"inbox",
"drafts",
"sent",
"trash",
"templates",
"archives",
"junk",
"outbox"
]
},
{
"id": "MailFolderQuota",
"type": "object",
"description": "An object containing quota information.",
"properties": {
"type": {
"type": "string",
"enum": ["STORAGE", "MESSAGE"],
"description": "The type of the quota as defined by RFC 2087. A <var>STORAGE</var> quota is constraining the available storage in bytes, a <var>MESSAGE</var> quota is constraining the number of storable messages."
},
"limit": {
"type": "integer",
"description": "The maximum available quota."
},
"used": {
"type": "integer",
"description": "The currently used quota."
},
"unused": {
"type": "integer",
"description": "The currently unused quota."
}
}
},
{
"id": "QueryRange",
"type": "object",
"description": "An object defining a range.",
"properties": {
"min": {
"type": "integer",
"optional": true,
"description": "The minimum value required to match the query."
},
"max": {
"type": "integer",
"optional": true,
"description": "The maximum value required to match the query."
}
}
},
{
"id": "RegularExpression",
"type": "object",
"properties": {
"regexp": {
"type": "string",
"description": "A regular expression, for example <var>^Projects \\d{4}$</var>."
},
"flags": {
"type": "string",
"pattern": "^(i|u|v|iu|iv|ui|vi)$",
"description": "Supported RegExp flags: <var>i</var> = case insensitive, and/or one of <var>u</var> = unicode support or <var>v</var> = extended unicode support",
"optional": true
}
}
}
],
"properties": {
"DEFAULT_MOST_RECENT_LIMIT": {
"value": -1,
"description": "The number of most recent folders used in Thunderbird's UI. Controled by the <var>mail.folder_widget.max_recent</var> preference."
}
},
"functions": [
{
"name": "query",
"type": "function",
"description": "Gets folders that match the specified properties, or all folders if no properties are specified.",
"async": "callback",
"parameters": [
{
"type": "object",
"name": "queryInfo",
"optional": true,
"default": {},
"properties": {
"accountId": {
"$ref": "accounts.MailAccountId",
"description": "Limits the search to folders of the account with the specified id.",
"optional": true
},
"canAddMessages": {
"type": "boolean",
"optional": true,
"description": "Whether the folder supports adding new messages, or not."
},
"canAddSubfolders": {
"type": "boolean",
"optional": true,
"description": "Whether the folder supports adding new subfolders, or not."
},
"canBeDeleted": {
"type": "boolean",
"optional": true,
"description": "Whether the folder can be deleted, or not."
},
"canBeRenamed": {
"type": "boolean",
"optional": true,
"description": "Whether the folder can be renamed, or not."
},
"canDeleteMessages": {
"type": "boolean",
"optional": true,
"description": "Whether the folder supports deleting messages, or not."
},
"folderId": {
"$ref": "folders.MailFolderId",
"description": "Limits the search to the folder with the specified id.",
"optional": true
},
"hasMessages": {
"choices": [
{
"type": "boolean"
},
{
"$ref": "QueryRange"
}
],
"optional": true,
"description": "Whether the folder (excluding subfolders) contains messages, or not. Supports to specify a $(ref:folders.QueryRange) (min/max) instead of a simple boolean value (none/some)."
},
"hasUnreadMessages": {
"choices": [
{
"type": "boolean"
},
{
"$ref": "QueryRange"
}
],
"optional": true,
"description": "Whether the folder (excluding subfolders) contains unread messages, or not. Supports to specify a $(ref:folders.QueryRange) (min/max) instead of a simple boolean value (none/some)."
},
"hasNewMessages": {
"choices": [
{
"type": "boolean"
},
{
"$ref": "QueryRange"
}
],
"optional": true,
"description": "Whether the folder (excluding subfolders) contains new messages, or not. Supports to specify a $(ref:folders.QueryRange) (min/max) instead of a simple boolean value (none/some)."
},
"hasSubFolders": {
"choices": [
{
"type": "boolean"
},
{
"$ref": "QueryRange"
}
],
"optional": true,
"description": "Whether the folder has subfolders, or not. Supports to specify a $(ref:folders.QueryRange) (min/max) instead of a simple boolean value (none/some)."
},
"isFavorite": {
"type": "boolean",
"optional": true,
"description": "Whether the folder is a favorite folder, or not."
},
"isRoot": {
"type": "boolean",
"optional": true,
"description": "Whether the folder is a root folder, or not."
},
"isTag": {
"type": "boolean",
"optional": true,
"description": "Whether the folder is a virtual tag folder, or not. Note: Virtual tag folders are always skipped, unless this property is set to <var>true</var>"
},
"isUnified": {
"type": "boolean",
"optional": true,
"description": "Whether the folder is a unified mailbox folder, or not. Note: Unified mailbox folders are always skipped, unless this property is set to <var>true</var>"
},
"isVirtual": {
"type": "boolean",
"optional": true,
"description": "Whether the folder is a virtual search folder, or not."
},
"limit": {
"type": "integer",
"optional": true,
"description": "Limits the number of returned folders. If used together with <var>recent</var>, supports being set to $(ref:folders.DEFAULT_MOST_RECENT_LIMIT)"
},
"name": {
"choices": [
{
"$ref": "RegularExpression"
},
{
"type": "string"
}
],
"optional": true,
"description": "Return only folders whose name is matched by the provided string or regular expression."
},
"path": {
"choices": [
{
"$ref": "RegularExpression"
},
{
"type": "string"
}
],
"optional": true,
"description": "Return only folders whose path is matched by the provided string or regular expression."
},
"recent": {
"type": "boolean",
"optional": true,
"description": "Whether the folder (excluding subfolders) has been used within the last month, or not. The returned folders will be sorted by their recentness."
},
"specialUse": {
"type": "array",
"items": {
"$ref": "folders.MailFolderSpecialUse"
},
"minItems": 1,
"optional": true,
"description": "Match only folders with the specified special use (folders have to match all specified uses)."
},
"type": {
"max_manifest_version": 2,
"$ref": "folders.MailFolderSpecialUse",
"optional": true,
"description": "Deprecated. Match only folders with the specified special use."
}
}
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "folders.MailFolder"
}
}
]
}
]
},
{
"name": "get",
"type": "function",
"min_manifest_version": 3,
"description": "Returns the specified folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "includeSubFolders",
"optional": true,
"type": "boolean",
"default": false,
"description": "Specifies whether the returned $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>false</var>."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "get",
"type": "function",
"max_manifest_version": 2,
"description": "Returns the specified folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "includeSubFolders",
"optional": true,
"type": "boolean",
"default": true,
"description": "Specifies whether the returned $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>true</var>."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "create",
"type": "function",
"min_manifest_version": 3,
"permissions": ["accountsFolders"],
"description": "Creates a new subfolder in the specified folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "childName",
"type": "string"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "create",
"type": "function",
"max_manifest_version": 2,
"permissions": ["accountsFolders"],
"description": "Creates a new subfolder in the specified folder, or at the root of the specified account.",
"async": "callback",
"parameters": [
{
"name": "destination",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.create() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.create() requires to specify the MailFolderId of the account's rootFolder, instead of a full MailAccount object.",
"$ref": "accounts.MailAccount"
}
]
},
{
"name": "childName",
"type": "string"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "rename",
"type": "function",
"max_manifest_version": 2,
"permissions": ["accountsFolders"],
"description": "Renames a folder.",
"async": "callback",
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.rename() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "newName",
"type": "string"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "rename",
"type": "function",
"min_manifest_version": 3,
"permissions": ["accountsFolders"],
"description": "Renames a folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "newName",
"type": "string"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "move",
"type": "function",
"max_manifest_version": 2,
"permissions": ["accountsFolders"],
"description": "Moves the given source folder into the given destination folder. Throws if the destination already contains a folder with the name of the source folder.",
"async": "callback",
"parameters": [
{
"name": "source",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.move() requires to specify a MailFolderId for its source parameter, instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "destination",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.move() requires to specify a MailFolderId for its destination parameter, instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.move() requires to specify the MailFolderId of the account's rootFolder for its destination parameter, instead of a full MailAccount object.",
"$ref": "accounts.MailAccount"
}
]
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "move",
"type": "function",
"min_manifest_version": 3,
"permissions": ["accountsFolders"],
"description": "Moves the given source folder into the given destination folder. Throws if the destination already contains a folder with the name of the source folder.",
"async": "callback",
"parameters": [
{
"name": "sourceFolderId",
"$ref": "folders.MailFolderId"
},
{
"name": "destinationFolderId",
"$ref": "folders.MailFolderId"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "copy",
"type": "function",
"max_manifest_version": 2,
"permissions": ["accountsFolders"],
"description": "Copies the given source folder into the given destination folder. Throws if the destination already contains a folder with the name of the source folder.",
"async": "callback",
"parameters": [
{
"name": "source",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.copy() requires to specify a MailFolderId for its source parameter, instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "destination",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.copy() requires to specify a MailFolderId for its destination parameter, instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.copy() requires to specify the MailFolderId of the account's rootFolder for its destination parameter, instead of a full MailAccount object.",
"$ref": "accounts.MailAccount"
}
]
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "copy",
"type": "function",
"min_manifest_version": 3,
"permissions": ["accountsFolders"],
"description": "Copies the given source folder into the given destination folder. Throws if the destination already contains a folder with the name of the source folder.",
"async": "callback",
"parameters": [
{
"name": "sourceFolderId",
"$ref": "folders.MailFolderId"
},
{
"name": "destinationFolderId",
"$ref": "folders.MailFolderId"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "delete",
"permissions": ["accountsFolders", "messagesDelete"],
"type": "function",
"max_manifest_version": 2,
"description": "Deletes a folder.",
"async": true,
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.delete() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "delete",
"permissions": ["accountsFolders", "messagesDelete"],
"type": "function",
"min_manifest_version": 3,
"description": "Deletes a folder.",
"async": true,
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
}
]
},
{
"name": "update",
"permissions": ["accountsFolders"],
"type": "function",
"max_manifest_version": 2,
"description": "Updates properties of a folder.",
"async": true,
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.update() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "updateProperties",
"type": "object",
"description": "The properties to update.",
"properties": {
"isFavorite": {
"type": "boolean",
"optional": true,
"description": "Sets or clears the favorite status."
}
}
}
]
},
{
"name": "update",
"permissions": ["accountsFolders"],
"type": "function",
"min_manifest_version": 3,
"description": "Updates properties of a folder.",
"async": true,
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "updateProperties",
"type": "object",
"description": "The properties to update.",
"properties": {
"isFavorite": {
"type": "boolean",
"optional": true,
"description": "Sets or clears the favorite status."
}
}
}
]
},
{
"name": "getFolderInfo",
"type": "function",
"max_manifest_version": 2,
"description": "Get additional information about a folder.",
"async": "callback",
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getFolderInfo() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolderInfo"
}
]
}
]
},
{
"name": "getFolderInfo",
"type": "function",
"min_manifest_version": 3,
"description": "Get additional information about a folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolderInfo"
}
]
}
]
},
{
"name": "getFolderCapabilities",
"type": "function",
"max_manifest_version": 2,
"description": "Get capability information about a folder.",
"async": "callback",
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getFolderCapabilities() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolderCapabilities"
}
]
}
]
},
{
"name": "getFolderCapabilities",
"type": "function",
"min_manifest_version": 3,
"description": "Get capability information about a folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolderCapabilities"
}
]
}
]
},
{
"name": "getParentFolders",
"type": "function",
"max_manifest_version": 2,
"description": "Get all parent folders as a flat ordered array. The first array entry is the direct parent.",
"async": "callback",
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getParentFolders() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "includeSubFolders",
"description": "Specifies whether each returned parent $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>false</var>.",
"optional": true,
"default": false,
"type": "boolean"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "folders.MailFolder"
}
}
]
}
]
},
{
"name": "getParentFolders",
"type": "function",
"min_manifest_version": 3,
"description": "Get all parent folders as a flat ordered array. The first array entry is the direct parent.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "includeSubFolders",
"description": "Specifies whether each returned parent $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>false</var>.",
"optional": true,
"default": false,
"type": "boolean"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "folders.MailFolder"
}
}
]
}
]
},
{
"name": "getSubFolders",
"type": "function",
"min_manifest_version": 3,
"description": "Get the subfolders of the specified folder.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "includeSubFolders",
"optional": true,
"type": "boolean",
"default": false,
"description": "Specifies whether each returned direct child $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>false</var>."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "folders.MailFolder"
}
}
]
}
]
},
{
"name": "getSubFolders",
"type": "function",
"max_manifest_version": 2,
"description": "Get the subfolders of the specified folder or account.",
"async": "callback",
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getSubFolders() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.getSubFolders() requires to specify the MailFolderId of the account's rootFolder, instead of a full MailAccount object.",
"$ref": "accounts.MailAccount"
}
]
},
{
"name": "includeSubFolders",
"optional": true,
"type": "boolean",
"default": true,
"description": "Specifies whether each returned direct child $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>true</var>."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "folders.MailFolder"
}
}
]
}
]
},
{
"name": "getUnifiedFolder",
"type": "function",
"description": "Get one of the special unified mailbox folders, which are virtual search folders and return the content from all mail accounts.",
"async": "callback",
"parameters": [
{
"name": "type",
"type": "string",
"description": "The requested unified mailbox folder type.",
"enum": [
"inbox",
"drafts",
"sent",
"trash",
"templates",
"archives",
"junk"
]
},
{
"name": "includeSubFolders",
"description": "Specifies whether the returned $(ref:folders.MailFolder) should populate its <var>subFolders</var> property and include all its (nested!) subfolders. Defaults to <var>false</var>.",
"optional": true,
"default": false,
"type": "boolean"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "getTagFolder",
"type": "function",
"description": "Get one of the special virtual tag folders, which are virtual search folders and group messages from all mail accounts based on their tags.",
"async": "callback",
"parameters": [
{
"name": "key",
"type": "string",
"description": "The tag key of the requested folder. See $(ref:messages.tags.list()) for the available tags. Throws when specifying an invalid tag key."
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "folders.MailFolder"
}
]
}
]
},
{
"name": "markAsRead",
"permissions": ["accountsFolders"],
"type": "function",
"max_manifest_version": 2,
"description": "Marks all messages in a folder as read.",
"async": "callback",
"parameters": [
{
"name": "folder",
"choices": [
{
"$ref": "folders.MailFolderId"
},
{
"deprecated": "Support deprecated since Thunderbird 121 and removed in Manifest V3: folders.markAsRead() requires to specify a MailFolderId instead of a full MailFolder object.",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": []
}
]
},
{
"name": "markAsRead",
"permissions": ["accountsFolders"],
"type": "function",
"min_manifest_version": 3,
"description": "Marks all messages in a folder as read.",
"async": "callback",
"parameters": [
{
"name": "folderId",
"$ref": "folders.MailFolderId"
},
{
"name": "callback",
"type": "function",
"optional": true,
"parameters": []
}
]
}
],
"events": [
{
"name": "onCreated",
"type": "function",
"description": "Fired when a folder has been created.",
"parameters": [
{
"name": "createdFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onRenamed",
"type": "function",
"description": "Fired when a folder has been renamed.",
"parameters": [
{
"name": "originalFolder",
"$ref": "folders.MailFolder"
},
{
"name": "renamedFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onMoved",
"type": "function",
"description": "Fired when a folder has been moved.",
"parameters": [
{
"name": "originalFolder",
"$ref": "folders.MailFolder"
},
{
"name": "movedFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onCopied",
"type": "function",
"description": "Fired when a folder has been copied.",
"parameters": [
{
"name": "originalFolder",
"$ref": "folders.MailFolder"
},
{
"name": "copiedFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onDeleted",
"type": "function",
"description": "Fired when a folder has been deleted.",
"parameters": [
{
"name": "deletedFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onUpdated",
"type": "function",
"description": "Fired when properties of a folder have changed (<var>specialUse</var> and <var>isFavorite</var>).",
"parameters": [
{
"name": "originalFolder",
"$ref": "folders.MailFolder"
},
{
"name": "updatedFolder",
"$ref": "folders.MailFolder"
}
]
},
{
"name": "onFolderInfoChanged",
"type": "function",
"description": "Fired when certain information of a folder have changed. Bursts of message count changes are collapsed to a single event.",
"parameters": [
{
"name": "folder",
"$ref": "folders.MailFolder"
},
{
"name": "folderInfo",
"$ref": "folders.MailFolderInfo"
}
]
}
]
}
]