BotRobotOfflinePayload bot.robot.offline@1
Generated at from
openvibe-contracts v0.97.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- bot
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Decision
- ADR-043
- Schema
https://openvibe.network/contracts/events/payloads/bot.robot.offline.v1.json
bot.robot.offline v1 (OpenVibe.Bot server/domain/index.js setOnline). The device missed two heartbeats plus the grace window, or its socket closed; one event per robot it is attached to. Envelope: subject { type: robot, id: <robot id> }, visibility internal, priority important, actor service:bot.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
robot_id | string | yes |
| |
device_id | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: offline
{
"robot_id": "rob_01J8Z4M2Q0R7T9YV3K6N8P1W2X",
"device_id": "dev_01J8Z4N5S2V8X0ZB4M7Q9R3T5W"
}Rejected: bad-robot
{
"robot_id": "robot-1",
"device_id": "dev_01J8Z4N5S2V8X0ZB4M7Q9R3T5W"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('bot.robot.offline@1', value); // { valid, errors: [{ path, message }] }