{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dealroom/json-schema/dealroom-entity-valuations-response-schema.json",
  "title": "EntityValuationsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dealroom-companies-api-openapi.yml#/components/schemas/EntityValuationsResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EntityValuationItem"
      }
    },
    "page": {
      "type": "object",
      "properties": {
        "total": {
          "type": [
            "number",
            "null"
          ]
        },
        "limit": {
          "type": "number"
        },
        "offset": {
          "type": "number"
        },
        "next_cursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque cursor for the next page. Null when no further pages exist."
        },
        "prev_cursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Opaque cursor for the previous page. Null when on the first page."
        }
      },
      "required": [
        "total",
        "limit",
        "offset",
        "next_cursor",
        "prev_cursor"
      ]
    },
    "currency": {
      "type": "string"
    }
  },
  "required": [
    "data",
    "page",
    "currency"
  ],
  "$defs": {
    "EntityValuationItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number"
        },
        "value": {
          "type": [
            "number",
            "null"
          ]
        },
        "valued_date": {
          "anyOf": [
            {
              "$ref": "#/$defs/PartialDate"
            },
            {
              "type": "null"
            }
          ]
        },
        "is_estimate": {
          "type": [
            "boolean",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "value",
        "valued_date",
        "is_estimate"
      ]
    },
    "PartialDate": {
      "type": "string",
      "pattern": "^\\d{4}(-\\d{2}(-\\d{2})?)?$",
      "description": "A date at the precision the source knows it. The value's length is its precision: `YYYY` when only the year is known, `YYYY-MM` for the month, `YYYY-MM-DD` for the day. Never padded: an unknown month or day shortens the value rather than defaulting to `01`. Deliberately not `format: date`, which requires a full day."
    }
  }
}