NetworkLayoutChangedPayload network.layout.changed@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/network.layout.changed.v1.json
network.layout.changed v1 (OpenVibe.Network server/layouts, written into network_event_outbox in the transaction that changes a stored layout). One event per change to one person's ui.layout@1: set active, saved, renamed, deleted, shared, unshared, published to the gallery, unpublished, copied from the gallery, or reset to the default. Envelope: subject { type: user, id } and the layout's revision, actor the person, visibility internal. The payload carries no account data and no layout contents, so an open page can announce a change and refetch with the person's own token.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
surface | string | yes |
| |
device | enum | yes |
| |
layout_id | string | yes |
| |
change | enum | yes |
| |
revision | integer | yes |
| |
sharing | enum |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: activated
{
"surface": "bot.controls",
"device": "phone",
"layout_id": "lay_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"change": "active",
"revision": 3,
"sharing": "private"
}Valid: published
{
"surface": "bot.controls",
"device": "computer",
"layout_id": "lay_01JAB2C3D4E5F6G7H8J9K0MNPR",
"change": "published",
"revision": 7,
"sharing": "gallery"
}Rejected: unknown-change
{
"surface": "bot.controls",
"device": "phone",
"layout_id": "lay_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"change": "applied",
"revision": 3
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('network.layout.changed@1', value); // { valid, errors: [{ path, message }] }