summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/ToolbarBadgeMessage.schema.json
blob: 4ec7dc9522a9d6480fac24b508f1fd6f56fa197f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "$id": "file:///ToolbarBadgeMessage.schema.json",
  "title": "ToolbarBadgeMessage",
  "description": "A template that specifies to which element in the browser toolbar to add a notification.",
  "allOf": [{ "$ref": "file:///FxMSCommon.schema.json#/$defs/Message" }],
  "type": "object",
  "properties": {
    "content": {
      "type": "object",
      "properties": {
        "target": {
          "type": "string"
        },
        "action": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "additionalProperties": true,
          "required": ["id"],
          "description": "Optional action to take in addition to showing the notification"
        },
        "delay": {
          "type": "number",
          "description": "Optional delay in ms after which to show the notification"
        },
        "badgeDescription": {
          "$ref": "file:///FxMSCommon.schema.json#/$defs/localizedText",
          "description": "This is used in combination with the badged button to offer a text based alternative to the visual badging. Example 'New Feature: What's New'"
        }
      },
      "additionalProperties": true,
      "required": ["target"]
    },
    "template": {
      "type": "string",
      "const": "toolbar_badge"
    }
  },
  "additionalProperties": true,
  "required": ["targeting"]
}