DeliveryOffer platform.delivery-offer@1
Generated at from
openvibe-contracts v0.84.0 and
openvibe-sdk v0.26.0.
- Version
- 1.0.0
- Owner
- network
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-034
- Schema
https://openvibe.network/contracts/platform/delivery-offer.v1.json
Transport and edge delivery capacity with cache policy and pricing (T1 Universal Fabric; ADR-034 proposed).
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes | ||
transports | array of enum | yes |
| |
regions | array of string | yes |
| |
edge | boolean | yes | ||
node | string | |||
price_per_gb_usd | number | yes | Estimated USD |
|
price_per_request_usd | number | yes | Estimated USD |
|
cache_rules | object | yes |
| |
cache_rules.enabled | boolean | yes | ||
cache_rules.ttl_seconds | integer |
| ||
cache_rules.max_object_mb | number |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"id": "delivery-1",
"transports": [
"http",
"hls"
],
"regions": [
"us-west"
],
"edge": true,
"node": "node-1",
"price_per_gb_usd": 0.02,
"price_per_request_usd": 0.00001,
"cache_rules": {
"enabled": true,
"ttl_seconds": 300,
"max_object_mb": 100
}
}Rejected: missing-id
{
"transports": [
"http",
"hls"
],
"regions": [
"us-west"
],
"edge": true,
"node": "node-1",
"price_per_gb_usd": 0.02,
"price_per_request_usd": 0.00001,
"cache_rules": {
"enabled": true,
"ttl_seconds": 300,
"max_object_mb": 100
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('platform.delivery-offer@1', value); // { valid, errors: [{ path, message }] }