ChatModerationResult chat.moderation-result@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- chat
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/chat/moderation-result.v1.json
chat.moderation-result@1: what POST /internal/chat/moderation (chat.moderation.write) answers. 200 with the ids a delete action removed (empty when nothing matched), or with the rows another action changed and the id it inserted. A refusal is chat.ingress-ack@1's error: 400 a body Chat refuses, 409 a key reused with another body, 503 Chat or its delivery unavailable (retry with the same key).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: deleted
{
"ok": true,
"ids": [
101,
102
]
}Valid: logged
{
"ok": true,
"changes": 1,
"id": 5512
}Valid: refused
{
"ok": false,
"error": "Idempotency key reused with a different body"
}Rejected: error-without-reason
{
"ok": false
}Rejected: ids-and-changes
{
"ok": true,
"ids": [
1
],
"changes": 1
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('chat.moderation-result@1', value); // { valid, errors: [{ path, message }] }