{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rye-dev/json-schema/rye-dev-pulse-response-schema.json",
  "title": "PulseResponse",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rye-dev-openapi.json#/components/schemas/PulseResponse",
  "type": "object",
  "required": [
    "success",
    "pulse"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "pulse": {
      "type": "object",
      "required": [
        "asOf",
        "webVitals",
        "pageviews",
        "uptime",
        "topReacted",
        "deploy"
      ],
      "properties": {
        "asOf": {
          "type": [
            "string",
            "null"
          ],
          "description": "Latest data date (YYYY-MM-DD, UTC), or null."
        },
        "webVitals": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "metric",
              "p75",
              "unit",
              "rating"
            ],
            "properties": {
              "metric": {
                "type": "string",
                "enum": [
                  "LCP",
                  "INP",
                  "CLS"
                ]
              },
              "p75": {
                "type": "number"
              },
              "unit": {
                "type": "string",
                "enum": [
                  "ms",
                  ""
                ]
              },
              "rating": {
                "type": "string",
                "enum": [
                  "good",
                  "needs-improvement",
                  "poor"
                ]
              }
            }
          }
        },
        "pageviews": {
          "type": "object",
          "required": [
            "days",
            "total",
            "series"
          ],
          "properties": {
            "days": {
              "type": "integer"
            },
            "total": {
              "type": "integer"
            },
            "series": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "description": "Daily pageviews, oldest→newest."
            }
          }
        },
        "uptime": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "pct": {
              "type": "number"
            },
            "avgMs": {
              "type": "number"
            },
            "days": {
              "type": "integer"
            }
          }
        },
        "topReacted": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "path",
              "count"
            ],
            "properties": {
              "path": {
                "type": "string"
              },
              "count": {
                "type": "integer",
                "minimum": 0
              }
            }
          }
        },
        "deploy": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "sha": {
              "type": "string",
              "description": "7-char short SHA"
            },
            "message": {
              "type": "string"
            },
            "branch": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string"
            },
            "buildSeconds": {
              "type": [
                "integer",
                "null"
              ]
            },
            "completedAt": {
              "type": "integer",
              "description": "Epoch seconds."
            }
          }
        }
      }
    }
  }
}