summaryrefslogtreecommitdiffstats
path: root/comm/mail/components/extensions/schemas/messageDisplay.json
diff options
context:
space:
mode:
Diffstat (limited to 'comm/mail/components/extensions/schemas/messageDisplay.json')
-rw-r--r--comm/mail/components/extensions/schemas/messageDisplay.json159
1 files changed, 159 insertions, 0 deletions
diff --git a/comm/mail/components/extensions/schemas/messageDisplay.json b/comm/mail/components/extensions/schemas/messageDisplay.json
new file mode 100644
index 0000000000..f7e3d4ae6d
--- /dev/null
+++ b/comm/mail/components/extensions/schemas/messageDisplay.json
@@ -0,0 +1,159 @@
+[
+ {
+ "namespace": "messageDisplay",
+ "permissions": ["messagesRead"],
+ "events": [
+ {
+ "name": "onMessageDisplayed",
+ "type": "function",
+ "description": "Fired when a message is displayed, whether in a 3-pane tab, a message tab, or a message window.",
+ "parameters": [
+ {
+ "name": "tab",
+ "$ref": "tabs.Tab"
+ },
+ {
+ "name": "message",
+ "$ref": "messages.MessageHeader"
+ }
+ ]
+ },
+ {
+ "name": "onMessagesDisplayed",
+ "type": "function",
+ "description": "Fired when either a single message is displayed or when multiple messages are displayed, whether in a 3-pane tab, a message tab, or a message window.",
+ "parameters": [
+ {
+ "name": "tab",
+ "$ref": "tabs.Tab"
+ },
+ {
+ "name": "messages",
+ "type": "array",
+ "items": {
+ "$ref": "messages.MessageHeader"
+ }
+ }
+ ]
+ }
+ ],
+ "functions": [
+ {
+ "name": "getDisplayedMessage",
+ "type": "function",
+ "description": "Gets the currently displayed message in the specified tab (even if the tab itself is currently not visible). It returns <value>null</value> if no messages are displayed, or if multiple messages are displayed.",
+ "async": "callback",
+ "parameters": [
+ {
+ "name": "tabId",
+ "type": "integer",
+ "minimum": 1
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "parameters": [
+ {
+ "choices": [
+ {
+ "$ref": "messages.MessageHeader"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "getDisplayedMessages",
+ "type": "function",
+ "description": "Gets an array of the currently displayed messages in the specified tab (even if the tab itself is currently not visible). The array is empty if no messages are displayed.",
+ "async": "callback",
+ "parameters": [
+ {
+ "name": "tabId",
+ "type": "integer",
+ "minimum": 1
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "optional": true,
+ "parameters": [
+ {
+ "type": "array",
+ "items": {
+ "$ref": "messages.MessageHeader"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "open",
+ "type": "function",
+ "description": "Opens a message in a new tab or in a new window.",
+ "async": "callback",
+ "parameters": [
+ {
+ "name": "openProperties",
+ "type": "object",
+ "description": "Settings for opening the message. Exactly one of messageId, headerMessageId or file must be specified.",
+ "properties": {
+ "file": {
+ "type": "object",
+ "optional": true,
+ "isInstanceOf": "File",
+ "additionalProperties": true,
+ "description": "The DOM file object of a message to be opened."
+ },
+ "messageId": {
+ "type": "integer",
+ "optional": true,
+ "minimum": 1,
+ "description": "The id of a message to be opened. Will throw an <em>ExtensionError</em>, if the provided ``messageId`` is unknown or invalid."
+ },
+ "headerMessageId": {
+ "type": "string",
+ "optional": true,
+ "description": "The headerMessageId of a message to be opened. Will throw an <em>ExtensionError</em>, if the provided ``headerMessageId`` is unknown or invalid. Not supported for external messages."
+ },
+ "location": {
+ "type": "string",
+ "enum": ["tab", "window"],
+ "optional": true,
+ "description": "Where to open the message. If not specified, the users preference is honoured."
+ },
+ "active": {
+ "type": "boolean",
+ "optional": true,
+ "description": "Whether the new tab should become the active tab in the window. Only applicable to messages opened in tabs."
+ },
+ "windowId": {
+ "type": "integer",
+ "minimum": -2,
+ "optional": true,
+ "description": "The id of the window, where the new tab should be created. Defaults to the current window. Only applicable to messages opened in tabs."
+ }
+ }
+ },
+ {
+ "type": "function",
+ "name": "callback",
+ "parameters": [
+ {
+ "name": "tab",
+ "$ref": "tabs.Tab"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+]