{
  "openapi": "3.0.0",
  "info": {
    "title": "WebAZ Protocol API",
    "version": "0.4.14",
    "description": "Auto-generated endpoint inventory (1303 endpoints, 37 with full schema). See docs/ for design context."
  },
  "servers": [
    {
      "url": "https://webaz.xyz",
      "description": "production"
    },
    {
      "url": "http://localhost:3000",
      "description": "local dev"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "api_key"
      },
      "webauthnToken": {
        "type": "apiKey",
        "in": "header",
        "name": "X-WebAuthn-Token"
      },
      "grantBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "gtk_ delegation-grant (RFC-020, safe scope)"
      }
    }
  },
  "paths": {
    "/.well-known/did.json": {
      "get": {
        "summary": "任何标准 DID resolver(Veramo / SpruceID / KILT / web5 ...)可 GET → 解出 issuer key → 验 Phase 4 凭证签名",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "summary": "/.well-known/mcp.json —— 陌生 agent 常按这个名字探 MCP 公告;与 webaz-integration.json 里的 remote_mcp 同一真相源。",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-authorization-server": {
      "get": {
        "summary": "RFC 8414 — Authorization Server Metadata",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource": {
      "get": {
        "summary": "GET /.well-known/oauth-protected-resource",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp": {
      "get": {
        "summary": "GET /.well-known/oauth-protected-resource/mcp",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp/claude": {
      "get": {
        "summary": "GET /.well-known/oauth-protected-resource/mcp/claude",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp/claude-v1": {
      "get": {
        "summary": "GET /.well-known/oauth-protected-resource/mcp/claude-v1",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp/grok-v1": {
      "get": {
        "summary": "remains the audience-bound /mcp family; /mcp/grok-v1 only narrows the server-side tool boundary.",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp/shopping-v1": {
      "get": {
        "summary": "GET /.well-known/oauth-protected-resource/mcp/shopping-v1",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/oauth-protected-resource/mcp/shopping-v2": {
      "get": {
        "summary": "GET /.well-known/oauth-protected-resource/mcp/shopping-v2",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/openai-apps-challenge": {
      "get": {
        "summary": "GET /.well-known/openai-apps-challenge",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-acp-feed.json": {
      "get": {
        "summary": "GET /.well-known/webaz-acp-feed.json",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-ap2-jwks.json": {
      "get": {
        "summary": "AP2 step 1:平台签名公钥(只含公钥;未配签名钥匙 → { keys: [] })。轮换期间旧 kid 仍在列表里。",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-capabilities.json": {
      "get": {
        "summary": "集成方 agent fetch 此端点即知\"我要做的写需要声明哪个 scope / 哪些写无需 scope / 哪些读受约束\"。",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-economic.json": {
      "get": {
        "summary": "GET /.well-known/webaz-economic.json",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-entities.json": {
      "get": {
        "summary": "RFC-011 §① — agent 可读实体字典(订单状态机 doc=code + 保守公开字段 + 可验证标注)。",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-goals.json": {
      "get": {
        "summary": "RFC-011 §① 目标索引 —— intent → action(②)+ endpoint + MCP 工具 + PWA 页(agent 自路由)。",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-integration.json": {
      "get": {
        "summary": "RFC-011 总入口 —— 集成方 agent 一次 fetch 拿到整份契约导航(按旅程组织,指向各维度 live 端点)。",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-launch-pulse.json": {
      "get": {
        "summary": "GET /.well-known/webaz-launch-pulse.json",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-negative-space.json": {
      "get": {
        "summary": "GET /.well-known/webaz-negative-space.json",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-protocol.json": {
      "get": {
        "summary": "GET /.well-known/webaz-protocol.json",
        "tags": [],
        "security": []
      }
    },
    "/.well-known/webaz-verifiability.json": {
      "get": {
        "summary": "GET /.well-known/webaz-verifiability.json",
        "tags": [],
        "security": []
      }
    },
    "/api/addresses": {
      "get": {
        "summary": "GET /api/addresses",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/addresses",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/addresses/{id}": {
      "delete": {
        "summary": "DELETE /api/addresses/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "PATCH /api/addresses/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/_dev/recompute-value-badges": {
      "post": {
        "summary": "POST /api/admin/_dev/recompute-value-badges",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/admins": {
      "get": {
        "summary": "GET 全部 admin 列表",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "strip_conflicting_roles=true → 同一事务剥离 buyer/seller 并记入 admin_create 审计的 stripped_roles",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/admins/{id}": {
      "delete": {
        "summary": "DELETE 撤销 admin（root only；不能撤自己；至少保留 1 个 root）",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/admins/{id}/emergency-freeze": {
      "post": {
        "summary": "For incident response (e.g. a compromised / rogue admin). Atomic. Cannot freeze self or the last root.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/admins/{id}/permissions": {
      "patch": {
        "summary": "PATCH 更新权限（root only）",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/agent-strikes/{strikeId}/decide": {
      "post": {
        "summary": "Admin: 审核 strike 申诉",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "strikeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/agent-strikes/issue": {
      "post": {
        "summary": "P1 fix 4.3: admin 主动 issue strike",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/agent-strikes/pending": {
      "get": {
        "summary": "Admin: 列出待审 strike 申诉",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/agents/{api_key}/reputation": {
      "get": {
        "summary": "GET /api/admin/agents/:api_key/reputation",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "api_key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/ai-budget": {
      "get": {
        "summary": "P3 预算闸:今日平台 AI 花费/预留/上限/调用/拒绝(仅 admin;USD 为十进制字符串)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/ai/anomaly-check/{user_id}": {
      "post": {
        "summary": "POST /api/admin/ai/anomaly-check/:user_id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/announcements": {
      "post": {
        "summary": "POST /api/admin/announcements",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/announcements/{id}": {
      "patch": {
        "summary": "PATCH /api/admin/announcements/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/arbitrator-applications": {
      "get": {
        "summary": "Admin",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/arbitrator-applications/{id}/approve": {
      "post": {
        "summary": "POST /api/admin/arbitrator-applications/:id/approve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/arbitrator-applications/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/arbitrator-applications/:id/reject",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/arbitrators": {
      "get": {
        "summary": "名册(admin 只读,无需 Passkey)。含 active/suspended/revoked 全量 + 状态。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/arbitrators/{user_id}/reinstate": {
      "post": {
        "summary": "POST /api/admin/arbitrators/:user_id/reinstate",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/arbitrators/{user_id}/revoke": {
      "post": {
        "summary": "POST /api/admin/arbitrators/:user_id/revoke",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/arbitrators/{user_id}/suspend": {
      "post": {
        "summary": "POST /api/admin/arbitrators/:user_id/suspend",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/arbitrators/grant": {
      "post": {
        "summary": "POST /api/admin/arbitrators/grant",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/arbitrators/legacy-candidates": {
      "get": {
        "summary": "列出疑似由旧 boot 迁移灌入白名单的仲裁员候选(只读,供人工复核,不授予不撤销)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/atomic/process-ledger": {
      "post": {
        "summary": "POST /api/admin/atomic/process-ledger",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/auction-reminders/run": {
      "post": {
        "summary": "Admin 手动跑提醒派发",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/auctions/{id}/cancel": {
      "post": {
        "summary": "POST /api/admin/auctions/:id/cancel",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/auctions/held": {
      "get": {
        "summary": "到期、有在押出价、卖家整改 / 暂停接单而暂缓成交的拍卖(运营页 #admin/auctions-held)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/audit-log": {
      "get": {
        "summary": "GET /api/admin/audit-log",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/auditor": {
      "get": {
        "summary": "GET /api/admin/auditor",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/bot-dashboard": {
      "get": {
        "summary": "GET /api/admin/bot-dashboard",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/bot-rights-holders": {
      "get": {
        "summary": "GET /api/admin/bot-rights-holders — ROOT 只读:全部登记(含已撤销)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/bot-rights-holders — 登记(新增/换人)。ROOT + Passkey,purpose_data 绑 instance_id+user_id。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/bot-rights-holders/{instance_id}/revoke": {
      "post": {
        "summary": "POST /api/admin/bot-rights-holders/:instance_id/revoke — 撤销当前活跃登记。ROOT + Passkey,purpose_data 绑 instance_id。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "instance_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/bot-status": {
      "get": {
        "summary": "→ { enabled, started, bot_username, counters, budget_ok, review_budget_ok } 六键,不多一个;不缓存",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/build-feedback": {
      "get": {
        "summary": "── maintainer triage ────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/build-feedback/{id}": {
      "post": {
        "summary": "POST /api/admin/build-feedback/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/build-feedback/triage": {
      "post": {
        "summary": "⚠️ 必须在 /:id 之前声明,否则 'triage' 会被 :id 捕获。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/build-task-drafts": {
      "get": {
        "summary": "admin list of UNPUBLISHED drafts (internal, open) + source proposal id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/build-task-drafts/{id}": {
      "get": {
        "summary": "full stored body of ONE unpublished internal draft — for PRE-PUBLISH PREVIEW (publish against visible content).",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/build-task-drafts/{id}/discard": {
      "post": {
        "summary": "Fail-closed: refuses a published / claimed draft or an already-converted source proposal. Scope = discard only.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/build-task-drafts/{id}/publish": {
      "post": {
        "summary": "PUBLISH a draft → public open task — explicit human/admin action; records the acting admin",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/build-tasks/{id}/resolve": {
      "post": {
        "summary": "验收终态 —— 仅 admin/maintainer(验收=真人,RFC-006 不变量 2;不发奖励/不记信誉)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/build-tasks/{id}/withdraw": {
      "post": {
        "summary": "draft can be built). Fail-closed: refuses a claimed task or a non-published task. Soft-delete (provenance kept).",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/buyer-claims": {
      "get": {
        "summary": "GET /api/admin/buyer-claims",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/buyer-claims/{id}/claim": {
      "post": {
        "summary": "POST /api/admin/buyer-claims/:id/claim",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/buyer-claims/{id}/record-payout": {
      "post": {
        "summary": "POST /api/admin/buyer-claims/:id/record-payout",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/buyer-claims/{id}/release": {
      "post": {
        "summary": "POST /api/admin/buyer-claims/:id/release",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/catalog-validity": {
      "get": {
        "summary": "GET /api/admin/catalog-validity",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/categories/{id}/seasonal": {
      "delete": {
        "summary": "DELETE /api/admin/categories/:id/seasonal",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "─── 类目 季节性配置 ─────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/charity/fund": {
      "get": {
        "summary": "GET /api/admin/charity/fund",
        "tags": [
          "admin",
          "charity"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/charity/fund/disburse": {
      "post": {
        "summary": "POST /api/admin/charity/fund/disburse",
        "tags": [
          "admin",
          "charity"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/dashboard": {
      "get": {
        "summary": "GET /api/admin/dashboard",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/demand-funnel": {
      "get": {
        "summary": "GET /api/admin/demand-funnel",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/demand-signals": {
      "get": {
        "summary": "公开给商家 = 未来独立 gated PR(聚合阈值≥N + 脱敏,永不暴露单买家)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/aml-flags": {
      "post": {
        "summary": "POST /api/admin/direct-receive/aml-flags",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/aml-flags/{id}/review": {
      "post": {
        "summary": "route 只做 auth + gate + 参数校验 + 调 reviewAmlFlag(唯一 review writer,原子改 flag + 写 audit)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/bond-slash": {
      "get": {
        "summary": "── B3:保证金罚没(人工铁律:仲裁裁定卖家责的直付争议 → 提案 → 冷静期 → ROOT+Passkey 执行;绝不自动)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/bond-slash/{id}/cancel": {
      "post": {
        "summary": "撤销(ROOT + 真人 Passkey,purpose direct_pay_bond_slash_cancel 绑 proposal_id)—— 与执行同级(BOND05):被盗的 ROOT 会话不能悄悄撤掉罚没。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/bond-slash/{id}/execute": {
      "post": {
        "summary": "执行(ROOT + 真人 Passkey,purpose direct_pay_bond_slash 绑 proposal_id;冷静期由域内绝对截止校验)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/bond-slash/propose": {
      "post": {
        "summary": "提案(ROOT,审计留痕,不 Passkey —— 提案不动任何东西;执行才是终局动作)。通知卖家(冷静期=申诉窗)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/compliance-status": {
      "get": {
        "summary": "GET /api/admin/direct-receive/compliance-status?user_id= — ROOT 只读:卖家当前 KYB/制裁事实(同门谓词)+ 最新行 status/expires_at。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/deferrals": {
      "get": {
        "summary": "GET /api/admin/direct-receive/deferrals?status=pending — ROOT 审批队列(默认全部;可按 status 过滤)。纯读。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/deferrals/{id}/adjust-quota": {
      "post": {
        "summary": "reduced_quota_factor(签 A 改 B / 改数值一律拒)。adjustGrantedDeferralQuota 是唯一 writer(CAS on granted)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deferrals/{id}/approve": {
      "post": {
        "summary": "Passkey purpose_data 绑定【完整审批条款】(deferral_id + reduced_quota_factor + grace_days):签 A 批 B / 改条款一律拒。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deferrals/{id}/raise-requests": {
      "get": {
        "summary": "GET /api/admin/direct-receive/deferrals/:id/raise-requests — ROOT 只读:该缓交的调高申请(含用量快照)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deferrals/{id}/raise-requests/{rid}/reject": {
      "post": {
        "summary": "purpose_data 绑 request_id(镜像 direct_pay_fee_prepay_reject 只绑 request_id 的做法)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deferrals/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/direct-receive/deferrals/:id/reject — ROOT + 真人 Passkey 拒绝缓交。purpose_data 绑 deferral_id。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits": {
      "get": {
        "summary": "GET /api/admin/direct-receive/deposits?status=pending — ROOT 只读:保证金申报队列(核对到账用)。B1。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/chain-probe": {
      "get": {
        "summary": "GET /api/admin/direct-receive/deposits/:id/chain-probe",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/confirm-production": {
      "post": {
        "summary": "当前恒 fail-closed(无 legal-cleared rail → assert 抛 → PRODUCTION_RAIL_NOT_CLEARED)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/confirm-production-fiat": {
      "post": {
        "summary": "一次 USDC 的 Passkey 确认绝不能被挪用到法币确认上。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/execute-refund": {
      "post": {
        "summary": "unlock blockers(冷静期内可能新增退货/欠费等责任 —— 有任一即拒)。凭据必填;真实退款发生在协议外,此处只记录。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/execute-refund-fiat": {
      "post": {
        "summary": "与确认侧同一条纪律:USDC 轨绝不能借道\"链上核不了\"溜进人工路径。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/refund-call": {
      "get": {
        "summary": "目的地=卖家自己登记的地址,金额=这笔存款记录的到位额;运营界面因此不需要、也没有任何输入框。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/deposits/{id}/reject": {
      "post": {
        "summary": "不 Passkey:驳回不授予/不移动任何东西(与缓交 reject 不同 —— 那是资格决定;这里只是\"到账核不上\"退回重报)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-account/{seller_id}": {
      "get": {
        "summary": "只读诊断,不写、无 Passkey(读不授权能力);卖家私密财务,买家/卖家拿不到此 admin 视图。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "seller_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-adjust": {
      "post": {
        "summary": "≠ 退款(不动真钱,只调记账)。purpose_data 绑 seller_id+delta_units+reason。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-prepay": {
      "post": {
        "summary": "不碰 buyer wallet/escrow/order/settlement/refund;非买家 escrow/保证金/penalty。本轮无\"余额退款\"(仅正向预付款登记)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-prepay-requests": {
      "get": {
        "summary": "GET /api/admin/direct-receive/fee-prepay-requests?status=pending — ROOT 只读:预充值申请队列(核对到账用)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-prepay-requests/{id}/approve": {
      "post": {
        "summary": "purpose_data 绑 request_id + seller_id + amount_units + method(把入账金额/对象钉进 Passkey)。原子:approved + recordFeePrepay + 关联 payment。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-prepay-requests/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/direct-receive/fee-prepay-requests/:id/reject — ROOT + Passkey(不动钱)。purpose_data 绑 request_id。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-refund": {
      "post": {
        "summary": "amount ≤ 当前 available(helper 同事务校验)。append-only + audit。purpose_data 绑 seller_id+amount_units+method+evidence_ref。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-withdraw-requests": {
      "get": {
        "summary": "GET /api/admin/direct-receive/fee-withdraw-requests?status=pending — ROOT 只读:提现申请队列(打款前核对用)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-withdraw-requests/{id}/approve": {
      "post": {
        "summary": "只接受已认领(paying)的单;可提额在记账函数的事务里重校验:被新订单占掉 → 整体失败不出账。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-withdraw-requests/{id}/claim": {
      "post": {
        "summary": "POST /api/admin/direct-receive/fee-withdraw-requests/:id/claim",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/fee-withdraw-requests/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/direct-receive/fee-withdraw-requests/:id/reject — ROOT + Passkey(不动钱)。purpose_data 绑 request_id。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/kyb-reviews": {
      "post": {
        "summary": "Passkey purpose_data 绑定【完整写入内容】(user_id+status+provider_ref+expires_at):签 A 写 B 一律拒。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/product-verifications": {
      "get": {
        "summary": "GET /api/admin/direct-receive/product-verifications?status=submitted — ROOT 审核队列(默认全部)。纯读。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/product-verifications/{id}/review": {
      "post": {
        "summary": "Passkey purpose_data 绑 verification_id + decision:签 A 用 B / 改结论一律拒。verify = 放行该产品直付(逐品,绝不放行全部)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/readiness": {
      "post": {
        "summary": "含 KYB/sanctions/AML/base-bond/rail clearance 全细节)。只读诊断(不写库、不 flip launch);ROOT 专用,买家/卖家拿不到。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/sanctions-screenings": {
      "post": {
        "summary": "purpose_data 绑定 user_id+status+provider_ref+expires_at。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/sellers/{id}/clear-slash": {
      "post": {
        "summary": "POST /api/admin/direct-receive/sellers/:id/clear-slash",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/slash-suspensions": {
      "get": {
        "summary": "GET /api/admin/direct-receive/slash-suspensions",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/store-verifications": {
      "get": {
        "summary": "GET /api/admin/direct-receive/store-verifications?status=submitted — ROOT 审核队列(默认全部)。纯读。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/store-verifications/{id}/review": {
      "post": {
        "summary": "POST /api/admin/direct-receive/store-verifications/:id/review — ROOT + 真人 Passkey 核店铺 + 勾选逐品豁免。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/unattributed": {
      "get": {
        "summary": "\"不经过人手\",不是靠人小心。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/direct-receive/unattributed/{id}/refund-call": {
      "get": {
        "summary": "只读:生成退款交易的 {to,data}。运营拿去在自己钱包里签名,不在这里动任何状态。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/direct-receive/unattributed/{id}/refund-record": {
      "post": {
        "summary": "否则我们只是把\"人工确认收钱\"的问题原样搬到了\"人工确认退钱\"。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/disputes": {
      "get": {
        "summary": "GET /api/admin/disputes",
        "tags": [
          "admin",
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/disputes/{id}/decline-contest-resolve": {
      "post": {
        "summary": "(dispute CAS + COI + 终态 completed + 结算 + 审计,单事务全回滚)。admin override 不占用 assigned_arbitrators。",
        "tags": [
          "admin",
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/economic-summary": {
      "get": {
        "summary": "隐私第一：运营财务，仅 protocol admin 可见。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/editor-picks": {
      "get": {
        "summary": "GET /api/admin/editor-picks",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/editor-picks",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/editor-picks/{id}": {
      "delete": {
        "summary": "DELETE /api/admin/editor-picks/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/email-subscriptions": {
      "get": {
        "summary": "2026-05-25 admin 查邮箱订阅 — 独立端点，与建议分开",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/email-subscriptions/{id}/status": {
      "patch": {
        "summary": "2026-05-29: admin 标记申请处理状态（pending→contacted→invited→done）— 不动 POST 提交逻辑",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/errors": {
      "get": {
        "summary": "GET /api/admin/errors",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/errors/aggregate": {
      "get": {
        "summary": "Tier 1 #5: 错误聚合 view（24h / 1h 趋势 + top by source + top messages + burst alert）",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/events/recent": {
      "get": {
        "summary": "GET /api/admin/events/recent",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/events/stream": {
      "get": {
        "summary": "GET /api/admin/events/stream",
        "tags": [],
        "security": []
      }
    },
    "/api/admin/events/ticket": {
      "post": {
        "summary": "POST /api/admin/events/ticket",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/export/{kind}": {
      "get": {
        "summary": "GET /api/admin/export/:kind",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/feedback": {
      "get": {
        "summary": "admin 列出工单",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/feedback/{id}/reply": {
      "post": {
        "summary": "admin 回复 + 切状态",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/finance/monthly": {
      "get": {
        "summary": "GET /api/admin/finance/monthly",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/governance/activate": {
      "post": {
        "summary": "body: { application_id, webauthn_token, note? }",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/governance/appeals": {
      "get": {
        "summary": "GET /api/admin/governance/appeals — maintainer 看待裁决申诉",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/governance/application/{id}": {
      "get": {
        "summary": "GET /api/admin/governance/application/:id — 详情(含 expected_verdict 用于对比 — 仅 maintainer 看)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/governance/applications": {
      "get": {
        "summary": "GET /api/admin/governance/applications — 列出 pending_onboarding(可筛 quiz_passed + has_case_review)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/governance/auto-deactivations": {
      "get": {
        "summary": "spec §6.2 公示触发原因(透明 — 元规则 #1)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/governance/resolve-appeal": {
      "post": {
        "summary": "accept → 恢复 active(spec §7.2) ;reject → 维持 inactive,公开理由",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/governance/run-auto-deactivate": {
      "post": {
        "summary": "Useful for ops + testing. The scheduled cron also runs every N hours.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/health": {
      "get": {
        "summary": "GET /api/admin/health",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/hot-wallet": {
      "get": {
        "summary": "仅余额(原 legacy x-admin-key 入口;ADM05 起 protocol Bearer)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/hot-wallet/status": {
      "get": {
        "summary": "P2-5: protocol 权限（区域 admin 看不到全局热钱包）",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/inbox": {
      "get": {
        "summary": "待办(只读):所有等管理员处理的队列 + 最早等待时长 + 直达锚点 + 铁律标记。不给任何处理动作。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/individual-cap/raise-requests": {
      "get": {
        "summary": "── 管理台(ROOT)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/individual-cap/raise-requests/{id}/approve": {
      "post": {
        "summary": "POST /api/admin/individual-cap/raise-requests/:id/approve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/individual-cap/raise-requests/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/individual-cap/raise-requests/:id/reject",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/kyc/{user_id}/approve": {
      "post": {
        "summary": "POST /api/admin/kyc/:user_id/approve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/kyc/{user_id}/reject": {
      "post": {
        "summary": "POST /api/admin/kyc/:user_id/reject",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/kyc/pending": {
      "get": {
        "summary": "─── KYC ──────────────────────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/merchant-reviews": {
      "get": {
        "summary": "GET /api/admin/merchant-reviews?status=submitted — ROOT 队列(默认 submitted + under_review),带卖家 handle/name 与当前 KYB/制裁事实。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/merchant-reviews/{id}": {
      "get": {
        "summary": "GET /api/admin/merchant-reviews/:id — ROOT 详情 + 文件元数据(无字节)+ 当前两条事实。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/merchant-reviews/{id}/approve": {
      "post": {
        "summary": "需要填参考号/有效期时仍走两个 ingest 端点 + close-approved(本路由不收这些参数)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/merchant-reviews/{id}/close-approved": {
      "post": {
        "summary": "(与直付门同一对谓词)此刻都通过时把本记录标 approved;否则 409 FACTS_NOT_RECORDED + missing。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/merchant-reviews/{id}/documents/{docId}": {
      "get": {
        "summary": "GET /api/admin/merchant-reviews/:id/documents/:docId — 文件字节。仅上传者本人或 root admin;其余 403(不区分存在与否),未登录 401。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "docId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/merchant-reviews/{id}/mark-under-review": {
      "post": {
        "summary": "POST /api/admin/merchant-reviews/:id/mark-under-review — ROOT 标记审核中(submitted → under_review)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/merchant-reviews/{id}/reject": {
      "post": {
        "summary": "门同店铺认证拒绝:purpose_data 绑 review_id + reason(签 A 拒 B / 改原因一律拒)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims": {
      "get": {
        "summary": "── ROOT: review queue (all claims, optional ?status=) ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "── admin proposes linking THEIR OWN seat to a contributor account ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/operator-claims/{approvedEventId}/revoke": {
      "post": {
        "summary": "── ROOT: revoke an APPROVED (active) claim ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "approvedEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims/{claimedEventId}": {
      "get": {
        "summary": "── ROOT: claim detail ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "claimedEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims/{claimedEventId}/approve": {
      "post": {
        "summary": "── ROOT: approve a proposed-or-confirmed claim ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "claimedEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims/{claimedEventId}/reject": {
      "post": {
        "summary": "── ROOT: reject a still-proposed/confirmed claim ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "claimedEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims/me": {
      "get": {
        "summary": "admin-seat owner can request/track unlink on their own active claims) ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/operator-claims/unlink/{requestEventId}/approve": {
      "post": {
        "summary": "relationship/request, approval_kind + conflict_disclosure are required (governance honesty). ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "requestEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims/unlink/{requestEventId}/reject": {
      "post": {
        "summary": "── ROOT: reject an unlink request → claim stays active. Same self-or-related marking discipline. ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "requestEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/operator-claims/unlink/requests": {
      "get": {
        "summary": "self_or_related flags each request the viewing root is a party to → the UI then REQUIRES honest marking. ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/ops-dashboard": {
      "get": {
        "summary": "?days=7|15|30(默认 15,其它 400 OPS_PERIOD_INVALID)→ period_days · days[] · 每项 {today,yesterday,avg7,avgPeriod?,series[days]} · funnels 按同一窗口合计;只有计数",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/ops-funds": {
      "get": {
        "summary": "GET /api/admin/ops-funds",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/ops-security": {
      "get": {
        "summary": "GET /api/admin/ops-security",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/ops-visitors": {
      "get": {
        "summary": "GET /api/admin/ops-visitors",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/orders": {
      "get": {
        "summary": "GET /api/admin/orders",
        "tags": [
          "admin",
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/payment-fee-schedules": {
      "get": {
        "summary": "GET /api/admin/payment-fee-schedules",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/payment-fee-schedules",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/payment-fee-schedules/{key}/retire": {
      "post": {
        "summary": "POST /api/admin/payment-fee-schedules/:key/retire",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/payment-fee-schedules/{key}/reverify": {
      "post": {
        "summary": "POST /api/admin/payment-fee-schedules/:key/reverify",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/payment-fee-schedules/preview": {
      "post": {
        "summary": "POST /api/admin/payment-fee-schedules/preview",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/payment-methods": {
      "get": {
        "summary": "─── Admin payment_methods CRUD（root admin only · 基础设施变更需根权限）─",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/payment-methods",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/payment-methods/{id}": {
      "delete": {
        "summary": "DELETE /api/admin/payment-methods/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "PUT /api/admin/payment-methods/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/platform-receive-accounts": {
      "get": {
        "summary": "── list(ROOT 读;含 inactive + qr_data_uri)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "── add(ROOT + Passkey)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/platform-receive-accounts/{id}": {
      "delete": {
        "summary": "── deactivate(ROOT + Passkey + 存在性)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "── update(ROOT + Passkey + 存在性)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/products": {
      "get": {
        "summary": "─── 商品 列表 + 强制下架 ───────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/products/{id}/force-delist": {
      "post": {
        "summary": "POST /api/admin/products/:id/force-delist",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/products/{id}/public-catalog": {
      "post": {
        "summary": "★ 熄灭不校验:出问题要能随时拿下来,不该被\"它现在也不达标\"挡住。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/products/{id}/public-catalog-exclude": {
      "post": {
        "summary": "排除不是删除:随时能撤回,而且要求写一句为什么(否则三个月后没人知道当初为什么否)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/products/{id}/restore": {
      "post": {
        "summary": "恢复到仓库,不直接上架 —— 上架仍由卖家过同一道上架门(product-publish-gate.ts)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/promoter-payout-requests": {
      "get": {
        "summary": "══ D8:推广者出金队列(每周批量打款的操作台)═══════════════════════════════",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/promoter-payout-requests/{id}/approve": {
      "post": {
        "summary": "确认已链上真实打款 → 关单(不动钱:余额在申请时已扣)。只接受已认领(paying)的单;txid 必填。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/promoter-payout-requests/{id}/claim": {
      "post": {
        "summary": "余额在【申请时】就已扣走,所以认领和确认都不再动钱。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/promoter-payout-requests/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/promoter-payout-requests/:id/reject",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/protocol-kpi": {
      "get": {
        "summary": "GET /api/admin/protocol-kpi",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/protocol-params": {
      "get": {
        "summary": "GET /api/admin/protocol-params",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/protocol-params/{key}": {
      "patch": {
        "summary": "2026-06-03 #1095: + constitutional only-increase 守护",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/protocol-params/{key}/history": {
      "get": {
        "summary": "A-3: 变更历史",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/protocol-params/{key}/reset": {
      "post": {
        "summary": "POST /api/admin/protocol-params/:key/reset",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/public-catalog": {
      "get": {
        "summary": "每一件\"已收录却看不到\"的商品都必须说得出是被什么压着,以及该找谁。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/public-ideas": {
      "get": {
        "summary": "─── admin 端 ─────────────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/public-ideas/{id}": {
      "patch": {
        "summary": "PATCH /api/admin/public-ideas/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/quota-applications": {
      "get": {
        "summary": "Admin",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/quota-applications/{id}/approve": {
      "post": {
        "summary": "POST /api/admin/quota-applications/:id/approve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/quota-applications/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/quota-applications/:id/reject",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/quota-requests": {
      "get": {
        "summary": "list quota requests (optional ?status=)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/quota-requests/{id}": {
      "get": {
        "summary": "detail of one request + the requester's live 24h create usage (reviewer context)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/quota-requests/{id}/approve": {
      "post": {
        "summary": "approve → time-boxed counted grant (self-approval rejected in the store)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/quota-requests/{id}/reject": {
      "post": {
        "summary": "reject (self-rejection also blocked by the store's SELF_DECISION guard)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/quota-requests/{id}/revoke": {
      "post": {
        "summary": "revoke an already-approved grant (root)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/reconciliation/overview": {
      "get": {
        "summary": "GET /api/admin/reconciliation/overview",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/region-payment-methods": {
      "get": {
        "summary": "─── region_payment_methods CRUD ──────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/region-payment-methods",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/region-payment-methods/{id}": {
      "delete": {
        "summary": "DELETE /api/admin/region-payment-methods/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "PUT /api/admin/region-payment-methods/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/reputation/decay": {
      "post": {
        "summary": "POST /api/admin/reputation/decay",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/rewards-health": {
      "get": {
        "summary": "以及\"在旧 major consent 上仍 opted-in\"= 下次 auto_downgrade cron 的降级候选。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/risk/suspend/{user_id}": {
      "post": {
        "summary": "POST /api/admin/risk/suspend/:user_id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/risk/suspicious": {
      "get": {
        "summary": "─── D-1 风控告警 ────────────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/risk/unsuspend/{user_id}": {
      "post": {
        "summary": "POST /api/admin/risk/unsuspend/:user_id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/skill-market/{id}/audit": {
      "post": {
        "summary": "─── Admin：审核 ────────────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/skill-market/pending": {
      "get": {
        "summary": "─── Admin：待审列表 ────────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/task-proposals": {
      "get": {
        "summary": "admin list (maintainer only)",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/task-proposals/{id}/ai-assist": {
      "post": {
        "summary": "NEVER a decision: no auto-publish / auto-reject / hide / reward. A human admin must act explicitly.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/task-proposals/{id}/ai-suggestions": {
      "get": {
        "summary": "stored AI suggestions (evidence) for a proposal",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/task-proposals/{id}/create-task-draft": {
      "post": {
        "summary": "No auto-publish (draft is internal/unclaimable until an explicit publish); no reward/credit side effect.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/task-proposals/{id}/review": {
      "post": {
        "summary": "admin review (maintainer only): needs_info | rejected | converted — no build_task is created here.",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/tokenomics": {
      "get": {
        "summary": "Tokenomics 详细数据 + Tier 配置 + 高额榜",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/traffic-marker": {
      "get": {
        "summary": "GET /api/admin/traffic-marker",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/traffic-marker",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/trial/run-eval": {
      "post": {
        "summary": "Admin 手动触发测评评估（测试 + 紧急 + 立即生效）",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/usage": {
      "get": {
        "summary": "GET /api/admin/usage",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/usdc-channel/transitions": {
      "get": {
        "summary": "GET /api/admin/usdc-channel/transitions",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/usdc-escrow-v2/snapshot": {
      "get": {
        "summary": "(domain_id 里带的是公开的合约地址,那是身份不是秘密)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/usdc-escrow/{orderId}/flag-dispute": {
      "post": {
        "summary": "POST /api/admin/usdc-escrow/:orderId/flag-dispute —— arbiter 冻结(链上 flagDispute;买家丢钱包/不配合)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/usdc-escrow/{orderId}/resolve": {
      "post": {
        "summary": "POST /api/admin/usdc-escrow/:orderId/resolve —— arbiter 裁决(链上 arbiterResolve;buyerRefund 6dp 整数单位)。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/usdc-escrow/{orderId}/state": {
      "get": {
        "summary": "GET /api/admin/usdc-escrow/:orderId/state",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/usdc-escrow/payout-freeze/{sellerId}/clear": {
      "post": {
        "summary": "解冻与审计同一事务(审计写不进 = 不解冻,fail-closed)。解冻只恢复「可以再发起变更」;下一次变更照常走延时。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "sellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users": {
      "get": {
        "summary": "GET /api/admin/users",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/users/{id}/force-delist-all": {
      "post": {
        "summary": "POST /api/admin/users/:id/force-delist-all",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/grant-role": {
      "post": {
        "summary": "P0.1: admin 角色提权必须 root；其他角色需 users + scope",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/l1-share-override": {
      "post": {
        "summary": "L1 分享权限 override：0 auto / 1 强允 / -1 强禁",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/manifest-quota": {
      "get": {
        "summary": "GET /api/admin/users/:id/manifest-quota",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/users/:id/manifest-quota",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/passkeys": {
      "get": {
        "summary": "── 只读:一个账号的 Passkey 全貌 ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/passkeys/reset": {
      "post": {
        "summary": "── 重置(救济)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/pause-listing": {
      "post": {
        "summary": "POST /api/admin/users/:id/pause-listing",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/profile": {
      "get": {
        "summary": "完整档案聚合",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/reset-failed-attempts": {
      "post": {
        "summary": "解除账号登录锁定：清零失败次数 + 解锁",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/resume-listing": {
      "post": {
        "summary": "POST /api/admin/users/:id/resume-listing",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/revoke-role": {
      "post": {
        "summary": "P0.3: revoke admin → root only",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/seller-tier": {
      "get": {
        "summary": "用户详情页只读区块(ROOT):档位 / 当前阶 / 30 天已用 / 核定值 / 最近一条申请。",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/set-product-quota": {
      "post": {
        "summary": "POST /api/admin/users/:id/set-product-quota",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/set-roles": {
      "post": {
        "summary": "P0.2: preview diff，含 admin 变更 → root only",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/suspend": {
      "post": {
        "summary": "P0.4: users + scope；suspend admin → root only",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/timeline": {
      "get": {
        "summary": "Wave F-3: 完整事件流",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/{id}/unsuspend": {
      "post": {
        "summary": "POST /api/admin/users/:id/unsuspend",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/users/batch-action": {
      "post": {
        "summary": "POST /api/admin/users/batch-action",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/users/lookup": {
      "get": {
        "summary": "P1-1: 按 handle / id 任意角色查找",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/verifier-appeals": {
      "get": {
        "summary": "GET /api/admin/verifier-appeals",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/verifier-appeals/{id}/decide": {
      "post": {
        "summary": "POST /api/admin/verifier-appeals/:id/decide",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verifier-applications": {
      "get": {
        "summary": "GET /api/admin/verifier-applications",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/verifier-applications/{id}/approve": {
      "post": {
        "summary": "POST /api/admin/verifier-applications/:id/approve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verifier-applications/{id}/reject": {
      "post": {
        "summary": "POST /api/admin/verifier-applications/:id/reject",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verifier-whitelist": {
      "get": {
        "summary": "GET /api/admin/verifier-whitelist",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/admin/verifier-whitelist",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/verifier-whitelist/{userId}": {
      "delete": {
        "summary": "DELETE /api/admin/verifier-whitelist/:userId",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verifier-whitelist/{userId}/promote": {
      "post": {
        "summary": "POST /api/admin/verifier-whitelist/:userId/promote",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verifier-whitelist/{userId}/revoke": {
      "post": {
        "summary": "POST /api/admin/verifier-whitelist/:userId/revoke",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verifier-whitelist/{userId}/suspend": {
      "post": {
        "summary": "POST /api/admin/verifier-whitelist/:userId/suspend",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/verify-tasks": {
      "get": {
        "summary": "GET /api/admin/verify-tasks",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/visitor-activity": {
      "get": {
        "summary": "GET /api/admin/visitor-activity",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/wish-reports": {
      "get": {
        "summary": "─── admin 慈善管理 ─────────────────────────────────────────",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/wish-reports/{id}": {
      "patch": {
        "summary": "PATCH /api/admin/wish-reports/:id",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/wishes/{id}/takedown": {
      "post": {
        "summary": "POST /api/admin/wishes/:id/takedown",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/withdrawals": {
      "get": {
        "summary": "GET /api/admin/withdrawals",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/withdrawals/{id}/approve": {
      "post": {
        "summary": "POST /api/admin/withdrawals/:id/approve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/world-id/audit": {
      "get": {
        "summary": "── 只读:时间线(用户自助并入 + 管理员操作)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/world-id/face/reset": {
      "post": {
        "summary": "── 重置刷脸登记 ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/world-id/move": {
      "post": {
        "summary": "── 搬绑定 from → into ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/world-id/unbind": {
      "post": {
        "summary": "── 解绑(极端)──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/world-id/users/{id}": {
      "get": {
        "summary": "── 只读:一个账号的 World ID 全貌 ──",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/admin/x402/orphans": {
      "get": {
        "summary": "GET /api/admin/x402/orphans",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/admin/x402/orphans/{settlement_id}/resolve": {
      "post": {
        "summary": "POST /api/admin/x402/orphans/:settlement_id/resolve",
        "tags": [
          "admin"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "settlement_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-buy": {
      "post": {
        "summary": "Agent 智能比价 — 外链输入 → 比价 + 推荐(auto_buy 已于 RFC-025 PR-5b 退役:购买需真人 Passkey 逐笔批准)",
        "tags": [
          "agent"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "source_url": {
                    "type": "string",
                    "format": "uri",
                    "description": "外站链接（淘宝/京东/Amazon 等）"
                  },
                  "shipping_address": {
                    "type": "string",
                    "description": "可选,用于运费估算"
                  },
                  "auto_buy": {
                    "type": "boolean",
                    "default": false,
                    "description": "RETIRED — true 一律返回 410 AUTO_BUY_RETIRED(下单走 quote→draft→submit→Passkey 链);false/省略 = 仅比价推荐"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recommendation": {
                      "enum": [
                        "buy_webaz",
                        "buy_source",
                        "no_match"
                      ]
                    },
                    "best_product": {
                      "type": "object"
                    },
                    "webaz_products": {
                      "type": "array"
                    },
                    "order_id": {
                      "const": null,
                      "description": "恒 null(auto_buy 已退役)"
                    },
                    "auto_bought": {
                      "type": "boolean",
                      "description": "恒 false"
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error_code": {
                      "const": "AUTO_BUY_RETIRED"
                    },
                    "next_steps": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agent-connect-request": {
      "post": {
        "summary": "POST /api/agent-connect-request",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-connect-request/{request_id}": {
      "get": {
        "summary": "GET /api/agent-connect-request/:request_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect-request/{request_id}/approve": {
      "post": {
        "summary": "POST /api/agent-connect-request/:request_id/approve",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect-request/{request_id}/poll": {
      "post": {
        "summary": "POST /api/agent-connect-request/:request_id/poll",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect-request/{request_id}/reject": {
      "post": {
        "summary": "POST /api/agent-connect-request/:request_id/reject",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect/{code_id}": {
      "get": {
        "summary": "GET /api/agent-connect/:code_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "code_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect/{code_id}/cancel": {
      "post": {
        "summary": "POST /api/agent-connect/:code_id/cancel",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "code_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect/{code_id}/issue": {
      "post": {
        "summary": "POST /api/agent-connect/:code_id/issue",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "code_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-connect/prepare": {
      "post": {
        "summary": "POST /api/agent-connect/prepare",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/agent-connect/redeem": {
      "post": {
        "summary": "POST /api/agent-connect/redeem",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-grants": {
      "get": {
        "summary": "\"Connected agents\" UI shows so a human can spot stale/unused or busy agents before revoking.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "agent delegation\"的安全叙事。零消费方(前端/MCP/测试均不用),故降级为不可用,统一走 pairing。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/agent-grants/{grant_id}/pause": {
      "post": {
        "summary": "POST /api/agent-grants/:grant_id/pause",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "grant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/{grant_id}/permissions": {
      "patch": {
        "summary": "PATCH /api/agent-grants/:grant_id/permissions",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "grant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/{grant_id}/rename": {
      "post": {
        "summary": "POST /api/agent-grants/:grant_id/rename",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "grant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/{grant_id}/resume": {
      "post": {
        "summary": "POST /api/agent-grants/:grant_id/resume",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "grant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/{grant_id}/revoke": {
      "post": {
        "summary": "── Revoke (online, one-click). ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "grant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/connection": {
      "get": {
        "summary": "address, or any other PII (E-node requirement). Backs webaz_connection_status.",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "read_public"
      }
    },
    "/api/agent-grants/my-permission-requests": {
      "get": {
        "summary": "grant_id: an agent sees ONLY its own requests, never the human's other agents'. Audited (fail-closed).",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-grants/pair/{pairing_id}/retrieve": {
      "post": {
        "summary": "(pair 4) Agent retrieves the credential ONCE via PKCE verifier — UNAUTHENTICATED (PKCE-gated).",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "pairing_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/pair/{user_code}": {
      "get": {
        "summary": "(pair 2) Human reviews the server-generated consent — human-authenticated.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/pair/{user_code}/approve": {
      "post": {
        "summary": "(pair 3) Human approves — human-authenticated. Issues the grant (token_hash filled at retrieve).",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/pair/{user_code}/reject": {
      "post": {
        "summary": "拒绝是保护性动作,无需 Passkey(不签发任何凭证)。幂等:仅 pending 可拒。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/pair/start": {
      "post": {
        "summary": "(pair 1) Agent starts a pairing — UNAUTHENTICATED (agent has no credential yet). Safe scopes only.",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-grants/permission-requests": {
      "get": {
        "summary": "GET list this human's PENDING permission requests (for #agent-approvals). Human-authed.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "NOT grantable (they need a per-action live Passkey, not a persistent grant) → structured reject.",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-grants/permission-requests/{id}/approve": {
      "post": {
        "summary": "POST approve — human-authed + live Passkey; expands the bound grant (union scopes + bundle + extend expiry). Audited.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/permission-requests/{id}/choose-payment": {
      "post": {
        "summary": "POST /api/agent-grants/permission-requests/:id/choose-payment",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/permission-requests/{id}/payment-options": {
      "get": {
        "summary": "GET: 列当前可选支付方式(卖家支持+资格通过)。POST: 选定 → 写草稿 rail/account + 重算 params_hash(旧 Passkey 票据即失效)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/permission-requests/{id}/reject": {
      "post": {
        "summary": "POST reject — human-authed. Terminal 'rejected'; nothing is granted.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/permission-requests/{request_id}": {
      "get": {
        "summary": "fail-visible: every path responds (404 not-found-or-not-yours = anti-enumeration; 500 only on assembly throw).",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-grants/verify": {
      "get": {
        "summary": "Audited (acceptance #8: every grant use logs). Never returns the raw token/api_key.",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-grants/whoami": {
      "get": {
        "summary": "end-to-end on a brand-new read-only endpoint that touches NO existing route and NO money path.",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "read_public"
      }
    },
    "/api/agent-key-changes": {
      "get": {
        "summary": "GET /api/agent-key-changes",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/agent-key-changes/{id}/confirm": {
      "post": {
        "summary": "POST /api/agent-key-changes/:id/confirm",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-key-changes/{id}/reject": {
      "post": {
        "summary": "POST /api/agent-key-changes/:id/reject",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-key-handoffs/{id}/done": {
      "post": {
        "summary": "POST /api/agent-key-handoffs/:id/done",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-key/whoami": {
      "get": {
        "summary": "GET /api/agent-key/whoami",
        "tags": [],
        "security": []
      }
    },
    "/api/agent-keys": {
      "get": {
        "summary": "GET /api/agent-keys",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/agent-keys",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/agent-keys/{id}": {
      "patch": {
        "summary": "PATCH /api/agent-keys/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent-keys/{id}/activity": {
      "get": {
        "summary": "GET /api/agent-keys/:id/activity",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/acp-feed": {
      "get": {
        "summary": "GET /api/agent/acp-feed",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/address/change-request": {
      "post": {
        "summary": "POST /api/agent/address/change-request",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "address_change_request"
      }
    },
    "/api/agent/address/masked": {
      "get": {
        "summary": "RFC-026 PR-5 — 地址:masked 读(region+存在性,绝不截取子串)/ 变更请求(全文进 PII 专表,Passkey 批准才写)",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "address_read_masked"
      }
    },
    "/api/agent/approval-requests": {
      "get": {
        "summary": "RFC-026 PR-2 — 审批状态只读(safe scope approval_requests_read;只看本人;零 PII)",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "approval_requests_read"
      }
    },
    "/api/agent/approval-requests/{id}": {
      "get": {
        "summary": "GET /api/agent/approval-requests/:id",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "approval_requests_read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/buyer/orders": {
      "get": {
        "summary": "recipient_code 连取都不取(I6 同强度)。纯只读,零执行、零资金 —— 买家写动作(place_order 等)仍 RISK 硬拒。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_orders_read_minimal"
      }
    },
    "/api/agent/buyer/orders/{id}": {
      "get": {
        "summary": "GET /api/agent/buyer/orders/:id",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_orders_read_minimal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/buyer/orders/{id}/case-draft": {
      "get": {
        "summary": "GET /api/agent/buyer/orders/:id/case-draft",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_case_prepare",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/buyer/orders/{id}/full": {
      "get": {
        "summary": "RFC-026 PR-3 — 订单全量只读(safe scope buyer_orders_read;时间线/条款快照/物流/截止/退款/动作面;零 PII)",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_orders_read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/capabilities": {
      "get": {
        "summary": "GET /api/agent/capabilities",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/cart": {
      "get": {
        "summary": "「还能不能下单」与购物车页面、与建单同一个谓词(cart-line-availability.ts)。",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_cart_read"
      }
    },
    "/api/agent/categories": {
      "get": {
        "summary": "GET /api/agent/categories",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/changes": {
      "get": {
        "summary": "指纹由 tests/test-contract-fingerprint.ts + docs/CONTRACT-LOCK.json 守住(静默改契约不可 merge)。",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/checkout-groups/{id}/x402-payment-request": {
      "post": {
        "summary": "POST /api/agent/checkout-groups/:id/x402-payment-request",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/demands": {
      "get": {
        "summary": "Agent (grant buyer_demand_read or API key): my find-it-for-me requests, same list as the page",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "Agent (buyer_demand_write): create a draft from a structured request (no model unless ≤3 screenshots); 20/day per authorization",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/demands/{id}": {
      "get": {
        "summary": "Agent: one request of mine — summary + summary_digest, live plan, quotes re-checked on read, stored auto_accept",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "Agent (buyer_demand_write): revise my request (back to draft, open quotes voided). A game-currency request's terms are fixed: close it and post a new one.",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/demands/{id}/close": {
      "post": {
        "summary": "Agent (buyer_demand_write): close my request",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/demands/{id}/publish": {
      "post": {
        "summary": "Agent (buyer_demand_write): publish after the person saw the summary — summary_digest required; optional auto_accept is stored only",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/demands/changes": {
      "get": {
        "summary": "Agent: buyer event feed (demand_offer_ready / demand_revised / demand_closed), oldest first after an opaque cursor",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/discover": {
      "post": {
        "summary": "POST /api/agent/discover",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_discover"
      }
    },
    "/api/agent/economic-participation": {
      "get": {
        "summary": "GET /api/agent/economic-participation",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/entities": {
      "get": {
        "summary": "GET /api/agent/entities",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/events": {
      "get": {
        "summary": "结构性事件 + 哈希链字段(验链防篡改),完整 payload 仍走 party-gated /chain。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/agent/goals": {
      "get": {
        "summary": "GET /api/agent/goals",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/integration": {
      "get": {
        "summary": "GET /api/agent/integration",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/negative-space": {
      "get": {
        "summary": "GET /api/agent/negative-space",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/order-draft": {
      "post": {
        "summary": "草稿不可变(无 update),cancel 终态幂等安全;get/list 仅本人。提交/批准/建单全在 PR-5a。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "draft_order"
      }
    },
    "/api/agent/order-drafts": {
      "get": {
        "summary": "GET /api/agent/order-drafts",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "draft_order"
      }
    },
    "/api/agent/order-drafts/{id}": {
      "get": {
        "summary": "GET /api/agent/order-drafts/:id",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "draft_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/order-drafts/{id}/cancel": {
      "post": {
        "summary": "POST /api/agent/order-drafts/:id/cancel",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "draft_order",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/order-drafts/{id}/submit": {
      "post": {
        "summary": "POST /api/agent/order-drafts/:id/submit",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "order_submit_request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/order-drafts/submit-batch": {
      "post": {
        "summary": "approves them together on the approvals page (「全部批准」). Same submit functions, same limits; no auto approval (order-submit-batch.ts).",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "order_submit_request"
      }
    },
    "/api/agent/orders": {
      "get": {
        "summary": "纯只读,无任何执行(order_action_request 在 PR2/PR3 才有提交/执行)。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_orders_read_minimal"
      }
    },
    "/api/agent/orders/{id}": {
      "get": {
        "summary": "GET /api/agent/orders/:id",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_orders_read_minimal",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/orders/{id}/buyer-action-request": {
      "post": {
        "summary": "RFC-026 PR-6 — 买家动作请求(confirm_receipt/cancel/request_return;提交-审批-回环执行;直付 confirm_receipt:本人开了「允许 AI 替我确认收货」、在上限内且无待处理问题时由助手直接确认)",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "buyer_action_request",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/orders/{id}/chat": {
      "get": {
        "summary": "RFC-026 PR-4 — 订单上下文聊天(仅订单双方;发送回环走生产反诈/限频;无自由私信)",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "order_chat_read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/agent/orders/:id/chat",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "order_chat_send",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/orders/{id}/chat/{messageId}/edit": {
      "post": {
        "summary": "POST /api/agent/orders/:id/chat/:messageId/edit",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "chat_edit_own",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/orders/{id}/chat/{messageId}/recall": {
      "post": {
        "summary": "POST /api/agent/orders/:id/chat/:messageId/recall",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "chat_recall_own",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/orders/{id}/x402-payment-request": {
      "post": {
        "summary": "POST /api/agent/orders/:id/x402-payment-request",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/orders/{orderId}/action-request": {
      "post": {
        "summary": "同 (order_id,action) 双 pending 被唯一索引拒。执行(accept/ship)在 PR3 经人 Passkey 批准后由服务端跑。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "order_action_request",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/quote": {
      "post": {
        "summary": "subject 恒 = grant human(agent 无法传 human_id/代表他人)。",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "price_quote"
      }
    },
    "/api/agent/request-readiness": {
      "get": {
        "summary": "放在 categories(同样无鉴权)之前 —— gen-openapi 的「后 8 行探 requireAgentGrantScope」启发式才不会误把下方 discover 的 grant 算到本路由。",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/seller/after-sale-defaults": {
      "get": {
        "summary": "默认售后承诺:读(当前值 + 版本号 + 上限)。",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_after_sale_defaults_write"
      },
      "patch": {
        "summary": "默认售后承诺:直写(闭合字段 / 存在语义 / 同一校验器 / 版本号 CAS / 事务内复核授权 / 变更记录 + 通知)。",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_after_sale_defaults_write"
      }
    },
    "/api/agent/seller/listing-advice": {
      "get": {
        "summary": "GET /api/agent/seller/listing-advice",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_inventory_read"
      }
    },
    "/api/agent/seller/offer-counters": {
      "get": {
        "summary": "GET /api/agent/seller/offer-counters",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/seller/offer-counters/{id}/answer": {
      "post": {
        "summary": "POST /api/agent/seller/offer-counters/:id/answer",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/opportunities": {
      "get": {
        "summary": "GET /api/agent/seller/opportunities",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_read"
      }
    },
    "/api/agent/seller/opportunities/{id}": {
      "get": {
        "summary": "GET /api/agent/seller/opportunities/:id",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/opportunities/bindings": {
      "post": {
        "summary": "POST /api/agent/seller/opportunities/bindings",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_respond"
      }
    },
    "/api/agent/seller/opportunities/changes": {
      "get": {
        "summary": "GET /api/agent/seller/opportunities/changes",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_read"
      }
    },
    "/api/agent/seller/opportunities/responses": {
      "post": {
        "summary": "POST /api/agent/seller/opportunities/responses",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_respond"
      }
    },
    "/api/agent/seller/opportunities/responses/{id}": {
      "get": {
        "summary": "GET /api/agent/seller/opportunities/responses/:id",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_read",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/opportunities/responses/{id}/replace": {
      "post": {
        "summary": "POST /api/agent/seller/opportunities/responses/:id/replace",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_respond",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/opportunities/responses/{id}/withdraw": {
      "post": {
        "summary": "POST /api/agent/seller/opportunities/responses/:id/withdraw",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_opportunities_respond",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/orders/{id}/shipping": {
      "get": {
        "summary": "GET /api/agent/seller/orders/:id/shipping",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/products": {
      "get": {
        "summary": "The consumption (allow AND the permission_required deny) is audited by the middleware.",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_products_read"
      },
      "post": {
        "summary": "POST /api/agent/seller/products",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_product_draft"
      }
    },
    "/api/agent/seller/products/{id}/draft": {
      "patch": {
        "summary": "PATCH /api/agent/seller/products/:id/draft",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_product_draft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/products/{id}/images": {
      "post": {
        "summary": "POST /api/agent/seller/products/:id/images",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_product_draft",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/profile-proposals": {
      "post": {
        "summary": "店铺资料:只能提议 → 卖家 Passkey 批准后落库(与地址变更同一条审批队列)。",
        "tags": [],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "seller_profile_change_request"
      }
    },
    "/api/agent/seller/quote-proposals": {
      "get": {
        "summary": "GET /api/agent/seller/quote-proposals",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/agent/seller/quote-proposals",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/seller/quote-proposals/{id}/execute": {
      "post": {
        "summary": "POST /api/agent/seller/quote-proposals/:id/execute",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/quote-proposals/{id}/withdraw": {
      "post": {
        "summary": "POST /api/agent/seller/quote-proposals/:id/withdraw",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/quote-proposals/{requestKey}": {
      "get": {
        "summary": "GET /api/agent/seller/quote-proposals/:requestKey",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "requestKey",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/seller/quote-proposals/facts": {
      "post": {
        "summary": "POST /api/agent/seller/quote-proposals/facts",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/seller/quote-proposals/operations/{key}": {
      "get": {
        "summary": "GET /api/agent/seller/quote-proposals/operations/:key",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/agent/verifiability": {
      "get": {
        "summary": "GET /api/agent/verifiability",
        "tags": [],
        "security": []
      }
    },
    "/api/agent/wallet": {
      "get": {
        "summary": "RFC-026 PR-3 — 钱包最小只读(safe scope wallet_read_minimal;OAuth 钱包面永远只读)",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "grantBearer": []
          }
        ],
        "x-webaz-grant-scope": "wallet_read_minimal"
      }
    },
    "/api/agents/me/reputation": {
      "get": {
        "summary": "GET /api/agents/me/reputation",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/ai/generate-description": {
      "post": {
        "summary": "G-1: AI 文案生成（卖家发品辅助）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/ai/price-suggestion": {
      "post": {
        "summary": "G-2: AI 价格建议",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/anchor/{code}/lookup": {
      "get": {
        "summary": "查口令 — anchor lookup（公开，不需 auth）",
        "tags": [
          "anchor"
        ],
        "security": [],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "found": {
                      "type": "boolean"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "retired",
                        "reclaimable"
                      ]
                    },
                    "target_kind": {
                      "type": "string"
                    },
                    "target_id": {
                      "type": "string"
                    },
                    "tier_letter": {
                      "type": "string"
                    },
                    "reason": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "创作者推荐理由,仅 active 口令返回"
                    }
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "key": {
                          "type": "string"
                        },
                        "label_zh": {
                          "type": "string"
                        },
                        "label_en": {
                          "type": "string"
                        }
                      }
                    },
                    "description": "创作者选的快捷标签(固定白名单,含双语文案),仅 active;无=[]"
                  },
                  "owner_purchased": {
                    "type": "boolean",
                    "description": "创作者勾选了显示且在 WebAZ 上真有该商品的已收货订单时为 true(系统核实);否则 false"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/anchor/{code}/retire": {
      "post": {
        "summary": "POST /api/anchor/:code/retire",
        "tags": [
          "anchor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/anchor/{code}/touch": {
      "post": {
        "summary": "POST /api/anchor/:code/touch — 写 attribution（first-touch + 30d）",
        "tags": [
          "anchor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "code",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/anchor/generate": {
      "post": {
        "summary": "生成流量口令 anchor（handle + middle 4 字符）",
        "tags": [
          "anchor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "middle",
                  "target_kind",
                  "target_id"
                ],
                "properties": {
                  "middle": {
                    "type": "string",
                    "minLength": 4,
                    "maxLength": 4,
                    "description": "4 字符 [a-z0-9]，需 ≥1 数字，禁顺序/保留词/oil 混淆"
                  },
                  "target_kind": {
                    "type": "string",
                    "enum": [
                      "user",
                      "product",
                      "shareable",
                      "dispute_case"
                    ]
                  },
                  "target_id": {
                    "type": "string"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 60,
                    "description": "可选推荐理由(口令卡上展示):≤60 字、不含链接,空=不填;不合规 400 error_code=ANCHOR_REASON_INVALID。Optional one-line recommendation reason (max 60 chars, no links)"
                  },
                  "tags": {
                    "type": "array",
                    "maxItems": 3,
                    "uniqueItems": true,
                    "items": {
                      "type": "string",
                      "enum": [
                        "self_use",
                        "value",
                        "gift",
                        "durable",
                        "repurchase"
                      ]
                    },
                    "description": "可选快捷标签,0–3 个固定键(自用推荐/性价比高/适合送礼/质量耐用/回购过);不合规 400 error_code=ANCHOR_TAGS_INVALID。Optional quick tags, 0-3 keys from the fixed list"
                  },
                  "show_purchased": {
                    "type": "boolean",
                    "description": "可选,默认 false。true=愿意在口令卡显示「✓ 买过」;仅当你在 WebAZ 上真有该商品的已收货订单时才会显示(系统核实,勾选本身不显示任何东西)。Opt-in to show a verified 'Bought it' badge; shown only if you really received this product on WebAZ"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "anchor": {
                      "type": "string"
                    },
                    "tier_letter": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "reason": {
                      "enum": [
                        "middle_invalid",
                        "anchor_taken",
                        "anchor_retired_not_yet_reclaimable",
                        "anchor_in_priority_window",
                        "quota_max_total_100",
                        "quota_max_per_day_5"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/anchor/me": {
      "get": {
        "summary": "GET /api/anchor/me",
        "tags": [
          "anchor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/announcements/{id}/read": {
      "post": {
        "summary": "POST /api/announcements/:id/read",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/announcements/active": {
      "get": {
        "summary": "列出对当前用户可见的活跃公告（按角色 + 区域过滤）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/approval-windows/{tier}/revoke": {
      "post": {
        "summary": "幂等(再调 revoked:0)。T3 永不开窗 → BAD_TIER 400(与 mint 同语义,revokeWindow domain 强制)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "tier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/arbitrator/apply": {
      "post": {
        "summary": "POST /api/arbitrator/apply",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/arbitrator/eligibility": {
      "get": {
        "summary": "GET /api/arbitrator/eligibility",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/arbitrator/me/kpi": {
      "get": {
        "summary": "Arbitrator KPI（仲裁累计 + 裁决分布 + pending）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/arbitrator/pending-count": {
      "get": {
        "summary": "非仲裁员返回 0(不报错,前端 badge 拉取对所有人无害)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/arbitrator/status": {
      "get": {
        "summary": "GET /api/arbitrator/status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/arbitrator/withdraw-application": {
      "post": {
        "summary": "POST /api/arbitrator/withdraw-application",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/auctions": {
      "get": {
        "summary": "看板：浏览公开拍卖（匿名可访问）",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "卖家发起拍卖",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/auctions/{id}": {
      "delete": {
        "summary": "卖家：取消（仅未出价时）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "详情：含 bid 历史（buyer 身份脱敏；卖家+出价人本人 可见全名）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/auctions/{id}/bids": {
      "post": {
        "summary": "买家：出价",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/auctions/{id}/remind": {
      "delete": {
        "summary": "DELETE /api/auctions/:id/remind",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "GET /api/auctions/:id/remind",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "拍卖「⏰ 提醒我」(#959)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/auctions/mine": {
      "get": {
        "summary": "我的：买家=我出过价的，卖家=我发起的",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/auth/agent-key-login": {
      "post": {
        "summary": "POST /api/auth/agent-key-login",
        "tags": [],
        "security": []
      }
    },
    "/api/auth/logout-all": {
      "post": {
        "summary": "要求密码二次验证（防 api_key 被盗后攻击者锁死真用户）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/auth/sessions": {
      "get": {
        "summary": "GET /api/auth/sessions",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/auth/sessions/{id}/revoke": {
      "post": {
        "summary": "诚实拒绝并给出唯一可用的出路(全部登出),而不是标记一行 revoked_at 却对该设备毫无作用。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/bids/{id}": {
      "delete": {
        "summary": "卖家：撤回 bid（释放 stake）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "卖家：修改 bid（仅 active；stake 差额自动结算）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/blocklist": {
      "get": {
        "summary": "D-2: 列表",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/blocklist/{user_id}": {
      "delete": {
        "summary": "DELETE /api/blocklist/:user_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/blocklist/:user_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/blocklist/{user_id}/status": {
      "get": {
        "summary": "GET /api/blocklist/:user_id/status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/blocklist/me": {
      "get": {
        "summary": "GET /api/blocklist/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/build-feedback": {
      "post": {
        "summary": "── 提交 ──────────────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/build-feedback/{id}": {
      "get": {
        "summary": "GET /api/build-feedback/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/build-feedback/mine": {
      "get": {
        "summary": "── 闭环:我的反馈进度 ──(必须在 /:id 之前声明)──────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/build-reputation/me": {
      "get": {
        "summary": "BUILD reputation (coordination layer) only and promise no economic value.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/build-tasks": {
      "get": {
        "summary": "uncommitted value_boundary; member scope hides restricted/internal. Bad filter → fail-closed 400.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/build-tasks",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/build-tasks/{id}": {
      "get": {
        "summary": "GET /api/build-tasks/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/build-tasks/{id}/claim": {
      "post": {
        "summary": "task → claim respects auto_claimable. Success appends value_boundary + canonical_contribution_target only.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/build-tasks/{id}/release": {
      "post": {
        "summary": "POST /api/build-tasks/:id/release",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/build-tasks/{id}/submit": {
      "post": {
        "summary": "POST /api/build-tasks/:id/submit",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/cart": {
      "get": {
        "summary": "GET /api/cart",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/cart",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/cart/{product_id}": {
      "delete": {
        "summary": "DELETE /api/cart/:product_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "PATCH /api/cart/:product_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/charity/fund": {
      "get": {
        "summary": "GET 基金概况 + 最近流水",
        "tags": [
          "charity"
        ],
        "security": []
      }
    },
    "/api/charity/fund/donate": {
      "post": {
        "summary": "任何人捐款给慈善基金",
        "tags": [
          "charity"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/charity/leaderboard": {
      "get": {
        "summary": "慈善排行",
        "tags": [
          "charity"
        ],
        "security": []
      }
    },
    "/api/charity/me": {
      "get": {
        "summary": "GET /api/charity/me — 我的慈善档案",
        "tags": [
          "charity"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/charity/stories": {
      "get": {
        "summary": "GET /api/charity/stories — 公开披露的故事板",
        "tags": [
          "charity"
        ],
        "security": []
      }
    },
    "/api/check-url": {
      "get": {
        "summary": "GET /api/check-url",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/checkin": {
      "post": {
        "summary": "POST /api/checkin",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/checkin/status": {
      "get": {
        "summary": "GET /api/checkin/status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/checkout-groups": {
      "post": {
        "summary": "POST /api/checkout-groups",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/checkout-groups/{id}": {
      "get": {
        "summary": "GET /api/checkout-groups/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/{id}/buyer-action": {
      "post": {
        "summary": "POST /api/checkout-groups/:id/buyer-action",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/{id}/disclosure": {
      "get": {
        "summary": "Client: POST /api/webauthn/auth/start { purpose: GROUP_DISCLOSURE_ACK_PURPOSE, purpose_data: { group_id, binding } } → finish → token.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/{id}/disclosure-acks": {
      "post": {
        "summary": "POST /api/checkout-groups/:id/disclosure-acks",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/{id}/pay": {
      "post": {
        "summary": "POST /api/checkout-groups/:id/pay",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/{id}/seller-action": {
      "post": {
        "summary": "POST /api/checkout-groups/:id/seller-action",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/{id}/ship": {
      "post": {
        "summary": "POST /api/checkout-groups/:id/ship",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/checkout-groups/preview": {
      "post": {
        "summary": "POST /api/checkout-groups/preview",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/checkout/tax-preview": {
      "get": {
        "summary": "GET /api/checkout/tax-preview",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/claim-tasks/{id}": {
      "get": {
        "summary": "任务详情",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/claim-tasks/{id}/seller-evidence": {
      "post": {
        "summary": "卖家提交证据 → 延期 24h；状态保持 open",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/claim-tasks/{id}/vote": {
      "post": {
        "summary": "verifier 投票 — 铁律 §4",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/claim-tasks/available": {
      "get": {
        "summary": "列出可接的 open 任务",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/claim-tasks/mine": {
      "get": {
        "summary": "我相关的任务（必须在 /:id 之前注册，否则被 /:id 截获）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/claim-url": {
      "post": {
        "summary": "POST /api/claim-url",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/claims/public": {
      "get": {
        "summary": "公开 #claims 广场（无 auth — 透明性是验证声明信任的前提）",
        "tags": [],
        "security": []
      }
    },
    "/api/contribution-facts/me": {
      "get": {
        "summary": "── READ-ONLY: the caller's OWN attributable contribution facts (GitHub + admin coordination) ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/contribution-identity/github/claim-challenge": {
      "post": {
        "summary": "── 1) issue a publication challenge ─────────────────────────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/contribution-identity/github/claim-complete": {
      "post": {
        "summary": "── 2) complete the claim (human gate → re-fetch gist proof → atomic consume+bind) ────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/contribution-identity/github/claimable": {
      "get": {
        "summary": "carries the uncommitted-value boundary, and errors never leak SQL/stack.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/contribution-identity/github/me": {
      "get": {
        "summary": "metering/display surface can never read as a payout promise — facts + attribution only.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/contribution-score/evidence/me": {
      "get": {
        "summary": "always the session user. Output is component evidence wrapped in the uncommitted-value boundary.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/conversations": {
      "get": {
        "summary": "我的会话列表",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/conversations/{id}": {
      "get": {
        "summary": "会话详情 + 消息分页",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/archive": {
      "post": {
        "summary": "POST /api/conversations/:id/archive",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/block": {
      "post": {
        "summary": "POST /api/conversations/:id/block",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/buyer-orders": {
      "get": {
        "summary": "卖家侧面板:对方【在本店】的订单(buyer = 对方 AND seller = 我),只给这段会话里实际是卖家的一方。",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/messages": {
      "post": {
        "summary": "发消息",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/messages/{messageId}/edit": {
      "post": {
        "summary": "POST /api/conversations/:id/messages/:messageId/edit",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/messages/{messageId}/recall": {
      "post": {
        "summary": "POST /api/conversations/:id/messages/:messageId/recall",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/messages/{mid}/translate": {
      "post": {
        "summary": "翻译一条聊天消息(zh↔en):仅会话当事方、仅文字消息;按消息+版本缓存;每用户限频",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/offers": {
      "post": {
        "summary": "开一张议定价报价单（RFC-032，卖家侧）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "卖家在已有会话里给会话的另一方开一张一次性、有期限、绑定买家的价格。开价授权判据只有 canIssueOffer（商品的 seller_id，且开价人与收件人都不是受信角色）。没有 token：报价单本来就绑定买家且一次性 CAS，而被绑定的买家本来就要通过认证，所以兑换按 offer_id 进行；id 泄露出去也无用。negotiated_offers_enabled=0 时一律 404 FEATURE_DISABLED。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id",
                  "unit_price"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "variant_id": {
                    "type": "string",
                    "description": "绑定某一规格（可选）；绑定后只能用于该规格"
                  },
                  "unit_price": {
                    "type": "number",
                    "description": "议定单价；0 < 价 ≤ 当前有效标价（规格覆盖价与进行中的限时促销之后）。高于标价一律 400 —— 高于公开价的报价是欺骗手段，不是谈判"
                  },
                  "qty_min": {
                    "type": "integer",
                    "default": 1
                  },
                  "qty_max": {
                    "type": "integer",
                    "default": 1,
                    "description": "≤ MAX_PER_ORDER(20)"
                  },
                  "validity_hours": {
                    "type": "number",
                    "description": "默认 offer_default_validity_hours(48)，上限 offer_max_validity_hours(168)"
                  },
                  "note": {
                    "type": "string",
                    "description": "≤ 200 字"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "offer_id": {
                      "type": "string"
                    },
                    "offer": {
                      "type": "object"
                    },
                    "voided_previous_offer_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "PRODUCT_ID_REQUIRED / OFFER_PRICE_INVALID / OFFER_ABOVE_LISTING / OFFER_BELOW_FLOOR / OFFER_QTY_INVALID / OFFER_VALIDITY_INVALID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "PRODUCT_ID_REQUIRED / OFFER_PRICE_INVALID / OFFER_ABOVE_LISTING / OFFER_BELOW_FLOOR / OFFER_QTY_INVALID / OFFER_VALIDITY_INVALID"
                }
              }
            }
          },
          "403": {
            "description": "非会话当事方(OFFER_MISMATCH) / 无权为该商品开价(OFFER_NOT_AUTHORIZED) / 收件人是受信角色(TRUSTED_ROLE_NO_TRADE)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "非会话当事方(OFFER_MISMATCH) / 无权为该商品开价(OFFER_NOT_AUTHORIZED) / 收件人是受信角色(TRUSTED_ROLE_NO_TRADE)"
                }
              }
            }
          },
          "404": {
            "description": "会话、商品或对方不存在;开关关闭时为 FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "会话、商品或对方不存在;开关关闭时为 FEATURE_DISABLED"
                }
              }
            }
          },
          "409": {
            "description": "会话已被屏蔽(CONVERSATION_BLOCKED)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "会话已被屏蔽(CONVERSATION_BLOCKED)"
                }
              }
            }
          },
          "429": {
            "description": "该卖家今日报价单数已达 offer_daily_quota_per_seller(OFFER_QUOTA_EXCEEDED)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "该卖家今日报价单数已达 offer_daily_quota_per_seller(OFFER_QUOTA_EXCEEDED)"
                }
              }
            }
          }
        }
      }
    },
    "/api/conversations/{id}/order-picker": {
      "get": {
        "summary": "「＋ → 订单」选择器:这一对人之间的订单(谁买谁卖都算),新的在前。",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/read": {
      "post": {
        "summary": "POST /api/conversations/:id/read",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/report": {
      "post": {
        "summary": "举报（人工审核）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/restore": {
      "post": {
        "summary": "POST /api/conversations/:id/restore",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/search": {
      "get": {
        "summary": "会话内搜索:仅当事方;文字消息、不含已撤回;不区分大小写的字面子串(%/_/\\ 不是通配);新的在前,最多 50 条 + page_cursor",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/service-rating": {
      "get": {
        "summary": "会话页:我能否在这里评价对方(卖家)的服务 + 我最近一次评价 + 评价提示卡的输入(仅当事方)",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "买家给卖家这次会话的服务打分:1-5 星 + 快捷标签 + 可选短评;24 小时内再评 = 更新同一条",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/{id}/unblock": {
      "post": {
        "summary": "POST /api/conversations/:id/unblock",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/conversations/start": {
      "post": {
        "summary": "开会话（idempotent — 已存在则返回 id）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/coupons": {
      "post": {
        "summary": "POST /api/coupons",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/coupons/{id}": {
      "patch": {
        "summary": "PATCH /api/coupons/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/coupons/available": {
      "get": {
        "summary": "buyer 视角：全平台 + 已购卖家店铺/单品券 + 历史",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/coupons/mine": {
      "get": {
        "summary": "GET /api/coupons/mine",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/coupons/preview": {
      "get": {
        "summary": "GET /api/coupons/preview",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/creator/stats": {
      "get": {
        "summary": "里程碑 L3：创作者贡献仪表盘",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/delivery-corrections/batch": {
      "post": {
        "summary": "POST /api/delivery-corrections/batch",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/delivery-corrections/batch/{id}": {
      "get": {
        "summary": "GET /api/delivery-corrections/batch/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/delivery-corrections/batch/{id}/confirm": {
      "post": {
        "summary": "POST /api/delivery-corrections/batch/:id/confirm",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/delivery-corrections/batch/{id}/disagree": {
      "post": {
        "summary": "POST /api/delivery-corrections/batch/:id/disagree",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/delivery-corrections/opportunities": {
      "get": {
        "summary": "GET /api/delivery-corrections/opportunities",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/delivery-corrections/pending": {
      "get": {
        "summary": "GET /api/delivery-corrections/pending",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/demand/touch": {
      "post": {
        "summary": "POST /api/demand/touch",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/digital-delivery/tickets": {
      "get": {
        "summary": "GET /api/digital-delivery/tickets",
        "tags": [],
        "security": []
      }
    },
    "/api/digital-goods/game-currency/config": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/config",
        "tags": [],
        "security": []
      }
    },
    "/api/digital-goods/game-currency/drafts/{id}/delivery-info": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/drafts/:id/delivery-info",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/digital-goods/game-currency/limits": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/limits",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/digital-goods/game-currency/listings/{id}": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/listings/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/digital-goods/game-currency/listings/{id}/status": {
      "post": {
        "summary": "POST /api/digital-goods/game-currency/listings/:id/status",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/digital-goods/game-currency/listings/{id}/template": {
      "post": {
        "summary": "POST /api/digital-goods/game-currency/listings/:id/template",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/digital-goods/game-currency/mandate": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/mandate",
        "tags": [],
        "security": []
      }
    },
    "/api/digital-goods/game-currency/mandates": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/mandates",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/digital-goods/game-currency/mandates",
        "tags": [],
        "security": []
      }
    },
    "/api/digital-goods/game-currency/mandates/{grantId}": {
      "delete": {
        "summary": "DELETE /api/digital-goods/game-currency/mandates/:grantId",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/digital-goods/game-currency/seller-terms": {
      "get": {
        "summary": "GET /api/digital-goods/game-currency/seller-terms",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/digital-goods/game-currency/seller-terms",
        "tags": [],
        "security": []
      }
    },
    "/api/direct-pay/availability": {
      "get": {
        "summary": "GET /api/direct-pay/availability?product_id=... — 该商品(以 qty=1 计)当前是否可直付 + 不可用原因(脱敏)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-pay/disclosure-acks": {
      "post": {
        "summary": "stage:'both' —— 单 stage token 冒充不了 both,both token 也重放不了单 stage(一次性消费 + validate 精确匹配)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-pay/disclosure-acks/{orderId}": {
      "get": {
        "summary": "GET — 查询某单两次 ack 状态 + 买家视角披露文案(无卖家机制)。只读(本人),不需 gate token。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-pay/discount-preview": {
      "get": {
        "summary": "GET /api/direct-pay/discount-preview",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-pay/x402-consent": {
      "delete": {
        "summary": "DELETE /api/direct-pay/x402-consent",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "get": {
        "summary": "GET /api/direct-pay/x402-consent",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/direct-pay/x402-consent",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-pay/x402-consent/keys": {
      "get": {
        "summary": "GET /api/direct-pay/x402-consent/keys",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/direct-pay/x402-consent/keys",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-pay/x402-consent/keys/{id}": {
      "delete": {
        "summary": "DELETE /api/direct-pay/x402-consent/keys/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/accounts": {
      "get": {
        "summary": "── list（本人;不返回 raw QR,只含 qr_image_ref)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "── add(Passkey)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/accounts/{id}": {
      "delete": {
        "summary": "── deactivate(Passkey + owner)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "── update(Passkey + owner)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/accounts/{id}/discount": {
      "put": {
        "summary": "── set the non-card payment discount of one account(Passkey + owner;只能调低或关闭)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/accounts/{id}/qr": {
      "get": {
        "summary": "── QR preview(owner-only read;硬化转发;不存在/非本人 → 404)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "── upload / replace QR(Passkey + owner;immutable content-addressed store)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/accounts/{id}/x402-edit": {
      "post": {
        "summary": "🔐 Passkey(x402_receive_account_edit)· 改 USDC 收款账户名称和/或收款地址;新地址按既有延时生效,生效时旧地址自动停用;AI 不可调用",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/bond-deposit": {
      "post": {
        "summary": "POST /api/direct-receive/bond-deposit",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/bond-deposit/{id}/cancel": {
      "post": {
        "summary": "POST /api/direct-receive/bond-deposit/:id/cancel",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/bond-ledger": {
      "get": {
        "summary": "钱真的动过之后这不是体验问题,是【事后无从查证】。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/bond-pay-call": {
      "post": {
        "summary": "前端零 ABI 手搓(app-usdc-wallet.js 的 D1 铁律):calldata 一律后端 viem 编码后原样下发。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/bond-payer-challenge": {
      "post": {
        "summary": "零写入、不建单:纯读链。回的 typed_data 就是服务端校验时用的【同一份】,不存在前端签的与后端验的不是一回事。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/bond-refund-request": {
      "post": {
        "summary": "── B2:退出退还 —— 申请(§5 blockers fail-closed)→ 冷静期 → admin 执行;申请期间直付资格暂停,可撤销 ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/bond-refund-request/cancel": {
      "post": {
        "summary": "POST /api/direct-receive/bond-refund-request/cancel",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/bond-status": {
      "get": {
        "summary": "GET /api/direct-receive/bond-status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/deferral": {
      "get": {
        "summary": "GET /api/direct-receive/deferral — 卖家本人缓交状态:最新一条申请(脱敏:不含 admin 身份)+ 是否当前生效(active)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/direct-receive/deferral — 卖家申请缓交。helper 强制:单一活跃、periodDays 正整数、id 唯一。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/fee-prepay-request": {
      "post": {
        "summary": "── 提交预充值申请(不 Passkey;凭据必填)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/fee-prepay-request/{id}/cancel": {
      "post": {
        "summary": "── 卖家撤销自己的 pending 申请 ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/fee-prepay-requests": {
      "get": {
        "summary": "── 卖家看自己的申请(全状态)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/fee-withdraw-request": {
      "post": {
        "summary": "── 提交提现申请(Passkey;金额 ≤ 当前可提额;同一时刻仅一条在途)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/fee-withdraw-request/{id}/cancel": {
      "post": {
        "summary": "── 卖家撤销自己的 pending 提现申请 ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/direct-receive/fee-withdraw-requests": {
      "get": {
        "summary": "── 卖家看自己的提现申请 + 当前可提额 ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/my-coverage": {
      "get": {
        "summary": "GET /api/direct-receive/my-coverage — 卖家【本人】保证金覆盖状况(#159);仅本人,只读、零资金动作。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/my-fee-account": {
      "get": {
        "summary": "仅本人(requireSeller),买家拿不到;只读、不碰任何资金动作。供 seller fee center 展示。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/payment-instruction": {
      "delete": {
        "summary": "DELETE — 停用卖家当前 active 收款说明(软停用,留历史为 inactive)。停用后 create route fail-closed。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "get": {
        "summary": "GET — 卖家本人当前 active 收款说明;无则 instruction:null(200,显式空状态,便于 UI 渲染“尚未设置”)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "PUT — 设置/替换卖家当前 active 收款说明。instruction 必填、trim、长度上限;label 可选、trim、长度上限。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/platform-receive-accounts": {
      "get": {
        "summary": "── 卖家看平台收款方式(active;含 instruction + qr_data_uri —— 平台公开收款明细,据此付款)──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/product-verification": {
      "post": {
        "summary": "POST /api/direct-receive/product-verification — 卖家为某产品申领验证码(单一活跃 per product)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "PUT /api/direct-receive/product-verification — 卖家为某产品提交外部商品链接(链接仅存储,WebAZ 不抓取)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/product-verifications": {
      "get": {
        "summary": "GET /api/direct-receive/product-verifications — 卖家本人所有产品的认证状态(逐产品)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/readiness": {
      "get": {
        "summary": "绝不下发 raw blocker / KYB·制裁·AML 分项(见 sellerDirectPayReadinessView)。只读 self(auth 用户自身 id)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/repricing-suggestions": {
      "get": {
        "summary": "GET /api/direct-receive/repricing-suggestions",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/selectable-accounts": {
      "get": {
        "summary": "⚠️ 只下发元数据 method/currency/label —— instruction 原文与 QR 受披露门保护,D1/D2 ack 后才随订单快照给买家。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/direct-receive/store-verification": {
      "get": {
        "summary": "GET /api/direct-receive/store-verification — 卖家本人店铺认证状态(脱敏 DTO,含豁免位)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/direct-receive/store-verification — 卖家申领店铺验证码(单一活跃 per seller)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "PUT /api/direct-receive/store-verification — 卖家提交店铺外链(仅存储,不抓取)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/discover/dwell": {
      "post": {
        "summary": "POST /api/discover/dwell — 商品页停留 >=8s(会员本人,只用于本人「看过」排序,30 天清;游客 204 不写)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/discover/for-me": {
      "get": {
        "summary": "GET /api/discover/for-me — 发现页「为你」头部(会员读本人信号;游客只按本机标题做「相似」;空数组=没有可说的)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/disputes": {
      "get": {
        "summary": "仲裁员：查看所有开放争议",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/disputes/{id}": {
      "get": {
        "summary": "详情聚合（含 W4 timeline + chain ruling）",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/add-evidence": {
      "post": {
        "summary": "参与方主动举证（text）+ SNF 信封分发",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/arbitrate": {
      "post": {
        "summary": "仲裁员裁定",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/arbitrator-pause-auto-judge": {
      "post": {
        "summary": "POST /api/disputes/:id/arbitrator-pause-auto-judge",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/arbitrator-resume-auto-judge": {
      "post": {
        "summary": "POST /api/disputes/:id/arbitrator-resume-auto-judge",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/concede": {
      "post": {
        "summary": "POST /api/disputes/:id/concede",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/evidence-blob": {
      "post": {
        "summary": "N: limit 精确 = EVIDENCE_MAX_BYTES",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/evidence-list": {
      "get": {
        "summary": "当事人 + 仲裁员可查（meta only，blob 单独拉）",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/mediation": {
      "get": {
        "summary": "GET /api/disputes/:id/mediation",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/mediation/propose": {
      "post": {
        "summary": "POST /api/disputes/:id/mediation/propose",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/mediation/reply": {
      "post": {
        "summary": "POST /api/disputes/:id/mediation/reply",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/mediation/respond": {
      "post": {
        "summary": "POST /api/disputes/:id/mediation/respond",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/mediation/suggest": {
      "post": {
        "summary": "POST /api/disputes/:id/mediation/suggest",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/mediation/withdraw-proposal": {
      "post": {
        "summary": "POST /api/disputes/:id/mediation/withdraw-proposal",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/parties": {
      "get": {
        "summary": "涉案三方（仲裁员选择发证据请求的对象）",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/request-evidence": {
      "post": {
        "summary": "仲裁员：请求某方补证",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/respond": {
      "post": {
        "summary": "被诉方反驳",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/similar-cases": {
      "get": {
        "summary": "A2 同类判例推荐",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/{id}/submit-arbitration": {
      "post": {
        "summary": "POST /api/disputes/:id/submit-arbitration",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/cases": {
      "get": {
        "summary": "公开终局裁决列表（可按卖家筛选；不返回当事人或未脱敏案情）",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "seller_id",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "description": "公开卖家 ID；仅筛选已公开、已脱敏的终局裁决"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "winner",
            "in": "query",
            "schema": {
              "enum": [
                "seller",
                "buyer",
                "split",
                "dismissed"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 5,
              "maximum": 50
            }
          }
        ]
      }
    },
    "/api/disputes/cases/{case_id}": {
      "get": {
        "summary": "案件详情（含评论 + 评论者身份标签）",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "case_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/cases/{case_id}/comment": {
      "post": {
        "summary": "写评论 — 当事人禁评，一人一案一次",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "case_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/cases/{case_id}/comments/{comment_id}/reply": {
      "post": {
        "summary": "W5 子回复 — 任意人可对顶层评论回复多次（不受\"一人一案一次\"限制）",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "case_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/cases/{case_id}/fairness": {
      "post": {
        "summary": "公正度投票（👍 / 👎）— 一人一案一票",
        "tags": [
          "dispute"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "case_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/disputes/cases/by-product/{product_id}": {
      "get": {
        "summary": "公开列表（按商品）",
        "tags": [
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/editor-picks": {
      "get": {
        "summary": "GET /api/editor-picks",
        "tags": [],
        "security": []
      }
    },
    "/api/email-subscriptions": {
      "post": {
        "summary": "2026-05-26 加 role_preference + note 字段（welcome 表单丰富化）",
        "tags": [],
        "security": []
      }
    },
    "/api/email-subscriptions/unsubscribe": {
      "post": {
        "summary": "POST /api/email-subscriptions/unsubscribe",
        "tags": [],
        "security": []
      }
    },
    "/api/error-report": {
      "post": {
        "summary": "前端错误上报（30/min/IP 限流，不需 auth）",
        "tags": [
          "ops"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "message"
                ],
                "properties": {
                  "message": {
                    "type": "string",
                    "maxLength": 1000
                  },
                  "stack": {
                    "type": "string",
                    "maxLength": 4000
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "const": "message required"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "const": "rate_limited"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/evidence-requests/{requestId}/submit": {
      "post": {
        "summary": "当事人提交补充证据响应（仲裁员 request 后用）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "requestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/evidence/{id}": {
      "delete": {
        "summary": "撤回证据（仅上传者，争议未结案时）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/evidence/{id}/blob": {
      "get": {
        "summary": "下载证据 blob（仅参与方/仲裁员）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/evidence/{id}/verify": {
      "get": {
        "summary": "验签 — 任意参与方",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors": {
      "post": {
        "summary": "POST /api/external-anchors",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/external-anchors/{id}": {
      "get": {
        "summary": "GET /api/external-anchors/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/{id}/distribute-rewards": {
      "post": {
        "summary": "白名单(isEligibleArbitrator),不认 legacy user.role(否则已 suspend/revoke 但 role 未同步的账号仍可触发放款)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/{id}/issue-token": {
      "post": {
        "summary": "POST /api/external-anchors/:id/issue-token",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/{id}/revoke": {
      "post": {
        "summary": "POST /api/external-anchors/:id/revoke",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/{id}/rewards": {
      "get": {
        "summary": "透出推荐 fee + anchor 的奖励情况",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/{id}/verify": {
      "post": {
        "summary": "verifier 提交独立验证（任何已登录用户可做）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/{id}/verify-sig": {
      "get": {
        "summary": "GET /api/external-anchors/:id/verify-sig",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/by-product/{id}": {
      "get": {
        "summary": "GET /api/external-anchors/by-product/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/external-anchors/by-seller/{id}": {
      "get": {
        "summary": "GET /api/external-anchors/by-seller/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/feed": {
      "get": {
        "summary": "GET /api/feed",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/feedback": {
      "post": {
        "summary": "POST /api/feedback",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/feedback/{id}": {
      "get": {
        "summary": "工单详情 + timeline",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/feedback/{id}/messages": {
      "post": {
        "summary": "工单内追加消息（user 或 admin）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/feedback/mine": {
      "get": {
        "summary": "GET /api/feedback/mine",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/feedback/seen": {
      "post": {
        "summary": "POST /api/feedback/seen",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/flash-sales/{id}": {
      "delete": {
        "summary": "取消（仅 seller 自己，且未开始）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/flash-sales/live": {
      "get": {
        "summary": "buyer 视角：当前全平台正在进行的 flash sales（首屏 discovery）",
        "tags": [],
        "security": []
      }
    },
    "/api/follows/{user_id}": {
      "delete": {
        "summary": "DELETE /api/follows/:user_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/follows/:user_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/follows/{user_id}/status": {
      "get": {
        "summary": "GET /api/follows/:user_id/status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/follows/feed": {
      "get": {
        "summary": "Wave D-1: 关注卖家动态 feed — new_product + restock 合并 + 去重",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/follows/me": {
      "get": {
        "summary": "GET /api/follows/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/fx/rates": {
      "get": {
        "summary": "GET /api/fx/rates",
        "tags": [],
        "security": []
      }
    },
    "/api/governance/onboarding-stats": {
      "get": {
        "summary": "无 auth — agent / 用户 / 第三方都可读;不暴露 PII",
        "tags": [],
        "security": []
      }
    },
    "/api/governance/onboarding/appeal": {
      "post": {
        "summary": "必须:source 行 action='auto_deactivate' + window 内 + 未已 appeal + reason 长度",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/apply": {
      "post": {
        "summary": "POST /api/governance/onboarding/apply",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/case-review": {
      "post": {
        "summary": "不立即评分 — maintainer 上岗签字前(阶段 3 #1093)对比 expected_verdict",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/cases": {
      "get": {
        "summary": "实施 docs/GOVERNANCE-ONBOARDING.md §4.2 案例研读",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/my": {
      "get": {
        "summary": "GET /api/governance/onboarding/my",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/progress": {
      "get": {
        "summary": "返回 onboarding 整体进度(spec §4):申请状态 + 学习包(client localStorage) + 题目分数 + 案例(后续)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/quiz": {
      "get": {
        "summary": "实施 docs/GOVERNANCE-ONBOARDING.md §4.3 题目",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/quiz-submit": {
      "post": {
        "summary": "body: { role, answers: [{question_id, answer}] }",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/onboarding/resign": {
      "post": {
        "summary": "confirm_text 必须等于 'RESIGN arbitrator' 或 'RESIGN verifier'(type-to-confirm 防误触)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/governance/params": {
      "get": {
        "summary": "─── 治理参数 ────────────────────────────────────────────────",
        "tags": [],
        "security": []
      }
    },
    "/api/governance/params/{key}/history": {
      "get": {
        "summary": "GET /api/governance/params/:key/history",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/group-buys": {
      "post": {
        "summary": "卖家开团",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/group-buys/{id}": {
      "get": {
        "summary": "详情 + participants",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/group-buys/{id}/join": {
      "post": {
        "summary": "加入团购",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/group-buys/{id}/leave": {
      "delete": {
        "summary": "离开团购",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/group-buys/live": {
      "get": {
        "summary": "公开列表",
        "tags": [],
        "security": []
      }
    },
    "/api/growth/tasks": {
      "get": {
        "summary": "GET /api/growth/tasks",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/growth/tasks/{id}/claim": {
      "post": {
        "summary": "POST /api/growth/tasks/:id/claim",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/growth/tasks/{id}/reset": {
      "post": {
        "summary": "POST /api/growth/tasks/:id/reset",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/growth/tasks/{id}/skip": {
      "post": {
        "summary": "POST /api/growth/tasks/:id/skip",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/health": {
      "get": {
        "summary": "健康检查 — LB / k8s readinessProbe（不需 auth）",
        "tags": [
          "ops"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "ok",
                        "degraded"
                      ]
                    },
                    "uptime_sec": {
                      "type": "integer"
                    },
                    "db": {
                      "type": "object",
                      "properties": {
                        "ok": {
                          "type": "boolean"
                        },
                        "latency_ms": {
                          "type": "integer"
                        }
                      }
                    },
                    "seed_strength": {
                      "enum": [
                        "default",
                        "weak",
                        "strong"
                      ]
                    },
                    "env": {
                      "type": "string"
                    },
                    "check_ms": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "DB 不通时返 503 — LB 自动剔除",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "DB 不通时返 503 — LB 自动剔除"
                }
              }
            }
          }
        }
      }
    },
    "/api/image/locate": {
      "post": {
        "summary": "Crop editor auto-frame: where is the product in this picture? Raw JPEG/PNG/WebP body; answers { box: {x,y,w,h}, score } or { box: null }; has its own day counter (same limits as pictures).",
        "tags": [],
        "security": []
      }
    },
    "/api/import-product": {
      "post": {
        "summary": "POST /api/import-product",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/kyc/me": {
      "get": {
        "summary": "GET /api/kyc/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/kyc/submit": {
      "post": {
        "summary": "POST /api/kyc/submit",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/launch-pulse": {
      "get": {
        "summary": "GET /api/launch-pulse",
        "tags": [],
        "security": []
      }
    },
    "/api/leaderboard": {
      "get": {
        "summary": "GET /api/leaderboard",
        "tags": [],
        "security": []
      }
    },
    "/api/link-challenges/{id}/verify": {
      "post": {
        "summary": "POST /api/link-challenges/:id/verify",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/listings": {
      "get": {
        "summary": "列表搜索（公开）",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "创建 listing（首创者）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/listings/{id}": {
      "get": {
        "summary": "详情 + offers 加权排序",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/listings/{id}/offers": {
      "post": {
        "summary": "跟卖：为已有 listing 创建本卖家的 product（即一个 offer）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/listings/mine": {
      "get": {
        "summary": "我的跟卖",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/login": {
      "post": {
        "summary": "POST /api/login",
        "tags": [],
        "security": []
      }
    },
    "/api/logistics/carriers": {
      "get": {
        "summary": "GET /api/logistics/carriers",
        "tags": [],
        "security": []
      }
    },
    "/api/logistics/companies": {
      "get": {
        "summary": "GET /api/logistics/companies",
        "tags": [],
        "security": []
      }
    },
    "/api/logistics/me/performance": {
      "get": {
        "summary": "物流绩效卡 (Wave B-4)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/logistics/orders": {
      "get": {
        "summary": "GET /api/logistics/orders",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/logistics/return-pickups": {
      "get": {
        "summary": "GET /api/logistics/return-pickups",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/manifest": {
      "get": {
        "summary": "GET /api/manifest",
        "tags": [],
        "security": []
      }
    },
    "/api/manifests": {
      "post": {
        "summary": "POST /api/manifests",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/manifests/{hash}": {
      "get": {
        "summary": "GET /api/manifests/:hash",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/manifests/{hash}/takedown": {
      "patch": {
        "summary": "PATCH /api/manifests/:hash/takedown",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/manifests/{hash}/thumb": {
      "get": {
        "summary": "Only the low-res thumbnail is exposed (never full-res / metadata / other columns).",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/manifests/by-anchor/{anchor}": {
      "get": {
        "summary": "GET /api/manifests/by-anchor/:anchor",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "anchor",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/manifests/by-product/{pid}": {
      "get": {
        "summary": "GET /api/manifests/by-product/:pid",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/manifests/me": {
      "get": {
        "summary": "GET /api/manifests/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/match/images": {
      "post": {
        "summary": "Find-the-same v2: upload an order screenshot or photo (raw JPEG/PNG/WebP, ≤1.5MB) for a single-use 10-minute token; guests 3/IP/day, members 30/day",
        "tags": [],
        "security": []
      }
    },
    "/api/match/requests": {
      "get": {
        "summary": "My find-the-same requests (drafts of the last hour, waiting, and closed/expired within 7 days)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "Find-the-same v2: describe, paste or photograph an item; exact hits answer directly, otherwise interpret + search (guest: stateless, member: draft request)",
        "tags": [],
        "security": []
      }
    },
    "/api/match/requests/{id}": {
      "get": {
        "summary": "One request of mine: summary, live plan, merchant offers (re-checked on read) and platform finds; others get 404",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "Edit a request I own (expected_version required); it returns to draft and is searched again",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/match/requests/{id}/close": {
      "post": {
        "summary": "Close a request I own; merchants' answers stay readable for 7 days",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/match/requests/{id}/context": {
      "delete": {
        "summary": "Forget every stored revision; retry cannot recreate the erased input binding.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "Owner only: current-revision observations and separately confirmed facts; never an input digest.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "Explicit buyer confirmation/correction of finite facts. Does not edit or publish the demand.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/match/requests/{id}/interpret": {
      "post": {
        "summary": "Authenticated advisory correction; saves nothing until the buyer explicitly applies the preview.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/match/requests/{id}/offers/{bindingId}/comparison": {
      "get": {
        "summary": "Private owner-only live comparison; null means no currently executable personal offer.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bindingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/match/requests/{id}/publish": {
      "post": {
        "summary": "Publish my request to merchants after explicit consent (echo the summary_digest); needs a destination, clean goods, under the daily cap",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/mcp-telemetry": {
      "post": {
        "summary": "POST /api/mcp-telemetry",
        "tags": [],
        "security": []
      }
    },
    "/api/me": {
      "get": {
        "summary": "GET /api/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/action-needed": {
      "get": {
        "summary": "GET /api/me/action-needed",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/agent-auto-order": {
      "delete": {
        "summary": "DELETE /api/me/agent-auto-order",
        "tags": [],
        "security": []
      },
      "get": {
        "summary": "GET /api/me/agent-auto-order",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/me/agent-auto-order",
        "tags": [],
        "security": []
      }
    },
    "/api/me/agent-confirm": {
      "delete": {
        "summary": "DELETE /api/me/agent-confirm",
        "tags": [],
        "security": []
      },
      "get": {
        "summary": "GET /api/me/agent-confirm",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/me/agent-confirm",
        "tags": [],
        "security": []
      }
    },
    "/api/me/agents": {
      "get": {
        "summary": "/api/me/agents — 列出本账号所有 agent + declaration / strikes",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/agents/{apiKeyPrefix}/log": {
      "get": {
        "summary": "GET /api/me/agents/:apiKeyPrefix/log",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "apiKeyPrefix",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/agents/{apiKeyPrefix}/passport": {
      "get": {
        "summary": "issuer 同时给 did:web:webaz.xyz(标准 DID method)+ 原 did:webaz:0x... 地址(向后兼容)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "apiKeyPrefix",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/agents/{apiKeyPrefix}/revoke": {
      "post": {
        "summary": "用户撤销 agent（铁律 §4 human presence）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "apiKeyPrefix",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/agents/attestations": {
      "post": {
        "summary": "bilateral attestation（用户批准某 agent 的 scope）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/agents/declarations": {
      "post": {
        "summary": "POST /api/me/agents/declarations",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/agents/operators/{operator_name}/revoke": {
      "post": {
        "summary": "撤销同 operator 名下所有 agent（仅撤销本用户给 operator 旗下 agent 的 attestation）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "operator_name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/agents/strikes/{strikeId}/appeal": {
      "post": {
        "summary": "P0 audit fix 4.2: 申诉 strike",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "strikeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/ai-pause-all": {
      "post": {
        "summary": "POST /api/me/ai-pause-all",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/ai-resume-all": {
      "post": {
        "summary": "POST /api/me/ai-resume-all",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/delegates": {
      "get": {
        "summary": "GET /api/me/delegates",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/me/delegates",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/delegates/{grantId}": {
      "delete": {
        "summary": "DELETE /api/me/delegates/:grantId",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/delegates/resolve": {
      "get": {
        "summary": "前端拿不到 id 就只能传 null,那样服务端的绑定校验永远不过(审计 #4:界面发授权 100% 失败)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/delegations": {
      "get": {
        "summary": "员工侧:我代管哪些店铺(只读;凭这里的 grant_id 放进 X-Delegation-Grant 头去操作)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/delete-cancel": {
      "post": {
        "summary": "POST /api/me/delete-cancel",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/delete-request": {
      "post": {
        "summary": "POST /api/me/delete-request",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/delete-status": {
      "get": {
        "summary": "GET /api/me/delete-status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/email-subscription": {
      "get": {
        "summary": "GET /api/me/email-subscription",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/me/email-subscription",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/export": {
      "get": {
        "summary": "COP P0-1: 数据导出（用户主权）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/game-currency-risk-ack": {
      "delete": {
        "summary": "DELETE /api/me/game-currency-risk-ack",
        "tags": [],
        "security": []
      },
      "get": {
        "summary": "GET /api/me/game-currency-risk-ack",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/me/game-currency-risk-ack",
        "tags": [],
        "security": []
      }
    },
    "/api/me/note-prompts": {
      "get": {
        "summary": "COP 飞轮: 完成订单 7d 引导发笔记",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/notify-claim-tasks": {
      "get": {
        "summary": "GET /api/me/notify-claim-tasks",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "通知偏好",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/operator-claim-confirmations": {
      "get": {
        "summary": "── contributor: claims pointing at ME awaiting my confirmation ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/operator-claim-confirmations/{claimedEventId}": {
      "post": {
        "summary": "── contributor accepts/rejects a claim pointing at them ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "claimedEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/operator-claims": {
      "get": {
        "summary": "── contributor self-view: ALL relationships pointing at me (pending/confirmed/approved/history) ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/operator-claims/{approvedEventId}/request-unlink": {
      "post": {
        "summary": "── EITHER PARTY requests UNLINK of an active approved claim — passkey-gated (not just a UI confirm) ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "approvedEventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/me/quota-requests": {
      "get": {
        "summary": "list my own requests + current remaining temporary quota",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "submit a quota-increase request",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/seller/trial-campaigns": {
      "get": {
        "summary": "卖家：我的测评活动列表（含每个的 claims 计数）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/task-proposals": {
      "get": {
        "summary": "proposer-facing read: the caller's OWN proposals + status + public_reply (agent-readable). No review_note; own rows only.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/me/trial-claims": {
      "get": {
        "summary": "买家：我的测评列表",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/merchant/promo-agreement": {
      "get": {
        "summary": "看协议全文 + 自己是否已签(设 >0 佣金率前必签;门在 createProductDraftHandler)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/merchant/promo-agreement/sign": {
      "post": {
        "summary": "签署(Passkey 真人;幂等)。签的是「采购推广服务」的合同 —— 会导致收费,必须真人。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/my-products": {
      "get": {
        "summary": "佣金池率是卖家与 WebAZ 之间的事,买家和推广人都无权看见,推广人看见的只能是他自己那一份。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/nearby": {
      "get": {
        "summary": "Address text never enters this response; private purchase aggregates retain k-anonymity.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/negotiated-offer-counters/{id}": {
      "get": {
        "summary": "GET /api/negotiated-offer-counters/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/negotiated-offer-counters/{id}/answer": {
      "post": {
        "summary": "POST /api/negotiated-offer-counters/:id/answer",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/negotiated-offers/{id}": {
      "get": {
        "summary": "读一张议定价报价单（RFC-032，仅当事两方）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "只有买家与卖家可读。整行下放 —— 行里没有秘密（本特性不存在任何 token）。negotiated_offers_enabled=0 时 404 FEATURE_DISABLED。",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "offer": {
                      "type": "object",
                      "description": "报价单整行；本特性没有任何秘密字段"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "非当事方(OFFER_MISMATCH)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "非当事方(OFFER_MISMATCH)"
                }
              }
            }
          },
          "404": {
            "description": "报价单不存在(OFFER_INVALID);开关关闭时为 FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "报价单不存在(OFFER_INVALID);开关关闭时为 FEATURE_DISABLED"
                }
              }
            }
          }
        }
      }
    },
    "/api/negotiated-offers/{id}/counter": {
      "post": {
        "summary": "POST /api/negotiated-offers/:id/counter",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/negotiated-offers/{id}/revoke": {
      "post": {
        "summary": "撤回一张还没被使用的议定价报价单（RFC-032）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "只有 open 状态可撤。已成交的撤不了 —— 订单已经存在，它走正常的取消/争议流程。negotiated_offers_enabled=0 时 404 FEATURE_DISABLED。",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "不是你开的那张(OFFER_MISMATCH)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "不是你开的那张(OFFER_MISMATCH)"
                }
              }
            }
          },
          "404": {
            "description": "报价单不存在(OFFER_INVALID);开关关闭时为 FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "报价单不存在(OFFER_INVALID);开关关闭时为 FEATURE_DISABLED"
                }
              }
            }
          },
          "409": {
            "description": "已不是 open(OFFER_USED / OFFER_INVALID，带 status)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "已不是 open(OFFER_USED / OFFER_INVALID，带 status)"
                }
              }
            }
          }
        }
      }
    },
    "/api/new-arrivals-feed": {
      "get": {
        "summary": "GET /api/new-arrivals-feed",
        "tags": [],
        "security": []
      }
    },
    "/api/notes": {
      "get": {
        "summary": "sort=following: 需登录，仅显示 follows.followee_id 的笔记",
        "tags": [],
        "security": []
      }
    },
    "/api/notes/photo": {
      "post": {
        "summary": "Phase C2 笔记图片上传 — raw blob，sha256 重算，返回 hash + dedup",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/notes/photo/{hash}": {
      "get": {
        "summary": "笔记图片下载 — 公开（笔记 landing page 公开可读，图也得公开）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/notifications": {
      "get": {
        "summary": "GET /api/notifications",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/notifications/read": {
      "post": {
        "summary": "POST /api/notifications/read",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/notifications/stream": {
      "get": {
        "summary": "GET /api/notifications/stream",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/notifications/stream-ticket": {
      "post": {
        "summary": "POST /api/notifications/stream-ticket",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/offers/{id}": {
      "delete": {
        "summary": "撤回 offer（status=warehouse + 释放 stake；不真删 product）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "PATCH /api/offers/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/offers/{id}/refresh": {
      "post": {
        "summary": "刷新 freshness（卖家点 \"现货确认\"）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/oidc/google/callback": {
      "get": {
        "summary": "GET /api/oidc/google/callback",
        "tags": [],
        "security": []
      }
    },
    "/api/oidc/google/start": {
      "get": {
        "summary": "GET /api/oidc/google/start",
        "tags": [],
        "security": []
      }
    },
    "/api/oidc/identities": {
      "get": {
        "summary": "GET /api/oidc/identities",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/oidc/identities/{provider}": {
      "delete": {
        "summary": "解绑按档位要因子:有 Passkey → oidc_unlink gate;无 Passkey 有密码 → 密码;裸账号 → 放行 + 通知。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/oidc/session": {
      "post": {
        "summary": "票据 → 会话(api_key 只在 POST 响应体里出现,绝不进 URL/日志)",
        "tags": [],
        "security": []
      }
    },
    "/api/oidc/signup-info": {
      "post": {
        "summary": "注册票据预览(补全页显示已验证邮箱/预填名称;不消费票据)",
        "tags": [],
        "security": []
      }
    },
    "/api/order-protection/preview": {
      "get": {
        "summary": "GET /api/order-protection/preview",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/orders": {
      "get": {
        "summary": "GET /api/orders",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "创建订单（含分享分润链路追踪）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": "Agent API key 必须经 Authorization: Bearer 发送；body api_key 不支持。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "address_id": {
                    "type": "string",
                    "description": "地址簿中的收货地址 ID；优先于 shipping_address"
                  },
                  "shipping_address": {
                    "type": "string",
                    "description": "兼容旧调用的完整收货地址；未传 address_id 时使用"
                  },
                  "quantity": {
                    "type": "integer",
                    "default": 1
                  },
                  "variant_id": {
                    "type": "string",
                    "description": "SKU 规格 ID（可选）"
                  },
                  "notes": {
                    "type": "string",
                    "description": "买家备注"
                  },
                  "sponsor_hint": {
                    "type": "string",
                    "description": "推荐人 user_id / permanent_code（三层归属用）"
                  },
                  "coupon_code": {
                    "type": "string"
                  },
                  "buy_insurance": {
                    "type": "boolean",
                    "default": false
                  },
                  "payment_rail": {
                    "type": "string",
                    "enum": [
                      "escrow",
                      "direct_p2p"
                    ],
                    "default": "escrow"
                  },
                  "expected_price": {
                    "type": "number",
                    "description": "防价格漂移（session_token 模式）"
                  },
                  "offer_id": {
                    "type": "string",
                    "description": "RFC-032 议定价成交：卖家开给本买家的那张报价单 id（off_…）。没有 token —— 能不能用它的判据是【你是不是被绑定的那个买家】，而不是持有某个秘密；拿着正确 id 的第三方得到 409 OFFER_MISMATCH。与 session_token / coupon_code / lines（一单多规格）互斥；单价由服务端从报价记录读取，客户端永远不能提供价格。买家付 min(报价, 消费时有效标价)，且绝不高于报价。negotiated_offers_enabled=0 时传入即 404 FEATURE_DISABLED（不会静默按标价成交）。"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "total_amount": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "未登录，或 API key 未通过 Bearer header 提交",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "未登录，或 API key 未通过 Bearer header 提交"
                }
              }
            }
          },
          "402": {
            "description": "钱包余额不足(INSUFFICIENT_BALANCE;仅已退役的模拟托管轨)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "钱包余额不足(INSUFFICIENT_BALANCE;仅已退役的模拟托管轨)"
                }
              }
            }
          },
          "403": {
            "description": "角色或 agent 消费额度不允许(非买家身份 BUYER_ROLE_REQUIRED / 受信角色 / agent 限额)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "角色或 agent 消费额度不允许(非买家身份 BUYER_ROLE_REQUIRED / 受信角色 / agent 限额)"
                }
              }
            }
          },
          "404": {
            "description": "商品或规格不存在 / 已下架(PRODUCT_NOT_FOUND / VARIANT_NOT_FOUND);议定价开关关闭时携带 offer_id 亦回 FEATURE_DISABLED",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "商品或规格不存在 / 已下架(PRODUCT_NOT_FOUND / VARIANT_NOT_FOUND);议定价开关关闭时携带 offer_id 亦回 FEATURE_DISABLED"
                }
              }
            }
          },
          "409": {
            "description": "请求本身没错,但此刻不能成交:库存不足 STOCK_INSUFFICIENT(带 stock)、价格已变 PRICE_CHANGED(带 new_price)、price session 无效/已用/过期、促销不可叠加优惠券、店铺暂停、支付方式未选等 —— 按 error_code 分支;RFC-032 议定价:OFFER_INVALID / OFFER_EXPIRED / OFFER_USED / OFFER_MISMATCH / OFFER_VOID / OFFER_NO_COUPON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "请求本身没错,但此刻不能成交:库存不足 STOCK_INSUFFICIENT(带 stock)、价格已变 PRICE_CHANGED(带 new_price)、price session 无效/已用/过期、促销不可叠加优惠券、店铺暂停、支付方式未选等 —— 按 error_code 分支;RFC-032 议定价:OFFER_INVALID / OFFER_EXPIRED / OFFER_USED / OFFER_MISMATCH / OFFER_VOID / OFFER_NO_COUPON"
                }
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}": {
      "get": {
        "summary": "订单详情(买家/卖家本人;Bearer api_key 或委托凭证)",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Order status and facts for a party of the order. For a direct-pay order inside its payment window the buyer view carries payment.x402 (resource_url, network, asset, amount_units, consent state) — see /docs/X402.md.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    },
                    "payment_rail": {
                      "type": "string"
                    },
                    "total_amount": {
                      "type": "number"
                    },
                    "payment": {
                      "type": "object",
                      "properties": {
                        "x402": {
                          "type": "object",
                          "properties": {
                            "resource_url": {
                              "type": "string"
                            },
                            "method": {
                              "const": "POST"
                            },
                            "scheme": {
                              "const": "exact"
                            },
                            "network": {
                              "type": "string"
                            },
                            "asset": {
                              "type": "string"
                            },
                            "amount_units": {
                              "type": "string"
                            },
                            "consent": {
                              "type": "object"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/action": {
      "post": {
        "summary": "通用状态机 action — accept/ship/pickup/transit/deliver/confirm/dispute",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/buyer-claim": {
      "get": {
        "summary": "GET /api/orders/:id/buyer-claim",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/buyer-claim/confirm": {
      "post": {
        "summary": "POST /api/orders/:id/buyer-claim/confirm",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/buyer-claim/mark-refunded": {
      "post": {
        "summary": "POST /api/orders/:id/buyer-claim/mark-refunded",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/buyer-claim/payout-info": {
      "post": {
        "summary": "POST /api/orders/:id/buyer-claim/payout-info",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund": {
      "get": {
        "summary": "GET /api/orders/:id/cancel-refund",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/confirm": {
      "post": {
        "summary": "POST /api/orders/:id/cancel-refund/confirm",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/decline": {
      "post": {
        "summary": "POST /api/orders/:id/cancel-refund/decline",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/mark-refunded": {
      "post": {
        "summary": "POST /api/orders/:id/cancel-refund/mark-refunded",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/not-received": {
      "post": {
        "summary": "POST /api/orders/:id/cancel-refund/not-received",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/request": {
      "post": {
        "summary": "POST /api/orders/:id/cancel-refund/request",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/seller-refund": {
      "post": {
        "summary": "任务服务:卖家主动退款并取消(真人 Passkey,action task_service_seller_refund)→ 买家确认 / 7 天不回应当作收到",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/cancel-refund/withdraw": {
      "post": {
        "summary": "POST /api/orders/:id/cancel-refund/withdraw",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/chain": {
      "get": {
        "summary": "订单签名链 — 当事人 + 白名单仲裁员(涉争议订单) + admin 可查",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/claim-task": {
      "get": {
        "summary": "通过 order_id 查关联 task",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/claim-verification": {
      "post": {
        "summary": "买家发起 claim 验证任务（绑定 paid 及之后的订单）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/confirm-in-person": {
      "post": {
        "summary": "买家确认面交完成 → 直接 completed + settleOrder",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/decline-review": {
      "get": {
        "summary": "GET /api/orders/:id/decline-review",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/orders/:id/decline-review",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-correction": {
      "get": {
        "summary": "GET /api/orders/:id/delivery-correction",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/orders/:id/delivery-correction",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-correction/confirm": {
      "post": {
        "summary": "POST /api/orders/:id/delivery-correction/confirm",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-correction/disagree": {
      "post": {
        "summary": "POST /api/orders/:id/delivery-correction/disagree",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-correction/object": {
      "post": {
        "summary": "POST /api/orders/:id/delivery-correction/object",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-correction/withdraw": {
      "post": {
        "summary": "POST /api/orders/:id/delivery-correction/withdraw",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-evidence": {
      "post": {
        "summary": "POST /api/orders/:id/delivery-evidence",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/delivery-proof": {
      "post": {
        "summary": "POST /api/orders/:id/delivery-proof",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/agent-confirm": {
      "post": {
        "summary": "Buyer's AI assistant confirms receipt — only when the check is matched AND the owner's 「允许 AI 替我确认收货」 covers this order (cap, seller); otherwise a plain refusal (owner confirms on the order page, or auto-confirm)",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/cancel-late": {
      "post": {
        "summary": "POST /api/orders/:id/digital-delivery/cancel-late",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/evidence": {
      "post": {
        "summary": "Evidence pre-check (the evidence route itself is in digital-delivery-orders.ts): the stated recipient must be a plain 1-32 character name",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/info": {
      "get": {
        "summary": "GET /api/orders/:id/digital-delivery/info",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "PUT /api/orders/:id/digital-delivery/info",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/listing-invalid": {
      "post": {
        "summary": "POST /api/orders/:id/digital-delivery/listing-invalid",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/ticket": {
      "get": {
        "summary": "GET /api/orders/:id/digital-delivery/ticket",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/digital-delivery/verification": {
      "get": {
        "summary": "Buyer or seller: machine-readable delivery check — result matched | short | mismatch | pending + reasons + checks (amount / recipient / deadline); never a character name",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/direct-pay-qr": {
      "get": {
        "summary": "取【当时那一版】图字节。未 ack / 非买家 / 无 QR / 非 direct_p2p → 统一 404(不枚举,不泄露)。图字节不入 order JSON。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund": {
      "get": {
        "summary": "GET /api/orders/:id/fault-refund",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund/confirm": {
      "post": {
        "summary": "POST /api/orders/:id/fault-refund/confirm",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund/decline": {
      "post": {
        "summary": "POST /api/orders/:id/fault-refund/decline",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund/escalate": {
      "post": {
        "summary": "POST /api/orders/:id/fault-refund/escalate",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund/mark-refunded": {
      "post": {
        "summary": "POST /api/orders/:id/fault-refund/mark-refunded",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund/request": {
      "post": {
        "summary": "POST /api/orders/:id/fault-refund/request",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/fault-refund/withdraw": {
      "post": {
        "summary": "POST /api/orders/:id/fault-refund/withdraw",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/force-timeout-check": {
      "post": {
        "summary": "手动触发超时判责（当事人）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue": {
      "get": {
        "summary": "GET /api/orders/:id/issue",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/orders/:id/issue",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue/escalate": {
      "post": {
        "summary": "POST /api/orders/:id/issue/escalate",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue/propose": {
      "post": {
        "summary": "POST /api/orders/:id/issue/propose",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue/reply": {
      "post": {
        "summary": "POST /api/orders/:id/issue/reply",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue/respond": {
      "post": {
        "summary": "POST /api/orders/:id/issue/respond",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue/withdraw": {
      "post": {
        "summary": "POST /api/orders/:id/issue/withdraw",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/issue/withdraw-proposal": {
      "post": {
        "summary": "POST /api/orders/:id/issue/withdraw-proposal",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/mutual-cancel": {
      "get": {
        "summary": "GET /api/orders/:id/mutual-cancel",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/mutual-cancel/accept": {
      "post": {
        "summary": "POST /api/orders/:id/mutual-cancel/accept",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/mutual-cancel/decline": {
      "post": {
        "summary": "POST /api/orders/:id/mutual-cancel/decline",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/mutual-cancel/propose": {
      "post": {
        "summary": "POST /api/orders/:id/mutual-cancel/propose",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/mutual-cancel/withdraw": {
      "post": {
        "summary": "POST /api/orders/:id/mutual-cancel/withdraw",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/oos-cancel": {
      "get": {
        "summary": "GET /api/orders/:id/oos-cancel",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/orders/:id/oos-cancel",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/oos-cancel/respond": {
      "post": {
        "summary": "POST /api/orders/:id/oos-cancel/respond",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/overpayments": {
      "get": {
        "summary": "GET /api/orders/:id/overpayments",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/overpayments/{xid}/confirm": {
      "post": {
        "summary": "POST /api/orders/:id/overpayments/:xid/confirm",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/overpayments/{xid}/mark-refunded": {
      "post": {
        "summary": "POST /api/orders/:id/overpayments/:xid/mark-refunded",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "xid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/partial-cancel": {
      "post": {
        "summary": "POST /api/orders/:id/partial-cancel",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/partial-cancel/accept": {
      "post": {
        "summary": "POST /api/orders/:id/partial-cancel/accept",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/partial-cancel/claim": {
      "post": {
        "summary": "POST /api/orders/:id/partial-cancel/claim",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/partial-cancel/confirm-refunded": {
      "post": {
        "summary": "POST /api/orders/:id/partial-cancel/confirm-refunded",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/partial-cancel/mark-refunded": {
      "post": {
        "summary": "POST /api/orders/:id/partial-cancel/mark-refunded",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/partial-cancel/reject": {
      "post": {
        "summary": "POST /api/orders/:id/partial-cancel/reject",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/pay": {
      "post": {
        "summary": "x402 v2 付款(直付订单,USDC on Base;买家 api_key)",
        "tags": [
          "order",
          "x402"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "PAYMENT-SIGNATURE",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "base64(JSON x402 PaymentPayload); omit to receive the 402 requirement"
          }
        ],
        "description": "x402 v2 HTTP transport. Without PAYMENT-SIGNATURE → 402 + PAYMENT-REQUIRED header (base64 JSON requirement built from the order's frozen snapshot). With PAYMENT-SIGNATURE (base64 JSON payment payload carrying the EIP-3009 authorization) → verify + settle; success returns PAYMENT-RESPONSE + JSON body. Needs the account owner's x402 consent and stays within the agent autopay limits; over a limit → 403 X402_PER_ORDER_CAP / X402_DAILY_CAP / X402_MONTHLY_CAP with owner_approval (the owner pays with their own wallet + Passkey). No request body is read.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "string"
                    },
                    "status": {
                      "const": "accepted"
                    },
                    "tx_hash": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    },
                    "payer": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required — read the PAYMENT-REQUIRED header",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Payment required — read the PAYMENT-REQUIRED header",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Consent missing, disclosures not acknowledged, or an autopay limit (X402_*_CAP, with owner_approval)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Consent missing, disclosures not acknowledged, or an autopay limit (X402_*_CAP, with owner_approval)",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_code": {
                      "type": "string"
                    },
                    "limit": {
                      "type": "string"
                    },
                    "limit_units": {
                      "type": "integer"
                    },
                    "used_units": {
                      "type": "integer"
                    },
                    "amount_units": {
                      "type": "integer"
                    },
                    "owner_approval": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Order not payable in this state / settlement already in flight",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Order not payable in this state / settlement already in flight",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/pending-accept/accept": {
      "post": {
        "summary": "卖家确认接单 → 开付款窗口(deadline 此刻起表;收款信息此刻起买家可见 —— orders-read 状态门放行)",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/pending-accept/cancel": {
      "post": {
        "summary": "买家撤单(接单前反悔)→ 无责取消 + 回补库存",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/pending-accept/confirm-quote": {
      "post": {
        "summary": "买家确认 Direct Pay 模板外地区运费报价",
        "tags": [
          "order",
          "direct-pay"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "确认卖家报价后的新订单总额并进入付款窗口。Agent API key 必须经 Authorization: Bearer 发送，且 declared scope 必须包含 place_order；服务端在同一事务内以报价后的总额重新校验单笔及滚动 24 小时消费上限。body api_key 不支持。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": false,
                "properties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "status": {
                      "const": "direct_pay_window"
                    },
                    "total_amount": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "未登录，或 API key 未通过 Bearer header 提交",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "未登录，或 API key 未通过 Bearer header 提交"
                }
              }
            }
          },
          "403": {
            "description": "place_order 未声明，或报价后总额超过 agent 单笔/滚动 24 小时消费上限",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "place_order 未声明，或报价后总额超过 agent 单笔/滚动 24 小时消费上限"
                }
              }
            }
          },
          "409": {
            "description": "尚未报价、订单状态竞态，或确认事务失败",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "尚未报价、订单状态竞态，或确认事务失败"
                }
              }
            }
          }
        }
      }
    },
    "/api/orders/{id}/pending-accept/decline": {
      "post": {
        "summary": "卖家谢绝(无法发货/物流不可达等;理由可选,买家可见)→ 无责取消 + 回补库存",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/pending-accept/quote": {
      "post": {
        "summary": "可重复报价(买家确认前修正);每次报价重置响应窗(param direct_pay.quote_confirm_hours,默认 48h)。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/ship-part": {
      "post": {
        "summary": "POST /api/orders/:id/ship-part",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/split-ship": {
      "get": {
        "summary": "GET /api/orders/:id/split-ship",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service": {
      "get": {
        "summary": "GET /api/orders/:id/task-service",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/acceptance": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/acceptance",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/claim-dispute": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/claim-dispute",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/confirm-decision": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/confirm-decision",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/decision": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/decision",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/delivery": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/delivery",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/dispute": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/dispute",
        "tags": [
          "order",
          "dispute"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/task-service/withdraw-dispute": {
      "post": {
        "summary": "POST /api/orders/:id/task-service/withdraw-dispute",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/tracking": {
      "post": {
        "summary": "POST /api/orders/:id/tracking",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-cancel-request": {
      "get": {
        "summary": "── 读:双方都看得见同一份事实 ────────────────────────────────────────",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "── 买家发起申请(纯记录 + 通知卖家;不动钱不动状态)────────────────────",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-cancel-request/approve": {
      "post": {
        "summary": "── 卖家同意 → 建链上退款工单(唯一动钱的地方)────────────────────────",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-cancel-request/decline": {
      "post": {
        "summary": "── 卖家拒绝 → 订单照常走 ────────────────────────────────────────",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-cancel-request/withdraw": {
      "post": {
        "summary": "── 买家撤回 ──────────────────────────────────────────────────────",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/deposit-observation": {
      "post": {
        "summary": "POST /api/orders/:id/usdc-escrow/deposit-observation",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/lifecycle-status": {
      "get": {
        "summary": "GET /api/orders/:id/usdc-escrow/lifecycle-status",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/lifecycle-submission": {
      "post": {
        "summary": "POST /api/orders/:id/usdc-escrow/lifecycle-submission",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/preaccept": {
      "post": {
        "summary": "POST /api/orders/:id/usdc-escrow/preaccept",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/preaccept/withdraw": {
      "post": {
        "summary": "POST /api/orders/:id/usdc-escrow/preaccept/withdraw",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/provisional-status": {
      "get": {
        "summary": "GET /api/orders/:id/usdc-escrow/provisional-status",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/status": {
      "get": {
        "summary": "GET /api/orders/:id/usdc-escrow/status —— 买家或卖家:轮询存入/释放可见性(B6b stepper)。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/usdc-escrow/voucher": {
      "post": {
        "summary": "POST /api/orders/:id/usdc-escrow/voucher —— 买家:签发一次性 EIP-712 存款授权。",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/x402-accept-received": {
      "post": {
        "summary": "POST /api/orders/:id/x402-accept-received",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{id}/x402-owner-request": {
      "post": {
        "summary": "POST /api/orders/:id/x402-owner-request",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{order_id}/buyer-rating": {
      "get": {
        "summary": "查 seller → buyer 评价（双盲遮蔽：buyer 看不到，除非自己也评过 OR 窗口到期）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "seller → buyer 反向评价",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{order_id}/rating": {
      "get": {
        "summary": "查 buyer → seller 评价（双盲遮蔽：seller 视角同样）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "buyer → seller 评价（一单一评，仅 completed 订单可评）",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{order_id}/rating/followup": {
      "post": {
        "summary": "W3 买家追问 — 在卖家 reply 后可追问一次",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{order_id}/rating/reply": {
      "post": {
        "summary": "POST /api/orders/:order_id/rating/reply",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/{order_id}/return-request": {
      "get": {
        "summary": "P1-5: 订单级直查",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "buyer 发起退货",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "order_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/orders/batch-ship": {
      "post": {
        "summary": "C-4: 卖家批量发货(≤100 单;逐单成败,每一单走与单发同一个执行器)",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/orders/export": {
      "get": {
        "summary": "Wave D-2: 订单导出 CSV",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/orders/merge-ship": {
      "post": {
        "summary": "POST /api/orders/merge-ship",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/orders/ship-parcels": {
      "post": {
        "summary": "发货卡片(2026-10-21):同一买家同一地址的几单(跨合单 / 单独下单)勾选后分包裹发出;全部发出或一单都不动",
        "tags": [
          "order"
        ],
        "security": []
      }
    },
    "/api/p2p-products": {
      "get": {
        "summary": "公开：列表",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "发布 / 重发 P2P 商品",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/p2p-products/{id}": {
      "delete": {
        "summary": "下架（保留行 + status='warehouse'，在途订单 hash 仍可证）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "仓库 / 已删 / 归档的 peer_endpoint、签名、卖家永久码此前对任何人公开。店主照看自己的全部,管理员照看在售的。",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "更新（重发 hash + signature，价格/库存/标题可改；旧 hash 给在途订单保留）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/payment-fee-schedules": {
      "get": {
        "summary": "GET /api/payment-fee-schedules",
        "tags": [],
        "security": []
      }
    },
    "/api/payment-methods": {
      "get": {
        "summary": "─── 公共支付方法 ───────────────────────────────────────────",
        "tags": [],
        "security": []
      }
    },
    "/api/payment-methods/for-region": {
      "get": {
        "summary": "某地区可用方法（fallback 到 global）",
        "tags": [],
        "security": []
      }
    },
    "/api/payment-methods/log": {
      "get": {
        "summary": "公共变更审计日志（COP transparency）",
        "tags": [],
        "security": []
      }
    },
    "/api/peers/{hash}": {
      "delete": {
        "summary": "DELETE /api/peers/:hash",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "hash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/peers/heartbeat": {
      "post": {
        "summary": "POST /api/peers/heartbeat",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/pin-receipts": {
      "post": {
        "summary": "POST /api/pin-receipts",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/pin-receipts/mine": {
      "get": {
        "summary": "GET /api/pin-receipts/mine",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/product-actions": {
      "get": {
        "summary": "我的请求列表(批准页数据源):纯读;归属在 SQL 里,别人的请求永远不会出现。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/product-actions/{id}": {
      "get": {
        "summary": "Task 7 — 状态查询:纯读幂等(GET 绝不写;过期只投影)。归属守卫在 domain(同形 404 不泄露存在性)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/product-actions/{id}/approve": {
      "post": {
        "summary": "gate token 的 purpose_data,故\"不开窗的 token\"无法被复用去开窗。裸 api_key 永远过不了(consumeGateToken)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/product-actions/{id}/reject": {
      "post": {
        "summary": "拒绝:只收紧(pending → revoked),owner-key/会话即可,不需 Passkey;幂等。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/product-actions/request": {
      "post": {
        "summary": "提交:owner-key 建 pending 删除请求 → 返回 approve_url(人去 Passkey)。绝不执行删除。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/product-share/touch": {
      "post": {
        "summary": "商品分享归因落库（前端登录后首次进入带 share_id 时调用）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/products": {
      "get": {
        "summary": "商品列表（含 q exact match / fuzzy / ship_to / 排序）",
        "tags": [
          "product"
        ],
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "精确商品标题（exact match）"
          },
          {
            "name": "fuzzy",
            "in": "query",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "description": "true 时模糊匹配"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "ship_to",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "ISO region 过滤可派送"
          },
          {
            "name": "mode",
            "in": "query",
            "schema": {
              "enum": [
                "pwa",
                "agent",
                "raw"
              ],
              "default": "pwa"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "enum": [
                "trending",
                "cheap",
                "new",
                "completion"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 100
            }
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000
            },
            "description": "PWA 编号分页；agent/raw 继续使用 cursor"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "上架商品（卖家 only）— 含 stake 锁定机制",
        "tags": [
          "product"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "title",
                  "price"
                ],
                "properties": {
                  "title": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "price": {
                    "type": "number",
                    "minimum": 0.01
                  },
                  "category": {
                    "type": "string"
                  },
                  "category_id": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 5000
                  },
                  "sku_label": {
                    "type": "string",
                    "maxLength": 40,
                    "nullable": true,
                    "description": "单品规格说明 — 一个单位到底是什么，如「一包 2 个(黑+白)」。单行、≤40 字。新草稿要通过达标闸必须填（缺则 missing_for_warehouse 含 SKU_LABEL_REQUIRED）；有规格(variants)的商品传非空值 → 400 SKU_LABEL_NOT_FOR_VARIANTS。绝不可由调用方自行编造，不知道就不要传。"
                  },
                  "stock": {
                    "type": "integer",
                    "default": 1
                  },
                  "commission_rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 0.5,
                    "description": "分享分润率（默认 0.05）"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "min_return_days": {
                    "type": "integer",
                    "default": 7
                  },
                  "max_handling_hours": {
                    "type": "integer",
                    "default": 48
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "product_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/products/{id}": {
      "delete": {
        "summary": "硬删（仅 deleted 状态 + 无进行中订单 + 无历史订单）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "商品详情(公开;店主看自己的商品可见非上架状态与内部字段)",
        "tags": [
          "product"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "description": "Public product read. Non-owners get the public column allowlist only (contract 192). When the product is active the response carries payment_options (price per payment method, cheapest first); for anonymous callers it is marked payment_options_reference_only=true — the quote is binding.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "price": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "stock": {
                      "type": "integer"
                    },
                    "seller_name": {
                      "type": "string"
                    },
                    "compare": {
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "best_price": {
                      "type": "object"
                    },
                    "payment_options": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "rail": {
                            "type": "string"
                          },
                          "account_id": {
                            "type": "string"
                          },
                          "method_label": {
                            "type": "string"
                          },
                          "payable_units": {
                            "type": "integer"
                          },
                          "discount_units": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "payment_options_reference_only": {
                      "type": "boolean"
                    },
                    "payment_options_note": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "const": "not_found"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "PUT /api/products/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/aliases": {
      "get": {
        "summary": "M7.2-7: alias CRUD（仅商品 owner）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/products/:id/aliases",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/aliases/{aliasId}": {
      "delete": {
        "summary": "DELETE /api/products/:id/aliases/:aliasId",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "aliasId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/anchor-impact": {
      "get": {
        "summary": "365 天内无法重用同一个口令 —— 这个代价必须在按下去之前说清楚,不是事后才发现。",
        "tags": [
          "anchor"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/can-share": {
      "get": {
        "summary": "分享许可：是否真实收货完成该商品(经过 confirmed,排除退款/违约/争议终态)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/claim": {
      "post": {
        "summary": "POST /api/products/:id/claim",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/claims": {
      "get": {
        "summary": "公开：列出某商品的全部声明（含已结算）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/commission-history": {
      "get": {
        "summary": "单件分享佣金率变更史（仅商品主人；新→旧）",
        "tags": [
          "product"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 5,
              "minimum": 1,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array"
                    },
                    "limit_max": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/products/{id}/delivery-template": {
      "get": {
        "summary": "GET /api/products/:id/delivery-template",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/products/:id/delivery-template",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/demand-warehouse-note": {
      "get": {
        "summary": "商品页卖家视角那一行「已按你的选择转入仓库」的依据:只在商品【现在】是仓库、且曾被需求成交后的转仓库动作移入时为 true。按店铺(sales.seller_id)取,别人读到 false。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/external-links": {
      "get": {
        "summary": "array the seller workbench consumes; that stays untouched). Only public-safe columns are returned.",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/game-currency-capacity": {
      "get": {
        "summary": "GET /api/products/:id/game-currency-capacity",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/get-or-create-share": {
      "post": {
        "summary": "获取或创建商品 shareable（被 sharePromoLink 用，走 /s/<id> 短链）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/links": {
      "get": {
        "summary": "GET /api/products/:id/links",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "新链接（无人认领）直接 verified=1；已被他人认领则发起众包验证任务",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/links/{linkId}": {
      "delete": {
        "summary": "DELETE /api/products/:id/links/:linkId",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/offers": {
      "post": {
        "summary": "卖家从商品页直接对某位买家开价。线程由本路由找/建 —— 所以它自带前置关系门(威胁模型 M9/M20)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/preview": {
      "get": {
        "summary": "PRD06:与公开商品详情同一可见性(整改 / 封停的店、外链全撤回 → 404),不只判 status。",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/price-history": {
      "get": {
        "summary": "GET /api/products/:id/price-history",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/promotions": {
      "get": {
        "summary": "公开读:与下单同一个判定(activePromotionFor),页面上说的就是下单时会算的",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/public-commerce-readiness": {
      "get": {
        "summary": "(仍然只能查自己的商品)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/shipping-options": {
      "get": {
        "summary": "公开读:买家下单前查配送范围。生效 = 单品覆盖 ?? 店铺默认;template=null → 不按地区计费(下单不要求选地区)。",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/status": {
      "patch": {
        "summary": "状态切换（active / warehouse / deleted / archived）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{id}/task-service-rules": {
      "get": {
        "summary": "GET /api/products/:id/task-service-rules",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/products/:id/task-service-rules",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/flash-sale": {
      "get": {
        "summary": "公开：商品当前生效的 flash sale",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/products/:product_id/flash-sale",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/qa": {
      "get": {
        "summary": "GET /api/products/:product_id/qa",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "─── Wave A-2: 商品 Q&A ─────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/qa/{qa_id}/answer": {
      "post": {
        "summary": "POST /api/products/:product_id/qa/:qa_id/answer",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qa_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/qa/{qa_id}/helpful": {
      "post": {
        "summary": "POST /api/products/:product_id/qa/:qa_id/helpful",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "qa_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/ratings": {
      "get": {
        "summary": "公开：商品评价 + 聚合（仅展示双盲已揭晓的）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/trial-campaign": {
      "delete": {
        "summary": "卖家关闭活动（仍允许 pending claims 完成评估）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "公开查询商品的活动状态（任何人）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "卖家：开/更新活动",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/trial-claim": {
      "post": {
        "summary": "P1: 新账号 < 3 天禁申请；IP/UA 与卖家 session 重叠 → 标 account_link 审计 flag",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/variants": {
      "get": {
        "summary": "公开列出（buyer 下单页查可选项）；include_inactive=1 仅限商品所有者（看/重启已停用规格）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/products/:product_id/variants",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/variants/{variant_id}": {
      "delete": {
        "summary": "DELETE /api/products/:product_id/variants/:variant_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "PATCH /api/products/:product_id/variants/:variant_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "variant_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/waitlist": {
      "delete": {
        "summary": "DELETE /api/products/:product_id/waitlist",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/products/:product_id/waitlist",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/waitlist/check": {
      "get": {
        "summary": "GET /api/products/:product_id/waitlist/check",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/{product_id}/waitlist/count": {
      "get": {
        "summary": "seller 查 waitlist count（决定备多少货）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/products/commission-batch": {
      "post": {
        "summary": "批量设置分享佣金率：固定值 / ±基点 / 刷成店铺默认。逐件结果；门与单件编辑逐条相同，无 Passkey",
        "tags": [
          "product"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_ids"
                ],
                "properties": {
                  "product_ids": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 200,
                    "description": "自己的商品 id（不可重复）；有一件不属于你则整批 404，一件都不改"
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "set",
                      "delta",
                      "default"
                    ],
                    "default": "set",
                    "description": "set=全部设成 commission_rate；delta=各自加减 delta_bps；default=刷成店铺默认（未设则 409 DEFAULT_RATE_UNSET）"
                  },
                  "commission_rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 0.25,
                    "description": "mode=set 时的目标费率（小数）"
                  },
                  "delta_bps": {
                    "type": "integer",
                    "minimum": -2500,
                    "maximum": 2500,
                    "description": "mode=delta 时必填，整数基点。服务端逐件夹住：老值已在上限或以上的不再调高，下调不低于 0"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "changed": {
                      "type": "array"
                    },
                    "skipped": {
                      "type": "array"
                    },
                    "failed": {
                      "type": "array"
                    },
                    "max_commission_rate": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/products/extract-aliases": {
      "post": {
        "summary": "M7.2-5: 从外部原文提取候选 alias",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/products/hard-delete-batch": {
      "post": {
        "summary": "上限 100 件/批:防误操作一键清空整店,也限制单次 Passkey 授权面。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/products/result-fetch": {
      "post": {
        "summary": "资源滥用护栏(Codex M-4):无鉴权端点按 IP 限流(默认 60 req/min,WEBAZ_RESULT_FETCH_RPM 可调)。",
        "tags": [],
        "security": []
      }
    },
    "/api/profile": {
      "get": {
        "summary": "GET /api/profile",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "summary": "通用 profile patch（search_anchor / bio / feed_visible）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/add-role": {
      "post": {
        "summary": "POST /api/profile/add-role",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/bind-email": {
      "post": {
        "summary": "绑定邮箱 — 步骤 1：发码",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/bind-placement": {
      "post": {
        "summary": "POST /api/profile/bind-placement",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/change-handle": {
      "post": {
        "summary": "改 handle：累进式冷却 — 第 N 次改需距上次 N × 12 月",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/change-name": {
      "post": {
        "summary": "POST /api/profile/change-name",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/clear-location": {
      "post": {
        "summary": "POST /api/profile/clear-location",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/confirm-email": {
      "post": {
        "summary": "绑定邮箱 — 步骤 2：确认验证码",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/default-address": {
      "post": {
        "summary": "默认地址（结构化 + 兼容旧 text/region）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/feed-visible": {
      "patch": {
        "summary": "隐私开关（旧 API，向后兼容；新代码用 PATCH /api/profile）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/placement-pref": {
      "post": {
        "summary": "POST /api/profile/placement-pref",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/placement-status": {
      "get": {
        "summary": "GET /api/profile/placement-status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/region": {
      "post": {
        "summary": "POST /api/profile/region",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/remove-password": {
      "post": {
        "summary": "移除密码（恢复只用 API Key 模式）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/set-location": {
      "post": {
        "summary": "POST /api/profile/set-location",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/set-password": {
      "post": {
        "summary": "设置 / 修改密码",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/switch-role": {
      "post": {
        "summary": "POST /api/profile/switch-role",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/profile/verify-password": {
      "post": {
        "summary": "验证密码（显示 API Key 前的二次确认）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/promoter/dashboard": {
      "get": {
        "summary": "GET /api/promoter/dashboard",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/promoter/share-readiness": {
      "get": {
        "summary": "GET /api/promoter/share-readiness",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/promoter/team": {
      "get": {
        "summary": "GET /api/promoter/team",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/protocol-status": {
      "get": {
        "summary": "GET /api/protocol-status",
        "tags": [],
        "security": []
      }
    },
    "/api/public-commerce/in-catalog-ref": {
      "post": {
        "summary": "outside the reviewed catalog into the public app). POST so the token never sits in a URL or access log. Boolean only.",
        "tags": [],
        "security": []
      }
    },
    "/api/public-commerce/in-catalog/{id}": {
      "get": {
        "summary": "public search uses (publicCommerceSqlFilter). Boolean only; no product facts.",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/public-commerce/readiness/{id}": {
      "get": {
        "summary": "GET /api/public-commerce/readiness/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/public-ideas": {
      "post": {
        "summary": "反 bot：honeypot 字段 + 单 IP+UA 联合 rate limit 5/h + 内容 hash 去重 1h",
        "tags": [],
        "security": []
      }
    },
    "/api/public/build-tasks": {
      "get": {
        "summary": "GET /api/public/build-tasks",
        "tags": [],
        "security": []
      }
    },
    "/api/public/build-tasks/{id}": {
      "get": {
        "summary": "GET /api/public/build-tasks/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/public/task-proposals": {
      "post": {
        "summary": "public submit — anonymous; proposer_account_id is never taken from the body (anti-spoof).",
        "tags": [],
        "security": []
      }
    },
    "/api/push/status": {
      "get": {
        "summary": "GET /api/push/status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/push/subscribe": {
      "delete": {
        "summary": "DELETE /api/push/subscribe",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/push/subscribe",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/push/vapid-public-key": {
      "get": {
        "summary": "GET /api/push/vapid-public-key",
        "tags": [],
        "security": []
      }
    },
    "/api/qr": {
      "get": {
        "summary": "二维码生成（24h cache + ETag）",
        "tags": [],
        "security": []
      }
    },
    "/api/recommendations/me": {
      "get": {
        "summary": "GET /api/recommendations/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/recover-key": {
      "post": {
        "summary": "现在:不查库,同一个回答,不带任何账号信息。路由保留 —— 老客户端得到的是一句怎么找回的说明,不是 404。",
        "tags": [],
        "security": []
      }
    },
    "/api/recover-key/confirm": {
      "post": {
        "summary": "安全等价:本端点本就返回完整 api_key(最高凭证),允许同时重置密码不扩大权限面 —— 验证码已是同等门槛。",
        "tags": [],
        "security": []
      }
    },
    "/api/recover-key/start": {
      "post": {
        "summary": "步骤 1：发送验证码到已绑定邮箱（防泄露：找没找到都同响应）",
        "tags": [],
        "security": []
      }
    },
    "/api/referral/bind": {
      "post": {
        "summary": "语义与「注册时带码」完全对齐:改 sponsor_id/sponsor_path + 孤儿时进放置树,同一事务。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/referral/me": {
      "get": {
        "summary": "B-1: 个人邀请 dashboard",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/register": {
      "post": {
        "summary": "注册新账户（公开注册只有 buyer/seller,缺省 buyer）",
        "tags": [
          "auth"
        ],
        "security": [],
        "description": "三条路径:邮箱(email + code + password 必填)、Google(oidc_ticket,password 可选)、World ID(worldid_ticket + password 必填)。password 至少 8 字符:缺 → 400 PASSWORD_REQUIRED,过短 → 400 PASSWORD_TOO_SHORT(契约 108)。",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "用户名或店铺名"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "buyer",
                      "seller"
                    ],
                    "default": "buyer",
                    "description": "可省略,缺省 buyer;受信角色 → 400 ROLE_NOT_PUBLIC_REGISTERABLE"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8,
                    "description": "登录密码;邮箱与 World ID 注册必填,Google 注册可选"
                  },
                  "code": {
                    "type": "string",
                    "description": "邮箱验证码(POST /api/register/send-code)"
                  },
                  "sponsor_id": {
                    "type": "string",
                    "description": "邀请码 / 推荐码"
                  },
                  "oidc_ticket": {
                    "type": "string",
                    "description": "Google 注册票据"
                  },
                  "worldid_ticket": {
                    "type": "string",
                    "description": "World ID 注册票据"
                  },
                  "region": {
                    "type": "string",
                    "description": "ISO 国家代码（cn/us/sg 等）",
                    "example": "sg"
                  },
                  "handle": {
                    "type": "string",
                    "description": "ASCII handle，3-20 字符 [a-z0-9._]"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "phone": {
                    "type": "string"
                  },
                  "referral_code": {
                    "type": "string",
                    "description": "推荐人 permanent_code"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user_id": {
                      "type": "string"
                    },
                    "api_key": {
                      "type": "string"
                    },
                    "permanent_code": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/register/send-code": {
      "post": {
        "summary": "注册场景需明确告知\"邮箱已占用\"(无法防枚举,标准取舍),但限流 + captcha 兜底。",
        "tags": [],
        "security": []
      }
    },
    "/api/reputation": {
      "get": {
        "summary": "GET /api/reputation",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/reputation/{userId}": {
      "get": {
        "summary": "GET /api/reputation/:userId",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/requests/plaza": {
      "get": {
        "summary": "公开摘要与商机板同一 allowlist,没开店的人也能看;受信角色不参与交易 → 403;viewer 说明这个人现在能不能应答、差什么。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/return-requests": {
      "get": {
        "summary": "GET /api/return-requests",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/return-requests/{id}": {
      "delete": {
        "summary": "DELETE /api/return-requests/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "─── W2 售后协商时间线 ───────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/confirm-refund": {
      "post": {
        "summary": "POST /api/return-requests/:id/confirm-refund",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/decide": {
      "post": {
        "summary": "POST /api/return-requests/:id/decide",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/escalate": {
      "post": {
        "summary": "buyer 升级到争议（rejected 后 / pending ≥ 7 天 / 上门取件两态 ≥ 7 天无进展,SHF02）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/mark-refunded": {
      "post": {
        "summary": "POST /api/return-requests/:id/mark-refunded",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/messages": {
      "post": {
        "summary": "POST /api/return-requests/:id/messages",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/picked-up": {
      "post": {
        "summary": "L3 Phase 2: 物流揽收",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/return-requests/{id}/received": {
      "post": {
        "summary": "L3 Phase 2: 卖家确认收到 → refunded",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/reviews/{type}/{id}/claim": {
      "post": {
        "summary": "POST /api/reviews/:type/:id/claim",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/reviews/{type}/{id}/claims": {
      "get": {
        "summary": "GET /api/reviews/:type/:id/claims",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/reviews/recent": {
      "get": {
        "summary": "GET /api/reviews/recent",
        "tags": [],
        "security": []
      }
    },
    "/api/rewards/apply": {
      "post": {
        "summary": "POST /api/rewards/apply — activate (or reconfirm) opt-in + drain escrow",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/rewards/deactivate": {
      "post": {
        "summary": "POST /api/rewards/deactivate — flip off; subsequent commissions → charity",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/rewards/payout-request": {
      "post": {
        "summary": "POST /api/rewards/payout-request — 佣金打到链上地址;提现铁律:每次申请都要真人 Passkey",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/rewards/payout-request/{id}/cancel": {
      "post": {
        "summary": "cancel 只要 session:它把钱退回【本人自己的】佣金池,偷到 session 的人拿不到好处(fail-safe 那一侧)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/rewards/payout-requests": {
      "get": {
        "summary": "申请那一刻即扣余额(原子);admin 认领后不可撤,确认只附凭证。可出金额【只认佣金来源】,WAZ 余额不可提。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/rewards/status": {
      "get": {
        "summary": "GET /api/rewards/status — current state + escrow tally",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/rfqs": {
      "get": {
        "summary": "卖家 RFQ 看板",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "买家：创建 RFQ",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/rfqs/{id}": {
      "delete": {
        "summary": "DELETE /api/rfqs/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "GET /api/rfqs/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/rfqs/{id}/award": {
      "post": {
        "summary": "买家：选定 winning bid",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/rfqs/{id}/bids": {
      "post": {
        "summary": "POST /api/rfqs/:id/bids",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/rfqs/mine": {
      "get": {
        "summary": "GET /api/rfqs/mine",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/search-by-image": {
      "post": {
        "summary": "POST /api/search-by-image",
        "tags": [],
        "security": []
      }
    },
    "/api/search-by-image/status": {
      "get": {
        "summary": "GET /api/search-by-image/status",
        "tags": [],
        "security": []
      }
    },
    "/api/search-by-link": {
      "post": {
        "summary": "POST /api/search-by-link",
        "tags": [],
        "security": []
      }
    },
    "/api/search-fuzzy": {
      "get": {
        "summary": "GET /api/search-fuzzy",
        "tags": [],
        "security": []
      }
    },
    "/api/secondhand": {
      "get": {
        "summary": "2. 列表（市场入口）",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "1. 发布",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/secondhand/{id}": {
      "get": {
        "summary": "4. 详情（view_count++）+ 同卖家其他在售",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "5. 编辑（仅 owner；可改 price / description / negotiable / status / fulfillment）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/secondhand/{id}/order": {
      "post": {
        "summary": "6. 下单（CAS 锁库存）— money/escrow + pragma FK-OFF 窗口,保持同步,Phase 3 随资金路径迁移",
        "tags": [
          "order"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/secondhand/mine": {
      "get": {
        "summary": "3. 我的二手发布",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/accept-mode": {
      "post": {
        "summary": "POST /api/seller/accept-mode",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/after-sale-defaults": {
      "get": {
        "summary": "默认售后承诺(2026-08-27):只影响新建商品;PUT 空值 = 清除该项(回落平台默认 7 / '' / 0)。走 setStoreSetting → 变更记录。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "PUT /api/seller/after-sale-defaults",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/agent-connections": {
      "get": {
        "summary": "GET /api/seller/agent-connections",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/agent-connections/{grantId}": {
      "put": {
        "summary": "PUT /api/seller/agent-connections/:grantId",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/agent-connections/{grantId}/activate": {
      "post": {
        "summary": "POST /api/seller/agent-connections/:grantId/activate",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/agent-connections/{grantId}/pause": {
      "post": {
        "summary": "POST /api/seller/agent-connections/:grantId/pause",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "grantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/agent-connections/maintenance": {
      "post": {
        "summary": "POST /api/seller/agent-connections/maintenance",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/agent-connections/proposals": {
      "get": {
        "summary": "GET /api/seller/agent-connections/proposals",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/agent-connections/proposals/{id}/approve": {
      "post": {
        "summary": "POST /api/seller/agent-connections/proposals/:id/approve",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/agent-connections/proposals/{id}/withdraw": {
      "post": {
        "summary": "POST /api/seller/agent-connections/proposals/:id/withdraw",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/apply-quota-increase": {
      "post": {
        "summary": "POST /api/seller/apply-quota-increase",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/commission-default": {
      "get": {
        "summary": "读店铺默认分享佣金率（null = 未设置；只作用于之后新建的商品）",
        "tags": [
          "seller"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "default_commission_rate": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "promoter_share_rate": {
                      "type": "number"
                    },
                    "max_charge_rate": {
                      "type": "number"
                    },
                    "max_commission_rate": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "设置 / 清除店铺默认分享佣金率。>0 需已签《商家推广服务协议》；只作用于之后新建的商品，绝不回改已上架的",
        "tags": [
          "seller"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "default_commission_rate": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0,
                    "maximum": 0.25,
                    "description": "小数费率（0.05 = 5%）；null 或省略 = 清除默认"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/seller/commission-preview": {
      "get": {
        "summary": "与 commission-default / commission-history 同一条派生值来源(commissionDisplayRates),前端不做乘法。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/direct-pay/deferral-quota": {
      "get": {
        "summary": "GET /api/seller/direct-pay/deferral-quota — 卖家本人的缓交期配额用量(与 checkDeferralQuota 同一份计算)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/direct-pay/deferral-quota/raise-request": {
      "post": {
        "summary": "POST /api/seller/direct-pay/deferral-quota/raise-request — 卖家申请调高缓交期配额(body 可选 note ≤200 字)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/individual-cap": {
      "get": {
        "summary": "── 卖家面 ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/individual-cap/raise-request": {
      "post": {
        "summary": "POST /api/seller/individual-cap/raise-request",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/insights": {
      "get": {
        "summary": "数据中心（30d GMV / 7d 曲线 / Top 5 / 客户洞察 / 状态分布）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/listing-advice": {
      "get": {
        "summary": "GET /api/seller/listing-advice",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/manifest-quota": {
      "get": {
        "summary": "GET /api/seller/manifest-quota",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/merchant-review": {
      "get": {
        "summary": "GET /api/seller/merchant-review — 卖家本人最新一条(状态 + 拒绝原因 + 提交时间 + 文件名);submission_status 无记录 = none。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/seller/merchant-review — 卖家提交商户审核资料(已有未结记录 → 409 REVIEW_ALREADY_OPEN;被拒后可重新提交)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/merge-ship/candidates": {
      "get": {
        "summary": "GET /api/seller/merge-ship/candidates",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/offer-counters": {
      "get": {
        "summary": "GET /api/seller/offer-counters",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/onboarding": {
      "get": {
        "summary": "GET /api/seller/onboarding",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/opportunities": {
      "get": {
        "summary": "GET /api/seller/opportunities",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/opportunities/{id}/offer-preview": {
      "get": {
        "summary": "GET /api/seller/opportunities/:id/offer-preview",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/opportunities/bindings": {
      "post": {
        "summary": "POST /api/seller/opportunities/bindings",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/opportunities/changes": {
      "get": {
        "summary": "GET /api/seller/opportunities/changes",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/opportunities/responses": {
      "get": {
        "summary": "GET /api/seller/opportunities/responses",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/seller/opportunities/responses",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/opportunities/responses/{id}": {
      "get": {
        "summary": "GET /api/seller/opportunities/responses/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/opportunities/responses/{id}/floor": {
      "patch": {
        "summary": "PATCH /api/seller/opportunities/responses/:id/floor",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/opportunities/responses/{id}/replace": {
      "post": {
        "summary": "POST /api/seller/opportunities/responses/:id/replace",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/opportunities/responses/{id}/withdraw": {
      "post": {
        "summary": "POST /api/seller/opportunities/responses/:id/withdraw",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/opportunity-readiness": {
      "get": {
        "summary": "2026-10-23 求购闭环:卖家能不能【收到】商机通知、差哪一步(资格门 + 配送地区)。卖家工作台和商机板顶部那一行读它。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/products/payment-discount": {
      "get": {
        "summary": "GET /api/seller/products/payment-discount",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "PUT /api/seller/products/payment-discount",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/promotions": {
      "get": {
        "summary": "GET /api/seller/promotions",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/seller/promotions",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/promotions/{id}/end": {
      "post": {
        "summary": "POST /api/seller/promotions/:id/end",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/quota-status": {
      "get": {
        "summary": "配额状态",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/saved-replies": {
      "get": {
        "summary": "卖家常用语:我的列表(按我的顺序;仅持卖家角色,只看自己的)",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "新增一条常用语 {body}(≤300 字,每位卖家最多 30 条;上限在 INSERT 里判)",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/saved-replies/{id}": {
      "delete": {
        "summary": "删除自己的一条常用语",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "修改自己的一条常用语 {body}(别人的 id → 404)",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/saved-replies/{id}/move": {
      "post": {
        "summary": "常用语上移/下移 {direction: up|down},返回新顺序的列表",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/service-ratings": {
      "get": {
        "summary": "Seller's own summary — same access guard as the other /api/seller/* self reads: authenticated + holds the seller role (self only, no id parameter).",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/settings-log": {
      "get": {
        "summary": "店铺设置变更记录(只读,仅本人):谁在什么时候把哪项从什么改成什么、来自 pwa/agent/api。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/share-link": {
      "post": {
        "summary": "POST /api/seller/share-link",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/shipping-settings": {
      "get": {
        "summary": "卖家读自己的店铺级设置(设置 UI 回显):接单模式 + 运费模板 + 询价开关。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/shipping-template": {
      "post": {
        "summary": "POST /api/seller/shipping-template",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/shipping-templates": {
      "get": {
        "summary": "卖家：运费模板库（每条带 products_using 引用数与 is_store_default）",
        "tags": [
          "shipping"
        ],
        "security": []
      },
      "post": {
        "summary": "卖家：新建具名运费模板（entries 与 preset 二选一）",
        "tags": [
          "shipping"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "trim 后 1-30 字；同店铺（未删除的）不得重名，否则 409 TEMPLATE_NAME_TAKEN"
                  },
                  "entries": {
                    "type": "array",
                    "maxItems": 50,
                    "description": "[{region, fee, est_days?}]；region 接受地区码、别名（singapore/新加坡→SG）或 '*' 通配",
                    "items": {
                      "type": "object",
                      "required": [
                        "region",
                        "fee"
                      ],
                      "properties": {
                        "region": {
                          "type": "string",
                          "maxLength": 16
                        },
                        "fee": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1000000
                        },
                        "est_days": {
                          "type": "string",
                          "maxLength": 20
                        }
                      }
                    }
                  },
                  "preset": {
                    "description": "预设名或 {kind, fee?, est_days?}；条目由服务端生成。kind ∈ all_free | sg_only_free | sg_only_fee | sg_free_sea_fee（后两者必须给 fee）",
                    "type": [
                      "string",
                      "object"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/seller/shipping-templates/{id}": {
      "delete": {
        "summary": "卖家：软删模板；被商品引用或身为店铺默认 → 409 TEMPLATE_IN_USE {products_using, is_store_default}",
        "tags": [
          "shipping"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "put": {
        "summary": "卖家：改模板名 / 改条目（立即对所有引用它的商品生效）",
        "tags": [
          "shipping"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30
                  },
                  "entries": {
                    "type": "array",
                    "maxItems": 50,
                    "items": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/seller/shipping-templates/{id}/set-store-default": {
      "post": {
        "summary": "卖家：把模板设为店铺默认（legacy store_shipping_template JSON 原样保留；id 在生效链上更优先）",
        "tags": [
          "shipping"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/shipping-templates/assign": {
      "post": {
        "summary": "卖家：批量把模板套到商品上（归属整批先查后写；template_id=null 即跟随店铺默认）",
        "tags": [
          "shipping"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_ids",
                  "template_id"
                ],
                "properties": {
                  "product_ids": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 200,
                    "items": {
                      "type": "string"
                    },
                    "description": "必须全部属于本人，否则整批 403 NOT_PRODUCT_OWNER 且一次写都不发生"
                  },
                  "template_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "模板 id；null = 清除单品引用、跟随店铺默认（不清该商品的 legacy JSON，逐条回报 legacy_custom_present）"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/seller/shipping-templates/coverage": {
      "get": {
        "summary": "取数与判定在 src/shipping-coverage.ts(开店清单 / 提醒 / agent 整改清单同源)。",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/shipping-templates/fix-coverage": {
      "post": {
        "summary": "set_store_default:把店铺默认设成 template_id;只覆盖「没设」和「店铺旧版」的商品,自带旧版 JSON 的不在内(not_covered_by_this_action)。",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/shipping-templates/from-legacy": {
      "post": {
        "summary": "卖家：把旧的 JSON 运费模板转成具名模板并套用（拷贝；JSON 原样留在原处）",
        "tags": [
          "shipping"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "scope"
                ],
                "properties": {
                  "scope": {
                    "type": "string",
                    "enum": [
                      "store",
                      "product"
                    ]
                  },
                  "product_id": {
                    "type": "string",
                    "description": "scope=product 时必填；必须是自己的商品"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 30,
                    "description": "不给则按来源生成默认名"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/seller/store-status": {
      "post": {
        "summary": "POST /api/seller/store-status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/supply-agents": {
      "get": {
        "summary": "GET /api/seller/supply-agents",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/supply-agents/{agentRef}": {
      "put": {
        "summary": "PUT /api/seller/supply-agents/:agentRef",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "agentRef",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-agents/{agentRef}/activate": {
      "post": {
        "summary": "POST /api/seller/supply-agents/:agentRef/activate",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "agentRef",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-agents/{agentRef}/decisions": {
      "get": {
        "summary": "GET /api/seller/supply-agents/:agentRef/decisions",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "agentRef",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-agents/{agentRef}/pause": {
      "post": {
        "summary": "POST /api/seller/supply-agents/:agentRef/pause",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "agentRef",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-agents/{agentRef}/tasks/{taskId}/confirm": {
      "post": {
        "summary": "POST /api/seller/supply-agents/:agentRef/tasks/:taskId/confirm",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "agentRef",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-capabilities": {
      "get": {
        "summary": "GET /api/seller/supply-capabilities",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/seller/supply-capabilities",
        "tags": [],
        "security": []
      }
    },
    "/api/seller/supply-capabilities/{id}": {
      "delete": {
        "summary": "DELETE /api/seller/supply-capabilities/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "PATCH /api/seller/supply-capabilities/:id",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-capabilities/{id}/activate": {
      "post": {
        "summary": "POST /api/seller/supply-capabilities/:id/activate",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-capabilities/{id}/pause": {
      "post": {
        "summary": "POST /api/seller/supply-capabilities/:id/pause",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/supply-capabilities/{id}/renew": {
      "post": {
        "summary": "POST /api/seller/supply-capabilities/:id/renew",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/seller/usdc-escrow/payment-discount": {
      "get": {
        "summary": "GET /api/seller/usdc-escrow/payment-discount",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "summary": "PUT /api/seller/usdc-escrow/payment-discount",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/variant-health": {
      "get": {
        "summary": "没有任何办法看到自己哪些商品不干净。守卫拦的是新写入,这里看的是已经躺在库里的。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/seller/withdraw-quota-application": {
      "post": {
        "summary": "POST /api/seller/withdraw-quota-application",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/{seller_id}/game-currency-metrics": {
      "get": {
        "summary": "GET /api/sellers/:seller_id/game-currency-metrics",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "seller_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/sellers/{seller_id}/ratings": {
      "get": {
        "summary": "公开：卖家评价聚合（卖家主页）。注册在 /me 之后(见上面注释)。",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "seller_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/sellers/{sellerId}/fulfillment": {
      "get": {
        "summary": "GET /api/sellers/:sellerId/fulfillment",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "sellerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/sellers/me/analytics": {
      "get": {
        "summary": "卖家销售分析 (Wave C-5)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/direct-pay-report": {
      "get": {
        "summary": "区间换算成 [本地 from 0 点, 本地 to+1 天 0 点) 的 UTC 瞬间,用 datetime() 比较(两种存储形态都归一)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/flash-sales": {
      "get": {
        "summary": "seller 自己的 flash sales（全部状态）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/ratings": {
      "get": {
        "summary": "⚠️ 必须注册在 /api/sellers/:seller_id/ratings 【之前】,否则 'me' 会被 :seller_id 参数路由抢匹配。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/reconciliation": {
      "get": {
        "summary": "GET /api/sellers/me/reconciliation",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/reconciliation/alerts": {
      "get": {
        "summary": "三期:有对不上的账时提醒我(默认开)。GET → { enabled };POST { enabled: boolean } → { enabled }。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/sellers/me/reconciliation/alerts",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/reconciliation/confirm-received": {
      "post": {
        "summary": "POST /api/sellers/me/reconciliation/confirm-received",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/sellers/me/return-stats": {
      "get": {
        "summary": "卖家退货仪表盘",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/share-link": {
      "get": {
        "summary": "pre-public 去左右码:不再接受/返回 side,放置侧别由注册时系统自动决定。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/shareables": {
      "post": {
        "summary": "创建笔记/外链 shareable（kind=note 时需 photo_hashes）",
        "tags": [
          "share"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "related_product_id"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "external",
                      "native_text",
                      "note"
                    ],
                    "default": "external"
                  },
                  "related_product_id": {
                    "type": "string"
                  },
                  "related_order_id": {
                    "type": "string",
                    "description": "kind=note 必填，必须是 me 的 completed 订单"
                  },
                  "related_anchor": {
                    "type": "string",
                    "description": "口令 @handle+middle"
                  },
                  "title": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "external_url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "native_text": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "photo_hashes": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "kind=note 时必填，1-9 张图 sha256"
                  },
                  "parent_id": {
                    "type": "string",
                    "description": "转发原笔记 ID"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array"
                    },
                    "mentions": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shareables/{id}": {
      "delete": {
        "summary": "DELETE /api/shareables/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "get": {
        "summary": "笔记/外链详情（含 tags / owner_id / 关联商品）",
        "tags": [
          "share"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "body": {
                      "type": "string"
                    },
                    "photo_hashes": {
                      "type": "array"
                    },
                    "owner_id": {
                      "type": "string"
                    },
                    "owner_code": {
                      "type": "string"
                    },
                    "tags": {
                      "type": "array"
                    },
                    "product": {
                      "type": "object"
                    },
                    "stats": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "summary": "PATCH /api/shareables/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/{id}/bookmark": {
      "post": {
        "summary": "切换收藏（toggle 模式，无单独 DELETE endpoint）",
        "tags": [
          "share"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bookmarked": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shareables/{id}/bookmark-status": {
      "get": {
        "summary": "查 bookmark 状态",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/{id}/click": {
      "post": {
        "summary": "POST /api/shareables/:id/click",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/{id}/comments": {
      "get": {
        "summary": "W6 笔记评论 — 楼中楼 1 层（root + replies）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/shareables/:id/comments",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/{id}/like": {
      "post": {
        "summary": "LIKE 系统：toggle 点赞（每用户对每 shareable 一票；不能给自己点）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/{id}/like-status": {
      "get": {
        "summary": "查询单个 shareable 我是否点赞过（用于 UI 状态）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/by-anchor/{anchor}": {
      "get": {
        "summary": "GET /api/shareables/by-anchor/:anchor",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "anchor",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/by-product/{pid}": {
      "get": {
        "summary": "策展引用：按 click*1 + like*3 + induced_orders*10 加权排序，取 top 10",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "pid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shareables/me": {
      "get": {
        "summary": "GET /api/shareables/me",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/shares/dashboard": {
      "get": {
        "summary": "分享中心 — 我买过的（每订单一行）+ 我的创作 + 团队",
        "tags": [
          "share"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "bought_products": {
                      "type": "array"
                    },
                    "my_creations": {
                      "type": "array"
                    },
                    "high_commission": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/shipments/{id}/action": {
      "post": {
        "summary": "POST /api/shipments/:id/action",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shipments/{id}/confirm": {
      "get": {
        "summary": "GET /api/shipments/:id/confirm",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "POST /api/shipments/:id/confirm",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shipments/{id}/tracking": {
      "post": {
        "summary": "POST /api/shipments/:id/tracking",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shipments/confirm-batch": {
      "get": {
        "summary": "批量确认收货(2026-10-27):跨包裹 / 跨订单,一次 Passkey;全有全无(src/confirm-receipt-batch.ts)",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/shipments/confirm-batch",
        "tags": [],
        "security": []
      }
    },
    "/api/shop-referral/touch": {
      "post": {
        "summary": "POST /api/shop-referral/touch",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/shops/{identifier}": {
      "get": {
        "summary": "GET /api/shops/:identifier",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/shops/me": {
      "patch": {
        "summary": "卖家更新自己店铺装饰。PR-1(2026-09-10):走 setSellerSettings —— 闭合字段、变更记录、一条合并通知;此前裸 UPDATE 无痕。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/signaling/poll": {
      "get": {
        "summary": "GET /api/signaling/poll",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/signaling/send": {
      "post": {
        "summary": "POST /api/signaling/send",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/skill-market": {
      "get": {
        "summary": "─── 公开列表 ───────────────────────────────────────────────",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "─── 发布（任意登录用户）────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/skill-market/{id}": {
      "get": {
        "summary": "─── 公开详情 ───────────────────────────────────────────────",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "─── 修改 ───────────────────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skill-market/{id}/delist": {
      "post": {
        "summary": "─── 下架 ───────────────────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skill-market/{id}/purchase": {
      "post": {
        "summary": "─── 购买 / 解锁（free | one_time）──────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skill-market/{id}/read": {
      "post": {
        "summary": "─── 读取正文（per_use 按次扣费）────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skill-market/{id}/resubmit": {
      "post": {
        "summary": "─── 重新提交审核 ───────────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skill-market/library": {
      "get": {
        "summary": "─── 我的技能库 ─────────────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/skill-market/mine": {
      "get": {
        "summary": "─── 我发布的（须在 /:id 之前注册）───────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/skills": {
      "get": {
        "summary": "公开浏览",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "发布",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/skills/{id}": {
      "patch": {
        "summary": "卖家：修改 Skill",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skills/{id}/disable": {
      "post": {
        "summary": "卖家：停用",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skills/{id}/subscribe": {
      "delete": {
        "summary": "取消订阅",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "订阅",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/skills/mine": {
      "get": {
        "summary": "GET /api/skills/mine",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/skills/subscriptions": {
      "get": {
        "summary": "GET /api/skills/subscriptions",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/{id}/verify": {
      "get": {
        "summary": "验签（仅当事人或 arbitrator/admin）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/snf/ack": {
      "post": {
        "summary": "显式 ack（无 ids → ack 全部未读）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/dead-letter": {
      "get": {
        "summary": "GET /api/snf/dead-letter",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/designate": {
      "get": {
        "summary": "GET /api/snf/designate",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/snf/designate",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/inbox": {
      "get": {
        "summary": "只读列表（不消费）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/inbox/pull": {
      "get": {
        "summary": "协议级 pull — 一次性消费，agent / 内部组件用",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/nack": {
      "post": {
        "summary": "Agent 处理失败 → nack 回放（超 5 次自动死信化）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/pending": {
      "get": {
        "summary": "GET /api/snf/pending",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/snf/revive/{id}": {
      "post": {
        "summary": "POST /api/snf/revive/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/snf/send": {
      "post": {
        "summary": "POST /api/snf/send",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/system-flags": {
      "get": {
        "summary": "GET /api/system-flags",
        "tags": [],
        "security": []
      }
    },
    "/api/tags/{tag}/notes": {
      "get": {
        "summary": "话题/标签下笔记列表（公开）",
        "tags": [
          "share"
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 30
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 30,
              "maximum": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/tags/trending": {
      "get": {
        "summary": "热门标签：24h + 总数综合排序",
        "tags": [],
        "security": []
      }
    },
    "/api/task-service/purchase-requests": {
      "post": {
        "summary": "POST /api/task-service/purchase-requests",
        "tags": [],
        "security": []
      }
    },
    "/api/task-service/quote": {
      "post": {
        "summary": "POST /api/task-service/quote",
        "tags": [],
        "security": []
      }
    },
    "/api/tasks/{key}/claim": {
      "post": {
        "summary": "POST /api/tasks/:key/claim",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/tokenomics/status": {
      "get": {
        "summary": "GET /api/tokenomics/status",
        "tags": [],
        "security": []
      }
    },
    "/api/trial-campaigns/{campaign_id}/claims": {
      "get": {
        "summary": "卖家：查看某活动的 claims 详情",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "campaign_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/trial-claims/{claim_id}/link-note": {
      "post": {
        "summary": "买家关联笔记",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "claim_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/usdc-escrow/availability": {
      "get": {
        "summary": "卖家合规细节脱敏:payout/KYB/制裁一律收敛为 USDC_ESCROW_SELLER_NOT_READY(镜像 create 的对外码)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/usdc-escrow/payout-addresses": {
      "get": {
        "summary": "GET /api/usdc-escrow/payout-addresses",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/usdc-escrow/payout-addresses",
        "tags": [],
        "security": []
      }
    },
    "/api/usdc-escrow/payout-addresses/{id}/retire": {
      "post": {
        "summary": "POST /api/usdc-escrow/payout-addresses/:id/retire",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/usdc-escrow/payout-addresses/cancel-change": {
      "get": {
        "summary": "撤销即冻结:有人认为这次变更不是本人做的,回到原状是不够的。",
        "tags": [],
        "security": []
      }
    },
    "/api/usdc-escrow/payout-addresses/cancel-pending": {
      "post": {
        "summary": "🔐 Passkey(usdc_payout_address_manage)· 取消待生效的收款地址变更(与邮件撤销链接同一后端;旧地址照常收款,不冻结,24 小时内不能再改)",
        "tags": [],
        "security": []
      }
    },
    "/api/users/{id}/auctions": {
      "get": {
        "summary": "用户进行中拍卖（公开：open）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/bookmarked-shareables": {
      "get": {
        "summary": "我收藏过的 shareables（仅 owner 自己可见）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/liked-shareables": {
      "get": {
        "summary": "用户赞过的 shareables（仅 owner 可见）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/products": {
      "get": {
        "summary": "用户在售商品（公开：卖家 active 商品）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/public-card": {
      "get": {
        "summary": "公开卡（未登录可调，分享 banner 用）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/pv-summary": {
      "get": {
        "summary": "PV 简报：组织图点击节点用",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/reputation": {
      "get": {
        "summary": "公开 reputation — 仅 level",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/reviews": {
      "get": {
        "summary": "用户写的测评（公开：作为买家给出的评价）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/secondhand": {
      "get": {
        "summary": "用户在售二手（公开：available + reserved）",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{id}/shareables": {
      "get": {
        "summary": "用户公开 shareables",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/users/{user_id}": {
      "get": {
        "summary": "公开用户主页 + D2 信誉徽章墙",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/verifier/appeal": {
      "post": {
        "summary": "POST /api/verifier/appeal",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verifier/apply": {
      "post": {
        "summary": "POST /api/verifier/apply",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verifier/eligibility": {
      "get": {
        "summary": "GET /api/verifier/eligibility",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verifier/me/kpi": {
      "get": {
        "summary": "Verifier KPI（白名单 tier / 配额 / 准确率 / 窗口奖励）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verifier/status": {
      "get": {
        "summary": "GET /api/verifier/status",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verifier/withdraw-application": {
      "post": {
        "summary": "POST /api/verifier/withdraw-application",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verify-price": {
      "post": {
        "summary": "下单前价格锁定 — 返回 session_token 避免决策与下单之间漂移；带 offer_id 时改为核对一张议定价(不发价格会话、不消费报价)",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "product_id"
                ],
                "properties": {
                  "product_id": {
                    "type": "string"
                  },
                  "quantity": {
                    "type": "number",
                    "description": "数量,默认 1"
                  },
                  "offer_id": {
                    "type": "string",
                    "description": "RFC-032 议定价成交:卖家开给本买家的那张报价单 id(off_…)。核对【不消费】它,也【不写入】任何 price_sessions 行 —— 一张报价单本身就是那个价格会话。响应改为 price_basis='offer' 且 session_token=null,下单时传 offer_id(不是 session_token)。单价由服务端读报价行算出 min(报价, 当下有效标价),绝不高于报价;客户端永远不能提供价格。拿着正确 id 的第三方或别人的 agent 得到 OFFER_MISMATCH。negotiated_offers_enabled=0 时传入即 404 FEATURE_DISABLED。"
                  },
                  "variant_id": {
                    "type": "string",
                    "description": "可选。不传而报价绑定了规格时,按报价绑定的那个规格核价;传了且与报价绑定的不一致 → 409 OFFER_MISMATCH(绝不替调用方改成报价说的那个)。"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_token": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "带 offer_id 时恒 null(没有价格会话可发,也没有造出一个)"
                    },
                    "price_basis": {
                      "enum": [
                        "list",
                        "offer"
                      ],
                      "description": "加性字段;不带 offer_id 时恒 'list',其余字段与本改动之前逐字节一致"
                    },
                    "verified_price": {
                      "type": "number"
                    },
                    "list_price": {
                      "type": "number",
                      "description": "仅 offer 分支:当下有效标价 —— 议定价旁边永远有它可对照"
                    },
                    "list_price_units_at_offer": {
                      "type": "integer",
                      "description": "仅 offer 分支:开价那一刻的标价(base-units)"
                    },
                    "offer_id": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "number"
                    },
                    "total": {
                      "type": "number"
                    },
                    "expires_at": {
                      "type": "string",
                      "description": "offer 分支 = 那张报价自己的期限;否则 10 分钟"
                    },
                    "expires_in_seconds": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "OFFER_MISMATCH —— 不是这张报价的当事方",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "OFFER_MISMATCH —— 不是这张报价的当事方"
                }
              }
            }
          },
          "404": {
            "description": "开关关闭时携带 offer_id(FEATURE_DISABLED);报价单不存在(OFFER_INVALID);商品或规格不存在(PRODUCT_NOT_FOUND)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "开关关闭时携带 offer_id(FEATURE_DISABLED);报价单不存在(OFFER_INVALID);商品或规格不存在(PRODUCT_NOT_FOUND)"
                }
              }
            }
          },
          "409": {
            "description": "OFFER_EXPIRED / OFFER_USED / OFFER_MISMATCH / OFFER_VOID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "OFFER_EXPIRED / OFFER_USED / OFFER_MISMATCH / OFFER_VOID"
                }
              }
            }
          }
        }
      }
    },
    "/api/verify-stats": {
      "get": {
        "summary": "GET /api/verify-stats",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verify-tasks/{id}/confirm": {
      "post": {
        "summary": "卖家确认：已在原平台添加验证码 → 任务进入分配池",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/verify-tasks/{id}/submit": {
      "post": {
        "summary": "验证者：提交验证结果（填入式）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/verify-tasks/by-product/{productId}": {
      "get": {
        "summary": "卖家：查询某商品的进行中验证任务（供编辑页展示验证码）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/verify-tasks/mine": {
      "get": {
        "summary": "GET /api/verify-tasks/mine",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verify-tasks/my-claims": {
      "get": {
        "summary": "卖家：查询我发起的所有认领任务（用于\"查看任务进度\"页）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/verify-tasks/open": {
      "get": {
        "summary": "公开验证大厅 — 仅显示分配给我的未提交任务",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/visit": {
      "post": {
        "summary": "POST /api/visit",
        "tags": [],
        "security": []
      }
    },
    "/api/waitlist": {
      "get": {
        "summary": "GET /api/waitlist",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet": {
      "get": {
        "summary": "钱包状态",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/connect/challenge": {
      "post": {
        "summary": "POST /api/wallet/connect/challenge",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/connect/verify": {
      "post": {
        "summary": "POST /api/wallet/connect/verify",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/deposit-qr": {
      "get": {
        "summary": "历史 deposit_address 仍在 DB(人工对账用),但绝不再渲染成可扫码的收款入口。",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/deposits": {
      "get": {
        "summary": "未确认行永远不会被自动确认,如实标 'unconfirmed_retired'(人工对账才可能变更),绝不再宣称 'pending/确认中'。",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/income": {
      "get": {
        "summary": "收入构成:销售 / 分享归因 / PV 记录(若适用)",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/rate": {
      "get": {
        "summary": "公开汇率",
        "tags": [
          "wallet"
        ],
        "security": []
      }
    },
    "/api/wallet/topup": {
      "post": {
        "summary": "POST /api/wallet/topup",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/whitelist": {
      "get": {
        "summary": "白名单 GET / POST / DELETE",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST /api/wallet/whitelist",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/whitelist/{id}": {
      "delete": {
        "summary": "DELETE /api/wallet/whitelist/:id",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wallet/withdraw": {
      "post": {
        "summary": "提现申请（含 KYC 双维度 + WebAuthn gate + 白名单 24h 冷却）",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {
            "webauthnToken": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "to_address",
                  "amount"
                ],
                "properties": {
                  "to_address": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "amount": {
                    "type": "number",
                    "minimum": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "withdrawal_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "error_code": {
                      "enum": [
                        "KYC_REQUIRED_FOR_WITHDRAW",
                        "TRUSTED_ROLE_NO_WALLET",
                        "WEBAUTHN_REQUIRED"
                      ]
                    },
                    "trigger": {
                      "enum": [
                        "single",
                        "daily_cumulative"
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/wallet/withdraw/{id}/confirm": {
      "post": {
        "summary": "大额提现：邮件验证码确认",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wallet/withdrawals": {
      "get": {
        "summary": "我的提现记录",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wallet/withdrawals/{id}/cancel": {
      "post": {
        "summary": "用户取消尚未 approve 的 withdrawal — 余额自动退回",
        "tags": [
          "wallet"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/webauthn/auth/finish": {
      "post": {
        "summary": "4. 认证：finish — 验证签名 + 颁发短 gate token",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/auth/start": {
      "post": {
        "summary": "3. 认证：start — 生成 challenge（指定 purpose + 业务数据；同一 challenge 不可复用）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/credentials": {
      "get": {
        "summary": "列出 / 删除 credential",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/credentials/{id}": {
      "delete": {
        "summary": "DELETE /api/webauthn/credentials/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/webauthn/fund-devices": {
      "get": {
        "summary": "── 资金设备白名单(商家分工 P4)—— 第 0 层动作只认这几台设备。策略见 src/pwa/fund-device-policy.ts ──",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/fund-devices/{id}": {
      "delete": {
        "summary": "取消指定(pending 期内撤销,或把已生效的移出白名单)。已生效的资金设备存在时,这次 gate 同样要资金设备签。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "指定为资金设备:延时生效(见策略 ③)。已有资金设备时,这次 gate 本身就要由资金设备签(自指,策略 ①)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/webauthn/login/finish": {
      "post": {
        "summary": "POST /api/webauthn/login/finish",
        "tags": [],
        "security": []
      }
    },
    "/api/webauthn/login/start": {
      "post": {
        "summary": "POST /api/webauthn/login/start",
        "tags": [],
        "security": []
      }
    },
    "/api/webauthn/passkey-reset/key-ack": {
      "post": {
        "summary": "{ choice: 'seen' }:notice = 'rotated'(重置时已换 key)的一行说明「知道了」,不改任何凭证,不要因子。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/register/email-code": {
      "post": {
        "summary": "POST /api/webauthn/register/email-code",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/register/finish": {
      "post": {
        "summary": "2. 注册：finish — 验证 + 入库",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/register/start": {
      "post": {
        "summary": "因子在 start 消费:challenge 行只有过了因子才会存在,finish 拿不到 challenge 就进不来。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webauthn/settings": {
      "post": {
        "summary": "POST /api/webauthn/settings",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webhooks": {
      "get": {
        "summary": "GET 我的订阅",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "summary": "POST 订阅",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/webhooks/{id}": {
      "delete": {
        "summary": "DELETE",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "patch": {
        "summary": "PATCH active toggle",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/webhooks/test": {
      "post": {
        "summary": "P2.4 测试端点：subscribe 前先验 endpoint 可达 + 不私网",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wishes": {
      "get": {
        "summary": "GET /api/wishes — 浏览（匿名可访问）",
        "tags": [],
        "security": []
      },
      "post": {
        "summary": "POST /api/wishes — 发布愿望",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wishes/{id}": {
      "get": {
        "summary": "GET /api/wishes/:id — 详情",
        "tags": [],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/cancel": {
      "post": {
        "summary": "POST /api/wishes/:id/cancel — 许愿人取消（仅 open 状态）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/confirm": {
      "post": {
        "summary": "POST /api/wishes/:id/confirm — 许愿人确认",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/disclose": {
      "post": {
        "summary": "POST /api/wishes/:id/disclose — 申请公开（双方同意才公开）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/fulfill": {
      "post": {
        "summary": "/claim 让 fraud-claim 独占（与 secondhand/auctions 三垂类对称）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/proof": {
      "post": {
        "summary": "POST /api/wishes/:id/proof — 提交证据",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/repay": {
      "post": {
        "summary": "还愿：许愿人发起",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/repay/{rid}/respond": {
      "post": {
        "summary": "施善人响应还愿（accept / decline_to_fund）",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rid",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishes/{id}/report": {
      "post": {
        "summary": "P2.3 — 举报愿望",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishlist": {
      "get": {
        "summary": "GET /api/wishlist",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/wishlist/{product_id}": {
      "delete": {
        "summary": "DELETE /api/wishlist/:product_id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      },
      "post": {
        "summary": "─── Wave A-1: 心愿单 ────────────────────────────────────",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/wishlist/{product_id}/check": {
      "get": {
        "summary": "GET /api/wishlist/:product_id/check",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "product_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/worldid/face/recover": {
      "post": {
        "summary": "刷脸找回:只能设新密码;轮换 api_key + 吊销全部会话(与一键全登出同口径);绝不动 Passkey;返回新会话以便立即登录",
        "tags": [],
        "security": []
      }
    },
    "/api/worldid/face/session": {
      "post": {
        "summary": "刷脸票据 → 登录(与密码登录同权)或 15 分钟的找回票",
        "tags": [],
        "security": []
      }
    },
    "/api/worldid/face/start": {
      "post": {
        "summary": "刷脸登录 / 找回(无需登录):按 /api/login 同一规则找账号;未开启或不存在 → 同一个 404(名字在 WebAZ 本就公开)",
        "tags": [],
        "security": []
      }
    },
    "/api/worldid/flow/{id}": {
      "get": {
        "summary": "GET /api/worldid/flow/:id",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/worldid/link/confirm": {
      "post": {
        "summary": "已登录账号绑定 World ID(因子按档位;票据在成功前不消费,补因子重试仍可用)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/worldid/merge-into": {
      "post": {
        "summary": "X 的查找与 POST /api/login 同一规则(handle 或精确名称、未删、非系统账号);密码错走登录的失败计数 / 锁定(同一 helper)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/worldid/merge/confirm": {
      "post": {
        "summary": "(2026-10-01 起一次性证明让这条路基本走不到 —— 已登录 X 无法再证明一次;保留无害。现实入口见下方 merge-into。)",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/worldid/session": {
      "post": {
        "summary": "票据 → 会话(api_key 只在 POST 响应体里出现,绝不进 URL/日志)—— 照 /api/oidc/session",
        "tags": [],
        "security": []
      }
    },
    "/api/worldid/session/enroll/start": {
      "post": {
        "summary": "已有会话 → 409,除非 replace:true + 账号因子(purpose world_id_session_reset)。",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/worldid/signup-info": {
      "post": {
        "summary": "注册票据预览(不消费)。PWA 本地存着的「未完成注册」也靠它判断还能不能续。",
        "tags": [],
        "security": []
      }
    },
    "/api/worldid/start": {
      "post": {
        "summary": "POST /api/worldid/start",
        "tags": [],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/api/x402/order-requests/{id}": {
      "get": {
        "summary": "GET /api/x402/order-requests/:id",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/x402/order-requests/{id}/execute": {
      "post": {
        "summary": "POST /api/x402/order-requests/:id/execute",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/x402/order-requests/{id}/prepare": {
      "post": {
        "summary": "POST /api/x402/order-requests/:id/prepare",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/api/x402/order-requests/{id}/signing-instructions": {
      "post": {
        "summary": "POST /api/x402/order-requests/:id/signing-instructions",
        "tags": [
          "order"
        ],
        "security": [],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  }
}
