CommunityIndexDocumentDeletedPayload community.index_document.deleted@1

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

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

community.index_document.deleted v1 (OpenVibe.Community; roadmap WS-O task 10). A Search tombstone: Search drops the document at this revision or older. Only sent for a document Search was sent before. Envelope: subject { type, id, revision }, visibility internal, actor service:community.

Fields

FieldTypeRequiredDescriptionConstraints
typeenumyes
  • one of "thread", "paste"
idstringyes
  • pattern ^[A-Za-z0-9_-]{1,80}$
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: paste
{
  "type": "paste",
  "id": "snip-12",
  "revision": 2
}
Rejected: extra-field
{
  "type": "paste",
  "id": "snip-12",
  "revision": 2,
  "reason": "deleted"
}

Validate

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