summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ProtectionsPanelMessage.schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ProtectionsPanelMessage.schema.json')
-rw-r--r--browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ProtectionsPanelMessage.schema.json62
1 files changed, 62 insertions, 0 deletions
diff --git a/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ProtectionsPanelMessage.schema.json b/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ProtectionsPanelMessage.schema.json
new file mode 100644
index 0000000000..8ef9b802e1
--- /dev/null
+++ b/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ProtectionsPanelMessage.schema.json
@@ -0,0 +1,62 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "file:///ProtectionsPanelMessage.schema.json",
+ "title": "ProtectionsPanelMessage",
+ "description": "A message shown in the protections panel.",
+ "allOf": [{ "$ref": "file:///FxMSCommon.schema.json#/$defs/Message" }],
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "description": "The message title.",
+ "$ref": "file:///FxMSCommon.schema.json#/$defs/localizableText"
+ },
+ "body": {
+ "description": "The body of the message.",
+ "$ref": "file:///FxMSCommon.schema.json#/$defs/localizableText"
+ },
+ "link_text": {
+ "description": "The text of the call to action link.",
+ "$ref": "file:///FxMSCommon.schema.json#/$defs/localizableText"
+ },
+ "cta_type": {
+ "description": "The type of URL open action.",
+ "type": "string",
+ "enum": ["OPEN_URL", "OPEN_PROTECTION_REPORT", "OPEN_ABOUT_PAGE"]
+ },
+ "cta_url": {
+ "description": "The URL to open when the call to action is clicked",
+ "type": "string",
+ "format": "moz-url-format"
+ },
+ "cta_where": {
+ "description": "How to open the cta.",
+ "type": "string",
+ "enum": ["current", "tabshifted", "tab", "save", "window"]
+ }
+ },
+ "dependantSchemas": {
+ "link_text": ["cta_type", "cta_url"],
+ "cta_type": ["link_text"],
+ "cta_url": ["link_text"],
+ "cta_where": ["link_text"]
+ },
+ "additionalProperties": false,
+ "required": ["title", "body"]
+ },
+ "template": {
+ "type": "string",
+ "const": "protections_panel"
+ },
+ "trigger": {
+ "description": "An action to trigger potentially showing the message. The action ID `protectionsPanelOpen` is required.",
+ "const": {
+ "id": "protectionsPanelOpen"
+ }
+ }
+ },
+ "required": ["content", "template", "trigger"],
+ "additionalProperties": true
+}