{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Root or main admin deletes one My Data record of the parent and its provenance; the previous value goes to the audit log. expectedCid as in putRecord.",
      "errors": [
        {
          "name": "NotMember"
        },
        {
          "name": "NotAdmin"
        },
        {
          "name": "HomeNotFound"
        },
        {
          "name": "ParentNotLinked"
        },
        {
          "name": "RecordNotFound"
        },
        {
          "name": "RecordChanged"
        },
        {
          "name": "DelegationUnavailable"
        },
        {
          "name": "PdsUnavailable"
        },
        {
          "name": "RequestConflict"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "collection": {
              "ref": "ai.newnal.illi.mydata.defs#collection",
              "type": "ref"
            },
            "expectedCid": {
              "format": "cid",
              "type": "string"
            },
            "homeId": {
              "format": "tid",
              "type": "string"
            },
            "requestKey": {
              "description": "Idempotency key chosen by the client; a replay with the same key and input returns the first result.",
              "maxLength": 64,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            },
            "rkey": {
              "format": "record-key",
              "type": "string"
            },
            "slot": {
              "description": "The parent slot, 1 or 2.",
              "maximum": 2,
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "homeId",
            "slot",
            "collection",
            "rkey",
            "requestKey"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "deleted": {
              "type": "boolean"
            }
          },
          "required": [
            "deleted"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.mydata.deleteRecord",
  "lexicon": 1
}
