SpaceModerationActionPayload space.moderation.action@1
Generated at from
openvibe-contracts v0.112.0 and
openvibe-sdk v0.35.0.
- Version
- 1.0.0
- Owner
- space
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-022
- Schema
https://openvibe.network/contracts/events/payloads/space.moderation.action.v1.json
space.moderation.action v1 (ADR-022; OpenVibe.Space server/events.js moderationAction). A staff or space moderator action on someone else's forum content, or a space moderator assignment: deleting, locking or unlocking a thread, deleting a post, adding or removing a space moderator. Not a person acting on their own content. Written to Space's outbox in the transaction that performs the action; OpenVibe.Network keeps it in the moderation audit log. The payload is common.moderation-action@1. Envelope: subject { type: moderation_action, id: <target type>:<target id> }, visibility internal, actor the moderator. Never carries the content itself.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: space-moderator-added
{
"action": "space.moderator_added",
"target": {
"type": "space",
"id": "general",
"owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"reason": null,
"details": {}
}Valid: space-moderator-removed
{
"action": "space.moderator_removed",
"target": {
"type": "space",
"id": "general",
"owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"reason": null,
"details": {}
}Valid: thread-locked
{
"action": "thread.locked",
"target": {
"type": "thread",
"id": "31",
"owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"reason": null,
"details": {}
}Rejected: carries-content
{
"action": "post.deleted",
"target": {
"type": "post",
"id": "31"
},
"actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"content": "private body"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('space.moderation.action@1', value); // { valid, errors: [{ path, message }] }