{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-applications-usage-response-schema.json",
  "title": "ApplicationsUsageResponse",
  "description": "Successful API response",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-applications-api-openapi.yml#/components/schemas/ApplicationsUsageResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "allowed": {
          "type": "boolean",
          "description": "Whether the user can enqueue another auto-apply right now (false = cap reached)."
        },
        "limit": {
          "type": "integer",
          "minimum": 0,
          "description": "Tier-bound rolling-30d auto-apply cap (e.g. 7 for job_seeker, 100 for hired_in_30, 300 for hired_yesterday)."
        },
        "resetAt": {
          "type": "string",
          "description": "ISO timestamp when the current rolling window rolls over (i.e. when the oldest counted apply ages out)."
        },
        "used": {
          "type": "integer",
          "minimum": 0,
          "description": "Auto-apply submissions counted against the rolling-30d cap."
        }
      },
      "required": [
        "allowed",
        "limit",
        "resetAt",
        "used"
      ],
      "additionalProperties": false
    },
    "meta": {
      "$ref": "#/$defs/ResponseMetadata"
    },
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "data",
    "success"
  ],
  "additionalProperties": false,
  "$defs": {
    "ResponseMetadata": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "number",
          "minimum": 0,
          "description": "Request duration in milliseconds"
        },
        "performance": {
          "type": "object",
          "properties": {
            "dbQueries": {
              "type": "integer",
              "minimum": 0
            },
            "totalDbTime": {
              "type": "number",
              "minimum": 0
            }
          },
          "description": "Performance metrics (preview/local only)"
        },
        "requestId": {
          "type": "string",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp"
        },
        "version": {
          "type": "string",
          "description": "API version"
        }
      }
    }
  }
}