{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/capepartners-fr/json-schema/capepartners-fr-phase-update-response-schema.json",
  "title": "PhaseUpdateResponse",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/capepartners-fr-pairings-api-openapi.yml#/components/schemas/PhaseUpdateResponse",
  "type": "object",
  "properties": {
    "updated": {
      "type": "integer"
    },
    "pair_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "phase": {
      "type": "string"
    },
    "requested": {
      "type": "array",
      "description": "Changes raised for the counterparty to confirm instead of applied (mutual consent).",
      "items": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "integer"
          },
          "pair_id": {
            "type": "string"
          },
          "from_phase": {
            "type": "string"
          },
          "to_phase": {
            "type": "string"
          },
          "requested_by": {
            "type": "string"
          },
          "counterparty_session": {
            "type": "string"
          }
        }
      }
    },
    "blocked": {
      "type": "array",
      "description": "Pairings left untouched because a phase change is already awaiting a decision (the pairing is locked).",
      "items": {
        "type": "object",
        "properties": {
          "pair_id": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "enum": [
              "awaiting_confirmation",
              "no_counterparty"
            ]
          }
        }
      }
    }
  }
}