FrameMentions frame.mentions@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/frame/mentions.v1.json
frame.mentions@1: what a composer's `@` menu shows. GET /api/frame/mentions?q=&site= answers this. People are Network accounts (public username, display name, canonical subject id and, only when the picture is an OpenVibe.Media one, its avatar); agents are the person's own rows from Network's agent directory; sites are the open OpenVibe places from the Frame; channels are Live's public channels. At most eight rows, people first, then the person's agents, then places; the site the box is on is not suggested back. Signed out answers public people only. A person row never carries an email, a numeric account id, a role or any other account field. `q` matches usernames, display names, agent names and place names. The read is rate-limited per actor (120 a minute in memory; HTTP 429 with Retry-After past it): signed in that is the person, signed out a hash of the address. A signed-out answer is public, max-age=60; a signed-in one is private, no-store.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
mentions | https://openvibe.network/contracts/frame/mentions.v1.json#/$defs/mention | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: four-kinds
{
"mentions": [
{
"kind": "person",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"label": "Ana Followed",
"handle": "ana",
"avatar": "https://openvibe.media/p/ana/screenshot",
"url": "https://openvibe.network/@ana"
},
{
"kind": "agent",
"id": "agt_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"label": "Actor",
"sub": "actor · online"
},
{
"kind": "site",
"id": "live",
"label": "Live",
"handle": "live",
"url": "https://openvibe.live/"
},
{
"kind": "channel",
"id": "streamer",
"label": "Streamer One",
"handle": "streamer",
"url": "https://openvibe.live/@streamer"
}
]
}Valid: people-only
{
"mentions": [
{
"kind": "person",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"label": "Ana Followed",
"handle": "ana",
"url": "https://openvibe.network/@ana"
}
]
}Rejected: network-avatar
{
"mentions": [
{
"kind": "person",
"id": "usr_01J8Z3Q4R5S6T7V8W9X0Y1Z2A3",
"label": "Ana Followed",
"handle": "ana",
"avatar": "https://openvibe.network/avatar/ana?s=64",
"url": "https://openvibe.network/@ana"
}
]
}Rejected: nine-rows
{
"mentions": [
{
"kind": "site",
"id": "live",
"label": "Live",
"handle": "live",
"url": "https://openvibe.live/"
},
{
"kind": "site",
"id": "tools",
"label": "Tools",
"handle": "tools",
"url": "https://openvibe.tools/"
},
{
"kind": "site",
"id": "games",
"label": "Games",
"handle": "games",
"url": "https://openvibe.games/"
},
{
"kind": "site",
"id": "chat",
"label": "Chat",
"handle": "chat",
"url": "https://openvibe.chat/"
},
{
"kind": "site",
"id": "network",
"label": "Network",
"handle": "network",
"url": "https://openvibe.network/"
},
{
"kind": "site",
"id": "wiki",
"label": "Wiki",
"handle": "wiki",
"url": "https://openvibe.wiki/"
},
{
"kind": "site",
"id": "blog",
"label": "Blog",
"handle": "blog",
"url": "https://openvibe.blog/"
},
{
"kind": "site",
"id": "news",
"label": "News",
"handle": "news",
"url": "https://openvibe.news/"
},
{
"kind": "site",
"id": "community",
"label": "Community",
"handle": "community",
"url": "https://openvibe.community/"
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('frame.mentions@1', value); // { valid, errors: [{ path, message }] }