A community based topic aggregation platform built on atproto

Adding crosspost logic to lexicon

+250 -16
+2 -7
internal/atproto/lexicon/social/coves/actor/membership.json
··· 4 4 "defs": { 5 5 "main": { 6 6 "type": "record", 7 - "description": "Membership in a community (has reputation)", 7 + "description": "Membership in a community", 8 8 "key": "tid", 9 9 "record": { 10 10 "type": "object", ··· 21 21 "default": 0, 22 22 "description": "Reputation score within the community" 23 23 }, 24 - "subscribedAt": { 25 - "type": "string", 26 - "format": "datetime", 27 - "description": "When the user subscribed to a community" 28 - }, 29 24 "createdAt": { 30 25 "type": "string", 31 26 "format": "datetime", 32 - "description": "When the user was created" 27 + "description": "When the user's membership started" 33 28 }, 34 29 "endedAt": { 35 30 "type": "string",
+2 -1
internal/atproto/lexicon/social/coves/actor/subscription.json
··· 17 17 }, 18 18 "createdAt": { 19 19 "type": "string", 20 - "format": "datetime" 20 + "format": "datetime", 21 + "description": "When the subscription started" 21 22 }, 22 23 "endedAt": { 23 24 "type": "string",
+43 -8
internal/atproto/lexicon/social/coves/community/rules.json
··· 59 59 "type": "object", 60 60 "description": "Allowed post types in the community", 61 61 "properties": { 62 - "textOnly": { 62 + "allowText": { 63 63 "type": "boolean", 64 - "default": false, 65 - "description": "Restrict to text posts only" 64 + "default": true, 65 + "description": "Allow text posts" 66 66 }, 67 67 "allowVideo": { 68 68 "type": "boolean", 69 - "default": true 69 + "default": true, 70 + "description": "Allow video posts" 70 71 }, 71 72 "allowImage": { 72 73 "type": "boolean", 73 - "default": true 74 + "default": true, 75 + "description": "Allow image posts" 74 76 }, 75 77 "allowArticle": { 76 78 "type": "boolean", 77 - "default": true 79 + "default": true, 80 + "description": "Allow Article posts" 78 81 } 79 82 } 80 83 }, ··· 130 133 "tagThreshold": { 131 134 "type": "integer", 132 135 "minimum": 1, 133 - "default": 5, 136 + "default": 15, 134 137 "description": "Number of tags needed to trigger action" 135 138 }, 136 139 "tribunalThreshold": { 137 140 "type": "integer", 138 141 "minimum": 1, 139 - "default": 3, 142 + "default": 50, 140 143 "description": "Number of tags to trigger tribunal review" 141 144 }, 142 145 "jurySize": { ··· 144 147 "minimum": 9, 145 148 "default": 9, 146 149 "description": "Number of jurors for tribunal" 150 + } 151 + } 152 + }, 153 + "rule": { 154 + "type": "object", 155 + "description": "A text-based community rule for display purposes", 156 + "required": ["title", "description", "createdAt", "isActive"], 157 + "properties": { 158 + "title": { 159 + "type": "string", 160 + "maxLength": 256, 161 + "description": "Short rule title (e.g., 'No Editorialized Titles')" 162 + }, 163 + "description": { 164 + "type": "string", 165 + "maxLength": 2000, 166 + "description": "Detailed explanation of the rule" 167 + }, 168 + "createdAt": { 169 + "type": "string", 170 + "format": "datetime", 171 + "description": "When the rule was created" 172 + }, 173 + "isActive": { 174 + "type": "boolean", 175 + "default": true, 176 + "description": "Whether the rule is currently active" 177 + }, 178 + "disabledAt": { 179 + "type": "string", 180 + "format": "datetime", 181 + "description": "When the rule was disabled (optional)" 147 182 } 148 183 } 149 184 }
+13
internal/atproto/lexicon/social/coves/post/article.json
··· 86 86 "type": "ref", 87 87 "ref": "social.coves.actor.profile#geoLocation" 88 88 }, 89 + "crosspostOf": { 90 + "type": "string", 91 + "format": "at-uri", 92 + "description": "If this is a crosspost, AT-URI of the post this is a crosspost of" 93 + }, 94 + "crosspostChain": { 95 + "type": "array", 96 + "description": "Array of AT-URIs of all posts in the crosspost chain (including this one)", 97 + "items": { 98 + "type": "string", 99 + "format": "at-uri" 100 + } 101 + }, 89 102 "createdAt": { 90 103 "type": "string", 91 104 "format": "datetime"
+39
internal/atproto/lexicon/social/coves/post/crosspost.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "social.coves.post.crosspost", 4 + "defs": { 5 + "main": { 6 + "type": "record", 7 + "description": "A record tracking crosspost relationships between posts", 8 + "key": "tid", 9 + "record": { 10 + "type": "object", 11 + "required": ["originalPost", "crosspostOf", "createdAt"], 12 + "properties": { 13 + "originalPost": { 14 + "type": "string", 15 + "format": "at-uri", 16 + "description": "AT-URI of the original post in the crosspost chain" 17 + }, 18 + "crosspostOf": { 19 + "type": "string", 20 + "format": "at-uri", 21 + "description": "AT-URI of the immediate parent this is a crosspost of" 22 + }, 23 + "allCrossposts": { 24 + "type": "array", 25 + "description": "Array of AT-URIs of all posts in the crosspost chain", 26 + "items": { 27 + "type": "string", 28 + "format": "at-uri" 29 + } 30 + }, 31 + "createdAt": { 32 + "type": "string", 33 + "format": "datetime" 34 + } 35 + } 36 + } 37 + } 38 + } 39 + }
+99
internal/atproto/lexicon/social/coves/post/getCrosspostChain.json
··· 1 + { 2 + "lexicon": 1, 3 + "id": "social.coves.post.getCrosspostChain", 4 + "defs": { 5 + "main": { 6 + "type": "procedure", 7 + "description": "Get all crossposts in a crosspost chain for a given post", 8 + "input": { 9 + "encoding": "application/json", 10 + "schema": { 11 + "type": "object", 12 + "required": ["uri"], 13 + "properties": { 14 + "uri": { 15 + "type": "string", 16 + "format": "at-uri", 17 + "description": "AT-URI of any post in the crosspost chain" 18 + } 19 + } 20 + } 21 + }, 22 + "output": { 23 + "encoding": "application/json", 24 + "schema": { 25 + "type": "object", 26 + "required": ["crossposts"], 27 + "properties": { 28 + "crossposts": { 29 + "type": "array", 30 + "description": "All posts in the crosspost chain", 31 + "items": { 32 + "type": "ref", 33 + "ref": "#crosspostView" 34 + } 35 + } 36 + } 37 + } 38 + } 39 + }, 40 + "crosspostView": { 41 + "type": "object", 42 + "required": ["uri", "community", "author", "createdAt"], 43 + "properties": { 44 + "uri": { 45 + "type": "string", 46 + "format": "at-uri", 47 + "description": "AT-URI of the post" 48 + }, 49 + "community": { 50 + "type": "object", 51 + "required": ["uri", "name"], 52 + "properties": { 53 + "uri": { 54 + "type": "string", 55 + "format": "at-uri", 56 + "description": "AT-URI of the community" 57 + }, 58 + "name": { 59 + "type": "string", 60 + "description": "Display name of the community" 61 + }, 62 + "handle": { 63 + "type": "string", 64 + "description": "Handle of the community" 65 + } 66 + } 67 + }, 68 + "author": { 69 + "type": "object", 70 + "required": ["did", "handle"], 71 + "properties": { 72 + "did": { 73 + "type": "string", 74 + "format": "did" 75 + }, 76 + "handle": { 77 + "type": "string" 78 + }, 79 + "displayName": { 80 + "type": "string" 81 + }, 82 + "avatar": { 83 + "type": "string", 84 + "format": "uri" 85 + } 86 + } 87 + }, 88 + "isOriginal": { 89 + "type": "boolean", 90 + "description": "Whether this is the original post in the chain" 91 + }, 92 + "createdAt": { 93 + "type": "string", 94 + "format": "datetime" 95 + } 96 + } 97 + } 98 + } 99 + }
+13
internal/atproto/lexicon/social/coves/post/image.json
··· 73 73 "type": "ref", 74 74 "ref": "social.coves.actor.profile#geoLocation" 75 75 }, 76 + "crosspostOf": { 77 + "type": "string", 78 + "format": "at-uri", 79 + "description": "If this is a crosspost, AT-URI of the post this is a crosspost of" 80 + }, 81 + "crosspostChain": { 82 + "type": "array", 83 + "description": "Array of AT-URIs of all posts in the crosspost chain (including this one)", 84 + "items": { 85 + "type": "string", 86 + "format": "at-uri" 87 + } 88 + }, 76 89 "createdAt": { 77 90 "type": "string", 78 91 "format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/microblog.json
··· 119 119 "maxLength": 10, 120 120 "description": "Language code (e.g., 'en', 'es', 'fr')" 121 121 }, 122 + "crosspostOf": { 123 + "type": "string", 124 + "format": "at-uri", 125 + "description": "If this is a crosspost, AT-URI of the post this is a crosspost of" 126 + }, 127 + "crosspostChain": { 128 + "type": "array", 129 + "description": "Array of AT-URIs of all posts in the crosspost chain (including this one)", 130 + "items": { 131 + "type": "string", 132 + "format": "at-uri" 133 + } 134 + }, 122 135 "createdAt": { 123 136 "type": "string", 124 137 "format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/text.json
··· 74 74 "social.coves.embed.post" 75 75 ] 76 76 }, 77 + "crosspostOf": { 78 + "type": "string", 79 + "format": "at-uri", 80 + "description": "If this is a crosspost, AT-URI of the post this is a crosspost of" 81 + }, 82 + "crosspostChain": { 83 + "type": "array", 84 + "description": "Array of AT-URIs of all posts in the crosspost chain (including this one)", 85 + "items": { 86 + "type": "string", 87 + "format": "at-uri" 88 + } 89 + }, 77 90 "createdAt": { 78 91 "type": "string", 79 92 "format": "datetime"
+13
internal/atproto/lexicon/social/coves/post/video.json
··· 72 72 "type": "ref", 73 73 "ref": "social.coves.actor.profile#geoLocation" 74 74 }, 75 + "crosspostOf": { 76 + "type": "string", 77 + "format": "at-uri", 78 + "description": "If this is a crosspost, AT-URI of the post this is a crosspost of" 79 + }, 80 + "crosspostChain": { 81 + "type": "array", 82 + "description": "Array of AT-URIs of all posts in the crosspost chain (including this one)", 83 + "items": { 84 + "type": "string", 85 + "format": "at-uri" 86 + } 87 + }, 75 88 "createdAt": { 76 89 "type": "string", 77 90 "format": "datetime"