{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arcnautical-com/json-schema/arcnautical-com-fleet-exposure-schema.json",
  "title": "FleetExposure",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arcnautical-com-fleets-api-openapi.yml#/components/schemas/FleetExposure",
  "type": "object",
  "required": [
    "fleet_id",
    "vessel_count",
    "screened_count",
    "unscreened_count"
  ],
  "properties": {
    "fleet_id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "vessel_count": {
      "type": "integer",
      "description": "Hulls registered in the fleet."
    },
    "screened_count": {
      "type": "integer",
      "description": "Of those, how many have a screening on record."
    },
    "unscreened_count": {
      "type": "integer",
      "description": "Registered but never screened. NOT clean — unknown. Read this first."
    },
    "assessed_count": {
      "type": "integer",
      "description": "Hulls whose ownership and vetting were actually measured."
    },
    "oldest_screening_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Staleness of the oldest hull in the fleet."
    },
    "sanctions": {
      "type": "object",
      "description": "Count per sanctions status, e.g. {\"GREEN\": 812, \"RED\": 3}.",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "ownership_opacity": {
      "type": "object",
      "description": "Count per band. NOT_ASSESSED is its own bucket, never folded into MEDIUM.",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "vetting_grades": {
      "type": "object",
      "description": "Count per A-E grade, assessed hulls only.",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "flagged": {
      "type": "array",
      "description": "RED first, then AMBER, each with the screening that says so.",
      "items": {
        "type": "object",
        "properties": {
          "imo": {
            "type": "string"
          },
          "sanctions_status": {
            "type": "string",
            "enum": [
              "RED",
              "AMBER"
            ]
          },
          "screening_id": {
            "type": "string",
            "format": "uuid"
          },
          "screened_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  }
}