{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/policyforge-co/json-schema/policyforge-co-policy-list-response-schema.json",
  "title": "PolicyListResponse",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/policyforge-co-openapi.json#/components/schemas/PolicyListResponse",
  "type": "object",
  "properties": {
    "policies": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string"
          },
          "policy_type": {
            "type": "string",
            "description": "Alias of `type` (same value)"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    },
    "total": {
      "type": "integer",
      "description": "Total number of policies matching the query"
    },
    "limit": {
      "type": "integer",
      "description": "Page size applied to this query"
    },
    "offset": {
      "type": "integer",
      "description": "Offset applied to this query"
    },
    "subscription_info": {
      "$ref": "#/$defs/SubscriptionInfo"
    }
  },
  "$defs": {
    "SubscriptionInfo": {
      "type": "object",
      "properties": {
        "tier": {
          "type": "string",
          "enum": [
            "free",
            "pro",
            "enterprise"
          ]
        },
        "can_create_more": {
          "type": "boolean"
        },
        "remaining_policies": {
          "type": "integer"
        }
      }
    }
  }
}