NewsStoryUnpublishedPayload news.story.unpublished@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.unpublished.v1.json
news.story.unpublished v1 (OpenVibe.News server/domain/publication.js afterChange, via openvibe-publishing/index-hooks publicationEvent). An editor unpublished a published or retracted story (news.story.publish, stories.js unpublish), in the transaction of the change: it leaves the site, feeds and Search. For subscribers other than Search: canonical URL, publication state and Search-shaped indexability, never the text (Search gets the tombstone from news.index_document.deleted). Envelope: subject { type: story, id: sty_…, revision: <published revision> }, visibility 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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
canonical_url | string | null | yes | null: the event carries a tombstone, which has no URL. | |
publication_state | const | yes |
| |
indexability | object | null | yes | The gate's decision for the unpublished story (noindex, not_published), or null when its published revision cannot be read. | |
topic | string | Slug of the story's topic (news_topics); absent when it has none. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: no-decision
{
"canonical_url": null,
"publication_state": "unpublished",
"indexability": null
}Valid: unpublished
{
"canonical_url": null,
"publication_state": "unpublished",
"indexability": {
"decision": "noindex",
"reasons": [
"not_published"
]
},
"topic": "space"
}Rejected: extra-property
{
"canonical_url": null,
"publication_state": "unpublished",
"indexability": null,
"note": "Taken down"
}Rejected: missing-canonical-url
{
"publication_state": "unpublished",
"indexability": null
}Rejected: wrong-state
{
"canonical_url": null,
"publication_state": "retracted",
"indexability": null
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('news.story.unpublished@1', value); // { valid, errors: [{ path, message }] }