ReviewsEntityMergedPayload reviews.entity.merged@1
Generated at from
openvibe-contracts v0.34.2 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- reviews
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/reviews.entity.merged.v1.json
reviews.entity.merged v1 (OpenVibe.Reviews server/reviews/service.js merge → entityEvent). An editor merged one entity into another (POST /api/v1/entities/:ref/merge, capability reviews.entity.merge, a person only), in the transaction of the merge. Nothing is rewritten: the merged entity keeps its aliases and its signals keep their attribution; it becomes state merged with an active merged_into link (link_id) and the target's aggregate is recomputed over both, which is why reviews.entity.split restores attribution exactly. The same transaction sends Search the merged entity's tombstone and the target's new document (reviews.index_document.*); a published summary of the merged entity keeps its state and no reviews.summary.unpublished is sent. The signal ids, aliases and aggregate are left out (they are in the entity's history, GET /api/v1/entities/:ref/history). Envelope: subject { type: entity, id: <merged entity ent_…> }, visibility public, priority important, actor the editor (user usr_…).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
entity_id | string | yes | The merged entity (subject.id); now state merged. |
|
into_entity_id | string | yes | The active entity it was merged into. |
|
link_id | string | yes | The merged_into link; a later reviews.entity.split ends this link. |
|
signal_count | integer | yes | Active signals of the merged entity and of entities merged into it, now counted in the target's aggregate. |
|
url | string | yes | Canonical URL of the merged entity's page (/e/<slug>). |
|
into_url | string | yes | Canonical URL of the target entity's page. |
|
note | string | null | yes | The editor's note (clipped to 500 characters); null when none was given. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: no-note
{
"entity_id": "ent_01M3A0Q7ZK2V5T8R1N4HDXWB6C",
"into_entity_id": "ent_01M39YF4C2PXJ7H3E8M0QK5RSV",
"link_id": "lnk_01M3A0R1B9D6G2F7Y4T8N3KJMW",
"signal_count": 0,
"url": "https://openvibe.reviews/e/widget-3000-2",
"into_url": "https://openvibe.reviews/e/widget-3000",
"note": null
}Valid: with-note
{
"entity_id": "ent_01M38GW372A3PM7110AHHTYM7C",
"into_entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
"link_id": "lnk_01M38GW38EQW403PWP85Z8WVH5",
"signal_count": 2,
"url": "https://openvibe.reviews/e/portal-two",
"into_url": "https://openvibe.reviews/e/portal-2",
"note": "Same game, duplicate listing"
}Rejected: missing-link-id
{
"entity_id": "ent_01M38GW372A3PM7110AHHTYM7C",
"into_entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
"signal_count": 2,
"url": "https://openvibe.reviews/e/portal-two",
"into_url": "https://openvibe.reviews/e/portal-2",
"note": null
}Rejected: signal-ids-listed
{
"entity_id": "ent_01M38GW372A3PM7110AHHTYM7C",
"into_entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
"link_id": "lnk_01M38GW38EQW403PWP85Z8WVH5",
"signal_count": 1,
"signals": [
"sig_01M38GW39B6QJ8K2W4R7T5NXZM"
],
"url": "https://openvibe.reviews/e/portal-two",
"into_url": "https://openvibe.reviews/e/portal-2",
"note": null
}Rejected: slug-not-id
{
"entity_id": "portal-two",
"into_entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
"link_id": "lnk_01M38GW38EQW403PWP85Z8WVH5",
"signal_count": 2,
"url": "https://openvibe.reviews/e/portal-two",
"into_url": "https://openvibe.reviews/e/portal-2",
"note": null
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('reviews.entity.merged@1', value); // { valid, errors: [{ path, message }] }