WikiRevisionCreatedPayload wiki.revision.created@1
Generated at from
openvibe-contracts v0.33.0 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- wiki
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/wiki.revision.created.v1.json
wiki.revision.created v1 (OpenVibe.Wiki server/wiki/service.js revisionEvent). Emitted when a page gets a new immutable revision: an edit, a revert or an AI proposal. A new revision is a draft until it is published (then wiki.page.published|updated follows). Envelope: subject { type: page, id: pg_…, revision: <number> }, visibility internal, priority important, actor the person or service.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
space_id | string | yes |
| |
space | string | yes | Space slug. |
|
slug | string | yes | Page slug. |
|
number | integer | yes | The new revision number. |
|
kind | enum | yes |
| |
parent_number | integer | null | yes |
| |
reverted_to | integer | null | yes | The revision a revert restored; null otherwise. |
|
authorship | enum | yes | Search's authorship vocabulary; null when the revision has no authorship record. |
|
author | string | null | yes | Who wrote it: a subject id (usr_…) or a service (svc:<id>). |
|
message | string | null | yes |
| |
proposal_id | string | Present when the revision is an AI proposal awaiting a person's approval. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: ai-proposal
{
"space_id": "spc_01JAB2C3D4E5F6G7H8J9K0MNPV",
"space": "food",
"slug": "ramen",
"number": 3,
"kind": "edit",
"parent_number": 2,
"reverted_to": null,
"authorship": "ai_generated",
"author": "svc:ai",
"message": "AI proposal",
"proposal_id": "prp_01JAB2C3D4E5F6G7H8J9K0MNPW"
}Valid: edit
{
"space_id": "spc_01JAB2C3D4E5F6G7H8J9K0MNPV",
"space": "food",
"slug": "ramen",
"number": 2,
"kind": "edit",
"parent_number": 1,
"reverted_to": null,
"authorship": "human",
"author": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"message": "Add broth section"
}Rejected: carries-content
{
"space_id": "spc_01JAB2C3D4E5F6G7H8J9K0MNPV",
"space": "food",
"slug": "ramen",
"number": 2,
"kind": "edit",
"parent_number": 1,
"reverted_to": null,
"authorship": "human",
"author": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"message": null,
"content": "# Ramen"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('wiki.revision.created@1', value); // { valid, errors: [{ path, message }] }