ReviewsSummaryPublishRequest reviews.summary-publish-request@1

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

Version
1.0.0
Owner
reviews
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/reviews/summary-publish-request.v1.json

reviews.summary-publish-request@1: bodies of reviews.summary.publish on OpenVibe.Reviews, as the editor named in X-OV-Subject (403 reviews.person_required / reviews.editor_required). POST /api/v1/entities/:ref/summary/revisions { overview?, overview_signals?, pros?, cons?, expected_revision?, message?, publish? } writes a revision (unknown and rating-like keys refused: 422 summary.invalid, summary.rating_forbidden; every point cites live signals of the entity; 412 revision.conflict on a stale expected_revision); with correction_note (and optionally the correction_id of a reader's request it answers) it corrects the published summary and is published at once (409 summary.not_published, 422 correction.note_required under 10 characters). POST …/summary/revisions/:n/review { decision, note?, publish? } approves (and by default publishes) or rejects. POST …/summary/publish { revision? } publishes a revision (default the head): refused for a rejected revision (409 summary.rejected), an AI or system-prepared revision no person approved (409 ai_generated_unreviewed, summary.review_required) and a point citing no live signal (409 summary.unsupported_points). POST …/summary/unpublish takes no body (409 summary.not_published).

Fields

This schema has no named fields.

Examples

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

Valid: correction
{
  "correction_note": "The rating count was doubled by an import error and has been fixed.",
  "correction_id": "cor_01JAC7C8D9E0F1G2H3J4K5M6N7"
}
Valid: publish
{
  "revision": 3
}
Valid: review
{
  "decision": "approved",
  "note": "Checked every citation",
  "publish": false
}
Valid: unpublish
{}
Valid: write
{
  "overview": "Well-reviewed for comfort; battery life is the common complaint.",
  "overview_signals": [
    "sig_01JAC2S3G4H5J6K7M8N9P0Q1R2"
  ],
  "pros": [
    {
      "text": "Comfortable over long sessions",
      "signals": [
        "sig_01JAC2S4G4H5J6K7M8N9P0Q1R2"
      ]
    }
  ],
  "expected_revision": 2,
  "publish": true
}
Rejected: mixed-up
{
  "decision": "maybe",
  "revision": "latest",
  "rating": 5
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('reviews.summary-publish-request@1', value);   // { valid, errors: [{ path, message }] }