QuestIndexDocumentUpsertedPayload quest.index_document.upserted@1

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

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

quest.index_document.upserted v1 (OpenVibe.Quest server/search-index.js, via openvibe-publishing/search-feed). The OpenVibe.Search document of a quest page (type quest, /quests/<id>): its name, what to do and where, and the badge (and item) it rewards. Quests are Quest's own catalog (server/quests/catalog.js), so they are sent by the sweep at boot (server/search-index.js); a quest that left the catalog becomes a tombstone. The sequencer (quest_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: service (where the quest is done), badge. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type: quest, id, revision: <document revision> }, visibility internal, actor service:quest.

Fields

This schema has no named fields.

Examples

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

Valid: quest-noindex
{
  "owner": "quest",
  "type": "quest",
  "id": "go-live",
  "revision": 5,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.quest/quests/go-live",
  "title": "Go live once",
  "summary": "Start your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "body": "Go live once\nStart your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "facets": {
    "service": "live",
    "badge": "first-broadcast"
  },
  "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: quest
{
  "owner": "quest",
  "type": "quest",
  "id": "go-live",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.quest/quests/go-live",
  "title": "Go live once",
  "summary": "Start your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "body": "Go live once\nStart your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "facets": {
    "service": "live",
    "badge": "first-broadcast"
  },
  "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": "quest",
  "type": "quest",
  "id": "Go_Live!",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.quest/quests/go-live",
  "title": "Go live once",
  "summary": "Start your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "body": "Go live once\nStart your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "facets": {
    "service": "live",
    "badge": "first-broadcast"
  },
  "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": "quest",
  "id": "go-live",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://openvibe.quest/quests/go-live",
  "title": "Go live once",
  "summary": "Start your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "body": "Go live once\nStart your first stream on OpenVibe.Live and earn the First Broadcast badge.",
  "facets": {
    "service": "live",
    "badge": "first-broadcast"
  },
  "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": "quest",
  "type": "quest",
  "id": "go-live",
  "revision": 3,
  "deleted": true
}

Validate

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