{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coderpad/json-schema/coderpad-quota-response-schema.json",
  "title": "QuotaResponse",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coderpad-account-api-openapi.yml#/components/schemas/QuotaResponse",
  "allOf": [
    {
      "$ref": "#/$defs/Ok"
    },
    {
      "type": "object",
      "properties": {
        "trial_expires_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "pads_used": {
          "type": "integer",
          "description": "Pads used in the current billing cycle."
        },
        "quota_reset_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the current billing cycle ends."
        },
        "unlimited": {
          "type": "boolean"
        },
        "overages_enabled": {
          "type": "boolean",
          "description": "Whether pads can still be created, and billed as overages, once the limit is reached."
        },
        "pads_remaining": {
          "type": "integer",
          "description": "Pads left in the current billing cycle. Absent when `unlimited` is `true`."
        },
        "billing_cycle_pad_limit": {
          "type": "integer",
          "description": "Pads allowed per billing cycle. Absent when `unlimited` is `true`."
        }
      }
    }
  ],
  "$defs": {
    "Ok": {
      "type": "object",
      "required": [
        "status"
      ],
      "properties": {
        "status": {
          "type": "string",
          "enum": [
            "OK"
          ]
        }
      }
    }
  }
}