{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A Skywrite draft, in the account's us.polhem.skywrite.drafts space: a record that isn't published yet, or changes to one that is. The record key is derived from the collection and id, so every device writes a draft to the same record; read those fields rather than the key.",
      "key": "any",
      "record": {
        "properties": {
          "collection": {
            "description": "The collection the draft's record is published to.",
            "format": "nsid",
            "type": "string"
          },
          "createdAt": {
            "description": "When the draft was started.",
            "format": "datetime",
            "type": "string"
          },
          "id": {
            "description": "Names the draft in its collection: the published record's key for changes to it, or a TID made up for a new record.",
            "format": "record-key",
            "type": "string"
          },
          "rkey": {
            "description": "For a new record: the record key typed in so far, which may not be a valid key yet.",
            "maxLength": 512,
            "type": "string"
          },
          "subject": {
            "description": "For changes to a published record: the record, and the version the changes started from. A new record's draft has none.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "updatedAt": {
            "description": "When the draft was last saved, on any device.",
            "format": "datetime",
            "type": "string"
          },
          "value": {
            "description": "The record as drafted. Files it uses are blobs this record references, which keeps them on the PDS.",
            "type": "unknown"
          }
        },
        "required": [
          "collection",
          "id",
          "value",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "us.polhem.skywrite.draft",
  "lexicon": 1
}
