{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "version": {
      "type": "number",
      "const": 1
    },
    "exportDate": {
      "type": "string"
    },
    "categories": {
      "type": "object",
      "properties": {
        "oof": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "emoji": {
              "type": "string"
            },
            "dates": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "end": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "start",
                  "end"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "label",
            "color",
            "emoji",
            "dates"
          ],
          "additionalProperties": false
        },
        "holiday": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "emoji": {
              "type": "string"
            },
            "dates": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "end": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "start",
                  "end"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "label",
            "color",
            "emoji",
            "dates"
          ],
          "additionalProperties": false
        },
        "sick": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string"
            },
            "color": {
              "type": "string"
            },
            "emoji": {
              "type": "string"
            },
            "dates": {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              }
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "start": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "end": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  }
                },
                "required": [
                  "start",
                  "end"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "label",
            "color",
            "emoji",
            "dates"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "oof",
        "holiday",
        "sick"
      ],
      "additionalProperties": false
    },
    "settings": {
      "type": "object",
      "properties": {
        "minOfficeDays": {
          "type": "number"
        },
        "rollingWindowWeeks": {
          "type": "number"
        },
        "bestWeeksCount": {
          "type": "number"
        },
        "sickDaysPenalize": {
          "type": "boolean"
        },
        "holidayPenalize": {
          "type": "boolean"
        },
        "startingWeek": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "defaultPattern": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "holidays": {
          "type": "object",
          "properties": {
            "countryCode": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "holidaysAsOOF": {
              "type": "boolean"
            },
            "companyName": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "version",
    "exportDate",
    "categories"
  ],
  "additionalProperties": false
}