org.passingreads.book.defs

passingreads.org

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

did string did Required

The DID of the person who performed this event

event string Required

What event occurred

Known values: org.passingreads.book.drop, org.passingreads.book.find
handle string handle Optional

The handle of the person who performed this event

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",
    "did",
    "event",
    "location",
    "occurredAt"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The DID of the person who performed this event"
    },
    "uri": {
      "type": "string",
      "format": "at-uri",
      "description": "The AT URI of this event record"
    },
    "event": {
      "type": "string",
      "description": "What event occurred",
      "knownValues": [
        "org.passingreads.book.drop",
        "org.passingreads.book.find"
      ]
    },
    "handle": {
      "type": "string",
      "format": "handle",
      "description": "The handle of the person who performed this event"
    },
    "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)

did string did Required

The DID of the person who registered the book

handle string handle Optional

The handle of the person who registered the book

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": [
    "did",
    "bookId",
    "title",
    "authors",
    "occurredAt"
  ],
  "properties": {
    "did": {
      "type": "string",
      "format": "did",
      "description": "The DID of the person who registered the book"
    },
    "title": {
      "type": "string",
      "description": "The title of the book"
    },
    "bookId": {
      "type": "string",
      "description": "The book's ID (as defined on its QR Code)"
    },
    "handle": {
      "type": "string",
      "format": "handle",
      "description": "The handle of the person who registered the book"
    },
    "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"
    },
    "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.registration, org.passingreads.book.drop, org.passingreads.book.find
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.registration",
        "org.passingreads.book.drop",
        "org.passingreads.book.find"
      ]
    },
    "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

@