NewsStory news.story@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.v1.json

news.story@1: one story as OpenVibe.News shows it to editors (server/http/api.js storyDto), drafts included: publication state, the head revision (headline and paragraphs that each cite source numbers, authorship), what stands between it and publication, the gate's indexability of the published revision, the working source table (numbered, never renumbered; detached sources stay listed), timeline, perspectives and editorial flags.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^sty_[0-9A-HJKMNP-TV-Z]{26}$
slugstringyes
urlstringyes
stateenumyes
  • one of "draft", "published", "unpublished", "retracted"
cluster_idstring | nullyes
topicstring | nullyesThe topic slug.
working_headlinestringyes
noindexbooleanyes
published_revisioninteger | nullyes
first_published_atstring | nullyes
  • format date-time
published_atstring | nullyes
  • format date-time
retracted_atstring | nullyes
  • format date-time
headobject | nullyes
publishablearray of objectyesWhat stands between the revision and publication (story.unsourced, story.claim_unsourced, story.source_removed, story.source_detached, story.review_required, story.no_headline, …); empty when it can be published.
publishable[].codestringyes
publishable[].detailstringyes
indexabilityobject | nullyes
sourcesarray of objectyes
sources[].nintegeryes
  • minimum 1
sources[].perspective_idstring | nullyes
sources[].detached_atstring | nullyes
  • format date-time
sources[].itemnews.source-itemyes
timelinearray of objectyes
timeline[].idstringyes
  • pattern ^tle_[0-9A-HJKMNP-TV-Z]{26}$
timeline[].occurred_onstringyes
timeline[].textstringyes
timeline[].source_item_idstringyes
perspectivesarray of objectyes
perspectives[].idstringyes
  • pattern ^per_[0-9A-HJKMNP-TV-Z]{26}$
perspectives[].labelstringyes
perspectives[].descriptionstring | nullyes
flagsarray of objectyes
flags[].idstringyes
  • pattern ^flg_[0-9A-HJKMNP-TV-Z]{26}$
flags[].kindenumyes
  • one of "correction", "update", "retraction", "source_updated", "source_removed"
flags[].statusenumyes
  • one of "open", "published", "resolved"
flags[].notestring | nullyes
flags[].source_item_idstring | nullyes
flags[].pending_revisioninteger | nullyes
flags[].revisioninteger | nullyes
flags[].created_bystringyes
flags[].created_atstringyes
  • format date-time
flags[].resolved_atstring | nullyes
  • format date-time

Examples

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

Valid: draft
{
  "id": "sty_01JAB3DEF4GH5JK6MN7PQ8RS9T",
  "slug": "harbour-bridge-closes-for-inspection",
  "url": "https://openvibe.news/s/harbour-bridge-closes-for-inspection",
  "state": "draft",
  "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
  "topic": "local",
  "working_headline": "Harbour bridge closes for inspection",
  "noindex": false,
  "published_revision": null,
  "first_published_at": null,
  "published_at": null,
  "retracted_at": null,
  "head": {
    "revision": 1,
    "headline": "Harbour bridge closes for inspection",
    "paragraphs": [
      {
        "text": "The harbour bridge closed on Tuesday morning after inspectors found cracks in a support.",
        "sources": [
          1
        ]
      },
      {
        "text": "The council expects the inspection to take two weeks.",
        "sources": [
          2
        ]
      }
    ],
    "authorship": {
      "mode": "human",
      "authors": [
        "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
      ]
    },
    "system": null,
    "gaps": null,
    "author": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "created_at": "2026-09-24T09:40:12.000Z"
  },
  "publishable": [],
  "indexability": null,
  "sources": [
    {
      "n": 1,
      "perspective_id": null,
      "detached_at": null,
      "item": {
        "id": "nsi_01JAB2Z7Y6X5W4V3T2S1R0QPNM",
        "sources_item": {
          "service": "sources",
          "type": "item",
          "id": "itm_01JAB2Y8K9M1N2P3Q4R5S6T7VW",
          "revision": 1
        },
        "source_key": "harbour-gazette",
        "headline": "Harbour bridge closes for inspection after cracks found",
        "url": "https://harbourgazette.example/bridge-closure",
        "outlet": "Harbour Gazette",
        "authors": [
          "M. Okafor"
        ],
        "published_at": "2026-09-24T07:30:00+01:00",
        "summary": null,
        "summary_basis": "terms do not allow a stored summary",
        "license_note": null,
        "terms_note": "Headline and link only",
        "status": "active",
        "duplicate_of": null,
        "dedupe": null,
        "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
        "cluster_reason": {
          "rule": "new_cluster",
          "cluster": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
          "terms": [
            "bridge",
            "harbour",
            "inspection"
          ],
          "entities": [
            "Harbour Bridge"
          ]
        },
        "retrieved_at": "2026-09-24T08:15:00.000Z",
        "first_seen_at": "2026-09-24T08:15:00.000Z",
        "upstream_updated_at": null,
        "removed": null
      }
    },
    {
      "n": 2,
      "perspective_id": null,
      "detached_at": null,
      "item": {
        "id": "nsi_01JAB2Z8Y6X5W4V3T2S1R0QPNM",
        "sources_item": {
          "service": "sources",
          "type": "item",
          "id": "itm_01JAB2Y9K9M1N2P3Q4R5S6T7VW",
          "revision": 1
        },
        "source_key": "coastal-wire",
        "headline": "Bridge inspection to take two weeks, council says",
        "url": "https://coastalwire.example/news/bridge-inspection",
        "outlet": "Coastal Wire",
        "authors": [
          "M. Okafor"
        ],
        "published_at": "2026-09-24T07:30:00+01:00",
        "summary": null,
        "summary_basis": "terms do not allow a stored summary",
        "license_note": null,
        "terms_note": "Headline and link only",
        "status": "active",
        "duplicate_of": null,
        "dedupe": null,
        "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
        "cluster_reason": {
          "rule": "shared_terms",
          "cluster": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
          "shared_entities": [
            "Harbour Bridge"
          ],
          "shared_terms": [
            "bridge",
            "inspection"
          ],
          "score": 4,
          "window_hours": 72
        },
        "retrieved_at": "2026-09-24T08:15:00.000Z",
        "first_seen_at": "2026-09-24T08:15:00.000Z",
        "upstream_updated_at": null,
        "removed": null
      }
    }
  ],
  "timeline": [
    {
      "id": "tle_01JAB4T5V6W7X8Y9Z0A1B2C3D4",
      "occurred_on": "2026-09-23",
      "text": "Inspectors report cracks in a bridge support.",
      "source_item_id": "nsi_01JAB2Z7Y6X5W4V3T2S1R0QPNM"
    }
  ],
  "perspectives": [
    {
      "id": "per_01JAB4P5Q6R7S8T9V0W1X2Y3Z4",
      "label": "Council statements",
      "description": null
    }
  ],
  "flags": []
}
Rejected: bad-state
{
  "id": "sty_01JAB3DEF4GH5JK6MN7PQ8RS9T",
  "slug": "harbour-bridge-closes-for-inspection",
  "url": "https://openvibe.news/s/harbour-bridge-closes-for-inspection",
  "state": "archived",
  "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
  "topic": "local",
  "working_headline": "Harbour bridge closes for inspection",
  "noindex": false,
  "published_revision": null,
  "first_published_at": null,
  "published_at": null,
  "retracted_at": null,
  "head": {
    "revision": 1,
    "headline": "Harbour bridge closes for inspection",
    "paragraphs": [
      {
        "text": "The harbour bridge closed on Tuesday morning after inspectors found cracks in a support.",
        "sources": [
          1
        ]
      },
      {
        "text": "The council expects the inspection to take two weeks.",
        "sources": [
          2
        ]
      }
    ],
    "authorship": {
      "mode": "human",
      "authors": [
        "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
      ]
    },
    "system": null,
    "gaps": null,
    "author": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "created_at": "2026-09-24T09:40:12.000Z"
  },
  "publishable": [],
  "indexability": null,
  "sources": [
    {
      "n": 1,
      "perspective_id": null,
      "detached_at": null,
      "item": {
        "id": "nsi_01JAB2Z7Y6X5W4V3T2S1R0QPNM",
        "sources_item": {
          "service": "sources",
          "type": "item",
          "id": "itm_01JAB2Y8K9M1N2P3Q4R5S6T7VW",
          "revision": 1
        },
        "source_key": "harbour-gazette",
        "headline": "Harbour bridge closes for inspection after cracks found",
        "url": "https://harbourgazette.example/bridge-closure",
        "outlet": "Harbour Gazette",
        "authors": [
          "M. Okafor"
        ],
        "published_at": "2026-09-24T07:30:00+01:00",
        "summary": null,
        "summary_basis": "terms do not allow a stored summary",
        "license_note": null,
        "terms_note": "Headline and link only",
        "status": "active",
        "duplicate_of": null,
        "dedupe": null,
        "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
        "cluster_reason": {
          "rule": "new_cluster",
          "cluster": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
          "terms": [
            "bridge",
            "harbour",
            "inspection"
          ],
          "entities": [
            "Harbour Bridge"
          ]
        },
        "retrieved_at": "2026-09-24T08:15:00.000Z",
        "first_seen_at": "2026-09-24T08:15:00.000Z",
        "upstream_updated_at": null,
        "removed": null
      }
    },
    {
      "n": 2,
      "perspective_id": null,
      "detached_at": null,
      "item": {
        "id": "nsi_01JAB2Z8Y6X5W4V3T2S1R0QPNM",
        "sources_item": {
          "service": "sources",
          "type": "item",
          "id": "itm_01JAB2Y9K9M1N2P3Q4R5S6T7VW",
          "revision": 1
        },
        "source_key": "coastal-wire",
        "headline": "Bridge inspection to take two weeks, council says",
        "url": "https://coastalwire.example/news/bridge-inspection",
        "outlet": "Coastal Wire",
        "authors": [
          "M. Okafor"
        ],
        "published_at": "2026-09-24T07:30:00+01:00",
        "summary": null,
        "summary_basis": "terms do not allow a stored summary",
        "license_note": null,
        "terms_note": "Headline and link only",
        "status": "active",
        "duplicate_of": null,
        "dedupe": null,
        "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
        "cluster_reason": {
          "rule": "shared_terms",
          "cluster": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
          "shared_entities": [
            "Harbour Bridge"
          ],
          "shared_terms": [
            "bridge",
            "inspection"
          ],
          "score": 4,
          "window_hours": 72
        },
        "retrieved_at": "2026-09-24T08:15:00.000Z",
        "first_seen_at": "2026-09-24T08:15:00.000Z",
        "upstream_updated_at": null,
        "removed": null
      }
    }
  ],
  "timeline": [
    {
      "id": "tle_01JAB4T5V6W7X8Y9Z0A1B2C3D4",
      "occurred_on": "2026-09-23",
      "text": "Inspectors report cracks in a bridge support.",
      "source_item_id": "nsi_01JAB2Z7Y6X5W4V3T2S1R0QPNM"
    }
  ],
  "perspectives": [
    {
      "id": "per_01JAB4P5Q6R7S8T9V0W1X2Y3Z4",
      "label": "Council statements",
      "description": null
    }
  ],
  "flags": []
}

Validate

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