NetworkConsentCheckRequest network.consent-check-request@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/network/consent-check-request.v1.json

network.consent-check-request@1 (L24): may this purpose be used for these people? POST /internal/consent/check on OpenVibe.Network with a service token holding network.consent.read. One purpose per call, up to 500 subjects (a dataset build or a chat log checks its authors in batches).

Fields

FieldTypeRequiredDescriptionConstraints
purposeenumyesThe purpose to check (network.consent@1).
  • one of "ai.train", "data.public", "face.recognize", "ai.looks", "app.data"
kindenumThe kind of content the use is about. A choice limited to other kinds answers false.
  • one of "streams", "vods", "clips", "voice", "chat", "posts", "pictures", "code"
clientstringThe app the use is for. Required for app.data. For any other purpose it asks about that app's own grant from its sign-in (consent:<purpose>, 0.310.0); without it the answer is about OpenVibe's own use. One app's grant never answers for OpenVibe or for another app.
  • pattern ^[A-Za-z0-9][A-Za-z0-9_.:-]{0,79}$
featureenumface.recognize only: the recognition about to run.
  • one of "verify", "find", "cast", "library"
subjectsarray of stringyesThe people the use would be about.
  • minItems 1
  • maxItems 500
  • unique items
  • items: pattern ^usr_[0-9A-HJKMNP-TV-Z]{26}$

Examples

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

Valid: batch
{
  "purpose": "ai.train",
  "kind": "chat",
  "subjects": [
    "usr_01K6R2Z8C4V7M9Q3T5W1X2Y3Z4",
    "usr_01K6R2Z8C4V7M9Q3T5W1X2Y3Z5"
  ]
}
Rejected: no-subjects
{
  "purpose": "ai.train",
  "subjects": []
}

Validate

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