browser/components/asrouter/content-src/templates/OnboardingMessage/ToolbarBadgeMessage.schema.json
author Aristide Tossou <atossou@mozilla.com>
Sat, 26 Apr 2025 02:54:19 +0000
changeset 784685 84855b5131dbbb012e969a160d2f2c691b4de0db
parent 693887 dba58932813dda84f53e4558a48ef0b60374002f
permissions -rw-r--r--
Bug 1962761 - [linkPreview] Update Model Prompt - r=Mardak,firefox-ai-ml-reviewers Differential Revision: https://phabricator.services.mozilla.com/D246786

{
  "$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"]
}