PlayPlayerAchievements play.player-achievements@1

Generated at from openvibe-contracts v0.177.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
play
Visibility
public
Status
active
Compatibility
backward
Decision
Games ADR-0007
Schema
https://openvibe.network/contracts/play/player-achievements.v1.json

One player's unlocked achievements in a title the caller manages (play.player.read), newest first.

Fields

FieldTypeRequiredDescriptionConstraints
titlestringyes
  • pattern ^[a-z0-9][a-z0-9-]{1,39}$
playerstringyesa person (usr_) or a guest the title names (guest:<opaque>)
  • pattern ^(usr_[0-9A-HJKMNP-TV-Z]{26}|guest:[A-Za-z0-9_-]{8,128})$
achievementsarray of objectyes
  • items: no other fields
achievements[].idstringyes
  • pattern ^[a-z0-9][a-z0-9_-]{0,63}$
achievements[].namestringyes
achievements[].descriptionstring
achievements[].unlocked_atstringyes
  • format date-time

Examples

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

Valid: basic
{
  "title": "salvage-rush",
  "player": "usr_01JABCDEFGHJKMNPQRSTVWXYZ0",
  "achievements": [
    {
      "id": "first-haul",
      "name": "First Haul",
      "description": "Finish a round with scrap.",
      "unlocked_at": "2026-10-14T12:00:00.000Z"
    }
  ]
}
Rejected: basic
{
  "title": "salvage-rush",
  "player": "nobody",
  "achievements": []
}

Validate

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