ReviewsIndexDocumentDeletedPayload reviews.index_document.deleted@1

Generated at from openvibe-contracts v0.34.2 and openvibe-sdk v0.5.0.

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

reviews.index_document.deleted v1 (OpenVibe.Reviews server/reviews/service.js syncEntity, via openvibe-publishing/index-hooks indexEvent). A Search tombstone: the entity was merged into another or deleted (or the gate stopped listing its page), so Search drops it at this revision or older. Only sent for an entity Search was sent before (every entity gets a document when it is created); a split sends the entity's document again. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type: entity, id, revision }, visibility internal, priority important, actor service:reviews.

Fields

FieldTypeRequiredDescriptionConstraints
typeconstyes
  • = "entity"
idstringyes
  • pattern ^ent_[0-9A-HJKMNP-TV-Z]{26}$
revisionintegeryesIndex revision of the tombstone; wins over any document at the same or an older revision.
  • minimum 1
  • maximum 9007199254740991

Examples

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

Valid: merged
{
  "type": "entity",
  "id": "ent_01M38GW372A3PM7110AHHTYM7C",
  "revision": 4
}
Rejected: full-document
{
  "owner": "reviews",
  "type": "entity",
  "id": "ent_01M38GW372A3PM7110AHHTYM7C",
  "revision": 4,
  "deleted": true
}
Rejected: revision-zero
{
  "type": "entity",
  "id": "ent_01M38GW372A3PM7110AHHTYM7C",
  "revision": 0
}
Rejected: slug-id
{
  "type": "entity",
  "id": "portal-two",
  "revision": 4
}

Validate

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