SourcesIndexDocumentDeletedPayload sources.index_document.deleted@1
Generated at from
openvibe-contracts v0.33.0 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- sources
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-017
- Schema
https://openvibe.network/contracts/events/payloads/sources.index_document.deleted.v1.json
sources.index_document.deleted v1 (OpenVibe.Sources server/items.js indexEvent). An item of a source with search_visibility was removed; OpenVibe.Search stores a tombstone at this revision. Envelope: subject { type: item, id: <item id>, revision }, visibility internal, priority important, actor service:sources.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
type | const | yes |
| |
id | string | yes |
| |
revision | integer | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: removed-item
{
"type": "item",
"id": "itm_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"revision": 3
}Rejected: no-revision
{
"type": "item",
"id": "itm_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('sources.index_document.deleted@1', value); // { valid, errors: [{ path, message }] }