{
  "openapi": "3.1.0",
  "info": {
    "title": "ToolMint Docs Deltas",
    "version": "0.1.0",
    "description": "Exported-API deltas between npm versions, read from published TypeScript declarations. Pay per call with USDC on Base via x402. Output is derived facts (exported names and normalized declaration signatures) read from the package's published type declarations via jsDelivr; no documentation prose is copied. Each package keeps its own licence (see `license`).",
    "x-guidance": "Before upgrading a dependency, call GET /delta?pkg=<name>&from=<current>&to=<target> to see added/removed exports, changed signatures, member changes and newly @deprecated symbols. GET /surface?pkg=&version= lists one version's exports. 'complete:false' only appears with allowPartial=1. Unpaid calls get 402 with x402 requirements (USDC on Base). 404/422/502 are not charged.",
    "contact": {
      "email": "toolmint.dev@gmail.com",
      "name": "ToolMint"
    }
  },
  "paths": {
    "/health": {
      "get": {
        "operationId": "health",
        "summary": "Liveness",
        "security": [],
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/delta": {
      "get": {
        "operationId": "npm_api_delta",
        "summary": "Exported-API delta between two versions of an npm package",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "20000"
        },
        "parameters": [
          {
            "name": "pkg",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 214
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "allowPartial",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Delta JSON"
          },
          "400": {
            "description": "Bad input (no charge; rejected before payment)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Package/version not found or no TypeScript declarations (not charged)"
          },
          "422": {
            "description": "Too large to read fully (not charged)"
          },
          "502": {
            "description": "npm registry or jsDelivr unavailable (not charged)"
          }
        }
      }
    },
    "/surface": {
      "get": {
        "operationId": "npm_api_surface",
        "summary": "Exported-API surface of one npm package version",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ],
          "network": "eip155:8453",
          "payTo": "0xfbF7413bcB3a604936775C96FDbe0b0C9c9E37F5",
          "asset": "USDC",
          "scheme": "exact",
          "amountAtomic": "10000"
        },
        "parameters": [
          {
            "name": "pkg",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 214
            }
          },
          {
            "name": "version",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Surface JSON"
          },
          "400": {
            "description": "Bad input (no charge; rejected before payment)"
          },
          "402": {
            "description": "Payment Required"
          },
          "404": {
            "description": "Package/version not found or no TypeScript declarations (not charged)"
          },
          "502": {
            "description": "npm registry or jsDelivr unavailable (not charged)"
          }
        }
      }
    }
  }
}