QuestStepType quest.step-type@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- quest
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/quest/step-type.v1.json
quest.step-type@1: a verified Events action that may be selected for a daily quest. A contributed type stays pending until staff review.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
event_type | string | yes |
| |
site | string | yes |
| |
sentence | string | yes |
| |
href | string | yes |
| |
weight | integer | yes |
| |
count | const |
| ||
verification | string | |||
status | enum | yes |
| |
source | string | |||
project_id | string | |||
created_at | string |
| ||
reviewed_at | string | null |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: built-in
{
"id": "stream",
"event_type": "live.stream.started",
"site": "openvibe.live",
"sentence": "Do something on openvibe.live",
"href": "https://openvibe.live/",
"weight": 1,
"count": 1,
"verification": "event subject, count within the person's local day",
"status": "approved",
"source": "quest"
}Rejected: no-topic
{
"id": "broken",
"site": "openvibe.live",
"sentence": "Go live",
"href": "https://openvibe.live/",
"weight": 1,
"status": "pending"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('quest.step-type@1', value); // { valid, errors: [{ path, message }] }