WikiPageUnpublishedPayload wiki.page.unpublished@1

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

Version
1.0.0
Owner
wiki
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/wiki.page.unpublished.v1.json

wiki.page.unpublished v1 (OpenVibe.Wiki server/wiki/service.js sync, via openvibe-publishing/index-hooks publicationEvent). Emitted when a published page stopped being published, in the transaction of the change. For subscribers other than Search: canonical URL, publication state and Search-shaped indexability, never the body (Search gets that from wiki.index_document.*). Envelope: subject { type: page, id: pg_…, revision: <published revision, 0 if none> }, visibility internal, priority important, actor the person or service:wiki (scheduled and system changes).

Fields

FieldTypeRequiredDescriptionConstraints
canonical_urlstring | nullyesnull: the event carries a tombstone, which has no URL.
publication_stateconstyes
  • = "unpublished"
indexabilityobject | nullyesThe last gate decision, or null when there is none.
spacestringyesSpace slug.
  • pattern ^[a-z0-9][a-z0-9-]{1,62}$
slugstringyesPage slug inside the space.
  • minLength 1
  • maxLength 80
visibilityenumyesEffective visibility (the page's, narrowed by its space's).
  • one of "public", "members", "private"

Examples

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

Valid: tombstone
{
  "canonical_url": null,
  "publication_state": "unpublished",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "space": "food",
  "slug": "ramen",
  "visibility": "public"
}
Rejected: wrong-state
{
  "canonical_url": null,
  "publication_state": "published",
  "indexability": null,
  "space": "food",
  "slug": "ramen",
  "visibility": "public"
}

Validate

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