A community based topic aggregation platform built on atproto

feat(lexicon): add vote create and delete lexicons

Add XRPC procedure lexicons for voting on posts/comments:
- social.coves.feed.vote.create: Create/toggle votes with up/down direction
- social.coves.feed.vote.delete: Remove existing votes

Follows atproto lexicon best practices:
- Uses knownValues for direction (not closed enum)
- References com.atproto.repo.strongRef for subject
- UpperCamelCase error names per spec

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

Changed files
+103
internal
atproto
lexicon
social
coves
+62
internal/atproto/lexicon/social/coves/feed/vote/create.json
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.feed.vote.create",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Create or toggle a vote on a post or comment. If a vote in the same direction exists, it will be removed (toggled off). If a vote in the opposite direction exists, it will be replaced.",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["subject", "direction"],
+
"properties": {
+
"subject": {
+
"type": "ref",
+
"ref": "com.atproto.repo.strongRef",
+
"description": "Strong reference to the post or comment being voted on"
+
},
+
"direction": {
+
"type": "string",
+
"knownValues": ["up", "down"],
+
"description": "Vote direction: up for upvote, down for downvote"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["uri", "cid"],
+
"properties": {
+
"uri": {
+
"type": "string",
+
"format": "at-uri",
+
"description": "AT-URI of the created vote (empty string if vote was toggled off)"
+
},
+
"cid": {
+
"type": "string",
+
"format": "cid",
+
"description": "CID of the created vote (empty string if vote was toggled off)"
+
}
+
}
+
}
+
},
+
"errors": [
+
{
+
"name": "SubjectNotFound",
+
"description": "The subject post or comment was not found"
+
},
+
{
+
"name": "NotAuthorized",
+
"description": "User is not authorized to vote on this content"
+
},
+
{
+
"name": "InvalidSubject",
+
"description": "The subject reference is invalid or malformed"
+
}
+
]
+
}
+
}
+
}
+41
internal/atproto/lexicon/social/coves/feed/vote/delete.json
···
+
{
+
"lexicon": 1,
+
"id": "social.coves.feed.vote.delete",
+
"defs": {
+
"main": {
+
"type": "procedure",
+
"description": "Delete a vote on a post or comment",
+
"input": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"required": ["subject"],
+
"properties": {
+
"subject": {
+
"type": "ref",
+
"ref": "com.atproto.repo.strongRef",
+
"description": "Strong reference to the post or comment to remove the vote from"
+
}
+
}
+
}
+
},
+
"output": {
+
"encoding": "application/json",
+
"schema": {
+
"type": "object",
+
"properties": {}
+
}
+
},
+
"errors": [
+
{
+
"name": "VoteNotFound",
+
"description": "No vote found for this subject"
+
},
+
{
+
"name": "NotAuthorized",
+
"description": "User is not authorized to delete this vote"
+
}
+
]
+
}
+
}
+
}