NewsClusterManageRequest news.cluster-manage-request@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
news
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/news/cluster-manage-request.v1.json

news.cluster-manage-request@1: bodies of news.cluster.manage on OpenVibe.News (editors). POST /api/v1/clusters/:id/merge { other, reason? } merges cluster other into :id (both open: 404 cluster.not_found, 409 cluster.not_open, 422 cluster.same). POST /api/v1/clusters/:id/split { items, reason? } moves those items into a new cluster (422 cluster.split_empty, cluster.split_foreign, cluster.split_all: at least one item stays). POST /api/v1/clusters/audit/:auditId/reverse { reason? } undoes a merge or split (404 cluster.audit_not_found, 409 cluster.already_reversed, 409 cluster.changed). Every change is audited with exactly which items moved.

Fields

This schema has no named fields.

Examples

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

Valid: merge
{
  "other": "clu_01JAB2X4C4D5E6F7G8H9J0KMNP",
  "reason": "Same bridge closure"
}
Valid: reverse
{
  "reason": "Merged by mistake"
}
Valid: split
{
  "items": [
    "nsi_01JAB2Z8Y6X5W4V3T2S1R0QPNM"
  ],
  "reason": "Different bridge"
}
Rejected: wrong-types
{
  "other": 5,
  "items": "nsi_all",
  "reason": [
    "x"
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('news.cluster-manage-request@1', value);   // { valid, errors: [{ path, message }] }