# com.hectorsector.book.book

> Published by [hectorsector.com](https://lexicon.garden/identity/did:plc:lnhiu2ti45q7ucgw2welc7wn)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lnhiu2ti45q7ucgw2welc7wn/com.hectorsector.book.book)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lnhiu2ti45q7ucgw2welc7wn/com.hectorsector.book.book/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lnhiu2ti45q7ucgw2welc7wn/com.hectorsector.book.book/examples)

## Definitions

### `com.hectorsector.book.book`

**Type**: `record`

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.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `isbn10` | `string` | No | ISBN-10, digits only, no hyphens (e.g. 0142004235). Last-resort fallback for older editions without ISBN-13. |
| `isbn13` | `string` | No | ISBN-13, digits only, no hyphens (e.g. 9780142004234). Fallback when no OpenLibrary Work ID is available. |
| `olWorkId` | `string` | No | 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` | `string` (datetime) | Yes | Client-reported timestamp of when this book was added to the user's library. |

## Raw Schema

```json
{
  "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
}
```
