# pub.chive.collection.defs

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.defs/examples)

## Definitions

### `pub.chive.collection.defs#feedEventView`

**Type**: `object`

A single event in a collection's activity feed

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes | Event type discriminant |
| `eventAt` | `string` (datetime) | Yes | When the event occurred |
| `payload` | `ref` → `#feedEventPayload` | Yes | Event-type-specific payload with details like titles, snippets, and DIDs |
| `eventUri` | `string` | Yes | AT-URI of the entity that triggered this event |
| `collectionItems` | `array` | No | Collection items that triggered this event with label and URI |
| `collectionItemUri` | `string` | Yes | AT-URI of the collection item that this event relates to |
| `collectionItemSubkind` | `string` | Yes | Subkind of the collection item (person, eprint, field, institution, event) |

### `pub.chive.collection.defs#collectionView`

**Type**: `object`

View of a user collection

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` | Yes | Content identifier |
| `uri` | `string` (at-uri) | Yes | AT-URI of the collection record |
| `label` | `string` | Yes | Display label for the collection |
| `ownerDid` | `string` (did) | Yes | DID of the collection owner |
| `createdAt` | `string` (datetime) | Yes | Creation timestamp |
| `itemCount` | `integer` | Yes | Number of items in the collection |
| `updatedAt` | `string` (datetime) | No | Last update timestamp |
| `visibility` | `string` | Yes | Controls whether Chive's AppView surfaces this collection in listings and search |
| `cosmikItems` | `unknown` | No | Mapping of item URLs to Cosmik card/link record URIs and CIDs |
| `description` | `string` | No | Optional description of the collection |
| `ownerHandle` | `string` | No | Resolved handle of the collection owner |
| `cosmikCollectionCid` | `string` | No | CID of the mirrored Cosmik collection record |
| `cosmikCollectionUri` | `string` | No | AT-URI of the mirrored Cosmik collection, if Semble dual-write is enabled |

### `pub.chive.collection.defs#feedEventPayload`

**Type**: `object`

Event-type-specific payload with details like titles, snippets, and DIDs

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `snippet` | `string` | No | Text snippet from the review or annotation |
| `eprintUri` | `string` | No | AT-URI of the relevant eprint |
| `eventLabel` | `string` | No | Label of the related event |
| `fieldLabel` | `string` | No | Label of the related field |
| `authorNames` | `array` | No | Names of the eprint authors |
| `endorserDid` | `string` (did) | No | DID of the endorser |
| `entityLabel` | `string` | No | Label of the entity link |
| `eprintTitle` | `string` | No | Title of the relevant eprint |
| `personLabel` | `string` | No | Label of the related person |
| `reviewerDid` | `string` (did) | No | DID of the reviewer |
| `annotatorDid` | `string` (did) | No | DID of the annotator |
| `contributions` | `array` | No | Endorsement contribution types |
| `institutionLabel` | `string` | No | Label of the related institution |

### `pub.chive.collection.defs#collectionItemRef`

**Type**: `object`

Reference to a collection item that triggered a feed event

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes | AT-URI of the collection item |
| `label` | `string` | Yes | Display label of the collection item |

### `pub.chive.collection.defs#interItemEdgeView`

**Type**: `object`

An edge between two items within a collection

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `edgeUri` | `string` (at-uri) | No | AT-URI of the personal graph edge record |
| `sourceUri` | `string` | Yes | AT-URI of the source item |
| `targetUri` | `string` | Yes | AT-URI of the target item |
| `relationSlug` | `string` | Yes | Relation type slug |

### `pub.chive.collection.defs#collectionItemView`

**Type**: `object`

View of an item in a collection

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `kind` | `string` | No | Node kind for graph node items |
| `note` | `string` | No | Optional user annotation on the item |
| `label` | `string` | No | Resolved label for graph node items |
| `order` | `integer` | Yes | Display order within the collection |
| `title` | `string` | No | Resolved title for eprint items |
| `avatar` | `string` | No | Avatar URL for person or institution nodes |
| `source` | `string` | No | Whether the item node is personal or cloned from community |
| `addedAt` | `string` (datetime) | Yes | When the item was added to the collection |
| `authors` | `array` | No | Resolved author names for eprint items |
| `edgeUri` | `string` (at-uri) | Yes | AT-URI of the CONTAINS edge record |
| `itemUri` | `string` | Yes | AT-URI or identifier of the contained item |
| `subkind` | `string` | No | Node subkind for graph node items |
| `itemType` | `string` | Yes | Inferred type of the item |
| `metadata` | `unknown` | No | Additional item metadata from the personal graph node |
| `description` | `string` | No | Description for graph node items |

## Raw Schema

```json
{
  "id": "pub.chive.collection.defs",
  "defs": {
    "feedEventView": {
      "type": "object",
      "required": [
        "type",
        "eventUri",
        "eventAt",
        "collectionItemUri",
        "collectionItemSubkind",
        "payload"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "Event type discriminant",
          "knownValues": [
            "eprint_by_author",
            "review_on_eprint",
            "endorsement_on_eprint",
            "annotation_on_eprint",
            "review_by_author",
            "endorsement_by_author",
            "eprint_in_field",
            "eprint_by_institution",
            "eprint_at_event",
            "eprint_referencing_person"
          ]
        },
        "eventAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the event occurred"
        },
        "payload": {
          "ref": "#feedEventPayload",
          "type": "ref",
          "description": "Event-type-specific payload with details like titles, snippets, and DIDs"
        },
        "eventUri": {
          "type": "string",
          "description": "AT-URI of the entity that triggered this event"
        },
        "collectionItems": {
          "type": "array",
          "items": {
            "ref": "#collectionItemRef",
            "type": "ref"
          },
          "description": "Collection items that triggered this event with label and URI"
        },
        "collectionItemUri": {
          "type": "string",
          "description": "AT-URI of the collection item that this event relates to"
        },
        "collectionItemSubkind": {
          "type": "string",
          "description": "Subkind of the collection item (person, eprint, field, institution, event)"
        }
      },
      "description": "A single event in a collection's activity feed"
    },
    "collectionView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "ownerDid",
        "label",
        "visibility",
        "itemCount",
        "createdAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "description": "Content identifier"
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the collection record"
        },
        "label": {
          "type": "string",
          "description": "Display label for the collection"
        },
        "ownerDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the collection owner"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime",
          "description": "Creation timestamp"
        },
        "itemCount": {
          "type": "integer",
          "description": "Number of items in the collection"
        },
        "updatedAt": {
          "type": "string",
          "format": "datetime",
          "description": "Last update timestamp"
        },
        "visibility": {
          "type": "string",
          "description": "Controls whether Chive's AppView surfaces this collection in listings and search",
          "knownValues": [
            "listed",
            "unlisted"
          ]
        },
        "cosmikItems": {
          "type": "unknown",
          "description": "Mapping of item URLs to Cosmik card/link record URIs and CIDs"
        },
        "description": {
          "type": "string",
          "description": "Optional description of the collection"
        },
        "ownerHandle": {
          "type": "string",
          "description": "Resolved handle of the collection owner"
        },
        "cosmikCollectionCid": {
          "type": "string",
          "description": "CID of the mirrored Cosmik collection record"
        },
        "cosmikCollectionUri": {
          "type": "string",
          "description": "AT-URI of the mirrored Cosmik collection, if Semble dual-write is enabled"
        }
      },
      "description": "View of a user collection"
    },
    "feedEventPayload": {
      "type": "object",
      "properties": {
        "snippet": {
          "type": "string",
          "description": "Text snippet from the review or annotation"
        },
        "eprintUri": {
          "type": "string",
          "description": "AT-URI of the relevant eprint"
        },
        "eventLabel": {
          "type": "string",
          "description": "Label of the related event"
        },
        "fieldLabel": {
          "type": "string",
          "description": "Label of the related field"
        },
        "authorNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Names of the eprint authors"
        },
        "endorserDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the endorser"
        },
        "entityLabel": {
          "type": "string",
          "description": "Label of the entity link"
        },
        "eprintTitle": {
          "type": "string",
          "description": "Title of the relevant eprint"
        },
        "personLabel": {
          "type": "string",
          "description": "Label of the related person"
        },
        "reviewerDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the reviewer"
        },
        "annotatorDid": {
          "type": "string",
          "format": "did",
          "description": "DID of the annotator"
        },
        "contributions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Endorsement contribution types"
        },
        "institutionLabel": {
          "type": "string",
          "description": "Label of the related institution"
        }
      },
      "description": "Event-type-specific payload with details like titles, snippets, and DIDs"
    },
    "collectionItemRef": {
      "type": "object",
      "required": [
        "label",
        "uri"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "description": "AT-URI of the collection item"
        },
        "label": {
          "type": "string",
          "description": "Display label of the collection item"
        }
      },
      "description": "Reference to a collection item that triggered a feed event"
    },
    "interItemEdgeView": {
      "type": "object",
      "required": [
        "sourceUri",
        "targetUri",
        "relationSlug"
      ],
      "properties": {
        "edgeUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the personal graph edge record"
        },
        "sourceUri": {
          "type": "string",
          "description": "AT-URI of the source item"
        },
        "targetUri": {
          "type": "string",
          "description": "AT-URI of the target item"
        },
        "relationSlug": {
          "type": "string",
          "description": "Relation type slug"
        }
      },
      "description": "An edge between two items within a collection"
    },
    "collectionItemView": {
      "type": "object",
      "required": [
        "edgeUri",
        "itemUri",
        "itemType",
        "order",
        "addedAt"
      ],
      "properties": {
        "kind": {
          "type": "string",
          "description": "Node kind for graph node items"
        },
        "note": {
          "type": "string",
          "description": "Optional user annotation on the item"
        },
        "label": {
          "type": "string",
          "description": "Resolved label for graph node items"
        },
        "order": {
          "type": "integer",
          "description": "Display order within the collection"
        },
        "title": {
          "type": "string",
          "description": "Resolved title for eprint items"
        },
        "avatar": {
          "type": "string",
          "description": "Avatar URL for person or institution nodes"
        },
        "source": {
          "type": "string",
          "description": "Whether the item node is personal or cloned from community",
          "knownValues": [
            "personal",
            "community"
          ]
        },
        "addedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When the item was added to the collection"
        },
        "authors": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Resolved author names for eprint items"
        },
        "edgeUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of the CONTAINS edge record"
        },
        "itemUri": {
          "type": "string",
          "description": "AT-URI or identifier of the contained item"
        },
        "subkind": {
          "type": "string",
          "description": "Node subkind for graph node items"
        },
        "itemType": {
          "type": "string",
          "description": "Inferred type of the item",
          "knownValues": [
            "eprint",
            "author",
            "graphNode",
            "review",
            "endorsement",
            "external"
          ]
        },
        "metadata": {
          "type": "unknown",
          "description": "Additional item metadata from the personal graph node"
        },
        "description": {
          "type": "string",
          "description": "Description for graph node items"
        }
      },
      "description": "View of an item in a collection"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
