ReviewsSummaryUnpublishedPayload reviews.summary.unpublished@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.summary.unpublished.v1.json

reviews.summary.unpublished v1 (OpenVibe.Reviews server/reviews/service.js unpublishSummary, via openvibe-publishing/index-hooks publicationEvent). An editor took an entity's published summary down (POST /api/v1/entities/:ref/summary/unpublish), in the transaction of the change. The entity page stays up without the summary; its new Search document goes out as reviews.index_document.upserted. Only this action sends it: merging or deleting an entity leaves its summary's state alone and Search gets the entity's tombstone instead. For subscribers other than Search: publication state, the entity page's indexability after the change, and the entity id and slug; canonical_url is always null from Reviews (the helper is given a tombstone), and authorship and correction are not sent. Envelope: subject { type: summary, id: sum_…, revision: <the revision that was published> }, visibility internal, priority important, actor the editor (user usr_…).

Fields

FieldTypeRequiredDescriptionConstraints
canonical_urlstring | nullyesnull: the event carries a tombstone, which has no URL.
publication_stateconstyes
  • = "unpublished"
indexabilityobjectyesThe gate's decision for the entity page after the summary came down (Reviews always passes one, so it is never null here).
  • no other fields
indexability.decisionenumyes
  • one of "index", "noindex"
indexability.reasonsarray of stringyes
  • maxItems 20
  • unique items
  • items: pattern ^[a-z][a-z0-9_]{1,63}$
entity_idstringyesThe entity the summary belongs to.
  • pattern ^ent_[0-9A-HJKMNP-TV-Z]{26}$
entity_slugstringyes
  • pattern ^[a-z0-9]+(-[a-z0-9]+)*$
  • maxLength 90

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: unpublished
{
  "canonical_url": null,
  "publication_state": "unpublished",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "thin_content"
    ]
  },
  "entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
  "entity_slug": "portal-2"
}
Rejected: bad-slug
{
  "canonical_url": null,
  "publication_state": "unpublished",
  "indexability": {
    "decision": "noindex",
    "reasons": []
  },
  "entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
  "entity_slug": "Portal 2"
}
Rejected: published-state
{
  "canonical_url": null,
  "publication_state": "published",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "thin_content"
    ]
  },
  "entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
  "entity_slug": "portal-2"
}
Rejected: with-authorship
{
  "canonical_url": null,
  "publication_state": "unpublished",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "thin_content"
    ]
  },
  "entity_id": "ent_01M38GW2QD088TQ08VN985JTXT",
  "entity_slug": "portal-2",
  "authorship": "human"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('reviews.summary.unpublished@1', value);   // { valid, errors: [{ path, message }] }