{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/medianfi-com/json-schema/medianfi-com-accounting-class-proposal-bulk-action-response-schema.json",
  "title": "AccountingClassProposalBulkActionResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/medianfi-com-accounting-classes-api-openapi.yml#/components/schemas/AccountingClassProposalBulkActionResponse",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "data": {
      "type": "object",
      "properties": {
        "results": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AccountingClassProposalActionResult"
          }
        }
      }
    }
  },
  "$defs": {
    "AccountingClass": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "companyId": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "draft",
            "active",
            "inactive"
          ]
        },
        "source": {
          "type": "string",
          "enum": [
            "accountant",
            "bookkeeping_engine",
            "import"
          ]
        },
        "isActive": {
          "type": "boolean"
        },
        "approvedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "approvedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "AccountingClassProposal": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "companyId": {
          "type": "string",
          "format": "uuid"
        },
        "engineRunId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "transactionId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "transactionSplitId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "proposedClassId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "proposedClassName": {
          "type": [
            "string",
            "null"
          ]
        },
        "proposedClass": {
          "oneOf": [
            {
              "$ref": "#/$defs/AccountingClass"
            },
            {
              "type": "null"
            }
          ]
        },
        "approvedClassId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "status": {
          "type": "string",
          "enum": [
            "proposed",
            "approved",
            "applied",
            "rejected",
            "correction_proposed"
          ]
        },
        "confidence": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        },
        "applyEligibility": {
          "type": "boolean"
        },
        "source": {
          "type": "string",
          "enum": [
            "bookkeeping_engine",
            "accountant",
            "import"
          ]
        },
        "reasoningSummary": {
          "type": [
            "string",
            "null"
          ]
        },
        "evidence": {
          "type": "object",
          "additionalProperties": true
        },
        "metadata": {
          "type": "object",
          "additionalProperties": true
        },
        "approvedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "approvedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "appliedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "rejectedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "rejectedByUserId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "AccountingClassProposalActionResult": {
      "type": "object",
      "properties": {
        "proposal": {
          "$ref": "#/$defs/AccountingClassProposal"
        },
        "outcome": {
          "type": "string",
          "enum": [
            "approved",
            "applied",
            "rejected",
            "correction_proposed"
          ]
        },
        "transactionId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        },
        "classId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid"
        }
      }
    }
  }
}