NetworkAvatarWriteResult network.avatar-write-result@1

Generated at from openvibe-contracts v0.79.0 and openvibe-sdk v0.25.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/network/avatar-write-result.v1.json

network.avatar-write-result@1: the answer of POST /internal/user-avatar on OpenVibe.Network: { ok: true, changed } — changed is false when the account already had this picture (nothing was written, and nothing is fanned out to the sites). Refusals are { error } (400, 404, 422, 503).

Fields

FieldTypeRequiredDescriptionConstraints
okconstyes
  • = true
changedbooleanyes

Examples

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

Valid: changed
{
  "ok": true,
  "changed": true
}
Rejected: not-ok
{
  "ok": false,
  "changed": true
}

Validate

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