EventsSubscriptionResult events.subscription-result@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-result.v1.json

events.subscription-result@1: answers of the subscription routes on OpenVibe.Events. POST /api/v1/subscriptions → 201 events.subscription@1 with its secret (shown once); GET /api/v1/subscriptions → { subscriptions } (the caller's own, no secrets); GET /api/v1/subscriptions/:id and POST …/disable|enable → events.subscription@1. Another consumer's subscription 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: created
{
  "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",
  "secret": "whsec_4f1c0b8e2a9d7c6b5a4f3e2d1c0b9a8f7e6d5c4b3a2f1e0d9c8b7a6f5e4d3c2b"
}
Valid: list
{
  "subscriptions": [
    {
      "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: partial
{
  "subscriptions": [
    {
      "id": "sub_1"
    }
  ]
}

Validate

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