{
  "$id": "https://redlightindex.com/schema/prices.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "items": {
    "additionalProperties": false,
    "properties": {
      "availability": {
        "type": "string"
      },
      "currency": {
        "enum": [
          "USD"
        ],
        "type": "string"
      },
      "device_id": {
        "type": "string"
      },
      "notes": {
        "type": "string"
      },
      "observed_at": {
        "pattern": "^$|^[0-9]{4}-[0-9]{2}-[0-9]{2}$",
        "type": "string"
      },
      "price_id": {
        "type": "string"
      },
      "price_type": {
        "enum": [
          "retail",
          "sale",
          "quote"
        ],
        "type": "string"
      },
      "price_usd": {
        "pattern": "^$|^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
        "type": "string"
      },
      "source_archive_url": {
        "pattern": "^$|^https://.*$",
        "type": "string"
      },
      "source_url": {
        "pattern": "^$|^https://.*$",
        "type": "string"
      }
    },
    "required": [
      "price_id",
      "device_id",
      "price_usd",
      "price_type",
      "currency",
      "observed_at",
      "source_url",
      "source_archive_url",
      "availability",
      "notes"
    ],
    "type": "object"
  },
  "title": "Red Light Index prices rows",
  "type": "array"
}
