CommunityThreadReadResult community.thread-read-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
community
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/community/thread-read-result.v1.json

community.thread-read-result@1: answers of community.thread.read on OpenVibe.Community. GET /api/v1/spaces/:space/threads?sort=&page=&limit=&category=&status= → a page of threads with the space, paging, categories, children and what the viewer may do; GET /api/v1/spaces/:space/threads/:slug?page= → the thread with a page of posts (reactions, author stats, crosspost info, attachments settings, paging, viewer). GET /s/:space and /s/:space/t/:slug are the same as HTML pages; GET /s/feed.xml and /s/:space/feed.xml are RSS feeds of public threads.

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: rss
"<?xml version=\"1.0\"?><rss version=\"2.0\"></rss>"
Valid: thread
{
  "space": {
    "slug": "streaming",
    "name": "Streaming",
    "description": "Encoders, bitrates and restreams.",
    "visibility": "public",
    "url": "/s/streaming",
    "thread_kind": "discussion",
    "statuses": [],
    "style": "feed",
    "votes": true,
    "reactions": true,
    "group": {
      "slug": "make",
      "name": "Make things"
    },
    "parent": null,
    "members_only": null,
    "thread_count": 42,
    "last_activity_at": "2026-09-25T18:00:00.000Z"
  },
  "thread": {
    "id": 311,
    "space": "streaming",
    "slug": "restreaming-to-three-platforms",
    "title": "Restreaming to three platforms at once",
    "url": "/s/streaming/t/restreaming-to-three-platforms",
    "kind": "discussion",
    "status": null,
    "category": {
      "slug": "help",
      "name": "Help",
      "description": null,
      "position": 1
    },
    "members_only": null,
    "author": {
      "subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "username": "alice",
      "display_name": "Alice",
      "avatar_url": null,
      "profile_color": "#3b82f6"
    },
    "origin": "user",
    "pinned": false,
    "locked": false,
    "score": 0,
    "reply_count": 0,
    "views": 0,
    "pages": 1,
    "last_post": null,
    "crosspost_of": null,
    "last_activity_at": "2026-09-25T18:00:00.000Z",
    "created_at": "2026-09-25T18:00:00.000Z",
    "my_vote": 0
  },
  "posts": [
    {
      "attachments": [],
      "pastes": [
        {
          "slug": "k3JfQ2",
          "title": "ffmpeg restream flags",
          "language": "text",
          "type": "paste",
          "url": "/p/k3JfQ2",
          "screenshot_url": null,
          "lines": 1,
          "excerpt": "ffmpeg -re -i in.flv -c copy -f flv rtmp://example/live"
        }
      ],
      "id": 5120,
      "thread_id": 311,
      "is_opening": true,
      "origin": "user",
      "author": {
        "subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
        "username": "alice",
        "display_name": "Alice",
        "avatar_url": null,
        "profile_color": "#3b82f6"
      },
      "body_markdown": "What bitrates do you use?",
      "body_html": "<p>What bitrates do you use?</p>",
      "revision": 1,
      "deleted": false,
      "created_at": "2026-09-25T18:00:00.000Z",
      "updated_at": "2026-09-25T18:00:00.000Z",
      "can_edit": true
    }
  ],
  "reactions": [],
  "crosspost": {
    "from": null,
    "to": [],
    "targets": []
  },
  "categories": [],
  "attachments": {
    "enabled": true,
    "max": 4,
    "max_bytes": 8388608
  },
  "page": 1,
  "per_page": 20,
  "pages": 1,
  "total": 1,
  "viewer": {
    "signed_in": true
  }
}
Valid: threads
{
  "space": {
    "slug": "streaming",
    "name": "Streaming",
    "description": "Encoders, bitrates and restreams.",
    "visibility": "public",
    "url": "/s/streaming",
    "thread_kind": "discussion",
    "statuses": [],
    "style": "feed",
    "votes": true,
    "reactions": true,
    "group": {
      "slug": "make",
      "name": "Make things"
    },
    "parent": null,
    "members_only": null,
    "thread_count": 42,
    "last_activity_at": "2026-09-25T18:00:00.000Z"
  },
  "sort": "hot",
  "page": 1,
  "per_page": 25,
  "total": 1,
  "pages": 1,
  "categories": [],
  "category": null,
  "status": null,
  "viewer": {
    "can_start": true,
    "can_moderate": false,
    "signed_in": true
  },
  "children": [],
  "threads": [
    {
      "id": 311,
      "space": "streaming",
      "slug": "restreaming-to-three-platforms",
      "title": "Restreaming to three platforms at once",
      "url": "/s/streaming/t/restreaming-to-three-platforms",
      "kind": "discussion",
      "status": null,
      "category": {
        "slug": "help",
        "name": "Help",
        "description": null,
        "position": 1
      },
      "members_only": null,
      "author": {
        "subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
        "username": "alice",
        "display_name": "Alice",
        "avatar_url": null,
        "profile_color": "#3b82f6"
      },
      "origin": "user",
      "pinned": false,
      "locked": false,
      "score": 0,
      "reply_count": 0,
      "views": 0,
      "pages": 1,
      "last_post": null,
      "crosspost_of": null,
      "last_activity_at": "2026-09-25T18:00:00.000Z",
      "created_at": "2026-09-25T18:00:00.000Z",
      "my_vote": 0
    }
  ]
}
Rejected: page-zero
{
  "space": {},
  "threads": [],
  "page": 0,
  "pages": 1,
  "total": 0
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('community.thread-read-result@1', value);   // { valid, errors: [{ path, message }] }