From 4e34f9f370f74f2a417993973b9aaba5de8ef5be Mon Sep 17 00:00:00 2001 From: catouse Date: Mon, 11 May 2026 20:29:41 +0800 Subject: [PATCH 1/4] + docs: add documentation tooling --- .gitignore | 4 +- bun.lock | 398 +++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 16 ++- typedoc.json | 27 ++++ 4 files changed, 441 insertions(+), 4 deletions(-) create mode 100644 typedoc.json diff --git a/.gitignore b/.gitignore index c2b1b81..270722e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ node_modules/ dist/ +docs/.vitepress/cache/ +docs/.vitepress/dist/ coverage/ *.log .DS_Store *.tgz *.local -*.local.* \ No newline at end of file +*.local.* diff --git a/bun.lock b/bun.lock index 4aab247..dae6529 100644 --- a/bun.lock +++ b/bun.lock @@ -11,25 +11,423 @@ "@types/bun": "^1.3.13", "@types/node": "^24.10.0", "@types/turndown": "^5.0.5", + "typedoc": "^0.28.19", + "typedoc-plugin-markdown": "^4.11.0", + "typedoc-vitepress-theme": "^1.1.2", "typescript": "^5.7.0", + "vitepress": "^1.6.4", }, }, }, "packages": { + "@algolia/abtesting": ["@algolia/abtesting@1.18.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-aehCadlWOGvrT91KUIZpC0MbB8KBW9yUuvTJFd2xesR7le/IsT4nJUnjCCZ4ZqZCeTcPHPV5mo//fZ5oxcSVYw=="], + + "@algolia/autocomplete-core": ["@algolia/autocomplete-core@1.17.7", "", { "dependencies": { "@algolia/autocomplete-plugin-algolia-insights": "1.17.7", "@algolia/autocomplete-shared": "1.17.7" } }, "sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q=="], + + "@algolia/autocomplete-plugin-algolia-insights": ["@algolia/autocomplete-plugin-algolia-insights@1.17.7", "", { "dependencies": { "@algolia/autocomplete-shared": "1.17.7" }, "peerDependencies": { "search-insights": ">= 1 < 3" } }, "sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A=="], + + "@algolia/autocomplete-preset-algolia": ["@algolia/autocomplete-preset-algolia@1.17.7", "", { "dependencies": { "@algolia/autocomplete-shared": "1.17.7" }, "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" } }, "sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA=="], + + "@algolia/autocomplete-shared": ["@algolia/autocomplete-shared@1.17.7", "", { "peerDependencies": { "@algolia/client-search": ">= 4.9.1 < 6", "algoliasearch": ">= 4.9.1 < 6" } }, "sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg=="], + + "@algolia/client-abtesting": ["@algolia/client-abtesting@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-HmXOGBOAOJPounpBzBpuY0zDYeiCpxgHnQmuA7JO6ScukcBdGp3/XM9zJk5pJx/xNGD68mbPGXWpDxGtl6BwDQ=="], + + "@algolia/client-analytics": ["@algolia/client-analytics@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-5oo4+I8iixie9vXhCyNFCzeIr8pqA3FQ//VsLHTDvZAV4ttYOPGvYHGQq5NSalrLx5Jc3dRro/5uDOlnUMcBJg=="], + + "@algolia/client-common": ["@algolia/client-common@5.52.1", "", {}, "sha512-qCDoZfx5MpX7XQzvQ3bC4tSEMkQWQMaF/ABtLuoze03Y/flR563CCSws02qIJ23oX7lxl92LsilZjINVyTdtLw=="], + + "@algolia/client-insights": ["@algolia/client-insights@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-hnGs0/lsFJ2PWDxNBz7pxreXo/Xz7gxYRcfePBUjsH26ad0kU/sgnVZd9LwWBpsQv65z2jlb5dkyaB9WE9M9FQ=="], + + "@algolia/client-personalization": ["@algolia/client-personalization@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-2VxxNc/uBysyKvGeBdSM5n9eIDKH8kWD7wd9/yqbJAiVwU4Yv6tU1LSJusHKrXV/aCu1KW7t9Gug9QyeEmtn/Q=="], + + "@algolia/client-query-suggestions": ["@algolia/client-query-suggestions@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-O6mPtsw3xEfNOe6gWFpYLeAZAIljNa4Hgna3bq15PwyN7nbjTY0wXJFRbzs/0YVf75Br+SbOQUmjKxXYjDiSiQ=="], + + "@algolia/client-search": ["@algolia/client-search@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-gA8oJOV1LnQQkDf91iebNnFInHuW0gRPEgLSOQ7EfipCEjYTHm5swm1DlH9H5RaRw4RrHuzHBegnlzc0MAstcg=="], + + "@algolia/ingestion": ["@algolia/ingestion@1.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-U9zZfc5xIu9wRxZkt+HceJUAD4VKHKbAyLSloJdEyMRmphXeibfrY9cxqIXBcmPeZzGhn3Imb35Dq8l19PkJhw=="], + + "@algolia/monitoring": ["@algolia/monitoring@1.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-a3SGNceHmkQfq77iG8Ka+w1pvwfZa/0lzEIgse30fL0kD+yKnd/dg0dQvSfFPAEt2f21DMcGkDSSeJlO3KdQjQ=="], + + "@algolia/recommend": ["@algolia/recommend@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-z98QEguCFDpxb4S/PyrUK1igqF8tPsdbqOUUO6ON91vJ58w+Gwa6ncrI0oNXSFcrkxA5EqPKPQ2A1PBCn08TYQ=="], + + "@algolia/requester-browser-xhr": ["@algolia/requester-browser-xhr@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1" } }, "sha512-CI7+/0I11QeZM59Uc8whd2or0kqzFVjpaPn9Qpwll/krHcBAxk24WkAQ6WX+IwDVMfpont4YGbKwAmCre3vE8Q=="], + + "@algolia/requester-fetch": ["@algolia/requester-fetch@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1" } }, "sha512-S6bDuw9byfOvm3T71cgdoZgrgnZq6hpdMLkx52Louh57nUAmvGQESz2aojOynQHjbTiV55smvAFbgn0qT4tJrg=="], + + "@algolia/requester-node-http": ["@algolia/requester-node-http@5.52.1", "", { "dependencies": { "@algolia/client-common": "5.52.1" } }, "sha512-tqZXM+54rWo4mk5jL5Z/flE11nPmNEdXwFBM5py9DkOmbjeCNemfVd45FyM97XdzfZ0dl9uOJC6PYn1FpkeyQg=="], + + "@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="], + + "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], + + "@babel/parser": ["@babel/parser@7.29.3", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA=="], + + "@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="], + + "@docsearch/css": ["@docsearch/css@3.8.2", "", {}, "sha512-y05ayQFyUmCXze79+56v/4HpycYF3uFqB78pLPrSV5ZKAlDuIAAJNhaRi8tTdRNXh05yxX/TyNnzD6LwSM89vQ=="], + + "@docsearch/js": ["@docsearch/js@3.8.2", "", { "dependencies": { "@docsearch/react": "3.8.2", "preact": "^10.0.0" } }, "sha512-Q5wY66qHn0SwA7Taa0aDbHiJvaFJLOJyHmooQ7y8hlwwQLQ/5WwCcoX0g7ii04Qi2DJlHsd0XXzJ8Ypw9+9YmQ=="], + + "@docsearch/react": ["@docsearch/react@3.8.2", "", { "dependencies": { "@algolia/autocomplete-core": "1.17.7", "@algolia/autocomplete-preset-algolia": "1.17.7", "@docsearch/css": "3.8.2", "algoliasearch": "^5.14.2" }, "peerDependencies": { "@types/react": ">= 16.8.0 < 19.0.0", "react": ">= 16.8.0 < 19.0.0", "react-dom": ">= 16.8.0 < 19.0.0", "search-insights": ">= 1 < 3" }, "optionalPeers": ["@types/react", "react", "react-dom", "search-insights"] }, "sha512-xCRrJQlTt8N9GU0DG4ptwHRkfnSnD/YpdeaXe02iKfqs97TkZJv60yE+1eq/tjPcVnTW8dP5qLP7itifFVV5eg=="], + + "@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.21.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ=="], + + "@esbuild/android-arm": ["@esbuild/android-arm@0.21.5", "", { "os": "android", "cpu": "arm" }, "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg=="], + + "@esbuild/android-arm64": ["@esbuild/android-arm64@0.21.5", "", { "os": "android", "cpu": "arm64" }, "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A=="], + + "@esbuild/android-x64": ["@esbuild/android-x64@0.21.5", "", { "os": "android", "cpu": "x64" }, "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA=="], + + "@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.21.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ=="], + + "@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.21.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw=="], + + "@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.21.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g=="], + + "@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.21.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ=="], + + "@esbuild/linux-arm": ["@esbuild/linux-arm@0.21.5", "", { "os": "linux", "cpu": "arm" }, "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA=="], + + "@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.21.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q=="], + + "@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.21.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg=="], + + "@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg=="], + + "@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg=="], + + "@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.21.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w=="], + + "@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA=="], + + "@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.21.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A=="], + + "@esbuild/linux-x64": ["@esbuild/linux-x64@0.21.5", "", { "os": "linux", "cpu": "x64" }, "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ=="], + + "@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.21.5", "", { "os": "none", "cpu": "x64" }, "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg=="], + + "@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.21.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow=="], + + "@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.21.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg=="], + + "@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.21.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A=="], + + "@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.21.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA=="], + + "@esbuild/win32-x64": ["@esbuild/win32-x64@0.21.5", "", { "os": "win32", "cpu": "x64" }, "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw=="], + + "@gerrit0/mini-shiki": ["@gerrit0/mini-shiki@3.23.0", "", { "dependencies": { "@shikijs/engine-oniguruma": "^3.23.0", "@shikijs/langs": "^3.23.0", "@shikijs/themes": "^3.23.0", "@shikijs/types": "^3.23.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg=="], + + "@iconify-json/simple-icons": ["@iconify-json/simple-icons@1.2.81", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-Utjw4sPtoVdbpAQAkC4O0cYpt4ehQZYr6aFHhmvdeW8mQwkINyAe0ogTPqNptSSKogZ2lfgXM8zpuhO961Wnng=="], + + "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], + + "@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="], + "@mixmark-io/domino": ["@mixmark-io/domino@2.2.0", "", {}, "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw=="], + "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.60.3", "", { "os": "android", "cpu": "arm" }, "sha512-x35CNW/ANXG3hE/EZpRU8MXX1JDN86hBb2wMGAtltkz7pc6cxgjpy1OMMfDosOQ+2hWqIkag/fGok1Yady9nGw=="], + + "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.60.3", "", { "os": "android", "cpu": "arm64" }, "sha512-xw3xtkDApIOGayehp2+Rz4zimfkaX65r4t47iy+ymQB2G4iJCBBfj0ogVg5jpvjpn8UWn/+q9tprxleYeNp3Hw=="], + + "@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.60.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-vo6Y5Qfpx7/5EaamIwi0WqW2+zfiusVihKatLvtN1VFVy3D13uERk/6gZLU1UiHRL6fDXqj/ELIeVRGnvcTE1g=="], + + "@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.60.3", "", { "os": "darwin", "cpu": "x64" }, "sha512-D+0QGcZhBzTN82weOnsSlY7V7+RMmPuF1CkbxyMAGE8+ZHeUjyb76ZiWmBlCu//AQQONvxcqRbwZTajZKqjuOw=="], + + "@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.60.3", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-6HnvHCT7fDyj6R0Ph7A6x8dQS/S38MClRWeDLqc0MdfWkxjiu1HSDYrdPhqSILzjTIC/pnXbbJbo+ft+gy/9hQ=="], + + "@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.60.3", "", { "os": "freebsd", "cpu": "x64" }, "sha512-KHLgC3WKlUYW3ShFKnnosZDOJ0xjg9zp7au3sIm2bs/tGBeC2ipmvRh/N7JKi0t9Ue20C0dpEshi8WUubg+cnA=="], + + "@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.60.3", "", { "os": "linux", "cpu": "arm" }, "sha512-DV6fJoxEYWJOvaZIsok7KrYl0tPvga5OZ2yvKHNNYyk/2roMLqQAbGhr78EQ5YhHpnhLKJD3S1WFusAkmUuV5g=="], + + "@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.60.3", "", { "os": "linux", "cpu": "arm" }, "sha512-mQKoJAzvuOs6F+TZybQO4GOTSMUu7v0WdxEk24krQ/uUxXoPTtHjuaUuPmFhtBcM4K0ons8nrE3JyhTuCFtT/w=="], + + "@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.60.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-Whjj2qoiJ6+OOJMGptTYazaJvjOJm+iKHpXQM1P3LzGjt7Ff++Tp7nH4N8J/BUA7R9IHfDyx4DJIflifwnbmIA=="], + + "@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.60.3", "", { "os": "linux", "cpu": "arm64" }, "sha512-4YTNHKqGng5+yiZt3mg77nmyuCfmNfX4fPmyUapBcIk+BdwSwmCWGXOUxhXbBEkFHtoN5boLj/5NON+u5QC9tg=="], + + "@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-SU3kNlhkpI4UqlUc2VXPGK9o886ZsSeGfMAX2ba2b8DKmMXq4AL7KUrkSWVbb7koVqx41Yczx6dx5PNargIrEA=="], + + "@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-6lDLl5h4TXpB1mTf2rQWnAk/LcXrx9vBfu/DT5TIPhvMhRWaZ5MxkIc8u4lJAmBo6klTe1ywXIUHFjylW505sg=="], + + "@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.60.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-BMo8bOw8evlup/8G+cj5xWtPyp93xPdyoSN16Zy90Q2QZ0ZYRhCt6ZJSwbrRzG9HApFabjwj2p25TUPDWrhzqQ=="], + + "@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.60.3", "", { "os": "linux", "cpu": "ppc64" }, "sha512-E0L8X1dZN1/Rph+5VPF6Xj2G7JJvMACVXtamTJIDrVI44Y3K+G8gQaMEAavbqCGTa16InptiVrX6eM6pmJ+7qA=="], + + "@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-oZJ/WHaVfHUiRAtmTAeo3DcevNsVvH8mbvodjZy7D5QKvCefO371SiKRpxoDcCxB3PTRTLayWBkvmDQKTcX/sw=="], + + "@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.60.3", "", { "os": "linux", "cpu": "none" }, "sha512-Dhbyh7j9FybM3YaTgaHmVALwA8AkUwTPccyCQ79TG9AJUsMQqgN1DDEZNr4+QUfwiWvLDumW5vdwzoeUF+TNxQ=="], + + "@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.60.3", "", { "os": "linux", "cpu": "s390x" }, "sha512-cJd1X5XhHHlltkaypz1UcWLA8AcoIi1aWhsvaWDskD1oz2eKCypnqvTQ8ykMNI0RSmm7NkTdSqSSD7zM0xa6Ig=="], + + "@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.60.3", "", { "os": "linux", "cpu": "x64" }, "sha512-DAZDBHQfG2oQuhY7mc6I3/qB4LU2fQCjRvxbDwd/Jdvb9fypP4IJ4qmtu6lNjes6B531AI8cg1aKC2di97bUxA=="], + + "@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.60.3", "", { "os": "linux", "cpu": "x64" }, "sha512-cRxsE8c13mZOh3vP+wLDxpQBRrOHDIGOWyDL93Sy0Ga8y515fBcC2pjUfFwUe5T7tqvTvWbCpg1URM/AXdWIXA=="], + + "@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.60.3", "", { "os": "openbsd", "cpu": "x64" }, "sha512-QaWcIgRxqEdQdhJqW4DJctsH6HCmo5vHxY0krHSX4jMtOqfzC+dqDGuHM87bu4H8JBeibWx7jFz+h6/4C8wA5Q=="], + + "@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.60.3", "", { "os": "none", "cpu": "arm64" }, "sha512-AaXwSvUi3QIPtroAUw1t5yHGIyqKEXwH54WUocFolZhpGDruJcs8c+xPNDRn4XiQsS7MEwnYsHW2l0MBLDMkWg=="], + + "@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.60.3", "", { "os": "win32", "cpu": "arm64" }, "sha512-65LAKM/bAWDqKNEelHlcHvm2V+Vfb8C6INFxQXRHCvaVN1rJfwr4NvdP4FyzUaLqWfaCGaadf6UbTm8xJeYfEg=="], + + "@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.60.3", "", { "os": "win32", "cpu": "ia32" }, "sha512-EEM2gyhBF5MFnI6vMKdX1LAosE627RGBzIoGMdLloPZkXrUN0Ckqgr2Qi8+J3zip/8NVVro3/FjB+tjhZUgUHA=="], + + "@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.60.3", "", { "os": "win32", "cpu": "x64" }, "sha512-E5Eb5H/DpxaoXH++Qkv28RcUJboMopmdDUALBczvHMf7hNIxaDZqwY5lK12UK1BHacSmvupoEWGu+n993Z0y1A=="], + + "@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.60.3", "", { "os": "win32", "cpu": "x64" }, "sha512-hPt/bgL5cE+Qp+/TPHBqptcAgPzgj46mPcg/16zNUmbQk0j+mOEQV/+Lqu8QRtDV3Ek95Q6FeFITpuhl6OTsAA=="], + + "@shikijs/core": ["@shikijs/core@2.5.0", "", { "dependencies": { "@shikijs/engine-javascript": "2.5.0", "@shikijs/engine-oniguruma": "2.5.0", "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4", "hast-util-to-html": "^9.0.4" } }, "sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg=="], + + "@shikijs/engine-javascript": ["@shikijs/engine-javascript@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "oniguruma-to-es": "^3.1.0" } }, "sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w=="], + + "@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g=="], + + "@shikijs/langs": ["@shikijs/langs@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0" } }, "sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg=="], + + "@shikijs/themes": ["@shikijs/themes@3.23.0", "", { "dependencies": { "@shikijs/types": "3.23.0" } }, "sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA=="], + + "@shikijs/transformers": ["@shikijs/transformers@2.5.0", "", { "dependencies": { "@shikijs/core": "2.5.0", "@shikijs/types": "2.5.0" } }, "sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg=="], + + "@shikijs/types": ["@shikijs/types@2.5.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw=="], + + "@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.0.2", "", {}, "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg=="], + "@types/bun": ["@types/bun@1.3.13", "", { "dependencies": { "bun-types": "1.3.13" } }, "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw=="], + "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + + "@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="], + + "@types/linkify-it": ["@types/linkify-it@5.0.0", "", {}, "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q=="], + + "@types/markdown-it": ["@types/markdown-it@14.1.2", "", { "dependencies": { "@types/linkify-it": "^5", "@types/mdurl": "^2" } }, "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog=="], + + "@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="], + + "@types/mdurl": ["@types/mdurl@2.0.0", "", {}, "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg=="], + "@types/node": ["@types/node@24.12.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-8oljBDGun9cIsZRJR6fkihn0TSXJI0UDOOhncYaERq6M0JMDoPLxyscwruJcb4GKS6dvK/d8xebYBg27h/duaQ=="], "@types/turndown": ["@types/turndown@5.0.6", "", {}, "sha512-ru00MoyeeouE5BX4gRL+6m/BsDfbRayOskWqUvh7CLGW+UXxHQItqALa38kKnOiZPqJrtzJUgAC2+F0rL1S4Pg=="], + "@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="], + + "@types/web-bluetooth": ["@types/web-bluetooth@0.0.21", "", {}, "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA=="], + + "@ungap/structured-clone": ["@ungap/structured-clone@1.3.1", "", {}, "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ=="], + + "@vitejs/plugin-vue": ["@vitejs/plugin-vue@5.2.4", "", { "peerDependencies": { "vite": "^5.0.0 || ^6.0.0", "vue": "^3.2.25" } }, "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA=="], + + "@vue/compiler-core": ["@vue/compiler-core@3.5.34", "", { "dependencies": { "@babel/parser": "^7.29.3", "@vue/shared": "3.5.34", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "sha512-s9cLyK5mLcvZ4Agva5QgRsQyLKvts9WbU9DB6NqiZkkGEdwmcEiylj5Jbwkp680drF/NNCV8OlAJSe+yMLxaJw=="], + + "@vue/compiler-dom": ["@vue/compiler-dom@3.5.34", "", { "dependencies": { "@vue/compiler-core": "3.5.34", "@vue/shared": "3.5.34" } }, "sha512-EbF/T++k0e2MMZlJsBhzK8Sgwt0HcIPOhzn1CTB/lv6sQcyk+OWf8YeiLxZp3ro7MbbLcAfAJ6sEvjFWuNgUCw=="], + + "@vue/compiler-sfc": ["@vue/compiler-sfc@3.5.34", "", { "dependencies": { "@babel/parser": "^7.29.3", "@vue/compiler-core": "3.5.34", "@vue/compiler-dom": "3.5.34", "@vue/compiler-ssr": "3.5.34", "@vue/shared": "3.5.34", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.14", "source-map-js": "^1.2.1" } }, "sha512-D/ihr6uZeIt6r+pVZf46RWT1fAsLFMbUP7k8G1VkiiWexriED9GrX3echHd4Abbt17zjlfiFJ8z7a3BxZOPNjg=="], + + "@vue/compiler-ssr": ["@vue/compiler-ssr@3.5.34", "", { "dependencies": { "@vue/compiler-dom": "3.5.34", "@vue/shared": "3.5.34" } }, "sha512-cDtTHKibkThKGHH1SP+WdccquNRYQDFH6rRjQCqT9G2ltFAfoR5pUftpab/z+aM5mW9HLLVQW7hfKKQe/1GBeQ=="], + + "@vue/devtools-api": ["@vue/devtools-api@7.7.9", "", { "dependencies": { "@vue/devtools-kit": "^7.7.9" } }, "sha512-kIE8wvwlcZ6TJTbNeU2HQNtaxLx3a84aotTITUuL/4bzfPxzajGBOoqjMhwZJ8L9qFYDU/lAYMEEm11dnZOD6g=="], + + "@vue/devtools-kit": ["@vue/devtools-kit@7.7.9", "", { "dependencies": { "@vue/devtools-shared": "^7.7.9", "birpc": "^2.3.0", "hookable": "^5.5.3", "mitt": "^3.0.1", "perfect-debounce": "^1.0.0", "speakingurl": "^14.0.1", "superjson": "^2.2.2" } }, "sha512-PyQ6odHSgiDVd4hnTP+aDk2X4gl2HmLDfiyEnn3/oV+ckFDuswRs4IbBT7vacMuGdwY/XemxBoh302ctbsptuA=="], + + "@vue/devtools-shared": ["@vue/devtools-shared@7.7.9", "", { "dependencies": { "rfdc": "^1.4.1" } }, "sha512-iWAb0v2WYf0QWmxCGy0seZNDPdO3Sp5+u78ORnyeonS6MT4PC7VPrryX2BpMJrwlDeaZ6BD4vP4XKjK0SZqaeA=="], + + "@vue/reactivity": ["@vue/reactivity@3.5.34", "", { "dependencies": { "@vue/shared": "3.5.34" } }, "sha512-y9XDjCEuBp+98k+UL5dbYkh57AHU4o6cxZedOPXw3bmrZZYLQsVHguGurq7hVrPCSrQtrnz1f9dssyFr+dMXfQ=="], + + "@vue/runtime-core": ["@vue/runtime-core@3.5.34", "", { "dependencies": { "@vue/reactivity": "3.5.34", "@vue/shared": "3.5.34" } }, "sha512-mKeBYvu8tcMSLhypAHBmriUFfWXKTCF/23Z4jiCoYK3UtWepkliViNLuR90V9XOyD62mUxs9p1jsrpK3CCGIzw=="], + + "@vue/runtime-dom": ["@vue/runtime-dom@3.5.34", "", { "dependencies": { "@vue/reactivity": "3.5.34", "@vue/runtime-core": "3.5.34", "@vue/shared": "3.5.34", "csstype": "^3.2.3" } }, "sha512-e8kZzERmCwUnBRVsgSQlAfrfU2rGoy0FFKPBXSlfEjc/O3KfA7QP0t1/2ZylrbchjmIKB4dPTd07A6WPr0eOrg=="], + + "@vue/server-renderer": ["@vue/server-renderer@3.5.34", "", { "dependencies": { "@vue/compiler-ssr": "3.5.34", "@vue/shared": "3.5.34" }, "peerDependencies": { "vue": "3.5.34" } }, "sha512-nHxmJoTrKsmrkbILRhkC9gY1G3moZbJTqCzDd7DOOzG5KH9oeJ0Unqrff5f9v0pW//jES05ZkJcNtfE8JjOIew=="], + + "@vue/shared": ["@vue/shared@3.5.34", "", {}, "sha512-24uqU4OIiX29ryC3MeWid/Xf2fa2EFRUVLb77nRhk+UrTVrh/XiGtFAFmJBAtBRbjwNdsPRP+jj/OL27Eg1NDA=="], + + "@vueuse/core": ["@vueuse/core@12.8.2", "", { "dependencies": { "@types/web-bluetooth": "^0.0.21", "@vueuse/metadata": "12.8.2", "@vueuse/shared": "12.8.2", "vue": "^3.5.13" } }, "sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ=="], + + "@vueuse/integrations": ["@vueuse/integrations@12.8.2", "", { "dependencies": { "@vueuse/core": "12.8.2", "@vueuse/shared": "12.8.2", "vue": "^3.5.13" }, "peerDependencies": { "async-validator": "^4", "axios": "^1", "change-case": "^5", "drauu": "^0.4", "focus-trap": "^7", "fuse.js": "^7", "idb-keyval": "^6", "jwt-decode": "^4", "nprogress": "^0.2", "qrcode": "^1.5", "sortablejs": "^1", "universal-cookie": "^7" }, "optionalPeers": ["async-validator", "axios", "change-case", "drauu", "focus-trap", "fuse.js", "idb-keyval", "jwt-decode", "nprogress", "qrcode", "sortablejs", "universal-cookie"] }, "sha512-fbGYivgK5uBTRt7p5F3zy6VrETlV9RtZjBqd1/HxGdjdckBgBM4ugP8LHpjolqTj14TXTxSK1ZfgPbHYyGuH7g=="], + + "@vueuse/metadata": ["@vueuse/metadata@12.8.2", "", {}, "sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A=="], + + "@vueuse/shared": ["@vueuse/shared@12.8.2", "", { "dependencies": { "vue": "^3.5.13" } }, "sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w=="], + + "algoliasearch": ["algoliasearch@5.52.1", "", { "dependencies": { "@algolia/abtesting": "1.18.1", "@algolia/client-abtesting": "5.52.1", "@algolia/client-analytics": "5.52.1", "@algolia/client-common": "5.52.1", "@algolia/client-insights": "5.52.1", "@algolia/client-personalization": "5.52.1", "@algolia/client-query-suggestions": "5.52.1", "@algolia/client-search": "5.52.1", "@algolia/ingestion": "1.52.1", "@algolia/monitoring": "1.52.1", "@algolia/recommend": "5.52.1", "@algolia/requester-browser-xhr": "5.52.1", "@algolia/requester-fetch": "5.52.1", "@algolia/requester-node-http": "5.52.1" } }, "sha512-fHA8+kXTbjagw3jkLiaS7KKrH8qe2DyOsiUhGlN4cdT77PEsfqXZl7ewDk1hsg+pJnPlnE50XtLxjR91iJOpmg=="], + + "argparse": ["argparse@2.0.1", "", {}, "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="], + + "balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="], + + "birpc": ["birpc@2.9.0", "", {}, "sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw=="], + + "brace-expansion": ["brace-expansion@5.0.6", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g=="], + "bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="], + "ccount": ["ccount@2.0.1", "", {}, "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg=="], + + "character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="], + + "character-entities-legacy": ["character-entities-legacy@3.0.0", "", {}, "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ=="], + + "comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="], + + "copy-anything": ["copy-anything@4.0.5", "", { "dependencies": { "is-what": "^5.2.0" } }, "sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA=="], + + "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], + + "dequal": ["dequal@2.0.3", "", {}, "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA=="], + + "devlop": ["devlop@1.1.0", "", { "dependencies": { "dequal": "^2.0.0" } }, "sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA=="], + + "emoji-regex-xs": ["emoji-regex-xs@1.0.0", "", {}, "sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg=="], + + "entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="], + + "esbuild": ["esbuild@0.21.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="], + + "estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="], + + "focus-trap": ["focus-trap@7.8.0", "", { "dependencies": { "tabbable": "^6.4.0" } }, "sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "hast-util-to-html": ["hast-util-to-html@9.0.5", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "ccount": "^2.0.0", "comma-separated-tokens": "^2.0.0", "hast-util-whitespace": "^3.0.0", "html-void-elements": "^3.0.0", "mdast-util-to-hast": "^13.0.0", "property-information": "^7.0.0", "space-separated-tokens": "^2.0.0", "stringify-entities": "^4.0.0", "zwitch": "^2.0.4" } }, "sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw=="], + + "hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="], + + "hookable": ["hookable@5.5.3", "", {}, "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ=="], + + "html-void-elements": ["html-void-elements@3.0.0", "", {}, "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg=="], + + "is-what": ["is-what@5.5.0", "", {}, "sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw=="], + + "linkify-it": ["linkify-it@5.0.0", "", { "dependencies": { "uc.micro": "^2.0.0" } }, "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ=="], + + "lunr": ["lunr@2.3.9", "", {}, "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="], + + "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], + + "mark.js": ["mark.js@8.11.1", "", {}, "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ=="], + + "markdown-it": ["markdown-it@14.1.1", "", { "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", "linkify-it": "^5.0.0", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" }, "bin": { "markdown-it": "bin/markdown-it.mjs" } }, "sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA=="], + + "mdast-util-to-hast": ["mdast-util-to-hast@13.2.1", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/mdast": "^4.0.0", "@ungap/structured-clone": "^1.0.0", "devlop": "^1.0.0", "micromark-util-sanitize-uri": "^2.0.0", "trim-lines": "^3.0.0", "unist-util-position": "^5.0.0", "unist-util-visit": "^5.0.0", "vfile": "^6.0.0" } }, "sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA=="], + + "mdurl": ["mdurl@2.0.0", "", {}, "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w=="], + + "micromark-util-character": ["micromark-util-character@2.1.1", "", { "dependencies": { "micromark-util-symbol": "^2.0.0", "micromark-util-types": "^2.0.0" } }, "sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q=="], + + "micromark-util-encode": ["micromark-util-encode@2.0.1", "", {}, "sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw=="], + + "micromark-util-sanitize-uri": ["micromark-util-sanitize-uri@2.0.1", "", { "dependencies": { "micromark-util-character": "^2.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-symbol": "^2.0.0" } }, "sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ=="], + + "micromark-util-symbol": ["micromark-util-symbol@2.0.1", "", {}, "sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q=="], + + "micromark-util-types": ["micromark-util-types@2.0.2", "", {}, "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA=="], + + "minimatch": ["minimatch@10.2.5", "", { "dependencies": { "brace-expansion": "^5.0.5" } }, "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg=="], + + "minisearch": ["minisearch@7.2.0", "", {}, "sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg=="], + + "mitt": ["mitt@3.0.1", "", {}, "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw=="], + + "nanoid": ["nanoid@3.3.12", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ=="], + + "oniguruma-to-es": ["oniguruma-to-es@3.1.1", "", { "dependencies": { "emoji-regex-xs": "^1.0.0", "regex": "^6.0.1", "regex-recursion": "^6.0.2" } }, "sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ=="], + + "perfect-debounce": ["perfect-debounce@1.0.0", "", {}, "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA=="], + + "picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="], + + "postcss": ["postcss@8.5.14", "", { "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg=="], + + "preact": ["preact@10.29.1", "", {}, "sha512-gQCLc/vWroE8lIpleXtdJhTFDogTdZG9AjMUpVkDf2iTCNwYNWA+u16dL41TqUDJO4gm2IgrcMv3uTpjd4Pwmg=="], + + "property-information": ["property-information@7.1.0", "", {}, "sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ=="], + + "punycode.js": ["punycode.js@2.3.1", "", {}, "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="], + + "regex": ["regex@6.1.0", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg=="], + + "regex-recursion": ["regex-recursion@6.0.2", "", { "dependencies": { "regex-utilities": "^2.3.0" } }, "sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg=="], + + "regex-utilities": ["regex-utilities@2.3.0", "", {}, "sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng=="], + + "rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="], + + "rollup": ["rollup@4.60.3", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.60.3", "@rollup/rollup-android-arm64": "4.60.3", "@rollup/rollup-darwin-arm64": "4.60.3", "@rollup/rollup-darwin-x64": "4.60.3", "@rollup/rollup-freebsd-arm64": "4.60.3", "@rollup/rollup-freebsd-x64": "4.60.3", "@rollup/rollup-linux-arm-gnueabihf": "4.60.3", "@rollup/rollup-linux-arm-musleabihf": "4.60.3", "@rollup/rollup-linux-arm64-gnu": "4.60.3", "@rollup/rollup-linux-arm64-musl": "4.60.3", "@rollup/rollup-linux-loong64-gnu": "4.60.3", "@rollup/rollup-linux-loong64-musl": "4.60.3", "@rollup/rollup-linux-ppc64-gnu": "4.60.3", "@rollup/rollup-linux-ppc64-musl": "4.60.3", "@rollup/rollup-linux-riscv64-gnu": "4.60.3", "@rollup/rollup-linux-riscv64-musl": "4.60.3", "@rollup/rollup-linux-s390x-gnu": "4.60.3", "@rollup/rollup-linux-x64-gnu": "4.60.3", "@rollup/rollup-linux-x64-musl": "4.60.3", "@rollup/rollup-openbsd-x64": "4.60.3", "@rollup/rollup-openharmony-arm64": "4.60.3", "@rollup/rollup-win32-arm64-msvc": "4.60.3", "@rollup/rollup-win32-ia32-msvc": "4.60.3", "@rollup/rollup-win32-x64-gnu": "4.60.3", "@rollup/rollup-win32-x64-msvc": "4.60.3", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-pAQK9HalE84QSm4Po3EmWIZPd3FnjkShVkiMlz1iligWYkWQ7wHYd1PF/T7QZ5TVSD6uSTon5gBVMSM4JfBV+A=="], + + "search-insights": ["search-insights@2.17.3", "", {}, "sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ=="], + + "shiki": ["shiki@2.5.0", "", { "dependencies": { "@shikijs/core": "2.5.0", "@shikijs/engine-javascript": "2.5.0", "@shikijs/engine-oniguruma": "2.5.0", "@shikijs/langs": "2.5.0", "@shikijs/themes": "2.5.0", "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ=="], + + "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + + "space-separated-tokens": ["space-separated-tokens@2.0.2", "", {}, "sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q=="], + + "speakingurl": ["speakingurl@14.0.1", "", {}, "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ=="], + + "stringify-entities": ["stringify-entities@4.0.4", "", { "dependencies": { "character-entities-html4": "^2.0.0", "character-entities-legacy": "^3.0.0" } }, "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg=="], + + "superjson": ["superjson@2.2.6", "", { "dependencies": { "copy-anything": "^4" } }, "sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA=="], + + "tabbable": ["tabbable@6.4.0", "", {}, "sha512-05PUHKSNE8ou2dwIxTngl4EzcnsCDZGJ/iCLtDflR/SHB/ny14rXc+qU5P4mG9JkusiV7EivzY9Mhm55AzAvCg=="], + + "trim-lines": ["trim-lines@3.0.1", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="], + "turndown": ["turndown@7.2.4", "", { "dependencies": { "@mixmark-io/domino": "^2.2.0" } }, "sha512-I8yFsfRzmzK0WV1pNNOA4A7y4RDfFxPRxb3t+e3ui14qSGOxGtiSP6GjeX+Y6CHb7HYaFj7ECUD7VE5kQMZWGQ=="], + "typedoc": ["typedoc@0.28.19", "", { "dependencies": { "@gerrit0/mini-shiki": "^3.23.0", "lunr": "^2.3.9", "markdown-it": "^14.1.1", "minimatch": "^10.2.5", "yaml": "^2.8.3" }, "peerDependencies": { "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x" }, "bin": { "typedoc": "bin/typedoc" } }, "sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw=="], + + "typedoc-plugin-markdown": ["typedoc-plugin-markdown@4.11.0", "", { "peerDependencies": { "typedoc": "0.28.x" } }, "sha512-2iunh2ALyfyh204OF7h2u0kuQ84xB3jFZtFyUr01nThJkLvR8oGGSSDlyt2gyO4kXhvUxDcVbO0y43+qX+wFbw=="], + + "typedoc-vitepress-theme": ["typedoc-vitepress-theme@1.1.2", "", { "peerDependencies": { "typedoc-plugin-markdown": ">=4.4.0" } }, "sha512-hQvCZRr5uKDqY1bRuY1+eNTNn6d4TE4OP5pnw65Y7WGgajkJW9X1/lVJK2UJpcwCmwkdjw1QIO49H9JQlxWhhw=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "uc.micro": ["uc.micro@2.1.0", "", {}, "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A=="], + "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + + "unist-util-is": ["unist-util-is@6.0.1", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g=="], + + "unist-util-position": ["unist-util-position@5.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA=="], + + "unist-util-stringify-position": ["unist-util-stringify-position@4.0.0", "", { "dependencies": { "@types/unist": "^3.0.0" } }, "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ=="], + + "unist-util-visit": ["unist-util-visit@5.1.0", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0", "unist-util-visit-parents": "^6.0.0" } }, "sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg=="], + + "unist-util-visit-parents": ["unist-util-visit-parents@6.0.2", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-is": "^6.0.0" } }, "sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ=="], + + "vfile": ["vfile@6.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "vfile-message": "^4.0.0" } }, "sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q=="], + + "vfile-message": ["vfile-message@4.0.3", "", { "dependencies": { "@types/unist": "^3.0.0", "unist-util-stringify-position": "^4.0.0" } }, "sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw=="], + + "vite": ["vite@5.4.21", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw=="], + + "vitepress": ["vitepress@1.6.4", "", { "dependencies": { "@docsearch/css": "3.8.2", "@docsearch/js": "3.8.2", "@iconify-json/simple-icons": "^1.2.21", "@shikijs/core": "^2.1.0", "@shikijs/transformers": "^2.1.0", "@shikijs/types": "^2.1.0", "@types/markdown-it": "^14.1.2", "@vitejs/plugin-vue": "^5.2.1", "@vue/devtools-api": "^7.7.0", "@vue/shared": "^3.5.13", "@vueuse/core": "^12.4.0", "@vueuse/integrations": "^12.4.0", "focus-trap": "^7.6.4", "mark.js": "8.11.1", "minisearch": "^7.1.1", "shiki": "^2.1.0", "vite": "^5.4.14", "vue": "^3.5.13" }, "peerDependencies": { "markdown-it-mathjax3": "^4", "postcss": "^8" }, "optionalPeers": ["markdown-it-mathjax3", "postcss"], "bin": { "vitepress": "bin/vitepress.js" } }, "sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg=="], + + "vue": ["vue@3.5.34", "", { "dependencies": { "@vue/compiler-dom": "3.5.34", "@vue/compiler-sfc": "3.5.34", "@vue/runtime-dom": "3.5.34", "@vue/server-renderer": "3.5.34", "@vue/shared": "3.5.34" }, "peerDependencies": { "typescript": "*" }, "optionalPeers": ["typescript"] }, "sha512-WdLBG9gm02OgJIG9axd5Hpx0TFLdzVgfG2evFFu8Rur5O/IoGc5cMjnjh3tPL6GnRGsYvUhBSKVPYVcxRKpMCA=="], + + "yaml": ["yaml@2.9.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA=="], + + "zwitch": ["zwitch@2.0.4", "", {}, "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A=="], + + "@gerrit0/mini-shiki/@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], + + "@shikijs/core/@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw=="], + + "@shikijs/engine-oniguruma/@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], + + "@shikijs/langs/@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], + + "@shikijs/themes/@shikijs/types": ["@shikijs/types@3.23.0", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ=="], + + "@vue/compiler-core/entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="], + + "shiki/@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0", "@shikijs/vscode-textmate": "^10.0.2" } }, "sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw=="], + + "shiki/@shikijs/langs": ["@shikijs/langs@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0" } }, "sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w=="], + + "shiki/@shikijs/themes": ["@shikijs/themes@2.5.0", "", { "dependencies": { "@shikijs/types": "2.5.0" } }, "sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw=="], } } diff --git a/package.json b/package.json index 210bb10..c95ac31 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "author": "Sun Hao ", "repository": { "type": "git", - "url": "https://github.com/catouse/zentao-api.git" + "url": "https://github.com/catouse/zentao-api" }, "keywords": [ "zentao", @@ -41,6 +41,12 @@ "build": "rm -rf dist && tsc -p tsconfig.json && bun run scripts/build-browser.ts", "smoke:node": "node scripts/smoke-node.mjs", "smoke:package": "bun run scripts/smoke-package.ts", + "docs:reference": "typedoc", + "docs:zentao-api": "bun run scripts/generate-zentao-api-docs.ts", + "docs:generate": "bun run docs:reference && bun run docs:zentao-api", + "docs:dev": "bun run docs:generate && vitepress dev docs", + "docs:build": "bun run docs:generate && vitepress build docs", + "docs:preview": "bun run docs:build && vitepress preview docs", "check": "bun run test:coverage && bun run typecheck && bun run typecheck:tests && bun run registry:check && bun run build && bun run smoke:node && bun run smoke:package", "prepublishOnly": "bun run check" }, @@ -51,9 +57,13 @@ "@types/bun": "^1.3.13", "@types/node": "^24.10.0", "@types/turndown": "^5.0.5", - "typescript": "^5.7.0" + "typedoc": "^0.28.19", + "typedoc-plugin-markdown": "^4.11.0", + "typedoc-vitepress-theme": "^1.1.2", + "typescript": "^5.7.0", + "vitepress": "^1.6.4" }, "engines": { "node": ">=18" } -} +} \ No newline at end of file diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 0000000..01b308a --- /dev/null +++ b/typedoc.json @@ -0,0 +1,27 @@ +{ + "entryPoints": ["./src/index.ts"], + "out": "./docs/reference", + "docsRoot": "./docs", + "plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"], + "tsconfig": "./tsconfig.json", + "readme": "none", + "excludePrivate": true, + "excludeProtected": true, + "excludeInternal": true, + "githubPages": false, + "hideGenerator": true, + "sidebar": { + "autoConfiguration": true, + "format": "vitepress", + "collapsed": true, + "pretty": true + }, + "categorizeByGroup": true, + "indexFormat": "table", + "parametersFormat": "table", + "interfacePropertiesFormat": "table", + "classPropertiesFormat": "table", + "typeAliasPropertiesFormat": "table", + "enumMembersFormat": "table", + "typeDeclarationFormat": "table" +} From f9dd80659c5df87efc01fb4032a48ce3e72182cb Mon Sep 17 00:00:00 2001 From: catouse Date: Mon, 11 May 2026 20:29:50 +0800 Subject: [PATCH 2/4] + docs: generate ZenTao API reference --- scripts/generate-zentao-api-docs.ts | 287 ++++++++++++++++++++++++++++ tests/docs-generator.test.ts | 59 ++++++ 2 files changed, 346 insertions(+) create mode 100644 scripts/generate-zentao-api-docs.ts create mode 100644 tests/docs-generator.test.ts diff --git a/scripts/generate-zentao-api-docs.ts b/scripts/generate-zentao-api-docs.ts new file mode 100644 index 0000000..f952c86 --- /dev/null +++ b/scripts/generate-zentao-api-docs.ts @@ -0,0 +1,287 @@ +import { mkdirSync, rmSync, writeFileSync } from 'fs'; +import { join, resolve } from 'path'; +import { fileURLToPath } from 'url'; +import { getModule, getModuleNames } from '../src/modules/registry.js'; +import type { ModuleAction, ModuleActionParam, ModuleDefinition } from '../src/types/index.js'; + +export interface RenderedZentaoApiDocs { + index: string; + pages: Array<{ + slug: string; + title: string; + content: string; + }>; + sidebar: Array<{ + text: string; + link?: string; + collapsed?: boolean; + items?: Array<{ text: string; link: string }>; + }>; +} + +const __dirname = fileURLToPath(new URL('.', import.meta.url)); +const ROOT = resolve(__dirname, '..'); +const OUTPUT_DIR = resolve(ROOT, 'docs/zentao-api'); + +function escapeTable(value: unknown): string { + return String(value ?? '') + .replace(/\r?\n/g, '
') + .replace(/\|/g, '\\|'); +} + +function slugify(value: string): string { + return value.toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '') || 'module'; +} + +function titleOf(module: ModuleDefinition): string { + return module.display ? `${module.display} (${module.name})` : String(module.name); +} + +function paramDescription(value: string | Omit): string { + return typeof value === 'string' ? value : value.description ?? ''; +} + +function typeName(param: ModuleActionParam): string { + return param.type ?? 'string'; +} + +function defaultValue(param: ModuleActionParam): string { + return param.defaultValue === undefined ? '' : `\`${String(param.defaultValue)}\``; +} + +function renderPathParams(action: ModuleAction): string { + if (!action.pathParams || Object.keys(action.pathParams).length === 0) { + return '无路径参数。'; + } + + const rows = Object.entries(action.pathParams) + .map(([name, value]) => `| \`${escapeTable(name)}\` | ${escapeTable(paramDescription(value))} |`) + .join('\n'); + + return [ + '| 参数 | 说明 |', + '| --- | --- |', + rows, + ].join('\n'); +} + +function renderQueryParams(action: ModuleAction): string { + if (!action.params || action.params.length === 0) { + return '无查询参数。'; + } + + const rows = action.params + .map((param) => { + const options = param.options?.map((option) => `\`${option.value}\` ${option.label}`).join('
') ?? ''; + return `| \`${escapeTable(param.name)}\` | ${escapeTable(typeName(param))} | ${param.required ? '是' : '否'} | ${defaultValue(param)} | ${escapeTable(param.description ?? '')}${options ? `
${escapeTable(options)}` : ''} |`; + }) + .join('\n'); + + return [ + '| 参数 | 类型 | 必填 | 默认值 | 说明 |', + '| --- | --- | --- | --- | --- |', + rows, + ].join('\n'); +} + +function schemaExample(schema: Record | undefined): unknown { + if (!schema) return {}; + if (schema.example !== undefined) return schema.example; + + const type = schema.type; + if (type === 'array') { + return [schemaExample(schema.items as Record | undefined)]; + } + if (type === 'integer' || type === 'number') return 1; + if (type === 'boolean') return true; + if (type === 'string') return ''; + + const properties = schema.properties as Record> | undefined; + if (!properties) return {}; + + const result: Record = {}; + for (const [key, propertySchema] of Object.entries(properties)) { + result[key] = schemaExample(propertySchema); + } + return result; +} + +function renderRequestBody(action: ModuleAction): string { + if (!action.requestBody) { + return '无请求体。'; + } + + const required = action.requestBody.required ? '是' : '否'; + const schema = JSON.stringify(action.requestBody.schema, null, 2); + const example = JSON.stringify(action.requestBody.example ?? schemaExample(action.requestBody.schema), null, 2); + + return [ + `请求体必填:${required}`, + '', + 'Schema:', + '', + '```json', + schema, + '```', + '', + '示例:', + '', + '```json', + example, + '```', + ].join('\n'); +} + +function renderResponse(action: ModuleAction): string { + const lines = [ + `- 返回形态:\`${action.resultType}\``, + ]; + if (action.resultGetter) { + lines.push(`- 结果字段:\`${typeof action.resultGetter === 'string' ? action.resultGetter : 'custom'}\``); + } + if (action.pagerGetter) { + lines.push(`- 分页字段:\`${typeof action.pagerGetter === 'string' ? action.pagerGetter : 'custom'}\``); + } + return lines.join('\n'); +} + +function paramsExample(action: ModuleAction): Record { + const params: Record = {}; + for (const [name, value] of Object.entries(action.pathParams ?? {})) { + const detail = typeof value === 'string' ? undefined : value; + params[name] = detail?.defaultValue ?? (name.toLowerCase().endsWith('id') ? 1 : ''); + } + for (const param of action.params ?? []) { + params[param.name] = param.defaultValue ?? param.options?.[0]?.value ?? (param.type === 'number' ? 1 : ''); + } + if (action.requestBody?.schema) { + Object.assign(params, schemaExample(action.requestBody.schema)); + } + return params; +} + +function renderSdkExample(module: ModuleDefinition, action: ModuleAction): string { + const params = paramsExample(action); + const hasParams = Object.keys(params).length > 0; + const call = hasParams + ? `const result = await request("${module.name}/${action.name}", ${JSON.stringify(params, null, 2)});` + : `const result = await request("${module.name}/${action.name}");`; + + return [ + '```ts', + "import { request } from 'zentao-api';", + '', + call, + '```', + ].join('\n'); +} + +function renderAction(module: ModuleDefinition, action: ModuleAction): string { + const title = action.display || String(action.name); + const description = action.description ? `\n${action.description}\n` : ''; + + return [ + `## ${title}`, + description, + `- SDK 调用:\`request("${module.name}/${action.name}", params)\``, + `- HTTP:\`${String(action.method).toUpperCase()} ${action.path}\``, + `- 动作类型:\`${action.type}\``, + '', + '### 路径参数', + '', + renderPathParams(action), + '', + '### 查询参数', + '', + renderQueryParams(action), + '', + '### 请求体', + '', + renderRequestBody(action), + '', + '### 返回值', + '', + renderResponse(action), + '', + '### SDK 示例', + '', + renderSdkExample(module, action), + ].join('\n'); +} + +function renderModulePage(module: ModuleDefinition): string { + const rows = module.actions + .map((action) => `| \`${action.name}\` | ${escapeTable(action.display ?? '')} | \`${String(action.method).toUpperCase()}\` | \`${escapeTable(action.path)}\` |`) + .join('\n'); + + return [ + `# ${titleOf(module)}`, + '', + module.description ?? '', + '', + '## 动作概览', + '', + '| SDK 动作 | 说明 | 方法 | 路径 |', + '| --- | --- | --- | --- |', + rows, + '', + ...module.actions.map((action) => renderAction(module, action)), + '', + ].join('\n'); +} + +export function getRegistryModules(): ModuleDefinition[] { + return getModuleNames().map((name) => getModule(name)); +} + +export function renderZentaoApiDocs(modules: ModuleDefinition[]): RenderedZentaoApiDocs { + const pages = modules.map((module) => ({ + slug: slugify(String(module.name)), + title: titleOf(module), + content: renderModulePage(module), + })); + + const indexRows = modules + .map((module, index) => `| [${escapeTable(module.display ?? module.name)}](./${pages[index].slug}.md) | \`${escapeTable(module.name)}\` | ${module.actions.length} | ${escapeTable(module.description ?? '')} |`) + .join('\n'); + + const index = [ + '# ZenTao API', + '', + '本节从 SDK 当前运行时模块注册表动态生成,内容对应 `request("module/action")` 可调用的模块动作。', + '', + '| 模块 | SDK 名称 | 动作数 | 说明 |', + '| --- | --- | --- | --- |', + indexRows, + '', + ].join('\n'); + + const sidebar = [ + { + text: 'ZenTao API', + items: [ + { text: '概览', link: '/zentao-api/' }, + ...pages.map((page) => ({ text: page.title, link: `/zentao-api/${page.slug}` })), + ], + }, + ]; + + return { index, pages, sidebar }; +} + +export function writeZentaoApiDocs(outputDir = OUTPUT_DIR): RenderedZentaoApiDocs { + const rendered = renderZentaoApiDocs(getRegistryModules()); + rmSync(outputDir, { recursive: true, force: true }); + mkdirSync(outputDir, { recursive: true }); + writeFileSync(join(outputDir, 'index.md'), rendered.index); + writeFileSync(join(outputDir, 'sidebar.json'), `${JSON.stringify(rendered.sidebar, null, 2)}\n`); + for (const page of rendered.pages) { + writeFileSync(join(outputDir, `${page.slug}.md`), page.content); + } + return rendered; +} + +if (import.meta.main) { + const rendered = writeZentaoApiDocs(); + console.log(`Generated ${rendered.pages.length} ZenTao API module pages.`); +} diff --git a/tests/docs-generator.test.ts b/tests/docs-generator.test.ts new file mode 100644 index 0000000..962d31d --- /dev/null +++ b/tests/docs-generator.test.ts @@ -0,0 +1,59 @@ +import { describe, expect, test } from 'bun:test'; +import type { ModuleDefinition } from '../src/types'; +import { renderZentaoApiDocs } from '../scripts/generate-zentao-api-docs'; + +describe('ZenTao API docs generator', () => { + test('renders module index and action details from registry module definitions', () => { + const modules: ModuleDefinition[] = [ + { + name: 'bug', + display: 'Bug', + description: 'Bug 管理', + actions: [ + { + name: 'resolve', + display: '解决Bug', + type: 'action', + method: 'put', + path: '/bugs/{bugID}/resolve', + pathParams: { bugID: 'Bug ID' }, + params: [ + { + name: 'comment', + description: '备注', + required: false, + type: 'string', + }, + ], + requestBody: { + required: true, + type: 'object', + schema: { + type: 'object', + properties: { + resolution: { + type: 'string', + description: '解决方案', + }, + }, + required: ['resolution'], + }, + }, + resultType: 'text', + }, + ], + }, + ]; + + const docs = renderZentaoApiDocs(modules); + + expect(docs.index).toContain('| [Bug](./bug.md) | `bug` | 1 | Bug 管理 |'); + expect(docs.pages).toHaveLength(1); + expect(docs.pages[0].slug).toBe('bug'); + expect(docs.pages[0].content).toContain('## 解决Bug'); + expect(docs.pages[0].content).toContain('`request("bug/resolve", params)`'); + expect(docs.pages[0].content).toContain('| `bugID` | Bug ID |'); + expect(docs.pages[0].content).toContain('| `comment` | string | 否 | | 备注 |'); + expect(docs.pages[0].content).toContain('"resolution": ""'); + }); +}); From cdca64180428da2a54e24192c5595d3349dba77e Mon Sep 17 00:00:00 2001 From: catouse Date: Mon, 11 May 2026 20:29:58 +0800 Subject: [PATCH 3/4] + docs: add VitePress documentation site --- docs/.vitepress/config.ts | 89 +++ docs/guide/environments.md | 81 +++ docs/guide/examples.md | 88 +++ docs/guide/index.md | 75 ++ docs/guide/installation.md | 80 +++ docs/guide/profiles-and-errors.md | 83 +++ docs/index.md | 26 + docs/reference/classes/ZentaoClient.md | 263 +++++++ docs/reference/classes/ZentaoError.md | 143 ++++ docs/reference/functions/addProfile.md | 19 + .../functions/defineModuleActions.md | 20 + docs/reference/functions/defineModules.md | 20 + docs/reference/functions/deleteProfile.md | 19 + docs/reference/functions/getAllProfiles.md | 13 + docs/reference/functions/getGlobalOptions.md | 13 + docs/reference/functions/getModule.md | 19 + docs/reference/functions/getModuleAction.md | 20 + docs/reference/functions/getProfile.md | 19 + docs/reference/functions/getProfileKey.md | 19 + docs/reference/functions/request.md | 23 + docs/reference/functions/setGlobalOptions.md | 19 + docs/reference/functions/switchProfile.md | 19 + docs/reference/index.md | 78 ++ docs/reference/interfaces/ApiListResponse.md | 25 + docs/reference/interfaces/ApiResponse.md | 25 + .../interfaces/ClientRequestOptions.md | 17 + .../interfaces/DefineModulesOptions.md | 11 + docs/reference/interfaces/GlobalOptions.md | 18 + docs/reference/interfaces/LoginResponse.md | 27 + docs/reference/interfaces/ModuleAction.md | 25 + .../interfaces/ModuleActionPagerGetterMap.md | 15 + .../reference/interfaces/ModuleActionParam.md | 18 + .../interfaces/ModuleActionRequestBody.md | 16 + .../interfaces/ModuleActionResponse.md | 15 + docs/reference/interfaces/ModuleDefinition.md | 16 + docs/reference/interfaces/Pager.md | 16 + docs/reference/interfaces/RequestOptions.md | 17 + .../interfaces/ResolvedModuleCommand.md | 19 + docs/reference/interfaces/ResponseData.md | 19 + docs/reference/interfaces/ServerConfig.md | 21 + .../interfaces/ZentaoClientOptions.md | 16 + docs/reference/interfaces/ZentaoProfile.md | 30 + .../interfaces/ZentaoProfileConfig.md | 27 + .../interfaces/ZentaoProfileRecord.md | 31 + .../interfaces/ZentaoProfilesStore.md | 14 + docs/reference/type-aliases/ErrorCode.md | 7 + docs/reference/type-aliases/HttpMethod.md | 9 + docs/reference/type-aliases/ListPagerInfo.md | 9 + .../type-aliases/ModuleActionMethod.md | 9 + .../type-aliases/ModuleActionName.md | 9 + .../type-aliases/ModuleActionParamOption.md | 16 + .../type-aliases/ModuleActionResultRender.md | 21 + .../ModuleActionResultRenderType.md | 9 + .../type-aliases/ModuleActionResultType.md | 9 + .../type-aliases/ModuleActionType.md | 9 + docs/reference/type-aliases/ModuleName.md | 9 + docs/reference/typedoc-sidebar.json | 240 +++++++ docs/reference/variables/BUILD.md | 7 + docs/reference/variables/ERRORS.md | 30 + docs/reference/variables/VERSION.md | 7 + .../variables/ZENTAO_PROFILES_STORAGE_KEY.md | 7 + docs/zentao-api/bug.md | 585 +++++++++++++++ docs/zentao-api/build.md | 310 ++++++++ docs/zentao-api/epic.md | 582 +++++++++++++++ docs/zentao-api/execution.md | 418 +++++++++++ docs/zentao-api/feedback.md | 449 ++++++++++++ docs/zentao-api/file.md | 100 +++ docs/zentao-api/index.md | 25 + docs/zentao-api/product.md | 377 ++++++++++ docs/zentao-api/productplan.md | 314 ++++++++ docs/zentao-api/program.md | 289 ++++++++ docs/zentao-api/project.md | 312 ++++++++ docs/zentao-api/release.md | 288 ++++++++ docs/zentao-api/requirement.md | 565 +++++++++++++++ docs/zentao-api/sidebar.json | 87 +++ docs/zentao-api/story.md | 595 ++++++++++++++++ docs/zentao-api/system.md | 219 ++++++ docs/zentao-api/task.md | 669 ++++++++++++++++++ docs/zentao-api/testcase.md | 408 +++++++++++ docs/zentao-api/testtask.md | 326 +++++++++ docs/zentao-api/ticket.md | 472 ++++++++++++ docs/zentao-api/user.md | 311 ++++++++ 82 files changed, 9794 insertions(+) create mode 100644 docs/.vitepress/config.ts create mode 100644 docs/guide/environments.md create mode 100644 docs/guide/examples.md create mode 100644 docs/guide/index.md create mode 100644 docs/guide/installation.md create mode 100644 docs/guide/profiles-and-errors.md create mode 100644 docs/index.md create mode 100644 docs/reference/classes/ZentaoClient.md create mode 100644 docs/reference/classes/ZentaoError.md create mode 100644 docs/reference/functions/addProfile.md create mode 100644 docs/reference/functions/defineModuleActions.md create mode 100644 docs/reference/functions/defineModules.md create mode 100644 docs/reference/functions/deleteProfile.md create mode 100644 docs/reference/functions/getAllProfiles.md create mode 100644 docs/reference/functions/getGlobalOptions.md create mode 100644 docs/reference/functions/getModule.md create mode 100644 docs/reference/functions/getModuleAction.md create mode 100644 docs/reference/functions/getProfile.md create mode 100644 docs/reference/functions/getProfileKey.md create mode 100644 docs/reference/functions/request.md create mode 100644 docs/reference/functions/setGlobalOptions.md create mode 100644 docs/reference/functions/switchProfile.md create mode 100644 docs/reference/index.md create mode 100644 docs/reference/interfaces/ApiListResponse.md create mode 100644 docs/reference/interfaces/ApiResponse.md create mode 100644 docs/reference/interfaces/ClientRequestOptions.md create mode 100644 docs/reference/interfaces/DefineModulesOptions.md create mode 100644 docs/reference/interfaces/GlobalOptions.md create mode 100644 docs/reference/interfaces/LoginResponse.md create mode 100644 docs/reference/interfaces/ModuleAction.md create mode 100644 docs/reference/interfaces/ModuleActionPagerGetterMap.md create mode 100644 docs/reference/interfaces/ModuleActionParam.md create mode 100644 docs/reference/interfaces/ModuleActionRequestBody.md create mode 100644 docs/reference/interfaces/ModuleActionResponse.md create mode 100644 docs/reference/interfaces/ModuleDefinition.md create mode 100644 docs/reference/interfaces/Pager.md create mode 100644 docs/reference/interfaces/RequestOptions.md create mode 100644 docs/reference/interfaces/ResolvedModuleCommand.md create mode 100644 docs/reference/interfaces/ResponseData.md create mode 100644 docs/reference/interfaces/ServerConfig.md create mode 100644 docs/reference/interfaces/ZentaoClientOptions.md create mode 100644 docs/reference/interfaces/ZentaoProfile.md create mode 100644 docs/reference/interfaces/ZentaoProfileConfig.md create mode 100644 docs/reference/interfaces/ZentaoProfileRecord.md create mode 100644 docs/reference/interfaces/ZentaoProfilesStore.md create mode 100644 docs/reference/type-aliases/ErrorCode.md create mode 100644 docs/reference/type-aliases/HttpMethod.md create mode 100644 docs/reference/type-aliases/ListPagerInfo.md create mode 100644 docs/reference/type-aliases/ModuleActionMethod.md create mode 100644 docs/reference/type-aliases/ModuleActionName.md create mode 100644 docs/reference/type-aliases/ModuleActionParamOption.md create mode 100644 docs/reference/type-aliases/ModuleActionResultRender.md create mode 100644 docs/reference/type-aliases/ModuleActionResultRenderType.md create mode 100644 docs/reference/type-aliases/ModuleActionResultType.md create mode 100644 docs/reference/type-aliases/ModuleActionType.md create mode 100644 docs/reference/type-aliases/ModuleName.md create mode 100644 docs/reference/typedoc-sidebar.json create mode 100644 docs/reference/variables/BUILD.md create mode 100644 docs/reference/variables/ERRORS.md create mode 100644 docs/reference/variables/VERSION.md create mode 100644 docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md create mode 100644 docs/zentao-api/bug.md create mode 100644 docs/zentao-api/build.md create mode 100644 docs/zentao-api/epic.md create mode 100644 docs/zentao-api/execution.md create mode 100644 docs/zentao-api/feedback.md create mode 100644 docs/zentao-api/file.md create mode 100644 docs/zentao-api/index.md create mode 100644 docs/zentao-api/product.md create mode 100644 docs/zentao-api/productplan.md create mode 100644 docs/zentao-api/program.md create mode 100644 docs/zentao-api/project.md create mode 100644 docs/zentao-api/release.md create mode 100644 docs/zentao-api/requirement.md create mode 100644 docs/zentao-api/sidebar.json create mode 100644 docs/zentao-api/story.md create mode 100644 docs/zentao-api/system.md create mode 100644 docs/zentao-api/task.md create mode 100644 docs/zentao-api/testcase.md create mode 100644 docs/zentao-api/testtask.md create mode 100644 docs/zentao-api/ticket.md create mode 100644 docs/zentao-api/user.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts new file mode 100644 index 0000000..45bcf20 --- /dev/null +++ b/docs/.vitepress/config.ts @@ -0,0 +1,89 @@ +import { existsSync, readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; +import { resolve } from 'node:path'; +import { defineConfig } from 'vitepress'; + +const docsRoot = fileURLToPath(new URL('../', import.meta.url)); + +function readSidebar(relativePath: string, fallback: unknown[]) { + const path = resolve(docsRoot, relativePath); + if (!existsSync(path)) return fallback; + return JSON.parse(readFileSync(path, 'utf8')); +} + +const referenceSidebar = readSidebar('reference/typedoc-sidebar.json', [ + { text: 'Reference', items: [{ text: '概览', link: '/reference/' }] }, +]); + +const zentaoApiSidebar = readSidebar('zentao-api/sidebar.json', [ + { text: 'ZenTao API', items: [{ text: '概览', link: '/zentao-api/' }] }, +]); + +export default defineConfig({ + lang: 'zh-CN', + title: 'zentao-api', + description: 'Browser and Node.js SDK for ZenTao API v2', + base: '/', + lastUpdated: true, + cleanUrls: true, + markdown: { + lineNumbers: true, + theme: { + light: 'github-light', + dark: 'github-dark', + }, + }, + themeConfig: { + siteTitle: 'zentao-api', + nav: [ + { text: 'Guide', link: '/guide/', activeMatch: '/guide/' }, + { text: 'Reference', link: '/reference/', activeMatch: '/reference/' }, + { text: 'ZenTao API', link: '/zentao-api/', activeMatch: '/zentao-api/' }, + ], + sidebar: { + '/guide/': [ + { + text: 'Guide', + items: [ + { text: '快速开始', link: '/guide/' }, + { text: '安装与配置', link: '/guide/installation' }, + { text: '运行环境', link: '/guide/environments' }, + { text: '常见 API 示例', link: '/guide/examples' }, + { text: 'Profile 与错误处理', link: '/guide/profiles-and-errors' }, + ], + }, + ], + '/reference/': referenceSidebar, + '/zentao-api/': zentaoApiSidebar, + }, + search: { + provider: 'local', + }, + outline: { + level: [2, 3], + label: '本页目录', + }, + editLink: { + pattern: 'https://github.com/catouse/zentao-api/edit/main/docs/:path', + text: '在 GitHub 上编辑此页', + }, + socialLinks: [ + { icon: 'github', link: 'https://github.com/catouse/zentao-api' }, + ], + footer: { + message: 'Released under the MIT License.', + copyright: 'Copyright © 2026-present zentao-api contributors', + }, + docFooter: { + prev: '上一页', + next: '下一页', + }, + lastUpdated: { + text: '最后更新', + formatOptions: { + dateStyle: 'short', + timeStyle: 'short', + }, + }, + }, +}); diff --git a/docs/guide/environments.md b/docs/guide/environments.md new file mode 100644 index 0000000..53dad5a --- /dev/null +++ b/docs/guide/environments.md @@ -0,0 +1,81 @@ +# 运行环境 + +`zentao-api` 支持服务端运行时、浏览器打包工具和 script 标签引入。不同环境的主要差异在于跨域、安全和本地 profile 存储。 + +## Node.js 18+ + +Node.js 18+ 已内置 `fetch`,可以直接使用 SDK。 + +```ts +import { ZentaoClient } from 'zentao-api'; + +const client = new ZentaoClient({ + baseUrl: 'https://zentao.example.com', + token: process.env.ZENTAO_TOKEN, +}); + +const projects = await client.get('/projects'); +``` + +在 Node.js 中,`insecure: true` 可用于连接使用自签名证书的测试环境。 + +```ts +const client = new ZentaoClient({ + baseUrl: 'https://zentao.example.com', + token: process.env.ZENTAO_TOKEN, + insecure: true, +}); +``` + +## Bun + +Bun 项目可以使用同样的 ESM 导入方式。 + +```ts +import { ZentaoClient, request } from 'zentao-api'; + +ZentaoClient.init({ + baseUrl: Bun.env.ZENTAO_URL!, + token: Bun.env.ZENTAO_TOKEN!, +}); + +const products = await request('product/list'); +``` + +## 浏览器打包工具 + +在 Vite、Webpack、Rspack 等浏览器打包工具中,从包根导入即可。 + +```ts +import { ZentaoClient } from 'zentao-api'; + +const client = new ZentaoClient({ + baseUrl: 'https://zentao.example.com', + token: 'browser-token', +}); +``` + +浏览器直接请求禅道服务端时,服务端必须允许 CORS。浏览器代码也会暴露 token;如果 token 不能暴露给前端,请通过后端代理转发请求。 + +## CDN/script 标签 + +浏览器构建包会把 API 暴露到 `window.ZentaoAPI`。 + +```html + + +``` + +## Profile 存储位置 + +启用 `persistProfiles` 后,登录信息会持久化到当前运行时可用的本地存储。 + +| 环境 | 存储位置 | +| --- | --- | +| Node.js / Bun | `~/.config/zentao/zentao.json` | +| 浏览器 | `localStorage` | + +浏览器隐私模式、受限 iframe 或无持久化文件系统的运行时可能无法保存 profile。 diff --git a/docs/guide/examples.md b/docs/guide/examples.md new file mode 100644 index 0000000..012ff26 --- /dev/null +++ b/docs/guide/examples.md @@ -0,0 +1,88 @@ +# 常见 API 示例 + +本页示例使用高阶 `request("module/action")`。可用模块和动作来自 SDK 模块注册表,完整列表见 [ZenTao API](/zentao-api/)。 + +## 获取产品列表 + +```ts +import { ZentaoClient, request } from 'zentao-api'; + +ZentaoClient.init({ + baseUrl: 'https://zentao.example.com', + token: 'your-token', +}); + +const result = await request('product/list', { + recPerPage: 20, + pageID: 1, +}); + +console.log(result.data); +console.log(result.pager); +``` + +## 获取 Bug 列表 + +Bug 列表支持按产品、项目或执行范围查询。传入对应范围 ID 后,SDK 会根据模块动作定义组装路径。 + +```ts +const bugs = await request('bug/list', { + productID: 1, + status: 'active', + recPerPage: 20, +}); +``` + +## 解决 Bug + +```ts +const result = await request('bug/resolve', { + bugID: 1001, + resolution: 'fixed', + resolvedBuild: 12, +}); + +console.log(result.status); +``` + +## 创建任务 + +```ts +const task = await request('task/create', { + execution: 1, + name: '实现文档站', + type: 'devel', + assignedTo: 'dev1', +}); +``` + +## 直接调用 REST 路径 + +当你需要调用尚未注册到模块系统的接口时,可以使用底层 `ZentaoClient.request()`。 + +```ts +import { ZentaoClient } from 'zentao-api'; + +const client = new ZentaoClient({ + baseUrl: 'https://zentao.example.com', + token: 'your-token', +}); + +const raw = await client.request('/products/1', { + method: 'GET', +}); +``` + +## 限制返回列表数量 + +`limit` 只影响 SDK 归一化后的 `data` 数组,不改变服务端返回页大小。 + +```ts +const bugs = await request( + 'bug/list', + { productID: 1, recPerPage: 100 }, + { limit: '10' }, +); + +console.log(bugs.data); +``` diff --git a/docs/guide/index.md b/docs/guide/index.md new file mode 100644 index 0000000..2f2df0b --- /dev/null +++ b/docs/guide/index.md @@ -0,0 +1,75 @@ +# 快速开始 + +`zentao-api` 是一个面向禅道 API v2 的 JavaScript/TypeScript SDK,可在 Node.js 18+、Bun、浏览器打包工具和 CDN/script 标签场景中使用。 + +SDK 提供两层调用方式: + +- `ZentaoClient`:直接调用禅道 REST 路径,例如 `client.get('/products')`。 +- `request("module/action")`:基于内置模块注册表调用常见禅道 API,例如 `request('product/list')`。 + +## 安装 + +::: code-group + +```sh [npm] +npm install zentao-api +``` + +```sh [bun] +bun add zentao-api +``` + +```sh [pnpm] +pnpm add zentao-api +``` + +::: + +## 创建客户端 + +```ts +import { ZentaoClient } from 'zentao-api'; + +const client = new ZentaoClient({ + baseUrl: 'https://zentao.example.com', + token: 'your-token', +}); + +const products = await client.get('/products'); +``` + +`baseUrl` 是禅道站点根地址,SDK 会自动拼接 `/api.php/v2`。 + +## 使用账号密码登录 + +```ts +import { ZentaoClient } from 'zentao-api'; + +const client = new ZentaoClient('https://zentao.example.com'); +const token = await client.login('admin', 'password'); +``` + +登录成功后,返回的 token 会写入当前客户端实例,后续请求会自动携带 `Token` 请求头。 + +## 使用模块请求 + +```ts +import { ZentaoClient, request, setGlobalOptions } from 'zentao-api'; + +ZentaoClient.init({ + baseUrl: 'https://zentao.example.com', + token: 'your-token', +}); + +setGlobalOptions({ recPerPage: '50' }); + +const result = await request('product/list', {}); +``` + +模块请求的名称固定为 `"module/action"`。可用模块和动作见 [ZenTao API](/zentao-api/)。 + +## 下一步 + +- 阅读 [安装与配置](./installation.md) 了解客户端选项。 +- 阅读 [运行环境](./environments.md) 了解 Node.js、Bun 和浏览器差异。 +- 阅读 [常见 API 示例](./examples.md) 直接套用常见调用方式。 diff --git a/docs/guide/installation.md b/docs/guide/installation.md new file mode 100644 index 0000000..ed10451 --- /dev/null +++ b/docs/guide/installation.md @@ -0,0 +1,80 @@ +# 安装与配置 + +## 安装包 + +```sh +npm install zentao-api +``` + +如果项目使用 Bun: + +```sh +bun add zentao-api +``` + +## 客户端配置 + +```ts +import { ZentaoClient } from 'zentao-api'; + +const client = new ZentaoClient({ + baseUrl: 'https://zentao.example.com', + token: 'your-token', + timeout: 10_000, + insecure: false, +}); +``` + +| 选项 | 类型 | 说明 | +| --- | --- | --- | +| `baseUrl` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | +| `token` | `string` | 禅道 API Token;也可通过 `login()` 获取。 | +| `timeout` | `number` | 默认请求超时时间,单位毫秒。 | +| `insecure` | `boolean` | 跳过 TLS 证书验证,仅 Node.js 运行时支持。 | + +## 全局选项 + +`ZentaoClient.init()` 会创建客户端并写入全局选项,供高阶 `request()` 使用。 + +```ts +import { ZentaoClient, request, setGlobalOptions } from 'zentao-api'; + +ZentaoClient.init({ + baseUrl: 'https://zentao.example.com', + token: 'your-token', +}); + +setGlobalOptions({ + recPerPage: '50', + limit: '20', + timeout: 30_000, +}); + +const bugs = await request('bug/list', { productID: 1 }); +``` + +单次调用传入的 options 优先级高于全局选项。 + +```ts +const bugs = await request( + 'bug/list', + { productID: 1 }, + { recPerPage: '10', limit: '5' }, +); +``` + +## TypeScript + +SDK 的公开类型可从包根直接导入: + +```ts +import type { + ModuleAction, + ModuleDefinition, + RequestOptions, + ResponseData, + ZentaoClientOptions, +} from 'zentao-api'; +``` + +完整类型列表见 [Reference](/reference/)。 diff --git a/docs/guide/profiles-and-errors.md b/docs/guide/profiles-and-errors.md new file mode 100644 index 0000000..07d9856 --- /dev/null +++ b/docs/guide/profiles-and-errors.md @@ -0,0 +1,83 @@ +# Profile 与错误处理 + +## 持久化登录信息 + +启用 `persistProfiles` 后,`login()` 成功时会保存站点、账号、token 和客户端配置。 + +```ts +import { ZentaoClient, setGlobalOptions } from 'zentao-api'; + +setGlobalOptions({ persistProfiles: true }); + +const client = new ZentaoClient('https://zentao.example.com'); +await client.login('admin', 'password'); +``` + +后续可以从当前 profile 恢复客户端: + +```ts +const client = await ZentaoClient.fromProfile(); +``` + +也可以指定 profile key: + +```ts +const client = await ZentaoClient.fromProfile('admin@https://zentao.example.com'); +``` + +## 管理 profile + +```ts +import { + addProfile, + deleteProfile, + getAllProfiles, + getProfile, + switchProfile, +} from 'zentao-api'; + +const profiles = await getAllProfiles(); +const active = await switchProfile(profiles[0].key); +const profile = await getProfile(active.key); + +await addProfile({ + server: 'https://zentao.example.com', + account: 'admin', + token: 'your-token', +}); + +await deleteProfile('admin@https://zentao.example.com'); +``` + +## 错误处理 + +SDK 会把 HTTP、网络、超时、环境限制和模块解析错误包装为 `ZentaoError`。 + +```ts +import { ZentaoError } from 'zentao-api'; + +try { + await client.get('/products'); +} catch (error) { + if (error instanceof ZentaoError) { + console.error(error.code); + console.error(error.message); + console.error(error.details); + } +} +``` + +禅道服务端返回 `{ status: "fail" }` 时,SDK 不会抛出异常,会按响应内容返回。只有传输层错误、超时、无效模块或缺少必填参数等 SDK 可预期错误会抛出 `ZentaoError`。 + +## 常见错误码 + +| 错误码 | 说明 | +| --- | --- | +| `E_NO_GLOBAL_CLIENT` | 调用 `request()` 时没有全局客户端。 | +| `E_HTTP_ERROR` | HTTP 响应状态码不是 2xx。 | +| `E_NETWORK_ERROR` | 网络请求失败。 | +| `E_TIMEOUT` | 请求超时。 | +| `E_INSECURE_BROWSER` | 浏览器运行时使用了 `insecure`。 | +| `E_INVALID_MODULE` | 模块不存在。 | +| `E_INVALID_ACTION` | 模块动作不存在。 | +| `E_MISSING_PARAM` | 缺少必填路径参数或请求体字段。 | diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..65b372b --- /dev/null +++ b/docs/index.md @@ -0,0 +1,26 @@ +--- +layout: home + +hero: + name: zentao-api + text: ZenTao API v2 SDK + tagline: 面向 Node.js、Bun、浏览器打包工具和 CDN 场景的轻量 TypeScript SDK。 + actions: + - theme: brand + text: 快速开始 + link: /guide/ + - theme: alt + text: 查看 API + link: /zentao-api/ + +features: + - title: Guide + details: 了解安装、初始化、登录、全局客户端、模块请求和常见调用模式。 + link: /guide/ + - title: Reference + details: 查看包根公开导出的类型、常量、函数、类和类方法。 + link: /reference/ + - title: ZenTao API + details: 从 SDK 当前模块注册表生成,按模块列出可调用的禅道 API 动作。 + link: /zentao-api/ +--- diff --git a/docs/reference/classes/ZentaoClient.md b/docs/reference/classes/ZentaoClient.md new file mode 100644 index 0000000..f578cf4 --- /dev/null +++ b/docs/reference/classes/ZentaoClient.md @@ -0,0 +1,263 @@ +[zentao-api](../index.md) / ZentaoClient + +# Class: ZentaoClient + +Defined in: [src/client/index.ts:43](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L43) + +禅道 API 客户端,负责 Token 注入、请求超时、TLS 选项和响应解析。 + +## Constructors + +### Constructor + +> **new ZentaoClient**(`options`): `ZentaoClient` + +Defined in: [src/client/index.ts:53](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L53) + +使用完整配置创建客户端。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options` | [`ZentaoClientOptions`](../interfaces/ZentaoClientOptions.md) | + +#### Returns + +`ZentaoClient` + +### Constructor + +> **new ZentaoClient**(`baseUrl`): `ZentaoClient` + +Defined in: [src/client/index.ts:55](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L55) + +使用站点根地址创建客户端。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `baseUrl` | `string` | + +#### Returns + +`ZentaoClient` + +## Properties + +| Property | Modifier | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| `baseUrl` | `readonly` | `string` | 禅道 API v2 根地址。 | [src/client/index.ts:47](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L47) | +| `siteUrl` | `readonly` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [src/client/index.ts:45](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L45) | + +## Methods + +### delete() + +> **delete**\<`T`\>(`path`): `Promise`\<`T`\> + +Defined in: [src/client/index.ts:139](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L139) + +发起 DELETE 请求。 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | + +#### Returns + +`Promise`\<`T`\> + +*** + +### get() + +> **get**\<`T`\>(`path`): `Promise`\<`T`\> + +Defined in: [src/client/index.ts:124](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L124) + +发起 GET 请求并按调用方指定类型返回。 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | + +#### Returns + +`Promise`\<`T`\> + +*** + +### login() + +> **login**(`account`, `password`): `Promise`\<`string`\> + +Defined in: [src/client/index.ts:144](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L144) + +使用账号密码登录,成功后把返回 Token 写入当前客户端实例。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `account` | `string` | +| `password` | `string` | + +#### Returns + +`Promise`\<`string`\> + +*** + +### post() + +> **post**\<`T`\>(`path`, `body`): `Promise`\<`T`\> + +Defined in: [src/client/index.ts:129](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L129) + +发起 POST 请求并发送 JSON body。 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `body` | `any` | + +#### Returns + +`Promise`\<`T`\> + +*** + +### put() + +> **put**\<`T`\>(`path`, `body`): `Promise`\<`T`\> + +Defined in: [src/client/index.ts:134](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L134) + +发起 PUT 请求并发送 JSON body。 + +#### Type Parameters + +| Type Parameter | +| ------ | +| `T` | + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `body` | `any` | + +#### Returns + +`Promise`\<`T`\> + +*** + +### request() + +> **request**(`path`, `options?`): `Promise`\<`unknown`\> + +Defined in: [src/client/index.ts:71](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L71) + +发起一次原始 API 请求。 + +默认使用 GET;当服务端返回 `{ status: "fail" }` 时仍按原始内容返回, +只有 HTTP/网络/超时等传输层错误会抛出 [ZentaoError](ZentaoError.md)。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `path` | `string` | +| `options` | [`ClientRequestOptions`](../interfaces/ClientRequestOptions.md) | + +#### Returns + +`Promise`\<`unknown`\> + +*** + +### create() + +> `static` **create**(`options`): `ZentaoClient` + +Defined in: [src/client/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L171) + +创建客户端实例,语义等同于 `new ZentaoClient(options)`。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options` | [`ZentaoClientOptions`](../interfaces/ZentaoClientOptions.md) | + +#### Returns + +`ZentaoClient` + +*** + +### fromProfile() + +> `static` **fromProfile**(`profileKey?`): `Promise`\<`ZentaoClient`\> + +Defined in: [src/client/index.ts:183](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L183) + +根据本地持久化 profile 创建客户端;不传 key 时使用当前 profile。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `profileKey?` | `string` | + +#### Returns + +`Promise`\<`ZentaoClient`\> + +*** + +### init() + +> `static` **init**(`options`): `ZentaoClient` + +Defined in: [src/client/index.ts:176](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L176) + +创建客户端并写入全局选项,供高阶 `request()` 默认使用。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `options` | [`ZentaoClientOptions`](../interfaces/ZentaoClientOptions.md) | + +#### Returns + +`ZentaoClient` diff --git a/docs/reference/classes/ZentaoError.md b/docs/reference/classes/ZentaoError.md new file mode 100644 index 0000000..c12474f --- /dev/null +++ b/docs/reference/classes/ZentaoError.md @@ -0,0 +1,143 @@ +[zentao-api](../index.md) / ZentaoError + +# Class: ZentaoError + +Defined in: [src/misc/errors.ts:25](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L25) + +SDK 统一错误类型,所有可预期错误都会携带稳定错误码。 + +## Extends + +- `Error` + +## Constructors + +### Constructor + +> **new ZentaoError**(`code`, `replacements?`, `details?`): `ZentaoError` + +Defined in: [src/misc/errors.ts:32](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L32) + +根据错误码和占位符替换值创建错误。 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `code` | `"E_INVALID_BASE_URL"` \| `"E_NO_GLOBAL_CLIENT"` \| `"E_HTTP_ERROR"` \| `"E_NETWORK_ERROR"` \| `"E_TIMEOUT"` \| `"E_INSECURE_BROWSER"` \| `"E_LOGIN_FAILED"` \| `"E_INVALID_PROFILE"` \| `"E_NO_PROFILE"` \| `"E_PROFILE_NOT_FOUND"` \| `"E_PROFILE_STORAGE_INVALID"` \| `"E_PROFILE_STORAGE_UNAVAILABLE"` \| `"E_INVALID_MODULE"` \| `"E_INVALID_ACTION"` \| `"E_INVALID_MODULE_DEFINITION"` \| `"E_INVALID_ACTION_DEFINITION"` \| `"E_MISSING_PARAM"` \| `"E_INVALID_REQUEST_NAME"` | +| `replacements?` | `Record`\<`string`, `string` \| `number`\> | +| `details?` | `unknown` | + +#### Returns + +`ZentaoError` + +#### Overrides + +`Error.constructor` + +## Properties + +| Property | Modifier | Type | Description | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | ------ | +| `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/typescript/lib/lib.es2022.error.d.ts:26 | +| `code` | `readonly` | `"E_INVALID_BASE_URL"` \| `"E_NO_GLOBAL_CLIENT"` \| `"E_HTTP_ERROR"` \| `"E_NETWORK_ERROR"` \| `"E_TIMEOUT"` \| `"E_INSECURE_BROWSER"` \| `"E_LOGIN_FAILED"` \| `"E_INVALID_PROFILE"` \| `"E_NO_PROFILE"` \| `"E_PROFILE_NOT_FOUND"` \| `"E_PROFILE_STORAGE_INVALID"` \| `"E_PROFILE_STORAGE_UNAVAILABLE"` \| `"E_INVALID_MODULE"` \| `"E_INVALID_ACTION"` \| `"E_INVALID_MODULE_DEFINITION"` \| `"E_INVALID_ACTION_DEFINITION"` \| `"E_MISSING_PARAM"` \| `"E_INVALID_REQUEST_NAME"` | 错误码,对应 [ERRORS](../variables/ERRORS.md) 的 key。 | - | [src/misc/errors.ts:27](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L27) | +| `details?` | `readonly` | `unknown` | 附加上下文,例如 HTTP 响应详情或原始异常。 | - | [src/misc/errors.ts:29](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L29) | +| `message` | `public` | `string` | - | `Error.message` | node\_modules/typescript/lib/lib.es5.d.ts:1077 | +| `name` | `public` | `string` | - | `Error.name` | node\_modules/typescript/lib/lib.es5.d.ts:1076 | +| `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/typescript/lib/lib.es5.d.ts:1078 | +| `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/@types/node/globals.d.ts:68 | + +## Methods + +### captureStackTrace() + +> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` + +Defined in: node\_modules/@types/node/globals.d.ts:52 + +Creates a `.stack` property on `targetObject`, which when accessed returns +a string representing the location in the code at which +`Error.captureStackTrace()` was called. + +```js +const myObject = {}; +Error.captureStackTrace(myObject); +myObject.stack; // Similar to `new Error().stack` +``` + +The first line of the trace will be prefixed with +`${myObject.name}: ${myObject.message}`. + +The optional `constructorOpt` argument accepts a function. If given, all frames +above `constructorOpt`, including `constructorOpt`, will be omitted from the +generated stack trace. + +The `constructorOpt` argument is useful for hiding implementation +details of error generation from the user. For instance: + +```js +function a() { + b(); +} + +function b() { + c(); +} + +function c() { + // Create an error without stack trace to avoid calculating the stack trace twice. + const { stackTraceLimit } = Error; + Error.stackTraceLimit = 0; + const error = new Error(); + Error.stackTraceLimit = stackTraceLimit; + + // Capture the stack trace above function b + Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace + throw error; +} + +a(); +``` + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `targetObject` | `object` | +| `constructorOpt?` | `Function` | + +#### Returns + +`void` + +#### Inherited from + +`Error.captureStackTrace` + +*** + +### prepareStackTrace() + +> `static` **prepareStackTrace**(`err`, `stackTraces`): `any` + +Defined in: node\_modules/@types/node/globals.d.ts:56 + +#### Parameters + +| Parameter | Type | +| ------ | ------ | +| `err` | `Error` | +| `stackTraces` | `CallSite`[] | + +#### Returns + +`any` + +#### See + +https://v8.dev/docs/stack-trace-api#customizing-stack-traces + +#### Inherited from + +`Error.prepareStackTrace` diff --git a/docs/reference/functions/addProfile.md b/docs/reference/functions/addProfile.md new file mode 100644 index 0000000..c03f666 --- /dev/null +++ b/docs/reference/functions/addProfile.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / addProfile + +# Function: addProfile() + +> **addProfile**(`profile`): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)\> + +Defined in: [src/profiles/index.ts:186](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L186) + +添加或覆盖一个本地 profile,并把它设置为当前使用的 profile。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `profile` | [`ZentaoProfile`](../interfaces/ZentaoProfile.md) | + +## Returns + +`Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)\> diff --git a/docs/reference/functions/defineModuleActions.md b/docs/reference/functions/defineModuleActions.md new file mode 100644 index 0000000..bf14fba --- /dev/null +++ b/docs/reference/functions/defineModuleActions.md @@ -0,0 +1,20 @@ +[zentao-api](../index.md) / defineModuleActions + +# Function: defineModuleActions() + +> **defineModuleActions**(`moduleName`, `input`): `void` + +Defined in: [src/modules/registry.ts:107](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L107) + +为已存在模块定义或覆盖动作;同名动作替换,未知动作追加。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `moduleName` | `string` | +| `input` | [`ModuleAction`](../interfaces/ModuleAction.md) \| [`ModuleAction`](../interfaces/ModuleAction.md)[] | + +## Returns + +`void` diff --git a/docs/reference/functions/defineModules.md b/docs/reference/functions/defineModules.md new file mode 100644 index 0000000..8726998 --- /dev/null +++ b/docs/reference/functions/defineModules.md @@ -0,0 +1,20 @@ +[zentao-api](../index.md) / defineModules + +# Function: defineModules() + +> **defineModules**(`input`, `options?`): `void` + +Defined in: [src/modules/registry.ts:91](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L91) + +定义或扩展模块;同名模块默认合并动作,`replace` 为真时整体替换,未知模块追加。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `input` | [`ModuleDefinition`](../interfaces/ModuleDefinition.md) \| [`ModuleDefinition`](../interfaces/ModuleDefinition.md)[] | +| `options` | [`DefineModulesOptions`](../interfaces/DefineModulesOptions.md) | + +## Returns + +`void` diff --git a/docs/reference/functions/deleteProfile.md b/docs/reference/functions/deleteProfile.md new file mode 100644 index 0000000..7b8a9a9 --- /dev/null +++ b/docs/reference/functions/deleteProfile.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / deleteProfile + +# Function: deleteProfile() + +> **deleteProfile**(`profileKey`): `Promise`\<`boolean`\> + +Defined in: [src/profiles/index.ts:209](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L209) + +删除指定 profile;返回是否实际删除了记录。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `profileKey` | `string` | + +## Returns + +`Promise`\<`boolean`\> diff --git a/docs/reference/functions/getAllProfiles.md b/docs/reference/functions/getAllProfiles.md new file mode 100644 index 0000000..c297062 --- /dev/null +++ b/docs/reference/functions/getAllProfiles.md @@ -0,0 +1,13 @@ +[zentao-api](../index.md) / getAllProfiles + +# Function: getAllProfiles() + +> **getAllProfiles**(): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)[]\> + +Defined in: [src/profiles/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L171) + +列出所有保存的本地 profile。 + +## Returns + +`Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)[]\> diff --git a/docs/reference/functions/getGlobalOptions.md b/docs/reference/functions/getGlobalOptions.md new file mode 100644 index 0000000..651f223 --- /dev/null +++ b/docs/reference/functions/getGlobalOptions.md @@ -0,0 +1,13 @@ +[zentao-api](../index.md) / getGlobalOptions + +# Function: getGlobalOptions() + +> **getGlobalOptions**(): [`GlobalOptions`](../interfaces/GlobalOptions.md) + +Defined in: [src/misc/global-options.ts:6](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/global-options.ts#L6) + +获取当前全局选项快照;返回副本,避免调用方直接改写内部状态。 + +## Returns + +[`GlobalOptions`](../interfaces/GlobalOptions.md) diff --git a/docs/reference/functions/getModule.md b/docs/reference/functions/getModule.md new file mode 100644 index 0000000..f57b59a --- /dev/null +++ b/docs/reference/functions/getModule.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / getModule + +# Function: getModule() + +> **getModule**(`moduleName`): [`ModuleDefinition`](../interfaces/ModuleDefinition.md) + +Defined in: [src/modules/registry.ts:127](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L127) + +获取模块定义;模块不存在时抛出 [ZentaoError](../classes/ZentaoError.md)。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `moduleName` | `string` | + +## Returns + +[`ModuleDefinition`](../interfaces/ModuleDefinition.md) diff --git a/docs/reference/functions/getModuleAction.md b/docs/reference/functions/getModuleAction.md new file mode 100644 index 0000000..cf196cc --- /dev/null +++ b/docs/reference/functions/getModuleAction.md @@ -0,0 +1,20 @@ +[zentao-api](../index.md) / getModuleAction + +# Function: getModuleAction() + +> **getModuleAction**(`moduleName`, `actionName`): [`ModuleAction`](../interfaces/ModuleAction.md) + +Defined in: [src/modules/registry.ts:136](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L136) + +获取指定模块动作;`ls` 会作为 `list` 的别名处理。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `moduleName` | `string` | +| `actionName` | `string` | + +## Returns + +[`ModuleAction`](../interfaces/ModuleAction.md) diff --git a/docs/reference/functions/getProfile.md b/docs/reference/functions/getProfile.md new file mode 100644 index 0000000..24ee7e8 --- /dev/null +++ b/docs/reference/functions/getProfile.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / getProfile + +# Function: getProfile() + +> **getProfile**(`profileKey?`): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md) \| `undefined`\> + +Defined in: [src/profiles/index.ts:177](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L177) + +获取指定 profile;不传 key 时返回上次使用的 profile。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `profileKey?` | `string` | + +## Returns + +`Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md) \| `undefined`\> diff --git a/docs/reference/functions/getProfileKey.md b/docs/reference/functions/getProfileKey.md new file mode 100644 index 0000000..70cc1ca --- /dev/null +++ b/docs/reference/functions/getProfileKey.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / getProfileKey + +# Function: getProfileKey() + +> **getProfileKey**(`profile`): `string` + +Defined in: [src/profiles/index.ts:166](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L166) + +根据 profile 的账号和禅道地址生成稳定 key。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `profile` | `Pick`\<[`ZentaoProfile`](../interfaces/ZentaoProfile.md), `"account"` \| `"server"`\> | + +## Returns + +`string` diff --git a/docs/reference/functions/request.md b/docs/reference/functions/request.md new file mode 100644 index 0000000..198c54a --- /dev/null +++ b/docs/reference/functions/request.md @@ -0,0 +1,23 @@ +[zentao-api](../index.md) / request + +# Function: request() + +> **request**(`name`, `params?`, `options?`): `Promise`\<[`ResponseData`](../interfaces/ResponseData.md)\> + +Defined in: [src/request/index.ts:51](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/request/index.ts#L51) + +按模块动作名请求禅道 API。 + +选项优先级为:本次调用 options > 全局 options > 客户端默认值。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `name` | `` `${string}/${string}` `` | +| `params` | `Record`\<`string`, `unknown`\> | +| `options` | [`RequestOptions`](../interfaces/RequestOptions.md) | + +## Returns + +`Promise`\<[`ResponseData`](../interfaces/ResponseData.md)\> diff --git a/docs/reference/functions/setGlobalOptions.md b/docs/reference/functions/setGlobalOptions.md new file mode 100644 index 0000000..dc1532d --- /dev/null +++ b/docs/reference/functions/setGlobalOptions.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / setGlobalOptions + +# Function: setGlobalOptions() + +> **setGlobalOptions**(`options`): `void` + +Defined in: [src/misc/global-options.ts:11](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/global-options.ts#L11) + +合并设置全局选项;传入 `undefined` 可清空对应字段。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `options` | `Partial`\<[`GlobalOptions`](../interfaces/GlobalOptions.md)\> | + +## Returns + +`void` diff --git a/docs/reference/functions/switchProfile.md b/docs/reference/functions/switchProfile.md new file mode 100644 index 0000000..ef45eaf --- /dev/null +++ b/docs/reference/functions/switchProfile.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / switchProfile + +# Function: switchProfile() + +> **switchProfile**(`profileKey?`): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)\> + +Defined in: [src/profiles/index.ts:221](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L221) + +切换当前使用的 profile,并刷新最后使用时间;不传 key 时使用当前 profile。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `profileKey?` | `string` | + +## Returns + +`Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)\> diff --git a/docs/reference/index.md b/docs/reference/index.md new file mode 100644 index 0000000..308b021 --- /dev/null +++ b/docs/reference/index.md @@ -0,0 +1,78 @@ +# zentao-api + +## Classes + +| Class | Description | +| ------ | ------ | +| [ZentaoClient](classes/ZentaoClient.md) | 禅道 API 客户端,负责 Token 注入、请求超时、TLS 选项和响应解析。 | +| [ZentaoError](classes/ZentaoError.md) | SDK 统一错误类型,所有可预期错误都会携带稳定错误码。 | + +## Interfaces + +| Interface | Description | +| ------ | ------ | +| [ApiListResponse](interfaces/ApiListResponse.md) | 禅道 API 列表响应结构。 | +| [ApiResponse](interfaces/ApiResponse.md) | 禅道 API 通用响应结构,允许携带任意业务字段。 | +| [ClientRequestOptions](interfaces/ClientRequestOptions.md) | `ZentaoClient.request()` 的单次请求选项。 | +| [DefineModulesOptions](interfaces/DefineModulesOptions.md) | - | +| [GlobalOptions](interfaces/GlobalOptions.md) | SDK 进程级全局默认选项,供高阶 [request](functions/request.md) 调用复用。 | +| [LoginResponse](interfaces/LoginResponse.md) | 登录接口响应结构。 | +| [ModuleAction](interfaces/ModuleAction.md) | 禅道模块中的单个 API 动作定义。 | +| [ModuleActionPagerGetterMap](interfaces/ModuleActionPagerGetterMap.md) | 从原始响应中提取分页字段时使用的字段映射。 | +| [ModuleActionParam](interfaces/ModuleActionParam.md) | 模块动作的查询参数定义。 | +| [ModuleActionRequestBody](interfaces/ModuleActionRequestBody.md) | 模块动作请求体定义。 | +| [ModuleActionResponse](interfaces/ModuleActionResponse.md) | 模块动作响应定义。 | +| [ModuleDefinition](interfaces/ModuleDefinition.md) | 禅道模块定义,由多个动作组成。 | +| [Pager](interfaces/Pager.md) | 禅道 API 原始分页结构。 | +| [RequestOptions](interfaces/RequestOptions.md) | 高阶 `request("moduleName/methodName")` 的单次调用选项。 | +| [ResolvedModuleCommand](interfaces/ResolvedModuleCommand.md) | 将模块动作和参数解析后的可执行请求描述。 | +| [ResponseData](interfaces/ResponseData.md) | 高阶 `request()` 归一化后的返回数据。 | +| [ServerConfig](interfaces/ServerConfig.md) | 禅道 `?mode=getconfig` 返回的服务端配置。 | +| [ZentaoClientOptions](interfaces/ZentaoClientOptions.md) | 创建 [ZentaoClient](classes/ZentaoClient.md) 时使用的配置。 | +| [ZentaoProfile](interfaces/ZentaoProfile.md) | 本地持久化的禅道账号 profile。 | +| [ZentaoProfileConfig](interfaces/ZentaoProfileConfig.md) | 保存到本地 profile 中的客户端偏好配置。 | +| [ZentaoProfileRecord](interfaces/ZentaoProfileRecord.md) | 运行时返回的 profile,会额外带上 `account@server` 形式的 key。 | +| [ZentaoProfilesStore](interfaces/ZentaoProfilesStore.md) | 本地 profile 存储文件或浏览器 localStorage 中的 JSON 结构。 | + +## Type Aliases + +| Type Alias | Description | +| ------ | ------ | +| [ErrorCode](type-aliases/ErrorCode.md) | - | +| [HttpMethod](type-aliases/HttpMethod.md) | SDK 支持的 HTTP 方法。 | +| [ListPagerInfo](type-aliases/ListPagerInfo.md) | 列表分页信息别名。 | +| [ModuleActionMethod](type-aliases/ModuleActionMethod.md) | 模块动作使用的 HTTP 方法;兼容生成定义中的小写方法。 | +| [ModuleActionName](type-aliases/ModuleActionName.md) | 模块动作名称,允许除基础动作外的自定义名称。 | +| [ModuleActionParamOption](type-aliases/ModuleActionParamOption.md) | 模块动作参数可选项。 | +| [ModuleActionResultRender](type-aliases/ModuleActionResultRender.md) | 模块动作自定义渲染函数类型;SDK 本身不直接渲染终端输出。 | +| [ModuleActionResultRenderType](type-aliases/ModuleActionResultRenderType.md) | 模块动作渲染目标类型;保留给 CLI 等上层应用使用。 | +| [ModuleActionResultType](type-aliases/ModuleActionResultType.md) | 模块动作结果形态。 | +| [ModuleActionType](type-aliases/ModuleActionType.md) | 模块动作类型:基础 CRUD 或自定义动作。 | +| [ModuleName](type-aliases/ModuleName.md) | 内置模块名称,同时允许用户扩展自定义模块名。 | + +## Variables + +| Variable | Description | +| ------ | ------ | +| [BUILD](variables/BUILD.md) | - | +| [ERRORS](variables/ERRORS.md) | - | +| [VERSION](variables/VERSION.md) | - | +| [ZENTAO\_PROFILES\_STORAGE\_KEY](variables/ZENTAO_PROFILES_STORAGE_KEY.md) | - | + +## Functions + +| Function | Description | +| ------ | ------ | +| [addProfile](functions/addProfile.md) | 添加或覆盖一个本地 profile,并把它设置为当前使用的 profile。 | +| [defineModuleActions](functions/defineModuleActions.md) | 为已存在模块定义或覆盖动作;同名动作替换,未知动作追加。 | +| [defineModules](functions/defineModules.md) | 定义或扩展模块;同名模块默认合并动作,`replace` 为真时整体替换,未知模块追加。 | +| [deleteProfile](functions/deleteProfile.md) | 删除指定 profile;返回是否实际删除了记录。 | +| [getAllProfiles](functions/getAllProfiles.md) | 列出所有保存的本地 profile。 | +| [getGlobalOptions](functions/getGlobalOptions.md) | 获取当前全局选项快照;返回副本,避免调用方直接改写内部状态。 | +| [getModule](functions/getModule.md) | 获取模块定义;模块不存在时抛出 [ZentaoError](classes/ZentaoError.md)。 | +| [getModuleAction](functions/getModuleAction.md) | 获取指定模块动作;`ls` 会作为 `list` 的别名处理。 | +| [getProfile](functions/getProfile.md) | 获取指定 profile;不传 key 时返回上次使用的 profile。 | +| [getProfileKey](functions/getProfileKey.md) | 根据 profile 的账号和禅道地址生成稳定 key。 | +| [request](functions/request.md) | 按模块动作名请求禅道 API。 | +| [setGlobalOptions](functions/setGlobalOptions.md) | 合并设置全局选项;传入 `undefined` 可清空对应字段。 | +| [switchProfile](functions/switchProfile.md) | 切换当前使用的 profile,并刷新最后使用时间;不传 key 时使用当前 profile。 | diff --git a/docs/reference/interfaces/ApiListResponse.md b/docs/reference/interfaces/ApiListResponse.md new file mode 100644 index 0000000..2434592 --- /dev/null +++ b/docs/reference/interfaces/ApiListResponse.md @@ -0,0 +1,25 @@ +[zentao-api](../index.md) / ApiListResponse + +# Interface: ApiListResponse + +Defined in: [src/types/index.ts:104](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L104) + +禅道 API 列表响应结构。 + +## Extends + +- [`ApiResponse`](ApiResponse.md) + +## Indexable + +> \[`key`: `string`\]: `unknown` + +其他业务字段。 + +## Properties + +| Property | Type | Description | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [`ApiResponse`](ApiResponse.md).[`message`](ApiResponse.md#property-message) | [src/types/index.ts:98](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L98) | +| `pager?` | [`Pager`](Pager.md) | 原始分页信息。 | - | [src/types/index.ts:106](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L106) | +| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [`ApiResponse`](ApiResponse.md).[`status`](ApiResponse.md#property-status) | [src/types/index.ts:96](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L96) | diff --git a/docs/reference/interfaces/ApiResponse.md b/docs/reference/interfaces/ApiResponse.md new file mode 100644 index 0000000..5c3abf8 --- /dev/null +++ b/docs/reference/interfaces/ApiResponse.md @@ -0,0 +1,25 @@ +[zentao-api](../index.md) / ApiResponse + +# Interface: ApiResponse + +Defined in: [src/types/index.ts:94](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L94) + +禅道 API 通用响应结构,允许携带任意业务字段。 + +## Extended by + +- [`ApiListResponse`](ApiListResponse.md) +- [`LoginResponse`](LoginResponse.md) + +## Indexable + +> \[`key`: `string`\]: `unknown` + +其他业务字段。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [src/types/index.ts:98](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L98) | +| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [src/types/index.ts:96](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L96) | diff --git a/docs/reference/interfaces/ClientRequestOptions.md b/docs/reference/interfaces/ClientRequestOptions.md new file mode 100644 index 0000000..f8cbb44 --- /dev/null +++ b/docs/reference/interfaces/ClientRequestOptions.md @@ -0,0 +1,17 @@ +[zentao-api](../index.md) / ClientRequestOptions + +# Interface: ClientRequestOptions + +Defined in: [src/types/index.ts:35](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L35) + +`ZentaoClient.request()` 的单次请求选项。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `body?` | `Record`\<`string`, `unknown`\> | JSON 请求体;`GET` 请求会忽略该字段。 | [src/types/index.ts:39](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L39) | +| `insecure?` | `boolean` | 单次请求 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | [src/types/index.ts:45](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L45) | +| `method?` | [`HttpMethod`](../type-aliases/HttpMethod.md) | HTTP 方法,默认 `GET`。 | [src/types/index.ts:37](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L37) | +| `query?` | `Record`\<`string`, `string` \| `number` \| `boolean` \| `undefined`\> | URL 查询参数;`undefined` 值会被跳过。 | [src/types/index.ts:41](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L41) | +| `timeout?` | `number` | 单次请求超时时间,优先级高于全局和客户端默认值。 | [src/types/index.ts:43](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L43) | diff --git a/docs/reference/interfaces/DefineModulesOptions.md b/docs/reference/interfaces/DefineModulesOptions.md new file mode 100644 index 0000000..cf4577b --- /dev/null +++ b/docs/reference/interfaces/DefineModulesOptions.md @@ -0,0 +1,11 @@ +[zentao-api](../index.md) / DefineModulesOptions + +# Interface: DefineModulesOptions + +Defined in: [src/modules/registry.ts:9](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L9) + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `replace?` | `boolean` | 同名模块是否整体替换;默认合并模块定义和动作。 | [src/modules/registry.ts:11](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L11) | diff --git a/docs/reference/interfaces/GlobalOptions.md b/docs/reference/interfaces/GlobalOptions.md new file mode 100644 index 0000000..ae9bb52 --- /dev/null +++ b/docs/reference/interfaces/GlobalOptions.md @@ -0,0 +1,18 @@ +[zentao-api](../index.md) / GlobalOptions + +# Interface: GlobalOptions + +Defined in: [src/types/index.ts:16](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L16) + +SDK 进程级全局默认选项,供高阶 [request](../functions/request.md) 调用复用。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `client?` | [`ZentaoClient`](../classes/ZentaoClient.md) | 默认客户端;通常由 `ZentaoClient.init()` 设置。 | [src/types/index.ts:18](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L18) | +| `insecure?` | `boolean` | 默认 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | [src/types/index.ts:26](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L26) | +| `limit?` | `string` | 默认限制返回列表数量,只影响 SDK 归一化后的 `data`。 | [src/types/index.ts:22](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L22) | +| `persistProfiles?` | `boolean` | 是否在登录成功后把账号、Token 和配置持久化为本地 profile。 | [src/types/index.ts:28](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L28) | +| `recPerPage?` | `string` | 默认每页记录数,会映射到模块动作的 `recPerPage` 参数。 | [src/types/index.ts:20](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L20) | +| `timeout?` | `number` | 默认请求超时时间,优先级低于单次请求选项。 | [src/types/index.ts:24](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L24) | diff --git a/docs/reference/interfaces/LoginResponse.md b/docs/reference/interfaces/LoginResponse.md new file mode 100644 index 0000000..78c2998 --- /dev/null +++ b/docs/reference/interfaces/LoginResponse.md @@ -0,0 +1,27 @@ +[zentao-api](../index.md) / LoginResponse + +# Interface: LoginResponse + +Defined in: [src/types/index.ts:110](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L110) + +登录接口响应结构。 + +## Extends + +- [`ApiResponse`](ApiResponse.md) + +## Indexable + +> \[`key`: `string`\]: `unknown` + +其他业务字段。 + +## Properties + +| Property | Type | Description | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [`ApiResponse`](ApiResponse.md).[`message`](ApiResponse.md#property-message) | [src/types/index.ts:98](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L98) | +| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 部分禅道环境会随登录响应返回服务端配置。 | - | [src/types/index.ts:116](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L116) | +| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [`ApiResponse`](ApiResponse.md).[`status`](ApiResponse.md#property-status) | [src/types/index.ts:96](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L96) | +| `token?` | `string` | 登录成功后返回的 API Token。 | - | [src/types/index.ts:112](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L112) | +| `user?` | `Record`\<`string`, `unknown`\> | 部分禅道环境会随登录响应返回用户信息。 | - | [src/types/index.ts:114](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L114) | diff --git a/docs/reference/interfaces/ModuleAction.md b/docs/reference/interfaces/ModuleAction.md new file mode 100644 index 0000000..d8282ab --- /dev/null +++ b/docs/reference/interfaces/ModuleAction.md @@ -0,0 +1,25 @@ +[zentao-api](../index.md) / ModuleAction + +# Interface: ModuleAction + +Defined in: [src/types/index.ts:263](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L263) + +禅道模块中的单个 API 动作定义。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `description?` | `string` | 动作说明。 | [src/types/index.ts:271](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L271) | +| `display?` | `string` | 面向用户展示的动作名称。 | [src/types/index.ts:269](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L269) | +| `method` | [`ModuleActionMethod`](../type-aliases/ModuleActionMethod.md) | HTTP 方法。 | [src/types/index.ts:273](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L273) | +| `name` | [`ModuleActionName`](../type-aliases/ModuleActionName.md) | 动作名称,例如 `list`、`get`、`close`。 | [src/types/index.ts:265](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L265) | +| `pagerGetter?` | `string` \| [`ModuleActionPagerGetterMap`](ModuleActionPagerGetterMap.md) \| ((`data`, `params`) => [`Pager`](Pager.md)) | 从原始响应中提取分页信息的位置或函数。 | [src/types/index.ts:285](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L285) | +| `params?` | [`ModuleActionParam`](ModuleActionParam.md)[] | 查询参数定义。 | [src/types/index.ts:279](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L279) | +| `path` | `string` | API 路径模板,可包含 `{productID}` 等路径参数。 | [src/types/index.ts:275](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L275) | +| `pathParams?` | `Record`\<`string`, `string` \| `Omit`\<[`ModuleActionParam`](ModuleActionParam.md), `"name"`\>\> | 路径参数定义;字符串为说明,对象可携带默认值和可选项。 | [src/types/index.ts:277](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L277) | +| `render?` | `string` \| [`ModuleActionResultRender`](../type-aliases/ModuleActionResultRender.md) \| `Record`\<[`ModuleActionResultRenderType`](../type-aliases/ModuleActionResultRenderType.md), [`ModuleActionResultRender`](../type-aliases/ModuleActionResultRender.md)\> | 供上层应用使用的渲染配置。 | [src/types/index.ts:289](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L289) | +| `requestBody?` | [`ModuleActionRequestBody`](ModuleActionRequestBody.md) | 请求体定义。 | [src/types/index.ts:281](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L281) | +| `resultGetter?` | `string` \| `Record`\<`string`, `string`\> \| ((`data`, `params`) => `unknown`) | 从原始响应中提取业务数据的位置或函数。 | [src/types/index.ts:287](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L287) | +| `resultType` | [`ModuleActionResultType`](../type-aliases/ModuleActionResultType.md) | 结果形态。 | [src/types/index.ts:283](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L283) | +| `type` | [`ModuleActionType`](../type-aliases/ModuleActionType.md) | 动作类型,决定高阶 request 的路径/参数解析策略。 | [src/types/index.ts:267](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L267) | diff --git a/docs/reference/interfaces/ModuleActionPagerGetterMap.md b/docs/reference/interfaces/ModuleActionPagerGetterMap.md new file mode 100644 index 0000000..29b58a8 --- /dev/null +++ b/docs/reference/interfaces/ModuleActionPagerGetterMap.md @@ -0,0 +1,15 @@ +[zentao-api](../index.md) / ModuleActionPagerGetterMap + +# Interface: ModuleActionPagerGetterMap + +Defined in: [src/types/index.ts:253](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L253) + +从原始响应中提取分页字段时使用的字段映射。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `pageID` | `string` | 当前页码字段名。 | [src/types/index.ts:255](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L255) | +| `recPerPage` | `string` | 每页记录数字段名。 | [src/types/index.ts:257](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L257) | +| `recTotal` | `string` | 总记录数字段名。 | [src/types/index.ts:259](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L259) | diff --git a/docs/reference/interfaces/ModuleActionParam.md b/docs/reference/interfaces/ModuleActionParam.md new file mode 100644 index 0000000..d974df8 --- /dev/null +++ b/docs/reference/interfaces/ModuleActionParam.md @@ -0,0 +1,18 @@ +[zentao-api](../index.md) / ModuleActionParam + +# Interface: ModuleActionParam + +Defined in: [src/types/index.ts:201](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L201) + +模块动作的查询参数定义。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `defaultValue?` | `unknown` | 未显式传入时使用的默认值。 | [src/types/index.ts:209](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L209) | +| `description?` | `string` | 参数说明。 | [src/types/index.ts:205](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L205) | +| `name` | `string` | 参数名称。 | [src/types/index.ts:203](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L203) | +| `options?` | [`ModuleActionParamOption`](../type-aliases/ModuleActionParamOption.md)[] | 参数可选值。 | [src/types/index.ts:213](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L213) | +| `required?` | `boolean` | 是否必填。 | [src/types/index.ts:207](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L207) | +| `type?` | `"string"` \| `"number"` \| `"boolean"` | 参数值类型,用于基础类型转换。 | [src/types/index.ts:211](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L211) | diff --git a/docs/reference/interfaces/ModuleActionRequestBody.md b/docs/reference/interfaces/ModuleActionRequestBody.md new file mode 100644 index 0000000..9e5e927 --- /dev/null +++ b/docs/reference/interfaces/ModuleActionRequestBody.md @@ -0,0 +1,16 @@ +[zentao-api](../index.md) / ModuleActionRequestBody + +# Interface: ModuleActionRequestBody + +Defined in: [src/types/index.ts:222](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L222) + +模块动作请求体定义。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `example?` | `unknown` | 请求体示例。 | [src/types/index.ts:230](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L230) | +| `required?` | `boolean` | 请求体是否必填。 | [src/types/index.ts:226](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L226) | +| `schema` | `Record`\<`string`, `unknown`\> | OpenAPI 风格 schema,用于从 params 组装 body。 | [src/types/index.ts:228](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L228) | +| `type?` | `"string"` \| `"object"` | 请求体类型。 | [src/types/index.ts:224](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L224) | diff --git a/docs/reference/interfaces/ModuleActionResponse.md b/docs/reference/interfaces/ModuleActionResponse.md new file mode 100644 index 0000000..49a6e5e --- /dev/null +++ b/docs/reference/interfaces/ModuleActionResponse.md @@ -0,0 +1,15 @@ +[zentao-api](../index.md) / ModuleActionResponse + +# Interface: ModuleActionResponse + +Defined in: [src/types/index.ts:234](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L234) + +模块动作响应定义。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `description?` | `string` | 响应说明。 | [src/types/index.ts:236](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L236) | +| `example?` | `unknown` | 响应示例。 | [src/types/index.ts:240](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L240) | +| `schema` | `Record`\<`string`, `unknown`\> | 响应 schema。 | [src/types/index.ts:238](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L238) | diff --git a/docs/reference/interfaces/ModuleDefinition.md b/docs/reference/interfaces/ModuleDefinition.md new file mode 100644 index 0000000..46c7472 --- /dev/null +++ b/docs/reference/interfaces/ModuleDefinition.md @@ -0,0 +1,16 @@ +[zentao-api](../index.md) / ModuleDefinition + +# Interface: ModuleDefinition + +Defined in: [src/types/index.ts:316](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L316) + +禅道模块定义,由多个动作组成。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `actions` | [`ModuleAction`](ModuleAction.md)[] | 模块支持的动作集合。 | [src/types/index.ts:324](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L324) | +| `description?` | `string` | 模块说明。 | [src/types/index.ts:322](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L322) | +| `display?` | `string` | 面向用户展示的模块名称。 | [src/types/index.ts:320](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L320) | +| `name` | [`ModuleName`](../type-aliases/ModuleName.md) | 模块名称,例如 `product`、`bug`。 | [src/types/index.ts:318](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L318) | diff --git a/docs/reference/interfaces/Pager.md b/docs/reference/interfaces/Pager.md new file mode 100644 index 0000000..eb0863c --- /dev/null +++ b/docs/reference/interfaces/Pager.md @@ -0,0 +1,16 @@ +[zentao-api](../index.md) / Pager + +# Interface: Pager + +Defined in: [src/types/index.ts:82](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L82) + +禅道 API 原始分页结构。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `pageID` | `number` | 当前页码。 | [src/types/index.ts:90](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L90) | +| `pageTotal?` | `number` | 总页数,部分接口不返回。 | [src/types/index.ts:88](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L88) | +| `recPerPage` | `number` | 每页记录数。 | [src/types/index.ts:86](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L86) | +| `recTotal` | `number` | 总记录数。 | [src/types/index.ts:84](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L84) | diff --git a/docs/reference/interfaces/RequestOptions.md b/docs/reference/interfaces/RequestOptions.md new file mode 100644 index 0000000..1abe163 --- /dev/null +++ b/docs/reference/interfaces/RequestOptions.md @@ -0,0 +1,17 @@ +[zentao-api](../index.md) / RequestOptions + +# Interface: RequestOptions + +Defined in: [src/types/index.ts:49](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L49) + +高阶 `request("moduleName/methodName")` 的单次调用选项。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `client?` | [`ZentaoClient`](../classes/ZentaoClient.md) | 本次调用使用的客户端;优先级高于全局客户端。 | [src/types/index.ts:51](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L51) | +| `insecure?` | `boolean` | 本次调用 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | [src/types/index.ts:59](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L59) | +| `limit?` | `string` | 本次调用限制返回列表数量,优先级高于全局 `limit`。 | [src/types/index.ts:55](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L55) | +| `recPerPage?` | `string` | 本次调用使用的每页记录数,优先级高于全局 `recPerPage`。 | [src/types/index.ts:53](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L53) | +| `timeout?` | `number` | 本次调用超时时间。 | [src/types/index.ts:57](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L57) | diff --git a/docs/reference/interfaces/ResolvedModuleCommand.md b/docs/reference/interfaces/ResolvedModuleCommand.md new file mode 100644 index 0000000..ff93a4c --- /dev/null +++ b/docs/reference/interfaces/ResolvedModuleCommand.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / ResolvedModuleCommand + +# Interface: ResolvedModuleCommand + +Defined in: [src/types/index.ts:328](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L328) + +将模块动作和参数解析后的可执行请求描述。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `action` | [`ModuleAction`](ModuleAction.md) | 匹配到的动作定义。 | [src/types/index.ts:332](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L332) | +| `data?` | `Record`\<`string`, `unknown`\> | 已组装的请求体。 | [src/types/index.ts:340](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L340) | +| `id?` | `number` | 从 `id` 或 `{module}ID` 推断出的对象 ID。 | [src/types/index.ts:342](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L342) | +| `module` | `string` | 模块名称。 | [src/types/index.ts:330](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L330) | +| `params` | `Record`\<`string`, `unknown`\> | 原始调用参数。 | [src/types/index.ts:334](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L334) | +| `path` | `string` | 已替换路径参数后的 API 路径。 | [src/types/index.ts:336](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L336) | +| `query?` | `Record`\<`string`, `string` \| `number`\> | 已组装的查询参数。 | [src/types/index.ts:338](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L338) | diff --git a/docs/reference/interfaces/ResponseData.md b/docs/reference/interfaces/ResponseData.md new file mode 100644 index 0000000..95862a2 --- /dev/null +++ b/docs/reference/interfaces/ResponseData.md @@ -0,0 +1,19 @@ +[zentao-api](../index.md) / ResponseData + +# Interface: ResponseData + +Defined in: [src/types/index.ts:63](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L63) + +高阶 `request()` 归一化后的返回数据。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `data?` | `any` | 根据模块动作 `resultGetter` 提取后的业务数据。 | [src/types/index.ts:69](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L69) | +| `message?` | `string` | 禅道服务端返回的消息。 | [src/types/index.ts:67](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L67) | +| `pager?` | `object` | 统一分页信息。 | [src/types/index.ts:71](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L71) | +| `pager.page` | `number` | 当前页码。 | [src/types/index.ts:75](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L75) | +| `pager.recPerPage` | `number` | 每页记录数。 | [src/types/index.ts:77](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L77) | +| `pager.total` | `number` | 总记录数。 | [src/types/index.ts:73](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L73) | +| `status` | `"success"` \| `"fail"` | 禅道服务端状态;非标准响应会按成功响应包装到 `data`。 | [src/types/index.ts:65](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L65) | diff --git a/docs/reference/interfaces/ServerConfig.md b/docs/reference/interfaces/ServerConfig.md new file mode 100644 index 0000000..d2ea0a7 --- /dev/null +++ b/docs/reference/interfaces/ServerConfig.md @@ -0,0 +1,21 @@ +[zentao-api](../index.md) / ServerConfig + +# Interface: ServerConfig + +Defined in: [src/types/index.ts:120](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L120) + +禅道 `?mode=getconfig` 返回的服务端配置。 + +## Properties + +| Property | Type | Defined in | +| ------ | ------ | ------ | +| `methodVar` | `string` | [src/types/index.ts:127](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L127) | +| `moduleVar` | `string` | [src/types/index.ts:126](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L126) | +| `requestFix` | `string` | [src/types/index.ts:125](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L125) | +| `requestType` | `string` | [src/types/index.ts:124](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L124) | +| `sessionVar` | `string` | [src/types/index.ts:129](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L129) | +| `sprintConcept` | `string` | [src/types/index.ts:123](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L123) | +| `systemMode` | `string` | [src/types/index.ts:122](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L122) | +| `version` | `string` | [src/types/index.ts:121](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L121) | +| `viewVar` | `string` | [src/types/index.ts:128](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L128) | diff --git a/docs/reference/interfaces/ZentaoClientOptions.md b/docs/reference/interfaces/ZentaoClientOptions.md new file mode 100644 index 0000000..8da4016 --- /dev/null +++ b/docs/reference/interfaces/ZentaoClientOptions.md @@ -0,0 +1,16 @@ +[zentao-api](../index.md) / ZentaoClientOptions + +# Interface: ZentaoClientOptions + +Defined in: [src/types/index.ts:4](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L4) + +创建 [ZentaoClient](../classes/ZentaoClient.md) 时使用的配置。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `baseUrl` | `string` | 禅道站点根地址,例如 `https://zentao.example.com`;SDK 会自动拼接 `/api.php/v2`。 | [src/types/index.ts:6](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L6) | +| `insecure?` | `boolean` | 是否跳过 TLS 证书验证;仅 Node.js 运行时支持,浏览器中会抛错。 | [src/types/index.ts:12](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L12) | +| `timeout?` | `number` | 默认请求超时时间,单位毫秒。 | [src/types/index.ts:10](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L10) | +| `token?` | `string` | 禅道 API Token;未提供时可稍后通过 [ZentaoClient.login](../classes/ZentaoClient.md#login) 获取并写入实例。 | [src/types/index.ts:8](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L8) | diff --git a/docs/reference/interfaces/ZentaoProfile.md b/docs/reference/interfaces/ZentaoProfile.md new file mode 100644 index 0000000..dec73ff --- /dev/null +++ b/docs/reference/interfaces/ZentaoProfile.md @@ -0,0 +1,30 @@ +[zentao-api](../index.md) / ZentaoProfile + +# Interface: ZentaoProfile + +Defined in: [src/types/index.ts:157](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L157) + +本地持久化的禅道账号 profile。 + +## Extended by + +- [`ZentaoProfileRecord`](ZentaoProfileRecord.md) + +## Indexable + +> \[`key`: `string`\]: `unknown` + +允许上层应用保存额外字段。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `account` | `string` | 用户账号。 | [src/types/index.ts:161](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L161) | +| `config?` | [`ZentaoProfileConfig`](ZentaoProfileConfig.md) | 客户端自定义配置。 | [src/types/index.ts:173](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L173) | +| `lastUsedTime?` | `string` | 最后使用时间。 | [src/types/index.ts:169](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L169) | +| `loginTime?` | `string` | 登录时间。 | [src/types/index.ts:167](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L167) | +| `server` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [src/types/index.ts:159](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L159) | +| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 禅道服务端配置。 | [src/types/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L171) | +| `token` | `string` | 禅道 API Token。 | [src/types/index.ts:163](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L163) | +| `user?` | `Record`\<`string`, `unknown`\> | 登录验证通过后得到的用户信息。 | [src/types/index.ts:165](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L165) | diff --git a/docs/reference/interfaces/ZentaoProfileConfig.md b/docs/reference/interfaces/ZentaoProfileConfig.md new file mode 100644 index 0000000..8fb875f --- /dev/null +++ b/docs/reference/interfaces/ZentaoProfileConfig.md @@ -0,0 +1,27 @@ +[zentao-api](../index.md) / ZentaoProfileConfig + +# Interface: ZentaoProfileConfig + +Defined in: [src/types/index.ts:133](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L133) + +保存到本地 profile 中的客户端偏好配置。 + +## Indexable + +> \[`key`: `string`\]: `unknown` + +允许上层应用保存自定义配置。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `batchFailFast?` | `boolean` | 是否在批量操作出错时停止执行后续操作。 | [src/types/index.ts:147](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L147) | +| `defaultOutputFormat?` | `"markdown"` \| `"json"` \| `"raw"` | 默认输出格式,供 CLI 等上层应用复用。 | [src/types/index.ts:135](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L135) | +| `defaultRecPerPage?` | `number` | 默认分页大小。 | [src/types/index.ts:139](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L139) | +| `htmlToMarkdown?` | `boolean` | 是否将对象属性中的 HTML 转换为 Markdown。 | [src/types/index.ts:143](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L143) | +| `insecure?` | `boolean` | 是否跳过 TLS 证书验证;仅 Node.js 运行时支持。 | [src/types/index.ts:141](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L141) | +| `jsonPretty?` | `boolean` | JSON 格式化时是否添加缩进。 | [src/types/index.ts:149](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L149) | +| `lang?` | `string` | 界面语言。 | [src/types/index.ts:137](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L137) | +| `pagers?` | `Record`\<`string`, `number`\> | 模块级分页偏好。 | [src/types/index.ts:151](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L151) | +| `timeout?` | `number` | 请求超时时间,单位毫秒。 | [src/types/index.ts:145](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L145) | diff --git a/docs/reference/interfaces/ZentaoProfileRecord.md b/docs/reference/interfaces/ZentaoProfileRecord.md new file mode 100644 index 0000000..7757fda --- /dev/null +++ b/docs/reference/interfaces/ZentaoProfileRecord.md @@ -0,0 +1,31 @@ +[zentao-api](../index.md) / ZentaoProfileRecord + +# Interface: ZentaoProfileRecord + +Defined in: [src/types/index.ts:179](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L179) + +运行时返回的 profile,会额外带上 `account@server` 形式的 key。 + +## Extends + +- [`ZentaoProfile`](ZentaoProfile.md) + +## Indexable + +> \[`key`: `string`\]: `unknown` + +允许上层应用保存额外字段。 + +## Properties + +| Property | Type | Description | Inherited from | Defined in | +| ------ | ------ | ------ | ------ | ------ | +| `account` | `string` | 用户账号。 | [`ZentaoProfile`](ZentaoProfile.md).[`account`](ZentaoProfile.md#property-account) | [src/types/index.ts:161](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L161) | +| `config?` | [`ZentaoProfileConfig`](ZentaoProfileConfig.md) | 客户端自定义配置。 | [`ZentaoProfile`](ZentaoProfile.md).[`config`](ZentaoProfile.md#property-config) | [src/types/index.ts:173](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L173) | +| `key` | `string` | - | - | [src/types/index.ts:180](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L180) | +| `lastUsedTime?` | `string` | 最后使用时间。 | [`ZentaoProfile`](ZentaoProfile.md).[`lastUsedTime`](ZentaoProfile.md#property-lastusedtime) | [src/types/index.ts:169](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L169) | +| `loginTime?` | `string` | 登录时间。 | [`ZentaoProfile`](ZentaoProfile.md).[`loginTime`](ZentaoProfile.md#property-logintime) | [src/types/index.ts:167](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L167) | +| `server` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [`ZentaoProfile`](ZentaoProfile.md).[`server`](ZentaoProfile.md#property-server) | [src/types/index.ts:159](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L159) | +| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 禅道服务端配置。 | [`ZentaoProfile`](ZentaoProfile.md).[`serverConfig`](ZentaoProfile.md#property-serverconfig) | [src/types/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L171) | +| `token` | `string` | 禅道 API Token。 | [`ZentaoProfile`](ZentaoProfile.md).[`token`](ZentaoProfile.md#property-token) | [src/types/index.ts:163](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L163) | +| `user?` | `Record`\<`string`, `unknown`\> | 登录验证通过后得到的用户信息。 | [`ZentaoProfile`](ZentaoProfile.md).[`user`](ZentaoProfile.md#property-user) | [src/types/index.ts:165](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L165) | diff --git a/docs/reference/interfaces/ZentaoProfilesStore.md b/docs/reference/interfaces/ZentaoProfilesStore.md new file mode 100644 index 0000000..60fe6c0 --- /dev/null +++ b/docs/reference/interfaces/ZentaoProfilesStore.md @@ -0,0 +1,14 @@ +[zentao-api](../index.md) / ZentaoProfilesStore + +# Interface: ZentaoProfilesStore + +Defined in: [src/types/index.ts:184](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L184) + +本地 profile 存储文件或浏览器 localStorage 中的 JSON 结构。 + +## Properties + +| Property | Type | Description | Defined in | +| ------ | ------ | ------ | ------ | +| `currentProfile?` | `string` | 当前使用的 profile key。 | [src/types/index.ts:186](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L186) | +| `profiles` | [`ZentaoProfile`](ZentaoProfile.md)[] | 保存的 profile 列表。 | [src/types/index.ts:188](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L188) | diff --git a/docs/reference/type-aliases/ErrorCode.md b/docs/reference/type-aliases/ErrorCode.md new file mode 100644 index 0000000..ae1c231 --- /dev/null +++ b/docs/reference/type-aliases/ErrorCode.md @@ -0,0 +1,7 @@ +[zentao-api](../index.md) / ErrorCode + +# Type Alias: ErrorCode + +> **ErrorCode** = keyof *typeof* [`ERRORS`](../variables/ERRORS.md) + +Defined in: [src/misc/errors.ts:22](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L22) diff --git a/docs/reference/type-aliases/HttpMethod.md b/docs/reference/type-aliases/HttpMethod.md new file mode 100644 index 0000000..c13e253 --- /dev/null +++ b/docs/reference/type-aliases/HttpMethod.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / HttpMethod + +# Type Alias: HttpMethod + +> **HttpMethod** = `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` + +Defined in: [src/types/index.ts:32](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L32) + +SDK 支持的 HTTP 方法。 diff --git a/docs/reference/type-aliases/ListPagerInfo.md b/docs/reference/type-aliases/ListPagerInfo.md new file mode 100644 index 0000000..99332c2 --- /dev/null +++ b/docs/reference/type-aliases/ListPagerInfo.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ListPagerInfo + +# Type Alias: ListPagerInfo + +> **ListPagerInfo** = [`Pager`](../interfaces/Pager.md) + +Defined in: [src/types/index.ts:219](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L219) + +列表分页信息别名。 diff --git a/docs/reference/type-aliases/ModuleActionMethod.md b/docs/reference/type-aliases/ModuleActionMethod.md new file mode 100644 index 0000000..7d07b1f --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionMethod.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ModuleActionMethod + +# Type Alias: ModuleActionMethod + +> **ModuleActionMethod** = [`HttpMethod`](HttpMethod.md) \| `Lowercase`\<[`HttpMethod`](HttpMethod.md)\> + +Defined in: [src/types/index.ts:194](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L194) + +模块动作使用的 HTTP 方法;兼容生成定义中的小写方法。 diff --git a/docs/reference/type-aliases/ModuleActionName.md b/docs/reference/type-aliases/ModuleActionName.md new file mode 100644 index 0000000..78296ac --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionName.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ModuleActionName + +# Type Alias: ModuleActionName + +> **ModuleActionName** = [`ModuleActionType`](ModuleActionType.md) \| `string` & `object` + +Defined in: [src/types/index.ts:196](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L196) + +模块动作名称,允许除基础动作外的自定义名称。 diff --git a/docs/reference/type-aliases/ModuleActionParamOption.md b/docs/reference/type-aliases/ModuleActionParamOption.md new file mode 100644 index 0000000..19a6704 --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionParamOption.md @@ -0,0 +1,16 @@ +[zentao-api](../index.md) / ModuleActionParamOption + +# Type Alias: ModuleActionParamOption + +> **ModuleActionParamOption** = `object` + +Defined in: [src/types/index.ts:198](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L198) + +模块动作参数可选项。 + +## Properties + +| Property | Type | Defined in | +| ------ | ------ | ------ | +| `label` | `string` | [src/types/index.ts:198](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L198) | +| `value` | `unknown` | [src/types/index.ts:198](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L198) | diff --git a/docs/reference/type-aliases/ModuleActionResultRender.md b/docs/reference/type-aliases/ModuleActionResultRender.md new file mode 100644 index 0000000..1bedcfa --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionResultRender.md @@ -0,0 +1,21 @@ +[zentao-api](../index.md) / ModuleActionResultRender + +# Type Alias: ModuleActionResultRender + +> **ModuleActionResultRender** = (`result`, `type`, `action`) => `string` + +Defined in: [src/types/index.ts:246](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L246) + +模块动作自定义渲染函数类型;SDK 本身不直接渲染终端输出。 + +## Parameters + +| Parameter | Type | +| ------ | ------ | +| `result` | `unknown` | +| `type` | [`ModuleActionResultRenderType`](ModuleActionResultRenderType.md) | +| `action` | [`ModuleAction`](../interfaces/ModuleAction.md) | + +## Returns + +`string` diff --git a/docs/reference/type-aliases/ModuleActionResultRenderType.md b/docs/reference/type-aliases/ModuleActionResultRenderType.md new file mode 100644 index 0000000..a7e04be --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionResultRenderType.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ModuleActionResultRenderType + +# Type Alias: ModuleActionResultRenderType + +> **ModuleActionResultRenderType** = `"markdown"` \| `"json"` \| `"raw"` + +Defined in: [src/types/index.ts:244](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L244) + +模块动作渲染目标类型;保留给 CLI 等上层应用使用。 diff --git a/docs/reference/type-aliases/ModuleActionResultType.md b/docs/reference/type-aliases/ModuleActionResultType.md new file mode 100644 index 0000000..7c7acb7 --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionResultType.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ModuleActionResultType + +# Type Alias: ModuleActionResultType + +> **ModuleActionResultType** = `"text"` \| `"object"` \| `"list"` + +Defined in: [src/types/index.ts:217](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L217) + +模块动作结果形态。 diff --git a/docs/reference/type-aliases/ModuleActionType.md b/docs/reference/type-aliases/ModuleActionType.md new file mode 100644 index 0000000..8881bab --- /dev/null +++ b/docs/reference/type-aliases/ModuleActionType.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ModuleActionType + +# Type Alias: ModuleActionType + +> **ModuleActionType** = `"list"` \| `"get"` \| `"create"` \| `"update"` \| `"delete"` \| `"action"` + +Defined in: [src/types/index.ts:192](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L192) + +模块动作类型:基础 CRUD 或自定义动作。 diff --git a/docs/reference/type-aliases/ModuleName.md b/docs/reference/type-aliases/ModuleName.md new file mode 100644 index 0000000..2a88b70 --- /dev/null +++ b/docs/reference/type-aliases/ModuleName.md @@ -0,0 +1,9 @@ +[zentao-api](../index.md) / ModuleName + +# Type Alias: ModuleName + +> **ModuleName** = `"user"` \| `"program"` \| `"product"` \| `"project"` \| `"execution"` \| `"productplan"` \| `"story"` \| `"epic"` \| `"requirement"` \| `"bug"` \| `"testcase"` \| `"task"` \| `"feedback"` \| `"ticket"` \| `"system"` \| `"build"` \| `"testtask"` \| `"release"` \| `"file"` \| `string` & `object` + +Defined in: [src/types/index.ts:293](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L293) + +内置模块名称,同时允许用户扩展自定义模块名。 diff --git a/docs/reference/typedoc-sidebar.json b/docs/reference/typedoc-sidebar.json new file mode 100644 index 0000000..0a1d977 --- /dev/null +++ b/docs/reference/typedoc-sidebar.json @@ -0,0 +1,240 @@ +[ + { + "text": "Classes", + "collapsed": true, + "items": [ + { + "text": "ZentaoClient", + "link": "/reference/classes/ZentaoClient.md" + }, + { + "text": "ZentaoError", + "link": "/reference/classes/ZentaoError.md" + } + ] + }, + { + "text": "Interfaces", + "collapsed": true, + "items": [ + { + "text": "ApiListResponse", + "link": "/reference/interfaces/ApiListResponse.md" + }, + { + "text": "ApiResponse", + "link": "/reference/interfaces/ApiResponse.md" + }, + { + "text": "ClientRequestOptions", + "link": "/reference/interfaces/ClientRequestOptions.md" + }, + { + "text": "DefineModulesOptions", + "link": "/reference/interfaces/DefineModulesOptions.md" + }, + { + "text": "GlobalOptions", + "link": "/reference/interfaces/GlobalOptions.md" + }, + { + "text": "LoginResponse", + "link": "/reference/interfaces/LoginResponse.md" + }, + { + "text": "ModuleAction", + "link": "/reference/interfaces/ModuleAction.md" + }, + { + "text": "ModuleActionPagerGetterMap", + "link": "/reference/interfaces/ModuleActionPagerGetterMap.md" + }, + { + "text": "ModuleActionParam", + "link": "/reference/interfaces/ModuleActionParam.md" + }, + { + "text": "ModuleActionRequestBody", + "link": "/reference/interfaces/ModuleActionRequestBody.md" + }, + { + "text": "ModuleActionResponse", + "link": "/reference/interfaces/ModuleActionResponse.md" + }, + { + "text": "ModuleDefinition", + "link": "/reference/interfaces/ModuleDefinition.md" + }, + { + "text": "Pager", + "link": "/reference/interfaces/Pager.md" + }, + { + "text": "RequestOptions", + "link": "/reference/interfaces/RequestOptions.md" + }, + { + "text": "ResolvedModuleCommand", + "link": "/reference/interfaces/ResolvedModuleCommand.md" + }, + { + "text": "ResponseData", + "link": "/reference/interfaces/ResponseData.md" + }, + { + "text": "ServerConfig", + "link": "/reference/interfaces/ServerConfig.md" + }, + { + "text": "ZentaoClientOptions", + "link": "/reference/interfaces/ZentaoClientOptions.md" + }, + { + "text": "ZentaoProfile", + "link": "/reference/interfaces/ZentaoProfile.md" + }, + { + "text": "ZentaoProfileConfig", + "link": "/reference/interfaces/ZentaoProfileConfig.md" + }, + { + "text": "ZentaoProfileRecord", + "link": "/reference/interfaces/ZentaoProfileRecord.md" + }, + { + "text": "ZentaoProfilesStore", + "link": "/reference/interfaces/ZentaoProfilesStore.md" + } + ] + }, + { + "text": "Type Aliases", + "collapsed": true, + "items": [ + { + "text": "ErrorCode", + "link": "/reference/type-aliases/ErrorCode.md" + }, + { + "text": "HttpMethod", + "link": "/reference/type-aliases/HttpMethod.md" + }, + { + "text": "ListPagerInfo", + "link": "/reference/type-aliases/ListPagerInfo.md" + }, + { + "text": "ModuleActionMethod", + "link": "/reference/type-aliases/ModuleActionMethod.md" + }, + { + "text": "ModuleActionName", + "link": "/reference/type-aliases/ModuleActionName.md" + }, + { + "text": "ModuleActionParamOption", + "link": "/reference/type-aliases/ModuleActionParamOption.md" + }, + { + "text": "ModuleActionResultRender", + "link": "/reference/type-aliases/ModuleActionResultRender.md" + }, + { + "text": "ModuleActionResultRenderType", + "link": "/reference/type-aliases/ModuleActionResultRenderType.md" + }, + { + "text": "ModuleActionResultType", + "link": "/reference/type-aliases/ModuleActionResultType.md" + }, + { + "text": "ModuleActionType", + "link": "/reference/type-aliases/ModuleActionType.md" + }, + { + "text": "ModuleName", + "link": "/reference/type-aliases/ModuleName.md" + } + ] + }, + { + "text": "Variables", + "collapsed": true, + "items": [ + { + "text": "BUILD", + "link": "/reference/variables/BUILD.md" + }, + { + "text": "ERRORS", + "link": "/reference/variables/ERRORS.md" + }, + { + "text": "VERSION", + "link": "/reference/variables/VERSION.md" + }, + { + "text": "ZENTAO_PROFILES_STORAGE_KEY", + "link": "/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md" + } + ] + }, + { + "text": "Functions", + "collapsed": true, + "items": [ + { + "text": "addProfile", + "link": "/reference/functions/addProfile.md" + }, + { + "text": "defineModuleActions", + "link": "/reference/functions/defineModuleActions.md" + }, + { + "text": "defineModules", + "link": "/reference/functions/defineModules.md" + }, + { + "text": "deleteProfile", + "link": "/reference/functions/deleteProfile.md" + }, + { + "text": "getAllProfiles", + "link": "/reference/functions/getAllProfiles.md" + }, + { + "text": "getGlobalOptions", + "link": "/reference/functions/getGlobalOptions.md" + }, + { + "text": "getModule", + "link": "/reference/functions/getModule.md" + }, + { + "text": "getModuleAction", + "link": "/reference/functions/getModuleAction.md" + }, + { + "text": "getProfile", + "link": "/reference/functions/getProfile.md" + }, + { + "text": "getProfileKey", + "link": "/reference/functions/getProfileKey.md" + }, + { + "text": "request", + "link": "/reference/functions/request.md" + }, + { + "text": "setGlobalOptions", + "link": "/reference/functions/setGlobalOptions.md" + }, + { + "text": "switchProfile", + "link": "/reference/functions/switchProfile.md" + } + ] + } +] \ No newline at end of file diff --git a/docs/reference/variables/BUILD.md b/docs/reference/variables/BUILD.md new file mode 100644 index 0000000..7032188 --- /dev/null +++ b/docs/reference/variables/BUILD.md @@ -0,0 +1,7 @@ +[zentao-api](../index.md) / BUILD + +# Variable: BUILD + +> `const` **BUILD**: `string` + +Defined in: [src/version.ts:7](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/version.ts#L7) diff --git a/docs/reference/variables/ERRORS.md b/docs/reference/variables/ERRORS.md new file mode 100644 index 0000000..e963f55 --- /dev/null +++ b/docs/reference/variables/ERRORS.md @@ -0,0 +1,30 @@ +[zentao-api](../index.md) / ERRORS + +# Variable: ERRORS + +> `const` **ERRORS**: `object` + +Defined in: [src/misc/errors.ts:1](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L1) + +## Type Declaration + +| Name | Type | Default value | Defined in | +| ------ | ------ | ------ | ------ | +| `E_HTTP_ERROR` | `"HTTP request failed: {status} {statusText}"` | `'HTTP request failed: {status} {statusText}'` | [src/misc/errors.ts:4](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L4) | +| `E_INSECURE_BROWSER` | `"The insecure option is only supported in Node.js runtimes."` | `'The insecure option is only supported in Node.js runtimes.'` | [src/misc/errors.ts:7](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L7) | +| `E_INVALID_ACTION` | `"Unknown action: {module}-{action}"` | `'Unknown action: {module}-{action}'` | [src/misc/errors.ts:15](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L15) | +| `E_INVALID_ACTION_DEFINITION` | `"Invalid module action definition."` | `'Invalid module action definition.'` | [src/misc/errors.ts:17](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L17) | +| `E_INVALID_BASE_URL` | `"Invalid ZenTao baseUrl."` | `'Invalid ZenTao baseUrl.'` | [src/misc/errors.ts:2](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L2) | +| `E_INVALID_MODULE` | `"Unknown module: {module}"` | `'Unknown module: {module}'` | [src/misc/errors.ts:14](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L14) | +| `E_INVALID_MODULE_DEFINITION` | `"Invalid module definition."` | `'Invalid module definition.'` | [src/misc/errors.ts:16](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L16) | +| `E_INVALID_PROFILE` | `"Invalid ZenTao profile."` | `'Invalid ZenTao profile.'` | [src/misc/errors.ts:9](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L9) | +| `E_INVALID_REQUEST_NAME` | "Request name must use the form \"moduleName/methodName\"." | `'Request name must use the form "moduleName/methodName".'` | [src/misc/errors.ts:19](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L19) | +| `E_LOGIN_FAILED` | `"ZenTao login failed."` | `'ZenTao login failed.'` | [src/misc/errors.ts:8](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L8) | +| `E_MISSING_PARAM` | `"Missing required parameter: {param}"` | `'Missing required parameter: {param}'` | [src/misc/errors.ts:18](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L18) | +| `E_NETWORK_ERROR` | `"Network request failed: {message}"` | `'Network request failed: {message}'` | [src/misc/errors.ts:5](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L5) | +| `E_NO_GLOBAL_CLIENT` | `"No global client configured. Call ZentaoClient.init() or pass options.client."` | `'No global client configured. Call ZentaoClient.init() or pass options.client.'` | [src/misc/errors.ts:3](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L3) | +| `E_NO_PROFILE` | `"No ZenTao profile is configured."` | `'No ZenTao profile is configured.'` | [src/misc/errors.ts:10](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L10) | +| `E_PROFILE_NOT_FOUND` | `"ZenTao profile not found: {profileKey}"` | `'ZenTao profile not found: {profileKey}'` | [src/misc/errors.ts:11](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L11) | +| `E_PROFILE_STORAGE_INVALID` | `"ZenTao profile storage is not valid JSON."` | `'ZenTao profile storage is not valid JSON.'` | [src/misc/errors.ts:12](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L12) | +| `E_PROFILE_STORAGE_UNAVAILABLE` | `"ZenTao profile storage is unavailable in this runtime."` | `'ZenTao profile storage is unavailable in this runtime.'` | [src/misc/errors.ts:13](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L13) | +| `E_TIMEOUT` | `"Request timed out."` | `'Request timed out.'` | [src/misc/errors.ts:6](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L6) | diff --git a/docs/reference/variables/VERSION.md b/docs/reference/variables/VERSION.md new file mode 100644 index 0000000..8762a10 --- /dev/null +++ b/docs/reference/variables/VERSION.md @@ -0,0 +1,7 @@ +[zentao-api](../index.md) / VERSION + +# Variable: VERSION + +> `const` **VERSION**: `string` + +Defined in: [src/version.ts:8](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/version.ts#L8) diff --git a/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md b/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md new file mode 100644 index 0000000..05ff06f --- /dev/null +++ b/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md @@ -0,0 +1,7 @@ +[zentao-api](../index.md) / ZENTAO\_PROFILES\_STORAGE\_KEY + +# Variable: ZENTAO\_PROFILES\_STORAGE\_KEY + +> `const` **ZENTAO\_PROFILES\_STORAGE\_KEY**: `"ZENTAO_PROFILES"` = `'ZENTAO_PROFILES'` + +Defined in: [src/profiles/index.ts:10](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L10) diff --git a/docs/zentao-api/bug.md b/docs/zentao-api/bug.md new file mode 100644 index 0000000..fcb1fc0 --- /dev/null +++ b/docs/zentao-api/bug.md @@ -0,0 +1,585 @@ +# Bug (bug) + +Bug管理,支持获取Bug列表,支持获取产品/项目/执行下的Bug、创建Bug、获取Bug详情、修改Bug、删除Bug、激活Bug、关闭Bug、解决Bug + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取Bug列表,支持获取产品/项目/执行下的Bug | `GET` | `/{scope}/{scopeID}/bugs` | +| `create` | 创建Bug | `POST` | `/bugs` | +| `get` | 获取Bug详情 | `GET` | `/bugs/{bugID}` | +| `update` | 修改Bug | `PUT` | `/bugs/{bugID}` | +| `delete` | 删除Bug | `DELETE` | `/bugs/{bugID}` | +| `activate` | 激活Bug | `PUT` | `/bugs/{bugID}/activate` | +| `close` | 关闭Bug | `PUT` | `/bugs/{bugID}/close` | +| `resolve` | 解决Bug | `PUT` | `/bugs/{bugID}/resolve` | + +## 获取Bug列表,支持获取产品/项目/执行下的Bug + +- SDK 调用:`request("bug/list", params)` +- HTTP:`GET /{scope}/{scopeID}/bugs` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | Bug范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `unclosed` | 状态,默认是unclosed
`all` 全部
`unclosed` 未关闭
`assignedtome` 指派给我
`openedbyme` 我创建
`assignedbyme` 由我指派 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`bugs` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/list", { + "scope": "", + "scopeID": 1, + "browseType": "unclosed", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建Bug + +- SDK 调用:`request("bug/create", params)` +- HTTP:`POST /bugs` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "title": { + "type": "string", + "description": "Bug标题" + }, + "openedBuild": { + "type": "array", + "items": { + "type": "string" + }, + "description": "影响版本,主干是trunk,其他版本使用版本ID" + }, + "project": { + "type": "integer", + "description": "所属项目", + "format": "int32" + }, + "execution": { + "type": "integer", + "description": "所属执行", + "format": "int32" + }, + "severity": { + "type": "integer", + "description": "严重程度,默认是3", + "format": "int32" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "type": { + "type": "string", + "description": "Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)" + }, + "steps": { + "type": "string", + "description": "重现步骤" + }, + "story": { + "type": "integer", + "description": "相关需求", + "format": "int32" + } + }, + "required": [ + "productID", + "title", + "openedBuild" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "title": "", + "openedBuild": [ + "" + ], + "project": 1, + "execution": 1, + "severity": 1, + "pri": 1, + "type": "", + "steps": "", + "story": 1 +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/create", { + "productID": 1, + "title": "", + "openedBuild": [ + "" + ], + "project": 1, + "execution": 1, + "severity": 1, + "pri": 1, + "type": "", + "steps": "", + "story": 1 +}); +``` +## 获取Bug详情 + +- SDK 调用:`request("bug/get", params)` +- HTTP:`GET /bugs/{bugID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `bugID` | Bug ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`bug` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/get", { + "bugID": 1 +}); +``` +## 修改Bug + +- SDK 调用:`request("bug/update", params)` +- HTTP:`PUT /bugs/{bugID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `bugID` | Bug ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "Bug标题" + }, + "severity": { + "type": "integer", + "description": "严重程度,默认是3", + "format": "int32" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "type": { + "type": "string", + "description": "Bug类型(codeerror 代码错误 | config 配置相关 | install 安装部署 | security 安全相关 | performance 性能问题 | standard 标准规范 | automation 测试脚本 | designdefect 设计缺陷 | others 其他)" + }, + "openedBuild": { + "type": "array", + "items": { + "type": "string" + }, + "description": "影响版本,主干是trunk,其他版本使用版本ID" + }, + "steps": { + "type": "string", + "description": "重现步骤" + }, + "project": { + "type": "integer", + "description": "所属项目", + "format": "int32" + }, + "execution": { + "type": "integer", + "description": "所属执行", + "format": "int32" + }, + "story": { + "type": "integer", + "description": "相关需求", + "format": "int32" + } + } +} +``` + +示例: + +```json +{ + "title": "", + "severity": 1, + "pri": 1, + "type": "", + "openedBuild": [ + "" + ], + "steps": "", + "project": 1, + "execution": 1, + "story": 1 +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/update", { + "bugID": 1, + "title": "", + "severity": 1, + "pri": 1, + "type": "", + "openedBuild": [ + "" + ], + "steps": "", + "project": 1, + "execution": 1, + "story": 1 +}); +``` +## 删除Bug + +- SDK 调用:`request("bug/delete", params)` +- HTTP:`DELETE /bugs/{bugID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `bugID` | Bug ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/delete", { + "bugID": 1 +}); +``` +## 激活Bug + +- SDK 调用:`request("bug/activate", params)` +- HTTP:`PUT /bugs/{bugID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `bugID` | Bug ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "openedBuild": { + "type": "array", + "items": { + "type": "string" + }, + "description": "影响版本, trunk为主干" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "openedBuild": [ + "" + ], + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/activate", { + "bugID": 1, + "openedBuild": [ + "" + ], + "assignedTo": "", + "comment": "" +}); +``` +## 关闭Bug + +- SDK 调用:`request("bug/close", params)` +- HTTP:`PUT /bugs/{bugID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `bugID` | Bug ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/close", { + "bugID": 1, + "comment": "" +}); +``` +## 解决Bug + +- SDK 调用:`request("bug/resolve", params)` +- HTTP:`PUT /bugs/{bugID}/resolve` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `bugID` | Bug ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "resolution": { + "type": "string", + "description": "fixed 已解决 | notrepro 无法重现 | bydesign 设计如此 | duplicate 重复Bug | external 外部原因| postponed 延期处理 | willnotfix 不予解决 | tostory 转为需求" + }, + "resolvedDate": { + "type": "string", + "description": "解决日期,默认今天" + }, + "resolvedBuild": { + "type": "string", + "description": "解决版本, trunk为主干" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "resolution" + ] +} +``` + +示例: + +```json +{ + "resolution": "", + "resolvedDate": "", + "resolvedBuild": "", + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("bug/resolve", { + "bugID": 1, + "resolution": "", + "resolvedDate": "", + "resolvedBuild": "", + "assignedTo": "", + "comment": "" +}); +``` diff --git a/docs/zentao-api/build.md b/docs/zentao-api/build.md new file mode 100644 index 0000000..25e1ab1 --- /dev/null +++ b/docs/zentao-api/build.md @@ -0,0 +1,310 @@ +# 版本 (build) + +版本管理,支持获取版本列表,支持获取项目/执行下的版本、创建版本/构建、修改版本、删除版本 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取版本列表,支持获取项目/执行下的版本 | `GET` | `/{scope}/{scopeID}/builds` | +| `create` | 创建版本/构建 | `POST` | `/builds` | +| `update` | 修改版本 | `PUT` | `/builds/{buildID}` | +| `delete` | 删除版本 | `DELETE` | `/builds/{buildID}` | + +## 获取版本列表,支持获取项目/执行下的版本 + +- SDK 调用:`request("build/list", params)` +- HTTP:`GET /{scope}/{scopeID}/builds` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 版本范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`builds` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("build/list", { + "scope": "", + "scopeID": 1 +}); +``` +## 创建版本/构建 + +- SDK 调用:`request("build/create", params)` +- HTTP:`POST /builds` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "executionID": { + "type": "integer", + "description": "所属执行/迭代", + "format": "int32" + }, + "product": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "name": { + "type": "string", + "description": "构建名称" + }, + "system": { + "type": "integer", + "description": "所属应用", + "format": "int32" + }, + "builder": { + "type": "string", + "description": "构建者" + }, + "date": { + "type": "string", + "description": "打包日期" + }, + "scmPath": { + "type": "string", + "description": "源代码地址" + }, + "filePath": { + "type": "string", + "description": "下载地址" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "executionID", + "product", + "name", + "system", + "builder", + "date" + ] +} +``` + +示例: + +```json +{ + "executionID": 1, + "product": 1, + "name": "", + "system": 1, + "builder": "", + "date": "", + "scmPath": "", + "filePath": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("build/create", { + "executionID": 1, + "product": 1, + "name": "", + "system": 1, + "builder": "", + "date": "", + "scmPath": "", + "filePath": "", + "desc": "" +}); +``` +## 修改版本 + +- SDK 调用:`request("build/update", params)` +- HTTP:`PUT /builds/{buildID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `buildID` | 版本ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "execution": { + "type": "integer", + "description": "所属执行/迭代", + "format": "int32" + }, + "product": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "name": { + "type": "string", + "description": "构建名称" + }, + "system": { + "type": "integer", + "description": "所属应用", + "format": "int32" + }, + "builder": { + "type": "string", + "description": "构建者" + }, + "date": { + "type": "string", + "description": "打包日期" + }, + "scmPath": { + "type": "string", + "description": "源代码地址" + }, + "filePath": { + "type": "string", + "description": "下载地址" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "execution", + "product", + "name", + "system", + "builder", + "date" + ] +} +``` + +示例: + +```json +{ + "execution": 1, + "product": 1, + "name": "", + "system": 1, + "builder": "", + "date": "", + "scmPath": "", + "filePath": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("build/update", { + "buildID": 1, + "execution": 1, + "product": 1, + "name": "", + "system": 1, + "builder": "", + "date": "", + "scmPath": "", + "filePath": "", + "desc": "" +}); +``` +## 删除版本 + +- SDK 调用:`request("build/delete", params)` +- HTTP:`DELETE /builds/{buildID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `buildID` | 版本ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("build/delete", { + "buildID": 1 +}); +``` diff --git a/docs/zentao-api/epic.md b/docs/zentao-api/epic.md new file mode 100644 index 0000000..2444d14 --- /dev/null +++ b/docs/zentao-api/epic.md @@ -0,0 +1,582 @@ +# 业务需求 (epic) + +业务需求管理,支持获取业务需求列表,支持获取产品下的业务需求、创建业务需求、获取业务需求详情、修改业务需求、删除业务需求、激活业务需求、变更业务需求、关闭业务需求 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取业务需求列表,支持获取产品下的业务需求 | `GET` | `/{scope}/{scopeID}/epics` | +| `create` | 创建业务需求 | `POST` | `/epics` | +| `get` | 获取业务需求详情 | `GET` | `/epics/{storyID}` | +| `update` | 修改业务需求 | `PUT` | `/epics/{epicID}` | +| `delete` | 删除业务需求 | `DELETE` | `/epics/{epicID}` | +| `activate` | 激活业务需求 | `PUT` | `/epics/{epicID}/activate` | +| `change` | 变更业务需求 | `PUT` | `/epics/{epicID}/change` | +| `close` | 关闭业务需求 | `PUT` | `/epics/{epicID}/close` | + +## 获取业务需求列表,支持获取产品下的业务需求 + +- SDK 调用:`request("epic/list", params)` +- HTTP:`GET /{scope}/{scopeID}/epics` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 业务需求范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `unclosed` | 状态,默认是unclosed
`allstory` 全部
`assignedtome` 指派给我
`openedbyme` 我创建
`reviewbyme` 待我评审
`draftstory` 草稿 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`epics` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/list", { + "scope": "", + "scopeID": 1, + "browseType": "unclosed", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建业务需求 + +- SDK 调用:`request("epic/create", params)` +- HTTP:`POST /epics` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "产品ID", + "format": "int32" + }, + "title": { + "type": "string" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "parent": { + "type": "integer", + "description": "父业务需求", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "spec": { + "type": "string", + "description": "业务需求描述" + }, + "category": { + "type": "integer", + "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)", + "format": "int32" + }, + "source": { + "type": "string", + "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)" + }, + "verify": { + "type": "string", + "description": "验收标准" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人,如果设置必须评审,必须填写" + } + }, + "required": [ + "productID", + "title" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "spec": "", + "category": 1, + "source": "", + "verify": "", + "assignedTo": "", + "reviewer": [ + "" + ] +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/create", { + "productID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "spec": "", + "category": 1, + "source": "", + "verify": "", + "assignedTo": "", + "reviewer": [ + "" + ] +}); +``` +## 获取业务需求详情 + +- SDK 调用:`request("epic/get", params)` +- HTTP:`GET /epics/{storyID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`epic` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/get", { + "storyID": 1 +}); +``` +## 修改业务需求 + +- SDK 调用:`request("epic/update", params)` +- HTTP:`PUT /epics/{epicID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `epicID` | 业务需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "需求名称" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "parent": { + "type": "integer", + "description": "父业务需求", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "category": { + "type": "integer", + "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)", + "format": "int32" + }, + "source": { + "type": "string", + "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + } + }, + "required": [ + "title" + ] +} +``` + +示例: + +```json +{ + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "category": 1, + "source": "", + "assignedTo": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/update", { + "epicID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "category": 1, + "source": "", + "assignedTo": "" +}); +``` +## 删除业务需求 + +- SDK 调用:`request("epic/delete", params)` +- HTTP:`DELETE /epics/{epicID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `epicID` | 业务需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/delete", { + "epicID": 1 +}); +``` +## 激活业务需求 + +- SDK 调用:`request("epic/activate", params)` +- HTTP:`PUT /epics/{epicID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `epicID` | 业务需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/activate", { + "epicID": 1, + "assignedTo": "", + "comment": "" +}); +``` +## 变更业务需求 + +- SDK 调用:`request("epic/change", params)` +- HTTP:`PUT /epics/{epicID}/change` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `epicID` | 业务需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "需求名称" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人员" + }, + "spec": { + "type": "string", + "description": "需求描述" + }, + "verify": { + "type": "string", + "description": "验收标准" + } + }, + "required": [ + "reviewer" + ] +} +``` + +示例: + +```json +{ + "title": "", + "reviewer": [ + "" + ], + "spec": "", + "verify": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/change", { + "epicID": 1, + "title": "", + "reviewer": [ + "" + ], + "spec": "", + "verify": "" +}); +``` +## 关闭业务需求 + +- SDK 调用:`request("epic/close", params)` +- HTTP:`PUT /epics/{epicID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `epicID` | 业务需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "closedReason": { + "type": "string", + "description": "关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "closedReason" + ] +} +``` + +示例: + +```json +{ + "closedReason": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("epic/close", { + "epicID": 1, + "closedReason": "", + "comment": "" +}); +``` diff --git a/docs/zentao-api/execution.md b/docs/zentao-api/execution.md new file mode 100644 index 0000000..89815f2 --- /dev/null +++ b/docs/zentao-api/execution.md @@ -0,0 +1,418 @@ +# 执行 (execution) + +执行管理,支持获取执行列表、创建执行、获取执行详情、修改执行、删除执行 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取执行列表 | `GET` | `/executions` | +| `create` | 创建执行 | `POST` | `/executions` | +| `get` | 获取执行详情 | `GET` | `/executions/{executionID}` | +| `update` | 修改执行 | `PUT` | `/executions/{executionID}` | +| `delete` | 删除执行 | `DELETE` | `/executions/{executionID}` | + +## 获取执行列表 + +- SDK 调用:`request("execution/list", params)` +- HTTP:`GET /executions` +- 动作类型:`list` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `status` | string | 否 | `undone` | 执行状态,默认是undone
`all` 全部
`undone` 未完成
`wait` 未开始
`doing` 进行中 | +| `orderBy` | string | 否 | | 排序
`rawID_asc` RAWID 升序
`rawID_desc` RAWID 降序
`nameCol_asc` 名称 升序
`nameCol_desc` 名称 降序
`begin_asc` 计划开始 升序
`begin_desc` 计划开始 降序
`end_asc` 计划结束 升序
`end_desc` 计划结束 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`executions` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("execution/list", { + "status": "undone", + "orderBy": "rawID_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建执行 + +- SDK 调用:`request("execution/create", params)` +- HTTP:`POST /executions` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "project": { + "type": "integer", + "description": "所属项目", + "format": "int32" + }, + "name": { + "type": "string", + "description": "迭代名称" + }, + "lifetime": { + "type": "string", + "description": "执行类型(short 短期 | long 长期 | ops 运维)" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "days": { + "type": "integer", + "description": "可用工作日", + "format": "int32" + }, + "products": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联产品" + }, + "plans": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联计划,必须是产品+planID的二维数组" + }, + "PO": { + "type": "string", + "description": "产品负责人" + }, + "QD": { + "type": "string", + "description": "测试负责人" + }, + "PM": { + "type": "string", + "description": "执行负责人" + }, + "RD": { + "type": "string", + "description": "发布负责人" + }, + "acl": { + "type": "string", + "description": "访问控制(open 公开 | private 私有)" + } + }, + "required": [ + "project", + "name", + "begin", + "end" + ] +} +``` + +示例: + +```json +{ + "project": 1, + "name": "", + "lifetime": "", + "begin": "", + "end": "", + "days": 1, + "products": [ + "" + ], + "plans": [ + "" + ], + "PO": "", + "QD": "", + "PM": "", + "RD": "", + "acl": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("execution/create", { + "project": 1, + "name": "", + "lifetime": "", + "begin": "", + "end": "", + "days": 1, + "products": [ + "" + ], + "plans": [ + "" + ], + "PO": "", + "QD": "", + "PM": "", + "RD": "", + "acl": "" +}); +``` +## 获取执行详情 + +- SDK 调用:`request("execution/get", params)` +- HTTP:`GET /executions/{executionID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `executionID` | 执行ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`execution` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("execution/get", { + "executionID": 1 +}); +``` +## 修改执行 + +- SDK 调用:`request("execution/update", params)` +- HTTP:`PUT /executions/{executionID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `executionID` | 执行ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "project": { + "type": "integer", + "description": "所属项目", + "format": "int32" + }, + "name": { + "type": "string", + "description": "迭代名称" + }, + "lifetime": { + "type": "string", + "description": "执行类型(short 短期 | long 长期 | ops 运维)" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "days": { + "type": "integer", + "description": "可用工作日", + "format": "int32" + }, + "products": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联产品" + }, + "plans": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联计划,必须是产品+planID的二维数组" + }, + "PO": { + "type": "string", + "description": "产品负责人" + }, + "QD": { + "type": "string", + "description": "测试负责人" + }, + "PM": { + "type": "string", + "description": "执行负责人" + }, + "RD": { + "type": "string", + "description": "发布负责人" + }, + "acl": { + "type": "string", + "description": "访问控制(open 公开 | private 私有)" + } + }, + "required": [ + "name", + "begin", + "end" + ] +} +``` + +示例: + +```json +{ + "project": 1, + "name": "", + "lifetime": "", + "begin": "", + "end": "", + "days": 1, + "products": [ + "" + ], + "plans": [ + "" + ], + "PO": "", + "QD": "", + "PM": "", + "RD": "", + "acl": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("execution/update", { + "executionID": 1, + "project": 1, + "name": "", + "lifetime": "", + "begin": "", + "end": "", + "days": 1, + "products": [ + "" + ], + "plans": [ + "" + ], + "PO": "", + "QD": "", + "PM": "", + "RD": "", + "acl": "" +}); +``` +## 删除执行 + +- SDK 调用:`request("execution/delete", params)` +- HTTP:`DELETE /executions/{executionID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `executionID` | 执行ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("execution/delete", { + "executionID": 1 +}); +``` diff --git a/docs/zentao-api/feedback.md b/docs/zentao-api/feedback.md new file mode 100644 index 0000000..fecb73d --- /dev/null +++ b/docs/zentao-api/feedback.md @@ -0,0 +1,449 @@ +# 反馈 (feedback) + +反馈管理,支持获取反馈列表,支持获取产品下的反馈、创建反馈、获取反馈详情、修改反馈、删除反馈、激活反馈、关闭反馈 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取反馈列表,支持获取产品下的反馈 | `GET` | `/{scope}/{scopeID}/feedbacks` | +| `create` | 创建反馈 | `POST` | `/feedbacks` | +| `get` | 获取反馈详情 | `GET` | `/feedbacks/{feedbackID}` | +| `update` | 修改反馈 | `PUT` | `/feedbacks/{feedbackID}` | +| `delete` | 删除反馈 | `DELETE` | `/feedbacks/{feedbackID}` | +| `activate` | 激活反馈 | `PUT` | `/feedbacks/{feedbackID}/activate` | +| `close` | 关闭反馈 | `PUT` | `/feedbacks/{feedbackID}/close` | + +## 获取反馈列表,支持获取产品下的反馈 + +- SDK 调用:`request("feedback/list", params)` +- HTTP:`GET /{scope}/{scopeID}/feedbacks` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 反馈范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `wait` | 状态,默认是wait
`all` 全部
`wait` 待处理
`doing` 处理中
`toclosed` 待关闭
`review` 待评审
`assigntome` 指派给我
`openedbyme` 由我反馈 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`feedbacks` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/list", { + "scope": "", + "scopeID": 1, + "browseType": "wait", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建反馈 + +- SDK 调用:`request("feedback/create", params)` +- HTTP:`POST /feedbacks` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "product": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "title": { + "type": "string", + "description": "标题" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "type": { + "type": "string", + "description": "类型(story 需求 | task 任务 | bug Bug | todo 待办 | advice 建议 | issue 问题 | risk 风险 | opportunity 机会)" + }, + "desc": { + "type": "string", + "description": "描述" + }, + "feedbackBy": { + "type": "string", + "description": "反馈者" + }, + "source": { + "type": "string", + "description": "来源" + } + }, + "required": [ + "product", + "title" + ] +} +``` + +示例: + +```json +{ + "product": 1, + "title": "", + "module": 1, + "type": "", + "desc": "", + "feedbackBy": "", + "source": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/create", { + "product": 1, + "title": "", + "module": 1, + "type": "", + "desc": "", + "feedbackBy": "", + "source": "" +}); +``` +## 获取反馈详情 + +- SDK 调用:`request("feedback/get", params)` +- HTTP:`GET /feedbacks/{feedbackID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `feedbackID` | 反馈ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`feedback` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/get", { + "feedbackID": 1 +}); +``` +## 修改反馈 + +- SDK 调用:`request("feedback/update", params)` +- HTTP:`PUT /feedbacks/{feedbackID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `feedbackID` | 反馈ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "product": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "title": { + "type": "string", + "description": "标题" + }, + "type": { + "type": "string", + "description": "类型(story 需求 | task 任务 | bug Bug | todo 待办 | advice 建议 | issue 问题 | risk 风险 | opportunity 机会)" + }, + "desc": { + "type": "string", + "description": "描述" + }, + "feedbackBy": { + "type": "string", + "description": "反馈者" + }, + "source": { + "type": "string", + "description": "来源" + } + }, + "required": [ + "product", + "title" + ] +} +``` + +示例: + +```json +{ + "product": 1, + "module": 1, + "title": "", + "type": "", + "desc": "", + "feedbackBy": "", + "source": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/update", { + "feedbackID": 1, + "product": 1, + "module": 1, + "title": "", + "type": "", + "desc": "", + "feedbackBy": "", + "source": "" +}); +``` +## 删除反馈 + +- SDK 调用:`request("feedback/delete", params)` +- HTTP:`DELETE /feedbacks/{feedbackID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `feedbackID` | 反馈ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/delete", { + "feedbackID": 1 +}); +``` +## 激活反馈 + +- SDK 调用:`request("feedback/activate", params)` +- HTTP:`PUT /feedbacks/{feedbackID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `feedbackID` | 反馈ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/activate", { + "feedbackID": 1, + "assignedTo": "", + "comment": "" +}); +``` +## 关闭反馈 + +- SDK 调用:`request("feedback/close", params)` +- HTTP:`PUT /feedbacks/{feedbackID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `feedbackID` | 反馈ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "closedReason": { + "type": "string", + "description": "关闭原因(commented 已处理 | repeat 重复 | refuse 不予采纳)" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "closedReason" + ] +} +``` + +示例: + +```json +{ + "closedReason": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("feedback/close", { + "feedbackID": 1, + "closedReason": "", + "comment": "" +}); +``` diff --git a/docs/zentao-api/file.md b/docs/zentao-api/file.md new file mode 100644 index 0000000..df27379 --- /dev/null +++ b/docs/zentao-api/file.md @@ -0,0 +1,100 @@ +# 附件 (file) + +附件管理,支持编辑附件,修改附件的名称、删除附件 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `create` | 编辑附件,修改附件的名称 | `POST` | `/files` | +| `delete` | 删除附件 | `DELETE` | `/files/{fileID}` | + +## 编辑附件,修改附件的名称 + +- SDK 调用:`request("file/create", params)` +- HTTP:`POST /files` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "fileName": { + "type": "string", + "description": "附件名称" + } + }, + "required": [ + "fileName" + ] +} +``` + +示例: + +```json +{ + "fileName": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("file/create", { + "fileName": "" +}); +``` +## 删除附件 + +- SDK 调用:`request("file/delete", params)` +- HTTP:`DELETE /files/{fileID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `fileID` | 附件ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("file/delete", { + "fileID": 1 +}); +``` diff --git a/docs/zentao-api/index.md b/docs/zentao-api/index.md new file mode 100644 index 0000000..9406cdd --- /dev/null +++ b/docs/zentao-api/index.md @@ -0,0 +1,25 @@ +# ZenTao API + +本节从 SDK 当前运行时模块注册表动态生成,内容对应 `request("module/action")` 可调用的模块动作。 + +| 模块 | SDK 名称 | 动作数 | 说明 | +| --- | --- | --- | --- | +| [用户](./user.md) | `user` | 5 | 用户管理,支持获取用户列表、创建用户、获取用户详情、修改用户信息、删除用户 | +| [项目集](./program.md) | `program` | 5 | 项目集管理,支持获取项目集列表、创建项目集、获取项目集详情、修改项目集、删除项目集 | +| [产品](./product.md) | `product` | 5 | 产品管理,支持获取产品列表、创建产品、获取产品详情、修改产品、删除产品 | +| [项目](./project.md) | `project` | 4 | 项目管理,支持获取项目列表、创建项目、修改项目、删除项目 | +| [执行](./execution.md) | `execution` | 5 | 执行管理,支持获取执行列表、创建执行、获取执行详情、修改执行、删除执行 | +| [产品计划](./productplan.md) | `productplan` | 5 | 产品计划管理,支持获取产品计划列表,支持获取产品下的产品计划、创建产品计划、获取产品计划详情、修改产品计划、删除产品计划 | +| [需求](./story.md) | `story` | 8 | 需求管理,支持获取需求列表,支持获取产品/项目/执行下的需求、创建需求、获取需求详情、修改需求、删除需求、激活需求、变更需求、关闭需求 | +| [业务需求](./epic.md) | `epic` | 8 | 业务需求管理,支持获取业务需求列表,支持获取产品下的业务需求、创建业务需求、获取业务需求详情、修改业务需求、删除业务需求、激活业务需求、变更业务需求、关闭业务需求 | +| [用户需求](./requirement.md) | `requirement` | 8 | 用户需求管理,支持获取用户需求列表,支持获取产品下的用户需求、创建用户需求、获取用户需求详情、修改用户需求、删除用户需求、激活用户需求、变更用户需求、关闭用户需求 | +| [Bug](./bug.md) | `bug` | 8 | Bug管理,支持获取Bug列表,支持获取产品/项目/执行下的Bug、创建Bug、获取Bug详情、修改Bug、删除Bug、激活Bug、关闭Bug、解决Bug | +| [测试用例](./testcase.md) | `testcase` | 5 | 测试用例管理,支持获取测试用例列表,支持获取产品/项目/执行下的测试用例、创建测试用例、获取测试用例详情、修改测试用例、删除测试用例 | +| [任务](./task.md) | `task` | 9 | 任务管理,支持获取任务列表,支持获取执行下的任务、创建任务、获取任务详情、修改任务、删除任务、激活任务、关闭任务、完成任务、启动任务 | +| [反馈](./feedback.md) | `feedback` | 7 | 反馈管理,支持获取反馈列表,支持获取产品下的反馈、创建反馈、获取反馈详情、修改反馈、删除反馈、激活反馈、关闭反馈 | +| [工单](./ticket.md) | `ticket` | 7 | 工单管理,支持获取工单列表,支持获取产品下的工单、创建工单、获取工单详情、修改工单、删除工单、激活工单、关闭工单 | +| [应用](./system.md) | `system` | 3 | 应用管理,支持获取应用列表,支持获取产品下的应用、创建应用、修改应用 | +| [版本](./build.md) | `build` | 4 | 版本管理,支持获取版本列表,支持获取项目/执行下的版本、创建版本/构建、修改版本、删除版本 | +| [测试单](./testtask.md) | `testtask` | 4 | 测试单管理,支持获取测试单列表,支持获取产品/项目/执行下的测试单、创建测试单、修改测试单、删除测试单 | +| [发布](./release.md) | `release` | 4 | 发布管理,支持获取发布列表,支持获取产品下的发布、创建发布、修改发布、删除发布 | +| [附件](./file.md) | `file` | 2 | 附件管理,支持编辑附件,修改附件的名称、删除附件 | diff --git a/docs/zentao-api/product.md b/docs/zentao-api/product.md new file mode 100644 index 0000000..03d0e73 --- /dev/null +++ b/docs/zentao-api/product.md @@ -0,0 +1,377 @@ +# 产品 (product) + +产品管理,支持获取产品列表、创建产品、获取产品详情、修改产品、删除产品 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取产品列表 | `GET` | `/products` | +| `create` | 创建产品 | `POST` | `/products` | +| `get` | 获取产品详情 | `GET` | `/products/{productID}` | +| `update` | 修改产品 | `PUT` | `/products/{productID}` | +| `delete` | 删除产品 | `DELETE` | `/products/{productID}` | + +## 获取产品列表 + +- SDK 调用:`request("product/list", params)` +- HTTP:`GET /products` +- 动作类型:`list` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | | 浏览类型
`all` 全部
`noclosed` 未关闭
`closed` 已结束 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 名称 升序
`title_desc` 名称 降序
`begin_asc` 计划开始 升序
`begin_desc` 计划开始 降序
`end_asc` 计划结束 升序
`end_desc` 计划结束 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`products` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("product/list", { + "browseType": "all", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建产品 + +- SDK 调用:`request("product/create", params)` +- HTTP:`POST /products` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "产品名称" + }, + "program": { + "type": "integer", + "description": "所属项目集", + "format": "int32" + }, + "line": { + "type": "integer", + "description": "所属产品线", + "format": "int32" + }, + "type": { + "type": "string", + "description": "类型(normal 正常 | branch 多分支 | platform 多平台)" + }, + "PO": { + "type": "string", + "description": "产品负责人" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人" + }, + "desc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "产品描述" + }, + "QD": { + "type": "string", + "description": "测试负责人" + }, + "RD": { + "type": "string", + "description": "发布负责人" + }, + "acl": { + "type": "string", + "description": "访问控制(open 公开 | private 私有)" + } + }, + "required": [ + "name" + ] +} +``` + +示例: + +```json +{ + "name": "", + "program": 1, + "line": 1, + "type": "", + "PO": "", + "reviewer": [ + "" + ], + "desc": [ + "" + ], + "QD": "", + "RD": "", + "acl": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("product/create", { + "name": "", + "program": 1, + "line": 1, + "type": "", + "PO": "", + "reviewer": [ + "" + ], + "desc": [ + "" + ], + "QD": "", + "RD": "", + "acl": "" +}); +``` +## 获取产品详情 + +- SDK 调用:`request("product/get", params)` +- HTTP:`GET /products/{productID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `productID` | 产品ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`product` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("product/get", { + "productID": 1 +}); +``` +## 修改产品 + +- SDK 调用:`request("product/update", params)` +- HTTP:`PUT /products/{productID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `productID` | 产品ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "产品名称" + }, + "program": { + "type": "integer", + "description": "所属项目集", + "format": "int32" + }, + "line": { + "type": "integer", + "description": "所属产品线", + "format": "int32" + }, + "type": { + "type": "string", + "description": "类型(normal 正常 | branch 多分支 | platform 多平台)" + }, + "PO": { + "type": "string", + "description": "产品负责人" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人" + }, + "desc": { + "type": "array", + "items": { + "type": "string" + }, + "description": "产品描述" + }, + "QD": { + "type": "string", + "description": "测试负责人" + }, + "RD": { + "type": "string", + "description": "发布负责人" + }, + "acl": { + "type": "string", + "description": "访问控制(open 公开 | private 私有)" + } + }, + "required": [ + "name" + ] +} +``` + +示例: + +```json +{ + "name": "", + "program": 1, + "line": 1, + "type": "", + "PO": "", + "reviewer": [ + "" + ], + "desc": [ + "" + ], + "QD": "", + "RD": "", + "acl": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("product/update", { + "productID": 1, + "name": "", + "program": 1, + "line": 1, + "type": "", + "PO": "", + "reviewer": [ + "" + ], + "desc": [ + "" + ], + "QD": "", + "RD": "", + "acl": "" +}); +``` +## 删除产品 + +- SDK 调用:`request("product/delete", params)` +- HTTP:`DELETE /products/{productID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `productID` | 产品ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("product/delete", { + "productID": 1 +}); +``` diff --git a/docs/zentao-api/productplan.md b/docs/zentao-api/productplan.md new file mode 100644 index 0000000..b7ae451 --- /dev/null +++ b/docs/zentao-api/productplan.md @@ -0,0 +1,314 @@ +# 产品计划 (productplan) + +产品计划管理,支持获取产品计划列表,支持获取产品下的产品计划、创建产品计划、获取产品计划详情、修改产品计划、删除产品计划 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取产品计划列表,支持获取产品下的产品计划 | `GET` | `/{scope}/{scopeID}/productplans` | +| `create` | 创建产品计划 | `POST` | `/productplans` | +| `get` | 获取产品计划详情 | `GET` | `/productplans/{planID}` | +| `update` | 修改产品计划 | `PUT` | `/productplans/{productplanID}` | +| `delete` | 删除产品计划 | `DELETE` | `/productplans/{productplanID}` | + +## 获取产品计划列表,支持获取产品下的产品计划 + +- SDK 调用:`request("productplan/list", params)` +- HTTP:`GET /{scope}/{scopeID}/productplans` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 产品计划范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `undone` | 执行状态,默认是undone
`all` 全部
`undone` 未完成
`wait` 未开始
`doing` 进行中 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 名称 升序
`title_desc` 名称 降序
`begin_asc` 开始日期 升序
`begin_desc` 开始日期 降序
`end_asc` 结束日期 升序
`end_desc` 结束日期 降序
`status_asc` 状态 升序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`productplans` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("productplan/list", { + "scope": "", + "scopeID": 1, + "browseType": "undone", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建产品计划 + +- SDK 调用:`request("productplan/create", params)` +- HTTP:`POST /productplans` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "产品ID", + "format": "int32" + }, + "title": { + "type": "string", + "description": "计划名称" + }, + "parent": { + "type": "integer", + "description": "父计划ID", + "format": "int32" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "branchID": { + "type": "integer", + "description": "分支ID", + "format": "int32" + }, + "desc": { + "type": "string", + "description": "计划描述" + } + }, + "required": [ + "productID", + "title" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "title": "", + "parent": 1, + "begin": "", + "end": "", + "branchID": 1, + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("productplan/create", { + "productID": 1, + "title": "", + "parent": 1, + "begin": "", + "end": "", + "branchID": 1, + "desc": "" +}); +``` +## 获取产品计划详情 + +- SDK 调用:`request("productplan/get", params)` +- HTTP:`GET /productplans/{planID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `planID` | 产品计划ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`productplan` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("productplan/get", { + "planID": 1 +}); +``` +## 修改产品计划 + +- SDK 调用:`request("productplan/update", params)` +- HTTP:`PUT /productplans/{productplanID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `productplanID` | 产品计划ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "计划名称" + }, + "parent": { + "type": "integer", + "description": "父计划", + "format": "int32" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "branchID": { + "type": "integer", + "description": "分支ID", + "format": "int32" + }, + "desc": { + "type": "string", + "description": "计划描述" + } + }, + "required": [ + "title" + ] +} +``` + +示例: + +```json +{ + "title": "", + "parent": 1, + "begin": "", + "end": "", + "branchID": 1, + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("productplan/update", { + "productplanID": 1, + "title": "", + "parent": 1, + "begin": "", + "end": "", + "branchID": 1, + "desc": "" +}); +``` +## 删除产品计划 + +- SDK 调用:`request("productplan/delete", params)` +- HTTP:`DELETE /productplans/{productplanID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `productplanID` | 产品计划ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("productplan/delete", { + "productplanID": 1 +}); +``` diff --git a/docs/zentao-api/program.md b/docs/zentao-api/program.md new file mode 100644 index 0000000..edf19d3 --- /dev/null +++ b/docs/zentao-api/program.md @@ -0,0 +1,289 @@ +# 项目集 (program) + +项目集管理,支持获取项目集列表、创建项目集、获取项目集详情、修改项目集、删除项目集 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取项目集列表 | `GET` | `/programs` | +| `create` | 创建项目集 | `POST` | `/programs` | +| `get` | 获取项目集详情 | `GET` | `/programs/{programID}` | +| `update` | 修改项目集 | `PUT` | `/programs/{programID}` | +| `delete` | 删除项目集 | `DELETE` | `/programs/{programID}` | + +## 获取项目集列表 + +- SDK 调用:`request("program/list", params)` +- HTTP:`GET /programs` +- 动作类型:`list` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `status` | string | 否 | | 状态
`all` 全部
`unclosed` 未关闭
`wait` 未开始
`doing` 进行中
`suspended` 已挂起
`delayed` 已延期
`closed` 已关闭 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`name_asc` 名称 升序
`name_desc` 名称 降序
`begin_asc` 计划开始 升序
`begin_desc` 计划开始 降序
`end_asc` 计划结束 升序
`end_desc` 计划结束 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`programs` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("program/list", { + "status": "all", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建项目集 + +- SDK 调用:`request("program/create", params)` +- HTTP:`POST /programs` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "项目集名称" + }, + "begin": { + "type": "string", + "description": "计划开始日期" + }, + "end": { + "type": "string", + "description": "计划完成日期" + }, + "PM": { + "type": "string", + "description": "计划完成日期" + }, + "desc": { + "type": "string", + "description": "项目集描述" + } + }, + "required": [ + "name", + "begin", + "end" + ] +} +``` + +示例: + +```json +{ + "name": "", + "begin": "", + "end": "", + "PM": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("program/create", { + "name": "", + "begin": "", + "end": "", + "PM": "", + "desc": "" +}); +``` +## 获取项目集详情 + +- SDK 调用:`request("program/get", params)` +- HTTP:`GET /programs/{programID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `programID` | 项目集ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`program` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("program/get", { + "programID": 1 +}); +``` +## 修改项目集 + +- SDK 调用:`request("program/update", params)` +- HTTP:`PUT /programs/{programID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `programID` | 项目集ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "项目集名称" + }, + "begin": { + "type": "string", + "description": "计划开始日期" + }, + "end": { + "type": "string", + "description": "计划完成日期" + }, + "PM": { + "type": "string", + "description": "计划完成日期" + }, + "desc": { + "type": "string", + "description": "项目集描述" + } + }, + "required": [ + "name", + "begin", + "end" + ] +} +``` + +示例: + +```json +{ + "name": "", + "begin": "", + "end": "", + "PM": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("program/update", { + "programID": 1, + "name": "", + "begin": "", + "end": "", + "PM": "", + "desc": "" +}); +``` +## 删除项目集 + +- SDK 调用:`request("program/delete", params)` +- HTTP:`DELETE /programs/{programID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `programID` | 项目集ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("program/delete", { + "programID": 1 +}); +``` diff --git a/docs/zentao-api/project.md b/docs/zentao-api/project.md new file mode 100644 index 0000000..5378de0 --- /dev/null +++ b/docs/zentao-api/project.md @@ -0,0 +1,312 @@ +# 项目 (project) + +项目管理,支持获取项目列表、创建项目、修改项目、删除项目 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取项目列表 | `GET` | `/projects` | +| `create` | 创建项目 | `POST` | `/projects` | +| `update` | 修改项目 | `PUT` | `/projects/{projectID}` | +| `delete` | 删除项目 | `DELETE` | `/projects/{projectID}` | + +## 获取项目列表 + +- SDK 调用:`request("project/list", params)` +- HTTP:`GET /projects` +- 动作类型:`list` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `undone` | 项目状态,默认是undone
`all` 全部
`undone` 未完成
`wait` 未开始
`doing` 进行中 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`name_asc` 名称 升序
`name_desc` 名称 降序
`begin_asc` 计划开始 升序
`begin_desc` 计划开始 降序
`end_asc` 计划结束 升序
`end_desc` 计划结束 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`projects` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("project/list", { + "browseType": "undone", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建项目 + +- SDK 调用:`request("project/create", params)` +- HTTP:`POST /projects` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "项目名称" + }, + "model": { + "type": "string", + "description": "项目管理方式(scrum 敏捷 | waterfall 瀑布 | kanban 看板 | agileplus 融合敏捷 | waterfallplus 融合瀑布)" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "products": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联产品" + }, + "parent": { + "type": "integer", + "description": "所属项目集", + "format": "int32" + }, + "workflowGroup": { + "type": "integer", + "description": "项目流程,付费版功能,开源版可以不填", + "format": "int32" + }, + "PM": { + "type": "string", + "description": "项目负责人" + } + }, + "required": [ + "name", + "model", + "begin", + "end", + "workflowGroup" + ] +} +``` + +示例: + +```json +{ + "name": "", + "model": "", + "begin": "", + "end": "", + "products": [ + "" + ], + "parent": 1, + "workflowGroup": 1, + "PM": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("project/create", { + "name": "", + "model": "", + "begin": "", + "end": "", + "products": [ + "" + ], + "parent": 1, + "workflowGroup": 1, + "PM": "" +}); +``` +## 修改项目 + +- SDK 调用:`request("project/update", params)` +- HTTP:`PUT /projects/{projectID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `projectID` | 项目ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "项目名称" + }, + "model": { + "type": "string", + "description": "项目管理方式(scrum 敏捷 | waterfall 瀑布 | kanban 看板 | agileplus 融合敏捷 | waterfallplus 融合瀑布)" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "products": { + "type": "array", + "items": { + "type": "string" + }, + "description": "关联产品" + }, + "parent": { + "type": "integer", + "description": "所属项目集", + "format": "int32" + }, + "workflowGroup": { + "type": "integer", + "description": "项目流程,付费版功能,开源版可以不填", + "format": "int32" + }, + "PM": { + "type": "string", + "description": "项目负责人" + } + }, + "required": [ + "name", + "model", + "begin", + "end", + "workflowGroup" + ] +} +``` + +示例: + +```json +{ + "name": "", + "model": "", + "begin": "", + "end": "", + "products": [ + "" + ], + "parent": 1, + "workflowGroup": 1, + "PM": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("project/update", { + "projectID": 1, + "name": "", + "model": "", + "begin": "", + "end": "", + "products": [ + "" + ], + "parent": 1, + "workflowGroup": 1, + "PM": "" +}); +``` +## 删除项目 + +- SDK 调用:`request("project/delete", params)` +- HTTP:`DELETE /projects/{projectID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `projectID` | 项目ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("project/delete", { + "projectID": 1 +}); +``` diff --git a/docs/zentao-api/release.md b/docs/zentao-api/release.md new file mode 100644 index 0000000..dcdcbe3 --- /dev/null +++ b/docs/zentao-api/release.md @@ -0,0 +1,288 @@ +# 发布 (release) + +发布管理,支持获取发布列表,支持获取产品下的发布、创建发布、修改发布、删除发布 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取发布列表,支持获取产品下的发布 | `GET` | `/{scope}/{scopeID}/releases` | +| `create` | 创建发布 | `POST` | `/releases` | +| `update` | 修改发布 | `PUT` | `/releases/{releasID}` | +| `delete` | 删除发布 | `DELETE` | `/releases/{releasID}` | + +## 获取发布列表,支持获取产品下的发布 + +- SDK 调用:`request("release/list", params)` +- HTTP:`GET /{scope}/{scopeID}/releases` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 发布范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`releases` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("release/list", { + "scope": "", + "scopeID": 1 +}); +``` +## 创建发布 + +- SDK 调用:`request("release/create", params)` +- HTTP:`POST /releases` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "system": { + "type": "integer", + "description": "所属应用", + "format": "int32" + }, + "name": { + "type": "string", + "description": "应用版本号" + }, + "build": { + "type": "array", + "items": { + "type": "string" + }, + "description": "包含构建" + }, + "status": { + "type": "string", + "description": "状态(wait 未开始 | normal 已发布 | fail 发布失败 | terminate 停止维护)" + }, + "date": { + "type": "string", + "description": "计划发布日期" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "productID", + "system", + "name", + "build", + "date" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "system": 1, + "name": "", + "build": [ + "" + ], + "status": "", + "date": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("release/create", { + "productID": 1, + "system": 1, + "name": "", + "build": [ + "" + ], + "status": "", + "date": "", + "desc": "" +}); +``` +## 修改发布 + +- SDK 调用:`request("release/update", params)` +- HTTP:`PUT /releases/{releasID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `releasID` | 发布ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "system": { + "type": "integer", + "description": "所属应用", + "format": "int32" + }, + "name": { + "type": "string", + "description": "应用版本号" + }, + "build": { + "type": "array", + "items": { + "type": "string" + }, + "description": "包含构建" + }, + "status": { + "type": "string", + "description": "状态(wait 未开始 | normal 已发布 | fail 发布失败 | terminate 停止维护)" + }, + "date": { + "type": "string", + "description": "计划发布日期" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "system", + "name", + "build", + "date" + ] +} +``` + +示例: + +```json +{ + "system": 1, + "name": "", + "build": [ + "" + ], + "status": "", + "date": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("release/update", { + "releasID": 1, + "system": 1, + "name": "", + "build": [ + "" + ], + "status": "", + "date": "", + "desc": "" +}); +``` +## 删除发布 + +- SDK 调用:`request("release/delete", params)` +- HTTP:`DELETE /releases/{releasID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `releasID` | 发布ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("release/delete", { + "releasID": 1 +}); +``` diff --git a/docs/zentao-api/requirement.md b/docs/zentao-api/requirement.md new file mode 100644 index 0000000..cd41b57 --- /dev/null +++ b/docs/zentao-api/requirement.md @@ -0,0 +1,565 @@ +# 用户需求 (requirement) + +用户需求管理,支持获取用户需求列表,支持获取产品下的用户需求、创建用户需求、获取用户需求详情、修改用户需求、删除用户需求、激活用户需求、变更用户需求、关闭用户需求 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取用户需求列表,支持获取产品下的用户需求 | `GET` | `/{scope}/{scopeID}/requirements` | +| `create` | 创建用户需求 | `POST` | `/requirements` | +| `get` | 获取用户需求详情 | `GET` | `/requirements/{storyID}` | +| `update` | 修改用户需求 | `PUT` | `/requirements/{requirementID}` | +| `delete` | 删除用户需求 | `DELETE` | `/requirements/{requirementID}` | +| `activate` | 激活用户需求 | `PUT` | `/requirements/{requirementID}/activate` | +| `change` | 变更用户需求 | `PUT` | `/requirements/{requirementID}/change` | +| `close` | 关闭用户需求 | `PUT` | `/requirements/{requirementID}/close` | + +## 获取用户需求列表,支持获取产品下的用户需求 + +- SDK 调用:`request("requirement/list", params)` +- HTTP:`GET /{scope}/{scopeID}/requirements` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 用户需求范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `unclosed` | 状态,默认是unclosed
`allstory` 全部
`assignedtome` 指派给我
`openedbyme` 我创建
`reviewbyme` 待我评审
`draftstory` 草稿 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`requirements` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/list", { + "scope": "", + "scopeID": 1, + "browseType": "unclosed", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建用户需求 + +- SDK 调用:`request("requirement/create", params)` +- HTTP:`POST /requirements` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "产品ID", + "format": "int32" + }, + "title": { + "type": "string" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "parent": { + "type": "integer", + "description": "父用户需求", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "spec": { + "type": "string", + "description": "用户需求描述" + }, + "category": { + "type": "integer", + "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)", + "format": "int32" + }, + "source": { + "type": "string", + "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)" + }, + "verify": { + "type": "string", + "description": "验收标准" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人,如果设置必须评审,必须填写" + } + }, + "required": [ + "productID", + "title" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "spec": "", + "category": 1, + "source": "", + "verify": "", + "assignedTo": "", + "reviewer": [ + "" + ] +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/create", { + "productID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "spec": "", + "category": 1, + "source": "", + "verify": "", + "assignedTo": "", + "reviewer": [ + "" + ] +}); +``` +## 获取用户需求详情 + +- SDK 调用:`request("requirement/get", params)` +- HTTP:`GET /requirements/{storyID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`requirement` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/get", { + "storyID": 1 +}); +``` +## 修改用户需求 + +- SDK 调用:`request("requirement/update", params)` +- HTTP:`PUT /requirements/{requirementID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `requirementID` | 用户需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "parent": { + "type": "integer", + "description": "父用户需求", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "category": { + "type": "integer", + "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)", + "format": "int32" + }, + "source": { + "type": "string", + "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + } + }, + "required": [ + "title" + ] +} +``` + +示例: + +```json +{ + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "category": 1, + "source": "", + "assignedTo": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/update", { + "requirementID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "category": 1, + "source": "", + "assignedTo": "" +}); +``` +## 删除用户需求 + +- SDK 调用:`request("requirement/delete", params)` +- HTTP:`DELETE /requirements/{requirementID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `requirementID` | 用户需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/delete", { + "requirementID": 1 +}); +``` +## 激活用户需求 + +- SDK 调用:`request("requirement/activate", params)` +- HTTP:`PUT /requirements/{requirementID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `requirementID` | 用户需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/activate", { + "requirementID": 1, + "assignedTo": "", + "comment": "" +}); +``` +## 变更用户需求 + +- SDK 调用:`request("requirement/change", params)` +- HTTP:`PUT /requirements/{requirementID}/change` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `requirementID` | 用户需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "需求名称" + }, + "spec": { + "type": "string", + "description": "需求描述" + }, + "verify": { + "type": "string", + "description": "验收标准" + } + } +} +``` + +示例: + +```json +{ + "title": "", + "spec": "", + "verify": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/change", { + "requirementID": 1, + "title": "", + "spec": "", + "verify": "" +}); +``` +## 关闭用户需求 + +- SDK 调用:`request("requirement/close", params)` +- HTTP:`PUT /requirements/{requirementID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `requirementID` | 用户需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "closedReason": { + "type": "string", + "description": "关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "closedReason" + ] +} +``` + +示例: + +```json +{ + "closedReason": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("requirement/close", { + "requirementID": 1, + "closedReason": "", + "comment": "" +}); +``` diff --git a/docs/zentao-api/sidebar.json b/docs/zentao-api/sidebar.json new file mode 100644 index 0000000..7d41edf --- /dev/null +++ b/docs/zentao-api/sidebar.json @@ -0,0 +1,87 @@ +[ + { + "text": "ZenTao API", + "items": [ + { + "text": "概览", + "link": "/zentao-api/" + }, + { + "text": "用户 (user)", + "link": "/zentao-api/user" + }, + { + "text": "项目集 (program)", + "link": "/zentao-api/program" + }, + { + "text": "产品 (product)", + "link": "/zentao-api/product" + }, + { + "text": "项目 (project)", + "link": "/zentao-api/project" + }, + { + "text": "执行 (execution)", + "link": "/zentao-api/execution" + }, + { + "text": "产品计划 (productplan)", + "link": "/zentao-api/productplan" + }, + { + "text": "需求 (story)", + "link": "/zentao-api/story" + }, + { + "text": "业务需求 (epic)", + "link": "/zentao-api/epic" + }, + { + "text": "用户需求 (requirement)", + "link": "/zentao-api/requirement" + }, + { + "text": "Bug (bug)", + "link": "/zentao-api/bug" + }, + { + "text": "测试用例 (testcase)", + "link": "/zentao-api/testcase" + }, + { + "text": "任务 (task)", + "link": "/zentao-api/task" + }, + { + "text": "反馈 (feedback)", + "link": "/zentao-api/feedback" + }, + { + "text": "工单 (ticket)", + "link": "/zentao-api/ticket" + }, + { + "text": "应用 (system)", + "link": "/zentao-api/system" + }, + { + "text": "版本 (build)", + "link": "/zentao-api/build" + }, + { + "text": "测试单 (testtask)", + "link": "/zentao-api/testtask" + }, + { + "text": "发布 (release)", + "link": "/zentao-api/release" + }, + { + "text": "附件 (file)", + "link": "/zentao-api/file" + } + ] + } +] diff --git a/docs/zentao-api/story.md b/docs/zentao-api/story.md new file mode 100644 index 0000000..4bd2685 --- /dev/null +++ b/docs/zentao-api/story.md @@ -0,0 +1,595 @@ +# 需求 (story) + +需求管理,支持获取需求列表,支持获取产品/项目/执行下的需求、创建需求、获取需求详情、修改需求、删除需求、激活需求、变更需求、关闭需求 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取需求列表,支持获取产品/项目/执行下的需求 | `GET` | `/{scope}/{scopeID}/stories` | +| `create` | 创建需求 | `POST` | `/stories` | +| `get` | 获取需求详情 | `GET` | `/stories/{storyID}` | +| `update` | 修改需求 | `PUT` | `/stories/{storyID}` | +| `delete` | 删除需求 | `DELETE` | `/stories/{storyID}` | +| `activate` | 激活需求 | `PUT` | `/stories/{storyID}/activate` | +| `change` | 变更需求 | `PUT` | `/stories/{storyID}/change` | +| `close` | 关闭需求 | `PUT` | `/stories/{storyID}/close` | + +## 获取需求列表,支持获取产品/项目/执行下的需求 + +- SDK 调用:`request("story/list", params)` +- HTTP:`GET /{scope}/{scopeID}/stories` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 需求范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `unclosed` | 状态,默认是unclosed
`allstory` 全部
`assignedtome` 指派给我
`openedbyme` 我创建
`reviewbyme` 待我评审
`draftstory` 草稿 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`stories` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/list", { + "scope": "", + "scopeID": 1, + "browseType": "unclosed", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建需求 + +- SDK 调用:`request("story/create", params)` +- HTTP:`POST /stories` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "产品ID", + "format": "int32" + }, + "title": { + "type": "string" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "parent": { + "type": "integer", + "description": "父需求", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "spec": { + "type": "string", + "description": "需求描述" + }, + "category": { + "type": "integer", + "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)", + "format": "int32" + }, + "source": { + "type": "string", + "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)" + }, + "verify": { + "type": "string", + "description": "验收标准" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人,如果设置必须评审,必须填写" + }, + "project": { + "type": "integer", + "description": "所属项目", + "format": "int32" + }, + "execution": { + "type": "integer", + "description": "所属执行", + "format": "int32" + } + }, + "required": [ + "productID", + "title" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "spec": "", + "category": 1, + "source": "", + "verify": "", + "assignedTo": "", + "reviewer": [ + "" + ], + "project": 1, + "execution": 1 +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/create", { + "productID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "spec": "", + "category": 1, + "source": "", + "verify": "", + "assignedTo": "", + "reviewer": [ + "" + ], + "project": 1, + "execution": 1 +}); +``` +## 获取需求详情 + +- SDK 调用:`request("story/get", params)` +- HTTP:`GET /stories/{storyID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`story` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/get", { + "storyID": 1 +}); +``` +## 修改需求 + +- SDK 调用:`request("story/update", params)` +- HTTP:`PUT /stories/{storyID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "pri": { + "type": "integer", + "description": "优先级,默认是3", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "parent": { + "type": "integer", + "description": "父需求", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "category": { + "type": "integer", + "description": "类别(feature 功能 | interface 接口 | performance 性能 | safe 安全 | experience 体验 | improve 改进 | other 其他)", + "format": "int32" + }, + "source": { + "type": "string", + "description": "来源(customer 客户 | user 用户 | po 产品经理 | market 市场 | service 客服 | operation 运营 | support 技术支持 | competitor 竞争对手 | partner 合作伙伴 | dev 开发人员 | tester 测试人员 | bug Bug | forum 论坛 | other 其他)" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + } + }, + "required": [ + "title" + ] +} +``` + +示例: + +```json +{ + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "category": 1, + "source": "", + "assignedTo": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/update", { + "storyID": 1, + "title": "", + "pri": 1, + "module": 1, + "parent": 1, + "estimate": 1, + "category": 1, + "source": "", + "assignedTo": "" +}); +``` +## 删除需求 + +- SDK 调用:`request("story/delete", params)` +- HTTP:`DELETE /stories/{storyID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/delete", { + "storyID": 1 +}); +``` +## 激活需求 + +- SDK 调用:`request("story/activate", params)` +- HTTP:`PUT /stories/{storyID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/activate", { + "storyID": 1, + "assignedTo": "", + "comment": "" +}); +``` +## 变更需求 + +- SDK 调用:`request("story/change", params)` +- HTTP:`PUT /stories/{storyID}/change` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "需求名称" + }, + "reviewer": { + "type": "array", + "items": { + "type": "string" + }, + "description": "评审人员" + }, + "spec": { + "type": "string", + "description": "需求描述" + }, + "verify": { + "type": "string", + "description": "验收标准" + } + }, + "required": [ + "reviewer" + ] +} +``` + +示例: + +```json +{ + "title": "", + "reviewer": [ + "" + ], + "spec": "", + "verify": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/change", { + "storyID": 1, + "title": "", + "reviewer": [ + "" + ], + "spec": "", + "verify": "" +}); +``` +## 关闭需求 + +- SDK 调用:`request("story/close", params)` +- HTTP:`PUT /stories/{storyID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `storyID` | 需求ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "closedReason": { + "type": "string", + "description": "关闭原因(done 已完成 | subdivided 已拆分 | duplicate 重复 | postponed 延期 | willnotdo 不做 | cancel 已取消 | bydesign 设计如此)" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "closedReason" + ] +} +``` + +示例: + +```json +{ + "closedReason": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("story/close", { + "storyID": 1, + "closedReason": "", + "comment": "" +}); +``` diff --git a/docs/zentao-api/system.md b/docs/zentao-api/system.md new file mode 100644 index 0000000..c0f1b41 --- /dev/null +++ b/docs/zentao-api/system.md @@ -0,0 +1,219 @@ +# 应用 (system) + +应用管理,支持获取应用列表,支持获取产品下的应用、创建应用、修改应用 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取应用列表,支持获取产品下的应用 | `GET` | `/{scope}/{scopeID}/systems` | +| `create` | 创建应用 | `POST` | `/systems` | +| `update` | 修改应用 | `PUT` | `/systems/{systemID}` | + +## 获取应用列表,支持获取产品下的应用 + +- SDK 调用:`request("system/list", params)` +- HTTP:`GET /{scope}/{scopeID}/systems` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 应用范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("system/list", { + "scope": "", + "scopeID": 1 +}); +``` +## 创建应用 + +- SDK 调用:`request("system/create", params)` +- HTTP:`POST /systems` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "integrated": { + "type": "integer", + "description": "是否集成应用(0 否| 1 是)", + "format": "int32" + }, + "children": { + "type": "array", + "items": { + "type": "string" + }, + "description": "集成应用需要包含其他应用,非集成应用传空数组[]" + }, + "name": { + "type": "string", + "description": "应用名称" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "productID", + "integrated", + "children", + "name" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "integrated": 1, + "children": [ + "" + ], + "name": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("system/create", { + "productID": 1, + "integrated": 1, + "children": [ + "" + ], + "name": "", + "desc": "" +}); +``` +## 修改应用 + +- SDK 调用:`request("system/update", params)` +- HTTP:`PUT /systems/{systemID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `systemID` | 应用ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "应用名称" + }, + "children": { + "type": "array", + "items": { + "type": "string" + }, + "description": "集成应用需要包含其他应用,非集成应用传空数组[]" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "name", + "children" + ] +} +``` + +示例: + +```json +{ + "name": "", + "children": [ + "" + ], + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("system/update", { + "systemID": 1, + "name": "", + "children": [ + "" + ], + "desc": "" +}); +``` diff --git a/docs/zentao-api/task.md b/docs/zentao-api/task.md new file mode 100644 index 0000000..e574243 --- /dev/null +++ b/docs/zentao-api/task.md @@ -0,0 +1,669 @@ +# 任务 (task) + +任务管理,支持获取任务列表,支持获取执行下的任务、创建任务、获取任务详情、修改任务、删除任务、激活任务、关闭任务、完成任务、启动任务 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取任务列表,支持获取执行下的任务 | `GET` | `/{scope}/{scopeID}/tasks` | +| `create` | 创建任务 | `POST` | `/tasks` | +| `get` | 获取任务详情 | `GET` | `/tasks/{taskID}` | +| `update` | 修改任务 | `PUT` | `/tasks/{taskID}` | +| `delete` | 删除任务 | `DELETE` | `/tasks/{taskID}` | +| `activate` | 激活任务 | `PUT` | `/tasks/{taskID}/activate` | +| `close` | 关闭任务 | `PUT` | `/tasks/{taskID}/close` | +| `finish` | 完成任务 | `PUT` | `/tasks/{taskID}/finish` | +| `start` | 启动任务 | `PUT` | `/tasks/{taskID}/start` | + +## 获取任务列表,支持获取执行下的任务 + +- SDK 调用:`request("task/list", params)` +- HTTP:`GET /{scope}/{scopeID}/tasks` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 任务范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `status` | string | 否 | `unclosed` | 状态,默认是unclosed
`all` 全部
`unclosed` 未关闭
`assignedtome` 指派给我
`assignedtome` 指派给我
`myinvolved` 由我参与
`assignedbyme` 由我指派 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`name_asc` 名称 升序
`name_desc` 名称 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`tasks` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/list", { + "scope": "", + "scopeID": 1, + "status": "unclosed", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建任务 + +- SDK 调用:`request("task/create", params)` +- HTTP:`POST /tasks` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "任务名称" + }, + "executionID": { + "type": "integer", + "description": "所属执行", + "format": "int32" + }, + "type": { + "type": "string", + "description": "任务类型" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "estStarted": { + "type": "string", + "description": "预计开始" + }, + "deadline": { + "type": "string", + "description": "截止日期" + }, + "pri": { + "type": "integer", + "description": "优先级", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "story": { + "type": "integer", + "description": "相关需求", + "format": "int32" + }, + "desc": { + "type": "string", + "description": "任务描述" + } + }, + "required": [ + "name", + "executionID" + ] +} +``` + +示例: + +```json +{ + "name": "", + "executionID": 1, + "type": "", + "assignedTo": "", + "estStarted": "", + "deadline": "", + "pri": 1, + "estimate": 1, + "module": 1, + "story": 1, + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/create", { + "name": "", + "executionID": 1, + "type": "", + "assignedTo": "", + "estStarted": "", + "deadline": "", + "pri": 1, + "estimate": 1, + "module": 1, + "story": 1, + "desc": "" +}); +``` +## 获取任务详情 + +- SDK 调用:`request("task/get", params)` +- HTTP:`GET /tasks/{taskID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/get", { + "taskID": 1 +}); +``` +## 修改任务 + +- SDK 调用:`request("task/update", params)` +- HTTP:`PUT /tasks/{taskID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "任务名称" + }, + "type": { + "type": "string", + "description": "任务类型" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "estStarted": { + "type": "string", + "description": "预计开始" + }, + "deadline": { + "type": "string", + "description": "截止日期" + }, + "pri": { + "type": "integer", + "description": "优先级", + "format": "int32" + }, + "estimate": { + "type": "number", + "description": "预计工时", + "format": "float" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "story": { + "type": "integer", + "description": "相关需求", + "format": "int32" + }, + "desc": { + "type": "string", + "description": "任务描述" + } + } +} +``` + +示例: + +```json +{ + "name": "", + "type": "", + "assignedTo": "", + "estStarted": "", + "deadline": "", + "pri": 1, + "estimate": 1, + "module": 1, + "story": 1, + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/update", { + "taskID": 1, + "name": "", + "type": "", + "assignedTo": "", + "estStarted": "", + "deadline": "", + "pri": 1, + "estimate": 1, + "module": 1, + "story": 1, + "desc": "" +}); +``` +## 删除任务 + +- SDK 调用:`request("task/delete", params)` +- HTTP:`DELETE /tasks/{taskID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/delete", { + "taskID": 1 +}); +``` +## 激活任务 + +- SDK 调用:`request("task/activate", params)` +- HTTP:`PUT /tasks/{taskID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "left": { + "type": "number", + "description": "预计剩余", + "format": "float" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "left": 1, + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/activate", { + "taskID": 1, + "left": 1, + "assignedTo": "", + "comment": "" +}); +``` +## 关闭任务 + +- SDK 调用:`request("task/close", params)` +- HTTP:`PUT /tasks/{taskID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/close", { + "taskID": 1, + "comment": "" +}); +``` +## 完成任务 + +- SDK 调用:`request("task/finish", params)` +- HTTP:`PUT /tasks/{taskID}/finish` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "currentConsumed": { + "type": "number", + "description": "本次消耗", + "format": "float" + }, + "assignedTo": { + "type": "string", + "description": "任务名称" + }, + "consumed": { + "type": "number", + "description": "总计消耗", + "format": "float" + }, + "realStarted": { + "type": "string", + "description": "实际开始" + }, + "finishedDate": { + "type": "string", + "description": "实际完成" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "currentConsumed", + "realStarted", + "finishedDate" + ] +} +``` + +示例: + +```json +{ + "currentConsumed": 1, + "assignedTo": "", + "consumed": 1, + "realStarted": "", + "finishedDate": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/finish", { + "taskID": 1, + "currentConsumed": 1, + "assignedTo": "", + "consumed": 1, + "realStarted": "", + "finishedDate": "", + "comment": "" +}); +``` +## 启动任务 + +- SDK 调用:`request("task/start", params)` +- HTTP:`PUT /tasks/{taskID}/start` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `taskID` | 任务ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "assignedTo": { + "type": "string", + "description": "任务名称" + }, + "realStarted": { + "type": "string", + "description": "实际开始" + }, + "consumed": { + "type": "number", + "description": "总计消耗", + "format": "float" + }, + "left": { + "type": "number", + "description": "预计剩余", + "format": "float" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "realStarted" + ] +} +``` + +示例: + +```json +{ + "assignedTo": "", + "realStarted": "", + "consumed": 1, + "left": 1, + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("task/start", { + "taskID": 1, + "assignedTo": "", + "realStarted": "", + "consumed": 1, + "left": 1, + "comment": "" +}); +``` diff --git a/docs/zentao-api/testcase.md b/docs/zentao-api/testcase.md new file mode 100644 index 0000000..eeafe9f --- /dev/null +++ b/docs/zentao-api/testcase.md @@ -0,0 +1,408 @@ +# 测试用例 (testcase) + +测试用例管理,支持获取测试用例列表,支持获取产品/项目/执行下的测试用例、创建测试用例、获取测试用例详情、修改测试用例、删除测试用例 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取测试用例列表,支持获取产品/项目/执行下的测试用例 | `GET` | `/{scope}/{scopeID}/testcases` | +| `create` | 创建测试用例 | `POST` | `/testcases` | +| `get` | 获取测试用例详情 | `GET` | `/testcases/{caseID}` | +| `update` | 修改测试用例 | `PUT` | `/testcases/{testcasID}` | +| `delete` | 删除测试用例 | `DELETE` | `/testcases/{testcasID}` | + +## 获取测试用例列表,支持获取产品/项目/执行下的测试用例 + +- SDK 调用:`request("testcase/list", params)` +- HTTP:`GET /{scope}/{scopeID}/testcases` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 测试用例范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `all` | 状态,默认是all
`all` 全部
`wait` 未关闭
`needconfirm` 需求变动 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`testcases` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testcase/list", { + "scope": "", + "scopeID": 1, + "browseType": "all", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建测试用例 + +- SDK 调用:`request("testcase/create", params)` +- HTTP:`POST /testcases` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "title": { + "type": "string", + "description": "用例标题" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "story": { + "type": "integer", + "description": "相关需求", + "format": "int32" + }, + "pri": { + "type": "integer", + "description": "优先级", + "format": "int32" + }, + "type": { + "type": "string", + "description": "用例类型(unit 单元测试 | interface 接口测试 | feature 功能测试 | install 安装部署 | config 配置相关 | performance 性能测试 | security 安全相关 | other 其他)" + }, + "precondition": { + "type": "string", + "description": "前置条件" + }, + "steps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用例步骤" + }, + "expects": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用例步骤期望" + }, + "stepType": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用例步骤类型(step 步骤 | group 父级步骤)" + }, + "project": { + "type": "integer", + "description": "所属项目", + "format": "int32" + }, + "execution": { + "type": "integer", + "description": "所属执行", + "format": "int32" + } + }, + "required": [ + "productID", + "title" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "title": "", + "module": 1, + "story": 1, + "pri": 1, + "type": "", + "precondition": "", + "steps": [ + "" + ], + "expects": [ + "" + ], + "stepType": [ + "" + ], + "project": 1, + "execution": 1 +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testcase/create", { + "productID": 1, + "title": "", + "module": 1, + "story": 1, + "pri": 1, + "type": "", + "precondition": "", + "steps": [ + "" + ], + "expects": [ + "" + ], + "stepType": [ + "" + ], + "project": 1, + "execution": 1 +}); +``` +## 获取测试用例详情 + +- SDK 调用:`request("testcase/get", params)` +- HTTP:`GET /testcases/{caseID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `caseID` | 测试用例ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`testcase` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testcase/get", { + "caseID": 1 +}); +``` +## 修改测试用例 + +- SDK 调用:`request("testcase/update", params)` +- HTTP:`PUT /testcases/{testcasID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `testcasID` | 测试用例ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "title": { + "type": "string", + "description": "用例标题" + }, + "moudule": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "story": { + "type": "integer", + "description": "相关需求", + "format": "int32" + }, + "pri": { + "type": "integer", + "description": "优先级", + "format": "int32" + }, + "type": { + "type": "string", + "description": "用例类型(unit 单元测试 | interface 接口测试 | feature 功能测试 | install 安装部署 | config 配置相关 | performance 性能测试 | security 安全相关 | other 其他)" + }, + "precondition": { + "type": "string", + "description": "前置条件" + }, + "steps": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用例步骤" + }, + "expects": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用例步骤期望" + }, + "stepType": { + "type": "array", + "items": { + "type": "string" + }, + "description": "用例步骤类型(step 步骤 | group 父级步骤)" + } + }, + "required": [ + "title" + ] +} +``` + +示例: + +```json +{ + "title": "", + "moudule": 1, + "story": 1, + "pri": 1, + "type": "", + "precondition": "", + "steps": [ + "" + ], + "expects": [ + "" + ], + "stepType": [ + "" + ] +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testcase/update", { + "testcasID": 1, + "title": "", + "moudule": 1, + "story": 1, + "pri": 1, + "type": "", + "precondition": "", + "steps": [ + "" + ], + "expects": [ + "" + ], + "stepType": [ + "" + ] +}); +``` +## 删除测试用例 + +- SDK 调用:`request("testcase/delete", params)` +- HTTP:`DELETE /testcases/{testcasID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `testcasID` | 测试用例ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testcase/delete", { + "testcasID": 1 +}); +``` diff --git a/docs/zentao-api/testtask.md b/docs/zentao-api/testtask.md new file mode 100644 index 0000000..a5110d9 --- /dev/null +++ b/docs/zentao-api/testtask.md @@ -0,0 +1,326 @@ +# 测试单 (testtask) + +测试单管理,支持获取测试单列表,支持获取产品/项目/执行下的测试单、创建测试单、修改测试单、删除测试单 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取测试单列表,支持获取产品/项目/执行下的测试单 | `GET` | `/{scope}/{scopeID}/testtasks` | +| `create` | 创建测试单 | `POST` | `/testtasks` | +| `update` | 修改测试单 | `PUT` | `/testtasks/{testtaskID}` | +| `delete` | 删除测试单 | `DELETE` | `/testtasks/{testtaskID}` | + +## 获取测试单列表,支持获取产品/项目/执行下的测试单 + +- SDK 调用:`request("testtask/list", params)` +- HTTP:`GET /{scope}/{scopeID}/testtasks` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 测试单范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`testtasks` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testtask/list", { + "scope": "", + "scopeID": 1 +}); +``` +## 创建测试单 + +- SDK 调用:`request("testtask/create", params)` +- HTTP:`POST /testtasks` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "productID": { + "type": "integer", + "description": "所属产品ID", + "format": "int32" + }, + "name": { + "type": "string", + "description": "测试单名称" + }, + "build": { + "type": "integer", + "description": "提测构建/版本", + "format": "int32" + }, + "execution": { + "type": "integer", + "description": "所属执行", + "format": "int32" + }, + "type": { + "type": "array", + "items": { + "type": "string" + }, + "description": "类型(integrate 集成测试 | system 系统测试 | acceptance 验收测试 | performance 性能测试 | safety 安全测试)" + }, + "owner": { + "type": "string", + "description": "负责人" + }, + "status": { + "type": "string", + "description": "状态(wait 未开始 | doing 进行中 | done 已关闭 | blocked 被阻塞)" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "productID", + "name", + "build", + "begin", + "end" + ] +} +``` + +示例: + +```json +{ + "productID": 1, + "name": "", + "build": 1, + "execution": 1, + "type": [ + "" + ], + "owner": "", + "status": "", + "begin": "", + "end": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testtask/create", { + "productID": 1, + "name": "", + "build": 1, + "execution": 1, + "type": [ + "" + ], + "owner": "", + "status": "", + "begin": "", + "end": "", + "desc": "" +}); +``` +## 修改测试单 + +- SDK 调用:`request("testtask/update", params)` +- HTTP:`PUT /testtasks/{testtaskID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `testtaskID` | 测试单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "测试单名称" + }, + "build": { + "type": "integer", + "description": "提测构建/版本", + "format": "int32" + }, + "execution": { + "type": "integer", + "description": "所属执行", + "format": "int32" + }, + "type": { + "type": "array", + "items": { + "type": "string" + }, + "description": "类型(integrate 集成测试 | system 系统测试 | acceptance 验收测试 | performance 性能测试 | safety 安全测试)" + }, + "owner": { + "type": "string", + "description": "负责人" + }, + "status": { + "type": "string", + "description": "状态(wait 未开始 | doing 进行中 | done 已关闭 | blocked 被阻塞)" + }, + "begin": { + "type": "string", + "description": "开始日期" + }, + "end": { + "type": "string", + "description": "结束日期" + }, + "desc": { + "type": "string", + "description": "描述" + } + }, + "required": [ + "name", + "build", + "begin", + "end" + ] +} +``` + +示例: + +```json +{ + "name": "", + "build": 1, + "execution": 1, + "type": [ + "" + ], + "owner": "", + "status": "", + "begin": "", + "end": "", + "desc": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testtask/update", { + "testtaskID": 1, + "name": "", + "build": 1, + "execution": 1, + "type": [ + "" + ], + "owner": "", + "status": "", + "begin": "", + "end": "", + "desc": "" +}); +``` +## 删除测试单 + +- SDK 调用:`request("testtask/delete", params)` +- HTTP:`DELETE /testtasks/{testtaskID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `testtaskID` | 测试单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("testtask/delete", { + "testtaskID": 1 +}); +``` diff --git a/docs/zentao-api/ticket.md b/docs/zentao-api/ticket.md new file mode 100644 index 0000000..b596fee --- /dev/null +++ b/docs/zentao-api/ticket.md @@ -0,0 +1,472 @@ +# 工单 (ticket) + +工单管理,支持获取工单列表,支持获取产品下的工单、创建工单、获取工单详情、修改工单、删除工单、激活工单、关闭工单 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取工单列表,支持获取产品下的工单 | `GET` | `/{scope}/{scopeID}/tickets` | +| `create` | 创建工单 | `POST` | `/tickets` | +| `get` | 获取工单详情 | `GET` | `/tickets/{ticketID}` | +| `update` | 修改工单 | `PUT` | `/tickets/{ticketID}` | +| `delete` | 删除工单 | `DELETE` | `/tickets/{ticketID}` | +| `activate` | 激活工单 | `PUT` | `/tickets/{ticketID}/activate` | +| `close` | 关闭工单 | `PUT` | `/tickets/{ticketID}/close` | + +## 获取工单列表,支持获取产品下的工单 + +- SDK 调用:`request("ticket/list", params)` +- HTTP:`GET /{scope}/{scopeID}/tickets` +- 动作类型:`list` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `scope` | 工单范围 | +| `scopeID` | 范围ID | + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | `wait` | 状态,默认是wait
`all` 全部
`unclosed` 未关闭
`wait` 待处理
`doing` 处理中
`done` 待关闭
`finishedbyme` 由我解决
`assigntome` 指派给我
`openedbyme` 由我创建 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`title_asc` 标题 升序
`title_desc` 标题 降序
`status_asc` 状态 升序
`status_desc` 状态 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`tickets` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/list", { + "scope": "", + "scopeID": 1, + "browseType": "wait", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建工单 + +- SDK 调用:`request("ticket/create", params)` +- HTTP:`POST /tickets` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "product": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "title": { + "type": "string", + "description": "标题" + }, + "type": { + "type": "string", + "description": "类型(code 程序报错 | data 数据错误 | stuck 流程卡断 | security 安全问题 | affair 事务)" + }, + "desc": { + "type": "string", + "description": "描述" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "deadline": { + "type": "string", + "description": "截止日期" + }, + "openedBuild": { + "type": "array", + "items": { + "type": "string" + }, + "description": "影响版本" + } + }, + "required": [ + "product", + "title" + ] +} +``` + +示例: + +```json +{ + "product": 1, + "module": 1, + "title": "", + "type": "", + "desc": "", + "assignedTo": "", + "deadline": "", + "openedBuild": [ + "" + ] +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/create", { + "product": 1, + "module": 1, + "title": "", + "type": "", + "desc": "", + "assignedTo": "", + "deadline": "", + "openedBuild": [ + "" + ] +}); +``` +## 获取工单详情 + +- SDK 调用:`request("ticket/get", params)` +- HTTP:`GET /tickets/{ticketID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `ticketID` | 工单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`ticket` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/get", { + "ticketID": 1 +}); +``` +## 修改工单 + +- SDK 调用:`request("ticket/update", params)` +- HTTP:`PUT /tickets/{ticketID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `ticketID` | 工单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "product": { + "type": "integer", + "description": "所属产品", + "format": "int32" + }, + "module": { + "type": "integer", + "description": "所属模块", + "format": "int32" + }, + "title": { + "type": "string", + "description": "标题" + }, + "type": { + "type": "string", + "description": "类型(code 程序报错 | data 数据错误 | stuck 流程卡断 | security 安全问题 | affair 事务)" + }, + "desc": { + "type": "string", + "description": "描述" + }, + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "deadline": { + "type": "string", + "description": "截止日期" + }, + "openedBuild": { + "type": "array", + "items": { + "type": "string" + }, + "description": "影响版本" + } + } +} +``` + +示例: + +```json +{ + "product": 1, + "module": 1, + "title": "", + "type": "", + "desc": "", + "assignedTo": "", + "deadline": "", + "openedBuild": [ + "" + ] +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/update", { + "ticketID": 1, + "product": 1, + "module": 1, + "title": "", + "type": "", + "desc": "", + "assignedTo": "", + "deadline": "", + "openedBuild": [ + "" + ] +}); +``` +## 删除工单 + +- SDK 调用:`request("ticket/delete", params)` +- HTTP:`DELETE /tickets/{ticketID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `ticketID` | 工单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/delete", { + "ticketID": 1 +}); +``` +## 激活工单 + +- SDK 调用:`request("ticket/activate", params)` +- HTTP:`PUT /tickets/{ticketID}/activate` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `ticketID` | 工单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "assignedTo": { + "type": "string", + "description": "指派给" + }, + "comment": { + "type": "string", + "description": "备注" + } + } +} +``` + +示例: + +```json +{ + "assignedTo": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/activate", { + "ticketID": 1, + "assignedTo": "", + "comment": "" +}); +``` +## 关闭工单 + +- SDK 调用:`request("ticket/close", params)` +- HTTP:`PUT /tickets/{ticketID}/close` +- 动作类型:`action` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `ticketID` | 工单ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "closedReason": { + "type": "string", + "description": "关闭原因(commented 已处理 | repeat 重复 | refuse 不予处理)" + }, + "comment": { + "type": "string", + "description": "备注" + } + }, + "required": [ + "closedReason", + "comment" + ] +} +``` + +示例: + +```json +{ + "closedReason": "", + "comment": "" +} +``` + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("ticket/close", { + "ticketID": 1, + "closedReason": "", + "comment": "" +}); +``` diff --git a/docs/zentao-api/user.md b/docs/zentao-api/user.md new file mode 100644 index 0000000..6cd4c55 --- /dev/null +++ b/docs/zentao-api/user.md @@ -0,0 +1,311 @@ +# 用户 (user) + +用户管理,支持获取用户列表、创建用户、获取用户详情、修改用户信息、删除用户 + +## 动作概览 + +| SDK 动作 | 说明 | 方法 | 路径 | +| --- | --- | --- | --- | +| `list` | 获取用户列表 | `GET` | `/users` | +| `create` | 创建用户 | `POST` | `/users` | +| `get` | 获取用户详情 | `GET` | `/users/{userID}` | +| `update` | 修改用户信息 | `PUT` | `/users/{userID}` | +| `delete` | 删除用户 | `DELETE` | `/users/{userID}` | + +## 获取用户列表 + +- SDK 调用:`request("user/list", params)` +- HTTP:`GET /users` +- 动作类型:`list` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +| 参数 | 类型 | 必填 | 默认值 | 说明 | +| --- | --- | --- | --- | --- | +| `browseType` | string | 否 | | 浏览类型
`inside` 内部用户
`outside` 内部用户 | +| `orderBy` | string | 否 | | 排序
`id_asc` ID 升序
`id_desc` ID 降序
`realname_asc` 姓名 升序
`realname_desc` 姓名 降序
`account_asc` 用户名 升序
`account_desc` 用户名 降序 | +| `recPerPage` | number | 否 | | 每页数量,不超过1000 | +| `pageID` | number | 否 | | 页码,从第1页开始 | + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`list` +- 结果字段:`users` +- 分页字段:`pager` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("user/list", { + "browseType": "inside", + "orderBy": "id_asc", + "recPerPage": 1, + "pageID": 1 +}); +``` +## 创建用户 + +- SDK 调用:`request("user/create", params)` +- HTTP:`POST /users` +- 动作类型:`create` + +### 路径参数 + +无路径参数。 + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "account": { + "type": "string", + "description": "登录名" + }, + "realname": { + "type": "string", + "description": "姓名" + }, + "password": { + "type": "string", + "description": "密码" + } + }, + "required": [ + "account", + "realname", + "password" + ] +} +``` + +示例: + +```json +{ + "account": "", + "realname": "", + "password": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("user/create", { + "account": "", + "realname": "", + "password": "" +}); +``` +## 获取用户详情 + +- SDK 调用:`request("user/get", params)` +- HTTP:`GET /users/{userID}` +- 动作类型:`get` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `userID` | 用户ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`object` +- 结果字段:`user` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("user/get", { + "userID": 1 +}); +``` +## 修改用户信息 + +- SDK 调用:`request("user/update", params)` +- HTTP:`PUT /users/{userID}` +- 动作类型:`update` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `userID` | 用户ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +请求体必填:是 + +Schema: + +```json +{ + "type": "object", + "properties": { + "realname": { + "type": "string", + "description": "真实姓名" + }, + "dept": { + "type": "integer", + "description": "部门", + "format": "int32" + }, + "join": { + "type": "string", + "description": "入职日期" + }, + "group": { + "type": "array", + "items": { + "type": "string" + }, + "description": "权限分组" + }, + "email": { + "type": "string", + "description": "邮箱" + }, + "visions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "界面类型(研发综合界面 rnd | 运营管理界面 lite)" + }, + "mobile": { + "type": "string", + "description": "手机" + }, + "weixin": { + "type": "string", + "description": "微信" + }, + "password": { + "type": "string", + "description": "密码" + } + } +} +``` + +示例: + +```json +{ + "realname": "", + "dept": 1, + "join": "", + "group": [ + "" + ], + "email": "", + "visions": [ + "" + ], + "mobile": "", + "weixin": "", + "password": "" +} +``` + +### 返回值 + +- 返回形态:`object` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("user/update", { + "userID": 1, + "realname": "", + "dept": 1, + "join": "", + "group": [ + "" + ], + "email": "", + "visions": [ + "" + ], + "mobile": "", + "weixin": "", + "password": "" +}); +``` +## 删除用户 + +- SDK 调用:`request("user/delete", params)` +- HTTP:`DELETE /users/{userID}` +- 动作类型:`delete` + +### 路径参数 + +| 参数 | 说明 | +| --- | --- | +| `userID` | 用户ID | + +### 查询参数 + +无查询参数。 + +### 请求体 + +无请求体。 + +### 返回值 + +- 返回形态:`text` + +### SDK 示例 + +```ts +import { request } from 'zentao-api'; + +const result = await request("user/delete", { + "userID": 1 +}); +``` From a261a7bfe8b88e7405fe5b481eb01f5c19ab5a55 Mon Sep 17 00:00:00 2001 From: catouse Date: Mon, 11 May 2026 20:31:07 +0800 Subject: [PATCH 4/4] * docs: make reference generation deterministic --- docs/reference/classes/ZentaoClient.md | 32 ++------------ docs/reference/classes/ZentaoError.md | 26 ++++-------- docs/reference/functions/addProfile.md | 2 - .../functions/defineModuleActions.md | 2 - docs/reference/functions/defineModules.md | 2 - docs/reference/functions/deleteProfile.md | 2 - docs/reference/functions/getAllProfiles.md | 2 - docs/reference/functions/getGlobalOptions.md | 2 - docs/reference/functions/getModule.md | 2 - docs/reference/functions/getModuleAction.md | 2 - docs/reference/functions/getProfile.md | 2 - docs/reference/functions/getProfileKey.md | 2 - docs/reference/functions/request.md | 2 - docs/reference/functions/setGlobalOptions.md | 2 - docs/reference/functions/switchProfile.md | 2 - docs/reference/interfaces/ApiListResponse.md | 12 +++--- docs/reference/interfaces/ApiResponse.md | 10 ++--- .../interfaces/ClientRequestOptions.md | 16 ++++--- .../interfaces/DefineModulesOptions.md | 8 ++-- docs/reference/interfaces/GlobalOptions.md | 18 ++++---- docs/reference/interfaces/LoginResponse.md | 16 ++++--- docs/reference/interfaces/ModuleAction.md | 32 +++++++------- .../interfaces/ModuleActionPagerGetterMap.md | 12 +++--- .../reference/interfaces/ModuleActionParam.md | 18 ++++---- .../interfaces/ModuleActionRequestBody.md | 14 +++---- .../interfaces/ModuleActionResponse.md | 12 +++--- docs/reference/interfaces/ModuleDefinition.md | 14 +++---- docs/reference/interfaces/Pager.md | 14 +++---- docs/reference/interfaces/RequestOptions.md | 16 ++++--- .../interfaces/ResolvedModuleCommand.md | 20 ++++----- docs/reference/interfaces/ResponseData.md | 20 ++++----- docs/reference/interfaces/ServerConfig.md | 24 +++++------ .../interfaces/ZentaoClientOptions.md | 14 +++---- docs/reference/interfaces/ZentaoProfile.md | 22 +++++----- .../interfaces/ZentaoProfileConfig.md | 24 +++++------ .../interfaces/ZentaoProfileRecord.md | 24 +++++------ .../interfaces/ZentaoProfilesStore.md | 10 ++--- docs/reference/type-aliases/ErrorCode.md | 2 - docs/reference/type-aliases/HttpMethod.md | 2 - docs/reference/type-aliases/ListPagerInfo.md | 2 - .../type-aliases/ModuleActionMethod.md | 2 - .../type-aliases/ModuleActionName.md | 2 - .../type-aliases/ModuleActionParamOption.md | 10 ++--- .../type-aliases/ModuleActionResultRender.md | 2 - .../ModuleActionResultRenderType.md | 2 - .../type-aliases/ModuleActionResultType.md | 2 - .../type-aliases/ModuleActionType.md | 2 - docs/reference/type-aliases/ModuleName.md | 2 - docs/reference/variables/BUILD.md | 2 - docs/reference/variables/ERRORS.md | 42 +++++++++---------- docs/reference/variables/VERSION.md | 2 - .../variables/ZENTAO_PROFILES_STORAGE_KEY.md | 2 - typedoc.json | 1 + 53 files changed, 201 insertions(+), 332 deletions(-) diff --git a/docs/reference/classes/ZentaoClient.md b/docs/reference/classes/ZentaoClient.md index f578cf4..b206567 100644 --- a/docs/reference/classes/ZentaoClient.md +++ b/docs/reference/classes/ZentaoClient.md @@ -2,8 +2,6 @@ # Class: ZentaoClient -Defined in: [src/client/index.ts:43](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L43) - 禅道 API 客户端,负责 Token 注入、请求超时、TLS 选项和响应解析。 ## Constructors @@ -12,8 +10,6 @@ Defined in: [src/client/index.ts:43](https://github.com/easysoft/zentao-api/blob > **new ZentaoClient**(`options`): `ZentaoClient` -Defined in: [src/client/index.ts:53](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L53) - 使用完整配置创建客户端。 #### Parameters @@ -30,8 +26,6 @@ Defined in: [src/client/index.ts:53](https://github.com/easysoft/zentao-api/blob > **new ZentaoClient**(`baseUrl`): `ZentaoClient` -Defined in: [src/client/index.ts:55](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L55) - 使用站点根地址创建客户端。 #### Parameters @@ -46,10 +40,10 @@ Defined in: [src/client/index.ts:55](https://github.com/easysoft/zentao-api/blob ## Properties -| Property | Modifier | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | ------ | -| `baseUrl` | `readonly` | `string` | 禅道 API v2 根地址。 | [src/client/index.ts:47](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L47) | -| `siteUrl` | `readonly` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [src/client/index.ts:45](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L45) | +| Property | Modifier | Type | Description | +| ------ | ------ | ------ | ------ | +| `baseUrl` | `readonly` | `string` | 禅道 API v2 根地址。 | +| `siteUrl` | `readonly` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | ## Methods @@ -57,8 +51,6 @@ Defined in: [src/client/index.ts:55](https://github.com/easysoft/zentao-api/blob > **delete**\<`T`\>(`path`): `Promise`\<`T`\> -Defined in: [src/client/index.ts:139](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L139) - 发起 DELETE 请求。 #### Type Parameters @@ -83,8 +75,6 @@ Defined in: [src/client/index.ts:139](https://github.com/easysoft/zentao-api/blo > **get**\<`T`\>(`path`): `Promise`\<`T`\> -Defined in: [src/client/index.ts:124](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L124) - 发起 GET 请求并按调用方指定类型返回。 #### Type Parameters @@ -109,8 +99,6 @@ Defined in: [src/client/index.ts:124](https://github.com/easysoft/zentao-api/blo > **login**(`account`, `password`): `Promise`\<`string`\> -Defined in: [src/client/index.ts:144](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L144) - 使用账号密码登录,成功后把返回 Token 写入当前客户端实例。 #### Parameters @@ -130,8 +118,6 @@ Defined in: [src/client/index.ts:144](https://github.com/easysoft/zentao-api/blo > **post**\<`T`\>(`path`, `body`): `Promise`\<`T`\> -Defined in: [src/client/index.ts:129](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L129) - 发起 POST 请求并发送 JSON body。 #### Type Parameters @@ -157,8 +143,6 @@ Defined in: [src/client/index.ts:129](https://github.com/easysoft/zentao-api/blo > **put**\<`T`\>(`path`, `body`): `Promise`\<`T`\> -Defined in: [src/client/index.ts:134](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L134) - 发起 PUT 请求并发送 JSON body。 #### Type Parameters @@ -184,8 +168,6 @@ Defined in: [src/client/index.ts:134](https://github.com/easysoft/zentao-api/blo > **request**(`path`, `options?`): `Promise`\<`unknown`\> -Defined in: [src/client/index.ts:71](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L71) - 发起一次原始 API 请求。 默认使用 GET;当服务端返回 `{ status: "fail" }` 时仍按原始内容返回, @@ -208,8 +190,6 @@ Defined in: [src/client/index.ts:71](https://github.com/easysoft/zentao-api/blob > `static` **create**(`options`): `ZentaoClient` -Defined in: [src/client/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L171) - 创建客户端实例,语义等同于 `new ZentaoClient(options)`。 #### Parameters @@ -228,8 +208,6 @@ Defined in: [src/client/index.ts:171](https://github.com/easysoft/zentao-api/blo > `static` **fromProfile**(`profileKey?`): `Promise`\<`ZentaoClient`\> -Defined in: [src/client/index.ts:183](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L183) - 根据本地持久化 profile 创建客户端;不传 key 时使用当前 profile。 #### Parameters @@ -248,8 +226,6 @@ Defined in: [src/client/index.ts:183](https://github.com/easysoft/zentao-api/blo > `static` **init**(`options`): `ZentaoClient` -Defined in: [src/client/index.ts:176](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/client/index.ts#L176) - 创建客户端并写入全局选项,供高阶 `request()` 默认使用。 #### Parameters diff --git a/docs/reference/classes/ZentaoError.md b/docs/reference/classes/ZentaoError.md index c12474f..2521185 100644 --- a/docs/reference/classes/ZentaoError.md +++ b/docs/reference/classes/ZentaoError.md @@ -2,8 +2,6 @@ # Class: ZentaoError -Defined in: [src/misc/errors.ts:25](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L25) - SDK 统一错误类型,所有可预期错误都会携带稳定错误码。 ## Extends @@ -16,8 +14,6 @@ SDK 统一错误类型,所有可预期错误都会携带稳定错误码。 > **new ZentaoError**(`code`, `replacements?`, `details?`): `ZentaoError` -Defined in: [src/misc/errors.ts:32](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L32) - 根据错误码和占位符替换值创建错误。 #### Parameters @@ -38,15 +34,15 @@ Defined in: [src/misc/errors.ts:32](https://github.com/easysoft/zentao-api/blob/ ## Properties -| Property | Modifier | Type | Description | Inherited from | Defined in | -| ------ | ------ | ------ | ------ | ------ | ------ | -| `cause?` | `public` | `unknown` | - | `Error.cause` | node\_modules/typescript/lib/lib.es2022.error.d.ts:26 | -| `code` | `readonly` | `"E_INVALID_BASE_URL"` \| `"E_NO_GLOBAL_CLIENT"` \| `"E_HTTP_ERROR"` \| `"E_NETWORK_ERROR"` \| `"E_TIMEOUT"` \| `"E_INSECURE_BROWSER"` \| `"E_LOGIN_FAILED"` \| `"E_INVALID_PROFILE"` \| `"E_NO_PROFILE"` \| `"E_PROFILE_NOT_FOUND"` \| `"E_PROFILE_STORAGE_INVALID"` \| `"E_PROFILE_STORAGE_UNAVAILABLE"` \| `"E_INVALID_MODULE"` \| `"E_INVALID_ACTION"` \| `"E_INVALID_MODULE_DEFINITION"` \| `"E_INVALID_ACTION_DEFINITION"` \| `"E_MISSING_PARAM"` \| `"E_INVALID_REQUEST_NAME"` | 错误码,对应 [ERRORS](../variables/ERRORS.md) 的 key。 | - | [src/misc/errors.ts:27](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L27) | -| `details?` | `readonly` | `unknown` | 附加上下文,例如 HTTP 响应详情或原始异常。 | - | [src/misc/errors.ts:29](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L29) | -| `message` | `public` | `string` | - | `Error.message` | node\_modules/typescript/lib/lib.es5.d.ts:1077 | -| `name` | `public` | `string` | - | `Error.name` | node\_modules/typescript/lib/lib.es5.d.ts:1076 | -| `stack?` | `public` | `string` | - | `Error.stack` | node\_modules/typescript/lib/lib.es5.d.ts:1078 | -| `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | node\_modules/@types/node/globals.d.ts:68 | +| Property | Modifier | Type | Description | Inherited from | +| ------ | ------ | ------ | ------ | ------ | +| `cause?` | `public` | `unknown` | - | `Error.cause` | +| `code` | `readonly` | `"E_INVALID_BASE_URL"` \| `"E_NO_GLOBAL_CLIENT"` \| `"E_HTTP_ERROR"` \| `"E_NETWORK_ERROR"` \| `"E_TIMEOUT"` \| `"E_INSECURE_BROWSER"` \| `"E_LOGIN_FAILED"` \| `"E_INVALID_PROFILE"` \| `"E_NO_PROFILE"` \| `"E_PROFILE_NOT_FOUND"` \| `"E_PROFILE_STORAGE_INVALID"` \| `"E_PROFILE_STORAGE_UNAVAILABLE"` \| `"E_INVALID_MODULE"` \| `"E_INVALID_ACTION"` \| `"E_INVALID_MODULE_DEFINITION"` \| `"E_INVALID_ACTION_DEFINITION"` \| `"E_MISSING_PARAM"` \| `"E_INVALID_REQUEST_NAME"` | 错误码,对应 [ERRORS](../variables/ERRORS.md) 的 key。 | - | +| `details?` | `readonly` | `unknown` | 附加上下文,例如 HTTP 响应详情或原始异常。 | - | +| `message` | `public` | `string` | - | `Error.message` | +| `name` | `public` | `string` | - | `Error.name` | +| `stack?` | `public` | `string` | - | `Error.stack` | +| `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | ## Methods @@ -54,8 +50,6 @@ Defined in: [src/misc/errors.ts:32](https://github.com/easysoft/zentao-api/blob/ > `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void` -Defined in: node\_modules/@types/node/globals.d.ts:52 - Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. @@ -121,8 +115,6 @@ a(); > `static` **prepareStackTrace**(`err`, `stackTraces`): `any` -Defined in: node\_modules/@types/node/globals.d.ts:56 - #### Parameters | Parameter | Type | diff --git a/docs/reference/functions/addProfile.md b/docs/reference/functions/addProfile.md index c03f666..0f56cc9 100644 --- a/docs/reference/functions/addProfile.md +++ b/docs/reference/functions/addProfile.md @@ -4,8 +4,6 @@ > **addProfile**(`profile`): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)\> -Defined in: [src/profiles/index.ts:186](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L186) - 添加或覆盖一个本地 profile,并把它设置为当前使用的 profile。 ## Parameters diff --git a/docs/reference/functions/defineModuleActions.md b/docs/reference/functions/defineModuleActions.md index bf14fba..f59b938 100644 --- a/docs/reference/functions/defineModuleActions.md +++ b/docs/reference/functions/defineModuleActions.md @@ -4,8 +4,6 @@ > **defineModuleActions**(`moduleName`, `input`): `void` -Defined in: [src/modules/registry.ts:107](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L107) - 为已存在模块定义或覆盖动作;同名动作替换,未知动作追加。 ## Parameters diff --git a/docs/reference/functions/defineModules.md b/docs/reference/functions/defineModules.md index 8726998..c6387d2 100644 --- a/docs/reference/functions/defineModules.md +++ b/docs/reference/functions/defineModules.md @@ -4,8 +4,6 @@ > **defineModules**(`input`, `options?`): `void` -Defined in: [src/modules/registry.ts:91](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L91) - 定义或扩展模块;同名模块默认合并动作,`replace` 为真时整体替换,未知模块追加。 ## Parameters diff --git a/docs/reference/functions/deleteProfile.md b/docs/reference/functions/deleteProfile.md index 7b8a9a9..5713c6d 100644 --- a/docs/reference/functions/deleteProfile.md +++ b/docs/reference/functions/deleteProfile.md @@ -4,8 +4,6 @@ > **deleteProfile**(`profileKey`): `Promise`\<`boolean`\> -Defined in: [src/profiles/index.ts:209](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L209) - 删除指定 profile;返回是否实际删除了记录。 ## Parameters diff --git a/docs/reference/functions/getAllProfiles.md b/docs/reference/functions/getAllProfiles.md index c297062..d4daa84 100644 --- a/docs/reference/functions/getAllProfiles.md +++ b/docs/reference/functions/getAllProfiles.md @@ -4,8 +4,6 @@ > **getAllProfiles**(): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)[]\> -Defined in: [src/profiles/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L171) - 列出所有保存的本地 profile。 ## Returns diff --git a/docs/reference/functions/getGlobalOptions.md b/docs/reference/functions/getGlobalOptions.md index 651f223..4b1fd36 100644 --- a/docs/reference/functions/getGlobalOptions.md +++ b/docs/reference/functions/getGlobalOptions.md @@ -4,8 +4,6 @@ > **getGlobalOptions**(): [`GlobalOptions`](../interfaces/GlobalOptions.md) -Defined in: [src/misc/global-options.ts:6](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/global-options.ts#L6) - 获取当前全局选项快照;返回副本,避免调用方直接改写内部状态。 ## Returns diff --git a/docs/reference/functions/getModule.md b/docs/reference/functions/getModule.md index f57b59a..a155a01 100644 --- a/docs/reference/functions/getModule.md +++ b/docs/reference/functions/getModule.md @@ -4,8 +4,6 @@ > **getModule**(`moduleName`): [`ModuleDefinition`](../interfaces/ModuleDefinition.md) -Defined in: [src/modules/registry.ts:127](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L127) - 获取模块定义;模块不存在时抛出 [ZentaoError](../classes/ZentaoError.md)。 ## Parameters diff --git a/docs/reference/functions/getModuleAction.md b/docs/reference/functions/getModuleAction.md index cf196cc..ea40102 100644 --- a/docs/reference/functions/getModuleAction.md +++ b/docs/reference/functions/getModuleAction.md @@ -4,8 +4,6 @@ > **getModuleAction**(`moduleName`, `actionName`): [`ModuleAction`](../interfaces/ModuleAction.md) -Defined in: [src/modules/registry.ts:136](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L136) - 获取指定模块动作;`ls` 会作为 `list` 的别名处理。 ## Parameters diff --git a/docs/reference/functions/getProfile.md b/docs/reference/functions/getProfile.md index 24ee7e8..e24ffdd 100644 --- a/docs/reference/functions/getProfile.md +++ b/docs/reference/functions/getProfile.md @@ -4,8 +4,6 @@ > **getProfile**(`profileKey?`): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md) \| `undefined`\> -Defined in: [src/profiles/index.ts:177](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L177) - 获取指定 profile;不传 key 时返回上次使用的 profile。 ## Parameters diff --git a/docs/reference/functions/getProfileKey.md b/docs/reference/functions/getProfileKey.md index 70cc1ca..fb01d65 100644 --- a/docs/reference/functions/getProfileKey.md +++ b/docs/reference/functions/getProfileKey.md @@ -4,8 +4,6 @@ > **getProfileKey**(`profile`): `string` -Defined in: [src/profiles/index.ts:166](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L166) - 根据 profile 的账号和禅道地址生成稳定 key。 ## Parameters diff --git a/docs/reference/functions/request.md b/docs/reference/functions/request.md index 198c54a..e814505 100644 --- a/docs/reference/functions/request.md +++ b/docs/reference/functions/request.md @@ -4,8 +4,6 @@ > **request**(`name`, `params?`, `options?`): `Promise`\<[`ResponseData`](../interfaces/ResponseData.md)\> -Defined in: [src/request/index.ts:51](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/request/index.ts#L51) - 按模块动作名请求禅道 API。 选项优先级为:本次调用 options > 全局 options > 客户端默认值。 diff --git a/docs/reference/functions/setGlobalOptions.md b/docs/reference/functions/setGlobalOptions.md index dc1532d..b692550 100644 --- a/docs/reference/functions/setGlobalOptions.md +++ b/docs/reference/functions/setGlobalOptions.md @@ -4,8 +4,6 @@ > **setGlobalOptions**(`options`): `void` -Defined in: [src/misc/global-options.ts:11](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/global-options.ts#L11) - 合并设置全局选项;传入 `undefined` 可清空对应字段。 ## Parameters diff --git a/docs/reference/functions/switchProfile.md b/docs/reference/functions/switchProfile.md index ef45eaf..a1dba1c 100644 --- a/docs/reference/functions/switchProfile.md +++ b/docs/reference/functions/switchProfile.md @@ -4,8 +4,6 @@ > **switchProfile**(`profileKey?`): `Promise`\<[`ZentaoProfileRecord`](../interfaces/ZentaoProfileRecord.md)\> -Defined in: [src/profiles/index.ts:221](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L221) - 切换当前使用的 profile,并刷新最后使用时间;不传 key 时使用当前 profile。 ## Parameters diff --git a/docs/reference/interfaces/ApiListResponse.md b/docs/reference/interfaces/ApiListResponse.md index 2434592..8810734 100644 --- a/docs/reference/interfaces/ApiListResponse.md +++ b/docs/reference/interfaces/ApiListResponse.md @@ -2,8 +2,6 @@ # Interface: ApiListResponse -Defined in: [src/types/index.ts:104](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L104) - 禅道 API 列表响应结构。 ## Extends @@ -18,8 +16,8 @@ Defined in: [src/types/index.ts:104](https://github.com/easysoft/zentao-api/blob ## Properties -| Property | Type | Description | Inherited from | Defined in | -| ------ | ------ | ------ | ------ | ------ | -| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [`ApiResponse`](ApiResponse.md).[`message`](ApiResponse.md#property-message) | [src/types/index.ts:98](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L98) | -| `pager?` | [`Pager`](Pager.md) | 原始分页信息。 | - | [src/types/index.ts:106](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L106) | -| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [`ApiResponse`](ApiResponse.md).[`status`](ApiResponse.md#property-status) | [src/types/index.ts:96](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L96) | +| Property | Type | Description | Inherited from | +| ------ | ------ | ------ | ------ | +| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [`ApiResponse`](ApiResponse.md).[`message`](ApiResponse.md#property-message) | +| `pager?` | [`Pager`](Pager.md) | 原始分页信息。 | - | +| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [`ApiResponse`](ApiResponse.md).[`status`](ApiResponse.md#property-status) | diff --git a/docs/reference/interfaces/ApiResponse.md b/docs/reference/interfaces/ApiResponse.md index 5c3abf8..f9f746d 100644 --- a/docs/reference/interfaces/ApiResponse.md +++ b/docs/reference/interfaces/ApiResponse.md @@ -2,8 +2,6 @@ # Interface: ApiResponse -Defined in: [src/types/index.ts:94](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L94) - 禅道 API 通用响应结构,允许携带任意业务字段。 ## Extended by @@ -19,7 +17,7 @@ Defined in: [src/types/index.ts:94](https://github.com/easysoft/zentao-api/blob/ ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [src/types/index.ts:98](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L98) | -| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [src/types/index.ts:96](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L96) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | +| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | diff --git a/docs/reference/interfaces/ClientRequestOptions.md b/docs/reference/interfaces/ClientRequestOptions.md index f8cbb44..86beb09 100644 --- a/docs/reference/interfaces/ClientRequestOptions.md +++ b/docs/reference/interfaces/ClientRequestOptions.md @@ -2,16 +2,14 @@ # Interface: ClientRequestOptions -Defined in: [src/types/index.ts:35](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L35) - `ZentaoClient.request()` 的单次请求选项。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `body?` | `Record`\<`string`, `unknown`\> | JSON 请求体;`GET` 请求会忽略该字段。 | [src/types/index.ts:39](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L39) | -| `insecure?` | `boolean` | 单次请求 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | [src/types/index.ts:45](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L45) | -| `method?` | [`HttpMethod`](../type-aliases/HttpMethod.md) | HTTP 方法,默认 `GET`。 | [src/types/index.ts:37](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L37) | -| `query?` | `Record`\<`string`, `string` \| `number` \| `boolean` \| `undefined`\> | URL 查询参数;`undefined` 值会被跳过。 | [src/types/index.ts:41](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L41) | -| `timeout?` | `number` | 单次请求超时时间,优先级高于全局和客户端默认值。 | [src/types/index.ts:43](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L43) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `body?` | `Record`\<`string`, `unknown`\> | JSON 请求体;`GET` 请求会忽略该字段。 | +| `insecure?` | `boolean` | 单次请求 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | +| `method?` | [`HttpMethod`](../type-aliases/HttpMethod.md) | HTTP 方法,默认 `GET`。 | +| `query?` | `Record`\<`string`, `string` \| `number` \| `boolean` \| `undefined`\> | URL 查询参数;`undefined` 值会被跳过。 | +| `timeout?` | `number` | 单次请求超时时间,优先级高于全局和客户端默认值。 | diff --git a/docs/reference/interfaces/DefineModulesOptions.md b/docs/reference/interfaces/DefineModulesOptions.md index cf4577b..a9e29d3 100644 --- a/docs/reference/interfaces/DefineModulesOptions.md +++ b/docs/reference/interfaces/DefineModulesOptions.md @@ -2,10 +2,8 @@ # Interface: DefineModulesOptions -Defined in: [src/modules/registry.ts:9](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L9) - ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `replace?` | `boolean` | 同名模块是否整体替换;默认合并模块定义和动作。 | [src/modules/registry.ts:11](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/modules/registry.ts#L11) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `replace?` | `boolean` | 同名模块是否整体替换;默认合并模块定义和动作。 | diff --git a/docs/reference/interfaces/GlobalOptions.md b/docs/reference/interfaces/GlobalOptions.md index ae9bb52..6b7fddf 100644 --- a/docs/reference/interfaces/GlobalOptions.md +++ b/docs/reference/interfaces/GlobalOptions.md @@ -2,17 +2,15 @@ # Interface: GlobalOptions -Defined in: [src/types/index.ts:16](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L16) - SDK 进程级全局默认选项,供高阶 [request](../functions/request.md) 调用复用。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `client?` | [`ZentaoClient`](../classes/ZentaoClient.md) | 默认客户端;通常由 `ZentaoClient.init()` 设置。 | [src/types/index.ts:18](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L18) | -| `insecure?` | `boolean` | 默认 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | [src/types/index.ts:26](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L26) | -| `limit?` | `string` | 默认限制返回列表数量,只影响 SDK 归一化后的 `data`。 | [src/types/index.ts:22](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L22) | -| `persistProfiles?` | `boolean` | 是否在登录成功后把账号、Token 和配置持久化为本地 profile。 | [src/types/index.ts:28](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L28) | -| `recPerPage?` | `string` | 默认每页记录数,会映射到模块动作的 `recPerPage` 参数。 | [src/types/index.ts:20](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L20) | -| `timeout?` | `number` | 默认请求超时时间,优先级低于单次请求选项。 | [src/types/index.ts:24](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L24) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `client?` | [`ZentaoClient`](../classes/ZentaoClient.md) | 默认客户端;通常由 `ZentaoClient.init()` 设置。 | +| `insecure?` | `boolean` | 默认 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | +| `limit?` | `string` | 默认限制返回列表数量,只影响 SDK 归一化后的 `data`。 | +| `persistProfiles?` | `boolean` | 是否在登录成功后把账号、Token 和配置持久化为本地 profile。 | +| `recPerPage?` | `string` | 默认每页记录数,会映射到模块动作的 `recPerPage` 参数。 | +| `timeout?` | `number` | 默认请求超时时间,优先级低于单次请求选项。 | diff --git a/docs/reference/interfaces/LoginResponse.md b/docs/reference/interfaces/LoginResponse.md index 78c2998..b2aa423 100644 --- a/docs/reference/interfaces/LoginResponse.md +++ b/docs/reference/interfaces/LoginResponse.md @@ -2,8 +2,6 @@ # Interface: LoginResponse -Defined in: [src/types/index.ts:110](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L110) - 登录接口响应结构。 ## Extends @@ -18,10 +16,10 @@ Defined in: [src/types/index.ts:110](https://github.com/easysoft/zentao-api/blob ## Properties -| Property | Type | Description | Inherited from | Defined in | -| ------ | ------ | ------ | ------ | ------ | -| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [`ApiResponse`](ApiResponse.md).[`message`](ApiResponse.md#property-message) | [src/types/index.ts:98](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L98) | -| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 部分禅道环境会随登录响应返回服务端配置。 | - | [src/types/index.ts:116](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L116) | -| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [`ApiResponse`](ApiResponse.md).[`status`](ApiResponse.md#property-status) | [src/types/index.ts:96](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L96) | -| `token?` | `string` | 登录成功后返回的 API Token。 | - | [src/types/index.ts:112](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L112) | -| `user?` | `Record`\<`string`, `unknown`\> | 部分禅道环境会随登录响应返回用户信息。 | - | [src/types/index.ts:114](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L114) | +| Property | Type | Description | Inherited from | +| ------ | ------ | ------ | ------ | +| `message?` | `unknown` | 服务端消息,可能是字符串、对象或数组。 | [`ApiResponse`](ApiResponse.md).[`message`](ApiResponse.md#property-message) | +| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 部分禅道环境会随登录响应返回服务端配置。 | - | +| `status` | `"success"` \| `"fail"` | 服务端返回状态。 | [`ApiResponse`](ApiResponse.md).[`status`](ApiResponse.md#property-status) | +| `token?` | `string` | 登录成功后返回的 API Token。 | - | +| `user?` | `Record`\<`string`, `unknown`\> | 部分禅道环境会随登录响应返回用户信息。 | - | diff --git a/docs/reference/interfaces/ModuleAction.md b/docs/reference/interfaces/ModuleAction.md index d8282ab..b7da1c7 100644 --- a/docs/reference/interfaces/ModuleAction.md +++ b/docs/reference/interfaces/ModuleAction.md @@ -2,24 +2,22 @@ # Interface: ModuleAction -Defined in: [src/types/index.ts:263](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L263) - 禅道模块中的单个 API 动作定义。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `description?` | `string` | 动作说明。 | [src/types/index.ts:271](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L271) | -| `display?` | `string` | 面向用户展示的动作名称。 | [src/types/index.ts:269](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L269) | -| `method` | [`ModuleActionMethod`](../type-aliases/ModuleActionMethod.md) | HTTP 方法。 | [src/types/index.ts:273](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L273) | -| `name` | [`ModuleActionName`](../type-aliases/ModuleActionName.md) | 动作名称,例如 `list`、`get`、`close`。 | [src/types/index.ts:265](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L265) | -| `pagerGetter?` | `string` \| [`ModuleActionPagerGetterMap`](ModuleActionPagerGetterMap.md) \| ((`data`, `params`) => [`Pager`](Pager.md)) | 从原始响应中提取分页信息的位置或函数。 | [src/types/index.ts:285](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L285) | -| `params?` | [`ModuleActionParam`](ModuleActionParam.md)[] | 查询参数定义。 | [src/types/index.ts:279](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L279) | -| `path` | `string` | API 路径模板,可包含 `{productID}` 等路径参数。 | [src/types/index.ts:275](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L275) | -| `pathParams?` | `Record`\<`string`, `string` \| `Omit`\<[`ModuleActionParam`](ModuleActionParam.md), `"name"`\>\> | 路径参数定义;字符串为说明,对象可携带默认值和可选项。 | [src/types/index.ts:277](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L277) | -| `render?` | `string` \| [`ModuleActionResultRender`](../type-aliases/ModuleActionResultRender.md) \| `Record`\<[`ModuleActionResultRenderType`](../type-aliases/ModuleActionResultRenderType.md), [`ModuleActionResultRender`](../type-aliases/ModuleActionResultRender.md)\> | 供上层应用使用的渲染配置。 | [src/types/index.ts:289](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L289) | -| `requestBody?` | [`ModuleActionRequestBody`](ModuleActionRequestBody.md) | 请求体定义。 | [src/types/index.ts:281](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L281) | -| `resultGetter?` | `string` \| `Record`\<`string`, `string`\> \| ((`data`, `params`) => `unknown`) | 从原始响应中提取业务数据的位置或函数。 | [src/types/index.ts:287](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L287) | -| `resultType` | [`ModuleActionResultType`](../type-aliases/ModuleActionResultType.md) | 结果形态。 | [src/types/index.ts:283](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L283) | -| `type` | [`ModuleActionType`](../type-aliases/ModuleActionType.md) | 动作类型,决定高阶 request 的路径/参数解析策略。 | [src/types/index.ts:267](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L267) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `description?` | `string` | 动作说明。 | +| `display?` | `string` | 面向用户展示的动作名称。 | +| `method` | [`ModuleActionMethod`](../type-aliases/ModuleActionMethod.md) | HTTP 方法。 | +| `name` | [`ModuleActionName`](../type-aliases/ModuleActionName.md) | 动作名称,例如 `list`、`get`、`close`。 | +| `pagerGetter?` | `string` \| [`ModuleActionPagerGetterMap`](ModuleActionPagerGetterMap.md) \| ((`data`, `params`) => [`Pager`](Pager.md)) | 从原始响应中提取分页信息的位置或函数。 | +| `params?` | [`ModuleActionParam`](ModuleActionParam.md)[] | 查询参数定义。 | +| `path` | `string` | API 路径模板,可包含 `{productID}` 等路径参数。 | +| `pathParams?` | `Record`\<`string`, `string` \| `Omit`\<[`ModuleActionParam`](ModuleActionParam.md), `"name"`\>\> | 路径参数定义;字符串为说明,对象可携带默认值和可选项。 | +| `render?` | `string` \| [`ModuleActionResultRender`](../type-aliases/ModuleActionResultRender.md) \| `Record`\<[`ModuleActionResultRenderType`](../type-aliases/ModuleActionResultRenderType.md), [`ModuleActionResultRender`](../type-aliases/ModuleActionResultRender.md)\> | 供上层应用使用的渲染配置。 | +| `requestBody?` | [`ModuleActionRequestBody`](ModuleActionRequestBody.md) | 请求体定义。 | +| `resultGetter?` | `string` \| `Record`\<`string`, `string`\> \| ((`data`, `params`) => `unknown`) | 从原始响应中提取业务数据的位置或函数。 | +| `resultType` | [`ModuleActionResultType`](../type-aliases/ModuleActionResultType.md) | 结果形态。 | +| `type` | [`ModuleActionType`](../type-aliases/ModuleActionType.md) | 动作类型,决定高阶 request 的路径/参数解析策略。 | diff --git a/docs/reference/interfaces/ModuleActionPagerGetterMap.md b/docs/reference/interfaces/ModuleActionPagerGetterMap.md index 29b58a8..342da51 100644 --- a/docs/reference/interfaces/ModuleActionPagerGetterMap.md +++ b/docs/reference/interfaces/ModuleActionPagerGetterMap.md @@ -2,14 +2,12 @@ # Interface: ModuleActionPagerGetterMap -Defined in: [src/types/index.ts:253](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L253) - 从原始响应中提取分页字段时使用的字段映射。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `pageID` | `string` | 当前页码字段名。 | [src/types/index.ts:255](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L255) | -| `recPerPage` | `string` | 每页记录数字段名。 | [src/types/index.ts:257](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L257) | -| `recTotal` | `string` | 总记录数字段名。 | [src/types/index.ts:259](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L259) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `pageID` | `string` | 当前页码字段名。 | +| `recPerPage` | `string` | 每页记录数字段名。 | +| `recTotal` | `string` | 总记录数字段名。 | diff --git a/docs/reference/interfaces/ModuleActionParam.md b/docs/reference/interfaces/ModuleActionParam.md index d974df8..976780e 100644 --- a/docs/reference/interfaces/ModuleActionParam.md +++ b/docs/reference/interfaces/ModuleActionParam.md @@ -2,17 +2,15 @@ # Interface: ModuleActionParam -Defined in: [src/types/index.ts:201](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L201) - 模块动作的查询参数定义。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `defaultValue?` | `unknown` | 未显式传入时使用的默认值。 | [src/types/index.ts:209](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L209) | -| `description?` | `string` | 参数说明。 | [src/types/index.ts:205](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L205) | -| `name` | `string` | 参数名称。 | [src/types/index.ts:203](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L203) | -| `options?` | [`ModuleActionParamOption`](../type-aliases/ModuleActionParamOption.md)[] | 参数可选值。 | [src/types/index.ts:213](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L213) | -| `required?` | `boolean` | 是否必填。 | [src/types/index.ts:207](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L207) | -| `type?` | `"string"` \| `"number"` \| `"boolean"` | 参数值类型,用于基础类型转换。 | [src/types/index.ts:211](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L211) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `defaultValue?` | `unknown` | 未显式传入时使用的默认值。 | +| `description?` | `string` | 参数说明。 | +| `name` | `string` | 参数名称。 | +| `options?` | [`ModuleActionParamOption`](../type-aliases/ModuleActionParamOption.md)[] | 参数可选值。 | +| `required?` | `boolean` | 是否必填。 | +| `type?` | `"string"` \| `"number"` \| `"boolean"` | 参数值类型,用于基础类型转换。 | diff --git a/docs/reference/interfaces/ModuleActionRequestBody.md b/docs/reference/interfaces/ModuleActionRequestBody.md index 9e5e927..e510540 100644 --- a/docs/reference/interfaces/ModuleActionRequestBody.md +++ b/docs/reference/interfaces/ModuleActionRequestBody.md @@ -2,15 +2,13 @@ # Interface: ModuleActionRequestBody -Defined in: [src/types/index.ts:222](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L222) - 模块动作请求体定义。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `example?` | `unknown` | 请求体示例。 | [src/types/index.ts:230](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L230) | -| `required?` | `boolean` | 请求体是否必填。 | [src/types/index.ts:226](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L226) | -| `schema` | `Record`\<`string`, `unknown`\> | OpenAPI 风格 schema,用于从 params 组装 body。 | [src/types/index.ts:228](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L228) | -| `type?` | `"string"` \| `"object"` | 请求体类型。 | [src/types/index.ts:224](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L224) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `example?` | `unknown` | 请求体示例。 | +| `required?` | `boolean` | 请求体是否必填。 | +| `schema` | `Record`\<`string`, `unknown`\> | OpenAPI 风格 schema,用于从 params 组装 body。 | +| `type?` | `"string"` \| `"object"` | 请求体类型。 | diff --git a/docs/reference/interfaces/ModuleActionResponse.md b/docs/reference/interfaces/ModuleActionResponse.md index 49a6e5e..e0f577b 100644 --- a/docs/reference/interfaces/ModuleActionResponse.md +++ b/docs/reference/interfaces/ModuleActionResponse.md @@ -2,14 +2,12 @@ # Interface: ModuleActionResponse -Defined in: [src/types/index.ts:234](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L234) - 模块动作响应定义。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `description?` | `string` | 响应说明。 | [src/types/index.ts:236](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L236) | -| `example?` | `unknown` | 响应示例。 | [src/types/index.ts:240](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L240) | -| `schema` | `Record`\<`string`, `unknown`\> | 响应 schema。 | [src/types/index.ts:238](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L238) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `description?` | `string` | 响应说明。 | +| `example?` | `unknown` | 响应示例。 | +| `schema` | `Record`\<`string`, `unknown`\> | 响应 schema。 | diff --git a/docs/reference/interfaces/ModuleDefinition.md b/docs/reference/interfaces/ModuleDefinition.md index 46c7472..1228591 100644 --- a/docs/reference/interfaces/ModuleDefinition.md +++ b/docs/reference/interfaces/ModuleDefinition.md @@ -2,15 +2,13 @@ # Interface: ModuleDefinition -Defined in: [src/types/index.ts:316](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L316) - 禅道模块定义,由多个动作组成。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `actions` | [`ModuleAction`](ModuleAction.md)[] | 模块支持的动作集合。 | [src/types/index.ts:324](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L324) | -| `description?` | `string` | 模块说明。 | [src/types/index.ts:322](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L322) | -| `display?` | `string` | 面向用户展示的模块名称。 | [src/types/index.ts:320](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L320) | -| `name` | [`ModuleName`](../type-aliases/ModuleName.md) | 模块名称,例如 `product`、`bug`。 | [src/types/index.ts:318](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L318) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `actions` | [`ModuleAction`](ModuleAction.md)[] | 模块支持的动作集合。 | +| `description?` | `string` | 模块说明。 | +| `display?` | `string` | 面向用户展示的模块名称。 | +| `name` | [`ModuleName`](../type-aliases/ModuleName.md) | 模块名称,例如 `product`、`bug`。 | diff --git a/docs/reference/interfaces/Pager.md b/docs/reference/interfaces/Pager.md index eb0863c..5f5a174 100644 --- a/docs/reference/interfaces/Pager.md +++ b/docs/reference/interfaces/Pager.md @@ -2,15 +2,13 @@ # Interface: Pager -Defined in: [src/types/index.ts:82](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L82) - 禅道 API 原始分页结构。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `pageID` | `number` | 当前页码。 | [src/types/index.ts:90](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L90) | -| `pageTotal?` | `number` | 总页数,部分接口不返回。 | [src/types/index.ts:88](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L88) | -| `recPerPage` | `number` | 每页记录数。 | [src/types/index.ts:86](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L86) | -| `recTotal` | `number` | 总记录数。 | [src/types/index.ts:84](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L84) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `pageID` | `number` | 当前页码。 | +| `pageTotal?` | `number` | 总页数,部分接口不返回。 | +| `recPerPage` | `number` | 每页记录数。 | +| `recTotal` | `number` | 总记录数。 | diff --git a/docs/reference/interfaces/RequestOptions.md b/docs/reference/interfaces/RequestOptions.md index 1abe163..bf20b32 100644 --- a/docs/reference/interfaces/RequestOptions.md +++ b/docs/reference/interfaces/RequestOptions.md @@ -2,16 +2,14 @@ # Interface: RequestOptions -Defined in: [src/types/index.ts:49](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L49) - 高阶 `request("moduleName/methodName")` 的单次调用选项。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `client?` | [`ZentaoClient`](../classes/ZentaoClient.md) | 本次调用使用的客户端;优先级高于全局客户端。 | [src/types/index.ts:51](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L51) | -| `insecure?` | `boolean` | 本次调用 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | [src/types/index.ts:59](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L59) | -| `limit?` | `string` | 本次调用限制返回列表数量,优先级高于全局 `limit`。 | [src/types/index.ts:55](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L55) | -| `recPerPage?` | `string` | 本次调用使用的每页记录数,优先级高于全局 `recPerPage`。 | [src/types/index.ts:53](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L53) | -| `timeout?` | `number` | 本次调用超时时间。 | [src/types/index.ts:57](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L57) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `client?` | [`ZentaoClient`](../classes/ZentaoClient.md) | 本次调用使用的客户端;优先级高于全局客户端。 | +| `insecure?` | `boolean` | 本次调用 TLS 跳过证书验证选项;仅 Node.js 运行时支持。 | +| `limit?` | `string` | 本次调用限制返回列表数量,优先级高于全局 `limit`。 | +| `recPerPage?` | `string` | 本次调用使用的每页记录数,优先级高于全局 `recPerPage`。 | +| `timeout?` | `number` | 本次调用超时时间。 | diff --git a/docs/reference/interfaces/ResolvedModuleCommand.md b/docs/reference/interfaces/ResolvedModuleCommand.md index ff93a4c..c1fe64f 100644 --- a/docs/reference/interfaces/ResolvedModuleCommand.md +++ b/docs/reference/interfaces/ResolvedModuleCommand.md @@ -2,18 +2,16 @@ # Interface: ResolvedModuleCommand -Defined in: [src/types/index.ts:328](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L328) - 将模块动作和参数解析后的可执行请求描述。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `action` | [`ModuleAction`](ModuleAction.md) | 匹配到的动作定义。 | [src/types/index.ts:332](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L332) | -| `data?` | `Record`\<`string`, `unknown`\> | 已组装的请求体。 | [src/types/index.ts:340](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L340) | -| `id?` | `number` | 从 `id` 或 `{module}ID` 推断出的对象 ID。 | [src/types/index.ts:342](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L342) | -| `module` | `string` | 模块名称。 | [src/types/index.ts:330](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L330) | -| `params` | `Record`\<`string`, `unknown`\> | 原始调用参数。 | [src/types/index.ts:334](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L334) | -| `path` | `string` | 已替换路径参数后的 API 路径。 | [src/types/index.ts:336](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L336) | -| `query?` | `Record`\<`string`, `string` \| `number`\> | 已组装的查询参数。 | [src/types/index.ts:338](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L338) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `action` | [`ModuleAction`](ModuleAction.md) | 匹配到的动作定义。 | +| `data?` | `Record`\<`string`, `unknown`\> | 已组装的请求体。 | +| `id?` | `number` | 从 `id` 或 `{module}ID` 推断出的对象 ID。 | +| `module` | `string` | 模块名称。 | +| `params` | `Record`\<`string`, `unknown`\> | 原始调用参数。 | +| `path` | `string` | 已替换路径参数后的 API 路径。 | +| `query?` | `Record`\<`string`, `string` \| `number`\> | 已组装的查询参数。 | diff --git a/docs/reference/interfaces/ResponseData.md b/docs/reference/interfaces/ResponseData.md index 95862a2..8907ab3 100644 --- a/docs/reference/interfaces/ResponseData.md +++ b/docs/reference/interfaces/ResponseData.md @@ -2,18 +2,16 @@ # Interface: ResponseData -Defined in: [src/types/index.ts:63](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L63) - 高阶 `request()` 归一化后的返回数据。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `data?` | `any` | 根据模块动作 `resultGetter` 提取后的业务数据。 | [src/types/index.ts:69](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L69) | -| `message?` | `string` | 禅道服务端返回的消息。 | [src/types/index.ts:67](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L67) | -| `pager?` | `object` | 统一分页信息。 | [src/types/index.ts:71](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L71) | -| `pager.page` | `number` | 当前页码。 | [src/types/index.ts:75](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L75) | -| `pager.recPerPage` | `number` | 每页记录数。 | [src/types/index.ts:77](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L77) | -| `pager.total` | `number` | 总记录数。 | [src/types/index.ts:73](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L73) | -| `status` | `"success"` \| `"fail"` | 禅道服务端状态;非标准响应会按成功响应包装到 `data`。 | [src/types/index.ts:65](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L65) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `data?` | `any` | 根据模块动作 `resultGetter` 提取后的业务数据。 | +| `message?` | `string` | 禅道服务端返回的消息。 | +| `pager?` | `object` | 统一分页信息。 | +| `pager.page` | `number` | 当前页码。 | +| `pager.recPerPage` | `number` | 每页记录数。 | +| `pager.total` | `number` | 总记录数。 | +| `status` | `"success"` \| `"fail"` | 禅道服务端状态;非标准响应会按成功响应包装到 `data`。 | diff --git a/docs/reference/interfaces/ServerConfig.md b/docs/reference/interfaces/ServerConfig.md index d2ea0a7..6e6da3e 100644 --- a/docs/reference/interfaces/ServerConfig.md +++ b/docs/reference/interfaces/ServerConfig.md @@ -2,20 +2,18 @@ # Interface: ServerConfig -Defined in: [src/types/index.ts:120](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L120) - 禅道 `?mode=getconfig` 返回的服务端配置。 ## Properties -| Property | Type | Defined in | -| ------ | ------ | ------ | -| `methodVar` | `string` | [src/types/index.ts:127](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L127) | -| `moduleVar` | `string` | [src/types/index.ts:126](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L126) | -| `requestFix` | `string` | [src/types/index.ts:125](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L125) | -| `requestType` | `string` | [src/types/index.ts:124](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L124) | -| `sessionVar` | `string` | [src/types/index.ts:129](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L129) | -| `sprintConcept` | `string` | [src/types/index.ts:123](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L123) | -| `systemMode` | `string` | [src/types/index.ts:122](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L122) | -| `version` | `string` | [src/types/index.ts:121](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L121) | -| `viewVar` | `string` | [src/types/index.ts:128](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L128) | +| Property | Type | +| ------ | ------ | +| `methodVar` | `string` | +| `moduleVar` | `string` | +| `requestFix` | `string` | +| `requestType` | `string` | +| `sessionVar` | `string` | +| `sprintConcept` | `string` | +| `systemMode` | `string` | +| `version` | `string` | +| `viewVar` | `string` | diff --git a/docs/reference/interfaces/ZentaoClientOptions.md b/docs/reference/interfaces/ZentaoClientOptions.md index 8da4016..5b569ee 100644 --- a/docs/reference/interfaces/ZentaoClientOptions.md +++ b/docs/reference/interfaces/ZentaoClientOptions.md @@ -2,15 +2,13 @@ # Interface: ZentaoClientOptions -Defined in: [src/types/index.ts:4](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L4) - 创建 [ZentaoClient](../classes/ZentaoClient.md) 时使用的配置。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `baseUrl` | `string` | 禅道站点根地址,例如 `https://zentao.example.com`;SDK 会自动拼接 `/api.php/v2`。 | [src/types/index.ts:6](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L6) | -| `insecure?` | `boolean` | 是否跳过 TLS 证书验证;仅 Node.js 运行时支持,浏览器中会抛错。 | [src/types/index.ts:12](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L12) | -| `timeout?` | `number` | 默认请求超时时间,单位毫秒。 | [src/types/index.ts:10](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L10) | -| `token?` | `string` | 禅道 API Token;未提供时可稍后通过 [ZentaoClient.login](../classes/ZentaoClient.md#login) 获取并写入实例。 | [src/types/index.ts:8](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L8) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `baseUrl` | `string` | 禅道站点根地址,例如 `https://zentao.example.com`;SDK 会自动拼接 `/api.php/v2`。 | +| `insecure?` | `boolean` | 是否跳过 TLS 证书验证;仅 Node.js 运行时支持,浏览器中会抛错。 | +| `timeout?` | `number` | 默认请求超时时间,单位毫秒。 | +| `token?` | `string` | 禅道 API Token;未提供时可稍后通过 [ZentaoClient.login](../classes/ZentaoClient.md#login) 获取并写入实例。 | diff --git a/docs/reference/interfaces/ZentaoProfile.md b/docs/reference/interfaces/ZentaoProfile.md index dec73ff..69d1cf7 100644 --- a/docs/reference/interfaces/ZentaoProfile.md +++ b/docs/reference/interfaces/ZentaoProfile.md @@ -2,8 +2,6 @@ # Interface: ZentaoProfile -Defined in: [src/types/index.ts:157](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L157) - 本地持久化的禅道账号 profile。 ## Extended by @@ -18,13 +16,13 @@ Defined in: [src/types/index.ts:157](https://github.com/easysoft/zentao-api/blob ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `account` | `string` | 用户账号。 | [src/types/index.ts:161](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L161) | -| `config?` | [`ZentaoProfileConfig`](ZentaoProfileConfig.md) | 客户端自定义配置。 | [src/types/index.ts:173](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L173) | -| `lastUsedTime?` | `string` | 最后使用时间。 | [src/types/index.ts:169](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L169) | -| `loginTime?` | `string` | 登录时间。 | [src/types/index.ts:167](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L167) | -| `server` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [src/types/index.ts:159](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L159) | -| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 禅道服务端配置。 | [src/types/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L171) | -| `token` | `string` | 禅道 API Token。 | [src/types/index.ts:163](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L163) | -| `user?` | `Record`\<`string`, `unknown`\> | 登录验证通过后得到的用户信息。 | [src/types/index.ts:165](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L165) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `account` | `string` | 用户账号。 | +| `config?` | [`ZentaoProfileConfig`](ZentaoProfileConfig.md) | 客户端自定义配置。 | +| `lastUsedTime?` | `string` | 最后使用时间。 | +| `loginTime?` | `string` | 登录时间。 | +| `server` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | +| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 禅道服务端配置。 | +| `token` | `string` | 禅道 API Token。 | +| `user?` | `Record`\<`string`, `unknown`\> | 登录验证通过后得到的用户信息。 | diff --git a/docs/reference/interfaces/ZentaoProfileConfig.md b/docs/reference/interfaces/ZentaoProfileConfig.md index 8fb875f..6e51a5b 100644 --- a/docs/reference/interfaces/ZentaoProfileConfig.md +++ b/docs/reference/interfaces/ZentaoProfileConfig.md @@ -2,8 +2,6 @@ # Interface: ZentaoProfileConfig -Defined in: [src/types/index.ts:133](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L133) - 保存到本地 profile 中的客户端偏好配置。 ## Indexable @@ -14,14 +12,14 @@ Defined in: [src/types/index.ts:133](https://github.com/easysoft/zentao-api/blob ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `batchFailFast?` | `boolean` | 是否在批量操作出错时停止执行后续操作。 | [src/types/index.ts:147](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L147) | -| `defaultOutputFormat?` | `"markdown"` \| `"json"` \| `"raw"` | 默认输出格式,供 CLI 等上层应用复用。 | [src/types/index.ts:135](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L135) | -| `defaultRecPerPage?` | `number` | 默认分页大小。 | [src/types/index.ts:139](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L139) | -| `htmlToMarkdown?` | `boolean` | 是否将对象属性中的 HTML 转换为 Markdown。 | [src/types/index.ts:143](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L143) | -| `insecure?` | `boolean` | 是否跳过 TLS 证书验证;仅 Node.js 运行时支持。 | [src/types/index.ts:141](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L141) | -| `jsonPretty?` | `boolean` | JSON 格式化时是否添加缩进。 | [src/types/index.ts:149](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L149) | -| `lang?` | `string` | 界面语言。 | [src/types/index.ts:137](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L137) | -| `pagers?` | `Record`\<`string`, `number`\> | 模块级分页偏好。 | [src/types/index.ts:151](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L151) | -| `timeout?` | `number` | 请求超时时间,单位毫秒。 | [src/types/index.ts:145](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L145) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `batchFailFast?` | `boolean` | 是否在批量操作出错时停止执行后续操作。 | +| `defaultOutputFormat?` | `"markdown"` \| `"json"` \| `"raw"` | 默认输出格式,供 CLI 等上层应用复用。 | +| `defaultRecPerPage?` | `number` | 默认分页大小。 | +| `htmlToMarkdown?` | `boolean` | 是否将对象属性中的 HTML 转换为 Markdown。 | +| `insecure?` | `boolean` | 是否跳过 TLS 证书验证;仅 Node.js 运行时支持。 | +| `jsonPretty?` | `boolean` | JSON 格式化时是否添加缩进。 | +| `lang?` | `string` | 界面语言。 | +| `pagers?` | `Record`\<`string`, `number`\> | 模块级分页偏好。 | +| `timeout?` | `number` | 请求超时时间,单位毫秒。 | diff --git a/docs/reference/interfaces/ZentaoProfileRecord.md b/docs/reference/interfaces/ZentaoProfileRecord.md index 7757fda..ef949f9 100644 --- a/docs/reference/interfaces/ZentaoProfileRecord.md +++ b/docs/reference/interfaces/ZentaoProfileRecord.md @@ -2,8 +2,6 @@ # Interface: ZentaoProfileRecord -Defined in: [src/types/index.ts:179](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L179) - 运行时返回的 profile,会额外带上 `account@server` 形式的 key。 ## Extends @@ -18,14 +16,14 @@ Defined in: [src/types/index.ts:179](https://github.com/easysoft/zentao-api/blob ## Properties -| Property | Type | Description | Inherited from | Defined in | -| ------ | ------ | ------ | ------ | ------ | -| `account` | `string` | 用户账号。 | [`ZentaoProfile`](ZentaoProfile.md).[`account`](ZentaoProfile.md#property-account) | [src/types/index.ts:161](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L161) | -| `config?` | [`ZentaoProfileConfig`](ZentaoProfileConfig.md) | 客户端自定义配置。 | [`ZentaoProfile`](ZentaoProfile.md).[`config`](ZentaoProfile.md#property-config) | [src/types/index.ts:173](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L173) | -| `key` | `string` | - | - | [src/types/index.ts:180](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L180) | -| `lastUsedTime?` | `string` | 最后使用时间。 | [`ZentaoProfile`](ZentaoProfile.md).[`lastUsedTime`](ZentaoProfile.md#property-lastusedtime) | [src/types/index.ts:169](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L169) | -| `loginTime?` | `string` | 登录时间。 | [`ZentaoProfile`](ZentaoProfile.md).[`loginTime`](ZentaoProfile.md#property-logintime) | [src/types/index.ts:167](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L167) | -| `server` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [`ZentaoProfile`](ZentaoProfile.md).[`server`](ZentaoProfile.md#property-server) | [src/types/index.ts:159](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L159) | -| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 禅道服务端配置。 | [`ZentaoProfile`](ZentaoProfile.md).[`serverConfig`](ZentaoProfile.md#property-serverconfig) | [src/types/index.ts:171](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L171) | -| `token` | `string` | 禅道 API Token。 | [`ZentaoProfile`](ZentaoProfile.md).[`token`](ZentaoProfile.md#property-token) | [src/types/index.ts:163](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L163) | -| `user?` | `Record`\<`string`, `unknown`\> | 登录验证通过后得到的用户信息。 | [`ZentaoProfile`](ZentaoProfile.md).[`user`](ZentaoProfile.md#property-user) | [src/types/index.ts:165](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L165) | +| Property | Type | Description | Inherited from | +| ------ | ------ | ------ | ------ | +| `account` | `string` | 用户账号。 | [`ZentaoProfile`](ZentaoProfile.md).[`account`](ZentaoProfile.md#property-account) | +| `config?` | [`ZentaoProfileConfig`](ZentaoProfileConfig.md) | 客户端自定义配置。 | [`ZentaoProfile`](ZentaoProfile.md).[`config`](ZentaoProfile.md#property-config) | +| `key` | `string` | - | - | +| `lastUsedTime?` | `string` | 最后使用时间。 | [`ZentaoProfile`](ZentaoProfile.md).[`lastUsedTime`](ZentaoProfile.md#property-lastusedtime) | +| `loginTime?` | `string` | 登录时间。 | [`ZentaoProfile`](ZentaoProfile.md).[`loginTime`](ZentaoProfile.md#property-logintime) | +| `server` | `string` | 禅道站点根地址,不包含 `/api.php/v2`。 | [`ZentaoProfile`](ZentaoProfile.md).[`server`](ZentaoProfile.md#property-server) | +| `serverConfig?` | [`ServerConfig`](ServerConfig.md) | 禅道服务端配置。 | [`ZentaoProfile`](ZentaoProfile.md).[`serverConfig`](ZentaoProfile.md#property-serverconfig) | +| `token` | `string` | 禅道 API Token。 | [`ZentaoProfile`](ZentaoProfile.md).[`token`](ZentaoProfile.md#property-token) | +| `user?` | `Record`\<`string`, `unknown`\> | 登录验证通过后得到的用户信息。 | [`ZentaoProfile`](ZentaoProfile.md).[`user`](ZentaoProfile.md#property-user) | diff --git a/docs/reference/interfaces/ZentaoProfilesStore.md b/docs/reference/interfaces/ZentaoProfilesStore.md index 60fe6c0..9cf7d04 100644 --- a/docs/reference/interfaces/ZentaoProfilesStore.md +++ b/docs/reference/interfaces/ZentaoProfilesStore.md @@ -2,13 +2,11 @@ # Interface: ZentaoProfilesStore -Defined in: [src/types/index.ts:184](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L184) - 本地 profile 存储文件或浏览器 localStorage 中的 JSON 结构。 ## Properties -| Property | Type | Description | Defined in | -| ------ | ------ | ------ | ------ | -| `currentProfile?` | `string` | 当前使用的 profile key。 | [src/types/index.ts:186](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L186) | -| `profiles` | [`ZentaoProfile`](ZentaoProfile.md)[] | 保存的 profile 列表。 | [src/types/index.ts:188](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L188) | +| Property | Type | Description | +| ------ | ------ | ------ | +| `currentProfile?` | `string` | 当前使用的 profile key。 | +| `profiles` | [`ZentaoProfile`](ZentaoProfile.md)[] | 保存的 profile 列表。 | diff --git a/docs/reference/type-aliases/ErrorCode.md b/docs/reference/type-aliases/ErrorCode.md index ae1c231..8cd3689 100644 --- a/docs/reference/type-aliases/ErrorCode.md +++ b/docs/reference/type-aliases/ErrorCode.md @@ -3,5 +3,3 @@ # Type Alias: ErrorCode > **ErrorCode** = keyof *typeof* [`ERRORS`](../variables/ERRORS.md) - -Defined in: [src/misc/errors.ts:22](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L22) diff --git a/docs/reference/type-aliases/HttpMethod.md b/docs/reference/type-aliases/HttpMethod.md index c13e253..bfbb8c0 100644 --- a/docs/reference/type-aliases/HttpMethod.md +++ b/docs/reference/type-aliases/HttpMethod.md @@ -4,6 +4,4 @@ > **HttpMethod** = `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` -Defined in: [src/types/index.ts:32](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L32) - SDK 支持的 HTTP 方法。 diff --git a/docs/reference/type-aliases/ListPagerInfo.md b/docs/reference/type-aliases/ListPagerInfo.md index 99332c2..90c196e 100644 --- a/docs/reference/type-aliases/ListPagerInfo.md +++ b/docs/reference/type-aliases/ListPagerInfo.md @@ -4,6 +4,4 @@ > **ListPagerInfo** = [`Pager`](../interfaces/Pager.md) -Defined in: [src/types/index.ts:219](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L219) - 列表分页信息别名。 diff --git a/docs/reference/type-aliases/ModuleActionMethod.md b/docs/reference/type-aliases/ModuleActionMethod.md index 7d07b1f..7fdb217 100644 --- a/docs/reference/type-aliases/ModuleActionMethod.md +++ b/docs/reference/type-aliases/ModuleActionMethod.md @@ -4,6 +4,4 @@ > **ModuleActionMethod** = [`HttpMethod`](HttpMethod.md) \| `Lowercase`\<[`HttpMethod`](HttpMethod.md)\> -Defined in: [src/types/index.ts:194](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L194) - 模块动作使用的 HTTP 方法;兼容生成定义中的小写方法。 diff --git a/docs/reference/type-aliases/ModuleActionName.md b/docs/reference/type-aliases/ModuleActionName.md index 78296ac..63bc52d 100644 --- a/docs/reference/type-aliases/ModuleActionName.md +++ b/docs/reference/type-aliases/ModuleActionName.md @@ -4,6 +4,4 @@ > **ModuleActionName** = [`ModuleActionType`](ModuleActionType.md) \| `string` & `object` -Defined in: [src/types/index.ts:196](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L196) - 模块动作名称,允许除基础动作外的自定义名称。 diff --git a/docs/reference/type-aliases/ModuleActionParamOption.md b/docs/reference/type-aliases/ModuleActionParamOption.md index 19a6704..50a362a 100644 --- a/docs/reference/type-aliases/ModuleActionParamOption.md +++ b/docs/reference/type-aliases/ModuleActionParamOption.md @@ -4,13 +4,11 @@ > **ModuleActionParamOption** = `object` -Defined in: [src/types/index.ts:198](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L198) - 模块动作参数可选项。 ## Properties -| Property | Type | Defined in | -| ------ | ------ | ------ | -| `label` | `string` | [src/types/index.ts:198](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L198) | -| `value` | `unknown` | [src/types/index.ts:198](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L198) | +| Property | Type | +| ------ | ------ | +| `label` | `string` | +| `value` | `unknown` | diff --git a/docs/reference/type-aliases/ModuleActionResultRender.md b/docs/reference/type-aliases/ModuleActionResultRender.md index 1bedcfa..881069c 100644 --- a/docs/reference/type-aliases/ModuleActionResultRender.md +++ b/docs/reference/type-aliases/ModuleActionResultRender.md @@ -4,8 +4,6 @@ > **ModuleActionResultRender** = (`result`, `type`, `action`) => `string` -Defined in: [src/types/index.ts:246](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L246) - 模块动作自定义渲染函数类型;SDK 本身不直接渲染终端输出。 ## Parameters diff --git a/docs/reference/type-aliases/ModuleActionResultRenderType.md b/docs/reference/type-aliases/ModuleActionResultRenderType.md index a7e04be..e0365ae 100644 --- a/docs/reference/type-aliases/ModuleActionResultRenderType.md +++ b/docs/reference/type-aliases/ModuleActionResultRenderType.md @@ -4,6 +4,4 @@ > **ModuleActionResultRenderType** = `"markdown"` \| `"json"` \| `"raw"` -Defined in: [src/types/index.ts:244](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L244) - 模块动作渲染目标类型;保留给 CLI 等上层应用使用。 diff --git a/docs/reference/type-aliases/ModuleActionResultType.md b/docs/reference/type-aliases/ModuleActionResultType.md index 7c7acb7..2c67d45 100644 --- a/docs/reference/type-aliases/ModuleActionResultType.md +++ b/docs/reference/type-aliases/ModuleActionResultType.md @@ -4,6 +4,4 @@ > **ModuleActionResultType** = `"text"` \| `"object"` \| `"list"` -Defined in: [src/types/index.ts:217](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L217) - 模块动作结果形态。 diff --git a/docs/reference/type-aliases/ModuleActionType.md b/docs/reference/type-aliases/ModuleActionType.md index 8881bab..cde226e 100644 --- a/docs/reference/type-aliases/ModuleActionType.md +++ b/docs/reference/type-aliases/ModuleActionType.md @@ -4,6 +4,4 @@ > **ModuleActionType** = `"list"` \| `"get"` \| `"create"` \| `"update"` \| `"delete"` \| `"action"` -Defined in: [src/types/index.ts:192](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L192) - 模块动作类型:基础 CRUD 或自定义动作。 diff --git a/docs/reference/type-aliases/ModuleName.md b/docs/reference/type-aliases/ModuleName.md index 2a88b70..d24da68 100644 --- a/docs/reference/type-aliases/ModuleName.md +++ b/docs/reference/type-aliases/ModuleName.md @@ -4,6 +4,4 @@ > **ModuleName** = `"user"` \| `"program"` \| `"product"` \| `"project"` \| `"execution"` \| `"productplan"` \| `"story"` \| `"epic"` \| `"requirement"` \| `"bug"` \| `"testcase"` \| `"task"` \| `"feedback"` \| `"ticket"` \| `"system"` \| `"build"` \| `"testtask"` \| `"release"` \| `"file"` \| `string` & `object` -Defined in: [src/types/index.ts:293](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/types/index.ts#L293) - 内置模块名称,同时允许用户扩展自定义模块名。 diff --git a/docs/reference/variables/BUILD.md b/docs/reference/variables/BUILD.md index 7032188..c4fcbf2 100644 --- a/docs/reference/variables/BUILD.md +++ b/docs/reference/variables/BUILD.md @@ -3,5 +3,3 @@ # Variable: BUILD > `const` **BUILD**: `string` - -Defined in: [src/version.ts:7](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/version.ts#L7) diff --git a/docs/reference/variables/ERRORS.md b/docs/reference/variables/ERRORS.md index e963f55..673094f 100644 --- a/docs/reference/variables/ERRORS.md +++ b/docs/reference/variables/ERRORS.md @@ -4,27 +4,25 @@ > `const` **ERRORS**: `object` -Defined in: [src/misc/errors.ts:1](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L1) - ## Type Declaration -| Name | Type | Default value | Defined in | -| ------ | ------ | ------ | ------ | -| `E_HTTP_ERROR` | `"HTTP request failed: {status} {statusText}"` | `'HTTP request failed: {status} {statusText}'` | [src/misc/errors.ts:4](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L4) | -| `E_INSECURE_BROWSER` | `"The insecure option is only supported in Node.js runtimes."` | `'The insecure option is only supported in Node.js runtimes.'` | [src/misc/errors.ts:7](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L7) | -| `E_INVALID_ACTION` | `"Unknown action: {module}-{action}"` | `'Unknown action: {module}-{action}'` | [src/misc/errors.ts:15](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L15) | -| `E_INVALID_ACTION_DEFINITION` | `"Invalid module action definition."` | `'Invalid module action definition.'` | [src/misc/errors.ts:17](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L17) | -| `E_INVALID_BASE_URL` | `"Invalid ZenTao baseUrl."` | `'Invalid ZenTao baseUrl.'` | [src/misc/errors.ts:2](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L2) | -| `E_INVALID_MODULE` | `"Unknown module: {module}"` | `'Unknown module: {module}'` | [src/misc/errors.ts:14](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L14) | -| `E_INVALID_MODULE_DEFINITION` | `"Invalid module definition."` | `'Invalid module definition.'` | [src/misc/errors.ts:16](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L16) | -| `E_INVALID_PROFILE` | `"Invalid ZenTao profile."` | `'Invalid ZenTao profile.'` | [src/misc/errors.ts:9](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L9) | -| `E_INVALID_REQUEST_NAME` | "Request name must use the form \"moduleName/methodName\"." | `'Request name must use the form "moduleName/methodName".'` | [src/misc/errors.ts:19](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L19) | -| `E_LOGIN_FAILED` | `"ZenTao login failed."` | `'ZenTao login failed.'` | [src/misc/errors.ts:8](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L8) | -| `E_MISSING_PARAM` | `"Missing required parameter: {param}"` | `'Missing required parameter: {param}'` | [src/misc/errors.ts:18](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L18) | -| `E_NETWORK_ERROR` | `"Network request failed: {message}"` | `'Network request failed: {message}'` | [src/misc/errors.ts:5](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L5) | -| `E_NO_GLOBAL_CLIENT` | `"No global client configured. Call ZentaoClient.init() or pass options.client."` | `'No global client configured. Call ZentaoClient.init() or pass options.client.'` | [src/misc/errors.ts:3](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L3) | -| `E_NO_PROFILE` | `"No ZenTao profile is configured."` | `'No ZenTao profile is configured.'` | [src/misc/errors.ts:10](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L10) | -| `E_PROFILE_NOT_FOUND` | `"ZenTao profile not found: {profileKey}"` | `'ZenTao profile not found: {profileKey}'` | [src/misc/errors.ts:11](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L11) | -| `E_PROFILE_STORAGE_INVALID` | `"ZenTao profile storage is not valid JSON."` | `'ZenTao profile storage is not valid JSON.'` | [src/misc/errors.ts:12](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L12) | -| `E_PROFILE_STORAGE_UNAVAILABLE` | `"ZenTao profile storage is unavailable in this runtime."` | `'ZenTao profile storage is unavailable in this runtime.'` | [src/misc/errors.ts:13](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L13) | -| `E_TIMEOUT` | `"Request timed out."` | `'Request timed out.'` | [src/misc/errors.ts:6](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/misc/errors.ts#L6) | +| Name | Type | Default value | +| ------ | ------ | ------ | +| `E_HTTP_ERROR` | `"HTTP request failed: {status} {statusText}"` | `'HTTP request failed: {status} {statusText}'` | +| `E_INSECURE_BROWSER` | `"The insecure option is only supported in Node.js runtimes."` | `'The insecure option is only supported in Node.js runtimes.'` | +| `E_INVALID_ACTION` | `"Unknown action: {module}-{action}"` | `'Unknown action: {module}-{action}'` | +| `E_INVALID_ACTION_DEFINITION` | `"Invalid module action definition."` | `'Invalid module action definition.'` | +| `E_INVALID_BASE_URL` | `"Invalid ZenTao baseUrl."` | `'Invalid ZenTao baseUrl.'` | +| `E_INVALID_MODULE` | `"Unknown module: {module}"` | `'Unknown module: {module}'` | +| `E_INVALID_MODULE_DEFINITION` | `"Invalid module definition."` | `'Invalid module definition.'` | +| `E_INVALID_PROFILE` | `"Invalid ZenTao profile."` | `'Invalid ZenTao profile.'` | +| `E_INVALID_REQUEST_NAME` | "Request name must use the form \"moduleName/methodName\"." | `'Request name must use the form "moduleName/methodName".'` | +| `E_LOGIN_FAILED` | `"ZenTao login failed."` | `'ZenTao login failed.'` | +| `E_MISSING_PARAM` | `"Missing required parameter: {param}"` | `'Missing required parameter: {param}'` | +| `E_NETWORK_ERROR` | `"Network request failed: {message}"` | `'Network request failed: {message}'` | +| `E_NO_GLOBAL_CLIENT` | `"No global client configured. Call ZentaoClient.init() or pass options.client."` | `'No global client configured. Call ZentaoClient.init() or pass options.client.'` | +| `E_NO_PROFILE` | `"No ZenTao profile is configured."` | `'No ZenTao profile is configured.'` | +| `E_PROFILE_NOT_FOUND` | `"ZenTao profile not found: {profileKey}"` | `'ZenTao profile not found: {profileKey}'` | +| `E_PROFILE_STORAGE_INVALID` | `"ZenTao profile storage is not valid JSON."` | `'ZenTao profile storage is not valid JSON.'` | +| `E_PROFILE_STORAGE_UNAVAILABLE` | `"ZenTao profile storage is unavailable in this runtime."` | `'ZenTao profile storage is unavailable in this runtime.'` | +| `E_TIMEOUT` | `"Request timed out."` | `'Request timed out.'` | diff --git a/docs/reference/variables/VERSION.md b/docs/reference/variables/VERSION.md index 8762a10..e85adbc 100644 --- a/docs/reference/variables/VERSION.md +++ b/docs/reference/variables/VERSION.md @@ -3,5 +3,3 @@ # Variable: VERSION > `const` **VERSION**: `string` - -Defined in: [src/version.ts:8](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/version.ts#L8) diff --git a/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md b/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md index 05ff06f..7c062b1 100644 --- a/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md +++ b/docs/reference/variables/ZENTAO_PROFILES_STORAGE_KEY.md @@ -3,5 +3,3 @@ # Variable: ZENTAO\_PROFILES\_STORAGE\_KEY > `const` **ZENTAO\_PROFILES\_STORAGE\_KEY**: `"ZENTAO_PROFILES"` = `'ZENTAO_PROFILES'` - -Defined in: [src/profiles/index.ts:10](https://github.com/easysoft/zentao-api/blob/cd16cbd679722d93ee37e546ba6b0275d11e66db/src/profiles/index.ts#L10) diff --git a/typedoc.json b/typedoc.json index 01b308a..9e82b1a 100644 --- a/typedoc.json +++ b/typedoc.json @@ -8,6 +8,7 @@ "excludePrivate": true, "excludeProtected": true, "excludeInternal": true, + "disableSources": true, "githubPages": false, "hideGenerator": true, "sidebar": {