{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "demoIdentityEntry": {
      "type": "boolean"
    },
    "demoIdentitySegments": {
      "maxItems": 12,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
      }
    },
    "contentTag": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
    },
    "editorialPolicy": {
      "type": "string",
      "enum": [
        "personalized",
        "contextual",
        "discovery"
      ]
    },
    "id": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
    },
    "description": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "hypothesis": {
      "type": "string",
      "maxLength": 2000
    },
    "audiences": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      }
    },
    "when": {
      "type": "string",
      "maxLength": 500
    },
    "value": {
      "type": "string",
      "maxLength": 24000
    },
    "componentId": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
    },
    "requiresFacts": {
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      }
    },
    "requiresAttention": {
      "type": "object",
      "properties": {
        "tag": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
        },
        "durationMs": {
          "type": "integer",
          "minimum": 1000,
          "maximum": 3600000
        }
      },
      "required": [
        "tag",
        "durationMs"
      ],
      "additionalProperties": false
    },
    "requiresPurchasedProduct": {
      "type": "string",
      "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
    },
    "requiresDaysSincePurchase": {
      "type": "integer",
      "minimum": 0,
      "maximum": 365
    },
    "requiresInterest": {
      "type": "object",
      "properties": {
        "tag": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$"
        },
        "distinctProducts": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50
        }
      },
      "required": [
        "tag",
        "distinctProducts"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "id",
    "description",
    "hypothesis",
    "audiences",
    "value"
  ],
  "additionalProperties": false
}
