NewsPerspectiveUpdateResult news.perspective-update-result@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/perspective-update-result.v1.json
news.perspective-update-result@1: answers of news.perspective.update on OpenVibe.News. POST /api/v1/stories/:id/perspectives → 201 { perspective } (the stored row; timestamps in epoch milliseconds). DELETE /api/v1/stories/:id/perspectives/:pid → { removed: true } (its sources are left without a perspective). PUT /api/v1/stories/:id/sources/:item/perspective → { n, perspective_id }.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: added
{
"perspective": {
"id": "per_01JAB4P5Q6R7S8T9V0W1X2Y3Z4",
"story_id": "sty_01JAB3DEF4GH5JK6MN7PQ8RS9T",
"label": "Council statements",
"description": "What the council has said",
"position": 0,
"created_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"created_at": 1790237700000,
"updated_at": 1790237700000,
"removed_at": null
}
}Valid: assigned
{
"n": 2,
"perspective_id": "per_01JAB4P5Q6R7S8T9V0W1X2Y3Z4"
}Valid: removed
{
"removed": true
}Rejected: bad-perspective-id
{
"n": 2,
"perspective_id": "council"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('news.perspective-update-result@1', value); // { valid, errors: [{ path, message }] }