HostIndexDocumentDeletedPayload host.index_document.deleted@1
Generated at from
openvibe-contracts v0.150.0 and
openvibe-sdk v0.44.0.
- Version
- 1.0.0
- Owner
- host
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/host.index_document.deleted.v1.json
host.index_document.deleted v1 (OpenVibe.Host server/catalog/search-index.js, via openvibe-publishing/search-feed). A Search tombstone for a hosting catalog page (a plan or a provider) that is hidden, gone or deleted. Only sent for a page Search was sent before, and only when the tombstone's revision moved. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type: plan|provider, id, revision }, visibility internal, actor service:host.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
type | enum | yes |
| |
id | string | yes |
| |
revision | integer | yes | Index revision of the tombstone; wins over any document at the same or an older revision. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: plan
{
"type": "plan",
"id": "hpl_01M4PJ8C3ZNPWVVZM9N5XXH45J",
"revision": 3
}Rejected: wrong-type
{
"type": "site",
"id": "hpl_01M4PJ8C3ZNPWVVZM9N5XXH45J",
"revision": 3
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('host.index_document.deleted@1', value); // { valid, errors: [{ path, message }] }