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
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
project_id | string | yes |
| |
site_id | string | yes |
| |
site | string | yes | the site name (one DNS label; the site is served at <site>.openvibe.website) |
|
hostname | string | yes | the custom domain, a fully qualified host name in lower case |
|
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 }] }