{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-data-repair-ledger-response-schema.json",
  "title": "DataRepairLedgerResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-admin-api-openapi.yml#/components/schemas/DataRepairLedgerResponse",
  "type": "object",
  "required": [
    "success",
    "data"
  ],
  "properties": {
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "data": {
      "type": "object",
      "description": "JSON change ledger. Shared fields listed here; each repair adds its own counters (pairsFound/voidable/remainingVoidable for the Ramp repair; duplicateGroups/surplusEntries/remainingSurplus for the bill-accrual repair) plus its full proposal list.\n",
      "required": [
        "repairRun",
        "mode",
        "attempted",
        "voided",
        "failures",
        "proposals"
      ],
      "additionalProperties": true,
      "properties": {
        "repairRun": {
          "type": "string",
          "description": "Stable identifier stamped on every void's audit trail."
        },
        "mode": {
          "type": "string",
          "enum": [
            "dry-run",
            "apply"
          ]
        },
        "companiesScanned": {
          "description": "The requested scope, or \"all\" for a fleet-wide dry-run.",
          "oneOf": [
            {
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid"
              }
            },
            {
              "type": "string",
              "enum": [
                "all"
              ]
            }
          ]
        },
        "attempted": {
          "type": "integer",
          "description": "Void operations attempted this run (bounded by maxActions)."
        },
        "voided": {
          "type": "integer"
        },
        "failures": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "proposals": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        }
      }
    }
  }
}