ChatInboxReplyRequest chat.inbox-reply-request@1

Generated at from openvibe-contracts v0.221.0 and openvibe-sdk v0.65.0.

Version
1.0.0
Owner
chat
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/chat/inbox-reply-request.v1.json

chat.inbox-reply-request@1: what one of an inbox's people sends while working a conversation (chat.inbox.reply). A reply (POST /api/chat/inboxes/:id/conversations/:cid/messages { message }: the conversation becomes open, Vibe stays quiet in it, and the person takes it if nobody has); a status or an assignment (PATCH /:id/conversations/:cid { status: open | resolved | bot, assignee_id: one of the inbox's people | null }); a translation (POST /:id/conversations/:cid/messages/:mid/translate { to } or POST /:id/translate { text, to }). Marking read (POST /:id/conversations/:cid/read) 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: a-reply
{
  "message": "Hi! Your order ships today."
}
Valid: resolve-and-assign
{
  "status": "resolved",
  "assignee_id": 42
}
Valid: translate
{
  "to": "es",
  "text": "Your order ships today."
}
Rejected: empty-reply
{
  "message": ""
}
Rejected: unknown-status
{
  "status": "closed"
}

Validate

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