Revision control

Copy as Markdown

Other Tools

[
{
"namespace": "manifest",
"types": [
{
"$extend": "OptionalPermission",
"choices": [
{
"type": "string",
"enum": ["accountsRead"]
}
]
}
]
},
{
"namespace": "accounts",
"permissions": ["accountsRead"],
"types": [
{
"id": "MailAccount",
"description": "An object describing a mail account, as returned for example by the :ref:`accounts.list` and :ref:`accounts.get` methods. The ``folders`` property is only included if requested.",
"type": "object",
"properties": {
"id": {
"$ref": "MailAccountId",
"description": "A unique identifier for this account."
},
"name": {
"type": "string",
"description": "The human-friendly name of this account."
},
"type": {
"type": "string",
"description": "What sort of account this is, e.g. <value>imap</value>, <value>nntp</value>, or <value>pop3</value>."
},
"folders": {
"max_manifest_version": 2,
"type": "array",
"optional": true,
"description": "The folders for this account are only included if requested.",
"items": {
"$ref": "folders.MailFolder"
}
},
"rootFolder": {
"$ref": "folders.MailFolder",
"optional": true,
"description": "The root folder associated with this account."
},
"identities": {
"type": "array",
"description": "The identities associated with this account. The default identity is listed first, others in no particular order.",
"items": {
"$ref": "identities.MailIdentity"
}
}
}
},
{
"id": "MailAccountId",
"type": "string",
"description": "A unique id representing a :ref:`accounts.MailAccount`."
},
{
"id": "MailAccountType",
"description": "The type of an account.",
"choices": [
{
"max_manifest_version": 2,
"type": "string",
"enum": ["imap", "pop3", "nntp", "none"]
},
{
"min_manifest_version": 3,
"type": "string",
"enum": ["imap", "pop3", "nntp", "local"]
}
]
}
],
"functions": [
{
"name": "list",
"type": "function",
"description": "Returns all mail accounts. They will be returned in the same order as used in Thunderbird's folder pane.",
"async": "callback",
"parameters": [
{
"name": "includeFolders",
"description": "Specifies whether the returned :ref:`accounts.MailAccount` objects should included their account's folders. Defaults to <value>true</value>.",
"optional": true,
"default": true,
"type": "boolean"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"type": "array",
"items": {
"$ref": "accounts.MailAccount"
}
}
]
}
]
},
{
"name": "get",
"type": "function",
"description": "Returns details of the requested account, or <value>null</value> if it doesn't exist.",
"async": "callback",
"parameters": [
{
"name": "accountId",
"$ref": "MailAccountId"
},
{
"name": "includeFolders",
"description": "Specifies whether the returned :ref:`accounts.MailAccount` object should included the account's folders. Defaults to <value>true</value>.",
"optional": true,
"default": true,
"type": "boolean"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "accounts.MailAccount",
"optional": true
}
]
}
]
},
{
"name": "getDefault",
"type": "function",
"description": "Returns the default account, or <value>null</value> if it is not defined.",
"async": "callback",
"parameters": [
{
"name": "includeFolders",
"description": "Specifies whether the returned :ref:`accounts.MailAccount` object should included the account's folders. Defaults to <value>true</value>.",
"optional": true,
"default": true,
"type": "boolean"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "accounts.MailAccount",
"optional": true
}
]
}
]
},
{
"name": "setDefaultIdentity",
"type": "function",
"description": "Sets the default identity for an account.",
"async": true,
"max_manifest_version": 2,
"deprecated": "Deprecated since Thunderbird 91 and removed in Manifest V3: accounts.setDefaultIdentity() is now available as identities.setDefault.",
"parameters": [
{
"name": "accountId",
"$ref": "MailAccountId"
},
{
"name": "identityId",
"type": "string"
}
]
},
{
"name": "getDefaultIdentity",
"type": "function",
"description": "Returns the default identity for an account, or <value>null</value> if it is not defined.",
"async": "callback",
"max_manifest_version": 2,
"deprecated": "Deprecated since Thunderbird 91 and removed in Manifest V3: accounts.getDefaultIdentity() is now available as identities.getDefault.",
"parameters": [
{
"name": "accountId",
"$ref": "MailAccountId"
},
{
"type": "function",
"name": "callback",
"optional": true,
"parameters": [
{
"$ref": "identities.MailIdentity"
}
]
}
]
}
],
"events": [
{
"name": "onCreated",
"type": "function",
"description": "Fired when a new account has been created.",
"parameters": [
{
"name": "accountId",
"$ref": "MailAccountId"
},
{
"name": "account",
"$ref": "MailAccount"
}
]
},
{
"name": "onDeleted",
"type": "function",
"description": "Fired when an account has been removed.",
"parameters": [
{
"name": "accountId",
"$ref": "MailAccountId"
}
]
},
{
"name": "onUpdated",
"type": "function",
"description": "Fired when a property of an account has been modified. Folders and identities of accounts are not monitored by this event, use the dedicated folder and identity events instead. A changed ``defaultIdentity`` is reported only after a different identity has been assigned as default identity, but not after a property of the default identity has been changed.",
"parameters": [
{
"name": "accountId",
"$ref": "MailAccountId"
},
{
"name": "changedValues",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The human-friendly name of this account."
},
"defaultIdentity": {
"$ref": "identities.MailIdentity",
"description": "The default identity of this account."
}
}
}
]
}
]
}
]