VipPerkResult vip.perk-result@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/perk-result.v1.json

vip.perk-result@1: the answer of vip.perk.create and vip.perk.update on OpenVibe.VIP. POST /api/v1/perks (201) and PATCH /api/v1/perks/:id → { perk } with its active bindings.

Fields

FieldTypeRequiredDescriptionConstraints
perkvip.perkyes

Examples

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

Valid: perk
{
  "perk": {
    "id": "vpk_01JAB2C3D4E5F6G7H8J9K0MNPV",
    "key": "chat-badge",
    "name": "Chat badge",
    "description": "A supporter badge next to your name in chat.",
    "kind": "badge",
    "status": "active",
    "scope": "creator",
    "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "bindings": [
      {
        "product": "chat",
        "binding": "chat_badge",
        "config": {
          "icon": "star"
        }
      },
      {
        "product": "live",
        "binding": "chat_badge",
        "config": {}
      }
    ],
    "updated_at": "2026-09-20T18:04:11.402Z"
  }
}
Rejected: list
{
  "perk": [
    {
      "id": "vpk_01JAB2C3D4E5F6G7H8J9K0MNPV",
      "key": "chat-badge",
      "name": "Chat badge",
      "description": "A supporter badge next to your name in chat.",
      "kind": "badge",
      "status": "active",
      "scope": "creator",
      "creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "bindings": [
        {
          "product": "chat",
          "binding": "chat_badge",
          "config": {
            "icon": "star"
          }
        },
        {
          "product": "live",
          "binding": "chat_badge",
          "config": {}
        }
      ],
      "updated_at": "2026-09-20T18:04:11.402Z"
    }
  ]
}

Validate

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