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

news.story.updated v1 (OpenVibe.News server/domain/publication.js afterChange, via openvibe-publishing/index-hooks publicationEvent). A published story now shows a different published revision (an editor published another revision, news.story.publish, stories.js publish) or its canonical URL changed, in the transaction of the change. Republishing the same revision with a correction note, and topic or noindex changes, emit no product event (only news.index_document.* when Search's copy changes). For subscribers other than Search: canonical URL, publication state and Search-shaped indexability, never the text (Search gets that from news.index_document.*). Envelope: subject { type: story, id: sty_…, revision: <published revision> }, visibility public when the gate lets the story be listed, 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_urlstringyes
  • pattern ^https?://
  • format uri
  • maxLength 2048
publication_stateconstyes
  • = "published"
indexabilityobjectyes
  • no other fields
indexability.decisionenumyes
  • one of "index", "noindex"
indexability.reasonsarray of stringyes
  • maxItems 20
  • unique items
  • items: pattern ^[a-z][a-z0-9_]{1,63}$
topicstringSlug of the story's topic (news_topics); absent when it has none.
  • minLength 1
  • maxLength 60

Examples

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

Valid: republished
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "published",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "topic": "space"
}
Valid: unsupported-claims
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "published",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "unsupported_claims"
    ]
  }
}
Rejected: bad-reason
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "published",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "Not Sourced"
    ]
  }
}
Rejected: missing-indexability
{
  "canonical_url": "https://openvibe.news/stories/europa-clipper-launches-for-jupiter",
  "publication_state": "published",
  "topic": "space"
}

Validate

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