WikiPageUpdatedPayload wiki.page.updated@1

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

Version
1.0.0
Owner
wiki
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/wiki.page.updated.v1.json

wiki.page.updated v1 (OpenVibe.Wiki server/wiki/service.js sync, via openvibe-publishing/index-hooks publicationEvent). Emitted when a published page got a new published revision or visibility, or a review changed what Search holds, 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 public when the document is public and the gate lets it be listed, otherwise internal, priority important, actor the person or service:wiki (scheduled and system changes).

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}$
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: new-revision
{
  "canonical_url": "https://openvibe.wiki/w/food/ramen",
  "publication_state": "published",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "space": "food",
  "slug": "ramen",
  "visibility": "public"
}
Rejected: body-included
{
  "canonical_url": "https://openvibe.wiki/w/food/ramen",
  "publication_state": "published",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "space": "food",
  "slug": "ramen",
  "visibility": "public",
  "body": "Ramen is…"
}

Validate

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