{
  "$defs": {
    "DiscoverCondition": {
      "description": "A single structured discovery filter.",
      "properties": {
        "field": {
          "description": "Allowlisted canonical field path evaluated by the structured API.\nArbitrary `itemData` traversal is available only through raw MARS-QL.",
          "type": "string"
        },
        "op": {
          "description": "Canonical operator compatible with the selected field's value type.",
          "type": "string"
        },
        "value": {
          "description": "Typed scalar or bounded array required by the selected field/operator."
        }
      },
      "required": [
        "field",
        "op",
        "value"
      ],
      "type": "object"
    }
  },
  "$id": "urn:mars:schema:v1:discover-request",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Request body for `POST /v1/discover`.",
  "properties": {
    "conditions": {
      "default": [],
      "description": "Filter conditions joined with logical AND.",
      "items": {
        "$ref": "#/$defs/DiscoverCondition"
      },
      "type": "array"
    },
    "cursor": {
      "description": "Opaque, expiring HMAC-authenticated keyset cursor from the preceding page.",
      "type": [
        "string",
        "null"
      ]
    },
    "entryType": {
      "description": "Exact canonical [`crate::entry::EntryType`] name. Omit to search every\nentry type; clause fragments and aliases are rejected.",
      "type": [
        "string",
        "null"
      ]
    },
    "limit": {
      "description": "Maximum number of results.",
      "format": "uint64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    }
  },
  "title": "DiscoverRequest",
  "type": "object"
}
