SpaceDomainVerifiedPayload space.domain.verified@1

Generated at from openvibe-contracts v0.150.0 and openvibe-sdk v0.44.0.

Version
1.0.0
Owner
space
Visibility
first-party
Status
active
Compatibility
backward
Decision
ADR-004
Schema
https://openvibe.network/contracts/events/payloads/space.domain.verified.v1.json

space.domain.verified v1 (OpenVibe.Space, subject domain dom_…, visibility internal): a custom domain's TXT record (_openvibe-space.<hostname>) was found, and the domain now serves the site.

Fields

FieldTypeRequiredDescriptionConstraints
project_idstringyes
  • pattern ^prj_[0-9A-HJKMNP-TV-Z]{26}$
site_idstringyes
  • pattern ^sit_[0-9A-HJKMNP-TV-Z]{26}$
sitestringyesthe site name (one DNS label; the site is served at <site>.openvibe.website)
  • pattern ^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){2,39}$
hostnamestringyesthe custom domain, a fully qualified host name in lower case
  • minLength 4
  • maxLength 253

Examples

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

Valid: www
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site",
  "hostname": "www.example.org"
}
Rejected: bad-site-name
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "Alpha Site",
  "hostname": "www.example.org"
}
Rejected: no-hostname
{
  "project_id": "prj_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "site_id": "sit_01JAB2C3D4E5F6G7H8J9K0MNPR",
  "site": "alpha-site"
}

Validate

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