MediaAvatarReleaseRequest media.avatar-release-request@1

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

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

media.avatar-release-request@1: the body of POST /internal/avatar-release on OpenVibe.Media (capability media.avatar.release). The product says a slot no longer points at its picture (the person removed it), or that one object or one person's references are gone (an account deletion), and the object can then be deleted like any other. It names a slot (product and ref), an object_id or a subject; with none, Media answers 400 { ok: false, error }.

Fields

FieldTypeRequiredDescriptionConstraints
object_idstring | null
  • pattern ^med_
productstring | null
  • pattern ^[a-z][a-z0-9-]{1,31}$
refstring | null
  • maxLength 64
subjectstring | nullThe person (usr_…) when the product knows it; Media refuses an object owned by someone else.
  • pattern ^usr_

Examples

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

Valid: object
{
  "object_id": "med_01JC5Z8K2Q4X7V9B3N6M1R0T2Y"
}
Valid: slot
{
  "product": "network",
  "ref": "42"
}
Rejected: nothing
{}
Rejected: product-without-ref
{
  "product": "network"
}

Validate

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