NewsTimelineUpdateRequest news.timeline-update-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/timeline-update-request.v1.json

news.timeline-update-request@1: bodies of news.timeline.update on OpenVibe.News (editors). POST /api/v1/stories/:id/timeline { occurred_on, text, source } adds a dated entry resting on one attached source (occurredOn is read too): occurred_on is the date the source states (YYYY-MM-DD or an ISO 8601 time; 422 timeline.invalid_date), text at most 500 characters (422 timeline.no_text, timeline.too_long), source a source number or an attached item id (422 timeline.unknown_source, 409 source_item.removed). DELETE /api/v1/stories/:id/timeline/:eid takes no body (404 timeline.not_found).

Fields

This schema has no named fields.

Examples

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

Valid: by-item
{
  "occurred_on": "2026-09-24T07:00:00Z",
  "text": "The bridge closes to traffic.",
  "source": "nsi_01JAB2Z8Y6X5W4V3T2S1R0QPNM"
}
Valid: by-number
{
  "occurred_on": "2026-09-23",
  "text": "Inspectors report cracks in a bridge support.",
  "source": 1
}
Valid: remove
{}
Rejected: bad-date
{
  "occurred_on": "last Tuesday",
  "text": "Inspectors report cracks.",
  "source": 1
}

Validate

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