From 47ef765c1d122a52faf237de3289e6ac027566bd Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 24 May 2026 20:06:36 +0200 Subject: [PATCH] feat(api-docs): expose OpenAPI spec + render Swagger UI in panel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces the hand-rolled API docs UI with industry-standard tooling so external integrations (Postman, Insomnia, openapi-generator) can consume the panel API without parsing endpoints.js by hand. Generator - frontend/scripts/build-openapi.mjs: walks the existing endpoints.js (still the single source of truth) and emits an OpenAPI 3.0.3 spec at frontend/public/openapi.json. Handles Gin :param → {param} path translation, body / query / path parameter splits, 200 + error response examples, and Bearer + cookie security schemes - npm run build now runs gen:api before vite build, so the spec is always in sync with what's documented Backend - web/controller/dist.go exposes ServeOpenAPISpec which streams the embedded dist/openapi.json with a short Cache-Control. Public endpoint (no auth) so Postman can fetch it without first logging in - web/web.go wires GET /panel/api/openapi.json before the auth-gated /panel/api router Panel - ApiDocsPage now renders swagger-ui-react fed by the basePath-aware openapi.json URL. Dark mode is overridden via CSS targeting the Swagger UI internals - CodeBlock / EndpointRow / EndpointSection are gone; the swagger-ui vendor chunk (134 KB gzipped) only loads on this lazy route, not on every panel page - vite.config: vendor-swagger manualChunk keeps the new dep out of the main vendor bundle For Postman: import http:///panel/api/openapi.json. Everything from /login + /panel/api/* shows up with auth, params, and examples. --- frontend/package-lock.json | 1987 ++++++- frontend/package.json | 9 +- frontend/public/openapi.json | 4944 +++++++++++++++++ frontend/scripts/build-openapi.mjs | 218 + frontend/src/pages/api-docs/ApiDocsPage.css | 290 +- frontend/src/pages/api-docs/ApiDocsPage.tsx | 224 +- frontend/src/pages/api-docs/CodeBlock.css | 107 - frontend/src/pages/api-docs/CodeBlock.tsx | 69 - frontend/src/pages/api-docs/EndpointRow.css | 93 - frontend/src/pages/api-docs/EndpointRow.tsx | 84 - .../src/pages/api-docs/EndpointSection.css | 129 - .../src/pages/api-docs/EndpointSection.tsx | 90 - frontend/vite.config.js | 5 + web/controller/dist.go | 15 + web/web.go | 1 + 15 files changed, 7227 insertions(+), 1038 deletions(-) create mode 100644 frontend/public/openapi.json create mode 100644 frontend/scripts/build-openapi.mjs delete mode 100644 frontend/src/pages/api-docs/CodeBlock.css delete mode 100644 frontend/src/pages/api-docs/CodeBlock.tsx delete mode 100644 frontend/src/pages/api-docs/EndpointRow.css delete mode 100644 frontend/src/pages/api-docs/EndpointRow.tsx delete mode 100644 frontend/src/pages/api-docs/EndpointSection.css delete mode 100644 frontend/src/pages/api-docs/EndpointSection.tsx diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 0d175df1..ef3736c9 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -24,12 +24,14 @@ "react": "^19.2.6", "react-dom": "^19.2.6", "react-i18next": "^17.0.8", - "react-router-dom": "^7.15.1" + "react-router-dom": "^7.15.1", + "swagger-ui-react": "^5.32.6" }, "devDependencies": { "@eslint/js": "^10.0.1", "@types/react": "^19.2.15", "@types/react-dom": "^19.2.3", + "@types/swagger-ui-react": "^5.18.0", "@vitejs/plugin-react": "^6.0.2", "eslint": "^10.4.0", "eslint-plugin-react-hooks": "^7.1.1", @@ -337,6 +339,18 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/runtime-corejs3": { + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.29.2.tgz", + "integrity": "sha512-Lc94FOD5+0aXhdb0Tdg3RUtqT6yWbI/BbFWvlaSJ3gAb9Ks+99nHRDKADVqC37er4eCB0fHyWT+y+K3QOvJKbw==", + "license": "MIT", + "dependencies": { + "core-js-pure": "^3.48.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.28.6", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.28.6.tgz", @@ -1839,6 +1853,672 @@ "dev": true, "license": "MIT" }, + "node_modules/@scarf/scarf": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scarf/scarf/-/scarf-1.4.0.tgz", + "integrity": "sha512-xxeapPiUXdZAE3che6f3xogoJPeZgig6omHEy1rIY5WVsB3H2BHNnZH+gHG6x91SCWyQCzWGsuL2Hh3ClO5/qQ==", + "hasInstallScript": true, + "license": "Apache-2.0" + }, + "node_modules/@swagger-api/apidom-ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ast/-/apidom-ast-1.11.1.tgz", + "integrity": "sha512-5vcFzXltmIpCsjQouVKzjj7pPPUxYmwIARHuenim96GDnmqqVTtAoBXpIX++cD5RcJA72EBEqepQ+VSAA12RPA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-error": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "unraw": "^3.0.0" + } + }, + "node_modules/@swagger-api/apidom-core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-core/-/apidom-core-1.11.1.tgz", + "integrity": "sha512-KsN0dZBsutUGWtbsqBMvQ+3pJUjq/wRRABCNIG2Ys/1Ctq8FaQaA0MoICPuYgDZCUNsZuJYbw6Swm6e0GaHWtA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-ast": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@types/ramda": "~0.30.0", + "minim": "~0.23.8", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "short-unique-id": "^5.3.2", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-error/-/apidom-error-1.11.1.tgz", + "integrity": "sha512-7KV2Ac4BOcrv4yJz7T5DbZiTdqbnVUT+g68Hjhabl5zhD28mfEEn9V8Zq2D6rtjlCYkqWAMFb8Y6Y+9ssH5wgA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.20.7" + } + }, + "node_modules/@swagger-api/apidom-json-pointer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-json-pointer/-/apidom-json-pointer-1.11.1.tgz", + "integrity": "sha512-c8QSUgQxDolTO+rP2bvX4CrZOrnTMTAMh0xGq8LaYvzVzs0bQT7ZApsbcA/4bzWlwcg6wy2Uuw+qMadl1FNR3w==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swaggerexpert/json-pointer": "^2.10.1" + } + }, + "node_modules/@swagger-api/apidom-ns-api-design-systems": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-api-design-systems/-/apidom-ns-api-design-systems-1.11.1.tgz", + "integrity": "sha512-2K3Ix+nRHDkuixkZ4FAMWY5MAJHipzpFvZrRtneZ7hsx7nObw9HYEXZw/yXuYrvnhC8jsE4z91Gwuvvz7ZjfPw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-1": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-arazzo-1": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-arazzo-1/-/apidom-ns-arazzo-1-1.11.1.tgz", + "integrity": "sha512-rnICw0uXnKeNHUaS+Ip7lxtVXqH1iA3zFlX446e4XAamJd6yU28sujIsGiZ71qPQ217teidkfK7Bx7MktHdiEw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-2020-12": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-asyncapi-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-2/-/apidom-ns-asyncapi-2-1.11.1.tgz", + "integrity": "sha512-syABiWLeWRfKoonUhPriPVwDDeEOlN5RD20Dj/MS9DT5r1BJUrAB1BfRRRHsVhzaXVdUcKKH99iC9C842J9kvA==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-draft-7": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-asyncapi-3": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-asyncapi-3/-/apidom-ns-asyncapi-3-1.11.1.tgz", + "integrity": "sha512-y4syE8jOEGuSirc3YaeI0dh3rEvHfc/pERQOTj3KofS2IABpBXTmtg+oDfG2zte1/Cyc/eJ6qecVAns5mhBpow==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-asyncapi-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-2019-09": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-2019-09/-/apidom-ns-json-schema-2019-09-1.11.1.tgz", + "integrity": "sha512-1SNXikZN2uQ1YZ3A4dzWBoMN6wTkba1qZdy/NOkweFtoLuBb63KKN/gD1e6chQV8+ikqGn8TTUZnYvX6SVBZ6g==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-draft-7": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-2020-12": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-2020-12/-/apidom-ns-json-schema-2020-12-1.11.1.tgz", + "integrity": "sha512-oyvTkjDXI9k3G8oVHOvpL/t1MfZmx8d7rgeNqsm6j/vK6WlOXIOHdN9LTYRo8YdACaWq/JV5B30grkio/HRMKQ==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-2019-09": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-4": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-4/-/apidom-ns-json-schema-draft-4-1.11.1.tgz", + "integrity": "sha512-Ha23zkVSItmFZbAoSKMI7hwYJT7yTMWO+EcNzDBEClsqRrkcCtvF2YsiQZcyUt5SrEwV8rW0TWE0CVG+WEs2zg==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-ast": "^1.11.1", + "@swagger-api/apidom-core": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-6": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-6/-/apidom-ns-json-schema-draft-6-1.11.1.tgz", + "integrity": "sha512-Gm4ULCg4yulfjZiMIbH1XiiKHI/BqK0zc1GexViiLShXS35/2dc27GmpI0YgV7S+DqvivNrwAkqojeN7ho9/NA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-draft-4": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, + "node_modules/@swagger-api/apidom-ns-json-schema-draft-7": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-json-schema-draft-7/-/apidom-ns-json-schema-draft-7-1.11.1.tgz", + "integrity": "sha512-OHW4Qb0BqbHJ3QoQcGREE5bobMeBkZzSQe/0RFGayhI1HJZqrmwtot2nLAuie9sQJoj/xeUprOsA/he06NVFEw==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-draft-6": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.4" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-2/-/apidom-ns-openapi-2-1.11.1.tgz", + "integrity": "sha512-yXHJmyN+NyF2xBD6KlFmGuMrf1hKqK9pm/FwStepIUqvn6bfTGgEdUi5BivQuErRrN6NtQczFF21Jlu6jjg86Q==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-draft-4": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-0": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-0/-/apidom-ns-openapi-3-0-1.11.1.tgz", + "integrity": "sha512-R2zHd33OiVT5eTlYKS1FyVDP0G76ymdP2EIrBPbM1FDKam1kRIRdgZA2StCd9PY4oNp/LqQKMnfe9wdLWZS3AA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-draft-4": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-1": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-1/-/apidom-ns-openapi-3-1-1.11.1.tgz", + "integrity": "sha512-FtoW4wkFO1VSHu6G+wUZ71hQhIOuastJPyWEePbfySE4Uiz+01t/X/ODnl2OHRGVUYFoJa7kJi5/xqcsprdxtA==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-ast": "^1.11.1", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-json-pointer": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-2020-12": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-0": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-ns-openapi-3-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-ns-openapi-3-2/-/apidom-ns-openapi-3-2-1.11.1.tgz", + "integrity": "sha512-ILJAgp6mHwoV8rRuKYD3QuvPdcRcmK9YmAfrsjgC7fJM7irqzC+nBOKhrWVpTAee7r3b+B3HpV5MG8aKGd9qNQ==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-ast": "^1.11.1", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-json-pointer": "^1.11.1", + "@swagger-api/apidom-ns-json-schema-2020-12": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-0": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-1": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "ts-mixer": "^6.0.3" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-json/-/apidom-parser-adapter-api-design-systems-json-1.11.1.tgz", + "integrity": "sha512-bCt1/7NPfCznhq2D3Y1UcZowdxMtr6wGCISMSPf3ziaCcOQhy7sG/nWEzS/rwcKCVNefVft833Ab3jaCWGivJw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-api-design-systems": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/-/apidom-parser-adapter-api-design-systems-yaml-1.11.1.tgz", + "integrity": "sha512-hUcshr5ydn/L4VsgP5nyrFDp4QqIADrx5nQnFddw/OWCNi1Al19ccPxuBh1Qlf421AAmk1oUiybeGyduvRsVPQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-api-design-systems": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-arazzo-json-1": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-arazzo-json-1/-/apidom-parser-adapter-arazzo-json-1-1.11.1.tgz", + "integrity": "sha512-8ydiEnlSJ7DPhFqg9Z11u4Vda16yaOuIGLablI0mOnYoAMTlqnteGk5CDPlVb970VBTYvsNlgW+164XfHAU/6w==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-arazzo-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-arazzo-yaml-1": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-arazzo-yaml-1/-/apidom-parser-adapter-arazzo-yaml-1-1.11.1.tgz", + "integrity": "sha512-G4++rZDMKokEfq78EJ2aE7pgd1Xo70XIn1/ikSiT5awfuhPJzNcV99ZdzQI2xVVU/pbKIL2Vc/b5SP1IRlfCwA==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-arazzo-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-2/-/apidom-parser-adapter-asyncapi-json-2-1.11.1.tgz", + "integrity": "sha512-7Npn4LkG4q95b2VimG3SV0lqgG3xPeF5Srq+sVbG7iFd4yDubvEVy5zzqx5QH4tOtATdarhv6glA9j3hTfWBdQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-asyncapi-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-3": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-json-3/-/apidom-parser-adapter-asyncapi-json-3-1.11.1.tgz", + "integrity": "sha512-/C1CzsnUW2ZMBg4kWYrhrfqmyjb4aGo9+YaySQwdArLfM8l2HCOQqDEteGIivedVEsmTpVdhC60gdb6N2VzSaQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-asyncapi-3": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/-/apidom-parser-adapter-asyncapi-yaml-2-1.11.1.tgz", + "integrity": "sha512-0Xfu8PLM787el0R7lwjFfQYe0Bpv3Jz0YlkEiQqAVvftVb0oNi8tg9FhDTR8ju/N94gpNXIfaH/5Ahgz5G+NKg==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-asyncapi-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-3": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-asyncapi-yaml-3/-/apidom-parser-adapter-asyncapi-yaml-3-1.11.1.tgz", + "integrity": "sha512-DqoR43NsFBmiJW1h2Xg3n2V6NQx+95qJ3ziA9rIbKJHGCidHtjNJgi4I7sWGnaIApIHijYY2bW22MKXaT0a0cQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-asyncapi-3": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-json": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-json/-/apidom-parser-adapter-json-1.11.1.tgz", + "integrity": "sha512-L8XFzTbEknHDhD40M/pSoDlimjlYaXXWZS4AmyD3i+XRfiDWWVhEWHPE9OTNk6UL8R6DOBm3RSDxAd5xpLoPjg==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-ast": "^1.11.1", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "tree-sitter": "=0.21.1", + "tree-sitter-json": "=0.24.8", + "web-tree-sitter": "=0.24.5" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-2/-/apidom-parser-adapter-openapi-json-2-1.11.1.tgz", + "integrity": "sha512-s9xZa/h4Yiz+Qc304s+9JSTPFsToYtSWQCeyA9jkHOWy/Oq8ZjD9wg34IjENS3yBqM1YLz6Dk+PX06DcyAOnnw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-0/-/apidom-parser-adapter-openapi-json-3-0-1.11.1.tgz", + "integrity": "sha512-dLGaVn24N+YZRB0vzQMC4R+aiSNfD81Xcp5TwdEbE+jOeOnoOe5NqzqCWjaDpSMChDsK/NdaSDjQj4uiYfWpug==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-0": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-1/-/apidom-parser-adapter-openapi-json-3-1-1.11.1.tgz", + "integrity": "sha512-EnYF3rzPZoiCYDnp4ChB6K15RUV4rE6QfEh7fTEwIlkWMUKv4oVwZd8aqz2i9laRZiBH6S2uUoED8YNtCNbeIg==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-json-3-2/-/apidom-parser-adapter-openapi-json-3-2-1.11.1.tgz", + "integrity": "sha512-digw37g+k/rg87HHMUHuSZVWH1Kh8OjC8SmQflIh1Oot9fGhmnZWddsws+sKWSVy6/HveuZPykL8bxtSV3Nc/A==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-2/-/apidom-parser-adapter-openapi-yaml-2-1.11.1.tgz", + "integrity": "sha512-b38GFur/NjjLFBCVR/wo7DRF6EW5h8B5jBe7C17EVaJvg9eRzknnr9/KMnxYeTtjQVO8W/JeY7LlLad1/j0pcA==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/-/apidom-parser-adapter-openapi-yaml-3-0-1.11.1.tgz", + "integrity": "sha512-dza6Bwe5kLL+4jANuaScxvYh3o7RxESp6Riz6M09cXRysyRrHFQ7UYuUhxepSD4jSiSxJQS8nu0i547i6Z7W7Q==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-0": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/-/apidom-parser-adapter-openapi-yaml-3-1-1.11.1.tgz", + "integrity": "sha512-PgmolQN1PYdROSo/cHNyXINVD+aLmW6VqfwT7potNo08c4aWj+QQ/a0Az+mldfJ+G98WjNRvEKr8dhEw8zfqmw==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-openapi-yaml-3-2/-/apidom-parser-adapter-openapi-yaml-3-2-1.11.1.tgz", + "integrity": "sha512-+nmtJ3/wPLBBN6d8xI8rD0mOz80V4iSRe6rYYOQ/skel673N1SY4B58Ufnc7KnMNV4cOce/a52ASQ1Qd1csLvQ==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-parser-adapter-yaml-1-2/-/apidom-parser-adapter-yaml-1-2-1.11.1.tgz", + "integrity": "sha512-KEgk5PoSmmLC7ZvH0+RF4FPyWAj0NyrPFbTr04DmNPznfr2qpGqvt3ZBmAJm82jrWoI1dc8EH1ugT1YX69N8ww==", + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-ast": "^1.11.1", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@tree-sitter-grammars/tree-sitter-yaml": "=0.7.1", + "@types/ramda": "~0.30.0", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0", + "tree-sitter": "=0.22.4", + "web-tree-sitter": "=0.24.5" + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/node_modules/@tree-sitter-grammars/tree-sitter-yaml": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@tree-sitter-grammars/tree-sitter-yaml/-/tree-sitter-yaml-0.7.1.tgz", + "integrity": "sha512-AynBwkIoQCTgjDR33bDUp9Mqq+YTco0is3n5hRApMqG9of/6A4eQsfC1/uSEeHSUyMQSYawcAWamsexnVpIP4Q==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.3.1", + "node-gyp-build": "^4.8.4" + }, + "peerDependencies": { + "tree-sitter": "^0.22.4" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + } + }, + "node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/node_modules/tree-sitter": { + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.22.4.tgz", + "integrity": "sha512-usbHZP9/oxNsUY65MQUsduGRqDHQOou1cagUSwjhoSYAmSahjQDAVsh9s+SlZkn8X8+O1FULRGwHu7AFP3kjzg==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.3.0", + "node-gyp-build": "^4.8.4" + } + }, + "node_modules/@swagger-api/apidom-reference": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@swagger-api/apidom-reference/-/apidom-reference-1.11.1.tgz", + "integrity": "sha512-wxsRo12YVc2Q4o81K9EGzX5oM1htNDkeCIRkLyg1wPvzFQUH4khd6aOWYaX/0V0L+7yqwwmeW/t80xV8qLEGAQ==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.26.10", + "@swagger-api/apidom-core": "^1.11.1", + "@swagger-api/apidom-error": "^1.11.1", + "@types/ramda": "~0.30.0", + "axios": "^1.16.0", + "minimatch": "^10.2.1", + "ramda": "~0.30.0", + "ramda-adjunct": "^5.0.0" + }, + "optionalDependencies": { + "@swagger-api/apidom-json-pointer": "^1.11.1", + "@swagger-api/apidom-ns-arazzo-1": "^1.11.1", + "@swagger-api/apidom-ns-asyncapi-2": "^1.11.1", + "@swagger-api/apidom-ns-openapi-2": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-0": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-1": "^1.11.1", + "@swagger-api/apidom-ns-openapi-3-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-api-design-systems-json": "^1.11.1", + "@swagger-api/apidom-parser-adapter-api-design-systems-yaml": "^1.11.1", + "@swagger-api/apidom-parser-adapter-arazzo-json-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-arazzo-yaml-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-asyncapi-json-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-asyncapi-json-3": "^1.11.1", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-asyncapi-yaml-3": "^1.11.1", + "@swagger-api/apidom-parser-adapter-json": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-json-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-0": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-json-3-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-0": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-1": "^1.11.1", + "@swagger-api/apidom-parser-adapter-openapi-yaml-3-2": "^1.11.1", + "@swagger-api/apidom-parser-adapter-yaml-1-2": "^1.11.1" + } + }, + "node_modules/@swaggerexpert/cookie": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@swaggerexpert/cookie/-/cookie-2.0.2.tgz", + "integrity": "sha512-DPI8YJ0Vznk4CT+ekn3rcFNq1uQwvUHZhH6WvTSPD0YKBIlMS9ur2RYKghXuxxOiqOam/i4lHJH4xTIiTgs3Mg==", + "license": "Apache-2.0", + "dependencies": { + "apg-lite": "^1.0.3" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/@swaggerexpert/json-pointer": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/@swaggerexpert/json-pointer/-/json-pointer-2.10.2.tgz", + "integrity": "sha512-qMx1nOrzoB+PF+pzb26Q4Tc2sOlrx9Ba2UBNX9hB31Omrq+QoZ2Gly0KLrQWw4Of1AQ4J9lnD+XOdwOdcdXqqw==", + "license": "Apache-2.0", + "dependencies": { + "apg-lite": "^1.0.4" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/@tanstack/query-core": { "version": "5.100.14", "resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.100.14.tgz", @@ -1917,6 +2597,15 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/hast": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz", + "integrity": "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==", + "license": "MIT", + "dependencies": { + "@types/unist": "*" + } + }, "node_modules/@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", @@ -1924,11 +2613,26 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/prismjs": { + "version": "1.26.6", + "resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.6.tgz", + "integrity": "sha512-vqlvI7qlMvcCBbVe0AKAb4f97//Hy0EBTaiW8AalRnG/xAN5zOiWWyrNqNXeq8+KAuvRewjCVY1+IPxk4RdNYw==", + "license": "MIT" + }, + "node_modules/@types/ramda": { + "version": "0.30.2", + "resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.30.2.tgz", + "integrity": "sha512-PyzHvjCalm2BRYjAU6nIB3TprYwMNOUY/7P/N8bSzp9W/yM2YrtGtAnnVtaCNSeOZ8DzKyFDvaqQs7LnWwwmBA==", + "license": "MIT", + "dependencies": { + "types-ramda": "^0.30.1" + } + }, "node_modules/@types/react": { "version": "19.2.15", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.15.tgz", "integrity": "sha512-eRwcGNHve+E8qtEQSSRl6urh+rFop4v8gm6O8rGv25CodbvFdLjA1vVQ1KkiFE0w0UPOnb8tDiFKL5lp0rtY5Q==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -1944,6 +2648,35 @@ "@types/react": "^19.2.0" } }, + "node_modules/@types/swagger-ui-react": { + "version": "5.18.0", + "resolved": "https://registry.npmjs.org/@types/swagger-ui-react/-/swagger-ui-react-5.18.0.tgz", + "integrity": "sha512-c2M9adVG7t28t1pq19K9Jt20VLQf0P/fwJwnfcmsVVsdkwCWhRmbKDu+tIs0/NGwJ/7GY8lBx+iKZxuDI5gDbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, + "node_modules/@types/unist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", + "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==", + "license": "MIT" + }, + "node_modules/@types/use-sync-external-store": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz", + "integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==", + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.59.4", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.4.tgz", @@ -2328,12 +3061,48 @@ "react-dom": ">=18.0.0" } }, + "node_modules/apg-lite": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/apg-lite/-/apg-lite-1.0.5.tgz", + "integrity": "sha512-SlI+nLMQDzCZfS39ihzjGp3JNBQfJXyMi6cg9tkLOCPVErgFsUIAEdO9IezR7kbP5Xd0ozcPNQBkf9TO5cHgWw==", + "license": "BSD-2-Clause" + }, + "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==", + "license": "Python-2.0" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "license": "MIT" }, + "node_modules/autolinker": { + "version": "3.16.2", + "resolved": "https://registry.npmjs.org/autolinker/-/autolinker-3.16.2.tgz", + "integrity": "sha512-JiYl7j2Z19F9NdTmirENSUUIIL/9MytEWtmzhfmsKPCp9E+G35Y0UNCMoM9tFigxT59qSc8Ml2dlZXOCVTYwuA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.3.0" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "license": "MIT", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/axios/-/axios-1.16.1.tgz", @@ -2350,12 +3119,31 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, "license": "MIT", "engines": { "node": "18 || 20 || >=22" } }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/baseline-browser-mapping": { "version": "2.10.31", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.31.tgz", @@ -2373,7 +3161,6 @@ "version": "5.0.6", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", - "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" @@ -2416,6 +3203,48 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/call-bind": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.9.tgz", + "integrity": "sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "get-intrinsic": "^1.3.0", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -2466,6 +3295,42 @@ ], "license": "CC-BY-4.0" }, + "node_modules/character-entities": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-2.0.2.tgz", + "integrity": "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-2.0.1.tgz", + "integrity": "sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", + "license": "MIT" + }, "node_modules/clsx": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", @@ -2502,6 +3367,16 @@ "node": ">= 0.8" } }, + "node_modules/comma-separated-tokens": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-2.0.3.tgz", + "integrity": "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/compute-scroll-into-view": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/compute-scroll-into-view/-/compute-scroll-into-view-3.1.1.tgz", @@ -2528,6 +3403,26 @@ "url": "https://opencollective.com/express" } }, + "node_modules/copy-to-clipboard": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz", + "integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==", + "license": "MIT", + "dependencies": { + "toggle-selection": "^1.0.6" + } + }, + "node_modules/core-js-pure": { + "version": "3.49.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.49.0.tgz", + "integrity": "sha512-XM4RFka59xATyJv/cS3O3Kml72hQXUeGRuuTmMYFxwzc9/7C8OYTaIR/Ji+Yt8DXzsFLNhat15cE/JP15HrCgw==", + "hasInstallScript": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/crelt": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.6.tgz", @@ -2549,6 +3444,12 @@ "node": ">= 8" } }, + "node_modules/css.escape": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", + "integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==", + "license": "MIT" + }, "node_modules/csstype": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", @@ -2578,6 +3479,28 @@ } } }, + "node_modules/decode-named-character-reference": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/decode-named-character-reference/-/decode-named-character-reference-1.3.0.tgz", + "integrity": "sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==", + "license": "MIT", + "dependencies": { + "character-entities": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -2585,6 +3508,32 @@ "dev": true, "license": "MIT" }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2604,6 +3553,24 @@ "node": ">=8" } }, + "node_modules/dompurify": { + "version": "3.4.5", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.5.tgz", + "integrity": "sha512-OrwIBKsdNSVEeubdJ1HBv/wNENRM9ytAVCv7YXt//A3vPdVMNuACRqK9mXCGCBW2ln7BT/A4X0jXHo2Gu89miA==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/drange": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/drange/-/drange-1.1.1.tgz", + "integrity": "sha512-pYxfDYpued//QpnLIm4Avk7rsNtAtQkUES2cwAYSvD/wd2pKD71gN2Ebj3e7klzXwjocvE8c5vx/1fxwpqmSxA==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -2872,6 +3839,12 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-json-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", + "license": "MIT" + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -2886,6 +3859,19 @@ "dev": true, "license": "MIT" }, + "node_modules/fault": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/fault/-/fault-1.0.4.tgz", + "integrity": "sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==", + "license": "MIT", + "dependencies": { + "format": "^0.2.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -2975,6 +3961,21 @@ } } }, + "node_modules/for-each": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", + "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/form-data": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", @@ -2991,6 +3992,14 @@ "node": ">= 6" } }, + "node_modules/format": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/format/-/format-0.2.2.tgz", + "integrity": "sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==", + "engines": { + "node": ">=0.4.x" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -3100,6 +4109,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -3139,6 +4160,36 @@ "node": ">= 0.4" } }, + "node_modules/hast-util-parse-selector": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-4.0.0.tgz", + "integrity": "sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hastscript": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-9.0.1.tgz", + "integrity": "sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-parse-selector": "^4.0.0", + "property-information": "^7.0.0", + "space-separated-tokens": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hermes-estree": { "version": "0.25.1", "resolved": "https://registry.npmjs.org/hermes-estree/-/hermes-estree-0.25.1.tgz", @@ -3156,6 +4207,21 @@ "hermes-estree": "0.25.1" } }, + "node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/highlightjs-vue": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/highlightjs-vue/-/highlightjs-vue-1.0.0.tgz", + "integrity": "sha512-PDEfEF102G23vHmPhLyPboFCD+BkMGu+GuJe2d9/eH4FsCwvgBpnc9n0pGE+ffKdph38s6foEZiEjdgHdzp+IA==", + "license": "CC0-1.0" + }, "node_modules/html-parse-stringify": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz", @@ -3206,6 +4272,26 @@ } } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -3216,6 +4302,15 @@ "node": ">= 4" } }, + "node_modules/immutable": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.3.tgz", + "integrity": "sha512-AUY/VyX0E5XlibOmWt10uabJzam1zlYjwiEgQSDc5+UIkFNaF9WM0JxXKaNMGf+F/ffUF+7kRKXM9A7C0xXqMg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -3226,6 +4321,67 @@ "node": ">=0.8.19" } }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, + "node_modules/is-alphabetical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", + "integrity": "sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-2.0.1.tgz", + "integrity": "sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==", + "license": "MIT", + "dependencies": { + "is-alphabetical": "^2.0.0", + "is-decimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-2.0.1.tgz", + "integrity": "sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3249,12 +4405,43 @@ "node": ">=0.10.0" } }, + "node_modules/is-hexadecimal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz", + "integrity": "sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/is-mobile": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-5.0.0.tgz", "integrity": "sha512-Tz/yndySvLAEXh+Uk8liFCxOwVH6YutuR74utvOcu7I9Di+DwM0mtdPVZNaVvvBUM2OXxne/NhOs1zAO7riusQ==", "license": "MIT" }, + "node_modules/is-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", + "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", + "license": "MIT", + "dependencies": { + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "license": "MIT" + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -3262,13 +4449,30 @@ "dev": true, "license": "ISC" }, + "node_modules/js-file-download": { + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/js-file-download/-/js-file-download-0.4.12.tgz", + "integrity": "sha512-rML+NkoD08p5Dllpjo0ffy4jRHeY6Zsapvr/W86N7E0yuzAO6qa5X9+xog6zQNlH102J7IXljNY2FtS6Lj3ucg==", + "license": "MIT" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true, "license": "MIT" }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsesc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", @@ -3638,6 +4842,44 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", + "license": "MIT" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lowlight": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/lowlight/-/lowlight-1.20.0.tgz", + "integrity": "sha512-8Ktj+prEb1RoCPkEOrPMYUN/nCggB7qAWe3a7OpMjWQkh3l2RD5wKRQ+o8Q8YuI9RG/xs95waaI/E6ym/7NsTw==", + "license": "MIT", + "dependencies": { + "fault": "^1.0.0", + "highlight.js": "~10.7.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -3678,11 +4920,22 @@ "node": ">= 0.6" } }, + "node_modules/minim": { + "version": "0.23.8", + "resolved": "https://registry.npmjs.org/minim/-/minim-0.23.8.tgz", + "integrity": "sha512-bjdr2xW1dBCMsMGGsUeqM4eFI60m94+szhxWys+B1ztIt6gWSfeGBdSVCIawezeHYLYn0j6zrsXdQS/JllBzww==", + "license": "MIT", + "dependencies": { + "lodash": "^4.15.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/minimatch": { "version": "10.2.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, "license": "BlueOak-1.0.0", "dependencies": { "brace-expansion": "^5.0.5" @@ -3726,6 +4979,43 @@ "dev": true, "license": "MIT" }, + "node_modules/neotraverse": { + "version": "0.6.18", + "resolved": "https://registry.npmjs.org/neotraverse/-/neotraverse-0.6.18.tgz", + "integrity": "sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==", + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/node-abort-controller": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", + "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==", + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.8.0.tgz", + "integrity": "sha512-c5Ko1fZJIJmzhFIkhRN76WTq+fC6tWnGy9CXA0fA+XygsWZmEwG8vmbkNqxMyoaa0Tin4djul49NzdVcJJcjeA==", + "license": "MIT", + "optional": true, + "engines": { + "node": "^18 || ^20 || >= 21" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-releases": { "version": "2.0.46", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz", @@ -3736,6 +5026,15 @@ "node": ">=18" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/object-inspect": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", @@ -3748,6 +5047,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/openapi-path-templating": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/openapi-path-templating/-/openapi-path-templating-2.2.1.tgz", + "integrity": "sha512-eN14VrDvl/YyGxxrkGOHkVkWEoPyhyeydOUrbvjoz8K5eIGgELASwN1eqFOJ2CTQMGCy2EntOK1KdtJ8ZMekcg==", + "license": "Apache-2.0", + "dependencies": { + "apg-lite": "^1.0.4" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/openapi-server-url-templating": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/openapi-server-url-templating/-/openapi-server-url-templating-1.3.0.tgz", + "integrity": "sha512-DPlCms3KKEbjVQb0spV6Awfn6UWNheuG/+folQPzh/wUaKwuqvj8zt5gagD7qoyxtE03cIiKPgLFS3Q8Bz00uQ==", + "license": "Apache-2.0", + "dependencies": { + "apg-lite": "^1.0.4" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -3810,6 +5133,31 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-entities": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", + "integrity": "sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==", + "license": "MIT", + "dependencies": { + "@types/unist": "^2.0.0", + "character-entities-legacy": "^3.0.0", + "character-reference-invalid": "^2.0.0", + "decode-named-character-reference": "^1.0.0", + "is-alphanumerical": "^2.0.0", + "is-decimal": "^2.0.0", + "is-hexadecimal": "^2.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-entities/node_modules/@types/unist": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz", + "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", + "license": "MIT" + }, "node_modules/path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", @@ -3859,6 +5207,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/possible-typed-array-names": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", + "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.5.15", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz", @@ -3898,6 +5255,42 @@ "node": ">= 0.8.0" } }, + "node_modules/prismjs": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz", + "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" + }, + "node_modules/property-information": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.1.0.tgz", + "integrity": "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/proxy-from-env": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", @@ -3932,6 +5325,60 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "license": "MIT" + }, + "node_modules/ramda": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.30.1.tgz", + "integrity": "sha512-tEF5I22zJnuclswcZMc8bDIrwRHRzf+NqVEmqg50ShAZMP7MWeR/RGDthfM/p+BlqvF2fXAzpn8i+SJcYD3alw==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda" + } + }, + "node_modules/ramda-adjunct": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ramda-adjunct/-/ramda-adjunct-5.1.0.tgz", + "integrity": "sha512-8qCpl2vZBXEJyNbi4zqcgdfHtcdsWjOGbiNSEnEBrM6Y0OKOT8UxJbIVGm1TIcjaSu2MxaWcgtsNlKlCk7o7qg==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/ramda-adjunct" + }, + "peerDependencies": { + "ramda": ">= 0.30.0" + } + }, + "node_modules/randexp": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/randexp/-/randexp-0.5.3.tgz", + "integrity": "sha512-U+5l2KrcMNOUPYvazA3h5ekF80FHTUG+87SEAmHZmolh1M+i/WyTCxVzmi+tidIa1tM4BSe8g2Y/D3loWDjj+w==", + "license": "MIT", + "dependencies": { + "drange": "^1.0.2", + "ret": "^0.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, "node_modules/react": { "version": "19.2.6", "resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz", @@ -3980,12 +5427,58 @@ } } }, + "node_modules/react-immutable-proptypes": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz", + "integrity": "sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ==", + "license": "MIT", + "dependencies": { + "invariant": "^2.2.2" + }, + "peerDependencies": { + "immutable": ">=3.6.2" + } + }, + "node_modules/react-immutable-pure-component": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz", + "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==", + "license": "MIT", + "peerDependencies": { + "immutable": ">= 2 || >= 4.0.0-rc", + "react": ">= 16.6", + "react-dom": ">= 16.6" + } + }, "node_modules/react-is": { "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", "license": "MIT" }, + "node_modules/react-redux": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.3.0.tgz", + "integrity": "sha512-KQopgqFo/p/fgmAs5qz6p5RWaNAzq40WAu7fJIXnQpYxFPbJYtsJPWvGeF2rOBaY/kEuV77AVsX8TsQzKm+A/g==", + "license": "MIT", + "dependencies": { + "@types/use-sync-external-store": "^0.0.6", + "use-sync-external-store": "^1.4.0" + }, + "peerDependencies": { + "@types/react": "^18.2.25 || ^19", + "react": "^18.0 || ^19", + "redux": "^5.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "redux": { + "optional": true + } + } + }, "node_modules/react-router": { "version": "7.15.1", "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.15.1.tgz", @@ -4024,6 +5517,112 @@ "react-dom": ">=18" } }, + "node_modules/react-syntax-highlighter": { + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/react-syntax-highlighter/-/react-syntax-highlighter-16.1.1.tgz", + "integrity": "sha512-PjVawBGy80C6YbC5DDZJeUjBmC7skaoEUdvfFQediQHgCL7aKyVHe57SaJGfQsloGDac+gCpTfRdtxzWWKmCXA==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4", + "highlight.js": "^10.4.1", + "highlightjs-vue": "^1.0.0", + "lowlight": "^1.17.0", + "prismjs": "^1.30.0", + "refractor": "^5.0.0" + }, + "engines": { + "node": ">= 16.20.2" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, + "node_modules/redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "license": "MIT" + }, + "node_modules/redux-immutable": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", + "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==", + "license": "BSD-3-Clause", + "peerDependencies": { + "immutable": "^3.8.1 || ^4.0.0-rc.1" + } + }, + "node_modules/refractor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/refractor/-/refractor-5.0.0.tgz", + "integrity": "sha512-QXOrHQF5jOpjjLfiNk5GFnWhRXvxjUVnlFxkeDmewR5sXkr3iM46Zo+CnRR8B+MDVqkULW4EcLVcRBNOPXHosw==", + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/prismjs": "^1.0.0", + "hastscript": "^9.0.0", + "parse-entities": "^4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/remarkable": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/remarkable/-/remarkable-2.0.1.tgz", + "integrity": "sha512-YJyMcOH5lrR+kZdmB0aJJ4+93bEojRZ1HGDn9Eagu6ibg7aVZhc3OWbbShRid+Q5eAfsEqWxpe+g5W5nYNfNiA==", + "license": "MIT", + "dependencies": { + "argparse": "^1.0.10", + "autolinker": "^3.11.0" + }, + "bin": { + "remarkable": "bin/remarkable.js" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/remarkable/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "license": "MIT" + }, + "node_modules/reselect": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.2.0.tgz", + "integrity": "sha512-AgZ3UOZm3YndfrJ4OYjgrT7bmCm/1iqkjvEfH/oYjzh6PD2qw4QuT3jjnXIrpdt4MTpMXclMT3lXbmRY+XRakw==", + "license": "MIT" + }, + "node_modules/ret": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", + "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/rolldown": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.1.tgz", @@ -4058,6 +5657,26 @@ "@rolldown/binding-win32-x64-msvc": "1.0.1" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.27.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", @@ -4083,12 +5702,64 @@ "semver": "bin/semver.js" } }, + "node_modules/serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "license": "MIT", + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/set-cookie-parser": { "version": "2.7.2", "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", "license": "MIT" }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.12", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.12.tgz", + "integrity": "sha512-8LzC5+bvI45BjpfXU8V5fdU2mfeKiQe1D1gIMn7XUlF3OTUrpdJpPPH4EMAnF0DsHHdSZqCdSss5qCmJKuiO3w==", + "license": "(MIT AND BSD-3-Clause)", + "dependencies": { + "inherits": "^2.0.4", + "safe-buffer": "^5.2.1", + "to-buffer": "^1.2.0" + }, + "bin": { + "sha.js": "bin.js" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -4112,6 +5783,16 @@ "node": ">=8" } }, + "node_modules/short-unique-id": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/short-unique-id/-/short-unique-id-5.3.2.tgz", + "integrity": "sha512-KRT/hufMSxXKEDSQujfVE0Faa/kZ51ihUcZQAcmP04t00DvPj7Ox5anHke1sJYUtzSuiT/Y5uyzg/W7bBEGhCg==", + "license": "Apache-2.0", + "bin": { + "short-unique-id": "bin/short-unique-id", + "suid": "bin/short-unique-id" + } + }, "node_modules/side-channel": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", @@ -4194,6 +5875,22 @@ "node": ">=0.10.0" } }, + "node_modules/space-separated-tokens": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz", + "integrity": "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==", + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "license": "BSD-3-Clause" + }, "node_modules/string-convert": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/string-convert/-/string-convert-0.2.1.tgz", @@ -4212,6 +5909,116 @@ "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==", "license": "MIT" }, + "node_modules/swagger-client": { + "version": "3.37.4", + "resolved": "https://registry.npmjs.org/swagger-client/-/swagger-client-3.37.4.tgz", + "integrity": "sha512-3xxqc9s99Vsf47ket2j7D4Tw6b6T7ObNvTqSP009yBeoAo0fy0yprqOVxFISTrvRxN7jgfrEi8GXMhsjzb1M0g==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.22.15", + "@scarf/scarf": "=1.4.0", + "@swagger-api/apidom-core": "^1.11.0", + "@swagger-api/apidom-error": "^1.11.0", + "@swagger-api/apidom-json-pointer": "^1.11.0", + "@swagger-api/apidom-ns-openapi-3-1": "^1.11.0", + "@swagger-api/apidom-ns-openapi-3-2": "^1.11.0", + "@swagger-api/apidom-reference": "^1.11.0", + "@swaggerexpert/cookie": "^2.0.2", + "deepmerge": "~4.3.0", + "fast-json-patch": "^3.0.0-1", + "js-yaml": "^4.1.0", + "neotraverse": "=0.6.18", + "node-abort-controller": "^3.1.1", + "openapi-path-templating": "^2.2.1", + "openapi-server-url-templating": "^1.3.0", + "ramda": "^0.30.1", + "ramda-adjunct": "^5.1.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/swagger-ui-react": { + "version": "5.32.6", + "resolved": "https://registry.npmjs.org/swagger-ui-react/-/swagger-ui-react-5.32.6.tgz", + "integrity": "sha512-2q2kXd6eDR+syyWV5HE2CkWANyr2MHPkNezG4M7fC0FPlBUZEsNgyA/2dcb9dIwgE5xd995dO42h89fNMF5/ng==", + "license": "Apache-2.0", + "dependencies": { + "@babel/runtime-corejs3": "^7.27.1", + "@scarf/scarf": "=1.4.0", + "base64-js": "^1.5.1", + "buffer": "^6.0.3", + "classnames": "^2.5.1", + "css.escape": "1.5.1", + "deep-extend": "0.6.0", + "dompurify": "^3.4.0", + "ieee754": "^1.2.1", + "immutable": "^3.x.x", + "js-file-download": "^0.4.12", + "js-yaml": "=4.1.1", + "lodash": "^4.18.1", + "prop-types": "^15.8.1", + "randexp": "^0.5.3", + "randombytes": "^2.1.0", + "react-copy-to-clipboard": "5.1.0", + "react-debounce-input": "=3.3.0", + "react-immutable-proptypes": "2.2.0", + "react-immutable-pure-component": "^2.2.0", + "react-inspector": "^6.0.1", + "react-redux": "^9.2.0", + "react-syntax-highlighter": "^16.0.0", + "redux": "^5.0.1", + "redux-immutable": "^4.0.0", + "remarkable": "^2.0.1", + "reselect": "^5.1.1", + "serialize-error": "^8.1.0", + "sha.js": "^2.4.12", + "swagger-client": "^3.37.4", + "url-parse": "^1.5.10", + "xml": "=1.0.1", + "xml-but-prettier": "^1.0.1", + "zenscroll": "^4.0.2" + }, + "peerDependencies": { + "react": ">=16.8.0 <20", + "react-dom": ">=16.8.0 <20" + } + }, + "node_modules/swagger-ui-react/node_modules/react-copy-to-clipboard": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.1.0.tgz", + "integrity": "sha512-k61RsNgAayIJNoy9yDsYzDe/yAZAzEbEgcz3DZMhF686LEyukcE1hzurxe85JandPUG+yTfGVFzuEw3xt8WP/A==", + "license": "MIT", + "dependencies": { + "copy-to-clipboard": "^3.3.1", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/swagger-ui-react/node_modules/react-debounce-input": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/react-debounce-input/-/react-debounce-input-3.3.0.tgz", + "integrity": "sha512-VEqkvs8JvY/IIZvh71Z0TC+mdbxERvYF33RcebnodlsUZ8RSgyKe2VWaHXv4+/8aoOgXLxWrdsYs2hDhcwbUgA==", + "license": "MIT", + "dependencies": { + "lodash.debounce": "^4", + "prop-types": "^15.8.1" + }, + "peerDependencies": { + "react": "^15.3.0 || 16 || 17 || 18" + } + }, + "node_modules/swagger-ui-react/node_modules/react-inspector": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.2.tgz", + "integrity": "sha512-x+b7LxhmHXjHoU/VrFAzw5iutsILRoYyDq97EDYdFpPLcvqtEzk4ZSZSQjnFPbr5T57tLXnHcqFYoN1pI6u8uQ==", + "license": "MIT", + "peerDependencies": { + "react": "^16.8.4 || ^17.0.0 || ^18.0.0" + } + }, "node_modules/throttle-debounce": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-5.0.2.tgz", @@ -4238,6 +6045,58 @@ "url": "https://github.com/sponsors/SuperchupuDev" } }, + "node_modules/to-buffer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.2.2.tgz", + "integrity": "sha512-db0E3UJjcFhpDhAF4tLo03oli3pwl3dbnzXOUIlRKrp+ldk/VUxzpWYZENsw2SZiuBjHAk7DfB0VU7NKdpb6sw==", + "license": "MIT", + "dependencies": { + "isarray": "^2.0.5", + "safe-buffer": "^5.2.1", + "typed-array-buffer": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/toggle-selection": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz", + "integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==", + "license": "MIT" + }, + "node_modules/tree-sitter": { + "version": "0.21.1", + "resolved": "https://registry.npmjs.org/tree-sitter/-/tree-sitter-0.21.1.tgz", + "integrity": "sha512-7dxoA6kYvtgWw80265MyqJlkRl4yawIjO7S5MigytjELkX43fV2WsAXzsNfO7sBpPPCF5Gp0+XzHk0DwLCq3xQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.0" + } + }, + "node_modules/tree-sitter-json": { + "version": "0.24.8", + "resolved": "https://registry.npmjs.org/tree-sitter-json/-/tree-sitter-json-0.24.8.tgz", + "integrity": "sha512-Tc9ZZYwHyWZ3Tt1VEw7Pa2scu1YO7/d2BCBbKTx5hXwig3UfdQjsOPkPyLpDJOn/m1UBEWYAtSdGAwCSyagBqQ==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-addon-api": "^8.2.2", + "node-gyp-build": "^4.8.2" + }, + "peerDependencies": { + "tree-sitter": "^0.21.1" + }, + "peerDependenciesMeta": { + "tree-sitter": { + "optional": true + } + } + }, "node_modules/ts-api-utils": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", @@ -4251,13 +6110,23 @@ "typescript": ">=4.8.4" } }, + "node_modules/ts-mixer": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", + "license": "MIT" + }, + "node_modules/ts-toolbelt": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-9.6.0.tgz", + "integrity": "sha512-nsZd8ZeNUzukXPlJmTBwUAuABDe/9qtVDelJeT/qW0ow3ZS3BsQJtNkan1802aM9Uf68/Y8ljw86Hu0h5IUW3w==", + "license": "Apache-2.0" + }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "dev": true, - "license": "0BSD", - "optional": true + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", @@ -4272,6 +6141,41 @@ "node": ">= 0.8.0" } }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.3.tgz", + "integrity": "sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/types-ramda": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/types-ramda/-/types-ramda-0.30.1.tgz", + "integrity": "sha512-1HTsf5/QVRmLzcGfldPFvkVsAdi1db1BBKzi7iW3KBUlOICg/nKnFS+jGqDJS3YD8VsWbAh7JiHeBvbsw8RPxA==", + "license": "MIT", + "dependencies": { + "ts-toolbelt": "^9.6.0" + } + }, "node_modules/typescript": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", @@ -4310,6 +6214,12 @@ "typescript": ">=4.8.4 <6.1.0" } }, + "node_modules/unraw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unraw/-/unraw-3.0.0.tgz", + "integrity": "sha512-08/DA66UF65OlpUDIQtbJyrqTR0jTAlJ+jsnkQ4jxR7+K5g5YG1APZKQSMCE1vqqmD+2pv6+IdEjmopFatacvg==", + "license": "MIT" + }, "node_modules/update-browserslist-db": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", @@ -4351,6 +6261,16 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "license": "MIT", + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "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", @@ -4453,6 +6373,13 @@ "integrity": "sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==", "license": "MIT" }, + "node_modules/web-tree-sitter": { + "version": "0.24.5", + "resolved": "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.24.5.tgz", + "integrity": "sha512-+J/2VSHN8J47gQUAvF8KDadrfz6uFYVjxoxbKWDoXVsH2u7yLdarCnIURnrMA6uSRkgX3SdmqM5BOoQjPdSh5w==", + "license": "MIT", + "optional": true + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -4469,6 +6396,27 @@ "node": ">= 8" } }, + "node_modules/which-typed-array": { + "version": "1.1.20", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.20.tgz", + "integrity": "sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==", + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", + "for-each": "^0.3.5", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -4479,6 +6427,21 @@ "node": ">=0.10.0" } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "license": "MIT" + }, + "node_modules/xml-but-prettier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml-but-prettier/-/xml-but-prettier-1.0.1.tgz", + "integrity": "sha512-C2CJaadHrZTqESlH03WOyw0oZTtoy2uEg6dSDF6YRg+9GnYNub53RRemLpnvtbHDFelxMx4LajiFsYeR6XJHgQ==", + "license": "MIT", + "dependencies": { + "repeat-string": "^1.5.2" + } + }, "node_modules/yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", @@ -4499,6 +6462,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zenscroll": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/zenscroll/-/zenscroll-4.0.2.tgz", + "integrity": "sha512-jEA1znR7b4C/NnaycInCU6h/d15ZzCd1jmsruqOKnZP6WXQSMH3W2GL+OXbkruslU4h+Tzuos0HdswzRUk/Vgg==", + "license": "Unlicense" + }, "node_modules/zod": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index e354c754..a62b16f5 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,10 +10,11 @@ }, "scripts": { "dev": "vite", - "build": "vite build", + "build": "npm run gen:api && vite build", "preview": "vite preview", "lint": "eslint src", - "typecheck": "tsc --noEmit" + "typecheck": "tsc --noEmit", + "gen:api": "node scripts/build-openapi.mjs" }, "dependencies": { "@ant-design/icons": "^6.2.3", @@ -32,12 +33,14 @@ "react": "^19.2.6", "react-dom": "^19.2.6", "react-i18next": "^17.0.8", - "react-router-dom": "^7.15.1" + "react-router-dom": "^7.15.1", + "swagger-ui-react": "^5.32.6" }, "devDependencies": { "@eslint/js": "^10.0.1", "@types/react": "^19.2.15", "@types/react-dom": "^19.2.3", + "@types/swagger-ui-react": "^5.18.0", "@vitejs/plugin-react": "^6.0.2", "eslint": "^10.4.0", "eslint-plugin-react-hooks": "^7.1.1", diff --git a/frontend/public/openapi.json b/frontend/public/openapi.json new file mode 100644 index 00000000..fedcded9 --- /dev/null +++ b/frontend/public/openapi.json @@ -0,0 +1,4944 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "3X-UI Panel API", + "version": "3.x", + "description": "Programmatic interface to a 3X-UI panel. Authenticate either by logging in (cookie) or with an API token from Settings → Security → API Token (Bearer). All endpoints under /panel/api/* honour both modes." + }, + "servers": [ + { + "url": "/", + "description": "Current panel (basePath aware)" + } + ], + "components": { + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "description": "API token from Settings → Security → API Token. Send as `Authorization: Bearer `." + }, + "cookieAuth": { + "type": "apiKey", + "in": "cookie", + "name": "3x-ui", + "description": "Session cookie set by POST /login. Browser-only." + } + } + }, + "security": [ + { + "bearerAuth": [] + }, + { + "cookieAuth": [] + } + ], + "tags": [ + { + "name": "Authentication", + "description": "Two authentication modes are supported. UI sessions use a cookie set by the login endpoint. Programmatic clients (bots, scripts, remote panels) authenticate with a Bearer token taken from Settings → Security → API Token. Both work for every endpoint under /panel/api/*." + }, + { + "name": "Inbounds", + "description": "Manage inbound configurations and their clients. All endpoints live under /panel/api/inbounds and require a logged-in session or Bearer token. Link-generating endpoints honour forwarded headers only when the request comes from a configured trusted proxy." + }, + { + "name": "Server", + "description": "System status, log retrieval, certificate generators, Xray binary management, and backup/restore. All under /panel/api/server." + }, + { + "name": "Clients", + "description": "Manage clients as first-class entities that can be attached to one or more inbounds. A single client row drives the settings.clients entry in every inbound it belongs to. Endpoints live under /panel/api/clients." + }, + { + "name": "Nodes", + "description": "Manage remote 3x-ui panels acting as nodes for a central panel. All endpoints under /panel/api/nodes." + }, + { + "name": "Custom Geo", + "description": "Manage user-supplied GeoIP / GeoSite source files. All endpoints under /panel/api/custom-geo." + }, + { + "name": "Backup", + "description": "Operations that interact with the configured Telegram bot." + }, + { + "name": "Settings", + "description": "Panel configuration and user credentials. All endpoints live under /panel/setting and require a logged-in session or Bearer token." + }, + { + "name": "API Tokens", + "description": "Manage Bearer tokens used for programmatic auth (bots, central panels acting on this node, CI). Each token has a unique name and an enabled flag — disable to revoke without deleting, delete to revoke permanently. Tokens are stored plaintext so the SPA can show them on demand. Send one as Authorization: Bearer <token> on any /panel/api/* request." + }, + { + "name": "Xray Settings", + "description": "Xray configuration template, outbound management, Warp/Nord integration, and config testing. All endpoints under /panel/xray." + }, + { + "name": "Subscription Server", + "description": "A separate HTTP/HTTPS server that serves proxy subscription links (standard, JSON, and Clash) to clients. The server listens on its own port (default 10882) and is configured in Settings → Subscription. Paths are configurable; defaults are shown below. All subscription endpoints set response headers for client apps to read traffic/expiry info." + }, + { + "name": "WebSocket", + "description": "Real-time status updates via WebSocket. Connect once at ws:///ws to receive a stream of JSON messages without polling. Requires an authenticated session cookie (Bearer token auth is not supported). Each message has a type field that identifies the payload shape." + } + ], + "paths": { + "/login": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Authenticate with username + password and receive a session cookie. Required before any cookie-based API call.", + "operationId": "post_login", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "username": { + "type": "string", + "description": "Panel admin username." + }, + "password": { + "type": "string", + "description": "Panel admin password." + }, + "twoFactorCode": { + "type": "string", + "description": "OTP code when 2FA is enabled. Omit otherwise." + } + }, + "required": [ + "username", + "password", + "twoFactorCode" + ] + }, + "example": { + "username": "admin", + "password": "admin", + "twoFactorCode": "123456" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "msg": "Logged in successfully" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + } + } + }, + "example": { + "success": false, + "msg": "Wrong username or password" + } + } + } + } + } + } + }, + "/logout": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Clear the session cookie. Requires the CSRF header for browser sessions.", + "operationId": "post_logout", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true + } + } + } + } + } + } + }, + "/csrf-token": { + "get": { + "tags": [ + "Authentication" + ], + "summary": "Mint a CSRF token for the current session. The SPA replays it in the X-CSRF-Token header on unsafe requests. Bearer-token callers can skip this — the middleware short-circuits CSRF for authenticated API requests.", + "operationId": "get_csrf_token", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": "csrf-token-string" + } + } + } + } + } + } + }, + "/getTwoFactorEnable": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Returns whether 2FA is enabled on the panel — used by the login page to decide whether to show the OTP field.", + "operationId": "post_getTwoFactorEnable", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": false + } + } + } + } + } + } + }, + "/panel/api/inbounds/list": { + "get": { + "tags": [ + "Inbounds" + ], + "summary": "List every inbound owned by the authenticated user, including each inbound’s clientStats traffic counters. settings, streamSettings, and sniffing are returned as nested JSON objects (no escaped strings); legacy callers that send them back as JSON-encoded strings are still accepted on write.", + "operationId": "get_panel_api_inbounds_list", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "userId": 1, + "up": 0, + "down": 0, + "total": 0, + "remark": "VLESS-443", + "enable": true, + "expiryTime": 0, + "listen": "", + "port": 443, + "protocol": "vless", + "settings": { + "clients": [], + "decryption": "none" + }, + "streamSettings": { + "network": "tcp", + "security": "reality", + "realitySettings": { + "show": false, + "dest": "..." + } + }, + "tag": "inbound-443", + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + }, + "clientStats": [] + } + ] + } + } + } + } + } + } + }, + "/panel/api/inbounds/list/slim": { + "get": { + "tags": [ + "Inbounds" + ], + "summary": "Same shape as /list but with settings.clients[] stripped down to {email, enable, comment} and ClientStats not enriched with UUID/SubId. Use this for list pages; fetch /get/:id when you need the full per-client payload (uuid, password, flow, ...).", + "operationId": "get_panel_api_inbounds_list_slim", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "userId": 1, + "remark": "VLESS-443", + "settings": { + "clients": [ + { + "email": "alice", + "enable": true + } + ], + "decryption": "none" + }, + "clientStats": [] + } + ] + } + } + } + } + } + } + }, + "/panel/api/inbounds/options": { + "get": { + "tags": [ + "Inbounds" + ], + "summary": "Lightweight picker projection of the authenticated user’s inbounds. Returns only id, remark, protocol, port, and a server-computed tlsFlowCapable flag (true for VLESS / port-fallback on TCP with tls or reality). Use this for dropdowns and attach pickers — it skips settings, streamSettings, and clientStats so the payload stays small even on panels with thousands of clients.", + "operationId": "get_panel_api_inbounds_options", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "remark": "VLESS-443", + "protocol": "vless", + "port": 443, + "tlsFlowCapable": true + } + ] + } + } + } + } + } + } + }, + "/panel/api/inbounds/get/{id}": { + "get": { + "tags": [ + "Inbounds" + ], + "summary": "Fetch a single inbound by numeric ID.", + "operationId": "get_panel_api_inbounds_get_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/add": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Create a new inbound. Send the full inbound payload (protocol, port, settings, streamSettings, sniffing, remark, expiryTime, total, enable). settings, streamSettings, and sniffing may be sent as nested JSON objects (preferred) or as JSON-encoded strings (legacy).", + "operationId": "post_panel_api_inbounds_add", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "enable": true, + "remark": "VLESS-443", + "listen": "", + "port": 443, + "protocol": "vless", + "expiryTime": 0, + "total": 0, + "settings": { + "clients": [ + { + "id": "...", + "email": "user1" + } + ], + "decryption": "none", + "fallbacks": [] + }, + "streamSettings": { + "network": "tcp", + "security": "reality", + "realitySettings": { + "show": false, + "dest": "..." + } + }, + "sniffing": { + "enabled": true, + "destOverride": [ + "http", + "tls" + ] + } + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + } + } + }, + "example": { + "success": false, + "msg": "Port 443 is already in use" + } + } + } + } + } + } + }, + "/panel/api/inbounds/del/{id}": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Delete an inbound by ID. Also removes its associated client stats rows.", + "operationId": "post_panel_api_inbounds_del_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/update/{id}": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Replace an inbound’s configuration. Body shape mirrors /add. Heavy on inbounds with thousands of clients — prefer /setEnable for enable-only flips.", + "operationId": "post_panel_api_inbounds_update_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/setEnable/{id}": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Toggle only the enable flag without serialising the whole settings JSON. Recommended for UI switches on large inbounds.", + "operationId": "post_panel_api_inbounds_setEnable_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "enable": false + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/{id}/resetTraffic": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Zero out upload + download counters for a single inbound. Does not touch per-client counters.", + "operationId": "post_panel_api_inbounds_id_resetTraffic", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/resetAllTraffics": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Reset upload + download counters on every inbound. Destructive — accounting history is lost.", + "operationId": "post_panel_api_inbounds_resetAllTraffics", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/import": { + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Bulk-import an inbound from a JSON blob (e.g. one exported via the UI). The body uses form encoding with a single \"data\" field.", + "operationId": "post_panel_api_inbounds_import", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/inbounds/{id}/fallbacks": { + "get": { + "tags": [ + "Inbounds" + ], + "summary": "List the fallback rules attached to a master VLESS/Trojan TCP-TLS inbound. Each rule links one child inbound (the dest) to optional SNI/ALPN/path/xver match criteria.", + "operationId": "get_panel_api_inbounds_id_fallbacks", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Master inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "masterId": 10, + "childId": 11, + "name": "", + "alpn": "", + "path": "/vlws", + "xver": 2, + "sortOrder": 0 + } + ] + } + } + } + } + } + }, + "post": { + "tags": [ + "Inbounds" + ], + "summary": "Replace the entire fallback list for a master inbound. Body is JSON. Triggers an Xray restart.", + "operationId": "post_panel_api_inbounds_id_fallbacks", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Master inbound ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "fallbacks": [ + { + "childId": 11, + "path": "/vlws", + "xver": 2 + }, + { + "childId": 12, + "alpn": "h2" + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "msg": "Inbound updated" + } + } + } + } + } + } + }, + "/panel/api/server/status": { + "get": { + "tags": [ + "Server" + ], + "summary": "Real-time machine snapshot: CPU, memory, swap, disk, network IO, load averages, open connections, Xray state. Cached and refreshed every 2 seconds in the background.", + "operationId": "get_panel_api_server_status", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "cpu": 12.5, + "mem": { + "current": 2147483648, + "total": 8589934592 + }, + "swap": { + "current": 0, + "total": 4294967296 + }, + "disk": { + "current": 53687091200, + "total": 268435456000 + }, + "netIO": { + "up": 1073741824, + "down": 2147483648 + }, + "xray": { + "state": "running", + "version": "v25.10.31" + }, + "tcpCount": 42, + "load": { + "load1": 0.5, + "load5": 0.3, + "load15": 0.2 + } + } + } + } + } + } + } + } + }, + "/panel/api/server/cpuHistory/{bucket}": { + "get": { + "tags": [ + "Server" + ], + "summary": "Legacy: aggregated CPU history. Use /history/cpu/:bucket instead — same data with a uniform {t, v} shape.", + "operationId": "get_panel_api_server_cpuHistory_bucket", + "parameters": [ + { + "name": "bucket", + "in": "path", + "required": true, + "description": "Bucket size in seconds. Allowed: 2, 30, 60, 120, 180, 300.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/history/{metric}/{bucket}": { + "get": { + "tags": [ + "Server" + ], + "summary": "Aggregated time-series for one metric. Returns an array of {t, v} samples covering the last ~6 hours.", + "operationId": "get_panel_api_server_history_metric_bucket", + "parameters": [ + { + "name": "metric", + "in": "path", + "required": true, + "description": "cpu | mem | netUp | netDown | online | load1 | load5 | load15.", + "schema": { + "type": "string" + } + }, + { + "name": "bucket", + "in": "path", + "required": true, + "description": "Bucket size in seconds. Allowed: 2, 30, 60, 120, 180, 300.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "t": 1700000000, + "v": 12.5 + }, + { + "t": 1700000002, + "v": 13.1 + } + ] + } + } + } + } + } + } + }, + "/panel/api/server/xrayMetricsState": { + "get": { + "tags": [ + "Server" + ], + "summary": "Xray runtime metrics state — whether the xray config has a `metrics` block, which expvar keys are flowing, and the current snapshot values for each. Returns an empty state when metrics are not configured.", + "operationId": "get_panel_api_server_xrayMetricsState", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/xrayMetricsHistory/{metric}/{bucket}": { + "get": { + "tags": [ + "Server" + ], + "summary": "Time-series history for one Xray runtime metric over the last ~6 hours. Same {t, v} shape as /history/:metric/:bucket.", + "operationId": "get_panel_api_server_xrayMetricsHistory_metric_bucket", + "parameters": [ + { + "name": "metric", + "in": "path", + "required": true, + "description": "xrAlloc | xrSys | xrHeapObjects | xrNumGC | xrPauseNs.", + "schema": { + "type": "string" + } + }, + { + "name": "bucket", + "in": "path", + "required": true, + "description": "Bucket size in seconds. Allowed: 2, 30, 60, 120, 180, 300.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/xrayObservatory": { + "get": { + "tags": [ + "Server" + ], + "summary": "Latest snapshot from the Xray observatory — per-outbound latency, health status, and last-probe time. Only populated when the Xray config has an observatory configured.", + "operationId": "get_panel_api_server_xrayObservatory", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/xrayObservatoryHistory/{tag}/{bucket}": { + "get": { + "tags": [ + "Server" + ], + "summary": "Time-series of observatory probe results for one outbound tag. Same {t, v} shape as the other history endpoints.", + "operationId": "get_panel_api_server_xrayObservatoryHistory_tag_bucket", + "parameters": [ + { + "name": "tag", + "in": "path", + "required": true, + "description": "Outbound tag from the observatory config.", + "schema": { + "type": "string" + } + }, + { + "name": "bucket", + "in": "path", + "required": true, + "description": "Bucket size in seconds. Allowed: 2, 30, 60, 120, 180, 300.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/getXrayVersion": { + "get": { + "tags": [ + "Server" + ], + "summary": "List Xray binary versions available for install on this host.", + "operationId": "get_panel_api_server_getXrayVersion", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + "v25.10.31", + "v25.9.15", + "v25.8.1" + ] + } + } + } + } + } + } + }, + "/panel/api/server/getPanelUpdateInfo": { + "get": { + "tags": [ + "Server" + ], + "summary": "Check whether a newer 3x-ui release is available on GitHub.", + "operationId": "get_panel_api_server_getPanelUpdateInfo", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/getConfigJson": { + "get": { + "tags": [ + "Server" + ], + "summary": "Return the assembled Xray config that’s currently running on this host.", + "operationId": "get_panel_api_server_getConfigJson", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/getDb": { + "get": { + "tags": [ + "Server" + ], + "summary": "Stream the SQLite database file as an attachment. Use as a manual backup.", + "operationId": "get_panel_api_server_getDb", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/getNewUUID": { + "get": { + "tags": [ + "Server" + ], + "summary": "Generate a fresh UUID v4. Convenience helper for client IDs.", + "operationId": "get_panel_api_server_getNewUUID", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": "550e8400-e29b-41d4-a716-446655440000" + } + } + } + } + } + } + }, + "/panel/api/server/getNewX25519Cert": { + "get": { + "tags": [ + "Server" + ], + "summary": "Generate a new X25519 keypair for Reality.", + "operationId": "get_panel_api_server_getNewX25519Cert", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "privateKey": "uN9qLfV3zH8w...", + "publicKey": "5v8xPqR2sM7k..." + } + } + } + } + } + } + } + }, + "/panel/api/server/getNewmldsa65": { + "get": { + "tags": [ + "Server" + ], + "summary": "Generate a new ML-DSA-65 keypair (post-quantum signature). Returns {privateKey, publicKey, seed}.", + "operationId": "get_panel_api_server_getNewmldsa65", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "privateKey": "mdsa65priv...", + "publicKey": "mdsa65pub...", + "seed": "random-seed..." + } + } + } + } + } + } + } + }, + "/panel/api/server/getNewmlkem768": { + "get": { + "tags": [ + "Server" + ], + "summary": "Generate a new ML-KEM-768 keypair (post-quantum KEM). Returns {clientKey, serverKey}.", + "operationId": "get_panel_api_server_getNewmlkem768", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "clientKey": "mlkem768-client...", + "serverKey": "mlkem768-server..." + } + } + } + } + } + } + } + }, + "/panel/api/server/getNewVlessEnc": { + "get": { + "tags": [ + "Server" + ], + "summary": "Generate VLESS encryption auth options. Returns an auths array each with id, label, encryption, and decryption fields.", + "operationId": "get_panel_api_server_getNewVlessEnc", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "auths": [ + { + "id": 0, + "label": "Auth #0", + "encryption": "aes-256-gcm", + "decryption": "" + } + ] + } + } + } + } + } + } + } + }, + "/panel/api/server/stopXrayService": { + "post": { + "tags": [ + "Server" + ], + "summary": "Stop the Xray binary. All proxies go offline immediately.", + "operationId": "post_panel_api_server_stopXrayService", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + } + } + }, + "example": { + "success": false, + "msg": "Xray is not running" + } + } + } + } + } + } + }, + "/panel/api/server/restartXrayService": { + "post": { + "tags": [ + "Server" + ], + "summary": "Reload Xray with the current config. Typically required after structural inbound or routing changes.", + "operationId": "post_panel_api_server_restartXrayService", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + } + } + }, + "example": { + "success": false, + "msg": "Xray config is invalid: ..." + } + } + } + } + } + } + }, + "/panel/api/server/installXray/{version}": { + "post": { + "tags": [ + "Server" + ], + "summary": "Download and install the specified Xray version. Pass \"latest\" for the newest release.", + "operationId": "post_panel_api_server_installXray_version", + "parameters": [ + { + "name": "version", + "in": "path", + "required": true, + "description": "Xray tag (e.g. v25.10.31) or \"latest\".", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/updatePanel": { + "post": { + "tags": [ + "Server" + ], + "summary": "Self-update the panel to the latest version. The server restarts on success.", + "operationId": "post_panel_api_server_updatePanel", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/updateGeofile": { + "post": { + "tags": [ + "Server" + ], + "summary": "Refresh the default GeoIP / GeoSite data files. Body can include a fileName, or use the /:fileName variant.", + "operationId": "post_panel_api_server_updateGeofile", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/updateGeofile/{fileName}": { + "post": { + "tags": [ + "Server" + ], + "summary": "Refresh a single Geo file by filename (e.g. geoip.dat, geosite.dat).", + "operationId": "post_panel_api_server_updateGeofile_fileName", + "parameters": [ + { + "name": "fileName", + "in": "path", + "required": true, + "description": "Filename of the data file to refresh.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/logs/{count}": { + "post": { + "tags": [ + "Server" + ], + "summary": "Return the last N lines of the panel’s own log.", + "operationId": "post_panel_api_server_logs_count", + "parameters": [ + { + "name": "count", + "in": "path", + "required": true, + "description": "Number of trailing log lines.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "level": "info", + "syslog": false + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": "2025/01/01 12:00:00 [INFO] Server started\n2025/01/01 12:00:01 [INFO] Xray is running" + } + } + } + } + } + } + }, + "/panel/api/server/xraylogs/{count}": { + "post": { + "tags": [ + "Server" + ], + "summary": "Return the last N lines of the Xray process log.", + "operationId": "post_panel_api_server_xraylogs_count", + "parameters": [ + { + "name": "count", + "in": "path", + "required": true, + "description": "Number of trailing log lines.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": "2025/01/01 12:00:00 rejected vless proxy example.com reason: no valid user\n2025/01/01 12:00:01 direct freedom ok" + } + } + } + } + } + } + }, + "/panel/api/server/importDB": { + "post": { + "tags": [ + "Server" + ], + "summary": "Restore the panel DB from an uploaded SQLite file (multipart form, field name \"db\"). The panel restarts after restore. Destructive.", + "operationId": "post_panel_api_server_importDB", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/server/getNewEchCert": { + "post": { + "tags": [ + "Server" + ], + "summary": "Generate a new ECH (Encrypted Client Hello) keypair and config list for the given SNI.", + "operationId": "post_panel_api_server_getNewEchCert", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/clients/list": { + "get": { + "tags": [ + "Clients" + ], + "summary": "List every client with its attached inbound IDs and traffic record. The reverse field, if set, is returned as a nested JSON object (legacy JSON-encoded-string form is still accepted on write).", + "operationId": "get_panel_api_clients_list", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "email": "alice@example.com", + "subId": "abcd1234", + "uuid": "...", + "totalGB": 53687091200, + "expiryTime": 1735689600000, + "enable": true, + "reverse": null, + "inboundIds": [ + 3, + 5 + ], + "traffic": { + "up": 1024, + "down": 4096, + "enable": true + } + } + ] + } + } + } + } + } + } + }, + "/panel/api/clients/list/paged": { + "get": { + "tags": [ + "Clients" + ], + "summary": "Filter, sort, and paginate clients on the server. Each item is a slim row (no uuid/password/auth/flow/security/reverse/tgId) so the clients page can ship 25-ish rows in a few KB instead of the full table. The response also includes a summary computed across the full DB row set so dashboard counters stay stable as the user paginates or filters. Page size capped at 200; fetch /get/:email to obtain the full per-client payload for an edit/info modal.", + "operationId": "get_panel_api_clients_list_paged", + "parameters": [ + { + "name": "page", + "in": "query", + "required": true, + "description": "1-indexed page number. Defaults to 1.", + "schema": { + "type": "integer" + } + }, + { + "name": "pageSize", + "in": "query", + "required": true, + "description": "Rows per page. Defaults to 25, capped at 200.", + "schema": { + "type": "integer" + } + }, + { + "name": "search", + "in": "query", + "required": true, + "description": "Case-insensitive substring match on email / subId / comment.", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "required": true, + "description": "Status bucket: online | active | deactive | depleted | expiring.", + "schema": { + "type": "string" + } + }, + { + "name": "protocol", + "in": "query", + "required": true, + "description": "Match clients attached to at least one inbound of this protocol (vless, vmess, trojan, shadowsocks, ...).", + "schema": { + "type": "string" + } + }, + { + "name": "sort", + "in": "query", + "required": true, + "description": "Sort key: enable | email | inboundIds | traffic | remaining | expiryTime.", + "schema": { + "type": "string" + } + }, + { + "name": "order", + "in": "query", + "required": true, + "description": "ascend or descend.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "items": [ + { + "email": "alice@example.com", + "subId": "abcd1234", + "enable": true, + "totalGB": 53687091200, + "expiryTime": 1735689600000, + "limitIp": 0, + "reset": 0, + "inboundIds": [ + 3, + 5 + ], + "traffic": { + "up": 1024, + "down": 4096, + "enable": true + }, + "createdAt": 1735000000000, + "updatedAt": 1735100000000 + } + ], + "total": 2000, + "filtered": 47, + "page": 1, + "pageSize": 25, + "summary": { + "total": 2000, + "active": 1850, + "online": [ + "alice@example.com" + ], + "depleted": [], + "expiring": [], + "deactive": [] + } + } + } + } + } + } + } + } + }, + "/panel/api/clients/get/{email}": { + "get": { + "tags": [ + "Clients" + ], + "summary": "Fetch one client by email, including the inbound IDs it is attached to.", + "operationId": "get_panel_api_clients_get_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email (unique identifier).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/clients/add": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Create a new client and attach it to one or more inbounds in a single call. Body is JSON. Per-protocol secrets (UUID for VLESS/VMess, password for Trojan/Shadowsocks, auth for Hysteria) are generated server-side when omitted, so callers can send only the universal fields.", + "operationId": "post_panel_api_clients_add", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "client": { + "email": "alice@example.com", + "totalGB": 53687091200, + "expiryTime": 1735689600000, + "tgId": 0, + "limitIp": 0, + "enable": true + }, + "inboundIds": [ + 3, + 5 + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "msg": "Client added" + } + } + } + } + } + } + }, + "/panel/api/clients/update/{email}": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Update an existing client by email. Changes propagate to every attached inbound. Body is the JSON client payload — supply the full set of fields you want to keep (the server replaces the row, it does not patch).", + "operationId": "post_panel_api_clients_update_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Current client email (unique identifier).", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "email": "alice@example.com", + "totalGB": 107374182400, + "expiryTime": 1767225600000, + "tgId": 123456789, + "enable": true + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "msg": "Client updated" + } + } + } + } + } + } + }, + "/panel/api/clients/del/{email}": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Delete a client by email. Removes it from every attached inbound and drops its traffic record unless keepTraffic=1 is passed.", + "operationId": "post_panel_api_clients_del_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email (unique identifier).", + "schema": { + "type": "string" + } + }, + { + "name": "keepTraffic", + "in": "query", + "required": true, + "description": "Pass 1 to retain the xray_client_traffic row after deletion.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "msg": "Client deleted" + } + } + } + } + } + } + }, + "/panel/api/clients/{email}/attach": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Attach an existing client to one or more additional inbounds. Body is JSON.", + "operationId": "post_panel_api_clients_email_attach", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email (unique identifier).", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "inboundIds": [ + 7, + 9 + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true + } + } + } + } + } + } + }, + "/panel/api/clients/{email}/detach": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Detach a client from one or more inbounds without deleting the client.", + "operationId": "post_panel_api_clients_email_detach", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email (unique identifier).", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "inboundIds": [ + 5 + ] + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true + } + } + } + } + } + } + }, + "/panel/api/clients/resetAllTraffics": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Reset the up/down counters for every client globally. Quotas and expiry are not affected. Triggers an Xray restart if any counter actually moved.", + "operationId": "post_panel_api_clients_resetAllTraffics", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true + } + } + } + } + } + } + }, + "/panel/api/clients/delDepleted": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Delete every client whose traffic quota is exhausted (used >= total, when reset is disabled) or whose expiry has passed. Returns the deleted count and triggers an Xray restart when any client was on a running inbound.", + "operationId": "post_panel_api_clients_delDepleted", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "deleted": 0 + } + } + } + } + } + } + } + }, + "/panel/api/clients/bulkAdjust": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Shift expiry and/or traffic quota for many clients in one call. addDays/addBytes may be negative. Clients with unlimited expiry (expiryTime=0) or unlimited traffic (totalGB=0) are skipped for the corresponding field — bulk extend never converts unlimited to limited. Returns the adjusted count and per-email skip reasons.", + "operationId": "post_panel_api_clients_bulkAdjust", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "emails": [ + "alice", + "bob" + ], + "addDays": 30, + "addBytes": 53687091200 + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "adjusted": 2, + "skipped": [ + { + "email": "carol", + "reason": "unlimited expiry" + } + ] + } + } + } + } + } + } + } + }, + "/panel/api/clients/resetTraffic/{email}": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Zero out a single client’s up/down counters. Re-enables the client across every attached inbound and pushes the change to Xray (or the remote node) so depleted users can connect again immediately.", + "operationId": "post_panel_api_clients_resetTraffic_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/clients/updateTraffic/{email}": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Manually adjust a client’s upload + download counters. Useful for migrations from external accounting systems.", + "operationId": "post_panel_api_clients_updateTraffic_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "upload": 1073741824, + "download": 5368709120 + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/clients/ips/{email}": { + "post": { + "tags": [ + "Clients" + ], + "summary": "List source IPs that have connected with the given client’s credentials. Returns an array of \"ip (timestamp)\" strings.", + "operationId": "post_panel_api_clients_ips_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/clients/clearIps/{email}": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Reset the recorded IP list for a client.", + "operationId": "post_panel_api_clients_clearIps_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/clients/onlines": { + "post": { + "tags": [ + "Clients" + ], + "summary": "List the emails of currently connected clients (last seen within the heartbeat window).", + "operationId": "post_panel_api_clients_onlines", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + "user1", + "user2" + ] + } + } + } + } + } + } + }, + "/panel/api/clients/lastOnline": { + "post": { + "tags": [ + "Clients" + ], + "summary": "Map of client email → last-seen unix timestamp.", + "operationId": "post_panel_api_clients_lastOnline", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "user1": 1700000000, + "user2": 1699999000 + } + } + } + } + } + } + } + }, + "/panel/api/clients/traffic/{email}": { + "get": { + "tags": [ + "Clients" + ], + "summary": "Traffic counters for a client identified by email.", + "operationId": "get_panel_api_clients_traffic_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email (unique across the panel).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "email": "user1", + "up": 1048576, + "down": 2097152, + "total": 10737418240, + "expiryTime": 1735689600000 + } + } + } + } + } + } + } + }, + "/panel/api/clients/subLinks/{subId}": { + "get": { + "tags": [ + "Clients" + ], + "summary": "Return every protocol URL (vless://, vmess://, trojan://, ss://, hysteria://, hy2://) for clients matching the subscription ID. Same result set as /sub/, but as a JSON array — no base64. When an inbound has streamSettings.externalProxy set, one URL is emitted per external proxy. Empty array when the subId has no enabled clients.", + "operationId": "get_panel_api_clients_subLinks_subId", + "parameters": [ + { + "name": "subId", + "in": "path", + "required": true, + "description": "Subscription ID, taken from the client's subId field.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + "vless://uuid@host:443?security=reality&...#user1", + "vmess://eyJ2IjoyLC..." + ] + } + } + } + } + } + } + }, + "/panel/api/clients/links/{email}": { + "get": { + "tags": [ + "Clients" + ], + "summary": "Return every URL for one client across all attached inbounds — the same strings the Copy URL button copies in the panel UI. Supported protocols: vmess, vless, trojan, shadowsocks, hysteria, hysteria2. If streamSettings.externalProxy is set, returns one URL per external proxy. Protocols without a URL form (socks, http, mixed, wireguard, dokodemo, tunnel) contribute nothing.", + "operationId": "get_panel_api_clients_links_email", + "parameters": [ + { + "name": "email", + "in": "path", + "required": true, + "description": "Client email (unique identifier).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + "vless://uuid@host:443?...#user1" + ] + } + } + } + } + } + } + }, + "/panel/api/nodes/list": { + "get": { + "tags": [ + "Nodes" + ], + "summary": "List every configured node with its connection details, health, and last heartbeat patch.", + "operationId": "get_panel_api_nodes_list", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "name": "de-fra-1", + "remark": "", + "scheme": "https", + "address": "node1.example.com", + "port": 2053, + "basePath": "/", + "apiToken": "abcdef...", + "enable": true, + "allowPrivateAddress": false, + "status": "online", + "lastHeartbeat": 1700000000, + "latencyMs": 42, + "xrayVersion": "25.x.x", + "panelVersion": "v3.x.x", + "cpuPct": 23.5, + "memPct": 45.1, + "uptimeSecs": 86400, + "lastError": "", + "inboundCount": 5, + "clientCount": 27, + "onlineCount": 3, + "depletedCount": 1, + "createdAt": 1700000000, + "updatedAt": 1700000000 + } + ] + } + } + } + } + } + } + }, + "/panel/api/nodes/get/{id}": { + "get": { + "tags": [ + "Nodes" + ], + "summary": "Fetch a single node by ID.", + "operationId": "get_panel_api_nodes_get_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Node ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/nodes/add": { + "post": { + "tags": [ + "Nodes" + ], + "summary": "Register a new remote node. Provide its URL, apiToken, and optional remark / allowPrivateAddress flag.", + "operationId": "post_panel_api_nodes_add", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "name": "de-fra-1", + "remark": "", + "scheme": "https", + "address": "node1.example.com", + "port": 2053, + "basePath": "/", + "apiToken": "abcdef...", + "enable": true, + "allowPrivateAddress": false + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/nodes/update/{id}": { + "post": { + "tags": [ + "Nodes" + ], + "summary": "Replace a node’s connection details. Same body shape as /add.", + "operationId": "post_panel_api_nodes_update_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Node ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "name": "de-fra-1", + "remark": "", + "scheme": "https", + "address": "node1.example.com", + "port": 2053, + "basePath": "/", + "apiToken": "abcdef...", + "enable": true, + "allowPrivateAddress": false + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/nodes/del/{id}": { + "post": { + "tags": [ + "Nodes" + ], + "summary": "Delete a node. Inbounds bound to it are not auto-migrated.", + "operationId": "post_panel_api_nodes_del_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Node ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/nodes/setEnable/{id}": { + "post": { + "tags": [ + "Nodes" + ], + "summary": "Pause or resume traffic sync with this node.", + "operationId": "post_panel_api_nodes_setEnable_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Node ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "enable": true + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/nodes/test": { + "post": { + "tags": [ + "Nodes" + ], + "summary": "Probe a node without saving it. Uses the body as connection details and returns the same heartbeat snapshot a registered node would have.", + "operationId": "post_panel_api_nodes_test", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "scheme": "https", + "address": "node1.example.com", + "port": 2053, + "basePath": "/", + "apiToken": "abcdef..." + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "status": "online", + "latencyMs": 42, + "xrayVersion": "25.x.x", + "panelVersion": "v3.x.x", + "cpuPct": 12.5, + "memPct": 45.2, + "uptimeSecs": 86400, + "error": "" + } + } + } + } + } + } + } + }, + "/panel/api/nodes/probe/{id}": { + "post": { + "tags": [ + "Nodes" + ], + "summary": "Probe an existing node, updating its cached health state.", + "operationId": "post_panel_api_nodes_probe_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Node ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/nodes/history/{id}/{metric}/{bucket}": { + "get": { + "tags": [ + "Nodes" + ], + "summary": "Aggregated metric history for a node — same shape as /server/history, scoped to one node.", + "operationId": "get_panel_api_nodes_history_id_metric_bucket", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Node ID.", + "schema": { + "type": "integer" + } + }, + { + "name": "metric", + "in": "path", + "required": true, + "description": "cpu | mem.", + "schema": { + "type": "string" + } + }, + { + "name": "bucket", + "in": "path", + "required": true, + "description": "Bucket size in seconds. Allowed: 2, 30, 60, 120, 180, 300.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/list": { + "get": { + "tags": [ + "Custom Geo" + ], + "summary": "List configured custom geo sources with their type, alias, URL, status, and last-download timestamp.", + "operationId": "get_panel_api_custom_geo_list", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/aliases": { + "get": { + "tags": [ + "Custom Geo" + ], + "summary": "List geo aliases currently usable in routing rules — both built-in defaults and the user-configured ones.", + "operationId": "get_panel_api_custom_geo_aliases", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/add": { + "post": { + "tags": [ + "Custom Geo" + ], + "summary": "Register a custom geo source. Alias is auto-normalised; URL must point to a .dat / .json blob.", + "operationId": "post_panel_api_custom_geo_add", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + }, + "example": { + "type": "geoip", + "alias": "myips", + "url": "https://example.com/geo/my.dat" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/update/{id}": { + "post": { + "tags": [ + "Custom Geo" + ], + "summary": "Replace a custom geo source. Same body shape as /add.", + "operationId": "post_panel_api_custom_geo_update_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Custom geo source ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/delete/{id}": { + "post": { + "tags": [ + "Custom Geo" + ], + "summary": "Remove a custom geo source and its cached file.", + "operationId": "post_panel_api_custom_geo_delete_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Custom geo source ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/download/{id}": { + "post": { + "tags": [ + "Custom Geo" + ], + "summary": "Re-download one custom geo source on demand.", + "operationId": "post_panel_api_custom_geo_download_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Custom geo source ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/custom-geo/update-all": { + "post": { + "tags": [ + "Custom Geo" + ], + "summary": "Re-download every configured custom geo source. Errors are reported per-source in the response.", + "operationId": "post_panel_api_custom_geo_update_all", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/api/backuptotgbot": { + "post": { + "tags": [ + "Backup" + ], + "summary": "Send a fresh DB backup to every Telegram chat configured as an admin recipient. No body, no params.", + "operationId": "post_panel_api_backuptotgbot", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/all": { + "post": { + "tags": [ + "Settings" + ], + "summary": "Return every panel setting: web server, Telegram bot, subscription, security, LDAP. The full JSON blob that the Settings page edits.", + "operationId": "post_panel_setting_all", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/defaultSettings": { + "post": { + "tags": [ + "Settings" + ], + "summary": "Return the computed default settings based on the request host. Useful to preview what a fresh install would use.", + "operationId": "post_panel_setting_defaultSettings", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/update": { + "post": { + "tags": [ + "Settings" + ], + "summary": "Persist every setting at once. The body mirrors the shape returned by /all. Invalid values (bad ports, missing cert pairs, etc.) are rejected before write.", + "operationId": "post_panel_setting_update", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/updateUser": { + "post": { + "tags": [ + "Settings" + ], + "summary": "Change the panel admin username and password. Requires the current credentials for verification. The session is refreshed with the new values on success.", + "operationId": "post_panel_setting_updateUser", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "oldUsername": { + "type": "string", + "description": "Current admin username." + }, + "oldPassword": { + "type": "string", + "description": "Current admin password." + }, + "newUsername": { + "type": "string", + "description": "Desired new username." + }, + "newPassword": { + "type": "string", + "description": "Desired new password." + } + }, + "required": [ + "oldUsername", + "oldPassword", + "newUsername", + "newPassword" + ] + }, + "example": { + "oldUsername": "admin", + "oldPassword": "admin", + "newUsername": "newadmin", + "newPassword": "newpass" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/restartPanel": { + "post": { + "tags": [ + "Settings" + ], + "summary": "Restart the entire 3x-ui process after a 3-second grace period. The connection drops immediately; the panel comes back online ~5-10 seconds later.", + "operationId": "post_panel_setting_restartPanel", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/getDefaultJsonConfig": { + "get": { + "tags": [ + "Settings" + ], + "summary": "Return the built-in default Xray JSON config template that ships with this panel version.", + "operationId": "get_panel_setting_getDefaultJsonConfig", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/setting/apiTokens": { + "get": { + "tags": [ + "API Tokens" + ], + "summary": "List every API token, enabled or not.", + "operationId": "get_panel_setting_apiTokens", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": [ + { + "id": 1, + "name": "default", + "token": "abcdef-12345-...", + "enabled": true, + "createdAt": 1736000000 + } + ] + } + } + } + } + } + } + }, + "/panel/setting/apiTokens/create": { + "post": { + "tags": [ + "API Tokens" + ], + "summary": "Mint a new API token. Name must be unique and 1-64 characters; the token string is server-generated.", + "operationId": "post_panel_setting_apiTokens_create", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Human-readable label, e.g. \"central-panel-a\"." + } + }, + "required": [ + "name" + ] + }, + "example": { + "name": "central-panel-a" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "id": 2, + "name": "central-panel-a", + "token": "new-token-string", + "enabled": true, + "createdAt": 1736000000 + } + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + } + } + }, + "example": { + "success": false, + "msg": "a token with that name already exists" + } + } + } + } + } + } + }, + "/panel/setting/apiTokens/delete/{id}": { + "post": { + "tags": [ + "API Tokens" + ], + "summary": "Permanently delete a token. Any caller using it stops authenticating immediately.", + "operationId": "post_panel_setting_apiTokens_delete_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Token row ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true + } + } + } + } + } + } + }, + "/panel/setting/apiTokens/setEnabled/{id}": { + "post": { + "tags": [ + "API Tokens" + ], + "summary": "Toggle a token enabled/disabled without deleting it. Disabled tokens are rejected by checkAPIAuth on the next request.", + "operationId": "post_panel_setting_apiTokens_setEnabled_id", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "Token row ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "New enabled state." + } + }, + "required": [ + "enabled" + ] + }, + "example": { + "enabled": false + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true + } + } + } + } + } + } + }, + "/panel/xray/": { + "post": { + "tags": [ + "Xray Settings" + ], + "summary": "Return the Xray config template (JSON string), available inbound tags, client reverse tags, and the configured outbound test URL in one response.", + "operationId": "post_panel_xray", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "success": true, + "obj": { + "xraySetting": "{...raw xray config...}", + "inboundTags": "[\"inbound-443\"]", + "clientReverseTags": "[]", + "outboundTestUrl": "https://www.google.com/generate_204" + } + } + } + } + } + } + } + }, + "/panel/xray/getDefaultJsonConfig": { + "get": { + "tags": [ + "Xray Settings" + ], + "summary": "Return the built-in default Xray config shipped with the panel (identical to /panel/setting/getDefaultJsonConfig).", + "operationId": "get_panel_xray_getDefaultJsonConfig", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/getOutboundsTraffic": { + "get": { + "tags": [ + "Xray Settings" + ], + "summary": "Return traffic statistics for every outbound. Each outbound shows up/down/total counters.", + "operationId": "get_panel_xray_getOutboundsTraffic", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/getXrayResult": { + "get": { + "tags": [ + "Xray Settings" + ], + "summary": "Return the most recent Xray process stdout/stderr output. Useful to check for startup errors or runtime warnings.", + "operationId": "get_panel_xray_getXrayResult", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/update": { + "post": { + "tags": [ + "Xray Settings" + ], + "summary": "Save the Xray JSON config template and optionally the outbound test URL. Both are sent as form fields.", + "operationId": "post_panel_xray_update", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/warp/{action}": { + "post": { + "tags": [ + "Xray Settings" + ], + "summary": "Manage Cloudflare Warp integration. The action parameter selects the operation.", + "operationId": "post_panel_xray_warp_action", + "parameters": [ + { + "name": "action", + "in": "path", + "required": true, + "description": "data — return Warp stats (quota, remaining). del — delete Warp data. config — return current Warp config. reg — register a new Warp endpoint (sends privateKey, publicKey). license — set a Warp+ license key (sends license).", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/nord/{action}": { + "post": { + "tags": [ + "Xray Settings" + ], + "summary": "Manage NordVPN integration. The action parameter selects the operation.", + "operationId": "post_panel_xray_nord_action", + "parameters": [ + { + "name": "action", + "in": "path", + "required": true, + "description": "countries — list available countries. servers — list servers in a country (sends countryId). reg — get NordVPN credentials (sends token). setKey — store NordVPN API key (sends key). data — return current NordVPN connection data. del — delete NordVPN data.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/resetOutboundsTraffic": { + "post": { + "tags": [ + "Xray Settings" + ], + "summary": "Reset traffic counters for a specific outbound by tag.", + "operationId": "post_panel_xray_resetOutboundsTraffic", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/panel/xray/testOutbound": { + "post": { + "tags": [ + "Xray Settings" + ], + "summary": "Test an outbound configuration. Sends the outbound JSON (required), optionally all outbounds (to resolve sockopt.dialerProxy dependencies), and a mode flag.", + "operationId": "post_panel_xray_testOutbound", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/{subPath}{subid}": { + "get": { + "tags": [ + "Subscription Server" + ], + "summary": "Return base64-encoded subscription links for all enabled clients matching the subscription ID. When the request has an Accept: text/html header or ?html=1, renders a styled info page instead. Default path: /sub/:subid.", + "operationId": "get_subPath_subid", + "parameters": [ + { + "name": "subid", + "in": "path", + "required": true, + "description": "Client subscription ID.", + "schema": { + "type": "string" + } + }, + { + "name": "subPath", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/{jsonPath}{subid}": { + "get": { + "tags": [ + "Subscription Server" + ], + "summary": "Return subscription as a JSON array of proxy configs (one per enabled client). Only when JSON subscription is enabled in settings. Default path: /json/:subid.", + "operationId": "get_jsonPath_subid", + "parameters": [ + { + "name": "subid", + "in": "path", + "required": true, + "description": "Client subscription ID.", + "schema": { + "type": "string" + } + }, + { + "name": "jsonPath", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/{clashPath}{subid}": { + "get": { + "tags": [ + "Subscription Server" + ], + "summary": "Return subscription as a Clash/Mihomo-compatible YAML config. Only when Clash subscription is enabled in settings. Default path: /clash/:subid.", + "operationId": "get_clashPath_subid", + "parameters": [ + { + "name": "subid", + "in": "path", + "required": true, + "description": "Client subscription ID.", + "schema": { + "type": "string" + } + }, + { + "name": "clashPath", + "in": "path", + "required": true, + "description": "", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "/ws": { + "get": { + "tags": [ + "WebSocket" + ], + "summary": "Upgrade an HTTP connection to a WebSocket. Requires an authenticated session cookie (Bearer token auth is not supported here). Returns 101 Switching Protocols on success. The server then pushes JSON messages described below.", + "operationId": "get_ws", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + } + } + } + } + } + } + }, + "→ type: status": { + "ws": { + "tags": [ + "WebSocket" + ], + "summary": "Server health snapshot pushed every 2 seconds. Contains CPU, memory, swap, disk, network IO, load, and Xray state — same shape as GET /panel/api/server/status.", + "operationId": "ws_type_status", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "type": "status", + "data": { + "cpu": 12.5, + "mem": { + "current": 2147483648, + "total": 8589934592 + }, + "xray": { + "state": "running" + } + } + } + } + } + } + } + } + }, + "→ type: xrayState": { + "ws": { + "tags": [ + "WebSocket" + ], + "summary": "Xray process state change. Fired when Xray starts, stops, or encounters an error.", + "operationId": "ws_type_xrayState", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "type": "xrayState", + "data": "running" + } + } + } + } + } + } + }, + "→ type: notification": { + "ws": { + "tags": [ + "WebSocket" + ], + "summary": "In-panel toast notification. Fired on Xray stop/restart, DB import, panel restart, etc.", + "operationId": "ws_type_notification", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "type": "notification", + "title": "Xray service restarted", + "body": "Xray has been restarted successfully", + "severity": "success" + } + } + } + } + } + } + }, + "→ type: invalidate": { + "ws": { + "tags": [ + "WebSocket" + ], + "summary": "Instructs the UI to re-fetch a resource. Fired when another admin session modifies data (e.g. toggling inbound enable).", + "operationId": "ws_type_invalidate", + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "msg": { + "type": "string" + }, + "obj": {} + } + }, + "example": { + "type": "invalidate", + "resource": "inbounds" + } + } + } + } + } + } + } + } +} diff --git a/frontend/scripts/build-openapi.mjs b/frontend/scripts/build-openapi.mjs new file mode 100644 index 00000000..de64b86e --- /dev/null +++ b/frontend/scripts/build-openapi.mjs @@ -0,0 +1,218 @@ +#!/usr/bin/env node +import { writeFileSync } from 'node:fs'; +import { join, dirname } from 'node:path'; +import { fileURLToPath, pathToFileURL } from 'node:url'; + +import { sections } from '../src/pages/api-docs/endpoints.js'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const outPath = join(__dirname, '..', 'public', 'openapi.json'); + +const PANEL_VERSION = process.env.X_UI_VERSION || '3.x'; + +const SECURITY_SCHEMES = { + bearerAuth: { + type: 'http', + scheme: 'bearer', + description: 'API token from Settings → Security → API Token. Send as `Authorization: Bearer `.', + }, + cookieAuth: { + type: 'apiKey', + in: 'cookie', + name: '3x-ui', + description: 'Session cookie set by POST /login. Browser-only.', + }, +}; + +function ginPathToOpenApi(path) { + return path.replace(/:([A-Za-z_][A-Za-z0-9_]*)/g, '{$1}'); +} + +function extractPathParams(openApiPath) { + const params = []; + const re = /\{([A-Za-z_][A-Za-z0-9_]*)\}/g; + let m; + while ((m = re.exec(openApiPath)) !== null) params.push(m[1]); + return params; +} + +function mapType(t) { + const v = String(t || '').toLowerCase(); + if (v === 'number' || v === 'integer' || v === 'int') return 'integer'; + if (v === 'float' || v === 'double') return 'number'; + if (v === 'boolean' || v === 'bool') return 'boolean'; + if (v === 'array') return 'array'; + if (v === 'object') return 'object'; + return 'string'; +} + +function tryParseJson(raw) { + if (typeof raw !== 'string') return undefined; + try { + return JSON.parse(raw); + } catch { + return undefined; + } +} + +function paramToOpenApi(p) { + const out = { + name: p.name, + in: p.in, + required: p.in === 'path' ? true : !p.optional, + description: p.desc || '', + schema: { type: mapType(p.type) }, + }; + if (p.defaultValue !== undefined) out.schema.default = p.defaultValue; + return out; +} + +function buildOperation(ep, tag) { + const op = { + tags: [tag], + summary: ep.summary || '', + operationId: `${ep.method.toLowerCase()}_${ep.path.replace(/[^A-Za-z0-9]+/g, '_').replace(/^_|_$/g, '')}`, + }; + if (ep.description) op.description = ep.description; + if (ep.deprecated) op.deprecated = true; + + const params = []; + const bodyParams = []; + for (const p of ep.params || []) { + if (p.in === 'body') { + bodyParams.push(p); + } else if (p.in === 'path' || p.in === 'query' || p.in === 'header') { + params.push(paramToOpenApi(p)); + } + } + + const openApiPath = ginPathToOpenApi(ep.path); + const declared = new Set(params.filter((x) => x.in === 'path').map((x) => x.name)); + for (const name of extractPathParams(openApiPath)) { + if (declared.has(name)) continue; + params.push({ + name, + in: 'path', + required: true, + description: '', + schema: { type: 'string' }, + }); + } + + if (params.length > 0) op.parameters = params; + + if (ep.body || bodyParams.length > 0) { + const example = tryParseJson(ep.body); + const properties = {}; + const required = []; + for (const bp of bodyParams) { + properties[bp.name] = { + type: mapType(bp.type), + description: bp.desc || '', + }; + if (!bp.optional) required.push(bp.name); + } + const schema = bodyParams.length > 0 + ? { type: 'object', properties, ...(required.length > 0 ? { required } : {}) } + : { type: 'object' }; + + op.requestBody = { + required: required.length > 0 || bodyParams.length === 0, + content: { + 'application/json': { + schema, + ...(example !== undefined ? { example } : {}), + }, + }, + }; + } + + const responses = {}; + const successExample = tryParseJson(ep.response); + responses['200'] = { + description: 'Successful response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + success: { type: 'boolean' }, + msg: { type: 'string' }, + obj: {}, + }, + }, + ...(successExample !== undefined ? { example: successExample } : {}), + }, + }, + }; + + const errExample = tryParseJson(ep.errorResponse); + if (errExample !== undefined || ep.errorStatus) { + const code = String(ep.errorStatus || 400); + responses[code] = { + description: 'Error response', + content: { + 'application/json': { + schema: { + type: 'object', + properties: { + success: { type: 'boolean' }, + msg: { type: 'string' }, + }, + }, + ...(errExample !== undefined ? { example: errExample } : {}), + }, + }, + }; + } + + op.responses = responses; + return op; +} + +function buildSpec() { + const paths = {}; + for (const section of sections) { + const tag = section.title; + for (const ep of section.endpoints) { + const openApiPath = ginPathToOpenApi(ep.path); + if (!paths[openApiPath]) paths[openApiPath] = {}; + paths[openApiPath][ep.method.toLowerCase()] = buildOperation(ep, tag); + } + } + + const tags = sections.map((s) => ({ + name: s.title, + description: s.description || '', + })); + + return { + openapi: '3.0.3', + info: { + title: '3X-UI Panel API', + version: PANEL_VERSION, + description: + 'Programmatic interface to a 3X-UI panel. Authenticate either by logging in (cookie) or with an API token from Settings → Security → API Token (Bearer). All endpoints under /panel/api/* honour both modes.', + }, + servers: [ + { url: '/', description: 'Current panel (basePath aware)' }, + ], + components: { + securitySchemes: SECURITY_SCHEMES, + }, + security: [{ bearerAuth: [] }, { cookieAuth: [] }], + tags, + paths, + }; +} + +const spec = buildSpec(); +writeFileSync(outPath, JSON.stringify(spec, null, 2) + '\n'); + +const pathCount = Object.keys(spec.paths).length; +let opCount = 0; +for (const ops of Object.values(spec.paths)) opCount += Object.keys(ops).length; +console.log(`[openapi] wrote ${outPath}`); +console.log(`[openapi] paths: ${pathCount}, operations: ${opCount}, tags: ${spec.tags.length}`); + +void pathToFileURL; diff --git a/frontend/src/pages/api-docs/ApiDocsPage.css b/frontend/src/pages/api-docs/ApiDocsPage.css index 5bc3365d..ef560d43 100644 --- a/frontend/src/pages/api-docs/ApiDocsPage.css +++ b/frontend/src/pages/api-docs/ApiDocsPage.css @@ -20,273 +20,81 @@ } .api-docs-page .content-area { - padding: 24px; + padding: 16px; max-width: 100%; } @media (max-width: 768px) { .api-docs-page .content-area { - padding: 16px 12px 12px; - padding-top: 64px; + padding: 8px; + padding-top: 56px; } } -.docs-wrapper { - max-width: 1100px; - margin: 0 auto; -} - -.docs-header { - margin-bottom: 20px; - padding: 24px; +.api-docs-page .docs-wrapper { background: var(--bg-card); - border: 1px solid rgba(128, 128, 128, 0.12); - border-radius: 10px; -} - -.docs-title { - font-size: 28px; - font-weight: 800; - margin: 0 0 8px; - color: rgba(0, 0, 0, 0.88); - letter-spacing: -0.3px; -} - -.docs-lead { - margin: 0; - color: rgba(0, 0, 0, 0.65); - line-height: 1.65; - font-size: 14px; -} - -.docs-lead code, -.token-hint code { - background: rgba(128, 128, 128, 0.12); - padding: 1px 6px; - border-radius: 4px; - font-family: ui-monospace, SFMono-Regular, Menlo, monospace; - font-size: 12.5px; -} - -.token-card, -.curl-card { - margin-bottom: 16px; -} - -.token-card-head { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; - flex-wrap: wrap; - margin-bottom: 10px; - min-height: 32px; -} - -.token-card-title { - display: inline-flex; - align-items: center; - gap: 8px; - font-weight: 600; - font-size: 14px; -} - -.token-hint { - margin: 10px 0 0; - color: rgba(0, 0, 0, 0.55); - font-size: 12.5px; - line-height: 1.55; -} - -.toolbar { - display: flex; - align-items: center; - gap: 12px; - flex-wrap: wrap; - margin-bottom: 16px; -} - -.search-bar { - flex: 1; - min-width: 200px; - max-width: 480px; -} - -.match-count { - font-size: 12px; - color: rgba(0, 0, 0, 0.5); - white-space: nowrap; -} - -.toc-nav { - display: flex; - flex-wrap: wrap; - align-items: flex-start; - gap: 8px 12px; - padding: 12px 16px; - background: var(--bg-card); - border: 1px solid rgba(128, 128, 128, 0.12); border-radius: 8px; - margin-bottom: 16px; + border: 1px solid rgba(128, 128, 128, 0.12); + overflow: hidden; } -.toc-label { - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.6px; - color: rgba(0, 0, 0, 0.5); - padding-top: 3px; - flex-shrink: 0; +.api-docs-page .swagger-ui { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } -.toc-links { - display: flex; - flex-wrap: wrap; - gap: 6px; +.api-docs-page.is-dark .swagger-ui, +.api-docs-page.is-dark .swagger-ui .info .title, +.api-docs-page.is-dark .swagger-ui .info p, +.api-docs-page.is-dark .swagger-ui .opblock-tag, +.api-docs-page.is-dark .swagger-ui .opblock .opblock-summary-path, +.api-docs-page.is-dark .swagger-ui .opblock .opblock-summary-description, +.api-docs-page.is-dark .swagger-ui table thead tr td, +.api-docs-page.is-dark .swagger-ui table thead tr th, +.api-docs-page.is-dark .swagger-ui .parameter__name, +.api-docs-page.is-dark .swagger-ui .parameter__type, +.api-docs-page.is-dark .swagger-ui .response-col_status, +.api-docs-page.is-dark .swagger-ui .response-col_description, +.api-docs-page.is-dark .swagger-ui label, +.api-docs-page.is-dark .swagger-ui .tab li, +.api-docs-page.is-dark .swagger-ui .markdown p, +.api-docs-page.is-dark .swagger-ui .markdown li { + color: rgba(255, 255, 255, 0.85); } -.toc-link { - display: inline-flex; - align-items: center; - gap: 5px; - padding: 4px 10px; - border-radius: 20px; - font-size: 12.5px; - color: rgba(0, 0, 0, 0.65); - background: rgba(128, 128, 128, 0.06); - border: 1px solid transparent; - text-decoration: none; - cursor: pointer; - transition: all 0.2s; - white-space: nowrap; -} - -.toc-link:hover { - background: rgba(22, 119, 255, 0.08); - color: #1677ff; - border-color: rgba(22, 119, 255, 0.2); -} - -.toc-link.active { - background: rgba(22, 119, 255, 0.12); - color: #1677ff; - border-color: rgba(22, 119, 255, 0.3); - font-weight: 600; -} - -.toc-icon { - font-size: 13px; - opacity: 0.8; -} - -.toc-text { - font-size: 12.5px; -} - -.toc-badge { - display: inline-flex; - align-items: center; - justify-content: center; - min-width: 18px; - height: 18px; - padding: 0 5px; - border-radius: 9px; - font-size: 10.5px; - font-weight: 700; - background: rgba(22, 119, 255, 0.12); - color: #1677ff; - line-height: 1; -} - -.toc-link.active .toc-badge { - background: #1677ff; - color: #fff; -} - -body.dark .docs-title { - color: rgba(255, 255, 255, 0.92); -} - -html[data-theme='ultra-dark'] .docs-title { - color: rgba(255, 255, 255, 0.95); -} - -body.dark .docs-header { - background: #252526; +.api-docs-page.is-dark .swagger-ui .opblock { + background: rgba(255, 255, 255, 0.03); border-color: rgba(255, 255, 255, 0.08); } -html[data-theme='ultra-dark'] .docs-header { - background: #0a0a0a; - border-color: rgba(255, 255, 255, 0.06); -} - -body.dark .docs-lead, -body.dark .token-hint { - color: rgba(255, 255, 255, 0.7); -} - -html[data-theme='ultra-dark'] .docs-lead, -html[data-theme='ultra-dark'] .token-hint { - color: rgba(255, 255, 255, 0.75); -} - -body.dark .docs-lead code, -body.dark .token-hint code { - background: rgba(255, 255, 255, 0.1); -} - -html[data-theme='ultra-dark'] .docs-lead code, -html[data-theme='ultra-dark'] .token-hint code { - background: rgba(255, 255, 255, 0.12); -} - -body.dark .toc-nav { - background: #252526; - border-color: rgba(255, 255, 255, 0.08); -} - -html[data-theme='ultra-dark'] .toc-nav { - background: #0a0a0a; - border-color: rgba(255, 255, 255, 0.06); -} - -body.dark .toc-label { - color: rgba(255, 255, 255, 0.55); -} - -html[data-theme='ultra-dark'] .toc-label { - color: rgba(255, 255, 255, 0.6); -} - -body.dark .toc-link { - color: rgba(255, 255, 255, 0.65); - background: rgba(255, 255, 255, 0.06); -} - -html[data-theme='ultra-dark'] .toc-link { +.api-docs-page.is-dark .swagger-ui .opblock .opblock-section-header { background: rgba(255, 255, 255, 0.04); + box-shadow: none; } -body.dark .toc-link:hover { - background: rgba(88, 166, 255, 0.12); - color: #58a6ff; - border-color: rgba(88, 166, 255, 0.25); +.api-docs-page.is-dark .swagger-ui input[type=text], +.api-docs-page.is-dark .swagger-ui textarea, +.api-docs-page.is-dark .swagger-ui select { + background: rgba(0, 0, 0, 0.3); + color: rgba(255, 255, 255, 0.9); + border-color: rgba(255, 255, 255, 0.15); } -body.dark .toc-link.active { - background: rgba(88, 166, 255, 0.15); - color: #58a6ff; - border-color: rgba(88, 166, 255, 0.35); +.api-docs-page.is-dark .swagger-ui .scheme-container { + background: rgba(255, 255, 255, 0.03); + box-shadow: none; } -body.dark .toc-badge { - background: rgba(88, 166, 255, 0.15); - color: #58a6ff; +.api-docs-page.is-dark .swagger-ui .model-box, +.api-docs-page.is-dark .swagger-ui section.models { + background: rgba(255, 255, 255, 0.03); + border-color: rgba(255, 255, 255, 0.08); } -body.dark .toc-link.active .toc-badge { - background: #58a6ff; - color: #0d1117; +.api-docs-page.is-dark .swagger-ui section.models .model-container { + background: rgba(255, 255, 255, 0.02); +} + +.api-docs-page.is-dark .swagger-ui .highlight-code, +.api-docs-page.is-dark .swagger-ui .microlight { + background: #0d0d10; } diff --git a/frontend/src/pages/api-docs/ApiDocsPage.tsx b/frontend/src/pages/api-docs/ApiDocsPage.tsx index 6a1ffa1d..d539d09f 100644 --- a/frontend/src/pages/api-docs/ApiDocsPage.tsx +++ b/frontend/src/pages/api-docs/ApiDocsPage.tsx @@ -1,142 +1,19 @@ -import { useCallback, useEffect, useMemo, useState } from 'react'; -import type { ComponentType, MouseEvent } from 'react'; -import { Button, Card, ConfigProvider, Input, Layout, Space } from 'antd'; -import { - ApiOutlined, - CloudServerOutlined, - ClusterOutlined, - CompressOutlined, - ExpandOutlined, - GlobalOutlined, - KeyOutlined, - LinkOutlined, - NodeIndexOutlined, - SafetyCertificateOutlined, - SaveOutlined, - SearchOutlined, - SettingOutlined, - WifiOutlined, -} from '@ant-design/icons'; +import { useMemo } from 'react'; +import { ConfigProvider, Layout } from 'antd'; +import SwaggerUI from 'swagger-ui-react'; +import 'swagger-ui-react/swagger-ui.css'; import { useTheme } from '@/hooks/useTheme'; import AppSidebar from '@/components/AppSidebar'; -import { sections as allSections } from './endpoints.js'; -import EndpointSection from './EndpointSection'; -import type { Section } from './EndpointSection'; -import CodeBlock from './CodeBlock'; import '@/styles/page-cards.css'; import './ApiDocsPage.css'; -const sectionIcons: Record> = { - authentication: SafetyCertificateOutlined, - inbounds: NodeIndexOutlined, - server: CloudServerOutlined, - nodes: ClusterOutlined, - 'custom-geo': GlobalOutlined, - backup: SaveOutlined, - settings: SettingOutlined, - 'api-tokens': KeyOutlined, - 'xray-settings': WifiOutlined, - subscription: LinkOutlined, - websocket: ApiOutlined, -}; - -const curlExample = `curl -X GET \\ - -H "Authorization: Bearer YOUR_API_TOKEN" \\ - -H "Accept: application/json" \\ - https://your-panel.example.com/panel/api/inbounds/list`; - const basePath = window.X_UI_BASE_PATH || ''; -const settingsHref = `${basePath}panel/settings#security`; - -const endpointCount = (allSections as Section[]).reduce( - (sum, s) => sum + s.endpoints.length, - 0, -); +const openApiUrl = `${basePath}panel/api/openapi.json`; export default function ApiDocsPage() { const { isDark, isUltra, antdThemeConfig } = useTheme(); - const [searchQuery, setSearchQuery] = useState(''); - const [collapsedSections, setCollapsedSections] = useState>(() => new Set()); - const [activeSection, setActiveSection] = useState(''); - - const sections = useMemo(() => { - const q = searchQuery.toLowerCase().trim(); - if (!q) return allSections as Section[]; - return (allSections as Section[]) - .map((s) => ({ - ...s, - endpoints: s.endpoints.filter((e) => - e.path.toLowerCase().includes(q) - || e.summary?.toLowerCase().includes(q) - || e.method.toLowerCase().includes(q), - ), - })) - .filter((s) => s.endpoints.length > 0); - }, [searchQuery]); - - const visibleEndpoints = useMemo( - () => sections.reduce((sum, s) => sum + s.endpoints.length, 0), - [sections], - ); - - const toggleSection = useCallback((id: string) => { - setCollapsedSections((prev) => { - const next = new Set(prev); - if (next.has(id)) next.delete(id); else next.add(id); - return next; - }); - }, []); - - const expandAll = useCallback(() => setCollapsedSections(new Set()), []); - const collapseAll = useCallback( - () => setCollapsedSections(new Set((allSections as Section[]).map((s) => s.id))), - [], - ); - - const scrollToSection = useCallback((id: string) => (e: MouseEvent) => { - e.preventDefault(); - const el = document.getElementById(id); - if (!el) return; - el.scrollIntoView({ behavior: 'smooth', block: 'start' }); - if (window.location.hash !== `#${id}`) { - history.replaceState(null, '', `#${id}`); - } - }, []); - - useEffect(() => { - const onHashChange = () => { - const id = window.location.hash.slice(1); - if (!id) return; - const el = document.getElementById(id); - if (el) el.scrollIntoView({ behavior: 'auto', block: 'start' }); - }; - requestAnimationFrame(onHashChange); - window.addEventListener('hashchange', onHashChange); - return () => window.removeEventListener('hashchange', onHashChange); - }, []); - - useEffect(() => { - const onScroll = () => { - const toc = document.querySelector('.toc-nav'); - const tocHeight = toc instanceof HTMLElement ? toc.offsetHeight : 56; - let current = ''; - for (const s of sections) { - const el = document.getElementById(s.id); - if (!el) continue; - const rect = el.getBoundingClientRect(); - if (rect.top <= tocHeight + 20) { - current = s.id; - } - } - setActiveSection(current); - }; - window.addEventListener('scroll', onScroll, { passive: true }); - requestAnimationFrame(onScroll); - return () => window.removeEventListener('scroll', onScroll); - }, [sections]); - const pageClass = useMemo(() => { const classes = ['api-docs-page']; if (isDark) classes.push('is-dark'); @@ -152,91 +29,12 @@ export default function ApiDocsPage() {
-
-

API Documentation

-

- The 3x-ui panel exposes a REST API under /panel/api/. Authenticate with the panel session - cookie, or with the Authorization: Bearer <token> header below. Every endpoint - returns a uniform {'{ success, msg, obj }'} envelope unless otherwise noted. -

-
- - -
-
- - API Tokens -
- -
-

- Create, enable, or revoke named Bearer tokens in{' '} - Settings → Security. Send each request as{' '} - Authorization: Bearer <token>. Token-authenticated callers skip CSRF and don't - need a session cookie. Deleting a token revokes it immediately — running bots will need a new one. -

-
- - - - - -
- } - placeholder="Search endpoints by path, method, or description…" - allowClear - value={searchQuery} - onChange={(e) => setSearchQuery(e.target.value)} - /> - {searchQuery && ( - - {visibleEndpoints} / {endpointCount} endpoints - - )} - - - - -
- - - - {sections.map((s) => ( - toggleSection(s.id)} - /> - ))} +
diff --git a/frontend/src/pages/api-docs/CodeBlock.css b/frontend/src/pages/api-docs/CodeBlock.css deleted file mode 100644 index 5cf64ceb..00000000 --- a/frontend/src/pages/api-docs/CodeBlock.css +++ /dev/null @@ -1,107 +0,0 @@ -.code-block-wrapper { - position: relative; - border-radius: 6px; - overflow: hidden; - border: 1px solid rgba(128, 128, 128, 0.15); -} - -.code-toolbar { - display: flex; - align-items: center; - justify-content: space-between; - padding: 4px 8px; - background: rgba(128, 128, 128, 0.06); - border-bottom: 1px solid rgba(128, 128, 128, 0.1); -} - -.lang-badge { - font-size: 10px; - font-weight: 700; - letter-spacing: 0.5px; - color: rgba(0, 0, 0, 0.4); - text-transform: uppercase; - font-family: ui-monospace, SFMono-Regular, Menlo, monospace; -} - -.copy-btn { - display: inline-flex; - align-items: center; - justify-content: center; - width: 26px; - height: 26px; - border: 1px solid rgba(128, 128, 128, 0.15); - border-radius: 4px; - background: rgba(255, 255, 255, 0.7); - color: rgba(0, 0, 0, 0.45); - cursor: pointer; - font-size: 12px; - transition: all 0.15s; -} - -.copy-btn:hover { - background: #fff; - color: #1677ff; - border-color: #1677ff; -} - -.copy-btn.copied { - background: #52c41a; - color: #fff; - border-color: #52c41a; -} - -.code-block { - background: rgba(128, 128, 128, 0.04); - padding: 10px 12px; - margin: 0; - font-family: ui-monospace, SFMono-Regular, Menlo, monospace; - font-size: 12.5px; - line-height: 1.6; - white-space: pre-wrap; - word-break: break-word; - overflow-x: auto; - border: none; - border-radius: 0; -} - -.json-key { color: #0550ae; } -.json-string { color: #116329; } -.json-number { color: #9a6700; } -.json-boolean { color: #cf222e; } -.json-null { color: #8250df; } - -body.dark .code-block-wrapper { - border-color: rgba(255, 255, 255, 0.1); -} - -body.dark .code-toolbar { - background: rgba(255, 255, 255, 0.03); - border-color: rgba(255, 255, 255, 0.06); -} - -body.dark .lang-badge { - color: rgba(255, 255, 255, 0.4); -} - -body.dark .code-block { - background: rgba(255, 255, 255, 0.03); - color: rgba(255, 255, 255, 0.88); -} - -body.dark .json-key { color: #79c0ff; } -body.dark .json-string { color: #7ee787; } -body.dark .json-number { color: #d29922; } -body.dark .json-boolean { color: #ff7b72; } -body.dark .json-null { color: #d2a8ff; } - -body.dark .copy-btn { - background: rgba(255, 255, 255, 0.06); - color: rgba(255, 255, 255, 0.45); - border-color: rgba(255, 255, 255, 0.12); -} - -body.dark .copy-btn:hover { - background: rgba(255, 255, 255, 0.1); - color: #58a6ff; - border-color: #58a6ff; -} diff --git a/frontend/src/pages/api-docs/CodeBlock.tsx b/frontend/src/pages/api-docs/CodeBlock.tsx deleted file mode 100644 index 805d1378..00000000 --- a/frontend/src/pages/api-docs/CodeBlock.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { useMemo, useState } from 'react'; -import { message } from 'antd'; -import { CheckOutlined, CopyOutlined } from '@ant-design/icons'; -import { ClipboardManager } from '@/utils'; -import './CodeBlock.css'; - -interface CodeBlockProps { - code?: string; - lang?: string; -} - -function escapeHtml(str: string): string { - return str.replace(/&/g, '&').replace(//g, '>'); -} - -function highlightJson(str: string): string { - const escaped = escapeHtml(str); - return escaped.replace( - /("(?:[^"\\]|\\.)*")\s*(:)|("(?:[^"\\]|\\.)*")|(-?\d+\.?\d*(?:[eE][+-]?\d+)?)\b|(true|false)|(null)|([{}[\]])/g, - (_m, key, colon, string, number, bool, nil) => { - if (colon) return `${key}${colon}`; - if (string) return `${string}`; - if (number) return `${number}`; - if (bool) return `${bool}`; - if (nil) return `${nil}`; - return _m; - }, - ); -} - -export default function CodeBlock({ code = '', lang = 'json' }: CodeBlockProps) { - const [copied, setCopied] = useState(false); - const [messageApi, messageContextHolder] = message.useMessage(); - - const highlighted = useMemo( - () => (lang === 'json' ? highlightJson(code) : escapeHtml(code)), - [code, lang], - ); - - async function copyCode() { - const ok = await ClipboardManager.copyText(code); - if (ok) { - setCopied(true); - messageApi.success('Copied'); - window.setTimeout(() => setCopied(false), 2000); - } else { - messageApi.error('Copy failed'); - } - } - - return ( -
- {messageContextHolder} -
- {lang.toUpperCase()} - -
-
-        
-      
-
- ); -} diff --git a/frontend/src/pages/api-docs/EndpointRow.css b/frontend/src/pages/api-docs/EndpointRow.css deleted file mode 100644 index 43cd8c3f..00000000 --- a/frontend/src/pages/api-docs/EndpointRow.css +++ /dev/null @@ -1,93 +0,0 @@ -.endpoint-row { - padding: 14px 8px; - margin: 0 -8px; - transition: background 0.15s; - border-radius: 6px; -} - -.endpoint-row:hover { - background: rgba(128, 128, 128, 0.03); -} - -.endpoint-row + .endpoint-row { - border-top: 1px solid rgba(128, 128, 128, 0.1); -} - -.endpoint-header { - display: flex; - align-items: center; - gap: 10px; - flex-wrap: wrap; -} - -.method-tag { - font-weight: 700; - font-family: ui-monospace, SFMono-Regular, Menlo, monospace; - font-size: 11px; - letter-spacing: 0.5px; - min-width: 56px; - text-align: center; - text-transform: uppercase; - border-radius: 4px; - padding: 2px 8px; - line-height: 1.6; -} - -.endpoint-path { - font-family: ui-monospace, SFMono-Regular, Menlo, monospace; - font-size: 13.5px; - word-break: break-all; - color: rgba(0, 0, 0, 0.8); - background: rgba(128, 128, 128, 0.06); - padding: 2px 8px; - border-radius: 4px; -} - -.endpoint-summary { - margin: 8px 0 0; - color: rgba(0, 0, 0, 0.6); - line-height: 1.6; - font-size: 13.5px; -} - -.endpoint-block { - margin-top: 14px; -} - -.block-label { - font-size: 11px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.6px; - color: rgba(0, 0, 0, 0.45); - margin-bottom: 6px; -} - -.error-label { - color: #cf222e; -} - -body.dark .endpoint-row:hover { - background: rgba(255, 255, 255, 0.02); -} - -body.dark .endpoint-row + .endpoint-row { - border-top-color: rgba(255, 255, 255, 0.08); -} - -body.dark .endpoint-path { - color: rgba(255, 255, 255, 0.82); - background: rgba(255, 255, 255, 0.05); -} - -body.dark .endpoint-summary { - color: rgba(255, 255, 255, 0.65); -} - -body.dark .block-label { - color: rgba(255, 255, 255, 0.45); -} - -body.dark .error-label { - color: #ff7b72; -} diff --git a/frontend/src/pages/api-docs/EndpointRow.tsx b/frontend/src/pages/api-docs/EndpointRow.tsx deleted file mode 100644 index d7fd7ad2..00000000 --- a/frontend/src/pages/api-docs/EndpointRow.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import { Table, Tag } from 'antd'; -import type { ColumnsType } from 'antd/es/table'; -import { methodColors, safeInlineHtml } from './endpoints.js'; -import CodeBlock from './CodeBlock'; -import './EndpointRow.css'; - -interface Param { - name: string; - in?: string; - type?: string; - desc?: string; -} - -export interface Endpoint { - method: string; - path: string; - summary?: string; - params?: Param[]; - body?: string; - response?: string; - errorResponse?: string; -} - -const paramColumns: ColumnsType = [ - { title: 'Name', dataIndex: 'name', key: 'name', width: 180 }, - { title: 'In', dataIndex: 'in', key: 'in', width: 100 }, - { title: 'Type', dataIndex: 'type', key: 'type', width: 120 }, - { title: 'Description', dataIndex: 'desc', key: 'desc' }, -]; - -export default function EndpointRow({ endpoint }: { endpoint: Endpoint }) { - const tagColor = (methodColors as Record)[endpoint.method] || 'default'; - const hasParams = Array.isArray(endpoint.params) && endpoint.params.length > 0; - - return ( -
-
- {endpoint.method} - {endpoint.path} -
- - {endpoint.summary && ( -

- )} - - {hasParams && ( -

-
Parameters
- - - )} - - {endpoint.body && ( -
-
Request body
- -
- )} - - {endpoint.response && ( -
-
Response
- -
- )} - - {endpoint.errorResponse && ( -
-
Error response
- -
- )} - - ); -} diff --git a/frontend/src/pages/api-docs/EndpointSection.css b/frontend/src/pages/api-docs/EndpointSection.css deleted file mode 100644 index f6a54568..00000000 --- a/frontend/src/pages/api-docs/EndpointSection.css +++ /dev/null @@ -1,129 +0,0 @@ -.api-section { - background: #fff; - border: 1px solid rgba(128, 128, 128, 0.12); - border-radius: 8px; - padding: 20px 24px; - margin-bottom: 16px; - transition: box-shadow 0.2s, border-color 0.2s; -} - -.api-section:hover { - box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); -} - -.section-header { - display: flex; - align-items: center; - justify-content: space-between; - cursor: pointer; - user-select: none; -} - -.section-header:hover .collapse-icon, -.section-header:hover .section-icon { - color: #1677ff; -} - -.section-header-left { - display: flex; - align-items: center; - gap: 10px; -} - -.collapse-icon { - font-size: 12px; - color: rgba(0, 0, 0, 0.4); - transition: color 0.2s; -} - -.section-icon { - font-size: 18px; - color: rgba(0, 0, 0, 0.45); - transition: color 0.2s; -} - -.section-title { - font-size: 20px; - font-weight: 700; - margin: 0; - color: rgba(0, 0, 0, 0.88); -} - -.endpoint-count { - font-size: 11px; - font-weight: 600; - color: rgba(0, 0, 0, 0.45); - white-space: nowrap; - background: rgba(128, 128, 128, 0.08); - padding: 3px 10px; - border-radius: 12px; - text-transform: uppercase; - letter-spacing: 0.3px; -} - -.section-description { - margin: 12px 0 14px; - color: rgba(0, 0, 0, 0.65); - line-height: 1.6; -} - -.sub-header-block { - margin-bottom: 14px; -} - -.section-block-label { - font-size: 12px; - font-weight: 600; - text-transform: uppercase; - letter-spacing: 0.5px; - color: rgba(0, 0, 0, 0.5); - margin-bottom: 6px; -} - -.endpoints { - padding-top: 8px; - border-top: 1px solid rgba(128, 128, 128, 0.1); -} - -.endpoints > :first-child { - padding-top: 0; -} - -body.dark .api-section { - background: #252526; - border-color: rgba(255, 255, 255, 0.08); -} - -body.dark .api-section:hover { - box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); -} - -html[data-theme='ultra-dark'] .api-section { - background: #0a0a0a; - border-color: rgba(255, 255, 255, 0.06); -} - -html[data-theme='ultra-dark'] .api-section:hover { - box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); -} - -body.dark .section-title { - color: rgba(255, 255, 255, 0.92); -} - -body.dark .section-icon { - color: rgba(255, 255, 255, 0.5); -} - -body.dark .section-description { - color: rgba(255, 255, 255, 0.7); -} - -body.dark .section-block-label { - color: rgba(255, 255, 255, 0.55); -} - -body.dark .endpoint-count { - color: rgba(255, 255, 255, 0.55); - background: rgba(255, 255, 255, 0.06); -} diff --git a/frontend/src/pages/api-docs/EndpointSection.tsx b/frontend/src/pages/api-docs/EndpointSection.tsx deleted file mode 100644 index 8b254d19..00000000 --- a/frontend/src/pages/api-docs/EndpointSection.tsx +++ /dev/null @@ -1,90 +0,0 @@ -import type { ComponentType } from 'react'; -import { Table } from 'antd'; -import type { ColumnsType } from 'antd/es/table'; -import { DownOutlined, RightOutlined } from '@ant-design/icons'; -import EndpointRow from './EndpointRow'; -import type { Endpoint } from './EndpointRow'; -import { safeInlineHtml } from './endpoints.js'; -import './EndpointSection.css'; - -interface SubHeader { - name: string; - desc?: string; -} - -export interface Section { - id: string; - title: string; - description?: string; - endpoints: Endpoint[]; - subHeader?: SubHeader[]; -} - -interface EndpointSectionProps { - section: Section; - icon?: ComponentType<{ className?: string }> | null; - collapsed?: boolean; - onToggle?: () => void; -} - -const subHeaderColumns: ColumnsType = [ - { title: 'Header', dataIndex: 'name', key: 'name', width: 240 }, - { - title: 'Description', - dataIndex: 'desc', - key: 'desc', - render: (value: string) => ( - - ), - }, -]; - -export default function EndpointSection({ - section, - icon: Icon = null, - collapsed = false, - onToggle, -}: EndpointSectionProps) { - const endpointLabel = section.endpoints.length === 1 - ? '1 endpoint' - : `${section.endpoints.length} endpoints`; - - return ( -
-
-
- {collapsed ? : } - {Icon && } -

{section.title}

-
- {endpointLabel} -
- - {section.description && !collapsed && ( -

- )} - - {section.subHeader && !collapsed && ( -

-
Response headers
-
- - )} - -
- {section.endpoints.map((endpoint, idx) => ( - - ))} -
- - ); -} diff --git a/frontend/vite.config.js b/frontend/vite.config.js index a54146c1..96117856 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -198,6 +198,11 @@ export default defineConfig({ if (id.includes('/node_modules/otpauth/')) return 'vendor-otpauth'; if (id.includes('/node_modules/@tanstack/')) return 'vendor-tanstack'; if (id.includes('/node_modules/react-router')) return 'vendor-router'; + if ( + id.includes('/node_modules/swagger-ui-react/') + || id.includes('/node_modules/swagger-ui/') + || id.includes('/node_modules/swagger-client/') + ) return 'vendor-swagger'; if (id.includes('dayjs')) return 'vendor-dayjs'; if (id.includes('axios')) return 'vendor-axios'; return 'vendor'; diff --git a/web/controller/dist.go b/web/controller/dist.go index 682f0024..1c2b6212 100644 --- a/web/controller/dist.go +++ b/web/controller/dist.go @@ -23,6 +23,21 @@ func SetDistFS(fs embed.FS) { var distPageBuildTime = time.Now() +// ServeOpenAPISpec returns the generated OpenAPI 3.0 description of the +// panel API. Postman / Insomnia / openapi-generator consume this URL +// directly; the in-panel Swagger UI page also fetches it. The spec is +// produced at frontend build time by scripts/build-openapi.mjs and +// embedded into the binary via the dist FS. +func ServeOpenAPISpec(c *gin.Context) { + body, err := distFS.ReadFile("dist/openapi.json") + if err != nil { + c.JSON(http.StatusNotFound, gin.H{"success": false, "msg": "openapi.json not found"}) + return + } + c.Header("Cache-Control", "public, max-age=300") + c.Data(http.StatusOK, "application/json; charset=utf-8", body) +} + func serveDistPage(c *gin.Context, name string) { body, err := distFS.ReadFile("dist/" + name) if err != nil { diff --git a/web/web.go b/web/web.go index b6c050f4..ca990a3e 100644 --- a/web/web.go +++ b/web/web.go @@ -227,6 +227,7 @@ func (s *Server) initRouter() (*gin.Engine, error) { s.index = controller.NewIndexController(g) s.panel = controller.NewXUIController(g) + g.GET("/panel/api/openapi.json", controller.ServeOpenAPISpec) s.api = controller.NewAPIController(g, s.customGeoService) // Initialize WebSocket hub