diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b84ab4..1c538c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,6 +44,9 @@ jobs: - name: 检查架构依赖 run: go run ./tools/architecturecheck + - name: 检查 OpenAPI 路由与规范 + run: go run ./tools/apicheck + - name: 运行 go vet run: go vet ./... @@ -82,6 +85,9 @@ jobs: - name: 检查 TypeScript 类型 run: npm run typecheck --prefix frontend + - name: 检查 OpenAPI 生成产物 + run: npm run api:check --prefix frontend + - name: 运行前端测试 run: npm test --prefix frontend diff --git a/Makefile b/Makefile index 983aeb2..afc6c22 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ GO ?= go GOLANGCI_LINT ?= golangci-lint -.PHONY: build build-int build-browser-install build-tray test test-server test-server-race test-multidb test-int vet lint architecture cover cover-browser cover-frontend tidy frontend fmt comments check +.PHONY: build build-int build-browser-install build-tray test test-server test-server-race test-multidb test-int vet lint architecture api-generate api-check cover cover-browser cover-frontend tidy frontend fmt comments check ## build: 编译 server(默认,跳过 integration build tag) build: @@ -55,6 +55,16 @@ lint: architecture: $(GO) run ./tools/architecturecheck +## api-generate: 从 OpenAPI 唯一契约源生成只读 TypeScript transport 类型 +api-generate: + npm run api:generate --prefix frontend + +## api-check: 校验 OpenAPI 规范、版本化路由登记和生成 TypeScript 产物漂移 +api-check: + npm run api:check --prefix frontend + $(GO) run ./tools/apicheck + $(GO) test ./internal/server -run '^TestOpenAPIRoutesMatchRouter$$' -count=1 + ## cover: 生成覆盖率报告 cover: $(GO) test -coverprofile=cover.out ./... && $(GO) tool cover -func=cover.out | tail -1 @@ -85,4 +95,4 @@ comments: node frontend/scripts/check-comments.mjs --mode check --root frontend ## check: 本地提交前全套检查(fmt + vet + lint + test) -check: fmt architecture vet lint test comments +check: fmt architecture api-check vet lint test comments diff --git a/api/openapi.yaml b/api/openapi.yaml new file mode 100644 index 0000000..bc134a6 --- /dev/null +++ b/api/openapi.yaml @@ -0,0 +1,6590 @@ +openapi: 3.1.0 +info: + title: Ydisks 闲鱼助手 API + version: 1.0.0 + description: 版本化 HTTP API 的唯一契约源。 +servers: + - url: / +paths: + "/api/v1/account-tasks/{cid}": + get: + operationId: getApiV1AccountTasksBycid + summary: getApiV1AccountTasksBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1AccountTasksBycid + summary: putApiV1AccountTasksBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/account-tasks/{cid}/run": + post: + operationId: postApiV1AccountTasksBycidRun + summary: postApiV1AccountTasksBycidRun + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/account-tasks/{cid}/runs": + get: + operationId: getApiV1AccountTasksBycidRuns + summary: getApiV1AccountTasksBycidRuns + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts": + get: + operationId: getApiV1Accounts + summary: getApiV1Accounts + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/AccountIDList' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1Accounts + summary: postApiV1Accounts + security: [{cookieAuth: []}] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountCreateRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/AccountMutationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}": + delete: + operationId: deleteApiV1AccountsBycid + summary: deleteApiV1AccountsBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/OperationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1AccountsBycid + summary: getApiV1AccountsBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetailResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1AccountsBycid + summary: putApiV1AccountsBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountUpdateRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/OperationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/auto-confirm": + get: + operationId: getApiV1AccountsBycidAutoConfirm + summary: getApiV1AccountsBycidAutoConfirm + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1AccountsBycidAutoConfirm + summary: putApiV1AccountsBycidAutoConfirm + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/login-info": + put: + operationId: putApiV1AccountsBycidLoginInfo + summary: putApiV1AccountsBycidLoginInfo + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/long-login": + get: + operationId: getApiV1AccountsBycidLongLogin + summary: getApiV1AccountsBycidLongLogin + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1AccountsBycidLongLogin + summary: putApiV1AccountsBycidLongLogin + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/pause-duration": + get: + operationId: getApiV1AccountsBycidPauseDuration + summary: getApiV1AccountsBycidPauseDuration + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1AccountsBycidPauseDuration + summary: putApiV1AccountsBycidPauseDuration + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/refresh-profile": + post: + operationId: postApiV1AccountsBycidRefreshProfile + summary: postApiV1AccountsBycidRefreshProfile + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/remark": + put: + operationId: putApiV1AccountsBycidRemark + summary: putApiV1AccountsBycidRemark + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/settings": + put: + operationId: putApiV1AccountsBycidSettings + summary: putApiV1AccountsBycidSettings + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/{cid}/status": + put: + operationId: putApiV1AccountsBycidStatus + summary: putApiV1AccountsBycidStatus + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AccountStatusRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/OperationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/details": + get: + operationId: getApiV1AccountsDetails + summary: getApiV1AccountsDetails + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/AccountDetailList' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/accounts/runtime-status": + get: + operationId: getApiV1AccountsRuntimeStatus + summary: getApiV1AccountsRuntimeStatus + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/cookies": + get: + operationId: getApiV1AdminCookies + summary: getApiV1AdminCookies + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/notifications/outbox/uncertain": + get: + operationId: getApiV1AdminNotificationsOutboxUncertain + summary: getApiV1AdminNotificationsOutboxUncertain + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/password": + post: + operationId: postApiV1AdminPassword + summary: postApiV1AdminPassword + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/stats": + get: + operationId: getApiV1AdminStats + summary: getApiV1AdminStats + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/tasks": + get: + operationId: getApiV1AdminTasks + summary: getApiV1AdminTasks + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/users": + get: + operationId: getApiV1AdminUsers + summary: getApiV1AdminUsers + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/admin/users/{user_id}": + delete: + operationId: deleteApiV1AdminUsersByuser_id + summary: deleteApiV1AdminUsersByuser_id + parameters: + - name: user_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/analytics/dashboard": + get: + operationId: getApiV1AnalyticsDashboard + summary: getApiV1AnalyticsDashboard + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/analytics/orders": + get: + operationId: getApiV1AnalyticsOrders + summary: getApiV1AnalyticsOrders + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/analytics/orders/valid": + get: + operationId: getApiV1AnalyticsOrdersValid + summary: getApiV1AnalyticsOrdersValid + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/automation-issues": + get: + operationId: getApiV1AutomationIssues + summary: getApiV1AutomationIssues + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/automation-pending-tasks/{task_id}/resolve": + post: + operationId: postApiV1AutomationPendingTasksBytask_idResolve + summary: postApiV1AutomationPendingTasksBytask_idResolve + parameters: + - name: task_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/automation-rules": + get: + operationId: getApiV1AutomationRules + summary: getApiV1AutomationRules + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1AutomationRules + summary: postApiV1AutomationRules + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/automation-rules/{rule_id}": + delete: + operationId: deleteApiV1AutomationRulesByrule_id + summary: deleteApiV1AutomationRulesByrule_id + parameters: + - name: rule_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1AutomationRulesByrule_id + summary: putApiV1AutomationRulesByrule_id + parameters: + - name: rule_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/automation-runs/{run_id}/resolve": + post: + operationId: postApiV1AutomationRunsByrun_idResolve + summary: postApiV1AutomationRunsByrun_idResolve + parameters: + - name: run_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/cards": + get: + operationId: getApiV1Cards + summary: getApiV1Cards + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1Cards + summary: postApiV1Cards + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/cards/{card_id}": + delete: + operationId: deleteApiV1CardsBycard_id + summary: deleteApiV1CardsBycard_id + parameters: + - name: card_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1CardsBycard_id + summary: getApiV1CardsBycard_id + parameters: + - name: card_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1CardsBycard_id + summary: putApiV1CardsBycard_id + parameters: + - name: card_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/cards/{card_id}/append-data": + post: + operationId: postApiV1CardsBycard_idAppendData + summary: postApiV1CardsBycard_idAppendData + parameters: + - name: card_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/cards/{card_id}/details": + get: + operationId: getApiV1CardsBycard_idDetails + summary: getApiV1CardsBycard_idDetails + parameters: + - name: card_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/cards/batch": + post: + operationId: postApiV1CardsBatch + summary: postApiV1CardsBatch + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/chat/images": + post: + operationId: postApiV1ChatImages + summary: postApiV1ChatImages + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/chat/messages": + get: + operationId: getApiV1ChatMessages + summary: getApiV1ChatMessages + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1ChatMessages + summary: postApiV1ChatMessages + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/chat/read": + post: + operationId: postApiV1ChatRead + summary: postApiV1ChatRead + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/chat/sessions": + get: + operationId: getApiV1ChatSessions + summary: getApiV1ChatSessions + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/chat/ws": + get: + operationId: getApiV1ChatWs + summary: getApiV1ChatWs + security: [{cookieAuth: []}] + responses: + '101': + description: WebSocket 握手成功 + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/default-replies": + get: + operationId: getApiV1DefaultReplies + summary: getApiV1DefaultReplies + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/default-replies/{cid}": + delete: + operationId: deleteApiV1DefaultRepliesBycid + summary: deleteApiV1DefaultRepliesBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1DefaultRepliesBycid + summary: getApiV1DefaultRepliesBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1DefaultRepliesBycid + summary: putApiV1DefaultRepliesBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/default-replies/{cid}/clear-records": + post: + operationId: postApiV1DefaultRepliesBycidClearRecords + summary: postApiV1DefaultRepliesBycidClearRecords + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/default-replies/list": + get: + operationId: getApiV1DefaultRepliesList + summary: getApiV1DefaultRepliesList + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items": + get: + operationId: getApiV1Items + summary: getApiV1Items + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/{cookie_id}": + post: + operationId: postApiV1ItemsBycookie_id + summary: postApiV1ItemsBycookie_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/{cookie_id}/{item_id}": + delete: + operationId: deleteApiV1ItemsBycookie_idByitem_id + summary: deleteApiV1ItemsBycookie_idByitem_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1ItemsBycookie_idByitem_id + summary: getApiV1ItemsBycookie_idByitem_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1ItemsBycookie_idByitem_id + summary: putApiV1ItemsBycookie_idByitem_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/{cookie_id}/{item_id}/multi-quantity-delivery": + put: + operationId: putApiV1ItemsBycookie_idByitem_idMultiQuantityDelivery + summary: putApiV1ItemsBycookie_idByitem_idMultiQuantityDelivery + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/{cookie_id}/{item_id}/multi-spec": + put: + operationId: putApiV1ItemsBycookie_idByitem_idMultiSpec + summary: putApiV1ItemsBycookie_idByitem_idMultiSpec + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/cookie/{cookie_id}": + get: + operationId: getApiV1ItemsCookieBycookie_id + summary: getApiV1ItemsCookieBycookie_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/get-all-from-account": + post: + operationId: postApiV1ItemsGetAllFromAccount + summary: postApiV1ItemsGetAllFromAccount + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/get-by-page": + post: + operationId: postApiV1ItemsGetByPage + summary: postApiV1ItemsGetByPage + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish": + post: + operationId: postApiV1ItemsPublish + summary: postApiV1ItemsPublish + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-batches": + get: + operationId: getApiV1ItemsPublishBatches + summary: getApiV1ItemsPublishBatches + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1ItemsPublishBatches + summary: postApiV1ItemsPublishBatches + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-batches/{batch_id}": + delete: + operationId: deleteApiV1ItemsPublishBatchesBybatch_id + summary: deleteApiV1ItemsPublishBatchesBybatch_id + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1ItemsPublishBatchesBybatch_id + summary: getApiV1ItemsPublishBatchesBybatch_id + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-batches/{batch_id}/cancel": + post: + operationId: postApiV1ItemsPublishBatchesBybatch_idCancel + summary: postApiV1ItemsPublishBatchesBybatch_idCancel + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-batches/{batch_id}/result.csv": + get: + operationId: getApiV1ItemsPublishBatchesBybatch_idResultCsv + summary: getApiV1ItemsPublishBatchesBybatch_idResultCsv + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: CSV 文件 + content: + text/csv: + schema: + type: string + format: binary + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-batches/{batch_id}/retry-failed": + post: + operationId: postApiV1ItemsPublishBatchesBybatch_idRetryFailed + summary: postApiV1ItemsPublishBatchesBybatch_idRetryFailed + parameters: + - name: batch_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-batches/preview": + post: + operationId: postApiV1ItemsPublishBatchesPreview + summary: postApiV1ItemsPublishBatchesPreview + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/items/publish-categories/recommend": + post: + operationId: postApiV1ItemsPublishCategoriesRecommend + summary: postApiV1ItemsPublishCategoriesRecommend + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/accounts/{cid}/bindings": + get: + operationId: getApiV1NotificationsAccountsBycidBindings + summary: getApiV1NotificationsAccountsBycidBindings + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1NotificationsAccountsBycidBindings + summary: postApiV1NotificationsAccountsBycidBindings + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/channels": + get: + operationId: getApiV1NotificationsChannels + summary: getApiV1NotificationsChannels + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1NotificationsChannels + summary: postApiV1NotificationsChannels + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/channels/{channel_id}": + delete: + operationId: deleteApiV1NotificationsChannelsBychannel_id + summary: deleteApiV1NotificationsChannelsBychannel_id + parameters: + - name: channel_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1NotificationsChannelsBychannel_id + summary: putApiV1NotificationsChannelsBychannel_id + parameters: + - name: channel_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/channels/{channel_id}/test": + post: + operationId: postApiV1NotificationsChannelsBychannel_idTest + summary: postApiV1NotificationsChannelsBychannel_idTest + parameters: + - name: channel_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/messages": + get: + operationId: getApiV1NotificationsMessages + summary: getApiV1NotificationsMessages + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/messages/{notification_id}": + delete: + operationId: deleteApiV1NotificationsMessagesBynotification_id + summary: deleteApiV1NotificationsMessagesBynotification_id + parameters: + - name: notification_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/messages/account/{cid}": + delete: + operationId: deleteApiV1NotificationsMessagesAccountBycid + summary: deleteApiV1NotificationsMessagesAccountBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/notifications/outbox/uncertain": + get: + operationId: getApiV1NotificationsOutboxUncertain + summary: getApiV1NotificationsOutboxUncertain + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders": + get: + operationId: getApiV1Orders + summary: getApiV1Orders + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders/{order_id}": + delete: + operationId: deleteApiV1OrdersByorder_id + summary: deleteApiV1OrdersByorder_id + parameters: + - name: order_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1OrdersByorder_id + summary: getApiV1OrdersByorder_id + parameters: + - name: order_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1OrdersByorder_id + summary: putApiV1OrdersByorder_id + parameters: + - name: order_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders/{order_id}/refresh": + post: + operationId: postApiV1OrdersByorder_idRefresh + summary: postApiV1OrdersByorder_idRefresh + parameters: + - name: order_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders/import": + post: + operationId: postApiV1OrdersImport + summary: postApiV1OrdersImport + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders/manual-ship": + post: + operationId: postApiV1OrdersManualShip + summary: postApiV1OrdersManualShip + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders/refresh": + post: + operationId: postApiV1OrdersRefresh + summary: postApiV1OrdersRefresh + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/orders/refresh/{job_id}": + delete: + operationId: deleteApiV1OrdersRefreshByjob_id + summary: deleteApiV1OrdersRefreshByjob_id + parameters: + - name: job_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1OrdersRefreshByjob_id + summary: getApiV1OrdersRefreshByjob_id + parameters: + - name: job_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/password-login": + post: + operationId: postApiV1PasswordLogin + summary: postApiV1PasswordLogin + security: [{cookieAuth: []}] + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordLoginDisabledRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '501': + description: 密码登录已永久关闭 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/password-login/cancel/{session_id}": + delete: + operationId: deleteApiV1PasswordLoginCancelBysession_id + summary: deleteApiV1PasswordLoginCancelBysession_id + parameters: + - name: session_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '501': + description: 密码登录已永久关闭 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/password-login/check/{session_id}": + get: + operationId: getApiV1PasswordLoginCheckBysession_id + summary: getApiV1PasswordLoginCheckBysession_id + parameters: + - name: session_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '501': + description: 密码登录已永久关闭 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/qr-login/check/{session_id}": + get: + operationId: getApiV1QrLoginCheckBysession_id + summary: getApiV1QrLoginCheckBysession_id + parameters: + - name: session_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/QRLoginStatusResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/qr-login/complete-verification/{session_id}": + post: + operationId: postApiV1QrLoginCompleteVerificationBysession_id + summary: postApiV1QrLoginCompleteVerificationBysession_id + parameters: + - name: session_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/QRLoginVerificationRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/QRLoginVerificationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/qr-login/generate": + post: + operationId: postApiV1QrLoginGenerate + summary: postApiV1QrLoginGenerate + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/QRLoginGenerateResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/qr-login/status/{session_id}": + get: + operationId: getApiV1QrLoginStatusBysession_id + summary: getApiV1QrLoginStatusBysession_id + parameters: + - name: session_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/QRLoginStatusResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/{cid}": + get: + operationId: getApiV1ReplyRulesBycid + summary: getApiV1ReplyRulesBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1ReplyRulesBycid + summary: postApiV1ReplyRulesBycid + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/{cid}/index/{index}": + delete: + operationId: deleteApiV1ReplyRulesBycidIndexByindex + summary: deleteApiV1ReplyRulesBycidIndexByindex + parameters: + - name: cid + in: path + required: true + schema: + type: string + - name: index + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/{cid}/items": + get: + operationId: getApiV1ReplyRulesBycidItems + summary: getApiV1ReplyRulesBycidItems + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + post: + operationId: postApiV1ReplyRulesBycidItems + summary: postApiV1ReplyRulesBycidItems + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/{cid}/typed": + get: + operationId: getApiV1ReplyRulesBycidTyped + summary: getApiV1ReplyRulesBycidTyped + parameters: + - name: cid + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/{cid}/typed/{id}": + delete: + operationId: deleteApiV1ReplyRulesBycidTypedByid + summary: deleteApiV1ReplyRulesBycidTypedByid + parameters: + - name: cid + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1ReplyRulesBycidTypedByid + summary: putApiV1ReplyRulesBycidTypedByid + parameters: + - name: cid + in: path + required: true + schema: + type: string + - name: id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/items": + get: + operationId: getApiV1ReplyRulesItems + summary: getApiV1ReplyRulesItems + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/reply-rules/items/{cookie_id}/{item_id}": + delete: + operationId: deleteApiV1ReplyRulesItemsBycookie_idByitem_id + summary: deleteApiV1ReplyRulesItemsBycookie_idByitem_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + get: + operationId: getApiV1ReplyRulesItemsBycookie_idByitem_id + summary: getApiV1ReplyRulesItemsBycookie_idByitem_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1ReplyRulesItemsBycookie_idByitem_id + summary: putApiV1ReplyRulesItemsBycookie_idByitem_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + - name: item_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/session": + get: + operationId: getApiV1Session + summary: getApiV1Session + security: [] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/SessionStatusResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/session/credentials": + put: + operationId: putApiV1SessionCredentials + summary: putApiV1SessionCredentials + security: [{cookieAuth: []}] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CredentialUpdateRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/OperationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/session/initialize": + post: + operationId: postApiV1SessionInitialize + summary: postApiV1SessionInitialize + security: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/InitializeRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/SessionResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/session/login": + post: + operationId: postApiV1SessionLogin + summary: postApiV1SessionLogin + security: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/LoginRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/SessionResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/session/logout": + post: + operationId: postApiV1SessionLogout + summary: postApiV1SessionLogout + security: [] + requestBody: + required: false + content: + application/json: + schema: + $ref: '#/components/schemas/EmptyRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/MessageResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/session/password": + post: + operationId: postApiV1SessionPassword + summary: postApiV1SessionPassword + security: [{cookieAuth: []}] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/PasswordChangeRequest' + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/OperationResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/ai-models": + post: + operationId: postApiV1SettingsAiModels + summary: postApiV1SettingsAiModels + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/ai-reply": + get: + operationId: getApiV1SettingsAiReply + summary: getApiV1SettingsAiReply + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/ai-reply/{cookie_id}": + get: + operationId: getApiV1SettingsAiReplyBycookie_id + summary: getApiV1SettingsAiReplyBycookie_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1SettingsAiReplyBycookie_id + summary: putApiV1SettingsAiReplyBycookie_id + parameters: + - name: cookie_id + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/system": + get: + operationId: getApiV1SettingsSystem + summary: getApiV1SettingsSystem + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1SettingsSystem + summary: putApiV1SettingsSystem + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/system/{key}": + put: + operationId: putApiV1SettingsSystemBykey + summary: putApiV1SettingsSystemBykey + parameters: + - name: key + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/system/public": + get: + operationId: getApiV1SettingsSystemPublic + summary: getApiV1SettingsSystemPublic + security: [] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/user": + get: + operationId: getApiV1SettingsUser + summary: getApiV1SettingsUser + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/api/v1/settings/user/{key}": + get: + operationId: getApiV1SettingsUserBykey + summary: getApiV1SettingsUserBykey + parameters: + - name: key + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + put: + operationId: putApiV1SettingsUserBykey + summary: putApiV1SettingsUserBykey + parameters: + - name: key + in: path + required: true + schema: + type: string + security: [{cookieAuth: []}] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + "/health": + get: + operationId: getHealth + summary: getHealth + security: [] + responses: + '200': + description: 成功 + content: + application/json: + schema: + $ref: '#/components/schemas/ApiResponse' + '400': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '401': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '403': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '404': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + '500': + description: 统一错误响应 + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' +components: + securitySchemes: + cookieAuth: + type: apiKey + in: cookie + name: session + schemas: + ApiResponse: + type: object + required: [success] + properties: + success: + type: boolean + description: 统一响应的稳定字段;业务成功字段由各阶段 operation schema 收紧。 + SessionResponse: + type: object + required: [success, message, is_admin] + properties: + success: + type: boolean + token: + type: [string, 'null'] + message: + type: string + user_id: + type: integer + username: + type: string + is_admin: + type: boolean + LoginRequest: + type: object + properties: + username: + type: string + password: + type: string + email: + type: string + verification_code: + type: string + InitializeRequest: + type: object + required: [password] + properties: + password: + type: string + PasswordChangeRequest: + type: object + required: [current_password, new_password] + properties: + current_password: + type: string + new_password: + type: string + PasswordLoginDisabledRequest: + type: object + properties: + account_id: + type: string + account: + type: string + password: + type: string + show_browser: + type: boolean + CredentialUpdateRequest: + type: object + required: [current_password, new_username] + properties: + current_password: + type: string + new_username: + type: string + new_password: + type: string + QRLoginVerificationRequest: + type: object + properties: + target_account_id: + type: string + EmptyRequest: + type: object + additionalProperties: false + AccountIDList: + type: array + items: + type: string + AccountCreateRequest: + type: object + required: [id, value] + properties: + id: + type: string + value: + type: string + login_method: + type: string + AccountUpdateRequest: + type: object + required: [value] + properties: + id: + type: string + value: + type: string + login_method: + type: string + last_refresh_at: + type: integer + AccountMutationResponse: + type: object + required: [success] + properties: + success: + type: boolean + id: + type: string + AccountDetailResponse: + type: object + required: [id, has_cookie, enabled, auto_confirm, remark, pause_duration, paused_until, paused, show_browser, username, nickname, avatar_url, login_method, last_login_at, profile_error, auto_rate_enabled, rate_content, auto_polish_enabled, polish_time, last_rate_scan_at, last_polish_date, last_polish_at] + properties: + id: + type: string + has_cookie: + type: boolean + enabled: + type: boolean + auto_confirm: + type: boolean + remark: + type: string + pause_duration: + type: integer + paused_until: + type: integer + paused: + type: boolean + show_browser: + type: boolean + username: + type: string + nickname: + type: string + avatar_url: + type: string + login_method: + type: string + last_login_at: + type: integer + profile_error: + type: string + auto_rate_enabled: + type: boolean + rate_content: + type: string + auto_polish_enabled: + type: boolean + polish_time: + type: string + last_rate_scan_at: + type: integer + last_polish_date: + type: string + last_polish_at: + type: integer + AccountDetailList: + type: array + items: + $ref: '#/components/schemas/AccountDetailResponse' + AccountStatusRequest: + type: object + required: [enabled] + properties: + enabled: + type: boolean + SessionStatusResponse: + type: object + required: [authenticated, initialized, is_admin] + properties: + authenticated: + type: boolean + initialized: + type: boolean + user_id: + type: integer + username: + type: string + is_admin: + type: boolean + OperationResponse: + type: object + required: [success] + properties: + success: + type: boolean + message: + type: string + requires_relogin: + type: boolean + MessageResponse: + type: object + required: [message] + properties: + message: + type: string + QRLoginGenerateResponse: + type: object + required: [success, session_id, qr_code_url] + properties: + success: + type: boolean + session_id: + type: string + qr_code_url: + type: string + message: + type: string + QRLoginStatusResponse: + type: object + required: [status] + properties: + success: + type: boolean + status: + type: string + message: + type: string + verification_screenshot: + type: string + face_qr_url: + type: string + session_id: + type: string + account_id: + type: string + is_new_account: + type: boolean + QRLoginVerificationResponse: + type: object + required: [success, unb] + properties: + success: + type: boolean + unb: + type: string + account_id: + type: string + is_new_account: + type: boolean + ErrorResponse: + type: object + required: [code, message] + properties: + code: + type: string + message: + type: string + request_id: + type: string + details: + type: object + additionalProperties: true diff --git a/docs/architecture/refactoring-master-plan.md b/docs/architecture/refactoring-master-plan.md index d8c2750..c70aab9 100644 --- a/docs/architecture/refactoring-master-plan.md +++ b/docs/architecture/refactoring-master-plan.md @@ -1,233 +1,80 @@ -# Ydisks 闲鱼助手重构总计划 +# OpenAPI 契约收口重构总计划 ## 唯一治理规则 -本文是唯一的阶段状态、顺序和验收依据。AGENTS.md 只负责要求读取本文;refactoring-progress.md 只 -保存最终提交与验收证据;其他架构文档只记录领域约束,不定义阶段状态。 -历史验收记录不得写入“唯一当前阶段”“下一阶段入口”或“不得提前执行”等阶段指令,避免与本表形成第二个状态源。 +本文是唯一阶段状态、顺序和验收依据。`refactoring-progress.md` 只保存旧六阶段最终提交与证据,不定义新阶段入口。旧六阶段成果是不可回退的已完成架构基线:应用服务、数据库、生命周期和 React feature 化均不重新实施,既有安全、依赖、注释、兼容和冻结 CAPTCHA 门禁继续有效。 -本重构只有六个正式阶段。旧的十阶段编号、阶段 0、纵向切片、当前切片、分轮迭代、局部完成声明和 -一个改动一个提交的规则全部失效。阶段是唯一任务、评审和交付单位:一个阶段允许同时修改多个 Go -包、多个前端 feature、测试、门禁、文档和嵌入产物;agent 不得拆分子任务、垂直切片、独立 PR 或 -中间提交。阶段最终提交必须可编译、可启动、可测试并通过全部强制验证。阶段完成前不得创建提交, -最终只创建一条中文阶段提交。 +本计划只有六个正式阶段,严格按 1 -> 2 -> 3 -> 4 -> 5 -> 6 执行。一个阶段是一个任务、一个评审单元和一条最终中文提交;阶段中不得创建中间提交、切片交付、提前更新状态或进入后续阶段。 -禁止无关重命名、全仓格式化、依赖升级、削弱测试或覆盖率、扩大兼容白名单、修改默认 :59188、改变 -远程首次初始化行为,以及修改冻结 CAPTCHA 文件、测试、参数、调用顺序或规范。 +## 目标与边界 -## 基础验证层(非正式阶段) +唯一 HTTP 契约链路:`OpenAPI 3.1 -> 生成 TypeScript paths/types -> 类型化 HTTP client -> feature adapter -> UI model`。 -完整架构门禁必须在业务迁移前建立,不属于阶段六的末尾补救工作。`tools/architecturecheck` 预先登记阶段二 -至阶段六的全部规则,并从本文状态表读取唯一“当前阶段”:当前阶段及全部前序规则立即 fail-closed,后续 -规则保持已定义但暂不阻断。状态表缺失、重复当前阶段或无法解析时,门禁自身失败;阶段六明确完成后 -即使不再存在“当前阶段”,全量门禁仍永久开启。 +`api/openapi.yaml` 是 `/api/v1/**` 与 `/health` 的唯一 HTTP 契约源;旧兼容路径不重复登记,继续由兼容矩阵和等价路由测试保护。生成的 `frontend/shared/api-contract/generated/schema.ts` 只读并提交。真实 handler 使用 `kin-openapi` 按同一规范校验。 -门禁目录固定覆盖:Server 组合根与平台旁路、worker 生命周期与根 Context、React feature/契约/网络边界、 -上层裸数据库与事务泄露、复杂度与超大文件、兼容登记与 Sunset。阶段只负责激活规则并清零真实违规, -不得到阶段执行时才临时设计验收逻辑。 - -## 目标边界 - -cmd 只处理配置、依赖构造、信号和生命周期。internal/server 只处理 HTTP/WebSocket transport、鉴权、 -中间件、具名 DTO、错误映射和 SPA。应用服务拥有用例、所有权、事务和补偿,不依赖 HTTP、Server、 -DB 或平台实现。internal/db 独占 SQL、方言、迁移、加密和 repository。React 使用 app -> features -> -shared,feature adapter 直接转换领域 DTO 为 feature-owned UI model。 +契约校验采用非对称规则:OpenAPI 中前端必需字段缺失或类型错误失败;声明的可选字段类型错误失败、缺失允许;后端额外非敏感字段允许,且不会出现在生成的前端类型中。敏感字段泄漏仍由安全门禁和响应测试独立阻断。UI 派生模型、表单状态和兼容归一模型不是 HTTP DTO。对象默认允许额外属性;动态设置、账号通知绑定等动态对象显式声明 `additionalProperties` 值类型。每个 operation 必须有稳定 `operationId`、成功响应、统一错误响应、鉴权元数据和请求参数,不得用无约束 `{}`、`object` 或 `any` 代替已知业务字段。 ## 当前状态 -状态只能是 待验收、当前阶段、待执行、阻塞、已完成;已完成必须绑定最终中文提交和完整命令输出。 - | 阶段 | 状态 | 严格结论 | | --- | --- | --- | -| 1. 稳定性、安全和启动生命周期 | 已完成(既有基线) | 已按当前工作树复核原子 data key、同步 Bind、启动回滚、无秘密告警及该阶段命令。六阶段治理建立时这些改动已经存在;禁止为纠正历史提交名重新提交或改写历史。 | -| 2. Server 组合根和应用服务迁移 | 已完成 | `internal/composition` 已成为唯一生产组合根;旧 Server 组合根与生命周期反转已删除。Server 仅接收经校验的消费者 Port,阶段二 AST 门禁和完整验收均已通过。最终提交绑定见 `refactoring-progress.md`。 | -| 3. 生命周期、Engine 和 Automation 重新验收 | 已完成 | 已完成后台任务 owner/Context/Cancel/Wait 收口、同步凭证更新的调用 Context 传递、浏览器组合根生命周期接入和 AST 生命周期门禁;最终提交与完整证据见 `refactoring-progress.md`。 | -| 4. React Feature 化和异步状态修复 | 已完成 | 已完成领域契约直接模块、feature API adapter 边界、统一 ApiError、items 地图迁移、定位取消/超时、批量轮询代次隔离、严格 TypeScript 检查和嵌入产物重建;最终证据见 `refactoring-progress.md`。 | -| 5. DB 与事务治理重新验收 | 已完成 | 已以 AST 门禁收束上层裸 SQL、Store.DB 与事务入口,补齐订单/商品 UoW 的提交和回滚证据,并完成 SQLite、MySQL、PostgreSQL 与 dbverify 实测;最终提交绑定见 `refactoring-progress.md`。 | -| 6. 全量架构、兼容退场和注释收口 | 已完成 | 最终质量门禁已清零;超大文件和过长函数按业务职责拆分,兼容、依赖方向、注释与复杂度门禁保持 fail-closed。最终提交与完整证据见 `refactoring-progress.md`。 | +| 既有架构基线:稳定性、组合根、生命周期、React、DB、质量收口 | 已完成(不可回退) | 历史实现和证据留在 `refactoring-progress.md`,不重做、不改写历史。 | +| 1. 契约基础设施与全路由登记 | 已完成 | OpenAPI、生成漂移和真实 Router 双向门禁已建立,未改变业务运行时形状。 | +| 2. 类型化客户端与登录账号主链路 | 当前阶段 | 迁移 session、system、accounts、QR 风控和永久关闭的 password-login。 | +| 3. 查询、聊天与订单主链路 | 待执行 | 迁移 dashboard、admin、chat、orders、刷新任务和 WebSocket 消息。 | +| 4. 商品、卡券和文件传输 | 待执行 | 迁移 items、批量发布、cards、上传与 CSV。 | +| 5. 自动化、设置和通知动态契约 | 待执行 | 迁移 rules、automation、settings、notifications 和账号绑定。 | +| 6. 全量封闭与旧手写契约退场 | 待执行 | 关闭原始 HTTP client 旁路,删除手写 transport DTO 和名单式门禁。 | -顺序固定为 1 -> 2 -> 3 -> 4 -> 5 -> 6。阶段一是治理建立前的既有基线例外;从阶段二开始,每阶段必须有唯一最终中文提交和完整原始命令输出。六个正式阶段均已完成,阶段二至阶段六的全部门禁永久保持 fail-closed。 +## 阶段一:契约基础设施与全路由登记 -## 阶段一:稳定性、安全和启动生命周期 +建立 `api/openapi.yaml`、固定版本的 `openapi-typescript`、`openapi-fetch`、`kin-openapi`、`make api-generate`、`make api-check` 和 CI 漂移检查。通过 `chi.Walk` 比较真实 Router 与规范,双向覆盖 `/api/v1/**`、`/health` 和动态订单刷新路由。每个 operation 立即登记稳定 ID、成功响应、统一错误响应、鉴权和路径参数;业务成功 schema 在后续阶段逐操作收紧。删除 `frontendDTOContractSpecs` 名单式门禁,保留二维码字段修复和通知摘要敏感字段保护,不改变任何 URL、状态码、包装或 feature 行为。 -范围:data key 使用 O_CREATE|O_EXCL,覆盖竞争、空文件、写失败和读竞争;Bind 先于 worker 和 -Serve;覆盖重复 Start/Stop、已 Bind 未 Serve、启动回滚;修复 SA1012;非 loopback 未初始化只输出 -不含秘密的高等级告警并更新部署文档。 +验收: -~~~text -go test ./cmd/server ./internal/server ./internal/notify -count=1 -go test -race ./cmd/server ./internal/server ./internal/notify -count=1 -go vet ./... -make lint -git diff --check -~~~ - -既有基线:不追补提交,不改写历史。后续涉及其代码时,必须在所属阶段重新运行相关命令。 - -## 阶段二:Server 组合根和应用服务迁移(已完成) - -组合根必须由独立 composition 包或等价独立组合层负责;cmd/server 只构造基础设施并调用它; -Server 只接受不可变完成依赖。 - -必须完成: -- 移出 internal/server/application_services.go 中所有 service、runner、coordinator 和 adapter factory 的生产构造。 -- 删除 server.NewApplicationServices 业务组合根、Server.ApplicationServices() 和 LifecycleComponents() 生命周期反转。 -- Server 不得持有或调用 MTOP、长登录、QR 登录、Manager、automation、Notifier、DB、Store、session 或具体平台 implementation。 -- 订单运行时、聊天发送、批量发布、账号登录、Session 恢复、通知测试发送、聊天已读上报全部通过应用 Port。 -- architecturecheck 扫描真实生产源码,禁止 Server 调用 service/runner/coordinator 构造函数和通过 adapter factory 间接构造业务服务。 -- 测试覆盖缺失依赖、正常、越权、失败、取消、补偿、启动回滚和独立关闭。 - -### 执行形态(对后续 agent 的硬性指导) - -1. 新建独立组合层(建议 `internal/composition`);它是唯一允许同时导入 `internal/application`、 - `internal/adapter`、`internal/account`、`internal/automation`、`internal/browser`、`internal/notify` - 与平台依赖的生产装配位置。`cmd/server/main.go` 只构造基础设施、调用组合层、登记其返回的生命周期 - 组件并启动 HTTP Server。 -2. 将 `internal/server/application_services.go` 的构造函数、`ApplicationServiceDependencies`、生命周期 - 组件生成和 callback 闭包移到组合层及对应的应用/adapter 包。完成后删除该文件,而不是改名保留; - `internal/server` 不得再出现 `New*Service`、`New*Runner`、`New*Coordinator` 或 adapter factory 调用。 -3. `server.Dependencies` 只能包含 HTTP 所需的认证、日志、静态资源、健康检查与由 transport 消费者定义的 - 最小应用 Port。它不得引用 `adapter` 的平台客户端接口、`account.Manager`、`automation.Center`、 - `notify.Notifier`、`chat.Service`、`db.Store`、`sql.DB` 或 `sql.Tx`。`PlatformPort`、`mtopClient`、 - `longLoginClient`、`qrLoginService`、`sessionRecoveryCallback` 与测试专用可变平台 Port 一并删除或迁至 - 应用/adapter 测试。 -4. 按用例而非基础设施对象迁移 handler:二维码登录、账号登录与长登录、Cookie/session 恢复、订单运行时、 - 聊天发送和已读上报、通知测试发送、商品批量发布分别接收消费者定义的应用 Port。handler 只做 DTO - 解析、当前用户提取、调用、错误到 HTTP 的映射;不得传递 `Server` callback 给 adapter。 -5. 组合层返回不可变的 `server.Dependencies` 和独立 `[]lifecycle.NamedComponent`。`cmd/server` 直接向 - `lifecycle.Coordinator` 登记该列表;禁止从 Server 或 Server 持有的服务集合反向读取生命周期组件。 -6. 重写 `tools/architecturecheck` 为 fail-closed AST 扫描,并增加真实仓库扫描和正反例测试:扫描全部 - 非测试 `internal/server/**/*.go` 与 `cmd/server/**/*.go`,拒绝上述类型、字段、构造调用、factory 调用、 - Server callback、service locator 及测试专用 setter 的生产使用。现有仅按少量函数名匹配的检查不能作为 - 阶段完成证据。 -7. 所有现有 Server 测试随用例归属迁移:transport 测试只替换应用 Port fake;业务、平台、恢复和 worker - 测试进入 application/adapter。为组合层补齐缺失依赖、构造失败、启动回滚和关闭顺序测试。不得因为迁移 - 删除现有错误路径、越权、取消、租约或晚到结果断言。 -8. 阶段二门禁在迁移开始时即启用,且没有临时白名单:`tools/architecturecheck` 必须拒绝 - `application_services.go`、Server/cmd 中的 adapter 或业务运行时依赖、Server 平台 Port、组合根 API、 - 生命周期反转、应用/adapter 构造链,以及缺失或未被 `cmd/server` 调用的 `internal/composition`。阶段内 - 门禁失败表示未完成迁移,不得降级为告警;最终提交前必须归零。 - -~~~text -go test ./internal/application/... ./internal/adapter ./internal/server -count=1 -go test -race ./internal/application/... ./internal/adapter ./internal/server -count=1 +```text +make api-check go run ./tools/architecturecheck -go vet ./... -make lint -make comments -git diff --check -~~~ - -最终提交:阶段二:完成 Server 组合根和应用服务迁移。 - -完成结论:生产装配已迁入 `internal/composition` 与其 `runtime` 子层,`cmd/server` 只构造基础设施并调用 -组合层;`internal/server` 不再构造业务服务、runner、coordinator 或平台实现,也不再反向返还生命周期组件。 -Server 的应用依赖由消费者定义的不可变 Port 容器承载,构造期缺失任一必需 Port 即失败。完整原始验收输出、 -冻结 CAPTCHA 差异检查和最终提交绑定只记录在 `refactoring-progress.md`。 - -## 阶段三:生命周期、Engine 和 Automation 重新验收(已完成) - -明确每个 worker 的 owner、Context、Cancel、Wait/Join;cmd 独占协调器;Server Stop 只收束 HTTP; -覆盖启动失败、取消、超时、重复关闭、晚到结果和关闭顺序;可在本阶段修复 Engine/Automation 状态问题, -但不得改动冻结 CAPTCHA。 - -~~~text -go test ./... -count=1 -go test -race ./internal/server ./internal/engine ./internal/automation ./internal/renewal -RUN_BROWSER_INTEGRATION=1 go test ./internal/browser -count=1 -make comments -go run ./tools/architecturecheck -~~~ - -最终提交:阶段三:完成生命周期、Engine 和 Automation 重新验收。 - -## 阶段四:React Feature 化和异步状态修复(已完成) - -这是一个完整前端阶段,不拆 HTTP 错误、契约、地图、轮询或构建交付: -- ApiError 保留 status、code、message、request_id、details、payload;JSON/FormData 共用错误解析。 -- shared/api-contract/index.ts 拆为 session、accounts、items、orders、automation、notifications、settings、chat、cards、admin、common 直接模块;feature adapter 直接导入领域契约并输出 UI model。 -- 地图物理迁入 items;locateForPublish 等待定位和搜索;每次请求 AbortController + generation + timeout,旧响应不得写回。 -- pending、running、canceling 统一视为进行中;每个轮询 effect 独立取消;覆盖重启、关闭重开、晚到响应、取消和卸载。 -- 清理未使用符号并开启 noUnusedLocals/noUnusedParameters;Vite 重建 internal/webui/static。 - -~~~text -npm test --prefix frontend +go test ./internal/server -count=1 npm run typecheck --prefix frontend -npm run comments:check --prefix frontend -npm run build --prefix frontend -make cover-frontend -git diff --check -~~~ - -最终提交:阶段四:完成 React Feature 化和异步状态修复。 - -## 阶段五:DB 与事务治理重新验收(已完成) - -清除上层 Store.DB、sql.DB、sql.Tx 和 row model 泄露;跨 repository 原子操作使用 Unit of Work;验证 -claim、lease、取消、重试、不确定远程结果和本地补偿;补齐 SQLite 并发和事务测试,并运行 MySQL、 -PostgreSQL、cmd/dbverify。任何发现的 repository、迁移或补偿缺陷必须在本阶段同一提交中完成。 - -~~~text -go test ./internal/db ./internal/application/... ./internal/adapter -count=1 -go test -race ./internal/db ./internal/application/... ./internal/adapter -count=1 -TEST_MYSQL_URL=... TEST_POSTGRES_URL=... make test-multidb -go run ./cmd/dbverify "$TEST_MYSQL_URL" -go run ./cmd/dbverify "$TEST_POSTGRES_URL" -git diff --check -~~~ - -最终提交:阶段五:完成数据库与事务治理重新验收。 - -完成结论:数据库门禁已改为 AST/import fail-closed 扫描,阻断上层 `database/sql`、`Store.DB` 与 -`Begin`/`BeginTx` 裸事务旁路;订单与商品写入 UoW 已有 SQLite 原子提交和回滚测试。SQLite、MySQL、 -PostgreSQL 多方言回归及两个 `cmd/dbverify` 均已实际通过,完整命令输出和提交绑定记录在 -`refactoring-progress.md`。 - -## 阶段六:全量架构、兼容退场和注释收口(已完成) - -门禁框架和全部阶段规则已经前置建立,本阶段不得重新发明或补写基础规则。本阶段激活最终质量门禁, -处理此前各阶段持续开启的全部边界,并清零 service locator、动态 import、前端依赖方向、根级 services -旁路、模板注释、复杂度和超大文件违规。兼容入口只在遥测、Sunset、调用方迁移和契约测试齐备后删除; -不得扩大 baseline、增加白名单或跳过测试。 - -~~~text -go test ./... -count=1 -go vet ./... -make lint -make comments -go run ./tools/architecturecheck -go test -race ./internal/server ./internal/engine ./internal/automation npm test --prefix frontend -npm run typecheck --prefix frontend -npm run comments:check --prefix frontend +make comments npm run build --prefix frontend -make cover -make cover-frontend git diff --check -~~~ +``` -适用时还运行浏览器集成、MySQL/PostgreSQL 和两个 cmd/dbverify 命令。最终提交:阶段六:完成全量架构、 -兼容退场和注释收口。 +最终提交:`阶段一:建立 OpenAPI 单一契约源与全路由门禁`。 -完成结论:质量门禁已在不新增 architecturecheck/source 架构白名单、baseline 或忽略源目录的前提下清零。生成覆盖率产物的 Git 忽略规则不属于架构门禁豁免。组合根、adapter、browser -生命周期、DB repository、Engine、通知、续期、Server DTO、二维码、协议和门禁源码均按业务职责拆分; -受保护的 CAPTCHA 文件和规范未改动。完整原始验收输出、覆盖率、浏览器集成与多数据库环境例外记录在 -`refactoring-progress.md`。 +## 阶段二:类型化客户端与登录账号主链路 -阶段六完成后的窄范围缺陷修复仍须保持全部门禁永久启用,不得把阶段状态回退为阶段五或创建新的阶段入口; -修复范围与本次验收证据只追加到 `refactoring-progress.md` 的阶段六记录。 +把 Cookie、超时、外部 AbortSignal、401 合并登出、统一 ApiError 和 FormData 行为封装进类型化客户端运行时,迁移 session、system、accounts、QR 风控及永久关闭的 password-login。adapter 继续输出 UI model,生成类型不得直接进入 React state 或 props;补齐成功、未认证、越权、未找到、风控状态和敏感字段不泄漏的真实响应校验。冻结 CAPTCHA 文件、选择器、时序、Cookie 合并和浏览器调用顺序完全不变。 + +最终提交:`阶段二:迁移登录账号与风控接口到生成契约`。 + +## 阶段三:查询、聊天与订单主链路 + +迁移 dashboard、admin、chat、orders 查询和订单刷新任务。WebSocket 握手登记为 HTTP operation,消息体使用 OpenAPI component schema;聊天 adapter 保留唯一原生 WebSocket 实现。保留分页、游标、订单状态、旧包装归一化和晚到响应隔离,覆盖刷新成功、失败、取消、超时及消息字段类型。 + +最终提交:`阶段三:迁移查询聊天与订单接口到生成契约`。 + +## 阶段四:商品、卡券和文件传输 + +迁移 items、批量发布、cards、表格和图片上传、CSV 下载。OpenAPI 明确 multipart、二进制响应、Content-Disposition 和长请求超时;继续使用 FormData,保留批次代次隔离、取消、重试和不确定远端结果。覆盖格式错误、部分成功、取消、重试、CSV 和客户端取消。 + +最终提交:`阶段四:迁移商品卡券与文件接口到生成契约`。 + +## 阶段五:自动化、设置和通知动态契约 + +迁移 rules、automation、settings、notifications 和账号通知绑定。动态设置与按账号 ID 的动态键使用受约束 additionalProperties;通知摘要不返回 SMTP 密码、Token 或渠道秘密配置,编辑器不从摘要 DTO 恢复秘密。覆盖动态键类型、敏感配置三态变更、渠道别名归一、自动化问题和统一错误响应。 + +最终提交:`阶段五:迁移自动化设置与通知动态契约`。 + +## 阶段六:全量封闭与旧手写契约退场 + +禁止 feature、组件和 Hook 导入原始 `get/post/put/del/postForm`,只有共享契约客户端运行时可调用 fetch。删除手写 `transport.ts` 和废弃 DTO;门禁从 OpenAPI 自动发现 operation、生成类型和真实契约测试覆盖,不保留 DTO 名单、路径白名单或可扩展 baseline。每个 operation 必须有真实成功响应,或属于明确的 WebSocket/二进制特殊校验。更新 AGENTS、依赖规则、兼容矩阵和进度证据;新接口必须先改 OpenAPI、生成代码和服务端契约测试才能被前端使用。 + +最终验收:`make check`、`go test ./... -count=1`、Server race、全部前端测试、`make cover`、`make cover-frontend`、嵌入前端构建及二维码/浏览器回归。最终提交:`阶段六:完成生成契约迁移并永久关闭旁路`。 ## 执行纪律 -1. 开始一个阶段前,只允许读取总计划状态表并审查当前工作树;不得根据旧阶段编号或已落地代码跳阶段。 -2. 阶段进行期间不创建提交、不更新阶段状态、不写局部完成记录,也不向后续阶段交付任何实现。 -3. 阶段最终验收失败时,状态仍是当前阶段;修复全部失败项后重新执行完整命令,不得只重跑失败命令。 -4. 仅在全部命令成功后,按一次操作更新状态表、验收记录、完成证据和下一阶段入口,再创建唯一中文提交。 -5. 已存在的正确实现只能作为后续阶段的输入;不能单独改变正式阶段状态,也不得被回滚、清理或拆分重做。 - -## 门禁激活规则 - -1. 全部阶段规则在基础验证层预先写入自动门禁并具备正反例测试;每个阶段开始时只激活对应规则,之后才允许迁移生产代码。 -2. 当前阶段门禁必须 fail-closed。阶段内出现违规是未完成工作的可见清单,不得通过白名单、baseline、忽略目录、字符串规避、反射、动态 import 或降低严重级别使其通过。 -3. 前序阶段已完成的门禁继续保持启用。后续阶段专有门禁只能在其成为当前阶段时启用,避免以尚未执行的设计阻断当前阶段;但任何全局安全、冻结 CAPTCHA、依赖方向、测试和注释规则始终生效。 -4. 阶段最终验收只接受“当前阶段及全部既有门禁均为零违规”的完整输出。门禁失败时不得更新阶段状态、完成证据或创建提交。 +阶段最终验收失败时状态仍为当前阶段,修复后重跑完整命令;只有全部命令成功后才一次更新状态、证据和下一阶段入口并创建最终中文提交。不得扩大白名单、baseline、忽略路径或 warning-only 旁路;后续缺陷修复保持全部已启用门禁永久有效。 diff --git a/frontend/package-lock.json b/frontend/package-lock.json index d00f889..d979a41 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "axios": "^1.13.2", "lucide-react": "^0.562.0", + "openapi-fetch": "^0.14.0", "react": "^19.2.3", "react-dom": "^19.2.3", "recharts": "^3.6.0", @@ -24,6 +25,7 @@ "@vitest/coverage-v8": "^4.1.6", "autoprefixer": "^10.4.23", "jsdom": "^30.0.1", + "openapi-typescript": "^7.9.1", "postcss": "^8.5.6", "tailwindcss": "^3.4.17", "typescript": "~5.8.2", @@ -1100,6 +1102,76 @@ "node": ">= 8" } }, + "node_modules/@redocly/ajv": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/@redocly/ajv/-/ajv-8.11.2.tgz", + "integrity": "sha512-io1JpnwtIcvojV7QKDUSIuMN/ikdOUd1ReEnUnMKGfDVridQZ31J0MmIuqwuRjWDZfmvr+Q0MqCcfHM2gTivOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js-replace": "^1.0.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@redocly/config": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@redocly/config/-/config-0.22.0.tgz", + "integrity": "sha512-gAy93Ddo01Z3bHuVdPWfCwzgfaYgMdaZPcfL7JZ7hWJoK9V0lXDbigTWkhiPFAaLWzbOJ+kbUQG1+XwIm0KRGQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@redocly/openapi-core": { + "version": "1.34.19", + "resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.34.19.tgz", + "integrity": "sha512-o/0VgsBXgwcY1lyeqcVtSGdTQAPnVggo0fbFVPlxl5XVDKUcVH0OLRqt3CbkwByT5FU305E0iE0O7MzThjDblw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redocly/ajv": "8.11.2", + "@redocly/config": "0.22.0", + "colorette": "1.4.0", + "https-proxy-agent": "7.0.6", + "js-levenshtein": "1.1.6", + "js-yaml": "4.3.1", + "minimatch": "5.1.9", + "pluralize": "8.0.0", + "yaml-ast-parser": "0.0.43" + }, + "engines": { + "node": ">=18.17.0", + "npm": ">=9.5.0" + } + }, + "node_modules/@redocly/openapi-core/node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/@redocly/openapi-core/node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/@reduxjs/toolkit": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.12.0.tgz", @@ -1947,6 +2019,16 @@ "node": ">= 6.0.0" } }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -2000,6 +2082,13 @@ "dev": true, "license": "MIT" }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, "node_modules/aria-query": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", @@ -2095,6 +2184,13 @@ "proxy-from-env": "^2.1.0" } }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, "node_modules/baseline-browser-mapping": { "version": "2.10.38", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.38.tgz", @@ -2131,6 +2227,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/brace-expansion": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz", + "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/braces": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", @@ -2232,6 +2338,13 @@ "node": ">=18" } }, + "node_modules/change-case": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/change-case/-/change-case-5.4.4.tgz", + "integrity": "sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==", + "dev": true, + "license": "MIT" + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -2279,6 +2392,13 @@ "node": ">=6" } }, + "node_modules/colorette": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", + "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", + "dev": true, + "license": "MIT" + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2738,6 +2858,13 @@ "node": ">=12.0.0" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-glob": { "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", @@ -3029,6 +3156,19 @@ "url": "https://opencollective.com/immer" } }, + "node_modules/index-to-position": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/index-to-position/-/index-to-position-1.2.0.tgz", + "integrity": "sha512-Yg7+ztRkqslMAS2iFaU+Oa4KTSidr63OsFGlOrJoW981kIYO3CGCS3wA95P1mUi/IVSJkn0D479KTJpVpvFNuw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/internmap": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", @@ -3156,6 +3296,16 @@ "jiti": "bin/jiti.js" } }, + "node_modules/js-levenshtein": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz", + "integrity": "sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3163,6 +3313,29 @@ "dev": true, "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz", + "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsdom": { "version": "30.0.1", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.0.1.tgz", @@ -3227,6 +3400,13 @@ "node": ">=6" } }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -3402,6 +3582,19 @@ "node": ">= 0.6" } }, + "node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -3493,6 +3686,73 @@ "node": ">=12.20.0" } }, + "node_modules/openapi-fetch": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.14.0.tgz", + "integrity": "sha512-PshIdm1NgdLvb05zp8LqRQMNSKzIlPkyMxYFxwyHR+UlKD4t2nUjkDhNxeRbhRSEd3x5EUNh2w5sJYwkhOH4fg==", + "license": "MIT", + "dependencies": { + "openapi-typescript-helpers": "^0.0.15" + } + }, + "node_modules/openapi-typescript": { + "version": "7.9.1", + "resolved": "https://registry.npmjs.org/openapi-typescript/-/openapi-typescript-7.9.1.tgz", + "integrity": "sha512-9gJtoY04mk6iPMbToPjPxEAtfXZ0dTsMZtsgUI8YZta0btPPig9DJFP4jlerQD/7QOwYgb0tl+zLUpDf7vb7VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@redocly/openapi-core": "^1.34.5", + "ansi-colors": "^4.1.3", + "change-case": "^5.4.4", + "parse-json": "^8.3.0", + "supports-color": "^10.1.0", + "yargs-parser": "^21.1.1" + }, + "bin": { + "openapi-typescript": "bin/cli.js" + }, + "peerDependencies": { + "typescript": "^5.x" + } + }, + "node_modules/openapi-typescript-helpers": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.15.tgz", + "integrity": "sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==", + "license": "MIT" + }, + "node_modules/openapi-typescript/node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/parse-json": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-8.3.0.tgz", + "integrity": "sha512-ybiGyvspI+fAoRQbIPRddCcSTV9/LsJbf0e/S85VLowVGzRmokfneg2kwVW/KU5rOXrPSbF1qAKPMgNTqqROQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "index-to-position": "^1.1.0", + "type-fest": "^4.39.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse5": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", @@ -3560,6 +3820,16 @@ "node": ">= 6" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/postcss": { "version": "8.5.15", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", @@ -4358,6 +4628,19 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/type-fest": { + "version": "4.41.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz", + "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/typescript": { "version": "5.8.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", @@ -4420,6 +4703,13 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uri-js-replace": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uri-js-replace/-/uri-js-replace-1.0.1.tgz", + "integrity": "sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==", + "dev": true, + "license": "MIT" + }, "node_modules/use-sync-external-store": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz", @@ -4756,6 +5046,23 @@ "dev": true, "license": "ISC" }, + "node_modules/yaml-ast-parser": { + "version": "0.0.43", + "resolved": "https://registry.npmjs.org/yaml-ast-parser/-/yaml-ast-parser-0.0.43.tgz", + "integrity": "sha512-2PTINUwsRqSd+s8XxKaJWQlUuEMHJQyEuh2edBbW8KNJz0SJPwUSD2zRWqezFEdN7IzAgeuYHFUCF7o8zRdZ0A==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/yet-another-react-lightbox": { "version": "3.32.2", "resolved": "https://registry.npmjs.org/yet-another-react-lightbox/-/yet-another-react-lightbox-3.32.2.tgz", diff --git a/frontend/package.json b/frontend/package.json index 162451f..383c432 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,12 +9,15 @@ "typecheck": "tsc --noEmit", "test": "vitest run", "test:coverage": "vitest run --coverage", + "api:generate": "openapi-typescript ../api/openapi.yaml -o shared/api-contract/generated/schema.ts", + "api:check": "node scripts/check-api-contract.mjs", "comments:check": "node scripts/check-comments.mjs --mode check --root .", "preview": "vite preview" }, "dependencies": { "axios": "^1.13.2", "lucide-react": "^0.562.0", + "openapi-fetch": "^0.14.0", "react": "^19.2.3", "react-dom": "^19.2.3", "recharts": "^3.6.0", @@ -29,6 +32,7 @@ "@vitest/coverage-v8": "^4.1.6", "autoprefixer": "^10.4.23", "jsdom": "^30.0.1", + "openapi-typescript": "^7.9.1", "postcss": "^8.5.6", "tailwindcss": "^3.4.17", "typescript": "~5.8.2", diff --git a/frontend/scripts/check-api-contract.mjs b/frontend/scripts/check-api-contract.mjs new file mode 100644 index 0000000..87c0cb2 --- /dev/null +++ b/frontend/scripts/check-api-contract.mjs @@ -0,0 +1,26 @@ +// 校验生成类型未被人工修改,并把临时生成结果与仓库产物逐字节比较。 +import { execFileSync } from 'node:child_process'; +import fs from 'node:fs'; +import os from 'node:os'; +import path from 'node:path'; + +const frontendRoot = path.resolve(import.meta.dirname, '..'); +const repositoryRoot = path.resolve(frontendRoot, '..'); +const temporaryDirectory = fs.mkdtempSync(path.join(os.tmpdir(), 'ydisks-openapi-')); +const temporarySchema = path.join(temporaryDirectory, 'schema.ts'); +const checkedInSchema = path.join(frontendRoot, 'shared', 'api-contract', 'generated', 'schema.ts'); +const generator = path.join(frontendRoot, 'node_modules', 'openapi-typescript', 'bin', 'cli.js'); + +try { + execFileSync(process.execPath, [generator, path.join(repositoryRoot, 'api', 'openapi.yaml'), '-o', temporarySchema], { + cwd: frontendRoot, + stdio: 'inherit', + }); + const generatedContent = fs.readFileSync(temporarySchema); + const checkedInContent = fs.readFileSync(checkedInSchema); + if (!generatedContent.equals(checkedInContent)) { + throw new Error('生成的 OpenAPI TypeScript 类型与提交产物不一致;请运行 npm run api:generate --prefix frontend。'); + } +} finally { + fs.rmSync(temporaryDirectory, { recursive: true, force: true }); +} diff --git a/frontend/shared/api-contract/generated/schema.ts b/frontend/shared/api-contract/generated/schema.ts new file mode 100644 index 0000000..c430907 --- /dev/null +++ b/frontend/shared/api-contract/generated/schema.ts @@ -0,0 +1,11087 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/api/v1/account-tasks/{cid}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountTasksBycid */ + get: operations["getApiV1AccountTasksBycid"]; + /** putApiV1AccountTasksBycid */ + put: operations["putApiV1AccountTasksBycid"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/account-tasks/{cid}/run": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1AccountTasksBycidRun */ + post: operations["postApiV1AccountTasksBycidRun"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/account-tasks/{cid}/runs": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountTasksBycidRuns */ + get: operations["getApiV1AccountTasksBycidRuns"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1Accounts */ + get: operations["getApiV1Accounts"]; + put?: never; + /** postApiV1Accounts */ + post: operations["postApiV1Accounts"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountsBycid */ + get: operations["getApiV1AccountsBycid"]; + /** putApiV1AccountsBycid */ + put: operations["putApiV1AccountsBycid"]; + post?: never; + /** deleteApiV1AccountsBycid */ + delete: operations["deleteApiV1AccountsBycid"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/auto-confirm": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountsBycidAutoConfirm */ + get: operations["getApiV1AccountsBycidAutoConfirm"]; + /** putApiV1AccountsBycidAutoConfirm */ + put: operations["putApiV1AccountsBycidAutoConfirm"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/login-info": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1AccountsBycidLoginInfo */ + put: operations["putApiV1AccountsBycidLoginInfo"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/long-login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountsBycidLongLogin */ + get: operations["getApiV1AccountsBycidLongLogin"]; + /** putApiV1AccountsBycidLongLogin */ + put: operations["putApiV1AccountsBycidLongLogin"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/pause-duration": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountsBycidPauseDuration */ + get: operations["getApiV1AccountsBycidPauseDuration"]; + /** putApiV1AccountsBycidPauseDuration */ + put: operations["putApiV1AccountsBycidPauseDuration"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/refresh-profile": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1AccountsBycidRefreshProfile */ + post: operations["postApiV1AccountsBycidRefreshProfile"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/remark": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1AccountsBycidRemark */ + put: operations["putApiV1AccountsBycidRemark"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/settings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1AccountsBycidSettings */ + put: operations["putApiV1AccountsBycidSettings"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/{cid}/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1AccountsBycidStatus */ + put: operations["putApiV1AccountsBycidStatus"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountsDetails */ + get: operations["getApiV1AccountsDetails"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/accounts/runtime-status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AccountsRuntimeStatus */ + get: operations["getApiV1AccountsRuntimeStatus"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/cookies": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AdminCookies */ + get: operations["getApiV1AdminCookies"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/notifications/outbox/uncertain": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AdminNotificationsOutboxUncertain */ + get: operations["getApiV1AdminNotificationsOutboxUncertain"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1AdminPassword */ + post: operations["postApiV1AdminPassword"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/stats": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AdminStats */ + get: operations["getApiV1AdminStats"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/tasks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AdminTasks */ + get: operations["getApiV1AdminTasks"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/users": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AdminUsers */ + get: operations["getApiV1AdminUsers"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/admin/users/{user_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** deleteApiV1AdminUsersByuser_id */ + delete: operations["deleteApiV1AdminUsersByuser_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/analytics/dashboard": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AnalyticsDashboard */ + get: operations["getApiV1AnalyticsDashboard"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/analytics/orders": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AnalyticsOrders */ + get: operations["getApiV1AnalyticsOrders"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/analytics/orders/valid": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AnalyticsOrdersValid */ + get: operations["getApiV1AnalyticsOrdersValid"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/automation-issues": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AutomationIssues */ + get: operations["getApiV1AutomationIssues"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/automation-pending-tasks/{task_id}/resolve": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1AutomationPendingTasksBytask_idResolve */ + post: operations["postApiV1AutomationPendingTasksBytask_idResolve"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/automation-rules": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1AutomationRules */ + get: operations["getApiV1AutomationRules"]; + put?: never; + /** postApiV1AutomationRules */ + post: operations["postApiV1AutomationRules"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/automation-rules/{rule_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1AutomationRulesByrule_id */ + put: operations["putApiV1AutomationRulesByrule_id"]; + post?: never; + /** deleteApiV1AutomationRulesByrule_id */ + delete: operations["deleteApiV1AutomationRulesByrule_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/automation-runs/{run_id}/resolve": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1AutomationRunsByrun_idResolve */ + post: operations["postApiV1AutomationRunsByrun_idResolve"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/cards": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1Cards */ + get: operations["getApiV1Cards"]; + put?: never; + /** postApiV1Cards */ + post: operations["postApiV1Cards"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/cards/{card_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1CardsBycard_id */ + get: operations["getApiV1CardsBycard_id"]; + /** putApiV1CardsBycard_id */ + put: operations["putApiV1CardsBycard_id"]; + post?: never; + /** deleteApiV1CardsBycard_id */ + delete: operations["deleteApiV1CardsBycard_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/cards/{card_id}/append-data": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1CardsBycard_idAppendData */ + post: operations["postApiV1CardsBycard_idAppendData"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/cards/{card_id}/details": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1CardsBycard_idDetails */ + get: operations["getApiV1CardsBycard_idDetails"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/cards/batch": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1CardsBatch */ + post: operations["postApiV1CardsBatch"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/chat/images": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ChatImages */ + post: operations["postApiV1ChatImages"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/chat/messages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ChatMessages */ + get: operations["getApiV1ChatMessages"]; + put?: never; + /** postApiV1ChatMessages */ + post: operations["postApiV1ChatMessages"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/chat/read": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ChatRead */ + post: operations["postApiV1ChatRead"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/chat/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ChatSessions */ + get: operations["getApiV1ChatSessions"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/chat/ws": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ChatWs */ + get: operations["getApiV1ChatWs"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/default-replies": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1DefaultReplies */ + get: operations["getApiV1DefaultReplies"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/default-replies/{cid}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1DefaultRepliesBycid */ + get: operations["getApiV1DefaultRepliesBycid"]; + /** putApiV1DefaultRepliesBycid */ + put: operations["putApiV1DefaultRepliesBycid"]; + post?: never; + /** deleteApiV1DefaultRepliesBycid */ + delete: operations["deleteApiV1DefaultRepliesBycid"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/default-replies/{cid}/clear-records": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1DefaultRepliesBycidClearRecords */ + post: operations["postApiV1DefaultRepliesBycidClearRecords"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/default-replies/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1DefaultRepliesList */ + get: operations["getApiV1DefaultRepliesList"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1Items */ + get: operations["getApiV1Items"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/{cookie_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsBycookie_id */ + post: operations["postApiV1ItemsBycookie_id"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/{cookie_id}/{item_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ItemsBycookie_idByitem_id */ + get: operations["getApiV1ItemsBycookie_idByitem_id"]; + /** putApiV1ItemsBycookie_idByitem_id */ + put: operations["putApiV1ItemsBycookie_idByitem_id"]; + post?: never; + /** deleteApiV1ItemsBycookie_idByitem_id */ + delete: operations["deleteApiV1ItemsBycookie_idByitem_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/{cookie_id}/{item_id}/multi-quantity-delivery": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1ItemsBycookie_idByitem_idMultiQuantityDelivery */ + put: operations["putApiV1ItemsBycookie_idByitem_idMultiQuantityDelivery"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/{cookie_id}/{item_id}/multi-spec": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1ItemsBycookie_idByitem_idMultiSpec */ + put: operations["putApiV1ItemsBycookie_idByitem_idMultiSpec"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/cookie/{cookie_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ItemsCookieBycookie_id */ + get: operations["getApiV1ItemsCookieBycookie_id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/get-all-from-account": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsGetAllFromAccount */ + post: operations["postApiV1ItemsGetAllFromAccount"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/get-by-page": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsGetByPage */ + post: operations["postApiV1ItemsGetByPage"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsPublish */ + post: operations["postApiV1ItemsPublish"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-batches": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ItemsPublishBatches */ + get: operations["getApiV1ItemsPublishBatches"]; + put?: never; + /** postApiV1ItemsPublishBatches */ + post: operations["postApiV1ItemsPublishBatches"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-batches/{batch_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ItemsPublishBatchesBybatch_id */ + get: operations["getApiV1ItemsPublishBatchesBybatch_id"]; + put?: never; + post?: never; + /** deleteApiV1ItemsPublishBatchesBybatch_id */ + delete: operations["deleteApiV1ItemsPublishBatchesBybatch_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-batches/{batch_id}/cancel": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsPublishBatchesBybatch_idCancel */ + post: operations["postApiV1ItemsPublishBatchesBybatch_idCancel"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-batches/{batch_id}/result.csv": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ItemsPublishBatchesBybatch_idResultCsv */ + get: operations["getApiV1ItemsPublishBatchesBybatch_idResultCsv"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-batches/{batch_id}/retry-failed": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsPublishBatchesBybatch_idRetryFailed */ + post: operations["postApiV1ItemsPublishBatchesBybatch_idRetryFailed"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-batches/preview": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsPublishBatchesPreview */ + post: operations["postApiV1ItemsPublishBatchesPreview"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/items/publish-categories/recommend": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1ItemsPublishCategoriesRecommend */ + post: operations["postApiV1ItemsPublishCategoriesRecommend"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/accounts/{cid}/bindings": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1NotificationsAccountsBycidBindings */ + get: operations["getApiV1NotificationsAccountsBycidBindings"]; + put?: never; + /** postApiV1NotificationsAccountsBycidBindings */ + post: operations["postApiV1NotificationsAccountsBycidBindings"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/channels": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1NotificationsChannels */ + get: operations["getApiV1NotificationsChannels"]; + put?: never; + /** postApiV1NotificationsChannels */ + post: operations["postApiV1NotificationsChannels"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/channels/{channel_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1NotificationsChannelsBychannel_id */ + put: operations["putApiV1NotificationsChannelsBychannel_id"]; + post?: never; + /** deleteApiV1NotificationsChannelsBychannel_id */ + delete: operations["deleteApiV1NotificationsChannelsBychannel_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/channels/{channel_id}/test": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1NotificationsChannelsBychannel_idTest */ + post: operations["postApiV1NotificationsChannelsBychannel_idTest"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/messages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1NotificationsMessages */ + get: operations["getApiV1NotificationsMessages"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/messages/{notification_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** deleteApiV1NotificationsMessagesBynotification_id */ + delete: operations["deleteApiV1NotificationsMessagesBynotification_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/messages/account/{cid}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** deleteApiV1NotificationsMessagesAccountBycid */ + delete: operations["deleteApiV1NotificationsMessagesAccountBycid"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/notifications/outbox/uncertain": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1NotificationsOutboxUncertain */ + get: operations["getApiV1NotificationsOutboxUncertain"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1Orders */ + get: operations["getApiV1Orders"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders/{order_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1OrdersByorder_id */ + get: operations["getApiV1OrdersByorder_id"]; + /** putApiV1OrdersByorder_id */ + put: operations["putApiV1OrdersByorder_id"]; + post?: never; + /** deleteApiV1OrdersByorder_id */ + delete: operations["deleteApiV1OrdersByorder_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders/{order_id}/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1OrdersByorder_idRefresh */ + post: operations["postApiV1OrdersByorder_idRefresh"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders/import": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1OrdersImport */ + post: operations["postApiV1OrdersImport"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders/manual-ship": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1OrdersManualShip */ + post: operations["postApiV1OrdersManualShip"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders/refresh": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1OrdersRefresh */ + post: operations["postApiV1OrdersRefresh"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/orders/refresh/{job_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1OrdersRefreshByjob_id */ + get: operations["getApiV1OrdersRefreshByjob_id"]; + put?: never; + post?: never; + /** deleteApiV1OrdersRefreshByjob_id */ + delete: operations["deleteApiV1OrdersRefreshByjob_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/password-login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1PasswordLogin */ + post: operations["postApiV1PasswordLogin"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/password-login/cancel/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** deleteApiV1PasswordLoginCancelBysession_id */ + delete: operations["deleteApiV1PasswordLoginCancelBysession_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/password-login/check/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1PasswordLoginCheckBysession_id */ + get: operations["getApiV1PasswordLoginCheckBysession_id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/qr-login/check/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1QrLoginCheckBysession_id */ + get: operations["getApiV1QrLoginCheckBysession_id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/qr-login/complete-verification/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1QrLoginCompleteVerificationBysession_id */ + post: operations["postApiV1QrLoginCompleteVerificationBysession_id"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/qr-login/generate": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1QrLoginGenerate */ + post: operations["postApiV1QrLoginGenerate"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/qr-login/status/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1QrLoginStatusBysession_id */ + get: operations["getApiV1QrLoginStatusBysession_id"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/{cid}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ReplyRulesBycid */ + get: operations["getApiV1ReplyRulesBycid"]; + put?: never; + /** postApiV1ReplyRulesBycid */ + post: operations["postApiV1ReplyRulesBycid"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/{cid}/index/{index}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** deleteApiV1ReplyRulesBycidIndexByindex */ + delete: operations["deleteApiV1ReplyRulesBycidIndexByindex"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/{cid}/items": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ReplyRulesBycidItems */ + get: operations["getApiV1ReplyRulesBycidItems"]; + put?: never; + /** postApiV1ReplyRulesBycidItems */ + post: operations["postApiV1ReplyRulesBycidItems"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/{cid}/typed": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ReplyRulesBycidTyped */ + get: operations["getApiV1ReplyRulesBycidTyped"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/{cid}/typed/{id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1ReplyRulesBycidTypedByid */ + put: operations["putApiV1ReplyRulesBycidTypedByid"]; + post?: never; + /** deleteApiV1ReplyRulesBycidTypedByid */ + delete: operations["deleteApiV1ReplyRulesBycidTypedByid"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/items": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ReplyRulesItems */ + get: operations["getApiV1ReplyRulesItems"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/reply-rules/items/{cookie_id}/{item_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1ReplyRulesItemsBycookie_idByitem_id */ + get: operations["getApiV1ReplyRulesItemsBycookie_idByitem_id"]; + /** putApiV1ReplyRulesItemsBycookie_idByitem_id */ + put: operations["putApiV1ReplyRulesItemsBycookie_idByitem_id"]; + post?: never; + /** deleteApiV1ReplyRulesItemsBycookie_idByitem_id */ + delete: operations["deleteApiV1ReplyRulesItemsBycookie_idByitem_id"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/session": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1Session */ + get: operations["getApiV1Session"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/session/credentials": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1SessionCredentials */ + put: operations["putApiV1SessionCredentials"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/session/initialize": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1SessionInitialize */ + post: operations["postApiV1SessionInitialize"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/session/login": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1SessionLogin */ + post: operations["postApiV1SessionLogin"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/session/logout": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1SessionLogout */ + post: operations["postApiV1SessionLogout"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/session/password": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1SessionPassword */ + post: operations["postApiV1SessionPassword"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/ai-models": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** postApiV1SettingsAiModels */ + post: operations["postApiV1SettingsAiModels"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/ai-reply": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1SettingsAiReply */ + get: operations["getApiV1SettingsAiReply"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/ai-reply/{cookie_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1SettingsAiReplyBycookie_id */ + get: operations["getApiV1SettingsAiReplyBycookie_id"]; + /** putApiV1SettingsAiReplyBycookie_id */ + put: operations["putApiV1SettingsAiReplyBycookie_id"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/system": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1SettingsSystem */ + get: operations["getApiV1SettingsSystem"]; + /** putApiV1SettingsSystem */ + put: operations["putApiV1SettingsSystem"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/system/{key}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** putApiV1SettingsSystemBykey */ + put: operations["putApiV1SettingsSystemBykey"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/system/public": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1SettingsSystemPublic */ + get: operations["getApiV1SettingsSystemPublic"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/user": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1SettingsUser */ + get: operations["getApiV1SettingsUser"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/api/v1/settings/user/{key}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getApiV1SettingsUserBykey */ + get: operations["getApiV1SettingsUserBykey"]; + /** putApiV1SettingsUserBykey */ + put: operations["putApiV1SettingsUserBykey"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** getHealth */ + get: operations["getHealth"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; +} +export type webhooks = Record; +export interface components { + schemas: { + /** @description 统一响应的稳定字段;业务成功字段由各阶段 operation schema 收紧。 */ + ApiResponse: { + success: boolean; + }; + SessionResponse: { + success: boolean; + token?: string | null; + message: string; + user_id?: number; + username?: string; + is_admin: boolean; + }; + LoginRequest: { + username?: string; + password?: string; + email?: string; + verification_code?: string; + }; + InitializeRequest: { + password: string; + }; + PasswordChangeRequest: { + current_password: string; + new_password: string; + }; + PasswordLoginDisabledRequest: { + account_id?: string; + account?: string; + password?: string; + show_browser?: boolean; + }; + CredentialUpdateRequest: { + current_password: string; + new_username: string; + new_password?: string; + }; + QRLoginVerificationRequest: { + target_account_id?: string; + }; + EmptyRequest: Record; + AccountIDList: string[]; + AccountCreateRequest: { + id: string; + value: string; + login_method?: string; + }; + AccountUpdateRequest: { + id?: string; + value: string; + login_method?: string; + last_refresh_at?: number; + }; + AccountMutationResponse: { + success: boolean; + id?: string; + }; + AccountDetailResponse: { + id: string; + has_cookie: boolean; + enabled: boolean; + auto_confirm: boolean; + remark: string; + pause_duration: number; + paused_until: number; + paused: boolean; + show_browser: boolean; + username: string; + nickname: string; + avatar_url: string; + login_method: string; + last_login_at: number; + profile_error: string; + auto_rate_enabled: boolean; + rate_content: string; + auto_polish_enabled: boolean; + polish_time: string; + last_rate_scan_at: number; + last_polish_date: string; + last_polish_at: number; + }; + AccountDetailList: components["schemas"]["AccountDetailResponse"][]; + AccountStatusRequest: { + enabled: boolean; + }; + SessionStatusResponse: { + authenticated: boolean; + initialized: boolean; + user_id?: number; + username?: string; + is_admin: boolean; + }; + OperationResponse: { + success: boolean; + message?: string; + requires_relogin?: boolean; + }; + MessageResponse: { + message: string; + }; + QRLoginGenerateResponse: { + success: boolean; + session_id: string; + qr_code_url: string; + message?: string; + }; + QRLoginStatusResponse: { + success?: boolean; + status: string; + message?: string; + verification_screenshot?: string; + face_qr_url?: string; + session_id?: string; + account_id?: string; + is_new_account?: boolean; + }; + QRLoginVerificationResponse: { + success: boolean; + unb: string; + account_id?: string; + is_new_account?: boolean; + }; + ErrorResponse: { + code: string; + message: string; + request_id?: string; + details?: Record; + } & { + [key: string]: unknown; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; +} +export type $defs = Record; +export interface operations { + getApiV1AccountTasksBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountTasksBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1AccountTasksBycidRun: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountTasksBycidRuns: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1Accounts: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AccountIDList"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1Accounts: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AccountCreateRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AccountMutationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountsBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AccountDetailResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AccountUpdateRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["OperationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1AccountsBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["OperationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountsBycidAutoConfirm: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidAutoConfirm: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidLoginInfo: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountsBycidLongLogin: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidLongLogin: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountsBycidPauseDuration: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidPauseDuration: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1AccountsBycidRefreshProfile: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidRemark: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidSettings: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AccountsBycidStatus: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AccountStatusRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["OperationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountsDetails: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["AccountDetailList"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AccountsRuntimeStatus: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AdminCookies: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AdminNotificationsOutboxUncertain: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1AdminPassword: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AdminStats: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AdminTasks: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AdminUsers: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1AdminUsersByuser_id: { + parameters: { + query?: never; + header?: never; + path: { + user_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AnalyticsDashboard: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AnalyticsOrders: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AnalyticsOrdersValid: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AutomationIssues: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1AutomationPendingTasksBytask_idResolve: { + parameters: { + query?: never; + header?: never; + path: { + task_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1AutomationRules: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1AutomationRules: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1AutomationRulesByrule_id: { + parameters: { + query?: never; + header?: never; + path: { + rule_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1AutomationRulesByrule_id: { + parameters: { + query?: never; + header?: never; + path: { + rule_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1AutomationRunsByrun_idResolve: { + parameters: { + query?: never; + header?: never; + path: { + run_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1Cards: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1Cards: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1CardsBycard_id: { + parameters: { + query?: never; + header?: never; + path: { + card_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1CardsBycard_id: { + parameters: { + query?: never; + header?: never; + path: { + card_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1CardsBycard_id: { + parameters: { + query?: never; + header?: never; + path: { + card_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1CardsBycard_idAppendData: { + parameters: { + query?: never; + header?: never; + path: { + card_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1CardsBycard_idDetails: { + parameters: { + query?: never; + header?: never; + path: { + card_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1CardsBatch: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ChatImages: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ChatMessages: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ChatMessages: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ChatRead: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ChatSessions: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ChatWs: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description WebSocket 握手成功 */ + 101: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1DefaultReplies: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1DefaultRepliesBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1DefaultRepliesBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1DefaultRepliesBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1DefaultRepliesBycidClearRecords: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1DefaultRepliesList: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1Items: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsBycookie_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ItemsBycookie_idByitem_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1ItemsBycookie_idByitem_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1ItemsBycookie_idByitem_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1ItemsBycookie_idByitem_idMultiQuantityDelivery: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1ItemsBycookie_idByitem_idMultiSpec: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ItemsCookieBycookie_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsGetAllFromAccount: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsGetByPage: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsPublish: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ItemsPublishBatches: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsPublishBatches: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ItemsPublishBatchesBybatch_id: { + parameters: { + query?: never; + header?: never; + path: { + batch_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1ItemsPublishBatchesBybatch_id: { + parameters: { + query?: never; + header?: never; + path: { + batch_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsPublishBatchesBybatch_idCancel: { + parameters: { + query?: never; + header?: never; + path: { + batch_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ItemsPublishBatchesBybatch_idResultCsv: { + parameters: { + query?: never; + header?: never; + path: { + batch_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description CSV 文件 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "text/csv": string; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsPublishBatchesBybatch_idRetryFailed: { + parameters: { + query?: never; + header?: never; + path: { + batch_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsPublishBatchesPreview: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ItemsPublishCategoriesRecommend: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1NotificationsAccountsBycidBindings: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1NotificationsAccountsBycidBindings: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1NotificationsChannels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1NotificationsChannels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1NotificationsChannelsBychannel_id: { + parameters: { + query?: never; + header?: never; + path: { + channel_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1NotificationsChannelsBychannel_id: { + parameters: { + query?: never; + header?: never; + path: { + channel_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1NotificationsChannelsBychannel_idTest: { + parameters: { + query?: never; + header?: never; + path: { + channel_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1NotificationsMessages: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1NotificationsMessagesBynotification_id: { + parameters: { + query?: never; + header?: never; + path: { + notification_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1NotificationsMessagesAccountBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1NotificationsOutboxUncertain: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1Orders: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1OrdersByorder_id: { + parameters: { + query?: never; + header?: never; + path: { + order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1OrdersByorder_id: { + parameters: { + query?: never; + header?: never; + path: { + order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1OrdersByorder_id: { + parameters: { + query?: never; + header?: never; + path: { + order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1OrdersByorder_idRefresh: { + parameters: { + query?: never; + header?: never; + path: { + order_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1OrdersImport: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1OrdersManualShip: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1OrdersRefresh: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1OrdersRefreshByjob_id: { + parameters: { + query?: never; + header?: never; + path: { + job_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1OrdersRefreshByjob_id: { + parameters: { + query?: never; + header?: never; + path: { + job_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1PasswordLogin: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PasswordLoginDisabledRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 密码登录已永久关闭 */ + 501: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1PasswordLoginCancelBysession_id: { + parameters: { + query?: never; + header?: never; + path: { + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 密码登录已永久关闭 */ + 501: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1PasswordLoginCheckBysession_id: { + parameters: { + query?: never; + header?: never; + path: { + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 密码登录已永久关闭 */ + 501: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1QrLoginCheckBysession_id: { + parameters: { + query?: never; + header?: never; + path: { + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QRLoginStatusResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1QrLoginCompleteVerificationBysession_id: { + parameters: { + query?: never; + header?: never; + path: { + session_id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["QRLoginVerificationRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QRLoginVerificationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1QrLoginGenerate: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QRLoginGenerateResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1QrLoginStatusBysession_id: { + parameters: { + query?: never; + header?: never; + path: { + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QRLoginStatusResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ReplyRulesBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ReplyRulesBycid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1ReplyRulesBycidIndexByindex: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + index: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ReplyRulesBycidItems: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1ReplyRulesBycidItems: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ReplyRulesBycidTyped: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1ReplyRulesBycidTypedByid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1ReplyRulesBycidTypedByid: { + parameters: { + query?: never; + header?: never; + path: { + cid: string; + id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ReplyRulesItems: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1ReplyRulesItemsBycookie_idByitem_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1ReplyRulesItemsBycookie_idByitem_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + deleteApiV1ReplyRulesItemsBycookie_idByitem_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + item_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1Session: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SessionStatusResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1SessionCredentials: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["CredentialUpdateRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["OperationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1SessionInitialize: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["InitializeRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SessionResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1SessionLogin: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["LoginRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SessionResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1SessionLogout: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["EmptyRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["MessageResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1SessionPassword: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PasswordChangeRequest"]; + }; + }; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["OperationResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + postApiV1SettingsAiModels: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1SettingsAiReply: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1SettingsAiReplyBycookie_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1SettingsAiReplyBycookie_id: { + parameters: { + query?: never; + header?: never; + path: { + cookie_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1SettingsSystem: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1SettingsSystem: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1SettingsSystemBykey: { + parameters: { + query?: never; + header?: never; + path: { + key: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1SettingsSystemPublic: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1SettingsUser: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getApiV1SettingsUserBykey: { + parameters: { + query?: never; + header?: never; + path: { + key: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + putApiV1SettingsUserBykey: { + parameters: { + query?: never; + header?: never; + path: { + key: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; + getHealth: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description 成功 */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ApiResponse"]; + }; + }; + /** @description 统一错误响应 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 403: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description 统一错误响应 */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + }; + }; +} diff --git a/go.mod b/go.mod index b0ab300..2a597ad 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.26.4 require ( fyne.io/systray v1.12.2 github.com/coder/websocket v1.8.15 + github.com/getkin/kin-openapi v0.147.0 github.com/go-chi/chi/v5 v5.3.0 github.com/go-sql-driver/mysql v1.10.0 github.com/jackc/pgx/v5 v5.10.0 @@ -24,16 +25,21 @@ require ( github.com/deckarep/golang-set/v2 v2.8.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/go-jose/go-jose/v3 v3.0.5 // indirect + github.com/go-openapi/jsonpointer v0.22.5 // indirect + github.com/go-openapi/swag/jsonname v0.25.5 // indirect github.com/go-stack/stack v1.8.1 // indirect - github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/google/uuid v1.6.0 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect github.com/jackc/puddle/v2 v2.2.2 // indirect github.com/mattn/go-isatty v0.0.21 // indirect github.com/mfridman/interpolate v0.0.2 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/oasdiff/yaml v0.1.1 // indirect + github.com/oasdiff/yaml3 v0.0.14 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect github.com/sethvargo/go-retry v0.3.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/text v0.36.0 // indirect diff --git a/go.sum b/go.sum index 3599ec7..3c0bb6e 100644 --- a/go.sum +++ b/go.sum @@ -9,12 +9,22 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.8.0 h1:swm0rlPCmdWn9mESxKOjWk8hXSqoxOp+ZlfuyaAdFlQ= github.com/deckarep/golang-set/v2 v2.8.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= +github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI= +github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/getkin/kin-openapi v0.147.0 h1:s+Xsm9gUMPJbgCnABZ2to3zSQQ5A9dyj/zo62VVsldY= +github.com/getkin/kin-openapi v0.147.0/go.mod h1:3BH9M9XDe/y9M5DSvEocVYAYq1w0qrhJHjC/vZi0AaY= github.com/go-chi/chi/v5 v5.3.0 h1:halUjDxhshgXHMrao5bB8eNBXo/rnzwr8m5m36glehM= github.com/go-chi/chi/v5 v5.3.0/go.mod h1:R+tYY2hNuVUUjxoPtqUdgBqevM9s9njzkTLutVsOCto= github.com/go-jose/go-jose/v3 v3.0.5 h1:BLLJWbC4nMZOfuPVxoZIxeYsn6Nl2r1fITaJ78UQlVQ= github.com/go-jose/go-jose/v3 v3.0.5/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ= +github.com/go-openapi/jsonpointer v0.22.5 h1:8on/0Yp4uTb9f4XvTrM2+1CPrV05QPZXu+rvu2o9jcA= +github.com/go-openapi/jsonpointer v0.22.5/go.mod h1:gyUR3sCvGSWchA2sUBJGluYMbe1zazrYWIkWPjjMUY0= +github.com/go-openapi/swag/jsonname v0.25.5 h1:8p150i44rv/Drip4vWI3kGi9+4W9TdI3US3uUYSFhSo= +github.com/go-openapi/swag/jsonname v0.25.5/go.mod h1:jNqqikyiAK56uS7n8sLkdaNY/uq6+D2m2LANat09pKU= +github.com/go-openapi/testify/v2 v2.4.0 h1:8nsPrHVCWkQ4p8h1EsRVymA2XABB4OT40gcvAu+voFM= +github.com/go-openapi/testify/v2 v2.4.0/go.mod h1:HCPmvFFnheKK2BuwSA0TbbdxJ3I16pjwMkYkP4Ywn54= github.com/go-sql-driver/mysql v1.10.0 h1:Q+1LV8DkHJvSYAdR83XzuhDaTykuDx0l6fkXxoWCWfw= github.com/go-sql-driver/mysql v1.10.0/go.mod h1:M+cqaI7+xxXGG9swrdeUIoPG3Y3KCkF0pZej+SK+nWk= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= @@ -36,6 +46,10 @@ github.com/jackc/pgx/v5 v5.10.0 h1:VhSvgU2jSli8o3AqIEOTJr7rZwAEUVo4E4XhR94Zfr0= github.com/jackc/pgx/v5 v5.10.0/go.mod h1:mal1tBGAFfLHvZzaYh77YS/eC6IX9OWbRV1QIIM0Jn4= github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo= github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs= github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4= github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= @@ -44,12 +58,20 @@ github.com/mxschmitt/playwright-go v0.6100.0 h1:HYNnbGZsTHz8veJyDGe4fU1iPxfvXqzm github.com/mxschmitt/playwright-go v0.6100.0/go.mod h1:A7VtrS3j/c8ToGnSVUaOfNtQQVxi6JotUS0jeuus6r4= github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/oasdiff/yaml v0.1.1 h1:6nHx+pn9gBRM6YpBlFZFQGCCd1nuvqOBtTD3KKTgGxY= +github.com/oasdiff/yaml v0.1.1/go.mod h1:EYJNoyktvWMJ0Hmhx+6qTaqMOsalUaRGT8Sj1hNcegU= +github.com/oasdiff/yaml3 v0.0.14 h1:aLJee3hxBK2H5wdXd9iPcIXb93Nty1Ge0pT171eHtkw= +github.com/oasdiff/yaml3 v0.0.14/go.mod h1:csto2xfDjYccdUn/yw/bPjj/cYTdp6HtFA0J4TWG+gg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pressly/goose/v3 v3.27.1 h1:6uEvcprBybDmW4hcz3gYujhARhye+GoWKhEWyzD5sh4= github.com/pressly/goose/v3 v3.27.1/go.mod h1:maruOxsPnIG2yHHyo8UqKWXYKFcH7Q76csUV7+7KYoM= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 h1:KRzFb2m7YtdldCEkzs6KqmJw4nqEVZGK7IN2kJkjTuQ= +github.com/santhosh-tekuri/jsonschema/v6 v6.0.2/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU= github.com/sashabaranov/go-openai v1.41.2 h1:vfPRBZNMpnqu8ELsclWcAvF19lDNgh1t6TVfFFOPiSM= github.com/sashabaranov/go-openai v1.41.2/go.mod h1:lj5b/K+zjTSFxVLijLSTDZuP7adOgerWeFyZLUhAKRg= github.com/sethvargo/go-retry v0.3.0 h1:EEt31A35QhrcRZtrYFDTBg91cqZVnFL2navjDrah2SE= @@ -116,6 +138,8 @@ golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/server/openapi_route_contract_test.go b/internal/server/openapi_route_contract_test.go new file mode 100644 index 0000000..1cbd56e --- /dev/null +++ b/internal/server/openapi_route_contract_test.go @@ -0,0 +1,64 @@ +package server + +import ( + "context" + "net/http" + "path/filepath" + "strings" + "testing" + + "github.com/getkin/kin-openapi/openapi3" + "github.com/go-chi/chi/v5" +) + +// TestOpenAPIRoutesMatchRouter 验证 OpenAPI 与实际 chi 路由树双向覆盖,包含动态 prefix 挂载的订单刷新路由。 +func TestOpenAPIRoutesMatchRouter(t *testing.T) { + // specPath 是从 Server 包测试工作目录定位到唯一 OpenAPI 契约源的绝对路径。 + specPath := filepath.Join("..", "..", "api", "openapi.yaml") + // document、loadErr 分别是已解析规范及其加载失败原因。 + document, loadErr := openapi3.NewLoader().LoadFromFile(specPath) + if loadErr != nil { + t.Fatalf("加载 OpenAPI 契约失败: %v", loadErr) + } + // validationErr 表示规范不满足 OpenAPI 语义规则的原因。 + if validationErr := document.Validate(context.Background()); validationErr != nil { + t.Fatalf("OpenAPI 契约无效: %v", validationErr) + } + // server、_、cleanup 分别是完整 chi Router、测试数据库句柄和资源释放函数。 + server, _, cleanup := newTestServer(t) + defer cleanup() + // actualRoutes 保存 Router 实际暴露的版本化 HTTP operation。 + actualRoutes := make(map[string]struct{}) + // walkErr 表示 chi 遍历路由树失败的原因。 + walkErr := chi.Walk(server.Router(), func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error { + // handler、middlewares 是 chi 提供的实际终点与中间件链;本测试仅校验方法和路径。 + _ = handler + _ = middlewares + // canonical 表示当前路由是否必须由 OpenAPI 登记。 + canonical := route == "/health" || strings.HasPrefix(route, "/api/v1/") + if canonical { + actualRoutes[strings.ToLower(method)+" "+route] = struct{}{} + } + return nil + }) + if walkErr != nil { + t.Fatalf("遍历 chi 路由树失败: %v", walkErr) + } + // specRoutes 保存文档登记的版本化 HTTP operation。 + specRoutes := make(map[string]struct{}) + for _, path := range document.Paths.Keys() { // path 是当前 OpenAPI 路径模板。 + for method := range document.Paths.Find(path).Operations() { // method 是当前路径声明的 HTTP 方法。 + specRoutes[strings.ToLower(method)+" "+path] = struct{}{} + } + } + for route := range actualRoutes { // route 是实际 Router 中需要契约覆盖的 operation。 + if _, exists := specRoutes[route]; !exists { + t.Errorf("实际路由未登记到 OpenAPI: %s", route) + } + } + for route := range specRoutes { // route 是 OpenAPI 中必须有真实 Router 对应项的 operation。 + if _, exists := actualRoutes[route]; !exists { + t.Errorf("OpenAPI 路由不存在于实际 Router: %s", route) + } + } +} diff --git a/internal/server/server.go b/internal/server/server.go index abc3968..b1d1a36 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -126,7 +126,7 @@ func (s *Server) recoverExpiredSession(ctx context.Context, cookieID string, err } // Router 构建完整路由树。 -func (s *Server) Router() http.Handler { +func (s *Server) Router() chi.Router { // r 用于本次流程后续判断的r r := chi.NewRouter() r.Use(middleware.RequestID) diff --git a/tools/apicheck/main.go b/tools/apicheck/main.go new file mode 100644 index 0000000..a6afd78 --- /dev/null +++ b/tools/apicheck/main.go @@ -0,0 +1,141 @@ +// apicheck 校验 OpenAPI 文档、版本化路由登记和生成契约的结构约束。 +package main + +import ( + "context" + "fmt" + "os" + "path/filepath" + "regexp" + "sort" + "strings" + + "github.com/getkin/kin-openapi/openapi3" +) + +// routeKey 是路由方法与路径的稳定组合键。 +type routeKey struct { + // method 是小写 HTTP 方法。 + method string + // path 是 chi 路由路径。 + path string +} + +// main 加载并验证 OpenAPI 文档,同时检查真实版本化路由的双向覆盖。 +func main() { + // root 是待检查仓库根目录,默认使用当前工作目录。 + root := "." + if len(os.Args) > 1 { + root = os.Args[1] + } + // violations、err 分别是契约检查结果和执行失败原因。 + violations, err := check(root) + if err != nil { + fmt.Fprintf(os.Stderr, "api-check: %v\n", err) + os.Exit(1) + } + for _, violation := range violations { // violation 是待输出的单条契约违规。 + fmt.Fprintln(os.Stderr, violation) + } + if len(violations) > 0 { + os.Exit(1) + } + fmt.Println("api-check: 通过") +} + +// check 执行规范语法、operation 元数据和路由双向覆盖检查。 +func check(root string) ([]string, error) { + // specPath 是仓库中唯一 OpenAPI 契约文件路径。 + specPath := filepath.Join(root, "api", "openapi.yaml") + // document、err 分别是解析后的 OpenAPI 文档和加载失败原因。 + document, err := openapi3.NewLoader().LoadFromFile(specPath) + if err != nil { + return nil, fmt.Errorf("加载 OpenAPI 失败: %w", err) + } + // err 是 OpenAPI 语义校验失败原因。 + if err := document.Validate(context.Background()); err != nil { + return nil, fmt.Errorf("OpenAPI 规范无效: %w", err) + } + // violations 保存规范结构和路由覆盖的全部问题。 + var violations []string + for _, path := range document.Paths.Keys() { // path 是当前 OpenAPI 路径模板。 + // item 是当前路径的所有 HTTP operation 集合。 + item := document.Paths.Find(path) + for method, operation := range item.Operations() { // method、operation 是当前 HTTP 方法和定义。 + method = strings.ToLower(method) + if operation.OperationID == "" { + violations = append(violations, fmt.Sprintf("%s %s 缺少 operationId", strings.ToUpper(method), path)) + } + if operation.Responses == nil || operation.Responses.Value("200") == nil && operation.Responses.Value("101") == nil { + violations = append(violations, fmt.Sprintf("%s %s 缺少成功响应", strings.ToUpper(method), path)) + } + if operation.Responses == nil || operation.Responses.Value("400") == nil || operation.Responses.Value("401") == nil { + violations = append(violations, fmt.Sprintf("%s %s 缺少统一错误响应", strings.ToUpper(method), path)) + } + if operation.Security == nil { + violations = append(violations, fmt.Sprintf("%s %s 缺少鉴权元数据", strings.ToUpper(method), path)) + } + } + } + // routes、err 分别是真实版本化路由集合和收集失败原因。 + routes, err := sourceRoutes(filepath.Join(root, "internal", "server")) + if err != nil { + return nil, err + } + // specRoutes 保存规范登记的路由方法和路径组合键。 + specRoutes := make(map[routeKey]struct{}) + for _, path := range document.Paths.Keys() { // path 是当前规范路径模板。 + for method := range document.Paths.Find(path).Operations() { // method 是当前规范 HTTP 方法。 + specRoutes[routeKey{method: strings.ToLower(method), path: path}] = struct{}{} + } + } + for route := range routes { // route 是真实 Router 中发现的 operation。 + // exists 表示真实 operation 是否已经登记到 OpenAPI。 + if _, exists := specRoutes[route]; !exists { + violations = append(violations, fmt.Sprintf("真实路由 %s %s 未登记到 api/openapi.yaml", strings.ToUpper(route.method), route.path)) + } + } + for route := range specRoutes { // route 是规范中声明的 operation。 + // exists 表示规范 operation 是否存在真实版本化路由。 + if _, exists := routes[route]; !exists { + violations = append(violations, fmt.Sprintf("OpenAPI 登记 %s %s 不存在真实版本化路由", strings.ToUpper(route.method), route.path)) + } + } + sort.Strings(violations) + return violations, nil +} + +// sourceRoutes 从版本化 route 文件和动态订单刷新挂载点收集真实路由。 +func sourceRoutes(serverDir string) (map[routeKey]struct{}, error) { + // methodPattern 匹配版本化文件中的静态 chi 方法调用。 + methodPattern := regexp.MustCompile(`r\.(Get|Post|Put|Patch|Delete)\("([^"\n]+)"`) + // routes 保存扫描到的真实版本化路由。 + routes := make(map[routeKey]struct{}) + // entries、err 分别是路由目录项和读取失败原因。 + entries, err := os.ReadDir(serverDir) + if err != nil { + return nil, fmt.Errorf("读取 Server 路由目录失败: %w", err) + } + for _, entry := range entries { // entry 是当前版本化路由源文件目录项。 + if entry.IsDir() || !strings.HasPrefix(entry.Name(), "versioned_") || !strings.HasSuffix(entry.Name(), ".go") { + continue + } + // source、readErr 分别是路由源码和读取失败原因。 + source, readErr := os.ReadFile(filepath.Join(serverDir, entry.Name())) + if readErr != nil { + return nil, fmt.Errorf("读取路由文件 %s 失败: %w", entry.Name(), readErr) + } + for _, match := range methodPattern.FindAllSubmatch(source, -1) { // match 是当前静态路由匹配结果。 + // path 是匹配结果中的 chi 路由路径。 + path := string(match[2]) + if path == "/health" || strings.HasPrefix(path, "/api/v1/") { + routes[routeKey{method: strings.ToLower(string(match[1])), path: path}] = struct{}{} + } + } + } + // mountOrderRefreshJobRoutes 使用 prefix 拼接路径,静态正则无法看到其三个 operation。 + routes[routeKey{method: "post", path: "/api/v1/orders/refresh"}] = struct{}{} + routes[routeKey{method: "get", path: "/api/v1/orders/refresh/{job_id}"}] = struct{}{} + routes[routeKey{method: "delete", path: "/api/v1/orders/refresh/{job_id}"}] = struct{}{} + return routes, nil +} diff --git a/tools/apicheck/main_test.go b/tools/apicheck/main_test.go new file mode 100644 index 0000000..2ca23a0 --- /dev/null +++ b/tools/apicheck/main_test.go @@ -0,0 +1,40 @@ +package main + +import ( + "os" + "path/filepath" + "testing" +) + +// TestSourceRoutesIncludesDynamicOrderRefresh 验证动态 prefix 挂载的订单刷新 operation 不会从路由登记中遗漏。 +func TestSourceRoutesIncludesDynamicOrderRefresh(t *testing.T) { + // serverDir 是本测试构造的版本化路由源码目录。 + serverDir := t.TempDir() + // source 是包含一个静态路由的最小 chi 路由源码夹具。 + source := []byte(`package server +func mount(r any) { + r.Get("/api/v1/session", nil) +} +`) + // writeErr 是写入路由源码夹具失败的原因。 + if writeErr := os.WriteFile(filepath.Join(serverDir, "versioned_session_routes.go"), source, 0o600); writeErr != nil { + t.Fatal(writeErr) + } + // routes、readErr 分别是收集到的路由集合和读取失败原因。 + routes, readErr := sourceRoutes(serverDir) + if readErr != nil { + t.Fatal(readErr) + } + // expected 是动态订单刷新 POST operation 的稳定键。 + expected := routeKey{method: "post", path: "/api/v1/orders/refresh"} + // exists 表示动态订单刷新 operation 是否已被发现。 + if _, exists := routes[expected]; !exists { + t.Fatalf("动态订单刷新路由未登记: %+v", routes) + } + // staticRoute 是夹具中的静态 session operation。 + staticRoute := routeKey{method: "get", path: "/api/v1/session"} + // exists 表示静态 session operation 是否已被发现。 + if _, exists := routes[staticRoute]; !exists { + t.Fatalf("静态路由未登记: %+v", routes) + } +} diff --git a/tools/architecturecheck/dto_field_contract.go b/tools/architecturecheck/dto_field_contract.go deleted file mode 100644 index 725745f..0000000 --- a/tools/architecturecheck/dto_field_contract.go +++ /dev/null @@ -1,565 +0,0 @@ -package main - -import ( - "fmt" - "go/ast" - "go/parser" - "go/token" - "os" - "path/filepath" - "regexp" - "sort" - "strings" -) - -// frontendDTOContractSpec 描述共享前端传输 DTO 与 Server 具名响应 DTO 的字段契约。 -type frontendDTOContractSpec struct { - // frontendPath 是 DTO 所在的前端源码相对路径;为空时使用共享 transport 文件。 - frontendPath string - // frontendType 是 frontend/shared/api-contract/transport.ts 中的导出接口名称。 - frontendType string - // backendType 是 internal/server 中实际写入 JSON 的具名响应类型名称;为空表示仅由 feature 归一的组合类型。 - backendType string - // rationale 说明没有一一对应 Server DTO 的组合类型为何仍允许存在。 - rationale string -} - -// frontendDTOContractSpecs 覆盖共享 transport 文件全部导出的对象 DTO。直接 HTTP DTO 必须指定 Server DTO; -// 只有 feature 对多个响应、动态设置或嵌套行 DTO 归一后产生的类型可以不指定后端类型。 -var frontendDTOContractSpecs = []frontendDTOContractSpec{ - {frontendPath: "frontend/app/features/session/api.ts", frontendType: "SessionStatusResponse", backendType: "sessionVerificationResponse"}, - {frontendPath: "frontend/app/features/accounts/api.ts", frontendType: "AccountRuntimeStatus", rationale: "运行状态接口返回按账号 ID 索引的应用层状态映射,feature 只定义映射值形状。"}, - {frontendPath: "frontend/app/features/accounts/api.ts", frontendType: "LongLoginSettings", backendType: "longLoginResponse"}, - {frontendPath: "frontend/app/features/accounts/api.ts", frontendType: "PasswordLoginStartResponse", rationale: "密码登录兼容接口已永久禁用,实际响应使用统一错误信封;该类型仅保留历史调用编译兼容。"}, - {frontendPath: "frontend/app/features/accounts/api.ts", frontendType: "PasswordLoginStatusResponse", rationale: "密码登录兼容接口已永久禁用,实际响应使用统一错误信封;该类型仅保留历史调用编译兼容。"}, - {frontendPath: "frontend/app/features/chat/api.ts", frontendType: "ChatSessionPage", backendType: "chatSessionPageResponse"}, - {frontendPath: "frontend/app/features/chat/api.ts", frontendType: "ChatMessagePage", backendType: "chatMessagePageResponse"}, - {frontendPath: "frontend/app/features/dashboard/api.ts", frontendType: "ValidOrdersResult", rationale: "dashboard adapter 从 ValidOrdersResponse 归一订单状态并派生 orders/truncated。"}, - {frontendPath: "frontend/app/features/rules/api.ts", frontendType: "AutomationRunIssue", backendType: "automationRunIssueDTO"}, - {frontendPath: "frontend/app/features/rules/api.ts", frontendType: "DeferredAutomationIssue", backendType: "deferredAutomationIssueDTO"}, - {frontendPath: "frontend/app/features/settings/api.ts", frontendType: "SettingsSessionStatusResponse", backendType: "sessionVerificationResponse"}, - {frontendPath: "frontend/app/features/system/types.ts", frontendType: "BuildInfo", backendType: "healthResponse"}, - {frontendType: "PublishLocation", rationale: "发货地由 items feature 的高德地图适配器获取,不经过本服务 HTTP Server。"}, - {frontendType: "AccountDetail", rationale: "账号页面 UI 模型由 AccountSummaryResponse 和运行状态索引归一,包含前端派生状态而非单一 Server 响应。"}, - {frontendType: "AccountTaskSettings", backendType: "accountTaskSettingsResponse"}, - {frontendType: "AccountTaskSummary", backendType: "accountTaskSummaryResponse"}, - {frontendType: "ChatSession", backendType: "chatSessionDTO"}, - {frontendType: "ChatMessage", backendType: "chatMessageDTO"}, - {frontendType: "Order", rationale: "订单列表 feature 由 orderDTO 归一,补充本地 id 并将数量和状态转换为 UI 值。"}, - {frontendType: "Card", backendType: "cardResponse"}, - {frontendType: "Item", backendType: "itemListResponse"}, - {frontendType: "ShippingRule", rationale: "规则编辑器从 AutomationRuleResponse 解析动作配置并派生 card_group 与 variants。"}, - {frontendType: "AutomationAction", backendType: "automationActionResponse"}, - {frontendType: "ShippingVariant", rationale: "规格变体由自动化动作的 config_json 解码后产生,不是独立 HTTP DTO。"}, - {frontendType: "ReplyRule", rationale: "关键词接口的 KeywordTypedResponse 在 feature adapter 中转换为回复规则 UI 模型。"}, - {frontendType: "AdminStats", backendType: "adminStatsResponse"}, - {frontendType: "DashboardStats", backendType: "dashboardStatsResponse"}, - {frontendType: "OrderAnalytics", backendType: "orderAnalyticsResponse"}, - {frontendType: "SystemSettings", rationale: "设置接口保留历史动态键形状,且 adapter 将敏感值归一为已配置状态,不能静态映射到单一结构体。"}, - {frontendType: "AIReplySettings", backendType: "aiReplySettingsResponse"}, - {frontendType: "DefaultReply", backendType: "defaultReplyResponse"}, - {frontendType: "NotificationChannel", rationale: "通知编辑器 UI 模型不会接收渠道秘密配置;adapter 为新建/编辑表单构造空配置。"}, - {frontendType: "SessionResponse", backendType: "loginResponse"}, - {frontendType: "PaginatedResponse", rationale: "分页泛型由订单和自动化规则等不同 Server 响应复用,feature adapter 负责按端点归一。"}, - {frontendType: "ApiErrorResponse", rationale: "统一错误信封由 internal/httpapi 写入,不属于 internal/server 的成功响应 DTO。"}, - {frontendType: "AccountSummaryResponse", backendType: "cookieSummaryResponse"}, - {frontendType: "CookieSettingsResponse", backendType: "cookieSettingsResponse"}, - {frontendType: "CookieProfileResponse", backendType: "cookieProfileResponse"}, - {frontendType: "PauseDurationResponse", backendType: "pauseDurationResponse"}, - {frontendType: "ItemDetailResponse", backendType: "itemDetailResponse"}, - {frontendType: "ItemPublishResponse", backendType: "itemPublishResponse"}, - {frontendType: "ItemSyncResponse", backendType: "itemSyncResponse"}, - {frontendType: "ItemPageSyncResponse", backendType: "itemPageSyncResponse"}, - {frontendType: "OrderDTOResponse", backendType: "orderDTO"}, - {frontendType: "OrderDetailResponse", backendType: "orderDetailResponse"}, - {frontendType: "OrderRefreshDetailResponse", backendType: "orderRefreshDetailResponse"}, - {frontendType: "OrderSingleRefreshResponse", backendType: "orderSingleRefreshResponse"}, - {frontendType: "AutomationActionResponse", backendType: "automationActionResponse"}, - {frontendType: "AutomationRuleResponse", backendType: "automationRuleResponse"}, - {frontendType: "AutomationRulePageResponse", backendType: "automationRulePageResponse"}, - {frontendType: "AIReplySettingsResponse", backendType: "aiReplySettingsResponse"}, - {frontendType: "AIModelsResponse", backendType: "aiModelsResponse"}, - {frontendType: "UserSettingResponse", backendType: "userSettingResponse"}, - {frontendType: "CardBatchResponse", backendType: "cardBatchResponse"}, - {frontendType: "CardBatchResult", backendType: "cardBatchResultRow"}, - {frontendType: "CardAppendResponse", backendType: "cardAppendResponse"}, - {frontendType: "NotificationBinding", rationale: "消息通知接口以账号 ID 为外层动态键,adapter 展平列表时将该键补为 cookie_id。"}, - {frontendType: "AccountBindingsResponse", backendType: "accountBindingsResponse"}, - {frontendType: "CategoryRecommendationResponse", backendType: "categoryRecommendationResponse"}, - {frontendType: "ItemPublishBatchPreviewRow", backendType: "publishBatchPreviewRow"}, - {frontendType: "ItemPublishBatchPreviewResponse", backendType: "itemPublishBatchPreviewResponse"}, - {frontendType: "BatchIDResponse", backendType: "batchIDResponse"}, - {frontendType: "BatchCancelResponse", backendType: "batchCancelResponse"}, - {frontendType: "ItemPublishBatchRowResponse", backendType: "itemPublishBatchRowResponse"}, - {frontendType: "ItemPublishBatchResponse", backendType: "itemPublishBatchResponse"}, - {frontendType: "ItemPublishBatchListResponse", backendType: "itemPublishBatchListResponse"}, - {frontendType: "MutationIDResponse", backendType: "mutationIDResponse"}, - {frontendType: "OperationResponse", backendType: "operationResponse"}, - {frontendType: "NotificationChannelResponse", backendType: "notificationChannelResponse"}, - {frontendType: "KeywordBasicResponse", backendType: "keywordBasicResponse"}, - {frontendType: "KeywordItemResponse", backendType: "keywordItemResponse"}, - {frontendType: "KeywordTypedResponse", backendType: "keywordTypedResponse"}, - {frontendType: "ItemReplyResponse", backendType: "itemReplyResponse"}, - {frontendType: "DefaultReplyResponse", backendType: "defaultReplyResponse"}, - {frontendType: "AccountTaskSettingsResponse", backendType: "accountTaskSettingsResponse"}, - {frontendType: "AccountTaskRunResponse", backendType: "accountTaskRunResponse"}, - {frontendType: "AccountTaskRunsResponse", backendType: "accountTaskRunsResponse"}, - {frontendType: "AccountTaskSummaryResponse", backendType: "accountTaskSummaryResponse"}, - {frontendType: "AccountTaskRunResponseEnvelope", backendType: "accountTaskRunResponseEnvelope"}, - {frontendType: "AdminUserResponse", backendType: "adminUserResponse"}, - {frontendType: "AdminCookieResponse", backendType: "adminCookieResponse"}, - {frontendType: "AdminStatsResponse", backendType: "adminStatsResponse"}, - {frontendType: "DashboardStatsResponse", backendType: "dashboardStatsResponse"}, - {frontendType: "AnalyticsRevenueStatsResponse", backendType: "analyticsRevenueStatsResponse"}, - {frontendType: "AnalyticsDailyStatsResponse", backendType: "analyticsDailyStatsResponse"}, - {frontendType: "AnalyticsStatusStatsResponse", backendType: "analyticsStatusStatsResponse"}, - {frontendType: "AnalyticsCityStatsResponse", backendType: "analyticsCityStatsResponse"}, - {frontendType: "AnalyticsItemStatsResponse", backendType: "analyticsItemStatsResponse"}, - {frontendType: "OrderAnalyticsResponse", backendType: "orderAnalyticsResponse"}, - {frontendType: "ValidOrderResponse", backendType: "validOrderResponse"}, - {frontendType: "ValidOrdersResponse", backendType: "validOrdersResponse"}, - {frontendType: "QRLoginGenerateResponse", backendType: "qrLoginGenerateResponse"}, - {frontendType: "QRLoginStatusResponse", backendType: "qrLoginStatusResponse"}, - {frontendType: "QRLoginVerificationResponse", backendType: "qrLoginVerificationResponse"}, - {frontendType: "OrderRefreshResultResponse", backendType: "orderRefreshResultDTO"}, - {frontendType: "OrderRefreshSummaryResponse", backendType: "orderRefreshSummary"}, - {frontendType: "OrderRefreshResponse", backendType: "orderRefreshResponse"}, - {frontendType: "OrderRefreshJobStartResponse", backendType: "orderRefreshJobStartResponse"}, - {frontendType: "OrderRefreshJobStatusResponse", backendType: "orderRefreshJobStatusResponse"}, - {frontendType: "OrderRefreshJobCancelResponse", backendType: "orderRefreshJobCancelResponse"}, - {frontendType: "CardListResponse", rationale: "卡券接口直接返回 cardResponse 数组,前端仅用此类型表达历史包装。"}, - {frontendType: "OrderBatchResponse", rationale: "导入与发货端点使用不同 Server 响应 DTO,feature 将其归一为同一批量结果。"}, - {frontendType: "OrderBatchResult", rationale: "批量发货与导入的逐行 DTO 不同,feature 只保留共同展示字段。"}, - {frontendType: "ItemListEnvelope", rationale: "商品列表兼容端点同时支持数组和历史包装,feature adapter 负责归一。"}, - {frontendType: "AutomationIssuesEnvelope", rationale: "自动化问题响应由两个 Server 行 DTO 组合,feature adapter 不直接透传。"}, -} - -// checkFrontendDTOFieldContracts 验证前端共享对象 DTO 已登记,且直接 HTTP DTO 的每个字段都由 Server 显式提供。 -func checkFrontendDTOFieldContracts(root string) []violation { - // frontendPath 是共享前端传输契约的唯一源文件。 - frontendPath := filepath.Join(root, "frontend", "shared", "api-contract", "transport.ts") - // frontendRaw、frontendReadErr 分别是前端契约源码及其读取错误。 - frontendRaw, frontendReadErr := os.ReadFile(frontendPath) - if frontendReadErr != nil { - return []violation{{file: "frontend/shared/api-contract/transport.ts", line: 1, message: fmt.Sprintf("无法读取前端 DTO 契约: %v", frontendReadErr)}} - } - // frontendFields、frontendLines 分别保存 TypeScript 对象 DTO 字段和其声明行。 - frontendFields, frontendLines := parseFrontendResponseFields(string(frontendRaw)) - // frontendPaths 保存每个已解析 DTO 对应的实际源码路径。 - frontendPaths := make(map[string]string, len(frontendFields)) - // typeName 是共享契约中的当前 DTO 名称。 - for typeName := range frontendFields { - frontendPaths[typeName] = "frontend/shared/api-contract/transport.ts" - } - // featureSources 保存全部 feature API DTO 源码及注册表中的额外 DTO 源码。 - featureSources := make(map[string]struct{}) - // featureAPIFiles 是所有 feature API 适配器路径;新增响应 DTO 必须自动进入门禁。 - featureAPIFiles, featureGlobErr := filepath.Glob(filepath.Join(root, "frontend", "app", "features", "*", "api.ts")) - if featureGlobErr != nil { - return []violation{{file: "frontend/app/features", line: 1, message: fmt.Sprintf("无法枚举 feature DTO 契约: %v", featureGlobErr)}} - } - // featureAPIFile 是当前需要纳入扫描的 feature API 文件绝对路径。 - for _, featureAPIFile := range featureAPIFiles { - // relativePath 是当前 feature API 文件相对于仓库根的稳定路径。 - relativePath, relativeErr := filepath.Rel(root, featureAPIFile) - if relativeErr != nil { - return []violation{{file: "frontend/app/features", line: 1, message: fmt.Sprintf("无法规范 feature DTO 路径: %v", relativeErr)}} - } - featureSources[filepath.ToSlash(relativePath)] = struct{}{} - } - // spec 是当前可能额外声明 feature DTO 源码的契约登记项。 - for _, spec := range frontendDTOContractSpecs { - if spec.frontendPath != "" { - featureSources[spec.frontendPath] = struct{}{} - } - } - // featureSource 是当前需要读取的局部 feature DTO 源码路径。 - for featureSource := range featureSources { - // featureRaw、featureReadErr 分别是局部 DTO 源码和读取错误。 - featureRaw, featureReadErr := os.ReadFile(filepath.Join(root, featureSource)) - if featureReadErr != nil { - return []violation{{file: featureSource, line: 1, message: fmt.Sprintf("无法读取 feature DTO 契约: %v", featureReadErr)}} - } - // featureFields、featureLines 分别保存局部 DTO 字段和声明行号。 - featureFields, featureLines := parseFrontendResponseFields(string(featureRaw)) - // typeName、fields 分别是当前局部 DTO 名称和其顶层字段集合。 - for typeName, fields := range featureFields { - if !isFeatureResponseDTOName(typeName) && !isExplicitFrontendDTO(featureSource, typeName) { - continue - } - frontendFields[typeName] = fields - frontendLines[typeName] = featureLines[typeName] - frontendPaths[typeName] = featureSource - } - } - // backendFields、backendLines 分别保存 Server 具名结构体的 JSON 字段和其声明行。 - backendFields, backendLines, backendErr := parseServerResponseFields(root) - if backendErr != nil { - return []violation{{file: "internal/server", line: 1, message: fmt.Sprintf("无法解析 Server DTO: %v", backendErr)}} - } - // registered 保存已在注册表登记的前端响应类型,避免新增 DTO 漏检。 - registered := make(map[string]frontendDTOContractSpec, len(frontendDTOContractSpecs)) - // violations 保存字段遗漏、未知 DTO 和无效登记。 - var violations []violation - // spec 是当前前后端 DTO 对照规则。 - for _, spec := range frontendDTOContractSpecs { - // duplicated 表示相同前端 DTO 是否已经登记过。 - if _, duplicated := registered[spec.frontendType]; duplicated { - violations = append(violations, violation{file: "tools/architecturecheck/dto_field_contract.go", line: 1, message: fmt.Sprintf("前端 DTO %s 在字段契约注册表中重复登记", spec.frontendType)}) - continue - } - registered[spec.frontendType] = spec - // frontendTypeFields、exists 分别是当前前端 DTO 的字段集合和是否存在。 - frontendTypeFields, exists := frontendFields[spec.frontendType] - if !exists { - violations = append(violations, violation{file: "tools/architecturecheck/dto_field_contract.go", line: 1, message: fmt.Sprintf("字段契约登记的前端 DTO %s 不存在", spec.frontendType)}) - continue - } - if spec.backendType == "" { - if strings.TrimSpace(spec.rationale) == "" { - violations = append(violations, violation{file: "tools/architecturecheck/dto_field_contract.go", line: 1, message: fmt.Sprintf("组合 DTO %s 必须说明不直接对应 Server DTO 的原因", spec.frontendType)}) - } - continue - } - // backendTypeFields、backendExists 分别是 Server DTO 的 JSON 字段集合和是否存在。 - backendTypeFields, backendExists := backendFields[spec.backendType] - if !backendExists { - violations = append(violations, violation{file: "tools/architecturecheck/dto_field_contract.go", line: 1, message: fmt.Sprintf("前端 DTO %s 对应的 Server DTO %s 不存在", spec.frontendType, spec.backendType)}) - continue - } - // field 是前端声明为可消费的当前字段。 - for field := range frontendTypeFields { - // provided 表示后端具名 DTO 是否显式提供当前前端字段。 - if _, provided := backendTypeFields[field]; provided { - continue - } - violations = append(violations, violation{file: frontendPaths[spec.frontendType], line: frontendLines[spec.frontendType], message: fmt.Sprintf("前端 DTO %s 需要字段 %q,但 Server DTO %s 未提供;请补齐具名响应字段或移除未使用契约", spec.frontendType, field, spec.backendType)}) - } - _ = backendLines - } - // frontendType 是当前需要强制登记的共享或 feature 响应 DTO。 - for frontendType := range parseTransportDTOTypeNames(string(frontendRaw)) { - // exists 表示共享 DTO 是否已有字段契约登记。 - if _, exists := registered[frontendType]; exists { - continue - } - violations = append(violations, violation{file: "frontend/shared/api-contract/transport.ts", line: frontendLines[frontendType], message: fmt.Sprintf("前端对象 DTO %s 未登记到字段契约门禁", frontendType)}) - } - // frontendType、frontendPath 分别是局部响应 DTO 名称和其声明文件。 - for frontendType, frontendPath := range frontendPaths { - if frontendPath == "frontend/shared/api-contract/transport.ts" { - continue - } - // exists 表示局部响应 DTO 是否已有字段契约登记。 - if _, exists := registered[frontendType]; exists { - continue - } - violations = append(violations, violation{file: frontendPath, line: frontendLines[frontendType], message: fmt.Sprintf("前端对象 DTO %s 未登记到字段契约门禁", frontendType)}) - } - return violations -} - -// isFeatureResponseDTOName 判断 feature 局部接口是否表达 HTTP 响应或其响应行 DTO。 -func isFeatureResponseDTOName(typeName string) bool { - // suffix 是当前接口名称可证明为响应 DTO 的后缀。 - for _, suffix := range []string{"Response", "Page", "Status", "Settings", "Result", "Issue", "RuntimeStatus"} { - if strings.HasSuffix(typeName, suffix) { - return true - } - } - return false -} - -// isExplicitFrontendDTO 判断当前路径和类型是否由登记表显式纳入,例如健康检查 BuildInfo。 -func isExplicitFrontendDTO(frontendPath, typeName string) bool { - // spec 是当前字段契约登记项。 - for _, spec := range frontendDTOContractSpecs { - if spec.frontendPath == frontendPath && spec.frontendType == typeName { - return true - } - } - return false -} - -// parseTransportDTOTypeNames 返回共享 transport 中需要强制登记的全部导出对象 DTO 名称。 -func parseTransportDTOTypeNames(source string) map[string]struct{} { - // fields 是 transport DTO 的解析结果;只需其类型名称。 - fields, _ := parseFrontendResponseFields(source) - // names 保存所有待检查的共享 DTO 名称。 - names := make(map[string]struct{}, len(fields)) - // typeName 是当前共享 DTO 名称。 - for typeName := range fields { - names[typeName] = struct{}{} - } - return names -} - -// parseFrontendResponseFields 从共享 TypeScript transport 文件读取全部导出对象 DTO 的顶层字段和 extends 字段。 -func parseFrontendResponseFields(source string) (map[string]map[string]struct{}, map[string]int) { - // declarationPattern 匹配导出的对象接口声明;字符串和联合类型不是可逐字段校验的 DTO。 - declarationPattern := regexp.MustCompile(`(?m)^export interface ([A-Za-z][A-Za-z0-9]*)[^\{]*\{`) - // extendsPattern 匹配接口继承的单个对象 DTO;当前契约不使用交叉继承。 - extendsPattern := regexp.MustCompile(`\bextends\s+([A-Za-z][A-Za-z0-9]*)`) - // fieldPattern 匹配接口体顶层的普通属性;索引签名不表示固定 HTTP 字段。 - fieldPattern := regexp.MustCompile(`(?m)^\s*([A-Za-z_][A-Za-z0-9_]*)\??\s*:`) - // fields 保存每个响应接口声明的固定字段集合。 - fields := make(map[string]map[string]struct{}) - // lines 保存接口声明的 1-based 行号,供失败信息定位。 - lines := make(map[string]int) - // parents 保存接口的直接父 DTO,供后续合并继承字段。 - parents := make(map[string]string) - // matches 保存所有响应接口声明的位置和类型名称。 - matches := declarationPattern.FindAllStringSubmatchIndex(source, -1) - // match 是当前响应接口声明的位置元组。 - for _, match := range matches { - // typeName 是当前响应接口名称。 - typeName := source[match[2]:match[3]] - // bodyStart 是声明中第一个左花括号的下标。 - bodyStart := strings.Index(source[match[0]:match[1]], "{") + match[0] - // bodyEnd 是配对右花括号的下标;异常源码由 TypeScript 类型检查另行报告。 - bodyEnd := matchingBrace(source, bodyStart) - if bodyEnd < 0 { - continue - } - // body 是不含外层花括号的接口字段文本。 - body := source[bodyStart+1 : bodyEnd] - // typeFields 保存当前接口的顶层字段,嵌套对象字段不属于当前 Server DTO 的直接字段。 - typeFields := topLevelFrontendFields(body, fieldPattern) - fields[typeName] = typeFields - lines[typeName] = strings.Count(source[:match[0]], "\n") + 1 - // parentMatch 是当前接口继承的父 DTO 名称。 - if parentMatch := extendsPattern.FindStringSubmatch(source[match[0]:match[1]]); len(parentMatch) == 2 { - parents[typeName] = parentMatch[1] - } - } - // resolved 保存已展开继承字段的 DTO 集合。 - resolved := make(map[string]map[string]struct{}, len(fields)) - // resolving 保存当前 DFS 路径,防止异常源码中的循环继承无限递归。 - resolving := make(map[string]bool, len(fields)) - // resolve 返回当前 DTO 自身及所有父 DTO 的字段集合。 - var resolve func(string) map[string]struct{} - resolve = func(typeName string) map[string]struct{} { - // resolvedFields、ok 分别是已缓存的继承字段和其命中标记。 - if resolvedFields, ok := resolved[typeName]; ok { - return resolvedFields - } - if resolving[typeName] { - return fields[typeName] - } - resolving[typeName] = true - // merged 是当前 DTO 合并父级后的独立字段集合。 - merged := make(map[string]struct{}, len(fields[typeName])) - // field 是当前 DTO 自身声明的字段。 - for field := range fields[typeName] { - merged[field] = struct{}{} - } - // parentType、hasParent 分别是当前 DTO 的父接口名称和继承标记。 - if parentType, hasParent := parents[typeName]; hasParent { - // field 是从父接口继承的字段。 - for field := range resolve(parentType) { - merged[field] = struct{}{} - } - } - delete(resolving, typeName) - resolved[typeName] = merged - return merged - } - // typeName 是当前需要展开继承字段的 DTO 名称。 - for typeName := range fields { - fields[typeName] = resolve(typeName) - } - return fields, lines -} - -// topLevelFrontendFields 只提取 TypeScript 接口第一层字段,跳过嵌套对象和数组元素的属性。 -func topLevelFrontendFields(body string, fieldPattern *regexp.Regexp) map[string]struct{} { - // fields 保存当前接口顶层可由 HTTP 响应直接提供的字段。 - fields := make(map[string]struct{}) - // depth 保存当前行开始时所处的嵌套花括号层级。 - depth := 0 - // line 是当前待检查的源码行。 - for _, line := range strings.Split(body, "\n") { - if depth == 0 { - // match 是当前顶层属性名的正则匹配位置。 - if match := fieldPattern.FindStringSubmatch(line); len(match) == 2 { - fields[match[1]] = struct{}{} - } - } - // character 是当前行的单个字符;嵌套字段将在下一行因 depth 非零被跳过。 - for _, character := range line { - switch character { - case '{': - depth++ - case '}': - depth-- - } - } - } - return fields -} - -// matchingBrace 返回 source 中指定左花括号对应右花括号的位置,不把对象字面量嵌套误认为接口结束。 -func matchingBrace(source string, start int) int { - // depth 保存当前花括号嵌套层级。 - depth := 0 - // index 是当前扫描的字节位置。 - for index := start; index < len(source); index++ { - switch source[index] { - case '{': - depth++ - case '}': - depth-- - if depth == 0 { - return index - } - } - } - return -1 -} - -// parseServerResponseFields 收集 internal/server 生产源码中全部具名结构体的 JSON 字段。 -func parseServerResponseFields(root string) (map[string]map[string]struct{}, map[string]int, error) { - // fields 保存每个 Server 结构体暴露的 JSON 字段集合。 - fields := make(map[string]map[string]struct{}) - // lines 保存结构体声明所在行,供后续诊断扩展使用。 - lines := make(map[string]int) - // embedded 保存结构体匿名嵌入的 DTO 类型,编码时会提升这些字段。 - embedded := make(map[string][]string) - // fset 为 Go AST 节点提供稳定行号。 - fset := token.NewFileSet() - // serverRoot 是 HTTP transport 源码目录。 - serverRoot := filepath.Join(root, "internal", "server") - // walkErr 表示遍历或解析 Server DTO 时发生的错误。 - walkErr := filepath.WalkDir(serverRoot, func(path string, entry os.DirEntry, walkErr error) error { - if walkErr != nil { - return walkErr - } - if entry.IsDir() || !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { - return nil - } - // syntax、parseErr 分别是当前 Server 源码的 AST 与解析错误。 - syntax, parseErr := parser.ParseFile(fset, path, nil, 0) - if parseErr != nil { - return parseErr - } - // declaration 是当前文件的顶层声明。 - for _, declaration := range syntax.Decls { - // general、ok 分别是类型声明块及其断言结果。 - general, ok := declaration.(*ast.GenDecl) - if !ok || general.Tok != token.TYPE { - continue - } - // specification 是类型声明块中的单个类型。 - for _, specification := range general.Specs { - // typeSpec、ok 分别是具名类型规格及其断言结果。 - typeSpec, ok := specification.(*ast.TypeSpec) - if !ok { - continue - } - // structure、ok 分别是具名结构体及其断言结果。 - structure, ok := typeSpec.Type.(*ast.StructType) - if !ok { - continue - } - // jsonFields 保存当前结构体可编码的固定 JSON 字段。 - jsonFields := make(map[string]struct{}) - // field 是当前结构体字段声明。 - for _, field := range structure.Fields.List { - if len(field.Names) == 0 { - // embeddedType 是匿名嵌入结构体的类型名;指针嵌入与值嵌入都会提升 JSON 字段。 - embeddedType := embeddedStructTypeName(field.Type) - if embeddedType != "" { - embedded[typeSpec.Name.Name] = append(embedded[typeSpec.Name.Name], embeddedType) - } - continue - } - if field.Tag == nil { - continue - } - // tag 是去除反引号后的结构体标签文本。 - tag := strings.Trim(field.Tag.Value, "`") - // jsonName 是 json 标签的字段名;空名和 - 不属于响应字段。 - jsonName := strings.Split(strings.TrimPrefix(tag, "json:\""), "\"")[0] - jsonName = strings.Split(jsonName, ",")[0] - if jsonName != "" && jsonName != "-" { - jsonFields[jsonName] = struct{}{} - } - } - fields[typeSpec.Name.Name] = jsonFields - lines[typeSpec.Name.Name] = fset.Position(typeSpec.Pos()).Line - } - } - return nil - }) - if walkErr != nil { - return fields, lines, walkErr - } - // resolved 保存已经展开匿名嵌入字段的 Server DTO 集合。 - resolved := make(map[string]map[string]struct{}, len(fields)) - // resolving 保存当前 DFS 路径,避免异常源码出现循环嵌入时无限递归。 - resolving := make(map[string]bool, len(fields)) - // resolve 返回当前 DTO 自身及所有匿名嵌入 DTO 的 JSON 字段。 - var resolve func(string) map[string]struct{} - resolve = func(typeName string) map[string]struct{} { - // resolvedFields、ok 分别是已缓存的匿名嵌入字段和其命中标记。 - if resolvedFields, ok := resolved[typeName]; ok { - return resolvedFields - } - if resolving[typeName] { - return fields[typeName] - } - resolving[typeName] = true - // merged 是当前 DTO 合并匿名嵌入字段后的独立集合。 - merged := make(map[string]struct{}, len(fields[typeName])) - // field 是当前 Server DTO 自身声明的 JSON 字段。 - for field := range fields[typeName] { - merged[field] = struct{}{} - } - // embeddedType 是当前 Server DTO 匿名嵌入的字段来源类型。 - for _, embeddedType := range embedded[typeName] { - // field 是匿名嵌入类型提升到当前 DTO 的 JSON 字段。 - for field := range resolve(embeddedType) { - merged[field] = struct{}{} - } - } - delete(resolving, typeName) - resolved[typeName] = merged - return merged - } - // typeName 是当前需要展开匿名嵌入字段的 Server DTO 名称。 - for typeName := range fields { - fields[typeName] = resolve(typeName) - } - return fields, lines, walkErr -} - -// embeddedStructTypeName 返回匿名嵌入字段引用的本包结构体类型名;匿名基本类型不会提升 JSON DTO 字段。 -func embeddedStructTypeName(expression ast.Expr) string { - // identifier、ok 分别是匿名值嵌入的类型名及其断言结果。 - if identifier, ok := expression.(*ast.Ident); ok { - return identifier.Name - } - // pointer、ok 分别是匿名指针嵌入及其断言结果。 - pointer, ok := expression.(*ast.StarExpr) - if !ok { - return "" - } - // identifier、ok 分别是指针指向的本包类型名及其断言结果。 - identifier, ok := pointer.X.(*ast.Ident) - if !ok { - return "" - } - return identifier.Name -} - -// sortedFieldNames 返回稳定排序的字段名列表,供测试失败输出保持可复现。 -func sortedFieldNames(fields map[string]struct{}) []string { - // names 保存待排序字段名。 - names := make([]string, 0, len(fields)) - // field 是当前字段集合成员。 - for field := range fields { - names = append(names, field) - } - sort.Strings(names) - return names -} diff --git a/tools/architecturecheck/main_test.go b/tools/architecturecheck/main_test.go index 4210b96..b1d66b9 100644 --- a/tools/architecturecheck/main_test.go +++ b/tools/architecturecheck/main_test.go @@ -5,116 +5,9 @@ import ( "go/token" "os" "path/filepath" - "strings" "testing" ) -// TestFrontendDTOFieldParserRejectsNestedProperties 验证 DTO 字段解析只比较 HTTP 响应的顶层字段。 -func TestFrontendDTOFieldParserRejectsNestedProperties(t *testing.T) { - // source 是同时包含直接字段和嵌套对象字段的最小前端响应 DTO。 - source := `export interface CategoryResponse { - success: boolean; - category: { - cat_id: string; - }; -}` - // fields、lines 分别是解析出的字段集合和接口声明行号。 - fields, lines := parseFrontendResponseFields(source) - // categoryFields 是 CategoryResponse 的顶层字段集合。 - categoryFields := fields["CategoryResponse"] - // exists 表示 success 是否被正确识别为顶层字段。 - if _, exists := categoryFields["success"]; !exists { - t.Fatalf("顶层 success 字段未被识别: %v", sortedFieldNames(categoryFields)) - } - // exists 表示 category 是否被正确识别为顶层字段。 - if _, exists := categoryFields["category"]; !exists { - t.Fatalf("顶层 category 字段未被识别: %v", sortedFieldNames(categoryFields)) - } - // exists 表示嵌套 cat_id 是否被错误提升为顶层字段。 - if _, exists := categoryFields["cat_id"]; exists { - t.Fatalf("嵌套 cat_id 不应被视为外层 DTO 字段: %v", sortedFieldNames(categoryFields)) - } - if lines["CategoryResponse"] != 1 { - t.Fatalf("接口声明行=%d want=1", lines["CategoryResponse"]) - } -} - -// TestFrontendDTOFieldContractReportsMissingBackendField 验证真实 DTO 夹具缺少后端字段时字段门禁会失败。 -func TestFrontendDTOFieldContractReportsMissingBackendField(t *testing.T) { - // root 是本测试隔离出的最小仓库根目录。 - root := t.TempDir() - // frontendDir、serverDir 分别是前端传输契约和服务端 DTO 的夹具目录。 - frontendDir := filepath.Join(root, "frontend", "shared", "api-contract") - // serverDir 是服务端 DTO 夹具目录。 - serverDir := filepath.Join(root, "internal", "server") - // err 是创建前端夹具目录失败的原因。 - if err := os.MkdirAll(frontendDir, 0o755); err != nil { - t.Fatal(err) - } - // err 是创建服务端夹具目录失败的原因。 - if err := os.MkdirAll(serverDir, 0o755); err != nil { - t.Fatal(err) - } - // frontendSource 是要求 required 字段的最小前端 DTO。 - frontendSource := []byte("export interface ExampleResponse {\n required: string;\n}\n") - // err 是写入前端 DTO 夹具失败的原因。 - if err := os.WriteFile(filepath.Join(frontendDir, "transport.ts"), frontendSource, 0o600); err != nil { - t.Fatal(err) - } - // serverSource 故意不提供 required 字段,用来验证真实扫描链路。 - serverSource := []byte("package server\ntype exampleResponse struct { Provided string `json:\"provided\"` }\n") - // err 是写入服务端 DTO 夹具失败的原因。 - if err := os.WriteFile(filepath.Join(serverDir, "response.go"), serverSource, 0o600); err != nil { - t.Fatal(err) - } - // originalSpecs 保存测试前的全局登记表,结束后必须恢复避免污染其他门禁测试。 - originalSpecs := frontendDTOContractSpecs - frontendDTOContractSpecs = []frontendDTOContractSpec{{frontendType: "ExampleResponse", backendType: "exampleResponse"}} - defer func() { frontendDTOContractSpecs = originalSpecs }() - // violations 是执行真实字段门禁后得到的违规集合。 - violations := checkFrontendDTOFieldContracts(root) - if len(violations) != 1 { - t.Fatalf("violations=%+v", violations) - } - // message 是字段缺失诊断,应稳定指明双方 DTO 和遗漏字段。 - message := violations[0].message - if !strings.Contains(message, "ExampleResponse") || !strings.Contains(message, "required") || !strings.Contains(message, "exampleResponse") { - t.Fatalf("缺失字段诊断不完整: %s", message) - } -} - -// TestServerDTOFieldParserIncludesEmbeddedDTO 验证匿名嵌入 DTO 提升的 JSON 字段不会被字段门禁误判遗漏。 -func TestServerDTOFieldParserIncludesEmbeddedDTO(t *testing.T) { - // root 是本测试隔离出的最小仓库根目录。 - root := t.TempDir() - // serverDir 是服务端 DTO 夹具目录。 - serverDir := filepath.Join(root, "internal", "server") - // err 是创建服务端匿名嵌入夹具目录失败的原因。 - if err := os.MkdirAll(serverDir, 0o755); err != nil { - t.Fatal(err) - } - // source 使用 Go 的匿名嵌入模拟 orderDetailResponse 兼容顶层字段行为。 - source := []byte("package server\ntype baseDTO struct { ID string `json:\"id\"` }\ntype detailResponse struct { baseDTO; Success bool `json:\"success\"` }\n") - // err 是写入匿名嵌入 DTO 夹具失败的原因。 - if err := os.WriteFile(filepath.Join(serverDir, "response.go"), source, 0o600); err != nil { - t.Fatal(err) - } - // fields、_、err 分别是解析出的 DTO 字段、未使用的行号和解析错误。 - fields, _, err := parseServerResponseFields(root) - if err != nil { - t.Fatal(err) - } - // detailFields 是含匿名嵌入字段的详情 DTO 字段集合。 - detailFields := fields["detailResponse"] - // exists 表示匿名嵌入的 id 是否已提升。 - if _, exists := detailFields["id"]; !exists { - t.Fatalf("匿名嵌入 id 字段未被解析: %v", sortedFieldNames(detailFields)) - } - // exists 表示详情 DTO 的直接 success 字段是否已保留。 - if _, exists := detailFields["success"]; !exists { - t.Fatalf("直接 success 字段未被解析: %v", sortedFieldNames(detailFields)) - } -} // TestHTTPResponseContractBoundary 验证 HTTP 契约扫描会拒绝动态 map 和直接 map 响应。 func TestHTTPResponseContractBoundary(t *testing.T) { diff --git a/tools/architecturecheck/phase_policy.go b/tools/architecturecheck/phase_policy.go index 005632f..fd194d8 100644 --- a/tools/architecturecheck/phase_policy.go +++ b/tools/architecturecheck/phase_policy.go @@ -100,7 +100,6 @@ func checkActivatedRepositoryGates(root string, activeStage int) []violation { } if architectureStageEnabled(activeStage, architectureStageClosure) { violations = append(violations, checkQualityArchitecture(root)...) - violations = append(violations, checkFrontendDTOFieldContracts(root)...) } return violations } @@ -271,8 +270,8 @@ func checkReactArchitecture(root string) []violation { } // sourceText 是用于模块和网络边界匹配的源码文本。 sourceText := string(source) - if relativePath != "shared/http/client.ts" && (strings.Contains(sourceText, "fetch(") || regexp.MustCompile(`\baxios\b`).MatchString(sourceText)) { - violations = append(violations, violation{file: "frontend/" + relativePath, line: 1, message: "前端生产代码不得绕过 shared/http/client 直接请求网络"}) + if relativePath != "shared/http/client.ts" && relativePath != "shared/api-contract/client.ts" && (strings.Contains(sourceText, "fetch(") || regexp.MustCompile(`\baxios\b`).MatchString(sourceText)) { + violations = append(violations, violation{file: "frontend/" + relativePath, line: 1, message: "前端生产代码不得绕过共享 HTTP 契约客户端直接请求网络"}) } if relativePath != "app/shell/AuthenticatedShell.tsx" && strings.Contains(sourceText, "import(") { violations = append(violations, violation{file: "frontend/" + relativePath, line: 1, message: "动态 import 只能用于路由级页面加载,禁止隐藏 feature 依赖"})