# pub.oysters.defs

> Published by [oysters.pub](https://lexicon.garden/identity/did:plc:gsvuczfwpmrqpap45iz23j43)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:gsvuczfwpmrqpap45iz23j43/pub.oysters.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:gsvuczfwpmrqpap45iz23j43/pub.oysters.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:gsvuczfwpmrqpap45iz23j43/pub.oysters.defs/examples)

## Definitions

### `pub.oysters.defs#tagView`

**Type**: `object`

One tag in the board's curated vocabulary.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes | The tag's display name. |
| `slug` | `string` | Yes | The tag as it appears in a record and in /t/ URLs. |
| `description` | `string` | No | What the tag is for. |

### `pub.oysters.defs#postView`

**Type**: `object`

A submission with everything needed to render it: the record as written, its author, and the counts this board derived.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | CID of the exact revision indexed. Absent for a record indexed before its CID was known. |
| `uri` | `string` (at-uri) | Yes | The submission's AT-URI. This is the stable identifier; do not key on anything else. |
| `tags` | `array` | No | Tags from this board's curated vocabulary. The record may claim others; those are not echoed here. |
| `author` | `ref` → `#actorView` | Yes | Who submitted it. |
| `record` | `unknown` | Yes | The pub.oysters.post record, rebuilt from the indexed fields. Fields this board does not index are not echoed; fetch the record from the author's repository if you need it byte-for-byte. |
| `indexedAt` | `string` (datetime) | Yes | When this board first saw the record. Ranking uses this rather than the record's own createdAt, which its author chose. |
| `upvoteCount` | `integer` | No | Live upvotes. Not the ranking score, which is deliberately not exposed. |
| `commentCount` | `integer` | No | Live comments, at any depth. |

### `pub.oysters.defs#actorView`

**Type**: `object`

An account, hydrated enough to render a byline without resolving the DID.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes | The account's DID, which is its permanent identity. |
| `avatar` | `string` (uri) | No | URL of the account's avatar image. |
| `handle` | `string` (handle) | No | The handle the DID document claims, as last seen. Absent until we have resolved one. |
| `displayName` | `string` | No | A chosen name, if the account has one. |

### `pub.oysters.defs#commentView`

**Type**: `object`

One comment in a discussion.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | CID of the exact revision indexed. |
| `uri` | `string` (at-uri) | Yes | The comment's AT-URI. |
| `author` | `ref` → `#actorView` | Yes | Who wrote it. |
| `record` | `unknown` | Yes | The pub.oysters.comment record, rebuilt from the indexed fields. See postView.record. |
| `indexedAt` | `string` (datetime) | Yes | When this board first saw the record. |
| `upvoteCount` | `integer` | No | Live upvotes on this comment. |

### `pub.oysters.defs#threadViewPost`

**Type**: `object`

A submission and its whole discussion.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `post` | `ref` → `#postView` | Yes | The submission the discussion is about. |
| `replies` | `array` | No | Top-level comments, each with their own replies. |

### `pub.oysters.defs#threadViewComment`

**Type**: `object`

A comment and its replies, nested. Replies are ordered the way the board displays them: by weighted score, ties broken by age.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `comment` | `ref` → `#commentView` | Yes | The comment at this node. |
| `replies` | `array` | No | Direct replies, each with their own replies. Empty at the depth limit rather than absent, so a client can tell a leaf from a truncation only by comparing against the depth it asked for. |

## Raw Schema

```json
{
  "id": "pub.oysters.defs",
  "defs": {
    "tagView": {
      "type": "object",
      "required": [
        "slug",
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 256,
          "description": "The tag's display name."
        },
        "slug": {
          "type": "string",
          "maxLength": 128,
          "description": "The tag as it appears in a record and in /t/ URLs."
        },
        "description": {
          "type": "string",
          "maxLength": 1024,
          "description": "What the tag is for."
        }
      },
      "description": "One tag in the board's curated vocabulary."
    },
    "postView": {
      "type": "object",
      "required": [
        "uri",
        "author",
        "record",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the exact revision indexed. Absent for a record indexed before its CID was known."
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "The submission's AT-URI. This is the stable identifier; do not key on anything else."
        },
        "tags": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 128
          },
          "description": "Tags from this board's curated vocabulary. The record may claim others; those are not echoed here."
        },
        "author": {
          "ref": "#actorView",
          "type": "ref",
          "description": "Who submitted it."
        },
        "record": {
          "type": "unknown",
          "description": "The pub.oysters.post record, rebuilt from the indexed fields. Fields this board does not index are not echoed; fetch the record from the author's repository if you need it byte-for-byte."
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this board first saw the record. Ranking uses this rather than the record's own createdAt, which its author chose."
        },
        "upvoteCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Live upvotes. Not the ranking score, which is deliberately not exposed."
        },
        "commentCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Live comments, at any depth."
        }
      },
      "description": "A submission with everything needed to render it: the record as written, its author, and the counts this board derived."
    },
    "actorView": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did",
          "description": "The account's DID, which is its permanent identity."
        },
        "avatar": {
          "type": "string",
          "format": "uri",
          "description": "URL of the account's avatar image."
        },
        "handle": {
          "type": "string",
          "format": "handle",
          "description": "The handle the DID document claims, as last seen. Absent until we have resolved one."
        },
        "displayName": {
          "type": "string",
          "maxLength": 256,
          "description": "A chosen name, if the account has one.",
          "maxGraphemes": 64
        }
      },
      "description": "An account, hydrated enough to render a byline without resolving the DID."
    },
    "commentView": {
      "type": "object",
      "required": [
        "uri",
        "author",
        "record",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid",
          "description": "CID of the exact revision indexed."
        },
        "uri": {
          "type": "string",
          "format": "at-uri",
          "description": "The comment's AT-URI."
        },
        "author": {
          "ref": "#actorView",
          "type": "ref",
          "description": "Who wrote it."
        },
        "record": {
          "type": "unknown",
          "description": "The pub.oysters.comment record, rebuilt from the indexed fields. See postView.record."
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this board first saw the record."
        },
        "upvoteCount": {
          "type": "integer",
          "minimum": 0,
          "description": "Live upvotes on this comment."
        }
      },
      "description": "One comment in a discussion."
    },
    "threadViewPost": {
      "type": "object",
      "required": [
        "post"
      ],
      "properties": {
        "post": {
          "ref": "#postView",
          "type": "ref",
          "description": "The submission the discussion is about."
        },
        "replies": {
          "type": "array",
          "items": {
            "ref": "#threadViewComment",
            "type": "ref"
          },
          "description": "Top-level comments, each with their own replies."
        }
      },
      "description": "A submission and its whole discussion."
    },
    "threadViewComment": {
      "type": "object",
      "required": [
        "comment"
      ],
      "properties": {
        "comment": {
          "ref": "#commentView",
          "type": "ref",
          "description": "The comment at this node."
        },
        "replies": {
          "type": "array",
          "items": {
            "ref": "#threadViewComment",
            "type": "ref"
          },
          "description": "Direct replies, each with their own replies. Empty at the depth limit rather than absent, so a client can tell a leaf from a truncation only by comparing against the depth it asked for."
        }
      },
      "description": "A comment and its replies, nested. Replies are ordered the way the board displays them: by weighted score, ties broken by age."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
