{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blockvectra/json-schema/blockvectra-resets-response-schema.json",
  "title": "ResetsResponse",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/console.yaml#/components/schemas/ResetsResponse",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "available",
    "next_expires_at",
    "reset_to_units",
    "items"
  ],
  "properties": {
    "available": {
      "type": "integer",
      "minimum": 0,
      "description": "Sum of remaining chances across all active rounds."
    },
    "next_expires_at": {
      "description": "Expiration timestamp of the chance consumed by next use; null if no remaining chances.",
      "oneOf": [
        {
          "$ref": "#/$defs/Timestamp"
        },
        {
          "type": "null"
        }
      ]
    },
    "reset_to_units": {
      "type": "integer",
      "format": "int64",
      "minimum": 1,
      "maximum": 9007199254740991,
      "description": "Target balance replenished to by next use (units)."
    },
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResetChanceView"
      }
    }
  },
  "$defs": {
    "ResetChanceView": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "round",
        "available_from",
        "expires_at",
        "total",
        "used",
        "remaining"
      ],
      "properties": {
        "round": {
          "type": "string",
          "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
          "description": "Round identifier; monthly rounds formatted as `<id>-YYYY-MM` (e.g. `monthly-2026-10`)."
        },
        "available_from": {
          "$ref": "#/$defs/Timestamp"
        },
        "expires_at": {
          "$ref": "#/$defs/Timestamp"
        },
        "total": {
          "type": "integer",
          "minimum": 1,
          "description": "Number of chances granted to this account in this round."
        },
        "used": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of chances used."
        },
        "remaining": {
          "type": "integer",
          "minimum": 0,
          "description": "`max(0, total - used)`."
        }
      }
    },
    "Timestamp": {
      "type": "string",
      "format": "date-time",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
      "description": "RFC 3339 UTC, second precision, ending in `Z` (`2026-09-26T08:00:00Z`); no fractional seconds, without `+00:00` timezone offsets."
    }
  }
}