# social.coves.community.post.defs

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

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.defs)
- [Documentation](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:coves.social/social.coves.community.post.defs/examples)

## Definitions

### `social.coves.community.post.defs#postView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `embed` | `union` | No | Embedded content from the post record. Untransformed embeds keep their record types; when the AppView rewrites blob references to URLs or resolves quoted posts, it serves the corresponding #view type. |
| `stats` | `ref` → `#postStats` | No |  |
| `author` | `ref` → `#authorView` | Yes |  |
| `record` | `unknown` | Yes | The actual post record (text, image, video, etc.) |
| `viewer` | `ref` → `#viewerState` | No |  |
| `editedAt` | `string` (datetime) | No |  |
| `language` | `string` (language) | No |  |
| `community` | `ref` → `#communityRef` | Yes |  |
| `createdAt` | `string` (datetime) | Yes |  |
| `indexedAt` | `string` (datetime) | Yes | When this post was indexed by the AppView |

### `social.coves.community.post.defs#postStats`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `score` | `integer` | Yes | Calculated score (upvotes - downvotes) |
| `upvotes` | `integer` | Yes |  |
| `downvotes` | `integer` | Yes |  |
| `tagCounts` | `unknown` | No | Map of tag name to the number of community members who applied it (e.g., {"insightful": 12}) |
| `shareCount` | `integer` | No |  |
| `commentCount` | `integer` | Yes |  |

### `social.coves.community.post.defs#authorView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `avatar` | `string` (uri) | No |  |
| `handle` | `string` (handle) | Yes |  |
| `reputation` | `integer` | No | Author's reputation in the community |
| `displayName` | `string` | No |  |

### `social.coves.community.post.defs#blockedPost`

**Type**: `object`

Post is blocked due to viewer blocking author/community, or community moderation

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `author` | `ref` → `#blockedAuthor` | No |  |
| `blocked` | `boolean` | Yes |  |
| `blockedBy` | `string` | No | What caused the block: viewer blocked author, viewer blocked community, or post was removed by moderators |
| `community` | `ref` → `#blockedCommunity` | No |  |

### `social.coves.community.post.defs#viewerState`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tags` | `array` | No | Tags applied by the viewer to this post |
| `vote` | `string` | No | Viewer's vote on this post |
| `saved` | `boolean` | No |  |
| `voteUri` | `string` (at-uri) | No |  |
| `savedUri` | `string` (at-uri) | No |  |

### `social.coves.community.post.defs#communityRef`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `name` | `string` | Yes |  |
| `avatar` | `string` (uri) | No |  |
| `handle` | `string` (handle) | No | Current handle resolved from DID |

### `social.coves.community.post.defs#notFoundPost`

**Type**: `object`

Post was not found (deleted, never indexed, or invalid URI)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `notFound` | `boolean` | Yes |  |

### `social.coves.community.post.defs#blockedAuthor`

**Type**: `object`

Minimal author info for blocked posts

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |

### `social.coves.community.post.defs#blockedCommunity`

**Type**: `object`

Minimal community info for blocked posts

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `did` | `string` (did) | Yes |  |
| `name` | `string` | No |  |

## Raw Schema

```json
{
  "id": "social.coves.community.post.defs",
  "defs": {
    "postView": {
      "type": "object",
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "community",
        "createdAt",
        "indexedAt"
      ],
      "properties": {
        "cid": {
          "type": "string",
          "format": "cid"
        },
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "embed": {
          "refs": [
            "social.coves.embed.images",
            "social.coves.embed.video",
            "social.coves.embed.external",
            "social.coves.embed.external#view",
            "social.coves.embed.post",
            "social.coves.embed.post#view"
          ],
          "type": "union",
          "description": "Embedded content from the post record. Untransformed embeds keep their record types; when the AppView rewrites blob references to URLs or resolves quoted posts, it serves the corresponding #view type."
        },
        "stats": {
          "ref": "#postStats",
          "type": "ref"
        },
        "author": {
          "ref": "#authorView",
          "type": "ref"
        },
        "record": {
          "type": "unknown",
          "description": "The actual post record (text, image, video, etc.)"
        },
        "viewer": {
          "ref": "#viewerState",
          "type": "ref"
        },
        "editedAt": {
          "type": "string",
          "format": "datetime"
        },
        "language": {
          "type": "string",
          "format": "language"
        },
        "community": {
          "ref": "#communityRef",
          "type": "ref"
        },
        "createdAt": {
          "type": "string",
          "format": "datetime"
        },
        "indexedAt": {
          "type": "string",
          "format": "datetime",
          "description": "When this post was indexed by the AppView"
        }
      }
    },
    "postStats": {
      "type": "object",
      "required": [
        "upvotes",
        "downvotes",
        "score",
        "commentCount"
      ],
      "properties": {
        "score": {
          "type": "integer",
          "description": "Calculated score (upvotes - downvotes)"
        },
        "upvotes": {
          "type": "integer",
          "minimum": 0
        },
        "downvotes": {
          "type": "integer",
          "minimum": 0
        },
        "tagCounts": {
          "type": "unknown",
          "description": "Map of tag name to the number of community members who applied it (e.g., {\"insightful\": 12})"
        },
        "shareCount": {
          "type": "integer",
          "minimum": 0
        },
        "commentCount": {
          "type": "integer",
          "minimum": 0
        }
      }
    },
    "authorView": {
      "type": "object",
      "required": [
        "did",
        "handle"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "avatar": {
          "type": "string",
          "format": "uri"
        },
        "handle": {
          "type": "string",
          "format": "handle"
        },
        "reputation": {
          "type": "integer",
          "description": "Author's reputation in the community"
        },
        "displayName": {
          "type": "string",
          "maxLength": 1280,
          "maxGraphemes": 128
        }
      }
    },
    "blockedPost": {
      "type": "object",
      "required": [
        "uri",
        "blocked"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "author": {
          "ref": "#blockedAuthor",
          "type": "ref"
        },
        "blocked": {
          "type": "boolean",
          "const": true
        },
        "blockedBy": {
          "type": "string",
          "maxLength": 64,
          "description": "What caused the block: viewer blocked author, viewer blocked community, or post was removed by moderators",
          "knownValues": [
            "author",
            "community",
            "moderator"
          ]
        },
        "community": {
          "ref": "#blockedCommunity",
          "type": "ref"
        }
      },
      "description": "Post is blocked due to viewer blocking author/community, or community moderation"
    },
    "viewerState": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 640,
            "maxGraphemes": 64
          },
          "description": "Tags applied by the viewer to this post"
        },
        "vote": {
          "type": "string",
          "maxLength": 64,
          "description": "Viewer's vote on this post",
          "knownValues": [
            "up",
            "down"
          ]
        },
        "saved": {
          "type": "boolean"
        },
        "voteUri": {
          "type": "string",
          "format": "at-uri"
        },
        "savedUri": {
          "type": "string",
          "format": "at-uri"
        }
      }
    },
    "communityRef": {
      "type": "object",
      "required": [
        "did",
        "name"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "name": {
          "type": "string",
          "maxLength": 63
        },
        "avatar": {
          "type": "string",
          "format": "uri"
        },
        "handle": {
          "type": "string",
          "format": "handle",
          "description": "Current handle resolved from DID"
        }
      }
    },
    "notFoundPost": {
      "type": "object",
      "required": [
        "uri",
        "notFound"
      ],
      "properties": {
        "uri": {
          "type": "string",
          "format": "at-uri"
        },
        "notFound": {
          "type": "boolean",
          "const": true
        }
      },
      "description": "Post was not found (deleted, never indexed, or invalid URI)"
    },
    "blockedAuthor": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        }
      },
      "description": "Minimal author info for blocked posts"
    },
    "blockedCommunity": {
      "type": "object",
      "required": [
        "did"
      ],
      "properties": {
        "did": {
          "type": "string",
          "format": "did"
        },
        "name": {
          "type": "string",
          "maxLength": 63
        }
      },
      "description": "Minimal community info for blocked posts"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
