{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Link a personal library book to a BookHive catalog entry. Overwrites title, authors, and cover from the catalog.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "contentHash": {
              "description": "SHA-256 hash of the file content",
              "type": "string"
            },
            "hiveId": {
              "description": "BookHive catalog entry ID to link to",
              "type": "string"
            }
          },
          "required": [
            "contentHash",
            "hiveId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "book": {
              "ref": "buzz.bookhive.getPersonalLibrary#personalBookView",
              "type": "ref"
            }
          },
          "required": [
            "book"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "buzz.bookhive.linkPersonalBook",
  "lexicon": 1
}
