{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/xcatcher-top/json-schema/xcatcher-top-crawl-preflight-schema.json",
  "title": "CrawlPreflight",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/xcatcher-top-openapi.yml#/components/schemas/CrawlPreflight",
  "type": "object",
  "required": [
    "success",
    "normalized_request",
    "estimate",
    "effects",
    "next",
    "result_columns"
  ],
  "properties": {
    "success": {
      "type": "boolean"
    },
    "normalized_request": {
      "type": "object",
      "required": [
        "users",
        "mode"
      ],
      "properties": {
        "users": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "mode": {
          "type": "string",
          "enum": [
            "normal",
            "deep"
          ]
        }
      }
    },
    "estimate": {
      "type": "object",
      "required": [
        "handle_count",
        "cost_points",
        "amount_usd",
        "amount_usdc_atomic",
        "asset",
        "network",
        "pricing_version",
        "pricing_model",
        "billing_basis",
        "minimum_task_usd",
        "applied_tiers"
      ],
      "properties": {
        "handle_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500
        },
        "cost_points": {
          "type": "integer",
          "minimum": 1
        },
        "amount_usd": {
          "type": "string"
        },
        "amount_usdc_atomic": {
          "type": "string"
        },
        "asset": {
          "type": "string"
        },
        "network": {
          "type": "string"
        },
        "pricing_version": {
          "type": "string"
        },
        "pricing_model": {
          "type": "string",
          "enum": [
            "progressive_normal_v1",
            "linear_deep_v1"
          ]
        },
        "billing_basis": {
          "type": "string",
          "enum": [
            "normalized_requested_handles"
          ]
        },
        "minimum_task_usd": {
          "type": "string"
        },
        "applied_tiers": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "from_handle",
              "to_handle",
              "quantity",
              "usd_per_handle",
              "subtotal_usd"
            ],
            "properties": {
              "from_handle": {
                "type": "integer",
                "minimum": 1
              },
              "to_handle": {
                "type": "integer",
                "minimum": 1
              },
              "quantity": {
                "type": "integer",
                "minimum": 1
              },
              "usd_per_handle": {
                "type": "string"
              },
              "subtotal_usd": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "effects": {
      "type": "object",
      "required": [
        "authentication_required",
        "creates_quote",
        "creates_task",
        "moves_funds"
      ],
      "properties": {
        "authentication_required": {
          "type": "boolean"
        },
        "creates_quote": {
          "type": "boolean"
        },
        "creates_task": {
          "type": "boolean"
        },
        "moves_funds": {
          "type": "boolean"
        }
      }
    },
    "next": {
      "type": "object",
      "additionalProperties": true
    },
    "result_columns": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}