{
  "openapi": "3.1.0",
  "info": {
    "title": "Formquote — 统一报价 API v2",
    "version": "1.0.0-catalog-20261008",
    "description": "公开数字目录报价与受保护 PCB 制造估算。接口路径为 /api/v2，数据 schemaVersion 仍为 1。数字数据为有来源日期的公开观察，非实时供应商锁价。保留原 /api/v1/offers 契约与操作员认证；无统一支付、订单或自动交付。AI 客户端需手动配置数字品类工具，发布 API 不会自动接入任何 AI Chat 或搜索产品。"
  },
  "servers": [
    {
      "url": "https://pcba-quote-lab.pages.dev"
    }
  ],
  "paths": {
    "/api/v2/categories": {
      "get": {
        "tags": [
          "Unified quotes"
        ],
        "operationId": "listQuoteCategories",
        "summary": "查询品类、输入 schema 和表单元数据",
        "description": "公开返回三个数字品类与受保护的 PCB 品类。品类可见不代表 PCB 已向公共客户端开放；以 authentication / capabilities 判断权限。",
        "security": [],
        "responses": {
          "200": {
            "description": "查询品类、输入 schema 和表单元数据",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CategoriesResult"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/catalog": {
      "get": {
        "tags": [
          "Unified quotes"
        ],
        "operationId": "getDigitalCatalog",
        "summary": "查询数字商品目录",
        "description": "返回已核实的公开目录记录，不执行上游请求。多个套餐可能来自同一供应商；当前目录为 27 个方案、11 家数字供应商。PCB 不在此目录中。",
        "security": [],
        "responses": {
          "200": {
            "description": "公开目录及去重供应商数量。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CatalogResult"
                }
              }
            }
          },
          "400": {
            "description": "不支持的目录品类。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "categoryId",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/DigitalCategoryId"
            },
            "description": "省略时返回全部数字目录；不支持 pcb。"
          }
        ]
      }
    },
    "/api/v2/capabilities": {
      "get": {
        "tags": [
          "Unified quotes"
        ],
        "operationId": "getQuoteCapabilities",
        "summary": "查询报价权限与执行能力",
        "description": "明确区分公开数字目录和 operator_bearer PCB。当前 order、payment、automaticFulfillment 与各品类 executionEnabled 均为 false。",
        "security": [],
        "responses": {
          "200": {
            "description": "查询报价权限与执行能力",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapabilitiesResult"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/health": {
      "get": {
        "tags": [
          "Unified quotes"
        ],
        "operationId": "getQuoteHealth",
        "summary": "检查统一 API 与数字目录状态",
        "description": "检查当前 Worker 和数字目录响应；不会探测外部供应商或原 PCB 服务的健康、账户余额和认证。原 PCB 健康接口仍为 /api/health。",
        "security": [],
        "responses": {
          "200": {
            "description": "检查统一 API 与数字目录状态",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResult"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/quotes": {
      "post": {
        "tags": [
          "Unified quotes"
        ],
        "operationId": "createUnifiedQuote",
        "summary": "按品类计算公开数字报价或获取受保护 PCB 估算",
        "description": "email_verification、sound_effects、font_license 无需认证，使用本站保存的公开观察数据，不执行验证、购买或交付。categoryId=pcb 必须使用现有操作员 Bearer；拒绝不可信浏览器 Origin，响应不开放跨来源认证。不要将操作员访问码发给客户或公共 AI。标准 OpenAPI 不能按 JSON 请求体分支表达不同 security，以下可选认证声明须与 x-category-security 及品类限制一起执行。请求须为 application/json，UTF-8 JSON 不超过 32768 字节；只接收规格，不接收邮箱名单或文件。",
        "security": [
          {},
          {
            "PilotBearer": []
          }
        ],
        "x-category-security": {
          "email_verification": [],
          "sound_effects": [],
          "font_license": [],
          "pcb": [
            {
              "PilotBearer": []
            }
          ]
        },
        "x-public-ai-input-schema": "#/components/schemas/DigitalQuoteRequest",
        "x-max-body-bytes": 32768,
        "x-cors": {
          "publicDigital": "Access-Control-Allow-Origin: *; preflight allows Content-Type only",
          "pcb": "No cross-origin Authorization support; no Access-Control-Allow-Origin on PCB results"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "examples": {
                "email_count": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "email_verification",
                    "specifications": {
                      "count": 10000
                    }
                  }
                },
                "email_quantity_alias": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "email_verification",
                    "quantity": {
                      "value": 3000,
                      "unit": "email"
                    },
                    "purchaseContext": {
                      "creditsBySupplier": {
                        "reoon": {
                          "credits": 1000,
                          "expiresAt": "2026-12-31T23:59:59Z"
                        }
                      }
                    }
                  }
                },
                "sound_ui": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "sound_effects",
                    "specifications": {
                      "intent": "ui",
                      "seats": 1,
                      "aiUse": false
                    },
                    "usageContext": {
                      "commercialUse": true,
                      "standaloneResale": false
                    }
                  }
                },
                "sound_nature": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "sound_effects",
                    "specifications": {
                      "intent": "nature",
                      "seats": 1,
                      "aiUse": false
                    },
                    "usageContext": {
                      "supplierPureSfxTimePercent": 10
                    }
                  }
                },
                "font_web_pv": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "font_license",
                    "specifications": {
                      "licenseUse": "web",
                      "seats": 1,
                      "websites": 1,
                      "monthlyPageviews": 5000,
                      "trafficMetric": "pv",
                      "termYears": 1
                    },
                    "usageContext": {
                      "medium": "website",
                      "commercialProjects": 1,
                      "requiresAllStyles": false
                    }
                  }
                },
                "font_desktop": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "font_license",
                    "specifications": {
                      "licenseUse": "desktop",
                      "seats": 1
                    },
                    "usageContext": {
                      "medium": "print",
                      "printProjects": 1,
                      "printUnits": 1000
                    }
                  }
                },
                "pcb_operator_only": {
                  "value": {
                    "schemaVersion": 1,
                    "categoryId": "pcb",
                    "quantity": {
                      "value": 30,
                      "unit": "board"
                    },
                    "specifications": {
                      "width": 5,
                      "height": 5,
                      "dimensionUnit": "cm"
                    },
                    "purchaseContext": {
                      "destinationCountry": "JP",
                      "destinationRegion": "Tokyo"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "报价结果。通常为 partial：未确认税费、许可条件或所需配置的价格保持未知。PCB 无当前报价也可返回 status=blocked 和 no_current_offer。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResult"
                }
              }
            }
          },
          "400": {
            "description": "非法 JSON、字段、规格或数字品类请求。可返回 ApiProblem，或带 INVALID_REQUEST 的 blocked QuoteResult。",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/QuoteResult"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "PCB 操作员凭证缺失或无效。",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/QuoteResult"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "PCB 请求来自不允许的网页 Origin。",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/QuoteResult"
                    }
                  ]
                }
              }
            }
          },
          "405": {
            "description": "该端点要求 POST。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "413": {
            "description": "请求超过 32768 字节。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type 不是 application/json。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "500": {
            "description": "服务内部错误。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "502": {
            "description": "PCB 服务、认证配置、定价配置或返回值不可用；不会用历史数量按比例生成替代报价。",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ApiProblem"
                    },
                    {
                      "$ref": "#/components/schemas/QuoteResult"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PilotBearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Internal operator token, required for all procurement routes, samples and catalog. Never give this token to customers or public AI clients."
      }
    },
    "schemas": {
      "OfferRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "scope",
          "spec",
          "quantity",
          "destination"
        ],
        "properties": {
          "scope": {
            "const": "bare_pcb"
          },
          "spec": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "material",
              "layers",
              "thicknessMm",
              "copperUm",
              "finish",
              "solderMask",
              "silkscreen",
              "format",
              "service",
              "widthMm",
              "heightMm"
            ],
            "properties": {
              "material": {
                "const": "FR4"
              },
              "layers": {
                "const": 2
              },
              "thicknessMm": {
                "const": 1.6
              },
              "copperUm": {
                "const": 35
              },
              "finish": {
                "const": "lead_free_hasl"
              },
              "solderMask": {
                "const": "green"
              },
              "silkscreen": {
                "const": "white"
              },
              "format": {
                "const": "single"
              },
              "service": {
                "const": "budget"
              },
              "widthMm": {
                "type": "integer",
                "minimum": 10,
                "maximum": 200
              },
              "heightMm": {
                "type": "integer",
                "minimum": 10,
                "maximum": 200
              }
            }
          },
          "quantity": {
            "type": "integer",
            "minimum": 3,
            "maximum": 300
          },
          "destination": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "country"
            ],
            "description": "Requested delivery location, not confirmed service or shipping cost. City or region is optional; no street address.",
            "properties": {
              "country": {
                "type": "string",
                "enum": [
                  "JP",
                  "US",
                  "CA",
                  "GB",
                  "DE",
                  "FR",
                  "NL",
                  "AU",
                  "SG",
                  "IN"
                ]
              },
              "region": {
                "type": "string",
                "maxLength": 80,
                "pattern": "^[\\p{L}\\p{M}\\p{N} .,'’()/-]*$",
                "default": ""
              }
            }
          }
        }
      },
      "CustomerOffer": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "product",
          "scope",
          "spec",
          "quantity",
          "destination",
          "currency",
          "totalMinor",
          "manufacturingBusinessDays",
          "leadTime",
          "quoteKind",
          "observedAt",
          "freshUntil",
          "supplierValidUntil",
          "shipping",
          "taxes",
          "deliveryConfirmed",
          "orderable",
          "landedCostFinal",
          "engineeringApproved"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "product": {
            "type": "string"
          },
          "scope": {
            "const": "bare_pcb"
          },
          "spec": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "material",
              "layers",
              "thicknessMm",
              "copperUm",
              "finish",
              "solderMask",
              "silkscreen",
              "format",
              "service",
              "widthMm",
              "heightMm"
            ],
            "properties": {
              "material": {
                "const": "FR4"
              },
              "layers": {
                "const": 2
              },
              "thicknessMm": {
                "const": 1.6
              },
              "copperUm": {
                "const": 35
              },
              "finish": {
                "const": "lead_free_hasl"
              },
              "solderMask": {
                "const": "green"
              },
              "silkscreen": {
                "const": "white"
              },
              "format": {
                "const": "single"
              },
              "service": {
                "const": "budget"
              },
              "widthMm": {
                "type": "integer",
                "minimum": 10,
                "maximum": 200
              },
              "heightMm": {
                "type": "integer",
                "minimum": 10,
                "maximum": 200
              }
            }
          },
          "quantity": {
            "type": "integer"
          },
          "destination": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "country"
            ],
            "description": "Requested delivery location, not confirmed service or shipping cost. City or region is optional; no street address.",
            "properties": {
              "country": {
                "type": "string",
                "enum": [
                  "JP",
                  "US",
                  "CA",
                  "GB",
                  "DE",
                  "FR",
                  "NL",
                  "AU",
                  "SG",
                  "IN"
                ]
              },
              "region": {
                "type": "string",
                "maxLength": 80,
                "pattern": "^[\\p{L}\\p{M}\\p{N} .,'’()/-]*$",
                "default": ""
              }
            }
          },
          "currency": {
            "enum": [
              "EUR",
              "USD"
            ]
          },
          "totalMinor": {
            "type": "integer",
            "minimum": 1,
            "description": "Our estimated selling price in the quoted currency’s cents, including configured service fee and buffer. No procurement breakdown."
          },
          "manufacturingBusinessDays": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 1
          },
          "leadTime": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "value",
              "unit",
              "basis"
            ],
            "properties": {
              "value": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "unit": {
                "enum": [
                  "days",
                  "business_days"
                ]
              },
              "basis": {
                "enum": [
                  "production",
                  "dispatch"
                ]
              }
            }
          },
          "quoteKind": {
            "const": "online_estimate"
          },
          "observedAt": {
            "type": "string"
          },
          "freshUntil": {
            "type": "string",
            "description": "Internal 5-minute freshness limit, not a supplier price commitment."
          },
          "supplierValidUntil": {
            "type": "null"
          },
          "shipping": {
            "const": "unconfirmed"
          },
          "taxes": {
            "type": "string"
          },
          "deliveryConfirmed": {
            "const": false
          },
          "orderable": {
            "const": false
          },
          "landedCostFinal": {
            "const": false
          },
          "engineeringApproved": {
            "const": false
          }
        }
      },
      "CustomerOfferResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "requestId",
          "mode",
          "offers",
          "availableOptions",
          "status",
          "message",
          "orderEnabled"
        ],
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "requestId": {
            "type": "string"
          },
          "mode": {
            "const": "quote_only"
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomerOffer"
            }
          },
          "availableOptions": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "enum": [
              "estimate_available",
              "no_current_offer"
            ]
          },
          "message": {
            "type": "string"
          },
          "orderEnabled": {
            "const": false
          }
        }
      },
      "Problem": {
        "type": "object",
        "required": [
          "error",
          "requestId"
        ],
        "properties": {
          "requestId": {
            "type": "string"
          },
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "SchemaVersion": {
        "type": "integer",
        "const": 1,
        "description": "请求和结果的数据 schema 版本。URL 的 v2 不代表 schemaVersion 为 2。"
      },
      "CategoryId": {
        "type": "string",
        "enum": [
          "email_verification",
          "sound_effects",
          "font_license",
          "pcb"
        ]
      },
      "DigitalCategoryId": {
        "type": "string",
        "enum": [
          "email_verification",
          "sound_effects",
          "font_license"
        ]
      },
      "ComparisonGoal": {
        "type": "string",
        "enum": [
          "lowest_cash_now",
          "lowest_job_cost",
          "best_requirement_fit"
        ],
        "default": "lowest_cash_now",
        "description": "组内先按适用性和来源新鲜度排序。lowest_cash_now 在最终税费未知时实际按 quotedSubtotal 排序，不代表确认的现金总额。"
      },
      "DecimalAmount": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^(?:0|[1-9][0-9]*)\\.[0-9]{2,6}$",
        "examples": [
          "11.90",
          "0.00119",
          null
        ],
        "description": "非负金额的十进制字符串；分摊金额可有最多六位小数。null 表示未知或不适用，不能当作 0。币种由 currency 指定；不要用浮点数保存金额。"
      },
      "Currency": {
        "type": [
          "string",
          "null"
        ],
        "pattern": "^[A-Z]{3}$",
        "examples": [
          "USD",
          "EUR",
          null
        ],
        "description": "报价币种；未确认时为 null。不同币种不自动换算或合并排序。"
      },
      "SourceDate": {
        "oneOf": [
          {
            "type": "string",
            "format": "date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          {
            "type": "string",
            "format": "date-time",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}T"
          }
        ],
        "description": "保留来源的真实日期精度；仅核实到日期时不得伪造时分秒。"
      },
      "Timestamp": {
        "type": "string",
        "format": "date-time"
      },
      "Supplier": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "website": {
            "type": "string",
            "format": "uri"
          },
          "connectionState": {
            "type": "string"
          },
          "publicApiDocumented": {
            "type": "boolean"
          },
          "apiDocs": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "apiExecutionEnabled": {
            "const": false
          },
          "resaleStatus": {
            "type": "object",
            "description": "公开条款的转售 / 子功能使用范围；公开 API 文档不等于允许转售，也不等于已接通执行。"
          }
        },
        "required": [
          "id",
          "name",
          "website"
        ]
      },
      "PricingEvidence": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "mode": {
            "enum": [
              "published_observed",
              "derived_estimate",
              "supplier_live"
            ]
          },
          "sourceUrl": {
            "type": "string",
            "format": "uri"
          },
          "observedAt": {
            "$ref": "#/components/schemas/SourceDate"
          },
          "isLive": {
            "type": "boolean"
          },
          "timestampPrecision": {
            "enum": [
              "day",
              "second"
            ]
          },
          "sourceKind": {
            "type": "string"
          },
          "sourceUpdatedAt": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SourceDate"
              },
              {
                "type": "null"
              }
            ]
          },
          "facts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "derivedFromEvidenceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "calculationExplanation": {
            "type": "string"
          },
          "quoteKind": {
            "const": "online_estimate"
          },
          "referenceLabel": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "mode",
          "sourceUrl",
          "observedAt",
          "isLive"
        ],
        "description": "公开观察、站内推算和当前供应商服务返回值分开记录。派生计算的新时间不能替换原始来源的核验时间。数字目录目前只使用 published_observed 与 derived_estimate；PCB 可返回 supplier_live 的客户制造估算。"
      },
      "RequirementMatch": {
        "type": "object",
        "properties": {
          "requirementId": {
            "type": "string"
          },
          "result": {
            "enum": [
              "yes",
              "no",
              "unknown"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "explanation": {
            "type": "string"
          },
          "evidenceIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "requirementId",
          "result",
          "explanation",
          "evidenceIds"
        ]
      },
      "PriceComponent": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "amount": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "mandatory": {
            "type": "boolean"
          }
        },
        "required": [
          "kind",
          "label",
          "amount",
          "mandatory"
        ]
      },
      "RecurringCharge": {
        "type": "object",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "interval": {
            "enum": [
              "month",
              "year"
            ]
          },
          "conditional": {
            "type": "boolean"
          },
          "explanation": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "interval",
          "conditional",
          "explanation"
        ]
      },
      "Pricing": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "referencePrice": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "quotedSubtotal": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "cashRequiredNow": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "allocatedJobCost": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "costBasis": {
            "type": "string"
          },
          "breakdown": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceComponent"
            }
          },
          "taxTreatment": {
            "enum": [
              "included",
              "excluded",
              "unknown"
            ]
          },
          "taxNote": {
            "type": "string"
          },
          "completeness": {
            "enum": [
              "complete",
              "partial",
              "unpriced"
            ]
          },
          "certainty": {
            "enum": [
              "published_price",
              "estimate",
              "supplier_quote"
            ]
          },
          "catalogBillingPeriod": {
            "enum": [
              "one_time",
              "month",
              "year",
              null
            ]
          },
          "binding": {
            "const": false
          },
          "recurringCharge": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecurringCharge"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedTermCost": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "pricingAppliesToRequest": {
            "enum": [
              "yes",
              "no",
              "unknown"
            ]
          },
          "packageCount": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "packageQuantity": {
            "type": "integer",
            "minimum": 0
          },
          "quantityRequested": {
            "type": "integer",
            "minimum": 0
          },
          "quantityPurchased": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "quantityConsumed": {
            "type": "integer",
            "minimum": 0
          },
          "quantityRemaining": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "usedFromExistingBalance": {
            "type": "integer",
            "minimum": 0
          },
          "quantityUnit": {
            "const": "credits"
          },
          "consumptionIsEstimate": {
            "const": true
          },
          "coveredTermYears": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "requestedTermYears": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "currency",
          "referencePrice",
          "quotedSubtotal",
          "cashRequiredNow",
          "allocatedJobCost",
          "costBasis",
          "breakdown",
          "taxTreatment",
          "taxNote",
          "completeness",
          "certainty"
        ],
        "description": "referencePrice 是所列原始配置的目录价格；quotedSubtotal 是对本次条件仍可引用或推算的小计；cashRequiredNow 仅在必要费用已确认时有值；allocatedJobCost 为消耗分摊，不是购买整包所需现金。未知价格不会用较小档位或其他许可配置外推。"
      },
      "Fulfillment": {
        "type": "object",
        "properties": {
          "mode": {
            "enum": [
              "merchant_checkout",
              "inquiry"
            ]
          },
          "state": {
            "const": "available"
          },
          "actionUrl": {
            "type": "string",
            "format": "uri"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "label": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "executionEnabled": {
            "const": false
          }
        },
        "required": [
          "mode",
          "state",
          "actionUrl",
          "label",
          "explanation"
        ],
        "description": "下一步是打开商家购买页或联系 / 确认页面。available 只表示该导航动作可用；不表示有货、授权已成交或已自动执行。当前无 provider_api、支付、下单或自动下载动作。"
      },
      "OfferComparison": {
        "type": "object",
        "properties": {
          "mode": {
            "enum": [
              "same_configuration",
              "requirements_fit"
            ]
          },
          "groupKey": {
            "type": "string"
          },
          "explanation": {
            "type": "string"
          },
          "comparableFinalTotal": {
            "type": "boolean"
          }
        },
        "required": [
          "mode",
          "groupKey",
          "explanation"
        ]
      },
      "Offer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          },
          "categoryId": {
            "$ref": "#/components/schemas/CategoryId"
          },
          "supplierId": {
            "type": "string"
          },
          "supplier": {
            "$ref": "#/components/schemas/Supplier"
          },
          "catalogItemId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "productUrl": {
            "type": "string",
            "format": "uri"
          },
          "attributes": {
            "type": "object"
          },
          "license": {
            "type": "object"
          },
          "comparison": {
            "$ref": "#/components/schemas/OfferComparison"
          },
          "requirementMatches": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RequirementMatch"
            }
          },
          "eligibility": {
            "enum": [
              "eligible",
              "conditional",
              "ineligible"
            ]
          },
          "pricing": {
            "$ref": "#/components/schemas/Pricing"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PricingEvidence"
            }
          },
          "checkedAt": {
            "$ref": "#/components/schemas/SourceDate"
          },
          "refreshAfter": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Timestamp"
              },
              {
                "type": "null"
              }
            ]
          },
          "supplierExpiresAt": {
            "type": "null"
          },
          "freshness": {
            "enum": [
              "fresh",
              "stale",
              "unknown"
            ]
          },
          "freshnessExplanation": {
            "type": "string"
          },
          "freshnessNote": {
            "type": "string"
          },
          "availability": {
            "const": "unknown"
          },
          "fulfillment": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Fulfillment"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "quantity": {
            "type": "object"
          },
          "specifications": {
            "type": "object"
          },
          "purchaseContext": {
            "type": "object"
          },
          "currency": {
            "enum": [
              "USD",
              "EUR"
            ]
          },
          "totalMinor": {
            "type": "integer",
            "minimum": 1,
            "description": "PCB 兼容字段：原客户销售制造估算的分单位金额，不是供应商采购成本。"
          },
          "manufacturingBusinessDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "leadTime": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "value",
              "unit",
              "basis"
            ],
            "properties": {
              "value": {
                "type": "integer",
                "minimum": 1,
                "maximum": 365
              },
              "unit": {
                "enum": [
                  "days",
                  "business_days"
                ]
              },
              "basis": {
                "enum": [
                  "production",
                  "dispatch"
                ]
              }
            }
          },
          "quoteKind": {
            "const": "online_estimate"
          },
          "observedAt": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "freshUntil": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "supplierValidUntil": {
            "type": "null"
          },
          "shipping": {
            "const": "unconfirmed"
          },
          "taxes": {
            "type": "string"
          },
          "deliveryConfirmed": {
            "const": false
          },
          "orderable": {
            "const": false
          },
          "landedCostFinal": {
            "const": false
          },
          "engineeringApproved": {
            "const": false
          }
        },
        "required": [
          "id",
          "requestId",
          "categoryId",
          "supplierId",
          "supplier",
          "catalogItemId",
          "title",
          "productUrl",
          "comparison",
          "requirementMatches",
          "eligibility",
          "pricing",
          "evidence",
          "checkedAt",
          "refreshAfter",
          "supplierExpiresAt",
          "freshness",
          "fulfillment"
        ],
        "description": "与一次具体需求关联的公开结果。只返回客户可见价格与依据；不暴露供应商采购成本、服务毛利或认证信息。eligible 不是库存、税费、生产审核或最终合同确认。"
      },
      "ComparisonGroup": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "comparisonMode": {
            "enum": [
              "same_configuration",
              "requirements_fit"
            ]
          },
          "billingPeriod": {
            "enum": [
              "one_time",
              "month",
              "year",
              null
            ]
          },
          "offerIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "eligibleOfferIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "offerCount": {
            "type": "integer",
            "minimum": 0
          },
          "supplierCount": {
            "type": "integer",
            "minimum": 0
          },
          "rankingMetric": {
            "enum": [
              "quotedSubtotal",
              "allocatedJobCost",
              "fit"
            ]
          },
          "comparableFinalTotal": {
            "type": "boolean"
          },
          "lowestReferenceOfferId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "explanation": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "currency",
          "comparisonMode",
          "offerIds",
          "supplierCount",
          "rankingMetric",
          "comparableFinalTotal",
          "explanation"
        ]
      },
      "SupplierError": {
        "type": "object",
        "properties": {
          "supplierId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean"
          }
        },
        "required": [
          "supplierId",
          "code",
          "message",
          "retryable"
        ]
      },
      "QuoteSummary": {
        "type": "object",
        "properties": {
          "offerCount": {
            "type": "integer",
            "minimum": 0
          },
          "supplierCount": {
            "type": "integer",
            "minimum": 0
          },
          "eligibleCount": {
            "type": "integer",
            "minimum": 0
          },
          "conditionalCount": {
            "type": "integer",
            "minimum": 0
          },
          "ineligibleCount": {
            "type": "integer",
            "minimum": 0
          },
          "pricedCount": {
            "type": "integer",
            "minimum": 0
          },
          "observedOnly": {
            "const": true
          },
          "liveExecutionEnabled": {
            "const": false
          }
        },
        "required": [
          "offerCount",
          "supplierCount",
          "eligibleCount",
          "conditionalCount",
          "ineligibleCount",
          "pricedCount",
          "observedOnly",
          "liveExecutionEnabled"
        ]
      },
      "QuoteResult": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "categoryId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "requestId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "complete",
              "partial",
              "blocked"
            ]
          },
          "missingInputs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "offers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Offer"
            }
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComparisonGroup"
            }
          },
          "supplierErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupplierError"
            }
          },
          "generatedAt": {
            "$ref": "#/components/schemas/Timestamp"
          },
          "request": {
            "type": "object",
            "description": "数字报价的规范化请求。单位别名已折叠到 specifications；数字 requestId 由服务生成。"
          },
          "summary": {
            "$ref": "#/components/schemas/QuoteSummary"
          },
          "mode": {
            "const": "quote_only"
          },
          "orderEnabled": {
            "const": false
          }
        },
        "required": [
          "schemaVersion",
          "categoryId",
          "requestId",
          "status",
          "missingInputs",
          "offers",
          "groups",
          "supplierErrors",
          "generatedAt"
        ]
      },
      "ApiProblem": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ]
          }
        },
        "required": [
          "schemaVersion",
          "error"
        ]
      },
      "CatalogPrice": {
        "type": "object",
        "properties": {
          "amount": {
            "$ref": "#/components/schemas/DecimalAmount"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "billingPeriod": {
            "enum": [
              "one_time",
              "month",
              "year",
              null
            ]
          },
          "unit": {
            "type": "string"
          },
          "taxTreatment": {
            "enum": [
              "included",
              "excluded",
              "unknown"
            ]
          },
          "taxNote": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "binding": {
            "const": false
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "currency",
          "billingPeriod",
          "unit",
          "taxTreatment",
          "taxNote",
          "binding",
          "status"
        ]
      },
      "CatalogItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "categoryId": {
            "$ref": "#/components/schemas/DigitalCategoryId"
          },
          "supplierId": {
            "type": "string"
          },
          "supplier": {
            "$ref": "#/components/schemas/Supplier"
          },
          "supplierSku": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "productUrl": {
            "type": "string",
            "format": "uri"
          },
          "productKind": {
            "type": "string"
          },
          "price": {
            "$ref": "#/components/schemas/CatalogPrice"
          },
          "attributes": {
            "type": "object"
          },
          "license": {
            "type": "object"
          },
          "quoteRules": {
            "type": "object"
          },
          "evidence": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PricingEvidence"
            }
          },
          "checkedAt": {
            "$ref": "#/components/schemas/SourceDate"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "categoryId",
          "supplierId",
          "supplier",
          "supplierSku",
          "productId",
          "title",
          "description",
          "productUrl",
          "productKind",
          "price",
          "attributes",
          "license",
          "quoteRules",
          "evidence",
          "checkedAt",
          "notes"
        ]
      },
      "CatalogResult": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "categoryId": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DigitalCategoryId"
              },
              {
                "type": "null"
              }
            ]
          },
          "itemCount": {
            "type": "integer",
            "minimum": 0
          },
          "supplierCount": {
            "type": "integer",
            "minimum": 0
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CatalogItem"
            }
          }
        },
        "required": [
          "schemaVersion",
          "categoryId",
          "itemCount",
          "supplierCount",
          "items"
        ]
      },
      "Category": {
        "type": "object",
        "properties": {
          "id": {
            "$ref": "#/components/schemas/CategoryId"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "comparisonMode": {
            "enum": [
              "same_configuration",
              "requirements_fit"
            ]
          },
          "catalogCount": {
            "type": "integer",
            "minimum": 0
          },
          "supplierCount": {
            "type": "integer",
            "minimum": 0
          },
          "pricedCatalogCount": {
            "type": "integer",
            "minimum": 0
          },
          "referenceTtlDays": {
            "type": "integer",
            "minimum": 1
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "defaultRequest": {
            "type": "object"
          },
          "requestSchema": {
            "type": "object",
            "description": "JSON Schema：该品类的规范输入与支持的数量别名。跨字段一致性、单位转换后的整数毫米等仍由运行时验证。"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sourceMode": {
            "type": "string"
          },
          "authentication": {
            "type": "string"
          },
          "publicClientAccess": {
            "type": "boolean"
          },
          "legacyWorkbenchUrl": {
            "type": "string",
            "format": "uri"
          },
          "legacyEndpoint": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "schemaVersion",
          "comparisonMode",
          "catalogCount",
          "supplierCount",
          "defaultRequest",
          "requestSchema",
          "notes"
        ]
      },
      "CategoriesResult": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Category"
            }
          }
        },
        "required": [
          "schemaVersion",
          "categories"
        ]
      },
      "CategoryCapability": {
        "type": "object",
        "properties": {
          "categoryId": {
            "$ref": "#/components/schemas/CategoryId"
          },
          "quoteMode": {
            "enum": [
              "published_observed",
              "supplier_estimate"
            ]
          },
          "quoteAccess": {
            "enum": [
              "public",
              "operator_bearer"
            ]
          },
          "executionEnabled": {
            "const": false
          },
          "fulfillmentModes": {
            "type": "array",
            "items": {
              "enum": [
                "merchant_checkout",
                "inquiry"
              ]
            }
          }
        },
        "required": [
          "categoryId",
          "quoteMode",
          "quoteAccess",
          "executionEnabled",
          "fulfillmentModes"
        ]
      },
      "CapabilitiesResult": {
        "type": "object",
        "properties": {
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "version": {
            "type": "string"
          },
          "quote": {
            "const": true
          },
          "order": {
            "const": false
          },
          "payment": {
            "const": false
          },
          "automaticFulfillment": {
            "const": false
          },
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CategoryCapability"
            }
          },
          "integration": {
            "type": "object",
            "properties": {
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "documentation": {
                "type": "string",
                "format": "uri"
              },
              "chatInstallation": {
                "const": "manual"
              },
              "publicPcbAccess": {
                "const": false
              }
            },
            "required": [
              "openapi",
              "documentation",
              "chatInstallation",
              "publicPcbAccess"
            ]
          }
        },
        "required": [
          "schemaVersion",
          "version",
          "quote",
          "order",
          "payment",
          "automaticFulfillment",
          "categories",
          "integration"
        ]
      },
      "HealthResult": {
        "type": "object",
        "properties": {
          "status": {
            "const": "ok"
          },
          "version": {
            "type": "string"
          },
          "schemaVersion": {
            "$ref": "#/components/schemas/SchemaVersion"
          },
          "digitalCatalogItems": {
            "type": "integer",
            "minimum": 0
          },
          "digitalSupplierCount": {
            "type": "integer",
            "minimum": 0
          },
          "digitalLiveExecutionEnabled": {
            "const": false
          },
          "pcb": {
            "type": "object",
            "properties": {
              "mode": {
                "const": "existing_protected_service"
              },
              "healthEndpoint": {
                "const": "/api/health"
              }
            },
            "required": [
              "mode",
              "healthEndpoint"
            ]
          },
          "orderEnabled": {
            "const": false
          }
        },
        "required": [
          "status",
          "version",
          "schemaVersion",
          "digitalCatalogItems",
          "digitalSupplierCount",
          "digitalLiveExecutionEnabled",
          "pcb",
          "orderEnabled"
        ]
      },
      "EmailVerificationQuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "categoryId"
        ],
        "properties": {
          "categoryId": {
            "const": "email_verification"
          },
          "schemaVersion": {
            "const": 1
          },
          "requestId": {
            "type": "string",
            "maxLength": 128,
            "description": "调用方元数据；不是订单号或授权凭证。"
          },
          "specifications": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "count": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:[1-9][0-9]{0,6}|10000000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ],
                "title": "待验证邮箱数",
                "description": "报价只需要数量；不要在这里提交邮箱地址。",
                "default": 10000
              }
            }
          },
          "quantity": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:[1-9][0-9]{0,6}|10000000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "value",
                  "unit"
                ],
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      },
                      {
                        "type": "string",
                        "pattern": "^\\s*0*(?:[1-9][0-9]{0,6}|10000000)\\s*$",
                        "description": "整数字符串会先规范化为整数。"
                      }
                    ]
                  },
                  "unit": {
                    "enum": [
                      "email",
                      "emails",
                      "credit",
                      "credits"
                    ]
                  }
                }
              }
            ],
            "description": "count 的别名；同时提供必须一致。"
          },
          "usageContext": {
            "type": "object",
            "additionalProperties": false,
            "properties": {}
          },
          "purchaseContext": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "creditsBySupplier": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "millionverifier": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "credits"
                        ],
                        "properties": {
                          "credits": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000000
                              },
                              {
                                "type": "string",
                                "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                                "description": "整数字符串会先规范化为整数。"
                              }
                            ]
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  "reoon": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "credits"
                        ],
                        "properties": {
                          "credits": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000000
                              },
                              {
                                "type": "string",
                                "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                                "description": "整数字符串会先规范化为整数。"
                              }
                            ]
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  "debounce": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "credits"
                        ],
                        "properties": {
                          "credits": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000000
                              },
                              {
                                "type": "string",
                                "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                                "description": "整数字符串会先规范化为整数。"
                              }
                            ]
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  },
                  "emailable": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "required": [
                          "credits"
                        ],
                        "properties": {
                          "credits": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000000
                              },
                              {
                                "type": "string",
                                "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                                "description": "整数字符串会先规范化为整数。"
                              }
                            ]
                          },
                          "expiresAt": {
                            "anyOf": [
                              {
                                "type": "string",
                                "format": "date-time"
                              },
                              {
                                "type": "string",
                                "format": "date"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        }
                      }
                    ]
                  }
                }
              }
            }
          },
          "comparisonGoal": {
            "type": "string",
            "enum": [
              "lowest_cash_now",
              "lowest_job_cost",
              "best_requirement_fit"
            ],
            "default": "lowest_cash_now"
          }
        },
        "anyOf": [
          {
            "required": [
              "quantity"
            ]
          },
          {
            "required": [
              "specifications"
            ],
            "properties": {
              "specifications": {
                "required": [
                  "count"
                ]
              }
            }
          }
        ],
        "title": "邮箱验证报价请求",
        "description": "按完整额度包计算购买预算，并单独显示本次消耗的额度成本。 schemaVersion 为 1，可省略。未知字段与相互冲突的别名会由运行时拒绝。"
      },
      "SoundEffectsQuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "categoryId"
        ],
        "properties": {
          "categoryId": {
            "const": "sound_effects"
          },
          "schemaVersion": {
            "const": 1
          },
          "requestId": {
            "type": "string",
            "maxLength": 128,
            "description": "调用方元数据；不是订单号或授权凭证。"
          },
          "specifications": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "intent": {
                "type": "string",
                "enum": [
                  "any",
                  "ui",
                  "motion",
                  "nature",
                  "train",
                  "kettle"
                ],
                "title": "音效用途",
                "description": "音效用途",
                "default": "ui"
              },
              "seats": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:[1-9][0-9]{0,2}|1000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ],
                "title": "使用人数 / 同时工作站数",
                "description": "具体按各商家的用户或工作站授权口径核对。",
                "default": 1
              },
              "aiUse": {
                "type": "boolean",
                "title": "将音频用于 AI 训练或生成",
                "description": "在 AI Chat 中查价不属于这项用途；本选项指音频素材本身的 AI 使用。",
                "default": false
              }
            }
          },
          "quantity": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:1)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1
                      },
                      {
                        "type": "string",
                        "pattern": "^\\s*0*(?:1)\\s*$",
                        "description": "整数字符串会先规范化为整数。"
                      }
                    ]
                  },
                  "unit": {
                    "enum": [
                      "asset",
                      "license"
                    ]
                  }
                }
              }
            ],
            "description": "素材当前只接受 1 份所列授权；人数请使用 seats。"
          },
          "usageContext": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "commercialUse": {
                "type": "boolean",
                "default": true
              },
              "standaloneResale": {
                "type": "boolean",
                "default": false
              },
              "aiUse": {
                "type": "boolean",
                "description": "specifications.aiUse 的别名，同时存在时须一致。"
              },
              "supplierPureSfxTimePercent": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "string",
                    "pattern": "^(?:0*(?:[0-9]|[1-9][0-9])(?:\\.[0-9]+)?|0*100(?:\\.0+)?)$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "该供应商纯音效（无语音/音乐）占整个成品总时长百分比；未知可省略或为 null。"
              },
              "pureSfxSharePercent": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "string",
                    "pattern": "^(?:0*(?:[0-9]|[1-9][0-9])(?:\\.[0-9]+)?|0*100(?:\\.0+)?)$"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "该供应商纯音效（无语音/音乐）占整个成品总时长百分比；未知可省略或为 null。 supplierPureSfxTimePercent 的兼容别名，同时存在时须一致。"
              }
            }
          },
          "purchaseContext": {
            "type": "object",
            "additionalProperties": false,
            "properties": {}
          },
          "comparisonGoal": {
            "type": "string",
            "enum": [
              "lowest_cash_now",
              "lowest_job_cost",
              "best_requirement_fit"
            ],
            "default": "lowest_cash_now"
          }
        },
        "title": "音效素材报价请求",
        "description": "按用途筛选不同作者的音效包，再检查已确认的授权范围。 schemaVersion 为 1，可省略。未知字段与相互冲突的别名会由运行时拒绝。"
      },
      "FontLicenseQuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "categoryId"
        ],
        "properties": {
          "categoryId": {
            "const": "font_license"
          },
          "schemaVersion": {
            "const": 1
          },
          "requestId": {
            "type": "string",
            "maxLength": 128,
            "description": "调用方元数据；不是订单号或授权凭证。"
          },
          "specifications": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "licenseUse": {
                "type": "string",
                "enum": [
                  "web",
                  "desktop",
                  "both"
                ],
                "title": "授权用途",
                "description": "授权用途",
                "default": "web"
              },
              "seats": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:[1-9][0-9]{0,2}|1000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ],
                "title": "使用人数",
                "description": "使用人数",
                "default": 1
              },
              "websites": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:[1-9][0-9]{0,3}|10000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ],
                "title": "网站数量",
                "description": "按同一许可主体的网站计算；客户应单独取得许可。",
                "default": 1
              },
              "monthlyPageviews": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ],
                "title": "每站每月流量上限",
                "description": "各站按此上限计算；合计型许可会乘以网站数。单位由下一项决定。",
                "default": 5000
              },
              "trafficMetric": {
                "type": "string",
                "enum": [
                  "pv",
                  "uv"
                ],
                "title": "流量口径",
                "description": "PV 与 UV 不自动换算。",
                "default": "pv"
              },
              "termYears": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 20
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:[1-9]|1[0-9]|20)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ],
                "title": "计划使用年数",
                "description": "年订阅只确认当前首年价；未来续费价不是锁定承诺。",
                "default": 1
              }
            }
          },
          "quantity": {
            "anyOf": [
              {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:1)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ]
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "value"
                ],
                "properties": {
                  "value": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 1
                      },
                      {
                        "type": "string",
                        "pattern": "^\\s*0*(?:1)\\s*$",
                        "description": "整数字符串会先规范化为整数。"
                      }
                    ]
                  },
                  "unit": {
                    "enum": [
                      "asset",
                      "license"
                    ]
                  }
                }
              }
            ],
            "description": "素材当前只接受 1 份所列授权；人数请使用 seats。"
          },
          "usageContext": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "commercialUse": {
                "type": "boolean"
              },
              "requiresAllStyles": {
                "type": "boolean"
              },
              "commercialProjects": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ]
              },
              "printProjects": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ]
              },
              "printUnits": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000000
                  },
                  {
                    "type": "string",
                    "pattern": "^\\s*0*(?:0|[1-9][0-9]{0,8}|1000000000)\\s*$",
                    "description": "整数字符串会先规范化为整数。"
                  }
                ]
              },
              "medium": {
                "type": "string",
                "enum": [
                  "website",
                  "print",
                  "app",
                  "web_app",
                  "game",
                  "logo",
                  "paid_ad"
                ],
                "description": "普通网站不包含 Web App、App、游戏、Logo 或付费广告。"
              }
            }
          },
          "purchaseContext": {
            "type": "object",
            "additionalProperties": false,
            "properties": {}
          },
          "comparisonGoal": {
            "type": "string",
            "enum": [
              "lowest_cash_now",
              "lowest_job_cost",
              "best_requirement_fit"
            ],
            "default": "lowest_cash_now"
          }
        },
        "anyOf": [
          {
            "required": [
              "specifications"
            ],
            "properties": {
              "specifications": {
                "required": [
                  "monthlyPageviews"
                ]
              }
            }
          },
          {
            "required": [
              "specifications"
            ],
            "properties": {
              "specifications": {
                "required": [
                  "licenseUse"
                ],
                "properties": {
                  "licenseUse": {
                    "const": "desktop"
                  }
                }
              }
            }
          }
        ],
        "title": "字体授权报价请求",
        "description": "按用户、网站、流量口径和期限核对授权；不把入门价当作任意用途价格。 schemaVersion 为 1，可省略。未知字段与相互冲突的别名会由运行时拒绝。"
      },
      "PcbUnifiedQuoteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "categoryId",
          "quantity",
          "specifications",
          "purchaseContext"
        ],
        "properties": {
          "schemaVersion": {
            "const": 1
          },
          "categoryId": {
            "const": "pcb"
          },
          "requestId": {
            "type": "string",
            "maxLength": 200
          },
          "comparisonGoal": {
            "enum": [
              "lowest_cash_now",
              "lowest_job_cost",
              "best_requirement_fit"
            ]
          },
          "quantity": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "value",
              "unit"
            ],
            "properties": {
              "value": {
                "type": "integer",
                "minimum": 3,
                "maximum": 300
              },
              "unit": {
                "const": "board"
              }
            }
          },
          "specifications": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "widthMm": {
                "type": "integer",
                "minimum": 10,
                "maximum": 200
              },
              "heightMm": {
                "type": "integer",
                "minimum": 10,
                "maximum": 200
              },
              "width": {
                "type": "number"
              },
              "height": {
                "type": "number"
              },
              "dimensionUnit": {
                "enum": [
                  "mm",
                  "cm",
                  "m",
                  "in",
                  "inch"
                ]
              },
              "material": {
                "const": "FR4"
              },
              "layers": {
                "const": 2
              },
              "thicknessMm": {
                "const": 1.6
              },
              "copperUm": {
                "const": 35
              },
              "finish": {
                "const": "lead_free_hasl"
              },
              "solderMask": {
                "const": "green"
              },
              "silkscreen": {
                "const": "white"
              },
              "format": {
                "const": "single"
              },
              "service": {
                "const": "budget"
              }
            },
            "anyOf": [
              {
                "required": [
                  "widthMm",
                  "heightMm"
                ]
              },
              {
                "required": [
                  "width",
                  "height",
                  "dimensionUnit"
                ]
              }
            ]
          },
          "usageContext": {
            "type": "object",
            "additionalProperties": false
          },
          "purchaseContext": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "destinationCountry"
            ],
            "properties": {
              "destinationCountry": {
                "enum": [
                  "JP",
                  "US",
                  "CA",
                  "GB",
                  "DE",
                  "FR",
                  "NL",
                  "AU",
                  "SG",
                  "IN"
                ]
              },
              "destinationRegion": {
                "type": "string",
                "maxLength": 80
              }
            }
          }
        },
        "title": "PCB 制造报价请求",
        "description": "仅现有操作员可访问。PCB 规格保持原合同限制；尺寸必须换算成 10–200 整数毫米，数量 3–300 board。重复尺寸表示必须一致，只有完整 mm 表示时 dimensionUnit 只能为 mm。运费、最终税费和交付未确认。"
      },
      "DigitalQuoteRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EmailVerificationQuoteRequest"
          },
          {
            "$ref": "#/components/schemas/SoundEffectsQuoteRequest"
          },
          {
            "$ref": "#/components/schemas/FontLicenseQuoteRequest"
          }
        ],
        "discriminator": {
          "propertyName": "categoryId",
          "mapping": {
            "email_verification": "#/components/schemas/EmailVerificationQuoteRequest",
            "sound_effects": "#/components/schemas/SoundEffectsQuoteRequest",
            "font_license": "#/components/schemas/FontLicenseQuoteRequest"
          }
        },
        "description": "可供外部 AI 工具无认证调用的三个数字品类。仅传数量、规格和用途；不接受待验证的邮箱名单或商品文件。"
      },
      "QuoteRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/EmailVerificationQuoteRequest"
          },
          {
            "$ref": "#/components/schemas/SoundEffectsQuoteRequest"
          },
          {
            "$ref": "#/components/schemas/FontLicenseQuoteRequest"
          },
          {
            "$ref": "#/components/schemas/PcbUnifiedQuoteRequest"
          }
        ],
        "discriminator": {
          "propertyName": "categoryId",
          "mapping": {
            "email_verification": "#/components/schemas/EmailVerificationQuoteRequest",
            "sound_effects": "#/components/schemas/SoundEffectsQuoteRequest",
            "font_license": "#/components/schemas/FontLicenseQuoteRequest",
            "pcb": "#/components/schemas/PcbUnifiedQuoteRequest"
          }
        },
        "description": "统一报价请求。公开数字分支与仅操作员可用的 PCB 分支共享 URL，但权限不同；公共 AI 工具应限定为 DigitalQuoteRequest。"
      }
    }
  },
  "tags": [
    {
      "name": "Unified quotes",
      "description": "统一数字目录报价与受保护 PCB 适配。"
    }
  ],
  "externalDocs": {
    "description": "中文接入、领域模型与扩展指南",
    "url": "https://pcba-quote-lab.pages.dev/developers"
  }
}
