summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/newtab/content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json')
-rw-r--r--browser/components/newtab/content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json95
1 files changed, 95 insertions, 0 deletions
diff --git a/browser/components/newtab/content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json b/browser/components/newtab/content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json
new file mode 100644
index 0000000000..e254080311
--- /dev/null
+++ b/browser/components/newtab/content-src/asrouter/templates/ToastNotification/ToastNotification.schema.json
@@ -0,0 +1,95 @@
+{
+ "$schema": "https://json-schema.org/draft/2019-09/schema",
+ "$id": "file:///ToastNotification.schema.json",
+ "title": "ToastNotification",
+ "description": "A template for toast notifications displayed by the Alert service.",
+ "allOf": [
+ { "$ref": "file:///FxMSCommon.schema.json#/$defs/Message" }
+ ],
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "$ref": "file:///FxMSCommon.schema.json#/$defs/localizableText",
+ "description": "Id of localized string or message override of toast notification title"
+ },
+ "body": {
+ "$ref": "file:///FxMSCommon.schema.json#/$defs/localizableText",
+ "description": "Id of localized string or message override of toast notification body"
+ },
+ "icon_url": {
+ "description": "The URL of the image used as an icon of the toast notification.",
+ "type": "string",
+ "format": "moz-url-format"
+ },
+ "image_url": {
+ "description": "The URL of an image to be displayed as part of the notification.",
+ "type": "string",
+ "format": "moz-url-format"
+ },
+ "launch_url": {
+ "description": "The URL to launch when the notification or an action button is clicked.",
+ "type": "string",
+ "format": "moz-url-format"
+ },
+ "requireInteraction": {
+ "type": "boolean",
+ "description": "Whether the toast notification should remain active until the user clicks or dismisses it, rather than closing automatically."
+ },
+ "tag": {
+ "type": "string",
+ "description": "An identifying tag for the toast notification."
+ },
+ "data": {
+ "type": "object",
+ "description": "Arbitrary data associated with the toast notification."
+ },
+ "actions": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "title": {
+ "$ref": "file:///FxMSCommon.schema.json#/$defs/localizableText",
+ "description": "The action text to be shown to the user."
+ },
+ "action": {
+ "type": "string",
+ "description": "Opaque identifer that identifies action."
+ },
+ "iconURL": {
+ "type": "string",
+ "format": "uri",
+ "description": "URL of an icon to display with the action."
+ },
+ "windowsSystemActivationType": {
+ "type": "boolean",
+ "description": "Whether to have Windows process the given `action`."
+ }
+ },
+ "required": ["action", "title"],
+ "additionalProperties": true
+ }
+ }
+ },
+ "additionalProperties": true,
+ "required": [
+ "title",
+ "body"
+ ]
+ },
+ "template": {
+ "type": "string",
+ "const": "toast_notification"
+ }
+ },
+ "required": [
+ "content",
+ "targeting",
+ "template",
+ "trigger"
+ ],
+ "additionalProperties": true
+}