{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "watchId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Optimistic concurrency revision; supply it as expectedRevision on the next write."
    },
    "deal": {
      "type": "object",
      "properties": {
        "costMinor": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000000000
            },
            {
              "type": "null"
            }
          ]
        },
        "currency": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "USD",
                "EUR",
                "GBP",
                "JPY",
                "CAD",
                "AUD",
                "NZD",
                "CHF",
                "CNY",
                "HKD",
                "SGD",
                "INR",
                "KRW",
                "BRL",
                "MXN",
                "SEK",
                "NOK",
                "DKK",
                "PLN",
                "CZK",
                "HUF",
                "ZAR",
                "AED",
                "SAR",
                "ILS",
                "THB",
                "TRY",
                "IDR",
                "MYR",
                "PHP",
                "VND",
                "KWD",
                "BHD",
                "OMR"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "acquiredOn": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "expiresOn": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "renewalWindowDays": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 365
            },
            {
              "type": "null"
            }
          ]
        },
        "contactRef": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,119}$"
            },
            {
              "type": "null"
            }
          ]
        },
        "contactLabel": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 120
            },
            {
              "type": "null"
            }
          ]
        },
        "dealNote": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 1000
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "costMinor",
        "currency",
        "acquiredOn",
        "expiresOn",
        "renewalWindowDays",
        "contactRef",
        "contactLabel",
        "dealNote"
      ],
      "additionalProperties": false
    },
    "createdAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "updatedAt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "watchId",
    "projectId",
    "revision",
    "deal",
    "createdAt",
    "updatedAt"
  ],
  "additionalProperties": {}
}
