diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /browser/components/extensions/schemas/normandyAddonStudy.json | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/extensions/schemas/normandyAddonStudy.json')
-rw-r--r-- | browser/components/extensions/schemas/normandyAddonStudy.json | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/browser/components/extensions/schemas/normandyAddonStudy.json b/browser/components/extensions/schemas/normandyAddonStudy.json new file mode 100644 index 0000000000..61075ab90e --- /dev/null +++ b/browser/components/extensions/schemas/normandyAddonStudy.json @@ -0,0 +1,130 @@ +[ + { + "namespace": "manifest", + "types": [ + { + "$extend": "PermissionPrivileged", + "choices": [ + { + "type": "string", + "enum": ["normandyAddonStudy"] + } + ] + } + ] + }, + { + "namespace": "normandyAddonStudy", + "description": "Normandy Study API", + "allowedContexts": ["content", "devtools"], + "defaultContexts": ["content", "devtools"], + "permissions": ["normandyAddonStudy"], + "types": [ + { + "id": "Study", + "type": "object", + "properties": { + "recipeId": { + "type": "integer", + "description": "The ID of the recipe for the study." + }, + "slug": { + "type": "string", + "description": "A slug to identify the study." + }, + "userFacingName": { + "type": "string", + "description": "The name presented on about:studies." + }, + "userFacingDescription": { + "type": "string", + "description": "The description presented on about:studies." + }, + "branch": { + "type": "string", + "description": "The study branch in which the user is enrolled." + }, + "active": { + "type": "boolean", + "description": "The state of the study." + }, + "addonId": { + "type": "string", + "description": "The ID of the extension installed by the study." + }, + "addonUrl": { + "type": "string", + "description": "The URL of the XPI that was downloaded and installed by the study." + }, + "addonVersion": { + "type": "string", + "description": "The version of the extension installed by the study." + }, + "studyStartDate": { + "$ref": "extensionTypes.Date", + "description": "The start date for the study." + }, + "studyEndDate": { + "$ref": "extensionTypes.Date", + "description": "The end date for the study." + }, + "extensionApiId": { + "type": "integer", + "description": "The record ID for the extension in Normandy server's database." + }, + "extensionHash": { + "type": "string", + "description": "A hash of the extension XPI file." + }, + "extensionHashAlgorithm": { + "type": "string", + "description": "The algorithm used to hash the extension XPI file." + } + } + } + ], + "functions": [ + { + "name": "getStudy", + "type": "function", + "description": "Returns a study object for the current study.", + "async": true, + "parameters": [] + }, + { + "name": "endStudy", + "type": "function", + "description": "Marks the study as ended and then uninstalls the addon.", + "async": true, + "parameters": [ + { + "type": "string", + "name": "reason", + "description": "The reason why the study is ending." + } + ] + }, + { + "name": "getClientMetadata", + "type": "function", + "description": "Returns an object with metadata about the client which may be required for constructing survey URLs.", + "async": true, + "parameters": [] + } + ], + "events": [ + { + "name": "onUnenroll", + "type": "function", + "description": "Fired when a user unenrolls from a study but before the addon is uninstalled.", + "parameters": [ + { + "type": "string", + "name": "reason", + "description": "The reason why the study is ending." + } + ] + } + ] + } +] |