NewsStoryRetractedPayload news.story.retracted@1

Generated at from openvibe-contracts v0.34.2 and openvibe-sdk v0.5.0.

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

news.story.retracted v1 (OpenVibe.News server/domain/publication.js afterChange; the envelope is built there, not by index-hooks publicationEvent). An editor retracted a published story (news.story.retract, stories.js retract), in the transaction that stored the published retraction flag: the story stays at its URL with the retraction notice, is noindex, and leaves sitemaps and Search (news.index_document.deleted follows when Search had it). A retracted story stays retracted; unpublishing it later is news.story.unpublished. note is the public retraction notice and flag_id the news_editorial_flags row that holds it. The payload carries no topic. Envelope: subject { type: story, id: sty_…, revision: <published revision> }, visibility public when the gate still lets the story be listed (a retraction is noindex, not hidden), otherwise internal, priority important (the envelope default; News sets none), actor the editor { type: user } (also when a service acts for a signed-in editor), otherwise the calling service.

Fields

FieldTypeRequiredDescriptionConstraints
canonical_urlstringyesWhere the story, with its retraction notice, stays.
  • pattern ^https?://
  • format uri
  • maxLength 2048
publication_stateconstyes
  • = "retracted"
indexabilityobjectyesSearch-shaped gate decision: always noindex, with retracted among the reasons.
  • no other fields
indexability.decisionconstyes
  • = "noindex"
indexability.reasonsarray of stringyes
  • minItems 1
  • maxItems 20
  • unique items
  • items: pattern ^[a-z][a-z0-9_]{1,63}$
notestringyesThe public retraction notice, whitespace collapsed.
  • minLength 10
  • maxLength 2000
flag_idstringyesThe retraction's news_editorial_flags row (kind retraction, status published).
  • pattern ^flg_[0-9A-HJKMNP-TV-Z]{26}$

Examples

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

Valid: retracted-and-unsourced
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "retracted",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "retracted",
      "unsourced"
    ]
  },
  "note": "The launch date we reported was wrong; the mission has not launched.",
  "flag_id": "flg_01K5S2H7K9N1Q3S5V7X9Z1B3D5"
}
Valid: retracted
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-the-launch-in-numbers",
  "publication_state": "retracted",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "retracted"
    ]
  },
  "note": "Our sources described a rehearsal, not the launch.",
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4"
}
Rejected: indexed-retraction
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "retracted",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "note": "Our sources described a rehearsal, not the launch.",
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4"
}
Rejected: missing-flag
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "retracted",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "retracted"
    ]
  },
  "note": "Our sources described a rehearsal, not the launch."
}
Rejected: no-retracted-reason
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "retracted",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "unsourced"
    ]
  },
  "note": "Our sources described a rehearsal, not the launch.",
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4"
}
Rejected: note-too-short
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "retracted",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "retracted"
    ]
  },
  "note": "Wrong.",
  "flag_id": "flg_01K5S2G6J8M0P2R4T6V8X0Z2B4"
}

Validate

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