ShareGrantedPayload share.granted@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/events/payloads/share.granted.v1.json
share.granted@1: ids and access metadata only, for every audience. Produced by adopting services; Network owns the shared model.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
ref | share.resource-ref | yes | ||
actor | identity.subject-ref | yes | ||
owner_subject | identity.subject-ref | yes | ||
audience | enum | yes |
| |
subject | identity.subject-ref | yes | ||
occurred_at | string | yes |
| |
role | enum |
| ||
expires_at | string |
| ||
reason | enum |
| ||
transfer_id | string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"ref": {
"service": "community",
"kind": "paste",
"id": "abc"
},
"actor": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"owner_subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"audience": "people",
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"occurred_at": "2026-11-06T00:00:00Z",
"role": "viewer"
}Rejected: content-leak
{
"ref": {
"service": "community",
"kind": "paste",
"id": "abc"
},
"actor": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"owner_subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"audience": "people",
"subject": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
},
"occurred_at": "2026-11-06T00:00:00Z",
"role": "viewer",
"content": "forbidden"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('share.granted@1', value); // { valid, errors: [{ path, message }] }