ChatMessagesPage chat.messages-page@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/messages-page.v1.json
chat.messages-page@1: the answer of GET /internal/chat/messages on OpenVibe.Chat (capability chat.messages.read), which pages non-deleted chat_messages for OpenVibe.Live's AI context, clip and viewer jobs and its moderator search and history. Query: one filter of channel_user_id, stream_id, user_id, anon_id, username or id (one message), a cursor on id (after_id ascending, before_id descending), limit, and tail=1 (no rows, only max_id). max_id is the highest id matching the filter, null when none, so a caller can resume after it. A failure is chat.ingress-ack@1's error.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: empty
{
"messages": [],
"max_id": null
}Valid: page
{
"messages": [
{
"id": 90211,
"user_id": 512,
"anon_id": null,
"username": "pixelfox",
"message": "that was clean",
"message_type": "chat",
"is_global": 0,
"stream_id": 4211,
"channel_user_id": 77,
"source_platform": null,
"reply_to_id": null,
"timestamp": "2026-10-04 21:14:09"
},
{
"id": 90214,
"user_id": null,
"anon_id": "anon48213",
"username": "anon48213",
"message": "!airhorn",
"message_type": "soundboard",
"is_global": 0,
"stream_id": 4211,
"channel_user_id": 77,
"source_platform": null,
"reply_to_id": 90211,
"timestamp": "2026-10-04 21:14:31"
}
],
"max_id": 90214
}Valid: tail
{
"messages": [],
"max_id": 90214
}Rejected: missing-max-id
{
"messages": [
{
"id": 90211,
"user_id": 512,
"anon_id": null,
"username": "pixelfox",
"message": "that was clean",
"message_type": "chat",
"is_global": 0,
"stream_id": 4211,
"channel_user_id": 77,
"source_platform": null,
"reply_to_id": null,
"timestamp": "2026-10-04 21:14:09"
}
]
}Rejected: unknown-message-type
{
"messages": [
{
"id": 90211,
"user_id": 512,
"anon_id": null,
"username": "pixelfox",
"message": "that was clean",
"message_type": "whisper",
"is_global": 0,
"stream_id": 4211,
"channel_user_id": 77,
"source_platform": null,
"reply_to_id": null,
"timestamp": "2026-10-04 21:14:09"
}
],
"max_id": 90211
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('chat.messages-page@1', value); // { valid, errors: [{ path, message }] }