summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/permissions.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-21 11:44:51 +0000
commit9e3c08db40b8916968b9f30096c7be3f00ce9647 (patch)
treea68f146d7fa01f0134297619fbe7e33db084e0aa /toolkit/components/extensions/schemas/permissions.json
parentInitial commit. (diff)
downloadthunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.tar.xz
thunderbird-9e3c08db40b8916968b9f30096c7be3f00ce9647.zip
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/schemas/permissions.json')
-rw-r--r--toolkit/components/extensions/schemas/permissions.json150
1 files changed, 150 insertions, 0 deletions
diff --git a/toolkit/components/extensions/schemas/permissions.json b/toolkit/components/extensions/schemas/permissions.json
new file mode 100644
index 0000000000..eb66fa7c64
--- /dev/null
+++ b/toolkit/components/extensions/schemas/permissions.json
@@ -0,0 +1,150 @@
+[
+ {
+ "namespace": "permissions",
+ "types": [
+ {
+ "id": "Permissions",
+ "type": "object",
+ "properties": {
+ "permissions": {
+ "type": "array",
+ "items": { "$ref": "manifest.OptionalPermission" },
+ "optional": true,
+ "default": []
+ },
+ "origins": {
+ "type": "array",
+ "items": { "$ref": "manifest.MatchPattern" },
+ "optional": true,
+ "default": []
+ }
+ }
+ },
+ {
+ "id": "AnyPermissions",
+ "type": "object",
+ "properties": {
+ "permissions": {
+ "type": "array",
+ "items": { "$ref": "manifest.Permission" },
+ "optional": true,
+ "default": []
+ },
+ "origins": {
+ "type": "array",
+ "items": { "$ref": "manifest.MatchPattern" },
+ "optional": true,
+ "default": []
+ }
+ }
+ }
+ ],
+ "functions": [
+ {
+ "name": "getAll",
+ "type": "function",
+ "async": "callback",
+ "description": "Get a list of all the extension's permissions.",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "AnyPermissions"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "contains",
+ "type": "function",
+ "async": "callback",
+ "description": "Check if the extension has the given permissions.",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "AnyPermissions"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "result",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "request",
+ "type": "function",
+ "allowedContexts": ["content"],
+ "async": "callback",
+ "requireUserInput": true,
+ "description": "Request the given permissions.",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "Permissions"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "granted",
+ "type": "boolean"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "remove",
+ "type": "function",
+ "async": "callback",
+ "description": "Relinquish the given permissions.",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "Permissions"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": []
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onAdded",
+ "type": "function",
+ "description": "Fired when the extension acquires new permissions.",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "Permissions"
+ }
+ ]
+ },
+ {
+ "name": "onRemoved",
+ "type": "function",
+ "description": "Fired when permissions are removed from the extension.",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "Permissions"
+ }
+ ]
+ }
+ ]
+ }
+]