Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cec011bdfa | ||
|
|
9cbaafe806 | ||
|
|
0ddf21a2f5 | ||
|
|
b9dcedacf5 | ||
|
|
b42b6c3cf0 | ||
|
|
740d2118f1 | ||
|
|
77bdcfd249 | ||
|
|
896e1c209a | ||
|
|
cff07c7ce5 | ||
|
|
5c04b799a6 | ||
|
|
1fc4655ae1 | ||
|
|
eb07cdb715 | ||
|
|
964fd98914 | ||
|
|
f9764c9559 | ||
|
|
b71a4913eb | ||
|
|
f961830836 | ||
|
|
dd8b5f84a6 | ||
|
|
48ffd5597a | ||
|
|
1b73d68cbf | ||
|
|
5fec649425 | ||
|
|
052e7fa2b3 | ||
|
|
04e425d17a | ||
|
|
cbe0506577 | ||
|
|
32ec097f51 | ||
|
|
53f27ea9e2 | ||
|
|
41d94cd5e2 | ||
|
|
285d352bc8 | ||
|
|
a3b3836b8a | ||
|
|
b9f61cc0ee | ||
|
|
9998207346 | ||
|
|
4f47af233f | ||
|
|
6aadc2402d | ||
|
|
eb937b29e4 | ||
|
|
f44aca9a2f | ||
|
|
c34812bc9c | ||
|
|
d93b430034 | ||
|
|
c91e1378cf | ||
|
|
cad567dc3f | ||
|
|
82c8de00d0 | ||
|
|
f17abccfdc | ||
|
|
35af50bb73 | ||
|
|
5c72f771c3 | ||
|
|
62c9246368 | ||
|
|
d622178b25 | ||
|
|
9887eb8565 | ||
|
|
2f8569f30c | ||
|
|
82d0c51716 | ||
|
|
37fb2d68d7 | ||
|
|
a240f93784 | ||
|
|
172a75b514 | ||
|
|
beef1233fa | ||
|
|
8f69e2424a | ||
|
|
f3156b1843 | ||
|
|
61a16b44a4 | ||
|
|
7b17ef44dd | ||
|
|
2c166299a3 | ||
|
|
75d2611eda | ||
|
|
e2d2e65620 | ||
|
|
f479fccf3e | ||
|
|
45652612b4 | ||
|
|
54266f97f8 | ||
|
|
687a5f5708 | ||
|
|
3dab2b4361 | ||
|
|
74be268dbe |
No files matched your search
@@ -10,7 +10,7 @@ permissions: write-all
|
||||
|
||||
env:
|
||||
OPENROUTER_API_URL: https://91vip.futureppo.top/v1/chat/completions
|
||||
OPENROUTER_MODEL: "gemini-3-flash-preview"
|
||||
OPENROUTER_MODEL: "deepseek-v3.2-chat"
|
||||
RELEASE_NAME: "NapCat"
|
||||
|
||||
jobs:
|
||||
@@ -396,7 +396,7 @@ jobs:
|
||||
--arg system "$SYSTEM_PROMPT" \
|
||||
--arg user "$USER_CONTENT" \
|
||||
--arg model "$OPENROUTER_MODEL" \
|
||||
'{model: $model, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.2, max_tokens:1500}')
|
||||
'{model: $model, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.2, max_tokens:5000}')
|
||||
|
||||
echo "=== OpenRouter request body ==="
|
||||
echo "$BODY" | jq .
|
||||
@@ -458,24 +458,23 @@ jobs:
|
||||
pnpm i
|
||||
pnpm run build:openapi
|
||||
|
||||
# 读取并压缩 openapi.json 内容
|
||||
OPENAPI_CONTENT=$(cat packages/napcat-schema/openapi.json | tr -d '\n\r\t' | sed 's/ */ /g' | sed 's/"/\\"/g')
|
||||
|
||||
# 构建 JSON 数据
|
||||
JSON_DATA=$(printf '{
|
||||
"input": "%s",
|
||||
"options": {
|
||||
# 使用 jq 安全地构建大型 JSON 数据并保存到文件
|
||||
jq -n --rawfile input packages/napcat-schema/dist/openapi.json \
|
||||
'{
|
||||
input: $input,
|
||||
options: {
|
||||
"endpointOverwriteBehavior": "OVERWRITE_EXISTING",
|
||||
"schemaOverwriteBehavior": "OVERWRITE_EXISTING",
|
||||
"updateFolderOfChangedEndpoint": true,
|
||||
"moduleId": 1140714,
|
||||
"deleteUnmatchedResources": true
|
||||
}
|
||||
}' "$OPENAPI_CONTENT")
|
||||
}' > apifox_payload.json
|
||||
|
||||
# 通过文件形式发送数据,避免命令行长度限制
|
||||
curl --location -g --request POST 'https://api.apifox.com/v1/projects/5348325/import-openapi?locale=zh-CN' \
|
||||
--header 'X-Apifox-Api-Version: 2024-03-28' \
|
||||
--header 'Authorization: Bearer $APIFOX_TOKEN' \
|
||||
--header "Authorization: Bearer $APIFOX_TOKEN" \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw "$JSON_DATA"
|
||||
--data-binary @apifox_payload.json
|
||||
|
||||
@@ -10,6 +10,9 @@ devconfig/*
|
||||
!.vscode/extensions.json
|
||||
.idea/*
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
# Build
|
||||
*.db
|
||||
checkVersion.sh
|
||||
|
||||
@@ -5,47 +5,41 @@
|
||||
|
||||
_Modern protocol-side framework implemented based on NTQQ._
|
||||
|
||||
> 云起兮风生,心向远方兮路未曾至.
|
||||
> Where clouds rise and winds are born, the heart yearns for distant lands yet untraveled.
|
||||
|
||||
English | [简体中文](./docs/README_zh-CN.md) | [繁體中文](./docs/README_zh-TW.md) | [日本語](./docs/README_ja.md) | [한국어](./docs/README_ko.md) | [Русский](./docs/README_ru.md) | [العربية](./docs/README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## New Feature
|
||||
|
||||
在 v4.8.115+ 版本开始
|
||||
|
||||
1. NapCatQQ 支持 [Stream Api](https://napneko.github.io/develop/file)
|
||||
2. NapCatQQ 推荐 message_id/user_id/group_id 均使用字符串类型
|
||||
|
||||
- [1] 解决 Docker/跨设备/大文件 的多媒体上下传问题
|
||||
- [2] 采用字符串可以解决扩展到int64的问题,同时也可以解决部分语言(如JavaScript)对大整数支持不佳的问题,增加极少成本。
|
||||
## Notice
|
||||
NapCat is currently looking for a new primary maintainer. Please email nanaeonn@outlook.com if you are interested. No public community groups will be established during this period, but NapCat will continue to receive regular updates.
|
||||
|
||||
## Welcome
|
||||
|
||||
- NapCatQQ is a modern implementation of the Bot protocol based on NTQQ.
|
||||
- NapCatQQ 是现代化的基于 NTQQ 的 Bot 协议端实现
|
||||
|
||||
## Feature
|
||||
## Features
|
||||
|
||||
- **Easy to Use**
|
||||
- 作为初学者能够轻松使用.
|
||||
- Beginners can get started effortlessly.
|
||||
- **Quick and Efficient**
|
||||
- 在低内存操作系统长时运行.
|
||||
- Runs for extended periods on low-memory systems.
|
||||
- **Rich API Interface**
|
||||
- 完整实现了大部分标准接口.
|
||||
- Fully implements most standard interfaces.
|
||||
- **Stable and Reliable**
|
||||
- 持续稳定的开发与维护.
|
||||
- Continuous and stable development and maintenance.
|
||||
|
||||
## Quick Start
|
||||
|
||||
可前往 [Release](https://github.com/NapNeko/NapCatQQ/releases/) 页面下载最新版本
|
||||
Download the latest version from the [Release](https://github.com/NapNeko/NapCatQQ/releases/) page.
|
||||
|
||||
**首次使用**请务必查看如下文档看使用教程
|
||||
**First-time users** should make sure to read the documentation below for a usage guide.
|
||||
|
||||
> 项目非盈利,涉及 对接问题/基础问题/下层框架问题 请自行搜索解决,本项目社区不提供此类解答。
|
||||
> This is a non-profit project. For integration issues, basic questions, or underlying framework issues, please search for solutions on your own — this project's community does not provide such support.
|
||||
|
||||
## Link
|
||||
## Links
|
||||
|
||||
| Docs | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
@@ -53,37 +47,31 @@ _Modern protocol-side framework implemented based on NTQQ._
|
||||
| Docs | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| QQ Group | [](https://qm.qq.com/q/CMmPbGw0jA) | [](https://qm.qq.com/q/8zJMLjqy2Y) | [](https://qm.qq.com/q/CMmPbGw0jA) | [](https://qm.qq.com/q/I6LU87a0Yq) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
| Telegram | [](https://t.me/napcatqq) |
|
||||
|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> 请不要在其余社区提及本项目(包括其余协议端/相关应用端项目)引发争论,如有建议到达官方交流群讨论或PR。
|
||||
> Please do not mention this project in other communities (including other protocol-side or related application-side projects) to avoid disputes. If you have suggestions, please discuss them in the official group or submit a PR.
|
||||
|
||||
## Thanks
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 对本项目的大力支持 参考部分代码 已获授权
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — Great support for this project; some code was referenced (with permission)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 是完美适配本项目的LLM Bot框架 在此推荐一下
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — An LLM Bot framework that perfectly integrates with this project
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) 一只赛博群友 麦麦 Bot框架 在此推荐一下
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — A cyber companion Bot framework
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) 基于NapCat的消息导出工具 在此推荐一下
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — A message export tool based on NapCat
|
||||
|
||||
- 不过最最重要的 还是需要感谢屏幕前的你哦~
|
||||
- And most importantly, thank you — the person reading this right now~
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
本项目采用 混合协议 开源,因此使用本项目时,你需要注意以下几点:
|
||||
This project is open-sourced under a hybrid license. When using this project, please note the following:
|
||||
|
||||
1. 第三方库代码或修改部分遵循其原始开源许可.
|
||||
2. 本项目获取部分项目授权而不受部分约束
|
||||
2. 项目其余逻辑代码采用[本仓库开源许可](./LICENSE).
|
||||
1. Third-party library code or modified portions follow their original open-source licenses.
|
||||
2. This project has obtained authorization from certain projects and is not subject to some restrictions.
|
||||
3. The remaining logic code of the project is governed by the [repository license](./LICENSE).
|
||||
|
||||
**本仓库仅用于提高易用性,实现消息推送类功能,此外,禁止任何项目未经仓库主作者授权基于 NapCat 代码开发。使用请遵守当地法律法规,由此造成的问题由使用者和提供违规使用教程者负责。**
|
||||
**This repository is solely intended to improve usability and implement message push features. Furthermore, developing any project based on NapCat code without prior authorization from the repository's main author is prohibited. Please comply with local laws and regulations when using this project. Any issues arising from misuse are the responsibility of the user and anyone providing tutorials for unauthorized use.**
|
||||
@@ -0,0 +1,81 @@
|
||||
<div dir="rtl">
|
||||
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=left />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_إطار عمل حديث على جانب البروتوكول مبني على NTQQ._
|
||||
|
||||
> حيث تنهض السحب وتولد الرياح، يتوق القلب إلى أراضٍ بعيدة لم تُسلك بعد.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Русский](./README_ru.md) | العربية
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## إعلان
|
||||
يبحث NapCat حالياً عن مشرف رئيسي جديد. يرجى التواصل عبر البريد الإلكتروني nanaeonn@outlook.com. لن يتم إنشاء مجموعات مجتمع عامة خلال هذه الفترة، لكن NapCat يضمن استمرار التحديثات المنتظمة.
|
||||
|
||||
## مرحباً
|
||||
|
||||
- NapCatQQ هو تطبيق حديث لبروتوكول Bot مبني على NTQQ
|
||||
|
||||
## المميزات
|
||||
|
||||
- **سهل الاستخدام**
|
||||
- يمكن للمبتدئين البدء بسهولة.
|
||||
- **سريع وفعال**
|
||||
- يعمل لفترات طويلة على أنظمة ذات ذاكرة منخفضة.
|
||||
- **واجهة API غنية**
|
||||
- تنفيذ كامل لمعظم الواجهات القياسية.
|
||||
- **مستقر وموثوق**
|
||||
- تطوير وصيانة مستمرة ومستقرة.
|
||||
|
||||
## البداية السريعة
|
||||
|
||||
قم بتنزيل أحدث إصدار من صفحة [Release](https://github.com/NapNeko/NapCatQQ/releases/)
|
||||
|
||||
**للمستخدمين لأول مرة** تأكد من قراءة الوثائق أدناه للحصول على دليل الاستخدام
|
||||
|
||||
> هذا مشروع غير ربحي. للمشاكل المتعلقة بالتكامل والأسئلة الأساسية ومشاكل إطار العمل الأساسي، يرجى البحث عن الحلول بنفسك — مجتمع هذا المشروع لا يقدم مثل هذا الدعم.
|
||||
|
||||
## الروابط
|
||||
|
||||
| الوثائق | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| الوثائق | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> يرجى عدم ذكر هذا المشروع في مجتمعات أخرى (بما في ذلك مشاريع البروتوكول الأخرى / مشاريع التطبيقات ذات الصلة) لتجنب الخلافات. إذا كانت لديك اقتراحات، يرجى مناقشتها في المجموعة الرسمية أو تقديم PR.
|
||||
|
||||
## شكر وتقدير
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — دعم كبير لهذا المشروع؛ تمت الإشارة إلى بعض الأكواد (بإذن)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — إطار عمل LLM Bot متوافق تماماً مع هذا المشروع
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — إطار عمل Bot رفيق سيبراني
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — أداة تصدير الرسائل مبنية على NapCat
|
||||
|
||||
- والأهم من ذلك كله، شكراً لك — أنت الذي تقرأ هذا الآن~
|
||||
|
||||
---
|
||||
|
||||
## الرخصة
|
||||
|
||||
هذا المشروع مفتوح المصدر بموجب رخصة هجينة. عند استخدام هذا المشروع، يرجى ملاحظة ما يلي:
|
||||
|
||||
1. كود المكتبات الخارجية أو الأجزاء المعدلة تخضع لرخصها مفتوحة المصدر الأصلية.
|
||||
2. حصل هذا المشروع على إذن من بعض المشاريع ولا يخضع لبعض القيود.
|
||||
3. باقي الكود المنطقي للمشروع يخضع [لرخصة هذا المستودع](../LICENSE).
|
||||
|
||||
**هذا المستودع مخصص فقط لتحسين سهولة الاستخدام وتنفيذ ميزات دفع الرسائل. علاوة على ذلك، يُحظر تطوير أي مشروع بناءً على كود NapCat دون إذن مسبق من المؤلف الرئيسي للمستودع. يرجى الامتثال للقوانين واللوائح المحلية عند الاستخدام. أي مشاكل ناتجة عن سوء الاستخدام تقع على عاتق المستخدم ومن يقدم تعليمات الاستخدام غير المصرح به.**
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,77 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_NTQQをベースにした最新のプロトコル側フレームワーク._
|
||||
|
||||
> 雲起きて風生じ、心は遠方を向けど路は未だ至らず.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | 日本語 | [한국어](./README_ko.md) | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## お知らせ
|
||||
NapCat は現在、新しいメインメンテナーを募集しています。nanaeonn@outlook.com までメールでご連絡ください。この期間中、公開コミュニティグループは設立しませんが、NapCat は通常通りの更新を保証します。
|
||||
|
||||
## ようこそ
|
||||
|
||||
- NapCatQQ は NTQQ をベースにした最新の Bot プロトコル側実装です
|
||||
|
||||
## 特徴
|
||||
|
||||
- **簡単に使える**
|
||||
- 初心者でも簡単に使用できます.
|
||||
- **高速で効率的**
|
||||
- 低メモリ環境のOSで長時間稼働できます.
|
||||
- **豊富な API インターフェース**
|
||||
- ほとんどの標準インターフェースを完全に実装しています.
|
||||
- **安定して信頼できる**
|
||||
- 継続的で安定した開発とメンテナンスを行っています.
|
||||
|
||||
## クイックスタート
|
||||
|
||||
最新バージョンは [Release](https://github.com/NapNeko/NapCatQQ/releases/) ページからダウンロードできます
|
||||
|
||||
**初めてご使用の方**は、以下のドキュメントで使用ガイドを必ずご確認ください
|
||||
|
||||
> このプロジェクトは非営利です。連携に関する問題/基本的な問題/下位フレームワークの問題については、ご自身で検索して解決してください。本プロジェクトのコミュニティではそのような回答は提供していません。
|
||||
|
||||
## リンク
|
||||
|
||||
| ドキュメント | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| ドキュメント | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> 他のコミュニティでこのプロジェクト(他のプロトコル側/関連アプリケーション側のプロジェクトを含む)に言及して論争を引き起こさないでください。提案がある場合は、公式交流グループで議論するか、PRを提出してください。
|
||||
|
||||
## 謝辞
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 本プロジェクトへの多大なサポート、一部コードを参考にしています(許可済み)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 本プロジェクトに完璧に対応した LLM Bot フレームワークです
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) サイバー仲間の 麦麦 Bot フレームワークです
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) NapCat ベースのメッセージエクスポートツールです
|
||||
|
||||
- そして何より大切なのは、画面の前のあなたに感謝することです~
|
||||
|
||||
---
|
||||
|
||||
## ライセンス
|
||||
|
||||
本プロジェクトはハイブリッドライセンスの下でオープンソース化されています。本プロジェクトを使用する際は、以下の点にご注意ください:
|
||||
|
||||
1. サードパーティライブラリのコードまたは修正部分は、元のオープンソースライセンスに従います.
|
||||
2. 本プロジェクトは一部のプロジェクトから許可を得ており、一部の制約を受けません.
|
||||
3. プロジェクトのその他のロジックコードは[本リポジトリのオープンソースライセンス](../LICENSE)に従います.
|
||||
|
||||
**本リポジトリは使いやすさの향上とメッセージプッシュ機能の実装のみを目的としています。また、リポジトリの主要作者の事前許可なく NapCat のコードに基づいてプロジェクトを開発することは禁止されています。使用する際は現地の法律と規制を遵守してください。これに起因する問題は、使用者および違反使用チュートリアルの提供者の責任となります。**
|
||||
@@ -0,0 +1,77 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_NTQQ 기반으로 구현된 최신 프로토콜 사이드 프레임워크._
|
||||
|
||||
> 구름이 일고 바람이 불어, 마음은 먼 곳을 향하나 길은 아직 닿지 못했네.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | 한국어 | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 공지
|
||||
NapCat은 현재 새로운 주요 메인테이너를 찾고 있습니다. nanaeonn@outlook.com 으로 이메일을 보내주세요. 이 기간 동안 공개 커뮤니티 그룹은 만들어지지 않지만, NapCat은 정기적인 업데이트를 보장합니다.
|
||||
|
||||
## 환영합니다
|
||||
|
||||
- NapCatQQ는 NTQQ를 기반으로 한 최신 Bot 프로토콜 구현체입니다
|
||||
|
||||
## 특징
|
||||
|
||||
- **사용하기 쉬움**
|
||||
- 초보자도 쉽게 사용할 수 있습니다.
|
||||
- **빠르고 효율적**
|
||||
- 저메모리 시스템에서도 장시간 안정적으로 실행됩니다.
|
||||
- **풍부한 API 인터페이스**
|
||||
- 대부분의 표준 인터페이스를 완전히 구현했습니다.
|
||||
- **안정적이고 신뢰할 수 있음**
|
||||
- 지속적이고 안정적인 개발과 유지보수를 하고 있습니다.
|
||||
|
||||
## 빠른 시작
|
||||
|
||||
[Release](https://github.com/NapNeko/NapCatQQ/releases/) 페이지에서 최신 버전을 다운로드할 수 있습니다
|
||||
|
||||
**처음 사용하시는 분**은 아래 문서에서 사용 가이드를 반드시 확인해 주세요
|
||||
|
||||
> 이 프로젝트는 비영리입니다. 연동 문제/기본 문제/하위 프레임워크 문제는 직접 검색하여 해결해 주세요. 본 프로젝트 커뮤니티에서는 이러한 지원을 제공하지 않습니다.
|
||||
|
||||
## 링크
|
||||
|
||||
| 문서 | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| 문서 | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> 다른 커뮤니티에서 이 프로젝트(다른 프로토콜 측/관련 애플리케이션 측 프로젝트 포함)를 언급하여 논쟁을 일으키지 마세요. 제안이 있으시면 공식 그룹에서 토론하거나 PR을 제출해 주세요.
|
||||
|
||||
## 감사의 말
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — 본 프로젝트에 대한 큰 지원, 일부 코드 참고 (허가 완료)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — 본 프로젝트와 완벽하게 호환되는 LLM Bot 프레임워크
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — 사이버 친구 麦麦 Bot 프레임워크
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — NapCat 기반의 메시지 내보내기 도구
|
||||
|
||||
- 그리고 가장 중요한 것은, 지금 이 글을 읽고 있는 당신에게 감사드립니다~
|
||||
|
||||
---
|
||||
|
||||
## 라이선스
|
||||
|
||||
이 프로젝트는 하이브리드 라이선스로 오픈소스화되어 있습니다. 이 프로젝트를 사용할 때 다음 사항에 유의해 주세요:
|
||||
|
||||
1. 서드파티 라이브러리 코드 또는 수정된 부분은 원래의 오픈소스 라이선스를 따릅니다.
|
||||
2. 이 프로젝트는 일부 프로젝트로부터 허가를 받아 일부 제한을 받지 않습니다.
|
||||
3. 프로젝트의 나머지 로직 코드는 [본 리포지토리 라이선스](../LICENSE)를 따릅니다.
|
||||
|
||||
**이 리포지토리는 사용 편의성 향상과 메시지 푸시 기능 구현만을 목적으로 합니다. 또한, 리포지토리 주요 작성자의 사전 승인 없이 NapCat 코드를 기반으로 프로젝트를 개발하는 것은 금지되어 있습니다. 사용 시 현지 법률 및 규정을 준수해 주세요. 이로 인해 발생하는 문제는 사용자 및 위반 사용 튜토리얼 제공자의 책임입니다.**
|
||||
@@ -0,0 +1,77 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_Современный фреймворк на стороне протокола, реализованный на базе NTQQ._
|
||||
|
||||
> Облака поднимаются, ветер рождается, сердце стремится вдаль, но путь ещё не пройден.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | Русский | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Объявление
|
||||
NapCat в настоящее время ищет нового основного мейнтейнера. Пожалуйста, свяжитесь с нами по электронной почте nanaeonn@outlook.com. В этот период публичные группы сообщества создаваться не будут, но NapCat гарантирует регулярные обновления.
|
||||
|
||||
## Добро пожаловать
|
||||
|
||||
- NapCatQQ — это современная реализация протокола Bot на базе NTQQ
|
||||
|
||||
## Особенности
|
||||
|
||||
- **Простота использования**
|
||||
- Начинающие пользователи смогут легко освоить работу.
|
||||
- **Скорость и эффективность**
|
||||
- Длительная работа на системах с ограниченным объёмом памяти.
|
||||
- **Богатый API-интерфейс**
|
||||
- Полная реализация большинства стандартных интерфейсов.
|
||||
- **Стабильность и надёжность**
|
||||
- Постоянная стабильная разработка и поддержка.
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
Скачайте последнюю версию на странице [Release](https://github.com/NapNeko/NapCatQQ/releases/)
|
||||
|
||||
**При первом использовании** обязательно ознакомьтесь с руководством в документации ниже
|
||||
|
||||
> Проект является некоммерческим. Вопросы интеграции, базовые вопросы и вопросы по нижележащему фреймворку решайте самостоятельно — сообщество данного проекта не предоставляет такой поддержки.
|
||||
|
||||
## Ссылки
|
||||
|
||||
| Документация | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| Документация | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> Пожалуйста, не упоминайте данный проект (включая другие протокольные/прикладные проекты) в других сообществах во избежание споров. Если у вас есть предложения, обсуждайте их в официальной группе или отправляйте PR.
|
||||
|
||||
## Благодарности
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — большая поддержка данного проекта, частично использован код (с разрешения)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — фреймворк LLM Bot, идеально совместимый с данным проектом
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — кибер-друг 麦麦, Bot-фреймворк
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — инструмент экспорта сообщений на базе NapCat
|
||||
|
||||
- И самое главное — спасибо вам, читающему это~
|
||||
|
||||
---
|
||||
|
||||
## Лицензия
|
||||
|
||||
Данный проект распространяется с открытым исходным кодом под гибридной лицензией. При использовании данного проекта обратите внимание на следующее:
|
||||
|
||||
1. Код сторонних библиотек или модифицированные части подчиняются их исходным лицензиям с открытым исходным кодом.
|
||||
2. Данный проект получил разрешение от ряда проектов и не подчиняется некоторым ограничениям.
|
||||
3. Остальной логический код проекта распространяется по [лицензии данного репозитория](../LICENSE).
|
||||
|
||||
**Данный репозиторий предназначен исключительно для повышения удобства использования и реализации функций отправки сообщений. Кроме того, запрещается разработка проектов на основе кода NapCat без предварительного разрешения главного автора репозитория. При использовании соблюдайте местное законодательство. За любые проблемы, вызванные нарушением, несут ответственность пользователь и лицо, предоставившее инструкции по незаконному использованию.**
|
||||
@@ -0,0 +1,77 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_基于 NTQQ 实现的现代化协议端框架._
|
||||
|
||||
> 云起兮风生,心向远方兮路未曾至.
|
||||
|
||||
[English](../README.md) | 简体中文 | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 公告
|
||||
NapCat 当前正在寻找新的主要维护者,欢迎email到 nanaeonn@outlook.com ,在此期不会建立任何公开社区交流群,Napcat会保证此期间的正常更新。
|
||||
|
||||
## 欢迎
|
||||
|
||||
- NapCatQQ 是现代化的基于 NTQQ 的 Bot 协议端实现
|
||||
|
||||
## 特性
|
||||
|
||||
- **易于使用**
|
||||
- 作为初学者能够轻松使用.
|
||||
- **快速高效**
|
||||
- 在低内存操作系统长时运行.
|
||||
- **丰富的 API 接口**
|
||||
- 完整实现了大部分标准接口.
|
||||
- **稳定可靠**
|
||||
- 持续稳定的开发与维护.
|
||||
|
||||
## 快速开始
|
||||
|
||||
可前往 [Release](https://github.com/NapNeko/NapCatQQ/releases/) 页面下载最新版本
|
||||
|
||||
**首次使用**请务必查看如下文档看使用教程
|
||||
|
||||
> 项目非盈利,涉及 对接问题/基础问题/下层框架问题 请自行搜索解决,本项目社区不提供此类解答。
|
||||
|
||||
## 链接
|
||||
|
||||
| 文档 | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| 文档 | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> 请不要在其余社区提及本项目(包括其余协议端/相关应用端项目)引发争论,如有建议到达官方交流群讨论或PR。
|
||||
|
||||
## 致谢
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 对本项目的大力支持 参考部分代码 已获授权
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 是完美适配本项目的LLM Bot框架 在此推荐一下
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) 一只赛博群友 麦麦 Bot框架 在此推荐一下
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) 基于NapCat的消息导出工具 在此推荐一下
|
||||
|
||||
- 不过最最重要的 还是需要感谢屏幕前的你哦~
|
||||
|
||||
---
|
||||
|
||||
## 许可证
|
||||
|
||||
本项目采用 混合协议 开源,因此使用本项目时,你需要注意以下几点:
|
||||
|
||||
1. 第三方库代码或修改部分遵循其原始开源许可.
|
||||
2. 本项目获取部分项目授权而不受部分约束
|
||||
2. 项目其余逻辑代码采用[本仓库开源许可](../LICENSE).
|
||||
|
||||
**本仓库仅用于提高易用性,实现消息推送类功能,此外,禁止任何项目未经仓库主作者授权基于 NapCat 代码开发。使用请遵守当地法律法规,由此造成的问题由使用者和提供违规使用教程者负责。**
|
||||
@@ -0,0 +1,77 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_基於 NTQQ 實現的現代化協議端框架._
|
||||
|
||||
> 雲起兮風生,心向遠方兮路未曾至.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | 繁體中文 | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 公告
|
||||
NapCat 目前正在尋找新的主要維護者,歡迎透過 email 聯繫 nanaeonn@outlook.com。在此期間不會建立任何公開社群交流群,NapCat 會保證此期間的正常更新。
|
||||
|
||||
## 歡迎
|
||||
|
||||
- NapCatQQ 是現代化的基於 NTQQ 的 Bot 協議端實現
|
||||
|
||||
## 特性
|
||||
|
||||
- **易於使用**
|
||||
- 初學者也能輕鬆上手.
|
||||
- **快速高效**
|
||||
- 在低記憶體系統長時間穩定運行.
|
||||
- **豐富的 API 介面**
|
||||
- 完整實現了大部分標準介面.
|
||||
- **穩定可靠**
|
||||
- 持續穩定的開發與維護.
|
||||
|
||||
## 快速開始
|
||||
|
||||
可前往 [Release](https://github.com/NapNeko/NapCatQQ/releases/) 頁面下載最新版本
|
||||
|
||||
**首次使用**請務必查看以下文件中的使用教學
|
||||
|
||||
> 專案為非營利性質,涉及 對接問題/基礎問題/底層框架問題 請自行搜尋解決,本專案社群不提供此類解答。
|
||||
|
||||
## 連結
|
||||
|
||||
| 文件 | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| 文件 | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> 請不要在其他社群提及本專案(包括其他協議端/相關應用端專案)以免引發爭論。如有建議,請到官方交流群討論或提交 PR。
|
||||
|
||||
## 致謝
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 對本專案的大力支持,參考部分程式碼(已獲授權)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 是完美適配本專案的 LLM Bot 框架,在此推薦
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) 一隻賽博群友 麥麥 Bot 框架,在此推薦
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) 基於 NapCat 的訊息匯出工具,在此推薦
|
||||
|
||||
- 不過最最重要的,還是要感謝螢幕前的你哦~
|
||||
|
||||
---
|
||||
|
||||
## 授權條款
|
||||
|
||||
本專案採用混合協議開源,因此使用本專案時,您需要注意以下幾點:
|
||||
|
||||
1. 第三方函式庫程式碼或修改部分遵循其原始開源授權.
|
||||
2. 本專案已獲取部分專案授權而不受部分約束.
|
||||
3. 專案其餘邏輯程式碼採用[本倉庫開源授權](../LICENSE).
|
||||
|
||||
**本倉庫僅用於提高易用性,實現訊息推送類功能,此外,禁止任何專案未經倉庫主作者授權基於 NapCat 程式碼開發。使用請遵守當地法律法規,由此造成的問題由使用者和提供違規使用教學者負責。**
|
||||
@@ -184,6 +184,35 @@ export function stringifyWithBigInt (obj: any) {
|
||||
);
|
||||
}
|
||||
|
||||
export function parseAppidFromMajorV2 (nodeMajor: string): string | undefined {
|
||||
const marker = Buffer.from('QQAppId/', 'utf-8');
|
||||
const filePath = path.resolve(nodeMajor);
|
||||
const fileContent = fs.readFileSync(filePath);
|
||||
|
||||
let searchPosition = 0;
|
||||
while (true) {
|
||||
const index = fileContent.indexOf(marker, searchPosition);
|
||||
if (index === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
const start = index + marker.length;
|
||||
const end = fileContent.indexOf(0x00, start);
|
||||
if (end === -1) {
|
||||
break;
|
||||
}
|
||||
const content = fileContent.subarray(start, end);
|
||||
const str = content.toString('utf-8');
|
||||
if (/^\d+$/.test(str)) {
|
||||
return str;
|
||||
}
|
||||
|
||||
searchPosition = end + 1;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function parseAppidFromMajor (nodeMajor: string): string | undefined {
|
||||
const hexSequence = 'A4 09 00 00 00 35';
|
||||
const sequenceBytes = Buffer.from(hexSequence.replace(/ /g, ''), 'hex');
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
import path from 'node:path';
|
||||
import { InstanceContext, NapCatCore } from '@/napcat-core/index';
|
||||
import {
|
||||
checkSqliteAvailable,
|
||||
DatabaseHandle,
|
||||
openDatabase,
|
||||
decryptAndOpen,
|
||||
readSingleDatabase,
|
||||
scanAllDatabases,
|
||||
formatScanResults,
|
||||
decryptDatabaseFile,
|
||||
type DatabaseScanResult,
|
||||
type DatabaseReadOptions,
|
||||
type TableInfo,
|
||||
} from 'napcat-database';
|
||||
|
||||
type SQLInputValue = import('node:sqlite').SQLInputValue;
|
||||
|
||||
export class NTQQDatabaseApi {
|
||||
context: InstanceContext;
|
||||
core: NapCatCore;
|
||||
|
||||
constructor (context: InstanceContext, core: NapCatCore) {
|
||||
this.context = context;
|
||||
this.core = core;
|
||||
}
|
||||
|
||||
/** node:sqlite 是否可用 */
|
||||
async isSqliteAvailable (): Promise<boolean> {
|
||||
return checkSqliteAvailable();
|
||||
}
|
||||
|
||||
/** 获取当前账号的 nt_db 目录 */
|
||||
getNtDbDir (): string {
|
||||
return path.resolve(this.core.dataPath, this.core.selfInfo.uin, 'nt_qq', 'nt_db');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取解密缓存目录
|
||||
* 默认: <NapCatDataPath>/db_<uin>/
|
||||
* 可通过 customDir 完全自定义
|
||||
*/
|
||||
getDefaultCacheDir (customDir?: string): string {
|
||||
if (customDir) return customDir;
|
||||
return path.resolve(this.core.NapCatDataPath, `db_${this.core.selfInfo.uin}`);
|
||||
}
|
||||
|
||||
/** 当前是否已获取到数据库 passphrase */
|
||||
hasPassphrase (): boolean {
|
||||
return !!this.core.dbPassphrase;
|
||||
}
|
||||
|
||||
/** 获取 passphrase Buffer,未获取时返回 null */
|
||||
getPassphraseBuffer (): Buffer | null {
|
||||
return this.core.dbPassphrase ? Buffer.from(this.core.dbPassphrase) : null;
|
||||
}
|
||||
|
||||
// ======================== SQLite 数据库操作 ========================
|
||||
|
||||
/**
|
||||
* 打开一个已解密的 SQLite 数据库文件
|
||||
* @param filePath 解密后 .db 文件路径
|
||||
* @param readOnly 是否只读 (默认 true)
|
||||
* @returns DatabaseHandle 实例,使用完毕后需调用 .close()
|
||||
*/
|
||||
openDecryptedDb (filePath: string, readOnly = true): DatabaseHandle {
|
||||
return openDatabase(filePath, readOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密并打开一个 NTQQ 加密数据库
|
||||
* @param dbName 数据库文件名 (如 'nt_msg.db') 或完整路径
|
||||
* @param readOnly 是否只读 (默认 true)
|
||||
* @param cacheDir 自定义缓存目录,默认 db_<uin>
|
||||
* @returns DatabaseHandle 实例,使用完毕后需调用 .close()
|
||||
*/
|
||||
openDatabase (dbName: string, readOnly = true, cacheDir?: string): DatabaseHandle | null {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return null;
|
||||
|
||||
const dbPath = path.isAbsolute(dbName) ? dbName : path.resolve(this.getNtDbDir(), dbName);
|
||||
const resolvedCacheDir = this.getDefaultCacheDir(cacheDir);
|
||||
|
||||
return decryptAndOpen(dbPath, passphrase, resolvedCacheDir, readOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对加密数据库执行查询并自动关闭连接
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param sql SQL 查询语句
|
||||
* @param params 绑定参数
|
||||
* @returns 查询结果行数组,passphrase 不可用时返回 null
|
||||
*/
|
||||
query<T = Record<string, unknown>> (
|
||||
dbName: string,
|
||||
sql: string,
|
||||
params?: SQLInputValue[] | Record<string, SQLInputValue>
|
||||
): T[] | null {
|
||||
const db = this.openDatabase(dbName);
|
||||
if (!db) return null;
|
||||
try {
|
||||
return db.query<T>(sql, params);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对加密数据库执行查询,仅返回第一行
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param sql SQL 查询语句
|
||||
* @param params 绑定参数
|
||||
*/
|
||||
queryOne<T = Record<string, unknown>> (
|
||||
dbName: string,
|
||||
sql: string,
|
||||
params?: SQLInputValue[] | Record<string, SQLInputValue>
|
||||
): T | undefined | null {
|
||||
const db = this.openDatabase(dbName);
|
||||
if (!db) return null;
|
||||
try {
|
||||
return db.queryOne<T>(sql, params);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对加密数据库执行非查询 SQL (INSERT/UPDATE/DELETE 等) 并自动关闭
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param sql SQL 语句
|
||||
* @param params 绑定参数
|
||||
*/
|
||||
execute (
|
||||
dbName: string,
|
||||
sql: string,
|
||||
params?: SQLInputValue[] | Record<string, SQLInputValue>
|
||||
): { changes: number | bigint; lastInsertRowid: number | bigint; } | null {
|
||||
const db = this.openDatabase(dbName, false);
|
||||
if (!db) return null;
|
||||
try {
|
||||
return db.execute(sql, params);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== 批量扫描 ========================
|
||||
|
||||
/**
|
||||
* 读取单个加密数据库的表信息
|
||||
* @param dbName 数据库文件名 (如 'nt_msg.db'),或完整路径
|
||||
* @param cacheDir 自定义缓存目录,默认 db_<uin>
|
||||
* @param options 其他选项
|
||||
*/
|
||||
readDatabase (dbName: string, cacheDir?: string, options?: Omit<DatabaseReadOptions, 'cacheDir'>): DatabaseScanResult | null {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return null;
|
||||
|
||||
const dbPath = path.isAbsolute(dbName) ? dbName : path.resolve(this.getNtDbDir(), dbName);
|
||||
const resolvedCacheDir = this.getDefaultCacheDir(cacheDir);
|
||||
|
||||
return readSingleDatabase(dbPath, passphrase, { cacheDir: resolvedCacheDir, ...options });
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫描所有加密数据库
|
||||
* @param cacheDir 自定义缓存目录,默认 db_<uin>
|
||||
* @param options 其他选项
|
||||
*/
|
||||
scanDatabases (cacheDir?: string, options?: Omit<DatabaseReadOptions, 'cacheDir'>): DatabaseScanResult[] {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return [];
|
||||
|
||||
const resolvedCacheDir = this.getDefaultCacheDir(cacheDir);
|
||||
return scanAllDatabases(this.getNtDbDir(), passphrase, { cacheDir: resolvedCacheDir, ...options });
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅解密数据库文件(不读取表信息,不需要 node:sqlite)
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param outputPath 输出路径,默认保存到 db_<uin>/<dbName>
|
||||
*/
|
||||
decryptDatabase (dbName: string, outputPath?: string): string | null {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return null;
|
||||
|
||||
const dbPath = path.isAbsolute(dbName) ? dbName : path.resolve(this.getNtDbDir(), dbName);
|
||||
const outPath = outputPath ?? path.resolve(this.getDefaultCacheDir(), path.basename(dbName));
|
||||
|
||||
return decryptDatabaseFile(dbPath, passphrase, outPath);
|
||||
}
|
||||
|
||||
/** 格式化扫描结果为可读字符串 */
|
||||
formatResults (results: DatabaseScanResult[]): string {
|
||||
return formatScanResults(results);
|
||||
}
|
||||
}
|
||||
|
||||
export { DatabaseHandle };
|
||||
export type { DatabaseScanResult, DatabaseReadOptions, TableInfo };
|
||||
@@ -9,3 +9,4 @@ export * from './packet';
|
||||
export * from './file';
|
||||
export * from './online';
|
||||
export * from './flash';
|
||||
export * from './database';
|
||||
@@ -68,7 +68,7 @@ export class NTQQPacketApi {
|
||||
this.pkt = new PacketClientSession(this.core);
|
||||
await this.pkt.init(process.pid, table.recv, table.send);
|
||||
try {
|
||||
await this.pkt.operation.FetchRkey(1500);
|
||||
await this.pkt.operation.FetchRkey(3000);
|
||||
} catch (error) {
|
||||
this.logger.logError('测试Packet状态异常', error);
|
||||
return false;
|
||||
|
||||
+5
-1
@@ -529,6 +529,10 @@
|
||||
},
|
||||
"3.2.25-45758": {
|
||||
"appid": 537340249,
|
||||
"qua": "V1_LNX_NQ_3.2.25_45627_GW_B"
|
||||
"qua": "V1_LNX_NQ_3.2.25_45758_GW_B"
|
||||
},
|
||||
"9.9.27-45758": {
|
||||
"appid": 537340213,
|
||||
"qua": "V1_WIN_NQ_9.9.27_45758_GW_B"
|
||||
}
|
||||
}
|
||||
+16
-8
@@ -1,9 +1,17 @@
|
||||
{
|
||||
"fileLog": false,
|
||||
"consoleLog": true,
|
||||
"fileLogLevel": "debug",
|
||||
"consoleLogLevel": "info",
|
||||
"packetBackend": "auto",
|
||||
"packetServer": "",
|
||||
"o3HookMode": 1
|
||||
}
|
||||
"fileLog": false,
|
||||
"consoleLog": true,
|
||||
"fileLogLevel": "debug",
|
||||
"consoleLogLevel": "info",
|
||||
"packetBackend": "auto",
|
||||
"packetServer": "",
|
||||
"o3HookMode": 1,
|
||||
"bypass": {
|
||||
"hook": false,
|
||||
"window": false,
|
||||
"module": false,
|
||||
"process": false,
|
||||
"container": false,
|
||||
"js": false
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,19 @@
|
||||
import { ConfigBase } from '@/napcat-core/helper/config-base';
|
||||
import { NapCatCore } from '@/napcat-core/index';
|
||||
import { Type, Static } from '@sinclair/typebox';
|
||||
import { AnySchema } from 'ajv';
|
||||
import Ajv, { AnySchema } from 'ajv';
|
||||
import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import json5 from 'json5';
|
||||
|
||||
export const BypassOptionsSchema = Type.Object({
|
||||
hook: Type.Boolean({ default: true }),
|
||||
window: Type.Boolean({ default: true }),
|
||||
module: Type.Boolean({ default: true }),
|
||||
process: Type.Boolean({ default: true }),
|
||||
container: Type.Boolean({ default: true }),
|
||||
js: Type.Boolean({ default: true }),
|
||||
});
|
||||
|
||||
export const NapcatConfigSchema = Type.Object({
|
||||
fileLog: Type.Boolean({ default: false }),
|
||||
@@ -11,10 +23,31 @@ export const NapcatConfigSchema = Type.Object({
|
||||
packetBackend: Type.String({ default: 'auto' }),
|
||||
packetServer: Type.String({ default: '' }),
|
||||
o3HookMode: Type.Number({ default: 0 }),
|
||||
bypass: Type.Optional(BypassOptionsSchema),
|
||||
});
|
||||
|
||||
export type NapcatConfig = Static<typeof NapcatConfigSchema>;
|
||||
|
||||
/**
|
||||
* 从指定配置目录读取 napcat.json,按 NapcatConfigSchema 校验并填充默认值
|
||||
* 用于登录前(无 NapCatCore 实例时)的早期配置读取
|
||||
*/
|
||||
export function loadNapcatConfig (configPath: string): NapcatConfig {
|
||||
const ajv = new Ajv({ useDefaults: true, coerceTypes: true });
|
||||
const validate = ajv.compile<NapcatConfig>(NapcatConfigSchema);
|
||||
let data: Record<string, unknown> = {};
|
||||
try {
|
||||
const configFile = path.join(configPath, 'napcat.json');
|
||||
if (fs.existsSync(configFile)) {
|
||||
data = json5.parse(fs.readFileSync(configFile, 'utf-8'));
|
||||
}
|
||||
} catch {
|
||||
// 读取失败时使用 schema 默认值
|
||||
}
|
||||
validate(data);
|
||||
return data as NapcatConfig;
|
||||
}
|
||||
|
||||
export class NapCatConfigLoader extends ConfigBase<NapcatConfig> {
|
||||
constructor (core: NapCatCore, configPath: string, schema: AnySchema) {
|
||||
super('napcat', core, configPath, schema);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from 'node:fs';
|
||||
import { systemPlatform } from 'napcat-common/src/system';
|
||||
import { getDefaultQQVersionConfigInfo, getQQPackageInfoPath, getQQVersionConfigPath, parseAppidFromMajor } from 'napcat-common/src/helper';
|
||||
import { getDefaultQQVersionConfigInfo, getQQPackageInfoPath, getQQVersionConfigPath, parseAppidFromMajor, parseAppidFromMajorV2 } from 'napcat-common/src/helper';
|
||||
import AppidTable from '@/napcat-core/external/appid.json';
|
||||
import { LogWrapper } from './log';
|
||||
import { getMajorPath } from '@/napcat-core/index';
|
||||
@@ -107,7 +107,13 @@ export class QQBasicInfoWrapper {
|
||||
if (!this.QQMainPath) {
|
||||
throw new Error('QQMainPath未定义 无法通过Major获取Appid');
|
||||
}
|
||||
const majorPath = getMajorPath(QQVersion, this.QQMainPath);
|
||||
const majorPath = getMajorPath(this.QQMainPath, QQVersion);
|
||||
// 优先通过 QQAppId/ 标记搜索
|
||||
const appidV2 = parseAppidFromMajorV2(majorPath);
|
||||
if (appidV2) {
|
||||
return appidV2;
|
||||
}
|
||||
// 回落到旧方式
|
||||
const appid = parseAppidFromMajor(majorPath);
|
||||
return appid;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
NTQQWebApi,
|
||||
NTQQFlashApi,
|
||||
NTQQOnlineApi,
|
||||
NTQQDatabaseApi,
|
||||
} from '@/napcat-core/apis';
|
||||
import { NTQQCollectionApi } from '@/napcat-core/apis/collection';
|
||||
import {
|
||||
@@ -33,6 +34,7 @@ import { NodeIKernelMsgListener, NodeIKernelProfileListener } from '@/napcat-cor
|
||||
import { proxiedListenerOf } from '@/napcat-core/helper/proxy-handler';
|
||||
import { NTQQPacketApi } from './apis/packet';
|
||||
import { NativePacketHandler } from './packet/handler/client';
|
||||
import { Napi2NativeLoader } from './packet/handler/napi2nativeLoader';
|
||||
import { container, ReceiverServiceRegistry } from './packet/handler/serviceRegister';
|
||||
import { appEvent } from './packet/handler/eventList';
|
||||
import { TypedEventEmitter } from './packet/handler/typeEvent';
|
||||
@@ -117,6 +119,8 @@ export class NapCatCore {
|
||||
selfInfo: SelfInfo;
|
||||
util: NodeQQNTWrapperUtil;
|
||||
configLoader: NapCatConfigLoader;
|
||||
/** 数据库 passphrase,由 OidbSvcTrpcTcp.0xcde_2 包获取 */
|
||||
dbPassphrase: string | undefined;
|
||||
|
||||
// 通过构造器递过去的 runtime info 应该尽量少
|
||||
constructor (context: InstanceContext, selfInfo: SelfInfo) {
|
||||
@@ -147,6 +151,7 @@ export class NapCatCore {
|
||||
GroupApi: new NTQQGroupApi(this.context, this),
|
||||
FlashApi: new NTQQFlashApi(this.context, this),
|
||||
OnlineApi: new NTQQOnlineApi(this.context, this),
|
||||
DatabaseApi: new NTQQDatabaseApi(this.context, this),
|
||||
};
|
||||
container.bind(NapCatCore).toConstantValue(this);
|
||||
container.bind(TypedEventEmitter).toConstantValue(this.event);
|
||||
@@ -314,6 +319,7 @@ export interface InstanceContext {
|
||||
readonly basicInfoWrapper: QQBasicInfoWrapper;
|
||||
readonly pathWrapper: NapCatPathWrapper;
|
||||
readonly packetHandler: NativePacketHandler;
|
||||
readonly napi2nativeLoader: Napi2NativeLoader;
|
||||
}
|
||||
|
||||
export interface StableNTApiWrapper {
|
||||
@@ -328,4 +334,5 @@ export interface StableNTApiWrapper {
|
||||
GroupApi: NTQQGroupApi;
|
||||
FlashApi: NTQQFlashApi,
|
||||
OnlineApi: NTQQOnlineApi,
|
||||
DatabaseApi: NTQQDatabaseApi,
|
||||
}
|
||||
@@ -1,38 +1,39 @@
|
||||
{
|
||||
"name": "napcat-core",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
||||
"name": "napcat-core",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.ts"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.ts"
|
||||
},
|
||||
"./*": {
|
||||
"import": "./*"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"winston": "^3.17.0",
|
||||
"json5": "^2.2.3",
|
||||
"inversify": "^7.10.4",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"@protobuf-ts/runtime": "^2.11.1",
|
||||
"ajv": "^8.13.0",
|
||||
"@sinclair/typebox": "^0.34.38",
|
||||
"file-type": "^21.0.0",
|
||||
"compressing": "^1.10.1",
|
||||
"napcat-image-size": "workspace:*",
|
||||
"napcat-common": "workspace:*",
|
||||
"napcat-protobuf": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
"./*": {
|
||||
"import": "./*"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"winston": "^3.17.0",
|
||||
"json5": "^2.2.3",
|
||||
"inversify": "^7.10.4",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"@protobuf-ts/runtime": "^2.11.1",
|
||||
"ajv": "^8.13.0",
|
||||
"@sinclair/typebox": "^0.34.38",
|
||||
"file-type": "^21.0.0",
|
||||
"compressing": "^1.10.1",
|
||||
"napcat-image-size": "workspace:*",
|
||||
"napcat-common": "workspace:*",
|
||||
"napcat-database": "workspace:*",
|
||||
"napcat-protobuf": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
import path, { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import fs from 'fs';
|
||||
import { constants } from 'node:os';
|
||||
import { LogStack } from '@/napcat-core/packet/context/clientContext';
|
||||
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
|
||||
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
|
||||
import { OidbPacket, PacketBuf } from '@/napcat-core/packet/transformer/base';
|
||||
import { Napi2NativeLoader } from '@/napcat-core/packet/handler/napi2nativeLoader';
|
||||
export interface RecvPacket {
|
||||
type: string, // 仅recv
|
||||
data: RecvPacketData;
|
||||
@@ -17,48 +14,36 @@ export interface RecvPacketData {
|
||||
data: Buffer;
|
||||
}
|
||||
|
||||
// 0 send 1 recv
|
||||
export interface NativePacketExportType {
|
||||
initHook?: (send: string, recv: string) => boolean;
|
||||
}
|
||||
|
||||
export class NativePacketClient {
|
||||
protected readonly napcore: NapCoreContext;
|
||||
protected readonly logger: PacketLogger;
|
||||
protected readonly cb = new Map<string, (json: RecvPacketData) => Promise<any> | any>(); // hash-type callback
|
||||
protected readonly napi2nativeLoader: Napi2NativeLoader;
|
||||
logStack: LogStack;
|
||||
available: boolean = false;
|
||||
private readonly supportedPlatforms = ['win32.x64', 'linux.x64', 'linux.arm64', 'darwin.x64', 'darwin.arm64'];
|
||||
private readonly MoeHooExport: { exports: NativePacketExportType; } = { exports: {} };
|
||||
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack) {
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack, napi2nativeLoader: Napi2NativeLoader) {
|
||||
this.napcore = napCore;
|
||||
this.logger = logger;
|
||||
this.logStack = logStack;
|
||||
this.napi2nativeLoader = napi2nativeLoader;
|
||||
}
|
||||
|
||||
check (): boolean {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
if (!this.supportedPlatforms.includes(platform)) {
|
||||
this.logStack.pushLogWarn(`NativePacketClient: 不支持的平台: ${platform}`);
|
||||
return false;
|
||||
}
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './native/napi2native/napi2native.' + platform + '.node');
|
||||
if (!fs.existsSync(moehoo_path)) {
|
||||
this.logStack.pushLogWarn(`NativePacketClient: 缺失运行时文件: ${moehoo_path}`);
|
||||
if (!this.napi2nativeLoader.loaded) {
|
||||
this.logStack.pushLogWarn('NativePacketClient: Napi2NativeLoader 未成功加载');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async init (_pid: number, recv: string, send: string): Promise<void> {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
const isNewQQ = this.napcore.basicInfo.requireMinNTQQBuild('40824');
|
||||
if (isNewQQ) {
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './native/napi2native/napi2native.' + platform + '.node');
|
||||
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
||||
this.MoeHooExport?.exports.initHook?.(send, recv);
|
||||
this.available = true;
|
||||
const success = this.napi2nativeLoader.initHook(send, recv);
|
||||
if (success) {
|
||||
this.available = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { NativePacketClient } from '@/napcat-core/packet/client/nativeClient';
|
||||
import { OidbPacket } from '@/napcat-core/packet/transformer/base';
|
||||
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
|
||||
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
|
||||
import { Napi2NativeLoader } from '@/napcat-core/packet/handler/napi2nativeLoader';
|
||||
|
||||
export class LogStack {
|
||||
private stack: string[] = [];
|
||||
@@ -43,12 +44,14 @@ export class PacketClientContext {
|
||||
private readonly napCore: NapCoreContext;
|
||||
private readonly logger: PacketLogger;
|
||||
private readonly logStack: LogStack;
|
||||
private readonly napi2nativeLoader: Napi2NativeLoader;
|
||||
private readonly _client: NativePacketClient;
|
||||
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger) {
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger, napi2nativeLoader: Napi2NativeLoader) {
|
||||
this.napCore = napCore;
|
||||
this.logger = logger;
|
||||
this.logStack = new LogStack(logger);
|
||||
this.napi2nativeLoader = napi2nativeLoader;
|
||||
this._client = this.newClient();
|
||||
}
|
||||
|
||||
@@ -64,14 +67,14 @@ export class PacketClientContext {
|
||||
await this._client.init(pid, recv, send);
|
||||
}
|
||||
|
||||
async sendOidbPacket<T extends boolean = false>(pkt: OidbPacket, rsp?: T, timeout?: number): Promise<T extends true ? Buffer : void> {
|
||||
async sendOidbPacket<T extends boolean = false> (pkt: OidbPacket, rsp?: T, timeout?: number): Promise<T extends true ? Buffer : void> {
|
||||
const raw = await this._client.sendOidbPacket(pkt, rsp, timeout);
|
||||
return raw.data as T extends true ? Buffer : void;
|
||||
}
|
||||
|
||||
private newClient (): NativePacketClient {
|
||||
this.logger.info('使用 NativePacketClient 作为后端');
|
||||
const client = new NativePacketClient(this.napCore, this.logger, this.logStack);
|
||||
const client = new NativePacketClient(this.napCore, this.logger, this.logStack, this.napi2nativeLoader);
|
||||
if (!client.check()) {
|
||||
throw new Error('[Core] [Packet] NativePacketClient 不可用,NapCat.Packet将不会加载!');
|
||||
}
|
||||
|
||||
@@ -34,5 +34,9 @@ export class NapCoreContext {
|
||||
return this.core.configLoader.configData;
|
||||
}
|
||||
|
||||
get napi2nativeLoader () {
|
||||
return this.core.context.napi2nativeLoader;
|
||||
}
|
||||
|
||||
sendSsoCmdReqByContend = (cmd: string, data: Buffer) => this.core.context.session.getMsgService().sendSsoCmdReqByContend(cmd, data);
|
||||
}
|
||||
@@ -18,7 +18,7 @@ export class PacketContext {
|
||||
this.msgConverter = new PacketMsgConverter();
|
||||
this.napcore = new NapCoreContext(core);
|
||||
this.logger = new PacketLogger(this.napcore);
|
||||
this.client = new PacketClientContext(this.napcore, this.logger);
|
||||
this.client = new PacketClientContext(this.napcore, this.logger, this.napcore.napi2nativeLoader);
|
||||
this.highway = new PacketHighwayContext(this.napcore, this.logger, this.client);
|
||||
this.operation = new PacketOperationContext(this);
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ export class NativePacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
async init (version: string): Promise<boolean> {
|
||||
async init (version: string, o3HookMode: boolean = false): Promise<boolean> {
|
||||
const version_arch = version + '-' + process.arch;
|
||||
try {
|
||||
if (!this.loaded) {
|
||||
@@ -215,7 +215,7 @@ export class NativePacketHandler {
|
||||
|
||||
this.MoeHooExport.exports.initHook?.(send, recv, (type: PacketType, uin: string, cmd: string, seq: number, hex_data: string) => {
|
||||
this.emitPacket(type, uin, cmd, seq, hex_data);
|
||||
}, true);
|
||||
}, o3HookMode);
|
||||
this.logger.log('[PacketHandler] 初始化成功');
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
import path, { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import fs from 'fs';
|
||||
import { constants } from 'node:os';
|
||||
import { LogWrapper } from '../../helper/log';
|
||||
|
||||
export interface BypassOptions {
|
||||
hook?: boolean;
|
||||
window?: boolean;
|
||||
module?: boolean;
|
||||
process?: boolean;
|
||||
container?: boolean;
|
||||
js?: boolean;
|
||||
}
|
||||
|
||||
export interface Napi2NativeExportType {
|
||||
initHook?: (send: string, recv: string) => boolean;
|
||||
setVerbose?: (verbose: boolean) => void; // 默认关闭日志
|
||||
enableAllBypasses?: (options?: BypassOptions) => boolean;
|
||||
}
|
||||
|
||||
export class Napi2NativeLoader {
|
||||
private readonly supportedPlatforms = ['win32.x64', 'linux.x64', 'linux.arm64', 'darwin.x64', 'darwin.arm64'];
|
||||
private readonly exports: { exports: Napi2NativeExportType; } = { exports: {} };
|
||||
protected readonly logger: LogWrapper;
|
||||
private _loaded: boolean = false;
|
||||
|
||||
constructor ({ logger }: { logger: LogWrapper; }) {
|
||||
this.logger = logger;
|
||||
this.load();
|
||||
}
|
||||
|
||||
private load (): void {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
|
||||
if (!this.supportedPlatforms.includes(platform)) {
|
||||
this.logger.logWarn(`Napi2NativeLoader: 不支持的平台: ${platform}`);
|
||||
this._loaded = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const nativeModulePath = path.join(
|
||||
dirname(fileURLToPath(import.meta.url)),
|
||||
'./native/napi2native/napi2native.' + platform + '.node'
|
||||
);
|
||||
|
||||
if (!fs.existsSync(nativeModulePath)) {
|
||||
this.logger.logWarn(`Napi2NativeLoader: 缺失运行时文件: ${nativeModulePath}`);
|
||||
this._loaded = false;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
process.dlopen(this.exports, nativeModulePath, constants.dlopen.RTLD_LAZY);
|
||||
this._loaded = true;
|
||||
this.logger.log('[Napi2NativeLoader] 加载成功');
|
||||
} catch (error) {
|
||||
this.logger.logError('Napi2NativeLoader 加载出错:', error);
|
||||
this._loaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
get loaded (): boolean {
|
||||
return this._loaded;
|
||||
}
|
||||
|
||||
get nativeExports (): Napi2NativeExportType {
|
||||
return this.exports.exports;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化 Hook
|
||||
* @param send send 偏移地址
|
||||
* @param recv recv 偏移地址
|
||||
* @returns 是否初始化成功
|
||||
*/
|
||||
initHook (send: string, recv: string): boolean {
|
||||
if (!this._loaded) {
|
||||
this.logger.logWarn('Napi2NativeLoader 未成功加载,无法初始化 Hook');
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return this.nativeExports.initHook?.(send, recv) ?? false;
|
||||
} catch (error) {
|
||||
this.logger.logError('Napi2NativeLoader initHook 出错:', error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ export * from './oidb/Oidb.0x929';
|
||||
export * from './oidb/Oidb.0xE37_1200';
|
||||
export * from './oidb/Oidb.0xE37_1700';
|
||||
export * from './oidb/Oidb.0XE37_800';
|
||||
export * from './oidb/Oidb.0xCDE_2';
|
||||
export * from './oidb/Oidb.0xEB7';
|
||||
export * from './oidb/Oidb.0xED3_1';
|
||||
export * from './oidb/Oidb.0XFE1_2';
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
// OidbSvcTrpcTcp.0xcde_2 响应体
|
||||
// body.field2.field1 为目标字符串值
|
||||
export const OidbSvcTrpcTcp0XCDE_2RespBodyInner = {
|
||||
value: ProtoField(1, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XCDE_2RespBody = {
|
||||
inner: ProtoField(2, () => OidbSvcTrpcTcp0XCDE_2RespBodyInner),
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelAVSDKService {
|
||||
addKernelAVSDKListener (listener: unknown): number;
|
||||
|
||||
removeKernelAVSDKListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelAddBuddyService {
|
||||
addBuddy (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getAddBuddyRequestTag (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getBuddySetting (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getSmartInfo (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
queryUinSafetyFlag (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
requestInfoByAccount (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -2,17 +2,17 @@ import { AlbumCommentReplyContent, AlbumFeedLikePublish, AlbumListRequest, Album
|
||||
|
||||
export interface NodeIKernelAlbumService {
|
||||
|
||||
setAlbumServiceInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
setAlbumServiceInfo (arg1: string, arg2: string, arg3: string): unknown;// needs 3 arguments
|
||||
|
||||
getMainPage(...args: unknown[]): unknown;// needs 2 arguments
|
||||
getMainPage (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
getAlbumList(params: {
|
||||
getAlbumList (params: {
|
||||
qun_id: string,
|
||||
attach_info: string,
|
||||
seq: number,
|
||||
request_time_line: {
|
||||
request_invoke_time: string
|
||||
}
|
||||
request_invoke_time: string;
|
||||
};
|
||||
}): Promise<{
|
||||
response: {
|
||||
seq: number,
|
||||
@@ -21,57 +21,57 @@ export interface NodeIKernelAlbumService {
|
||||
trace_id: string,
|
||||
is_from_cache: boolean,
|
||||
request_time_line: unknown,
|
||||
album_list: Array<{ name: string, album_id: string }>,
|
||||
album_list: Array<{ name: string, album_id: string; }>,
|
||||
attach_info: string,
|
||||
has_more: boolean,
|
||||
right: unknown,
|
||||
banner: unknown
|
||||
}
|
||||
}>
|
||||
getAlbumInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
banner: unknown;
|
||||
};
|
||||
}>;
|
||||
getAlbumInfo (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
deleteAlbum(...args: unknown[]): unknown;// needs 3 arguments
|
||||
deleteAlbum (arg1: number, arg2: string, arg3: string): unknown;// needs 3 arguments
|
||||
|
||||
addAlbum(...args: unknown[]): unknown;// needs 2 arguments
|
||||
addAlbum (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
deleteMedias(seq: number, group_code: string, album_id: string, media_ids: string[], ban_ids: unknown[]): Promise<unknown>;// needs 4 arguments
|
||||
deleteMedias (seq: number, group_code: string, album_id: string, media_ids: string[], ban_ids: unknown[]): Promise<unknown>;// needs 4 arguments
|
||||
|
||||
modifyAlbum(...args: unknown[]): unknown;// needs 3 arguments
|
||||
modifyAlbum (arg1: number, arg2: unknown, arg3: Array<unknown>[]): unknown;// needs 3 arguments
|
||||
|
||||
getMediaList(param: AlbumListRequest): Promise<{
|
||||
getMediaList (param: AlbumListRequest): Promise<{
|
||||
response: {
|
||||
seq: number,
|
||||
result: number,
|
||||
errMs: string, // 没错就是errMs不是errMsg
|
||||
trace_id: string,
|
||||
request_time_line: unknown,
|
||||
}
|
||||
};
|
||||
}>;// needs 1 arguments
|
||||
|
||||
quoteToQzone(...args: unknown[]): unknown;// needs 1 arguments
|
||||
quoteToQzone (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
quoteToQunAlbum(...args: unknown[]): unknown;// needs 1 arguments
|
||||
quoteToQunAlbum (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
queryQuoteToQunAlbumStatus(...args: unknown[]): unknown;// needs 1 arguments
|
||||
queryQuoteToQunAlbumStatus (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunFeeds(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getQunFeeds (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunFeedDetail(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getQunFeedDetail (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunNoticeList(...args: unknown[]): unknown;// needs 4 arguments
|
||||
getQunNoticeList (arg1: number, arg2: unknown, arg3: string, arg4: string): unknown;// needs 4 arguments
|
||||
|
||||
getQunComment(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getQunComment (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunLikes(...args: unknown[]): unknown;// needs 4 arguments
|
||||
getQunLikes (arg1: number, arg2: unknown, arg3: string, arg4: string): unknown;// needs 4 arguments
|
||||
|
||||
deleteQunFeed(...args: unknown[]): unknown;// needs 1 arguments
|
||||
deleteQunFeed (arg: unknown): unknown;// needs 1 arguments
|
||||
// seq random
|
||||
// stCommonExt {"map_info":[],"map_bytes_info":[],"map_user_account":[]}
|
||||
// qunId string
|
||||
doQunComment(seq: number, ext: {
|
||||
doQunComment (seq: number, ext: {
|
||||
map_info: unknown[],
|
||||
map_bytes_info: unknown[],
|
||||
map_user_account: unknown[]
|
||||
map_user_account: unknown[];
|
||||
},
|
||||
qunId: string,
|
||||
commentType: number,
|
||||
@@ -79,23 +79,23 @@ export interface NodeIKernelAlbumService {
|
||||
content: AlbumCommentReplyContent,
|
||||
): Promise<unknown>;// needs 6 arguments
|
||||
|
||||
doQunReply(...args: unknown[]): unknown;// needs 7 arguments
|
||||
doQunReply (arg1: number, arg2: unknown, arg3: string, arg4: number, arg5: unknown, arg6: unknown, arg7: unknown): unknown;// needs 7 arguments
|
||||
|
||||
doQunLike(
|
||||
doQunLike (
|
||||
seq: number,
|
||||
ext: {
|
||||
map_info: unknown[],
|
||||
map_bytes_info: unknown[],
|
||||
map_user_account: unknown[]
|
||||
map_user_account: unknown[];
|
||||
},
|
||||
param: {
|
||||
// {"id":"421_1_0_1012959257|V61Yiali4PELg90bThrH4Bo2iI1M5Kab|V5bCgAxMDEyOTU5MjU3e*KqaLVYdic!^||^421_1_0_1012959257|V61Yiali4PELg90bThrH4Bo2iI1M5Kab|17560336594^||^1","status":1}
|
||||
id: string,
|
||||
status: number
|
||||
status: number;
|
||||
},
|
||||
like: AlbumFeedLikePublish
|
||||
): Promise<unknown>;// needs 5 arguments
|
||||
|
||||
getRedPoints(...args: unknown[]): unknown;// needs 3 arguments
|
||||
getRedPoints (arg1: string, arg2: number, arg3: string): unknown;// needs 3 arguments
|
||||
|
||||
}
|
||||
@@ -13,13 +13,13 @@ export interface NodeIKernelAvatarService {
|
||||
|
||||
forceDownloadGroupAvatar(arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupPortraitPath(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
getGroupPortraitPath(arg1: string, arg2: number, arg3: number): unknown;
|
||||
|
||||
forceDownloadGroupPortrait(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
forceDownloadGroupPortrait(arg1: string, arg2: number, arg3: number): unknown;
|
||||
|
||||
getAvatarPaths(arg1: unknown, arg2: unknown): unknown;
|
||||
getAvatarPaths(arg1: Array<unknown>[], arg2: number): unknown;
|
||||
|
||||
getGroupAvatarPaths(arg1: unknown, arg2: unknown): unknown;
|
||||
getGroupAvatarPaths(arg1: Array<unknown>[], arg2: string): unknown;
|
||||
|
||||
getConfGroupAvatarPaths(arg: unknown): unknown;
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface NodeIKernelBdhUploadService {
|
||||
addKernelBdhUploadListener (listener: unknown): number;
|
||||
|
||||
removeKernelBdhUploadListener (listenerId: number): void;
|
||||
|
||||
setBdhTestEnv (arg1: string, arg2: number): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -130,5 +130,21 @@ export interface NodeIKernelBuddyService {
|
||||
|
||||
getBuddyRecommendContactArkJson (uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string; }>;
|
||||
|
||||
checkIsBuddyAsync (uid: string): Promise<unknown>;
|
||||
|
||||
areBuddies (callFrom: string, uids: string[]): unknown;
|
||||
|
||||
getCategoryById (id: number): unknown;
|
||||
|
||||
addCategoryV2 (name: string, buddyUids?: unknown): Promise<unknown>;
|
||||
|
||||
isNull (): boolean;
|
||||
|
||||
getAddFriendBlockedList (): unknown;
|
||||
|
||||
getAddFriendBlockedRedPoint (): unknown;
|
||||
|
||||
reportAddFriendBlocked (): unknown;
|
||||
|
||||
setWXMsgNotify (arg: unknown): unknown;
|
||||
}
|
||||
@@ -1,91 +1,91 @@
|
||||
import { GeneralCallResult } from './common';
|
||||
|
||||
export interface NodeIKernelCollectionService {
|
||||
addKernelCollectionListener(...args: unknown[]): void;// needs 1 arguments
|
||||
addKernelCollectionListener (listener: unknown): void;// needs 1 arguments
|
||||
|
||||
removeKernelCollectionListener(listenerId: number): void;
|
||||
removeKernelCollectionListener (listenerId: number): void;
|
||||
|
||||
getCollectionItemList(param: {
|
||||
getCollectionItemList (param: {
|
||||
category: number,
|
||||
groupId: number,
|
||||
forceSync: boolean,
|
||||
forceFromDb: boolean,
|
||||
timeStamp: string,
|
||||
count: number,
|
||||
searchDown: boolean
|
||||
searchDown: boolean;
|
||||
}): Promise<GeneralCallResult &
|
||||
{
|
||||
collectionSearchList: {
|
||||
collectionItemList: Array<
|
||||
{
|
||||
cid: string,
|
||||
type: number,
|
||||
status: number,
|
||||
author: {
|
||||
type: number,
|
||||
numId: string,
|
||||
strId: string,
|
||||
groupId: string,
|
||||
groupName: string,
|
||||
uid: string
|
||||
},
|
||||
bid: number,
|
||||
category: number,
|
||||
createTime: string,
|
||||
collectTime: string,
|
||||
modifyTime: string,
|
||||
sequence: string,
|
||||
shareUrl: string,
|
||||
customGroupId: number,
|
||||
securityBeat: boolean,
|
||||
summary: {
|
||||
textSummary: unknown,
|
||||
linkSummary: unknown,
|
||||
gallerySummary: unknown,
|
||||
audioSummary: unknown,
|
||||
videoSummary: unknown,
|
||||
fileSummary: unknown,
|
||||
locationSummary: unknown,
|
||||
richMediaSummary: unknown,
|
||||
}
|
||||
}>,
|
||||
hasMore: boolean,
|
||||
bottomTimeStamp: string
|
||||
}
|
||||
}
|
||||
>;
|
||||
{
|
||||
collectionSearchList: {
|
||||
collectionItemList: Array<
|
||||
{
|
||||
cid: string,
|
||||
type: number,
|
||||
status: number,
|
||||
author: {
|
||||
type: number,
|
||||
numId: string,
|
||||
strId: string,
|
||||
groupId: string,
|
||||
groupName: string,
|
||||
uid: string;
|
||||
},
|
||||
bid: number,
|
||||
category: number,
|
||||
createTime: string,
|
||||
collectTime: string,
|
||||
modifyTime: string,
|
||||
sequence: string,
|
||||
shareUrl: string,
|
||||
customGroupId: number,
|
||||
securityBeat: boolean,
|
||||
summary: {
|
||||
textSummary: unknown,
|
||||
linkSummary: unknown,
|
||||
gallerySummary: unknown,
|
||||
audioSummary: unknown,
|
||||
videoSummary: unknown,
|
||||
fileSummary: unknown,
|
||||
locationSummary: unknown,
|
||||
richMediaSummary: unknown,
|
||||
};
|
||||
}>,
|
||||
hasMore: boolean,
|
||||
bottomTimeStamp: string;
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
getCollectionContent(...args: unknown[]): unknown;// needs 5 arguments
|
||||
getCollectionContent (arg1: string, arg2: number, arg3: string, arg4: string, arg5: boolean): unknown;// needs 5 arguments
|
||||
|
||||
getCollectionCustomGroupList(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getCollectionCustomGroupList (): unknown;// needs 0 arguments
|
||||
|
||||
getCollectionUserInfo(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getCollectionUserInfo (): unknown;// needs 0 arguments
|
||||
|
||||
searchCollectionItemList(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchCollectionItemList (arg1: string, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
addMsgToCollection(...args: unknown[]): unknown;// needs 2 arguments
|
||||
addMsgToCollection (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
collectionArkShare(...args: unknown[]): unknown;// needs 1 arguments
|
||||
collectionArkShare (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
collectionFileForward(...args: unknown[]): unknown;// needs 3 arguments
|
||||
collectionFileForward (arg1: number, arg2: string, arg3: unknown): unknown;// needs 3 arguments
|
||||
|
||||
downloadCollectionFile(...args: unknown[]): unknown;// needs 4 arguments
|
||||
downloadCollectionFile (arg1: string, arg2: string, arg3: unknown, arg4: string): unknown;// needs 4 arguments
|
||||
|
||||
downloadCollectionFileThumbPic(...args: unknown[]): unknown;// needs 4 arguments
|
||||
downloadCollectionFileThumbPic (arg1: string, arg2: string, arg3: unknown, arg4: number): unknown;// needs 4 arguments
|
||||
|
||||
downloadCollectionPic(...args: unknown[]): unknown;// needs 3 arguments
|
||||
downloadCollectionPic (arg1: string, arg2: string, arg3: unknown): unknown;// needs 3 arguments
|
||||
|
||||
cancelDownloadCollectionFile(...args: unknown[]): unknown;// needs 1 arguments
|
||||
cancelDownloadCollectionFile (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
deleteCollectionItemList(...args: unknown[]): unknown;// needs 1 arguments
|
||||
deleteCollectionItemList (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
editCollectionItem(...args: unknown[]): unknown;// needs 2 arguments
|
||||
editCollectionItem (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
getEditPicInfoByPath(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getEditPicInfoByPath (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
collectionFastUpload(...args: unknown[]): unknown;// needs 1 arguments
|
||||
collectionFastUpload (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
editCollectionItemAfterFastUpload(...args: unknown[]): unknown;// needs 2 arguments
|
||||
editCollectionItemAfterFastUpload (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
createNewCollectionItem(...args: unknown[]): unknown;// needs 1 arguments
|
||||
createNewCollectionItem (arg: unknown): unknown;// needs 1 arguments
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelConfigMgrService {
|
||||
addKernelConfigMgrListener (listener: unknown): number;
|
||||
|
||||
removeKernelConfigMgrListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
export interface NodeIKernelDbToolsService {
|
||||
|
||||
depositDatabase(...args: unknown[]): unknown;
|
||||
depositDatabase (arg: unknown): unknown;
|
||||
|
||||
backupDatabase(...args: unknown[]): unknown;
|
||||
backupDatabase (arg: unknown): unknown;
|
||||
|
||||
retrieveDatabase(...args: unknown[]): unknown;
|
||||
retrieveDatabase (arg: unknown): unknown;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelDirectSessionService {
|
||||
addKernelDirectSessionListener (listener: unknown): number;
|
||||
|
||||
removeKernelDirectSessionListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,3 +1,13 @@
|
||||
export interface NodeIKernelECDHService {
|
||||
sendOIDBECRequest: (data: Uint8Array) => Promise<Uint8Array>;
|
||||
|
||||
init (): unknown;
|
||||
|
||||
setIsDebug (isDebug: boolean): unknown;
|
||||
|
||||
setGuid (guid: string): unknown;
|
||||
|
||||
sendOIDBRequest (cmd: number, serviceType: number, subCmd: number, data: string, extraData: unknown): Promise<unknown>;
|
||||
|
||||
sendSSORequest (cmd: string, serviceType: number, data: string, extraData: unknown): Promise<unknown>;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface NodeIKernelEmojiService {
|
||||
getAIGCEmojiList (arg1: unknown, arg2: boolean): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface NodeIKernelFeedService {
|
||||
addKernelFeedListener (listener: unknown): number;
|
||||
|
||||
removeKernelFeedListener (listenerId: number): void;
|
||||
|
||||
getChannelDraft (arg1: string, arg2: number): unknown;
|
||||
|
||||
getFeedCount (arg: unknown): unknown;
|
||||
|
||||
getFeedLikeUserList (arg1: unknown, arg2: number): unknown;
|
||||
|
||||
getFeedRichMediaFilePath (arg1: number, arg2: string, arg3: string, arg4: number, arg5: boolean): unknown;
|
||||
|
||||
getJoinedRecommendItems (arg1: unknown, arg2: boolean): unknown;
|
||||
|
||||
setChannelDraft (arg1: string, arg2: string, arg3: number): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,37 +1,41 @@
|
||||
import { NodeIKernelFileAssistantListener } from '@/napcat-core/index';
|
||||
|
||||
export interface NodeIKernelFileAssistantService {
|
||||
addKernelFileAssistantListener(listener: NodeIKernelFileAssistantListener): unknown;
|
||||
addKernelFileAssistantListener (listener: NodeIKernelFileAssistantListener): unknown;
|
||||
|
||||
removeKernelFileAssistantListener(arg1: unknown[]): unknown;
|
||||
removeKernelFileAssistantListener (arg1: unknown[]): unknown;
|
||||
|
||||
getFileAssistantList(arg1: unknown[]): unknown;
|
||||
getFileAssistantList (arg1: unknown[]): unknown;
|
||||
|
||||
getMoreFileAssistantList(arg1: unknown[]): unknown;
|
||||
getMoreFileAssistantList (arg1: unknown[]): unknown;
|
||||
|
||||
getFileSessionList(): unknown;
|
||||
getFileSessionList (): unknown;
|
||||
|
||||
searchFile(keywords: string[], params: { resultType: number, pageLimit: number }, resultId: number): number;
|
||||
searchFile (keywords: string[], params: { resultType: number, pageLimit: number; }, resultId: number): number;
|
||||
|
||||
resetSearchFileSortType(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
resetSearchFileSortType (arg1: number, arg2: number, arg3: number): unknown;
|
||||
|
||||
searchMoreFile(arg1: unknown[]): unknown;
|
||||
searchMoreFile (arg1: unknown[]): unknown;
|
||||
|
||||
cancelSearchFile(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
cancelSearchFile (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
downloadFile(fileIds: string[]): { result: number, errMsg: string };
|
||||
downloadFile (fileIds: string[]): { result: number, errMsg: string; };
|
||||
|
||||
forwardFile(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
forwardFile (arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
cancelFileAction(arg1: unknown[]): unknown;
|
||||
cancelFileAction (arg1: unknown[]): unknown;
|
||||
|
||||
retryFileAction(arg1: unknown[]): unknown;
|
||||
retryFileAction (arg1: unknown[]): unknown;
|
||||
|
||||
deleteFile(arg1: unknown[]): unknown;
|
||||
deleteFile (arg1: unknown[]): unknown;
|
||||
|
||||
saveAs(arg1: unknown, arg2: unknown): unknown;
|
||||
saveAs (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
saveAsWithRename(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
saveAsWithRename (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
isNull(): boolean;
|
||||
getFilePathCount (arg: unknown): unknown;
|
||||
|
||||
updateRecentOperateForMsg (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface NodeIKernelFileBridgeClientService {
|
||||
addKernelFileBridgeClientListener (listener: unknown): number;
|
||||
|
||||
removeKernelFileBridgeClientListener (listenerId: number): void;
|
||||
|
||||
getPageContent (arg1: boolean, arg2: string): unknown;
|
||||
|
||||
getThumbnail (arg1: boolean, arg2: string, arg3: unknown): unknown;
|
||||
|
||||
searchFolderForFiles (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelFileBridgeHostService {
|
||||
addKernelFileBridgeHostListener (listener: unknown): number;
|
||||
|
||||
removeKernelFileBridgeHostListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -24,13 +24,13 @@ export interface NodeIKernelFlashTransferService {
|
||||
seq: number;
|
||||
}>; // 2 arg 重点 // 自动上传
|
||||
|
||||
createMergeShareTask (...args: unknown[]): unknown; // 2 arg
|
||||
createMergeShareTask (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
updateFlashTransfer (...args: unknown[]): unknown; // 2 arg
|
||||
updateFlashTransfer (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
getFileSetList (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetList (arg: unknown): unknown; // 1 arg
|
||||
|
||||
getFileSetListCount (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetListCount (arg: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 获取file set 的信息
|
||||
@@ -50,11 +50,11 @@ export interface NodeIKernelFlashTransferService {
|
||||
rsp: FileListResponse;
|
||||
}>; // 1 arg 这个方法QQ有bug??? 并没有,是我参数有问题
|
||||
|
||||
getDownloadedFileCount (...args: unknown[]): unknown; // 1 arg
|
||||
getDownloadedFileCount (arg: unknown): unknown; // 1 arg
|
||||
|
||||
getLocalFileList (...args: unknown[]): unknown; // 3 arg
|
||||
getLocalFileList (arg1: number, arg2: string, arg3: Array<unknown>[]): unknown; // 3 arg
|
||||
|
||||
batchRemoveUserFileSetHistory (...args: unknown[]): unknown; // 1 arg
|
||||
batchRemoveUserFileSetHistory (arg: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 获取分享链接
|
||||
@@ -73,26 +73,26 @@ export interface NodeIKernelFlashTransferService {
|
||||
fileSetId: string;
|
||||
}>; // 1 arg code == share code
|
||||
|
||||
batchRemoveFile (...args: unknown[]): unknown; // 1 arg
|
||||
batchRemoveFile (arg: unknown): unknown; // 1 arg
|
||||
|
||||
checkUploadPathValid (...args: unknown[]): unknown; // 1 arg
|
||||
checkUploadPathValid (arg: unknown): unknown; // 1 arg
|
||||
|
||||
cleanFailedFiles (...args: unknown[]): unknown; // 2 arg
|
||||
cleanFailedFiles (arg1: number, arg2: Array<unknown>[]): unknown; // 2 arg
|
||||
|
||||
/**
|
||||
* 暂停所有的任务
|
||||
*/
|
||||
resumeAllUnfinishedTasks (): unknown; // 0 arg !!
|
||||
|
||||
addFileSetUploadListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetUploadListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetUploadListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetUploadListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 开始上传任务 适用于已暂停的
|
||||
* @param fileSetId
|
||||
*/
|
||||
startFileSetUpload (fileSetId: string): void; // 1 arg 并不是新建任务,应该是暂停后的启动
|
||||
startFileSetUpload (fileSetId: unknown): void; // 1 arg 并不是新建任务,应该是暂停后的启动
|
||||
|
||||
/**
|
||||
* 结束,无法再次启动
|
||||
@@ -110,27 +110,27 @@ export interface NodeIKernelFlashTransferService {
|
||||
* 继续上传
|
||||
* @param args
|
||||
*/
|
||||
resumeFileSetUpload (...args: unknown[]): unknown; // 1 arg 继续
|
||||
resumeFileSetUpload (fileSetId: unknown): unknown; // 1 arg 继续
|
||||
|
||||
pauseFileUpload (...args: unknown[]): unknown; // 1 arg
|
||||
pauseFileUpload (arg: unknown): unknown; // 1 arg
|
||||
|
||||
resumeFileUpload (...args: unknown[]): unknown; // 1 arg
|
||||
resumeFileUpload (arg: unknown): unknown; // 1 arg
|
||||
|
||||
stopFileUpload (...args: unknown[]): unknown; // 1 arg
|
||||
stopFileUpload (arg: unknown): unknown; // 1 arg
|
||||
|
||||
asyncGetThumbnailPath (...args: unknown[]): unknown; // 2 arg
|
||||
asyncGetThumbnailPath (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
setDownLoadDefaultFileDir (...args: unknown[]): unknown; // 1 arg
|
||||
setDownLoadDefaultFileDir (dir: unknown): unknown; // 1 arg
|
||||
|
||||
setFileSetDownloadDir (...args: unknown[]): unknown; // 2 arg
|
||||
setFileSetDownloadDir (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
getFileSetDownloadDir (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetDownloadDir (arg: unknown): unknown; // 1 arg
|
||||
|
||||
setFlashTransferDir (...args: unknown[]): unknown; // 2 arg
|
||||
setFlashTransferDir (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
addFileSetDownloadListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetDownloadListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetDownloadListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetDownloadListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 开始下载file set的函数 同开始上传
|
||||
@@ -154,13 +154,13 @@ export interface NodeIKernelFlashTransferService {
|
||||
extraInfo: 0;
|
||||
}>; // 2 arg
|
||||
|
||||
startFileListDownLoad (...args: unknown[]): unknown; // 4 arg // 大概率是选择set里面的部分文件进行下载,没必要,不想写
|
||||
startFileListDownLoad (arg1: string, arg2: number, arg3: Array<unknown>[], arg4: unknown): unknown; // 4 arg // 大概率是选择set里面的部分文件进行下载,没必要,不想写
|
||||
|
||||
pauseFileListDownLoad (...args: unknown[]): unknown; // 2 arg
|
||||
pauseFileListDownLoad (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
resumeFileListDownLoad (...args: unknown[]): unknown; // 2 arg
|
||||
resumeFileListDownLoad (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
stopFileListDownLoad (...args: unknown[]): unknown; // 2 arg
|
||||
stopFileListDownLoad (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
startThumbnailListDownload (fileSetId: string): Promise<GeneralCallResult>; // 1 arg // 缩略图下载
|
||||
|
||||
@@ -174,31 +174,31 @@ export interface NodeIKernelFlashTransferService {
|
||||
expireTimestampSeconds: string;
|
||||
}>; // 1 arg
|
||||
|
||||
startFileListDownLoadBySessionId (...args: unknown[]): unknown; // 2 arg
|
||||
startFileListDownLoadBySessionId (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
addFileSetSimpleStatusListener (...args: unknown[]): unknown; // 2 arg
|
||||
addFileSetSimpleStatusListener (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
addFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 2 arg
|
||||
addFileSetSimpleStatusMonitoring (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
removeFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 2 arg
|
||||
removeFileSetSimpleStatusMonitoring (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
removeFileSetSimpleStatusListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetSimpleStatusListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addDesktopFileSetSimpleStatusListener (...args: unknown[]): unknown; // 1 arg
|
||||
addDesktopFileSetSimpleStatusListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addDesktopFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
addDesktopFileSetSimpleStatusMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeDesktopFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
removeDesktopFileSetSimpleStatusMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeDesktopFileSetSimpleStatusListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeDesktopFileSetSimpleStatusListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFileSetSimpleUploadInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetSimpleUploadInfoListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFileSetSimpleUploadInfoMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetSimpleUploadInfoMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetSimpleUploadInfoMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetSimpleUploadInfoMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetSimpleUploadInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetSimpleUploadInfoListener (arg: unknown): unknown; // 1 arg
|
||||
/**
|
||||
* 发送闪传消息
|
||||
* @param sendArgs
|
||||
@@ -211,9 +211,9 @@ export interface NodeIKernelFlashTransferService {
|
||||
};
|
||||
}>; // 1 arg 估计是file set id
|
||||
|
||||
addFlashTransferTaskInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFlashTransferTaskInfoListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFlashTransferTaskInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFlashTransferTaskInfoListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
retrieveLocalLastFailedSetTasksInfo (): unknown; // 0 arg
|
||||
|
||||
@@ -227,77 +227,77 @@ export interface NodeIKernelFlashTransferService {
|
||||
};
|
||||
}>; // 1 arg
|
||||
|
||||
getLocalFileListByStatuses (...args: unknown[]): unknown; // 1 arg
|
||||
getLocalFileListByStatuses (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addTransferStateListener (...args: unknown[]): unknown; // 1 arg
|
||||
addTransferStateListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeTransferStateListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeTransferStateListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
getFileSetFirstClusteringList (...args: unknown[]): unknown; // 3 arg
|
||||
getFileSetFirstClusteringList (arg1: number, arg2: string, arg3: number): unknown; // 3 arg
|
||||
|
||||
getFileSetClusteringList (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetClusteringList (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFileSetClusteringListListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetClusteringListListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetClusteringListListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetClusteringListListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
getFileSetClusteringDetail (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetClusteringDetail (arg: unknown): unknown; // 1 arg
|
||||
|
||||
doAIOFlashTransferBubbleActionWithStatus (...args: unknown[]): unknown; // 4 arg
|
||||
doAIOFlashTransferBubbleActionWithStatus (arg1: string, arg2: number, arg3: number, arg4: unknown): unknown; // 4 arg
|
||||
|
||||
getFilesTransferProgress (...args: unknown[]): unknown; // 1 arg
|
||||
getFilesTransferProgress (arg: unknown): unknown; // 1 arg
|
||||
|
||||
pollFilesTransferProgress (...args: unknown[]): unknown; // 1 arg
|
||||
pollFilesTransferProgress (arg: unknown): unknown; // 1 arg
|
||||
|
||||
cancelPollFilesTransferProgress (...args: unknown[]): unknown; // 1 arg
|
||||
cancelPollFilesTransferProgress (arg: unknown): unknown; // 1 arg
|
||||
|
||||
checkDownloadStatusBeforeLocalFileOper (...args: unknown[]): unknown; // 3 arg
|
||||
checkDownloadStatusBeforeLocalFileOper (arg1: number, arg2: string, arg3: string): unknown; // 3 arg
|
||||
|
||||
getCompressedFileFolder (...args: unknown[]): unknown; // 1 arg
|
||||
getCompressedFileFolder (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFolderListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFolderListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFolderListener (...args: unknown[]): unknown;
|
||||
removeFolderListener (listenerId: unknown): unknown;
|
||||
|
||||
addCompressedFileListener (...args: unknown[]): unknown;
|
||||
addCompressedFileListener (listener: unknown): unknown;
|
||||
|
||||
removeCompressedFileListener (...args: unknown[]): unknown;
|
||||
removeCompressedFileListener (listenerId: unknown): unknown;
|
||||
|
||||
getFileCategoryList (...args: unknown[]): unknown;
|
||||
getFileCategoryList (arg: unknown): unknown;
|
||||
|
||||
addDeviceStatusListener (...args: unknown[]): unknown;
|
||||
addDeviceStatusListener (listener: unknown): unknown;
|
||||
|
||||
removeDeviceStatusListener (...args: unknown[]): unknown;
|
||||
removeDeviceStatusListener (listenerId: unknown): unknown;
|
||||
|
||||
checkDeviceStatus (...args: unknown[]): unknown;
|
||||
checkDeviceStatus (arg: unknown): unknown;
|
||||
|
||||
pauseAllTasks (...args: unknown[]): unknown; // 2 arg
|
||||
pauseAllTasks (arg1: number, arg2: number): unknown; // 2 arg
|
||||
|
||||
resumePausedTasksAfterDeviceStatus (...args: unknown[]): unknown;
|
||||
resumePausedTasksAfterDeviceStatus (arg: unknown): unknown;
|
||||
|
||||
onSystemGoingToSleep (...args: unknown[]): unknown;
|
||||
onSystemGoingToSleep (arg: unknown): unknown;
|
||||
|
||||
onSystemWokeUp (...args: unknown[]): unknown;
|
||||
onSystemWokeUp (arg: unknown): unknown;
|
||||
|
||||
getFileMetas (...args: unknown[]): unknown;
|
||||
getFileMetas (arg: unknown): unknown;
|
||||
|
||||
addDownloadCntStatisticsListener (...args: unknown[]): unknown;
|
||||
addDownloadCntStatisticsListener (listener: unknown): unknown;
|
||||
|
||||
removeDownloadCntStatisticsListener (...args: unknown[]): unknown;
|
||||
removeDownloadCntStatisticsListener (listenerId: unknown): unknown;
|
||||
|
||||
detectPrivacyInfoInPaths (...args: unknown[]): unknown;
|
||||
detectPrivacyInfoInPaths (arg: unknown): unknown;
|
||||
|
||||
getFileThumbnailUrl (...args: unknown[]): unknown;
|
||||
getFileThumbnailUrl (arg: unknown): unknown;
|
||||
|
||||
handleDownloadFinishAfterSaveToAlbum (...args: unknown[]): unknown;
|
||||
handleDownloadFinishAfterSaveToAlbum (arg: unknown): unknown;
|
||||
|
||||
checkBatchFilesDownloadStatus (...args: unknown[]): unknown;
|
||||
checkBatchFilesDownloadStatus (arg: unknown): unknown;
|
||||
|
||||
onCheckAlbumStorageStatusResult (...args: unknown[]): unknown;
|
||||
onCheckAlbumStorageStatusResult (arg: unknown): unknown;
|
||||
|
||||
addFileAlbumStorageListener (...args: unknown[]): unknown;
|
||||
addFileAlbumStorageListener (listener: unknown): unknown;
|
||||
|
||||
removeFileAlbumStorageListener (...args: unknown[]): unknown;
|
||||
removeFileAlbumStorageListener (listenerId: unknown): unknown;
|
||||
|
||||
refreshFolderStatus (...args: unknown[]): unknown;
|
||||
refreshFolderStatus (arg: unknown): unknown;
|
||||
}
|
||||
@@ -16,29 +16,29 @@ import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
|
||||
export interface NodeIKernelGroupService {
|
||||
|
||||
modifyGroupExtInfoV2(groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult &
|
||||
{
|
||||
result: {
|
||||
groupCode: string,
|
||||
result: number
|
||||
}
|
||||
}>;
|
||||
modifyGroupExtInfoV2 (groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult &
|
||||
{
|
||||
result: {
|
||||
groupCode: string,
|
||||
result: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
// --->
|
||||
// 待启用 For Next Version 3.2.0
|
||||
// isTroopMember ? 0 : 111
|
||||
getGroupMemberMaxNum(groupCode: string, serviceType: number): Promise<unknown>;
|
||||
getGroupMemberMaxNum (groupCode: string, serviceType: number): Promise<unknown>;
|
||||
|
||||
getAllGroupPrivilegeFlag(troopUinList: string[], serviceType: number): Promise<unknown>;
|
||||
getAllGroupPrivilegeFlag (troopUinList: string[], serviceType: number): Promise<unknown>;
|
||||
// <---
|
||||
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, unknown> } }>;
|
||||
getGroupExt0xEF0Info (enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, unknown>; }; }>;
|
||||
|
||||
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
kickMemberV2 (param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
|
||||
quitGroupV2(param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||
quitGroupV2 (param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||
|
||||
getMemberCommonInfo(Req: {
|
||||
getMemberCommonInfo (Req: {
|
||||
groupCode: string,
|
||||
startUin: string,
|
||||
identifyFlag: string,
|
||||
@@ -54,39 +54,39 @@ export interface NodeIKernelGroupService {
|
||||
memberNum: number,
|
||||
filterMethod: string,
|
||||
onlineFlag: string,
|
||||
realSpecialTitleFlag: number
|
||||
realSpecialTitleFlag: number;
|
||||
}): Promise<unknown>;
|
||||
|
||||
getGroupMemberLevelInfo(groupCode: string): Promise<unknown>;
|
||||
getGroupMemberLevelInfo (groupCode: string): Promise<unknown>;
|
||||
|
||||
getGroupInfoForJoinGroup(groupCode: string, needPrivilegeFlag: boolean, serviceType: number): Promise<unknown>;
|
||||
getGroupInfoForJoinGroup (groupCode: string, needPrivilegeFlag: boolean, serviceType: number): Promise<unknown>;
|
||||
|
||||
getGroupHonorList(req: { groupCodes: Array<string> }): Promise<unknown>;
|
||||
getGroupHonorList (req: { groupCodes: Array<string>; }): Promise<unknown>;
|
||||
|
||||
getUinByUids(uins: string[]): Promise<{
|
||||
getUinByUids (uins: string[]): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
uins: Map<string, string>
|
||||
uins: Map<string, string>;
|
||||
}>;
|
||||
|
||||
getUidByUins(uins: string[]): Promise<{
|
||||
getUidByUins (uins: string[]): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
uids: Map<string, string>
|
||||
uids: Map<string, string>;
|
||||
}>;
|
||||
|
||||
checkGroupMemberCache(arrayList: Array<string>): Promise<unknown>;
|
||||
checkGroupMemberCache (arrayList: Array<string>): Promise<unknown>;
|
||||
|
||||
getGroupLatestEssenceList(groupCode: string): Promise<unknown>;
|
||||
getGroupLatestEssenceList (groupCode: string): Promise<unknown>;
|
||||
|
||||
shareDigest(Req: {
|
||||
shareDigest (Req: {
|
||||
appId: string,
|
||||
appType: number,
|
||||
msgStyle: number,
|
||||
recvUin: string,
|
||||
sendType: number,
|
||||
clientInfo: {
|
||||
platform: number
|
||||
platform: number;
|
||||
},
|
||||
richMsg: {
|
||||
usingArk: boolean,
|
||||
@@ -94,122 +94,122 @@ export interface NodeIKernelGroupService {
|
||||
summary: string,
|
||||
url: string,
|
||||
pictureUrl: string,
|
||||
brief: string
|
||||
}
|
||||
brief: string;
|
||||
};
|
||||
}): Promise<unknown>;
|
||||
|
||||
isEssenceMsg(req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<unknown>;
|
||||
isEssenceMsg (req: { groupCode: string, msgRandom: number, msgSeq: number; }): Promise<unknown>;
|
||||
|
||||
queryCachedEssenceMsg(req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<{ items: Array<unknown> }>;
|
||||
queryCachedEssenceMsg (req: { groupCode: string, msgRandom: number, msgSeq: number; }): Promise<{ items: Array<unknown>; }>;
|
||||
|
||||
fetchGroupEssenceList(req: {
|
||||
fetchGroupEssenceList (req: {
|
||||
groupCode: string,
|
||||
pageStart: number,
|
||||
pageLimit: number
|
||||
}, Arg: unknown): Promise<unknown>;
|
||||
pageLimit: number;
|
||||
}, Arg: string): Promise<unknown>;
|
||||
|
||||
getAllMemberList(groupCode: string, forceFetch: boolean): Promise<{
|
||||
getAllMemberList (groupCode: string, forceFetch: boolean): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
result: {
|
||||
ids: Array<{
|
||||
uid: string,
|
||||
index: number// 0
|
||||
index: number;// 0
|
||||
}>,
|
||||
infos: Map<string, GroupMember>,
|
||||
finish: true,
|
||||
hasRobot: false
|
||||
}
|
||||
hasRobot: false;
|
||||
};
|
||||
}>;
|
||||
|
||||
setHeader(uid: string, path: string): Promise<GeneralCallResult>;
|
||||
setHeader (uid: string, path: string): Promise<GeneralCallResult>;
|
||||
|
||||
addKernelGroupListener(listener: NodeIKernelGroupListener): number;
|
||||
addKernelGroupListener (listener: NodeIKernelGroupListener): number;
|
||||
|
||||
removeKernelGroupListener(listenerId: number): void;
|
||||
removeKernelGroupListener (listenerId: number): void;
|
||||
|
||||
createMemberListScene(groupCode: string, scene: string): string;
|
||||
createMemberListScene (groupCode: string, scene: string): string;
|
||||
|
||||
destroyMemberListScene(SceneId: string): void;
|
||||
destroyMemberListScene (SceneId: string): void;
|
||||
|
||||
getNextMemberList(sceneId: string, groupMemberInfoListId: { index: number, uid: string } | undefined, num: number): Promise<{
|
||||
getNextMemberList (sceneId: string, groupMemberInfoListId: { index: number, uid: string; } | undefined, num: number): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
result: { ids: string[], infos: Map<string, GroupMember>, finish: boolean, hasRobot: boolean }
|
||||
result: { ids: string[], infos: Map<string, GroupMember>, finish: boolean, hasRobot: boolean; };
|
||||
}>;
|
||||
|
||||
getPrevMemberList(): unknown;
|
||||
getPrevMemberList (): unknown;
|
||||
|
||||
monitorMemberList(): unknown;
|
||||
monitorMemberList (): unknown;
|
||||
|
||||
searchMember(sceneId: string, keywords: string[]): unknown;
|
||||
searchMember (sceneId: string, keywords: string[]): unknown;
|
||||
|
||||
getMemberInfo(group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
|
||||
getMemberInfo (group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
kickMember(groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
|
||||
kickMember (groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
|
||||
|
||||
modifyMemberRole(groupCode: string, uid: string, role: NTGroupMemberRole): void;
|
||||
modifyMemberRole (groupCode: string, uid: string, role: NTGroupMemberRole): void;
|
||||
|
||||
modifyMemberCardName(groupCode: string, uid: string, cardName: string): void;
|
||||
modifyMemberCardName (groupCode: string, uid: string, cardName: string): void;
|
||||
|
||||
getTransferableMemberInfo(groupCode: string): unknown;// 获取整个群的
|
||||
getTransferableMemberInfo (groupCode: string): unknown;// 获取整个群的
|
||||
|
||||
transferGroup(uid: string): void;
|
||||
transferGroup (uid: string): void;
|
||||
|
||||
getGroupList(force: boolean): Promise<GeneralCallResult>;
|
||||
getGroupList (force: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupExtList(force: boolean): Promise<GeneralCallResult>;
|
||||
getGroupExtList (force: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): Promise<GeneralCallResult>;
|
||||
getGroupDetailInfo (groupCode: string, groupInfoSource: GroupInfoSource): Promise<GeneralCallResult>;
|
||||
|
||||
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;// req
|
||||
getMemberExtInfo (param: GroupExtParam): Promise<unknown>;// req
|
||||
|
||||
getGroupAllInfo(groupId: string, sourceId: number): Promise<unknown>;
|
||||
getGroupAllInfo (groupId: string, sourceId: number): Promise<unknown>;
|
||||
|
||||
getDiscussExistInfo(): unknown;
|
||||
getDiscussExistInfo (): unknown;
|
||||
|
||||
getGroupConfMember(): unknown;
|
||||
getGroupConfMember (): unknown;
|
||||
|
||||
getGroupMsgMask(): unknown;
|
||||
getGroupMsgMask (): unknown;
|
||||
|
||||
getGroupPortrait(): void;
|
||||
getGroupPortrait (): void;
|
||||
|
||||
modifyGroupName(groupCode: string, groupName: string, isNormalMember: boolean): Promise<GeneralCallResult>;
|
||||
modifyGroupName (groupCode: string, groupName: string, isNormalMember: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
modifyGroupRemark(groupCode: string, remark: string): Promise<GeneralCallResult>;
|
||||
modifyGroupRemark (groupCode: string, remark: string): Promise<GeneralCallResult>;
|
||||
|
||||
modifyGroupDetailInfo(groupCode: string, arg: unknown): void;
|
||||
modifyGroupDetailInfo (groupCode: string, arg: unknown): void;
|
||||
|
||||
// 第二个参数在大多数情况为0 设置群成员权限 例如上传群文件权限和群成员付费/加入邀请加入时为8
|
||||
modifyGroupDetailInfoV2(param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
|
||||
modifyGroupDetailInfoV2 (param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
|
||||
|
||||
setGroupMsgMask(groupCode: string, arg: unknown): void;
|
||||
setGroupMsgMask (groupCode: string, arg: unknown): void;
|
||||
|
||||
changeGroupShieldSettingTemp(groupCode: string, arg: unknown): void;
|
||||
changeGroupShieldSettingTemp (groupCode: string, arg: unknown): void;
|
||||
|
||||
inviteToGroup(arg: unknown): void;
|
||||
inviteToGroup (arg: unknown): void;
|
||||
|
||||
inviteMembersToGroup(args: unknown[]): void;
|
||||
inviteMembersToGroup (args: unknown[]): void;
|
||||
|
||||
inviteMembersToGroupWithMsg(args: unknown): void;
|
||||
inviteMembersToGroupWithMsg (args: unknown): void;
|
||||
|
||||
createGroup(arg: unknown): void;
|
||||
createGroup (arg: unknown): void;
|
||||
|
||||
createGroupWithMembers(arg: unknown): void;
|
||||
createGroupWithMembers (arg: unknown): void;
|
||||
|
||||
quitGroup(groupCode: string): void;
|
||||
quitGroup (groupCode: string): void;
|
||||
|
||||
destroyGroup(groupCode: string): void;
|
||||
destroyGroup (groupCode: string): void;
|
||||
|
||||
getSingleScreenNotifies(doubt: boolean, startSeq: string, count: number): Promise<GeneralCallResult>;
|
||||
getSingleScreenNotifies (doubt: boolean, startSeq: string, count: number): Promise<GeneralCallResult>;
|
||||
|
||||
clearGroupNotifies(groupCode: string): void;
|
||||
clearGroupNotifies (groupCode: string): void;
|
||||
|
||||
getGroupNotifiesUnreadCount(doubt: boolean): Promise<GeneralCallResult>;
|
||||
getGroupNotifiesUnreadCount (doubt: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
clearGroupNotifiesUnreadCount(doubt: boolean): void;
|
||||
clearGroupNotifiesUnreadCount (doubt: boolean): void;
|
||||
|
||||
operateSysNotify(
|
||||
operateSysNotify (
|
||||
doubt: boolean,
|
||||
operateMsg: {
|
||||
operateType: NTGroupRequestOperateTypes,
|
||||
@@ -217,80 +217,277 @@ export interface NodeIKernelGroupService {
|
||||
seq: string,
|
||||
type: GroupNotifyMsgType,
|
||||
groupCode: string,
|
||||
postscript: string
|
||||
}
|
||||
postscript: string;
|
||||
};
|
||||
}): Promise<void>;
|
||||
|
||||
setTop(groupCode: string, isTop: boolean): void;
|
||||
setTop (groupCode: string, isTop: boolean): void;
|
||||
|
||||
getGroupBulletin(groupCode: string): unknown;
|
||||
getGroupBulletin (groupCode: string): unknown;
|
||||
|
||||
deleteGroupBulletin(groupCode: string, seq: string, noticeId: string): void;
|
||||
deleteGroupBulletin (groupCode: string, seq: string, noticeId: string): void;
|
||||
|
||||
publishGroupBulletin(groupCode: string, pskey: string, data: unknown): Promise<GeneralCallResult>;
|
||||
publishGroupBulletin (groupCode: string, pskey: string, data: unknown): Promise<GeneralCallResult>;
|
||||
|
||||
publishInstructionForNewcomers(groupCode: string, arg: unknown): void;
|
||||
publishInstructionForNewcomers (groupCode: string, arg: unknown): void;
|
||||
|
||||
uploadGroupBulletinPic(groupCode: string, pskey: string, imagePath: string): Promise<GeneralCallResult & {
|
||||
uploadGroupBulletinPic (groupCode: string, pskey: string, imagePath: string): Promise<GeneralCallResult & {
|
||||
errCode: number;
|
||||
picInfo?: {
|
||||
id: string,
|
||||
width: number,
|
||||
height: number
|
||||
}
|
||||
height: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
downloadGroupBulletinRichMedia(groupCode: string): unknown;
|
||||
downloadGroupBulletinRichMedia (groupCode: string): unknown;
|
||||
|
||||
getGroupBulletinList(groupCode: string): unknown;
|
||||
getGroupBulletinList (groupCode: string): unknown;
|
||||
|
||||
getGroupStatisticInfo(groupCode: string): unknown;
|
||||
getGroupStatisticInfo (groupCode: string): unknown;
|
||||
|
||||
getGroupRemainAtTimes(groupCode: string): Promise<Omit<GeneralCallResult, 'result'> & {
|
||||
getGroupRemainAtTimes (groupCode: string): Promise<Omit<GeneralCallResult, 'result'> & {
|
||||
errCode: number,
|
||||
atInfo: {
|
||||
canAtAll: boolean
|
||||
RemainAtAllCountForUin: number
|
||||
RemainAtAllCountForGroup: number
|
||||
atTimesMsg: string
|
||||
canNotAtAllMsg: ''
|
||||
}
|
||||
canAtAll: boolean;
|
||||
RemainAtAllCountForUin: number;
|
||||
RemainAtAllCountForGroup: number;
|
||||
atTimesMsg: string;
|
||||
canNotAtAllMsg: '';
|
||||
};
|
||||
}>;
|
||||
|
||||
getJoinGroupNoVerifyFlag(groupCode: string): unknown;
|
||||
getJoinGroupNoVerifyFlag (groupCode: string): unknown;
|
||||
|
||||
getGroupArkInviteState(groupCode: string): unknown;
|
||||
getGroupArkInviteState (groupCode: string): unknown;
|
||||
|
||||
reqToJoinGroup(groupCode: string, arg: unknown): void;
|
||||
reqToJoinGroup (groupCode: string, arg: unknown): void;
|
||||
|
||||
setGroupShutUp(groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
|
||||
setGroupShutUp (groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>;
|
||||
getGroupShutUpMemberList (groupCode: string): Promise<GeneralCallResult>;
|
||||
|
||||
setMemberShutUp(groupCode: string, memberTimes: { uid: string, timeStamp: number }[]): Promise<GeneralCallResult>;
|
||||
setMemberShutUp (groupCode: string, memberTimes: { uid: string, timeStamp: number; }[]): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupRecommendContactArkJson(groupCode: string): Promise<GeneralCallResult & { arkJson: string }>;
|
||||
getGroupRecommendContactArkJson (groupCode: string): Promise<GeneralCallResult & { arkJson: string; }>;
|
||||
|
||||
getJoinGroupLink(param: {
|
||||
getJoinGroupLink (param: {
|
||||
groupCode: string,
|
||||
srcId: number, // 73
|
||||
needShortUrl: boolean, // true
|
||||
additionalParam: string// ''
|
||||
}): Promise<GeneralCallResult & { url?: string }>;
|
||||
additionalParam: string;// ''
|
||||
}): Promise<GeneralCallResult & { url?: string; }>;
|
||||
|
||||
modifyGroupExtInfo(groupCode: string, arg: unknown): void;
|
||||
modifyGroupExtInfo (groupCode: string, arg: unknown): void;
|
||||
|
||||
addGroupEssence(param: {
|
||||
groupCode: string
|
||||
addGroupEssence (param: {
|
||||
groupCode: string;
|
||||
msgRandom: number,
|
||||
msgSeq: number
|
||||
msgSeq: number;
|
||||
}): Promise<unknown>;
|
||||
|
||||
removeGroupEssence(param: {
|
||||
groupCode: string
|
||||
removeGroupEssence (param: {
|
||||
groupCode: string;
|
||||
msgRandom: number,
|
||||
msgSeq: number
|
||||
msgSeq: number;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
|
||||
// --- Methods from IDA binary analysis ---
|
||||
clearGroupNotifyLocalUnreadCount (groupCode: string, arg: number): unknown;
|
||||
|
||||
getCardAppList (groupCode: string, arg: boolean): unknown;
|
||||
|
||||
getGroupBulletinDetail (arg1: string, arg2: string, arg3: string, arg4: boolean): unknown;
|
||||
|
||||
getGroupBulletinReadUsers (arg1: string, arg2: string, arg3: string, arg4: number, arg5: number, arg6: number): unknown;
|
||||
|
||||
getGroupDetailInfoByFilter (arg1: unknown, arg2: number, arg3: number, arg4: boolean): unknown;
|
||||
|
||||
getGroupDetailInfoForMqq (arg1: string, arg2: number, arg3: number, arg4: boolean): unknown;
|
||||
|
||||
getMemberInfoForMqq (arg1: string, arg2: Array<unknown>[], arg3: boolean): unknown;
|
||||
|
||||
getMemberInfoForMqqV2 (arg1: string, arg2: Array<unknown>[], arg3: boolean, arg4: string): unknown;
|
||||
|
||||
getRecGroups (arg1: string, arg2: unknown, arg3: string): unknown;
|
||||
|
||||
getSingleScreenNotifiesV2 (arg1: boolean, arg2: string, arg3: number, arg4: number): unknown;
|
||||
|
||||
modifyWxNotifyStatus (arg1: string, arg2: number): unknown;
|
||||
|
||||
operateSpecialFocus (arg1: string, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
remindGroupBulletinRead (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
transferGroupV2 (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
operateSysNotifyV2 (arg1: unknown, arg2: unknown): Promise<unknown>;
|
||||
|
||||
getAllMemberListV2 (groupCode: string, arg: unknown): unknown;
|
||||
|
||||
createGroupV2 (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
modifyGroupExtInfoV2 (groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult & {
|
||||
result: { groupCode: string, result: number; };
|
||||
}>;
|
||||
|
||||
modifyGroupDetailInfoV2 (param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
|
||||
|
||||
setGroupMsgMaskV2 (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupSquareRedpointInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupSquareHomeHead (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getCapsuleApp (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getCapsuleAppPro (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getMemberInfoCache (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupSecLevelInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getSubGroupInfo (arg: unknown): unknown;
|
||||
|
||||
getSwitchStatusForEssenceMsg (arg: unknown): unknown;
|
||||
|
||||
getTeamUpDetail (arg: unknown): unknown;
|
||||
|
||||
getTeamUpList (arg: unknown): unknown;
|
||||
|
||||
getTeamUpMembers (arg: unknown): unknown;
|
||||
|
||||
getTeamUpTemplateList (arg: unknown): unknown;
|
||||
|
||||
getTopicPage (arg1: string, arg2: string, arg3: string, arg4: string): unknown;
|
||||
|
||||
getTopicRecall (arg: unknown): unknown;
|
||||
|
||||
getWxNotifyStatus (arg: unknown): unknown;
|
||||
|
||||
getGroupPayToJoinStatus (arg: unknown): unknown;
|
||||
|
||||
getGroupSeqAndJoinTimeForGrayTips (arg: unknown): unknown;
|
||||
|
||||
getGroupTagRecords (arg: unknown): unknown;
|
||||
|
||||
getGroupBindGuilds (arg: unknown): unknown;
|
||||
|
||||
getGroupFlagForThirdApp (arg: unknown): unknown;
|
||||
|
||||
getGroupMsgLimitFreq (arg: unknown): unknown;
|
||||
|
||||
getGroupMedalList (arg: unknown): unknown;
|
||||
|
||||
getGroupDBVersion (arg: unknown): unknown;
|
||||
|
||||
getGroupInviteNoAuthLimitNum (arg: unknown): unknown;
|
||||
|
||||
getAIOBindGuildInfo (arg: unknown): unknown;
|
||||
|
||||
getAppCenter (arg: unknown): unknown;
|
||||
|
||||
getAICommonVoice (arg: unknown): unknown;
|
||||
|
||||
groupBlacklistDelApply (arg: unknown): unknown;
|
||||
|
||||
groupBlacklistGetAllApply (arg: unknown): unknown;
|
||||
|
||||
fetchGroupNotify (arg: unknown): unknown;
|
||||
|
||||
queryJoinGroupCanNoVerify (arg: unknown): unknown;
|
||||
|
||||
halfScreenPullNotice (arg: unknown): unknown;
|
||||
|
||||
halfScreenReportClick (arg: unknown): unknown;
|
||||
|
||||
joinGroup (arg: unknown): unknown;
|
||||
|
||||
listAllAIVoice (arg: unknown): unknown;
|
||||
|
||||
miniAppGetGroupInfo (arg: unknown): unknown;
|
||||
|
||||
postTeamUp (arg: unknown): unknown;
|
||||
|
||||
queryAIOBindGuild (arg: unknown): unknown;
|
||||
|
||||
removeGroupFromGroupList (arg: unknown): unknown;
|
||||
|
||||
saveAIVoice (arg: unknown): unknown;
|
||||
|
||||
setActiveExtGroup (arg: unknown): unknown;
|
||||
|
||||
setAIOBindGuild (arg: unknown): unknown;
|
||||
|
||||
setCapsuleSwitch (arg: unknown): unknown;
|
||||
|
||||
setGroupAppList (arg: unknown): unknown;
|
||||
|
||||
setGroupGeoInfo (arg: unknown): unknown;
|
||||
|
||||
setGroupRelationToGuild (arg: unknown): unknown;
|
||||
|
||||
setRcvJoinVerifyMsg (arg: unknown): unknown;
|
||||
|
||||
teamUpCreateGroup (arg: unknown): unknown;
|
||||
|
||||
teamUpInviteToGroup (arg: unknown): unknown;
|
||||
|
||||
teamUpRequestToJoin (arg: unknown): unknown;
|
||||
|
||||
teamUpSubmitDeadline (arg: unknown): unknown;
|
||||
|
||||
topicFeedback (arg: unknown): unknown;
|
||||
|
||||
topicReport (arg: unknown): unknown;
|
||||
|
||||
shareTopic (arg: unknown): unknown;
|
||||
|
||||
unbindAllGuilds (arg: unknown): unknown;
|
||||
|
||||
updateGroupInfoByMqq (arg: unknown): unknown;
|
||||
|
||||
updateMemberInfoByMqq (arg: unknown): unknown;
|
||||
|
||||
updateTeamUp (arg: unknown): unknown;
|
||||
|
||||
applyTeamUp (arg: unknown): unknown;
|
||||
|
||||
deleteTeamUp (arg: unknown): unknown;
|
||||
|
||||
getFindPageRecommendGroup (arg: unknown): unknown;
|
||||
|
||||
getTransferableMemberInfo (groupCode: string): unknown;
|
||||
|
||||
createGroupProfileShare (arg: unknown): unknown;
|
||||
|
||||
destroyMemberListScene (sceneId: string): void;
|
||||
|
||||
clearGroupSquareRedpointCache (arg: unknown): unknown;
|
||||
|
||||
checkGroupMemberCache (arrayList: Array<string>): Promise<unknown>;
|
||||
|
||||
cleanCapsuleCache (arg: unknown): unknown;
|
||||
|
||||
downloadGroupBulletinRichMedia (groupCode: string): unknown;
|
||||
|
||||
kickMemberV2 (param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
|
||||
destroyGroupV2 (arg: unknown): unknown;
|
||||
|
||||
quitGroupV2 (param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||
|
||||
inviteToGroupV2 (arg: unknown): unknown;
|
||||
|
||||
getGroupMsgMask (): unknown;
|
||||
|
||||
batchQueryCachedGroupDetailInfo (arg: unknown): unknown;
|
||||
|
||||
getGroupMemberLevelInfo (groupCode: string): Promise<unknown>;
|
||||
|
||||
getIllegalMemberList (arg: unknown): unknown;
|
||||
|
||||
getGroupRecommendContactArkJsonToWechat (arg: unknown): unknown;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface NodeIKernelGroupTabService {
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
getGroupTab (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelHandOffService {
|
||||
addKernelHandOffListener (listener: unknown): number;
|
||||
|
||||
removeKernelHandOffListener (listenerId: number): void;
|
||||
|
||||
changeHandOffActivities (arg: unknown): unknown;
|
||||
|
||||
deleteRecentHandOffActivities (arg: unknown): unknown;
|
||||
|
||||
getHandOffActivities (arg: unknown): unknown;
|
||||
|
||||
sendCapsulePanelActivities (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface NodeIKernelLiteBusinessService {
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
clearLiteBusiness (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
clickLiteAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
exposeLiteAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getLiteBusiness (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
getRevealTofuAuthority (arg: unknown): unknown;
|
||||
|
||||
recentRevealExposure (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelLockService {
|
||||
addKernelLockListener (listener: unknown): number;
|
||||
|
||||
removeKernelLockListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -29,10 +29,11 @@ export interface PasswordLoginArgType {
|
||||
uin: string;
|
||||
passwordMd5: string;// passwMD5
|
||||
step: number;// 猜测是需要二次认证 参数 一次为0
|
||||
newDeviceLoginSig: string;
|
||||
proofWaterSig: string;
|
||||
proofWaterRand: string;
|
||||
proofWaterSid: string;
|
||||
newDeviceLoginSig: Uint8Array;
|
||||
proofWaterSig: Uint8Array;
|
||||
proofWaterRand: Uint8Array;
|
||||
proofWaterSid: Uint8Array;
|
||||
unusualDeviceCheckSig: Uint8Array;
|
||||
}
|
||||
|
||||
export interface LoginListItem {
|
||||
@@ -63,7 +64,9 @@ export interface QuickLoginResult {
|
||||
export interface NodeIKernelLoginService {
|
||||
getMsfStatus: () => number;
|
||||
|
||||
setLoginMiscData (arg0: string, value: string): unknown;
|
||||
setLoginMiscData (key: string, value: string): unknown;
|
||||
|
||||
getLoginMiscData (key: string): Promise<GeneralCallResult & { value: string; }>;
|
||||
|
||||
getMachineGuid (): string;
|
||||
|
||||
@@ -73,14 +76,12 @@ export interface NodeIKernelLoginService {
|
||||
|
||||
addKernelLoginListener (listener: NodeIKernelLoginListener): number;
|
||||
|
||||
removeKernelLoginListener (listener: number): void;
|
||||
removeKernelLoginListener (listenerId: number): void;
|
||||
|
||||
initConfig (config: LoginInitConfig): void;
|
||||
|
||||
getLoginMiscData (data: string): Promise<GeneralCallResult & { value: string; }>;
|
||||
|
||||
getLoginList (): Promise<{
|
||||
result: number, // 0是ok
|
||||
result: number,
|
||||
LocalLoginInfoList: LoginListItem[];
|
||||
}>;
|
||||
|
||||
@@ -89,4 +90,32 @@ export interface NodeIKernelLoginService {
|
||||
passwordLogin (param: PasswordLoginArgType): Promise<QuickLoginResult>;
|
||||
|
||||
getQRCodePicture (): boolean;
|
||||
|
||||
destroy (): unknown;
|
||||
|
||||
cancel (): unknown;
|
||||
|
||||
abortPolling (): unknown;
|
||||
|
||||
startPolling (): unknown;
|
||||
|
||||
deleteLoginInfo (arg: unknown): unknown;
|
||||
|
||||
isHasLoginInfo (uin: string): boolean;
|
||||
|
||||
loadNoLoginUnitedConfig (arg: unknown): unknown;
|
||||
|
||||
loginUnusualDevice (arg: unknown): unknown;
|
||||
|
||||
registerUnitedConfigPushGroupList (groupList: unknown): unknown;
|
||||
|
||||
resetLoginInfo (arg: unknown): unknown;
|
||||
|
||||
setAutoLogin (arg: unknown): unknown;
|
||||
|
||||
setRemerberPwd (remember: boolean): unknown;
|
||||
|
||||
online (): unknown;
|
||||
|
||||
offline (): unknown;
|
||||
}
|
||||
@@ -6,6 +6,9 @@ enum ProxyType {
|
||||
}
|
||||
export interface NodeIKernelMSFService {
|
||||
getServerTime (): string;
|
||||
getMsfStatus (): number;
|
||||
online (): unknown;
|
||||
offline (): unknown;
|
||||
setNetworkProxy (param: {
|
||||
userName: string,
|
||||
userPwd: string,
|
||||
@@ -50,4 +53,5 @@ export interface NodeIKernelMSFService {
|
||||
accountType: number,
|
||||
transInfoMap: Map<string, unknown>;
|
||||
}): Promise<Buffer>;
|
||||
onMsfPushForTesting (arg1: unknown, arg2: unknown): unknown;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelMiniAppService {
|
||||
addKernelMiniAppListener (listener: unknown): number;
|
||||
|
||||
removeKernelMiniAppListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
export interface NodeIKernelMsgBackupService {
|
||||
addKernelMsgBackupListener(listener: unknown): number;
|
||||
addKernelMsgBackupListener (listener: unknown): number;
|
||||
|
||||
removeKernelMsgBackupListener(listenerId: number): void;
|
||||
removeKernelMsgBackupListener (listenerId: number): void;
|
||||
|
||||
getMsgBackupLocation(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getMsgBackupLocation (): unknown;// needs 0 arguments
|
||||
|
||||
setMsgBackupLocation(...args: unknown[]): unknown;// needs 1 arguments
|
||||
setMsgBackupLocation (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
requestMsgBackup(...args: unknown[]): unknown;// needs 0 arguments
|
||||
requestMsgBackup (): unknown;// needs 0 arguments
|
||||
|
||||
requestMsgRestore(...args: unknown[]): unknown;// needs 1 arguments
|
||||
requestMsgRestore (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
requestMsgMigrate(...args: unknown[]): unknown;// needs 1 arguments
|
||||
requestMsgMigrate (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getLocalStorageBackup(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getLocalStorageBackup (): unknown;// needs 0 arguments
|
||||
|
||||
deleteLocalBackup(...args: unknown[]): unknown;// needs 1 arguments
|
||||
deleteLocalBackup (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
clearCache(...args: unknown[]): unknown;// needs 0 arguments
|
||||
clearCache (): unknown;// needs 0 arguments
|
||||
|
||||
start(...args: unknown[]): unknown;// needs 1 arguments
|
||||
start (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
stop(...args: unknown[]): unknown;// needs 1 arguments
|
||||
stop (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
pause(...args: unknown[]): unknown;// needs 2 arguments
|
||||
pause (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ElementType, MessageElement, Peer, RawMessage, FileElement, SendMessageElement } from '@/napcat-core/types';
|
||||
import { ElementType, MessageElement, Peer, RawMessage, FileElement, SendMessageElement, AvRecordElement, TofuRecordElement } from '@/napcat-core/types';
|
||||
import { NodeIKernelMsgListener } from '@/napcat-core/listeners/NodeIKernelMsgListener';
|
||||
import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
import { MsgReqType, QueryMsgsParams, TmpChatInfoApi } from '@/napcat-core/types/msg';
|
||||
import { MsgReqType, QueryMsgsParams, TmpChatInfoApi, MsgTypeFilter, MsgIdentity, SgrpStreamParams, GrayTipJsonInfo, ForwardFileInfo, LocalGrayTipInfo, TokenInfo, BackGroundInfo } from '@/napcat-core/types/msg';
|
||||
|
||||
export interface NodeIKernelMsgService {
|
||||
buildMultiForwardMsg (req: { srcMsgIds: Array<string>, srcContact: Peer; }): Promise<GeneralCallResult & { rspInfo: { elements: unknown; }; }>;
|
||||
@@ -10,21 +10,21 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
addKernelMsgListener (nodeIKernelMsgListener: NodeIKernelMsgListener): number;
|
||||
|
||||
sendMsg (msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<unknown, unknown>): Promise<GeneralCallResult>;
|
||||
sendMsg (msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<number, unknown>): Promise<GeneralCallResult>;
|
||||
|
||||
recallMsg (peer: Peer, msgIds: string[]): Promise<GeneralCallResult>;
|
||||
|
||||
addKernelMsgImportToolListener (arg: unknown): unknown;
|
||||
addKernelMsgImportToolListener (listener: unknown): string;
|
||||
|
||||
removeKernelMsgListener (args: unknown): unknown;
|
||||
removeKernelMsgListener (listenerId: string): void;
|
||||
|
||||
addKernelTempChatSigListener (...args: unknown[]): unknown;
|
||||
addKernelTempChatSigListener (listener: unknown): string;
|
||||
|
||||
removeKernelTempChatSigListener (...args: unknown[]): unknown;
|
||||
removeKernelTempChatSigListener (listenerId: string): void;
|
||||
|
||||
setAutoReplyTextList (AutoReplyText: Array<unknown>, i2: number): unknown;
|
||||
|
||||
getAutoReplyTextList (...args: unknown[]): unknown;
|
||||
getAutoReplyTextList (): unknown;
|
||||
|
||||
getOnLineDev (): void;
|
||||
|
||||
@@ -52,85 +52,85 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
downloadOnlineStatusCommonByUrl (arg0: string, arg1: string): unknown;
|
||||
|
||||
setToken (arg: unknown): unknown;
|
||||
setToken (tokenInfo: TokenInfo): Promise<GeneralCallResult>;
|
||||
|
||||
switchForeGround (): unknown;
|
||||
|
||||
switchBackGround (arg: unknown): unknown;
|
||||
switchBackGround (info: BackGroundInfo): Promise<GeneralCallResult>;
|
||||
|
||||
setTokenForMqq (token: string): unknown;
|
||||
|
||||
switchForeGroundForMqq (...args: unknown[]): unknown;
|
||||
switchForeGroundForMqq (data: string | Uint8Array): Promise<GeneralCallResult>;
|
||||
|
||||
switchBackGroundForMqq (...args: unknown[]): unknown;
|
||||
switchBackGroundForMqq (data: string | Uint8Array): Promise<GeneralCallResult>;
|
||||
|
||||
getMsgSetting (...args: unknown[]): unknown;
|
||||
getMsgSetting (): unknown;
|
||||
|
||||
setMsgSetting (...args: unknown[]): unknown;
|
||||
setMsgSetting (setting: unknown): unknown;
|
||||
|
||||
addSendMsg (...args: unknown[]): unknown;
|
||||
addSendMsg (msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<number, unknown>): unknown;
|
||||
|
||||
cancelSendMsg (peer: Peer, msgId: string): Promise<void>;
|
||||
|
||||
switchToOfflineSendMsg (peer: Peer, MsgId: string): unknown;
|
||||
|
||||
reqToOfflineSendMsg (...args: unknown[]): unknown;
|
||||
reqToOfflineSendMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
refuseReceiveOnlineFileMsg (peer: Peer, MsgId: string): unknown;
|
||||
|
||||
resendMsg (peer: Peer, msgId: string): Promise<void>;
|
||||
|
||||
recallMsg (...args: unknown[]): unknown;
|
||||
reeditRecallMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
reeditRecallMsg (...args: unknown[]): unknown;
|
||||
forwardMsg (msgIds: string[], peer: Peer, dstPeers: Peer[], commentElements: unknown): Promise<GeneralCallResult>;
|
||||
|
||||
forwardMsg (...args: unknown[]): Promise<GeneralCallResult>;
|
||||
forwardMsgWithComment (msgIds: string[], srcContact: Peer, dstContacts: Peer[], commentElements: Array<unknown>, arg5: unknown): unknown;
|
||||
|
||||
forwardMsgWithComment (...args: unknown[]): unknown;
|
||||
forwardSubMsgWithComment (msgIds: string[], subMsgIds: string[], srcContact: Peer, dstContacts: Peer[], commentElements: Array<unknown>, arg6: unknown): unknown;
|
||||
|
||||
forwardSubMsgWithComment (...args: unknown[]): unknown;
|
||||
forwardRichMsgInVist (richMsgInfos: Array<unknown>, dstContacts: Peer[]): unknown;
|
||||
|
||||
forwardRichMsgInVist (...args: unknown[]): unknown;
|
||||
forwardFile (fileInfo: ForwardFileInfo, peer: Peer): unknown;
|
||||
|
||||
forwardFile (...args: unknown[]): unknown;
|
||||
multiForwardMsg (peer: Peer, srcContact: Peer, msgIds: string[]): unknown;
|
||||
|
||||
multiForwardMsg (...args: unknown[]): unknown;
|
||||
multiForwardMsgWithComment (msgInfos: Array<unknown>, srcContact: Peer, dstContact: Peer, commentElements: Array<unknown>, arg5: unknown): unknown;
|
||||
|
||||
multiForwardMsgWithComment (...args: unknown[]): unknown;
|
||||
deleteRecallMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
deleteRecallMsg (...args: unknown[]): unknown;
|
||||
deleteRecallMsgForLocal (peer: Peer, msgId: string): unknown;
|
||||
|
||||
deleteRecallMsgForLocal (...args: unknown[]): unknown;
|
||||
addLocalGrayTipMsg (peer: Peer, grayTipInfo: LocalGrayTipInfo, isUnread: boolean): unknown;
|
||||
|
||||
addLocalGrayTipMsg (...args: unknown[]): unknown;
|
||||
addLocalJsonGrayTipMsg (arg1: Peer, arg2: GrayTipJsonInfo, arg3: boolean, arg4: boolean): unknown;
|
||||
|
||||
addLocalJsonGrayTipMsg (...args: unknown[]): unknown;
|
||||
addLocalJsonGrayTipMsgExt (arg1: Peer, arg2: MsgIdentity, arg3: GrayTipJsonInfo, arg4: boolean, arg5: boolean): unknown;
|
||||
|
||||
addLocalJsonGrayTipMsgExt (...args: unknown[]): unknown;
|
||||
IsLocalJsonTipValid (tipType: number): boolean;
|
||||
|
||||
IsLocalJsonTipValid (...args: unknown[]): unknown;
|
||||
addLocalAVRecordMsg (peer: Peer, avRecord: AvRecordElement): unknown;
|
||||
|
||||
addLocalAVRecordMsg (...args: unknown[]): unknown;
|
||||
|
||||
addLocalTofuRecordMsg (...args: unknown[]): unknown;
|
||||
addLocalTofuRecordMsg (peer: Peer, tofuRecord: TofuRecordElement): unknown;
|
||||
|
||||
addLocalRecordMsg (Peer: Peer, msgId: string, ele: MessageElement, attr: Array<unknown> | number, front: boolean): Promise<unknown>;
|
||||
|
||||
addLocalRecordMsgWithExtInfos (peer: Peer, msgId: string, extInfos: unknown): unknown;
|
||||
|
||||
deleteMsg (Peer: Peer, msgIds: Array<string>): Promise<unknown>;
|
||||
|
||||
updateElementExtBufForUI (...args: unknown[]): unknown;
|
||||
updateElementExtBufForUI (arg1: Peer, arg2: string, arg3: string, arg4: string | Uint8Array): unknown;
|
||||
|
||||
updateMsgRecordExtPbBufForUI (...args: unknown[]): unknown;
|
||||
updateMsgRecordExtPbBufForUI (arg1: Peer, arg2: string, arg3: unknown): unknown;
|
||||
|
||||
startMsgSync (...args: unknown[]): unknown;
|
||||
startMsgSync (): unknown;
|
||||
|
||||
startGuildMsgSync (...args: unknown[]): unknown;
|
||||
startGuildMsgSync (): unknown;
|
||||
|
||||
isGuildChannelSync (...args: unknown[]): unknown;
|
||||
isGuildChannelSync (): unknown;
|
||||
|
||||
getMsgUniqueId (UniqueId: string): string;
|
||||
|
||||
isMsgMatched (...args: unknown[]): unknown;
|
||||
isMsgMatched (matchInfo: unknown): unknown;
|
||||
|
||||
getOnlineFileMsgs (peer: Peer): Promise<GeneralCallResult & {
|
||||
msgList: {
|
||||
@@ -147,7 +147,7 @@ export interface NodeIKernelMsgService {
|
||||
}[]; // 一大坨,懒得写
|
||||
}>;
|
||||
|
||||
getAllOnlineFileMsgs (...args: unknown[]): unknown;
|
||||
getAllOnlineFileMsgs (): unknown;
|
||||
|
||||
getLatestDbMsgs (peer: Peer, cnt: number): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
@@ -171,7 +171,7 @@ export interface NodeIKernelMsgService {
|
||||
}>;
|
||||
|
||||
// @deprecated
|
||||
getMsgsWithMsgTimeAndClientSeqForC2C (...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
getMsgsWithMsgTimeAndClientSeqForC2C (peer: Peer, arg2: string, arg3: string, arg4: number, arg5: boolean, arg6: boolean, arg7: boolean): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgsWithStatus (params: {
|
||||
peer: Peer;
|
||||
@@ -186,6 +186,7 @@ export interface NodeIKernelMsgService {
|
||||
getMsgsBySeqRange (peer: Peer, startSeq: string, endSeq: string): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
|
||||
// @deprecated
|
||||
getMsgsBySeqAndCount (peer: Peer, seq: string, count: number, desc: boolean, isReverseOrder: boolean): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
@@ -211,19 +212,19 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
getSourceOfReplyMsgByClientSeqAndTime (peer: Peer, clientSeq: string, time: string, replyMsgId: string): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgsByTypeFilter (peer: Peer, msgId: string, cnt: unknown, queryOrder: boolean, typeFilter: {
|
||||
getMsgsByTypeFilter (peer: Peer, msgId: string, cnt: Array<unknown>, queryOrder: boolean, typeFilter: {
|
||||
type: number,
|
||||
subtype: Array<number>;
|
||||
}): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgsByTypeFilters (peer: Peer, msgId: string, cnt: unknown, queryOrder: boolean, typeFilters: Array<{
|
||||
getMsgsByTypeFilters (peer: Peer, msgId: string, cnt: number, queryOrder: boolean, typeFilters: Array<{
|
||||
type: number,
|
||||
subtype: Array<number>;
|
||||
}>): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgWithAbstractByFilterParam (...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
getMsgWithAbstractByFilterParam (arg1: Peer, arg2: string, arg3: string, arg4: number, arg5: MsgTypeFilter): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
queryMsgsWithFilter (...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
queryMsgsWithFilter (msgId: string, msgTime: string, param: QueryMsgsParams): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
// queryMsgsWithFilterVer2(MsgId: string, MsgTime: string, param: QueryMsgsParams): Promise<unknown>;
|
||||
|
||||
@@ -235,11 +236,11 @@ export interface NodeIKernelMsgService {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
|
||||
setMsgRichInfoFlag (...args: unknown[]): unknown;
|
||||
setMsgRichInfoFlag (flag: boolean): void;
|
||||
|
||||
queryPicOrVideoMsgs (msgId: string, msgTime: string, megSeq: string, param: QueryMsgsParams): Promise<unknown>;
|
||||
|
||||
queryPicOrVideoMsgsDesktop (...args: unknown[]): unknown;
|
||||
queryPicOrVideoMsgsDesktop (msgId: string, msgTime: string, msgSeq: string, param: QueryMsgsParams): unknown;
|
||||
|
||||
queryEmoticonMsgs (msgId: string, msgTime: string, msgSeq: string, Params: QueryMsgsParams): Promise<unknown>;
|
||||
|
||||
@@ -247,81 +248,81 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
queryMsgsAndAbstractsWithFilter (msgId: string, msgTime: string, megSeq: string, param: QueryMsgsParams): unknown;
|
||||
|
||||
setFocusOnGuild (...args: unknown[]): unknown;
|
||||
setFocusOnGuild (arg: unknown): unknown;
|
||||
|
||||
setFocusSession (...args: unknown[]): unknown;
|
||||
setFocusSession (arg: unknown): unknown;
|
||||
|
||||
enableFilterUnreadInfoNotify (...args: unknown[]): unknown;
|
||||
enableFilterUnreadInfoNotify (arg: unknown): unknown;
|
||||
|
||||
enableFilterMsgAbstractNotify (...args: unknown[]): unknown;
|
||||
enableFilterMsgAbstractNotify (arg: unknown): unknown;
|
||||
|
||||
onScenesChangeForSilenceMode (...args: unknown[]): unknown;
|
||||
onScenesChangeForSilenceMode (arg: unknown): unknown;
|
||||
|
||||
getContactUnreadCnt (...args: unknown[]): unknown;
|
||||
getContactUnreadCnt (peers: Peer[]): unknown;
|
||||
|
||||
getUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getGuildUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getGuildUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getGuildUnreadCntTabInfo (...args: unknown[]): unknown;
|
||||
getGuildUnreadCntTabInfo (arg: unknown): unknown;
|
||||
|
||||
getAllGuildUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getAllGuildUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getAllJoinGuildCnt (...args: unknown[]): unknown;
|
||||
getAllJoinGuildCnt (arg: unknown): unknown;
|
||||
|
||||
getAllDirectSessionUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getAllDirectSessionUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getCategoryUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getCategoryUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getGuildFeedsUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getGuildFeedsUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
setUnVisibleChannelCntInfo (...args: unknown[]): unknown;
|
||||
setUnVisibleChannelCntInfo (arg: unknown): unknown;
|
||||
|
||||
setUnVisibleChannelTypeCntInfo (...args: unknown[]): unknown;
|
||||
setUnVisibleChannelTypeCntInfo (arg: unknown): unknown;
|
||||
|
||||
setVisibleGuildCntInfo (...args: unknown[]): unknown;
|
||||
setVisibleGuildCntInfo (arg: unknown): unknown;
|
||||
|
||||
setMsgRead (peer: Peer): Promise<GeneralCallResult>;
|
||||
|
||||
setAllC2CAndGroupMsgRead (): Promise<unknown>;
|
||||
|
||||
setGuildMsgRead (...args: unknown[]): unknown;
|
||||
setGuildMsgRead (arg: unknown): unknown;
|
||||
|
||||
setAllGuildMsgRead (...args: unknown[]): unknown;
|
||||
setAllGuildMsgRead (arg: unknown): unknown;
|
||||
|
||||
setMsgReadAndReport (...args: unknown[]): unknown;
|
||||
setMsgReadAndReport (peer: Peer, msg: RawMessage): unknown;
|
||||
|
||||
setSpecificMsgReadAndReport (...args: unknown[]): unknown;
|
||||
setSpecificMsgReadAndReport (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
setLocalMsgRead (...args: unknown[]): unknown;
|
||||
setLocalMsgRead (peer: Peer): unknown;
|
||||
|
||||
setGroupGuildMsgRead (...args: unknown[]): unknown;
|
||||
setGroupGuildMsgRead (arg: unknown): unknown;
|
||||
|
||||
getGuildGroupTransData (...args: unknown[]): unknown;
|
||||
getGuildGroupTransData (arg: unknown): unknown;
|
||||
|
||||
setGroupGuildBubbleRead (...args: unknown[]): unknown;
|
||||
setGroupGuildBubbleRead (arg: unknown): unknown;
|
||||
|
||||
getGuildGroupBubble (...args: unknown[]): unknown;
|
||||
getGuildGroupBubble (arg: unknown): unknown;
|
||||
|
||||
fetchGroupGuildUnread (...args: unknown[]): unknown;
|
||||
fetchGroupGuildUnread (arg: unknown): unknown;
|
||||
|
||||
setGroupGuildFlag (...args: unknown[]): unknown;
|
||||
setGroupGuildFlag (arg: unknown): unknown;
|
||||
|
||||
setGuildUDCFlag (...args: unknown[]): unknown;
|
||||
setGuildUDCFlag (arg: unknown): unknown;
|
||||
|
||||
setGuildTabUserFlag (...args: unknown[]): unknown;
|
||||
setGuildTabUserFlag (arg: unknown): unknown;
|
||||
|
||||
setBuildMode (flag: number/* 0 1 3 */): unknown;
|
||||
|
||||
setConfigurationServiceData (...args: unknown[]): unknown;
|
||||
setConfigurationServiceData (arg: unknown): unknown;
|
||||
|
||||
setMarkUnreadFlag (...args: unknown[]): unknown;
|
||||
setMarkUnreadFlag (peer: Peer, unread: boolean): unknown;
|
||||
|
||||
getChannelEventFlow (...args: unknown[]): unknown;
|
||||
getChannelEventFlow (arg: unknown): unknown;
|
||||
|
||||
getMsgEventFlow (...args: unknown[]): unknown;
|
||||
getMsgEventFlow (arg: unknown): unknown;
|
||||
|
||||
getRichMediaFilePathForMobileQQSend (...args: unknown[]): unknown;
|
||||
getRichMediaFilePathForMobileQQSend (arg: unknown): unknown;
|
||||
|
||||
getRichMediaFilePathForGuild (arg: {
|
||||
md5HexStr: string,
|
||||
@@ -334,15 +335,15 @@ export interface NodeIKernelMsgService {
|
||||
file_uuid: '';
|
||||
}): string;
|
||||
|
||||
assembleMobileQQRichMediaFilePath (...args: unknown[]): unknown;
|
||||
assembleMobileQQRichMediaFilePath (arg: unknown): unknown;
|
||||
|
||||
getFileThumbSavePathForSend (thumbSize: number, createNeed: boolean): string;
|
||||
|
||||
getFileThumbSavePath (...args: unknown[]): unknown;
|
||||
getFileThumbSavePath (arg1: string, arg2: number, arg3: boolean): unknown;
|
||||
|
||||
translatePtt2Text (msgId: string, peer: Peer, msgElement: MessageElement): unknown;
|
||||
|
||||
setPttPlayedState (...args: unknown[]): unknown;
|
||||
setPttPlayedState (arg1: string, arg2: Peer, arg3: string): unknown;
|
||||
|
||||
fetchFavEmojiList (str: string, num: number, backward: boolean, forceRefresh: boolean): Promise<GeneralCallResult & {
|
||||
emojiInfoList: Array<{
|
||||
@@ -368,49 +369,49 @@ export interface NodeIKernelMsgService {
|
||||
}>;
|
||||
}>;
|
||||
|
||||
addFavEmoji (...args: unknown[]): unknown;
|
||||
addFavEmoji (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmoticonList (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonList (arg1: number, arg2: number): unknown;
|
||||
|
||||
fetchMarketEmoticonShowImage (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonShowImage (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmoticonAioImage (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonAioImage (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmotionJsonFile (...args: unknown[]): unknown;
|
||||
fetchMarketEmotionJsonFile (arg: unknown): unknown;
|
||||
|
||||
getMarketEmoticonPath (...args: unknown[]): unknown;
|
||||
getMarketEmoticonPath (arg1: number, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
getMarketEmoticonPathBySync (...args: unknown[]): unknown;
|
||||
getMarketEmoticonPathBySync (arg1: number, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
fetchMarketEmoticonFaceImages (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonFaceImages (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmoticonAuthDetail (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonAuthDetail (arg: unknown): unknown;
|
||||
|
||||
getFavMarketEmoticonInfo (...args: unknown[]): unknown;
|
||||
getFavMarketEmoticonInfo (tabId: number, emojiId: string): unknown;
|
||||
|
||||
addRecentUsedFace (...args: unknown[]): unknown;
|
||||
addRecentUsedFace (arg: unknown): unknown;
|
||||
|
||||
getRecentUsedFaceList (...args: unknown[]): unknown;
|
||||
getRecentUsedFaceList (arg: unknown): unknown;
|
||||
|
||||
getMarketEmoticonEncryptKeys (...args: unknown[]): unknown;
|
||||
getMarketEmoticonEncryptKeys (arg1: number, arg2: Array<unknown>[]): unknown;
|
||||
|
||||
downloadEmojiPic (...args: unknown[]): unknown;
|
||||
downloadEmojiPic (arg1: number, arg2: Array<unknown>[], arg3: number, arg4: Map<unknown, unknown>): unknown;
|
||||
|
||||
deleteFavEmoji (...args: unknown[]): unknown;
|
||||
deleteFavEmoji (arg: unknown): unknown;
|
||||
|
||||
modifyFavEmojiDesc (...args: unknown[]): unknown;
|
||||
modifyFavEmojiDesc (arg: unknown): unknown;
|
||||
|
||||
queryFavEmojiByDesc (...args: unknown[]): unknown;
|
||||
queryFavEmojiByDesc (arg: unknown): unknown;
|
||||
|
||||
getHotPicInfoListSearchString (...args: unknown[]): unknown;
|
||||
getHotPicInfoListSearchString (arg1: string, arg2: string, arg3: number, arg4: number, arg5: boolean): unknown;
|
||||
|
||||
getHotPicSearchResult (...args: unknown[]): unknown;
|
||||
getHotPicSearchResult (arg: unknown): unknown;
|
||||
|
||||
getHotPicHotWords (...args: unknown[]): unknown;
|
||||
getHotPicHotWords (arg: unknown): unknown;
|
||||
|
||||
getHotPicJumpInfo (...args: unknown[]): unknown;
|
||||
getHotPicJumpInfo (arg: unknown): unknown;
|
||||
|
||||
getEmojiResourcePath (...args: unknown[]): unknown;
|
||||
getEmojiResourcePath (arg: unknown): unknown;
|
||||
|
||||
JoinDragonGroupEmoji (JoinDragonGroupEmojiReq: {
|
||||
latestMsgSeq: string,
|
||||
@@ -419,17 +420,17 @@ export interface NodeIKernelMsgService {
|
||||
peerContact: Peer;
|
||||
}): Promise<unknown>;
|
||||
|
||||
getMsgAbstracts (...args: unknown[]): unknown;
|
||||
getMsgAbstracts (arg: unknown): unknown;
|
||||
|
||||
getMsgAbstract (...args: unknown[]): unknown;
|
||||
getMsgAbstract (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
getMsgAbstractList (...args: unknown[]): unknown;
|
||||
getMsgAbstractList (arg: unknown): unknown;
|
||||
|
||||
getMsgAbstractListBySeqRange (...args: unknown[]): unknown;
|
||||
getMsgAbstractListBySeqRange (arg: unknown): unknown;
|
||||
|
||||
refreshMsgAbstracts (...args: unknown[]): unknown;
|
||||
refreshMsgAbstracts (arg: unknown): unknown;
|
||||
|
||||
refreshMsgAbstractsByGuildIds (...args: unknown[]): unknown;
|
||||
refreshMsgAbstractsByGuildIds (arg: unknown): unknown;
|
||||
|
||||
getRichMediaElement (arg: {
|
||||
msgId: string,
|
||||
@@ -440,7 +441,7 @@ export interface NodeIKernelMsgService {
|
||||
downloadType: number,
|
||||
}): Promise<any>;
|
||||
|
||||
cancelGetRichMediaElement (...args: unknown[]): unknown;
|
||||
cancelGetRichMediaElement (arg: unknown): unknown;
|
||||
|
||||
refuseGetRichMediaElement (args: {
|
||||
msgId: string,
|
||||
@@ -451,7 +452,7 @@ export interface NodeIKernelMsgService {
|
||||
downSourceType: number, // 1
|
||||
}): Promise<void>;
|
||||
|
||||
switchToOfflineGetRichMediaElement (...args: unknown[]): unknown;
|
||||
switchToOfflineGetRichMediaElement (arg: unknown): unknown;
|
||||
|
||||
downloadRichMedia (args: {
|
||||
fileModelId: string,
|
||||
@@ -473,21 +474,21 @@ export interface NodeIKernelMsgService {
|
||||
guildId: string;
|
||||
}): Promise<unknown>;
|
||||
|
||||
getFirstUnreadCommonMsg (...args: unknown[]): unknown;
|
||||
getFirstUnreadCommonMsg (arg: unknown): unknown;
|
||||
|
||||
getFirstUnreadAtmeMsg (...args: unknown[]): unknown;
|
||||
getFirstUnreadAtmeMsg (peer: Peer): unknown;
|
||||
|
||||
getFirstUnreadAtallMsg (...args: unknown[]): unknown;
|
||||
getFirstUnreadAtallMsg (peer: Peer): unknown;
|
||||
|
||||
getNavigateInfo (...args: unknown[]): unknown;
|
||||
getNavigateInfo (arg: unknown): unknown;
|
||||
|
||||
getChannelFreqLimitInfo (...args: unknown[]): unknown;
|
||||
getChannelFreqLimitInfo (arg: unknown): unknown;
|
||||
|
||||
getRecentUseEmojiList (...args: unknown[]): unknown;
|
||||
getRecentUseEmojiList (): unknown;
|
||||
|
||||
getRecentEmojiList (...args: unknown[]): unknown;
|
||||
getRecentEmojiList (arg: unknown): unknown;
|
||||
|
||||
setMsgEmojiLikes (...args: unknown[]): unknown;
|
||||
setMsgEmojiLikes (peer: Peer, msgSeq: string, emojiId: string, emojiType: string, setOrCancel: boolean): unknown;
|
||||
|
||||
getMsgEmojiLikesList (peer: Peer, msgSeq: string, emojiId: string, emojiType: string, cookie: string, bForward: boolean, number: number): Promise<{
|
||||
result: number,
|
||||
@@ -503,7 +504,7 @@ export interface NodeIKernelMsgService {
|
||||
isFirstPage: boolean;
|
||||
}>;
|
||||
|
||||
setMsgEmojiLikesForRole (...args: unknown[]): unknown;
|
||||
setMsgEmojiLikesForRole (arg1: Peer, arg2: string, arg3: string, arg4: string, arg5: string, arg6: string, arg7: boolean, arg8: boolean, arg9: SgrpStreamParams): unknown;
|
||||
|
||||
clickInlineKeyboardButton (params: {
|
||||
guildId?: string,
|
||||
@@ -516,7 +517,7 @@ export interface NodeIKernelMsgService {
|
||||
chatType: number; // 1私聊 2群
|
||||
}): Promise<GeneralCallResult & { status: number, promptText: string, promptType: number, promptIcon: number; }>;
|
||||
|
||||
setCurOnScreenMsg (...args: unknown[]): unknown;
|
||||
setCurOnScreenMsg (arg: unknown): unknown;
|
||||
|
||||
setCurOnScreenMsgForMsgEvent (peer: Peer, msgRegList: Map<string, Uint8Array>): void;
|
||||
|
||||
@@ -524,91 +525,91 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
setMiscData (key: string, value: string): unknown;
|
||||
|
||||
getBookmarkData (...args: unknown[]): unknown;
|
||||
getBookmarkData (key: string): unknown;
|
||||
|
||||
setBookmarkData (...args: unknown[]): unknown;
|
||||
setBookmarkData (key: string, value: string): unknown;
|
||||
|
||||
sendShowInputStatusReq (ChatType: number, EventType: number, toUid: string): Promise<unknown>;
|
||||
|
||||
queryCalendar (...args: unknown[]): unknown;
|
||||
queryCalendar (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
queryFirstMsgSeq (peer: Peer, ...args: unknown[]): unknown;
|
||||
queryFirstMsgSeq (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
queryRoamCalendar (...args: unknown[]): unknown;
|
||||
queryRoamCalendar (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
queryFirstRoamMsg (...args: unknown[]): unknown;
|
||||
queryFirstRoamMsg (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
fetchLongMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
fetchLongMsgWithCb (...args: unknown[]): unknown;
|
||||
fetchLongMsgWithCb (peer: Peer, msgId: number): unknown;
|
||||
|
||||
setIsStopKernelFetchLongMsg (...args: unknown[]): unknown;
|
||||
setIsStopKernelFetchLongMsg (arg: unknown): unknown;
|
||||
|
||||
insertGameResultAsMsgToDb (...args: unknown[]): unknown;
|
||||
insertGameResultAsMsgToDb (arg: unknown): unknown;
|
||||
|
||||
getMultiMsg (...args: unknown[]): Promise<GeneralCallResult & {
|
||||
getMultiMsg (arg1: Peer, arg2: string, arg3: string): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
|
||||
setDraft (...args: unknown[]): unknown;
|
||||
setDraft (arg1: Peer, arg2: Array<unknown>[]): unknown;
|
||||
|
||||
getDraft (...args: unknown[]): unknown;
|
||||
getDraft (peer: Peer): unknown;
|
||||
|
||||
deleteDraft (...args: unknown[]): unknown;
|
||||
deleteDraft (peer: Peer): unknown;
|
||||
|
||||
getRecentHiddenSesionList (...args: unknown[]): unknown;
|
||||
getRecentHiddenSesionList (): unknown;
|
||||
|
||||
setRecentHiddenSession (...args: unknown[]): unknown;
|
||||
setRecentHiddenSession (arg: unknown): unknown;
|
||||
|
||||
delRecentHiddenSession (...args: unknown[]): unknown;
|
||||
delRecentHiddenSession (arg: unknown): unknown;
|
||||
|
||||
getCurHiddenSession (...args: unknown[]): unknown;
|
||||
getCurHiddenSession (): unknown;
|
||||
|
||||
setCurHiddenSession (...args: unknown[]): unknown;
|
||||
setCurHiddenSession (arg: unknown): unknown;
|
||||
|
||||
setReplyDraft (...args: unknown[]): unknown;
|
||||
setReplyDraft (arg1: Peer, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
getReplyDraft (...args: unknown[]): unknown;
|
||||
getReplyDraft (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
deleteReplyDraft (...args: unknown[]): unknown;
|
||||
deleteReplyDraft (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
getFirstUnreadAtMsg (peer: Peer): unknown;
|
||||
|
||||
clearMsgRecords (...args: unknown[]): unknown;
|
||||
clearMsgRecords (peer: Peer): unknown;
|
||||
|
||||
IsExistOldDb (...args: unknown[]): unknown;
|
||||
IsExistOldDb (): unknown;
|
||||
|
||||
canImportOldDbMsg (...args: unknown[]): unknown;
|
||||
canImportOldDbMsg (): unknown;
|
||||
|
||||
setPowerStatus (isPowerOn: boolean): unknown;
|
||||
|
||||
canProcessDataMigration (...args: unknown[]): unknown;
|
||||
canProcessDataMigration (): unknown;
|
||||
|
||||
importOldDbMsg (...args: unknown[]): unknown;
|
||||
importOldDbMsg (): unknown;
|
||||
|
||||
stopImportOldDbMsgAndroid (...args: unknown[]): unknown;
|
||||
stopImportOldDbMsgAndroid (): unknown;
|
||||
|
||||
isMqqDataImportFinished (...args: unknown[]): unknown;
|
||||
isMqqDataImportFinished (): unknown;
|
||||
|
||||
getMqqDataImportTableNames (...args: unknown[]): unknown;
|
||||
getMqqDataImportTableNames (): unknown;
|
||||
|
||||
getCurChatImportStatusByUin (...args: unknown[]): unknown;
|
||||
getCurChatImportStatusByUin (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getDataImportUserLevel (): unknown;
|
||||
|
||||
getMsgQRCode (...args: unknown[]): unknown;
|
||||
getMsgQRCode (): unknown;
|
||||
|
||||
getGuestMsgAbstracts (...args: unknown[]): unknown;
|
||||
getGuestMsgAbstracts (arg: unknown): unknown;
|
||||
|
||||
getGuestMsgByRange (...args: unknown[]): unknown;
|
||||
getGuestMsgByRange (arg: unknown): unknown;
|
||||
|
||||
getGuestMsgAbstractByRange (...args: unknown[]): unknown;
|
||||
getGuestMsgAbstractByRange (arg: unknown): unknown;
|
||||
|
||||
registerSysMsgNotification (...args: unknown[]): unknown;
|
||||
registerSysMsgNotification (arg1: number, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
unregisterSysMsgNotification (...args: unknown[]): unknown;
|
||||
unregisterSysMsgNotification (arg1: number, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
enterOrExitAio (...args: unknown[]): unknown;
|
||||
enterOrExitAio (arg: unknown): unknown;
|
||||
|
||||
prepareTempChat (args: unknown): unknown;
|
||||
|
||||
@@ -616,66 +617,66 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
getTempChatInfo (ChatType: number, Uid: string): Promise<TmpChatInfoApi>;
|
||||
|
||||
setContactLocalTop (...args: unknown[]): unknown;
|
||||
setContactLocalTop (peer: Peer, isTop: boolean): unknown;
|
||||
|
||||
switchAnonymousChat (...args: unknown[]): unknown;
|
||||
switchAnonymousChat (arg1: string, arg2: boolean): unknown;
|
||||
|
||||
renameAnonyChatNick (...args: unknown[]): unknown;
|
||||
renameAnonyChatNick (arg: unknown): unknown;
|
||||
|
||||
getAnonymousInfo (...args: unknown[]): unknown;
|
||||
getAnonymousInfo (peer: Peer): unknown;
|
||||
|
||||
updateAnonymousInfo (...args: unknown[]): unknown;
|
||||
updateAnonymousInfo (peer: Peer, arg2: unknown): unknown;
|
||||
|
||||
sendSummonMsg (peer: Peer, MsgElement: unknown, MsgAttributeInfo: unknown): Promise<unknown>;// 频道的东西
|
||||
|
||||
outputGuildUnreadInfo (...args: unknown[]): unknown;
|
||||
outputGuildUnreadInfo (arg: unknown): unknown;
|
||||
|
||||
checkMsgWithUrl (...args: unknown[]): unknown;
|
||||
checkMsgWithUrl (arg: unknown): unknown;
|
||||
|
||||
checkTabListStatus (...args: unknown[]): unknown;
|
||||
checkTabListStatus (): unknown;
|
||||
|
||||
getABatchOfContactMsgBoxInfo (...args: unknown[]): unknown;
|
||||
getABatchOfContactMsgBoxInfo (arg: unknown): unknown;
|
||||
|
||||
insertMsgToMsgBox (peer: Peer, msgId: string, arg: 2006): unknown;
|
||||
|
||||
isHitEmojiKeyword (...args: unknown[]): unknown;
|
||||
isHitEmojiKeyword (arg: unknown): unknown;
|
||||
|
||||
getKeyWordRelatedEmoji (...args: unknown[]): unknown;
|
||||
getKeyWordRelatedEmoji (arg: unknown): unknown;
|
||||
|
||||
recordEmoji (...args: unknown[]): unknown;
|
||||
recordEmoji (type: number, emojiList: Array<unknown>): unknown;
|
||||
|
||||
fetchGetHitEmotionsByWord (args: unknown): Promise<unknown>;// 表情推荐?
|
||||
|
||||
deleteAllRoamMsgs (...args: unknown[]): unknown;// 漫游消息?
|
||||
deleteAllRoamMsgs (arg1: number, arg2: string): unknown;// 漫游消息?
|
||||
|
||||
packRedBag (...args: unknown[]): unknown;
|
||||
packRedBag (arg: unknown): unknown;
|
||||
|
||||
grabRedBag (...args: unknown[]): unknown;
|
||||
grabRedBag (arg: unknown): unknown;
|
||||
|
||||
pullDetail (...args: unknown[]): unknown;
|
||||
pullDetail (arg: unknown): unknown;
|
||||
|
||||
selectPasswordRedBag (...args: unknown[]): unknown;
|
||||
selectPasswordRedBag (arg: unknown): unknown;
|
||||
|
||||
pullRedBagPasswordList (...args: unknown[]): unknown;
|
||||
pullRedBagPasswordList (): unknown;
|
||||
|
||||
requestTianshuAdv (...args: unknown[]): unknown;
|
||||
requestTianshuAdv (arg: unknown): unknown;
|
||||
|
||||
tianshuReport (...args: unknown[]): unknown;
|
||||
tianshuReport (arg: unknown): unknown;
|
||||
|
||||
tianshuMultiReport (...args: unknown[]): unknown;
|
||||
tianshuMultiReport (arg: unknown): unknown;
|
||||
|
||||
GetMsgSubType (a0: number, a1: number): unknown;
|
||||
|
||||
setIKernelPublicAccountAdapter (...args: unknown[]): unknown;
|
||||
setIKernelPublicAccountAdapter (arg: unknown): unknown;
|
||||
|
||||
// tempChatGameSession有关
|
||||
createUidFromTinyId (fromTinyId: string, toTinyId: string): string;
|
||||
|
||||
dataMigrationGetDataAvaiableContactList (...args: unknown[]): unknown;
|
||||
dataMigrationGetDataAvaiableContactList (): unknown;
|
||||
|
||||
dataMigrationGetMsgList (...args: unknown[]): unknown;
|
||||
dataMigrationGetMsgList (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
dataMigrationStopOperation (...args: unknown[]): unknown;
|
||||
dataMigrationStopOperation (arg: unknown): unknown;
|
||||
|
||||
dataMigrationImportMsgPbRecord (DataMigrationMsgInfo: Array<{
|
||||
extensionData: string;// "Hex"
|
||||
@@ -696,38 +697,37 @@ export interface NodeIKernelMsgService {
|
||||
msgType: number;
|
||||
}): unknown;
|
||||
|
||||
dataMigrationGetResourceLocalDestinyPath (...args: unknown[]): unknown;
|
||||
dataMigrationGetResourceLocalDestinyPath (arg: unknown): unknown;
|
||||
|
||||
dataMigrationSetIOSPathPrefix (...args: unknown[]): unknown;
|
||||
dataMigrationSetIOSPathPrefix (arg: unknown): unknown;
|
||||
|
||||
getServiceAssistantSwitch (...args: unknown[]): unknown;
|
||||
getServiceAssistantSwitch (arg: unknown): unknown;
|
||||
|
||||
setServiceAssistantSwitch (...args: unknown[]): unknown;
|
||||
setServiceAssistantSwitch (arg: unknown): unknown;
|
||||
|
||||
setSubscribeFolderUsingSmallRedPoint (...args: unknown[]): unknown;
|
||||
setSubscribeFolderUsingSmallRedPoint (arg: unknown): unknown;
|
||||
|
||||
clearGuildNoticeRedPoint (...args: unknown[]): unknown;
|
||||
clearGuildNoticeRedPoint (arg: unknown): unknown;
|
||||
|
||||
clearFeedNoticeRedPoint (...args: unknown[]): unknown;
|
||||
clearFeedNoticeRedPoint (arg: unknown): unknown;
|
||||
|
||||
clearFeedSquareRead (...args: unknown[]): unknown;
|
||||
clearFeedSquareRead (arg: unknown): unknown;
|
||||
|
||||
IsC2CStyleChatType (...args: unknown[]): unknown;
|
||||
IsC2CStyleChatType (chatType: unknown): unknown;
|
||||
|
||||
IsTempChatType (uin: number): unknown;// 猜的
|
||||
|
||||
getGuildInteractiveNotification (...args: unknown[]): unknown;
|
||||
getGuildInteractiveNotification (arg: unknown): unknown;
|
||||
|
||||
getGuildNotificationAbstract (...args: unknown[]): unknown;
|
||||
getGuildNotificationAbstract (arg: unknown): unknown;
|
||||
|
||||
setFocusOnBase (...args: unknown[]): unknown;
|
||||
setFocusOnBase (arg: unknown): unknown;
|
||||
|
||||
queryArkInfo (...args: unknown[]): unknown;
|
||||
queryArkInfo (arg: unknown): unknown;
|
||||
|
||||
queryUserSecQuality (...args: unknown[]): unknown;
|
||||
queryUserSecQuality (): unknown;
|
||||
|
||||
getGuildMsgAbFlag (...args: unknown[]): unknown;
|
||||
getGuildMsgAbFlag (arg: unknown): unknown;
|
||||
|
||||
getGroupMsgStorageTime (): unknown;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export interface NodeIKernelNearbyProService {
|
||||
addKernelNearbyProListener (listener: unknown): number;
|
||||
|
||||
removeKernelNearbyProListener (listenerId: number): void;
|
||||
|
||||
fetchNearbyProUserInfo (arg1: unknown[], arg2: unknown, arg3: boolean): unknown;
|
||||
|
||||
setCommonExtInfo (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -14,4 +14,118 @@ export interface NodeIKernelNodeMiscService {
|
||||
startNewMiniApp (appfile: string, params: string): unknown;
|
||||
|
||||
getQimei36WithNewSdk (): Promise<string>;
|
||||
|
||||
adaptMiniAppShareInfo (arg: unknown): unknown;
|
||||
|
||||
addBind (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
changeSendKey (arg: unknown): unknown;
|
||||
|
||||
checkIfHaveAvailableSidecarDevice (arg: unknown): unknown;
|
||||
|
||||
clearQzoneUnreadCount (arg: unknown): unknown;
|
||||
|
||||
clearQzoneUnreadCountWithRedDot (arg: unknown): unknown;
|
||||
|
||||
closeWXMiniApp (arg: unknown): unknown;
|
||||
|
||||
delBind (arg: unknown): unknown;
|
||||
|
||||
deleteShareFile (arg: unknown): unknown;
|
||||
|
||||
dispatchWmpfEvent (arg: unknown): unknown;
|
||||
|
||||
doAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
doPostAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
downloadMiniApp (arg: unknown): unknown;
|
||||
|
||||
downloadMiniGame (arg: unknown): unknown;
|
||||
|
||||
encodeAES (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
flashWindowInTaskbar (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getAppLaunchInfo (arg: unknown): unknown;
|
||||
|
||||
getCurWindowInfo (arg: unknown): unknown;
|
||||
|
||||
getCurWindowInfoExceptList (arg: unknown): unknown;
|
||||
|
||||
getMiniGameV2EngineConfig (arg: unknown): unknown;
|
||||
|
||||
getMyAppList (arg: unknown): unknown;
|
||||
|
||||
getOpenAuth (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getQQlevelInfo (arg: unknown): unknown;
|
||||
|
||||
getQzoneUnreadCount (arg: unknown): unknown;
|
||||
|
||||
installApp (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
isAppInstalled (arg: unknown): unknown;
|
||||
|
||||
isOldQQRunning (arg: unknown): unknown;
|
||||
|
||||
judgeTimingRequest (arg: unknown): unknown;
|
||||
|
||||
listenWindowEvents (arg: unknown): unknown;
|
||||
|
||||
loginWXMiniApp (arg: unknown): unknown;
|
||||
|
||||
openFileAndDirSelectDlg (arg: unknown): unknown;
|
||||
|
||||
prefetch (arg: unknown): unknown;
|
||||
|
||||
qqConnectBatchShare (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
qqConnectShare (arg: unknown): unknown;
|
||||
|
||||
qqConnectShareCheck (arg: unknown): unknown;
|
||||
|
||||
registerSchemes (arg: unknown): unknown;
|
||||
|
||||
registerScreenCaptureShortcutWithKeycode (arg: unknown): unknown;
|
||||
|
||||
registerScreenRecordShortcutWithKeycode (arg: unknown): unknown;
|
||||
|
||||
removeQuarantineAttribute (arg: unknown): unknown;
|
||||
|
||||
reportExecuteRequest (arg: unknown): unknown;
|
||||
|
||||
scanQBar (arg: unknown): unknown;
|
||||
|
||||
sendMessageResponseToWX (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
sendRequestToApiGateway (arg: unknown): unknown;
|
||||
|
||||
sendWXCustomMenuClickedAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setBackgroudWindowLevel (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setMiniGameVersion (arg: unknown): unknown;
|
||||
|
||||
setVulkanEnable (arg: unknown): unknown;
|
||||
|
||||
setWindowLevelNT (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setWindowsMenuInstallStatus (arg: unknown): unknown;
|
||||
|
||||
setWXCustomMenuConfig (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
startNewApp (arg: unknown): unknown;
|
||||
|
||||
startScreenCapture (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
stopFlashWindow (arg: unknown): unknown;
|
||||
|
||||
unlistenWindowEvents (arg: unknown): unknown;
|
||||
|
||||
unregisterHotkey (arg: unknown): unknown;
|
||||
|
||||
writeBitmapToClipboard (arg: unknown): unknown;
|
||||
|
||||
writeClipboard (arg1: unknown, arg2: unknown): unknown;
|
||||
}
|
||||
@@ -1,36 +1,29 @@
|
||||
export interface NodeIKernelOnlineStatusService {
|
||||
|
||||
addKernelOnlineStatusListener(listener: unknown): number;
|
||||
addKernelOnlineStatusListener (listener: unknown): number;
|
||||
|
||||
removeKernelOnlineStatusListener(listenerId: number): void;
|
||||
removeKernelOnlineStatusListener (listenerId: number): void;
|
||||
|
||||
getShouldShowAIOStatusAnimation(arg: unknown): unknown;
|
||||
getShouldShowAIOStatusAnimation (arg: unknown): unknown;
|
||||
|
||||
setReadLikeList(arg: unknown): unknown;
|
||||
setReadLikeList (arg: unknown): unknown;
|
||||
|
||||
getLikeList(arg: unknown): unknown;
|
||||
getLikeList (arg: unknown): Promise<unknown>;
|
||||
|
||||
setLikeStatus(arg: unknown): unknown;
|
||||
setLikeStatus (arg: unknown): Promise<unknown>;
|
||||
|
||||
getAggregationPageEntrance(): unknown;
|
||||
setOnlineStatusLiteBusinessSwitch (enabled: boolean): void;
|
||||
|
||||
didClickAggregationPageEntrance(): unknown;
|
||||
getAggregationPageEntrance (): unknown;
|
||||
|
||||
getAggregationGroupModels(): unknown;
|
||||
didClickAggregationPageEntrance (): unknown;
|
||||
|
||||
// {
|
||||
// "businessType": 1,
|
||||
// "uins": [
|
||||
// "1627126029",
|
||||
// "66600000",
|
||||
// "71702575"
|
||||
// ]
|
||||
// }
|
||||
getAggregationGroupModels (): unknown;
|
||||
|
||||
checkLikeStatus(param: {
|
||||
checkLikeStatus (param: {
|
||||
businessType: number,
|
||||
uins: string[]
|
||||
uins: string[];
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
export interface NodeIKernelPersonalAlbumService {
|
||||
addAlbumPermissions (arg: unknown): unknown;
|
||||
|
||||
addComment (arg: unknown): unknown;
|
||||
|
||||
addReply (arg: unknown): unknown;
|
||||
|
||||
createAlbum (arg: unknown): unknown;
|
||||
|
||||
delBatchPhoto (arg: unknown): unknown;
|
||||
|
||||
deleteAlbum (arg: unknown): unknown;
|
||||
|
||||
deleteComment (arg: unknown): unknown;
|
||||
|
||||
deleteReply (arg: unknown): unknown;
|
||||
|
||||
doLike (arg: unknown): unknown;
|
||||
|
||||
editAlbum (arg: unknown): unknown;
|
||||
|
||||
editTravelAlbumScence (arg: unknown): unknown;
|
||||
|
||||
forwardAlbumToQzone (arg: unknown): unknown;
|
||||
|
||||
getAlbumInviteJoinPage (arg: unknown): unknown;
|
||||
|
||||
getAlbumJoinApprovalPage (arg: unknown): unknown;
|
||||
|
||||
getAlbumList (arg: unknown): unknown;
|
||||
|
||||
getAlbumMemberList (arg: unknown): unknown;
|
||||
|
||||
getCommentList (arg: unknown): unknown;
|
||||
|
||||
getLayerTailpageRecommend (arg: unknown): unknown;
|
||||
|
||||
getPhotoList (arg: unknown): unknown;
|
||||
|
||||
getPhotoListByTimeLine (arg: unknown): unknown;
|
||||
|
||||
getPhotoTabByTimeLine (arg: unknown): unknown;
|
||||
|
||||
getShareInfo (arg: unknown): unknown;
|
||||
|
||||
getVideoTabByTimeLine (arg: unknown): unknown;
|
||||
|
||||
inviteCheckForLoversAlbum (arg: unknown): unknown;
|
||||
|
||||
joinShareAlbum (arg: unknown): unknown;
|
||||
|
||||
moveBatchPhoto (arg: unknown): unknown;
|
||||
|
||||
queryAlbum (arg: unknown): unknown;
|
||||
|
||||
quitSharedAlbum (arg: unknown): unknown;
|
||||
|
||||
removeAlbumMember (arg: unknown): unknown;
|
||||
|
||||
respondToJoinRequest (arg: unknown): unknown;
|
||||
|
||||
sendAlbumInvitation (arg: unknown): unknown;
|
||||
|
||||
setAlbumServiceInfo (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
setTopAlbum (arg: unknown): unknown;
|
||||
|
||||
unLike (arg: unknown): unknown;
|
||||
|
||||
updateAlbumMember (arg: unknown): unknown;
|
||||
|
||||
verifyAlbumQuestion (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,37 +1,37 @@
|
||||
import { BuddyProfileLikeReq, GeneralCallResult, NTVoteInfo } from '@/napcat-core/index';
|
||||
|
||||
export interface NodeIKernelProfileLikeService {
|
||||
addKernelProfileLikeListener(listener: unknown): number;
|
||||
addKernelProfileLikeListener (listener: unknown): number;
|
||||
|
||||
removeKernelProfileLikeListener(listenerId: unknown): void;
|
||||
removeKernelProfileLikeListener (listenerId: number): void;
|
||||
|
||||
setBuddyProfileLike(...args: unknown[]): { result: number, errMsg: string, succCounts: number };
|
||||
setBuddyProfileLike (arg: unknown): Promise<{ result: number, errMsg: string, succCounts: number; }>;
|
||||
|
||||
getBuddyProfileLike(req: BuddyProfileLikeReq): Promise<GeneralCallResult & {
|
||||
getBuddyProfileLike (req: BuddyProfileLikeReq): Promise<GeneralCallResult & {
|
||||
info: {
|
||||
userLikeInfos: Array<{
|
||||
uid: string,
|
||||
time: string,
|
||||
favoriteInfo: {
|
||||
userInfos: Array<NTVoteInfo>, // 哪些人点我
|
||||
userInfos: Array<NTVoteInfo>,
|
||||
total_count: number,
|
||||
last_time: number,
|
||||
today_count: number
|
||||
today_count: number;
|
||||
},
|
||||
voteInfo: {
|
||||
total_count: number,
|
||||
new_count: number,
|
||||
new_nearby_count: number,
|
||||
last_visit_time: number,
|
||||
userInfos: Array<NTVoteInfo>, // 点过哪些人
|
||||
}
|
||||
userInfos: Array<NTVoteInfo>;
|
||||
};
|
||||
}>,
|
||||
friendMaxVotes: number,
|
||||
start: number
|
||||
}
|
||||
start: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
getProfileLikeScidResourceInfo(...args: unknown[]): void;
|
||||
getProfileLikeScidResourceInfo (arg: unknown): void;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -3,80 +3,94 @@ import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, ProfileBizType
|
||||
import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
|
||||
export interface NodeIKernelProfileService {
|
||||
getOtherFlag(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
getOtherFlag (callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getVasInfo(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
getVasInfo (callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getRelationFlag(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
getRelationFlag (callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getUidByUin(callfrom: string, uin: Array<string>): Map<string, string>;
|
||||
getUidByUin (callfrom: string, uin: Array<string>): Map<string, string>;
|
||||
|
||||
getUinByUid(callfrom: string, uid: Array<string>): Map<string, string>;
|
||||
getUinByUid (callfrom: string, uid: Array<string>): Map<string, string>;
|
||||
|
||||
getCoreAndBaseInfo(callfrom: string, uids: string[]): Promise<Map<string, SimpleInfo>>;
|
||||
getCoreAndBaseInfo (callfrom: string, uids: string[]): Promise<Map<string, SimpleInfo>>;
|
||||
|
||||
fetchUserDetailInfo(trace: string, uids: string[], source: UserDetailSource, bizType: ProfileBizType[]): Promise<GeneralCallResult &
|
||||
{
|
||||
source: UserDetailSource,
|
||||
// uid -> detail
|
||||
detail: Map<string, UserDetailInfoListenerArg>,
|
||||
}
|
||||
>;
|
||||
fetchUserDetailInfo (trace: string, uids: string[], source: UserDetailSource, bizType: ProfileBizType[]): Promise<GeneralCallResult &
|
||||
{
|
||||
source: UserDetailSource,
|
||||
// uid -> detail
|
||||
detail: Map<string, UserDetailInfoListenerArg>,
|
||||
}
|
||||
>;
|
||||
|
||||
addKernelProfileListener(listener: NodeIKernelProfileListener): number;
|
||||
addKernelProfileListener (listener: NodeIKernelProfileListener): number;
|
||||
|
||||
removeKernelProfileListener(listenerId: number): void;
|
||||
removeKernelProfileListener (listenerId: number): void;
|
||||
|
||||
prepareRegionConfig(...args: unknown[]): unknown;
|
||||
prepareRegionConfig (): unknown;
|
||||
|
||||
getLocalStrangerRemark(): Promise<AnyCnameRecord>;
|
||||
getLocalStrangerRemark (): Promise<AnyCnameRecord>;
|
||||
|
||||
enumCountryOptions(): Array<string>;
|
||||
enumCountryOptions (): Array<string>;
|
||||
|
||||
enumProvinceOptions(country: string): Array<string>;
|
||||
enumProvinceOptions (country: string): Array<string>;
|
||||
|
||||
enumCityOptions(country: string, province: string): unknown;
|
||||
enumCityOptions (country: string, province: string): unknown;
|
||||
|
||||
enumAreaOptions(...args: unknown[]): unknown;
|
||||
enumAreaOptions (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
modifySelfProfile(...args: unknown[]): Promise<unknown>;
|
||||
modifySelfProfile (param: unknown): Promise<unknown>;
|
||||
|
||||
modifyDesktopMiniProfile(param: ModifyProfileParams): Promise<GeneralCallResult>;
|
||||
modifyDesktopMiniProfile (param: ModifyProfileParams): Promise<GeneralCallResult>;
|
||||
|
||||
setNickName(nickName: string): Promise<unknown>;
|
||||
setNickName (nickName: string): Promise<unknown>;
|
||||
|
||||
setLongNick(longNick: string): Promise<unknown>;
|
||||
setLongNick (longNick: string): Promise<unknown>;
|
||||
|
||||
setBirthday(...args: unknown[]): Promise<unknown>;
|
||||
setBirthday (year: number, month: number, day: number): Promise<unknown>;
|
||||
|
||||
setGander(...args: unknown[]): Promise<unknown>;
|
||||
setGander (gender: unknown): Promise<unknown>;
|
||||
|
||||
setHeader(arg: string): Promise<GeneralCallResult>;
|
||||
setHeader (arg: string): Promise<GeneralCallResult>;
|
||||
|
||||
setRecommendImgFlag(...args: unknown[]): Promise<unknown>;
|
||||
setRecommendImgFlag (flag: unknown): Promise<unknown>;
|
||||
|
||||
getUserSimpleInfo(force: boolean, uids: string[]): Promise<unknown>;
|
||||
getUserSimpleInfo (force: boolean, uids: string[]): Promise<unknown>;
|
||||
|
||||
getUserDetailInfo(uid: string): Promise<unknown>;
|
||||
getUserDetailInfo (uid: string): Promise<unknown>;
|
||||
|
||||
getUserDetailInfoWithBizInfo(uid: string, Biz: BizKey[]): Promise<GeneralCallResult>;
|
||||
getUserDetailInfoWithBizInfo (uid: string, Biz: BizKey[]): Promise<GeneralCallResult>;
|
||||
|
||||
getUserDetailInfoByUin(uin: string): Promise<UserDetailInfoByUin>;
|
||||
getUserDetailInfoByUin (uin: string): Promise<UserDetailInfoByUin>;
|
||||
|
||||
getZplanAvatarInfos(args: string[]): Promise<unknown>;
|
||||
getZplanAvatarInfos (args: string[]): Promise<unknown>;
|
||||
|
||||
getStatus(uid: string): Promise<unknown>;
|
||||
getStatus (uid: string): Promise<unknown>;
|
||||
|
||||
startStatusPolling(isForceReset: boolean): Promise<unknown>;
|
||||
startStatusPolling (isForceReset: boolean): Promise<unknown>;
|
||||
|
||||
getSelfStatus(): Promise<unknown>;
|
||||
getSelfStatus (): Promise<unknown>;
|
||||
|
||||
setdisableEmojiShortCuts(...args: unknown[]): unknown;
|
||||
setdisableEmojiShortCuts (arg: unknown): unknown;
|
||||
|
||||
getProfileQzonePicInfo(uid: string, type: number, force: boolean): Promise<unknown>;
|
||||
getProfileQzonePicInfo (uid: string, type: number, force: boolean): Promise<unknown>;
|
||||
|
||||
// UserRemarkServiceImpl::getStrangerRemarkByUid []
|
||||
getCoreInfo(sceneId: string, arg: unknown[]): unknown;
|
||||
getCoreInfo (sceneId: string, arg: unknown[]): unknown;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
|
||||
addKernelProfileListenerForUICache (listener: unknown): number;
|
||||
|
||||
asyncGetCoreInfo (callfrom: string, uids: string[]): unknown;
|
||||
|
||||
getIntimate (uid: string, arg: unknown): unknown;
|
||||
|
||||
getStatusInfo (uid: string, arg: unknown): unknown;
|
||||
|
||||
getStockLocalData (key: string, arg: unknown): unknown;
|
||||
|
||||
updateProfileData (uid: string, data: unknown): unknown;
|
||||
|
||||
updateStockLocalData (key: string, data: unknown): unknown;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelPublicAccountService {
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
follow (arg: unknown): unknown;
|
||||
|
||||
queryTemplateInfo (arg: unknown): unknown;
|
||||
|
||||
subscribeTemplate (arg: unknown): unknown;
|
||||
|
||||
unfollow (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface NodeIKernelQQPlayService {
|
||||
addKernelQQPlayListener (listener: unknown): number;
|
||||
|
||||
removeKernelQQPlayListener (listenerId: number): void;
|
||||
|
||||
createLnkShortcut (arg1: string, arg2: string, arg3: string, arg4: string): unknown;
|
||||
|
||||
getSystemRegValue (arg1: number, arg2: string, arg3: string): unknown;
|
||||
|
||||
setSystemRegValue (arg1: number, arg2: string, arg3: string, arg4: string): unknown;
|
||||
|
||||
sendMsg2Simulator (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setForegroundWindow (arg: unknown): unknown;
|
||||
|
||||
startSimulator (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export interface NodeIKernelQiDianService {
|
||||
addKernelQiDianListener (listener: unknown): number;
|
||||
|
||||
removeKernelQiDianListener (listenerId: number): void;
|
||||
|
||||
requestExtUinForRemoteControl (arg1: string, arg2: string, arg3: number): unknown;
|
||||
|
||||
requestMainUinForRemoteControl (arg: unknown): unknown;
|
||||
|
||||
requestNaviConfig (arg: unknown): unknown;
|
||||
|
||||
requestQidianUidFromUin (arg: unknown): unknown;
|
||||
|
||||
requestWpaCorpInfo (arg: unknown): unknown;
|
||||
|
||||
requestWpaSigT (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
requestWpaUserInfo (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface NodeIKernelRDeliveryService {
|
||||
addDataChangeListener (listener: unknown): number;
|
||||
|
||||
removeDataChangeListener (listenerId: number): void;
|
||||
|
||||
getRDeliveryDataByKey (arg: unknown): unknown;
|
||||
|
||||
requestBatchRemoteDataByScene (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
requestSingleRemoteDataByKey (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -4,17 +4,19 @@ import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
import { FSABRecentContactParams } from '@/napcat-core/types/contact';
|
||||
|
||||
export interface NodeIKernelRecentContactService {
|
||||
setGuildDisplayStatus(...args: unknown[]): unknown; // 2 arguments
|
||||
setGuildDisplayStatus (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setContactListTop(...args: unknown[]): unknown; // 2 arguments
|
||||
setContactListTop (peer: Peer, isTop: boolean): unknown;
|
||||
|
||||
updateRecentContactExtBufForUI(...args: unknown[]): unknown; // 2 arguments
|
||||
updateRecentContactExtBufForUI (peer: Peer, extBuf: unknown): unknown;
|
||||
|
||||
upsertRecentContactManually(...args: unknown[]): unknown; // 1 arguments
|
||||
upsertRecentContactManually (arg: unknown): unknown;
|
||||
|
||||
enterOrExitMsgList(...args: unknown[]): unknown; // 1 arguments
|
||||
manageContactMergeWindow (arg: unknown): unknown;
|
||||
|
||||
getRecentContactListSnapShot(count: number): Promise<GeneralCallResult & {
|
||||
enterOrExitMsgList (arg: unknown): unknown;
|
||||
|
||||
getRecentContactListSnapShot (count: number): Promise<GeneralCallResult & {
|
||||
info: {
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
@@ -28,56 +30,56 @@ export interface NodeIKernelRecentContactService {
|
||||
peerUin: string,
|
||||
msgTime: string,
|
||||
chatType: ChatType,
|
||||
msgId: string
|
||||
}>
|
||||
}
|
||||
}>; // 1 arguments
|
||||
msgId: string;
|
||||
}>;
|
||||
};
|
||||
}>;
|
||||
|
||||
clearMsgUnreadCount(...args: unknown[]): unknown; // 1 arguments
|
||||
clearMsgUnreadCount (peer: Peer): unknown;
|
||||
|
||||
getRecentContactListSyncLimit(count: number): unknown;
|
||||
getRecentContactListSyncLimit (count: number): unknown;
|
||||
|
||||
jumpToSpecifyRecentContact(...args: unknown[]): unknown; // 1 arguments
|
||||
jumpToSpecifyRecentContact (arg: unknown): unknown;
|
||||
|
||||
fetchAndSubscribeABatchOfRecentContact(params: FSABRecentContactParams): unknown; // 1 arguments
|
||||
fetchAndSubscribeABatchOfRecentContact (params: FSABRecentContactParams): unknown;
|
||||
|
||||
addRecentContact(peer: Peer): unknown;
|
||||
addRecentContact (peer: Peer): unknown;
|
||||
|
||||
deleteRecentContacts(peer: Peer): unknown; // 猜测
|
||||
deleteRecentContacts (peer: Peer): unknown;
|
||||
|
||||
getContacts(peers: Peer[]): Promise<unknown>;
|
||||
getContacts (peers: Peer[]): Promise<unknown>;
|
||||
|
||||
setThirdPartyBusinessInfos(...args: unknown[]): unknown; // 1 arguments
|
||||
setThirdPartyBusinessInfos (arg: unknown): unknown;
|
||||
|
||||
updateGameMsgConfigs(...args: unknown[]): unknown; // 1 arguments
|
||||
updateGameMsgConfigs (arg: unknown): unknown;
|
||||
|
||||
removeKernelRecentContactListener(listenerid: number): unknown; // 1 arguments
|
||||
removeKernelRecentContactListener (listenerId: number): unknown;
|
||||
|
||||
addKernelRecentContactListener(listener: NodeIKernelRecentContactListener): void;
|
||||
addKernelRecentContactListener (listener: NodeIKernelRecentContactListener): void;
|
||||
|
||||
clearRecentContactsByChatType(...args: unknown[]): unknown; // 1 arguments
|
||||
clearRecentContactsByChatType (chatType: ChatType): unknown;
|
||||
|
||||
upInsertModule(...args: unknown[]): unknown; // 1 arguments
|
||||
upInsertModule (arg: unknown): unknown;
|
||||
|
||||
jumpToSpecifyRecentContactVer2(...args: unknown[]): unknown; // 1 arguments
|
||||
jumpToSpecifyRecentContactVer2 (arg: unknown): unknown;
|
||||
|
||||
deleteRecentContactsVer2(...args: unknown[]): unknown; // 1 arguments
|
||||
deleteRecentContactsVer2 (arg: unknown): unknown;
|
||||
|
||||
getRecentContactList(): Promise<unknown>;
|
||||
getRecentContactList (): Promise<unknown>;
|
||||
|
||||
getMsgUnreadCount(): unknown;
|
||||
getMsgUnreadCount (): unknown;
|
||||
|
||||
clearRecentContacts(): unknown;
|
||||
clearRecentContacts (): unknown;
|
||||
|
||||
getServiceAssistantRecentContactInfos(): unknown;
|
||||
getServiceAssistantRecentContactInfos (): unknown;
|
||||
|
||||
getRecentContactInfos(): unknown;
|
||||
getRecentContactInfos (): unknown;
|
||||
|
||||
getUnreadDetailsInfos(): unknown;
|
||||
getUnreadDetailsInfos (): unknown;
|
||||
|
||||
cleanAllModule(): unknown;
|
||||
cleanAllModule (): unknown;
|
||||
|
||||
setAllGameMsgRead(): unknown;
|
||||
setAllGameMsgRead (): unknown;
|
||||
|
||||
getRecentContactListSync(): unknown;
|
||||
getRecentContactListSync (): unknown;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
export interface NodeIKernelRemotingService {
|
||||
addKernelRemotingListener (listener: unknown): number;
|
||||
|
||||
removeKernelRemotingListener (listenerId: number): void;
|
||||
|
||||
accept (arg1: string, arg2: boolean): unknown;
|
||||
|
||||
setPenetrateBuffer (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
startRemotingClient (arg: unknown): unknown;
|
||||
|
||||
startRemotingInvite (arg: unknown): unknown;
|
||||
|
||||
stopRemoting (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export interface NodeIKernelRichMediaService {
|
||||
// KHAND,
|
||||
// KAUTO
|
||||
// }
|
||||
getVideoPlayUrl(peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, VideoRequestWay: number): Promise<unknown>;
|
||||
getVideoPlayUrl (peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, VideoRequestWay: number): Promise<unknown>;
|
||||
|
||||
// exParams (RMReqExParams)
|
||||
// this.downSourceType = i2;
|
||||
@@ -81,9 +81,9 @@ export interface NodeIKernelRichMediaService {
|
||||
// public static final int KTRIGGERTYPEAUTO = 1;
|
||||
// public static final int KTRIGGERTYPEMANUAL = 0;
|
||||
|
||||
getVideoPlayUrlV2(peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, exParams: {
|
||||
getVideoPlayUrlV2 (peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, exParams: {
|
||||
downSourceType: number,
|
||||
triggerType: number
|
||||
triggerType: number;
|
||||
}): Promise<GeneralCallResult & {
|
||||
urlResult: {
|
||||
v4IpUrl: [],
|
||||
@@ -91,15 +91,15 @@ export interface NodeIKernelRichMediaService {
|
||||
domainUrl: Array<{
|
||||
url: string,
|
||||
isHttps: boolean,
|
||||
httpsDomain: string
|
||||
httpsDomain: string;
|
||||
}>,
|
||||
videoCodecFormat: number
|
||||
}
|
||||
videoCodecFormat: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
getRichMediaFileDir(elementType: number, downType: number, isTemp: boolean): unknown;
|
||||
getRichMediaFileDir (elementType: number, downType: number, isTemp: boolean): unknown;
|
||||
|
||||
getVideoPlayUrlInVisit(arg: {
|
||||
getVideoPlayUrlInVisit (arg: {
|
||||
downloadType: number,
|
||||
thumbSize: number,
|
||||
msgId: string,
|
||||
@@ -111,17 +111,17 @@ export interface NodeIKernelRichMediaService {
|
||||
peerUid: string,
|
||||
guildId: string,
|
||||
ele: MessageElement,
|
||||
useHttps: boolean
|
||||
useHttps: boolean;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isFileExpired(arg: number): unknown;
|
||||
isFileExpired (arg: number): unknown;
|
||||
|
||||
deleteGroupFolder(GroupCode: string, FolderId: string): Promise<GeneralCallResult & {
|
||||
groupFileCommonResult: { retCode: number, retMsg: string, clientWording: string }
|
||||
deleteGroupFolder (GroupCode: string, FolderId: string): Promise<GeneralCallResult & {
|
||||
groupFileCommonResult: { retCode: number, retMsg: string, clientWording: string; };
|
||||
}>;
|
||||
|
||||
// 参数与getVideoPlayUrlInVisit一样
|
||||
downloadRichMediaInVisit(arg: {
|
||||
downloadRichMediaInVisit (arg: {
|
||||
downloadType: number,
|
||||
thumbSize: number,
|
||||
msgId: string,
|
||||
@@ -133,10 +133,10 @@ export interface NodeIKernelRichMediaService {
|
||||
peerUid: string,
|
||||
guildId: string,
|
||||
ele: MessageElement,
|
||||
useHttps: boolean
|
||||
useHttps: boolean;
|
||||
}): unknown;
|
||||
|
||||
downloadFileForModelId(peer: Peer, ModelId: string[], unknown: string): Promise<unknown>;
|
||||
downloadFileForModelId (peer: Peer, ModelId: string[], unknown: string): Promise<unknown>;
|
||||
|
||||
// 第三个参数 Array<Type>
|
||||
// this.fileId = "";
|
||||
@@ -146,83 +146,83 @@ export interface NodeIKernelRichMediaService {
|
||||
// this.fileSize = j2;
|
||||
// this.fileModelId = j3;
|
||||
|
||||
downloadFileForFileUuid(peer: Peer, uuid: string, arg3: {
|
||||
downloadFileForFileUuid (peer: Peer, uuid: string, arg3: {
|
||||
fileId: string,
|
||||
fileName: string,
|
||||
fileSize: string,
|
||||
fileModelId: string
|
||||
fileModelId: string;
|
||||
}[]): Promise<unknown>;
|
||||
|
||||
downloadFileByUrlList(fileDownloadTyp: UrlFileDownloadType, urlList: Array<string>): unknown;
|
||||
downloadFileByUrlList (fileDownloadTyp: UrlFileDownloadType, urlList: Array<string>): unknown;
|
||||
|
||||
downloadFileForFileInfo(fileInfo: CommonFileInfo[], savePath: string): unknown;
|
||||
downloadFileForFileInfo (fileInfo: CommonFileInfo[], savePath: string): unknown;
|
||||
|
||||
createGroupFolder(GroupCode: string, FolderName: string): Promise<GeneralCallResult & {
|
||||
resultWithGroupItem: { result: unknown, groupItem: Array<unknown> }
|
||||
createGroupFolder (GroupCode: string, FolderName: string): Promise<GeneralCallResult & {
|
||||
resultWithGroupItem: { result: unknown, groupItem: Array<unknown>; };
|
||||
}>;
|
||||
|
||||
downloadFile(commonFile: CommonFileInfo, arg2: unknown, arg3: unknown, savePath: string): unknown;
|
||||
downloadFile (arg1: unknown, arg2: number, arg3: number, arg4: string): unknown;
|
||||
|
||||
createGroupFolder(arg1: unknown, arg2: unknown): unknown;
|
||||
createGroupFolder (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
downloadGroupFolder(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
downloadGroupFolder (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
renameGroupFolder(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
renameGroupFolder (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
deleteGroupFolder(arg1: unknown, arg2: unknown): unknown;
|
||||
deleteGroupFolder (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
deleteTransferInfo(arg1: unknown, arg2: unknown): unknown;
|
||||
deleteTransferInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
cancelTransferTask(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
cancelTransferTask (arg1: Peer, arg2: Array<unknown>[], arg3: string): unknown;
|
||||
|
||||
cancelUrlDownload(arg: unknown): unknown;
|
||||
cancelUrlDownload (arg: unknown): unknown;
|
||||
|
||||
updateOnlineVideoElemStatus(arg: unknown): unknown;
|
||||
updateOnlineVideoElemStatus (arg: unknown): unknown;
|
||||
|
||||
getGroupSpace(arg: unknown): unknown;
|
||||
getGroupSpace (arg: unknown): unknown;
|
||||
|
||||
getGroupFileList(groupCode: string, params: GetFileListParam): Promise<GeneralCallResult & {
|
||||
getGroupFileList (groupCode: string, params: GetFileListParam): Promise<GeneralCallResult & {
|
||||
groupSpaceResult: {
|
||||
retCode: number
|
||||
retMsg: string
|
||||
clientWording: string
|
||||
totalSpace: number
|
||||
usedSpace: number
|
||||
allUpload: boolean
|
||||
}
|
||||
retCode: number;
|
||||
retMsg: string;
|
||||
clientWording: string;
|
||||
totalSpace: number;
|
||||
usedSpace: number;
|
||||
allUpload: boolean;
|
||||
};
|
||||
}>;
|
||||
|
||||
getGroupFileInfo(arg1: unknown, arg2: unknown): unknown;
|
||||
getGroupFileInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupTransferList(arg1: unknown, arg2: unknown): unknown;
|
||||
getGroupTransferList (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
renameGroupFile(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): unknown;
|
||||
renameGroupFile (arg1: string, arg2: number, arg3: string, arg4: string, arg5: string): unknown;
|
||||
|
||||
moveGroupFile(groupCode: string, busId: Array<number>, fileList: Array<string>, currentParentDirectory: string, targetParentDirectory: string): Promise<GeneralCallResult & {
|
||||
moveGroupFile (groupCode: string, busId: Array<number>, fileList: Array<string>, currentParentDirectory: string, targetParentDirectory: string): Promise<GeneralCallResult & {
|
||||
moveGroupFileResult: {
|
||||
result: {
|
||||
retCode: number,
|
||||
retMsg: symbol,
|
||||
clientWording: string
|
||||
clientWording: string;
|
||||
},
|
||||
successFileIdList: Array<string>,
|
||||
failFileIdList: Array<string>
|
||||
}
|
||||
failFileIdList: Array<string>;
|
||||
};
|
||||
}>;
|
||||
|
||||
transGroupFile(groupCode: string, fileId: string): Promise<GeneralCallResult & {
|
||||
transGroupFile (groupCode: string, fileId: string): Promise<GeneralCallResult & {
|
||||
transGroupFileResult: {
|
||||
result: {
|
||||
retCode: number
|
||||
retMsg: string
|
||||
clientWording: string
|
||||
}
|
||||
saveBusId: number
|
||||
saveFilePath: string
|
||||
}
|
||||
retCode: number;
|
||||
retMsg: string;
|
||||
clientWording: string;
|
||||
};
|
||||
saveBusId: number;
|
||||
saveFilePath: string;
|
||||
};
|
||||
}>;
|
||||
|
||||
searchGroupFile(
|
||||
searchGroupFile (
|
||||
keywords: Array<string>,
|
||||
param: {
|
||||
groupIds: Array<string>,
|
||||
@@ -230,55 +230,57 @@ export interface NodeIKernelRichMediaService {
|
||||
context: string,
|
||||
count: number,
|
||||
sortType: number,
|
||||
groupNames: Array<string>
|
||||
groupNames: Array<string>;
|
||||
}): Promise<unknown>;
|
||||
|
||||
searchGroupFileByWord(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): unknown;
|
||||
searchGroupFileByWord (arg1: unknown[], arg2: unknown[], arg3: string, arg4: string, arg5: number): unknown;
|
||||
|
||||
deleteGroupFile(GroupCode: string, params: Array<number>, Files: Array<string>): Promise<GeneralCallResult & {
|
||||
deleteGroupFile (GroupCode: string, params: Array<number>, Files: Array<string>): Promise<GeneralCallResult & {
|
||||
transGroupFileResult: {
|
||||
result: unknown
|
||||
successFileIdList: Array<unknown>
|
||||
failFileIdList: Array<unknown>
|
||||
}
|
||||
result: unknown;
|
||||
successFileIdList: Array<unknown>;
|
||||
failFileIdList: Array<unknown>;
|
||||
};
|
||||
}>;
|
||||
|
||||
translateEnWordToZn(words: string[]): Promise<GeneralCallResult & { words: string[] }>;
|
||||
translateEnWordToZn (words: string[]): Promise<GeneralCallResult & { words: string[]; }>;
|
||||
|
||||
getScreenOCR(path: string): Promise<unknown>;
|
||||
getScreenOCR (path: string): Promise<unknown>;
|
||||
|
||||
batchGetGroupFileCount(Gids: Array<string>): Promise<GeneralCallResult & {
|
||||
batchGetGroupFileCount (Gids: Array<string>): Promise<GeneralCallResult & {
|
||||
groupCodes: Array<string>,
|
||||
groupFileCounts: Array<number>
|
||||
groupFileCounts: Array<number>;
|
||||
}>;
|
||||
|
||||
queryPicDownloadSize(arg: unknown): unknown;
|
||||
queryPicDownloadSize (arg: unknown): unknown;
|
||||
|
||||
searchGroupFile(arg1: unknown, arg2: unknown): unknown;
|
||||
searchGroupFile (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
searchMoreGroupFile(arg: unknown): unknown;
|
||||
searchMoreGroupFile (arg: unknown): unknown;
|
||||
|
||||
cancelSearcheGroupFile(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
cancelSearcheGroupFile (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
onlyDownloadFile(peer: Peer, arg2: unknown, arg3: Array<{
|
||||
fileId: string,
|
||||
fileName: string,
|
||||
fileSize: string,
|
||||
fileModelId: string
|
||||
}
|
||||
>): unknown;
|
||||
onlyDownloadFile (arg1: Peer, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
onlyUploadFile(arg1: unknown, arg2: unknown): unknown;
|
||||
onlyUploadFile (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
isExtraLargePic(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
isExtraLargePic (arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
uploadRMFileWithoutMsg(arg: {
|
||||
uploadRMFileWithoutMsg (arg: {
|
||||
bizType: RMBizTypeEnum,
|
||||
filePath: string,
|
||||
peerUid: string,
|
||||
transferId: string
|
||||
useNTV2: string
|
||||
transferId: string;
|
||||
useNTV2: string;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
|
||||
getRichMediaCodecInfo (arg: unknown): unknown;
|
||||
|
||||
getScreenOCRWithSourceType (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
imageTranslate (arg1: string, arg2: string, arg3: number): unknown;
|
||||
|
||||
downloadFileByUrl (arg1: number, arg2: string, arg3: boolean): unknown;
|
||||
}
|
||||
@@ -2,47 +2,127 @@ import { NodeIKernelRobotListener } from '@/napcat-core/listeners';
|
||||
import { GeneralCallResult, Peer } from '..';
|
||||
|
||||
export interface NodeIKernelRobotService {
|
||||
fetchGroupRobotStoreDiscovery(arg: unknown): unknown;
|
||||
addKernelRobotListener (listener: NodeIKernelRobotListener): number;
|
||||
|
||||
sendGroupRobotStoreSearch(arg: unknown): unknown;
|
||||
removeKernelRobotListener (listenerId: number): void;
|
||||
|
||||
fetchGroupRobotStoreCategoryList(arg: unknown): unknown;
|
||||
fetchGroupRobotStoreDiscovery (arg: unknown): unknown;
|
||||
|
||||
FetchSubscribeMsgTemplate(arg: unknown): unknown;
|
||||
fetchGroupRobotStoreCategoryList (arg: unknown): unknown;
|
||||
|
||||
FetchSubcribeMsgTemplateStatus(arg: unknown): unknown;
|
||||
FetchSubscribeMsgTemplate (arg: unknown): unknown;
|
||||
|
||||
SubscribeMsgTemplateSet(arg1: unknown, arg2: unknown): unknown;
|
||||
FetchSubcribeMsgTemplateStatus (arg: unknown): unknown;
|
||||
|
||||
fetchRecentUsedRobots(arg: unknown): unknown;
|
||||
SubscribeMsgTemplateSet (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
fetchShareArkInfo(arg: unknown): unknown;
|
||||
fetchRecentUsedRobots (arg: unknown): unknown;
|
||||
|
||||
addKernelRobotListener(Listener: NodeIKernelRobotListener): number;
|
||||
fetchShareArkInfo (arg: unknown): unknown;
|
||||
|
||||
removeKernelRobotListener(ListenerId: number): unknown;
|
||||
getAllRobotFriendsFromCache (): Promise<unknown>;
|
||||
|
||||
getAllRobotFriendsFromCache(): Promise<unknown>;
|
||||
fetchAllRobots (arg1: boolean, arg2: unknown): unknown;
|
||||
|
||||
fetchAllRobots(arg1: unknown, arg2: unknown): unknown;
|
||||
removeAllRecommendCache (): unknown;
|
||||
|
||||
removeAllRecommendCache(): unknown;
|
||||
setRobotPickTts (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setRobotPickTts(arg1: unknown, arg2: unknown): unknown;
|
||||
getRobotUinRange (data: unknown): Promise<{ response: { robotUinRanges: Array<unknown>; }; }>;
|
||||
|
||||
getRobotUinRange(data: unknown): Promise<{ response: { robotUinRanges: Array<unknown> } }>;
|
||||
|
||||
getRobotFunctions(peer: Peer, params: {
|
||||
getRobotFunctions (peer: Peer, params: {
|
||||
uins: Array<string>,
|
||||
num: 0,
|
||||
client_info: { platform: 4, version: '', build_num: 9999 },
|
||||
client_info: { platform: 4, version: '', build_num: 9999; },
|
||||
tinyids: [],
|
||||
page: 0,
|
||||
full_fetch: false,
|
||||
scene: 4,
|
||||
filter: 1,
|
||||
bkn: ''
|
||||
}): Promise<GeneralCallResult & { response: { bot_features: Array<unknown>, next_page: number } }>;
|
||||
bkn: '';
|
||||
}): Promise<GeneralCallResult & { response: { bot_features: Array<unknown>, next_page: number; }; }>;
|
||||
|
||||
isNull(): boolean;
|
||||
fetchRobotShareLimit (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
updateGroupRobotProfile (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
sendCommonRobotToGuild (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
sendGroupRobotStoreSearch (arg: unknown): unknown;
|
||||
|
||||
fetchMyRobotLists (arg: unknown): unknown;
|
||||
|
||||
batchGetBotsMenu (arg: unknown): unknown;
|
||||
|
||||
fetchAddRobotGroupList (arg: unknown): unknown;
|
||||
|
||||
getGuildRobotList (arg: unknown): unknown;
|
||||
|
||||
querySessionList (arg: unknown): unknown;
|
||||
|
||||
fetchListRobot (arg: unknown): unknown;
|
||||
|
||||
subscribeGuildGlobalRobot (arg: unknown): unknown;
|
||||
|
||||
addGuildRobot (arg: unknown): unknown;
|
||||
|
||||
upMicGuildRobot (arg: unknown): unknown;
|
||||
|
||||
downMicGuildRobot (arg: unknown): unknown;
|
||||
|
||||
getRedDot (arg: unknown): unknown;
|
||||
|
||||
delRedDot (arg: unknown): unknown;
|
||||
|
||||
changeMyBot (arg: unknown): unknown;
|
||||
|
||||
getAudioLiveRobotStatus (arg: unknown): unknown;
|
||||
|
||||
backFlowRobotCoreInfos (arg: unknown): unknown;
|
||||
|
||||
batchFetchRobotCoreInfos (arg: unknown): unknown;
|
||||
|
||||
queryPicRecomQuestions (arg: unknown): unknown;
|
||||
|
||||
delSessionMsgs (arg: unknown): unknown;
|
||||
|
||||
fetchMobileRobotRecommendCards (arg: unknown): unknown;
|
||||
|
||||
saveSelectedAIModelOrOptIds (arg: unknown): unknown;
|
||||
|
||||
setRobotStoryEnter (arg: unknown): unknown;
|
||||
|
||||
aiGenAvatar (arg: unknown): unknown;
|
||||
|
||||
fetchRobotFeatureWithReq (arg: unknown): unknown;
|
||||
|
||||
fetchGroupRobotProfileWithReq (arg: unknown): unknown;
|
||||
|
||||
setAddRobotToGroup (arg: unknown): unknown;
|
||||
|
||||
setRemoveRobotFromGroup (arg: unknown): unknown;
|
||||
|
||||
FetchGroupRobotInfo (arg: unknown): unknown;
|
||||
|
||||
fetchGuildRobotInfo (arg: unknown): unknown;
|
||||
|
||||
aiGenBotInfo (arg: unknown): unknown;
|
||||
|
||||
fetchAiGenTemplateInfo (arg: unknown): unknown;
|
||||
|
||||
fetchShareInfo (arg: unknown): unknown;
|
||||
|
||||
updateShareInfo (arg: unknown): unknown;
|
||||
|
||||
queryGuildGlobalRobotSubscription (arg: unknown): unknown;
|
||||
|
||||
resetConversation (arg: unknown): unknown;
|
||||
|
||||
setGuildRobotPermission (arg: unknown): unknown;
|
||||
|
||||
fetchGuildRobotPermission (arg: unknown): unknown;
|
||||
|
||||
editSession (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -3,134 +3,146 @@ import { GeneralCallResult } from './common';
|
||||
|
||||
export interface NodeIKernelSearchService {
|
||||
|
||||
addKernelSearchListener(listener: unknown): number;
|
||||
addKernelSearchListener (listener: unknown): number;
|
||||
|
||||
removeKernelSearchListener(listenerId: number): void;
|
||||
removeKernelSearchListener (listenerId: number): void;
|
||||
|
||||
searchStranger(unknown: string, searchStranger: unknown, searchParams: unknown): Promise<unknown>;
|
||||
searchStranger (keyword: string, searchType: unknown, searchParams: unknown): Promise<unknown>;
|
||||
|
||||
searchGroup(param: {
|
||||
searchGroup (param: {
|
||||
keyWords: string,
|
||||
groupNum: number,
|
||||
exactSearch: boolean,
|
||||
penetrate: string
|
||||
}): Promise<GeneralCallResult>;// needs 1 arguments
|
||||
penetrate: string;
|
||||
}): Promise<GeneralCallResult>;
|
||||
|
||||
searchLocalInfo(keywords: string, type: number/* 4 */): unknown;
|
||||
searchLocalInfo (keywords: string, type: number): unknown;
|
||||
|
||||
cancelSearchLocalInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchLocalInfo (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchBuddyChatInfo(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchBuddyChatInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
searchMoreBuddyChatInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreBuddyChatInfo (arg: unknown): unknown;
|
||||
|
||||
cancelSearchBuddyChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchBuddyChatInfo (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchContact(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchContact (arg1: Array<unknown>[], arg2: unknown): unknown;
|
||||
|
||||
searchMoreContact(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreContact (arg: unknown): unknown;
|
||||
|
||||
cancelSearchContact(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchContact (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchGroupChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
searchGroupChatInfo (arg1: unknown[], arg2: unknown, arg3: number): unknown;
|
||||
|
||||
resetSearchGroupChatInfoSortType(...args: unknown[]): unknown;// needs 3 arguments
|
||||
resetSearchGroupChatInfoSortType (arg1: number, arg2: number, arg3: number): unknown;
|
||||
|
||||
resetSearchGroupChatInfoFilterMembers(...args: unknown[]): unknown;// needs 3 arguments
|
||||
resetSearchGroupChatInfoFilterMembers (arg1: number, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
searchMoreGroupChatInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreGroupChatInfo (arg: unknown): unknown;
|
||||
|
||||
cancelSearchGroupChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchGroupChatInfo (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchChatsWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
searchChatsWithKeywords (arg1: unknown[], arg2: number, arg3: number): unknown;
|
||||
|
||||
searchMoreChatsWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreChatsWithKeywords (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatsWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatsWithKeywords (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchChatMsgs(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchChatMsgs (arg1: Array<unknown>[], arg2: unknown): unknown;
|
||||
|
||||
searchMoreChatMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreChatMsgs (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatMsgs(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatMsgs (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchMsgWithKeywords(keyWords: string[], param: Peer & { searchFields: number, pageLimit: number }): Promise<GeneralCallResult>;
|
||||
searchMsgWithKeywords (keyWords: string[], param: Peer & { searchFields: number, pageLimit: number; }): Promise<GeneralCallResult>;
|
||||
|
||||
searchMoreMsgWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreMsgWithKeywords (arg: unknown): unknown;
|
||||
|
||||
cancelSearchMsgWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchMsgWithKeywords (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchFileWithKeywords(keywords: string[], source: number): Promise<string>;// needs 2 arguments
|
||||
searchFileWithKeywords (keywords: string[], source: number): Promise<string>;
|
||||
|
||||
searchMoreFileWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreFileWithKeywords (arg: unknown): unknown;
|
||||
|
||||
cancelSearchFileWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchFileWithKeywords (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchAtMeChats(...args: unknown[]): unknown;// needs 3 arguments
|
||||
searchFileInFileCenterForPC (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
searchMoreAtMeChats(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreFileInFileCenter (arg: unknown): unknown;
|
||||
|
||||
cancelSearchAtMeChats(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchFileInFileCenter (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchChatAtMeMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchAtMeChats (arg1: boolean, arg2: number, arg3: number): unknown;
|
||||
|
||||
searchMoreChatAtMeMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreAtMeChats (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatAtMeMsgs(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchAtMeChats (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
addSearchHistory(param: {
|
||||
type: number, // 4
|
||||
searchChatAtMeMsgs (arg: unknown): unknown;
|
||||
|
||||
searchMoreChatAtMeMsgs (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatAtMeMsgs (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchRobot (arg: unknown): unknown;
|
||||
|
||||
searchCache (arg1: string, arg2: string, arg3: unknown): unknown;
|
||||
|
||||
addSearchHistory (param: {
|
||||
type: number,
|
||||
contactList: [],
|
||||
id: number, // -1
|
||||
id: number,
|
||||
groupInfos: [],
|
||||
msgs: [],
|
||||
fileInfos: [
|
||||
{
|
||||
chatType: ChatType,
|
||||
buddyChatInfo: Array<{ category_name: string, peerUid: string, peerUin: string, remark: string }>,
|
||||
discussChatInfo: [],
|
||||
groupChatInfo: Array<
|
||||
{
|
||||
groupCode: string,
|
||||
isConf: boolean,
|
||||
hasModifyConfGroupFace: boolean,
|
||||
hasModifyConfGroupName: boolean,
|
||||
groupName: string,
|
||||
remark: string
|
||||
}>,
|
||||
dataLineChatInfo: [],
|
||||
tmpChatInfo: [],
|
||||
msgId: string,
|
||||
msgSeq: string,
|
||||
msgTime: string,
|
||||
senderUid: string,
|
||||
senderNick: string,
|
||||
senderRemark: string,
|
||||
senderCard: string,
|
||||
elemId: string,
|
||||
elemType: string, // 3
|
||||
fileSize: string,
|
||||
filePath: string,
|
||||
fileName: string,
|
||||
hits: Array<
|
||||
{
|
||||
start: 12,
|
||||
end: 14
|
||||
}
|
||||
>
|
||||
}
|
||||
]
|
||||
|
||||
fileInfos: Array<{
|
||||
chatType: ChatType,
|
||||
buddyChatInfo: Array<{ category_name: string, peerUid: string, peerUin: string, remark: string; }>,
|
||||
discussChatInfo: [],
|
||||
groupChatInfo: Array<{
|
||||
groupCode: string,
|
||||
isConf: boolean,
|
||||
hasModifyConfGroupFace: boolean,
|
||||
hasModifyConfGroupName: boolean,
|
||||
groupName: string,
|
||||
remark: string;
|
||||
}>,
|
||||
dataLineChatInfo: [],
|
||||
tmpChatInfo: [],
|
||||
msgId: string,
|
||||
msgSeq: string,
|
||||
msgTime: string,
|
||||
senderUid: string,
|
||||
senderNick: string,
|
||||
senderRemark: string,
|
||||
senderCard: string,
|
||||
elemId: string,
|
||||
elemType: string,
|
||||
fileSize: string,
|
||||
filePath: string,
|
||||
fileName: string,
|
||||
hits: Array<{ start: number, end: number; }>;
|
||||
}>;
|
||||
}): Promise<{
|
||||
result: number,
|
||||
errMsg: string,
|
||||
id?: number
|
||||
id?: number;
|
||||
}>;
|
||||
|
||||
removeSearchHistory(...args: unknown[]): unknown;// needs 1 arguments
|
||||
removeSearchHistory (arg: unknown): unknown;
|
||||
|
||||
searchCache(...args: unknown[]): unknown;// needs 3 arguments
|
||||
addOrUpdateSearchMostUseItem (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
clearSearchCache(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getSearchMostUseItem (arg: unknown): unknown;
|
||||
|
||||
deleteSearchMostUseItem (arg: unknown): unknown;
|
||||
|
||||
deleteGroupHistoryFile (arg: unknown): unknown;
|
||||
|
||||
clearSearchCache (arg: unknown): unknown;
|
||||
|
||||
clearSearchHistory (): unknown;
|
||||
|
||||
loadSearchHistory (): unknown;
|
||||
|
||||
initTokenizeUtil (): unknown;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
export interface NodeIKernelSettingService {
|
||||
addKernelSettingListener (listener: unknown): number;
|
||||
|
||||
removeKernelSettingListener (listenerId: number): void;
|
||||
|
||||
getSettingForBuffer (key: unknown): unknown;
|
||||
|
||||
getSettingForNum (key: unknown): unknown;
|
||||
|
||||
getSettingForStr (key: unknown): unknown;
|
||||
|
||||
setSettingForBuffer (arg: unknown): unknown;
|
||||
|
||||
setSettingForNum (arg: unknown): unknown;
|
||||
|
||||
setSettingForStr (arg: unknown): unknown;
|
||||
|
||||
setAutoLoginSwitch (enabled: boolean): unknown;
|
||||
|
||||
setNeedConfirmSwitch (enabled: boolean): unknown;
|
||||
|
||||
setPrivacySetting (arg: unknown): unknown;
|
||||
|
||||
setSelfStartSwitch (enabled: boolean): unknown;
|
||||
|
||||
modifyAccount (arg: unknown): unknown;
|
||||
|
||||
verifyNewAccount (arg: unknown): unknown;
|
||||
|
||||
openUrlWithQQBrowser (url: string): unknown;
|
||||
|
||||
openUrlInIM (url: string): unknown;
|
||||
|
||||
clearCache (arg: unknown): unknown;
|
||||
|
||||
destroyAccount (): unknown;
|
||||
|
||||
isQQBrowserInstall (): boolean;
|
||||
|
||||
getSelfStartSwitch (): unknown;
|
||||
|
||||
getAutoLoginSwitch (): unknown;
|
||||
|
||||
getNeedConfirmSwitch (): unknown;
|
||||
|
||||
getPrivacySetting (): unknown;
|
||||
|
||||
scanCache (): unknown;
|
||||
|
||||
getQQBrowserSwitchFromQldQQ (): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export interface NodeIKernelSkinService {
|
||||
addKernelSkinListener (listener: unknown): number;
|
||||
|
||||
removeKernelSkinListener (listenerId: number): void;
|
||||
|
||||
getRecommendAIOColor (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getRecommendBubbleColor (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getThemeInfoFromImage (arg: unknown): unknown;
|
||||
|
||||
previewTheme (arg1: number, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
setTemplateCustomPrimaryColor (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setThemeInfo (arg1: number, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
uploadImage (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -36,15 +36,15 @@ export interface NodeIKernelStorageCleanService {
|
||||
|
||||
reportData (): unknown;
|
||||
|
||||
getChatCacheInfo (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown): unknown;
|
||||
getChatCacheInfo (tableType: number, pageSize: number, order: number, startPosition: number): Promise<unknown>;
|
||||
|
||||
getFileCacheInfo (arg1: unknown, arg2: unknown, arg3: unknown, arg44: unknown, args5: unknown): unknown;
|
||||
getFileCacheInfo (fileType: number, restart: boolean, pageSize: number, lastRecord: number, param: unknown): Promise<unknown>;
|
||||
|
||||
clearChatCacheInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
clearChatCacheInfo (chatInfoList: unknown[], clearKeys: number[]): Promise<unknown>;
|
||||
|
||||
clearCacheDataByKeys (keys: Array<string>): Promise<GeneralCallResult>;
|
||||
|
||||
setSilentScan (is_silent: boolean): unknown;
|
||||
setSilentScan (isSilent: boolean): unknown;
|
||||
|
||||
closeCleanWindow (): unknown;
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
export interface NodeIKernelThirdPartySigService {
|
||||
addOnSigChangeListener (listener: unknown): number;
|
||||
|
||||
removeSigChangeListener (listenerId: number): void;
|
||||
|
||||
initConfig (arg: unknown): unknown;
|
||||
|
||||
delThirdPartySigByUin (arg: unknown): unknown;
|
||||
|
||||
getOpenIDByUin (arg1: string, arg2: number, arg3: string): unknown;
|
||||
|
||||
getPT4tokenByUin (arg1: string, arg2: number, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
getThirdPartySigByUin (arg1: string, arg2: number, arg3: number, arg4: number, arg5: string, arg6: string): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
export interface NodeIKernelTianShuService {
|
||||
addKernelTianShuListener(listener:unknown): number;
|
||||
addKernelTianShuListener (listener: unknown): number;
|
||||
|
||||
removeKernelTianShuListener(listenerId:number): void;
|
||||
removeKernelTianShuListener (listenerId: number): void;
|
||||
|
||||
reportTianShuNumeralRed(...args: unknown[]): unknown;// needs 1 arguments
|
||||
reportTianShuNumeralRed (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
}
|
||||
@@ -2,11 +2,11 @@ import { ForceFetchClientKeyRetType } from './common';
|
||||
|
||||
export interface NodeIKernelTicketService {
|
||||
|
||||
addKernelTicketListener(listener: unknown): number;
|
||||
addKernelTicketListener (listener: unknown): number;
|
||||
|
||||
removeKernelTicketListener(listenerId: number): void;
|
||||
removeKernelTicketListener (listenerId: number): void;
|
||||
|
||||
forceFetchClientKey(arg: string): Promise<ForceFetchClientKeyRetType>;
|
||||
forceFetchClientKey (arg: string): Promise<ForceFetchClientKeyRetType>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -2,21 +2,19 @@ import { GeneralCallResult } from './common';
|
||||
|
||||
export interface NodeIKernelTipOffService {
|
||||
|
||||
addKernelTipOffListener(listener: unknown): number;
|
||||
addKernelTipOffListener (listener: unknown): number;
|
||||
|
||||
removeKernelTipOffListener(listenerId: unknown): void;
|
||||
removeKernelTipOffListener (listenerId: number): void;
|
||||
|
||||
tipOffSendJsData(args: unknown[]): Promise<unknown>;// 2
|
||||
tipOffSendJsData (arg1: unknown, arg2: unknown): Promise<unknown>;
|
||||
|
||||
getPskey(domainList: string[], nocache: boolean): Promise<GeneralCallResult & {
|
||||
domainPskeyMap: Map<string, string>
|
||||
getPskey (domainList: string[], nocache: boolean): Promise<GeneralCallResult & {
|
||||
domainPskeyMap: Map<string, string>;
|
||||
}>;
|
||||
|
||||
tipOffSendJsData(args: unknown[]): Promise<unknown>;// 2
|
||||
tipOffMsgs (arg: unknown): Promise<unknown>;
|
||||
|
||||
tipOffMsgs(args: unknown[]): Promise<unknown>;// 1
|
||||
encodeUinAesInfo (arg1: unknown, arg2: unknown): Promise<unknown>;
|
||||
|
||||
encodeUinAesInfo(args: unknown[]): Promise<unknown>;// 2
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
export interface NodeIKernelUnifySearchService {
|
||||
checkAIAuth (arg: unknown): unknown;
|
||||
|
||||
getNetResultTabs (arg: unknown): unknown;
|
||||
|
||||
getNetSugWords (arg: unknown): unknown;
|
||||
|
||||
getSearchAppendingInfo (arg: unknown): unknown;
|
||||
|
||||
getSearchBoxSugWords (arg: unknown): unknown;
|
||||
|
||||
search (arg: unknown): unknown;
|
||||
|
||||
unifySearch (arg: unknown): unknown;
|
||||
|
||||
unifySearchDiscovery (arg: unknown): unknown;
|
||||
|
||||
unifySearchDiscoveryInCache (arg: unknown): unknown;
|
||||
|
||||
wxSearchReport (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
export interface NodeIKernelUnitedConfigService {
|
||||
|
||||
addKernelUnitedConfigListener(listener:unknown): number;
|
||||
addKernelUnitedConfigListener (listener: unknown): number;
|
||||
|
||||
removeKernelUnitedConfigListener(listenerId:number): void;
|
||||
removeKernelUnitedConfigListener (listenerId: number): void;
|
||||
|
||||
fetchUnitedSwitchConfig(...args: unknown[]): unknown;// needs 1 arguments
|
||||
fetchUnitedSwitchConfig (configIds: string[]): void;
|
||||
|
||||
isUnitedConfigSwitchOn(...args: unknown[]): unknown;// needs 1 arguments
|
||||
isUnitedConfigSwitchOn (configId: string): boolean;
|
||||
|
||||
registerUnitedConfigPushGroupList(...args: unknown[]): unknown;// needs 1 arguments
|
||||
registerUnitedConfigPushGroupList (groupList: string[]): void;
|
||||
|
||||
fetchUnitedCommendConfig(ids: `${string}`[]): void
|
||||
fetchUnitedCommendConfig (ids: string[]): void;
|
||||
|
||||
loadUnitedConfig(id: string): Promise<unknown>
|
||||
loadUnitedConfig (id: string): Promise<unknown>;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelVasSystemUpdateService {
|
||||
getResPath (arg: unknown): unknown;
|
||||
|
||||
isExist (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
export interface NodeIKernelWiFiPhotoClientService {
|
||||
addKernelWiFiPhotoClientListener (listener: unknown): number;
|
||||
|
||||
removeKernelWiFiPhotoClientListener (listenerId: number): void;
|
||||
|
||||
cancelGetPhoto (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
cancelGetPhotoThumbBatch (arg: unknown): unknown;
|
||||
|
||||
cancelRequest (arg: unknown): unknown;
|
||||
|
||||
connectToHostForTest (arg: unknown): unknown;
|
||||
|
||||
deletePhotoBatch (arg: unknown): unknown;
|
||||
|
||||
disconnect (arg: unknown): unknown;
|
||||
|
||||
getAlbumFileSavePath (arg: unknown): unknown;
|
||||
|
||||
getAllPhotoSimpleInfo (arg: unknown): unknown;
|
||||
|
||||
getPhotoAndSaveAs (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
getPhotoBatch (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getPhotoInfoBatch (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getPhotoSimpleInfoForFirstView (arg1: string, arg2: number): unknown;
|
||||
|
||||
getPhotoThumbBatchWithConfig (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getWiFiPhotoDownFileInfos (arg1: string, arg2: Array<unknown>[]): unknown;
|
||||
|
||||
resumeUncompleteDownloadRecords (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelWiFiPhotoHostService {
|
||||
addKernelWiFiPhotoHostListener (listener: unknown): number;
|
||||
|
||||
removeKernelWiFiPhotoHostListener (listenerId: number): void;
|
||||
|
||||
acceptRequest (arg1: number, arg2: unknown): unknown;
|
||||
|
||||
disconnect (arg: unknown): unknown;
|
||||
|
||||
rejectRequest (arg1: number, arg2: number): unknown;
|
||||
|
||||
setAlbumAccessDelegate (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelYellowFaceForManagerService {
|
||||
download (arg1: string, arg2: string, arg3: string, arg4: boolean): unknown;
|
||||
|
||||
setHistory (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
import { NodeIO3MiscListener } from '@/napcat-core/listeners/NodeIO3MiscListener';
|
||||
|
||||
export interface NodeIO3MiscService {
|
||||
get(): NodeIO3MiscService;
|
||||
get (): NodeIO3MiscService;
|
||||
|
||||
addO3MiscListener(listeners: NodeIO3MiscListener): number;
|
||||
addO3MiscListener (listener: NodeIO3MiscListener): number;
|
||||
|
||||
setAmgomDataPiece(appid: string, dataPiece: Uint8Array): void;
|
||||
removeO3MiscListener (listenerId: number): void;
|
||||
|
||||
reportAmgomWeather(type: string, uk2: string, arg: Array<string>): void;
|
||||
passthroughO3Data (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
reportAmgomWeather (arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
setAmgomDataPiece (appid: string, dataPiece: Uint8Array): void;
|
||||
}
|
||||
@@ -1,5 +1,11 @@
|
||||
export interface NodeIYellowFaceService {
|
||||
download(resourceConfigJson: string, resourceDir: string, cacheDir: string, force: boolean): void;
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
setHistory(fullMd5: string): void;
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
download (resourceConfigJson: string, resourceDir: string, cacheDir: string, force: boolean): void;
|
||||
|
||||
setHistory (fullMd5: string): void;
|
||||
|
||||
update (arg: unknown): unknown;
|
||||
}
|
||||
@@ -36,6 +36,36 @@ export * from './NodeIKernelDbToolsService';
|
||||
export * from './NodeIKernelTipOffService';
|
||||
export * from './NodeIKernelSearchService';
|
||||
export * from './NodeIKernelCollectionService';
|
||||
// === New service exports from IDA analysis ===
|
||||
export * from './NodeIKernelSettingService';
|
||||
export * from './NodeIKernelQiDianService';
|
||||
export * from './NodeIKernelSkinService';
|
||||
export * from './NodeIKernelQQPlayService';
|
||||
export * from './NodeIKernelRDeliveryService';
|
||||
export * from './NodeIKernelRemotingService';
|
||||
export * from './NodeIKernelLiteBusinessService';
|
||||
export * from './NodeIKernelGroupTabService';
|
||||
export * from './NodeIKernelLockService';
|
||||
export * from './NodeIKernelHandOffService';
|
||||
export * from './NodeIKernelMiniAppService';
|
||||
export * from './NodeIKernelPublicAccountService';
|
||||
export * from './NodeIKernelThirdPartySigService';
|
||||
export * from './NodeIKernelUnifySearchService';
|
||||
export * from './NodeIKernelVasSystemUpdateService';
|
||||
export * from './NodeIKernelPersonalAlbumService';
|
||||
export * from './NodeIKernelConfigMgrService';
|
||||
export * from './NodeIKernelFeedService';
|
||||
export * from './NodeIKernelBdhUploadService';
|
||||
export * from './NodeIKernelDirectSessionService';
|
||||
export * from './NodeIKernelFileBridgeClientService';
|
||||
export * from './NodeIKernelFileBridgeHostService';
|
||||
export * from './NodeIKernelWiFiPhotoHostService';
|
||||
export * from './NodeIKernelWiFiPhotoClientService';
|
||||
export * from './NodeIKernelEmojiService';
|
||||
export * from './NodeIKernelNearbyProService';
|
||||
export * from './NodeIKernelAVSDKService';
|
||||
export * from './NodeIKernelAddBuddyService';
|
||||
export * from './NodeIKernelYellowFaceForManagerService';
|
||||
|
||||
export type ServiceNamingMapping = {
|
||||
NodeIKernelAvatarService: NodeIKernelAvatarService;
|
||||
@@ -53,6 +83,6 @@ export type ServiceNamingMapping = {
|
||||
NodeIKernelRichMediaService: NodeIKernelRichMediaService;
|
||||
NodeIKernelDbToolsService: NodeIKernelDbToolsService;
|
||||
NodeIKernelTipOffService: NodeIKernelTipOffService;
|
||||
NodeIKernelSearchService: NodeIKernelSearchService,
|
||||
NodeIKernelSearchService: NodeIKernelSearchService;
|
||||
NodeIKernelCollectionService: NodeIKernelCollectionService;
|
||||
};
|
||||
@@ -323,7 +323,7 @@ export interface FlashTransferInfo {
|
||||
id: string;
|
||||
urls: FlashTransferIcon[];
|
||||
localCachePath: string;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -337,7 +337,7 @@ export interface MarkdownElement {
|
||||
mdExtType?: number;
|
||||
mdExtInfo?: {
|
||||
flashTransferInfo: FlashTransferInfo;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -550,6 +550,96 @@ export interface QueryMsgsParams {
|
||||
isIncludeCurrent: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息引用标识(msgId + msgSeq + msgTime)
|
||||
*/
|
||||
export interface MsgRef {
|
||||
msgId: string;
|
||||
msgSeq: string;
|
||||
msgTime: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息完整标识(含cliSeq和msgRandom)
|
||||
*/
|
||||
export interface MsgIdentity {
|
||||
msgId: string;
|
||||
msgSeq: string;
|
||||
cliSeq: string;
|
||||
msgTime: string;
|
||||
msgRandom: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 灰条JSON消息信息
|
||||
*/
|
||||
export interface GrayTipJsonInfo {
|
||||
busiId: number | string;
|
||||
jsonStr: string;
|
||||
recentAbstract: string;
|
||||
isServer: boolean;
|
||||
xmlToJsonParam?: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* 转发文件信息
|
||||
*/
|
||||
export interface ForwardFileInfo {
|
||||
targetMsgId: string;
|
||||
targetElemId: string;
|
||||
commonFileInfo: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地灰条提示信息
|
||||
*/
|
||||
export interface LocalGrayTipInfo {
|
||||
type: number;
|
||||
robot?: unknown;
|
||||
direct?: unknown;
|
||||
extraJson: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Token设置信息
|
||||
*/
|
||||
export interface TokenInfo {
|
||||
tokenType: number;
|
||||
apnsToken?: string | Uint8Array;
|
||||
voipToken?: string | Uint8Array;
|
||||
profileId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台切换时的未读计数信息
|
||||
*/
|
||||
export interface BackGroundInfo {
|
||||
c2cUnreadCnt: number;
|
||||
groupUnreadCnt: number;
|
||||
guildUnreadCnt: number;
|
||||
guildPsvboxUnreadCnt: number;
|
||||
verifyUnreadCnt: number;
|
||||
contactUnreadCnt: number;
|
||||
groupUnreadCodes: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息类型过滤参数
|
||||
*/
|
||||
export interface MsgTypeFilter {
|
||||
filterMsgType: Array<{ type: number; subType: Array<number>; }>;
|
||||
filterSendersUid: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 空间流参数
|
||||
*/
|
||||
export interface SgrpStreamParams {
|
||||
sgrpStreamPginSourceName: string;
|
||||
sgrpVisitFrom: string;
|
||||
sgrpSessionId: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时聊天信息API接口
|
||||
*/
|
||||
|
||||
+136
-29
@@ -29,6 +29,28 @@ import { NodeIkernelTestPerformanceService } from './services/NodeIkernelTestPer
|
||||
import { NodeIKernelECDHService } from './services/NodeIKernelECDHService';
|
||||
import { NodeIO3MiscService } from './services/NodeIO3MiscService';
|
||||
import { NodeIKernelFlashTransferService } from './services/NodeIKernelFlashTransferService';
|
||||
import { NodeIKernelOnlineStatusService } from './services/NodeIKernelOnlineStatusService';
|
||||
import { NodeIKernelBaseEmojiService } from './services/NodeIKernelBaseEmojiService';
|
||||
import { NodeIKernelSettingService } from './services/NodeIKernelSettingService';
|
||||
import { NodeIKernelFileAssistantService } from './services/NodeIKernelFileAssistantService';
|
||||
import { NodeIKernelDbToolsService } from './services/NodeIKernelDbToolsService';
|
||||
import { NodeIYellowFaceService } from './services/NodeIYellowFaceService';
|
||||
import { NodeIKernelQiDianService } from './services/NodeIKernelQiDianService';
|
||||
import { NodeIKernelSkinService } from './services/NodeIKernelSkinService';
|
||||
import { NodeIKernelQQPlayService } from './services/NodeIKernelQQPlayService';
|
||||
import { NodeIKernelRDeliveryService } from './services/NodeIKernelRDeliveryService';
|
||||
import { NodeIKernelRemotingService } from './services/NodeIKernelRemotingService';
|
||||
import { NodeIKernelLiteBusinessService } from './services/NodeIKernelLiteBusinessService';
|
||||
import { NodeIKernelGroupTabService } from './services/NodeIKernelGroupTabService';
|
||||
import { NodeIKernelLockService } from './services/NodeIKernelLockService';
|
||||
import { NodeIKernelHandOffService } from './services/NodeIKernelHandOffService';
|
||||
import { NodeIKernelMiniAppService } from './services/NodeIKernelMiniAppService';
|
||||
import { NodeIKernelPublicAccountService } from './services/NodeIKernelPublicAccountService';
|
||||
import { NodeIKernelThirdPartySigService } from './services/NodeIKernelThirdPartySigService';
|
||||
import { NodeIKernelUnifySearchService } from './services/NodeIKernelUnifySearchService';
|
||||
import { NodeIKernelVasSystemUpdateService } from './services/NodeIKernelVasSystemUpdateService';
|
||||
import { NodeIKernelPersonalAlbumService } from './services/NodeIKernelPersonalAlbumService';
|
||||
import { NodeIKernelConfigMgrService } from './services/NodeIKernelConfigMgrService';
|
||||
|
||||
export interface NodeQQNTWrapperUtil {
|
||||
get (): NodeQQNTWrapperUtil;
|
||||
@@ -39,46 +61,46 @@ export interface NodeQQNTWrapperUtil {
|
||||
|
||||
getSsoCmdOfOidbReq (arg1: number, arg2: number): unknown;
|
||||
|
||||
getSsoBufferOfOidbReq (...args: unknown[]): unknown; // 有点看不懂参数定义 待补充 好像是三个参数
|
||||
getSsoBufferOfOidbReq (arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getOidbRspInfo (arg: string): unknown; // 可能是错的
|
||||
getOidbRspInfo (arg: string): unknown;
|
||||
|
||||
getFileSize (path: string): Promise<number>; // 直接的猜测
|
||||
getFileSize (path: string): Promise<number>;
|
||||
|
||||
genFileMd5Buf (arg: string): unknown; // 可能是错的
|
||||
genFileMd5Buf (arg: string): unknown;
|
||||
|
||||
genFileMd5Hex (path: string): unknown; // 直接的猜测
|
||||
genFileMd5Hex (path: string): unknown;
|
||||
|
||||
genFileShaBuf (path: string): unknown; // 直接的猜测
|
||||
genFileShaBuf (path: string): unknown;
|
||||
|
||||
genFileCumulateSha1 (path: string): unknown; // 直接的猜测
|
||||
genFileCumulateSha1 (path: string): unknown;
|
||||
|
||||
genFileShaHex (path: string): unknown; // 直接的猜测
|
||||
genFileShaHex (path: string): unknown;
|
||||
|
||||
fileIsExist (path: string): unknown;
|
||||
|
||||
startTrace (path: string): unknown; // 可能是错的
|
||||
startTrace (path: string): unknown;
|
||||
|
||||
copyFile (src: string, dst: string): unknown;
|
||||
|
||||
genFileShaAndMd5Hex (path: string, unknown: number): unknown; // 可能是错的
|
||||
genFileShaAndMd5Hex (path: string, unknown: number): unknown;
|
||||
|
||||
setTraceInfo (unknown: unknown): unknown;
|
||||
|
||||
encodeOffLine (unknown: unknown): unknown;
|
||||
|
||||
decodeOffLine (arg: string): unknown; // 可能是错的 传递hex
|
||||
decodeOffLine (arg: string): unknown;
|
||||
|
||||
DecoderRecentInfo (arg: string): unknown; // 可能是错的 传递hex
|
||||
DecoderRecentInfo (arg: string): unknown;
|
||||
|
||||
getPinyin (arg0: string, arg1: boolean): unknown;
|
||||
|
||||
matchInPinyin (arg0: unknown[], arg1: string): unknown; // 参数特复杂 arg0是个复杂数据类型
|
||||
getPinyinExt (arg0: string, arg1: boolean): unknown;
|
||||
|
||||
matchInPinyin (arg0: unknown[], arg1: string): unknown;
|
||||
|
||||
makeDirByPath (arg0: string): unknown;
|
||||
|
||||
emptyWorkingSet (arg0: number): unknown; // 参数是UINT32
|
||||
|
||||
runProcess (arg0: string, arg1: boolean): unknown;
|
||||
|
||||
runProcessArgs (arg0: string, arg1: { [key: string]: string; }, arg2: boolean): unknown;
|
||||
@@ -141,6 +163,24 @@ export interface NodeQQNTWrapperUtil {
|
||||
|
||||
isNull (): unknown;
|
||||
|
||||
deletePath (path: string): unknown;
|
||||
|
||||
calculateDirectoryTotalSize (path: string): unknown;
|
||||
|
||||
GetBaseEmojiPathByIds (arg: unknown): unknown;
|
||||
|
||||
SetMobileBaseEmojiPath (arg0: unknown, arg1: unknown): unknown;
|
||||
|
||||
setCreateThumbailSupportedFileExtensions (arg0: unknown, arg1: unknown): unknown;
|
||||
|
||||
setFileDropNativeWindowHide (arg: unknown): unknown;
|
||||
|
||||
setFileDropWindowNativeWindowHandle (arg: unknown): unknown;
|
||||
|
||||
startListenFileDragEvent (arg: unknown): unknown;
|
||||
|
||||
stopAccessingSecurityScopedResource (arg: unknown): unknown;
|
||||
|
||||
createThumbnailImage (
|
||||
serviceName: string,
|
||||
filePath: string,
|
||||
@@ -180,6 +220,43 @@ export interface NodeIQQNTWrapperSession {
|
||||
|
||||
startNT (): void;
|
||||
|
||||
// === Session lifecycle ===
|
||||
close (arg: unknown): void;
|
||||
|
||||
onLine (arg: unknown): void;
|
||||
|
||||
offLine (arg: unknown): void;
|
||||
|
||||
disableIpDirect (arg: unknown): void;
|
||||
|
||||
getAccountPath (arg: unknown): string;
|
||||
|
||||
updateTicket (arg: unknown): void;
|
||||
|
||||
// === SSO/Network dispatch ===
|
||||
onDispatchPush (arg1: unknown, arg2: unknown): void;
|
||||
|
||||
onDispatchPushWithJson (arg1: unknown, arg2: unknown): void;
|
||||
|
||||
onDispatchRequestReply (arg1: unknown, arg2: unknown, arg3: unknown): void;
|
||||
|
||||
onMsfPush (arg1: unknown, arg2: unknown, arg3: unknown): void;
|
||||
|
||||
onNetReply (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown): void;
|
||||
|
||||
onSendOidbReply (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): void;
|
||||
|
||||
onSendSSOReply (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): void;
|
||||
|
||||
onUIConfigUpdate (arg1: unknown, arg2: unknown): void;
|
||||
|
||||
setOnMsfStatusChanged (arg1: unknown, arg2: unknown, arg3: unknown): void;
|
||||
|
||||
setOnNetworkChanged (arg: unknown): void;
|
||||
|
||||
setOnWeakNetChanged (arg: unknown): void;
|
||||
|
||||
// === Service getters ===
|
||||
getBdhUploadService (): unknown;
|
||||
|
||||
getECDHService (): NodeIKernelECDHService;
|
||||
@@ -220,47 +297,47 @@ export interface NodeIQQNTWrapperSession {
|
||||
|
||||
getDirectSessionService (): unknown;
|
||||
|
||||
getRDeliveryService (): unknown;
|
||||
getRDeliveryService (): NodeIKernelRDeliveryService;
|
||||
|
||||
getAvatarService (): NodeIKernelAvatarService;
|
||||
|
||||
getFeedChannelService (): unknown;
|
||||
|
||||
getYellowFaceService (): unknown;
|
||||
getYellowFaceService (): NodeIYellowFaceService;
|
||||
|
||||
getCollectionService (): NodeIKernelCollectionService;
|
||||
|
||||
getSettingService (): unknown;
|
||||
getSettingService (): NodeIKernelSettingService;
|
||||
|
||||
getQiDianService (): unknown;
|
||||
getQiDianService (): NodeIKernelQiDianService;
|
||||
|
||||
getFileAssistantService (): unknown;
|
||||
getFileAssistantService (): NodeIKernelFileAssistantService;
|
||||
|
||||
getGuildService (): unknown;
|
||||
|
||||
getSkinService (): unknown;
|
||||
getSkinService (): NodeIKernelSkinService;
|
||||
|
||||
getTestPerformanceService (): NodeIkernelTestPerformanceService;
|
||||
|
||||
getQQPlayService (): unknown;
|
||||
getQQPlayService (): NodeIKernelQQPlayService;
|
||||
|
||||
getDbToolsService (): unknown;
|
||||
getDbToolsService (): NodeIKernelDbToolsService;
|
||||
|
||||
getUixConvertService (): NodeIKernelUixConvertService;
|
||||
|
||||
getOnlineStatusService (): unknown;
|
||||
getOnlineStatusService (): NodeIKernelOnlineStatusService;
|
||||
|
||||
getRemotingService (): unknown;
|
||||
getRemotingService (): NodeIKernelRemotingService;
|
||||
|
||||
getGroupTabService (): unknown;
|
||||
getGroupTabService (): NodeIKernelGroupTabService;
|
||||
|
||||
getGroupSchoolService (): unknown;
|
||||
|
||||
getLiteBusinessService (): unknown;
|
||||
getLiteBusinessService (): NodeIKernelLiteBusinessService;
|
||||
|
||||
getGuildMsgService (): unknown;
|
||||
|
||||
getLockService (): unknown;
|
||||
getLockService (): NodeIKernelLockService;
|
||||
|
||||
getMSFService (): NodeIKernelMSFService;
|
||||
|
||||
@@ -270,7 +347,29 @@ export interface NodeIQQNTWrapperSession {
|
||||
|
||||
getRecentContactService (): NodeIKernelRecentContactService;
|
||||
|
||||
getConfigMgrService (): unknown;
|
||||
getConfigMgrService (): NodeIKernelConfigMgrService;
|
||||
|
||||
getBaseEmojiService (): NodeIKernelBaseEmojiService;
|
||||
|
||||
getHandOffService (): NodeIKernelHandOffService;
|
||||
|
||||
getMiniAppService (): NodeIKernelMiniAppService;
|
||||
|
||||
getPublicAccountService (): NodeIKernelPublicAccountService;
|
||||
|
||||
getThirdPartySigService (): NodeIKernelThirdPartySigService;
|
||||
|
||||
getUnifySearchService (): NodeIKernelUnifySearchService;
|
||||
|
||||
getVasSystemUpdateService (): NodeIKernelVasSystemUpdateService;
|
||||
|
||||
getPersonalAlbumService (): NodeIKernelPersonalAlbumService;
|
||||
|
||||
getGProGuildMsgService (): unknown;
|
||||
|
||||
getFileBridgeHostService (): unknown;
|
||||
|
||||
getWiFiPhotoClientService (): unknown;
|
||||
}
|
||||
|
||||
export interface EnginInitDesktopConfig {
|
||||
@@ -291,6 +390,14 @@ export interface NodeIQQNTWrapperEngine {
|
||||
get (): NodeIQQNTWrapperEngine;
|
||||
|
||||
initWithDeskTopConfig (config: EnginInitDesktopConfig, nodeIGlobalAdapter: NodeIGlobalAdapter): void;
|
||||
|
||||
initWithMobileConfig (config: unknown, nodeIGlobalAdapter: NodeIGlobalAdapter): void;
|
||||
|
||||
initLog (arg: unknown): void;
|
||||
|
||||
setLogLevel (arg: unknown): void;
|
||||
|
||||
onSendSSOReply (arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): void;
|
||||
}
|
||||
|
||||
export interface WrapperNodeApi {
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "napcat-database",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "src/index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./src/index.ts"
|
||||
},
|
||||
"./src/*": {
|
||||
"import": "./src/*"
|
||||
}
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/** 文件头部扩展区大小 */
|
||||
export const EXT_HEADER_SIZE = 1024;
|
||||
|
||||
/** SQLCipher 页大小 */
|
||||
export const PAGE_SIZE = 4096;
|
||||
|
||||
/** PBKDF2 salt 长度 */
|
||||
export const SALT_SIZE = 16;
|
||||
|
||||
/** AES-256 密钥长度 */
|
||||
export const KEY_SIZE = 32;
|
||||
|
||||
/** AES-CBC IV 长度 */
|
||||
export const IV_SIZE = 16;
|
||||
|
||||
/** HMAC-SHA1 长度 */
|
||||
export const HMAC_SIZE = 20;
|
||||
|
||||
/** 每页保留区大小: IV(16) + HMAC_SHA1(20) + pad(12) = 48 */
|
||||
export const RESERVE_SIZE = 48;
|
||||
|
||||
/** PBKDF2 主密钥迭代次数 */
|
||||
export const KDF_ITERATIONS = 4000;
|
||||
|
||||
/** PBKDF2 HMAC 密钥迭代次数 */
|
||||
export const FAST_ITERATIONS = 2;
|
||||
|
||||
/** HMAC salt XOR 掩码 */
|
||||
export const HMAC_MASK = 0x3a;
|
||||
|
||||
/** SQLite 加密文件头 */
|
||||
export const SQLITE_HEADER = Buffer.from('SQLite header 3\0');
|
||||
|
||||
/** SQLite 明文文件头 */
|
||||
export const SQLITE_FORMAT = Buffer.from('SQLite format 3\0');
|
||||
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 密钥派生
|
||||
* enc_key = PBKDF2_HMAC_SHA512(passphrase, salt, 4000, 32)
|
||||
* hmac_key = PBKDF2_HMAC_SHA512(enc_key, salt ^ 0x3a, 2, 32)
|
||||
*/
|
||||
|
||||
import { pbkdf2Sync } from 'node:crypto';
|
||||
import {
|
||||
KEY_SIZE,
|
||||
KDF_ITERATIONS,
|
||||
FAST_ITERATIONS,
|
||||
HMAC_MASK,
|
||||
} from './constants';
|
||||
|
||||
export interface DerivedKeys {
|
||||
encKey: Buffer;
|
||||
hmacKey: Buffer;
|
||||
}
|
||||
export function deriveKeys (passphrase: Buffer, salt: Buffer): DerivedKeys {
|
||||
const encKey = pbkdf2Sync(passphrase, salt, KDF_ITERATIONS, KEY_SIZE, 'sha512');
|
||||
|
||||
const hmacSalt = Buffer.alloc(salt.length);
|
||||
for (let i = 0; i < salt.length; i++) {
|
||||
hmacSalt[i] = salt[i]! ^ HMAC_MASK;
|
||||
}
|
||||
const hmacKey = pbkdf2Sync(encKey, hmacSalt, FAST_ITERATIONS, KEY_SIZE, 'sha512');
|
||||
|
||||
return { encKey, hmacKey };
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
import { createDecipheriv } from 'node:crypto';
|
||||
import fs from 'node:fs';
|
||||
import {
|
||||
EXT_HEADER_SIZE,
|
||||
PAGE_SIZE,
|
||||
SALT_SIZE,
|
||||
IV_SIZE,
|
||||
RESERVE_SIZE,
|
||||
SQLITE_HEADER,
|
||||
SQLITE_FORMAT,
|
||||
} from './constants';
|
||||
import { deriveKeys } from './crypto';
|
||||
|
||||
/**
|
||||
* 解密单个 SQLCipher 页面
|
||||
* @param pageData 原始页数据 (4096 字节)
|
||||
* @param encKey AES-256 密钥
|
||||
* @param skipSalt 页 1 需跳过前 16 字节 salt
|
||||
*/
|
||||
function decryptPage (pageData: Buffer, encKey: Buffer, skipSalt: number = 0): Buffer {
|
||||
const data = pageData.subarray(skipSalt);
|
||||
const contentLen = data.length - RESERVE_SIZE;
|
||||
const encrypted = data.subarray(0, contentLen);
|
||||
const iv = data.subarray(contentLen, contentLen + IV_SIZE);
|
||||
|
||||
const decipher = createDecipheriv('aes-256-cbc', encKey, iv);
|
||||
decipher.setAutoPadding(false);
|
||||
return Buffer.concat([decipher.update(encrypted), decipher.final()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查文件是否为 NTQQ 加密数据库
|
||||
*/
|
||||
export function isEncryptedNTDB (fileData: Buffer): boolean {
|
||||
if (fileData.length < EXT_HEADER_SIZE + PAGE_SIZE) return false;
|
||||
return fileData.subarray(0, 16).equals(SQLITE_HEADER);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将加密的 NTQQ 数据库解密为标准 SQLite 数据库
|
||||
* @param fileData 完整的加密数据库文件内容
|
||||
* @param passphrase 服务端返回的密钥口令
|
||||
* @returns 解密后的 SQLite 数据库 Buffer,失败返回 null
|
||||
*/
|
||||
export function decryptDatabase (fileData: Buffer, passphrase: Buffer): Buffer | null {
|
||||
if (!isEncryptedNTDB(fileData)) return null;
|
||||
|
||||
const scData = fileData.subarray(EXT_HEADER_SIZE);
|
||||
const totalPages = Math.floor(scData.length / PAGE_SIZE);
|
||||
if (totalPages === 0) return null;
|
||||
|
||||
const salt = scData.subarray(0, SALT_SIZE);
|
||||
const { encKey } = deriveKeys(passphrase, salt);
|
||||
|
||||
const output = Buffer.alloc(totalPages * PAGE_SIZE);
|
||||
let offset = 0;
|
||||
|
||||
for (let pgno = 1; pgno <= totalPages; pgno++) {
|
||||
const pageOffset = (pgno - 1) * PAGE_SIZE;
|
||||
const rawPage = scData.subarray(pageOffset, pageOffset + PAGE_SIZE);
|
||||
const skip = pgno === 1 ? SALT_SIZE : 0;
|
||||
const decrypted = decryptPage(rawPage, encKey, skip);
|
||||
|
||||
if (pgno === 1) {
|
||||
// 重建 Page 1: SQLite 标准文件头 + 解密内容
|
||||
SQLITE_FORMAT.copy(output, 0);
|
||||
decrypted.copy(output, 16);
|
||||
// 修正 page_size 字段 (offset 16-17, big-endian)
|
||||
output.writeUInt16BE(PAGE_SIZE, 16);
|
||||
// 清零 reserved space 标志 (offset 20)
|
||||
output[20] = 0;
|
||||
offset = PAGE_SIZE;
|
||||
} else {
|
||||
decrypted.copy(output, offset);
|
||||
offset += PAGE_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密数据库文件并写入输出路径
|
||||
* @param inputPath 加密数据库路径
|
||||
* @param passphrase 密钥口令
|
||||
* @param outputPath 输出路径 (默认: 原路径加 _decrypted 后缀)
|
||||
* @returns 输出路径,失败返回 null
|
||||
*/
|
||||
export function decryptDatabaseFile (
|
||||
inputPath: string,
|
||||
passphrase: Buffer,
|
||||
outputPath?: string
|
||||
): string | null {
|
||||
const fileData = fs.readFileSync(inputPath);
|
||||
const result = decryptDatabase(fileData, passphrase);
|
||||
if (!result) return null;
|
||||
|
||||
if (!outputPath) {
|
||||
const dotIdx = inputPath.lastIndexOf('.');
|
||||
outputPath = dotIdx > 0
|
||||
? inputPath.substring(0, dotIdx) + '_decrypted' + inputPath.substring(dotIdx)
|
||||
: inputPath + '_decrypted';
|
||||
}
|
||||
|
||||
fs.writeFileSync(outputPath, result);
|
||||
return outputPath;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
export { deriveKeys, type DerivedKeys } from './crypto';
|
||||
export { decryptDatabase, decryptDatabaseFile, isEncryptedNTDB } from './decrypt';
|
||||
export {
|
||||
checkSqliteAvailable,
|
||||
DatabaseHandle,
|
||||
openDatabase,
|
||||
decryptAndOpen,
|
||||
listTablesFromBuffer,
|
||||
listTablesFromFile,
|
||||
readSingleDatabase,
|
||||
scanAllDatabases,
|
||||
formatScanResults,
|
||||
type TableInfo,
|
||||
type ColumnInfo,
|
||||
type DatabaseScanResult,
|
||||
type DatabaseReadOptions,
|
||||
} from './reader';
|
||||
export {
|
||||
EXT_HEADER_SIZE,
|
||||
PAGE_SIZE,
|
||||
SALT_SIZE,
|
||||
KEY_SIZE,
|
||||
IV_SIZE,
|
||||
HMAC_SIZE,
|
||||
RESERVE_SIZE,
|
||||
KDF_ITERATIONS,
|
||||
FAST_ITERATIONS,
|
||||
HMAC_MASK,
|
||||
} from './constants';
|
||||
@@ -0,0 +1,427 @@
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import os from 'node:os';
|
||||
import { decryptDatabase, decryptDatabaseFile, isEncryptedNTDB } from './decrypt';
|
||||
|
||||
type DatabaseSyncType = import('node:sqlite').DatabaseSync;
|
||||
type DatabaseSyncCtor = new (path: string, options?: { readOnly?: boolean; }) => DatabaseSyncType;
|
||||
type SQLInputValue = import('node:sqlite').SQLInputValue;
|
||||
|
||||
let _DatabaseSync: DatabaseSyncCtor | null = null;
|
||||
let _sqliteChecked = false;
|
||||
|
||||
|
||||
async function loadSqlite (): Promise<DatabaseSyncCtor | null> {
|
||||
if (_sqliteChecked) return _DatabaseSync;
|
||||
_sqliteChecked = true;
|
||||
try {
|
||||
const mod = await import('node:sqlite');
|
||||
_DatabaseSync = mod.DatabaseSync as unknown as DatabaseSyncCtor;
|
||||
return _DatabaseSync;
|
||||
} catch {
|
||||
_DatabaseSync = null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function getDatabaseSync (): DatabaseSyncCtor {
|
||||
if (!_DatabaseSync) {
|
||||
throw new Error(
|
||||
'node:sqlite 不可用。请使用 Node.js 22+ 并添加 --experimental-sqlite 标志,' +
|
||||
'或调用 checkSqliteAvailable() 检查可用性。'
|
||||
);
|
||||
}
|
||||
return _DatabaseSync;
|
||||
}
|
||||
|
||||
export async function checkSqliteAvailable (): Promise<boolean> {
|
||||
const ctor = await loadSqlite();
|
||||
return ctor !== null;
|
||||
}
|
||||
|
||||
// ======================== 数据库连接管理 ========================
|
||||
|
||||
/** 数据库连接句柄,封装 DatabaseSync 实例 */
|
||||
export class DatabaseHandle {
|
||||
private db: DatabaseSyncType;
|
||||
private _closed = false;
|
||||
readonly filePath: string;
|
||||
readonly readOnly: boolean;
|
||||
|
||||
constructor (filePath: string, readOnly = false) {
|
||||
const DB = getDatabaseSync();
|
||||
this.db = new DB(filePath, { readOnly });
|
||||
this.filePath = filePath;
|
||||
this.readOnly = readOnly;
|
||||
}
|
||||
|
||||
/** 数据库是否已关闭 */
|
||||
get closed (): boolean {
|
||||
return this._closed;
|
||||
}
|
||||
|
||||
private ensureOpen (): void {
|
||||
if (this._closed) throw new Error('数据库已关闭');
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行 SELECT 查询,返回所有结果行
|
||||
* @param sql SQL 语句
|
||||
* @param params 绑定参数 (位置参数数组 或 命名参数对象)
|
||||
*/
|
||||
query<T = Record<string, unknown>> (sql: string, params?: SQLInputValue[] | Record<string, SQLInputValue>): T[] {
|
||||
this.ensureOpen();
|
||||
const stmt = this.db.prepare(sql);
|
||||
if (params) {
|
||||
if (Array.isArray(params)) {
|
||||
return stmt.all(...params) as T[];
|
||||
}
|
||||
return stmt.all(params) as T[];
|
||||
}
|
||||
return stmt.all() as T[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行 SELECT 查询,仅返回第一行
|
||||
* @param sql SQL 语句
|
||||
* @param params 绑定参数
|
||||
*/
|
||||
queryOne<T = Record<string, unknown>> (sql: string, params?: SQLInputValue[] | Record<string, SQLInputValue>): T | undefined {
|
||||
this.ensureOpen();
|
||||
const stmt = this.db.prepare(sql);
|
||||
if (params) {
|
||||
if (Array.isArray(params)) {
|
||||
return stmt.get(...params) as T | undefined;
|
||||
}
|
||||
return stmt.get(params) as T | undefined;
|
||||
}
|
||||
return stmt.get() as T | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行非查询 SQL (INSERT/UPDATE/DELETE/CREATE 等)
|
||||
* @param sql SQL 语句
|
||||
* @param params 绑定参数
|
||||
* @returns 受影响的行数信息
|
||||
*/
|
||||
execute (sql: string, params?: SQLInputValue[] | Record<string, SQLInputValue>): { changes: number | bigint; lastInsertRowid: number | bigint; } {
|
||||
this.ensureOpen();
|
||||
const stmt = this.db.prepare(sql);
|
||||
if (params) {
|
||||
if (Array.isArray(params)) {
|
||||
return stmt.run(...params);
|
||||
}
|
||||
return stmt.run(params);
|
||||
}
|
||||
return stmt.run();
|
||||
}
|
||||
|
||||
/** 列出所有表的信息 */
|
||||
listTables (): TableInfo[] {
|
||||
this.ensureOpen();
|
||||
return extractTablesInfo(this.db);
|
||||
}
|
||||
|
||||
/** 获取指定表的列信息 */
|
||||
getTableColumns (tableName: string): ColumnInfo[] {
|
||||
this.ensureOpen();
|
||||
const cols = this.db.prepare(`PRAGMA table_info([${tableName}])`).all() as {
|
||||
cid: number; name: string; type: string; notnull: number; pk: number;
|
||||
}[];
|
||||
return cols.map(col => ({
|
||||
cid: col.cid,
|
||||
name: col.name,
|
||||
type: col.type,
|
||||
notnull: col.notnull === 1,
|
||||
pk: col.pk === 1,
|
||||
}));
|
||||
}
|
||||
|
||||
/** 获取表的行数 */
|
||||
getRowCount (tableName: string): number {
|
||||
this.ensureOpen();
|
||||
const cnt = this.db.prepare(`SELECT count(*) as cnt FROM [${tableName}]`).get() as { cnt: number; } | undefined;
|
||||
return cnt?.cnt ?? 0;
|
||||
}
|
||||
|
||||
/** 关闭数据库连接 */
|
||||
close (): void {
|
||||
if (!this._closed) {
|
||||
this.db.close();
|
||||
this._closed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开一个已解密的 SQLite 数据库文件
|
||||
* @param filePath 解密后的 .db 文件路径
|
||||
* @param readOnly 是否以只读模式打开 (默认 true)
|
||||
*/
|
||||
export function openDatabase (filePath: string, readOnly = true): DatabaseHandle {
|
||||
return new DatabaseHandle(filePath, readOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密并打开一个加密的 NTQQ 数据库
|
||||
* @param dbPath 加密数据库路径
|
||||
* @param passphrase 密钥口令
|
||||
* @param cacheDir 解密缓存目录 (可选)
|
||||
* @param readOnly 是否只读 (默认 true)
|
||||
*/
|
||||
export function decryptAndOpen (
|
||||
dbPath: string,
|
||||
passphrase: Buffer,
|
||||
cacheDir?: string,
|
||||
readOnly = true
|
||||
): DatabaseHandle {
|
||||
const filename = path.basename(dbPath);
|
||||
|
||||
if (cacheDir) {
|
||||
const cachedPath = path.join(cacheDir, filename);
|
||||
// 已存在缓存直接打开
|
||||
if (fs.existsSync(cachedPath)) {
|
||||
return new DatabaseHandle(cachedPath, readOnly);
|
||||
}
|
||||
fs.mkdirSync(cacheDir, { recursive: true });
|
||||
const outPath = decryptDatabaseFile(dbPath, passphrase, cachedPath);
|
||||
if (!outPath) throw new Error(`解密失败: ${dbPath}`);
|
||||
return new DatabaseHandle(outPath, readOnly);
|
||||
}
|
||||
|
||||
// 无缓存目录: 解密到临时文件
|
||||
const tmpPath = path.join(os.tmpdir(), `napcat_db_${Date.now()}_${Math.random().toString(36).slice(2)}.db`);
|
||||
const fileData = fs.readFileSync(dbPath);
|
||||
const decryptedBuf = decryptDatabase(fileData, passphrase);
|
||||
if (!decryptedBuf) throw new Error(`解密失败: ${dbPath}`);
|
||||
fs.writeFileSync(tmpPath, decryptedBuf);
|
||||
return new DatabaseHandle(tmpPath, readOnly);
|
||||
}
|
||||
|
||||
/** 单个数据库表信息 */
|
||||
export interface TableInfo {
|
||||
name: string;
|
||||
type: string; // 'table' | 'view' | ...
|
||||
rowCount: number;
|
||||
columns: ColumnInfo[];
|
||||
}
|
||||
|
||||
/** 列信息 */
|
||||
export interface ColumnInfo {
|
||||
cid: number;
|
||||
name: string;
|
||||
type: string;
|
||||
notnull: boolean;
|
||||
pk: boolean;
|
||||
}
|
||||
|
||||
/** 单个数据库扫描结果 */
|
||||
export interface DatabaseScanResult {
|
||||
/** 数据库文件名 */
|
||||
filename: string;
|
||||
/** 原始加密文件路径 */
|
||||
sourcePath: string;
|
||||
/** 解密后缓存文件路径 (仅当指定了 cacheDir 时) */
|
||||
cachePath?: string;
|
||||
success: boolean;
|
||||
error?: string;
|
||||
tables: TableInfo[];
|
||||
}
|
||||
|
||||
/** 扫描/读取选项 */
|
||||
export interface DatabaseReadOptions {
|
||||
/** 解密后数据库缓存目录,不设置则使用临时文件 */
|
||||
cacheDir?: string;
|
||||
/** 是否跳过已存在的缓存文件 (默认 true) */
|
||||
skipExistingCache?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 从 DatabaseSync 对象提取表信息
|
||||
*/
|
||||
function extractTablesInfo (db: DatabaseSyncType): TableInfo[] {
|
||||
const tables: TableInfo[] = [];
|
||||
|
||||
const masterRows = db.prepare(
|
||||
"SELECT name, type FROM sqlite_master WHERE type IN ('table', 'view') ORDER BY name"
|
||||
).all() as { name: string; type: string; }[];
|
||||
|
||||
for (const { name: tableName, type: tableType } of masterRows) {
|
||||
// 获取列信息
|
||||
const columns: ColumnInfo[] = [];
|
||||
try {
|
||||
const cols = db.prepare(`PRAGMA table_info([${tableName}])`).all() as {
|
||||
cid: number; name: string; type: string; notnull: number; pk: number;
|
||||
}[];
|
||||
for (const col of cols) {
|
||||
columns.push({
|
||||
cid: col.cid,
|
||||
name: col.name,
|
||||
type: col.type,
|
||||
notnull: col.notnull === 1,
|
||||
pk: col.pk === 1,
|
||||
});
|
||||
}
|
||||
} catch {
|
||||
// PRAGMA 可能对某些表失败
|
||||
}
|
||||
|
||||
// 获取行数
|
||||
let rowCount = 0;
|
||||
try {
|
||||
const cnt = db.prepare(`SELECT count(*) as cnt FROM [${tableName}]`).get() as { cnt: number; } | undefined;
|
||||
rowCount = cnt?.cnt ?? 0;
|
||||
} catch {
|
||||
rowCount = -1;
|
||||
}
|
||||
|
||||
tables.push({
|
||||
name: tableName,
|
||||
type: tableType,
|
||||
rowCount,
|
||||
columns,
|
||||
});
|
||||
}
|
||||
|
||||
return tables;
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开一个解密后的 SQLite 文件,列出所有表和列信息
|
||||
*/
|
||||
export function listTablesFromFile (filePath: string): TableInfo[] {
|
||||
const DB = getDatabaseSync();
|
||||
const db = new DB(filePath, { readOnly: true });
|
||||
try {
|
||||
return extractTablesInfo(db);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
export function listTablesFromBuffer (data: Buffer): TableInfo[] {
|
||||
const tmpPath = path.join(os.tmpdir(), `napcat_db_${Date.now()}_${Math.random().toString(36).slice(2)}.db`);
|
||||
try {
|
||||
fs.writeFileSync(tmpPath, data);
|
||||
return listTablesFromFile(tmpPath);
|
||||
} finally {
|
||||
try { fs.unlinkSync(tmpPath); } catch { /* ignore */ }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密并读取单个数据库文件
|
||||
*
|
||||
* @param dbPath 加密数据库文件路径
|
||||
* @param passphrase 密钥口令
|
||||
* @param options 可选配置 (缓存目录等)
|
||||
* @returns 数据库扫描结果
|
||||
*/
|
||||
export function readSingleDatabase (
|
||||
dbPath: string,
|
||||
passphrase: Buffer,
|
||||
options?: DatabaseReadOptions
|
||||
): DatabaseScanResult {
|
||||
const filename = path.basename(dbPath);
|
||||
const result: DatabaseScanResult = {
|
||||
filename,
|
||||
sourcePath: dbPath,
|
||||
success: false,
|
||||
tables: [],
|
||||
};
|
||||
|
||||
try {
|
||||
// 如果指定了缓存目录,且缓存文件已存在,直接读取
|
||||
if (options?.cacheDir) {
|
||||
const cachedPath = path.join(options.cacheDir, filename);
|
||||
result.cachePath = cachedPath;
|
||||
|
||||
if (options?.skipExistingCache !== false && fs.existsSync(cachedPath)) {
|
||||
result.tables = listTablesFromFile(cachedPath);
|
||||
result.success = true;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
const fileData = fs.readFileSync(dbPath);
|
||||
if (!isEncryptedNTDB(fileData)) {
|
||||
result.error = 'Not an encrypted NTQQ database';
|
||||
return result;
|
||||
}
|
||||
|
||||
// 有缓存目录: 解密写入文件再读取
|
||||
if (options?.cacheDir) {
|
||||
fs.mkdirSync(options.cacheDir, { recursive: true });
|
||||
const outPath = decryptDatabaseFile(dbPath, passphrase, result.cachePath);
|
||||
if (!outPath) {
|
||||
result.error = 'Decryption failed';
|
||||
return result;
|
||||
}
|
||||
result.cachePath = outPath;
|
||||
result.tables = listTablesFromFile(outPath);
|
||||
} else {
|
||||
// 无缓存目录: 解密到内存再用临时文件读取
|
||||
const decryptedBuf = decryptDatabase(fileData, passphrase);
|
||||
if (!decryptedBuf) {
|
||||
result.error = 'Decryption returned null';
|
||||
return result;
|
||||
}
|
||||
result.tables = listTablesFromBuffer(decryptedBuf);
|
||||
}
|
||||
|
||||
result.success = true;
|
||||
} catch (e) {
|
||||
result.error = e instanceof Error ? e.message : String(e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
export function scanAllDatabases (
|
||||
dbDir: string,
|
||||
passphrase: Buffer,
|
||||
options?: DatabaseReadOptions
|
||||
): DatabaseScanResult[] {
|
||||
const results: DatabaseScanResult[] = [];
|
||||
|
||||
if (!fs.existsSync(dbDir)) return results;
|
||||
|
||||
const files = fs.readdirSync(dbDir).filter(f => f.endsWith('.db')).sort();
|
||||
|
||||
for (const filename of files) {
|
||||
const filePath = path.join(dbDir, filename);
|
||||
const result = readSingleDatabase(filePath, passphrase, options);
|
||||
results.push(result);
|
||||
}
|
||||
|
||||
return results;
|
||||
}
|
||||
|
||||
/**
|
||||
* 格式化扫描结果为可读字符串
|
||||
*/
|
||||
export function formatScanResults (results: DatabaseScanResult[]): string {
|
||||
const lines: string[] = [];
|
||||
let totalTables = 0;
|
||||
let successCount = 0;
|
||||
|
||||
for (const db of results) {
|
||||
if (db.success) {
|
||||
successCount++;
|
||||
const cacheNote = db.cachePath ? ` → ${db.cachePath}` : '';
|
||||
lines.push(`=== ${db.filename} (${db.tables.length} tables)${cacheNote} ===`);
|
||||
for (const table of db.tables) {
|
||||
totalTables++;
|
||||
const colList = table.columns.map(c => `${c.name}:${c.type || '?'}`).join(', ');
|
||||
lines.push(` ${table.name}: ${table.rowCount} rows [${colList}]`);
|
||||
}
|
||||
} else {
|
||||
lines.push(`=== ${db.filename}: SKIP (${db.error}) ===`);
|
||||
}
|
||||
lines.push('');
|
||||
}
|
||||
|
||||
lines.push(`Summary: ${successCount}/${results.length} databases decrypted, ${totalTables} total tables`);
|
||||
return lines.join('\n');
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": [
|
||||
"src/**/*.ts"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"dist"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Xavier Monin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,4 @@
|
||||
# @primno/dpapi
|
||||
|
||||
## 协议与说明
|
||||
全部遵守原仓库要求
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* napcat-dpapi - Windows DPAPI wrapper
|
||||
*
|
||||
* Loads the native @primno+dpapi.node addon from the runtime
|
||||
* native/dpapi/ directory using process.dlopen, consistent
|
||||
* with how other native modules (ffmpeg, packet, pty) are loaded.
|
||||
*/
|
||||
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import path, { dirname } from 'node:path';
|
||||
|
||||
export type DataProtectionScope = 'CurrentUser' | 'LocalMachine';
|
||||
|
||||
export interface DpapiBindings {
|
||||
protectData (dataToEncrypt: Uint8Array, optionalEntropy: Uint8Array | null, scope: DataProtectionScope): Uint8Array;
|
||||
unprotectData (encryptData: Uint8Array, optionalEntropy: Uint8Array | null, scope: DataProtectionScope): Uint8Array;
|
||||
}
|
||||
|
||||
let dpapiBindings: DpapiBindings | null = null;
|
||||
let loadError: Error | null = null;
|
||||
|
||||
function getAddonPath (): string {
|
||||
// At runtime, import.meta.url resolves to dist/ directory.
|
||||
// Native files are at dist/native/dpapi/{platform}-{arch}/@primno+dpapi.node
|
||||
const importDir = dirname(fileURLToPath(import.meta.url));
|
||||
const platform = process.platform; // 'win32'
|
||||
const arch = process.arch; // 'x64' or 'arm64'
|
||||
return path.join(importDir, 'native', 'dpapi', `${platform}-${arch}`, '@primno+dpapi.node');
|
||||
}
|
||||
|
||||
function loadDpapi (): DpapiBindings {
|
||||
if (dpapiBindings) {
|
||||
return dpapiBindings;
|
||||
}
|
||||
if (loadError) {
|
||||
throw loadError;
|
||||
}
|
||||
try {
|
||||
const addonPath = getAddonPath();
|
||||
const nativeModule: { exports: DpapiBindings } = { exports: {} as DpapiBindings };
|
||||
process.dlopen(nativeModule, addonPath);
|
||||
dpapiBindings = nativeModule.exports;
|
||||
return dpapiBindings;
|
||||
} catch (e) {
|
||||
loadError = e as Error;
|
||||
throw new Error(`Failed to load DPAPI native addon: ${(e as Error).message}`);
|
||||
}
|
||||
}
|
||||
|
||||
export const isPlatformSupported = process.platform === 'win32';
|
||||
|
||||
export function protectData (data: Uint8Array, optionalEntropy: Uint8Array | null, scope: DataProtectionScope): Uint8Array {
|
||||
return loadDpapi().protectData(data, optionalEntropy, scope);
|
||||
}
|
||||
|
||||
export function unprotectData (data: Uint8Array, optionalEntropy: Uint8Array | null, scope: DataProtectionScope): Uint8Array {
|
||||
return loadDpapi().unprotectData(data, optionalEntropy, scope);
|
||||
}
|
||||
|
||||
export const Dpapi = {
|
||||
protectData,
|
||||
unprotectData,
|
||||
};
|
||||
|
||||
export default Dpapi;
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "napcat-dpapi",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "index.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.ts"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist",
|
||||
"rootDir": "."
|
||||
},
|
||||
"include": [
|
||||
"./**/*.ts"
|
||||
]
|
||||
}
|
||||
@@ -2,6 +2,8 @@ import { NapCatPathWrapper } from 'napcat-common/src/path';
|
||||
import { InitWebUi, WebUiConfig, webUiRuntimePort } from 'napcat-webui-backend/index';
|
||||
import { NapCatAdapterManager } from 'napcat-adapter';
|
||||
import { NativePacketHandler } from 'napcat-core/packet/handler/client';
|
||||
import { Napi2NativeLoader } from 'napcat-core/packet/handler/napi2nativeLoader';
|
||||
import { loadNapcatConfig } from '@/napcat-core/helper/config';
|
||||
import { FFmpegService } from 'napcat-core/helper/ffmpeg/ffmpeg';
|
||||
import { logSubscription, LogWrapper } from 'napcat-core/helper/log';
|
||||
import { QQBasicInfoWrapper } from '@/napcat-core/helper/qq-basic-info';
|
||||
@@ -10,6 +12,8 @@ import { proxiedListenerOf } from '@/napcat-core/helper/proxy-handler';
|
||||
import { statusHelperSubscription } from '@/napcat-core/helper/status';
|
||||
import { applyPendingUpdates } from '@/napcat-webui-backend/src/api/UpdateNapCat';
|
||||
import { WebUiDataRuntime } from '@/napcat-webui-backend/src/helper/Data';
|
||||
import { NapProtoMsg } from 'napcat-protobuf';
|
||||
import { OidbSvcTrpcTcpBase, OidbSvcTrpcTcp0XCDE_2RespBody } from '@/napcat-core/packet/transformer/proto';
|
||||
|
||||
// Framework ES入口文件
|
||||
export async function getWebUiUrl () {
|
||||
@@ -40,12 +44,44 @@ export async function NCoreInitFramework (
|
||||
const basicInfoWrapper = new QQBasicInfoWrapper({ logger });
|
||||
const wrapper = loadQQWrapper(basicInfoWrapper.QQMainPath, basicInfoWrapper.getFullQQVersion());
|
||||
const nativePacketHandler = new NativePacketHandler({ logger }); // 初始化 NativePacketHandler 用于后续使用
|
||||
const napi2nativeLoader = new Napi2NativeLoader({ logger }); // 初始化 Napi2NativeLoader 用于后续使用
|
||||
const napcatConfig = loadNapcatConfig(pathWrapper.configPath);
|
||||
//console.log('[NapCat] [Napi2NativeLoader]', napi2nativeLoader.nativeExports.enableAllBypasses?.());
|
||||
if (process.env['NAPCAT_DISABLE_BYPASS'] !== '1') {
|
||||
const bypassOptions = napcatConfig.bypass ?? {};
|
||||
const bypassEnabled = napi2nativeLoader.nativeExports.enableAllBypasses?.(bypassOptions);
|
||||
if (bypassEnabled) {
|
||||
logger.log('[NapCat] Napi2NativeLoader: 已启用Bypass');
|
||||
}
|
||||
logger.log('[NapCat] Napi2NativeLoader: Framework模式Bypass配置:', bypassOptions);
|
||||
} else {
|
||||
logger.log('[NapCat] Napi2NativeLoader: Bypass已通过环境变量禁用');
|
||||
}
|
||||
// nativePacketHandler.onAll((packet) => {
|
||||
// console.log('[Packet]', packet.uin, packet.cmd, packet.hex_data);
|
||||
// });
|
||||
await nativePacketHandler.init(basicInfoWrapper.getFullQQVersion());
|
||||
await nativePacketHandler.init(basicInfoWrapper.getFullQQVersion(), napcatConfig.o3HookMode === 1 ? true : false);
|
||||
// 在 init 之后注册监听器
|
||||
|
||||
// 登录前监听 OidbSvcTrpcTcp.0xcde_2 数据包,获取数据库 passphrase
|
||||
let dbPassphrase: string | undefined;
|
||||
nativePacketHandler.onCmd('OidbSvcTrpcTcp.0xcde_2', ({ type, hex_data }) => {
|
||||
if (type !== 1) return; // 仅处理接收方向
|
||||
try {
|
||||
const raw = Buffer.from(hex_data, 'hex');
|
||||
const base = new NapProtoMsg(OidbSvcTrpcTcpBase).decode(raw);
|
||||
if (base.body && base.body.length > 0) {
|
||||
const body = new NapProtoMsg(OidbSvcTrpcTcp0XCDE_2RespBody).decode(base.body);
|
||||
if (body.inner?.value) {
|
||||
dbPassphrase = body.inner.value;
|
||||
logger.log('[NapCat] 已启用数据库辅助支持能力');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
logger.logError('[NapCat] [0xCDE_2] 解析失败:', e);
|
||||
}
|
||||
});
|
||||
|
||||
// 初始化 FFmpeg 服务
|
||||
await FFmpegService.init(pathWrapper.binaryPath, logger);
|
||||
// 直到登录成功后,执行下一步
|
||||
@@ -73,12 +109,34 @@ export async function NCoreInitFramework (
|
||||
// 过早进入会导致addKernelMsgListener等Listener添加失败
|
||||
// await sleep(2500);
|
||||
// 初始化 NapCatFramework
|
||||
const loaderObject = new NapCatFramework(wrapper, session, logger, selfInfo, basicInfoWrapper, pathWrapper, nativePacketHandler);
|
||||
const loaderObject = new NapCatFramework(wrapper, session, logger, selfInfo, basicInfoWrapper, pathWrapper, nativePacketHandler, napi2nativeLoader);
|
||||
// 将捕获的 passphrase 设置到 core 上,供 DatabaseApi 使用
|
||||
if (dbPassphrase) {
|
||||
loaderObject.core.dbPassphrase = dbPassphrase;
|
||||
}
|
||||
await loaderObject.core.initCore();
|
||||
|
||||
// 启动WebUi
|
||||
WebUiDataRuntime.setWorkingEnv(NapCatCoreWorkingEnv.Framework);
|
||||
WebUiDataRuntime.setQQDataPath(loaderObject.core.dataPath);
|
||||
InitWebUi(logger, pathWrapper, logSubscription, statusHelperSubscription).then().catch(e => logger.logError(e));
|
||||
|
||||
// // 测试 DatabaseApi
|
||||
// if (dbPassphrase) {
|
||||
// const dbApi = loaderObject.core.apis.DatabaseApi;
|
||||
// const sqliteOk = await dbApi.isSqliteAvailable();
|
||||
// if (sqliteOk) {
|
||||
// try {
|
||||
// const result = dbApi.readDatabase('nt_msg.db');
|
||||
// if (result) {
|
||||
// logger.log('[NapCat] [Database] nt_msg.db:\n' + dbApi.formatResults([result]));
|
||||
// }
|
||||
// } catch (e) {
|
||||
// logger.logError('[NapCat] [Database] 读取失败:', e);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 使用 NapCatAdapterManager 统一管理协议适配器
|
||||
const adapterManager = new NapCatAdapterManager(loaderObject.core, loaderObject.context, pathWrapper);
|
||||
await adapterManager.initAdapters();
|
||||
@@ -100,10 +158,12 @@ export class NapCatFramework {
|
||||
selfInfo: SelfInfo,
|
||||
basicInfoWrapper: QQBasicInfoWrapper,
|
||||
pathWrapper: NapCatPathWrapper,
|
||||
packetHandler: NativePacketHandler
|
||||
packetHandler: NativePacketHandler,
|
||||
napi2nativeLoader: Napi2NativeLoader
|
||||
) {
|
||||
this.context = {
|
||||
packetHandler,
|
||||
napi2nativeLoader,
|
||||
workingEnv: NapCatCoreWorkingEnv.Framework,
|
||||
wrapper,
|
||||
session,
|
||||
|
||||
Loaded 100 of 165 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user