WIP! A BB-style forum, on the ATmosphere! We're still working... we'll be back soon when we have something to show off!
node typescript hono htmx atproto

docs(bruno): add board management API collection (ATB-45)

+153
+52
bruno/AppView API/Admin/Create Board.bru
··· 1 + meta { 2 + name: Create Board 3 + type: http 4 + seq: 13 5 + } 6 + 7 + post { 8 + url: {{appview_url}}/api/admin/boards 9 + } 10 + 11 + body:json { 12 + { 13 + "name": "General Chat", 14 + "description": "Talk about anything.", 15 + "sortOrder": 1, 16 + "categoryUri": "{{category_uri}}" 17 + } 18 + } 19 + 20 + assert { 21 + res.status: eq 201 22 + res.body.uri: isDefined 23 + res.body.cid: isDefined 24 + } 25 + 26 + docs { 27 + Create a new forum board within a category. Fetches the category's CID from DB 28 + to build the categoryRef strongRef. Writes space.atbb.forum.board to the Forum 29 + DID's PDS. The firehose indexer creates the DB row asynchronously. 30 + 31 + **Requires:** space.atbb.permission.manageCategories 32 + 33 + Body: 34 + - name (required): Board display name 35 + - categoryUri (required): AT URI of the parent category 36 + - description (optional): Short description 37 + - sortOrder (optional): Numeric sort position (lower = first) 38 + 39 + Returns (201): 40 + { 41 + "uri": "at://did:plc:.../space.atbb.forum.board/abc123", 42 + "cid": "bafyrei..." 43 + } 44 + 45 + Error codes: 46 + - 400: Missing or empty name, missing categoryUri, malformed JSON 47 + - 401: Not authenticated 48 + - 403: Missing manageCategories permission 49 + - 404: categoryUri references unknown category 50 + - 500: ForumAgent not configured 51 + - 503: PDS network error 52 + }
+43
bruno/AppView API/Admin/Delete Board.bru
··· 1 + meta { 2 + name: Delete Board 3 + type: http 4 + seq: 15 5 + } 6 + 7 + delete { 8 + url: {{appview_url}}/api/admin/boards/:id 9 + } 10 + 11 + params:path { 12 + id: {{board_id}} 13 + } 14 + 15 + assert { 16 + res.status: eq 200 17 + res.body.success: isTrue 18 + } 19 + 20 + docs { 21 + Delete a forum board. Pre-flight check refuses with 409 if any posts reference 22 + this board. If clear, calls deleteRecord on the Forum DID's PDS. 23 + The firehose indexer removes the DB row asynchronously. 24 + 25 + **Requires:** space.atbb.permission.manageCategories 26 + 27 + Path params: 28 + - id: Board database ID (bigint as string) 29 + 30 + Returns (200): 31 + { 32 + "success": true 33 + } 34 + 35 + Error codes: 36 + - 400: Invalid ID format 37 + - 401: Not authenticated 38 + - 403: Missing manageCategories permission 39 + - 404: Board not found 40 + - 409: Board has posts — remove them first 41 + - 500: ForumAgent not configured 42 + - 503: PDS network error 43 + }
+58
bruno/AppView API/Admin/Update Board.bru
··· 1 + meta { 2 + name: Update Board 3 + type: http 4 + seq: 14 5 + } 6 + 7 + put { 8 + url: {{appview_url}}/api/admin/boards/:id 9 + } 10 + 11 + params:path { 12 + id: {{board_id}} 13 + } 14 + 15 + body:json { 16 + { 17 + "name": "General Chat (renamed)", 18 + "description": "Updated description.", 19 + "sortOrder": 2 20 + } 21 + } 22 + 23 + assert { 24 + res.status: eq 200 25 + res.body.uri: isDefined 26 + res.body.cid: isDefined 27 + } 28 + 29 + docs { 30 + Update an existing forum board's name, description, and sortOrder. 31 + Fetches existing rkey and categoryRef from DB, calls putRecord with updated 32 + fields preserving the original category and createdAt. Category cannot be 33 + changed on edit (no reparenting). 34 + 35 + **Requires:** space.atbb.permission.manageCategories 36 + 37 + Path params: 38 + - id: Board database ID (bigint as string) 39 + 40 + Body: 41 + - name (required): New display name 42 + - description (optional): New description (falls back to existing if omitted) 43 + - sortOrder (optional): New sort position (falls back to existing if omitted) 44 + 45 + Returns (200): 46 + { 47 + "uri": "at://did:plc:.../space.atbb.forum.board/abc123", 48 + "cid": "bafyrei..." 49 + } 50 + 51 + Error codes: 52 + - 400: Missing name, empty name, invalid ID format, malformed JSON 53 + - 401: Not authenticated 54 + - 403: Missing manageCategories permission 55 + - 404: Board not found 56 + - 500: ForumAgent not configured 57 + - 503: PDS network error 58 + }