CommunityIndexDocumentUpsertedPayload community.index_document.upserted@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.upserted.v1.json
community.index_document.upserted v1 (OpenVibe.Community; roadmap WS-O task 10). The OpenVibe.Search document of A public forum thread (in a public, open space) or a public paste on openvibe.community. Sent whenever what Search should hold changed; a thread or paste that is deleted, made private or members-only, or burns after reading gets a tombstone. The revision grows with every change. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type, id, revision: <document revision> }, visibility internal, actor service:community.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: thread
{
"owner": "community",
"type": "thread",
"id": "12",
"revision": 1,
"deleted": false,
"visibility": "public",
"canonical_url": "https://openvibe.community/s/general/t/welcome",
"title": "Welcome",
"summary": "Say hi.",
"facets": {
"space": "general"
},
"authorship": "human",
"publication_state": "published",
"indexability": {
"decision": "index"
}
}Rejected: bad-id
{
"owner": "community",
"type": "paste",
"id": "no spaces allowed",
"revision": 1,
"deleted": false,
"visibility": "public",
"title": "x",
"publication_state": "published",
"indexability": {
"decision": "index"
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('community.index_document.upserted@1', value); // { valid, errors: [{ path, message }] }