InventoryIndexDocumentUpsertedPayload inventory.index_document.upserted@1

Generated at from openvibe-contracts v0.131.0 and openvibe-sdk v0.38.0.

Version
1.0.0
Owner
inventory
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/inventory.index_document.upserted.v1.json

inventory.index_document.upserted v1 (OpenVibe.Inventory server/search-index.js, via openvibe-publishing/search-feed). The OpenVibe.Search document of an item definition page (type definition, /items/<id>): name, description, kind, rarity, issuer and supply. Only published definitions are documents; a draft, one in review or a retired one is a tombstone. Sent in the transaction that published or retired it, and by the sweep (server/search-index.js). The sequencer (inventory_index_revisions) gives an unchanged document its old revision and nothing is sent. Always visibility public and publication_state published; a page its own robots mark noindex stays in Search as a noindex document. Facets: kind, rarity, issuer. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type: definition, id, revision: <document revision> }, visibility internal, actor service:inventory.

Fields

This schema has no named fields.

Examples

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

Valid: definition-noindex
{
  "owner": "inventory",
  "type": "definition",
  "id": "itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 5,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://inventory.openvibe.network/items/itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "title": "Fire Name",
  "summary": "A name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "body": "Fire Name\nA name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "facets": {
    "kind": "live.name_effect",
    "rarity": "rare",
    "issuer": "service:live"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-09T12:00:00.000Z",
  "updated_at": "2026-10-10T08:00:00.000Z",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "owner_decision"
    ]
  }
}
Valid: definition
{
  "owner": "inventory",
  "type": "definition",
  "id": "itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://inventory.openvibe.network/items/itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "title": "Fire Name",
  "summary": "A name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "body": "Fire Name\nA name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "facets": {
    "kind": "live.name_effect",
    "rarity": "rare",
    "issuer": "service:live"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-09T12:00:00.000Z",
  "updated_at": "2026-10-10T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
Rejected: bad-id
{
  "owner": "inventory",
  "type": "definition",
  "id": "fx_fire",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://inventory.openvibe.network/items/itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "title": "Fire Name",
  "summary": "A name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "body": "Fire Name\nA name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "facets": {
    "kind": "live.name_effect",
    "rarity": "rare",
    "issuer": "service:live"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-09T12:00:00.000Z",
  "updated_at": "2026-10-10T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
Rejected: other-owner
{
  "owner": "deals",
  "type": "definition",
  "id": "itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://inventory.openvibe.network/items/itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "title": "Fire Name",
  "summary": "A name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "body": "Fire Name\nA name effect for chat: your name burns. Rare, issued by OpenVibe.Live.",
  "facets": {
    "kind": "live.name_effect",
    "rarity": "rare",
    "issuer": "service:live"
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-09T12:00:00.000Z",
  "updated_at": "2026-10-10T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
Rejected: tombstone-as-upsert
{
  "owner": "inventory",
  "type": "definition",
  "id": "itd_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "revision": 3,
  "deleted": true
}

Validate

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