HostCatalogManageRequest host.catalog-manage-request@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-request.v1.json
host.catalog-manage-request@1: bodies of host.catalog.manage on OpenVibe.Host (a Network staff user only). POST/PATCH /api/v1/catalog/providers { slug, name, homepage_url, description?, affiliate_url?, affiliate_note?, status? }; POST/PATCH /api/v1/catalog/plans { provider_id, external_id, name, kind, currency, price_monthly, source_url, vcpu?, ram_mb?, disk_gb?, disk_type?, bandwidth_gb?, unmetered?, port_mbps?, ipv4?, locations?, price_hourly?, setup_fee?, checked_at?, status? } (a plan from OpenVibe.Sources takes only status); POST/PATCH /api/v1/catalog/promos { provider_id, title, url, details?, code?, affiliate?, starts_at?, ends_at?, status? }. A PATCH carries any subset. Unknown fields are refused (422 host.catalog.invalid); a missing entry is 404 host.catalog.not_found; anyone but staff is 403 host.catalog.forbidden. A staff plan's checked_at defaults to now: the staff member confirming the price that day.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: plan
{
"provider_id": "hpv_01M4C49CW34NGX7TR2TNRVFWNW",
"external_id": "cx22",
"name": "CX22",
"kind": "cloud",
"vcpu": 2,
"ram_mb": 4096,
"disk_gb": 40,
"disk_type": "nvme",
"bandwidth_gb": 20480,
"ipv4": 1,
"locations": [
"Falkenstein",
"Nuremberg",
"Helsinki"
],
"currency": "EUR",
"price_monthly": 4.59,
"source_url": "https://www.hetzner.com/cloud/"
}Valid: promo
{
"provider_id": "hpv_01M4C49CW34NGX7TR2TNRVFWNW",
"title": "First month free",
"url": "https://www.example.com/offer",
"affiliate": false,
"ends_at": 1793491200000
}Valid: provider
{
"slug": "hetzner",
"name": "Hetzner",
"homepage_url": "https://www.hetzner.com/",
"affiliate_url": null,
"status": "active"
}Valid: status-only
{
"status": "hidden"
}Rejected: negative-price
{
"provider_id": "hpv_01M4C49CW34NGX7TR2TNRVFWNW",
"external_id": "x",
"name": "X",
"kind": "vps",
"currency": "USD",
"price_monthly": -1,
"source_url": "https://example.com/"
}Rejected: unknown-field
{
"slug": "x",
"name": "X",
"homepage_url": "https://x.example/",
"rank_boost": 10
}Rejected: unknown-kind
{
"provider_id": "hpv_01M4C49CW34NGX7TR2TNRVFWNW",
"external_id": "x",
"name": "X",
"kind": "shared",
"currency": "USD",
"price_monthly": 1,
"source_url": "https://example.com/"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('host.catalog-manage-request@1', value); // { valid, errors: [{ path, message }] }