atproto blogging
at main 327 lines 8.5 kB view raw
1{ 2 "lexicon": 1, 3 "id": "sh.weaver.collab.defs", 4 "defs": { 5 "chapter": { 6 "type": "token", 7 "description": "Collaboration scoped to a chapter." 8 }, 9 "collaborationStateView": { 10 "type": "object", 11 "description": "Full state of a collaboration relationship including version reconciliation. Tracks both current and former collaborators.", 12 "required": [ 13 "resource", 14 "status", 15 "participants" 16 ], 17 "properties": { 18 "canonicalUri": { 19 "type": "string", 20 "description": "The 'canonical' version URI (usually owner's)", 21 "format": "at-uri" 22 }, 23 "createdAt": { 24 "type": "string", 25 "format": "datetime" 26 }, 27 "firstCollaboratorAddedAt": { 28 "type": "string", 29 "format": "datetime" 30 }, 31 "formerParticipants": { 32 "type": "array", 33 "description": "People who used to collaborate but relationship ended", 34 "items": { 35 "type": "ref", 36 "ref": "#formerCollaboratorView" 37 } 38 }, 39 "hasDivergence": { 40 "type": "boolean" 41 }, 42 "hasFormerCollaborators": { 43 "type": "boolean" 44 }, 45 "hasOrphanedVersions": { 46 "type": "boolean", 47 "description": "Published versions from former collaborators still exist" 48 }, 49 "lastSyncedAt": { 50 "type": "string", 51 "format": "datetime" 52 }, 53 "participants": { 54 "type": "array", 55 "description": "Current active + invited participants", 56 "items": { 57 "type": "ref", 58 "ref": "#participantStateView" 59 } 60 }, 61 "publishedVersions": { 62 "type": "array", 63 "items": { 64 "type": "ref", 65 "ref": "sh.weaver.notebook.defs#publishedVersionView" 66 } 67 }, 68 "resource": { 69 "type": "ref", 70 "ref": "com.atproto.repo.strongRef" 71 }, 72 "status": { 73 "type": "string", 74 "description": "active=normal, broken=all invites revoked/expired, diverged=versions differ, reconciled=was diverged but resolved", 75 "knownValues": [ 76 "active", 77 "broken", 78 "diverged", 79 "reconciled" 80 ] 81 } 82 } 83 }, 84 "entry": { 85 "type": "token", 86 "description": "Collaboration scoped to a single entry." 87 }, 88 "formerCollaboratorView": { 89 "type": "object", 90 "description": "Lightweight view for 'this person used to collaborate but doesn't anymore'.", 91 "required": [ 92 "user", 93 "wasActiveFrom", 94 "wasActiveUntil", 95 "endReason" 96 ], 97 "properties": { 98 "contributionCount": { 99 "type": "integer", 100 "description": "Number of diffs they created while active" 101 }, 102 "endReason": { 103 "type": "string", 104 "knownValues": [ 105 "voluntary_leave", 106 "invite_revoked", 107 "invite_expired", 108 "owner_deleted_resource" 109 ] 110 }, 111 "hasPublishedVersion": { 112 "type": "boolean" 113 }, 114 "publishedVersionUri": { 115 "type": "string", 116 "format": "at-uri" 117 }, 118 "user": { 119 "type": "ref", 120 "ref": "sh.weaver.actor.defs#profileViewBasic" 121 }, 122 "wasActiveFrom": { 123 "type": "string", 124 "format": "datetime" 125 }, 126 "wasActiveUntil": { 127 "type": "string", 128 "format": "datetime" 129 } 130 } 131 }, 132 "inviteView": { 133 "type": "object", 134 "description": "Hydrated view of a collaboration invite with status.", 135 "required": [ 136 "uri", 137 "cid", 138 "inviter", 139 "invitee", 140 "resource", 141 "createdAt", 142 "status" 143 ], 144 "properties": { 145 "acceptUri": { 146 "type": "string", 147 "format": "at-uri" 148 }, 149 "acceptedAt": { 150 "type": "string", 151 "format": "datetime" 152 }, 153 "cid": { 154 "type": "string", 155 "format": "cid" 156 }, 157 "createdAt": { 158 "type": "string", 159 "format": "datetime" 160 }, 161 "expiresAt": { 162 "type": "string", 163 "format": "datetime" 164 }, 165 "invitee": { 166 "type": "ref", 167 "ref": "sh.weaver.actor.defs#profileViewBasic" 168 }, 169 "inviter": { 170 "type": "ref", 171 "ref": "sh.weaver.actor.defs#profileViewBasic" 172 }, 173 "message": { 174 "type": "string" 175 }, 176 "resource": { 177 "type": "ref", 178 "ref": "com.atproto.repo.strongRef" 179 }, 180 "resourceTitle": { 181 "type": "string" 182 }, 183 "scope": { 184 "type": "string", 185 "knownValues": [ 186 "notebook", 187 "entry", 188 "chapter" 189 ] 190 }, 191 "status": { 192 "type": "string", 193 "knownValues": [ 194 "pending", 195 "accepted", 196 "expired", 197 "revoked" 198 ] 199 }, 200 "uri": { 201 "type": "string", 202 "format": "at-uri" 203 } 204 } 205 }, 206 "notebook": { 207 "type": "token", 208 "description": "Collaboration scoped to an entire notebook." 209 }, 210 "participantStateView": { 211 "type": "object", 212 "description": "Individual participant's state in a collaboration. Distinguishes 'was collaborator' vs 'never was'.", 213 "required": [ 214 "user", 215 "role", 216 "status" 217 ], 218 "properties": { 219 "acceptUri": { 220 "type": "string", 221 "description": "If they accepted (even if later broken)", 222 "format": "at-uri" 223 }, 224 "endReason": { 225 "type": "string", 226 "description": "Why the relationship ended, if applicable", 227 "knownValues": [ 228 "voluntary_leave", 229 "invite_revoked", 230 "invite_expired", 231 "owner_deleted_resource" 232 ] 233 }, 234 "firstEditAt": { 235 "type": "string", 236 "description": "When they first contributed", 237 "format": "datetime" 238 }, 239 "inviteUri": { 240 "type": "string", 241 "format": "at-uri" 242 }, 243 "lastEditAt": { 244 "type": "string", 245 "format": "datetime" 246 }, 247 "publishedVersion": { 248 "type": "ref", 249 "description": "Their published copy if any", 250 "ref": "com.atproto.repo.strongRef" 251 }, 252 "relationshipEndedAt": { 253 "type": "string", 254 "description": "When left/removed/expired", 255 "format": "datetime" 256 }, 257 "role": { 258 "type": "string", 259 "knownValues": [ 260 "owner", 261 "collaborator", 262 "former_collaborator" 263 ] 264 }, 265 "status": { 266 "type": "string", 267 "description": "active=can edit, invited=pending, left=voluntarily departed, removed=invite revoked, expired=invite timed out", 268 "knownValues": [ 269 "active", 270 "invited", 271 "left", 272 "removed", 273 "expired" 274 ] 275 }, 276 "user": { 277 "type": "ref", 278 "ref": "sh.weaver.actor.defs#profileViewBasic" 279 }, 280 "wasCollaborator": { 281 "type": "boolean", 282 "description": "True if they ever had active collaboration status" 283 } 284 } 285 }, 286 "sessionView": { 287 "type": "object", 288 "description": "Active real-time collaboration session.", 289 "required": [ 290 "uri", 291 "user", 292 "resource", 293 "nodeId", 294 "createdAt" 295 ], 296 "properties": { 297 "createdAt": { 298 "type": "string", 299 "format": "datetime" 300 }, 301 "expiresAt": { 302 "type": "string", 303 "format": "datetime" 304 }, 305 "nodeId": { 306 "type": "string" 307 }, 308 "relayUrl": { 309 "type": "string", 310 "format": "uri" 311 }, 312 "resource": { 313 "type": "ref", 314 "ref": "com.atproto.repo.strongRef" 315 }, 316 "uri": { 317 "type": "string", 318 "format": "at-uri" 319 }, 320 "user": { 321 "type": "ref", 322 "ref": "sh.weaver.actor.defs#profileViewBasic" 323 } 324 } 325 } 326 } 327}