TipsOverlayConfigRequest tips.overlay-config-request@1

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

Version
1.0.0
Owner
tips
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/tips/overlay-config-request.v1.json

tips.overlay-config-request@1: bodies of tips.overlay.config.update on OpenVibe.Tips. POST /api/v1/overlay-configs: { kind, creator?, name?, goal_id?, …settings } creates a config (kind alerts or goal; settings a kind does not use are ignored; a service names the creator). PATCH /api/v1/overlay-configs/:id: { revision?, name?, goal_id?, …settings } changes one (revision, when given, must be current: 409 tips.revision_conflict); open overlays using it receive the change at once. The settings are top-level fields. Needs an Idempotency-Key header (8-200 of A-Z a-z 0-9 . _ : -; 400 idempotency.key_required): a replay with the same key and body returns the first answer, the same key with another body is 422 idempotency.key_reused. Refusals are problem+json: 422 tips.invalid_input (a bad kind or an out-of-range setting) or tips.text_too_long; 404 tips.goal_not_found, tips.overlay_config_not_found or tips.creator_not_found; 403 capability.denied or tips.forbidden. Unknown fields are ignored.

Fields

This schema has no named fields.

Examples

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

Valid: create-alerts
{
  "kind": "alerts",
  "name": "Big tips only",
  "min_amount": 1000,
  "duration_ms": 12000,
  "speak_message": true,
  "sound_url": "https://openvibe.media/f/cheer.mp3"
}
Valid: patch
{
  "revision": 1,
  "show_amount": false,
  "template": "{name} sent {amount}!"
}
Rejected: short-duration
{
  "kind": "alerts",
  "duration_ms": 100
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('tips.overlay-config-request@1', value);   // { valid, errors: [{ path, message }] }