ShareTransfer share.transfer@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/share/transfer.v1.json

share.transfer@1: network-wide sharing. Ids only; no resource title or content. Members apply to people audience; pending recipients may preview for seven days.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • format uuid
fromidentity.subject-refyes
toidentity.subject-refyes
keep_accessbooleanyes
  • default false
requested_atstringyes
  • format date-time
expires_atstringyes
  • format date-time
stateenumyes
  • one of "pending", "accepted", "declined", "cancelled", "expired"

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: example
{
  "id": "00000000-0000-4000-8000-000000000001",
  "from": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "to": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "keep_access": false,
  "requested_at": "2026-11-06T00:00:00Z",
  "expires_at": "2026-11-13T00:00:00Z",
  "state": "pending"
}
Rejected: unknown-field
{
  "id": "00000000-0000-4000-8000-000000000001",
  "from": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "to": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPR"
  },
  "keep_access": false,
  "requested_at": "2026-11-06T00:00:00Z",
  "expires_at": "2026-11-13T00:00:00Z",
  "state": "pending",
  "title": "must never appear"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('share.transfer@1', value);   // { valid, errors: [{ path, message }] }