CommunityCommentThread community.comment-thread@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/comment-thread.v1.json
community.comment-thread@1: one embeddable comment thread on OpenVibe.Community (server/comments/service.js shapeThread): the entity it belongs to, its visibility and comment count. id is the sequential id for services and the access id (cth_…) for everyone else; a hidden thread shows moderators its count, others only that it is hidden.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | integer | string | yes | ||
access_id | string | yes |
| |
ref | common.entity-ref | yes | ||
visibility | enum | yes |
| |
comment_count | integer | null | yes | ||
created_at | string | null |
| ||
updated_at | string | null |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: vod
{
"id": "cth_Ab3dE5gH7jK9mN1pQ3sT5v",
"access_id": "cth_Ab3dE5gH7jK9mN1pQ3sT5v",
"ref": {
"service": "live",
"type": "vod",
"id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"visibility": "public",
"comment_count": 3,
"created_at": "2026-09-20T10:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z"
}Rejected: bad-visibility
{
"id": "cth_Ab3dE5gH7jK9mN1pQ3sT5v",
"access_id": "cth_Ab3dE5gH7jK9mN1pQ3sT5v",
"ref": {
"service": "live",
"type": "vod",
"id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"visibility": "archived",
"comment_count": 3,
"created_at": "2026-09-20T10:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.comment-thread@1', value); // { valid, errors: [{ path, message }] }