{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Counter resets — the negative deltas instance_daily_deltas discards. A reset is a restored backup, a wiped volume, a re-provision or a wrong clock. Admin only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not a HappyProto admin.",
          "name": "Forbidden"
        },
        {
          "description": "The telemetry store could not be queried.",
          "name": "Upstream"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "have": {
              "description": "History available, when accruing.",
              "type": "integer"
            },
            "need": {
              "description": "History required, when accruing.",
              "type": "integer"
            },
            "resets": {
              "items": {
                "ref": "#reset",
                "type": "ref"
              },
              "type": "array"
            },
            "status": {
              "description": "Why a figure is absent. Branch on this, never on field presence.",
              "knownValues": [
                "ok",
                "accruing",
                "withheld"
              ],
              "type": "string"
            },
            "unit": {
              "knownValues": [
                "days",
                "snapshots"
              ],
              "type": "string"
            },
            "windowDays": {
              "type": "integer"
            }
          },
          "required": [
            "status",
            "resets"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "reset": {
      "properties": {
        "day": {
          "type": "string"
        },
        "from": {
          "description": "Value before the reset.",
          "type": "integer"
        },
        "instanceId": {
          "type": "string"
        },
        "metric": {
          "type": "string"
        },
        "to": {
          "description": "Value after it. Both are carried because \"records fell\" is not actionable and \"fell from 412,000 to 12\" is.",
          "type": "integer"
        }
      },
      "required": [
        "instanceId",
        "day",
        "metric",
        "from",
        "to"
      ],
      "type": "object"
    }
  },
  "id": "at.happyproto.fleet.getResets",
  "lexicon": 1
}
