---
title: "inventory.definition@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/inventory.definition"
updated: null
---

# inventory.definition@1 · OpenVibe.Services

HTML: [inventory.definition@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/inventory.definition)

# InventoryDefinition `inventory.definition@1`

Generated at 2026-12-01 05:42:00 UTC from [`openvibe-contracts v0.454.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.454.0) and [`openvibe-sdk v0.193.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.193.0).

- Version: 1.0.0
- Owner: inventory
- Visibility: public
- Status: active
- Compatibility: backward
- Decision: [ADR-054](/docs/adr/ADR-054)
- Schema: [`https://openvibe.network/contracts/inventory/definition.v1.json`](/docs/contracts/inventory.definition.json)

An item definition (ADR-054 §2): one item of a kind, issued by a service, an app or a creator, with an honest rarity, attributes valid against the kind and an optional supply cap. Published definitions can be granted; retired ones cannot, and their instances stay.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `id` | string | yes |  | - `pattern ^itd_[0-9A-HJKMNP-TV-Z]{26}$` |
| `kind` | string | yes |  | - `pattern ^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$`<br>- `maxLength 64` |
| `name` | string | yes |  | - `minLength 1`<br>- `maxLength 80` |
| `description` | string |  |  | - `maxLength 500` |
| `art` | object | yes |  | - `no other fields` |
| `art.media_id` | string |  | An OpenVibe.Media object (an image, an animation). | - `pattern ^med_[0-9A-HJKMNP-TV-Z]{26}$` |
| `art.token` | string |  | A token the kind's renderers know (a CSS class, a speech preset). | - `minLength 1`<br>- `maxLength 80` |
| `art.emoji` | string |  |  | - `maxLength 16` |
| `rarity` | enum | yes | Shown as is; any odds that apply are shown with it, never hidden. | - `one of "common", "uncommon", "rare", "epic", "legendary"` |
| `attributes` | object | yes |  |  |
| `issuer` | string | yes |  | - `pattern ^(service:[a-z][a-z0-9-]*\|app:app_[0-9A-HJKMNP-TV-Z]{26}\|user:usr_[0-9A-HJKMNP-TV-Z]{26})$` |
| `aliases` | array of string |  | Earlier ids of the same item (Live's fx\_rainbow, hat\_crown, …). | - `maxItems 8`<br>- `unique items`<br>- `items: pattern ^[a-z0-9][a-z0-9_.-]{0,63}$` |
| `supply` | object | yes |  | - `no other fields` |
| `supply.cap` | integer \| null | yes | null: unlimited. | - `minimum 1` |
| `supply.issued` | integer | yes |  | - `minimum 0` |
| `status` | enum | yes |  | - `one of "draft", "in_review", "published", "retired"` |
| `credit` | object |  | The creator of a community item (ADR-054 §6). | - `no other fields` |
| `credit.subject` | string |  |  | - `pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$` |
| `credit.name` | string |  |  | - `maxLength 80` |
| `created_at` | string | yes |  | - `format date-time` |
| `updated_at` | string | yes |  | - `format date-time` |
| `published_at` | string |  |  | - `format date-time` |
| `grantors` | array of string |  | Other services or apps the issuer lets grant this one item (ADR-054 §3): Quest giving Live's hats as quest rewards. They grant only (origin earned or granted, idempotent per key); defining, editing, consuming and revoking stay the issuer's. | - `maxItems 8`<br>- `unique items`<br>- `items: pattern ^(service:[a-z][a-z0-9-]*\|app:app_[0-9A-HJKMNP-TV-Z]{26})$` |

## Examples

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

 Valid: community-capped

~~~~
{
  "id": "itd_01JZ00000000000000000001T2",
  "kind": "network.profile_frame",
  "name": "Aurora frame",
  "description": "Rainbow cycling colors",
  "art": {
    "media_id": "med_01JZ0000000000000000000MED"
  },
  "rarity": "rare",
  "attributes": {},
  "issuer": "user:usr_01JZ0000000000000000000AAA",
  "aliases": [],
  "supply": {
    "cap": 500,
    "issued": 12
  },
  "status": "published",
  "created_at": "2026-10-09T03:00:00Z",
  "updated_at": "2026-10-09T03:00:00Z",
  "published_at": "2026-10-09T03:00:00Z",
  "credit": {
    "subject": "usr_01JZ0000000000000000000AAA",
    "name": "aurora_artist"
  }
}
~~~~

Valid: live-name-effect

~~~~
{
  "id": "itd_01JZ00000000000000000001TD",
  "kind": "live.name_effect",
  "name": "Rainbow Name",
  "description": "Rainbow cycling colors",
  "art": {
    "token": "name-fx-rainbow",
    "emoji": "🌈"
  },
  "rarity": "common",
  "attributes": {
    "css_class": "name-fx-rainbow"
  },
  "issuer": "service:live",
  "aliases": [
    "fx_rainbow"
  ],
  "supply": {
    "cap": null,
    "issued": 4
  },
  "status": "published",
  "created_at": "2026-10-09T03:00:00Z",
  "updated_at": "2026-10-09T03:00:00Z",
  "published_at": "2026-10-09T03:00:00Z"
}
~~~~

Rejected: bad-issuer

~~~~
{
  "id": "itd_01JZ00000000000000000001TD",
  "kind": "live.name_effect",
  "name": "Rainbow Name",
  "description": "Rainbow cycling colors",
  "art": {
    "token": "name-fx-rainbow",
    "emoji": "🌈"
  },
  "rarity": "common",
  "attributes": {
    "css_class": "name-fx-rainbow"
  },
  "issuer": "live",
  "aliases": [
    "fx_rainbow"
  ],
  "supply": {
    "cap": null,
    "issued": 4
  },
  "status": "published",
  "created_at": "2026-10-09T03:00:00Z",
  "updated_at": "2026-10-09T03:00:00Z",
  "published_at": "2026-10-09T03:00:00Z"
}
~~~~

Rejected: bad-rarity

~~~~
{
  "id": "itd_01JZ00000000000000000001TD",
  "kind": "live.name_effect",
  "name": "Rainbow Name",
  "description": "Rainbow cycling colors",
  "art": {
    "token": "name-fx-rainbow",
    "emoji": "🌈"
  },
  "rarity": "mythic",
  "attributes": {
    "css_class": "name-fx-rainbow"
  },
  "issuer": "service:live",
  "aliases": [
    "fx_rainbow"
  ],
  "supply": {
    "cap": null,
    "issued": 4
  },
  "status": "published",
  "created_at": "2026-10-09T03:00:00Z",
  "updated_at": "2026-10-09T03:00:00Z",
  "published_at": "2026-10-09T03:00:00Z"
}
~~~~

Rejected: no-art

~~~~
{
  "id": "itd_01JZ00000000000000000001TD",
  "kind": "live.name_effect",
  "name": "Rainbow Name",
  "description": "Rainbow cycling colors",
  "art": {},
  "rarity": "common",
  "attributes": {
    "css_class": "name-fx-rainbow"
  },
  "issuer": "service:live",
  "aliases": [
    "fx_rainbow"
  ],
  "supply": {
    "cap": null,
    "issued": 4
  },
  "status": "published",
  "created_at": "2026-10-09T03:00:00Z",
  "updated_at": "2026-10-09T03:00:00Z",
  "published_at": "2026-10-09T03:00:00Z"
}
~~~~

## Validate

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