{
"id": "com.hectorsector.book.book",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"createdAt"
],
"properties": {
"isbn10": {
"type": "string",
"maxLength": 10,
"minLength": 10,
"description": "ISBN-10, digits only, no hyphens (e.g. 0142004235). Last-resort fallback for older editions without ISBN-13."
},
"isbn13": {
"type": "string",
"maxLength": 13,
"minLength": 13,
"description": "ISBN-13, digits only, no hyphens (e.g. 9780142004234). Fallback when no OpenLibrary Work ID is available."
},
"olWorkId": {
"type": "string",
"maxLength": 32,
"minLength": 3,
"description": "OpenLibrary Work ID (e.g. OL45804W). Preferred identifier — groups all editions and translations of the same work. Resolvable at https://openlibrary.org/works/{olWorkId}.json"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Client-reported timestamp of when this book was added to the user's library."
}
}
},
"description": "A book in a user's library. An anchor record referenced by status and other book-related events. Metadata (title, authors, cover, etc.) is resolved at display time from the identifier — it is not stored in the record. At least one of olWorkId, isbn13, or isbn10 must be present; apps should prefer olWorkId when available for work-level deduplication across editions."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}