{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/barcodes-gg/main/json-schema/barcodes-gg-usage-schema.json",
  "title": "Usage",
  "x-generated": "2026-10-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/barcodes-gg-openapi.json#/components/schemas/Usage",
  "type": "object",
  "properties": {
    "calls": {
      "type": "object",
      "properties": {
        "remaining": {
          "type": "integer"
        },
        "lifetime": {
          "type": "integer"
        },
        "plan_limit": {
          "type": "integer"
        },
        "used_this_cycle": {
          "type": "integer"
        }
      }
    },
    "plan": {
      "type": "object",
      "properties": {
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "expires_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "rate_limit": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Requests per minute."
        },
        "token_limit": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "token": {
      "type": "object",
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_used_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "activity": {
      "type": "object",
      "properties": {
        "last_api_call_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "last_api_call_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_api_call_status": {
          "type": [
            "integer",
            "null"
          ]
        }
      }
    },
    "estimates": {
      "type": "object",
      "properties": {
        "average_daily_usage": {
          "type": "number"
        },
        "estimated_days_left": {
          "type": [
            "integer",
            "null"
          ]
        },
        "basis": {
          "type": "string"
        }
      }
    }
  }
}