VipPolicyRule vip.policy-rule@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- vip
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/vip/policy-rule.v1.json
vip.policy-rule@1: a gated-resource rule on OpenVibe.VIP (server/domain/policies.js present): resource R (an EntityRef the product owns) is for members of creator C (requirement member), members of one plan (plan, plan_id), or members whose plan version includes a perk (perk, perk_key). sensitive rules always ask Billing, never the projection. A rule that was replaced or removed is disabled.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes |
| |
creator | one of | yes | ||
creator_id | string | yes |
| |
resource | common.entity-ref | yes | ||
requirement | enum | yes |
| |
plan_id | string | null | yes | ||
perk_key | string | null | yes | ||
sensitive | boolean | yes | ||
status | enum | yes |
| |
updated_at | string | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: perk
{
"id": "vgr_01JAB2C3D4E5F6G7H8J9K0MNPY",
"creator": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"resource": {
"service": "blog",
"type": "post",
"id": "pst_01JAB2C3D4E5F6G7H8J9K0MNPZ"
},
"requirement": "perk",
"plan_id": null,
"perk_key": "chat-badge",
"sensitive": false,
"status": "active",
"updated_at": "2026-09-20T18:04:11.402Z"
}Rejected: bad-requirement
{
"id": "vgr_01JAB2C3D4E5F6G7H8J9K0MNPY",
"creator": {
"type": "user",
"id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
},
"creator_id": "vcr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"resource": {
"service": "blog",
"type": "post",
"id": "pst_01JAB2C3D4E5F6G7H8J9K0MNPZ"
},
"requirement": "follower",
"plan_id": null,
"perk_key": "chat-badge",
"sensitive": false,
"status": "active",
"updated_at": "2026-09-20T18:04:11.402Z"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vip.policy-rule@1', value); // { valid, errors: [{ path, message }] }