# social.dracome.library.state

> Published by [dracome.social](https://lexicon.garden/identity/did:plc:66dyrt2bmghwlmdteyizs5l3)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:66dyrt2bmghwlmdteyizs5l3/social.dracome.library.state)
- [Documentation](https://lexicon.garden/lexicon/did:plc:66dyrt2bmghwlmdteyizs5l3/social.dracome.library.state/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:66dyrt2bmghwlmdteyizs5l3/social.dracome.library.state/examples)

## Definitions

### `social.dracome.library.state`

**Type**: `record`

A reading-state record for one edition per actor. Duplicate convention: the rkey is a TID minted once at first create and never changes. Several records may exist for one actor and edition (for example from out-of-band writers); consumers SHOULD treat the record with the greatest `updatedAt` (falling back to `createdAt`) as the winner and break ties by the lowest TID, ignoring the others. This is a convention, not an enforced contract: AppViews MUST tolerate a differing winner, and may see a record's catalogTarget change over time.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `catalogSnapshot` | `ref` → `social.dracome.work.defs#catalogSnapshot` | Yes | Point-in-time catalog metadata for the tracked work or edition, captured when this record was last written. Refreshed on every update. |
| `catalogTarget` | `ref` → `social.dracome.work.defs#catalogTarget` | Yes | The work and edition that this reading-state record tracks. Mutable. |
| `catalogTargetCustomization` | `ref` → `social.dracome.library.defs#catalogTargetCustomization` | No | Optional user-confirmed override of catalog totals (page count, chapter count, or audio duration) for this specific target. |
| `createdAt` | `string` (datetime) | Yes | Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix. |
| `finishedAt` | `string` (datetime) | No | Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix. |
| `progress` | `ref` → `social.dracome.library.defs#trackingProgress` | No | Optional log of the actor's reading or listening progress over time for this target. |
| `startedAt` | `string` (datetime) | No | Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix. This records the first instant the actor entered in_progress for the current reading episode. Returns to in_progress within 14 days preserve the same startedAt. |
| `status` | `ref` → `social.dracome.library.defs#trackingStatus` | Yes | The actor's current reading-state status for this target, e.g. wishlist, backlog, in_progress, paused, completed, or abandoned. |
| `updatedAt` | `string` (datetime) | No | Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A reading-state record for one edition per actor. Duplicate convention: the rkey is a TID minted once at first create and never changes. Several records may exist for one actor and edition (for example from out-of-band writers); consumers SHOULD treat the record with the greatest `updatedAt` (falling back to `createdAt`) as the winner and break ties by the lowest TID, ignoring the others. This is a convention, not an enforced contract: AppViews MUST tolerate a differing winner, and may see a record's catalogTarget change over time.",
      "key": "tid",
      "record": {
        "properties": {
          "catalogSnapshot": {
            "description": "Point-in-time catalog metadata for the tracked work or edition, captured when this record was last written. Refreshed on every update.",
            "ref": "social.dracome.work.defs#catalogSnapshot",
            "type": "ref"
          },
          "catalogTarget": {
            "description": "The work and edition that this reading-state record tracks. Mutable.",
            "ref": "social.dracome.work.defs#catalogTarget",
            "type": "ref"
          },
          "catalogTargetCustomization": {
            "description": "Optional user-confirmed override of catalog totals (page count, chapter count, or audio duration) for this specific target.",
            "ref": "social.dracome.library.defs#catalogTargetCustomization",
            "type": "ref"
          },
          "createdAt": {
            "description": "Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.",
            "format": "datetime",
            "type": "string"
          },
          "finishedAt": {
            "description": "Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.",
            "format": "datetime",
            "type": "string"
          },
          "progress": {
            "description": "Optional log of the actor's reading or listening progress over time for this target.",
            "ref": "social.dracome.library.defs#trackingProgress",
            "type": "ref"
          },
          "startedAt": {
            "description": "Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix. This records the first instant the actor entered in_progress for the current reading episode. Returns to in_progress within 14 days preserve the same startedAt.",
            "format": "datetime",
            "type": "string"
          },
          "status": {
            "description": "The actor's current reading-state status for this target, e.g. wishlist, backlog, in_progress, paused, completed, or abandoned.",
            "ref": "social.dracome.library.defs#trackingStatus",
            "type": "ref"
          },
          "updatedAt": {
            "description": "Canonical UTC instant serialized as ISO 8601 with a trailing Z suffix.",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "catalogTarget",
          "catalogSnapshot",
          "status",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "social.dracome.library.state",
  "lexicon": 1
}
```
