EventEnvelope events.event-envelope@1

Generated at from openvibe-contracts v0.33.0 and openvibe-sdk v0.5.0.

Version
1.0.0
Owner
events
Visibility
public
Status
active
Compatibility
backward
Decision
ADR-004
Schema
https://openvibe.network/contracts/events/event-envelope.v1.json

Durable platform event (OpenVibe.Events, Wave 3). Producers write it to an outbox in the same transaction as the domain change.

Fields

FieldTypeRequiredDescriptionConstraints
event_idstringyes
  • pattern ^evt_[0-9A-HJKMNP-TV-Z]{26}$
trace_idstring
  • pattern ^[0-9a-f]{32}$
event_typestringyes
  • pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+){2,}$
versionintegeryes
  • minimum 1
sourcestringyes
  • pattern ^[a-z][a-z0-9-]{1,39}$
actoridentity.subject-refyes
timestampstringyes
  • format date-time
priorityenum
  • one of "critical", "important", "low"
  • default "important"
visibilityenum
  • one of "public", "subject", "internal"
  • default "internal"
subjectobjectyes
  • no other fields
subject.typestringyes
subject.idstringyes
subject.revisioninteger
  • minimum 0
payloadobjectyes

Examples

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

Valid: app-event
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "event_type": "app.p01jab2c3d4e5f6g7h8j9k0mnpq.order.created",
  "version": 1,
  "source": "app-01jab2c3d4e5f6g7h8j9k0mnps",
  "actor": {
    "type": "app",
    "id": "app_01JAB2C3D4E5F6G7H8J9K0MNPS"
  },
  "timestamp": "2026-09-23T12:00:00Z",
  "visibility": "internal",
  "subject": {
    "type": "order",
    "id": "42"
  },
  "payload": {
    "total": 3
  }
}
Valid: vod-ready
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "event_type": "media.vod.ready",
  "version": 1,
  "source": "media",
  "actor": {
    "type": "service",
    "id": "media"
  },
  "timestamp": "2026-09-22T12:00:00Z",
  "priority": "important",
  "visibility": "internal",
  "subject": {
    "type": "vod",
    "id": "1203",
    "revision": 4
  },
  "payload": {
    "duration": 3600
  }
}
Rejected: local-user-actor
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "event_type": "media.vod.ready",
  "version": 1,
  "source": "media",
  "actor": {
    "type": "user",
    "id": "42"
  },
  "timestamp": "2026-09-22T12:00:00Z",
  "subject": {
    "type": "vod",
    "id": "1"
  },
  "payload": {}
}
Rejected: two-part-type
{
  "event_id": "evt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "event_type": "vod.ready",
  "version": 1,
  "source": "media",
  "actor": {
    "type": "service",
    "id": "media"
  },
  "timestamp": "2026-09-22T12:00:00Z",
  "subject": {
    "type": "vod",
    "id": "1"
  },
  "payload": {}
}

Validate

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