node-karin 1.7.13 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +819 -751
- package/default/config/adapter.json +27 -27
- package/default/config/config.json +44 -44
- package/default/config/groups.json +66 -66
- package/default/config/pm2.json +15 -15
- package/default/config/privates.json +25 -25
- package/default/config/redis.json +5 -5
- package/default/config/render.json +18 -18
- package/dist/cli/index.cjs +1 -487
- package/dist/cli/index.mjs +4120 -0
- package/dist/cli/pm2.js +1 -1
- package/dist/global.d.d.ts +68 -0
- package/dist/index.d.ts +1962 -508
- package/dist/index.mjs +31566 -0
- package/dist/logger-DVUGuzNj.d.ts +101 -0
- package/dist/module/art-template.d.ts +12 -1
- package/dist/module/axios.d.ts +1 -1
- package/dist/module/chalk.d.ts +1 -1
- package/dist/module/chokidar.d.ts +1 -1
- package/dist/module/express.d.ts +2 -1
- package/dist/module/express.mjs +2 -0
- package/dist/module/lodash.d.ts +2 -1
- package/dist/module/{lodash.js → lodash.mjs} +1 -0
- package/dist/module/moment.d.ts +1 -1
- package/dist/module/node-schedule.d.ts +1 -1
- package/dist/module/redis.d.ts +1 -1
- package/dist/module/sqlite3.d.ts +1 -1
- package/dist/module/ws.d.ts +2 -1
- package/dist/module/ws.mjs +2 -0
- package/dist/module/yaml.d.ts +1 -1
- package/dist/root.d.ts +5 -1
- package/dist/{root.js → root.mjs} +3 -1
- package/dist/start/app.d.ts +1 -0
- package/dist/start/app.mjs +9 -0
- package/dist/start/index.d.ts +1 -0
- package/dist/start/index.mjs +102 -0
- package/dist/web/assets/css/components-ep7vm38G.css +1 -0
- package/dist/web/assets/css/index-DxLRZkvi.css.br +0 -0
- package/dist/web/assets/js/components-Bp80gYJA.js.br +0 -0
- package/dist/web/assets/js/entry-DhKjPdoJ.js.br +0 -0
- package/dist/web/assets/js/hooks-CSKAeqvP.js.br +0 -0
- package/dist/web/assets/js/page-404.tsx-Dr2zAhTf.js +1 -0
- package/dist/web/assets/js/page-dashboard-B6B4ob8B.js.br +0 -0
- package/dist/web/assets/js/page-loading.tsx-g_ta_NRr.js.br +0 -0
- package/dist/web/assets/js/page-login.tsx-Cm98Ubip.js.br +0 -0
- package/dist/web/assets/js/utils-Cj3xTboC.js +2 -0
- package/dist/web/assets/js/vendor-editor-B8hjWfkw.js.br +0 -0
- package/dist/web/assets/js/vendor-heroui-CMeNhCFh.js.br +0 -0
- package/dist/web/assets/js/vendor-others-Bv0hrdEA.js.br +0 -0
- package/dist/web/assets/js/vendor-react-ChUmQ3I2.js.br +0 -0
- package/dist/web/assets/js/vendor-ui-utils-5rYIvRjL.js.br +0 -0
- package/dist/web/assets/js/vendor-visual-CdiJEXnN.js.br +0 -0
- package/dist/web/{flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 → flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2.br} +0 -0
- package/dist/web/grid.svg +5 -5
- package/dist/web/icon.css +24 -24
- package/dist/web/index.html +37 -24
- package/dist/web/karin.png.br +0 -0
- package/dist/web/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf.br +0 -0
- package/dist/web/sha256.min.js.br +0 -0
- package/package.json +192 -201
- package/README.md +0 -32
- package/dist/cli/index.js +0 -479
- package/dist/index.js +0 -19515
- package/dist/module/art-template.cjs +0 -11
- package/dist/module/axios.cjs +0 -22
- package/dist/module/chalk.cjs +0 -22
- package/dist/module/chokidar.cjs +0 -22
- package/dist/module/dotenv.cjs +0 -22
- package/dist/module/dotenv.d.ts +0 -2
- package/dist/module/dotenv.js +0 -2
- package/dist/module/express.cjs +0 -36
- package/dist/module/express.js +0 -1
- package/dist/module/lodash.cjs +0 -11
- package/dist/module/log4js.cjs +0 -22
- package/dist/module/log4js.d.ts +0 -2
- package/dist/module/log4js.js +0 -2
- package/dist/module/moment.cjs +0 -11
- package/dist/module/node-schedule.cjs +0 -22
- package/dist/module/redis.cjs +0 -22
- package/dist/module/sqlite3.cjs +0 -22
- package/dist/module/ws.cjs +0 -28
- package/dist/module/ws.js +0 -1
- package/dist/module/yaml.cjs +0 -22
- package/dist/web/assets/404-C9u_NlJi.js +0 -1
- package/dist/web/assets/Item-pd96GKIG.js.br +0 -0
- package/dist/web/assets/SelectionManager-BlXTH2VC.js.br +0 -0
- package/dist/web/assets/abap-BrgZPUOV.js.br +0 -0
- package/dist/web/assets/about-BwlDpX-c.js.br +0 -0
- package/dist/web/assets/accordion-Bj06RlD-.js.br +0 -0
- package/dist/web/assets/adapter-Du42CYBT.js.br +0 -0
- package/dist/web/assets/addon-web-links-Wrx0dCGl.js.br +0 -0
- package/dist/web/assets/apex-DyP6w7ZV.js.br +0 -0
- package/dist/web/assets/azcli-BaLxmfj-.js.br +0 -0
- package/dist/web/assets/bat-CFOPXBzS.js.br +0 -0
- package/dist/web/assets/bicep-BfEKNvv3.js.br +0 -0
- package/dist/web/assets/bot-DdYIqTVP.js +0 -6
- package/dist/web/assets/cameligo-BFG1Mk7z.js.br +0 -0
- package/dist/web/assets/chunk-2C6KNKEU-CBJmVWyn.js.br +0 -0
- package/dist/web/assets/chunk-2QAN2V2R-BulY1jfw.js.br +0 -0
- package/dist/web/assets/chunk-3TCFMHK3-BpJf4Q9f.js.br +0 -0
- package/dist/web/assets/chunk-4EXC76WE-DWVJR0TX.js.br +0 -0
- package/dist/web/assets/chunk-6JWJ7CFW-BDAlVmIQ.js.br +0 -0
- package/dist/web/assets/chunk-6NGXL2PC-DIPEMSmA.js.br +0 -0
- package/dist/web/assets/chunk-6VC6TS2O-sjq9IySl.js.br +0 -0
- package/dist/web/assets/chunk-736YWA4T-BK_z11TK.js.br +0 -0
- package/dist/web/assets/chunk-A6PX3NG3-BsGR2bWZ.js.br +0 -0
- package/dist/web/assets/chunk-B75B6XQK-B0VUBvt8.js +0 -1
- package/dist/web/assets/chunk-BWXGEJBS-DvCShJym.js.br +0 -0
- package/dist/web/assets/chunk-D5XJWRAV-9uH2CwV1.js +0 -1
- package/dist/web/assets/chunk-HAJUSXOG-6BFBENy1.js.br +0 -0
- package/dist/web/assets/chunk-IHO36JMK-DKnKLDmu.js.br +0 -0
- package/dist/web/assets/chunk-J6JGI6RM-DKmnXtnU.js.br +0 -0
- package/dist/web/assets/chunk-J7I6W5JF-IqR8CF_Q.js.br +0 -0
- package/dist/web/assets/chunk-KCYYJJH4-BdofC4qA.js.br +0 -0
- package/dist/web/assets/chunk-KHLLQ6W4-CpyZzH4q.js.br +0 -0
- package/dist/web/assets/chunk-KQ5CH2X7-MWuUq5gI.js.br +0 -0
- package/dist/web/assets/chunk-LAX3QLKM-B0tE0BjZ.js +0 -1
- package/dist/web/assets/chunk-LGSBTEIA--Gvr91gm.js +0 -1
- package/dist/web/assets/chunk-M3MASYO7-BVjxibqV.js +0 -1
- package/dist/web/assets/chunk-ML27DD5T-BjYAog8d.js.br +0 -0
- package/dist/web/assets/chunk-MSDKUXDP-DKkJKxM-.js.br +0 -0
- package/dist/web/assets/chunk-MW56SEHC-CTlcS-O4.js.br +0 -0
- package/dist/web/assets/chunk-MZRCPRP2-BBG21hp8.js.br +0 -0
- package/dist/web/assets/chunk-OH2E76JR-BYurMayl.js +0 -1
- package/dist/web/assets/chunk-OTWYT2HS-cQ8QQNDY.js +0 -1
- package/dist/web/assets/chunk-RRTOIK23-CSPsT46O.js.br +0 -0
- package/dist/web/assets/chunk-SLABUSGS-s9w3Zt5w.js.br +0 -0
- package/dist/web/assets/chunk-TE6SZS6W-1UK_YAGg.js +0 -1
- package/dist/web/assets/chunk-UX7UMZL5-DHf8C-o1.js +0 -1
- package/dist/web/assets/chunk-WQVQ7P2I-C4kbg9VI.js.br +0 -0
- package/dist/web/assets/clojure-DTECt2xU.js.br +0 -0
- package/dist/web/assets/codicon-DCmgc-ay.ttf +0 -0
- package/dist/web/assets/coffee-CDGzqUPQ.js.br +0 -0
- package/dist/web/assets/config-CEElyPBT.js.br +0 -0
- package/dist/web/assets/config-DVn1FaJ-.js.br +0 -0
- package/dist/web/assets/cpp-CLLBncYj.js.br +0 -0
- package/dist/web/assets/csharp-dUCx_-0o.js.br +0 -0
- package/dist/web/assets/csp-5Rap-vPy.js.br +0 -3
- package/dist/web/assets/css-D3h14YRZ.js.br +0 -0
- package/dist/web/assets/cssMode-CXyVPoom.js.br +0 -0
- package/dist/web/assets/cypher-DrQuvNYM.js.br +0 -0
- package/dist/web/assets/dart-CFKIUWau.js.br +0 -0
- package/dist/web/assets/default_page-BKgpdS-e.js +0 -1
- package/dist/web/assets/detail-C5769b6q.js.br +0 -0
- package/dist/web/assets/detail-COuw3J9r.js.br +0 -0
- package/dist/web/assets/detail-DqW0R8N9.css.br +0 -0
- package/dist/web/assets/dockerfile-Zznr-cwX.js.br +0 -0
- package/dist/web/assets/ecl-Ce3n6wWz.js.br +0 -0
- package/dist/web/assets/editor.worker-oRlJJsnX.js.br +0 -0
- package/dist/web/assets/elixir-deUWdS0T.js.br +0 -0
- package/dist/web/assets/env-CSYJHsPf.js.br +0 -0
- package/dist/web/assets/eye-DEh2Pgsu.js +0 -6
- package/dist/web/assets/features-animation-F-pzovue.js +0 -1
- package/dist/web/assets/flow9-i9-g7ZhI.js.br +0 -0
- package/dist/web/assets/focusSafely-DOspV_xj.js.br +0 -0
- package/dist/web/assets/freemarker2-BV0OzS9F.js.br +0 -0
- package/dist/web/assets/friend_request-DfiA7sPM.js.br +0 -0
- package/dist/web/assets/fsharp-CzKuDChf.js.br +0 -0
- package/dist/web/assets/github-nVmhSG0k.js +0 -11
- package/dist/web/assets/go-Cphgjts3.js.br +0 -0
- package/dist/web/assets/graphql-Cg7bfA9N.js.br +0 -0
- package/dist/web/assets/group-CfWIxZ1S.js.br +0 -0
- package/dist/web/assets/group_notice-XufgXVhG.js +0 -1
- package/dist/web/assets/handlebars-DSMVNR0n.js.br +0 -0
- package/dist/web/assets/hcl-0cvrggvQ.js.br +0 -0
- package/dist/web/assets/html-ClQau7kT.js.br +0 -0
- package/dist/web/assets/htmlMode-CN2HUcKJ.js.br +0 -0
- package/dist/web/assets/iconBase-BbDMq9Lm.js.br +0 -0
- package/dist/web/assets/index-B2KKfeyN.js.br +0 -0
- package/dist/web/assets/index-B59L0CDQ.js.br +0 -0
- package/dist/web/assets/index-BRJPOEf0.js.br +0 -0
- package/dist/web/assets/index-BSQ_9cWz.js.br +0 -0
- package/dist/web/assets/index-BTn745-y.js.br +0 -0
- package/dist/web/assets/index-Bl5YOuTR.js.br +0 -0
- package/dist/web/assets/index-Bm-03b92.js +0 -1
- package/dist/web/assets/index-CNKcljeW.js +0 -1
- package/dist/web/assets/index-CSkzWqtN.js.br +0 -0
- package/dist/web/assets/index-CY-NVVkv.js.br +0 -0
- package/dist/web/assets/index-CeBvj3ZH.js.br +0 -0
- package/dist/web/assets/index-CnkVaH2P.css.br +0 -0
- package/dist/web/assets/index-DCzNSkJn.js.br +0 -0
- package/dist/web/assets/index-DNKbYZlM.js +0 -1
- package/dist/web/assets/index-DVsvetQP.js.br +0 -0
- package/dist/web/assets/index-D_816BTl.js.br +0 -0
- package/dist/web/assets/index-Db1iHKoe.js.br +0 -0
- package/dist/web/assets/index-DjU-NtVQ.js +0 -1
- package/dist/web/assets/index-Drqc4ASm.js.br +0 -0
- package/dist/web/assets/index-DvwfI5vP.css.br +0 -0
- package/dist/web/assets/index-Dwnb7Xtz.js.br +0 -0
- package/dist/web/assets/index-EGWrH2j2.js +0 -1
- package/dist/web/assets/index-IUy6p99y.js +0 -1
- package/dist/web/assets/index-k_Cd4_SW.js.br +0 -0
- package/dist/web/assets/index-nZMp9MWB.js.br +0 -0
- package/dist/web/assets/index.esm-BSKygSH-.js.br +0 -0
- package/dist/web/assets/ini-Drc7WvVn.js.br +0 -0
- package/dist/web/assets/inputGroup-CJGuoYUx.js.br +0 -0
- package/dist/web/assets/isSymbol-BShv9ove.js.br +0 -0
- package/dist/web/assets/java-B_fMsGYe.js.br +0 -0
- package/dist/web/assets/javascript-BegoFNre.js.br +0 -0
- package/dist/web/assets/jsonMode-Dxf_RJRO.js.br +0 -0
- package/dist/web/assets/julia-Bqgm2twL.js.br +0 -0
- package/dist/web/assets/kotlin-BSkB5QuD.js.br +0 -0
- package/dist/web/assets/layout-al9rnD7b.js.br +0 -0
- package/dist/web/assets/less-BsTHnhdd.js.br +0 -0
- package/dist/web/assets/lexon-YWi4-JPR.js.br +0 -0
- package/dist/web/assets/liquid-bFSovgkX.js.br +0 -0
- package/dist/web/assets/loading-Czh_ivNv.js.br +0 -0
- package/dist/web/assets/login-DpjAzjKU.js.br +0 -0
- package/dist/web/assets/lua-nf6ki56Z.js.br +0 -0
- package/dist/web/assets/m3-Cpb6xl2v.js.br +0 -0
- package/dist/web/assets/markdown-DSZPf7rp.js.br +0 -0
- package/dist/web/assets/mdx-DGviX4hR.js.br +0 -0
- package/dist/web/assets/merge-CuVThMNe.js.br +0 -0
- package/dist/web/assets/mergeRefs-BpO9bzld.js +0 -1
- package/dist/web/assets/message-mTjTgeaM.js +0 -1
- package/dist/web/assets/message.model-B1qK1MiE.js.br +0 -0
- package/dist/web/assets/mips-B_c3zf-v.js.br +0 -0
- package/dist/web/assets/msdax-rUNN04Wq.js.br +0 -0
- package/dist/web/assets/mysql-DDwshQtU.js.br +0 -0
- package/dist/web/assets/number-7W8NeZVk.js.br +0 -0
- package/dist/web/assets/objective-c-B5zXfXm9.js.br +0 -0
- package/dist/web/assets/pascal-CXOwvkN_.js.br +0 -0
- package/dist/web/assets/pascaligo-Bc-ZgV77.js.br +0 -0
- package/dist/web/assets/perl-CwNk8-XU.js.br +0 -0
- package/dist/web/assets/pgsql-tGk8EFnU.js.br +0 -0
- package/dist/web/assets/php-CpIb_Oan.js.br +0 -0
- package/dist/web/assets/pla-B03wrqEc.js.br +0 -0
- package/dist/web/assets/pm2-CniXkaeu.js.br +0 -0
- package/dist/web/assets/postiats-BKlk5iyT.js.br +0 -0
- package/dist/web/assets/powerquery-Bhzvs7bI.js.br +0 -0
- package/dist/web/assets/powershell-Dd3NCNK9.js.br +0 -0
- package/dist/web/assets/private-CfG8JI8L.js.br +0 -0
- package/dist/web/assets/protobuf-COyEY5Pt.js.br +0 -0
- package/dist/web/assets/pug-BaJupSGV.js.br +0 -0
- package/dist/web/assets/python-D0ZD_k1N.js.br +0 -0
- package/dist/web/assets/qsharp-DXyYeYxl.js.br +0 -0
- package/dist/web/assets/r-CdQndTaG.js.br +0 -0
- package/dist/web/assets/razor-DRYiVyDt.js.br +0 -0
- package/dist/web/assets/react-resizable-panels.browser.esm-DubqLJ4h.js.br +0 -0
- package/dist/web/assets/redis-BJLUr1tG.js.br +0 -0
- package/dist/web/assets/redis-CVwtpugi.js.br +0 -0
- package/dist/web/assets/redshift-25W9uPmb.js.br +0 -0
- package/dist/web/assets/render-DEylqIUg.js.br +0 -0
- package/dist/web/assets/restructuredtext-DfzH4Xui.js.br +0 -0
- package/dist/web/assets/router-D_dYaqfK.js +0 -1
- package/dist/web/assets/ruby-Cp1zYvxS.js.br +0 -0
- package/dist/web/assets/rust-D5C2fndG.js.br +0 -0
- package/dist/web/assets/save-D6wQsuGT.js +0 -1
- package/dist/web/assets/sb-CDntyWJ8.js.br +0 -0
- package/dist/web/assets/scala-BoFRg7Ot.js.br +0 -0
- package/dist/web/assets/scheme-Bio4gycK.js.br +0 -0
- package/dist/web/assets/scss-4Ik7cdeQ.js.br +0 -0
- package/dist/web/assets/server-CRdhk2Wy.js.br +0 -0
- package/dist/web/assets/shell-CX-rkNHf.js.br +0 -0
- package/dist/web/assets/solidity-Tw7wswEv.js.br +0 -0
- package/dist/web/assets/sophia-C5WLch3f.js.br +0 -0
- package/dist/web/assets/sparql-DHaeiCBh.js.br +0 -0
- package/dist/web/assets/sql-CCSDG5nI.js.br +0 -0
- package/dist/web/assets/st-pnP8ivHi.js.br +0 -0
- package/dist/web/assets/swift-DwJ7jVG9.js.br +0 -0
- package/dist/web/assets/systemverilog-B9Xyijhd.js.br +0 -0
- package/dist/web/assets/tcl-DnHyzjbg.js.br +0 -0
- package/dist/web/assets/terminal-CfCQe79-.js +0 -6
- package/dist/web/assets/terminal-bNIVjrPM.js.br +0 -0
- package/dist/web/assets/test-url-CZXnW7jp.js.br +0 -0
- package/dist/web/assets/theme-switch-Bz2l2CwF.js.br +0 -0
- package/dist/web/assets/ts.worker-Bd4z-OY3.js.br +0 -0
- package/dist/web/assets/tsMode-DKGjerkd.js.br +0 -0
- package/dist/web/assets/twig-CPajHgWi.js.br +0 -0
- package/dist/web/assets/typescript-CsEXAEHs.js.br +0 -0
- package/dist/web/assets/typespec-D-MeaMDU.js.br +0 -0
- package/dist/web/assets/use-dialog-BrR6Szrb.js +0 -1
- package/dist/web/assets/useEvent-DaW3_jZI.js +0 -1
- package/dist/web/assets/useFocusable-CtLTcLFV.js.br +0 -0
- package/dist/web/assets/useFormReset-CBBc4OFV.js +0 -1
- package/dist/web/assets/useHover-NCfDbwX0.js.br +0 -0
- package/dist/web/assets/useKeyboard-BZ4YtCxw.js +0 -1
- package/dist/web/assets/useLabel-DBycc4Nu.js +0 -1
- package/dist/web/assets/useNumberFormatter-DhAgwXM6.js.br +0 -0
- package/dist/web/assets/useRequest-BWEdMIz7.js.br +0 -0
- package/dist/web/assets/useToggle-Wuq-KqyX.js.br +0 -0
- package/dist/web/assets/users-_IqQqJDb.js +0 -11
- package/dist/web/assets/vb-DgyLZaXg.js.br +0 -0
- package/dist/web/assets/video_insert-Bj2IxuYI.js.br +0 -0
- package/dist/web/assets/webui-B6dfxJX4.js.br +0 -0
- package/dist/web/assets/wgsl-BIv9DU6q.js.br +0 -0
- package/dist/web/assets/xml-BHQFK9Jh.js.br +0 -0
- package/dist/web/assets/yaml-2He2eI3V.js.br +0 -0
- package/dist/web/karin.png +0 -0
- package/dist/web/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- /package/dist/module/{art-template.js → art-template.mjs} +0 -0
- /package/dist/module/{axios.js → axios.mjs} +0 -0
- /package/dist/module/{chalk.js → chalk.mjs} +0 -0
- /package/dist/module/{chokidar.js → chokidar.mjs} +0 -0
- /package/dist/module/{moment.js → moment.mjs} +0 -0
- /package/dist/module/{node-schedule.js → node-schedule.mjs} +0 -0
- /package/dist/module/{redis.js → redis.mjs} +0 -0
- /package/dist/module/{sqlite3.js → sqlite3.mjs} +0 -0
- /package/dist/module/{yaml.js → yaml.mjs} +0 -0
- /package/dist/web/assets/{addon-web-links-CFbL2ovg.css.br → css/vendor-editor-CFbL2ovg.css.br} +0 -0
- /package/dist/web/assets/{index-ZgkIHsf0.css → css/vendor-others-ZgkIHsf0.css} +0 -0
- /package/dist/web/assets/{favicon-BoqZd694.ico → ico/favicon-BoqZd694.ico} +0 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import
|
|
1
|
+
import EventEmitter from 'events';
|
|
2
2
|
import * as chalk from 'chalk';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
export { basePath, commentPath, configPath, consolePath, dataPath, dbPath, defaultConfigPath, defaultViewPath, htmlPath, isPackaged, isPkg, karinDir, karinMain, karinPathBase, karinPathComment, karinPathConfig, karinPathConsole, karinPathData, karinPathDb, karinPathDefaultConfig, karinPathDefaultView, karinPathHtml, karinPathKv, karinPathLogs, karinPathMain, karinPathPlugins, karinPathPm2Config, karinPathRedisSqlite3, karinPathResource, karinPathRoot, karinPathSandboxData, karinPathSandboxTemp, karinPathTemp, kvPath, logsPath, pluginDir, pm2Path, redisSqlite3Path, resourcePath, sandboxDataPath, sandboxTempPath, tempPath } from './root.js';
|
|
3
|
+
export { basePath, commentPath, configPath, consolePath, dataPath, dbPath, defaultConfigPath, defaultViewPath, htmlPath, isPackaged, isPkg, karinDir, karinMain, karinPathBase, karinPathComment, karinPathConfig, karinPathConsole, karinPathData, karinPathDb, karinPathDefaultConfig, karinPathDefaultView, karinPathHtml, karinPathKv, karinPathLogs, karinPathMain, karinPathPlugins, karinPathPm2Config, karinPathRedisSqlite3, karinPathResource, karinPathRoot, karinPathSandboxData, karinPathSandboxTemp, karinPathTaskDb, karinPathTemp, kvPath, logsPath, pluginDir, pm2Path, redisSqlite3Path, resourcePath, sandboxDataPath, sandboxTempPath, tempPath } from './root.js';
|
|
4
|
+
import { a as LoggerLevel, L as Logger } from './logger-DVUGuzNj.js';
|
|
5
|
+
export { c as LoggerExpand, b as LoggerOptions } from './logger-DVUGuzNj.js';
|
|
6
|
+
import sqlite3, { Database } from 'sqlite3';
|
|
8
7
|
import schedule from 'node-schedule';
|
|
9
8
|
import fs$1, { WriteStream } from 'node:fs';
|
|
10
9
|
import { Readable } from 'node:stream';
|
|
11
10
|
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
12
11
|
import YAML from 'yaml';
|
|
13
12
|
import { FSWatcher } from 'chokidar';
|
|
14
|
-
import {
|
|
13
|
+
import { exec as exec$2, ExecException as ExecException$1 } from 'node:child_process';
|
|
14
|
+
import { Request as Request$1, Router, Response, RequestHandler, Express } from 'express';
|
|
15
15
|
import { exec as exec$1, ExecException } from 'child_process';
|
|
16
16
|
export { ExecException } from 'child_process';
|
|
17
|
-
import {
|
|
17
|
+
import { RedisClientOptions, RedisClientType } from 'redis';
|
|
18
18
|
import * as http from 'http';
|
|
19
|
-
import
|
|
19
|
+
import { KarinPluginType } from '@karinjs/plugins-list';
|
|
20
20
|
import { WebSocket } from 'ws';
|
|
21
|
-
import
|
|
21
|
+
import 'log4js';
|
|
22
22
|
|
|
23
23
|
declare const debug: {
|
|
24
24
|
chalk: chalk.ChalkInstance;
|
|
@@ -26,114 +26,6 @@ declare const debug: {
|
|
|
26
26
|
enable: (bool: boolean) => void;
|
|
27
27
|
} & ((...args: any[]) => void);
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* 日志等级
|
|
31
|
-
* - `all`:所有日志
|
|
32
|
-
* - `trace`:追踪
|
|
33
|
-
* - `debug`:调试
|
|
34
|
-
* - `mark`:标记
|
|
35
|
-
* - `info`:信息
|
|
36
|
-
* - `warn`:警告
|
|
37
|
-
* - `error`:错误
|
|
38
|
-
* - `fatal`:致命
|
|
39
|
-
* - `off`:关闭
|
|
40
|
-
*/
|
|
41
|
-
type LoggerLevel = 'all' | 'trace' | 'debug' | 'mark' | 'info' | 'warn' | 'error' | 'fatal' | 'off';
|
|
42
|
-
/**
|
|
43
|
-
* 创建日志模块配置
|
|
44
|
-
*/
|
|
45
|
-
type LoggerOptions = {
|
|
46
|
-
config?: Configuration;
|
|
47
|
-
log4jsCfg?: {
|
|
48
|
-
level: LoggerLevel;
|
|
49
|
-
daysToKeep: number;
|
|
50
|
-
maxLogSize: number;
|
|
51
|
-
logColor: string;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* 拓展日志模块
|
|
56
|
-
*/
|
|
57
|
-
interface LoggerExpand {
|
|
58
|
-
/**
|
|
59
|
-
* 颜色模块
|
|
60
|
-
*/
|
|
61
|
-
chalk: typeof chalk__default;
|
|
62
|
-
/**
|
|
63
|
-
* 构建红色文本
|
|
64
|
-
* @param text - 文本
|
|
65
|
-
*/
|
|
66
|
-
red: (text: string) => string;
|
|
67
|
-
/**
|
|
68
|
-
* 构建绿色文本
|
|
69
|
-
* @param text - 文本
|
|
70
|
-
*/
|
|
71
|
-
green: (text: string) => string;
|
|
72
|
-
/**
|
|
73
|
-
* 构建黄色文本
|
|
74
|
-
* @param text - 文本
|
|
75
|
-
*/
|
|
76
|
-
yellow: (text: string) => string;
|
|
77
|
-
/**
|
|
78
|
-
* 构建蓝色文本
|
|
79
|
-
* @param text - 文本
|
|
80
|
-
*/
|
|
81
|
-
blue: (text: string) => string;
|
|
82
|
-
/**
|
|
83
|
-
* 构建品红色文本
|
|
84
|
-
* @param text - 文本
|
|
85
|
-
*/
|
|
86
|
-
magenta: (text: string) => string;
|
|
87
|
-
/**
|
|
88
|
-
* 构建青色文本
|
|
89
|
-
* @param text - 文本
|
|
90
|
-
*/
|
|
91
|
-
cyan: (text: string) => string;
|
|
92
|
-
/**
|
|
93
|
-
* 构建白色文本
|
|
94
|
-
* @param text - 文本
|
|
95
|
-
*/
|
|
96
|
-
white: (text: string) => string;
|
|
97
|
-
/**
|
|
98
|
-
* 构建灰色文本
|
|
99
|
-
* @param text - 文本
|
|
100
|
-
*/
|
|
101
|
-
gray: (text: string) => string;
|
|
102
|
-
/**
|
|
103
|
-
* 构建紫色文本
|
|
104
|
-
* @param text - 文本
|
|
105
|
-
*/
|
|
106
|
-
violet: (text: string) => string;
|
|
107
|
-
/**
|
|
108
|
-
* 构建函数文本
|
|
109
|
-
* @param text - 文本
|
|
110
|
-
*/
|
|
111
|
-
fnc: (text: string) => string;
|
|
112
|
-
/**
|
|
113
|
-
* 专属Bot前缀日志模块
|
|
114
|
-
* @param level 等级
|
|
115
|
-
* @param id 机器人ID
|
|
116
|
-
* @param args 参数
|
|
117
|
-
*/
|
|
118
|
-
bot: (level: LoggerLevel, id: string, ...args: any[]) => void;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* 日志模块
|
|
122
|
-
*/
|
|
123
|
-
type Logger = Logger$1 & LoggerExpand;
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* @public
|
|
127
|
-
* @description 创建内部日志管理器
|
|
128
|
-
* @param dir - 日志文件夹
|
|
129
|
-
*/
|
|
130
|
-
declare const createInnerLogger: (dir: string) => Logger;
|
|
131
|
-
|
|
132
|
-
/** Redis 客户端类型 */
|
|
133
|
-
type Client = RedisClientType & {
|
|
134
|
-
id: 'redis' | 'mock';
|
|
135
|
-
};
|
|
136
|
-
|
|
137
29
|
/**
|
|
138
30
|
* 事件来源
|
|
139
31
|
* - group: 群聊
|
|
@@ -1345,7 +1237,7 @@ interface MusicSegment extends Segment {
|
|
|
1345
1237
|
}
|
|
1346
1238
|
/** 音乐自定义分享消息段 */
|
|
1347
1239
|
interface CustomMusicSegment extends Segment {
|
|
1348
|
-
type: '
|
|
1240
|
+
type: 'music';
|
|
1349
1241
|
data: {
|
|
1350
1242
|
type: 'custom';
|
|
1351
1243
|
url: string;
|
|
@@ -2796,11 +2688,13 @@ type ExecReturn<K extends boolean> = K extends true ? boolean : ExecType;
|
|
|
2796
2688
|
/**
|
|
2797
2689
|
* 执行 shell 命令参数
|
|
2798
2690
|
*/
|
|
2799
|
-
type ExecOptions<T extends boolean> = Parameters<typeof exec$1>[1] & {
|
|
2691
|
+
type ExecOptions$1<T extends boolean> = Parameters<typeof exec$1>[1] & {
|
|
2800
2692
|
/** 是否打印日志 默认不打印 */
|
|
2801
2693
|
log?: boolean;
|
|
2802
2694
|
/** 是否只返回布尔值 表示命令是否成功执行 优先级比抛错误高 */
|
|
2803
2695
|
booleanResult?: T;
|
|
2696
|
+
/** 是否去除日志中的换行符 默认不去除 */
|
|
2697
|
+
trim?: boolean;
|
|
2804
2698
|
};
|
|
2805
2699
|
|
|
2806
2700
|
type Args = {
|
|
@@ -2828,15 +2722,34 @@ type FileToUrlHandler = {
|
|
|
2828
2722
|
args?: Args): Promise<FileToUrlResult<T>>;
|
|
2829
2723
|
};
|
|
2830
2724
|
|
|
2725
|
+
/**
|
|
2726
|
+
* 动态导入模块成功结果
|
|
2727
|
+
*/
|
|
2728
|
+
interface ImportSuccessResult<T = any> {
|
|
2729
|
+
status: true;
|
|
2730
|
+
data: T;
|
|
2731
|
+
}
|
|
2732
|
+
/**
|
|
2733
|
+
* 动态导入模块失败结果
|
|
2734
|
+
*/
|
|
2735
|
+
interface ImportErrorResult {
|
|
2736
|
+
status: false;
|
|
2737
|
+
data: unknown;
|
|
2738
|
+
}
|
|
2739
|
+
/**
|
|
2740
|
+
* 动态导入模块结果
|
|
2741
|
+
*/
|
|
2742
|
+
type ImportModuleResult<T = any> = ImportSuccessResult<T> | ImportErrorResult;
|
|
2743
|
+
|
|
2831
2744
|
/**
|
|
2832
2745
|
* 适配器基类 一个示例
|
|
2833
2746
|
* @class AdapterBase
|
|
2834
2747
|
*/
|
|
2835
|
-
declare abstract class AdapterBase implements AdapterType {
|
|
2748
|
+
declare abstract class AdapterBase<T = any> implements AdapterType<T> {
|
|
2836
2749
|
account: AdapterType['account'];
|
|
2837
2750
|
adapter: AdapterType['adapter'];
|
|
2838
|
-
super:
|
|
2839
|
-
raw:
|
|
2751
|
+
super: T;
|
|
2752
|
+
raw: T;
|
|
2840
2753
|
constructor();
|
|
2841
2754
|
get selfId(): string;
|
|
2842
2755
|
get selfName(): string;
|
|
@@ -2849,367 +2762,367 @@ declare abstract class AdapterBase implements AdapterType {
|
|
|
2849
2762
|
logger(level: LoggerLevel, ...args: any[]): void;
|
|
2850
2763
|
/**
|
|
2851
2764
|
* 发送消息
|
|
2852
|
-
* @param
|
|
2853
|
-
* @param
|
|
2854
|
-
* @param
|
|
2765
|
+
* @param _contact 目标信息
|
|
2766
|
+
* @param _elements 消息元素
|
|
2767
|
+
* @param _retryCount 重试次数 默认为0
|
|
2855
2768
|
*/
|
|
2856
|
-
sendMsg(
|
|
2769
|
+
sendMsg(_contact: Contact, _elements: Array<Elements>, _retryCount?: number): Promise<SendMsgResults>;
|
|
2857
2770
|
/**
|
|
2858
2771
|
* 发送长消息
|
|
2859
|
-
* @param
|
|
2860
|
-
* @param
|
|
2772
|
+
* @param _contact 目标信息
|
|
2773
|
+
* @param _resId 资源ID
|
|
2861
2774
|
*/
|
|
2862
|
-
sendLongMsg(
|
|
2775
|
+
sendLongMsg(_contact: Contact, _resId: string): Promise<SendMsgResults>;
|
|
2863
2776
|
/**
|
|
2864
2777
|
* 发送合并转发消息
|
|
2865
|
-
* @param
|
|
2866
|
-
* @param
|
|
2867
|
-
* @param
|
|
2778
|
+
* @param _contact 目标信息
|
|
2779
|
+
* @param _elements 消息元素
|
|
2780
|
+
* @param _options 首层小卡片外显参数
|
|
2868
2781
|
*/
|
|
2869
|
-
sendForwardMsg(
|
|
2782
|
+
sendForwardMsg(_contact: Contact, _elements: Array<NodeElement>, _options?: ForwardOptions): Promise<{
|
|
2870
2783
|
messageId: string;
|
|
2871
2784
|
forwardId: string;
|
|
2872
2785
|
}>;
|
|
2873
2786
|
/**
|
|
2874
2787
|
* 撤回消息
|
|
2875
|
-
* @param
|
|
2876
|
-
* @param
|
|
2788
|
+
* @param _contact 目标信息
|
|
2789
|
+
* @param _messageId 消息ID
|
|
2877
2790
|
* @returns 此接口的返回值不值得信任
|
|
2878
2791
|
*/
|
|
2879
|
-
recallMsg(
|
|
2792
|
+
recallMsg(_contact: Contact, _messageId: string): Promise<boolean>;
|
|
2880
2793
|
/**
|
|
2881
2794
|
* 获取头像url
|
|
2882
|
-
* @param
|
|
2883
|
-
* @param
|
|
2795
|
+
* @param _userId 用户ID
|
|
2796
|
+
* @param _size 头像大小,默认需要为`0`,请开发者注意
|
|
2884
2797
|
* @returns 头像的url地址
|
|
2885
2798
|
*/
|
|
2886
|
-
getAvatarUrl(
|
|
2799
|
+
getAvatarUrl(_userId: string, _size?: 0 | 40 | 100 | 140): Promise<string>;
|
|
2887
2800
|
/**
|
|
2888
2801
|
* 获取群头像url
|
|
2889
|
-
* @param
|
|
2890
|
-
* @param
|
|
2891
|
-
* @param
|
|
2802
|
+
* @param _groupId 群号
|
|
2803
|
+
* @param _size 头像大小,默认`0`
|
|
2804
|
+
* @param _history 历史头像记录,默认`0`,若要获取历史群头像则填写1,2,3...
|
|
2892
2805
|
* @returns 头像的url地址
|
|
2893
2806
|
*/
|
|
2894
|
-
getGroupAvatarUrl(
|
|
2807
|
+
getGroupAvatarUrl(_groupId: string, _size?: 0 | 40 | 100 | 140, _history?: number): Promise<string>;
|
|
2895
2808
|
/**
|
|
2896
2809
|
* 获取消息
|
|
2897
|
-
* @param
|
|
2898
|
-
* @param
|
|
2810
|
+
* @param _contact 目标信息
|
|
2811
|
+
* @param _messageId 消息ID
|
|
2899
2812
|
* @returns MessageResponse对象
|
|
2900
2813
|
*/
|
|
2901
|
-
getMsg(
|
|
2814
|
+
getMsg(_contact: Contact, _messageId: string): Promise<MessageResponse>;
|
|
2902
2815
|
/**
|
|
2903
2816
|
* 获取msgId获取历史消息
|
|
2904
|
-
* @param
|
|
2905
|
-
* @param
|
|
2906
|
-
* @param
|
|
2817
|
+
* @param _contact 目标信息
|
|
2818
|
+
* @param _startMsgId 起始消息ID
|
|
2819
|
+
* @param _count 获取消息数量 默认为1
|
|
2907
2820
|
* @returns 包含历史消息的数组
|
|
2908
2821
|
*/
|
|
2909
|
-
getHistoryMsg(
|
|
2822
|
+
getHistoryMsg(_contact: Contact, _startMsgId: string, _count: number): Promise<Array<MessageResponse>>;
|
|
2910
2823
|
/**
|
|
2911
2824
|
* 获取合并转发消息
|
|
2912
|
-
* @param
|
|
2825
|
+
* @param _resId 资源ID
|
|
2913
2826
|
* @returns 包含MessageResponse对象的数组
|
|
2914
2827
|
*/
|
|
2915
|
-
getForwardMsg(
|
|
2828
|
+
getForwardMsg(_resId: string): Promise<Array<MessageResponse>>;
|
|
2916
2829
|
/**
|
|
2917
2830
|
* 获取精华消息
|
|
2918
|
-
* @param
|
|
2919
|
-
* @param
|
|
2920
|
-
* @param
|
|
2831
|
+
* @param _groupId 群ID
|
|
2832
|
+
* @param _page 页码
|
|
2833
|
+
* @param _pageSize 每页数量
|
|
2921
2834
|
* @returns EssenceMessageBody对象
|
|
2922
2835
|
*/
|
|
2923
|
-
getGroupHighlights(
|
|
2836
|
+
getGroupHighlights(_groupId: string, _page: number, _pageSize: number): Promise<Array<GetGroupHighlightsResponse>>;
|
|
2924
2837
|
/**
|
|
2925
2838
|
* 构造一个资源ID 即上传合并转发消息后不进行发送
|
|
2926
|
-
* @param
|
|
2927
|
-
* @param
|
|
2839
|
+
* @param _contact 目标信息
|
|
2840
|
+
* @param _elements 转发消息元素
|
|
2928
2841
|
* @description 此接口并不是所有协议端都支持的,因此在使用时请注意
|
|
2929
2842
|
*/
|
|
2930
|
-
createResId(
|
|
2843
|
+
createResId(_contact: Contact, _elements: Array<NodeElement>): Promise<string>;
|
|
2931
2844
|
/**
|
|
2932
2845
|
* 设置、取消群精华消息
|
|
2933
|
-
* @param
|
|
2934
|
-
* @param
|
|
2935
|
-
* @param
|
|
2846
|
+
* @param _groupId 群ID
|
|
2847
|
+
* @param _messageId 群消息ID
|
|
2848
|
+
* @param _create true为添加精华消息,false为删除精华消息 默认为true
|
|
2936
2849
|
*/
|
|
2937
|
-
setGgroupHighlights(
|
|
2850
|
+
setGgroupHighlights(_groupId: string, _messageId: string, _create: boolean): Promise<boolean>;
|
|
2938
2851
|
/**
|
|
2939
2852
|
* 发送好友赞
|
|
2940
|
-
* @param
|
|
2941
|
-
* @param
|
|
2853
|
+
* @param _targetId 目标ID
|
|
2854
|
+
* @param _count 赞的次数
|
|
2942
2855
|
* @returns 此接口的返回值不值得信任
|
|
2943
2856
|
*/
|
|
2944
|
-
sendLike(
|
|
2857
|
+
sendLike(_targetId: string, _count: number): Promise<boolean>;
|
|
2945
2858
|
/**
|
|
2946
2859
|
* 群踢人
|
|
2947
|
-
* @param
|
|
2948
|
-
* @param
|
|
2949
|
-
* @param
|
|
2950
|
-
* @param
|
|
2860
|
+
* @param _groupId 群ID
|
|
2861
|
+
* @param _targetId 被踢出目标的ID 任选其一
|
|
2862
|
+
* @param _rejectAddRequest 是否拒绝再次申请,默认为false
|
|
2863
|
+
* @param _kickReason 踢出原因,可选
|
|
2951
2864
|
* @returns 此接口的返回值不值得信任
|
|
2952
2865
|
*/
|
|
2953
|
-
groupKickMember(
|
|
2866
|
+
groupKickMember(_groupId: string, _targetId: string, _rejectAddRequest?: boolean, _kickReason?: string): Promise<boolean>;
|
|
2954
2867
|
/**
|
|
2955
2868
|
* 禁言群成员
|
|
2956
|
-
* @param
|
|
2957
|
-
* @param
|
|
2958
|
-
* @param
|
|
2869
|
+
* @param _groupId 群ID
|
|
2870
|
+
* @param _targetId 被禁言目标的ID 任选其一
|
|
2871
|
+
* @param _duration 禁言时长 单位:秒
|
|
2959
2872
|
* @returns 此接口的返回值不值得信任
|
|
2960
2873
|
*/
|
|
2961
|
-
setGroupMute(
|
|
2874
|
+
setGroupMute(_groupId: string, _targetId: string, _duration: number): Promise<boolean>;
|
|
2962
2875
|
/**
|
|
2963
2876
|
* 群全员禁言
|
|
2964
|
-
* @param
|
|
2965
|
-
* @param
|
|
2877
|
+
* @param _groupId 群ID
|
|
2878
|
+
* @param _isBan 是否开启全员禁言
|
|
2966
2879
|
* @returns 此接口的返回值不值得信任
|
|
2967
2880
|
*/
|
|
2968
|
-
setGroupAllMute(
|
|
2881
|
+
setGroupAllMute(_groupId: string, _isBan: boolean): Promise<boolean>;
|
|
2969
2882
|
/**
|
|
2970
2883
|
* 设置群管理员
|
|
2971
|
-
* @param
|
|
2972
|
-
* @param
|
|
2973
|
-
* @param
|
|
2884
|
+
* @param _groupId 群ID
|
|
2885
|
+
* @param _targetId 目标用户的ID
|
|
2886
|
+
* @param _isAdmin 是否设置为管理员
|
|
2974
2887
|
* @returns 此接口的返回值不值得信任
|
|
2975
2888
|
*/
|
|
2976
|
-
setGroupAdmin(
|
|
2889
|
+
setGroupAdmin(_groupId: string, _targetId: string, _isAdmin: boolean): Promise<boolean>;
|
|
2977
2890
|
/**
|
|
2978
2891
|
* 设置群名片
|
|
2979
|
-
* @param
|
|
2980
|
-
* @param
|
|
2981
|
-
* @param
|
|
2892
|
+
* @param _groupId 群ID
|
|
2893
|
+
* @param _targetId 目标用户的ID
|
|
2894
|
+
* @param _card 新的群名片
|
|
2982
2895
|
* @returns 此接口的返回值不值得信任
|
|
2983
2896
|
*/
|
|
2984
|
-
setGroupMemberCard(
|
|
2897
|
+
setGroupMemberCard(_groupId: string, _targetId: string, _card: string): Promise<boolean>;
|
|
2985
2898
|
/**
|
|
2986
2899
|
* 设置群名
|
|
2987
|
-
* @param
|
|
2988
|
-
* @param
|
|
2900
|
+
* @param _groupId 群ID
|
|
2901
|
+
* @param _groupName 新的群名
|
|
2989
2902
|
* @returns 此接口的返回值不值得信任
|
|
2990
2903
|
*/
|
|
2991
|
-
setGroupName(
|
|
2904
|
+
setGroupName(_groupId: string, _groupName: string): Promise<boolean>;
|
|
2992
2905
|
/**
|
|
2993
2906
|
* 退出群组
|
|
2994
|
-
* @param
|
|
2995
|
-
* @param
|
|
2907
|
+
* @param _groupId 群ID
|
|
2908
|
+
* @param _isDismiss 如果Bot是群主,是否解散群
|
|
2996
2909
|
* @returns 此接口的返回值不值得信任
|
|
2997
2910
|
*/
|
|
2998
|
-
setGroupQuit(
|
|
2911
|
+
setGroupQuit(_groupId: string, _isDismiss: boolean): Promise<boolean>;
|
|
2999
2912
|
/**
|
|
3000
2913
|
* 设置群专属头衔 仅群主可用
|
|
3001
|
-
* @param
|
|
3002
|
-
* @param
|
|
3003
|
-
* @param
|
|
2914
|
+
* @param _groupId 群ID
|
|
2915
|
+
* @param _targetId 目标用户的ID
|
|
2916
|
+
* @param _title 新的专属头衔
|
|
3004
2917
|
* @returns 此接口的返回值不值得信任
|
|
3005
2918
|
*/
|
|
3006
|
-
setGroupMemberTitle(
|
|
2919
|
+
setGroupMemberTitle(_groupId: string, _targetId: string, _title: string): Promise<boolean>;
|
|
3007
2920
|
/**
|
|
3008
2921
|
* 获取陌生人信息 此接口数据无法保证完全正确并且无法保证数据的完整性
|
|
3009
|
-
* @param
|
|
2922
|
+
* @param _targetId 用户ID 任选其一
|
|
3010
2923
|
* @returns 陌生人信息数组
|
|
3011
2924
|
*/
|
|
3012
|
-
getStrangerInfo(
|
|
2925
|
+
getStrangerInfo(_targetId: string): Promise<UserInfo>;
|
|
3013
2926
|
/**
|
|
3014
2927
|
* 获取好友列表
|
|
3015
|
-
* @param
|
|
2928
|
+
* @param _refresh 是否刷新好友列表
|
|
3016
2929
|
* @returns 好友列表数组
|
|
3017
2930
|
*/
|
|
3018
|
-
getFriendList(
|
|
2931
|
+
getFriendList(_refresh?: boolean): Promise<Array<UserInfo>>;
|
|
3019
2932
|
/**
|
|
3020
2933
|
* 获取群信息
|
|
3021
|
-
* @param
|
|
3022
|
-
* @param
|
|
2934
|
+
* @param _groupId 群ID
|
|
2935
|
+
* @param _noCache 是否刷新缓存
|
|
3023
2936
|
* @returns 群信息
|
|
3024
2937
|
*/
|
|
3025
|
-
getGroupInfo(
|
|
2938
|
+
getGroupInfo(_groupId: string, _noCache?: boolean): Promise<GroupInfo>;
|
|
3026
2939
|
/**
|
|
3027
2940
|
* 获取群列表
|
|
3028
|
-
* @param
|
|
2941
|
+
* @param _refresh 是否刷新好友列表
|
|
3029
2942
|
* @returns 群列表数组
|
|
3030
2943
|
*/
|
|
3031
|
-
getGroupList(
|
|
2944
|
+
getGroupList(_refresh?: boolean): Promise<Array<GroupInfo>>;
|
|
3032
2945
|
/**
|
|
3033
2946
|
* 获取群成员信息
|
|
3034
2947
|
* 此接口在非QQ平台上很难获取到标准信息,因此返回的数据可能会有所不同
|
|
3035
|
-
* @param
|
|
3036
|
-
* @param
|
|
3037
|
-
* @param
|
|
2948
|
+
* @param _groupId 群ID
|
|
2949
|
+
* @param _targetId 目标用户的ID
|
|
2950
|
+
* @param _refresh 是否刷新缓存
|
|
3038
2951
|
* @returns 群成员信息
|
|
3039
2952
|
*/
|
|
3040
|
-
getGroupMemberInfo(
|
|
2953
|
+
getGroupMemberInfo(_groupId: string, _targetId: string, _refresh?: boolean): Promise<GroupMemberInfo>;
|
|
3041
2954
|
/**
|
|
3042
2955
|
* 获取群成员列表
|
|
3043
|
-
* @param
|
|
3044
|
-
* @param
|
|
2956
|
+
* @param _groupId 群ID
|
|
2957
|
+
* @param _refresh 是否刷新缓存
|
|
3045
2958
|
* @returns 群成员列表数组
|
|
3046
2959
|
*/
|
|
3047
|
-
getGroupMemberList(
|
|
2960
|
+
getGroupMemberList(_groupId: string, _refresh?: boolean): Promise<Array<GroupMemberInfo>>;
|
|
3048
2961
|
/**
|
|
3049
2962
|
* 获取群荣誉信息
|
|
3050
|
-
* @param
|
|
2963
|
+
* @param _groupId 群ID
|
|
3051
2964
|
* @param refresh 是否刷新缓存
|
|
3052
2965
|
* @returns 群荣誉信息数组
|
|
3053
2966
|
*/
|
|
3054
|
-
getGroupHonor(
|
|
2967
|
+
getGroupHonor(_groupId: string): Promise<Array<QQGroupHonorInfo>>;
|
|
3055
2968
|
/**
|
|
3056
2969
|
* 设置好友请求结果
|
|
3057
|
-
* @param
|
|
3058
|
-
* @param
|
|
3059
|
-
* @param
|
|
2970
|
+
* @param _requestId 请求事件ID
|
|
2971
|
+
* @param _isApprove 是否同意
|
|
2972
|
+
* @param _remark 好友备注 同意时有效
|
|
3060
2973
|
* @returns 设置结果
|
|
3061
2974
|
*/
|
|
3062
|
-
setFriendApplyResult(
|
|
2975
|
+
setFriendApplyResult(_requestId: string, _isApprove: boolean, _remark?: string): Promise<boolean>;
|
|
3063
2976
|
/**
|
|
3064
2977
|
* 设置申请加入群请求结果
|
|
3065
|
-
* @param
|
|
3066
|
-
* @param
|
|
3067
|
-
* @param
|
|
2978
|
+
* @param _requestId 请求事件ID
|
|
2979
|
+
* @param _isApprove 是否同意
|
|
2980
|
+
* @param _denyReason 拒绝理由 拒绝时有效
|
|
3068
2981
|
* @returns 此接口的返回值不值得信任
|
|
3069
2982
|
*/
|
|
3070
|
-
setGroupApplyResult(
|
|
2983
|
+
setGroupApplyResult(_requestId: string, _isApprove: boolean, _denyReason?: string): Promise<boolean>;
|
|
3071
2984
|
/**
|
|
3072
2985
|
* 设置邀请加入群请求结果
|
|
3073
|
-
* @param
|
|
3074
|
-
* @param
|
|
2986
|
+
* @param _requestId 请求事件ID
|
|
2987
|
+
* @param _isApprove 是否同意
|
|
3075
2988
|
* @returns 此接口的返回值不值得信任
|
|
3076
2989
|
*/
|
|
3077
|
-
setInvitedJoinGroupResult(
|
|
2990
|
+
setInvitedJoinGroupResult(_requestId: string, _isApprove: boolean): Promise<boolean>;
|
|
3078
2991
|
/**
|
|
3079
2992
|
* 设置消息表情回应
|
|
3080
|
-
* @param
|
|
3081
|
-
* @param
|
|
3082
|
-
* @param
|
|
2993
|
+
* @param _contact 目标信息
|
|
2994
|
+
* @param _messageId 消息ID
|
|
2995
|
+
* @param _faceId 表情ID
|
|
3083
2996
|
* @returns 此接口的返回值不值得信任
|
|
3084
2997
|
*/
|
|
3085
|
-
setMsgReaction(
|
|
2998
|
+
setMsgReaction(_contact: Contact, _messageId: string, _faceId: number, _isSet: boolean): Promise<boolean>;
|
|
3086
2999
|
/**
|
|
3087
3000
|
* 上传群文件、私聊文件
|
|
3088
|
-
* @param
|
|
3089
|
-
* @param
|
|
3090
|
-
* @param
|
|
3091
|
-
* @param
|
|
3001
|
+
* @param _contact 目标信息
|
|
3002
|
+
* @param _file 本地文件绝对路径
|
|
3003
|
+
* @param _name 文件名称 必须提供
|
|
3004
|
+
* @param _folder 父目录ID 不提供则上传到根目录 仅在群聊时有效
|
|
3092
3005
|
* @returns 此接口的返回值不值得信任
|
|
3093
3006
|
*/
|
|
3094
|
-
uploadFile(
|
|
3007
|
+
uploadFile(_contact: Contact, _file: string, _name: string, _folder?: string): Promise<boolean>;
|
|
3095
3008
|
/**
|
|
3096
3009
|
* 让协议端下载文件到协议端本地
|
|
3097
|
-
* @param
|
|
3010
|
+
* @param _options 下载文件的选项
|
|
3098
3011
|
* @returns 下载文件的绝对路径和文件MD5
|
|
3099
3012
|
*/
|
|
3100
|
-
downloadFile(
|
|
3013
|
+
downloadFile(_options?: DownloadFileOptions): Promise<DownloadFileResponse>;
|
|
3101
3014
|
/**
|
|
3102
3015
|
* 创建群文件夹
|
|
3103
|
-
* @param
|
|
3104
|
-
* @param
|
|
3016
|
+
* @param _groupId 群号
|
|
3017
|
+
* @param _name 文件夹名
|
|
3105
3018
|
* @returns 返回文件夹id和已使用空间
|
|
3106
3019
|
*/
|
|
3107
|
-
createGroupFolder(
|
|
3020
|
+
createGroupFolder(_groupId: string, _name: string): Promise<CreateGroupFolderResponse>;
|
|
3108
3021
|
/**
|
|
3109
3022
|
* 重命名群文件的文件夹
|
|
3110
|
-
* @param
|
|
3111
|
-
* @param
|
|
3112
|
-
* @param
|
|
3023
|
+
* @param _groupId 群号
|
|
3024
|
+
* @param _folderId 文件夹id
|
|
3025
|
+
* @param _name 文件夹名
|
|
3113
3026
|
* @returns 无返回值
|
|
3114
3027
|
*/
|
|
3115
|
-
renameGroupFolder(
|
|
3028
|
+
renameGroupFolder(_groupId: string, _folderId: string, _name: string): Promise<boolean>;
|
|
3116
3029
|
/**
|
|
3117
3030
|
* 删除群文件的文件夹
|
|
3118
|
-
* @param
|
|
3119
|
-
* @param
|
|
3031
|
+
* @param _groupId 群号
|
|
3032
|
+
* @param _folderId 文件夹id
|
|
3120
3033
|
* @returns 无返回值
|
|
3121
3034
|
*/
|
|
3122
|
-
delGroupFolder(
|
|
3035
|
+
delGroupFolder(_groupId: string, _folderId: string): Promise<boolean>;
|
|
3123
3036
|
/**
|
|
3124
3037
|
* 上传群文件
|
|
3125
3038
|
* @description 此接口仅可以在Bot和协议端在同一台设备上时使用
|
|
3126
|
-
* @param
|
|
3127
|
-
* @param
|
|
3128
|
-
* @param
|
|
3039
|
+
* @param _groupId 群号
|
|
3040
|
+
* @param _file 文件绝对路径
|
|
3041
|
+
* @param _name 文件名
|
|
3129
3042
|
* @returns 无返回值
|
|
3130
3043
|
*/
|
|
3131
|
-
uploadGroupFile(
|
|
3044
|
+
uploadGroupFile(_groupId: string, _file: string, _name?: string): Promise<boolean>;
|
|
3132
3045
|
/**
|
|
3133
3046
|
* 删除群文件
|
|
3134
|
-
* @param
|
|
3135
|
-
* @param
|
|
3136
|
-
* @param
|
|
3047
|
+
* @param _groupId 群号
|
|
3048
|
+
* @param _fileId 文件id
|
|
3049
|
+
* @param _busId 文件类型ID
|
|
3137
3050
|
* @returns 无返回值
|
|
3138
3051
|
*/
|
|
3139
|
-
delGroupFile(
|
|
3052
|
+
delGroupFile(_groupId: string, _fileId: string, _busId: number): Promise<boolean>;
|
|
3140
3053
|
/**
|
|
3141
3054
|
* 获取群文件系统信息
|
|
3142
|
-
* @param
|
|
3055
|
+
* @param _groupId 群号
|
|
3143
3056
|
* @returns 返回文件数量、文件数量上限、已使用空间和空间上限
|
|
3144
3057
|
*/
|
|
3145
|
-
getGroupFileSystemInfo(
|
|
3058
|
+
getGroupFileSystemInfo(_groupId: string): Promise<GetGroupFileSystemInfoResponse>;
|
|
3146
3059
|
/**
|
|
3147
3060
|
* 获取群文件夹下文件列表
|
|
3148
|
-
* @param
|
|
3149
|
-
* @param
|
|
3061
|
+
* @param _groupId 群号
|
|
3062
|
+
* @param _folderId 文件夹id,空则为根目录
|
|
3150
3063
|
* @returns 返回文件和文件夹的列表
|
|
3151
3064
|
*/
|
|
3152
|
-
getGroupFileList(
|
|
3065
|
+
getGroupFileList(_groupId: string, _folderId?: string): Promise<GetGroupFileListResponse>;
|
|
3153
3066
|
/**
|
|
3154
3067
|
* 设置群备注
|
|
3155
|
-
* @param
|
|
3156
|
-
* @param
|
|
3068
|
+
* @param _groupId 群号
|
|
3069
|
+
* @param _remark 新的备注
|
|
3157
3070
|
* @returns 此接口的返回值不值得信任
|
|
3158
3071
|
*/
|
|
3159
|
-
setGroupRemark(
|
|
3072
|
+
setGroupRemark(_groupId: string, _remark: string): Promise<boolean>;
|
|
3160
3073
|
/**
|
|
3161
3074
|
* 获取陌生群信息
|
|
3162
|
-
* @param
|
|
3075
|
+
* @param _groupId 群号
|
|
3163
3076
|
*/
|
|
3164
|
-
getNotJoinedGroupInfo(
|
|
3077
|
+
getNotJoinedGroupInfo(_groupId: string): Promise<GroupInfo>;
|
|
3165
3078
|
/**
|
|
3166
3079
|
* 获取艾特全体成员剩余次数
|
|
3167
|
-
* @param
|
|
3080
|
+
* @param _groupId 群号
|
|
3168
3081
|
* @returns 返回是否允许at全体成员和全群剩余次数、个人剩余次数
|
|
3169
3082
|
*/
|
|
3170
|
-
getAtAllCount(
|
|
3083
|
+
getAtAllCount(_groupId: string): Promise<GetAtAllCountResponse>;
|
|
3171
3084
|
/**
|
|
3172
3085
|
* 获取群被禁言用户列表
|
|
3173
|
-
* @param
|
|
3086
|
+
* @param _groupId
|
|
3174
3087
|
* @returns 返回禁言用户列表
|
|
3175
3088
|
*/
|
|
3176
|
-
getGroupMuteList(
|
|
3089
|
+
getGroupMuteList(_groupId: string): Promise<Array<GetGroupMuteListResponse>>;
|
|
3177
3090
|
/**
|
|
3178
3091
|
* 戳一戳用户 支持群聊和私聊
|
|
3179
|
-
* @param
|
|
3180
|
-
* @param
|
|
3092
|
+
* @param _contact 目标信息
|
|
3093
|
+
* @param _count 戳一戳次数 默认为1
|
|
3181
3094
|
* @returns 此接口的返回值不值得信任
|
|
3182
3095
|
*/
|
|
3183
|
-
pokeUser(
|
|
3096
|
+
pokeUser(_contact: Contact, _count?: number): Promise<boolean>;
|
|
3184
3097
|
/**
|
|
3185
3098
|
* 获取 Cookies
|
|
3186
|
-
* @param
|
|
3099
|
+
* @param _domain The domain to get cookies from
|
|
3187
3100
|
*/
|
|
3188
|
-
getCookies(
|
|
3101
|
+
getCookies(_domain: string): Promise<{
|
|
3189
3102
|
cookie: string;
|
|
3190
3103
|
}>;
|
|
3191
3104
|
/**
|
|
3192
3105
|
* 获取 QQ 相关接口凭证
|
|
3193
|
-
* @param
|
|
3106
|
+
* @param _domain The domain to get credentials from
|
|
3194
3107
|
*/
|
|
3195
|
-
getCredentials(
|
|
3108
|
+
getCredentials(_domain: string): Promise<{
|
|
3196
3109
|
cookies: string;
|
|
3197
3110
|
csrf_token: number;
|
|
3198
3111
|
}>;
|
|
3199
3112
|
/**
|
|
3200
3113
|
* 获取 CSRF Token
|
|
3201
|
-
* @param
|
|
3114
|
+
* @param _domain The domain to get the CSRF token from
|
|
3202
3115
|
*/
|
|
3203
|
-
getCSRFToken(
|
|
3116
|
+
getCSRFToken(_domain: string): Promise<{
|
|
3204
3117
|
token: number;
|
|
3205
3118
|
}>;
|
|
3206
3119
|
/**
|
|
3207
3120
|
* 获取 HTTP Cookies
|
|
3208
|
-
* @param
|
|
3209
|
-
* @param
|
|
3210
|
-
* @param
|
|
3121
|
+
* @param _appid The appid
|
|
3122
|
+
* @param _daid The daid
|
|
3123
|
+
* @param _jumpUrl The jump url
|
|
3211
3124
|
*/
|
|
3212
|
-
getHttpCookies(
|
|
3125
|
+
getHttpCookies(_appid: string, _daid: string, _jumpUrl: string): Promise<{
|
|
3213
3126
|
cookie: string;
|
|
3214
3127
|
}>;
|
|
3215
3128
|
}
|
|
@@ -3292,7 +3205,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
3292
3205
|
* @param contact ob11无需提供contact参数
|
|
3293
3206
|
* @param messageId 消息ID
|
|
3294
3207
|
*/
|
|
3295
|
-
recallMsg(
|
|
3208
|
+
recallMsg(_: Contact, messageId: string): Promise<boolean>;
|
|
3296
3209
|
/**
|
|
3297
3210
|
* @deprecated 已废弃,请使用`recallMsg`
|
|
3298
3211
|
*/
|
|
@@ -3415,7 +3328,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
3415
3328
|
* @param kickReason 踢出原因,可选
|
|
3416
3329
|
* @returns 此接口的返回值不值得信任
|
|
3417
3330
|
*/
|
|
3418
|
-
groupKickMember(groupId: string, targetId: string, rejectAddRequest?: boolean,
|
|
3331
|
+
groupKickMember(groupId: string, targetId: string, rejectAddRequest?: boolean, _?: string): Promise<boolean>;
|
|
3419
3332
|
/**
|
|
3420
3333
|
* @deprecated 已废弃,请使用`groupKickMember`
|
|
3421
3334
|
*/
|
|
@@ -3627,7 +3540,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
3627
3540
|
* @param refresh 是否刷新好友列表
|
|
3628
3541
|
* @returns 好友列表数组
|
|
3629
3542
|
*/
|
|
3630
|
-
getFriendList(
|
|
3543
|
+
getFriendList(_?: boolean): Promise<{
|
|
3631
3544
|
userId: string;
|
|
3632
3545
|
user_id: string;
|
|
3633
3546
|
/** 用户UID */
|
|
@@ -4172,7 +4085,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4172
4085
|
/**
|
|
4173
4086
|
* @deprecated 已废弃,请使用`getGroupHonor`
|
|
4174
4087
|
*/
|
|
4175
|
-
GetGroupHonor(groupId: string,
|
|
4088
|
+
GetGroupHonor(groupId: string, _?: boolean): Promise<QQGroupHonorInfo[]>;
|
|
4176
4089
|
/**
|
|
4177
4090
|
* 设置消息表情回应
|
|
4178
4091
|
* @param contact 目标信息
|
|
@@ -4180,7 +4093,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4180
4093
|
* @param faceId 表情ID
|
|
4181
4094
|
* @returns 此接口的返回值不值得信任
|
|
4182
4095
|
*/
|
|
4183
|
-
setMsgReaction(
|
|
4096
|
+
setMsgReaction(_: Contact, messageId: string, faceId: number, isSet: boolean): Promise<boolean>;
|
|
4184
4097
|
/**
|
|
4185
4098
|
* @deprecated 已废弃,请使用`setMsgReaction`
|
|
4186
4099
|
*/
|
|
@@ -4195,7 +4108,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4195
4108
|
version: string;
|
|
4196
4109
|
protocol: string;
|
|
4197
4110
|
}>;
|
|
4198
|
-
DownloadForwardMessage(
|
|
4111
|
+
DownloadForwardMessage(_: string): Promise<any>;
|
|
4199
4112
|
/**
|
|
4200
4113
|
* 获取精华消息
|
|
4201
4114
|
* @param groupId 群ID
|
|
@@ -4203,7 +4116,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4203
4116
|
* @param pageSize 每页数量
|
|
4204
4117
|
* @returns EssenceMessageBody对象
|
|
4205
4118
|
*/
|
|
4206
|
-
getGroupHighlights(groupId: string,
|
|
4119
|
+
getGroupHighlights(groupId: string, _: number, __: number): Promise<(GetGroupHighlightsResponse & {
|
|
4207
4120
|
group_id: string;
|
|
4208
4121
|
sender_uid: string;
|
|
4209
4122
|
sender_uin: string;
|
|
@@ -4258,7 +4171,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4258
4171
|
* @param messageId 群消息ID
|
|
4259
4172
|
* @param create true为添加精华消息,false为删除精华消息 默认为true
|
|
4260
4173
|
*/
|
|
4261
|
-
setGgroupHighlights(
|
|
4174
|
+
setGgroupHighlights(_: string, messageId: string, create: boolean): Promise<boolean>;
|
|
4262
4175
|
/**
|
|
4263
4176
|
* @deprecated 已废弃,请使用`setGgroupHighlights`
|
|
4264
4177
|
*/
|
|
@@ -4267,7 +4180,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4267
4180
|
* @deprecated 已废弃,请使用`setGgroupHighlights`
|
|
4268
4181
|
*/
|
|
4269
4182
|
DeleteEssenceMessage(_groupId: string, messageId: string): Promise<boolean>;
|
|
4270
|
-
PokeMember(
|
|
4183
|
+
PokeMember(_: string, __: string): Promise<void>;
|
|
4271
4184
|
/**
|
|
4272
4185
|
* 设置好友请求结果
|
|
4273
4186
|
* @param requestId 请求事件ID
|
|
@@ -4302,7 +4215,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4302
4215
|
/**
|
|
4303
4216
|
* @deprecated 已废弃,请使用`setInvitedJoinGroupResult`
|
|
4304
4217
|
*/
|
|
4305
|
-
SetInvitedJoinGroupResult(requestId: string, isApprove: boolean,
|
|
4218
|
+
SetInvitedJoinGroupResult(requestId: string, isApprove: boolean, _?: string): Promise<boolean>;
|
|
4306
4219
|
/**
|
|
4307
4220
|
* 合并转发 karin -> adapter
|
|
4308
4221
|
* @param elements 消息元素
|
|
@@ -4333,7 +4246,7 @@ declare abstract class AdapterOneBot extends AdapterBase {
|
|
|
4333
4246
|
* @param action API端点
|
|
4334
4247
|
* @param params API参数
|
|
4335
4248
|
*/
|
|
4336
|
-
sendApi<T extends keyof OB11ApiParams>(
|
|
4249
|
+
sendApi<T extends keyof OB11ApiParams>(_: T | `${T}`, __: OB11ApiParams[T], ___?: number): Promise<OB11ApiRequest[T]>;
|
|
4337
4250
|
/**
|
|
4338
4251
|
* 发送API请求
|
|
4339
4252
|
* @deprecated 已废弃,请使用`sendApi`
|
|
@@ -4353,11 +4266,11 @@ declare const createHttp: () => Promise<void>;
|
|
|
4353
4266
|
declare const initOneBot: () => Promise<void>;
|
|
4354
4267
|
|
|
4355
4268
|
/** 适配器类型 */
|
|
4356
|
-
interface AdapterType {
|
|
4357
|
-
/** 原生方法
|
|
4358
|
-
super:
|
|
4359
|
-
/** 原生方法
|
|
4360
|
-
raw:
|
|
4269
|
+
interface AdapterType<T = any> {
|
|
4270
|
+
/** 原生方法 */
|
|
4271
|
+
super: T;
|
|
4272
|
+
/** 原生方法 */
|
|
4273
|
+
raw: T;
|
|
4361
4274
|
/**
|
|
4362
4275
|
* onebot专属方法
|
|
4363
4276
|
* @param action 请求的方法
|
|
@@ -5457,7 +5370,7 @@ declare abstract class BaseEvent<T extends EventParent> {
|
|
|
5457
5370
|
/** 快速回复源函数 */
|
|
5458
5371
|
get srcReply(): SrcReply;
|
|
5459
5372
|
/** 机器人实例 */
|
|
5460
|
-
get bot(): AdapterType
|
|
5373
|
+
get bot(): AdapterType<any>;
|
|
5461
5374
|
/**
|
|
5462
5375
|
* 是否为私聊场景
|
|
5463
5376
|
* - 在好友场景下为 `true`
|
|
@@ -6254,7 +6167,7 @@ declare const getBot: GetBot;
|
|
|
6254
6167
|
* 获取所有Bot类 不包含索引
|
|
6255
6168
|
* @returns Bot类列表
|
|
6256
6169
|
*/
|
|
6257
|
-
declare const getAllBot: () => AdapterType[];
|
|
6170
|
+
declare const getAllBot: () => AdapterType<any>[];
|
|
6258
6171
|
/**
|
|
6259
6172
|
* 获取所有Bot类 包含索引
|
|
6260
6173
|
* @returns 注册的Bot列表
|
|
@@ -6285,7 +6198,7 @@ declare const unregisterBot: UnregisterBot;
|
|
|
6285
6198
|
* @param bot 适配器实例
|
|
6286
6199
|
* @returns 适配器索引
|
|
6287
6200
|
*/
|
|
6288
|
-
declare const registerBot: (
|
|
6201
|
+
declare const registerBot: (_: AdapterCommunication, bot: AdapterBase) => number;
|
|
6289
6202
|
type Message$1 = string | Elements | Array<Elements>;
|
|
6290
6203
|
interface SendMsgOptions$1 {
|
|
6291
6204
|
/** 发送成功后撤回消息时间 */
|
|
@@ -6302,7 +6215,7 @@ interface SendMsgOptions$1 {
|
|
|
6302
6215
|
* @param elements 消息内容
|
|
6303
6216
|
* @param options 消息选项
|
|
6304
6217
|
*/
|
|
6305
|
-
declare const sendMsg: (selfId: string, contact: Contact, elements: Message$1, options?: SendMsgOptions$1) => Promise<SendMsgResults>;
|
|
6218
|
+
declare const sendMsg$1: (selfId: string, contact: Contact, elements: Message$1, options?: SendMsgOptions$1) => Promise<SendMsgResults>;
|
|
6306
6219
|
|
|
6307
6220
|
interface HandlerType<T = any> {
|
|
6308
6221
|
/**
|
|
@@ -6334,29 +6247,364 @@ interface HandlerType<T = any> {
|
|
|
6334
6247
|
*/
|
|
6335
6248
|
declare const handler$1: HandlerType;
|
|
6336
6249
|
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
type
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
|
|
6250
|
+
/**
|
|
6251
|
+
* 任务类型枚举
|
|
6252
|
+
* - install: 安装插件
|
|
6253
|
+
* - uninstall: 卸载插件
|
|
6254
|
+
* - update: 更新插件
|
|
6255
|
+
* - disable: 禁用插件
|
|
6256
|
+
* - enable: 启用插件
|
|
6257
|
+
*/
|
|
6258
|
+
type TaskType = 'install' | 'uninstall' | 'update' | 'disable' | 'enable';
|
|
6259
|
+
/**
|
|
6260
|
+
* 任务状态枚举
|
|
6261
|
+
* - pending: 待执行
|
|
6262
|
+
* - running: 执行中
|
|
6263
|
+
* - success: 成功
|
|
6264
|
+
* - failed: 失败
|
|
6265
|
+
* - canceled: 已取消
|
|
6266
|
+
* - timeout: 超时
|
|
6267
|
+
*/
|
|
6268
|
+
type TaskStatus = 'pending' | 'running' | 'success' | 'failed' | 'canceled' | 'timeout';
|
|
6269
|
+
/**
|
|
6270
|
+
* 任务执行器类型
|
|
6271
|
+
* @param task - 任务实体
|
|
6272
|
+
* @param log - 日志记录函数
|
|
6273
|
+
* @returns Promise<boolean> - 执行成功返回true,失败返回false
|
|
6274
|
+
*/
|
|
6275
|
+
type TaskExecutor = (task: TaskEntity, log: (message: string) => void) => Promise<boolean>;
|
|
6276
|
+
/**
|
|
6277
|
+
* 任务实体接口
|
|
6278
|
+
*/
|
|
6279
|
+
interface TaskEntity {
|
|
6280
|
+
/** 任务唯一标识 */
|
|
6281
|
+
id: string;
|
|
6282
|
+
/** 任务类型 */
|
|
6283
|
+
type: TaskType;
|
|
6284
|
+
/** 任务名称 */
|
|
6285
|
+
name: string;
|
|
6286
|
+
/** 目标(插件名/包名/路径) */
|
|
6287
|
+
target: string;
|
|
6288
|
+
/**
|
|
6289
|
+
* 任务状态
|
|
6290
|
+
* - pending: 待执行
|
|
6291
|
+
* - running: 执行中
|
|
6292
|
+
* - success: 成功
|
|
6293
|
+
* - failed: 失败
|
|
6294
|
+
* - canceled: 已取消
|
|
6295
|
+
* - timeout: 超时
|
|
6296
|
+
*/
|
|
6297
|
+
status: TaskStatus;
|
|
6298
|
+
/** 完整执行日志 */
|
|
6299
|
+
logs: string;
|
|
6300
|
+
/** 操作者IP */
|
|
6301
|
+
operatorIp: string;
|
|
6302
|
+
/** 创建时间戳 */
|
|
6303
|
+
createTime: number;
|
|
6304
|
+
/** 更新时间戳 */
|
|
6305
|
+
updateTime: number;
|
|
6306
|
+
/** 结束时间戳(可选) */
|
|
6307
|
+
endTime?: number;
|
|
6357
6308
|
}
|
|
6358
|
-
/**
|
|
6359
|
-
|
|
6309
|
+
/**
|
|
6310
|
+
* 创建任务参数接口
|
|
6311
|
+
*/
|
|
6312
|
+
interface CreateTaskParams {
|
|
6313
|
+
/** 任务类型 */
|
|
6314
|
+
type: TaskType;
|
|
6315
|
+
/** 任务名称 */
|
|
6316
|
+
name: string;
|
|
6317
|
+
/** 目标(插件名/包名/路径) */
|
|
6318
|
+
target: string;
|
|
6319
|
+
/** 操作者IP 无需指定,自动获取 */
|
|
6320
|
+
operatorIp: string;
|
|
6321
|
+
/** 创建时间戳 无需指定,自动获取 */
|
|
6322
|
+
createTime?: number;
|
|
6323
|
+
}
|
|
6324
|
+
/**
|
|
6325
|
+
* 任务回调函数接口
|
|
6326
|
+
*/
|
|
6327
|
+
interface TaskCallbacks {
|
|
6328
|
+
/** 状态变更回调 */
|
|
6329
|
+
onStatusChange?: (status: TaskStatus) => void;
|
|
6330
|
+
}
|
|
6331
|
+
/**
|
|
6332
|
+
* 添加任务返回结果接口
|
|
6333
|
+
*/
|
|
6334
|
+
interface AddTaskResult {
|
|
6335
|
+
/** 操作是否成功 */
|
|
6336
|
+
success: boolean;
|
|
6337
|
+
/** 任务ID(成功时返回) */
|
|
6338
|
+
taskId?: string;
|
|
6339
|
+
/** 错误信息(失败时返回) */
|
|
6340
|
+
message?: string;
|
|
6341
|
+
/** 取消订阅函数 */
|
|
6342
|
+
unsubscribe?: () => void;
|
|
6343
|
+
}
|
|
6344
|
+
/**
|
|
6345
|
+
* 任务查询过滤器接口
|
|
6346
|
+
*/
|
|
6347
|
+
interface TaskFilter {
|
|
6348
|
+
/** 任务类型过滤 */
|
|
6349
|
+
type?: TaskType;
|
|
6350
|
+
/** 任务状态过滤 */
|
|
6351
|
+
status?: TaskStatus | TaskStatus[];
|
|
6352
|
+
/** 任务名称过滤 */
|
|
6353
|
+
name?: string;
|
|
6354
|
+
/** 操作者IP过滤 */
|
|
6355
|
+
operatorIp?: string;
|
|
6356
|
+
/** 限制获取数量,返回最新的N条记录 */
|
|
6357
|
+
limit?: number;
|
|
6358
|
+
}
|
|
6359
|
+
/**
|
|
6360
|
+
* 前端请求插件安装参数接口
|
|
6361
|
+
*/
|
|
6362
|
+
type CreateTask = Omit<CreateTaskParams, 'createTime' | 'operatorIp'>;
|
|
6363
|
+
/**
|
|
6364
|
+
* 创建任务成功 返回任务ID
|
|
6365
|
+
*/
|
|
6366
|
+
type CreateTaskResult = {
|
|
6367
|
+
/** 操作成功 */
|
|
6368
|
+
success: true;
|
|
6369
|
+
/** 任务ID */
|
|
6370
|
+
taskId: string;
|
|
6371
|
+
/** 提示信息 */
|
|
6372
|
+
message: string;
|
|
6373
|
+
} | {
|
|
6374
|
+
/** 操作失败 */
|
|
6375
|
+
success: false;
|
|
6376
|
+
/** 错误信息 */
|
|
6377
|
+
message: string;
|
|
6378
|
+
};
|
|
6379
|
+
|
|
6380
|
+
type TaskDB = {
|
|
6381
|
+
db: Database;
|
|
6382
|
+
};
|
|
6383
|
+
/**
|
|
6384
|
+
* 创建新任务
|
|
6385
|
+
* @param taskDB - 数据库连接对象
|
|
6386
|
+
* @param taskParams - 任务参数
|
|
6387
|
+
* @returns - 返回任务ID
|
|
6388
|
+
*/
|
|
6389
|
+
declare const taskAdd: (taskDB: TaskDB, taskParams: CreateTaskParams) => Promise<string>;
|
|
6390
|
+
/**
|
|
6391
|
+
* 更新任务状态
|
|
6392
|
+
* @param taskDB - 数据库连接对象
|
|
6393
|
+
* @param taskId - 任务ID
|
|
6394
|
+
* @param status - 新状态
|
|
6395
|
+
* @returns - 操作是否成功
|
|
6396
|
+
*/
|
|
6397
|
+
declare const taskUpdateStatus: (taskDB: TaskDB, taskId: string, status: TaskStatus) => Promise<boolean>;
|
|
6398
|
+
/**
|
|
6399
|
+
* 更新任务日志
|
|
6400
|
+
* @param taskDB - 数据库连接对象
|
|
6401
|
+
* @param taskId - 任务ID
|
|
6402
|
+
* @param logs - 完整日志内容
|
|
6403
|
+
* @returns - 操作是否成功
|
|
6404
|
+
*/
|
|
6405
|
+
declare const taskUpdateLogs: (taskDB: TaskDB, taskId: string, logs: string) => Promise<boolean>;
|
|
6406
|
+
/**
|
|
6407
|
+
* 获取单个任务详情
|
|
6408
|
+
* @param taskDB - 数据库连接对象
|
|
6409
|
+
* @param taskId - 任务ID
|
|
6410
|
+
* @returns - 任务详情或null
|
|
6411
|
+
*/
|
|
6412
|
+
declare const taskGet: (taskDB: TaskDB, taskId: string) => Promise<TaskEntity | null>;
|
|
6413
|
+
/**
|
|
6414
|
+
* 获取任务列表
|
|
6415
|
+
* @param taskDB - 数据库连接对象
|
|
6416
|
+
* @param filter - 任务过滤条件
|
|
6417
|
+
* @returns - 任务列表
|
|
6418
|
+
*/
|
|
6419
|
+
declare const taskList: (taskDB: TaskDB, filter?: TaskFilter) => Promise<TaskEntity[]>;
|
|
6420
|
+
/**
|
|
6421
|
+
* 检查是否存在相同类型和目标的任务
|
|
6422
|
+
* @param taskDB - 数据库连接对象
|
|
6423
|
+
* @param type - 任务类型
|
|
6424
|
+
* @param target - 目标
|
|
6425
|
+
* @param statuses - 状态列表
|
|
6426
|
+
* @returns - 是否存在
|
|
6427
|
+
*/
|
|
6428
|
+
declare const taskExists: (taskDB: TaskDB, type: TaskType, target: string, statuses: TaskStatus[]) => Promise<boolean>;
|
|
6429
|
+
/**
|
|
6430
|
+
* 设置全局任务数据库实例
|
|
6431
|
+
* @param db - 任务数据库实例
|
|
6432
|
+
*/
|
|
6433
|
+
declare const setTaskDatabase: (db: TaskDB) => void;
|
|
6434
|
+
/**
|
|
6435
|
+
* 获取全局任务数据库实例
|
|
6436
|
+
* @returns TaskDB | null - 任务数据库实例或null
|
|
6437
|
+
*/
|
|
6438
|
+
declare const getTaskDatabase: () => TaskDB | null;
|
|
6439
|
+
/**
|
|
6440
|
+
* 更新任务状态
|
|
6441
|
+
* @param taskId - 任务ID
|
|
6442
|
+
* @param status - 新状态
|
|
6443
|
+
* @returns - 操作是否成功
|
|
6444
|
+
*/
|
|
6445
|
+
declare const updateTaskStatus: (taskId: string, status: TaskStatus) => Promise<boolean>;
|
|
6446
|
+
/**
|
|
6447
|
+
* 更新任务日志
|
|
6448
|
+
* @param taskId - 任务ID
|
|
6449
|
+
* @param logs - 完整日志内容
|
|
6450
|
+
* @returns - 操作是否成功
|
|
6451
|
+
*/
|
|
6452
|
+
declare const updateTaskLogs: (taskId: string, logs: string) => Promise<boolean>;
|
|
6453
|
+
/**
|
|
6454
|
+
* 扩展后的创建任务数据库函数
|
|
6455
|
+
*/
|
|
6456
|
+
declare const createTaskDatabase: (dbPath: string) => Promise<{
|
|
6457
|
+
/**
|
|
6458
|
+
* 添加任务
|
|
6459
|
+
* @param params - 任务参数
|
|
6460
|
+
* @param executor - 任务执行回调函数
|
|
6461
|
+
* @returns 任务ID
|
|
6462
|
+
*/
|
|
6463
|
+
add: (params: CreateTaskParams, executor?: TaskExecutor) => Promise<string>;
|
|
6464
|
+
/**
|
|
6465
|
+
* 获取任务详情
|
|
6466
|
+
* @param taskId - 任务ID
|
|
6467
|
+
* @returns 任务详情
|
|
6468
|
+
*/
|
|
6469
|
+
get: (taskId: string) => Promise<TaskEntity | null>;
|
|
6470
|
+
/**
|
|
6471
|
+
* 获取任务列表
|
|
6472
|
+
* @param filter - 过滤条件
|
|
6473
|
+
* @returns 任务列表
|
|
6474
|
+
*/
|
|
6475
|
+
list: (filter?: TaskFilter) => Promise<TaskEntity[]>;
|
|
6476
|
+
/**
|
|
6477
|
+
* 获取所有任务列表
|
|
6478
|
+
* @returns 所有任务列表
|
|
6479
|
+
*/
|
|
6480
|
+
all: () => Promise<TaskEntity[]>;
|
|
6481
|
+
/**
|
|
6482
|
+
* 获取任务日志
|
|
6483
|
+
* @param taskId - 任务ID
|
|
6484
|
+
* @returns 任务日志内容
|
|
6485
|
+
*/
|
|
6486
|
+
logs: (taskId: string) => Promise<string | null>;
|
|
6487
|
+
/**
|
|
6488
|
+
* 取消任务
|
|
6489
|
+
* @param taskId - 任务ID
|
|
6490
|
+
* @returns 是否成功
|
|
6491
|
+
*/
|
|
6492
|
+
cancel: (taskId: string) => Promise<boolean>;
|
|
6493
|
+
/**
|
|
6494
|
+
* 删除任务
|
|
6495
|
+
* @param taskId - 任务ID
|
|
6496
|
+
* @returns 是否成功
|
|
6497
|
+
*/
|
|
6498
|
+
delete: (taskId: string) => Promise<boolean>;
|
|
6499
|
+
/**
|
|
6500
|
+
* 检查是否存在相同类型和目标的任务
|
|
6501
|
+
* @param type - 任务类型
|
|
6502
|
+
* @param target - 目标
|
|
6503
|
+
* @param statuses - 状态列表
|
|
6504
|
+
* @returns 是否存在
|
|
6505
|
+
*/
|
|
6506
|
+
exists: (type: TaskType, target: string, statuses: TaskStatus[]) => Promise<boolean>;
|
|
6507
|
+
/**
|
|
6508
|
+
* 更新任务状态
|
|
6509
|
+
* @param taskId - 任务ID
|
|
6510
|
+
* @param status - 新状态
|
|
6511
|
+
* @returns 是否成功
|
|
6512
|
+
*/
|
|
6513
|
+
update: {
|
|
6514
|
+
status: (taskId: string, status: TaskStatus) => Promise<boolean>;
|
|
6515
|
+
/**
|
|
6516
|
+
* 更新任务日志
|
|
6517
|
+
* @param taskId - 任务ID
|
|
6518
|
+
* @param logs - 完整日志内容
|
|
6519
|
+
* @returns 是否成功
|
|
6520
|
+
*/
|
|
6521
|
+
logs: (taskId: string, logs: string) => Promise<boolean>;
|
|
6522
|
+
};
|
|
6523
|
+
/**
|
|
6524
|
+
* 运行任务
|
|
6525
|
+
* @param taskId - 任务ID
|
|
6526
|
+
* @param onLog - 日志回调函数
|
|
6527
|
+
* @param onStatusChange - 状态变更回调函数
|
|
6528
|
+
* @returns 是否成功
|
|
6529
|
+
*/
|
|
6530
|
+
run: (taskId: string, onLog?: (log: string) => void, onStatusChange?: (status: TaskStatus) => void) => Promise<boolean>;
|
|
6531
|
+
}>;
|
|
6532
|
+
|
|
6533
|
+
/**
|
|
6534
|
+
* 设置任务回调函数
|
|
6535
|
+
* @param taskId - 任务ID
|
|
6536
|
+
* @param executor - 任务执行函数
|
|
6537
|
+
*/
|
|
6538
|
+
declare const setTaskCallback: (taskId: string, executor: TaskExecutor) => void;
|
|
6539
|
+
/**
|
|
6540
|
+
* 获取任务回调函数
|
|
6541
|
+
* @param taskId - 任务ID
|
|
6542
|
+
* @returns 对应任务的执行函数,如果未找到返回undefined
|
|
6543
|
+
*/
|
|
6544
|
+
declare const getTaskCallback: (taskId: string) => TaskExecutor | undefined;
|
|
6545
|
+
/**
|
|
6546
|
+
* 删除任务回调函数
|
|
6547
|
+
* @param taskId - 任务ID
|
|
6548
|
+
* @returns 是否成功删除
|
|
6549
|
+
*/
|
|
6550
|
+
declare const removeTaskCallback: (taskId: string) => boolean;
|
|
6551
|
+
/**
|
|
6552
|
+
* 执行任务
|
|
6553
|
+
* @param task - 任务实体
|
|
6554
|
+
* @param emitLog - 日志回调
|
|
6555
|
+
* @param emitStatus - 状态回调
|
|
6556
|
+
* @returns 执行是否成功的Promise
|
|
6557
|
+
*/
|
|
6558
|
+
declare const executeTask: (task: TaskEntity, emitLog: (log: string) => void, emitStatus: (status: TaskStatus) => void) => Promise<boolean>;
|
|
6559
|
+
|
|
6560
|
+
/**
|
|
6561
|
+
* 任务系统对象
|
|
6562
|
+
*/
|
|
6563
|
+
declare let taskSystem: Awaited<ReturnType<typeof createTaskDatabase>>;
|
|
6564
|
+
/**
|
|
6565
|
+
* 初始化任务系统
|
|
6566
|
+
* @param dbPath - 数据库路径
|
|
6567
|
+
* @returns 任务系统实例
|
|
6568
|
+
*/
|
|
6569
|
+
declare const initTaskSystem: (dbPath: string) => Promise<{
|
|
6570
|
+
add: (params: CreateTaskParams, executor?: TaskExecutor) => Promise<string>;
|
|
6571
|
+
get: (taskId: string) => Promise<TaskEntity | null>;
|
|
6572
|
+
list: (filter?: TaskFilter) => Promise<TaskEntity[]>;
|
|
6573
|
+
all: () => Promise<TaskEntity[]>;
|
|
6574
|
+
logs: (taskId: string) => Promise<string | null>;
|
|
6575
|
+
cancel: (taskId: string) => Promise<boolean>;
|
|
6576
|
+
delete: (taskId: string) => Promise<boolean>;
|
|
6577
|
+
exists: (type: TaskType, target: string, statuses: TaskStatus[]) => Promise<boolean>;
|
|
6578
|
+
update: {
|
|
6579
|
+
status: (taskId: string, status: TaskStatus) => Promise<boolean>;
|
|
6580
|
+
logs: (taskId: string, logs: string) => Promise<boolean>;
|
|
6581
|
+
};
|
|
6582
|
+
run: (taskId: string, onLog?: (log: string) => void, onStatusChange?: (status: TaskStatus) => void) => Promise<boolean>;
|
|
6583
|
+
}>;
|
|
6584
|
+
|
|
6585
|
+
type Option = {
|
|
6586
|
+
label: string;
|
|
6587
|
+
value: string | number;
|
|
6588
|
+
disabled?: boolean;
|
|
6589
|
+
};
|
|
6590
|
+
/** 组件类型 */
|
|
6591
|
+
type FieldType = 'text' | 'number' | 'switch' | 'select' | 'object' | 'divider' | 'array' | 'objectArray' | 'colorPicker' | 'radio' | 'checkbox' | 'section' | 'title';
|
|
6592
|
+
/** 值类型 */
|
|
6593
|
+
type ValueType = 'string' | 'number' | 'boolean' | 'object';
|
|
6594
|
+
interface BaseField {
|
|
6595
|
+
/** 组件类型 */
|
|
6596
|
+
type: FieldType;
|
|
6597
|
+
/** 字段 */
|
|
6598
|
+
key: string;
|
|
6599
|
+
/** 显示文本 */
|
|
6600
|
+
label?: string;
|
|
6601
|
+
/** 是否必填 */
|
|
6602
|
+
required?: boolean;
|
|
6603
|
+
/** 描述 */
|
|
6604
|
+
description?: string;
|
|
6605
|
+
}
|
|
6606
|
+
/** 文本组件 */
|
|
6607
|
+
interface TextField extends BaseField {
|
|
6360
6608
|
type: 'text';
|
|
6361
6609
|
/** 默认值 */
|
|
6362
6610
|
defaultValue?: string;
|
|
@@ -6483,7 +6731,7 @@ type SaveResult = InputResult | SwitchResult | RadioResult | CheckboxResult | Ac
|
|
|
6483
6731
|
* - radio: 单选框
|
|
6484
6732
|
* - radio-group: 单选框组
|
|
6485
6733
|
*/
|
|
6486
|
-
type ComponentType = 'input' | 'switch' | 'divider' | 'accordion' | 'accordion-item' | 'accordion-pro' | 'checkbox' | 'checkbox-group' | 'radio' | 'radio-group' | 'input-group';
|
|
6734
|
+
type ComponentType = 'input' | 'switch' | 'divider' | 'accordion' | 'accordion-item' | 'accordion-pro' | 'checkbox' | 'checkbox-group' | 'radio' | 'radio-group' | 'input-group' | 'cron';
|
|
6487
6735
|
/** 组件通用属性 */
|
|
6488
6736
|
interface ComponentProps {
|
|
6489
6737
|
/** 唯一标识符 */
|
|
@@ -6670,6 +6918,76 @@ interface SwitchProps extends ComponentProps {
|
|
|
6670
6918
|
label?: string;
|
|
6671
6919
|
}
|
|
6672
6920
|
|
|
6921
|
+
/**
|
|
6922
|
+
* Cron表达式编辑器组件属性
|
|
6923
|
+
*/
|
|
6924
|
+
interface CronProps extends ComponentProps {
|
|
6925
|
+
componentType: 'cron';
|
|
6926
|
+
/** defaultValue */
|
|
6927
|
+
defaultValue?: string;
|
|
6928
|
+
}
|
|
6929
|
+
|
|
6930
|
+
/**
|
|
6931
|
+
* 单选框组
|
|
6932
|
+
*/
|
|
6933
|
+
interface RadioGroupProps extends ComponentProps {
|
|
6934
|
+
componentType: 'radio-group';
|
|
6935
|
+
/** 标签 */
|
|
6936
|
+
label?: string;
|
|
6937
|
+
/** 复选框的大小 */
|
|
6938
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6939
|
+
/** 复选框的颜色 */
|
|
6940
|
+
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
6941
|
+
/** 方向 */
|
|
6942
|
+
orientation?: 'horizontal' | 'vertical';
|
|
6943
|
+
/** 提交 HTML 表单时使用的 checkbox 元素的名称 */
|
|
6944
|
+
name?: string;
|
|
6945
|
+
/** 值 */
|
|
6946
|
+
value?: string;
|
|
6947
|
+
/** 默认值 */
|
|
6948
|
+
defaultValue?: string;
|
|
6949
|
+
/** 错误信息 */
|
|
6950
|
+
errorMessage?: string;
|
|
6951
|
+
/** 是否禁用 */
|
|
6952
|
+
isDisabled?: boolean;
|
|
6953
|
+
/** 是否必填 */
|
|
6954
|
+
isRequired?: boolean;
|
|
6955
|
+
/** 是否只读 */
|
|
6956
|
+
isReadOnly?: boolean;
|
|
6957
|
+
/** 是否无效 */
|
|
6958
|
+
isInvalid?: boolean;
|
|
6959
|
+
/** 禁用动画 */
|
|
6960
|
+
disableAnimation?: boolean;
|
|
6961
|
+
/** 单选框列表 */
|
|
6962
|
+
radio: Radio[];
|
|
6963
|
+
}
|
|
6964
|
+
/**
|
|
6965
|
+
* 单选框
|
|
6966
|
+
*/
|
|
6967
|
+
interface Radio extends ComponentProps {
|
|
6968
|
+
componentType: 'radio';
|
|
6969
|
+
/** 值 */
|
|
6970
|
+
value: string;
|
|
6971
|
+
/** 标签 */
|
|
6972
|
+
label?: string;
|
|
6973
|
+
/** 大小 */
|
|
6974
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6975
|
+
/** 颜色 */
|
|
6976
|
+
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
6977
|
+
/** 描述 */
|
|
6978
|
+
description?: string;
|
|
6979
|
+
/** 是否禁用 */
|
|
6980
|
+
isDisabled?: boolean;
|
|
6981
|
+
/** 是否必填 */
|
|
6982
|
+
isRequired?: boolean;
|
|
6983
|
+
/** 是否只读 */
|
|
6984
|
+
isReadOnly?: boolean;
|
|
6985
|
+
/** 是否无效 */
|
|
6986
|
+
isInvalid?: boolean;
|
|
6987
|
+
/** 禁用动画 */
|
|
6988
|
+
disableAnimation?: boolean;
|
|
6989
|
+
}
|
|
6990
|
+
|
|
6673
6991
|
/**
|
|
6674
6992
|
* 复选框组
|
|
6675
6993
|
*/
|
|
@@ -6750,70 +7068,9 @@ interface CheckboxProps extends ComponentProps {
|
|
|
6750
7068
|
disableAnimation?: boolean;
|
|
6751
7069
|
}
|
|
6752
7070
|
|
|
6753
|
-
/**
|
|
6754
|
-
* 单选框组
|
|
6755
|
-
*/
|
|
6756
|
-
interface RadioGroupProps extends ComponentProps {
|
|
6757
|
-
componentType: 'radio-group';
|
|
6758
|
-
/** 标签 */
|
|
6759
|
-
label?: string;
|
|
6760
|
-
/** 复选框的大小 */
|
|
6761
|
-
size?: 'sm' | 'md' | 'lg';
|
|
6762
|
-
/** 复选框的颜色 */
|
|
6763
|
-
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
6764
|
-
/** 方向 */
|
|
6765
|
-
orientation?: 'horizontal' | 'vertical';
|
|
6766
|
-
/** 提交 HTML 表单时使用的 checkbox 元素的名称 */
|
|
6767
|
-
name?: string;
|
|
6768
|
-
/** 值 */
|
|
6769
|
-
value?: string;
|
|
6770
|
-
/** 默认值 */
|
|
6771
|
-
defaultValue?: string;
|
|
6772
|
-
/** 错误信息 */
|
|
6773
|
-
errorMessage?: string;
|
|
6774
|
-
/** 是否禁用 */
|
|
6775
|
-
isDisabled?: boolean;
|
|
6776
|
-
/** 是否必填 */
|
|
6777
|
-
isRequired?: boolean;
|
|
6778
|
-
/** 是否只读 */
|
|
6779
|
-
isReadOnly?: boolean;
|
|
6780
|
-
/** 是否无效 */
|
|
6781
|
-
isInvalid?: boolean;
|
|
6782
|
-
/** 禁用动画 */
|
|
6783
|
-
disableAnimation?: boolean;
|
|
6784
|
-
/** 单选框列表 */
|
|
6785
|
-
radio: Radio[];
|
|
6786
|
-
}
|
|
6787
|
-
/**
|
|
6788
|
-
* 单选框
|
|
6789
|
-
*/
|
|
6790
|
-
interface Radio extends ComponentProps {
|
|
6791
|
-
componentType: 'radio';
|
|
6792
|
-
/** 值 */
|
|
6793
|
-
value: string;
|
|
6794
|
-
/** 标签 */
|
|
6795
|
-
label?: string;
|
|
6796
|
-
/** 大小 */
|
|
6797
|
-
size?: 'sm' | 'md' | 'lg';
|
|
6798
|
-
/** 颜色 */
|
|
6799
|
-
color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
6800
|
-
/** 描述 */
|
|
6801
|
-
description?: string;
|
|
6802
|
-
/** 是否禁用 */
|
|
6803
|
-
isDisabled?: boolean;
|
|
6804
|
-
/** 是否必填 */
|
|
6805
|
-
isRequired?: boolean;
|
|
6806
|
-
/** 是否只读 */
|
|
6807
|
-
isReadOnly?: boolean;
|
|
6808
|
-
/** 是否无效 */
|
|
6809
|
-
isInvalid?: boolean;
|
|
6810
|
-
/** 禁用动画 */
|
|
6811
|
-
disableAnimation?: boolean;
|
|
6812
|
-
}
|
|
6813
|
-
|
|
6814
7071
|
type Children = InputProps | SwitchProps | DividerProps | CheckboxProps | CheckboxGroupProps | RadioGroupProps | InputGroupProps;
|
|
6815
7072
|
/** 组件配置类型 */
|
|
6816
|
-
type ComponentConfig = InputProps | SwitchProps | RadioGroupProps | CheckboxGroupProps | AccordionProps | AccordionProProps | AccordionItemProps | DividerProps | InputGroupProps;
|
|
7073
|
+
type ComponentConfig = InputProps | SwitchProps | RadioGroupProps | CheckboxGroupProps | AccordionProps | AccordionProProps | AccordionItemProps | DividerProps | InputGroupProps | CronProps;
|
|
6817
7074
|
|
|
6818
7075
|
/**
|
|
6819
7076
|
* 手风琴(折叠面板) 类型
|
|
@@ -7479,23 +7736,6 @@ interface Base {
|
|
|
7479
7736
|
branch: string;
|
|
7480
7737
|
}[];
|
|
7481
7738
|
}
|
|
7482
|
-
/**
|
|
7483
|
-
* 单应用插件类型
|
|
7484
|
-
*/
|
|
7485
|
-
interface App extends Base {
|
|
7486
|
-
type: 'app';
|
|
7487
|
-
/** app文件直链 */
|
|
7488
|
-
files: string[];
|
|
7489
|
-
}
|
|
7490
|
-
type Plugins = Base | App;
|
|
7491
|
-
/**
|
|
7492
|
-
* 官方Api返回类型
|
|
7493
|
-
* https://registry.npmjs.com/@karinjs/plugins-list/latest
|
|
7494
|
-
* https://registry.npmmirror.com/@karinjs/plugins-list/latest
|
|
7495
|
-
*/
|
|
7496
|
-
interface OnlinePluginInfo {
|
|
7497
|
-
plugins: Plugins[];
|
|
7498
|
-
}
|
|
7499
7739
|
/**
|
|
7500
7740
|
* karin api返回类型
|
|
7501
7741
|
*/
|
|
@@ -7526,7 +7766,142 @@ interface PluginUpdateInfo extends PluginLists {
|
|
|
7526
7766
|
/** 更新数量 */
|
|
7527
7767
|
updateCount?: number;
|
|
7528
7768
|
}
|
|
7769
|
+
/**
|
|
7770
|
+
* 插件管理 获取插件列表Api响应
|
|
7771
|
+
*/
|
|
7772
|
+
interface PluginAdminListResponse {
|
|
7773
|
+
/** 插件ID `package.json中的名称` */
|
|
7774
|
+
id: string;
|
|
7775
|
+
/** 插件名称 `文件夹根目录名称` */
|
|
7776
|
+
name: string;
|
|
7777
|
+
/** 插件类型 */
|
|
7778
|
+
type: KarinPluginAppsType;
|
|
7779
|
+
/** 插件版本 App类型为空 */
|
|
7780
|
+
version: string;
|
|
7781
|
+
/** 插件最新版本短哈希 App类型为空 */
|
|
7782
|
+
latestHash: string;
|
|
7783
|
+
}
|
|
7784
|
+
/**
|
|
7785
|
+
* 插件市场响应 作者信息
|
|
7786
|
+
* @description 因为前端只方便展示一个作者 这里进行解耦
|
|
7787
|
+
*/
|
|
7788
|
+
interface PluginMarketAuthor {
|
|
7789
|
+
/** 名字 */
|
|
7790
|
+
name: string;
|
|
7791
|
+
/** 主页 */
|
|
7792
|
+
home: string;
|
|
7793
|
+
/** 头像 */
|
|
7794
|
+
avatar: string;
|
|
7795
|
+
}
|
|
7796
|
+
/**
|
|
7797
|
+
* 插件市场响应 本地插件基本参数
|
|
7798
|
+
*/
|
|
7799
|
+
interface PluginMarketLocalBase {
|
|
7800
|
+
/**
|
|
7801
|
+
* 是否已安装到本地
|
|
7802
|
+
*/
|
|
7803
|
+
installed: boolean;
|
|
7804
|
+
/**
|
|
7805
|
+
* 插件名称
|
|
7806
|
+
*/
|
|
7807
|
+
name: string;
|
|
7808
|
+
/**
|
|
7809
|
+
* 在本地的插件类型
|
|
7810
|
+
* @description 此项一般用于追踪插件配置 比如`npm`插件,在开发环境是`git`类型
|
|
7811
|
+
*/
|
|
7812
|
+
type: KarinPluginAppsType;
|
|
7813
|
+
/**
|
|
7814
|
+
* 插件当前版本
|
|
7815
|
+
* @description 如果是`app`类型 则返回空字符串
|
|
7816
|
+
*/
|
|
7817
|
+
version?: string;
|
|
7818
|
+
/**
|
|
7819
|
+
* 插件描述
|
|
7820
|
+
*/
|
|
7821
|
+
description?: string;
|
|
7822
|
+
/**
|
|
7823
|
+
* 插件主页
|
|
7824
|
+
*/
|
|
7825
|
+
home?: string;
|
|
7826
|
+
}
|
|
7827
|
+
/**
|
|
7828
|
+
* 插件市场请求参数
|
|
7829
|
+
*/
|
|
7830
|
+
interface PluginMarketRequest {
|
|
7831
|
+
/**
|
|
7832
|
+
* 是否强制刷新
|
|
7833
|
+
* @default false
|
|
7834
|
+
*/
|
|
7835
|
+
refresh?: boolean;
|
|
7836
|
+
}
|
|
7837
|
+
/**
|
|
7838
|
+
* 插件市场 type=market响应参数
|
|
7839
|
+
*/
|
|
7840
|
+
interface PluginMarketOptions {
|
|
7841
|
+
/**
|
|
7842
|
+
* - `market`: 插件市场
|
|
7843
|
+
* - `local`: 本地
|
|
7844
|
+
*/
|
|
7845
|
+
type: 'market';
|
|
7846
|
+
/**
|
|
7847
|
+
* 插件市场参数
|
|
7848
|
+
* @description api返回什么这里就是什么
|
|
7849
|
+
*/
|
|
7850
|
+
market: KarinPluginType;
|
|
7851
|
+
/**
|
|
7852
|
+
* 本地配置
|
|
7853
|
+
*/
|
|
7854
|
+
local: PluginMarketLocalBase;
|
|
7855
|
+
/**
|
|
7856
|
+
* 插件作者
|
|
7857
|
+
*/
|
|
7858
|
+
author: PluginMarketAuthor;
|
|
7859
|
+
}
|
|
7860
|
+
/**
|
|
7861
|
+
* 插件市场 type=local响应参数
|
|
7862
|
+
*/
|
|
7863
|
+
interface PluginMarketLocalOptions {
|
|
7864
|
+
/**
|
|
7865
|
+
* - `market`: 插件市场
|
|
7866
|
+
* - `local`: 本地
|
|
7867
|
+
*/
|
|
7868
|
+
type: 'local';
|
|
7869
|
+
/**
|
|
7870
|
+
* 本地配置
|
|
7871
|
+
*/
|
|
7872
|
+
local: PluginMarketLocalBase;
|
|
7873
|
+
/**
|
|
7874
|
+
* 插件作者
|
|
7875
|
+
*/
|
|
7876
|
+
author: PluginMarketAuthor;
|
|
7877
|
+
}
|
|
7878
|
+
/**
|
|
7879
|
+
* 插件市场响应参数
|
|
7880
|
+
*/
|
|
7881
|
+
type PluginMarketResponse = PluginMarketOptions | PluginMarketLocalOptions;
|
|
7529
7882
|
|
|
7883
|
+
/**
|
|
7884
|
+
* 插件作者
|
|
7885
|
+
*/
|
|
7886
|
+
interface Author {
|
|
7887
|
+
/** 名字 */
|
|
7888
|
+
name?: string;
|
|
7889
|
+
/** 主页 */
|
|
7890
|
+
home?: string;
|
|
7891
|
+
/** 头像 */
|
|
7892
|
+
avatar?: string;
|
|
7893
|
+
}
|
|
7894
|
+
/**
|
|
7895
|
+
* 插件图标
|
|
7896
|
+
*/
|
|
7897
|
+
interface Icon {
|
|
7898
|
+
/** 图标名称 */
|
|
7899
|
+
name?: string;
|
|
7900
|
+
/** 图标大小 */
|
|
7901
|
+
size?: number;
|
|
7902
|
+
/** 图标颜色 */
|
|
7903
|
+
color?: string;
|
|
7904
|
+
}
|
|
7530
7905
|
/** 本地插件列表 请自行添加[] */
|
|
7531
7906
|
interface LocalApiResponse {
|
|
7532
7907
|
/** 插件id */
|
|
@@ -7542,23 +7917,9 @@ interface LocalApiResponse {
|
|
|
7542
7917
|
/** 插件描述 可不填 会自动读取package.json中的version */
|
|
7543
7918
|
description?: string;
|
|
7544
7919
|
/** 插件作者 */
|
|
7545
|
-
author?:
|
|
7546
|
-
/** 名字 */
|
|
7547
|
-
name?: string;
|
|
7548
|
-
/** 主页 */
|
|
7549
|
-
home?: string;
|
|
7550
|
-
/** 头像 */
|
|
7551
|
-
avatar?: string;
|
|
7552
|
-
}[];
|
|
7920
|
+
author?: Author[];
|
|
7553
7921
|
/** 插件图标 前端优先展示 */
|
|
7554
|
-
icon?:
|
|
7555
|
-
/** 图标名称 */
|
|
7556
|
-
name?: string;
|
|
7557
|
-
/** 图标大小 */
|
|
7558
|
-
size?: number;
|
|
7559
|
-
/** 图标颜色 */
|
|
7560
|
-
color?: string;
|
|
7561
|
-
};
|
|
7922
|
+
icon?: Icon;
|
|
7562
7923
|
}
|
|
7563
7924
|
/** 获取配置请求参数 */
|
|
7564
7925
|
interface GetConfigRequest {
|
|
@@ -7574,6 +7935,41 @@ interface GetConfigResponse {
|
|
|
7574
7935
|
/** 插件信息 */
|
|
7575
7936
|
info: LocalApiResponse;
|
|
7576
7937
|
}
|
|
7938
|
+
/**
|
|
7939
|
+
* 保存配置返回值
|
|
7940
|
+
*/
|
|
7941
|
+
interface SaveConfigResponse {
|
|
7942
|
+
/** 是否成功 */
|
|
7943
|
+
success: boolean;
|
|
7944
|
+
/** 消息 */
|
|
7945
|
+
message: string;
|
|
7946
|
+
}
|
|
7947
|
+
/** webui配置 */
|
|
7948
|
+
interface DefineConfig<T = any> {
|
|
7949
|
+
/** 插件信息 */
|
|
7950
|
+
info: {
|
|
7951
|
+
/** 插件id */
|
|
7952
|
+
id: string;
|
|
7953
|
+
/** 插件名称 前端优先展示 */
|
|
7954
|
+
name?: string;
|
|
7955
|
+
/** 插件作者 */
|
|
7956
|
+
author?: Author | Author[];
|
|
7957
|
+
/** 插件图标 前端优先展示 */
|
|
7958
|
+
icon?: Icon;
|
|
7959
|
+
/** 插件版本 可不填 会自动读取package.json中的version */
|
|
7960
|
+
version?: string;
|
|
7961
|
+
/** 插件描述 可不填 会自动读取package.json中的version */
|
|
7962
|
+
description?: string;
|
|
7963
|
+
};
|
|
7964
|
+
/** 组件配置参数 */
|
|
7965
|
+
components: () => ComponentConfig[] | Promise<ComponentConfig[]>;
|
|
7966
|
+
/**
|
|
7967
|
+
* 保存配置
|
|
7968
|
+
* @param config 配置
|
|
7969
|
+
* @returns 保存结果
|
|
7970
|
+
*/
|
|
7971
|
+
save: (config: T) => SaveConfigResponse | Promise<SaveConfigResponse>;
|
|
7972
|
+
}
|
|
7577
7973
|
|
|
7578
7974
|
/** JWT验证基础接口 */
|
|
7579
7975
|
interface JwtVerifyBase {
|
|
@@ -7641,11 +8037,11 @@ interface CreatePty {
|
|
|
7641
8037
|
/**
|
|
7642
8038
|
* 终端实例
|
|
7643
8039
|
*/
|
|
7644
|
-
interface TerminalInstance {
|
|
8040
|
+
interface TerminalInstance<T = any> {
|
|
7645
8041
|
/** 终端名称 */
|
|
7646
8042
|
name: string;
|
|
7647
8043
|
/** 终端 */
|
|
7648
|
-
pty:
|
|
8044
|
+
pty: T;
|
|
7649
8045
|
/** 最后访问时间 */
|
|
7650
8046
|
lastAccess: number;
|
|
7651
8047
|
/** 连接的 websocket */
|
|
@@ -7656,6 +8052,69 @@ interface TerminalInstance {
|
|
|
7656
8052
|
buffer: string;
|
|
7657
8053
|
}
|
|
7658
8054
|
|
|
8055
|
+
/**
|
|
8056
|
+
* dependencies value类型
|
|
8057
|
+
*/
|
|
8058
|
+
interface PnpmDependency {
|
|
8059
|
+
/** 依赖来源 */
|
|
8060
|
+
from: string;
|
|
8061
|
+
/** 依赖版本 */
|
|
8062
|
+
version: string;
|
|
8063
|
+
/** 依赖路径 */
|
|
8064
|
+
path: string;
|
|
8065
|
+
/** 依赖下载地址 在link下不存在 例如 https://registry.npmjs.org/@types/node/-/node-18.19.84.tgz */
|
|
8066
|
+
resolved?: string;
|
|
8067
|
+
}
|
|
8068
|
+
/**
|
|
8069
|
+
* `pnpm list --depth=0 --json`命令返回类型
|
|
8070
|
+
*/
|
|
8071
|
+
interface PnpmDependencies {
|
|
8072
|
+
/** 项目名称 */
|
|
8073
|
+
name: string;
|
|
8074
|
+
/** 项目版本 */
|
|
8075
|
+
version: string;
|
|
8076
|
+
/** 项目路径 */
|
|
8077
|
+
path: string;
|
|
8078
|
+
/** 是否为私有项目 */
|
|
8079
|
+
private: boolean;
|
|
8080
|
+
/** 项目依赖 */
|
|
8081
|
+
dependencies: Record<string, PnpmDependency>;
|
|
8082
|
+
/** 项目开发依赖 */
|
|
8083
|
+
devDependencies: Record<string, PnpmDependency>;
|
|
8084
|
+
/** 未保存的依赖 */
|
|
8085
|
+
unsavedDependencies: Record<string, PnpmDependency>;
|
|
8086
|
+
}
|
|
8087
|
+
/**
|
|
8088
|
+
* dependenciesApi响应类型
|
|
8089
|
+
*/
|
|
8090
|
+
interface Dependency {
|
|
8091
|
+
/** 依赖名称 */
|
|
8092
|
+
name: string;
|
|
8093
|
+
/** 是否为karin插件 */
|
|
8094
|
+
isKarinPlugin: boolean;
|
|
8095
|
+
/** 当前版本 */
|
|
8096
|
+
current: string;
|
|
8097
|
+
/** 最新的15个版本 */
|
|
8098
|
+
latest: string[];
|
|
8099
|
+
/** package.json中的值 如果不存在会返回空字符串 */
|
|
8100
|
+
packageValue: string;
|
|
8101
|
+
/**
|
|
8102
|
+
* 依赖类型
|
|
8103
|
+
* - dependencies: 生产依赖
|
|
8104
|
+
* - devDependencies: 开发依赖
|
|
8105
|
+
* - unsavedDependencies: 未保存依赖
|
|
8106
|
+
* - peerDependencies: 对等依赖
|
|
8107
|
+
* - optionalDependencies: 可选依赖
|
|
8108
|
+
*/
|
|
8109
|
+
type: 'dependencies' | 'devDependencies' | 'unsavedDependencies' | 'peerDependencies' | 'optionalDependencies';
|
|
8110
|
+
/**
|
|
8111
|
+
* 依赖来源
|
|
8112
|
+
* - 此处最大的作用就是用于区分别名安装的依赖
|
|
8113
|
+
* - 例如`lodash@npm:@karinjs/lodash` 这里的值就会是`@karinjs/lodash`
|
|
8114
|
+
*/
|
|
8115
|
+
from: string;
|
|
8116
|
+
}
|
|
8117
|
+
|
|
7659
8118
|
/**
|
|
7660
8119
|
* 构建好友场景的`sender`
|
|
7661
8120
|
* @param userId 用户ID
|
|
@@ -7988,7 +8447,7 @@ interface PluginOptions<T extends keyof MessageEventMap> {
|
|
|
7988
8447
|
}
|
|
7989
8448
|
|
|
7990
8449
|
/** 消息事件插件类 */
|
|
7991
|
-
declare class Plugin<T extends keyof MessageEventMap = keyof MessageEventMap> {
|
|
8450
|
+
declare class Plugin$1<T extends keyof MessageEventMap = keyof MessageEventMap> {
|
|
7992
8451
|
/** 插件名称 */
|
|
7993
8452
|
name: PluginOptions<T>['name'];
|
|
7994
8453
|
/** 指令规则集 */
|
|
@@ -8077,7 +8536,7 @@ interface CommandClass<T extends keyof MessageEventMap = keyof MessageEventMap>
|
|
|
8077
8536
|
*/
|
|
8078
8537
|
authFailMsg: boolean | string;
|
|
8079
8538
|
/** 插件类 */
|
|
8080
|
-
Cls: new () => Plugin<T>;
|
|
8539
|
+
Cls: new () => Plugin$1<T>;
|
|
8081
8540
|
/** 打印触发插件日志方法 */
|
|
8082
8541
|
log: Log<true>;
|
|
8083
8542
|
}
|
|
@@ -8137,6 +8596,25 @@ interface Cache {
|
|
|
8137
8596
|
/** 静态资源目录 */
|
|
8138
8597
|
static: string[];
|
|
8139
8598
|
}
|
|
8599
|
+
/**
|
|
8600
|
+
* 已加载插件缓存信息列表
|
|
8601
|
+
*/
|
|
8602
|
+
interface LoadedPluginCacheList {
|
|
8603
|
+
/** 插件名称 */
|
|
8604
|
+
name: string;
|
|
8605
|
+
/** 插件文件列表 */
|
|
8606
|
+
files: {
|
|
8607
|
+
/** 文件名称 */
|
|
8608
|
+
fileName: string;
|
|
8609
|
+
/** 该文件下所有的command函数名称 */
|
|
8610
|
+
command: {
|
|
8611
|
+
/** 此函数的插件名称 */
|
|
8612
|
+
pluginName: string;
|
|
8613
|
+
/** 此函数的导出名称 */
|
|
8614
|
+
method: string;
|
|
8615
|
+
}[];
|
|
8616
|
+
}[];
|
|
8617
|
+
}
|
|
8140
8618
|
|
|
8141
8619
|
/** 缓存 */
|
|
8142
8620
|
declare const cache: Cache;
|
|
@@ -8208,8 +8686,25 @@ type ForwardMessageCallback = BaseForwardCallback<void>;
|
|
|
8208
8686
|
* 转发消息钩子触发类型 这个由karin内部调用
|
|
8209
8687
|
*/
|
|
8210
8688
|
type HookEmitForward = BaseForwardCallback<boolean>;
|
|
8689
|
+
/**
|
|
8690
|
+
* 消息发送后回调类型 这个由开发者调用
|
|
8691
|
+
* @param contact 联系人
|
|
8692
|
+
* @param elements 消息元素
|
|
8693
|
+
* @param result 发送消息结果
|
|
8694
|
+
* @param next 继续执行下一个钩子的函数
|
|
8695
|
+
*/
|
|
8696
|
+
type AfterMessageCallback = (contact: Contact, elements: Array<Elements>, result: any, next: HookNext) => void | Promise<void>;
|
|
8697
|
+
/**
|
|
8698
|
+
* 转发消息发送后回调类型 这个由开发者调用
|
|
8699
|
+
* @param contact 联系人
|
|
8700
|
+
* @param elements 消息元素
|
|
8701
|
+
* @param result 发送转发消息结果
|
|
8702
|
+
* @param options 转发选项
|
|
8703
|
+
* @param next 继续执行下一个钩子的函数
|
|
8704
|
+
*/
|
|
8705
|
+
type AfterForwardMessageCallback = (contact: Contact, elements: Array<NodeElement>, result: any, options: ForwardOptions | undefined, next: HookNext) => void | Promise<void>;
|
|
8211
8706
|
/** 发送消息钩子项 */
|
|
8212
|
-
interface SendMsgHookItem<T extends NormalMessageCallback | ForwardMessageCallback> {
|
|
8707
|
+
interface SendMsgHookItem<T extends NormalMessageCallback | ForwardMessageCallback | AfterMessageCallback | AfterForwardMessageCallback> {
|
|
8213
8708
|
/** 钩子ID */
|
|
8214
8709
|
id: number;
|
|
8215
8710
|
/** 钩子优先级 */
|
|
@@ -8227,13 +8722,16 @@ interface HookCache {
|
|
|
8227
8722
|
guild: MessageHookItem<GuildMessage>[];
|
|
8228
8723
|
direct: MessageHookItem<DirectMessage>[];
|
|
8229
8724
|
groupTemp: MessageHookItem<GroupTempMessage>[];
|
|
8230
|
-
};
|
|
8231
|
-
/** 发送消息事件钩子 */
|
|
8725
|
+
}; /** 发送消息事件钩子 */
|
|
8232
8726
|
sendMsg: {
|
|
8233
8727
|
/** 普通消息 */
|
|
8234
8728
|
message: SendMsgHookItem<NormalMessageCallback>[];
|
|
8235
8729
|
/** 转发消息 */
|
|
8236
8730
|
forward: SendMsgHookItem<ForwardMessageCallback>[];
|
|
8731
|
+
/** 发送消息后钩子 */
|
|
8732
|
+
afterMessage: SendMsgHookItem<AfterMessageCallback>[];
|
|
8733
|
+
/** 发送转发消息后钩子 */
|
|
8734
|
+
afterForward: SendMsgHookItem<AfterForwardMessageCallback>[];
|
|
8237
8735
|
};
|
|
8238
8736
|
/** 未找到匹配插件钩子 */
|
|
8239
8737
|
empty: {
|
|
@@ -8264,16 +8762,327 @@ interface HookCache {
|
|
|
8264
8762
|
request: EventCallHookItem<Request, typeof cache.accept[number]>[];
|
|
8265
8763
|
};
|
|
8266
8764
|
}
|
|
8267
|
-
/** 通用事件钩子回调函数 */
|
|
8268
|
-
type GeneralHookCallback<T> = (event: T, next: HookNext) => void | Promise<void>;
|
|
8269
|
-
/** 通用事件钩子项 */
|
|
8270
|
-
interface GeneralHookItem<T> {
|
|
8271
|
-
/** 钩子ID */
|
|
8272
|
-
id: number;
|
|
8273
|
-
/** 钩子优先级 */
|
|
8274
|
-
priority: number;
|
|
8275
|
-
/** 钩子回调函数 */
|
|
8276
|
-
callback: GeneralHookCallback<T>;
|
|
8765
|
+
/** 通用事件钩子回调函数 */
|
|
8766
|
+
type GeneralHookCallback<T> = (event: T, next: HookNext) => void | Promise<void>;
|
|
8767
|
+
/** 通用事件钩子项 */
|
|
8768
|
+
interface GeneralHookItem<T> {
|
|
8769
|
+
/** 钩子ID */
|
|
8770
|
+
id: number;
|
|
8771
|
+
/** 钩子优先级 */
|
|
8772
|
+
priority: number;
|
|
8773
|
+
/** 钩子回调函数 */
|
|
8774
|
+
callback: GeneralHookCallback<T>;
|
|
8775
|
+
}
|
|
8776
|
+
|
|
8777
|
+
/**
|
|
8778
|
+
* 下载文件请求参数
|
|
8779
|
+
*/
|
|
8780
|
+
interface DownloadFilesOptions<T extends boolean = false> extends AxiosRequestConfig {
|
|
8781
|
+
/** 是否返回布尔值 */
|
|
8782
|
+
returnBoolean?: T;
|
|
8783
|
+
}
|
|
8784
|
+
/**
|
|
8785
|
+
* 下载文件成功返回值
|
|
8786
|
+
*/
|
|
8787
|
+
interface DownloadFileSuccessResult {
|
|
8788
|
+
success: true;
|
|
8789
|
+
data: AxiosResponse<any>;
|
|
8790
|
+
}
|
|
8791
|
+
/**
|
|
8792
|
+
* 下载文件失败返回值
|
|
8793
|
+
*/
|
|
8794
|
+
interface DownloadFileErrorResult {
|
|
8795
|
+
success: false;
|
|
8796
|
+
data: unknown;
|
|
8797
|
+
}
|
|
8798
|
+
/**
|
|
8799
|
+
* 下载文件返回值
|
|
8800
|
+
*/
|
|
8801
|
+
type DownloadFileResult<T extends boolean = false> = T extends true ? boolean : DownloadFileSuccessResult | DownloadFileErrorResult;
|
|
8802
|
+
|
|
8803
|
+
/** .npmrc文件列表接口响应 */
|
|
8804
|
+
interface NpmrcFileResponse {
|
|
8805
|
+
path: string;
|
|
8806
|
+
type: 'global' | 'project' | 'pnpm';
|
|
8807
|
+
description: string;
|
|
8808
|
+
}
|
|
8809
|
+
/** npm registry、proxy、https-proxy配置 */
|
|
8810
|
+
interface NpmBaseConfigResponse {
|
|
8811
|
+
registry: string;
|
|
8812
|
+
proxy: string;
|
|
8813
|
+
'https-proxy': string;
|
|
8814
|
+
}
|
|
8815
|
+
|
|
8816
|
+
/**
|
|
8817
|
+
* 测试网络请求结果详细信息接口
|
|
8818
|
+
*/
|
|
8819
|
+
interface TestNetworkRequestDetail {
|
|
8820
|
+
/**
|
|
8821
|
+
* 请求URL
|
|
8822
|
+
*/
|
|
8823
|
+
url: string;
|
|
8824
|
+
/**
|
|
8825
|
+
* 请求是否成功
|
|
8826
|
+
*/
|
|
8827
|
+
success: boolean;
|
|
8828
|
+
/**
|
|
8829
|
+
* 错误信息(如果请求失败)
|
|
8830
|
+
*/
|
|
8831
|
+
error: unknown;
|
|
8832
|
+
/**
|
|
8833
|
+
* 请求耗时(毫秒)
|
|
8834
|
+
*/
|
|
8835
|
+
duration: number;
|
|
8836
|
+
}
|
|
8837
|
+
/**
|
|
8838
|
+
* 扩展的Axios请求配置
|
|
8839
|
+
* @template D - 请求数据类型
|
|
8840
|
+
* @template T - 是否返回详细信息
|
|
8841
|
+
* @template R - 是否为竞速模式
|
|
8842
|
+
*/
|
|
8843
|
+
interface ExtendedAxiosRequestConfig<D = any, T extends boolean = false, R extends boolean = false> extends AxiosRequestConfig<D> {
|
|
8844
|
+
/**
|
|
8845
|
+
* 成功状态码列表,默认为 [200]
|
|
8846
|
+
*/
|
|
8847
|
+
successCodes?: number[];
|
|
8848
|
+
/**
|
|
8849
|
+
* 是否返回详细信息,默认为 false
|
|
8850
|
+
*/
|
|
8851
|
+
detailed?: T;
|
|
8852
|
+
/**
|
|
8853
|
+
* race模式 必须条件为请求成功 不符合的状态码将会被忽略
|
|
8854
|
+
*/
|
|
8855
|
+
isRace?: R;
|
|
8856
|
+
}
|
|
8857
|
+
/**
|
|
8858
|
+
* 竞速模式返回结果类型 - 返回单个值或null
|
|
8859
|
+
* @template T - 是否返回详细信息
|
|
8860
|
+
*/
|
|
8861
|
+
type RaceResult<T extends boolean = false> = T extends true ? TestNetworkRequestDetail | null : string | null;
|
|
8862
|
+
/**
|
|
8863
|
+
* 标准模式返回结果类型 - 返回数组
|
|
8864
|
+
* @template T - 是否返回详细信息
|
|
8865
|
+
*/
|
|
8866
|
+
type StandardResult<T extends boolean = false> = T extends true ? TestNetworkRequestDetail[] : string[];
|
|
8867
|
+
/**
|
|
8868
|
+
* pingRequest函数的返回类型
|
|
8869
|
+
* @template T - 是否返回详细信息
|
|
8870
|
+
* @template R - 是否为竞速模式
|
|
8871
|
+
*/
|
|
8872
|
+
type PingRequestResult<T extends boolean = false, R extends boolean = false> = R extends true ? RaceResult<T> : StandardResult<T>;
|
|
8873
|
+
interface GithubConfig {
|
|
8874
|
+
proxy: string;
|
|
8875
|
+
/**
|
|
8876
|
+
* 是否支持克隆
|
|
8877
|
+
*/
|
|
8878
|
+
isClone: boolean;
|
|
8879
|
+
/**
|
|
8880
|
+
* 是否支持raw
|
|
8881
|
+
*/
|
|
8882
|
+
isRaw: boolean;
|
|
8883
|
+
/**
|
|
8884
|
+
* 获取raw地址
|
|
8885
|
+
* @param url - github地址
|
|
8886
|
+
* @returns 返回raw地址
|
|
8887
|
+
*/
|
|
8888
|
+
raw: (url: string) => string;
|
|
8889
|
+
/**
|
|
8890
|
+
* 克隆地址
|
|
8891
|
+
* @param url - github地址
|
|
8892
|
+
* @returns 返回克隆地址
|
|
8893
|
+
*/
|
|
8894
|
+
clone: (url: string) => string;
|
|
8895
|
+
}
|
|
8896
|
+
|
|
8897
|
+
/** 依赖管理基类 */
|
|
8898
|
+
interface DependenciesManageBase {
|
|
8899
|
+
/** 操作类型:升级、删除、添加 */
|
|
8900
|
+
type: 'upgrade' | 'remove' | 'add';
|
|
8901
|
+
}
|
|
8902
|
+
/**
|
|
8903
|
+
* 新增依赖请求参数
|
|
8904
|
+
* @description 新增依赖请求参数
|
|
8905
|
+
*/
|
|
8906
|
+
interface AddDependenciesParams extends DependenciesManageBase {
|
|
8907
|
+
type: 'add';
|
|
8908
|
+
data: {
|
|
8909
|
+
/** 依赖名称 */
|
|
8910
|
+
name: string;
|
|
8911
|
+
/** 安装到哪里 */
|
|
8912
|
+
location: 'dependencies' | 'devDependencies' | 'optionalDependencies';
|
|
8913
|
+
/** 依赖版本 */
|
|
8914
|
+
version?: string;
|
|
8915
|
+
};
|
|
8916
|
+
}
|
|
8917
|
+
/** 升级依赖请求参数 */
|
|
8918
|
+
interface UpgradeDependenciesParams extends DependenciesManageBase {
|
|
8919
|
+
type: 'upgrade';
|
|
8920
|
+
/** 是否更新所有依赖 */
|
|
8921
|
+
isAll: boolean;
|
|
8922
|
+
/** 依赖列表 */
|
|
8923
|
+
data: Array<{
|
|
8924
|
+
/** 依赖名称 */
|
|
8925
|
+
name: string;
|
|
8926
|
+
/** 依赖版本 */
|
|
8927
|
+
version?: string;
|
|
8928
|
+
}>;
|
|
8929
|
+
}
|
|
8930
|
+
/** 删除依赖请求参数 */
|
|
8931
|
+
interface RemoveDependenciesParams extends DependenciesManageBase {
|
|
8932
|
+
type: 'remove';
|
|
8933
|
+
/** 依赖列表 */
|
|
8934
|
+
data: string[];
|
|
8935
|
+
}
|
|
8936
|
+
/**
|
|
8937
|
+
* 依赖管理请求参数接口
|
|
8938
|
+
*/
|
|
8939
|
+
type DependenciesManage = UpgradeDependenciesParams | RemoveDependenciesParams | AddDependenciesParams;
|
|
8940
|
+
|
|
8941
|
+
/** 插件类型 */
|
|
8942
|
+
type PluginType = 'npm' | 'git' | 'app';
|
|
8943
|
+
/** 插件管理任务参数 */
|
|
8944
|
+
type PluginAdminBase = Omit<CreateTaskParams, 'operatorIp' | 'createTime' | 'target'>;
|
|
8945
|
+
/**
|
|
8946
|
+
* 插件安装任务参数
|
|
8947
|
+
*/
|
|
8948
|
+
interface PluginAdminInstallBase extends PluginAdminBase {
|
|
8949
|
+
type: 'install';
|
|
8950
|
+
/** 插件名称 */
|
|
8951
|
+
target: string;
|
|
8952
|
+
/** 插件类型 */
|
|
8953
|
+
source: 'market' | 'custom';
|
|
8954
|
+
}
|
|
8955
|
+
/**
|
|
8956
|
+
* 自定义安装插件任务参数基类
|
|
8957
|
+
*/
|
|
8958
|
+
interface PluginAdminCustomInstallBase extends PluginAdminInstallBase {
|
|
8959
|
+
source: 'custom';
|
|
8960
|
+
/** 插件类型 */
|
|
8961
|
+
pluginType: PluginType;
|
|
8962
|
+
}
|
|
8963
|
+
/**
|
|
8964
|
+
* 自定义安装npm包任务参数
|
|
8965
|
+
*/
|
|
8966
|
+
interface PluginAdminCustomInstallNpm extends PluginAdminCustomInstallBase {
|
|
8967
|
+
pluginType: 'npm';
|
|
8968
|
+
/** 版本 */
|
|
8969
|
+
version?: string;
|
|
8970
|
+
/** 指定registry源 */
|
|
8971
|
+
registry?: string;
|
|
8972
|
+
}
|
|
8973
|
+
/**
|
|
8974
|
+
* 自定义安装git仓库任务参数
|
|
8975
|
+
*/
|
|
8976
|
+
interface PluginAdminCustomInstallGit extends PluginAdminCustomInstallBase {
|
|
8977
|
+
pluginType: 'git';
|
|
8978
|
+
/** 仓库地址 */
|
|
8979
|
+
repo: string;
|
|
8980
|
+
/** 分支 */
|
|
8981
|
+
branch?: string;
|
|
8982
|
+
/** 自定义插件名称 不指定则使用git仓库名称 */
|
|
8983
|
+
target: string;
|
|
8984
|
+
}
|
|
8985
|
+
/**
|
|
8986
|
+
* 自定义安装app任务参数
|
|
8987
|
+
*/
|
|
8988
|
+
interface PluginAdminCustomInstallApp extends PluginAdminCustomInstallBase {
|
|
8989
|
+
pluginType: 'app';
|
|
8990
|
+
/** js文件直链 */
|
|
8991
|
+
jsUrl: string;
|
|
8992
|
+
/** 下载后显示的名称 不指定则使用jsUrl的文件名 无需指定后缀 */
|
|
8993
|
+
target: string;
|
|
8994
|
+
}
|
|
8995
|
+
/**
|
|
8996
|
+
* 插件卸载任务参数
|
|
8997
|
+
*/
|
|
8998
|
+
interface PluginAdminUninstall extends PluginAdminBase {
|
|
8999
|
+
type: 'uninstall';
|
|
9000
|
+
/** 卸载目标 */
|
|
9001
|
+
target: {
|
|
9002
|
+
/** 插件类型 */
|
|
9003
|
+
type: PluginType;
|
|
9004
|
+
/** 插件名称 在app类型下是`插件包名称:ts、js文件名称` 包含后缀 */
|
|
9005
|
+
name: string;
|
|
9006
|
+
}[];
|
|
9007
|
+
}
|
|
9008
|
+
/**
|
|
9009
|
+
* 插件更新任务参数
|
|
9010
|
+
*/
|
|
9011
|
+
interface PluginAdminUpdate extends PluginAdminBase {
|
|
9012
|
+
type: 'update';
|
|
9013
|
+
/** 是否更新所有插件 */
|
|
9014
|
+
isAll?: {
|
|
9015
|
+
/** 是否更新全部npm插件 */
|
|
9016
|
+
npm: boolean;
|
|
9017
|
+
/** 是否更新全部git插件 */
|
|
9018
|
+
git: boolean;
|
|
9019
|
+
/** git插件是否强制更新 */
|
|
9020
|
+
force: boolean;
|
|
9021
|
+
};
|
|
9022
|
+
/** 更新目标 */
|
|
9023
|
+
target: {
|
|
9024
|
+
/** 插件类型 */
|
|
9025
|
+
type: Omit<PluginType, 'app'>;
|
|
9026
|
+
/** 插件名称 */
|
|
9027
|
+
name: string;
|
|
9028
|
+
/** 更新版本 默认为latest 仅在npm下有效 */
|
|
9029
|
+
version?: string;
|
|
9030
|
+
/** 是否强制更新 仅在git下有效 */
|
|
9031
|
+
force?: boolean;
|
|
9032
|
+
}[];
|
|
9033
|
+
}
|
|
9034
|
+
/**
|
|
9035
|
+
* 插件市场
|
|
9036
|
+
*/
|
|
9037
|
+
interface PluginAdminMarketInstallBaase extends PluginAdminInstallBase {
|
|
9038
|
+
type: 'install';
|
|
9039
|
+
/** 插件类型 */
|
|
9040
|
+
source: 'market';
|
|
9041
|
+
}
|
|
9042
|
+
/**
|
|
9043
|
+
* app类型插件市场安装任务参数
|
|
9044
|
+
*/
|
|
9045
|
+
interface PluginAdminMarketInstallApp extends PluginAdminMarketInstallBaase {
|
|
9046
|
+
pluginType: 'app';
|
|
9047
|
+
/** 需要安装的url列表 */
|
|
9048
|
+
urls: string[];
|
|
9049
|
+
}
|
|
9050
|
+
/**
|
|
9051
|
+
* npm类型插件市场安装任务参数
|
|
9052
|
+
*/
|
|
9053
|
+
interface PluginAdminMarketInstallNpm extends PluginAdminMarketInstallBaase {
|
|
9054
|
+
pluginType: 'npm';
|
|
9055
|
+
}
|
|
9056
|
+
/**
|
|
9057
|
+
* git类型插件市场安装任务参数
|
|
9058
|
+
*/
|
|
9059
|
+
interface PluginAdminMarketInstallGit extends PluginAdminMarketInstallBaase {
|
|
9060
|
+
pluginType: 'git';
|
|
9061
|
+
}
|
|
9062
|
+
/**
|
|
9063
|
+
* 插件市场安装任务参数
|
|
9064
|
+
*/
|
|
9065
|
+
type PluginAdminMarketInstall = PluginAdminMarketInstallApp | PluginAdminMarketInstallNpm | PluginAdminMarketInstallGit;
|
|
9066
|
+
/** 自定义安装任务参数 */
|
|
9067
|
+
type PluginAdminCustomInstall = PluginAdminCustomInstallNpm | PluginAdminCustomInstallGit | PluginAdminCustomInstallApp;
|
|
9068
|
+
/**
|
|
9069
|
+
* 前端插件安装任务参数
|
|
9070
|
+
*/
|
|
9071
|
+
type PluginAdminInstall = PluginAdminMarketInstall | PluginAdminCustomInstall;
|
|
9072
|
+
/**
|
|
9073
|
+
* 插件管理路由参数
|
|
9074
|
+
*/
|
|
9075
|
+
type PluginAdminParams = PluginAdminInstall | PluginAdminUninstall | PluginAdminUpdate;
|
|
9076
|
+
/**
|
|
9077
|
+
* 插件管理返回值
|
|
9078
|
+
*/
|
|
9079
|
+
interface PluginAdminResult {
|
|
9080
|
+
/** 是否成功 */
|
|
9081
|
+
success: boolean;
|
|
9082
|
+
/** 操作日志 */
|
|
9083
|
+
message: string;
|
|
9084
|
+
/** 任务ID */
|
|
9085
|
+
taskId?: string;
|
|
8277
9086
|
}
|
|
8278
9087
|
|
|
8279
9088
|
/**
|
|
@@ -8302,6 +9111,8 @@ declare const isPlugin: (name: string) => boolean;
|
|
|
8302
9111
|
|
|
8303
9112
|
/** 插件类型 */
|
|
8304
9113
|
type Apps = 'app' | 'git' | 'npm';
|
|
9114
|
+
/** karin插件类型 */
|
|
9115
|
+
type KarinPluginAppsType = Apps;
|
|
8305
9116
|
/** 获取插件的方式 */
|
|
8306
9117
|
type GetPluginType = 'app' | 'git' | 'npm' | 'all';
|
|
8307
9118
|
/**
|
|
@@ -8358,8 +9169,22 @@ interface PkgInfo {
|
|
|
8358
9169
|
*/
|
|
8359
9170
|
get pkgData(): PkgData;
|
|
8360
9171
|
}
|
|
8361
|
-
/**
|
|
9172
|
+
/** 获取本地插件Api请求参数 */
|
|
9173
|
+
type GetPluginLocalOptions<T extends boolean, R extends boolean> = {
|
|
9174
|
+
/** 是否获取详细信息 */
|
|
9175
|
+
info?: T;
|
|
9176
|
+
/** 是否强制获取 忽略缓存 */
|
|
9177
|
+
force?: boolean;
|
|
9178
|
+
/** 在获取全部插件时多返回一个类型 */
|
|
9179
|
+
returnType?: R;
|
|
9180
|
+
};
|
|
9181
|
+
/** 获取插件Apii返回 */
|
|
8362
9182
|
type GetPluginReturn<T extends boolean> = T extends true ? PkgInfo[] : string[];
|
|
9183
|
+
/** 获取本地插件Api返回 */
|
|
9184
|
+
type GetPluginLocalReturn<T extends boolean, R extends boolean> = T extends true ? PkgInfo[] : R extends true ? {
|
|
9185
|
+
name: string;
|
|
9186
|
+
type: Apps;
|
|
9187
|
+
}[] : string[];
|
|
8363
9188
|
/** 单个方法基本属性 */
|
|
8364
9189
|
interface PluginFile<T extends PluginFncTypes> {
|
|
8365
9190
|
/** app绝对路径 */
|
|
@@ -8395,7 +9220,7 @@ interface PluginFile<T extends PluginFncTypes> {
|
|
|
8395
9220
|
* import karin from 'node-karin'
|
|
8396
9221
|
*
|
|
8397
9222
|
* export const fnc = karin.command('你好', 'hello', { name: 'demo插件' })
|
|
8398
|
-
* // 此时`name`为`demo插件` 如果没有,则是`this.
|
|
9223
|
+
* // 此时`name`为`demo插件` 如果没有,则是`this.method`
|
|
8399
9224
|
* ```
|
|
8400
9225
|
*/
|
|
8401
9226
|
name: string;
|
|
@@ -8485,6 +9310,11 @@ interface PkgData {
|
|
|
8485
9310
|
[key: string]: any;
|
|
8486
9311
|
}
|
|
8487
9312
|
|
|
9313
|
+
/**
|
|
9314
|
+
* 加载插件缓存类型
|
|
9315
|
+
*/
|
|
9316
|
+
type LoadPluginResult = Record<string, AllPluginMethods | AllPluginMethods[]>;
|
|
9317
|
+
|
|
8488
9318
|
/**
|
|
8489
9319
|
* 命令选项
|
|
8490
9320
|
*/
|
|
@@ -8986,11 +9816,10 @@ declare const fnc_handler: typeof handler;
|
|
|
8986
9816
|
declare const fnc_registerBot: typeof registerBot;
|
|
8987
9817
|
declare const fnc_sendAdmin: typeof sendAdmin;
|
|
8988
9818
|
declare const fnc_sendMaster: typeof sendMaster;
|
|
8989
|
-
declare const fnc_sendMsg: typeof sendMsg;
|
|
8990
9819
|
declare const fnc_task: typeof task;
|
|
8991
9820
|
declare const fnc_unregisterBot: typeof unregisterBot;
|
|
8992
9821
|
declare namespace fnc {
|
|
8993
|
-
export { type fnc_AcceptOptions as AcceptOptions, type fnc_ButtonOptions as ButtonOptions, type fnc_CommandOptions as CommandOptions, type fnc_CommandType as CommandType, type fnc_GetBot as GetBot, type fnc_HandlerOptions as HandlerOptions, type Options$1 as Options, type fnc_Renders as Renders, type fnc_StrCommandOptions as StrCommandOptions, type fnc_TaskOptions as TaskOptions, type fnc_UnregisterBot as UnregisterBot, fnc_accept as accept, button$1 as button, fnc_command as command, fnc_ctx as ctx, fnc_getAllBot as getAllBot, fnc_getAllBotID as getAllBotID, fnc_getAllBotList as getAllBotList, fnc_getBot as getBot, fnc_getBotCount as getBotCount, fnc_handler as handler, fnc_registerBot as registerBot, render$2 as render, fnc_sendAdmin as sendAdmin, fnc_sendMaster as sendMaster,
|
|
9822
|
+
export { type fnc_AcceptOptions as AcceptOptions, type fnc_ButtonOptions as ButtonOptions, type fnc_CommandOptions as CommandOptions, type fnc_CommandType as CommandType, type fnc_GetBot as GetBot, type fnc_HandlerOptions as HandlerOptions, type Options$1 as Options, type fnc_Renders as Renders, type fnc_StrCommandOptions as StrCommandOptions, type fnc_TaskOptions as TaskOptions, type fnc_UnregisterBot as UnregisterBot, fnc_accept as accept, button$1 as button, fnc_command as command, fnc_ctx as ctx, fnc_getAllBot as getAllBot, fnc_getAllBotID as getAllBotID, fnc_getAllBotList as getAllBotList, fnc_getBot as getBot, fnc_getBotCount as getBotCount, fnc_handler as handler, fnc_registerBot as registerBot, render$2 as render, fnc_sendAdmin as sendAdmin, fnc_sendMaster as sendMaster, sendMsg$1 as sendMsg, fnc_task as task, fnc_unregisterBot as unregisterBot };
|
|
8994
9823
|
}
|
|
8995
9824
|
|
|
8996
9825
|
declare const karin: {
|
|
@@ -9006,7 +9835,7 @@ declare const karin: {
|
|
|
9006
9835
|
contactGroupTemp(peer: string, subPeer: string, name?: string): Contact<"groupTemp">;
|
|
9007
9836
|
friendSender(userId: number | string, nick: string, sex?: FriendSender["sex"], age?: number, uid?: string, uin?: number): FriendSender;
|
|
9008
9837
|
groupSender(userId: number | string, role: GroupSender["role"], nick?: string, sex?: GroupSender["sex"], age?: number, card?: string, area?: string, level?: number, title?: string, uid?: string, uin?: number): GroupSender;
|
|
9009
|
-
getBotByIndex(index: number): AdapterType | null;
|
|
9838
|
+
getBotByIndex(index: number): AdapterType<any> | null;
|
|
9010
9839
|
getBotCount(): number;
|
|
9011
9840
|
getBotAll<T extends boolean = false>(isIndex?: T): T extends true ? ReturnType<typeof getAllBotList> : ReturnType<typeof getAllBot>;
|
|
9012
9841
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
@@ -9015,7 +9844,7 @@ declare const karin: {
|
|
|
9015
9844
|
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
9016
9845
|
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
9017
9846
|
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
9018
|
-
removeAllListeners(
|
|
9847
|
+
removeAllListeners(event?: string | symbol | undefined): /*elided*/ any;
|
|
9019
9848
|
setMaxListeners(n: number): /*elided*/ any;
|
|
9020
9849
|
getMaxListeners(): number;
|
|
9021
9850
|
listeners<K>(eventName: string | symbol): Function[];
|
|
@@ -9042,7 +9871,7 @@ declare const Bot: {
|
|
|
9042
9871
|
contactGroupTemp(peer: string, subPeer: string, name?: string): Contact<"groupTemp">;
|
|
9043
9872
|
friendSender(userId: number | string, nick: string, sex?: FriendSender["sex"], age?: number, uid?: string, uin?: number): FriendSender;
|
|
9044
9873
|
groupSender(userId: number | string, role: GroupSender["role"], nick?: string, sex?: GroupSender["sex"], age?: number, card?: string, area?: string, level?: number, title?: string, uid?: string, uin?: number): GroupSender;
|
|
9045
|
-
getBotByIndex(index: number): AdapterType | null;
|
|
9874
|
+
getBotByIndex(index: number): AdapterType<any> | null;
|
|
9046
9875
|
getBotCount(): number;
|
|
9047
9876
|
getBotAll<T extends boolean = false>(isIndex?: T): T extends true ? ReturnType<typeof getAllBotList> : ReturnType<typeof getAllBot>;
|
|
9048
9877
|
[EventEmitter.captureRejectionSymbol]?<K>(error: Error, event: string | symbol, ...args: any[]): void;
|
|
@@ -9051,7 +9880,7 @@ declare const Bot: {
|
|
|
9051
9880
|
once<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
9052
9881
|
removeListener<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
9053
9882
|
off<K>(eventName: string | symbol, listener: (...args: any[]) => void): /*elided*/ any;
|
|
9054
|
-
removeAllListeners(
|
|
9883
|
+
removeAllListeners(event?: string | symbol | undefined): /*elided*/ any;
|
|
9055
9884
|
setMaxListeners(n: number): /*elided*/ any;
|
|
9056
9885
|
getMaxListeners(): number;
|
|
9057
9886
|
listeners<K>(eventName: string | symbol): Function[];
|
|
@@ -9216,6 +10045,13 @@ declare const randomStr: (length?: number) => string;
|
|
|
9216
10045
|
|
|
9217
10046
|
/** 当前运行环境的路径标准协议前缀 */
|
|
9218
10047
|
declare const sep: RegExp;
|
|
10048
|
+
/**
|
|
10049
|
+
* 下载文件
|
|
10050
|
+
* @param fileUrl 下载地址
|
|
10051
|
+
* @param savePath 保存路径
|
|
10052
|
+
* @param options 请求参数 基本是axios参数,额外拓展了returnBoolean
|
|
10053
|
+
*/
|
|
10054
|
+
declare const downloadFile: <T extends boolean = false>(fileUrl: string, savePath: string, options?: DownloadFilesOptions<T>) => Promise<DownloadFileResult<T>>;
|
|
9219
10055
|
/**
|
|
9220
10056
|
* 下载保存文件
|
|
9221
10057
|
* @param fileUrl 下载地址
|
|
@@ -9435,6 +10271,28 @@ declare const urlToPath: (url: string) => string;
|
|
|
9435
10271
|
* @returns 返回布尔值
|
|
9436
10272
|
*/
|
|
9437
10273
|
declare const isSubPath: (root: string, target: string, isAbs?: boolean) => boolean | "";
|
|
10274
|
+
/**
|
|
10275
|
+
* @description 将路径统一格式
|
|
10276
|
+
* - 绝对路径
|
|
10277
|
+
* - 统一分隔符`/`
|
|
10278
|
+
* @param filePath - 路径
|
|
10279
|
+
* @returns 统一格式后的路径
|
|
10280
|
+
*/
|
|
10281
|
+
declare const formatPath: (filePath: string) => string;
|
|
10282
|
+
/**
|
|
10283
|
+
* @description 比较两个路径是否相同
|
|
10284
|
+
* @param path1 - 第一个路径
|
|
10285
|
+
* @param path2 - 第二个路径
|
|
10286
|
+
* @returns 是否相同
|
|
10287
|
+
* @example
|
|
10288
|
+
* ```ts
|
|
10289
|
+
* isPathEqual('C:\\Users\\admin', 'C:/Users/admin')
|
|
10290
|
+
* // -> true
|
|
10291
|
+
* isPathEqual('./folder', 'folder')
|
|
10292
|
+
* // -> true
|
|
10293
|
+
* ```
|
|
10294
|
+
*/
|
|
10295
|
+
declare const isPathEqual: (path1: string, path2: string) => boolean;
|
|
9438
10296
|
|
|
9439
10297
|
interface CacheEntry<T = any> {
|
|
9440
10298
|
/** 缓存数据 */
|
|
@@ -9898,11 +10756,13 @@ declare const fs_copyFiles: typeof copyFiles;
|
|
|
9898
10756
|
declare const fs_copyFilesSync: typeof copyFilesSync;
|
|
9899
10757
|
declare const fs_createPluginDir: typeof createPluginDir;
|
|
9900
10758
|
declare const fs_downFile: typeof downFile;
|
|
10759
|
+
declare const fs_downloadFile: typeof downloadFile;
|
|
9901
10760
|
declare const fs_existToMkdir: typeof existToMkdir;
|
|
9902
10761
|
declare const fs_existToMkdirSync: typeof existToMkdirSync;
|
|
9903
10762
|
declare const fs_exists: typeof exists;
|
|
9904
10763
|
declare const fs_existsSync: typeof existsSync;
|
|
9905
10764
|
declare const fs_filesByExt: typeof filesByExt;
|
|
10765
|
+
declare const fs_formatPath: typeof formatPath;
|
|
9906
10766
|
declare const fs_getAllFiles: typeof getAllFiles;
|
|
9907
10767
|
declare const fs_getAllFilesSync: typeof getAllFilesSync;
|
|
9908
10768
|
declare const fs_getFiles: typeof getFiles;
|
|
@@ -9912,6 +10772,7 @@ declare const fs_isDir: typeof isDir;
|
|
|
9912
10772
|
declare const fs_isDirSync: typeof isDirSync;
|
|
9913
10773
|
declare const fs_isFile: typeof isFile;
|
|
9914
10774
|
declare const fs_isFileSync: typeof isFileSync;
|
|
10775
|
+
declare const fs_isPathEqual: typeof isPathEqual;
|
|
9915
10776
|
declare const fs_isPlugin: typeof isPlugin;
|
|
9916
10777
|
declare const fs_isPublic: typeof isPublic;
|
|
9917
10778
|
declare const fs_isSubPath: typeof isSubPath;
|
|
@@ -9946,7 +10807,7 @@ declare const fs_writeJson: typeof writeJson;
|
|
|
9946
10807
|
declare const fs_writeJsonSync: typeof writeJsonSync;
|
|
9947
10808
|
declare const fs_yaml: typeof yaml;
|
|
9948
10809
|
declare namespace fs {
|
|
9949
|
-
export { type fs_CacheEntry as CacheEntry, type fs_Parser as Parser, type fs_PkgData as PkgData, type fs_PkgEnv as PkgEnv, type fs_RequireFunction as RequireFunction, type fs_RequireFunctionSync as RequireFunctionSync, type fs_RequireOptions as RequireOptions, fs_Watch as Watch, fs_Watcher as Watcher, type fs_YamlComment as YamlComment, fs_YamlEditor as YamlEditor, type fs_YamlValue as YamlValue, fs_absPath as absPath, fs_applyComments as applyComments, fs_base64 as base64, fs_buffer as buffer, fs_clearRequire as clearRequire, fs_clearRequireFile as clearRequireFile, fs_comment as comment, fs_copyConfig as copyConfig, fs_copyConfigSync as copyConfigSync, fs_copyFiles as copyFiles, fs_copyFilesSync as copyFilesSync, fs_createPluginDir as createPluginDir, fs_downFile as downFile, fs_existToMkdir as existToMkdir, fs_existToMkdirSync as existToMkdirSync, fs_exists as exists, fs_existsSync as existsSync, fs_filesByExt as filesByExt, fs_getAllFiles as getAllFiles, fs_getAllFilesSync as getAllFilesSync, fs_getFiles as getFiles, fs_getPluginInfo as getPluginInfo, fs_getRelPath as getRelPath, fs_isDir as isDir, fs_isDirSync as isDirSync, fs_isFile as isFile, fs_isFileSync as isFileSync, fs_isPlugin as isPlugin, fs_isPublic as isPublic, fs_isSubPath as isSubPath, json$1 as json, fs_key as key, fs_lock as lock, fs_lockMethod as lockMethod, fs_lockProp as lockProp, fs_log as log, fs_logs as logs, fs_mkdir as mkdir, fs_mkdirSync as mkdirSync, fs_parseChangelog as parseChangelog, fs_pkgRoot as pkgRoot, fs_randomStr as randomStr, fs_range as range, fs_read as read, fs_readFile as readFile, fs_readJson as readJson, fs_readJsonSync as readJsonSync, fs_requireFile as requireFile, fs_requireFileSync as requireFileSync, fs_rmSync as rmSync, fs_save as save, fs_sep as sep, fs_splitPath as splitPath, fs_stream as stream, fs_urlToPath as urlToPath, fs_watch as watch, fs_watchAndMerge as watchAndMerge, fs_write as write, fs_writeJson as writeJson, fs_writeJsonSync as writeJsonSync, fs_yaml as yaml };
|
|
10810
|
+
export { type fs_CacheEntry as CacheEntry, type fs_Parser as Parser, type fs_PkgData as PkgData, type fs_PkgEnv as PkgEnv, type fs_RequireFunction as RequireFunction, type fs_RequireFunctionSync as RequireFunctionSync, type fs_RequireOptions as RequireOptions, fs_Watch as Watch, fs_Watcher as Watcher, type fs_YamlComment as YamlComment, fs_YamlEditor as YamlEditor, type fs_YamlValue as YamlValue, fs_absPath as absPath, fs_applyComments as applyComments, fs_base64 as base64, fs_buffer as buffer, fs_clearRequire as clearRequire, fs_clearRequireFile as clearRequireFile, fs_comment as comment, fs_copyConfig as copyConfig, fs_copyConfigSync as copyConfigSync, fs_copyFiles as copyFiles, fs_copyFilesSync as copyFilesSync, fs_createPluginDir as createPluginDir, fs_downFile as downFile, fs_downloadFile as downloadFile, fs_existToMkdir as existToMkdir, fs_existToMkdirSync as existToMkdirSync, fs_exists as exists, fs_existsSync as existsSync, fs_filesByExt as filesByExt, fs_formatPath as formatPath, fs_getAllFiles as getAllFiles, fs_getAllFilesSync as getAllFilesSync, fs_getFiles as getFiles, fs_getPluginInfo as getPluginInfo, fs_getRelPath as getRelPath, fs_isDir as isDir, fs_isDirSync as isDirSync, fs_isFile as isFile, fs_isFileSync as isFileSync, fs_isPathEqual as isPathEqual, fs_isPlugin as isPlugin, fs_isPublic as isPublic, fs_isSubPath as isSubPath, json$1 as json, fs_key as key, fs_lock as lock, fs_lockMethod as lockMethod, fs_lockProp as lockProp, fs_log as log, fs_logs as logs, fs_mkdir as mkdir, fs_mkdirSync as mkdirSync, fs_parseChangelog as parseChangelog, fs_pkgRoot as pkgRoot, fs_randomStr as randomStr, fs_range as range, fs_read as read, fs_readFile as readFile, fs_readJson as readJson, fs_readJsonSync as readJsonSync, fs_requireFile as requireFile, fs_requireFileSync as requireFileSync, fs_rmSync as rmSync, fs_save as save, fs_sep as sep, fs_splitPath as splitPath, fs_stream as stream, fs_urlToPath as urlToPath, fs_watch as watch, fs_watchAndMerge as watchAndMerge, fs_write as write, fs_writeJson as writeJson, fs_writeJsonSync as writeJsonSync, fs_yaml as yaml };
|
|
9950
10811
|
}
|
|
9951
10812
|
|
|
9952
10813
|
type index$3_CacheEntry<T = any> = CacheEntry<T>;
|
|
@@ -9991,11 +10852,13 @@ declare const index$3_copyFiles: typeof copyFiles;
|
|
|
9991
10852
|
declare const index$3_copyFilesSync: typeof copyFilesSync;
|
|
9992
10853
|
declare const index$3_createPluginDir: typeof createPluginDir;
|
|
9993
10854
|
declare const index$3_downFile: typeof downFile;
|
|
10855
|
+
declare const index$3_downloadFile: typeof downloadFile;
|
|
9994
10856
|
declare const index$3_existToMkdir: typeof existToMkdir;
|
|
9995
10857
|
declare const index$3_existToMkdirSync: typeof existToMkdirSync;
|
|
9996
10858
|
declare const index$3_exists: typeof exists;
|
|
9997
10859
|
declare const index$3_existsSync: typeof existsSync;
|
|
9998
10860
|
declare const index$3_filesByExt: typeof filesByExt;
|
|
10861
|
+
declare const index$3_formatPath: typeof formatPath;
|
|
9999
10862
|
declare const index$3_getAllFiles: typeof getAllFiles;
|
|
10000
10863
|
declare const index$3_getAllFilesSync: typeof getAllFilesSync;
|
|
10001
10864
|
declare const index$3_getFiles: typeof getFiles;
|
|
@@ -10005,6 +10868,7 @@ declare const index$3_isDir: typeof isDir;
|
|
|
10005
10868
|
declare const index$3_isDirSync: typeof isDirSync;
|
|
10006
10869
|
declare const index$3_isFile: typeof isFile;
|
|
10007
10870
|
declare const index$3_isFileSync: typeof isFileSync;
|
|
10871
|
+
declare const index$3_isPathEqual: typeof isPathEqual;
|
|
10008
10872
|
declare const index$3_isPlugin: typeof isPlugin;
|
|
10009
10873
|
declare const index$3_isPublic: typeof isPublic;
|
|
10010
10874
|
declare const index$3_isSubPath: typeof isSubPath;
|
|
@@ -10039,8 +10903,117 @@ declare const index$3_writeJson: typeof writeJson;
|
|
|
10039
10903
|
declare const index$3_writeJsonSync: typeof writeJsonSync;
|
|
10040
10904
|
declare const index$3_yaml: typeof yaml;
|
|
10041
10905
|
declare namespace index$3 {
|
|
10042
|
-
export { type index$3_CacheEntry as CacheEntry, index$3_EVENT_COUNT as EVENT_COUNT, index$3_FILE_CHANGE as FILE_CHANGE, type index$3_Parser as Parser, type index$3_PkgData as PkgData, type index$3_PkgEnv as PkgEnv, index$3_RECV_MSG as RECV_MSG, type index$3_RequireFunction as RequireFunction, type index$3_RequireFunctionSync as RequireFunctionSync, type index$3_RequireOptions as RequireOptions, index$3_SEND_MSG as SEND_MSG, index$3_WS_CLOSE as WS_CLOSE, index$3_WS_CLOSE_ONEBOT as WS_CLOSE_ONEBOT, index$3_WS_CLOSE_PUPPETEER as WS_CLOSE_PUPPETEER, index$3_WS_CLOSE_SANDBOX as WS_CLOSE_SANDBOX, index$3_WS_CONNECTION as WS_CONNECTION, index$3_WS_CONNECTION_ONEBOT as WS_CONNECTION_ONEBOT, index$3_WS_CONNECTION_PUPPETEER as WS_CONNECTION_PUPPETEER, index$3_WS_CONNECTION_SANDBOX as WS_CONNECTION_SANDBOX, index$3_WS_CONNECTION_TERMINAL as WS_CONNECTION_TERMINAL, index$3_WS_SNAPKA as WS_SNAPKA, index$3_Watch as Watch, index$3_Watcher as Watcher, type index$3_YamlComment as YamlComment, index$3_YamlEditor as YamlEditor, type index$3_YamlValue as YamlValue, index$3_absPath as absPath, index$3_applyComments as applyComments, index$3_base64 as base64, index$3_buffer as buffer, index$3_clearRequire as clearRequire, index$3_clearRequireFile as clearRequireFile, index$3_comment as comment, index$3_copyConfig as copyConfig, index$3_copyConfigSync as copyConfigSync, index$3_copyFiles as copyFiles, index$3_copyFilesSync as copyFilesSync, index$3_createPluginDir as createPluginDir, index$3_downFile as downFile, index$3_existToMkdir as existToMkdir, index$3_existToMkdirSync as existToMkdirSync, index$3_exists as exists, index$3_existsSync as existsSync, fs as file, index$3_filesByExt as filesByExt, index$3_getAllFiles as getAllFiles, index$3_getAllFilesSync as getAllFilesSync, index$3_getFiles as getFiles, index$3_getPluginInfo as getPluginInfo, index$3_getRelPath as getRelPath, index$3_isDir as isDir, index$3_isDirSync as isDirSync, index$3_isFile as isFile, index$3_isFileSync as isFileSync, index$3_isPlugin as isPlugin, index$3_isPublic as isPublic, index$3_isSubPath as isSubPath, json$1 as json, index$3_key as key, index$3_lock as lock, index$3_lockMethod as lockMethod, index$3_lockProp as lockProp, index$3_log as log, index$3_logs as logs, index$3_mkdir as mkdir, index$3_mkdirSync as mkdirSync, index$3_parseChangelog as parseChangelog, index$3_pkgRoot as pkgRoot, index$3_randomStr as randomStr, index$3_range as range, index$3_read as read, index$3_readFile as readFile, index$3_readJson as readJson, index$3_readJsonSync as readJsonSync, index$3_requireFile as requireFile, index$3_requireFileSync as requireFileSync, index$3_rmSync as rmSync, index$3_save as save, index$3_sep as sep, index$3_splitPath as splitPath, index$3_stream as stream, index$3_urlToPath as urlToPath, index$3_watch as watch, index$3_watchAndMerge as watchAndMerge, index$3_write as write, index$3_writeJson as writeJson, index$3_writeJsonSync as writeJsonSync, index$3_yaml as yaml };
|
|
10906
|
+
export { type index$3_CacheEntry as CacheEntry, index$3_EVENT_COUNT as EVENT_COUNT, index$3_FILE_CHANGE as FILE_CHANGE, type index$3_Parser as Parser, type index$3_PkgData as PkgData, type index$3_PkgEnv as PkgEnv, index$3_RECV_MSG as RECV_MSG, type index$3_RequireFunction as RequireFunction, type index$3_RequireFunctionSync as RequireFunctionSync, type index$3_RequireOptions as RequireOptions, index$3_SEND_MSG as SEND_MSG, index$3_WS_CLOSE as WS_CLOSE, index$3_WS_CLOSE_ONEBOT as WS_CLOSE_ONEBOT, index$3_WS_CLOSE_PUPPETEER as WS_CLOSE_PUPPETEER, index$3_WS_CLOSE_SANDBOX as WS_CLOSE_SANDBOX, index$3_WS_CONNECTION as WS_CONNECTION, index$3_WS_CONNECTION_ONEBOT as WS_CONNECTION_ONEBOT, index$3_WS_CONNECTION_PUPPETEER as WS_CONNECTION_PUPPETEER, index$3_WS_CONNECTION_SANDBOX as WS_CONNECTION_SANDBOX, index$3_WS_CONNECTION_TERMINAL as WS_CONNECTION_TERMINAL, index$3_WS_SNAPKA as WS_SNAPKA, index$3_Watch as Watch, index$3_Watcher as Watcher, type index$3_YamlComment as YamlComment, index$3_YamlEditor as YamlEditor, type index$3_YamlValue as YamlValue, index$3_absPath as absPath, index$3_applyComments as applyComments, index$3_base64 as base64, index$3_buffer as buffer, index$3_clearRequire as clearRequire, index$3_clearRequireFile as clearRequireFile, index$3_comment as comment, index$3_copyConfig as copyConfig, index$3_copyConfigSync as copyConfigSync, index$3_copyFiles as copyFiles, index$3_copyFilesSync as copyFilesSync, index$3_createPluginDir as createPluginDir, index$3_downFile as downFile, index$3_downloadFile as downloadFile, index$3_existToMkdir as existToMkdir, index$3_existToMkdirSync as existToMkdirSync, index$3_exists as exists, index$3_existsSync as existsSync, fs as file, index$3_filesByExt as filesByExt, index$3_formatPath as formatPath, index$3_getAllFiles as getAllFiles, index$3_getAllFilesSync as getAllFilesSync, index$3_getFiles as getFiles, index$3_getPluginInfo as getPluginInfo, index$3_getRelPath as getRelPath, index$3_isDir as isDir, index$3_isDirSync as isDirSync, index$3_isFile as isFile, index$3_isFileSync as isFileSync, index$3_isPathEqual as isPathEqual, index$3_isPlugin as isPlugin, index$3_isPublic as isPublic, index$3_isSubPath as isSubPath, json$1 as json, index$3_key as key, index$3_lock as lock, index$3_lockMethod as lockMethod, index$3_lockProp as lockProp, index$3_log as log, index$3_logs as logs, index$3_mkdir as mkdir, index$3_mkdirSync as mkdirSync, index$3_parseChangelog as parseChangelog, index$3_pkgRoot as pkgRoot, index$3_randomStr as randomStr, index$3_range as range, index$3_read as read, index$3_readFile as readFile, index$3_readJson as readJson, index$3_readJsonSync as readJsonSync, index$3_requireFile as requireFile, index$3_requireFileSync as requireFileSync, index$3_rmSync as rmSync, index$3_save as save, index$3_sep as sep, index$3_splitPath as splitPath, index$3_stream as stream, index$3_urlToPath as urlToPath, index$3_watch as watch, index$3_watchAndMerge as watchAndMerge, index$3_write as write, index$3_writeJson as writeJson, index$3_writeJsonSync as writeJsonSync, index$3_yaml as yaml };
|
|
10907
|
+
}
|
|
10908
|
+
|
|
10909
|
+
/** 获取git仓库本地分支列表返回类型 */
|
|
10910
|
+
interface GitLocalBranches {
|
|
10911
|
+
/** 默认分支 */
|
|
10912
|
+
defaultBranch: string;
|
|
10913
|
+
/** 本地分支列表 */
|
|
10914
|
+
list: string[];
|
|
10915
|
+
}
|
|
10916
|
+
/** 获取git仓库远程分支列表返回类型 */
|
|
10917
|
+
interface GitRemoteBranches {
|
|
10918
|
+
/** 分支名称 */
|
|
10919
|
+
branch: string;
|
|
10920
|
+
/** 短哈希 */
|
|
10921
|
+
short: string;
|
|
10922
|
+
/** 长哈希 */
|
|
10923
|
+
hash: string;
|
|
10924
|
+
}
|
|
10925
|
+
/** 获取最新提交哈希参数 */
|
|
10926
|
+
interface GetCommitHashOptions {
|
|
10927
|
+
/** 分支名称 默认使用当前分支 */
|
|
10928
|
+
branch?: string;
|
|
10929
|
+
/** 是否返回短哈希 默认返回长哈希 */
|
|
10930
|
+
short?: boolean;
|
|
10931
|
+
}
|
|
10932
|
+
/**
|
|
10933
|
+
* 获取本地分支列表
|
|
10934
|
+
* @param cwd 仓库路径 默认当前目录
|
|
10935
|
+
* @returns 本地分支列表 包含默认分支和分支列表
|
|
10936
|
+
* @throws 执行发生错误 例如stdout类型错误
|
|
10937
|
+
*/
|
|
10938
|
+
declare const getLocalBranches: (cwd?: string) => Promise<GitLocalBranches>;
|
|
10939
|
+
/**
|
|
10940
|
+
* 获取本地默认分支
|
|
10941
|
+
* @param cwd 仓库路径 默认当前目录
|
|
10942
|
+
* @returns 默认分支
|
|
10943
|
+
*/
|
|
10944
|
+
declare const getDefaultBranch: (cwd?: string) => Promise<string>;
|
|
10945
|
+
/**
|
|
10946
|
+
* 获取git仓库远程分支列表
|
|
10947
|
+
* @param cwd 仓库路径
|
|
10948
|
+
* @returns 远程分支列表 包含哈希和分支名称
|
|
10949
|
+
* @throws 执行发生错误 例如stdout类型错误
|
|
10950
|
+
*/
|
|
10951
|
+
declare const getRemoteBranches: (cwd: string) => Promise<GitRemoteBranches[]>;
|
|
10952
|
+
/**
|
|
10953
|
+
* 获取本地最新提交哈希
|
|
10954
|
+
* @param cwd 仓库路径
|
|
10955
|
+
* @param options.branch 分支名称 默认使用当前分支
|
|
10956
|
+
* @param options.short 是否返回短哈希 默认返回长哈希
|
|
10957
|
+
* @returns 最新提交哈希
|
|
10958
|
+
*/
|
|
10959
|
+
declare const getLocalCommitHash: (cwd: string, options?: GetCommitHashOptions) => Promise<string>;
|
|
10960
|
+
/**
|
|
10961
|
+
* 获取远程最新提交哈希
|
|
10962
|
+
* @description 分支名称支持不带origin/前缀 会自动添加
|
|
10963
|
+
* @param cwd 仓库路径
|
|
10964
|
+
* @param options.branch 分支名称 默认值`origin/HEAD`
|
|
10965
|
+
* @param options.short 是否返回短哈希 默认返回长哈希
|
|
10966
|
+
* @returns 远程最新提交哈希
|
|
10967
|
+
*/
|
|
10968
|
+
declare const getRemoteCommitHash: (cwd: string, options?: GetCommitHashOptions) => Promise<string>;
|
|
10969
|
+
|
|
10970
|
+
/** 执行命令参数类型 */
|
|
10971
|
+
type ExecOptions = Parameters<typeof exec$2>[1];
|
|
10972
|
+
|
|
10973
|
+
/** Git Pull 选项接口 */
|
|
10974
|
+
type GitPullOptions = ExecOptions & {
|
|
10975
|
+
/** 自定义命令,默认为 'git pull' */
|
|
10976
|
+
customCmd?: string;
|
|
10977
|
+
/** 是否强制拉取 使用后将本地分支强制与远程分支同步 */
|
|
10978
|
+
force?: boolean;
|
|
10979
|
+
/** 如果强制拉取 同步的远程分支名称 默认`origin/HEAD` 需要携带`origin/`前缀 */
|
|
10980
|
+
remote?: string;
|
|
10981
|
+
/** 超时 */
|
|
10982
|
+
timeout?: number;
|
|
10983
|
+
};
|
|
10984
|
+
/** Git Pull 返回类型 */
|
|
10985
|
+
interface GitPullResult {
|
|
10986
|
+
/** 是否成功 */
|
|
10987
|
+
status: boolean;
|
|
10988
|
+
/** 更新详情 */
|
|
10989
|
+
hash: {
|
|
10990
|
+
/** 更新前哈希 */
|
|
10991
|
+
before: string;
|
|
10992
|
+
/** 更新后哈希 */
|
|
10993
|
+
after: string;
|
|
10994
|
+
};
|
|
10995
|
+
/** 更新信息 */
|
|
10996
|
+
data: string;
|
|
10043
10997
|
}
|
|
10998
|
+
/**
|
|
10999
|
+
* 拉取git仓库 俗称`更新git插件`
|
|
11000
|
+
* @param cwd 工作目录 默认当前目录
|
|
11001
|
+
* @param options 选项
|
|
11002
|
+
* @returns 拉取结果
|
|
11003
|
+
*/
|
|
11004
|
+
declare const gitPull: (cwd: string, options?: GitPullOptions) => Promise<GitPullResult>;
|
|
11005
|
+
|
|
11006
|
+
/**
|
|
11007
|
+
* @public
|
|
11008
|
+
* @description 日志管理器
|
|
11009
|
+
*/
|
|
11010
|
+
declare let logger: Logger;
|
|
11011
|
+
/**
|
|
11012
|
+
* @public
|
|
11013
|
+
* @description 创建内部日志管理器
|
|
11014
|
+
* @param dir - 日志文件夹
|
|
11015
|
+
*/
|
|
11016
|
+
declare const createInnerLogger: (dir: string) => Logger;
|
|
10044
11017
|
|
|
10045
11018
|
/**
|
|
10046
11019
|
* 判断给定的 hostname 或 IP 是否为本机的回环地址 支持v6(可能不全)
|
|
@@ -10093,7 +11066,7 @@ declare const getPid: (port: number) => Promise<number>;
|
|
|
10093
11066
|
* // -> 打印执行命令和结果
|
|
10094
11067
|
* ```
|
|
10095
11068
|
*/
|
|
10096
|
-
declare const exec: <T extends boolean = false>(cmd: string, options?: ExecOptions<T>) => Promise<ExecReturn<T>>;
|
|
11069
|
+
declare const exec: <T extends boolean = false>(cmd: string, options?: ExecOptions$1<T>) => Promise<ExecReturn<T>>;
|
|
10097
11070
|
|
|
10098
11071
|
/**
|
|
10099
11072
|
* 获取kairn运行时间
|
|
@@ -10144,32 +11117,26 @@ declare const errorToString: (error?: Error | null) => string;
|
|
|
10144
11117
|
* @param cmd 命令
|
|
10145
11118
|
* @param options 参数
|
|
10146
11119
|
*/
|
|
10147
|
-
declare const ffmpeg: <T extends boolean = false>(cmd: string, options?: ExecOptions<T>) => Promise<ExecReturn<T>>;
|
|
11120
|
+
declare const ffmpeg: <T extends boolean = false>(cmd: string, options?: ExecOptions$1<T>) => Promise<ExecReturn<T>>;
|
|
10148
11121
|
/**
|
|
10149
11122
|
* @description ffprobe命令
|
|
10150
11123
|
* @param cmd 命令
|
|
10151
11124
|
* @param options 参数
|
|
10152
11125
|
*/
|
|
10153
|
-
declare const ffprobe: <T extends boolean = false>(cmd: string, options?: ExecOptions<T>) => Promise<ExecReturn<T>>;
|
|
11126
|
+
declare const ffprobe: <T extends boolean = false>(cmd: string, options?: ExecOptions$1<T>) => Promise<ExecReturn<T>>;
|
|
10154
11127
|
/**
|
|
10155
11128
|
* @description ffplay命令
|
|
10156
11129
|
* @param cmd 命令
|
|
10157
11130
|
* @param options 参数
|
|
10158
11131
|
*/
|
|
10159
|
-
declare const ffplay: <T extends boolean = false>(cmd: string, options?: ExecOptions<T>) => Promise<ExecReturn<T>>;
|
|
11132
|
+
declare const ffplay: <T extends boolean = false>(cmd: string, options?: ExecOptions$1<T>) => Promise<ExecReturn<T>>;
|
|
10160
11133
|
|
|
10161
11134
|
/**
|
|
10162
11135
|
* 动态导入模块
|
|
10163
|
-
* @param url 模块地址 仅支持绝对路径
|
|
11136
|
+
* @param url 模块地址 仅支持绝对路径 无需传递 `file://` 前缀
|
|
10164
11137
|
* @param isRefresh 是否重新加载 不使用缓存
|
|
10165
11138
|
*/
|
|
10166
|
-
declare const importModule: (url: string, isRefresh?: boolean) => Promise<
|
|
10167
|
-
status: true;
|
|
10168
|
-
data: any;
|
|
10169
|
-
} | {
|
|
10170
|
-
status: false;
|
|
10171
|
-
data: unknown;
|
|
10172
|
-
}>;
|
|
11139
|
+
declare const importModule: <T = any>(url: string, isRefresh?: boolean) => Promise<ImportModuleResult<T>>;
|
|
10173
11140
|
|
|
10174
11141
|
/** 是否为windows */
|
|
10175
11142
|
declare const isWin: boolean;
|
|
@@ -10659,6 +11626,120 @@ declare const makeMessage: (elements: SendMessage) => Array<Elements>;
|
|
|
10659
11626
|
*/
|
|
10660
11627
|
declare const makeForward: (elements: SendMessage | Array<Elements[]>, fakeId?: string, fakeName?: string) => Array<CustomNodeElement>;
|
|
10661
11628
|
|
|
11629
|
+
/**
|
|
11630
|
+
* 竞速请求 返回最先成功响应的数据
|
|
11631
|
+
* @param urls - 请求地址数组
|
|
11632
|
+
* @param config - 请求配置 默认 { timeout: 10000, method: 'HEAD' }
|
|
11633
|
+
* @returns 返回最先成功响应的数据
|
|
11634
|
+
* @example
|
|
11635
|
+
* const urls = ['https://api.github.com', 'https://api.gitee.com']
|
|
11636
|
+
* const data = await raceRequest(urls)
|
|
11637
|
+
* console.log(data)
|
|
11638
|
+
*
|
|
11639
|
+
* @example
|
|
11640
|
+
* const urls = ['https://api.github.com/post', 'https://api.gitee.com/post']
|
|
11641
|
+
* const data = await raceRequest(urls, {
|
|
11642
|
+
* method: 'post',
|
|
11643
|
+
* data: { foo: 'bar' }
|
|
11644
|
+
* })
|
|
11645
|
+
* console.log(data)
|
|
11646
|
+
*/
|
|
11647
|
+
declare const raceRequest: <R = AxiosRequestConfig, T = any>(urls: string[], config?: AxiosRequestConfig) => Promise<AxiosResponse<T, R> | null>;
|
|
11648
|
+
/**
|
|
11649
|
+
* 测试网络请求
|
|
11650
|
+
* @template D - 请求数据类型
|
|
11651
|
+
* @template T - 是否返回详细信息
|
|
11652
|
+
* @template R - 是否为竞速模式
|
|
11653
|
+
* @param urls - 请求地址数组
|
|
11654
|
+
* @param config - 扩展的请求配置,包含成功状态码列表和是否返回详细信息选项
|
|
11655
|
+
* @returns 根据配置返回不同格式的结果
|
|
11656
|
+
* @example
|
|
11657
|
+
* const urls = ['https://api.github.com', 'https://api.gitee.com']
|
|
11658
|
+
* const data = await pingRequest(urls)
|
|
11659
|
+
* console.log(data)
|
|
11660
|
+
* // -> ['https://api.github.com']
|
|
11661
|
+
*
|
|
11662
|
+
* @example
|
|
11663
|
+
* const urls = ['https://api.github.com', 'https://api.gitee.com']
|
|
11664
|
+
* const data = await pingRequest(urls, { detailed: true })
|
|
11665
|
+
* console.log(data)
|
|
11666
|
+
* // -> [{ url: 'https://api.github.com', success: true, duration: 100, error: null }]
|
|
11667
|
+
*
|
|
11668
|
+
* @example
|
|
11669
|
+
* const urls = ['https://api.github.com', 'https://api.gitee.com']
|
|
11670
|
+
* const data = await pingRequest(urls, { isRace: true })
|
|
11671
|
+
* console.log(data)
|
|
11672
|
+
* // -> 'https://api.github.com' 启用竞速模式,返回第一个成功的请求结果
|
|
11673
|
+
*/
|
|
11674
|
+
declare const pingRequest: <D = any, T extends boolean = false, R extends boolean = false>(urls: string[], config?: ExtendedAxiosRequestConfig<D, T, R>) => Promise<PingRequestResult<T, R>>;
|
|
11675
|
+
/**
|
|
11676
|
+
* 返回最快的npm registry
|
|
11677
|
+
* @description 阿里云兜底
|
|
11678
|
+
* @returns 返回最快的npm registry
|
|
11679
|
+
*/
|
|
11680
|
+
declare const getFastRegistry: () => Promise<string>;
|
|
11681
|
+
/**
|
|
11682
|
+
* 获取指定仓库的package.json
|
|
11683
|
+
* @param owner - 仓库所属用户名
|
|
11684
|
+
* @param repo - 仓库名
|
|
11685
|
+
* @returns 返回指定仓库的package.json
|
|
11686
|
+
*/
|
|
11687
|
+
declare const getPackageJson: (owner: string, repo: string) => Promise<any>;
|
|
11688
|
+
|
|
11689
|
+
/**
|
|
11690
|
+
* 构建符合 https://github.akams.cn/ 标准的github加速源
|
|
11691
|
+
* @param owner - 仓库所属用户名
|
|
11692
|
+
* @param repo - 仓库名
|
|
11693
|
+
* @returns 返回符合标准的github加速源
|
|
11694
|
+
*/
|
|
11695
|
+
declare const buildGithub: (proxy: string) => GithubConfig;
|
|
11696
|
+
/**
|
|
11697
|
+
* 解析github地址
|
|
11698
|
+
* @param url - github地址
|
|
11699
|
+
* @returns 返回解析后的地址
|
|
11700
|
+
*/
|
|
11701
|
+
declare const parseGithubUrl: (url: string) => {
|
|
11702
|
+
owner: string;
|
|
11703
|
+
repo: string;
|
|
11704
|
+
path: string;
|
|
11705
|
+
};
|
|
11706
|
+
/**
|
|
11707
|
+
* Gihub加速 获取当前最快的源
|
|
11708
|
+
* @param urls - 请求地址数组
|
|
11709
|
+
* @param owner - 仓库所属用户名
|
|
11710
|
+
* @param repo - 仓库名
|
|
11711
|
+
* @returns 返回最快的源
|
|
11712
|
+
*/
|
|
11713
|
+
declare const getFastGithub: (type: "raw" | "clone") => Promise<GithubConfig>;
|
|
11714
|
+
|
|
11715
|
+
/**
|
|
11716
|
+
* INI文件解析器,专用于解析和保存 .npmrc 格式的文件
|
|
11717
|
+
*/
|
|
11718
|
+
interface INIParser {
|
|
11719
|
+
/**
|
|
11720
|
+
* 从指定路径读取并解析INI文件
|
|
11721
|
+
* @param filePath - 文件路径
|
|
11722
|
+
* @returns 解析后的键值对对象
|
|
11723
|
+
*/
|
|
11724
|
+
read: (filePath: string) => Record<string, string>;
|
|
11725
|
+
/**
|
|
11726
|
+
* 将键值对对象保存到指定路径
|
|
11727
|
+
* @param data - 要保存的键值对数据
|
|
11728
|
+
* @param filePath - 保存的文件路径
|
|
11729
|
+
* @returns 是否保存成功
|
|
11730
|
+
*/
|
|
11731
|
+
write: (data: Record<string, string>, filePath: string) => boolean;
|
|
11732
|
+
}
|
|
11733
|
+
/**
|
|
11734
|
+
* 创建并返回INI解析器对象
|
|
11735
|
+
* @returns INI解析器对象
|
|
11736
|
+
*/
|
|
11737
|
+
declare const createINIParser: () => INIParser;
|
|
11738
|
+
/**
|
|
11739
|
+
* INI解析器
|
|
11740
|
+
*/
|
|
11741
|
+
declare const ini: INIParser;
|
|
11742
|
+
|
|
10662
11743
|
/**
|
|
10663
11744
|
* 比较两个对象数组,找出它们之间的差异
|
|
10664
11745
|
* @description 使用深度比较方式,返回在旧数组中被移除的对象和在新数组中新增的对象
|
|
@@ -10877,7 +11958,7 @@ declare const getNpmPlugins: (showDetails?: boolean) => Promise<string[] | PkgIn
|
|
|
10877
11958
|
* 获取git插件列表
|
|
10878
11959
|
* @param isPack - 是否屏蔽不带package.json的插件,默认为false
|
|
10879
11960
|
*/
|
|
10880
|
-
declare const getPlugins$1: (
|
|
11961
|
+
declare const getPlugins$1: (_?: boolean) => Promise<string[]>;
|
|
10881
11962
|
/**
|
|
10882
11963
|
* @deprecated 已废弃
|
|
10883
11964
|
* 获取git插件列表
|
|
@@ -10943,12 +12024,6 @@ declare namespace index$1 {
|
|
|
10943
12024
|
export { type index$1_AxiosFn as AxiosFn, type index$1_NpmInfo as NpmInfo, index$1_absPath as absPath, index$1_average as average, index$1_axios as axios, index$1_base64 as base64, index$1_buffer as buffer, karinToQQBot as buttonToQQBot, index$1_clamp as clamp, index$1_createRawMessage as createRawMessage, index$1_diffArray as diffArray, index$1_diffSimpleArray as diffSimpleArray, index$1_downFile as downFile, existToMkdir as exists, index$1_formatNumber as formatNumber, index$1_formatTime as formatTime, index$1_formatUnit as formatUnit, index$1_getAbsPath as getAbsPath, index$1_getGitPlugins as getGitPlugins, index$1_getNpmPlugins as getNpmPlugins, getPlugins$1 as getPlugins, index$1_getRelPath as getRelPath, index$1_isDir as isDir, index$1_isEven as isEven, index$1_isPlugin as isPlugin, index$1_karinToQQBot as karinToQQBot, index$1_makeForward as makeForward, index$1_makeMessage as makeMessage, createRawMessage as makeMessageLog, index$1_mergeImage as mergeImage, mkdirSync as mkdir, index$1_percentage as percentage, getPluginInfo as pkgJson, pkgRoot as pkgroot, index$1_qqbotToKarin as qqbotToKarin, index$1_random as random, readJsonSync as readJson, read as readYaml, index$1_round as round, index$1_sleep as sleep, index$1_splitPath as splitPath, index$1_stream as stream, index$1_updateYaml as updateYaml, index$1_uptime as uptime, index$1_urlToPath as urlToPath, writeJsonSync as writeJson, write as writeYaml };
|
|
10944
12025
|
}
|
|
10945
12026
|
|
|
10946
|
-
/**
|
|
10947
|
-
* @description 初始化配置
|
|
10948
|
-
* @param dir 根目录
|
|
10949
|
-
*/
|
|
10950
|
-
declare const initConfig: (dir: typeof _default) => Promise<void>;
|
|
10951
|
-
|
|
10952
12027
|
/**
|
|
10953
12028
|
* 传入一个数组 将数组中所有元素为字符串
|
|
10954
12029
|
* @param data 数据
|
|
@@ -11191,6 +12266,10 @@ declare const getRenderCfg: () => Renders$1;
|
|
|
11191
12266
|
|
|
11192
12267
|
/** pm2配置 */
|
|
11193
12268
|
declare const pm2: () => PM2;
|
|
12269
|
+
/**
|
|
12270
|
+
* pm2 入口配置
|
|
12271
|
+
*/
|
|
12272
|
+
declare const initPm2: () => void;
|
|
11194
12273
|
|
|
11195
12274
|
/** redis配置 */
|
|
11196
12275
|
declare const redis$1: () => Redis;
|
|
@@ -11227,8 +12306,8 @@ declare const index_getRenderCfg: typeof getRenderCfg;
|
|
|
11227
12306
|
declare const index_getYaml: typeof getYaml;
|
|
11228
12307
|
declare const index_groups: typeof groups;
|
|
11229
12308
|
declare const index_host: typeof host;
|
|
11230
|
-
declare const index_initConfig: typeof initConfig;
|
|
11231
12309
|
declare const index_initConfigCache: typeof initConfigCache;
|
|
12310
|
+
declare const index_initPm2: typeof initPm2;
|
|
11232
12311
|
declare const index_master: typeof master;
|
|
11233
12312
|
declare const index_mergeDegAndCfg: typeof mergeDegAndCfg;
|
|
11234
12313
|
declare const index_pkg: typeof pkg;
|
|
@@ -11243,7 +12322,7 @@ declare const index_updateLevel: typeof updateLevel;
|
|
|
11243
12322
|
declare const index_webSocketServerToken: typeof webSocketServerToken;
|
|
11244
12323
|
declare const index_writeEnv: typeof writeEnv;
|
|
11245
12324
|
declare namespace index {
|
|
11246
|
-
export { index_adapter as adapter, index_admin as admin, index_authKey as authKey, index_clearCache as clearCache, index_clearFiles as clearFiles, index_config as config, index_createCount as createCount, index_defaultConfig as defaultConfig, index_env as env, index_ffmpegPath as ffmpegPath, index_ffplayPath as ffplayPath, index_ffprobePath as ffprobePath, index_formatArray as formatArray, index_formatObject as formatObject, index_getCacheCfg as getCacheCfg, index_getDirectCfg as getDirectCfg, index_getEnv as getEnv, index_getFriendCfg as getFriendCfg, index_getGroupCfg as getGroupCfg, index_getGuildCfg as getGuildCfg, index_getRenderCfg as getRenderCfg, index_getYaml as getYaml, index_groups as groups, index_host as host,
|
|
12325
|
+
export { index_adapter as adapter, index_admin as admin, index_authKey as authKey, index_clearCache as clearCache, index_clearFiles as clearFiles, index_config as config, index_createCount as createCount, index_defaultConfig as defaultConfig, index_env as env, index_ffmpegPath as ffmpegPath, index_ffplayPath as ffplayPath, index_ffprobePath as ffprobePath, index_formatArray as formatArray, index_formatObject as formatObject, index_getCacheCfg as getCacheCfg, index_getDirectCfg as getDirectCfg, index_getEnv as getEnv, index_getFriendCfg as getFriendCfg, index_getGroupCfg as getGroupCfg, index_getGuildCfg as getGuildCfg, index_getRenderCfg as getRenderCfg, index_getYaml as getYaml, index_groups as groups, index_host as host, index_initConfigCache as initConfigCache, index_initPm2 as initPm2, index_master as master, index_mergeDegAndCfg as mergeDegAndCfg, index_pkg as pkg, index_pm2 as pm2, index_port as port, index_privates as privates, redis$1 as redis, render$1 as render, index_setConfig as setConfig, index_setEnv as setEnv, index_setYaml as setYaml, index_timeout as timeout, index_updateLevel as updateLevel, index_webSocketServerToken as webSocketServerToken, index_writeEnv as writeEnv };
|
|
11247
12326
|
}
|
|
11248
12327
|
|
|
11249
12328
|
/**
|
|
@@ -11251,6 +12330,8 @@ declare namespace index {
|
|
|
11251
12330
|
*/
|
|
11252
12331
|
declare const router: Router;
|
|
11253
12332
|
|
|
12333
|
+
/** 基本路由 */
|
|
12334
|
+
declare const BASE_ROUTER = "/api/v1";
|
|
11254
12335
|
/** 登录路由 */
|
|
11255
12336
|
declare const LOGIN_ROUTER = "/login";
|
|
11256
12337
|
/** 刷新令牌路由 */
|
|
@@ -11278,7 +12359,7 @@ declare const UPDATE_CORE_ROUTER = "/system/update";
|
|
|
11278
12359
|
/** 获取所有bot列表路由 */
|
|
11279
12360
|
declare const GET_BOTS_ROUTER = "/system/get/bots";
|
|
11280
12361
|
/** console适配器路由 */
|
|
11281
|
-
declare const CONSOLE_ROUTER = "/console
|
|
12362
|
+
declare const CONSOLE_ROUTER = "/console/{*path}";
|
|
11282
12363
|
/** ping路由 */
|
|
11283
12364
|
declare const PING_ROUTER = "/ping";
|
|
11284
12365
|
/** 系统状态路由 */
|
|
@@ -11339,6 +12420,187 @@ declare const UNINSTALL_WEBUI_PLUGIN_ROUTER = "/plugin/webui/uninstall";
|
|
|
11339
12420
|
declare const GET_WEBUI_PLUGIN_VERSIONS_ROUTER = "/plugin/webui/versions";
|
|
11340
12421
|
/** 更新WebUI插件到指定版本 */
|
|
11341
12422
|
declare const UPDATE_WEBUI_PLUGIN_VERSION_ROUTER = "/plugin/webui/update-version";
|
|
12423
|
+
/** 获取任务列表 */
|
|
12424
|
+
declare const TASK_LIST_ROUTER = "/task/list";
|
|
12425
|
+
/** 执行任务 */
|
|
12426
|
+
declare const TASK_RUN_ROUTER = "/task/run";
|
|
12427
|
+
/** 获取任务日志 */
|
|
12428
|
+
declare const TASK_LOGS_ROUTER = "/task/logs";
|
|
12429
|
+
/** 删除任务记录 */
|
|
12430
|
+
declare const TASK_DELETE_ROUTER = "/task/delete_record";
|
|
12431
|
+
/** 插件管理 */
|
|
12432
|
+
declare const PLUGIN_ADMIN_ROUTER = "/plugin/admin";
|
|
12433
|
+
/** @version 1.8.0 获取插件管理所需的插件信息列表 */
|
|
12434
|
+
declare const GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER = "/plugin/detail/list";
|
|
12435
|
+
/** @version 1.8.0 获取依赖列表 */
|
|
12436
|
+
declare const GET_DEPENDENCIES_LIST_ROUTER = "/dependencies/list";
|
|
12437
|
+
/** @version 1.8.0 依赖管理路由 */
|
|
12438
|
+
declare const MANAGE_DEPENDENCIES_ROUTER = "/dependencies/manage";
|
|
12439
|
+
/** @version 1.8.0 获取.npmrc文件列表 */
|
|
12440
|
+
declare const GET_NPMRC_LIST_ROUTER = "/dependencies/npmrc/list";
|
|
12441
|
+
/** @version 1.8.0 获取npm config文件内容 */
|
|
12442
|
+
declare const GET_NPM_CONFIG_ROUTER = "/dependencies/npmrc/get";
|
|
12443
|
+
/** @version 1.8.0 获取npm registry、proxy、https-proxy配置 */
|
|
12444
|
+
declare const GET_NPM_BASE_CONFIG_ROUTER = "/dependencies/npm/base";
|
|
12445
|
+
/** @version 1.8.0 保存npmrc文件 */
|
|
12446
|
+
declare const SAVE_NPMRC_ROUTER = "/dependencies/npmrc/save";
|
|
12447
|
+
/** @version 1.8.0 获取已加载命令插件缓存信息列表 */
|
|
12448
|
+
declare const GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER = "/plugin/loaded/command";
|
|
12449
|
+
/** @version 1.8.0 获取插件市场列表 */
|
|
12450
|
+
declare const GET_PLUGIN_MARKET_LIST_ROUTER = "/plugin/market";
|
|
12451
|
+
|
|
12452
|
+
/** HTTP状态码 */
|
|
12453
|
+
declare enum HTTPStatusCode {
|
|
12454
|
+
/** 成功 */
|
|
12455
|
+
OK = 200,
|
|
12456
|
+
/** 请求错误 */
|
|
12457
|
+
BadRequest = 400,
|
|
12458
|
+
/** 未授权 */
|
|
12459
|
+
Unauthorized = 401,
|
|
12460
|
+
/** 禁止访问 */
|
|
12461
|
+
Forbidden = 403,
|
|
12462
|
+
/** 未找到 */
|
|
12463
|
+
NotFound = 404,
|
|
12464
|
+
/** 方法不允许 */
|
|
12465
|
+
MethodNotAllowed = 405,
|
|
12466
|
+
/** 请求体过大 */
|
|
12467
|
+
PayloadTooLarge = 413,
|
|
12468
|
+
/** 服务器错误 */
|
|
12469
|
+
InternalServerError = 500,
|
|
12470
|
+
/** 访问令牌已过期 */
|
|
12471
|
+
AccessTokenExpired = 419,
|
|
12472
|
+
/** 刷新令牌已过期 */
|
|
12473
|
+
RefreshTokenExpired = 420
|
|
12474
|
+
}
|
|
12475
|
+
/**
|
|
12476
|
+
* 创建响应
|
|
12477
|
+
* @param res 响应
|
|
12478
|
+
* @param code 状态码
|
|
12479
|
+
* @param data 数据
|
|
12480
|
+
* @param message 消息
|
|
12481
|
+
* @returns 响应
|
|
12482
|
+
* @template T 数据类型
|
|
12483
|
+
* @example createResponse(res, HTTPStatusCode.OK, { message: '成功' })
|
|
12484
|
+
* @example createResponse(res, HTTPStatusCode.BadRequest, { message: '参数错误' })
|
|
12485
|
+
* @example createResponse(res, HTTPStatusCode.InternalServerError, { message: '服务器错误' })
|
|
12486
|
+
*/
|
|
12487
|
+
declare const createResponse: <T>(res: Response, code: HTTPStatusCode, data?: T, message?: string) => void;
|
|
12488
|
+
/**
|
|
12489
|
+
* 创建成功响应
|
|
12490
|
+
* @param res 响应
|
|
12491
|
+
* @param data 数据
|
|
12492
|
+
* @param message 消息
|
|
12493
|
+
* @returns 响应
|
|
12494
|
+
* @template T 数据类型
|
|
12495
|
+
* @example createSuccessResponse(res, null, '成功')
|
|
12496
|
+
* @example createSuccessResponse(res, data)
|
|
12497
|
+
*/
|
|
12498
|
+
declare const createSuccessResponse: <T>(res: Response, data?: T, message?: string) => void;
|
|
12499
|
+
/**
|
|
12500
|
+
* 创建未鉴权响应
|
|
12501
|
+
* @param res 响应
|
|
12502
|
+
* @param message 消息
|
|
12503
|
+
* @returns 响应
|
|
12504
|
+
* @example createUnauthorizedResponse(res)
|
|
12505
|
+
* @example createUnauthorizedResponse(res, '未授权')
|
|
12506
|
+
* @example createUnauthorizedResponse(res, '登录已过期')
|
|
12507
|
+
* @example createUnauthorizedResponse(res, '登录信息已失效')
|
|
12508
|
+
*/
|
|
12509
|
+
declare const createUnauthorizedResponse: (res: Response, message?: string) => void;
|
|
12510
|
+
/**
|
|
12511
|
+
* 创建访问令牌已过期响应
|
|
12512
|
+
* @param res 响应
|
|
12513
|
+
* @param message 消息
|
|
12514
|
+
* @returns 响应
|
|
12515
|
+
* @example createAccessTokenExpiredResponse(res)
|
|
12516
|
+
* @example createAccessTokenExpiredResponse(res, '访问令牌已过期')
|
|
12517
|
+
*/
|
|
12518
|
+
declare const createAccessTokenExpiredResponse: (res: Response, message?: string) => void;
|
|
12519
|
+
/**
|
|
12520
|
+
* 创建刷新令牌已过期响应
|
|
12521
|
+
* @param res 响应
|
|
12522
|
+
* @param message 消息
|
|
12523
|
+
* @returns 响应
|
|
12524
|
+
* @example createRefreshTokenExpiredResponse(res)
|
|
12525
|
+
* @example createRefreshTokenExpiredResponse(res, '刷新令牌已过期')
|
|
12526
|
+
*/
|
|
12527
|
+
declare const createRefreshTokenExpiredResponse: (res: Response, message?: string) => void;
|
|
12528
|
+
/**
|
|
12529
|
+
* 创建未找到响应
|
|
12530
|
+
* @param res 响应
|
|
12531
|
+
* @param message 消息
|
|
12532
|
+
* @returns 响应
|
|
12533
|
+
* @example createNotFoundResponse(res)
|
|
12534
|
+
* @example createNotFoundResponse(res, '未找到')
|
|
12535
|
+
* @example createNotFoundResponse(res, '数据不存在')
|
|
12536
|
+
* @example createNotFoundResponse(res, '资源不存在')
|
|
12537
|
+
*/
|
|
12538
|
+
declare const createNotFoundResponse: (res: Response, message?: string) => void;
|
|
12539
|
+
/**
|
|
12540
|
+
* 创建服务器错误响应
|
|
12541
|
+
* @param res 响应
|
|
12542
|
+
* @param message 消息
|
|
12543
|
+
* @returns 响应
|
|
12544
|
+
* @example createServerErrorResponse(res)
|
|
12545
|
+
* @example createServerErrorResponse(res, '服务器错误')
|
|
12546
|
+
* @example createServerErrorResponse(res, '系统错误')
|
|
12547
|
+
* @example createServerErrorResponse(res, '未知错误')
|
|
12548
|
+
*/
|
|
12549
|
+
declare const createServerErrorResponse: (res: Response, message?: string) => void;
|
|
12550
|
+
/**
|
|
12551
|
+
* 创建参数错误响应
|
|
12552
|
+
* @param res 响应
|
|
12553
|
+
* @param message 消息
|
|
12554
|
+
* @returns 响应
|
|
12555
|
+
* @example createBadRequestResponse(res)
|
|
12556
|
+
* @example createBadRequestResponse(res, '参数错误')
|
|
12557
|
+
* @example createBadRequestResponse(res, '请求参数错误')
|
|
12558
|
+
* @example createBadRequestResponse(res, '参数不正确')
|
|
12559
|
+
*/
|
|
12560
|
+
declare const createBadRequestResponse: (res: Response, message?: string) => void;
|
|
12561
|
+
/**
|
|
12562
|
+
* 创建请求过大响应
|
|
12563
|
+
* @param res 响应
|
|
12564
|
+
* @param message 消息
|
|
12565
|
+
* @returns 响应
|
|
12566
|
+
* @example createPayloadTooLargeResponse(res)
|
|
12567
|
+
* @example createPayloadTooLargeResponse(res, '请求体过大')
|
|
12568
|
+
*/
|
|
12569
|
+
declare const createPayloadTooLargeResponse: (res: Response, message?: string) => void;
|
|
12570
|
+
/**
|
|
12571
|
+
* 创建方法不允许响应
|
|
12572
|
+
* @param res 响应
|
|
12573
|
+
* @param message 消息
|
|
12574
|
+
* @returns 响应
|
|
12575
|
+
* @example createMethodNotAllowedResponse(res)
|
|
12576
|
+
*/
|
|
12577
|
+
declare const createMethodNotAllowedResponse: (res: Response, message?: string) => void;
|
|
12578
|
+
/**
|
|
12579
|
+
* 创建禁止访问响应
|
|
12580
|
+
* @param res 响应
|
|
12581
|
+
* @param message 消息
|
|
12582
|
+
* @returns 响应
|
|
12583
|
+
* @example createForbiddenResponse(res)
|
|
12584
|
+
* @example createForbiddenResponse(res, '禁止访问')
|
|
12585
|
+
* @example createForbiddenResponse(res, '无权限访问')
|
|
12586
|
+
* @example createForbiddenResponse(res, '权限不足')
|
|
12587
|
+
*/
|
|
12588
|
+
declare const createForbiddenResponse: (res: Response, message?: string) => void;
|
|
12589
|
+
|
|
12590
|
+
/**
|
|
12591
|
+
* MIME 类型映射
|
|
12592
|
+
* @param filePath 文件路径
|
|
12593
|
+
* @returns MIME 类型
|
|
12594
|
+
*/
|
|
12595
|
+
declare const getMimeType: (filePath: string) => string;
|
|
12596
|
+
|
|
12597
|
+
/**
|
|
12598
|
+
* 鉴权中间件
|
|
12599
|
+
* @param req 请求
|
|
12600
|
+
* @param res 响应
|
|
12601
|
+
* @param next 下一个中间件
|
|
12602
|
+
*/
|
|
12603
|
+
declare const authMiddleware: RequestHandler;
|
|
11342
12604
|
|
|
11343
12605
|
/**
|
|
11344
12606
|
* @public
|
|
@@ -11478,6 +12740,13 @@ declare const render: RenderCache;
|
|
|
11478
12740
|
*/
|
|
11479
12741
|
declare const Renderer: RenderCache;
|
|
11480
12742
|
|
|
12743
|
+
/**
|
|
12744
|
+
* webui 配置
|
|
12745
|
+
* @param config 配置
|
|
12746
|
+
* @returns 配置
|
|
12747
|
+
*/
|
|
12748
|
+
declare const defineConfig: <T>(config: DefineConfig<T>) => DefineConfig<T>;
|
|
12749
|
+
|
|
11481
12750
|
/**
|
|
11482
12751
|
* 手风琴组件
|
|
11483
12752
|
*/
|
|
@@ -11663,6 +12932,18 @@ declare const divider: {
|
|
|
11663
12932
|
vertical: (key: string, config?: Partial<Omit<DividerProps, "key" | "componentType">>) => DividerProps;
|
|
11664
12933
|
};
|
|
11665
12934
|
|
|
12935
|
+
/**
|
|
12936
|
+
* cron编辑器组件
|
|
12937
|
+
*/
|
|
12938
|
+
declare const cron: {
|
|
12939
|
+
/**
|
|
12940
|
+
* 创建基础分隔线
|
|
12941
|
+
* @param key 唯一标识符
|
|
12942
|
+
* @param options 分隔线配置
|
|
12943
|
+
*/
|
|
12944
|
+
create: (key: string, options?: Omit<CronProps, "key" | "componentType">) => CronProps;
|
|
12945
|
+
};
|
|
12946
|
+
|
|
11666
12947
|
/**
|
|
11667
12948
|
* 单选框
|
|
11668
12949
|
*/
|
|
@@ -11794,48 +13075,206 @@ type Components = {
|
|
|
11794
13075
|
radio: typeof radio;
|
|
11795
13076
|
/** 多选框 */
|
|
11796
13077
|
checkbox: typeof checkbox;
|
|
13078
|
+
/** cron */
|
|
13079
|
+
cron: typeof cron;
|
|
11797
13080
|
};
|
|
13081
|
+
/** 前端配置组件 */
|
|
11798
13082
|
declare const components: Components;
|
|
11799
13083
|
type ComponentsClass = typeof divider | ReturnType<typeof input.create> | ReturnType<typeof switchComponent.create>;
|
|
11800
13084
|
|
|
11801
13085
|
/**
|
|
11802
|
-
*
|
|
13086
|
+
* 未找到匹配插件钩子
|
|
13087
|
+
*/
|
|
13088
|
+
declare const empty: ((callback: HookCallback<Message$2>, options?: HookOptions) => number) & {
|
|
13089
|
+
/**
|
|
13090
|
+
* 添加未找到匹配插件消息钩子
|
|
13091
|
+
* @param callback 消息处理回调函数
|
|
13092
|
+
* @param options 钩子配置项
|
|
13093
|
+
* @returns 钩子ID
|
|
13094
|
+
*/
|
|
13095
|
+
message(callback: HookCallback<Message$2>, options?: HookOptions): number;
|
|
13096
|
+
/**
|
|
13097
|
+
* 添加未找到匹配插件通知钩子
|
|
13098
|
+
* @param callback 通知处理回调函数
|
|
13099
|
+
* @param options 钩子配置项
|
|
13100
|
+
* @returns 钩子ID
|
|
13101
|
+
*/
|
|
13102
|
+
notice(callback: GeneralHookCallback<Notice>, options?: HookOptions): number;
|
|
13103
|
+
/**
|
|
13104
|
+
* 添加未找到匹配插件请求钩子
|
|
13105
|
+
* @param callback 请求处理回调函数
|
|
13106
|
+
* @param options 钩子配置项
|
|
13107
|
+
* @returns 钩子ID
|
|
13108
|
+
*/
|
|
13109
|
+
request(callback: GeneralHookCallback<Request>, options?: HookOptions): number;
|
|
13110
|
+
/**
|
|
13111
|
+
* 删除未找到匹配插件钩子
|
|
13112
|
+
* @param id 钩子ID
|
|
13113
|
+
*/
|
|
13114
|
+
remove(id: number): void;
|
|
13115
|
+
};
|
|
13116
|
+
|
|
13117
|
+
/**
|
|
13118
|
+
* 消息hook
|
|
13119
|
+
*/
|
|
13120
|
+
declare const message: ((callback: HookCallback<Message$2>, options?: HookOptions) => number) & {
|
|
13121
|
+
/**
|
|
13122
|
+
* 添加好友消息钩子
|
|
13123
|
+
* @param callback 消息处理回调函数
|
|
13124
|
+
* @param options 钩子配置项
|
|
13125
|
+
* @returns 钩子ID
|
|
13126
|
+
*/
|
|
13127
|
+
friend(callback: HookCallback<FriendMessage>, options?: HookOptions): number;
|
|
13128
|
+
/**
|
|
13129
|
+
* 添加群消息钩子
|
|
13130
|
+
* @param callback 消息处理回调函数
|
|
13131
|
+
* @param options 钩子配置项
|
|
13132
|
+
* @returns 钩子ID
|
|
13133
|
+
*/
|
|
13134
|
+
group(callback: HookCallback<GroupMessage>, options?: HookOptions): number;
|
|
13135
|
+
/**
|
|
13136
|
+
* 添加频道消息钩子
|
|
13137
|
+
* @param callback 消息处理回调函数
|
|
13138
|
+
* @param options 钩子配置项
|
|
13139
|
+
* @returns 钩子ID
|
|
13140
|
+
*/
|
|
13141
|
+
guild(callback: HookCallback<GuildMessage>, options?: HookOptions): number;
|
|
13142
|
+
/**
|
|
13143
|
+
* 添加临时消息钩子
|
|
13144
|
+
* @param callback 消息处理回调函数
|
|
13145
|
+
* @param options 钩子配置项
|
|
13146
|
+
* @returns 钩子ID
|
|
13147
|
+
*/
|
|
13148
|
+
direct(callback: HookCallback<DirectMessage>, options?: HookOptions): number;
|
|
13149
|
+
/**
|
|
13150
|
+
* 添加临时消息钩子
|
|
13151
|
+
* @param callback 消息处理回调函数
|
|
13152
|
+
* @param options 钩子配置项
|
|
13153
|
+
* @returns 钩子ID
|
|
13154
|
+
*/
|
|
13155
|
+
groupTemp(callback: HookCallback<GroupTempMessage>, options?: HookOptions): number;
|
|
13156
|
+
/**
|
|
13157
|
+
* 删除钩子
|
|
13158
|
+
* @param id 钩子ID
|
|
13159
|
+
*/
|
|
13160
|
+
remove(id: number): void;
|
|
13161
|
+
};
|
|
13162
|
+
|
|
13163
|
+
/** 发送消息钩子 */
|
|
13164
|
+
declare const sendMsg: {
|
|
13165
|
+
/**
|
|
13166
|
+
* 添加普通消息钩子
|
|
13167
|
+
* @param callback 消息处理回调函数
|
|
13168
|
+
* @param options 钩子配置项
|
|
13169
|
+
* @returns 钩子ID
|
|
13170
|
+
*/
|
|
13171
|
+
message: (callback: NormalMessageCallback, options?: HookOptions) => number;
|
|
13172
|
+
/**
|
|
13173
|
+
* 添加转发消息钩子
|
|
13174
|
+
* @param callback 消息处理回调函数
|
|
13175
|
+
* @param options 钩子配置项
|
|
13176
|
+
* @returns 钩子ID
|
|
13177
|
+
*/
|
|
13178
|
+
forward: (callback: ForwardMessageCallback, options?: HookOptions) => number;
|
|
13179
|
+
/**
|
|
13180
|
+
* 添加普通消息发送后钩子
|
|
13181
|
+
* @param callback 消息处理回调函数
|
|
13182
|
+
* @param options 钩子配置项
|
|
13183
|
+
* @returns 钩子ID
|
|
13184
|
+
*/
|
|
13185
|
+
afterMessage: (callback: AfterMessageCallback, options?: HookOptions) => number;
|
|
13186
|
+
/**
|
|
13187
|
+
* 添加转发消息发送后钩子
|
|
13188
|
+
* @param callback 消息处理回调函数
|
|
13189
|
+
* @param options 钩子配置项
|
|
13190
|
+
* @returns 钩子ID
|
|
13191
|
+
*/
|
|
13192
|
+
afterForward: (callback: AfterForwardMessageCallback, options?: HookOptions) => number;
|
|
13193
|
+
/**
|
|
13194
|
+
* 删除钩子
|
|
13195
|
+
* @param id 钩子ID
|
|
13196
|
+
*/
|
|
13197
|
+
remove: (id: number) => void;
|
|
13198
|
+
};
|
|
13199
|
+
|
|
13200
|
+
type Plugin = typeof cache.command[number];
|
|
13201
|
+
/**
|
|
13202
|
+
* 事件调用插件钩子
|
|
13203
|
+
*/
|
|
13204
|
+
declare const eventCall: ((callback: EventCallCallback<Message$2, Plugin>, options?: HookOptions) => number) & {
|
|
13205
|
+
/**
|
|
13206
|
+
* 添加群聊事件调用钩子
|
|
13207
|
+
* @param callback 事件处理回调函数
|
|
13208
|
+
* @param options 钩子配置项
|
|
13209
|
+
* @returns 钩子ID
|
|
13210
|
+
*/
|
|
13211
|
+
group(callback: EventCallCallback<GroupMessage, Plugin>, options?: HookOptions): number;
|
|
13212
|
+
/**
|
|
13213
|
+
* 添加频道事件调用钩子
|
|
13214
|
+
* @param callback 事件处理回调函数
|
|
13215
|
+
* @param options 钩子配置项
|
|
13216
|
+
* @returns 钩子ID
|
|
13217
|
+
*/
|
|
13218
|
+
guild(callback: EventCallCallback<GuildMessage, Plugin>, options?: HookOptions): number;
|
|
13219
|
+
/**
|
|
13220
|
+
* 添加群临时事件调用钩子
|
|
13221
|
+
* @param callback 事件处理回调函数
|
|
13222
|
+
* @param options 钩子配置项
|
|
13223
|
+
* @returns 钩子ID
|
|
13224
|
+
*/
|
|
13225
|
+
groupTemp(callback: EventCallCallback<GroupTempMessage, Plugin>, options?: HookOptions): number;
|
|
13226
|
+
/**
|
|
13227
|
+
* 添加好友事件调用钩子
|
|
13228
|
+
* @param callback 事件处理回调函数
|
|
13229
|
+
* @param options 钩子配置项
|
|
13230
|
+
* @returns 钩子ID
|
|
13231
|
+
*/
|
|
13232
|
+
friend(callback: EventCallCallback<FriendMessage, Plugin>, options?: HookOptions): number;
|
|
13233
|
+
/**
|
|
13234
|
+
* 添加私聊事件调用钩子
|
|
13235
|
+
* @param callback 事件处理回调函数
|
|
13236
|
+
* @param options 钩子配置项
|
|
13237
|
+
* @returns 钩子ID
|
|
13238
|
+
*/
|
|
13239
|
+
direct(callback: EventCallCallback<DirectMessage, Plugin>, options?: HookOptions): number;
|
|
13240
|
+
/**
|
|
13241
|
+
* 添加通知事件调用钩子
|
|
13242
|
+
* @param callback 事件处理回调函数
|
|
13243
|
+
* @param options 钩子配置项
|
|
13244
|
+
* @returns 钩子ID
|
|
13245
|
+
*/
|
|
13246
|
+
notice(callback: EventCallCallback<Notice, (typeof cache.accept)[number]>, options?: HookOptions): number;
|
|
13247
|
+
/**
|
|
13248
|
+
* 添加请求事件调用钩子
|
|
13249
|
+
* @param callback 事件处理回调函数
|
|
13250
|
+
* @param options 钩子配置项
|
|
13251
|
+
* @returns 钩子ID
|
|
13252
|
+
*/
|
|
13253
|
+
request(callback: EventCallCallback<Request, (typeof cache.accept)[number]>, options?: HookOptions): number;
|
|
13254
|
+
/**
|
|
13255
|
+
* 删除钩子
|
|
13256
|
+
* @param id 钩子ID
|
|
13257
|
+
*/
|
|
13258
|
+
remove(id: number): void;
|
|
13259
|
+
};
|
|
13260
|
+
|
|
13261
|
+
/**
|
|
13262
|
+
* 消息钩子系统类型
|
|
11803
13263
|
*/
|
|
11804
|
-
|
|
13264
|
+
type HooksType = {
|
|
11805
13265
|
/** 消息hook */
|
|
11806
|
-
message:
|
|
11807
|
-
friend(callback: HookCallback<FriendMessage>, options?: HookOptions): number;
|
|
11808
|
-
group(callback: HookCallback<GroupMessage>, options?: HookOptions): number;
|
|
11809
|
-
guild(callback: HookCallback<GuildMessage>, options?: HookOptions): number;
|
|
11810
|
-
direct(callback: HookCallback<DirectMessage>, options?: HookOptions): number;
|
|
11811
|
-
groupTemp(callback: HookCallback<GroupTempMessage>, options?: HookOptions): number;
|
|
11812
|
-
remove(id: number): void;
|
|
11813
|
-
};
|
|
13266
|
+
message: typeof message;
|
|
11814
13267
|
/** 发送消息钩子 */
|
|
11815
|
-
sendMsg:
|
|
11816
|
-
message: (callback: NormalMessageCallback, options?: HookOptions) => number;
|
|
11817
|
-
forward: (callback: ForwardMessageCallback, options?: HookOptions) => number;
|
|
11818
|
-
remove: (id: number) => void;
|
|
11819
|
-
};
|
|
13268
|
+
sendMsg: typeof sendMsg;
|
|
11820
13269
|
/** 未找到匹配插件钩子 */
|
|
11821
|
-
empty:
|
|
11822
|
-
message(callback: HookCallback<Message$2>, options?: HookOptions): number;
|
|
11823
|
-
notice(callback: GeneralHookCallback<Notice>, options?: HookOptions): number;
|
|
11824
|
-
request(callback: GeneralHookCallback<Request>, options?: HookOptions): number;
|
|
11825
|
-
remove(id: number): void;
|
|
11826
|
-
};
|
|
13270
|
+
empty: typeof empty;
|
|
11827
13271
|
/** 事件调用插件钩子 */
|
|
11828
|
-
eventCall:
|
|
11829
|
-
group(callback: EventCallCallback<GroupMessage, CommandClass<keyof MessageEventMap> | Command<keyof MessageEventMap>>, options?: HookOptions): number;
|
|
11830
|
-
guild(callback: EventCallCallback<GuildMessage, CommandClass<keyof MessageEventMap> | Command<keyof MessageEventMap>>, options?: HookOptions): number;
|
|
11831
|
-
groupTemp(callback: EventCallCallback<GroupTempMessage, CommandClass<keyof MessageEventMap> | Command<keyof MessageEventMap>>, options?: HookOptions): number;
|
|
11832
|
-
friend(callback: EventCallCallback<FriendMessage, CommandClass<keyof MessageEventMap> | Command<keyof MessageEventMap>>, options?: HookOptions): number;
|
|
11833
|
-
direct(callback: EventCallCallback<DirectMessage, CommandClass<keyof MessageEventMap> | Command<keyof MessageEventMap>>, options?: HookOptions): number;
|
|
11834
|
-
notice(callback: EventCallCallback<Notice, Accept<keyof NoticeEventMap | keyof RequestEventMap>>, options?: HookOptions): number;
|
|
11835
|
-
request(callback: EventCallCallback<Request, Accept<keyof NoticeEventMap | keyof RequestEventMap>>, options?: HookOptions): number;
|
|
11836
|
-
remove(id: number): void;
|
|
11837
|
-
};
|
|
13272
|
+
eventCall: typeof eventCall;
|
|
11838
13273
|
};
|
|
13274
|
+
/**
|
|
13275
|
+
* 消息钩子系统
|
|
13276
|
+
*/
|
|
13277
|
+
declare const hooks: HooksType;
|
|
11839
13278
|
|
|
11840
13279
|
/**
|
|
11841
13280
|
* @description 处理模板
|
|
@@ -11844,13 +13283,28 @@ declare const hooks: {
|
|
|
11844
13283
|
*/
|
|
11845
13284
|
declare const renderTpl: (options: Options) => Options;
|
|
11846
13285
|
|
|
13286
|
+
/**
|
|
13287
|
+
* ===================================================================
|
|
13288
|
+
* 主函数模块
|
|
13289
|
+
* ===================================================================
|
|
13290
|
+
*/
|
|
11847
13291
|
/**
|
|
11848
13292
|
* 获取插件
|
|
11849
13293
|
* @param type 获取插件的方式
|
|
11850
|
-
* @param isInfo
|
|
13294
|
+
* @param isInfo 是否获取插件详细信息,否则返回插件名称列表
|
|
11851
13295
|
* @param isForce 是否强制更新缓存
|
|
13296
|
+
* @param _isFirst 是否第一次获取
|
|
13297
|
+
* @returns 插件列表或详细信息
|
|
13298
|
+
* @version 1.0.0
|
|
13299
|
+
* ```json // 注意 返回非详细信息时候,插件名称会附带类型前缀
|
|
13300
|
+
* [
|
|
13301
|
+
* "npm:plugin-name",
|
|
13302
|
+
* "git:plugin-name",
|
|
13303
|
+
* "app:plugin-name"
|
|
13304
|
+
* ]
|
|
13305
|
+
* ```
|
|
11852
13306
|
*/
|
|
11853
|
-
declare const getPlugins: <T extends boolean = false>(type: GetPluginType, isInfo?: T, isForce?: boolean,
|
|
13307
|
+
declare const getPlugins: <T extends boolean = false>(type: GetPluginType, isInfo?: T, isForce?: boolean, _isFirst?: boolean) => Promise<GetPluginReturn<T>>;
|
|
11854
13308
|
|
|
11855
13309
|
/**
|
|
11856
13310
|
* @description 简单的kv存储
|
|
@@ -11892,20 +13346,20 @@ declare class SQLiteWrapper {
|
|
|
11892
13346
|
*/
|
|
11893
13347
|
declare let db: SQLiteWrapper;
|
|
11894
13348
|
|
|
11895
|
-
/**
|
|
11896
|
-
* @public
|
|
11897
|
-
* @description 日志管理器
|
|
11898
|
-
*/
|
|
11899
|
-
declare let logger: ReturnType<typeof createInnerLogger>;
|
|
11900
13349
|
/**
|
|
11901
13350
|
* @public
|
|
11902
13351
|
* @description Redis数据库
|
|
11903
13352
|
*/
|
|
11904
13353
|
declare let redis: Client;
|
|
13354
|
+
/** Redis 客户端类型 */
|
|
13355
|
+
type Client = RedisClientType & {
|
|
13356
|
+
id: 'redis' | 'mock';
|
|
13357
|
+
};
|
|
13358
|
+
|
|
11905
13359
|
/**
|
|
11906
13360
|
* @public
|
|
11907
13361
|
* @description 启动框架
|
|
11908
13362
|
*/
|
|
11909
13363
|
declare const start: () => Promise<void>;
|
|
11910
13364
|
|
|
11911
|
-
export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, BATCH_UPDATE_PLUGINS_ROUTER, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CreatePty, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileOptions, type DownloadFileResponse, EVENT_COUNT, EXIT_ROUTER, type ElementTypes, type Elements, type Env, type Event, type EventCallCallback, type EventCallHookItem, type EventParent, type EventToSubEvent, type ExecOptions, type ExecReturn, type ExecType, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, type GeneralHookCallback, type GeneralHookItem, type GetAtAllCountResponse, type GetBot, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginReturn, type GetPluginType, type GiftElement, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, type Handler, type HandlerType, type HonorInfoList, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, type ImageElement, type ImageSegment, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type JwtVerifyBase, type JwtVerifyError, type JwtVerifyExpired, type JwtVerifyResult, type JwtVerifySuccess, type JwtVerifyUnauthorized, type KarinButton, type KeyboardElement, LOGIN_ROUTER, type LocalApiResponse, type LocationElement, type LocationSegment, type Log, type Logger, type LoggerExpand, type LoggerLevel, type LoggerOptions, type LongMsgElement, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NetworkStatus, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type OnlinePluginInfo, type Option, type Options, PING_ROUTER, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PkgData, type PkgEnv, type PkgInfo, Plugin, type PluginFile, type PluginFncTypes, type PluginLists, type PluginOptions, type PluginRule, type PluginUpdateInfo, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type Render, type RenderResult, Renderer, type Renders$1 as Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SAVE_CONFIG_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type Snapka, type SnapkaResult, type SrcReply, type SwitchField, type SwitchProps, type SwitchResult, type Task, type TerminalInstance, type TerminalShell, type TextElement, type TextField, type TextSegment, type TitleField, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, type UnionMessage, type UnregisterBot, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, base64, buffer, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact$1 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createClient, createDirectMessage, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createHttp, createInnerLogger, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, db, debug, karin as default, divider, downFile, errorToString, exec, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getFiles, getHash, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTime, handler$1 as handler, hooks, importModule, initOneBot, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPlugin, isPublic, isRoot, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, pkgRoot, qqbotToKarin, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, router, satisfies, save, type screenshot, segment, sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
|
|
13365
|
+
export { type Accept, type AccordionItemProps, type AccordionKV, type AccordionProProps, type AccordionProResult, type AccordionProps, type AccordionResult, type AccountInfo, type Adapter, AdapterBase, type AdapterCommunication, type AdapterInfo, AdapterOneBot, type AdapterOptions, type AdapterPlatform, type AdapterProtocol, type AdapterStandard, type AdapterType, type Adapters, type AddDependenciesParams, type AddTaskResult, type AfterForwardMessageCallback, type AfterMessageCallback, type AllPluginMethods, type AnonymousSegment, type Apps, type ArrayField, type AtElement, type AtSegment, type Author, BASE_ROUTER, BATCH_UPDATE_PLUGINS_ROUTER, type BaseContact, BaseEvent, type BaseEventOptions, type BaseEventType, type BaseForwardCallback, type BaseMessageCallback, type BasketballElement, Bot, type BoundingBox, type BubbleFaceElement, type Button, type ButtonElement, CHECK_PLUGIN_ROUTER, CLOSE_TERMINAL_ROUTER, CONSOLE_ROUTER, CREATE_TERMINAL_ROUTER, type Cache, type CacheEntry, type CheckboxField, type CheckboxGroupProps, type CheckboxProps, type CheckboxResult, type Children, type CmdFnc, type Command, type CommandClass, type ComponentConfig, type ComponentProps, type ComponentType, type Components, type ComponentsClass, type Config, type Contact, type ContactElement, type ContactSegment, type Count, type CreateGroupFolderResponse, type CreatePty, type CreateTask, type CreateTaskParams, type CreateTaskResult, type CronProps, type CustomMusicElement, type CustomMusicSegment, type CustomNodeElement, type CustomNodeSegments, type DbStreamStatus, type DbStreams, type DefineConfig, type DependenciesManage, type DependenciesManageBase, type Dependency, type DiceElement, type DiceSegment, type DirectContact, DirectMessage, type DirectMessageOptions, type DirectNodeElement, type DirectNodeSegment, type DirectSender, type DividerField, type DividerProps, type DownloadFileErrorResult, type DownloadFileOptions, type DownloadFileResponse, type DownloadFileResult, type DownloadFileSuccessResult, type DownloadFilesOptions, EVENT_COUNT, EXIT_ROUTER, type ElementTypes, type Elements, type Env, type Event, type EventCallCallback, type EventCallHookItem, type EventParent, type EventToSubEvent, type ExecOptions$1 as ExecOptions, type ExecReturn, type ExecType, type ExtendedAxiosRequestConfig, FILE_CHANGE, type FaceElement, type FaceSegment, type FieldType, type FileElement, type FileList, type FileListMap, type FileSegment, type FileToUrlHandler, type FileToUrlResult, type FormField, type ForwardMessageCallback, type ForwardOptions, type ForwardSegment, type FriendContact, type FriendData, FriendDecreaseNotice, type FriendDecreaseOptions, FriendIncreaseNotice, type FriendIncreaseOptions, FriendMessage, type FriendMessageOptions, type FriendNoticeEventMap, type FriendRequestEventMap, type FriendRequestOptions, type FriendSender, GET_BOTS_ROUTER, GET_CONFIG_ROUTER, GET_DEPENDENCIES_LIST_ROUTER, GET_LOADED_COMMAND_PLUGIN_CACHE_LIST_ROUTER, GET_LOCAL_PLUGIN_LIST_ROUTER, GET_LOG_FILE_LIST_ROUTER, GET_LOG_FILE_ROUTER, GET_LOG_ROUTER, GET_NETWORK_STATUS_ROUTER, GET_NPMRC_LIST_ROUTER, GET_NPM_BASE_CONFIG_ROUTER, GET_NPM_CONFIG_ROUTER, GET_ONLINE_PLUGIN_LIST_ROUTER, GET_PLUGIN_APPS_ROUTER, GET_PLUGIN_CONFIG_ROUTER, GET_PLUGIN_FILE_ROUTER, GET_PLUGIN_LIST_PLUGIN_ADMIN_ROUTER, GET_PLUGIN_LIST_ROUTER, GET_PLUGIN_MARKET_LIST_ROUTER, GET_TASK_LIST_ROUTER, GET_TASK_STATUS_ROUTER, GET_TERMINAL_LIST_ROUTER, GET_UPDATABLE_PLUGINS_ROUTER, GET_WEBUI_PLUGIN_LIST_ROUTER, GET_WEBUI_PLUGIN_VERSIONS_ROUTER, type GeneralHookCallback, type GeneralHookItem, type GetAtAllCountResponse, type GetBot, type GetCommitHashOptions, type GetConfigRequest, type GetConfigResponse, type GetGroupFileListResponse, type GetGroupFileSystemInfoResponse, type GetGroupHighlightsResponse, type GetGroupInfo, type GetGroupMemberInfo, type GetGroupMuteListResponse, type GetMsg, type GetPluginLocalOptions, type GetPluginLocalReturn, type GetPluginReturn, type GetPluginType, type GiftElement, type GitLocalBranches, type GitPullOptions, type GitPullResult, type GitRemoteBranches, type GithubConfig, type GoToOptions, GroupAdminChangedNotice, type GroupAdminChangedOptions, GroupApplyRequest, type GroupApplyRequestOptions, GroupCardChangedNotice, type GroupCardChangedOptions, type GroupContact, type GroupData, GroupFileUploadedNotice, type GroupFileUploadedOptions, GroupHlightsChangedNotice, type GroupHlightsChangedOptions, GroupHonorChangedNotice, type GroupHonorChangedOptions, type GroupInfo, GroupInviteRequest, type GroupInviteRequestOptions, GroupLuckKingNotice, type GroupLuckKingOptions, GroupMemberBanNotice, type GroupMemberBanOptions, type GroupMemberData, GroupMemberDecreaseNotice, type GroupMemberDecreaseOptions, GroupMemberIncreaseNotice, type GroupMemberIncreaseOptions, type GroupMemberInfo, GroupMemberTitleUpdatedNotice, type GroupMemberUniqueTitleChangedOptions, GroupMessage, type GroupMessageOptions, GroupMessageReactionNotice, type GroupMessageReactionOptions, GroupNotice, type GroupNoticeEventMap, GroupPokeNotice, type GroupPokeOptions, GroupRecallNotice, type GroupRecallOptions, type GroupRequestEventMap, type GroupSender, GroupSignInNotice, type GroupSignInOptions, type GroupTempContact, GroupTempMessage, type GroupTempMessageOptions, type GroupTempSender, GroupWholeBanNotice, type GroupWholeBanOptions, type Groups, type GroupsObjectValue, type GuildContact, GuildMessage, type GuildMessageOptions, type GuildSender, HTTPStatusCode, type Handler, type HandlerType, type HonorInfoList, type HookCache, type HookCallback, type HookEmitForward, type HookEmitMessage, type HookNext, type HookOptions, type HooksType, INSTALL_PLUGIN_ROUTER, INSTALL_WEBUI_PLUGIN_ROUTER, IS_PLUGIN_CONFIG_EXIST_ROUTER, type Icon, type ImageElement, type ImageSegment, type ImportModuleResult, type InputGroupProps, type InputProps, type InputResult, type JsonElement, type JsonSegment, type JwtVerifyBase, type JwtVerifyError, type JwtVerifyExpired, type JwtVerifyResult, type JwtVerifySuccess, type JwtVerifyUnauthorized, type KarinButton, type KarinPluginAppsType, type KeyboardElement, LOGIN_ROUTER, type LoadPluginResult, type LoadedPluginCacheList, type LocalApiResponse, type LocationElement, type LocationSegment, type Log, Logger, LoggerLevel, type LongMsgElement, MANAGE_DEPENDENCIES_ROUTER, type MarkdownElement, type MarkdownTplElement, type MarketFaceElement, type Message$2 as Message, MessageBase, type MessageEventMap, type MessageEventSub, type MessageHookItem, type MessageOptions, type MessageResponse, type MetaEventBase, type MusicElement, type MusicPlatform, type MusicSegment, type NetworkStatus, type NodeElement, type NormalMessageCallback, type Notice, type NoticeAndRequest, NoticeBase, type NoticeEventMap, type NoticeEventSub, type NoticeOptions, type NpmBaseConfigResponse, type NpmrcFileResponse, type NumberField, type OB11AllEvent, OB11ApiAction, type OB11ApiParams, type OB11ApiRequest, OB11Event, type OB11EventBase, type OB11FriendSender, type OB11GroupMessage, type OB11GroupSender, type OB11GroupTempMessage, type OB11Message, OB11MessageSubType, OB11MessageType, type OB11Meta, type OB11NodeSegment, type OB11Notice, type OB11NoticeBaseType, OB11NoticeType, type OB11OtherFriendMessage, type OB11PrivateMessage, type OB11Request, type OB11RequestBaseType, OB11RequestType, type OB11Segment, type OB11SegmentBase, type OB11SegmentType, OB11Sex, type OB11serInfo, type ObjectArrayField, type ObjectField, type OneBot11FriendAdd, type OneBot11FriendRecall, type OneBot11FriendRequest, type OneBot11GroupAdmin, type OneBot11GroupBan, type OneBot11GroupCard, type OneBot11GroupDecrease, type OneBot11GroupEssence, type OneBot11GroupIncrease, type OneBot11GroupMessageReaction, type OneBot11GroupMessageReactionLagrange, type OneBot11GroupRecall, type OneBot11GroupRequest, type OneBot11GroupUpload, type OneBot11Heartbeat, type OneBot11Honor, type OneBot11Lifecycle, type OneBot11LuckyKing, type OneBot11Poke, type Option, type Options, PING_ROUTER, PLUGIN_ADMIN_ROUTER, type PM2, type Package, type Parser, type PasmsgElement, type Permission, type PingRequestResult, type PkgData, type PkgEnv, type PkgInfo, Plugin$1 as Plugin, type PluginAdminCustomInstall, type PluginAdminCustomInstallApp, type PluginAdminInstall, type PluginAdminListResponse, type PluginAdminMarketInstall, type PluginAdminMarketInstallApp, type PluginAdminParams, type PluginAdminResult, type PluginAdminUninstall, type PluginAdminUpdate, type PluginFile, type PluginFncTypes, type PluginLists, type PluginMarketAuthor, type PluginMarketLocalBase, type PluginMarketLocalOptions, type PluginMarketOptions, type PluginMarketRequest, type PluginMarketResponse, type PluginOptions, type PluginRule, type PluginUpdateInfo, type PnpmDependencies, type PnpmDependency, type Point, type PokeSegment, PrivateApplyRequest, type PrivateApplyRequestOptions, PrivateFileUploadedNotice, type PrivateFileUploadedOptions, PrivatePokeNotice, type PrivatePokeOptions, PrivateRecallNotice, type PrivateRecallOptions, type Privates, type PrivatesObjectValue, type PuppeteerLifeCycleEvent, type QQBotButton, type QQButtonTextType, type QQGroupFileInfo, type QQGroupFolderInfo, type QQGroupHonorInfo, RECV_MSG, REFRESH_ROUTER, RESTART_ROUTER, type RaceResult, type Radio, type RadioField, type RadioGroupProps, type RadioResult, type RawElement, type ReadyMusicElement, ReceiveLikeNotice, type ReceiveLikeOptions, type RecordElement, type RecordSegment, type Redis, type RemoveDependenciesParams, type Render, type RenderResult, Renderer, type Renders$1 as Renders, type Reply, type ReplyElement, type ReplySegment, type Request, RequestBase, type RequestEventMap, type RequestEventSub, type RequestOptions, type RequireFunction, type RequireFunctionSync, type RequireOptions, type Role, type RpsElement, type RpsSegment, SAVE_CONFIG_ROUTER, SAVE_NPMRC_ROUTER, SAVE_PLUGIN_CONFIG_ROUTER, SEND_MSG, SET_LOG_LEVEL_ROUTER, SYSTEM_INFO_ROUTER, SYSTEM_STATUS_KARIN_ROUTER, SYSTEM_STATUS_ROUTER, SYSTEM_STATUS_WS_ROUTER, type SandBoxAccountInfo, type SandboxMsgRecord, type SandboxSendApi, type SandboxSendSendFriendMsg, type SandboxSendSendGroupMsg, type SandboxSendSendMsg, type SaveConfigResponse, type SaveResult, type Scene, type ScreenshotClip, type ScreenshotOptions, type SectionField, type Segment, type SelectField, type SendElement, type SendForwardMessageResponse, type SendMessage, type SendMsgHookItem, type SendMsgResults, type Sender, type SenderBase, type SenderGroup, type Sex, type ShakeSegment, type ShareElement, type ShareSegment, type Snapka, type SnapkaResult, type SrcReply, type StandardResult, type SwitchField, type SwitchProps, type SwitchResult, TASK_DELETE_ROUTER, TASK_LIST_ROUTER, TASK_LOGS_ROUTER, TASK_RUN_ROUTER, type Task, type TaskCallbacks, type TaskEntity, type TaskExecutor, type TaskFilter, type TaskStatus, type TaskType, type TerminalInstance, type TerminalShell, type TestNetworkRequestDetail, type TextElement, type TextField, type TextSegment, type TitleField, UNINSTALL_PLUGIN_ROUTER, UNINSTALL_WEBUI_PLUGIN_ROUTER, UPDATE_CORE_ROUTER, UPDATE_PLUGIN_ROUTER, UPDATE_TASK_STATUS_ROUTER, UPDATE_WEBUI_PLUGIN_VERSION_ROUTER, type UnionMessage, type UnregisterBot, type UpgradeDependenciesParams, type UserInfo, type ValidationRule, type ValueType, type VideoElement, type VideoSegment, WS_CLOSE, WS_CLOSE_ONEBOT, WS_CLOSE_PUPPETEER, WS_CLOSE_SANDBOX, WS_CONNECTION, WS_CONNECTION_ONEBOT, WS_CONNECTION_PUPPETEER, WS_CONNECTION_SANDBOX, WS_CONNECTION_TERMINAL, WS_SNAPKA, type WaitForOptions, Watch, Watcher, type WeatherElement, type XmlElement, type XmlSegment, type YamlComment, YamlEditor, type YamlValue, absPath, accordion, accordionItem, accordionPro, app, applyComments, authMiddleware, base64, buffer, buildGithub, buttonHandle, callRender, changelog, checkGitPluginUpdate, checkPkgUpdate, clearRequire, clearRequireFile, comment, index$1 as common, components, index as config, contact$1 as contact, contactDirect, contactFriend, contactGroup, contactGroupTemp, contactGuild, copyConfig, copyConfigSync, copyFiles, copyFilesSync, createAccessTokenExpiredResponse, createBadRequestResponse, createClient, createDirectMessage, createForbiddenResponse, createFriendDecreaseNotice, createFriendIncreaseNotice, createFriendMessage, createGroupAdminChangedNotice, createGroupApplyRequest, createGroupCardChangedNotice, createGroupFileUploadedNotice, createGroupHlightsChangedNotice, createGroupHonorChangedNotice, createGroupInviteRequest, createGroupLuckKingNotice, createGroupMemberAddNotice, createGroupMemberBanNotice, createGroupMemberDelNotice, createGroupMemberTitleUpdatedNotice, createGroupMessage, createGroupMessageReactionNotice, createGroupPokeNotice, createGroupRecallNotice, createGroupSignInNotice, createGroupTempMessage, createGroupWholeBanNotice, createGuildMessage, createHttp, createINIParser, createInnerLogger, createMethodNotAllowedResponse, createNotFoundResponse, createPayloadTooLargeResponse, createPluginDir, createPrivateApplyRequest, createPrivateFileUploadedNotice, createPrivatePokeNotice, createPrivateRecallNotice, createRawMessage, createReceiveLikeNotice, createRefreshTokenExpiredResponse, createResponse, createServerErrorResponse, createSuccessResponse, createTaskDatabase, createUnauthorizedResponse, cron, db, debug, karin as default, defineConfig, divider, downFile, downloadFile, errorToString, exec, executeTask, existToMkdir, existToMkdirSync, exists, existsSync, ffmpeg, ffplay, ffprobe, fs as file, fileToUrl, fileToUrlHandlerKey, filesByExt, formatPath, formatTime$1 as formatTime, index$3 as fs, getAllBot, getAllBotID, getAllBotList, getAllFiles, getAllFilesSync, getBot, getBotCount, getCommit, getDefaultBranch, getFastGithub, getFastRegistry, getFiles, getHash, getLocalBranches, getLocalCommitHash, getMimeType, getPackageJson, getPid, getPkgVersion, getPluginInfo, getPlugins, getRelPath, getRemoteBranches, getRemoteCommitHash, getRemotePkgVersion, getRender, getRenderCount, getRenderList, getRequestIp, getTaskCallback, getTaskDatabase, getTime, gitPull, handler$1 as handler, hooks, importModule, ini, initOneBot, initTaskSystem, input, isClass, isDir, isDirSync, isDocker, isFile, isFileSync, isIPv4Loop, isIPv6Loop, isLinux, isLocalRequest, isLoopback, isMac, isPathEqual, isPlugin, isPublic, isRoot, isSubPath, isWin, json$1 as json, karin, karinToQQBot, key, lock, lockMethod, lockProp, log, logger, logs, makeForward, makeMessage, type messageType, mkdir, mkdirSync, parseChangelog, parseGithubUrl, pingRequest, pkgRoot, qqbotToKarin, raceRequest, randomStr, range, read, readFile, readJson, readJsonSync, redis, registerBot, registerRender, removeTaskCallback, render, renderHtml, renderMultiHtml, renderTpl, requireFile, requireFileSync, restart, restartDirect, rmSync, router, satisfies, save, type screenshot, segment, sendMsg$1 as sendMsg, sender, senderDirect, senderFriend, senderGroup, senderGroupTemp, senderGuild, sep, server, setTaskCallback, setTaskDatabase, splitPath, start, stream, stringifyError, switchComponent, index$2 as system, taskAdd, taskExists, taskGet, taskList, taskSystem, taskUpdateLogs, taskUpdateStatus, unregisterBot, unregisterRender, updateAllGitPlugin, updateAllPkg, updateGitPlugin, updatePkg, updateTaskLogs, updateTaskStatus, uptime$1 as uptime, urlToPath, watch, watchAndMerge, write, writeJson, writeJsonSync, yaml };
|