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

FieldTypeRequiredDescriptionConstraints
idstringyes
slugstringyes
urlstringyes
titlestringyes
descriptionstring | null
linkstringyesThe offer on the store.
statusstringyesactive, expired, disabled
categorystring | null
originstringyes
submitted_bystring | null
text_originstring | null
review_statestring | null
ai_summarystring | null
expires_atstring | null
  • format date-time
expired_atstring | null
  • format date-time
expired_reasonstring | null
disabled_reasonstring | null
created_atstring | nullyes
  • format date-time
updated_atstring | null
  • format date-time
storeobject | null
productobject | null
latest_observationone of
freshnessany
observationsarray of objectyes
observations[].idstringyes
observations[].observed_atstring | nullyes
  • format date-time
observations[].recorded_atstring | null
  • format date-time
observations[].pricestring | null
observations[].currencystring | null
observations[].shippingstring | null
observations[].shipping_notestring | null
observations[].conditionenum
  • one of "new", "used", "refurbished", "damaged", null
observations[].availabilityenum
  • one of "in_stock", "out_of_stock", "preorder", "discontinued", "limited", "sold_out", "online_only", "in_store_only", null
observations[].originstringyes
observations[].observed_bystring | null
observations[].listingstring | null
observations[].sourceobjectyes
observations[].source.idstring | null
observations[].source.kindstring | null
observations[].source.refobject | null
observations[].source.keystring | null
observations[].source.urlstring | null
sourcesarray of object
merged_fromarray of object
merged_from[].idstring
merged_from[].slugstring
merged_from[].titlestring
merged_from[].merged_atstring | null
  • format date-time
votesobjectyes
votes.upintegeryes
  • minimum 0
votes.downintegeryes
  • minimum 0
votes.up_weightnumberyes
votes.down_weightnumberyes
hotnessobject | null
indexabilityobjectyes
indexability.indexablebooleanyes
indexability.robotsstring
indexability.reasonsarray

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 }] }