DealsWatchResult deals.watch-result@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- deals
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/deals/watch-result.v1.json
deals.watch-result@1: answers of the watch routes on OpenVibe.Deals: GET /api/v1/watches → { watches } (the acting person's; deals.watch.read); POST /api/v1/watches → 201 { watch } (deals.watch.create); DELETE /api/v1/watches/:id → { id, deleted: true } (deals.watch.delete; someone else's watch is 404).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: deleted
{
"id": "dwt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"deleted": true
}Rejected: bad-kind
{
"watches": [
{
"id": "w",
"kind": "alert",
"notify": true,
"created_at": null
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('deals.watch-result@1', value); // { valid, errors: [{ path, message }] }