{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/averray-com/json-schema/averray-com-health-response-schema.json",
  "title": "HealthResponse",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/averray-com-openapi.json#/components/schemas/HealthResponse",
  "type": "object",
  "required": [
    "status",
    "serviceHealth",
    "capabilityHealth",
    "auth",
    "components"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ok",
        "degraded"
      ]
    },
    "serviceHealth": {
      "type": "object",
      "required": [
        "ok",
        "components"
      ],
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "components": {
          "type": "object",
          "additionalProperties": true
        }
      }
    },
    "capabilityHealth": {
      "type": "object",
      "required": [
        "blockchain",
        "treasuryMutations",
        "xcmObserver",
        "indexer",
        "gasSponsor"
      ],
      "properties": {
        "blockchain": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled",
            "unhealthy"
          ]
        },
        "treasuryMutations": {
          "type": "string",
          "enum": [
            "available",
            "unavailable",
            "degraded"
          ]
        },
        "xcmObserver": {
          "type": "string",
          "enum": [
            "live",
            "staged",
            "unavailable"
          ]
        },
        "indexer": {
          "type": "string",
          "enum": [
            "synced",
            "lagging",
            "unavailable"
          ]
        },
        "gasSponsor": {
          "type": "string",
          "enum": [
            "enabled",
            "disabled"
          ]
        }
      }
    },
    "auth": {
      "type": "object",
      "required": [
        "mode",
        "domain",
        "chainId"
      ],
      "properties": {
        "mode": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "chainId": {
          "type": "integer",
          "description": "Polkadot Hub mainnet chain id (420420419)."
        }
      }
    },
    "components": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ComponentHealth"
      }
    }
  },
  "$defs": {
    "ComponentHealth": {
      "type": "object",
      "required": [
        "ok"
      ],
      "properties": {
        "ok": {
          "type": "boolean"
        },
        "backend": {
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "mode": {
          "type": "string"
        },
        "blockNumber": {
          "type": "integer"
        },
        "signerConfigured": {
          "type": "boolean"
        },
        "xcmWrapperConfigured": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    }
  }
}