EventsPublishResult events.publish-result@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/publish-result.v1.json
events.publish-result@1: the answer of POST /api/v1/events on OpenVibe.Events (events.event.publish for services, events.app.publish for developer apps). One envelope → { event_id, cursor, duplicate } (a repeat whose stored copy retention removed: { event_id, duplicate: true, pruned: true }, no cursor) (201 when stored, 200 when every event was a repeat); a batch { events: [...] } (at most 100, atomic) → { results } in the same order. Refusals are problem+json: 422 events.invalid_envelope / events.invalid_redaction, 403 events.source_mismatch / events.type_not_allowed / events.actor_mismatch, 413 events.payload_too_large / events.batch_too_large, 429 events.quota_exceeded (apps).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: batch
{
"results": [
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"duplicate": false,
"cursor": "c1.0.ODgyMTM"
},
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPR",
"duplicate": true,
"cursor": "c1.0.NzAwMDE"
}
]
}Valid: one
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"duplicate": false,
"cursor": "c1.0.ODgyMTM"
}Valid: pruned-repeat
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPR",
"duplicate": true,
"pruned": true
}Valid: with-cursor
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"duplicate": false,
"cursor": "c1.e0.MTIzNDU"
}Rejected: empty-cursor
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"duplicate": false,
"cursor": ""
}Rejected: no-cursor
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPR",
"duplicate": false
}Rejected: no-duplicate-flag
{
"event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"cursor": "c1.0.MA"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('events.publish-result@1', value); // { valid, errors: [{ path, message }] }