{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-grant-list-schema.json",
  "title": "GrantList",
  "description": "Active grants of the account.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-connected-clients-api-openapi.yml#/components/schemas/GrantList",
  "properties": {
    "grants": {
      "description": "Most recently used first.",
      "items": {
        "$ref": "#/$defs/GrantResponse"
      },
      "type": "array"
    }
  },
  "required": [
    "grants"
  ],
  "type": "object",
  "$defs": {
    "GrantResponse": {
      "description": "One connected client.",
      "properties": {
        "client_id": {
          "description": "Client ID (its metadata document URL).",
          "type": "string"
        },
        "client_name": {
          "description": "Name from the client's metadata document when the user approved it, such\nas \"Claude Code\". Untrusted display text (at most 100 characters, no\ncontrol characters); escape it. `null` for grants approved before names\nwere stored; show the `client_id` host instead.",
          "type": [
            "string",
            "null"
          ]
        },
        "created_at": {
          "description": "When the user approved the client.",
          "format": "date-time",
          "type": "string"
        },
        "expires_at": {
          "description": "When the grant ends unless the client refreshes it.",
          "format": "date-time",
          "type": "string"
        },
        "id": {
          "description": "Grant ID, used to revoke it.",
          "format": "uuid",
          "type": "string"
        },
        "last_used_at": {
          "description": "Latest token issue; refreshes happen about hourly while the client is in use.",
          "format": "date-time",
          "type": "string"
        },
        "project_ids": {
          "description": "Projects the user approved for this client.",
          "items": {
            "format": "uuid",
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "client_id",
        "client_name",
        "project_ids",
        "created_at",
        "last_used_at",
        "expires_at"
      ],
      "type": "object"
    }
  }
}