{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peoplescourt-ai/json-schema/peoplescourt-ai-fast-track-upgrade-offer-schema.json",
  "title": "FastTrackUpgradeOffer",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peoplescourt-ai-party-procedure-api-openapi.yml#/components/schemas/FastTrackUpgradeOffer",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "offerId",
    "state",
    "recordHash",
    "sourceTermsHash",
    "targetTerms",
    "deltaUsd",
    "feeMethod",
    "expiresAt",
    "acceptedBy",
    "eligible"
  ],
  "properties": {
    "offerId": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "offered",
        "accepted",
        "payment_pending",
        "resumed",
        "declined",
        "expired"
      ]
    },
    "recordHash": {
      "type": "string"
    },
    "sourceTermsHash": {
      "type": "string"
    },
    "targetTerms": {
      "$ref": "#/$defs/CaseProcedureTerms"
    },
    "deltaUsd": {
      "type": "number",
      "minimum": 0
    },
    "feeMethod": {
      "type": "string",
      "const": "fiat_card"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time"
    },
    "paymentDeadlineAt": {
      "type": "string",
      "format": "date-time"
    },
    "acceptedBy": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "claimant",
          "respondent"
        ]
      }
    },
    "eligible": {
      "type": "boolean"
    },
    "feeRecordId": {
      "type": "string"
    },
    "refundStatus": {
      "type": "string",
      "enum": [
        "pending",
        "complete",
        "reconciliation_required"
      ]
    }
  },
  "$defs": {
    "CaseProcedureTerms": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "schemaVersion",
        "track",
        "appealWaived",
        "waiverDisclosureVersion",
        "waiverDisclosureHash",
        "rulesVersion",
        "rulesHash",
        "behaviorVersion",
        "disclosureVersion",
        "disclosureHash",
        "feePolicyVersion",
        "termsHash"
      ],
      "properties": {
        "schemaVersion": {
          "type": "string",
          "const": "case-procedure-v1"
        },
        "track": {
          "type": "string",
          "enum": [
            "ai_fast",
            "ai_standard",
            "ai_assisted_human"
          ]
        },
        "appealWaived": {
          "type": "boolean"
        },
        "waiverDisclosureVersion": {
          "type": "string",
          "minLength": 1
        },
        "waiverDisclosureHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "rulesVersion": {
          "type": "string",
          "minLength": 1
        },
        "rulesHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "behaviorVersion": {
          "type": "string",
          "minLength": 1
        },
        "disclosureVersion": {
          "type": "string",
          "minLength": 1
        },
        "disclosureHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "feePolicyVersion": {
          "type": "string",
          "minLength": 1
        },
        "termsHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        }
      }
    }
  }
}