{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/permtracker-app/json-schema/permtracker-app-export-schema.json",
  "title": "Export",
  "description": "A search's whole answer as rows.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/permtracker-app-exports-api-openapi.yml#/components/schemas/Export",
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "cases",
        "employers",
        "law-firms",
        "occupations"
      ],
      "description": "What was exported."
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      },
      "description": "The rows. The CSV form carries the same rows."
    },
    "count": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Rows in this answer."
    },
    "cap": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "The most rows one export may hold on this plan."
    },
    "truncated": {
      "type": "boolean",
      "description": "True when more matched than the export holds."
    },
    "note": {
      "description": "What to do when the export was cut short.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "kind",
    "rows",
    "count",
    "cap",
    "truncated",
    "note"
  ],
  "additionalProperties": {}
}