WatchTriggeredPayload watch.watch.triggered@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/events/payloads/watch.watch.triggered.v1.json

watch.watch.triggered v1 (OpenVibe.Watch, plan T18; the dossier's watch.triggered, named with three segments as every event type is here — the repo's event-type pattern requires at least three): a watch's condition fired. OpenVibe.Network turns it into a WATCH_TRIGGERED notification for payload.recipient (mirrors deals.watch.matched). Envelope: subject { type: watch, id: <watch_id> }, visibility internal, priority important, actor service:watch.

Fields

FieldTypeRequiredDescriptionConstraints
watch_idstringyes
  • pattern ^wch_[0-9A-HJKMNP-TV-Z]{26}$
recipientstringyesThe watch owner's user subject id: who is notified.
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
project_idstring | nullyes
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
namestringyes
  • minLength 1
  • maxLength 120
conditionhttps://openvibe.network/contracts/watch/watch.v1.json#/$defs/conditionyes
observationobjectyes
  • no other fields
observation.idstringyes
  • pattern ^wco_[0-9A-HJKMNP-TV-Z]{26}$
observation.observed_atstringyes
  • format date-time
observation.valueanyyesThe value that fired the condition.
observation.previous_valueanyyesThe previous observation's value; null when there was none.
fired_atstringyes
  • format date-time

Examples

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

Valid: price-below
{
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "recipient": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "project_id": null,
  "name": "Steam Deck OLED price",
  "condition": {
    "op": "lt",
    "value": 199,
    "for_sec": null
  },
  "observation": {
    "id": "wco_01JAB2C3D4E5F6G7H8J9K0MNPS",
    "observed_at": "2026-10-05T09:00:00.000Z",
    "value": 189.99,
    "previous_value": 209.99
  },
  "fired_at": "2026-10-05T09:00:01.250Z"
}
Rejected: missing-observation
{
  "watch_id": "wch_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "recipient": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "project_id": null,
  "name": "Steam Deck OLED price",
  "condition": {
    "op": "lt",
    "value": 199,
    "for_sec": null
  },
  "fired_at": "2026-10-05T09:00:01.250Z"
}

Validate

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