WikiWatchTriggeredPayload wiki.watch.triggered@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.watch.triggered.v1.json

wiki.watch.triggered v1 (OpenVibe.Wiki server/wiki/service.js notifyWatchers). One event per change to a watched page, listing the watchers who may read the page (never the actor); not emitted when nobody is left. Envelope: subject { type: page, id: pg_…, revision: <revision or 0> }, visibility internal, priority important, actor the person or service.

Fields

FieldTypeRequiredDescriptionConstraints
actionenumyesrevised = a new draft revision; proposed = an AI proposal awaits approval; the rest follow wiki.page.*.
  • one of "published", "updated", "unpublished", "deleted", "revised", "proposed"
spacestringyesSpace slug.
  • pattern ^[a-z0-9][a-z0-9-]{1,62}$
slugstringyesPage slug.
  • minLength 1
  • maxLength 80
titlestringyes
  • maxLength 200
revisioninteger | nullyes
  • minimum 1
urlstringyes
  • pattern ^https?://
  • format uri
  • maxLength 2048
recipientsarray of stringyesWatchers to notify.
  • minItems 1
  • unique items
  • items: pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$

Examples

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

Valid: published
{
  "action": "published",
  "space": "food",
  "slug": "ramen",
  "title": "Ramen",
  "revision": 2,
  "url": "https://openvibe.wiki/w/food/ramen",
  "recipients": [
    "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  ]
}
Rejected: no-recipients
{
  "action": "revised",
  "space": "food",
  "slug": "ramen",
  "title": "Ramen",
  "revision": 3,
  "url": "https://openvibe.wiki/w/food/ramen",
  "recipients": []
}

Validate

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