NewtabPromoMessage.schema.json (4870B)
1 { 2 "$schema": "https://json-schema.org/draft/2019-09/schema", 3 "$id": "file:///NewtabPromoMessage.schema.json", 4 "title": "PBNewtabPromoMessage", 5 "description": "Message shown on the private browsing newtab page.", 6 "allOf": [{ "$ref": "file:///FxMSCommon.schema.json#/$defs/Message" }], 7 "type": "object", 8 "properties": { 9 "content": { 10 "type": "object", 11 "properties": { 12 "hideDefault": { 13 "type": "boolean", 14 "description": "Should we hide the default promo after the experiment promo is dismissed." 15 }, 16 "infoEnabled": { 17 "type": "boolean", 18 "description": "Should we show the info section." 19 }, 20 "infoIcon": { 21 "type": "string", 22 "description": "Icon shown in the left side of the info section. Default is the private browsing icon." 23 }, 24 "infoTitle": { 25 "type": "string", 26 "description": "Is the title in the info section enabled." 27 }, 28 "infoTitleEnabled": { 29 "type": "boolean", 30 "description": "Is the title in the info section enabled." 31 }, 32 "infoBody": { 33 "type": "string", 34 "description": "Text content in the info section." 35 }, 36 "infoLinkText": { 37 "type": "string", 38 "description": "Text for the link in the info section." 39 }, 40 "infoLinkUrl": { 41 "type": "string", 42 "description": "URL for the info section link.", 43 "format": "moz-url-format" 44 }, 45 "promoEnabled": { 46 "type": "boolean", 47 "description": "Should we show the promo section." 48 }, 49 "promoType": { 50 "type": "string", 51 "description": "Promo type used to determine if promo should show to a given user", 52 "enum": ["FOCUS", "VPN", "PIN", "COOKIE_BANNERS", "OTHER"] 53 }, 54 "promoSectionStyle": { 55 "type": "string", 56 "description": "Sets the position of the promo section. Possible values are: top, below-search, bottom. Default bottom.", 57 "enum": ["top", "below-search", "bottom"] 58 }, 59 "promoTitle": { 60 "type": "string", 61 "description": "The text content of the promo section." 62 }, 63 "promoTitleEnabled": { 64 "type": "boolean", 65 "description": "Should we show text content in the promo section." 66 }, 67 "promoLinkText": { 68 "type": "string", 69 "description": "The text of the link in the promo box." 70 }, 71 "promoHeader": { 72 "type": "string", 73 "description": "The title of the promo section." 74 }, 75 "promoButton": { 76 "type": "object", 77 "properties": { 78 "action": { 79 "type": "object", 80 "properties": { 81 "type": { 82 "type": "string", 83 "description": "Action dispatched by the button." 84 }, 85 "data": { 86 "type": "object" 87 } 88 }, 89 "required": ["type"], 90 "additionalProperties": true 91 } 92 }, 93 "required": ["action"] 94 }, 95 "promoLinkType": { 96 "type": "string", 97 "description": "Type of promo link type. Possible values: link, button. Default is link.", 98 "enum": ["link", "button"] 99 }, 100 "promoImageLarge": { 101 "type": "string", 102 "description": "URL for image used on the left side of the promo box, larger, showcases some feature. Default off.", 103 "format": "uri" 104 }, 105 "promoImageSmall": { 106 "type": "string", 107 "description": "URL for image used on the right side of the promo box, smaller, usually a logo. Default off.", 108 "format": "uri" 109 } 110 }, 111 "additionalProperties": true, 112 "allOf": [ 113 { 114 "if": { 115 "properties": { 116 "promoEnabled": { "const": true } 117 }, 118 "required": ["promoEnabled"] 119 }, 120 "then": { 121 "required": ["promoButton"] 122 } 123 }, 124 { 125 "if": { 126 "properties": { 127 "infoEnabled": { "const": true } 128 }, 129 "required": ["infoEnabled"] 130 }, 131 "then": { 132 "required": ["infoLinkText"], 133 "if": { 134 "properties": { 135 "infoTitleEnabled": { "const": true } 136 }, 137 "required": ["infoTitleEnabled"] 138 }, 139 "then": { 140 "required": ["infoTitle"] 141 } 142 } 143 } 144 ] 145 }, 146 "template": { 147 "type": "string", 148 "const": "pb_newtab" 149 } 150 }, 151 "additionalProperties": true, 152 "required": ["targeting"] 153 }