Bug 1951426 - Request messages from OMC in newtab r=home-newtab-reviewers,omc-reviewers,mconley,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D240175
This commit is contained in:
@@ -924,6 +924,41 @@
|
||||
"targeting"
|
||||
]
|
||||
},
|
||||
"NewtabMessage": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
"$id": "file:///NewtabMessage.schema.json",
|
||||
"title": "NewtabMessage",
|
||||
"description": "A template for messages that are rendered within newtab",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
|
||||
}
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"messageType": {
|
||||
"type": "string",
|
||||
"description": "The subtype of the message."
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"messageType"
|
||||
]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"const": "newtab_message"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": [
|
||||
"targeting"
|
||||
]
|
||||
},
|
||||
"Spotlight": {
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
"$id": "file:///Spotlight.schema.json",
|
||||
@@ -1278,6 +1313,7 @@
|
||||
"infobar",
|
||||
"menu_message",
|
||||
"pb_newtab",
|
||||
"newtab_message",
|
||||
"spotlight",
|
||||
"feature_callout",
|
||||
"toast_notification",
|
||||
@@ -1523,6 +1559,25 @@
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/NewtabPromoMessage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"template": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"newtab_message"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"template"
|
||||
]
|
||||
},
|
||||
"then": {
|
||||
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/NewtabMessage"
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"type": "object",
|
||||
|
||||
@@ -79,6 +79,9 @@ SCHEMAS = [
|
||||
"NewtabPromoMessage": (
|
||||
SCHEMA_DIR / "PBNewtab" / "NewtabPromoMessage.schema.json"
|
||||
),
|
||||
"NewtabMessage": (
|
||||
SCHEMA_DIR / "OnboardingMessage" / "NewtabMessage.schema.json"
|
||||
),
|
||||
"Spotlight": SCHEMA_DIR / "OnboardingMessage" / "Spotlight.schema.json",
|
||||
"ToastNotification": (
|
||||
SCHEMA_DIR / "ToastNotification" / "ToastNotification.schema.json"
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
||||
"$id": "file:///NewtabMessage.schema.json",
|
||||
"title": "NewtabMessage",
|
||||
"description": "A template for messages that are rendered within newtab",
|
||||
"allOf": [{ "$ref": "file:///FxMSCommon.schema.json#/$defs/Message" }],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"messageType": {
|
||||
"type": "string",
|
||||
"description": "The subtype of the message."
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": ["messageType"]
|
||||
},
|
||||
"template": {
|
||||
"type": "string",
|
||||
"const": "newtab_message"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true,
|
||||
"required": ["targeting"]
|
||||
}
|
||||
Reference in New Issue
Block a user