WikiPagePublishedPayload wiki.page.published@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.published.v1.json
wiki.page.published v1 (OpenVibe.Wiki server/wiki/service.js sync, via openvibe-publishing/index-hooks publicationEvent). Emitted when a page became 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 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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
canonical_url | string | yes |
| |
publication_state | const | yes |
| |
indexability | object | yes |
| |
indexability.decision | enum | yes |
| |
indexability.reasons | array of string | yes |
| |
space | string | yes | Space slug. |
|
slug | string | yes | Page slug inside the space. |
|
visibility | enum | yes | Effective visibility (the page's, narrowed by its space's). |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: members
{
"canonical_url": "https://openvibe.wiki/w/crew/roster",
"publication_state": "published",
"indexability": {
"decision": "noindex",
"reasons": [
"members_only"
]
},
"space": "crew",
"slug": "roster",
"visibility": "members"
}Valid: public
{
"canonical_url": "https://openvibe.wiki/w/food/ramen",
"publication_state": "published",
"indexability": {
"decision": "index",
"reasons": []
},
"space": "food",
"slug": "ramen",
"visibility": "public"
}Rejected: no-url
{
"canonical_url": null,
"publication_state": "published",
"indexability": {
"decision": "index",
"reasons": []
},
"space": "food",
"slug": "ramen",
"visibility": "public"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('wiki.page.published@1', value); // { valid, errors: [{ path, message }] }