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

FieldTypeRequiredDescriptionConstraints
slugstringyes
  • pattern ^[a-z0-9][a-z0-9-]{1,62}$
namestringyes
  • minLength 1
  • maxLength 200
kindenumyes
  • one of "official", "user"
visibilityenumyes
  • one of "public", "members", "private"
deletedbooleanyes
changeenumyesWhat changed. renamed = a new slug.
  • one of "created", "renamed", "visibility", "settings", "roles", "deleted"
urlstringyesCanonical URL of the space.
  • pattern ^https?://
  • format uri
  • maxLength 2048

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 }] }