ChatPersonMemoryResult chat.person-memory-result@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
chat
Visibility
public
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/chat/person-memory-result.v1.json

chat.person-memory-result@1: compacted chat memory returned by GET /api/v1/people/{username}/memory. Private fields appear only for the person and the channel owner.

Fields

FieldTypeRequiredDescriptionConstraints
usernamestringyes
  • minLength 1
levelenumyes
  • one of "day", "week", "month"
channelstring | nullyes
opted_outbooleanyes
enabledbooleanyes
entriesarray of objectyes
  • maxItems 60
  • items: no other fields
entries[].levelenumyes
  • one of "day", "week", "month"
entries[].period_startstringyes
  • format date
entries[].channel_user_idintegeryes
entries[].summarystringyes
  • maxLength 500
entries[].topicsarray of stringyes
  • maxItems 5
entries[].highlightsarray of objectyes
  • maxItems 5
  • items: no other fields
entries[].highlights[].detailstringyes
  • maxLength 180
entries[].highlights[].stream_idinteger | nullyes
entries[].highlights[].atstring | nullyes
entries[].message_countintegeryes
  • minimum 0
entries[].tonestring
  • maxLength 120
entries[].catchphrasesarray of string
  • maxItems 5
entries[].peoplearray of string
  • maxItems 8

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: day
{
  "username": "alice",
  "level": "day",
  "channel": "streamer",
  "enabled": true,
  "opted_out": false,
  "entries": [
    {
      "level": "day",
      "period_start": "2026-11-11",
      "channel_user_id": 42,
      "summary": "Alice discussed a game with chat.",
      "topics": [
        "game"
      ],
      "highlights": [
        {
          "detail": "A game win",
          "stream_id": 123,
          "at": "2026-11-11 04:00:00"
        }
      ],
      "message_count": 25
    }
  ]
}
Rejected: no-count
{
  "username": "alice",
  "level": "day",
  "channel": "streamer",
  "enabled": true,
  "opted_out": false,
  "entries": [
    {
      "level": "day",
      "period_start": "2026-11-11",
      "channel_user_id": 42,
      "summary": "Alice discussed a game with chat.",
      "topics": [],
      "highlights": []
    }
  ]
}

Validate

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