CommunityPasteWriteResult community.paste-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/paste-write-result.v1.json
community.paste-write-result@1: answers of the community.paste.write routes on OpenVibe.Community. PUT /api/pastes/:slug → { paste }; DELETE → { success: true }; POST …/fork → 201 { id, slug, url, paste } (the new paste); POST …/like → { liked, likes } (a toggle); POST …/copy → { copies }; POST …/comments → 201 { comment }; DELETE …/comments/:id → { message }. Refusals are { error } with 400/401/403/404/429.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: comment
{
"comment": {
"id": 93,
"paste_id": 4412,
"user_id": null,
"author_subject": null,
"parent_id": null,
"anon_name": "Anonymous",
"message": "nice",
"is_deleted": 0,
"created_at": "2026-09-25 18:05:00",
"updated_at": null,
"username": null,
"display_name": null,
"avatar_url": null,
"profile_color": null
}
}Valid: like
{
"liked": true,
"likes": 6
}Valid: updated
{
"paste": {
"unique_views": 12,
"id": 4412,
"app_id": "community",
"slug": "k3JfQ2",
"user_id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"origin": "user",
"type": "paste",
"title": "ffmpeg restream flags",
"content": "ffmpeg -re -i in.flv -c copy -f flv rtmp://example/live",
"language": "text",
"visibility": "public",
"stream_id": 812,
"stream_ref": {
"service": "live",
"type": "stream",
"id": "812"
},
"screenshot_url": null,
"metadata": null,
"burn_after_read": false,
"forked_from": null,
"pinned": false,
"views": 30,
"copies": 2,
"likes": 5,
"is_nsfw": false,
"ai_summary": null,
"ai_tags": null,
"ai_analyzed_at": null,
"revision": 1,
"url": "/p/k3JfQ2",
"raw_url": "/p/k3JfQ2/raw",
"created_at": "2026-09-25 18:02:11",
"updated_at": "2026-09-25 18:02:11",
"is_owner": true,
"username": "alice",
"display_name": "Alice",
"avatar_url": "https://openvibe.media/avatar/alice",
"profile_color": "#3b82f6"
}
}Rejected: bad-like
{
"liked": "yes"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.paste-write-result@1', value); // { valid, errors: [{ path, message }] }