{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/m2msentinel-com/json-schema/m2msentinel-com-status-schema.json",
  "title": "Status",
  "x-generated": "2026-11-17",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/m2msentinel-com-openapi.json#/components/schemas/Status",
  "type": "object",
  "properties": {
    "service": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "ONLINE",
        "DEGRADED",
        "OFFLINE"
      ]
    },
    "deploymentPhase": {
      "type": "string",
      "const": "PRODUCTION"
    },
    "commerciallyPromoted": {
      "type": "boolean",
      "const": false,
      "description": "Reports whether the operator is running paid marketing for this service. It is not a restriction on use and not a statement about availability: the paid API is live, settles real USDC payments on Base, and serves any caller with a valid API key or x402 payment."
    },
    "x402ProtocolVersion": {
      "type": "integer"
    },
    "network": {
      "type": "string"
    },
    "components": {
      "type": "object",
      "additionalProperties": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "OPERATIONAL",
              "DEGRADED",
              "DOWN",
              "ENABLED",
              "DISABLED"
            ]
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "blockNumber": {
      "type": [
        "integer",
        "null"
      ]
    },
    "availability": {
      "$ref": "#/$defs/AvailabilitySummary"
    },
    "uptimeClaim": {
      "type": [
        "number",
        "null"
      ],
      "description": "Backward-compatible core 24-hour sample availability for persistent storage plus Base RPC. Null until enough core samples exist. Customer-path availability is reported separately under availability.componentAvailability."
    },
    "uptimeNote": {
      "type": "string"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "AvailabilitySeries": {
      "type": "object",
      "required": [
        "measured",
        "availabilityPercent",
        "sampleCount",
        "windows"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "measured": {
          "type": "boolean"
        },
        "availabilityPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "sampleCount": {
          "type": "integer",
          "minimum": 0
        },
        "windows": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/AvailabilityWindow"
          }
        },
        "note": {
          "type": "string"
        }
      }
    },
    "AvailabilitySummary": {
      "allOf": [
        {
          "$ref": "#/$defs/AvailabilitySeries"
        },
        {
          "type": "object",
          "required": [
            "scope",
            "componentAvailability"
          ],
          "properties": {
            "scope": {
              "type": "string",
              "const": "CORE_PERSISTENCE_AND_BASE_RPC"
            },
            "componentAvailability": {
              "type": "object",
              "required": [
                "gateway",
                "paidRoute",
                "rapidApi"
              ],
              "properties": {
                "gateway": {
                  "$ref": "#/$defs/AvailabilitySeries"
                },
                "paidRoute": {
                  "$ref": "#/$defs/AvailabilitySeries",
                  "description": "Synthetic-only availability series for the payable customer path, derived exclusively from periodic scheduled probes."
                },
                "rapidApi": {
                  "$ref": "#/$defs/AvailabilitySeries"
                }
              }
            }
          }
        }
      ]
    },
    "AvailabilityWindow": {
      "type": "object",
      "required": [
        "availabilityPercent",
        "sampleCount",
        "sufficientData"
      ],
      "properties": {
        "availabilityPercent": {
          "type": [
            "number",
            "null"
          ]
        },
        "sampleCount": {
          "type": "integer",
          "minimum": 0
        },
        "sufficientData": {
          "type": "boolean"
        }
      }
    }
  }
}