VipPlanUpdateRequest vip.plan-update-request@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/plan-update-request.v1.json
vip.plan-update-request@1: bodies of vip.plan.update on OpenVibe.VIP. PATCH /api/v1/plans/:id: { name?, description?, benefits?, perks?, change_note? } writes version N+1 from the latest terms plus these changes (published at once when the plan is published; nothing is written when nothing changed). POST /api/v1/plans/:id/publish takes no body and publishes the latest version. Refusals are problem+json: 404 vip.plan_not_found; 409 vip.plan_archived or vip.plan.billing_product_taken; 422 vip.invalid_input, vip.text_too_long or vip.perk_not_found; 403 capability.denied. Unknown fields are ignored.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: edit
{
"benefits": [
"Supporter badge in chat",
"Members-only VOD chapters"
],
"change_note": "added VOD chapters"
}Valid: publish
{}Rejected: perks-not-a-list
{
"perks": "chat-badge"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vip.plan-update-request@1', value); // { valid, errors: [{ path, message }] }