CommunityPasteModerateRequest community.paste-moderate-request@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
community
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/community/paste-moderate-request.v1.json

community.paste-moderate-request@1: bodies of the staff paste routes on OpenVibe.Community (community.paste.moderate; a browser must be staff, a service holds the capability). POST /api/pastes/bulk: { slugs, action } (at most 500 slugs are applied; unknown slugs are skipped). POST /api/pastes/:slug/censor: multipart with the replacement image in `screenshot` (PNG, JPEG or WebP), for a screenshot paste (slug or numeric id). DELETE /api/pastes/:slug/comments/:id (someone else's comment, X-OV-Staff for a service) takes no body.

Fields

This schema has no named fields.

Examples

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

Valid: bulk
{
  "slugs": [
    "k3JfQ2",
    "a8bC9d"
  ],
  "action": "unlisted"
}
Valid: censor
{
  "screenshot": "<bytes>"
}
Rejected: unknown-action
{
  "slugs": [
    "k3JfQ2"
  ],
  "action": "archive"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('community.paste-moderate-request@1', value);   // { valid, errors: [{ path, message }] }