NewsClusterAudit news.cluster-audit@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-audit.v1.json

news.cluster-audit@1: one audited cluster change on OpenVibe.News (server/domain/clusters.js shapeAudit): a merge, a split or the reversal of one, with exactly which source items moved, who did it and why. Merge: cluster_id survived and other_id was absorbed; split: other_id is the new cluster.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^cla_[0-9A-HJKMNP-TV-Z]{26}$
actionenumyes
  • one of "merge", "split", "reverse_merge", "reverse_split"
cluster_idstringyes
other_idstringyes
item_idsarray of stringyes
reasonstring | nullyes
actorstringyesThe editor (usr_…) or the service that acted.
reversesstring | nullyesThe audit entry this one reverses.
reversed_bystring | nullyesThe audit entry that reversed this one.
atstringyes
  • format date-time

Examples

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

Valid: merge
{
  "id": "cla_01JAB4A5B6C7D8E9F0G1H2J3KM",
  "action": "merge",
  "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
  "other_id": "clu_01JAB2X4C4D5E6F7G8H9J0KMNP",
  "item_ids": [
    "nsi_01JAB2Z8Y6X5W4V3T2S1R0QPNM"
  ],
  "reason": "Same bridge closure",
  "actor": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "reverses": null,
  "reversed_by": null,
  "at": "2026-09-24T09:40:12.000Z"
}
Rejected: bad-action
{
  "id": "cla_01JAB4A5B6C7D8E9F0G1H2J3KM",
  "action": "rename",
  "cluster_id": "clu_01JAB2X3C4D5E6F7G8H9J0KMNP",
  "other_id": "clu_01JAB2X4C4D5E6F7G8H9J0KMNP",
  "item_ids": [
    "nsi_01JAB2Z8Y6X5W4V3T2S1R0QPNM"
  ],
  "reason": "Same bridge closure",
  "actor": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "reverses": null,
  "reversed_by": null,
  "at": "2026-09-24T09:40:12.000Z"
}

Validate

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