MediaAvatarIngestRequest media.avatar-ingest-request@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-request.v1.json
media.avatar-ingest-request@1: the body of POST /internal/avatar-ingest on OpenVibe.Media (capability media.avatar.ingest; Network calls it while adopting an avatar a person pointed at somewhere else on the web). Media fetches the URL once through its egress guard (https only, public addresses only, at most 8 MB and 10 s), re-encodes it to a 512×512 WebP and stores it as an unlisted screenshot paste owned by user_id, so no OpenVibe site ever serves or stores a third-party address. Refusals are { ok: false, error } (400 without url or user_id, 422 when the link is not a usable picture).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
url | string | yes | The https address of the picture to import. | |
user_id | integer | string | yes | The account that owns the stored paste. | |
username | string | null | Used only for the paste title. |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: import
{
"url": "https://cdn.example.com/me.png",
"user_id": 4821,
"username": "aurora"
}Rejected: no-url
{
"user_id": 4821,
"username": "aurora"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.avatar-ingest-request@1', value); // { valid, errors: [{ path, message }] }