{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/financeops-result-package.schema.json",
  "title": "FinanceOps Result Package",
  "type": "object",
  "required": [
    "object_type",
    "package_id",
    "requested_tool",
    "workflow_type",
    "reconciliation_status",
    "result_status"
  ],
  "properties": {
    "object_type": {
      "const": "financeops_result_package"
    },
    "package_id": {
      "type": "string"
    },
    "requested_tool": {
      "const": "financeops"
    },
    "workflow_type": {
      "type": "string"
    },
    "reconciliation_status": {
      "enum": [
        "reconciled",
        "exception_open",
        "partial",
        "insufficient"
      ]
    },
    "evidence_score": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "result_status": {
      "enum": [
        "ready",
        "ready_with_open_items",
        "waiting_on_evidence",
        "closed"
      ]
    },
    "summary": {
      "type": "string"
    },
    "open_exceptions": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "settlement_receipt_url": {
      "type": "string"
    },
    "usage_receipt_url": {
      "type": "string"
    },
    "task_ledger_url": {
      "type": "string"
    },
    "attestation_url": {
      "type": "string"
    },
    "callback_status": {
      "type": "string"
    },
    "next_action": {
      "type": "string"
    }
  }
}