MediaModerationActionPayload media.moderation.action@1

Generated at from openvibe-contracts v0.76.0 and openvibe-sdk v0.20.1.

Version
1.0.0
Owner
media
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-022
Schema
https://openvibe.network/contracts/events/payloads/media.moderation.action.v1.json

media.moderation.action v1 (ADR-022, roadmap WS-D task 1). A staff action on someone else's media in OpenVibe.Media: a retention hold placed or released (moderation, dmca, admin, evidence), and a staff deletion or visibility change of someone else's VOD, clip or object. Not an owner acting on their own media, and not a creator's own pin. Written to the service'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 staff member (or the service acting for an app's staff). Never carries the media itself.

Fields

This schema has no named fields.

Examples

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

Valid: hold-placed
{
  "action": "hold.placed",
  "target": {
    "type": "vod",
    "id": "med_01JAB2C3D4E5F6G7H8J9K0MNPR",
    "owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "reason": "reported for review",
  "details": {
    "kind": "moderation",
    "hold_id": 12
  }
}
Rejected: no-target
{
  "action": "hold.placed",
  "actor_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
}

Validate

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