DealsIndexDocumentDeletedPayload deals.index_document.deleted@1
Generated at from
openvibe-contracts v0.34.2 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- deals
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/deals.index_document.deleted.v1.json
deals.index_document.deleted v1 (OpenVibe.Deals server/domain/indexing.js indexOffer, via openvibe-publishing/index-hooks indexEvent). A Search tombstone for an offer page: moderators disabled the offer (takedown, including an imported offer disabled because all its Sources items were removed), or the offer was merged into another one (the group is indexed under the target from then on). Sent when the tombstone's revision moved, so a repeat sends nothing. Product pages are never tombstoned: a product without a fresh offer stays in Search as a noindex document. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type: offer, id, revision }, visibility internal, priority important, actor service:deals.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
type | const | 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: tombstone
{
"type": "offer",
"id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPV",
"revision": 5
}Rejected: full-document
{
"owner": "deals",
"type": "offer",
"id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPV",
"revision": 5,
"deleted": true
}Rejected: product
{
"type": "product",
"id": "dpr_01JAB2C3D4E5F6G7H8J9K0MNPS",
"revision": 2
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('deals.index_document.deleted@1', value); // { valid, errors: [{ path, message }] }