{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lockally-com/json-schema/lockally-com-calendar-schema.json",
  "title": "Calendar",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lockally-com-openapi.yml#/components/schemas/Calendar",
  "type": "object",
  "required": [
    "id",
    "tenant_id",
    "name",
    "visibility",
    "created_at",
    "updated_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "tenant_id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "color": {
      "type": "string"
    },
    "owner_email": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "calendar_type": {
      "type": "string",
      "description": "What the calendar is for. Separate from visibility, which is who may\nsee it: a team calendar can be open to everyone and a department one\nrestricted to named people. \"personal\" is a person's own and is not\nlisted in the console's management table.\n",
      "enum": [
        "personal",
        "organization",
        "department",
        "team",
        "shared"
      ]
    },
    "owner_unit": {
      "type": "string",
      "description": "The owning department or office. Empty on a personal calendar, which is owned by owner_email."
    },
    "visibility": {
      "type": "string",
      "enum": [
        "private",
        "tenant",
        "department"
      ]
    },
    "access_department": {
      "type": "string",
      "description": "Which department may see it, when visibility is \"department\". Matched\nagainst the department recorded on a user, so access follows a person\nbetween departments with no membership list to maintain.\n"
    },
    "status": {
      "type": "string",
      "description": "Archived keeps the calendar, its events and its feed, and stops it taking new events.",
      "enum": [
        "active",
        "archived"
      ]
    },
    "feed_url": {
      "type": "string",
      "format": "uri"
    },
    "event_count": {
      "type": "integer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}