ChatTicketConversation chat.ticket-conversation@1
Generated at from
openvibe-contracts v0.107.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/ticket-conversation.v1.json
chat.ticket-conversation@1: one conversation between an OpenVibe.Help ticket and one calling service, keyed by the ticket id and the service, carrying one posted message. The person side reads and answers it through Chat's person APIs (POST /api/chat/send needs a person's session); a service-side author (Help's agent worker, staff tooling) posts here with a service token, which is why the write needs the chat.ticket.write capability rather than the person send route. author_kind says who wrote the message (`person`, `agent` or `staff`), author is that author's subject, body is the text, and created_at is when the message was written.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
ticket_id | string | yes | The OpenVibe.Help ticket this conversation belongs to. Together with `service` it keys the conversation: one conversation per (ticket id, calling service). |
|
service | string | yes | The Contracts manifest id of the calling service (e.g. `help`, `ai`), the service token's principal. Together with `ticket_id` it keys the conversation, so two services on one ticket get two conversations. |
|
message | object | yes |
| |
message.author_kind | enum | yes | Who wrote the message: the ticket's `person`, an `agent` (a service acting for one, e.g. Help's AI worker), or `staff` (a human on the service's team). |
|
message.author | string | yes | The author's subject: `user:<id>` for a person, or the service/agent subject that posted on its behalf. Never a display name. |
|
message.body | string | yes | The message text; not blank. |
|
message.created_at | string | yes | When the message was written (the author's clock; Chat keeps its own ordering). |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: agent-answer
{
"ticket_id": "tkt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"service": "help",
"message": {
"author_kind": "agent",
"author": "agent:agent_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"body": "The export job finished at 23:59 UTC; the last hour is in the next day's file.",
"created_at": "2026-10-05T09:01:30Z"
}
}Valid: person-question
{
"ticket_id": "tkt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"service": "help",
"message": {
"author_kind": "person",
"author": "user:usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"body": "My export from yesterday is missing the last day of records.",
"created_at": "2026-10-05T09:00:00Z"
}
}Rejected: bad-author-kind
{
"ticket_id": "tkt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"service": "help",
"message": {
"author_kind": "bot",
"author": "agent:agent_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"body": "This author kind is not one of person, agent or staff.",
"created_at": "2026-10-05T09:02:00Z"
}
}Rejected: missing-body
{
"ticket_id": "tkt_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"service": "help",
"message": {
"author_kind": "person",
"author": "user:usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"created_at": "2026-10-05T09:03:00Z"
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('chat.ticket-conversation@1', value); // { valid, errors: [{ path, message }] }