{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "eventPatch": {
      "properties": {
        "description": {
          "maxLength": 16384,
          "type": "string"
        },
        "duration": {
          "description": "ISO 8601 duration; zero is allowed.",
          "type": "string"
        },
        "participants": {
          "items": {
            "ref": "#participant",
            "type": "ref"
          },
          "maxLength": 100,
          "type": "array"
        },
        "recurrenceOverrides": {
          "description": "Map from local recurrence timestamps to partial event overrides. Validated by Host.",
          "type": "unknown"
        },
        "recurrenceRules": {
          "items": {
            "ref": "#recurrenceRule",
            "type": "ref"
          },
          "maxLength": 1,
          "minLength": 1,
          "type": "array"
        },
        "showWithoutTime": {
          "type": "boolean"
        },
        "start": {
          "description": "Local date and time, YYYY-MM-DDTHH:mm:ss, interpreted in timeZone.",
          "type": "string"
        },
        "status": {
          "knownValues": [
            "confirmed",
            "cancelled"
          ],
          "type": "string"
        },
        "timeZone": {
          "type": "string"
        },
        "title": {
          "maxLength": 4096,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [],
      "type": "object"
    },
    "main": {
      "description": "ALPHA. Append-only proposed Calendar event edit. Host validates identity, permissions and causal history before accepting records.",
      "key": "any",
      "record": {
        "properties": {
          "payload": {
            "ref": "#payload",
            "type": "ref"
          }
        },
        "required": [
          "payload"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "participant": {
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "status": {
          "knownValues": [
            "accepted",
            "declined",
            "tentative"
          ],
          "type": "string"
        }
      },
      "required": [
        "did",
        "status"
      ],
      "type": "object"
    },
    "payload": {
      "properties": {
        "author": {
          "format": "did",
          "type": "string"
        },
        "base": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "eventId": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "id": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "patch": {
          "ref": "#eventPatch",
          "type": "ref"
        },
        "policy": {
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "recurrenceId": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "eventId",
        "base",
        "policy",
        "patch",
        "author"
      ],
      "type": "object"
    },
    "recurrenceRule": {
      "properties": {
        "count": {
          "maximum": 1000,
          "minimum": 1,
          "type": "integer"
        },
        "frequency": {
          "knownValues": [
            "daily",
            "weekly"
          ],
          "type": "string"
        },
        "interval": {
          "maximum": 52,
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "frequency",
        "count"
      ],
      "type": "object"
    }
  },
  "id": "email.atmos.calendar.proposal",
  "lexicon": 1
}
