{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "project ID from create/list."
    },
    "externalRef": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "revision": {
      "type": "number",
      "const": 0,
      "description": "Immutable set revision to read/compare."
    },
    "sourceUrl": {
      "description": "Public publisher URL.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2048
        },
        {
          "type": "null"
        }
      ]
    },
    "publisherUrl": {
      "type": "string",
      "maxLength": 2048
    },
    "targetUrl": {
      "type": "string",
      "maxLength": 2048,
      "description": "Expected destination URL."
    },
    "targetScope": {
      "description": "URL match: exact, domain, subdomain or path prefix.",
      "type": "string",
      "enum": [
        "exact",
        "domain",
        "subdomain",
        "path"
      ],
      "default": "exact"
    },
    "campaign": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "context": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "expectedAnchor": {
      "description": "Expected anchor; null clears.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 1000
        },
        {
          "type": "null"
        }
      ],
      "default": null
    }
  },
  "required": [
    "projectId",
    "externalRef",
    "revision",
    "targetUrl"
  ],
  "additionalProperties": false
}
