summaryrefslogtreecommitdiffstats
path: root/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/OnboardingMessage.schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/OnboardingMessage.schema.json')
-rw-r--r--browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/OnboardingMessage.schema.json142
1 files changed, 142 insertions, 0 deletions
diff --git a/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/OnboardingMessage.schema.json b/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/OnboardingMessage.schema.json
new file mode 100644
index 0000000000..f355d89da7
--- /dev/null
+++ b/browser/components/newtab/content-src/asrouter/templates/OnboardingMessage/OnboardingMessage.schema.json
@@ -0,0 +1,142 @@
+{
+ "title": "OnboardingMessage",
+ "description": "A template with a title, icon, button and description. No markup allowed.",
+ "version": "1.0.0",
+ "type": "object",
+ "properties": {
+ "title": {
+ "oneOf": [
+ {
+ "type": "string",
+ "description": "The message displayed in the title of the onboarding card"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "string_id": {
+ "type": "string"
+ }
+ },
+ "required": ["string_id"],
+ "description": "Id of localized string for onboarding card title"
+ }
+ ],
+ "description": "Id of localized string or message override."
+ },
+ "text": {
+ "oneOf": [
+ {
+ "type": "string",
+ "description": "The message displayed in the description of the onboarding card"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "string_id": {
+ "type": "string"
+ },
+ "args": {
+ "type": "object",
+ "description": "An optional argument to pass to the localization module"
+ }
+ },
+ "required": ["string_id"],
+ "description": "Id of localized string for onboarding card description"
+ }
+ ],
+ "description": "Id of localized string or message override."
+ },
+ "icon": {
+ "allOf": [
+ {
+ "type": "string",
+ "description": "Image associated with the onboarding card"
+ }
+ ]
+ },
+ "primary_button": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "oneOf": [
+ {
+ "type": "string",
+ "description": "The label of the onboarding messages' action button"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "string_id": {
+ "type": "string"
+ }
+ },
+ "required": ["string_id"],
+ "description": "Id of localized string for onboarding messages' button"
+ }
+ ],
+ "description": "Id of localized string or message override."
+ },
+ "action": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Action dispatched by the button."
+ },
+ "data": {
+ "properties": {
+ "args": {
+ "type": "string",
+ "description": "Additional parameters for button action, for example which link the button should open."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "secondary_buttons": {
+ "type": "object",
+ "properties": {
+ "label": {
+ "oneOf": [
+ {
+ "type": "string",
+ "description": "The label of the onboarding messages' (optional) secondary action button"
+ },
+ {
+ "type": "object",
+ "properties": {
+ "string_id": {
+ "type": "string"
+ }
+ },
+ "required": ["string_id"],
+ "description": "Id of localized string for onboarding messages' button"
+ }
+ ],
+ "description": "Id of localized string or message override."
+ },
+ "action": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "description": "Action dispatched by the button."
+ },
+ "data": {
+ "properties": {
+ "args": {
+ "type": "string",
+ "description": "Additional parameters for button action, for example which link the button should open."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "additionalProperties": true,
+ "required": ["title", "text", "icon", "primary_button"]
+}