HostCatalogManageResult host.catalog-manage-result@1

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

Version
1.0.0
Owner
host
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/host/catalog-manage-result.v1.json

host.catalog-manage-result@1: the saved entry, under its type's name: { provider } (with affiliate_rel and affiliate_disclosure when it has an affiliate link), { plan } or { promo } (an active promo past ends_at reads as ended). 201 on create, 200 on update.

Fields

This schema has no named fields.

Examples

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

Valid: plan
{
  "plan": {
    "id": "hpl_01M4C49CWJCFYGJS3T7NFZFQYX",
    "external_id": "cx22",
    "name": "CX22",
    "currency": "EUR",
    "price_monthly": "4.5900",
    "origin": "staff"
  }
}
Valid: provider
{
  "provider": {
    "id": "hpv_01M4C49CW34NGX7TR2TNRVFWNW",
    "slug": "hetzner",
    "name": "Hetzner",
    "homepage_url": "https://www.hetzner.com/",
    "affiliate_url": null,
    "affiliate_rel": null,
    "affiliate_disclosure": null,
    "status": "active"
  }
}
Rejected: empty
{}
Rejected: wrong-key
{
  "entry": {
    "id": "hpl_01M4C49CWJCFYGJS3T7NFZFQYX"
  }
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('host.catalog-manage-result@1', value);   // { valid, errors: [{ path, message }] }