{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "live_score",
  "description": "Canlı skor.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "type",
    "version",
    "state",
    "home",
    "away"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "live_score"
      ]
    },
    "version": {
      "type": "integer",
      "enum": [
        1
      ]
    },
    "tone": {
      "type": "string",
      "enum": [
        "neutral",
        "success",
        "warning",
        "danger",
        "brand"
      ]
    },
    "brand_color": {
      "type": "string",
      "enum": [
        "mavi",
        "turuncu",
        "mor",
        "pembe",
        "altin",
        "yesil",
        "turkuaz"
      ]
    },
    "competition": {
      "type": "string",
      "maxLength": 60
    },
    "state": {
      "type": "string",
      "enum": [
        "scheduled",
        "live",
        "finished"
      ]
    },
    "minute": {
      "type": "integer",
      "minimum": 0,
      "maximum": 150
    },
    "home": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 40,
          "minLength": 1
        },
        "score": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999
        },
        "logo": {
          "type": "string",
          "pattern": "^(https://[^\\s\\x00-\\x1f\\x7f]{1,2040}|[A-Za-z0-9_.:-]{8,256})$",
          "x-inki-medya": "photo",
          "description": "Telegram sözleşmesi: file_id ya da https URL (sunucu egress ile indirip yeniden barındırır)"
        },
        "brand_color": {
          "type": "string",
          "enum": [
            "mavi",
            "turuncu",
            "mor",
            "pembe",
            "altin",
            "yesil",
            "turkuaz"
          ]
        }
      },
      "required": [
        "name",
        "score"
      ]
    },
    "away": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 40,
          "minLength": 1
        },
        "score": {
          "type": "integer",
          "minimum": 0,
          "maximum": 999
        },
        "logo": {
          "type": "string",
          "pattern": "^(https://[^\\s\\x00-\\x1f\\x7f]{1,2040}|[A-Za-z0-9_.:-]{8,256})$",
          "x-inki-medya": "photo",
          "description": "Telegram sözleşmesi: file_id ya da https URL (sunucu egress ile indirip yeniden barındırır)"
        },
        "brand_color": {
          "type": "string",
          "enum": [
            "mavi",
            "turuncu",
            "mor",
            "pembe",
            "altin",
            "yesil",
            "turkuaz"
          ]
        }
      },
      "required": [
        "name",
        "score"
      ]
    },
    "events": {
      "type": "array",
      "minItems": 0,
      "maxItems": 10,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "minute": {
            "type": "integer",
            "minimum": 0,
            "maximum": 150
          },
          "text": {
            "type": "string",
            "maxLength": 120,
            "minLength": 1
          }
        },
        "required": [
          "text"
        ]
      }
    }
  }
}
