NewsStoryPublishRequest news.story-publish-request@1

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

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

news.story-publish-request@1: bodies of news.story.publish on OpenVibe.News (editors). POST /api/v1/stories/:id/publish { revision?, correction? } publishes revision N (default the head) with an optional correction or update note readers will see. Refused while anything in the story's publishable list stands: 409 story.review_required (an AI revision no person approved), 409 story.source_removed / story.source_detached, 422 story.unsourced / story.claim_unsourced / story.no_headline (problems in the problem's extra); 422 story.correction_note_required when a source it cited was removed upstream and no note says what changed; 409 story.retracted; 404 revision.not_found. POST /api/v1/stories/:id/unpublish takes no body.

Fields

This schema has no named fields.

Examples

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

Valid: publish
{
  "revision": 2,
  "correction": {
    "kind": "update",
    "note": "Adds the council estimate of two weeks."
  }
}
Valid: unpublish
{}
Rejected: bad-correction-kind
{
  "correction": {
    "kind": "retraction",
    "note": "Wrong."
  }
}

Validate

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