{
"id": "pub.chive.governance.getUserVote",
"defs": {
"main": {
"type": "query",
"errors": [
{
"name": "NotFound"
}
],
"output": {
"schema": {
"type": "object",
"required": [
"vote"
],
"properties": {
"vote": {
"refs": [
"#voteView"
],
"type": "union",
"description": "Vote if found, or null"
}
}
},
"encoding": "application/json"
},
"parameters": {
"type": "params",
"required": [
"proposalId",
"userDid"
],
"properties": {
"userDid": {
"type": "string",
"format": "did",
"description": "User DID"
},
"proposalId": {
"type": "string",
"description": "Proposal identifier"
}
}
},
"description": "Get a user's vote on a specific proposal, if they have voted"
},
"voteView": {
"type": "object",
"required": [
"id",
"uri",
"cid",
"proposalUri",
"voterDid",
"voterRole",
"vote",
"weight",
"createdAt"
],
"properties": {
"id": {
"type": "string",
"description": "Vote identifier"
},
"cid": {
"type": "string",
"description": "Content identifier"
},
"uri": {
"type": "string",
"format": "at-uri",
"description": "Vote AT-URI"
},
"vote": {
"type": "string",
"description": "Vote value",
"knownValues": [
"approve",
"reject",
"abstain",
"request-changes"
]
},
"weight": {
"type": "integer",
"maximum": 1000,
"minimum": 0,
"description": "Weighted vote value (scaled by 1000 for 0.0-1.0 range)"
},
"voterDid": {
"type": "string",
"format": "did",
"description": "Voter DID"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "Vote timestamp"
},
"rationale": {
"type": "string",
"description": "Vote rationale"
},
"voterRole": {
"type": "string",
"description": "Voter governance role",
"knownValues": [
"community-member",
"reviewer",
"domain-expert",
"administrator"
]
},
"proposalUri": {
"type": "string",
"format": "at-uri",
"description": "Proposal AT-URI"
}
},
"description": "View of a vote on a proposal"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"revision": 1
}