DealsOfferActionRequest deals.offer-action-request@1
Generated at from
openvibe-contracts v0.53.0 and
openvibe-sdk v0.11.0.
- Version
- 1.0.0
- Owner
- deals
- Visibility
- first-party
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/deals/offer-action-request.v1.json
deals.offer-action-request@1: bodies of the deal actions on OpenVibe.Deals. POST /api/v1/offers/:id/expire (deals.offer.expire; the submitter or a moderator): { reason? } (a moderator's reason is recorded). POST …/disable (deals.offer.moderate): { reason } (3-300 characters, required); POST …/enable: { reason? }; POST …/review (a person): { note? }. POST …/merge (deals.offer.merge, moderators): { into, reason? } (the canonical deal, id or slug; no cycles, not an already merged offer); POST …/unmerge: { reason? }.
Fields
This schema has no named fields.
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: expire
{
"reason": "sold out everywhere"
}Valid: merge
{
"into": "usb-c-capture-card-79",
"reason": "same listing"
}Rejected: bad
{
"into": "",
"reason": 5
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('deals.offer-action-request@1', value); // { valid, errors: [{ path, message }] }