{ "lexicon": 1, "id": "com.hectorsector.book.status", "description": "A reading status change event for a book. Records are append-only and timestamped — each status transition creates a new record rather than mutating an existing one. The current status of a book is derived by taking the most recent status record (by createdAt) referencing that book.", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", // requires all 3, otherwise meaningless "required": ["book", "status", "createdAt"], "properties": { "book": { // a reference to another record "type": "ref", // strongRef = uri + cid // uri: where the record lives // cid: cryptographic hash of content // This pins the exact version of the book record at the time of status creation "ref": "com.atproto.repo.strongRef", "description": "Strong reference to the com.hectorsector.book.book anchor this status applies to.", }, "status": { "type": "string", // not an enum, known values could change so we can extend "knownValues": [ // format: namespaceid#tokens; tokens defined below "com.hectorsector.book.status#wantToRead", "com.hectorsector.book.status#reading", "com.hectorsector.book.status#paused", "com.hectorsector.book.status#didNotFinish", "com.hectorsector.book.status#finished", ], "description": "The reading status being set. Open union — future status tokens may be added; consumers should handle unknown values gracefully.", }, // datetime for the status update; differs from tid which is functioning as an address "createdAt": { "type": "string", "format": "datetime", "description": "When the status change occurred. May differ from the record's server-side timestamp when backfilling history from imports (e.g. StoryGraph CSV).", }, }, }, }, // token definitions // Explicitly left out since it can be reasoned from existing statuses: rereading "wantToRead": { "type": "token", "description": "The user intends to read the book.", }, "reading": { "type": "token", "description": "The user is currently reading the book.", }, "paused": { "type": "token", "description": "The user has paused reading the book and hasn't yet decided if they will continue.", }, "didNotFinish": { "type": "token", "description": "The user has indicated they won't complete this book.", }, "finished": { "type": "token", "description": "The user has completed the book.", }, }, }