{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "kind": {
      "type": "string",
      "enum": [
        "click",
        "page",
        "submit",
        "event"
      ]
    },
    "selector": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "path": {
      "type": "string",
      "maxLength": 300,
      "pattern": "^\\/.*"
    },
    "event": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,79}$"
    },
    "value": {
      "type": "number",
      "minimum": 0,
      "maximum": 1000000
    },
    "primary": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "name",
    "kind",
    "primary"
  ],
  "additionalProperties": false
}
