WatchResult watch.watch-result@1

Generated at from openvibe-contracts v0.107.0 and openvibe-sdk v0.26.0.

Version
1.0.0
Owner
watch
Visibility
first-party
Status
planned
Compatibility
backward
Schema
https://openvibe.network/contracts/watch/watch-result.v1.json

watch.watch-result@1: answers of the watch routes on OpenVibe.Watch. GET /api/v1/watches → { watches } and POST /api/v1/watches → 201 { watch } (watch.watch.read, watch.watch.manage); PATCH → { watch }; POST /:id/pause and /:id/resume → { id, status }; DELETE /api/v1/watches/:id → { id, deleted: true }.

Fields

This schema has no named fields.

Examples

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

Valid: paused
{
  "id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "status": "paused"
}
Rejected: not-deleted
{
  "id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "deleted": false
}

Validate

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