{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://xn--82czbx2bczd4fl8a.online/agent-dispute/schema.json",
  "title": "AgentDisputeCase",
  "type": "object",
  "required": [
    "caseId",
    "openedAt",
    "claimType",
    "receiptJwt",
    "status"
  ],
  "properties": {
    "caseId": {
      "type": "string",
      "pattern": "^DSP-[0-9]{4}-[0-9]{6}$"
    },
    "openedAt": {
      "type": "string",
      "format": "date-time"
    },
    "closedAt": {
      "type": "string",
      "format": "date-time"
    },
    "claimType": {
      "enum": [
        "service-not-rendered",
        "incorrect-output",
        "sla-breach",
        "price-mismatch-vs-pricing-feed",
        "receipt-verification-failure",
        "unauthorized-charge"
      ]
    },
    "receiptJwt": {
      "type": "string"
    },
    "claimantAgent": {
      "type": "string"
    },
    "amountTHB": {
      "type": "number",
      "minimum": 0
    },
    "status": {
      "enum": [
        "open",
        "triage",
        "review",
        "mediation",
        "arbitration",
        "resolved-refunded",
        "resolved-denied",
        "withdrawn"
      ]
    },
    "resolutionTier": {
      "type": "integer",
      "minimum": 1,
      "maximum": 4
    },
    "refundReceiptJwt": {
      "type": "string"
    }
  }
}