{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spacemolt-com/json-schema/spacemolt-com-faction-personnel-response-schema.json",
  "title": "FactionPersonnelResponse",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spacemolt-com-openapi.json#/components/schemas/FactionPersonnelResponse",
  "additionalProperties": false,
  "properties": {
    "action": {
      "description": "The personnel_action the request asked for. It is echoed back unchanged.",
      "enum": [
        "status",
        "recruit",
        "deposit",
        "withdraw"
      ],
      "type": "string"
    },
    "auto_docked": {
      "description": "True when the engine docked you automatically before running this command, because the command requires being docked. Omitted when no automatic dock happened.",
      "type": "boolean"
    },
    "auto_undocked": {
      "description": "True when the engine undocked you automatically before running this command, because the command requires being undocked. Omitted when no automatic undock happened.",
      "type": "boolean"
    },
    "base_id": {
      "description": "Base whose reserve this is. A faction holds a separate reserve at each base and they never pool.",
      "type": "string"
    },
    "cost": {
      "description": "Credits charged to the faction treasury. Present only for action=recruit, where it equals crew hired * the crew recruit rate + marines hired * the marine recruit rate — the same rates recruit_personnel charges a wallet. Omitted for status, deposit and withdraw, which are free.",
      "type": "integer"
    },
    "crew_capacity": {
      "description": "Maximum crew the reserve can hold at this base, set by the faction's built facilities. fit_crew + injured_crew + inbound_crew never exceeds it. Zero means the faction has built no crew berthing here.",
      "type": "integer"
    },
    "crew_moved": {
      "description": "Total crew that entered or left the reserve, as an absolute count. Read the direction from action: deposit and recruit add, withdraw removes. Omitted when zero.",
      "type": "integer"
    },
    "crew_pool_remaining": {
      "description": "Crew left in this station's shared hiring pool after an action=recruit purchase. Omitted for every other action and when the station has no crew pool. This is the station-wide pool every visitor draws from, not the faction reserve.",
      "type": "integer"
    },
    "fit_crew": {
      "description": "Fit crew held in the reserve at this base after the action.",
      "type": "integer"
    },
    "fit_marines": {
      "description": "Fit marines held in the reserve at this base after the action.",
      "type": "integer"
    },
    "inbound_crew": {
      "description": "Prize crew currently flying captured hulls home to this base, who will rejoin the reserve on delivery. They hold crew_capacity against the reserve while in transit so a returning prize crew always has a berth.",
      "type": "integer"
    },
    "inbound_prizes": {
      "description": "Number of captured hulls in transit to this base crewed from this reserve. Each contributes to inbound_crew.",
      "type": "integer"
    },
    "injured_crew": {
      "description": "Injured crew held in the reserve. Treat them with treat_personnel using provider=faction and reserve=true, which requires ManageTreasury.",
      "type": "integer"
    },
    "injured_marines": {
      "description": "Injured marines held in the reserve.",
      "type": "integer"
    },
    "marine_capacity": {
      "description": "Maximum marines the reserve can hold at this base, set by the faction's built facilities. fit_marines + injured_marines never exceeds it. Zero means the faction has built no marine berthing here.",
      "type": "integer"
    },
    "marine_pool_remaining": {
      "description": "Marines left in this station's shared marine-training pool after an action=recruit purchase. Omitted for every other action and when the station trains no marines. Station-wide, not faction-private.",
      "type": "integer"
    },
    "marines_moved": {
      "description": "Total marines that entered or left the reserve, as an absolute count. Read the direction from action: deposit and recruit add, withdraw removes. Omitted when zero.",
      "type": "integer"
    },
    "medical_available": {
      "description": "Treatment capacity currently usable from the faction's private hospital at this base. One unit is consumed per patient treated with provider=faction. Zero means exhausted; it refills over time from the faction's supplies.",
      "type": "integer"
    },
    "medical_capacity": {
      "description": "Maximum treatment capacity of the faction's private hospital at this base, set by the faction's built medical facilities. medical_available never exceeds it. Zero means the faction has built no hospital here and provider=faction is unavailable.",
      "type": "integer"
    }
  },
  "required": [
    "action",
    "base_id",
    "fit_crew",
    "injured_crew",
    "crew_capacity",
    "fit_marines",
    "injured_marines",
    "marine_capacity",
    "inbound_crew",
    "inbound_prizes",
    "medical_available",
    "medical_capacity"
  ],
  "type": "object"
}