CommunityCommentWriteResult community.comment-write-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/comment-write-result.v1.json
community.comment-write-result@1: answers of community.comment.write on OpenVibe.Community. POST …/threads/resolve → { thread, created } (201 when created); GET …/threads/:id?after=&sort=&limit=&parent= → { thread, comments, next_cursor, viewer }; POST …/threads/:id/comments → 201 { comment }; DELETE /api/v1/comments/:commentId → { ok, id }; POST …/:commentId/votes → { comment_id, score, upvotes, downvotes, my_vote }. Refusals are problem+json (thread.locked, auth.required, community.blocked, …).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: thread-page
{
"thread": {
"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"
},
"comments": [
{
"id": 812,
"thread_id": "cth_Ab3dE5gH7jK9mN1pQ3sT5v",
"parent_id": null,
"origin": "user",
"author": {
"subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"username": "alice",
"display_name": "Alice",
"avatar_url": null,
"profile_color": null
},
"anon_name": null,
"display_name": "Alice",
"message": "That ending!",
"deleted": false,
"score": 2,
"upvotes": 2,
"downvotes": 0,
"my_vote": 0,
"reply_count": 0,
"created_at": "2026-09-25T18:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z",
"edited_at": null,
"can_edit": false,
"can_delete": false
}
],
"next_cursor": null,
"viewer": {
"signed_in": true,
"can_comment": true,
"can_vote": true,
"can_moderate": false
}
}Valid: vote
{
"comment_id": 812,
"score": 3,
"upvotes": 3,
"downvotes": 0,
"my_vote": 1
}Rejected: not-ok
{
"ok": false,
"id": 1
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.comment-write-result@1', value); // { valid, errors: [{ path, message }] }