{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/neruva-io/json-schema/neruva-io-record-query-request-schema.json",
  "title": "RecordQueryRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/neruva-io-openapi.json#/components/schemas/RecordQueryRequest",
  "properties": {
    "text": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Text",
      "description": "Query text (auto-embedded). Omit for pure typed-filter scan ordered by ts desc."
    },
    "topK": {
      "type": "integer",
      "title": "Topk",
      "default": 10
    },
    "kind": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Kind",
      "description": "Restrict to these kinds."
    },
    "tagsAny": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tagsany",
      "description": "Match if record.tags intersects this list."
    },
    "tagsAll": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tagsall",
      "description": "Match only if record.tags is a superset of this list."
    },
    "tsGte": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tsgte"
    },
    "tsLt": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tslt"
    },
    "userId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Userid",
      "description": "Restrict to records tagged ``user:<uid>``. Sugar over tagsAll."
    },
    "includeText": {
      "type": "boolean",
      "title": "Includetext",
      "default": true
    },
    "includeMeta": {
      "type": "boolean",
      "title": "Includemeta",
      "default": true
    },
    "includeSuperseded": {
      "type": "boolean",
      "title": "Includesuperseded",
      "description": "Include records retired by a newer holder of the same ``meta.claim`` key. Default False: a superseded fact stays stored and auditable but must not answer as if it were current. Set True to read the history of a claim.",
      "default": false
    }
  },
  "additionalProperties": false,
  "type": "object"
}