{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toolaby-app/json-schema/toolaby-app-customer-schema.json",
  "title": "Customer",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toolaby-app-openapi.json#/components/schemas/Customer",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "format": "email"
    },
    "account": {
      "type": "boolean",
      "description": "The address has signed in to your workspace."
    },
    "entitled": {
      "type": "boolean",
      "description": "Holds the tool now: by a licence, a subscription, a trial, a grant, or a bundle that names it."
    },
    "via": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "licence",
        "subscription",
        "trial",
        "grant",
        null
      ]
    },
    "paid_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "plan": {
      "description": "The plan held: id, name, billing, amountCents, currency, interval. Null when not entitled."
    },
    "subscription": {},
    "trial": {}
  },
  "required": [
    "email",
    "account",
    "entitled",
    "via",
    "paid_at"
  ]
}