ReviewsCorrection reviews.correction@1

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

Version
1.0.0
Owner
reviews
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/reviews/correction.v1.json

reviews.correction@1: one correction request in the OpenVibe.Reviews editors' queue (the review_corrections row): what a person says is wrong about an entity, alias, signal, summary or aggregate, with an optional evidence URL, and how an editor resolved it. Corrections are read by editors and not published. Timestamps are epoch milliseconds.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^cor_[0-9A-HJKMNP-TV-Z]{26}$
entity_idstringyes
  • pattern ^ent_[0-9A-HJKMNP-TV-Z]{26}$
target_typeenumyes
  • one of "entity", "alias", "signal", "summary", "aggregate"
target_idstring | nullyes
bodystringyes
evidence_urlstring | nullyes
submitted_bystringyes
viastring | nullyesThe service that sent it for the person, if any.
statusenumyes
  • one of "open", "accepted", "rejected"
resolved_bystring | nullyes
resolution_notestring | nullyesStays with the editors.
resolved_atinteger | nullyesEpoch milliseconds, or null.
created_atintegeryesEpoch milliseconds.

Examples

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

Valid: open
{
  "id": "cor_01JAC7C8D9E0F1G2H3J4K5M6N7",
  "entity_id": "ent_01JAC1E2N3T4V5W6X7Y8Z9A0B1",
  "target_type": "aggregate",
  "target_id": null,
  "body": "The rating count looks doubled: Sound Lab lists 159 ratings.",
  "evidence_url": "https://soundlab.example/lumen-x2",
  "submitted_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "via": null,
  "status": "open",
  "resolved_by": null,
  "resolution_note": null,
  "resolved_at": null,
  "created_at": 1790240000000
}
Rejected: bad-target
{
  "id": "cor_01JAC7C8D9E0F1G2H3J4K5M6N7",
  "entity_id": "ent_01JAC1E2N3T4V5W6X7Y8Z9A0B1",
  "target_type": "review",
  "target_id": null,
  "body": "The rating count looks doubled: Sound Lab lists 159 ratings.",
  "evidence_url": "https://soundlab.example/lumen-x2",
  "submitted_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "via": null,
  "status": "open",
  "resolved_by": null,
  "resolution_note": null,
  "resolved_at": null,
  "created_at": 1790240000000
}

Validate

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