From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../components/extensions/schemas/accounts.json | 235 +++++++++++++++++++++ 1 file changed, 235 insertions(+) create mode 100644 comm/mail/components/extensions/schemas/accounts.json (limited to 'comm/mail/components/extensions/schemas/accounts.json') diff --git a/comm/mail/components/extensions/schemas/accounts.json b/comm/mail/components/extensions/schemas/accounts.json new file mode 100644 index 0000000000..fb325425b2 --- /dev/null +++ b/comm/mail/components/extensions/schemas/accounts.json @@ -0,0 +1,235 @@ +[ + { + "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": { + "type": "string", + "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. imap, nntp, or pop3." + }, + "folders": { + "type": "array", + "optional": true, + "description": "The folders for this account are only included if requested.", + "items": { + "$ref": "folders.MailFolder" + } + }, + "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" + } + } + } + } + ], + "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 true.", + "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 null if it doesn't exist.", + "async": "callback", + "parameters": [ + { + "name": "accountId", + "type": "string" + }, + { + "name": "includeFolders", + "description": "Specifies whether the returned :ref:`accounts.MailAccount` object should included the account's folders. Defaults to true.", + "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 null 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 true.", + "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, + "deprecated": "This will be removed. Use :ref:`identities.setDefault` instead.", + "parameters": [ + { + "name": "accountId", + "type": "string" + }, + { + "name": "identityId", + "type": "string" + } + ] + }, + { + "name": "getDefaultIdentity", + "type": "function", + "description": "Returns the default identity for an account, or null if it is not defined.", + "async": "callback", + "deprecated": "This will be removed. Use :ref:`identities.getDefault` instead.", + "parameters": [ + { + "name": "accountId", + "type": "string" + }, + { + "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": "id", + "type": "string" + }, + { + "name": "account", + "$ref": "MailAccount" + } + ] + }, + { + "name": "onDeleted", + "type": "function", + "description": "Fired when an account has been removed.", + "parameters": [ + { + "name": "id", + "type": "string" + } + ] + }, + { + "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": "id", + "type": "string" + }, + { + "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." + } + } + } + ] + } + ] + } +] -- cgit v1.2.3