BlogPostPublishedPayload blog.post.published@1

Generated at from openvibe-contracts v0.33.0 and openvibe-sdk v0.5.0.

Version
1.0.0
Owner
blog
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/blog.post.published.v1.json

blog.post.published v1 (OpenVibe.Blog server/domain/publication.js afterChange, via openvibe-publishing/index-hooks publicationEvent). Emitted when a post became published (now or by its schedule), in the transaction of the change. For subscribers other than Search: canonical URL, publication state and Search-shaped indexability, never the body (Search gets that from blog.index_document.*). Envelope: subject { type: post, id: pst_…, revision: <published revision, 0 if none> }, visibility public when the document is public and the gate lets it be listed, otherwise internal, priority important, actor the person or service:blog (scheduled and system changes).

Fields

FieldTypeRequiredDescriptionConstraints
canonical_urlstringyes
  • pattern ^https?://
  • format uri
  • maxLength 2048
publication_stateconstyes
  • = "published"
indexabilityobjectyes
  • 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}$
blogobjectyes
  • no other fields
blog.idstringyes
  • pattern ^blg_[0-9A-HJKMNP-TV-Z]{26}$
blog.handlestringyes
  • pattern ^[a-z0-9][a-z0-9_-]{1,39}$
visibilityenumyesThe post's own visibility (members = entitlement-gated).
  • one of "public", "unlisted", "members", "private"

Examples

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

Valid: public
{
  "canonical_url": "https://openvibe.blog/@alex/hello-world",
  "publication_state": "published",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "blog": {
    "id": "blg_01JAB2C3D4E5F6G7H8J9K0MNPT",
    "handle": "alex"
  },
  "visibility": "public"
}
Rejected: no-blog
{
  "canonical_url": "https://openvibe.blog/@alex/hello-world",
  "publication_state": "published",
  "indexability": {
    "decision": "index",
    "reasons": []
  },
  "visibility": "public"
}

Validate

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