WikiSpaceUpdatedPayload wiki.space.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.space.updated.v1.json
wiki.space.updated v1 (OpenVibe.Wiki server/wiki/service.js spaceEvent). Emitted when a space is created, renamed, changes visibility or settings, has its roles changed, or is deleted, in the transaction of the change. Envelope: subject { type: space, id: spc_… }, visibility public for a public space that is not deleted, otherwise internal, priority important, actor the person (user) or service.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
slug | string | yes |
| |
name | string | yes |
| |
kind | enum | yes |
| |
visibility | enum | yes |
| |
deleted | boolean | yes | ||
change | enum | yes | What changed. renamed = a new slug. |
|
url | string | yes | Canonical URL of the space. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: created
{
"slug": "food",
"name": "Food",
"kind": "user",
"visibility": "public",
"deleted": false,
"change": "created",
"url": "https://openvibe.wiki/w/food"
}Rejected: unknown-change
{
"slug": "food",
"name": "Food",
"kind": "user",
"visibility": "public",
"deleted": false,
"change": "archived",
"url": "https://openvibe.wiki/w/food"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('wiki.space.updated@1', value); // { valid, errors: [{ path, message }] }