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 --- .../extensions/schemas/normandyAddonStudy.json | 130 +++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 browser/components/extensions/schemas/normandyAddonStudy.json (limited to 'browser/components/extensions/schemas/normandyAddonStudy.json') 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." + } + ] + } + ] + } +] -- cgit v1.2.3