VipPolicyResult vip.policy-result@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-result.v1.json
vip.policy-result@1: answers about gated-resource rules on OpenVibe.VIP (vip.resource.policy.get, vip.resource.policy.set). GET /api/v1/policies?service=&type=&id=&owner= → { rule }: the owner's active rule for that resource (owner, the creator's usr_ id or network, is required for services; a person defaults to themselves; 404 vip.rule_not_found when there is none); GET /api/v1/policies[?creator=] → { rules }: a creator's active rules, newest first; GET /api/v1/policies/:id → { rule }; POST /api/v1/policies (201) → { rule }; DELETE /api/v1/policies/:id → { rule } (now disabled).
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: rule
{
"rule": {
"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"
}
}Valid: rules
{
"rules": [
{
"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: empty
{}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vip.policy-result@1', value); // { valid, errors: [{ path, message }] }