NetworkUserReportRequest network.user-report-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/network/user-report-request.v1.json
network.user-report-request@1 (ask 287): POST /api/v1/me/reports on OpenVibe.Network, a signed-in person's report about another person. `target` is their username (any case) or usr_ subject; guests cannot be named, and nobody reports themselves. The same pair may have one open report: filing again while it is open answers the open one with 200 instead of creating a duplicate (201 when it creates one).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
target | string | yes |
| |
reason | enum | yes |
| |
detail | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: spam
{
"target": "Example",
"reason": "spam",
"detail": "Sending the same link in every room."
}Valid: subject
{
"target": "usr_01JAB2C3D4E5F6G7H8J9K0MNV1",
"reason": "harassment"
}Rejected: bad-reason
{
"target": "Example",
"reason": "dislike"
}Rejected: missing-target
{
"reason": "spam"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('network.user-report-request@1', value); // { valid, errors: [{ path, message }] }