# io.atcr.hold.stats

> Published by [did:web:lexicon.atcr.io](https://lexicon.garden/identity/did:web:lexicon.atcr.io)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.stats)
- [Documentation](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.stats/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:lexicon.atcr.io/io.atcr.hold.stats/examples)

## Definitions

### `io.atcr.hold.stats`

**Type**: `record`

Repository statistics stored in the hold's embedded PDS. Tracks pull/push counts per owner+repository combination. Record key is deterministic: base32(sha256(ownerDID + "/" + repository)[:16]).

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `lastPull` | `string` (datetime) | No | RFC3339 timestamp of last pull |
| `lastPush` | `string` (datetime) | No | RFC3339 timestamp of last push |
| `ownerDid` | `string` (did) | Yes | DID of the image owner (e.g., did:plc:xyz123) |
| `pullCount` | `integer` | Yes | Number of manifest downloads |
| `pushCount` | `integer` | Yes | Number of manifest uploads |
| `repository` | `string` | Yes | Repository name (e.g., myapp) |
| `updatedAt` | `string` (datetime) | Yes | RFC3339 timestamp of when this record was last updated |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Repository statistics stored in the hold's embedded PDS. Tracks pull/push counts per owner+repository combination. Record key is deterministic: base32(sha256(ownerDID + \"/\" + repository)[:16]).",
      "key": "any",
      "record": {
        "properties": {
          "lastPull": {
            "description": "RFC3339 timestamp of last pull",
            "format": "datetime",
            "type": "string"
          },
          "lastPush": {
            "description": "RFC3339 timestamp of last push",
            "format": "datetime",
            "type": "string"
          },
          "ownerDid": {
            "description": "DID of the image owner (e.g., did:plc:xyz123)",
            "format": "did",
            "type": "string"
          },
          "pullCount": {
            "description": "Number of manifest downloads",
            "minimum": 0,
            "type": "integer"
          },
          "pushCount": {
            "description": "Number of manifest uploads",
            "minimum": 0,
            "type": "integer"
          },
          "repository": {
            "description": "Repository name (e.g., myapp)",
            "maxLength": 256,
            "type": "string"
          },
          "updatedAt": {
            "description": "RFC3339 timestamp of when this record was last updated",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "ownerDid",
          "repository",
          "pullCount",
          "pushCount",
          "updatedAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "io.atcr.hold.stats",
  "lexicon": 1
}
```
