{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quillhub-ai/json-schema/quillhub-ai-entitlement-schema.json",
  "title": "Entitlement",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quillhub-ai-openapi.json#/components/schemas/Entitlement",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "unlimited",
        "minutes",
        "blocked"
      ]
    },
    "source": {
      "type": [
        "string",
        "null"
      ]
    },
    "minutes_left": {
      "type": [
        "number",
        "null"
      ]
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "blocked": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "notice": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "kind": {
          "type": "string"
        },
        "date": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "kind",
        "date"
      ]
    },
    "trial": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "state": {
          "type": "string",
          "enum": [
            "eligible",
            "active",
            "ending",
            "expired",
            "fair_use",
            "paid"
          ]
        },
        "started_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "ends_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "days_remaining": {
          "type": [
            "number",
            "null"
          ]
        },
        "minutes_used": {
          "type": "number",
          "minimum": 0
        },
        "minutes_limit": {
          "type": "number",
          "minimum": 0
        },
        "eligible_meeting_count": {
          "type": "integer",
          "minimum": 0
        },
        "dictation_minutes_used": {
          "type": "number",
          "minimum": 0
        },
        "dictation_minutes_limit": {
          "type": "number",
          "minimum": 0
        },
        "ai_chat_messages_used": {
          "type": "number",
          "minimum": 0
        },
        "ai_chat_messages_limit": {
          "type": "number",
          "minimum": 0
        },
        "fair_use_pool": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "meeting",
            "dictation",
            "ai_chat"
          ]
        }
      },
      "required": [
        "state",
        "started_at",
        "ends_at",
        "days_remaining",
        "minutes_used",
        "minutes_limit",
        "eligible_meeting_count",
        "dictation_minutes_used",
        "dictation_minutes_limit",
        "ai_chat_messages_used",
        "ai_chat_messages_limit",
        "fair_use_pool"
      ]
    }
  },
  "required": [
    "mode",
    "source",
    "minutes_left",
    "expires_at",
    "blocked",
    "notice",
    "trial"
  ]
}