MediaAvatarIngestResult media.avatar-ingest-result@1
Generated at from
openvibe-contracts v0.79.0 and
openvibe-sdk v0.25.0.
- Version
- 1.0.0
- Owner
- media
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/media/avatar-ingest-result.v1.json
media.avatar-ingest-result@1: the answer of POST /internal/avatar-ingest on OpenVibe.Media: { ok: true, slug, url, width, height, bytes } — the unlisted paste holding the re-encoded avatar and its public https://openvibe.media/p/<slug>/screenshot address (always a 512×512 WebP). Refusals are { ok: false, error } (400, 422).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
ok | const | yes |
| |
slug | string | yes | ||
url | string | yes | ||
width | integer | yes |
| |
height | integer | yes |
| |
bytes | integer | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: stored
{
"ok": true,
"slug": "avatar-9f3k2",
"url": "https://openvibe.media/p/avatar-9f3k2/screenshot",
"width": 512,
"height": 512,
"bytes": 40231
}Rejected: not-ok
{
"ok": false,
"error": "That link is not a picture"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.avatar-ingest-result@1', value); // { valid, errors: [{ path, message }] }