tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

provider-response.schema.json (2435B)


      1 {
      2  "title": "ProviderResponse",
      3  "description": "A response object for remote providers of AS Router",
      4  "type": "object",
      5  "version": "6.1.0",
      6  "properties": {
      7    "messages": {
      8      "type": "array",
      9      "description": "An array of router messages",
     10      "items": {
     11        "title": "RouterMessage",
     12        "description": "A definition of an individual message",
     13        "type": "object",
     14        "properties": {
     15          "id": {
     16            "type": "string",
     17            "description": "A unique identifier for the message that should not conflict with any other previous message"
     18          },
     19          "template": {
     20            "type": "string",
     21            "description": "An id matching an existing Activity Stream Router template",
     22            "enum": ["cfr_doorhanger"]
     23          },
     24          "bundled": {
     25            "type": "integer",
     26            "description": "The number of messages of the same template this one should be shown with (optional)"
     27          },
     28          "order": {
     29            "type": "integer",
     30            "minimum": 0,
     31            "description": "If bundled with other messages of the same template, which order should this one be placed in? (optional - defaults to 0)"
     32          },
     33          "content": {
     34            "type": "object",
     35            "description": "An object containing all variables/props to be rendered in the template. See individual template schemas for details."
     36          },
     37          "targeting": {
     38            "type": "string",
     39            "description": "A JEXL expression representing targeting information"
     40          },
     41          "trigger": {
     42            "type": "object",
     43            "description": "An action to trigger potentially showing the message",
     44            "properties": {
     45              "id": {
     46                "type": "string",
     47                "description": "A string identifying the trigger action",
     48                "enum": ["firstRun", "openURL"]
     49              },
     50              "params": {
     51                "type": "array",
     52                "description": "An optional array of string parameters for the trigger action",
     53                "items": {
     54                  "type": "string",
     55                  "description": "A parameter for the trigger action"
     56                }
     57              }
     58            },
     59            "required": ["id"]
     60          }
     61        },
     62        "required": ["id", "template", "content"]
     63      }
     64    }
     65  },
     66  "required": ["messages"]
     67 }