DealsOffer deals.offer@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.v1.json
deals.offer@1: one deal as OpenVibe.Deals presents it (server/domain/publication.js offerDto; the API and /d/:slug.json): the canonical (root) offer of a merge group with its store, product, price observations (the latest is "latest", never "current": freshness says whether it still holds), sources, the offers merged into it, votes, hotness and the indexability decision.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
id | string | yes | ||
slug | string | yes | ||
url | string | yes | ||
title | string | yes | ||
description | string | null | |||
link | string | yes | The offer on the store. | |
status | string | yes | active, expired, disabled | |
category | string | null | |||
origin | string | yes | ||
submitted_by | string | null | |||
text_origin | string | null | |||
review_state | string | null | |||
ai_summary | string | null | |||
expires_at | string | null |
| ||
expired_at | string | null |
| ||
expired_reason | string | null | |||
disabled_reason | string | null | |||
created_at | string | null | yes |
| |
updated_at | string | null |
| ||
store | object | null | |||
product | object | null | |||
latest_observation | one of | |||
freshness | any | |||
observations | array of object | yes | ||
observations[].id | string | yes | ||
observations[].observed_at | string | null | yes |
| |
observations[].recorded_at | string | null |
| ||
observations[].price | string | null | |||
observations[].currency | string | null | |||
observations[].shipping | string | null | |||
observations[].shipping_note | string | null | |||
observations[].condition | enum |
| ||
observations[].availability | enum |
| ||
observations[].origin | string | yes | ||
observations[].observed_by | string | null | |||
observations[].listing | string | null | |||
observations[].source | object | yes | ||
observations[].source.id | string | null | |||
observations[].source.kind | string | null | |||
observations[].source.ref | object | null | |||
observations[].source.key | string | null | |||
observations[].source.url | string | null | |||
sources | array of object | |||
merged_from | array of object | |||
merged_from[].id | string | |||
merged_from[].slug | string | |||
merged_from[].title | string | |||
merged_from[].merged_at | string | null |
| ||
votes | object | yes | ||
votes.up | integer | yes |
| |
votes.down | integer | yes |
| |
votes.up_weight | number | yes | ||
votes.down_weight | number | yes | ||
hotness | object | null | |||
indexability | object | yes | ||
indexability.indexable | boolean | yes | ||
indexability.robots | string | |||
indexability.reasons | array |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: active
{
"id": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"slug": "usb-c-capture-card-79",
"url": "https://openvibe.deals/d/usb-c-capture-card-79",
"title": "USB-C 4K capture card for $79.99",
"description": null,
"link": "https://shop.example.com/capture-card",
"status": "active",
"category": "streaming",
"origin": "community",
"submitted_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"text_origin": "human",
"review_state": null,
"ai_summary": null,
"expires_at": null,
"expired_at": null,
"expired_reason": null,
"disabled_reason": null,
"created_at": "2026-09-25T18:00:00.000Z",
"updated_at": "2026-09-25T18:00:00.000Z",
"store": {
"id": "dst_1",
"domain": "shop.example.com",
"name": "Example Shop",
"url": "https://openvibe.deals/s/shop.example.com"
},
"product": null,
"latest_observation": {
"id": "dob_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"observed_at": "2026-09-25T18:00:00.000Z",
"recorded_at": "2026-09-25T18:00:02.000Z",
"price": "79.99",
"currency": "USD",
"shipping": "0",
"shipping_note": null,
"condition": "new",
"availability": "in_stock",
"origin": "community",
"observed_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"listing": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"source": {
"id": "dsr_01JAB2C3D4E5F6G7H8J9K0MNPS",
"kind": "community",
"ref": null,
"key": null,
"url": null
}
},
"freshness": {
"state": "fresh"
},
"observations": [
{
"id": "dob_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"observed_at": "2026-09-25T18:00:00.000Z",
"recorded_at": "2026-09-25T18:00:02.000Z",
"price": "79.99",
"currency": "USD",
"shipping": "0",
"shipping_note": null,
"condition": "new",
"availability": "in_stock",
"origin": "community",
"observed_by": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ",
"listing": "dof_01JAB2C3D4E5F6G7H8J9K0MNPR",
"source": {
"id": "dsr_01JAB2C3D4E5F6G7H8J9K0MNPS",
"kind": "community",
"ref": null,
"key": null,
"url": null
}
}
],
"sources": [],
"merged_from": [],
"votes": {
"up": 12,
"down": 1,
"up_weight": 11.5,
"down_weight": 1
},
"hotness": null,
"indexability": {
"indexable": true,
"robots": "index,follow",
"reasons": []
}
}Rejected: negative-votes
{
"id": "d",
"slug": "s",
"url": "u",
"title": "t",
"link": "l",
"status": "active",
"origin": "community",
"created_at": null,
"observations": [],
"votes": {
"up": -1,
"down": 0,
"up_weight": 0,
"down_weight": 0
},
"indexability": {
"indexable": true
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('deals.offer@1', value); // { valid, errors: [{ path, message }] }