SpaceAppClaimedPayload space.app.claimed@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.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.app.claimed.v1.json
space.app.claimed v1 (OpenVibe.Space, subject space spc_…, visibility internal): a guest draft (a space with no owner, edited with a secret link) was claimed by a signed-in person. The draft is that person's space now and its secret is gone. No secret, no file contents.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
space_id | string | yes | the space that was claimed |
|
slug | string | yes | the address it now has (one DNS label; the space is served at <slug>.openvibe.website once it is published) |
|
name | string | yes | the space's name |
|
template | string | the template it started from, when it started from one |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: from-template
{
"space_id": "spc_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"slug": "my-bakery-ab12",
"name": "Business site",
"template": "site-bakery"
}Valid: no-template
{
"space_id": "spc_01JAB2C3D4E5F6G7H8J9K0MNPR",
"slug": "my-bakery-ab12",
"name": "Untitled site"
}Rejected: no-space-id
{
"slug": "my-bakery-ab12",
"name": "Business site"
}Rejected: secret-in-payload
{
"space_id": "spc_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"slug": "my-bakery-ab12",
"name": "Business site",
"key": "the-draft-secret"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('space.app.claimed@1', value); // { valid, errors: [{ path, message }] }