{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/avahit-com/json-schema/avahit-com-catalog-page-schema.json",
  "title": "CatalogPage",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/avahit-com-openapi.json#/components/schemas/CatalogPage",
  "type": "object",
  "required": [
    "about",
    "page",
    "pageCount",
    "total",
    "next",
    "products"
  ],
  "properties": {
    "about": {
      "type": "object",
      "description": "What the catalog is, its limits and where the other endpoints live."
    },
    "page": {
      "type": "integer"
    },
    "pageCount": {
      "type": "integer"
    },
    "total": {
      "type": "integer"
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Product"
      }
    }
  },
  "$defs": {
    "Product": {
      "type": "object",
      "required": [
        "url",
        "title",
        "store"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The product page on avahit.com"
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "price": {
          "type": [
            "number",
            "null"
          ],
          "description": "Null for Amazon products."
        },
        "previousPrice": {
          "type": [
            "number",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "category": {
          "type": "string"
        },
        "store": {
          "type": [
            "string",
            "null"
          ],
          "description": "The store's domain"
        },
        "inStock": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "priceVerifiedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "ourLowest": {
          "type": [
            "object",
            "null"
          ]
        },
        "storeRating": {
          "type": [
            "object",
            "null"
          ]
        },
        "editorsPick": {
          "type": "boolean"
        },
        "variantOf": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri",
          "description": "The main page when this product is a size or color of another."
        },
        "creatorOwnership": {
          "type": "string",
          "enum": [
            "bought it",
            "received it free from the brand",
            "has not used it"
          ]
        },
        "addedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}