{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/notepad-page/json-schema/notepad-page-quota-schema.json",
  "title": "Quota",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/notepad-page-openapi.json#/components/schemas/Quota",
  "type": "object",
  "required": [
    "plan",
    "pages",
    "bytes",
    "publishesToday",
    "requestRate",
    "globalBudgets"
  ],
  "properties": {
    "plan": {
      "type": "string",
      "enum": [
        "hobby",
        "pro"
      ]
    },
    "pages": {
      "type": "object",
      "required": [
        "used",
        "limit"
      ],
      "properties": {
        "used": {
          "type": "integer",
          "minimum": 0
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "bytes": {
      "type": "object",
      "required": [
        "used",
        "limit"
      ],
      "properties": {
        "used": {
          "type": "integer",
          "minimum": 0
        },
        "limit": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "publishesToday": {
      "type": "object",
      "required": [
        "used",
        "limit"
      ],
      "properties": {
        "used": {
          "type": "integer",
          "minimum": 0
        },
        "limit": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "requestRate": {
      "type": "object",
      "required": [
        "limit",
        "windowSeconds"
      ],
      "properties": {
        "limit": {
          "type": "integer",
          "enum": [
            50
          ]
        },
        "windowSeconds": {
          "type": "integer",
          "enum": [
            60
          ]
        }
      },
      "additionalProperties": false
    },
    "globalBudgets": {
      "type": "object",
      "required": [
        "publishes",
        "signups"
      ],
      "properties": {
        "publishes": {
          "type": "object",
          "required": [
            "day",
            "used",
            "limit",
            "remaining"
          ],
          "properties": {
            "day": {
              "type": "string"
            },
            "used": {
              "type": "integer",
              "minimum": 0
            },
            "limit": {
              "type": "integer",
              "minimum": 0
            },
            "remaining": {
              "type": "integer",
              "minimum": 0
            }
          },
          "additionalProperties": false
        },
        "signups": {
          "type": "object",
          "required": [
            "day",
            "used",
            "limit",
            "remaining"
          ],
          "properties": {
            "day": {
              "type": "string"
            },
            "used": {
              "type": "integer",
              "minimum": 0
            },
            "limit": {
              "type": "integer",
              "minimum": 0
            },
            "remaining": {
              "type": "integer",
              "minimum": 0
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}