BotMachineManageRequest bot.machine-manage-request@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- bot
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/bot/machine-manage-request.v1.json
bot.machine-manage-request@1: what a caller changes on a machine (plan L34, step M2). A rename gives a name; a roles change gives the whole set of roles (network.machine-roles-put@1's shape). The same body is what the network's hub sends to Bot, so both sides speak one shape.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
name | string | The name the owner gives the machine. Absent when the call changes something else. |
| |
roles | array of string | The machine's roles after the change. Absent when the call changes something else. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: rename
{
"name": "Kitchen server"
}Valid: roles
{
"roles": [
"codes.worker",
"ai.host"
]
}Rejected: bad-role
{
"roles": [
"codesworker"
]
}Rejected: empty
{}Rejected: unknown-field
{
"nickname": "x"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('bot.machine-manage-request@1', value); // { valid, errors: [{ path, message }] }