{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recognitium-com/json-schema/recognitium-com-database-correlate-request-schema.json",
  "title": "DatabaseCorrelateRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recognitium-com-openapi.json#/components/schemas/DatabaseCorrelateRequest",
  "properties": {
    "database_id": {
      "type": "string",
      "title": "Database Id"
    },
    "table_name": {
      "type": "string",
      "title": "Table Name"
    },
    "schema_hash": {
      "type": "string",
      "title": "Schema Hash"
    },
    "row_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Row Count"
    },
    "merkle_root": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Merkle Root"
    },
    "rows": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/DatabaseRowCommitment"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rows"
    },
    "stream_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stream Id"
    },
    "state_index": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "State Index"
    },
    "value": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Value"
    },
    "next_anchor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Anchor"
    }
  },
  "type": "object",
  "required": [
    "database_id",
    "table_name",
    "schema_hash"
  ],
  "$defs": {
    "DatabaseRowCommitment": {
      "properties": {
        "row_id": {
          "type": "string",
          "title": "Row Id"
        },
        "row_hash": {
          "type": "string",
          "title": "Row Hash"
        },
        "auth_receipt_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Auth Receipt Id"
        }
      },
      "type": "object",
      "required": [
        "row_id",
        "row_hash"
      ],
      "title": "DatabaseRowCommitment"
    }
  }
}