EventsSubscription events.subscription@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
events
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/subscription.v1.json

events.subscription@1: one push subscription as OpenVibe.Events shows it to its consumer (server/store.js subscriptionView). The signing secret appears only in the answer that creates it (and in a rotation's). A developer app's subscription also names its project and environment.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^sub_
consumerstringyesThe calling service, or app:app_<ULID>.
topic_patternstringyes
endpointstringyes
enabledbooleanyes
retry_policyobject | nullyes
created_atstringyes
  • format date-time
updated_atstringyes
  • format date-time
project_idstring
envstring
secretstringOnly when the subscription is created: shown once.

Examples

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

Valid: service
{
  "id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "consumer": "live",
  "topic_pattern": "media.vod.*",
  "endpoint": "http://127.0.0.1:3000/internal/media-events",
  "enabled": true,
  "retry_policy": null,
  "created_at": "2026-09-25T18:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z"
}
Rejected: enabled-not-boolean
{
  "id": "sub_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "consumer": "live",
  "topic_pattern": "media.vod.*",
  "endpoint": "http://127.0.0.1:3000/x",
  "enabled": "yes",
  "retry_policy": null,
  "created_at": "2026-09-25T18:00:00.000Z",
  "updated_at": "2026-09-25T18:00:00.000Z"
}

Validate

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