{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Delete the signed-in user's BookHive PDS records, local data and uploaded files, then sign out. Does not delete their Bluesky account or posts. Requires a live OAuth session, not service auth. Cross-system deletion can partially succeed; failures are reported, never confirmed as success.",
      "errors": [
        {
          "description": "Cleanup failed and may have partially succeeded. The session is kept so the user can retry.",
          "name": "DeleteFailed"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "confirmHandle": {
              "description": "Exact current handle (DID fallback if no profile is available). No trimming or case folding. No additional input fields are accepted.",
              "maxLength": 253,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "confirmHandle"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "success": {
              "const": true,
              "type": "boolean"
            }
          },
          "required": [
            "success"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "buzz.bookhive.deleteAccount",
  "lexicon": 1
}
