{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/clerkfield-com/json-schema/clerkfield-com-lien-search-result-schema.json",
  "title": "LienSearchResult",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/clerkfield-com-openapi.json#/components/schemas/LienSearchResult",
  "type": "object",
  "properties": {
    "query": {
      "type": "object"
    },
    "summary": {
      "type": "object",
      "properties": {
        "total": {
          "type": "integer"
        },
        "active": {
          "type": "integer"
        },
        "lapsed": {
          "type": "integer"
        },
        "terminated": {
          "type": "integer"
        },
        "activeSecuredParties": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "notPublished": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "filings": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LienFiling"
      }
    },
    "searchedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "LienFiling": {
      "type": "object",
      "properties": {
        "state": {
          "type": "string"
        },
        "fileNumber": {
          "type": "string"
        },
        "filedOn": {
          "type": "string"
        },
        "lapseOn": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "active",
            "lapsed",
            "terminated",
            "unknown"
          ]
        },
        "debtors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LienParty"
          }
        },
        "securedParties": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/LienParty"
          }
        },
        "events": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "continuation",
                  "amendment",
                  "assignment",
                  "termination",
                  "other"
                ]
              },
              "fileNumber": {
                "type": "string"
              },
              "filedOn": {
                "type": "string"
              },
              "detail": {
                "type": "string"
              }
            }
          }
        },
        "collateral": {
          "type": "string"
        },
        "unavailable": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "source": {
          "$ref": "#/$defs/Source"
        }
      }
    },
    "LienParty": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "former": {
          "type": "boolean"
        }
      }
    },
    "Source": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "asOf": {
          "type": "string",
          "description": "Date of the data, YYYY-MM-DD."
        }
      }
    }
  }
}