{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toolaby-app/json-schema/toolaby-app-grant-schema.json",
  "title": "Grant",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toolaby-app-openapi.json#/components/schemas/Grant",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "tool": {
      "type": "string"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "kind": {
      "type": "string",
      "enum": [
        "grant",
        "trial"
      ]
    },
    "starts_at": {
      "type": "string"
    },
    "ends_at": {
      "type": [
        "string",
        "null"
      ],
      "description": "When the grant ends by itself. Null for a grant that lasts until revoked."
    },
    "revoked_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "note": {
      "type": [
        "string",
        "null"
      ]
    },
    "created_at": {
      "type": "string"
    },
    "live": {
      "type": "boolean",
      "description": "Entitles the address now."
    }
  },
  "required": [
    "id",
    "tool",
    "email",
    "kind",
    "starts_at",
    "ends_at",
    "revoked_at",
    "note",
    "created_at",
    "live"
  ]
}