org.passingreads.book.defs

lexicon.store View official

Documentation

confirmedEvent object

A confirmed book event for display purposes. Omits cryptographic fields (bookPub, bookSig) and book reference since it's shown in context of a book.

Properties

event string Required

What event occurred

Known values: org.passingreads.book.checkin, org.passingreads.book.drop, org.passingreads.book.find
occurredAt string datetime Required

When this event occurred

uri string at-uri Required

The AT URI of this event record

View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "actor",
    "event",
    "location",
    "occurredAt"
  ],
  "properties": {
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT URI of this event record"
    },
    "actor": {
      "ref": "org.passingreads.defs#actor",
      "type": "ref",
      "description": "The person who performed this event"
    },
    "event": {
      "type": "string",
      "description": "What event occurred",
      "knownValues": [
        "org.passingreads.book.checkin",
        "org.passingreads.book.drop",
        "org.passingreads.book.find"
      ]
    },
    "location": {
      "ref": "community.lexicon.location.hthree#main",
      "type": "ref",
      "description": "Where this event occurred"
    },
    "occurredAt": {
      "type": "string",
      "format": "datetime",
      "description": "When this event occurred"
    }
  },
  "description": "A confirmed book event for display purposes. Omits cryptographic fields (bookPub, bookSig) and book reference since it's shown in context of a book."
}
registrationView object

A view of a book registration for API responses. Omits cryptographic fields (bookPub, bookSig) and the cover blob.

Properties

authors array of string Required

Authors of this book, in order of credit

bookId string Required

The book's ID (as defined on its QR Code)

occurredAt string datetime Required

When the book was registered

publicationId string Optional

The book's Open Library Edition ID

title string Required

The title of the book

View raw schema
{
  "type": "object",
  "required": [
    "registeredBy",
    "bookId",
    "title",
    "authors",
    "occurredAt"
  ],
  "properties": {
    "title": {
      "type": "string",
      "description": "The title of the book"
    },
    "bookId": {
      "type": "string",
      "description": "The book's ID (as defined on its QR Code)"
    },
    "authors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Authors of this book, in order of credit"
    },
    "occurredAt": {
      "type": "string",
      "format": "datetime",
      "description": "When the book was registered"
    },
    "registeredBy": {
      "ref": "org.passingreads.defs#actor",
      "type": "ref",
      "description": "The person who registered the book"
    },
    "publicationId": {
      "type": "string",
      "description": "The book's Open Library Edition ID"
    }
  },
  "description": "A view of a book registration for API responses. Omits cryptographic fields (bookPub, bookSig) and the cover blob."
}
statefulBook object

A book with its current state, combining registration data with computed state information.

Properties

cid string Required

The CID of the book registration record

coverUrl string uri Optional

Resolved URL to the cover image (from the registration blob)

currentHolder string did Required

The DID of the current holder of the book

events array of ref#confirmedEvent Optional

List of confirmed events for this book, in chronological order

registration ref #registrationView Required

The book registration data (without cryptographic fields)

state string Required

The current state of the book, derived from the latest event

Known values: org.passingreads.book.checkin, org.passingreads.book.drop, org.passingreads.book.find, org.passingreads.book.registration
uri string at-uri Required

The AT URI of the book registration record

View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "cid",
    "registration",
    "state",
    "currentHolder"
  ],
  "properties": {
    "cid": {
      "type": "string",
      "description": "The CID of the book registration record"
    },
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT URI of the book registration record"
    },
    "state": {
      "type": "string",
      "description": "The current state of the book, derived from the latest event",
      "knownValues": [
        "org.passingreads.book.checkin",
        "org.passingreads.book.drop",
        "org.passingreads.book.find",
        "org.passingreads.book.registration"
      ]
    },
    "events": {
      "type": "array",
      "items": {
        "ref": "#confirmedEvent",
        "type": "ref"
      },
      "description": "List of confirmed events for this book, in chronological order"
    },
    "coverUrl": {
      "type": "string",
      "format": "uri",
      "description": "Resolved URL to the cover image (from the registration blob)"
    },
    "aspectRatio": {
      "ref": "org.passingreads.defs#aspectRatio",
      "type": "ref",
      "description": "Aspect ratio of the cover image"
    },
    "registration": {
      "ref": "#registrationView",
      "type": "ref",
      "description": "The book registration data (without cryptographic fields)"
    },
    "currentHolder": {
      "type": "string",
      "format": "did",
      "description": "The DID of the current holder of the book"
    },
    "currentLocation": {
      "ref": "community.lexicon.location.hthree#main",
      "type": "ref",
      "description": "The current location of the book (only present if state is 'org.passingreads.book.drop')"
    }
  },
  "description": "A book with its current state, combining registration data with computed state information."
}

Lexicon Garden

@