ReviewsSummary reviews.summary@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/summary.v1.json
reviews.summary@1: the editorial summary of one entity on OpenVibe.Reviews (the review_summaries row the summary routes answer with): its publication state, the published revision, and the flag set when a cited signal left (the published text stays up, flagged, until an editor approves the pending revision). Timestamps are epoch milliseconds; flagged is 0 or 1.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
entity_id | string | yes |
| |
state | enum | yes |
| |
published_revision | integer | null | yes | ||
published_at | integer | null | yes | Epoch milliseconds, or null. | |
revision_published_at | integer | null | yes | Epoch milliseconds, or null. | |
flagged | enum | yes |
| |
flag_reason | string | null | yes | ||
flagged_at | integer | null | yes | Epoch milliseconds, or null. | |
created_at | integer | yes | Epoch milliseconds. | |
updated_at | integer | yes | Epoch milliseconds. |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: published
{
"id": "sum_01JAC6S7T8V9W0X1Y2Z3A4B5C6",
"entity_id": "ent_01JAC1E2N3T4V5W6X7Y8Z9A0B1",
"state": "published",
"published_revision": 2,
"published_at": 1790237700000,
"revision_published_at": 1790243000000,
"flagged": 0,
"flag_reason": null,
"flagged_at": null,
"created_at": 1790237000000,
"updated_at": 1790243000000
}Rejected: flagged-boolean
{
"id": "sum_01JAC6S7T8V9W0X1Y2Z3A4B5C6",
"entity_id": "ent_01JAC1E2N3T4V5W6X7Y8Z9A0B1",
"state": "published",
"published_revision": 2,
"published_at": 1790237700000,
"revision_published_at": 1790243000000,
"flagged": false,
"flag_reason": null,
"flagged_at": null,
"created_at": 1790237000000,
"updated_at": 1790243000000
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('reviews.summary@1', value); // { valid, errors: [{ path, message }] }