{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/namemy-app/json-schema/namemy-app-domain-check-result-schema.json",
  "title": "DomainCheckResult",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/namemy-app-openapi.yml#/components/schemas/DomainCheckResult",
  "type": "object",
  "required": [
    "domain",
    "available",
    "bestPrice",
    "buyUrl"
  ],
  "properties": {
    "domain": {
      "type": "string"
    },
    "available": {
      "type": "boolean"
    },
    "isPremium": {
      "type": "boolean",
      "description": "Present and true for premium-tier domains; still purchasable at `retailPrice`"
    },
    "bestPrice": {
      "$ref": "#/$defs/BestPrice"
    },
    "buyUrl": {
      "type": "string",
      "description": "One-click checkout link; `null` when the domain is taken. Normally a\nshort `/buy/<token>` link; falls back to a `/checkout?...` link.\n"
    },
    "proposalToken": {
      "type": "string",
      "description": "Token in the short buyUrl"
    },
    "expiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the short buyUrl's held price expires"
    }
  },
  "$defs": {
    "BestPrice": {
      "type": "object",
      "required": [
        "registrar",
        "retailPrice",
        "retailRenewal",
        "currency"
      ],
      "properties": {
        "registrar": {
          "type": "string",
          "enum": [
            "namemy.app"
          ],
          "description": "Always namemy.app, the registrar of record you pay"
        },
        "retailPrice": {
          "type": "number",
          "description": "First-year price charged, in `currency`"
        },
        "retailRenewal": {
          "type": "number",
          "description": "Yearly renewal price"
        },
        "currency": {
          "type": "string"
        }
      }
    }
  }
}