IdentityResolveResult identity.resolve-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
network
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/identity/resolve-result.v1.json

identity.resolve-result@1: answers of identity.subject.resolve on OpenVibe.Network. GET /internal/identity/resolve → one identity.subject-projection@1 (404 identity.subject_not_found when nothing matches); POST /internal/identity/resolve-batch → { results } keyed by each id asked, null for an id that resolves to nothing.

Fields

This schema has no named fields.

Examples

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

Valid: batch
{
  "results": {
    "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ": {
      "subject": {
        "type": "user",
        "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
      },
      "network_user_id": 1042,
      "username": "alice",
      "display_name": "Alice",
      "avatar_url": null,
      "banned": false,
      "legacy_ids": [
        {
          "source_system": "live",
          "source_type": "user",
          "source_id": "17"
        }
      ]
    },
    "usr_01JAB2C3D4E5F6G7H8J9K0MNPR": null
  }
}
Rejected: bad-entry
{
  "results": {
    "x": 5
  }
}

Validate

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