EventsReadRequest events.read-request@1

Generated at from openvibe-contracts v0.454.0 and openvibe-sdk v0.193.0.

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

events.read-request@1: request bodies of the pull API on OpenVibe.Events (events.event.read, events.app.read). PUT /api/v1/checkpoints: { topic, cursor, carrier? } stores the calling consumer's opaque cursor for a topic pattern (an app's patterns must start with a literal segment and app.* must name its own project_key). GET /api/v1/events?topic=&after=&limit=, GET /api/v1/events/:event_id, GET /api/v1/checkpoints?topic= and GET /realtime/stream?topics= take no body. A position is only ever an opaque cursor (ADR-042 decision 7): after_seq is refused (400) and a numeric checkpoint cursor is refused.

Fields

This schema has no named fields.

Examples

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

Valid: checkpoint
{
  "topic": "media.vod.*",
  "cursor": "c1.0.ODgyMTM",
  "carrier": "pg-v1"
}
Valid: get
{}
Rejected: bad-pattern
{
  "topic": "media..vod",
  "cursor": -1
}
Rejected: numeric-cursor
{
  "topic": "media.vod.*",
  "cursor": 88213
}

Validate

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