LineageResolveRequest lineage.resolve-request@1
Generated at from
openvibe-contracts v0.33.0 and
openvibe-sdk v0.5.0.
- Version
- 1.0.0
- Owner
- live
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/lineage/resolve-request.v1.json
What a caller knows about a channel, stream, VOD, clip or Media object, sent to the canonical channel/owner resolver (roadmap §15.10, requirement D20): the body of POST /internal/lineage/resolve on OpenVibe.Live (capability live.lineage.resolve). GET takes the same fields as query parameters, with legacy_ids flattened to live_user_id and network_user_id. The answer is lineage.resolution@1, whose description has the precedence rules. Every input given is checked, not only the first. display_name is never a resolution input: a request that carries only a display name resolves nothing (reason display_name_only), and next to other inputs it is ignored.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
slug | string | Channel slug (Live: the username, as in /@<username>; the @ is optional), or a nested <channel>/<slot> naming a stream slot inside the channel by its slug or id. With parent_slug, a plain slug names the slot inside that parent. |
| |
parent_slug | string | The channel slug when slug names a slot inside it ({ parent_slug: 'alice', slug: 'garage' } is 'alice/garage'). Alone, it names the channel. |
| |
channel_id | string | The channel's id at its owner (Live: channels.id). |
| |
stream_id | string | A broadcast session (Live: streams.id). |
| |
slot_id | string | A persistent stream slot (Live: managed_streams.id; OpenRe stream definitions refer to it as live:managed_stream:<id>). |
| |
vod_id | string | A VOD (the Media v1 VOD id, the same id Live's VODs had before the Media split). |
| |
clip_id | string | A clip (the Media v1 clip id). A clip belongs to the clipped channel, never to the person who clipped it. |
| |
media_object_id | string | A Media object: med_<ULID>, or a legacy:<app>:<kind>:<id> reference (the media_id forms of media.media-ref@1). |
| |
owner_subject | string | The canonical subject that owns the channel (identity.subject-ref@1 user id). |
| |
legacy_ids | object | Pre-subject ids of the channel owner. Resolving through them is confidence legacy_map. |
| |
legacy_ids.live_user_id | integer | Live's local user id (users.id). |
| |
legacy_ids.network_user_id | integer | OpenVibe.Network's integer user id, mapped to a Live account by the account link. |
| |
display_name | string | A label the caller holds. Accepted so the answer can say display_name_only; never used to resolve anything, because a display name is not an identity and is never sufficient to establish ownership. |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: clip-on-channel-page
{
"slug": "alice",
"clip_id": "7"
}Valid: display-name-only
{
"display_name": "Alice ✨"
}Valid: every-input
{
"slug": "alice",
"channel_id": "12",
"stream_id": "9",
"slot_id": "3",
"vod_id": "42",
"clip_id": "7",
"media_object_id": "med_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"owner_subject": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"legacy_ids": {
"live_user_id": 17,
"network_user_id": 57
},
"display_name": "Alice"
}Valid: legacy-media-ref
{
"media_object_id": "legacy:live:vod:42"
}Valid: nested-slug
{
"slug": "alice/garage-cam"
}Valid: parent-slug
{
"parent_slug": "alice",
"slug": "garage-cam"
}Valid: slug
{
"slug": "@alice"
}Rejected: display-name-as-slug
{
"slug": "Alice Smith"
}Rejected: empty-legacy-ids
{
"legacy_ids": {}
}Rejected: empty
{}Rejected: local-owner-subject
{
"owner_subject": "42"
}Rejected: numeric-id
{
"vod_id": 42
}Rejected: unknown-input
{
"channel_name": "Alice"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('lineage.resolve-request@1', value); // { valid, errors: [{ path, message }] }