{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/financeops-exception-record.schema.json",
  "title": "FinanceOps Exception Record",
  "type": "object",
  "required": [
    "object_type",
    "exception_id",
    "requested_tool",
    "exception_type",
    "status"
  ],
  "properties": {
    "object_type": {
      "const": "financeops_exception_record"
    },
    "exception_id": {
      "type": "string"
    },
    "requested_tool": {
      "const": "financeops"
    },
    "exception_type": {
      "enum": [
        "amount_mismatch",
        "missing_confirmation",
        "duplicate_record",
        "unmatched_record",
        "stale_record",
        "needs_operator_review"
      ]
    },
    "status": {
      "enum": [
        "open",
        "waiting_on_agent",
        "waiting_on_operator",
        "resolved",
        "closed"
      ]
    },
    "summary": {
      "type": "string"
    },
    "missing_items": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "safe_to_replay": {
      "type": "boolean"
    },
    "next_action": {
      "type": "string"
    }
  }
}