LiveIndexDocumentDeletedPayload live.index_document.deleted@1

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

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

live.index_document.deleted v1 (OpenVibe.Live server/events/search-documents.js; 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:live.

Fields

FieldTypeRequiredDescriptionConstraints
typeconstyes
  • = "channel"
idstringyes
  • pattern ^[0-9]{1,15}$
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: tombstone
{
  "type": "channel",
  "id": "42",
  "revision": 4
}
Rejected: no-revision
{
  "type": "channel",
  "id": "42"
}

Validate

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