DealsModerationResult deals.moderation-result@1

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

Version
1.0.0
Owner
deals
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/deals/moderation-result.v1.json

deals.moderation-result@1: answers of deals.offer.moderate on OpenVibe.Deals. POST /api/v1/offers/:id/disable|enable|review → { offer }; GET /api/v1/flags?status=open|resolved|dismissed → { flags }; POST /api/v1/flags/:id/resolve → { flag, changed } (changed false when it was no longer open).

Fields

This schema has no named fields.

Examples

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

Valid: flags
{
  "flags": [
    {
      "id": "dfl_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "kind": "price_wrong",
      "origin": "user",
      "reporter": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "reason": "now $99",
      "status": "open",
      "details": {},
      "created_at": "2026-09-25T18:00:00.000Z",
      "updated_at": "2026-09-25T18:00:00.000Z",
      "resolved_by": null,
      "resolved_at": null,
      "resolution": null,
      "offer": null
    }
  ]
}
Rejected: bad-flag-status
{
  "flags": [
    {
      "id": "x",
      "kind": "spam",
      "origin": "user",
      "status": "closed"
    }
  ]
}

Validate

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