NetworkLevelBoard network.level-board@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
network
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/network/level-board.v1.json

NetworkLevelBoard: one earned platform level owned by Network; experience is never bought or spent.

Fields

FieldTypeRequiredDescriptionConstraints
all_timeobjectyes
  • no other fields
all_time.toparray of objectyes
  • maxItems 50
  • items: no other fields
all_time.top[].subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
all_time.top[].usernamestringyes
all_time.top[].levelintegeryes
  • minimum 0
  • maximum 1000000000000
all_time.top[].xpintegeryes
  • minimum 0
  • maximum 1000000000000
all_time.top[].rankintegeryes
  • minimum 0
  • maximum 1000000000000
all_time.meone ofyes
all_time.aroundarray of objectyes
  • maxItems 11
  • items: no other fields
all_time.around[].subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
all_time.around[].usernamestringyes
all_time.around[].levelintegeryes
  • minimum 0
  • maximum 1000000000000
all_time.around[].xpintegeryes
  • minimum 0
  • maximum 1000000000000
all_time.around[].rankintegeryes
  • minimum 0
  • maximum 1000000000000
weekobjectyes
  • no other fields
week.toparray of objectyes
  • maxItems 50
  • items: no other fields
week.top[].subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
week.top[].usernamestringyes
week.top[].levelintegeryes
  • minimum 0
  • maximum 1000000000000
week.top[].xpintegeryes
  • minimum 0
  • maximum 1000000000000
week.top[].rankintegeryes
  • minimum 0
  • maximum 1000000000000
week.meone ofyes
week.aroundarray of objectyes
  • maxItems 11
  • items: no other fields
week.around[].subjectstringyes
  • pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$
week.around[].usernamestringyes
week.around[].levelintegeryes
  • minimum 0
  • maximum 1000000000000
week.around[].xpintegeryes
  • minimum 0
  • maximum 1000000000000
week.around[].rankintegeryes
  • minimum 0
  • maximum 1000000000000

Examples

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

Valid: example
{
  "all_time": {
    "top": [],
    "me": null,
    "around": []
  },
  "week": {
    "top": [],
    "me": null,
    "around": []
  }
}
Rejected: example
{}

Validate

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