VipPlanVersion vip.plan-version@1

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

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

vip.plan-version@1: one immutable version of a membership plan on OpenVibe.VIP (server/domain/plans.js presentVersion). An edit always creates version N+1; members keep the version they joined under. terms is the snapshot a member buys (never a price: OpenVibe.Billing prices and charges); perks lists the perks this version includes, by the id, key and name they had when it was written.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^vpv_[0-9A-HJKMNP-TV-Z]{26}$
versionintegeryes
  • minimum 1
namestringyes
  • maxLength 80
descriptionstring | nullyes
  • maxLength 2000
benefitsarray of stringyes
  • maxItems 20
  • items: maxLength 200
perksarray of objectyes
perks[].idstringyes
  • pattern ^vpk_[0-9A-HJKMNP-TV-Z]{26}$
perks[].keystringyes
perks[].namestringyes
termsobjectyes
terms.namestringyes
terms.descriptionstring | nullyes
terms.benefitsarray | nullyes
terms.perksarray of objectyes
terms.perks[].keystringyes
terms.perks[].namestringyes
terms.perks[].kindenumyes
  • one of "badge", "emote", "gated_content", "room", "role", "other"
terms.perks[].scopeenumyes
  • one of "creator", "network"
terms.billing_kindenumyes
  • one of "channel_subscription", null
terms.pricestring | nullyesNever an amount: a note that Billing sets and charges the price, or null.
terms.digeststringyes
  • pattern ^[0-9a-f]{16}$
change_notestring | nullyes
created_atstringyes
  • format date-time
published_atstring | nullyesnull while a draft.
  • format date-time

Examples

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

Valid: published
{
  "id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
  "version": 2,
  "name": "Supporter",
  "description": "Back the stream every month.",
  "benefits": [
    "Supporter badge in chat",
    "Members-only VOD chapters"
  ],
  "perks": [
    {
      "id": "vpk_01JAB2C3D4E5F6G7H8J9K0MNPV",
      "key": "chat-badge",
      "name": "Chat badge"
    }
  ],
  "terms": {
    "name": "Supporter",
    "description": "Back the stream every month.",
    "benefits": [
      "Supporter badge in chat",
      "Members-only VOD chapters"
    ],
    "perks": [
      {
        "key": "chat-badge",
        "name": "Chat badge",
        "kind": "badge",
        "scope": "creator"
      }
    ],
    "billing_kind": "channel_subscription",
    "price": "set and charged by OpenVibe.Billing",
    "digest": "3fa9c0d27e5b8814"
  },
  "change_note": "added VOD chapters",
  "created_at": "2026-09-20T18:04:11.402Z",
  "published_at": "2026-09-20T18:04:11.402Z"
}
Rejected: version-zero
{
  "id": "vpv_01JAB2C3D4E5F6G7H8J9K0MNPT",
  "version": 0,
  "name": "Supporter",
  "description": "Back the stream every month.",
  "benefits": [
    "Supporter badge in chat",
    "Members-only VOD chapters"
  ],
  "perks": [
    {
      "id": "vpk_01JAB2C3D4E5F6G7H8J9K0MNPV",
      "key": "chat-badge",
      "name": "Chat badge"
    }
  ],
  "terms": {
    "name": "Supporter",
    "description": "Back the stream every month.",
    "benefits": [
      "Supporter badge in chat",
      "Members-only VOD chapters"
    ],
    "perks": [
      {
        "key": "chat-badge",
        "name": "Chat badge",
        "kind": "badge",
        "scope": "creator"
      }
    ],
    "billing_kind": "channel_subscription",
    "price": "set and charged by OpenVibe.Billing",
    "digest": "3fa9c0d27e5b8814"
  },
  "change_note": "added VOD chapters",
  "created_at": "2026-09-20T18:04:11.402Z",
  "published_at": "2026-09-20T18:04:11.402Z"
}

Validate

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