VipCreator vip.creator@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/creator.v1.json

vip.creator@1: a creator as OpenVibe.VIP presents it (server/domain/creators.js present): someone who offers memberships, named by their Network subject, or the network itself (id network, no subject; staff manage its plans and perks). The username is a cached handle for the public page; display_name falls back to it (OpenVibe for the network).

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^(vcr_[0-9A-HJKMNP-TV-Z]{26}|network)$
kindenumyes
  • one of "creator", "network"
subjectone ofyesnull for the network.
usernamestring | nullyes
display_namestring | nullyes
biostring | nullyes
statusenumyes
  • one of "active", "suspended"

Examples

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

Valid: creator
{
  "id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "kind": "creator",
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "username": "moosefan",
  "display_name": "Moose Fan",
  "bio": "Late-night builds and chill.",
  "status": "active"
}
Valid: network
{
  "id": "network",
  "kind": "network",
  "subject": null,
  "username": null,
  "display_name": "OpenVibe",
  "bio": null,
  "status": "active"
}
Rejected: integer-id
{
  "id": 42,
  "kind": "creator",
  "subject": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "username": "moosefan",
  "display_name": "Moose Fan",
  "bio": "Late-night builds and chill.",
  "status": "active"
}

Validate

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