ShareResourceRef share.resource-ref@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/resource-ref.v1.json

share.resource-ref@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
servicestringyes
  • pattern ^[a-z][a-z0-9-]{1,39}$
kindstringyes
  • pattern ^[a-z][a-z0-9_-]{0,63}$
idstringyes
  • minLength 1
  • maxLength 200

Examples

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

Valid: example
{
  "service": "community",
  "kind": "paste",
  "id": "abc"
}
Rejected: unknown-field
{
  "service": "community",
  "kind": "paste",
  "id": "abc",
  "title": "must never appear"
}

Validate

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