ShoesIndexDocumentUpsertedPayload shoes.index_document.upserted@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
shoes
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/shoes.index_document.upserted.v1.json

shoes.index_document.upserted v1 (OpenVibe.Shoes server/search-index.js, via openvibe-publishing/search-feed). The OpenVibe.Search document of a shoe model's page (type shoe, /shoe/<slug>): its name and brand, the lowest price seen today and how many stores sell it, and the next drop when one is dated. Models are Shoes' own catalogue, so they are sent by the sweep at boot and on a timer; a model that left the catalogue (or has no live offer) becomes a tombstone. The sequencer (shoes_index_revisions) gives an unchanged document its old revision and nothing is sent. Always visibility public and publication_state published. Facets: brand, stores, lowest_price. Consumed by OpenVibe.Search ('*.index_document.*'). Envelope: subject { type: shoe, id, revision: <document revision> }, visibility internal, actor service:shoes.

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: shoe-noindex
{
  "owner": "shoes",
  "type": "shoe",
  "id": "brand-new-model-x1y2z",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://open.shoes/shoe/brand-new-model-x1y2z",
  "title": "Brand New Model",
  "summary": "Nike Air Max 90 from $98 at 3 stores today. Prices, history and size curves on open.shoes.",
  "body": "Nike Air Max 90\nNike\nFrom $98 at 3 stores today.",
  "facets": {
    "brand": "Nike",
    "stores": 3,
    "lowest_price": 98
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "noindex",
    "reasons": [
      "thin_content"
    ]
  }
}
Valid: shoe
{
  "owner": "shoes",
  "type": "shoe",
  "id": "nike-air-max-90-3k7d2",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://open.shoes/shoe/nike-air-max-90-3k7d2",
  "title": "Nike Air Max 90",
  "summary": "Nike Air Max 90 from $98 at 3 stores today. Prices, history and size curves on open.shoes.",
  "body": "Nike Air Max 90\nNike\nFrom $98 at 3 stores today.",
  "facets": {
    "brand": "Nike",
    "stores": 3,
    "lowest_price": 98
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
Rejected: bad-id
{
  "owner": "shoes",
  "type": "shoe",
  "id": "Nike Air Max",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://open.shoes/shoe/nike-air-max-90-3k7d2",
  "title": "Nike Air Max 90",
  "summary": "Nike Air Max 90 from $98 at 3 stores today. Prices, history and size curves on open.shoes.",
  "body": "Nike Air Max 90\nNike\nFrom $98 at 3 stores today.",
  "facets": {
    "brand": "Nike",
    "stores": 3,
    "lowest_price": 98
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
Rejected: other-owner
{
  "owner": "deals",
  "type": "shoe",
  "id": "nike-air-max-90-3k7d2",
  "revision": 2,
  "deleted": false,
  "visibility": "public",
  "canonical_url": "https://open.shoes/shoe/nike-air-max-90-3k7d2",
  "title": "Nike Air Max 90",
  "summary": "Nike Air Max 90 from $98 at 3 stores today. Prices, history and size curves on open.shoes.",
  "body": "Nike Air Max 90\nNike\nFrom $98 at 3 stores today.",
  "facets": {
    "brand": "Nike",
    "stores": 3,
    "lowest_price": 98
  },
  "authorship": "human",
  "provenance": [],
  "publication_state": "published",
  "published_at": "2026-10-31T12:00:00.000Z",
  "updated_at": "2026-11-02T08:00:00.000Z",
  "indexability": {
    "decision": "index",
    "reasons": []
  }
}
Rejected: tombstone-as-upsert
{
  "owner": "shoes",
  "type": "shoe",
  "id": "nike-air-max-90-3k7d2",
  "revision": 3,
  "deleted": true
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('shoes.index_document.upserted@1', value);   // { valid, errors: [{ path, message }] }