{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aurinko/json-schema/aurinko-series-info-schema.json",
  "title": "SeriesInfo",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aurinko-events-api-openapi.yml#/components/schemas/SeriesInfo",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true
    },
    "globalId": {
      "type": "string",
      "readOnly": true
    },
    "recurrence": {
      "$ref": "#/$defs/Recurrence",
      "readOnly": true
    },
    "modifiedOccurrences": {
      "type": "array",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/OccurrenceInfo"
      }
    },
    "deletedOccurrences": {
      "type": "array",
      "readOnly": true,
      "items": {
        "$ref": "#/$defs/OccurrenceInfo"
      }
    }
  },
  "$defs": {
    "DayOfWeek": {
      "type": "string",
      "enum": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "sunday"
      ]
    },
    "EventDateTime": {
      "type": "object",
      "properties": {
        "dateOnly": {
          "type": "string",
          "format": "date"
        },
        "dateTime": {
          "type": "string",
          "format": "date-time"
        },
        "timezone": {
          "type": "string"
        }
      }
    },
    "OccurrenceInfo": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "regular",
            "modified",
            "deleted"
          ]
        },
        "originalStart": {
          "$ref": "#/$defs/EventDateTime"
        },
        "start": {
          "$ref": "#/$defs/EventDateTime"
        },
        "masterId": {
          "type": "string"
        }
      }
    },
    "Recurrence": {
      "type": "object",
      "properties": {
        "original": {
          "type": "string",
          "enum": [
            "simple",
            "ical"
          ],
          "readOnly": true
        },
        "ical": {
          "type": "object",
          "properties": {
            "rules": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "recurrenceStart": {
              "$ref": "#/$defs/EventDateTime"
            }
          }
        },
        "simple": {
          "type": "object",
          "properties": {
            "pattern": {
              "type": "object",
              "properties": {
                "frequency": {
                  "type": "string",
                  "enum": [
                    "daily",
                    "weekly",
                    "monthly",
                    "monthlyRelative",
                    "yearly",
                    "yearlyRelative"
                  ]
                },
                "interval": {
                  "type": "integer",
                  "default": 1
                },
                "daysOfWeek": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/DayOfWeek"
                  }
                },
                "weekStart": {
                  "type": "string",
                  "enum": [
                    "monday",
                    "sunday"
                  ]
                },
                "dayOfMonth": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 31
                },
                "monthOfYear": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 12
                },
                "instance": {
                  "type": "string",
                  "enum": [
                    "first",
                    "second",
                    "third",
                    "fourth",
                    "last"
                  ]
                }
              }
            },
            "range": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "byDate",
                    "byCount",
                    "unbounded"
                  ]
                },
                "recurrenceStart": {
                  "$ref": "#/$defs/EventDateTime"
                },
                "recurrenceEnd": {
                  "type": "string",
                  "format": "date"
                },
                "count": {
                  "type": "integer",
                  "minimum": 1
                },
                "patternExclusions": {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/EventDateTime"
                  },
                  "readOnly": true
                }
              }
            }
          }
        }
      }
    }
  }
}