Compare commits

...

173 Commits

Author SHA1 Message Date
手瓜一十雪
18892379de fix: search file 2024-07-26 12:27:02 +08:00
手瓜一十雪
620d61c8dc docs: v1.6.8 2024-07-26 11:59:18 +08:00
手瓜一十雪
9f91398875 build: 再次优化发送速度 2024-07-26 11:30:04 +08:00
手瓜一十雪
34d19a471a refactor: 回滚 2024-07-26 10:58:56 +08:00
手瓜一十雪
2ef6477d7c build: log info 2024-07-25 20:22:03 +08:00
手瓜一十雪
26e6800836 fix: 退群推送 2024-07-25 18:08:49 +08:00
手瓜一十雪
9dbbcf3872 build: 1.6.8 - parse appid 2024-07-25 17:57:39 +08:00
手瓜一十雪
6b3343e1e4 build: 1.6.8 beta6 2024-07-25 10:59:06 +08:00
手瓜一十雪
ef48f754a5 docs: 整理当前进度 2024-07-25 10:44:53 +08:00
手瓜一十雪
3be1ede847 refactor: sendtime/join time 2024-07-25 10:32:44 +08:00
手瓜一十雪
7bff1b61e8 refactor: SendTime 2024-07-25 10:02:16 +08:00
手瓜一十雪
6affd0eb68 feat: GetSendTime 2024-07-24 17:49:03 +08:00
手瓜一十雪
0a112d15e0 fix: typo 2024-07-24 15:37:23 +08:00
手瓜一十雪
4e03f582bb fix: richmeida name 2024-07-24 14:43:10 +08:00
手瓜一十雪
8f186c1c5e chore: action clean 2024-07-24 14:37:48 +08:00
手瓜一十雪
cd1bae9a1f fix: setGroupAvatar 2024-07-24 14:35:12 +08:00
手瓜一十雪
60796c26ca Merge pull request #147 from serfend/default-config
fix[config]support overwrite by user #145
2024-07-24 14:28:42 +08:00
汉广
28927f950d fix[config]support overwrite by user 2024-07-24 14:25:58 +08:00
手瓜一十雪
95f16ebc8c Merge pull request #144 from Guation/main
feat: http与ws允许监听同一端口,快速登录允许自动选择QQ号,允许禁用webUI
2024-07-24 14:09:19 +08:00
挂神
25bca8385d feat: http与ws共站支持热重载 2024-07-24 13:14:35 +08:00
手瓜一十雪
965c7f23b4 feat: 群头像设置 2024-07-24 11:37:12 +08:00
手瓜一十雪
33082af9cc feat: searchFile 2024-07-24 11:23:27 +08:00
手瓜一十雪
1f7f3565b0 build: 1.6.8 beta05 2024-07-24 10:45:11 +08:00
手瓜一十雪
f784363696 refactor: UUID 2024-07-24 10:44:55 +08:00
手瓜一十雪
37bd51e138 refactor: getUserInfo 2024-07-24 10:42:22 +08:00
手瓜一十雪
c367728c43 Merge branch 'main' of https://github.com/NapNeko/NapCatQQ 2024-07-24 10:23:48 +08:00
手瓜一十雪
61f0f5d884 refactor: 改造接口调用 2024-07-24 10:23:41 +08:00
手瓜一十雪
5f2ebeead7 docs: update 2024-07-23 18:32:07 +08:00
手瓜一十雪
7646037fc7 docs: 砍掉 2024-07-23 18:21:19 +08:00
手瓜一十雪
eac6d285ff chore: debug 2024-07-23 17:39:00 +08:00
手瓜一十雪
b921d5e734 refactor: downloadMedia 2024-07-23 16:15:23 +08:00
手瓜一十雪
831d808e63 chore: remove 2024-07-23 16:03:06 +08:00
手瓜一十雪
451b88d7e3 refactor: video type 2024-07-23 15:51:57 +08:00
手瓜一十雪
f916682a71 build: 1.6.8 beta07 2024-07-23 15:38:41 +08:00
手瓜一十雪
2d76bcf0cf refactor: message id 2024-07-23 15:10:39 +08:00
手瓜一十雪
8db294efe6 refactor: 转发消息修复 2024-07-23 14:54:05 +08:00
手瓜一十雪
5cc5149aed fix: 合并转发 2024-07-23 14:19:26 +08:00
手瓜一十雪
7ecb01dc9f docs: 规划 2024-07-23 12:34:20 +08:00
手瓜一十雪
8bf1a545d9 chore: remove debug 2024-07-23 10:12:20 +08:00
手瓜一十雪
efb2be2f94 fix: timeout 2024-07-23 09:50:31 +08:00
手瓜一十雪
bd2edda494 refactor: sendMsg 2024-07-23 09:45:00 +08:00
手瓜一十雪
991172eae4 Merge branch 'main' of https://github.com/NapNeko/NapCatQQ 2024-07-23 09:21:36 +08:00
手瓜一十雪
fc7631f9aa refactor: sendmsg 2024-07-23 09:21:22 +08:00
手瓜一十雪
a21efb7d2f Merge pull request #145 from serfend/default-config
fix[default-config]config name check #138
2024-07-22 21:36:54 +08:00
汉广
03bc844ad0 fix[default-config]config name check 2024-07-22 20:12:24 +08:00
挂神
f7bdc35ed6 feat: http与ws允许监听同一端口,快速登录允许自动选择QQ号,允许禁用webUI 2024-07-22 19:47:23 +08:00
手瓜一十雪
0efdffd857 Merge branch 'main' of https://github.com/NapNeko/NapCatQQ 2024-07-22 18:49:36 +08:00
手瓜一十雪
6a16a42d0c feat: refactor send 2024-07-22 18:49:25 +08:00
手瓜一十雪
e9c00c72b1 Merge pull request #138 from serfend/main
feat[config]support use default-template
2024-07-22 18:22:49 +08:00
手瓜一十雪
ab22f36b8a refactor: NTEvent Checker 2024-07-22 18:21:29 +08:00
手瓜一十雪
c57497cd91 feat: remove debug 2024-07-22 18:17:33 +08:00
手瓜一十雪
ba123236e5 feat:msgid generate 2024-07-22 18:17:03 +08:00
手瓜一十雪
338b6e4607 fix: QRCode 2024-07-22 15:46:48 +08:00
手瓜一十雪
f88c717560 build: 1.6.8-beta03 2024-07-22 15:40:41 +08:00
手瓜一十雪
f8ffc92db5 feat: remove LineDev&&Protobuf 2024-07-22 15:40:23 +08:00
手瓜一十雪
98c23c172c build: 1.6.8-无数据库版本 2024-07-22 15:13:38 +08:00
手瓜一十雪
781c107d8c feat: 拉取重启消息 2024-07-22 15:12:25 +08:00
手瓜一十雪
186668c075 fix: Login 2024-07-22 14:18:04 +08:00
手瓜一十雪
cf9f785193 style: lint 2024-07-22 14:12:03 +08:00
手瓜一十雪
72d2d3f224 feat: 破坏file/db相关接口 2024-07-22 14:09:37 +08:00
手瓜一十雪
087c76b394 refactor: msgId stage-2 2024-07-22 11:34:18 +08:00
手瓜一十雪
4f9fb2c8c3 Merge pull request #141 from cnxysoft/main
修复提交疏漏
2024-07-22 11:15:28 +08:00
手瓜一十雪
334e43e764 refactor: MsgId 2024-07-22 11:15:01 +08:00
Alen
7843256402 修复提交疏漏
修复变量类型未断言的问题
2024-07-22 11:07:33 +08:00
手瓜一十雪
0522ba35fe refactor: jest test 2024-07-22 10:24:55 +08:00
手瓜一十雪
24d3b52e0b refactor: Message Unique 2024-07-22 09:56:08 +08:00
手瓜一十雪
3177110f0f feat: RecentContact 2024-07-22 09:24:16 +08:00
手瓜一十雪
e1b8243a67 Merge pull request #140 from cnxysoft/main
BUG修复
2024-07-22 08:40:21 +08:00
Alen
b1c6ce3885 BUG修复
1.尝试让所有人能收到group_admin事件
2.修复请求API: delete_msg(POST请求网址传参)将负数判定为文本导致无法调用的问题
2024-07-22 01:22:38 +08:00
手瓜一十雪
0b4b25a11e feat: LineDev for Develop-0 2024-07-21 19:31:13 +08:00
手瓜一十雪
1176fe984a add: RecentListener 2024-07-21 19:01:47 +08:00
汉广
6ca768c3ee feat[config]support use default-template 2024-07-20 23:43:32 +08:00
手瓜一十雪
3da1659c8d fix: buddylike 2024-07-20 20:16:45 +08:00
手瓜一十雪
9aa4cd319c release: 1.6.7 2024-07-20 19:52:39 +08:00
手瓜一十雪
5af866cdca fix: error 2024-07-20 19:31:59 +08:00
手瓜一十雪
2b421fa447 release: 1.6.7 2024-07-20 17:43:56 +08:00
手瓜一十雪
30ec964325 feat: new api 2024-07-20 17:33:26 +08:00
手瓜一十雪
714d7d72eb feat: raw api add 2024-07-20 17:09:38 +08:00
手瓜一十雪
687aa0f363 chore: remove debug 2024-07-20 16:37:16 +08:00
手瓜一十雪
8363ab07a7 feat: 支持精华消息 2024-07-20 16:17:02 +08:00
手瓜一十雪
c46a757339 fix: error 2024-07-20 16:14:02 +08:00
手瓜一十雪
557864395b feat: support essence 2024-07-20 16:09:44 +08:00
手瓜一十雪
3f7a85d80b feat: essence get_sender 2024-07-20 16:00:01 +08:00
手瓜一十雪
8d18d2ce1f refactor: 标准化 2024-07-20 15:55:26 +08:00
手瓜一十雪
7141ba1587 refactor: essence and together listener 2024-07-20 15:53:39 +08:00
手瓜一十雪
44d350a225 docs: todo 2024-07-20 15:37:57 +08:00
手瓜一十雪
239b8e72d9 Merge pull request #134 from serfend/main
fix[group]handle_request reason empty
2024-07-20 15:24:39 +08:00
手瓜一十雪
279bdb6fb1 Merge pull request #135 from pohgxz/main
群戳一戳增加原始信息
2024-07-20 15:24:27 +08:00
Nepenthe
a0cea819da 群戳一戳增加原始信息
群消息log增加视频解析
2024-07-20 14:51:50 +08:00
汉广
9ab7f60544 fix[group]handle_request reason empty 2024-07-20 14:16:07 +08:00
手瓜一十雪
aaf7191bf3 build: 1.6.7-beta03 2024-07-20 10:45:26 +08:00
手瓜一十雪
628c9be0c8 feat: 2401 for 群精华设置 2024-07-20 10:44:57 +08:00
手瓜一十雪
733052720c build: 1.6.6-build02 2024-07-20 10:28:47 +08:00
手瓜一十雪
a10f007194 build: 1.6.7-beta0 2024-07-20 10:21:16 +08:00
手瓜一十雪
6fa50c58d3 feat: 优化接口转换速度 避免频繁读写 2024-07-17 15:03:10 +08:00
手瓜一十雪
c54a58d6e4 release: v1.6.6 2024-07-16 15:55:25 +08:00
手瓜一十雪
34cb1ea3fd Merge pull request #126 from cnxysoft/main
修复戳一戳
2024-07-16 15:52:39 +08:00
Alen
f640b0ca91 修复戳一戳 2024-07-16 15:47:23 +08:00
手瓜一十雪
60e16da42e Merge pull request #121 from pohgxz/main
增加winQQ-9912一键启动脚本
2024-07-14 08:44:55 +08:00
Nepenthe
0cdceb95d6 增加winQQ-9912一键启动脚本 2024-07-13 16:09:14 +00:00
手瓜一十雪
70bd22d925 fix: typo 2024-07-13 20:27:18 +08:00
手瓜一十雪
82462dd647 docs: 规划 2024-07-13 20:21:48 +08:00
手瓜一十雪
c0466e943d build: test 2024-07-13 19:37:39 +08:00
手瓜一十雪
b187b4695d refactor: uin<->uid 2024-07-13 19:37:02 +08:00
手瓜一十雪
b1956d2a37 refactor: poke 2024-07-13 19:10:47 +08:00
手瓜一十雪
590b622e5f build: test 2024-07-13 18:58:52 +08:00
手瓜一十雪
3d8174396a feat: LinuxQQ版本25765 2024-07-13 18:58:29 +08:00
手瓜一十雪
b8dc6e9bd9 feat: 再次提升版本 25765 2024-07-13 18:56:42 +08:00
手瓜一十雪
8ee99109dc chore: 整理代码 2024-07-13 18:20:44 +08:00
手瓜一十雪
902041d4ee refactor: 新增启动脚本 2024-07-13 18:15:00 +08:00
手瓜一十雪
cc34aef47e style: code lint 2024-07-13 18:12:38 +08:00
手瓜一十雪
0afbbe7c7a refactor: 废弃部分代码 2024-07-13 18:10:41 +08:00
手瓜一十雪
8004553ba7 refactor: groupNotifies 2024-07-13 18:04:55 +08:00
手瓜一十雪
0023b2846a feat: 第二次大致整理 2024-07-13 17:23:05 +08:00
手瓜一十雪
34775c1816 fix: 整理常量 2024-07-12 18:08:45 +08:00
手瓜一十雪
e0759e704b feat:大部分消息元素 2024-07-12 18:01:48 +08:00
手瓜一十雪
0aa225ca78 fix: typo 2024-07-12 17:04:28 +08:00
手瓜一十雪
b43b4ee5c0 feat: test code 2024-07-12 16:59:08 +08:00
手瓜一十雪
0cdb8cecbf feat: 群精华 代码未测试 2024-07-12 11:02:10 +08:00
手瓜一十雪
fd6a306742 feat: 懒得写了 2024-07-12 10:54:01 +08:00
手瓜一十雪
7f3b3d2277 feat: 群精华 2024-07-12 10:46:57 +08:00
手瓜一十雪
8be5b977bf Merge pull request #117 from po-lan/main
对缓存进一步优化
2024-07-12 09:52:17 +08:00
po-lan
d7ddb15f9c 对缓存进一步优化
LRUCache 将所有被移除的缓存数据作为事件参数传递给事件处理程序。

在数据库操作部分,优化了读写流程,以确保每个群组至多执行三次数据库操作:

读取:先判断缓存中是否存在用户记录,若不存在则读取数据库。
创建:如果用户记录在数据库中不存在,则新增记录。
修改:如果用户记录在数据库中存在,则进行修改。
即使单个群组内有大量用户,每种操作也只会执行一次。
2024-07-12 00:46:03 +08:00
手瓜一十雪
9a6a1798d0 build: poke能用25493 2024-07-11 12:44:42 +08:00
手瓜一十雪
14196fd349 build: 移除调试代码 2024-07-11 12:31:00 +08:00
手瓜一十雪
941b89a523 feat: uin转换优化&poke支持重写 2024-07-11 12:28:11 +08:00
手瓜一十雪
a5f9e5f8c0 Merge pull request #113 from idranme/main
perf: audio
2024-07-11 09:49:56 +08:00
idranme
80c3356c8f perf: audio 2024-07-10 17:44:17 +00:00
手瓜一十雪
914136b750 refactor: 移除异常代码 2024-07-10 21:39:03 +08:00
手瓜一十雪
f9a60795f5 feat: uid转换优化 2024-07-10 21:33:31 +08:00
手瓜一十雪
19640927c7 Merge branch 'main' of https://github.com/NapNeko/NapCatQQ 2024-07-10 21:11:43 +08:00
手瓜一十雪
22faac7e36 fix: friend uid 异常 2024-07-10 21:11:28 +08:00
手瓜一十雪
30d260ab32 Merge pull request #111 from idranme/main
fix: error catch
2024-07-10 11:55:53 +08:00
idranme
115120d066 Update file.ts 2024-07-10 11:35:55 +08:00
idranme
1327844736 fix: error catch 2024-07-10 03:25:25 +00:00
手瓜一十雪
29904f3cb7 feat: 164 way03启动脚本补充 2024-07-06 13:23:31 +08:00
手瓜一十雪
50395594b7 Merge pull request #106 from jetjinser/fix-editorconfig
fix: `.editorconfig` wrong pair `end_of_line`
2024-07-05 22:43:23 +08:00
Jinser Kafka
9360af88b3 fix: .editorconfig 2024-07-05 19:36:32 +08:00
手瓜一十雪
376370336c release: 1.6.5 2024-07-05 16:50:57 +08:00
手瓜一十雪
70df6e3302 Merge pull request #105 from po-lan/main
对缓存小优化
2024-07-05 16:49:30 +08:00
手瓜一十雪
0a1fc2dc12 feat: 1.6.5 2024-07-05 16:49:16 +08:00
手瓜一十雪
9857f6e437 feat: 优化载入流程 2024-07-05 16:47:08 +08:00
手瓜一十雪
56d6ebe916 refactor: 迁移到新库 2024-07-05 15:48:03 +08:00
po-lan
81134ea2d4 Update LRUCache.ts 2024-07-05 12:13:24 +08:00
po-lan
a9f3e7fc54 Update db.ts
通过读取缓存修复刚说话缺无法获取发言时间的问题
2024-07-05 12:12:40 +08:00
po-lan
eb84e2f8c9 Update LRUCache.ts
Add a get function to the cache
2024-07-05 12:09:59 +08:00
手瓜一十雪
61cfa0e86d release: 1.6.4 2024-07-03 14:30:55 +08:00
手瓜一十雪
0a01b8ade9 Merge pull request #97 from cnxysoft/main
修改下载函数
2024-07-02 10:13:15 +08:00
Alen
1457efa9a4 修改下载函数
为默认Headers增加Host,解决一些网站无法下载文件的问题
2024-07-02 01:07:30 +08:00
手瓜一十雪
fa5c7add7a refactor: new core 2024-07-01 18:45:48 +08:00
手瓜一十雪
d644eba4d1 refactor: napcat 2024-07-01 18:24:36 +08:00
手瓜一十雪
9c422c1a8f Merge pull request #95 from ahjsrhj/main
feat: ws反代请求添加UA: OneBot/11
2024-07-01 13:20:47 +08:00
手瓜一十雪
b6db37202f feat: core code 2024-07-01 13:18:59 +08:00
手瓜一十雪
4ca3891089 refactor: core 2024-07-01 13:18:19 +08:00
ahjsrhj
4c7ed01776 feat: ws反代请求添加UA: OneBot/11 2024-07-01 11:19:15 +08:00
手瓜一十雪
45c922c377 release: 1.6.3 2024-06-28 14:00:15 +08:00
手瓜一十雪
f854c258bd fix: 清除旧的反向ws 2024-06-28 13:42:09 +08:00
手瓜一十雪
a643fac073 refactor: msg context 2024-06-28 13:38:03 +08:00
手瓜一十雪
861f105bea fix: uid->uin 临时修复方案
uid uin转换需要优化
2024-06-28 13:11:06 +08:00
手瓜一十雪
bf10ce9f1e fix: error 2024-06-26 18:40:08 +08:00
手瓜一十雪
ccf521d0a8 feat: win ia32支持 2024-06-26 18:13:55 +08:00
手瓜一十雪
6075d98eaa release: v1.6.2 2024-06-26 18:09:41 +08:00
手瓜一十雪
a3801fc243 fix: script 2024-06-26 17:17:33 +08:00
手瓜一十雪
a1f0c05f3a chore: build script 2024-06-26 17:16:54 +08:00
手瓜一十雪
a568c96929 chore: build script 2024-06-26 17:15:46 +08:00
手瓜一十雪
d58bcf3c0e refactor: error catch 2024-06-26 17:14:23 +08:00
手瓜一十雪
985f2e6436 fix: 还原修改 2024-06-25 17:24:42 +08:00
手瓜一十雪
ad441fa793 docs: update 2024-06-24 21:38:28 +08:00
手瓜一十雪
316300cc86 Merge pull request #86 from NapNeko/dependabot/npm_and_yarn/types/uuid-10.0.0
build(deps-dev): bump @types/uuid from 9.0.8 to 10.0.0
2024-06-24 17:44:25 +08:00
dependabot[bot]
5c4f37b234 build(deps-dev): bump @types/uuid from 9.0.8 to 10.0.0
Bumps [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid) from 9.0.8 to 10.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

---
updated-dependencies:
- dependency-name: "@types/uuid"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-24 08:14:47 +00:00
手瓜一十雪
77b51a072d fix: 增加容错 2024-06-24 12:03:49 +08:00
手瓜一十雪
2536e1ae6a release: v1.6.1 2024-06-22 10:54:58 +08:00
手瓜一十雪
14822c9599 style&fix: lint & poke 2024-06-21 23:04:56 +08:00
314 changed files with 13439 additions and 8344 deletions

View File

@@ -1,21 +1,21 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf|crlf
insert_final_newline = true
# Matches multiple files with brace expansion notation
# Set default charset
charset = utf-8
# 2 space indentation
[*.{cjs,mjs,js,jsx,ts,tsx,css,scss,sass,html,json}]
indent_style = space
indent_size = 2
# Unfortunately, EditorConfig doesn't support space configuration inside import braces directly.
# You'll need to rely on your linter/formatter like ESLint or Prettier for that.
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# Matches multiple files with brace expansion notation
# Set default charset
charset = utf-8
# 2 space indentation
[*.{cjs,mjs,js,jsx,ts,tsx,css,scss,sass,html,json}]
indent_style = space
indent_size = 2
# Unfortunately, EditorConfig doesn't support space configuration inside import braces directly.
# You'll need to rely on your linter/formatter like ESLint or Prettier for that.

View File

@@ -1,4 +1,4 @@
name: "Build"
name: "Build Action"
on:
workflow_dispatch:
push:

View File

@@ -1,4 +1,4 @@
name: "release"
name: "Build Release"
on:
push:
@@ -130,6 +130,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
body_path: CHANGELOG.md
files: |
NapCat.win32.ia32.zip
NapCat.win32.x64.zip
NapCat.linux.x64.zip
NapCat.linux.arm64.zip

69
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,69 @@
name: "Build Test"
on:
workflow_dispatch:
permissions: write-all
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target_platform: [linux]
target_arch: [x64, arm64]
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build NuCat Linux
run: |
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
npm run build:prod
cd dist
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
path: dist
build-win32:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target_platform: [win32]
target_arch: [x64,ia32]
steps:
- name: Clone Main Repository
uses: actions/checkout@v4
with:
repository: 'NapNeko/NapCatQQ'
submodules: true
ref: main
token: ${{ secrets.NAPCAT_BUILD }}
- name: Use Node.js 20.X
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build NuCat Linux
run: |
npm i --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
npm run build:prod
cd dist
npm i --omit=dev --arch=${{ matrix.target_arch }} --platform=${{ matrix.target_platform }}
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: NapCat.${{ matrix.target_platform }}.${{ matrix.target_arch }}
path: dist

3
.gitignore vendored
View File

@@ -14,4 +14,5 @@ dist/
# Build
*.db
checkVersion.sh
checkVersion.sh
bun.lockb

4
.gitmodules vendored
View File

@@ -1,4 +0,0 @@
[submodule "src/core"]
path = src/core
url = https://github.com/NapNeko/core.git
branch = master

View File

@@ -0,0 +1,20 @@
# v1.6.8
QQ Version: Windows 9.9.12-26000 / Linux 3.2.9-26000
## 使用前警告
1. 在最近版本由于QQ本体大幅变动为了保证NapCat可用性NapCat近期启动与安装方式将将大幅变动请关注文档和社群获取。
2. 在Core上完全执行开源请不要用于违法用途如此可能造成NapCat完全停止更新。
3. 针对原启动方式的围堵NapCat研发了多种方式除此其余理论与扩展的分析和思路将部分展示于Docs以便各位参与开发与维护NapCat。
## 其余·备注
启动方式: WayBoot.03 Electron Main进程为Node 直接注入代码 同理项目: LiteLoader
## 修复与优化
1. 移除数据库文件读写 ~ 优化性能
2. 重构消息发送 极限速度优化 ~ 优化性能
3. WebUi配置热重载优化 ~ 修复问题
4. 修复偶现崩溃问题 ~ 修复问题
## 新增与调整
1. 最后发言时间重构 入群时间失效 ~ 替换功能
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -0,0 +1,11 @@
# v1.6.1
QQ Version: Windows 9.9.11-24815 / Linux 3.2.9-24815
## 修复与优化
## 新增与调整
* 修复poke异常事件
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -0,0 +1,13 @@
# v1.6.2
QQ Version: Windows 9.9.11-24815 / Linux 3.2.9-24815
## 修复与优化
* 修复获取Cookies异常崩溃问题
* 尝试修复成员退群缓存问题
* 修复自身退群后群缓存清理问题
## 新增与调整
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -0,0 +1,13 @@
# v1.6.3
QQ Version: Windows 9.9.11-24815 / Linux 3.2.9-24815
## 修复与优化
* 修复带有groupid的私聊消息异常发送到群聊消息
* 尝试修复rws热重载失效问题
* 尝试修复进群事件无法正常获取uin
## 新增与调整
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -0,0 +1,18 @@
# v1.6.4
QQ Version: Windows 9.9.12-26000 / Linux 3.2.9-26000
## 使用前警告
1. 在最近版本由于QQ本体大幅变动为了保证NapCat可用性NapCat近期启动与安装方式将将大幅变动请关注文档和社群获取。
2. 在Core上完全执行开源请不要用于违法用途如此可能造成NapCat完全停止更新。
3. 针对原启动方式的围堵NapCat研发了多种方式除此其余理论与扩展的分析和思路将部分展示于Docs以便各位参与开发与维护NapCat。
## 其余·备注
启动方式: WayBoot.03 Electron Main进程为Node 直接注入代码 同理项目: LiteLoader
## 修复与优化
1. 支持Win平台 9.9.12
2. 修复部分发送图片下载异常情况
## 新增与调整
没有哦
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -0,0 +1,18 @@
# v1.6.5
QQ Version: Windows 9.9.12-26000 / Linux 3.2.9-26000
## 使用前警告
1. 在最近版本由于QQ本体大幅变动为了保证NapCat可用性NapCat近期启动与安装方式将将大幅变动请关注文档和社群获取。
2. 在Core上完全执行开源请不要用于违法用途如此可能造成NapCat完全停止更新。
3. 针对原启动方式的围堵NapCat研发了多种方式除此其余理论与扩展的分析和思路将部分展示于Docs以便各位参与开发与维护NapCat。
## 其余·备注
启动方式: WayBoot.03 Electron Main进程为Node 直接注入代码 同理项目: LiteLoader
## 修复与优化
1. 优化了WrapperNative载入代码
2. 优化缓存
## 新增与调整
没有哦
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -0,0 +1,17 @@
# v1.6.6
QQ Version: Windows 9.9.12-26000 / Linux 3.2.9-26000
## 使用前警告
1. 在最近版本由于QQ本体大幅变动为了保证NapCat可用性NapCat近期启动与安装方式将将大幅变动请关注文档和社群获取。
2. 在Core上完全执行开源请不要用于违法用途如此可能造成NapCat完全停止更新。
3. 针对原启动方式的围堵NapCat研发了多种方式除此其余理论与扩展的分析和思路将部分展示于Docs以便各位参与开发与维护NapCat。
## 其余·备注
启动方式: WayBoot.03 Electron Main进程为Node 直接注入代码 同理项目: LiteLoader
## 修复与优化
1. 修复了一些问题
## 新增与调整
没有哦
新增的 API 详细见[API文档](https://napneko.github.io/zh-CN/develop/extends_api)

View File

@@ -1,2 +0,0 @@
# 开始
jadx 跳转于 `com.tencent.qqnt.kernel.*`

View File

@@ -1,42 +0,0 @@
# Android
```java
GroupMemberExtReq groupMemberExtReq = new GroupMemberExtReq();
groupMemberExtReq.sourceType = MemberExtSourceType.TITLETYPE.ordinal();
groupMemberExtReq.groupCode = longOrNull.longValue();
groupMemberExtReq.beginUin = "0";
groupMemberExtReq.dataTime = "0";
Long[] lArr = new Long[1];
AppInterface a2 = dVar.a();
lArr[0] = Long.valueOf(a2 != null ? a2.getLongAccountUin() : 0L);
arrayListOf = CollectionsKt__CollectionsKt.arrayListOf(lArr);
groupMemberExtReq.uinList = arrayListOf;
MemberExtInfoFilter memberExtInfoFilter = new MemberExtInfoFilter();
memberExtInfoFilter.memberLevelInfoUin = 1;
memberExtInfoFilter.memberLevelInfoPoint = 1;
memberExtInfoFilter.memberLevelInfoActiveDay = 1;
memberExtInfoFilter.memberLevelInfoLevel = 1;
memberExtInfoFilter.levelName = 1;
memberExtInfoFilter.dataTime = 1;
memberExtInfoFilter.sysShowFlag = 1;
memberExtInfoFilter.userShowFlag = 1;
memberExtInfoFilter.userShowFlagNew = 1;
memberExtInfoFilter.levelNameNew = 1;
Unit unit = Unit.INSTANCE;
groupMemberExtReq.memberExtFilter = memberExtInfoFilter;
troopLevelFrequencyControl.f(troopUin, new TroopListRepo$fetchTroopLevelInfo$2(b2, groupMemberExtReq, troopUin, new com.tencent.qqnt.troopmemberlist.report.c("fetchTroopLevelInfo")));
```
# Win
参数解析位于 sub_181456A10(24108) -> wrapper.node(24108)+1456A10
IGroupService.GetMemberExt(param: object);
param展开如下
```
groupCode string
beginUin string
dataTime string
uinList Array<string>
uinNum string
groupType string
richCardNameVer string
sourceType number
memberExtFilter object// 参数解析位于 sub_18145A6D0(24108) -> wrapper.node(24108)+145A6D0
```

View File

@@ -1,3 +1,4 @@
public static final int C2C_PIC_DOWNLOAD = 1004;
public static final String C2C_PIC_DOWNLOAD_DOMAIN = "c2cpicdw.qpic.cn";
public static final String C2C_PIC_DOWNLOAD_QUIC_DOMAIN = "c2cpicdw.quic.qpic.cn";

View File

@@ -0,0 +1,16 @@
# 开发方向
方向一 NativeCall/Hook:
1. 崩溃检测机制的实现
2. Api_Caller 的Hook 可以拿到Event/Handler 进一步提升NC 即时的拦截与处理一些事件比如ReCall拦截
3. Node包装层 进一步分析拿到脱离自带Listener/Adapter可以拿到一些更加底层的数据变动 或许包括更多二进制数据
方向二 全新的无头启动 Way01
1. 基于Node启动原理借助导出符号获取函数地址 再次还原NodeMain
方向三 发包与收包
1. 参考 方向一/3 大概可以收包
2. 发包 (暂时没有计划)
方向四 版本控制
1. 根据不同版本进行逻辑控制
2. 某些参数的自动提取

View File

@@ -1,24 +0,0 @@
# 前排提示
由于Core未处于开源非组织人员无法参与Core开发此处为Core开发提示
# 准备工具
frida ida-pro jadx x64dbg ce 内部调试脚本
## ida-pro
1. 用于快速分析入参和返回类型
2. 通过静态QLog推测语义
3. 提取Listener与Service (常用)
## frida
1. 用于动态获取QLog推测语义
2. 捕捉Native函数 实际入参与数据 分析中间流程
## jadx
1. 通过其它平台实现 静态获取QLog推测语义
2. 提供部分未调用代码 参考
## x64dbg
1. 验证IDA的Hook点
## 内部脚本
1. 提取Listener与Service (不调用无类型 不推荐)
2. 获取NT调用流程

View File

@@ -0,0 +1,8 @@
# Api方向
## getMsgUniqueId √ 已应用
getMsgUniqueId 传入时间 产出一个唯一ID 发送消息作为一个参数
# Native方向
## magic_load
## api_caller
## NodeMain

View File

@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "1.6.0",
"version": "1.6.8",
"scripts": {
"watch:dev": "vite --mode development",
"watch:prod": "vite --mode production",
@@ -19,10 +19,9 @@
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"vite-plugin-babel": "^1.2.0",
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-proposal-decorators": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@log4js-node/log4js-api": "^1.0.2",
"@protobuf-ts/plugin": "^2.9.4",
"@rollup/plugin-node-resolve": "^15.2.3",
@@ -31,9 +30,9 @@
"@types/express": "^4.17.21",
"@types/figlet": "^1.5.8",
"@types/fluent-ffmpeg": "^2.1.24",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.30",
"@types/qrcode-terminal": "^0.12.2",
"@types/uuid": "^9.0.8",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
@@ -47,6 +46,7 @@
"rollup-plugin-obfuscator": "^1.1.0",
"typescript": "^5.3.3",
"vite": "^5.2.6",
"vite-plugin-babel": "^1.2.0",
"vite-plugin-cp": "^4.0.8",
"vite-plugin-dts": "^3.8.2",
"vite-tsconfig-paths": "^4.3.2"
@@ -64,9 +64,7 @@
"json-schema-to-ts": "^3.1.0",
"log4js": "^6.9.1",
"qrcode-terminal": "^0.12.0",
"silk-wasm": "^3.3.4",
"sqlite3": "^5.1.7",
"uuid": "^10.0.0",
"silk-wasm": "^3.6.1",
"ws": "^8.16.0"
}
}

45
script/BootWay.03.ps1 Normal file
View File

@@ -0,0 +1,45 @@
# Dont Use This Script
# 2024.7.3
function Get-QQpath {
try {
$key = Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ"
$uninstallString = $key.UninstallString
return [System.IO.Path]::GetDirectoryName($uninstallString) + "\QQ.exe"
}
catch {
throw "get QQ path error: $_"
}
}
function Select-QQPath {
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
$dialogTitle = "Select QQ.exe"
$filePicker = New-Object System.Windows.Forms.OpenFileDialog
$filePicker.Title = $dialogTitle
$filePicker.Filter = "Executable Files (*.exe)|*.exe|All Files (*.*)|*.*"
$filePicker.FilterIndex = 1
$null = $filePicker.ShowDialog()
if (-not ($filePicker.FileName)) {
throw "User did not select an .exe file."
}
return $filePicker.FileName
}
$params = $args -join " "
Try {
$QQpath = Get-QQpath
}
Catch {
$QQpath = Select-QQPath
}
if (!(Test-Path $QQpath)) {
throw "provided QQ path is invalid: $QQpath"
}
$Bootfile = Join-Path $PSScriptRoot "napcat.mjs"
$env:ELECTRON_RUN_AS_NODE = 1
$commandInfo = Get-Command $QQpath -ErrorAction Stop
Start-Process powershell -ArgumentList "-noexit", "-noprofile", "-command &{& chcp 65001;& '$($commandInfo.Path)' --enable-logging $params}"

28
script/NapCat.164.bat Normal file
View File

@@ -0,0 +1,28 @@
@echo off
chcp 65001
:: 检查是否有管理员权限
net session >nul 2>&1
if %errorlevel% neq 0 (
echo 请求管理员权限...
powershell -Command "Start-Process '%~f0' -Verb runAs"
exit /b
)
:: 如果有管理员权限,继续执行
setlocal enabledelayedexpansion
:loop_read
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
set "RetString=%%b"
goto :napcat_boot
)
:napcat_boot
for %%a in ("!RetString!") do (
set "pathWithoutUninstall=%%~dpa"
)
set "QQPath=!pathWithoutUninstall!QQ.exe"
echo !QQPath!
"!QQPath!" --enable-logging %*
pause

3
script/NapCat.Way01.bat Normal file
View File

@@ -0,0 +1,3 @@
REM 全新启动脚本 基于 Hook Native 预计版本1.6.0左右发布
@echo off
pause

20
script/index.js Normal file
View File

@@ -0,0 +1,20 @@
// --------------------
// 2024.7.3 9.9.12 BootWay.03 其余方法暂不公开(此方案为临时方案 Win平台已验证
// 缺陷 (已知)
// 1.与非入侵式不同 现在破坏本体代码
// 2.重启代码与正常启动代码失效
// 3.Win需要补丁
// 4.更新后丢失内容 需要重写此文件
// 5.安装难度上升与周围基础设施失效
// --------------------
const path = require('path');
const CurrentPath = path.dirname(__filename)
const hasNapcatParam = process.argv.includes('--enable-logging');
if (hasNapcatParam) {
(async () => {
await import("file://" + path.join(CurrentPath, './napcat/napcat.mjs'));
})();
} else {
require('./launcher.node').load('external_index', module);
}

View File

@@ -0,0 +1,18 @@
@echo off
setlocal enabledelayedexpansion
chcp 65001
:loop_read
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
set "RetString=%%b"
goto :napcat_boot
)
:napcat_boot
for %%a in ("!RetString!") do (
set "pathWithoutUninstall=%%~dpa"
)
set "QQPath=!pathWithoutUninstall!"
cd /d !QQPath!
echo !QQPath!
QQ.exe --enable-logging %*

View File

@@ -0,0 +1,41 @@
function Get-QQpath {
try {
$key = Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ"
$uninstallString = $key.UninstallString
return [System.IO.Path]::GetDirectoryName($uninstallString) + "\"
}
catch {
throw "get QQ path error: $_"
}
}
function Select-QQPath {
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
$dialogTitle = "Select QQ.exe"
$filePicker = New-Object System.Windows.Forms.OpenFileDialog
$filePicker.Title = $dialogTitle
$filePicker.Filter = "Executable Files (*.exe)|*.exe|All Files (*.*)|*.*"
$filePicker.FilterIndex = 1
$null = $filePicker.ShowDialog()
if (-not ($filePicker.FileName)) {
throw "User did not select an .exe file."
}
return $filePicker.FileName
}
$params = $args -join " "
Try {
$QQpath = Get-QQpath
}
Catch {
$QQpath = Select-QQPath
}
if (!(Test-Path $QQpath)) {
throw "provided QQ path is invalid: $QQpath"
}
Set-Location -Path $QQpath
Start-Process powershell -ArgumentList "-noexit", "-noprofile", "-command &{& chcp 65001;& ./QQ.exe --enable-logging $params}"

17
script/napcat-9912.bat Normal file
View File

@@ -0,0 +1,17 @@
@echo off
setlocal enabledelayedexpansion
:loop_read
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
set "RetString=%%b"
goto :napcat_boot
)
:napcat_boot
for %%a in ("!RetString!") do (
set "pathWithoutUninstall=%%~dpa"
)
set QQPath=!pathWithoutUninstall!
cd /d !QQPath!
echo !QQPath!
QQ.exe --enable-logging %*

41
script/napcat-9912.ps1 Normal file
View File

@@ -0,0 +1,41 @@
function Get-QQpath {
try {
$key = Get-ItemProperty -Path "HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ"
$uninstallString = $key.UninstallString
return [System.IO.Path]::GetDirectoryName($uninstallString) + "\"
}
catch {
throw "get QQ path error: $_"
}
}
function Select-QQPath {
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Application]::EnableVisualStyles()
$dialogTitle = "Select QQ.exe"
$filePicker = New-Object System.Windows.Forms.OpenFileDialog
$filePicker.Title = $dialogTitle
$filePicker.Filter = "Executable Files (*.exe)|*.exe|All Files (*.*)|*.*"
$filePicker.FilterIndex = 1
$null = $filePicker.ShowDialog()
if (-not ($filePicker.FileName)) {
throw "User did not select an .exe file."
}
return $filePicker.FileName
}
$params = $args -join " "
Try {
$QQpath = Get-QQpath
}
Catch {
$QQpath = Select-QQPath
}
if (!(Test-Path $QQpath)) {
throw "provided QQ path is invalid: $QQpath"
}
Set-Location -Path $QQpath
Start-Process powershell -ArgumentList "-noexit", "-noprofile", "-command &{& ./QQ.exe --enable-logging $params}"

View File

@@ -9,7 +9,15 @@ type RegisterHandler = (res: Response, payload: any) => Promise<any>
export abstract class HttpServerBase {
name: string = 'NapCatQQ';
private readonly expressAPP: Express;
private server: http.Server | null = null;
private _server: http.Server | null = null;
public get server(): http.Server | null {
return this._server;
}
private set server(value: http.Server | null) {
this._server = value;
}
constructor() {
this.expressAPP = express();

View File

@@ -1,4 +1,5 @@
import { WebSocket, WebSocketServer } from 'ws';
import http from 'http';
import urlParse from 'url';
import { IncomingMessage } from 'node:http';
import { log } from '@/common/utils/log';
@@ -27,17 +28,36 @@ export class WebsocketServerBase {
constructor() {
}
start(port: number, host: string = '') {
try {
this.ws = new WebSocketServer({
port,
host: '',
maxPayload: 1024 * 1024 * 1024
}).on('error', () => {
});
log(`ws服务启动成功, ${host}:${port}`);
} catch (e: any) {
throw Error('ws服务启动失败, 请检查监听的ip和端口' + e.toString());
start(port: number | http.Server, host: string = '') {
if (port instanceof http.Server) {
try {
const wss = new WebSocketServer({
noServer: true,
maxPayload: 1024 * 1024 * 1024
}).on('error', () => {
});
this.ws = wss;
port.on('upgrade', function upgrade(request, socket, head) {
wss.handleUpgrade(request, socket, head, function done(ws) {
wss.emit('connection', ws, request);
});
});
log(`ws服务启动成功, 绑定到HTTP服务`);
} catch (e: any) {
throw Error('ws服务启动失败, 可能是绑定的HTTP服务异常' + e.toString());
}
} else {
try {
this.ws = new WebSocketServer({
port,
host: '',
maxPayload: 1024 * 1024 * 1024
}).on('error', () => {
});
log(`ws服务启动成功, ${host}:${port}`);
} catch (e: any) {
throw Error('ws服务启动失败, 请检查监听的ip和端口' + e.toString());
}
}
this.ws.on('connection', (wsClient, req) => {
const url: string = req.url!.split('?').shift() || '/';
@@ -50,10 +70,12 @@ export class WebsocketServerBase {
}
stop() {
this.ws && this.ws.close((err) => {
log('ws server close failed!', err);
});
this.ws = null;
if (this.ws) {
this.ws.close((err) => {
if (err) log('ws server close failed!', err);
});
this.ws = null;
}
}
restart(port: number) {

View File

@@ -1,36 +0,0 @@
import { sleep } from '@/common/utils/helper';
import { logError } from './log';
type AsyncQueueTask = (() => void) | (()=>Promise<void>);
export class AsyncQueue {
private tasks: (AsyncQueueTask)[] = [];
public addTask(task: AsyncQueueTask) {
this.tasks.push(task);
// console.log('addTask', this.tasks.length);
if (this.tasks.length === 1) {
this.runQueue().then().catch(()=>{});
}
}
private async runQueue() {
// console.log('runQueue', this.tasks.length);
while (this.tasks.length > 0) {
const task = this.tasks[0];
// console.log('typeof task', typeof task);
try {
const taskRet = task();
// console.log('type of taskRet', typeof taskRet, taskRet);
if (taskRet instanceof Promise) {
await taskRet;
}
} catch (e) {
// console.error(e);
logError(e);
}
this.tasks.shift();
await sleep(100);
}
}
}

View File

@@ -3,6 +3,7 @@ import fs from 'node:fs';
import { log, logDebug, logError } from '@/common/utils/log';
import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { selfInfo } from '@/core/data';
const __filename = fileURLToPath(import.meta.url);
@@ -12,8 +13,9 @@ const configDir = path.resolve(__dirname, 'config');
fs.mkdirSync(configDir, { recursive: true });
export class ConfigBase<T>{
export class ConfigBase<T> {
public name: string = 'default_config'
private pathName: string | null = null // 本次读取的文件路径
constructor() {
}
@@ -22,19 +24,28 @@ export class ConfigBase<T>{
return null;
}
getConfigDir(){
getConfigDir() {
const configDir = path.resolve(__dirname, 'config');
fs.mkdirSync(configDir, { recursive: true });
return configDir;
}
getConfigPath(): string {
throw new Error('Method not implemented.');
getConfigPath(pathName: string | null): string {
const suffix = pathName ? `_${pathName}` : ''
const filename = `${this.name}${suffix}.json`
return path.join(this.getConfigDir(), filename);
}
read() {
const configPath = this.getConfigPath();
// 尝试加载当前账号配置
if (this.read_from_file(selfInfo.uin, false)) return this
// 尝试加载默认配置
return this.read_from_file('', true)
}
read_from_file(pathName: string, createIfNotExist: boolean) {
const configPath = this.getConfigPath(pathName);
if (!fs.existsSync(configPath)) {
try{
if (!createIfNotExist) return null
this.pathName = pathName // 记录有效的设置文件
try {
fs.writeFileSync(configPath, JSON.stringify(this, this.getKeys(), 2));
log(`配置文件${configPath}已创建\n如果修改此文件后需要重启 NapCat 生效`);
}
@@ -43,6 +54,7 @@ export class ConfigBase<T>{
}
return this;
}
try {
const data = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
logDebug(`配置文件${configPath}已加载`, data);
@@ -61,9 +73,13 @@ export class ConfigBase<T>{
}
}
save(config: T) {
save(config: T, overwrite: boolean = false) {
Object.assign(this, config);
const configPath = this.getConfigPath();
if (overwrite) {
// 用户要求强制写入,则变更当前文件为目标文件
this.pathName = `${selfInfo.uin}`
}
const configPath = this.getConfigPath(this.pathName);
try {
fs.writeFileSync(configPath, JSON.stringify(this, this.getKeys(), 2));
} catch (e: any) {

View File

@@ -1,4 +1,3 @@
import { NodeIKernelMsgListener } from '@/core';
import { NodeIQQNTWrapperSession } from '@/core/wrapper';
import { randomUUID } from 'crypto';
@@ -6,6 +5,7 @@ interface Internal_MapKey {
timeout: number,
createtime: number,
func: (...arg: any[]) => any,
checker: ((...args: any[]) => boolean) | undefined,
}
export class ListenerClassBase {
@@ -84,17 +84,19 @@ export class NTEventWrapper {
}
//统一回调清理事件
async DispatcherListener(ListenerMainName: string, ListenerSubName: string, ...args: any[]) {
//console.log(ListenerMainName, this.EventTask.get(ListenerMainName), ListenerSubName, this.EventTask.get(ListenerMainName)?.get(ListenerSubName));
//console.log(ListenerMainName, ListenerSubName, ...args,this.EventTask.get(ListenerMainName)?.get(ListenerSubName));
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.forEach((task, uuid) => {
//console.log(task.func, uuid, task.createtime, task.timeout);
if (task.createtime + task.timeout < Date.now()) {
this.EventTask.get(ListenerMainName)?.get(ListenerSubName)?.delete(uuid);
return;
}
task.func(...args);
if (task.checker && task.checker(...args)) {
task.func(...args);
}
});
}
async CallNoListenerEvent<EventType extends (...args: any[]) => Promise<any>,>(EventName = '', timeout: number = 3000, ...args: Parameters<EventType>) {
async CallNoListenerEvent<EventType extends (...args: any[]) => Promise<any>>(EventName = '', timeout: number = 3000, ...args: Parameters<EventType>) {
return new Promise<Awaited<ReturnType<EventType>>>(async (resolve, reject) => {
const EventFunc = this.CreatEventFunction<EventType>(EventName);
let complete = false;
@@ -108,14 +110,15 @@ export class NTEventWrapper {
resolve(retData);
});
}
async CallNormalEvent<EventType extends (...args: any[]) => Promise<any>, ListenerType extends (...args: any[]) => void>(EventName = '', ListenerName = '', waitTimes = 1, timeout: number = 3000, ...args: Parameters<EventType>) {
async CallNormalEvent<EventType extends (...args: any[]) => Promise<any>, ListenerType extends (...args: any[]) => void>
(EventName = '', ListenerName = '', waitTimes = 1, timeout: number = 3000, checker: (...args: Parameters<ListenerType>) => boolean, ...args: Parameters<EventType>) {
return new Promise<[EventRet: Awaited<ReturnType<EventType>>, ...Parameters<ListenerType>]>(async (resolve, reject) => {
const id = randomUUID();
let complete = 0;
let retData: Parameters<ListenerType> | undefined = undefined;
let retEvent: any = {};
const databack = () => {
if (complete < waitTimes) {
if (complete == 0) {
reject(new Error('NTEvent EventName:' + EventName + ' ListenerName:' + ListenerName + ' timeout'));
} else {
resolve([retEvent as Awaited<ReturnType<EventType>>, ...retData!]);
@@ -129,6 +132,7 @@ export class NTEventWrapper {
const eventCallbak = {
timeout: timeout,
createtime: Date.now(),
checker: checker,
func: (...args: any[]) => {
complete++;
//console.log('func', ...args);

View File

@@ -1,145 +0,0 @@
import { logError, logDebug } from '@/common/utils/log';
type group_id = number;
type user_id = number;
class cacheNode<T> {
value: T;
groupId: group_id;
userId: user_id;
prev: cacheNode<T> | null;
next: cacheNode<T> | null;
timestamp: number;
constructor(groupId: group_id, userId: user_id, value: T) {
this.groupId = groupId;
this.userId = userId;
this.value = value;
this.prev = null;
this.next = null;
this.timestamp = Date.now();
}
}
type cache<T> = { [key: group_id]: { [key: user_id]: cacheNode<T> } };
class LRU<T> {
private maxAge: number;
private maxSize: number;
private currentSize: number;
private cache: cache<T>;
private head: cacheNode<T> | null = null;
private tail: cacheNode<T> | null = null;
private onFuncs: ((node: cacheNode<T>) => void)[] = [];
constructor(maxAge: number = 2e4, maxSize: number = 5e3) {
this.maxAge = maxAge;
this.maxSize = maxSize;
this.cache = Object.create(null);
this.currentSize = 0;
if (maxSize == 0) return;
setInterval(() => this.removeExpired(), this.maxAge);
}
// 移除LRU节点
private removeLRUNode(node: cacheNode<T>) {
logDebug(
'removeLRUNode',
node.groupId,
node.userId,
node.value,
this.currentSize
);
node.prev = node.next = null;
delete this.cache[node.groupId][node.userId];
this.removeNode(node);
this.onFuncs.forEach((func) => func(node));
this.currentSize--;
}
public on(func: (node: cacheNode<T>) => void) {
this.onFuncs.push(func);
}
private removeExpired() {
const now = Date.now();
let current = this.tail;
const nodesToRemove: cacheNode<T>[] = [];
let removedCount = 0;
// 收集需要删除的节点
while (current && now - current.timestamp > this.maxAge) {
nodesToRemove.push(current);
current = current.prev;
removedCount++;
if (removedCount >= 100) break;
}
// 更新链表指向
if (nodesToRemove.length > 0) {
const newTail = nodesToRemove[nodesToRemove.length - 1].prev;
if (newTail) {
newTail.next = null;
} else {
this.head = null;
}
this.tail = newTail;
}
nodesToRemove.forEach((node) => {
node.prev = node.next = null;
delete this.cache[node.groupId][node.userId];
this.currentSize--;
this.onFuncs.forEach((func) => func(node));
});
}
private addNode(node: cacheNode<T>) {
node.next = this.head;
if (this.head) this.head.prev = node;
if (!this.tail) this.tail = node;
this.head = node;
}
private removeNode(node: cacheNode<T>) {
if (node.prev) node.prev.next = node.next;
if (node.next) node.next.prev = node.prev;
if (node === this.head) this.head = node.next;
if (node === this.tail) this.tail = node.prev;
}
private moveToHead(node: cacheNode<T>) {
if (this.head === node) return;
this.removeNode(node);
this.addNode(node);
node.prev = null;
}
public set(groupId: group_id, userId: user_id, value: T) {
if (!this.cache[groupId]) {
this.cache[groupId] = Object.create(null);
}
const groupObject = this.cache[groupId];
if (groupObject[userId]) {
const node = groupObject[userId];
node.value = value;
node.timestamp = Date.now();
this.moveToHead(node);
} else {
const node = new cacheNode(groupId, userId, value);
groupObject[userId] = node;
this.currentSize++;
this.addNode(node);
if (this.currentSize > this.maxSize) {
const tail = this.tail!;
this.removeLRUNode(tail);
}
}
}
}
export default LRU;

View File

@@ -1,53 +1,116 @@
import crypto from 'crypto';
import { Peer } from '@/core';
import crypto, { randomInt, randomUUID } from 'crypto';
import { logError } from './log';
class LimitedHashTable<K, V> {
private keyToValue: Map<K, V> = new Map();
private valueToKey: Map<V, K> = new Map();
private maxSize: number;
private KeyQueneList: K[] = [];
private ValueQueneList: V[] = [];
constructor(maxSize: number) {
this.maxSize = maxSize;
}
set(key: K, value: V): void {
this.keyToValue.set(key, value);
this.valueToKey.set(value, key);
if (this.KeyQueneList.length >= this.maxSize || this.ValueQueneList.length >= this.maxSize) {
this.KeyQueneList.shift();
this.ValueQueneList.shift();
}
}
private keyToValue: Map<K, V> = new Map();
private valueToKey: Map<V, K> = new Map();
private maxSize: number;
getValue(key: K): V | undefined {
return this.keyToValue.get(key);
}
constructor(maxSize: number) {
this.maxSize = maxSize;
}
resize(count: number) {
this.maxSize = count;
}
getKey(value: V): K | undefined {
return this.valueToKey.get(value);
set(key: K, value: V): void {
const isExist = this.keyToValue.get(key);
if (isExist && isExist === value) {
return;
}
this.keyToValue.set(key, value);
this.valueToKey.set(value, key);
while (this.keyToValue.size !== this.valueToKey.size) {
console.log('keyToValue.size !== valueToKey.size Error Atom');
this.keyToValue.clear();
this.valueToKey.clear();
}
// console.log('---------------');
// console.log(this.keyToValue);
// console.log(this.valueToKey);
// console.log('---------------');
while (this.keyToValue.size > this.maxSize || this.valueToKey.size > this.maxSize) {
//console.log(this.keyToValue.size > this.maxSize, this.valueToKey.size > this.maxSize);
const oldestKey = this.keyToValue.keys().next().value;
this.valueToKey.delete(this.keyToValue.get(oldestKey)!);
this.keyToValue.delete(oldestKey);
}
}
delete(key: K): void {
const value = this.keyToValue.get(key);
if (value !== undefined) {
this.keyToValue.delete(key);
this.valueToKey.delete(value);
}
getValue(key: K): V | undefined {
return this.keyToValue.get(key);
}
getKey(value: V): K | undefined {
return this.valueToKey.get(value);
}
deleteByValue(value: V): void {
const key = this.valueToKey.get(value);
if (key !== undefined) {
this.keyToValue.delete(key);
this.valueToKey.delete(value);
}
}
deleteByKey(key: K): void {
const value = this.keyToValue.get(key);
if (value !== undefined) {
this.keyToValue.delete(key);
this.valueToKey.delete(value);
}
}
}
class MessageUniqueWrapper {
private msgIdMap: LimitedHashTable<number, string> = new LimitedHashTable(1000);
createMsg(MsgId: string) {
let ShortId = parseInt(crypto.createHash('sha1').update('2345').digest('hex').slice(0, 8), 16);
this.msgIdMap.set(ShortId, MsgId);
return ShortId;
private msgDataMap: LimitedHashTable<string, number>;
private msgIdMap: LimitedHashTable<string, number>;
constructor(maxMap: number = 1000) {
this.msgIdMap = new LimitedHashTable<string, number>(maxMap);
this.msgDataMap = new LimitedHashTable<string, number>(maxMap);
}
createMsg(peer: Peer, msgId: string): number | undefined {
const key = `${msgId}|${peer.chatType}|${peer.peerUid}`;
const hash = crypto.createHash('sha1').update(key);
const shortId = parseInt(hash.digest('hex').slice(0, 8), 16);
const isExist = this.msgIdMap.getKey(shortId);
//console.log(`${peer.peerUid} ${msgId} ------- ${shortId}`);
if (isExist && isExist === msgId) {
return shortId;
}
getMsgIdByShortId(ShortId: number) {
return this.msgIdMap.getValue(ShortId);
}
getShortIdByMsgId(MsgId: string) {
return this.msgIdMap.getKey(MsgId);
this.msgIdMap.set(msgId, shortId);
this.msgDataMap.set(key, shortId);
return shortId;
}
getMsgIdAndPeerByShortId(shortId: number): { MsgId: string; Peer: Peer } | undefined {
const data = this.msgDataMap.getKey(shortId);
if (data) {
const [msgId, chatTypeStr, peerUid] = data.split('|');
const peer: Peer = {
chatType: parseInt(chatTypeStr),
peerUid,
guildId: '',
};
return { MsgId: msgId, Peer: peer };
}
return undefined;
}
getShortIdByMsgId(msgId: string): number | undefined {
return this.msgIdMap.getValue(msgId);
}
getPeerByMsgId(msgId: string) {
const shortId = this.msgIdMap.getValue(msgId);
if (!shortId) return undefined;
return this.getMsgIdAndPeerByShortId(shortId);
}
resize(maxSize: number): void {
this.msgIdMap.resize(maxSize);
this.msgDataMap.resize(maxSize);
}
}
export const MessageUnique = new MessageUniqueWrapper();
export const MessageUnique: MessageUniqueWrapper = new MessageUniqueWrapper();

View File

@@ -1,14 +1,14 @@
// 方案一 MiniApp发包方案
// 前置条件: 处于GUI环境 存在MiniApp
import { NTQQSystemApi } from "@/core";
import { NTQQSystemApi } from '@/core';
// 前排提示: 开发验证仅Win平台开展
export class MiniAppUtil {
static async RunMiniAppWithGUI() {
//process.env.ELECTRON_RUN_AS_NODE = undefined;//没用还是得自己用cpp之类的语言写个程序转发参数
return NTQQSystemApi.BootMiniApp(process.execPath, "miniapp://open/1007?url=https%3A%2F%2Fm.q.qq.com%2Fa%2Fs%2Fedd0a83d3b8afe233dfa07adaaf8033f%3Fscene%3D1007%26min_refer%3D10001");
}
static async RunMiniAppWithGUI() {
//process.env.ELECTRON_RUN_AS_NODE = undefined;//没用还是得自己用cpp之类的语言写个程序转发参数
return NTQQSystemApi.BootMiniApp(process.execPath, 'miniapp://open/1007?url=https%3A%2F%2Fm.q.qq.com%2Fa%2Fs%2Fedd0a83d3b8afe233dfa07adaaf8033f%3Fscene%3D1007%26min_refer%3D10001');
}
}
// 方案二 MiniApp发包方案 替代MiniApp方案
// 前置条件: 无

View File

@@ -38,11 +38,11 @@ type QQVersionConfigInfo = {
}
let _qqVersionConfigInfo: QQVersionConfigInfo = {
'baseVersion': '9.9.11-24568',
'curVersion': '9.9.11-24568',
'baseVersion': '9.9.12-25765',
'curVersion': '9.9.12-25765',
'prevVersion': '',
'onErrorVersions': [],
'buildId': '24568'
'buildId': '25765'
};
if (fs.existsSync(configVersionInfoPath)) {
@@ -55,23 +55,23 @@ if (fs.existsSync(configVersionInfoPath)) {
}
export const qqVersionConfigInfo: QQVersionConfigInfo = _qqVersionConfigInfo;
//V1_WIN_NQ_9.9.11_24568_GW_B
//V1_WIN_NQ_9.9.12_25765_GW_B
export const qqPkgInfo: QQPkgInfo = JSON.parse(fs.readFileSync(pkgInfoPath).toString());
// platform_type: 3,
// app_type: 4,
// app_version: '9.9.9-23159',
// qua: 'V1_WIN_NQ_9.9.9_23159_GW_B',
// appid: '537213764',
// app_version: '9.9.12-25765',
// qua: 'V1_WIN_NQ_9.9.12_25765_GW_B',
// appid: '537234702',
// platVer: '10.0.26100',
// clientVer: '9.9.9-23159',
// clientVer: '9.9.9-25765',
// Linux
// app_version: '3.2.9-24568',
// qua: 'V1_LNX_NQ_3.2.9_24568_GW_B',
// app_version: '3.2.9-25765',
// qua: 'V1_LNX_NQ_3.2.10_25765_GW_B',
let _appid: string = '537226369'; // 默认为 Windows 平台的 appid
let _appid: string = '537234702'; // 默认为 Windows 平台的 appid
if (systemPlatform === 'linux') {
_appid = '537226441';
_appid = '537234773';
}
// todo: mac 平台的 appid
export const appid = _appid;
export const appid = _appid;

View File

@@ -1,9 +1,9 @@
import fs from 'fs';
import { encode, getDuration, getWavFileInfo, isWav } from 'silk-wasm';
import { encode, getDuration, getWavFileInfo, isWav, isSilk } from 'silk-wasm';
import fsPromise from 'fs/promises';
import { log, logError } from './log';
import path from 'node:path';
import { v4 as uuidv4 } from 'uuid';
import { randomUUID } from 'crypto';
import { spawn } from 'node:child_process';
import { getTempDir } from '@/common/utils/file';
@@ -63,10 +63,11 @@ export async function encodeSilk(filePath: string) {
// }
try {
const pttPath = path.join(TEMP_DIR, uuidv4());
if (getFileHeader(filePath) !== '02232153494c4b') {
const file = await fsPromise.readFile(filePath);
const pttPath = path.join(TEMP_DIR, randomUUID());
if (!isSilk(file)) {
log(`语音文件${filePath}需要转换成silk`);
const _isWav = await isWavFile(filePath);
const _isWav = isWav(file);
const pcmPath = pttPath + '.pcm';
let sampleRate = 0;
const convert = () => {
@@ -96,7 +97,7 @@ export async function encodeSilk(filePath: string) {
if (!_isWav) {
input = await convert();
} else {
input = fs.readFileSync(filePath);
input = file;
const allowSampleRate = [8000, 12000, 16000, 24000, 32000, 44100, 48000];
const { fmt } = getWavFileInfo(input);
// log(`wav文件信息`, fmt)
@@ -113,7 +114,7 @@ export async function encodeSilk(filePath: string) {
duration: silk.duration / 1000
};
} else {
const silk = fs.readFileSync(filePath);
const silk = file;
let duration = 0;
try {
duration = getDuration(silk) / 1000;

View File

@@ -1,449 +0,0 @@
import { ElementType, FileElement, PicElement, PttElement, RawMessage, VideoElement } from '../../core/src/entities';
import sqlite3 from 'sqlite3';
import { log, logDebug, logError } from '@/common/utils/log';
import { NTQQMsgApi } from '@/core';
import LRU from '@/common/utils/LRUCache';
export interface IRember {
last_sent_time: number;
join_time: number;
user_id: number;
}
type DBMsg = {
id: number,
shortId: number,
longId: string,
seq: number,
peerUid: string,
chatType: number,
}
type DBFile = {
name: string; // 文件名
path: string;
url: string;
size: number;
uuid: string;
msgId: string;
elementId: string;
element: PicElement | VideoElement | FileElement | PttElement;
elementType: ElementType.PIC | ElementType.VIDEO | ElementType.FILE | ElementType.PTT;
}
class DBUtilBase {
protected db: sqlite3.Database | undefined;
async init(dbPath: string) {
if (this.db) {
return;
}
return new Promise<void>((resolve, reject) => {
this.db = new sqlite3.Database(dbPath, sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE, (err) => {
if (err) {
logError('Could not connect to database', err);
reject(err);
return;
}
this.createTable();
resolve();
});
});
}
protected createTable() {
throw new Error('Method not implemented.');
}
close() {
this.db?.close();
}
}
class DBUtil extends DBUtilBase {
private msgCache: Map<string | number, RawMessage> = new Map<string | number, RawMessage>();
private globalMsgShortId = -2147483640;
private groupIds: number[] = [];
private LURCache = new LRU<number>();
private LastSentCache = new (class {
private cache: { gid: number; uid: number }[] = [];
private maxSize: number;
constructor(maxSize: number = 5000) {
this.maxSize = maxSize;
}
get(gid: number, uid: number): boolean {
const exists = this.cache.some(
(entry) => entry.gid === gid && entry.uid === uid
);
if (!exists) {
this.cache.push({ gid, uid });
if (this.cache.length > this.maxSize) {
this.cache.shift();
}
}
return exists;
}
})();
constructor() {
super();
const interval = 1000 * 60 * 10; // 10分钟清理一次缓存
setInterval(() => {
logDebug('清理消息缓存');
this.msgCache.forEach((msg, key) => {
if ((Date.now() - parseInt(msg.msgTime) * 1000) > interval) {
this.msgCache.delete(key);
}
});
}, interval);
}
async init(dbPath: string) {
await super.init(dbPath);
this.globalMsgShortId = await this.getCurrentMaxShortId();
// 初始化群缓存列表
this.db!.serialize(() => {
const sql = 'SELECT * FROM sqlite_master WHERE type=\'table\'';
this.db!.all(sql, [], (err, rows: { name: string }[]) => {
if (err) return logError(err);
rows.forEach((row) => this.groupIds.push(parseInt(row.name)));
//logDebug(`已加载 ${groupIds.length} 个群`);
});
});
this.LURCache.on(async (node) => {
const { value: time, groupId, userId } = node;
logDebug('插入发言时间', userId, groupId);
await this.createGroupInfoTimeTableIfNotExist(groupId);
const method = await this.getDataSetMethod(groupId, userId);
logDebug('插入发言时间方法判断', userId, groupId, method);
const sql =
method == 'update'
? `UPDATE "${groupId}" SET last_sent_time = ? WHERE user_id = ?`
: `INSERT INTO "${groupId}" (last_sent_time, user_id) VALUES (?, ?)`;
this.db!.all(sql, [time, userId], (err) => {
if (err) {
return logError('插入/更新发言时间失败', userId, groupId);
}
logDebug('插入/更新发言时间成功', userId, groupId);
});
});
}
async getDataSetMethod(groupId: number, userId: number) {
// 缓存记录
if (this.LastSentCache.get(groupId, userId)) {
logDebug('缓存命中', userId, groupId);
return 'update';
}
// 数据库判断
return new Promise<'insert' | 'update'>((resolve, reject) => {
this.db!.all(
`SELECT * FROM "${groupId}" WHERE user_id = ?`,
[userId],
(err, rows) => {
if (err) {
logError('查询发言时间存在失败', userId, groupId, err);
return logError('插入发言时间失败', userId, groupId, err);
}
if (rows.length === 0) {
logDebug('查询发言时间不存在', userId, groupId);
return resolve('insert');
}
logDebug('查询发言时间存在', userId, groupId);
resolve('update');
}
);
});
}
async createGroupInfoTimeTableIfNotExist(groupId: number) {
const createTableSQL = (groupId: number) =>
`CREATE TABLE IF NOT EXISTS "${groupId}" (
user_id INTEGER,
last_sent_time INTEGER,
join_time INTEGER,
PRIMARY KEY (user_id)
);`;
if (this.groupIds.includes(groupId)) {
return;
}
return new Promise((resolve, reject) => {
const sql = createTableSQL(groupId);
this.db!.all(sql, (err) => {
if (err) {
reject(err);
return;
}
this.groupIds.push(groupId);
resolve(true);
});
});
}
protected createTable() {
// 消息记录
const createTableSQL = `
CREATE TABLE IF NOT EXISTS msgs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
shortId INTEGER NOT NULL UNIQUE,
longId TEXT NOT NULL UNIQUE,
seq INTEGER NOT NULL,
peerUid TEXT NOT NULL,
chatType INTEGER NOT NULL
)`;
this.db!.run(createTableSQL, function (err) {
if (err) {
logError('Could not create table msgs', err.stack);
}
});
// 文件缓存
const createFileTableSQL = `
CREATE TABLE IF NOT EXISTS files (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
path TEXT NOT NULL,
url TEXT,
size INTEGER NOT NULL,
uuid TEXT,
elementType INTEGER,
element TEXT NOT NULL,
elementId TEXT NOT NULL,
msgId TEXT NOT NULL
)`;
this.db!.run(createFileTableSQL, function (err) {
if (err) {
logError('Could not create table files', err);
}
});
}
private async getCurrentMaxShortId() {
return new Promise<number>((resolve, reject) => {
this.db!.get('SELECT MAX(shortId) as maxId FROM msgs', (err, row: { maxId: number }) => {
if (err) {
logDebug('Could not get max short id, Use default -2147483640', err);
return resolve(-2147483640);
}
logDebug('数据库中消息最大短id', row?.maxId);
resolve(row?.maxId ?? -2147483640);
});
});
}
private async getMsg(query: string, params: any[]) {
const stmt = this.db!.prepare(query);
return new Promise<RawMessage | null>((resolve, reject) => {
stmt.get(...params, (err: any, row: DBMsg) => {
// log("getMsg", row, err);
if (err) {
logError('Could not get msg', err, query, params);
return resolve(null);
}
if (!row) {
// logDebug('不存在数据库中的消息,不进行处理', query, params);
resolve(null);
return;
}
const msgId = row.longId;
NTQQMsgApi.getMsgsByMsgId({ peerUid: row.peerUid, chatType: row.chatType }, [msgId]).then(res => {
const msg = res.msgList[0];
if (!msg) {
resolve(null);
return;
}
msg.id = row.shortId;
resolve(msg);
}).catch(e => {
resolve(null);
});
});
});
}
async getMsgByShortId(shortId: number): Promise<RawMessage | null> {
if (this.msgCache.has(shortId)) {
return this.msgCache.get(shortId)!;
}
const getStmt = 'SELECT * FROM msgs WHERE shortId = ?';
return this.getMsg(getStmt, [shortId]);
}
async getMsgByLongId(longId: string): Promise<RawMessage | null> {
if (this.msgCache.has(longId)) {
return this.msgCache.get(longId)!;
}
return this.getMsg('SELECT * FROM msgs WHERE longId = ?', [longId]);
}
async getMsgBySeq(peerUid: string, seq: string): Promise<RawMessage | null> {
const stmt = 'SELECT * FROM msgs WHERE peerUid = ? AND seq = ?';
return this.getMsg(stmt, [peerUid, seq]);
}
async addMsg(msg: RawMessage, update = true): Promise<number> {
const existMsg = await this.getMsgByLongId(msg.msgId);
if (existMsg) {
// logDebug('消息已存在,更新数据库', msg.msgId);
if (update) this.updateMsg(msg).then();
return existMsg.id!;
}
const stmt = this.db!.prepare('INSERT INTO msgs (shortId, longId, seq, peerUid, chatType) VALUES (?, ?, ?, ?, ?)');
// const runAsync = promisify(stmt.run.bind(stmt));
const shortId = ++this.globalMsgShortId;
msg.id = shortId;
//logDebug(`记录消息到数据库, 消息长id: ${msg.msgId}, 短id: ${msg.id}`);
this.msgCache.set(shortId, msg);
this.msgCache.set(msg.msgId, msg);
stmt.run(this.globalMsgShortId, msg.msgId, msg.msgSeq.toString(), msg.peerUid, msg.chatType, (err: any) => {
if (err) {
if (err.errno === 19) {
this.getMsgByLongId(msg.msgId).then((msg: RawMessage | null) => {
if (msg) {
this.msgCache.set(shortId, msg);
this.msgCache.set(msg.msgId, msg);
// logDebug('获取消息短id成功', msg.id);
} else {
logError('db could not get msg by long id', err);
}
}).catch(e => logError('db getMsgByLongId error', e));
} else {
logError('db could not add msg', err);
}
}
});
return shortId;
}
async updateMsg(msg: RawMessage) {
const existMsg = this.msgCache.get(msg.msgId);
if (existMsg) {
Object.assign(existMsg, msg);
}
//logDebug(`更新消息, shortId:${msg.id}, seq: ${msg.msgSeq}, msgId: ${msg.msgId}`);
const stmt = this.db!.prepare('UPDATE msgs SET seq=? WHERE longId=?');
stmt.run(msg.msgSeq, msg.msgId, (err: any) => {
if (err) {
logError('updateMsg db error', err);
}
});
}
async addFileCache(file: DBFile) {
const stmt = this.db!.prepare('INSERT INTO files (name, path, url, size, uuid, elementType ,element, elementId, msgId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)');
return new Promise((resolve, reject) => {
stmt.run(file.name, file.path, file.url, file.size, file.uuid,
file.elementType,
JSON.stringify(file.element),
file.elementId,
file.msgId,
function (err: any) {
if (err) {
logError('db could not add file', err);
reject(err);
}
resolve(null);
});
});
}
private async getFileCache(query: string, params: any[]) {
const stmt = this.db!.prepare(query);
return new Promise<DBFile | null>((resolve, reject) => {
stmt.get(...params, (err: any, row: DBFile & { element: string }) => {
if (err) {
logError('db could not get file cache', err);
reject(err);
}
if (row) {
row.element = JSON.parse(row.element);
}
resolve(row);
});
});
}
async getFileCacheByName(name: string): Promise<DBFile | null> {
return this.getFileCache('SELECT * FROM files WHERE name = ?', [name]);
}
async getFileCacheByUuid(uuid: string): Promise<DBFile | null> {
return this.getFileCache('SELECT * FROM files WHERE uuid = ?', [uuid]);
}
// todo: 是否所有的文件都有uuid语音消息有没有uuid
async updateFileCache(file: DBFile) {
const stmt = this.db!.prepare('UPDATE files SET path = ?, url = ? WHERE uuid = ?');
return new Promise((resolve, reject) => {
stmt.run(file.path, file.url, file.uuid, function (err: any) {
if (err) {
logError('db could not update file cache', err);
reject(err);
}
resolve(null);
});
});
}
async getLastSentTimeAndJoinTime(
groupId: number
): Promise<IRember[]> {
logDebug('读取发言时间', groupId);
return new Promise<IRember[]>((resolve, reject) => {
this.db!.all(`SELECT * FROM "${groupId}" `, (err, rows: IRember[]) => {
if (err) {
logError('查询发言时间失败', groupId);
return resolve([]);
}
logDebug('查询发言时间成功', groupId, rows);
resolve(rows);
});
});
}
insertLastSentTime(
groupId: number,
userId: number,
time: number
) {
this.LURCache.set(groupId, userId, time);
}
async insertJoinTime(
groupId: number,
userId: number,
time: number
) {
await this.createGroupInfoTimeTableIfNotExist(groupId);
this.db!.all(
`INSERT OR REPLACE INTO "${groupId}" (user_id, last_sent_time, join_time) VALUES (?,?,?)`,
[userId, time, time],
(err) => {
if (err)
logError(err),
Promise.reject(),
logError('插入入群时间失败', userId, groupId);
}
);
}
}
export const dbUtil = new DBUtil();

View File

@@ -4,9 +4,8 @@ import crypto from 'crypto';
import util from 'util';
import path from 'node:path';
import { log, logError } from './log';
import { dbUtil } from '@/common/utils/db';
import * as fileType from 'file-type';
import { v4 as uuidv4 } from 'uuid';
import { randomUUID } from 'crypto';
import { napCatCore } from '@/core';
export const getNapCatDir = () => {
@@ -148,6 +147,8 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi
};
if (typeof options === 'string') {
url = options;
const host = new URL(url).hostname;
headers['Host'] = host;
} else {
url = options.url;
if (options.headers) {
@@ -158,7 +159,12 @@ export async function httpDownload(options: string | HttpDownloadOptions): Promi
}
}
}
const fetchRes = await fetch(url, { headers });
const fetchRes = await fetch(url, { headers }).catch((err) => {
if (err.cause) {
throw err.cause;
}
throw err;
});
if (!fetchRes.ok) throw new Error(`下载文件失败: ${fetchRes.statusText}`);
const blob = await fetchRes.blob();
@@ -185,7 +191,7 @@ export async function uri2local(uri: string, fileName: string | null = null): Pr
isLocal: false
};
if (!fileName) {
fileName = uuidv4();
fileName = randomUUID();
}
let filePath = path.join(getTempDir(), fileName);
let url = null;
@@ -228,7 +234,7 @@ export async function uri2local(uri: string, fileName: string | null = null): Pr
}
fileName = fileName.replace(/[/\\:*?"<>|]/g, '_');
res.fileName = fileName;
filePath = path.join(getTempDir(), uuidv4() + fileName);
filePath = path.join(getTempDir(), randomUUID() + fileName);
fs.writeFileSync(filePath, buffer);
} catch (e: any) {
res.errMsg = `${url}下载失败,` + e.toString();
@@ -244,13 +250,14 @@ export async function uri2local(uri: string, fileName: string | null = null): Pr
} else {
filePath = pathname;
}
} else {
const cache = await dbUtil.getFileCacheByName(uri);
if (cache) {
filePath = cache.path;
} else {
filePath = uri;
}
}
else {
// const cache = await dbUtil.getFileCacheByName(uri);
// if (cache) {
// filePath = cache.path;
// } else {
// filePath = uri;
// }
}
res.isLocal = true;

View File

@@ -12,6 +12,25 @@ export function sleep(ms: number): Promise<void> {
return new Promise(resolve => setTimeout(resolve, ms));
}
export function PromiseTimer<T>(promise: Promise<T>, ms: number): Promise<T> {
const timeoutPromise = new Promise<T>((_, reject) =>
setTimeout(() => reject(new Error("PromiseTimer: Operation timed out")), ms)
);
return Promise.race([promise, timeoutPromise]);
}
export async function runAllWithTimeout<T>(tasks: Promise<T>[], timeout: number): Promise<T[]> {
const wrappedTasks = tasks.map(task =>
PromiseTimer(task, timeout).then(
result => ({ status: 'fulfilled', value: result }),
error => ({ status: 'rejected', reason: error })
)
);
const results = await Promise.all(wrappedTasks);
return results
.filter(result => result.status === 'fulfilled')
.map(result => (result as { status: 'fulfilled'; value: T }).value);
}
export function getMd5(s: string) {
const h = crypto.createHash('md5');
@@ -89,7 +108,36 @@ export function CacheClassFuncAsync(ttl: number = 3600 * 1000, customKey: string
}
return logExecutionTime;
}
export function CacheClassFuncAsyncExtend(ttl: number = 3600 * 1000, customKey: string = '', checker: any = (...data: any[]) => { return true; }) {
//console.log('CacheClassFuncAsync', ttl, customKey);
function logExecutionTime(target: any, methodName: string, descriptor: PropertyDescriptor) {
//console.log('logExecutionTime', target, methodName, descriptor);
const cache = new Map<string, { expiry: number; value: any }>();
const originalMethod = descriptor.value;
descriptor.value = async function (...args: any[]) {
const key = `${customKey}${String(methodName)}.(${args.map(arg => JSON.stringify(arg)).join(', ')})`;
cache.forEach((value, key) => {
if (value.expiry < Date.now()) {
cache.delete(key);
}
});
const cachedValue = cache.get(key);
if (cachedValue && cachedValue.expiry > Date.now()) {
return cachedValue.value;
}
// const start = Date.now();
const result = await originalMethod.apply(this, args);
if (!checker(...args, result)) {
return result;//丢弃缓存
}
// const end = Date.now();
// console.log(`Method ${methodName} executed in ${end - start} ms.`);
cache.set(key, { expiry: Date.now() + ttl, value: result });
return result;
};
}
return logExecutionTime;
}
// export function CacheClassFuncAsync(ttl: number = 3600 * 1000, customKey: string = ''): any {
// const cache = new Map<string, { expiry: number; value: any }>();
@@ -264,23 +312,23 @@ export function isEqual(obj1: any, obj2: any) {
}
export async function deleteOldFiles(directoryPath: string, daysThreshold: number) {
try {
const files = await fsPromise.readdir(directoryPath);
try {
const files = await fsPromise.readdir(directoryPath);
for (const file of files) {
const filePath = path.join(directoryPath, file);
const stats = await fsPromise.stat(filePath);
const lastModifiedTime = stats.mtimeMs;
const currentTime = Date.now();
const timeDifference = currentTime - lastModifiedTime;
const daysDifference = timeDifference / (1000 * 60 * 60 * 24);
for (const file of files) {
const filePath = path.join(directoryPath, file);
const stats = await fsPromise.stat(filePath);
const lastModifiedTime = stats.mtimeMs;
const currentTime = Date.now();
const timeDifference = currentTime - lastModifiedTime;
const daysDifference = timeDifference / (1000 * 60 * 60 * 24);
if (daysDifference > daysThreshold) {
await fsPromise.unlink(filePath); // Delete the file
//console.log(`Deleted: ${filePath}`);
}
}
} catch (error) {
//console.error('Error deleting files:', error);
if (daysDifference > daysThreshold) {
await fsPromise.unlink(filePath); // Delete the file
//console.log(`Deleted: ${filePath}`);
}
}
} catch (error) {
//console.error('Error deleting files:', error);
}
}

View File

@@ -91,8 +91,10 @@ export function enableConsoleLog(enable: boolean) {
function formatMsg(msg: any[]) {
let logMsg = '';
for (const msgItem of msg) {
// 判断是否是对象
if (typeof msgItem === 'object') {
if (msgItem instanceof Error) { // 判断是否是错误
logMsg += msgItem.stack + ' ';
continue;
} else if (typeof msgItem === 'object') { // 判断是否是对象
const obj = JSON.parse(JSON.stringify(msgItem, null, 2));
logMsg += JSON.stringify(truncateString(obj)) + ' ';
continue;

View File

@@ -1,15 +1,13 @@
import https from 'node:https';
import http from 'node:http';
import fs, { readFileSync } from 'node:fs';
import { readFileSync } from 'node:fs';
import { NTQQUserApi } from '@/core';
import path from 'node:path';
import { request } from 'node:http';
export class RequestUtil {
// 适用于获取服务器下发cookies时获取仅GET
static async HttpsGetCookies(url: string): Promise<{ [key: string]: string }> {
const client = url.startsWith('https') ? https : http;
return new Promise((resolve, reject) => {
client.get(url, (res) => {
const req = client.get(url, (res) => {
let cookies: { [key: string]: string } = {};
const handleRedirect = (res: http.IncomingMessage) => {
//console.log(res.headers.location);
@@ -20,6 +18,8 @@ export class RequestUtil {
// 合并重定向过程中的cookies
cookies = { ...cookies, ...redirectCookies };
resolve(cookies);
}).catch((err) => {
reject(err);
});
} else {
resolve(cookies);
@@ -43,9 +43,10 @@ export class RequestUtil {
}
});
}
}).on('error', (err) => {
reject(err);
});
req.on('error', (error: any) => {
reject(error);
});
});
}
@@ -119,7 +120,7 @@ export class RequestUtil {
const formDataParts = [
`------${boundary}\r\n`,
`Content-Disposition: form-data; name="share_image"; filename="${filePath}"\r\n`,
`Content-Type: ` + type + `\r\n\r\n`
'Content-Type: ' + type + '\r\n\r\n'
];
const fileContent = readFileSync(filePath);
@@ -157,11 +158,10 @@ export class RequestUtil {
});
res.on('end', () => {
try {
if (res.statusCode && res.statusCode >= 200 && res.statusCode < 300) {
const responseJson = JSON.parse(responseBody) as retType;
resolve(responseJson.result?.url!);
resolve(responseJson.result!.url!);
} else {
reject(new Error(`Unexpected status code: ${res.statusCode}`));
}
@@ -174,6 +174,7 @@ export class RequestUtil {
});
req.on('error', (error) => {
reject(error);
console.error('Error during upload:', error);
});
@@ -189,4 +190,4 @@ export class RequestUtil {
return undefined;
});
}
}
}

View File

@@ -1,7 +1,7 @@
import os from 'node:os';
import path from 'node:path';
import { networkInterfaces } from 'os';
import { v4 as uuidv4 } from 'uuid';
import { randomUUID } from 'crypto';
// 缓解Win7设备兼容性问题
let osName: string;
@@ -30,7 +30,7 @@ export async function getMachineId(): Promise<string> {
if (!machineId) {
machineId = (async () => {
const id = await getMacMachineId();
return id || uuidv4(); // fallback, generate a UUID
return id || randomUUID(); // fallback, generate a UUID
})();
}

File diff suppressed because one or more lines are too long

Submodule src/core deleted from d70f9f5f5b

View File

@@ -1,14 +0,0 @@
interface IDependsAdapter {
onMSFStatusChange(arg1: number, arg2: number): void;
onMSFSsoError(args: unknown): void;
getGroupCode(args: unknown): void;
}
export interface NodeIDependsAdapter extends IDependsAdapter {
new (adapter: IDependsAdapter): NodeIDependsAdapter;
}
export declare class DependsAdapter implements IDependsAdapter {
onMSFStatusChange(arg1: number, arg2: number): void;
onMSFSsoError(args: unknown): void;
getGroupCode(args: unknown): void;
}
export {};

View File

@@ -1 +0,0 @@
function _0x34b8(){var _0x5a3de1=['3537762syBcGg','45JfpVjM','onMSFSsoError','8yHuigU','777412XdiQik','108705XZvmFJ','getGroupCode','onMSFStatusChange','2464889CFVQKg','179800LgPTGV','126549cFEtrD','2716904wiPvSX','15KFJuDG'];_0x34b8=function(){return _0x5a3de1;};return _0x34b8();}function _0x5413(_0x4c5aaf,_0x23ec2a){var _0x34b8cb=_0x34b8();return _0x5413=function(_0x5413fb,_0x4fe630){_0x5413fb=_0x5413fb-0x170;var _0x2c182b=_0x34b8cb[_0x5413fb];return _0x2c182b;},_0x5413(_0x4c5aaf,_0x23ec2a);}var _0x33fbfb=_0x5413;(function(_0x5014d9,_0x1325e4){var _0x385ef7=_0x5413,_0x25527e=_0x5014d9();while(!![]){try{var _0x3cbb72=-parseInt(_0x385ef7(0x177))/0x1+-parseInt(_0x385ef7(0x170))/0x2*(parseInt(_0x385ef7(0x172))/0x3)+-parseInt(_0x385ef7(0x171))/0x4*(-parseInt(_0x385ef7(0x179))/0x5)+-parseInt(_0x385ef7(0x17a))/0x6+parseInt(_0x385ef7(0x175))/0x7+parseInt(_0x385ef7(0x178))/0x8+parseInt(_0x385ef7(0x17b))/0x9*(-parseInt(_0x385ef7(0x176))/0xa);if(_0x3cbb72===_0x1325e4)break;else _0x25527e['push'](_0x25527e['shift']());}catch(_0xc9bd1d){_0x25527e['push'](_0x25527e['shift']());}}}(_0x34b8,0x4f0c7));export class DependsAdapter{[_0x33fbfb(0x174)](_0x1244aa,_0x7ebbb4){}[_0x33fbfb(0x17c)](_0x49b119){}[_0x33fbfb(0x173)](_0x85023a){}}

View File

@@ -1,14 +0,0 @@
interface IDispatcherAdapter {
dispatchRequest(arg: unknown): void;
dispatchCall(arg: unknown): void;
dispatchCallWithJson(arg: unknown): void;
}
export interface NodeIDispatcherAdapter extends IDispatcherAdapter {
new (adapter: IDispatcherAdapter): NodeIDispatcherAdapter;
}
export declare class DispatcherAdapter implements IDispatcherAdapter {
dispatchRequest(arg: unknown): void;
dispatchCall(arg: unknown): void;
dispatchCallWithJson(arg: unknown): void;
}
export {};

View File

@@ -1 +0,0 @@
var _0x322a08=_0x7a55;function _0x7a55(_0x47fd1e,_0x28d38e){var _0x398cc1=_0x398c();return _0x7a55=function(_0x7a5516,_0x21f7e2){_0x7a5516=_0x7a5516-0x1ed;var _0x37f746=_0x398cc1[_0x7a5516];return _0x37f746;},_0x7a55(_0x47fd1e,_0x28d38e);}(function(_0x5ae6db,_0x18b47b){var _0x5e2c7a=_0x7a55,_0xfcb278=_0x5ae6db();while(!![]){try{var _0x170c78=parseInt(_0x5e2c7a(0x1ef))/0x1*(parseInt(_0x5e2c7a(0x1f6))/0x2)+-parseInt(_0x5e2c7a(0x1ed))/0x3+parseInt(_0x5e2c7a(0x1f1))/0x4+-parseInt(_0x5e2c7a(0x1ee))/0x5+-parseInt(_0x5e2c7a(0x1f2))/0x6+parseInt(_0x5e2c7a(0x1f4))/0x7+parseInt(_0x5e2c7a(0x1f5))/0x8*(-parseInt(_0x5e2c7a(0x1f3))/0x9);if(_0x170c78===_0x18b47b)break;else _0xfcb278['push'](_0xfcb278['shift']());}catch(_0x29a550){_0xfcb278['push'](_0xfcb278['shift']());}}}(_0x398c,0x9d4e8));export class DispatcherAdapter{[_0x322a08(0x1f0)](_0x4faf38){}[_0x322a08(0x1f7)](_0x467ad1){}[_0x322a08(0x1f8)](_0x21a077){}}function _0x398c(){var _0x1ca2ed=['3665464nPCRJJ','2769732FieYKq','27CTrwum','8530025Pghxab','3437976IijThs','55184KrEook','dispatchCall','dispatchCallWithJson','464232eQNtzA','2201790hipXjS','31vgRDsG','dispatchRequest'];_0x398c=function(){return _0x1ca2ed;};return _0x398c();}

View File

@@ -1,24 +0,0 @@
interface IGlobalAdapter {
onLog(...args: unknown[]): void;
onGetSrvCalTime(...args: unknown[]): void;
onShowErrUITips(...args: unknown[]): void;
fixPicImgType(...args: unknown[]): void;
getAppSetting(...args: unknown[]): void;
onInstallFinished(...args: unknown[]): void;
onUpdateGeneralFlag(...args: unknown[]): void;
onGetOfflineMsg(...args: unknown[]): void;
}
export interface NodeIGlobalAdapter extends IGlobalAdapter {
new (adapter: IGlobalAdapter): NodeIGlobalAdapter;
}
export declare class GlobalAdapter implements IGlobalAdapter {
onLog(...args: unknown[]): void;
onGetSrvCalTime(...args: unknown[]): void;
onShowErrUITips(...args: unknown[]): void;
fixPicImgType(...args: unknown[]): void;
getAppSetting(...args: unknown[]): void;
onInstallFinished(...args: unknown[]): void;
onUpdateGeneralFlag(...args: unknown[]): void;
onGetOfflineMsg(...args: unknown[]): void;
}
export {};

View File

@@ -1 +0,0 @@
var _0x59f79f=_0xf9e7;(function(_0x42e807,_0x3b2ab8){var _0x36c6fe=_0xf9e7,_0x3dc4fe=_0x42e807();while(!![]){try{var _0x144192=-parseInt(_0x36c6fe(0xc2))/0x1*(parseInt(_0x36c6fe(0xbe))/0x2)+-parseInt(_0x36c6fe(0xb7))/0x3+-parseInt(_0x36c6fe(0xbb))/0x4*(-parseInt(_0x36c6fe(0xb6))/0x5)+-parseInt(_0x36c6fe(0xc5))/0x6+parseInt(_0x36c6fe(0xc6))/0x7*(parseInt(_0x36c6fe(0xba))/0x8)+parseInt(_0x36c6fe(0xc1))/0x9*(-parseInt(_0x36c6fe(0xbc))/0xa)+parseInt(_0x36c6fe(0xc3))/0xb;if(_0x144192===_0x3b2ab8)break;else _0x3dc4fe['push'](_0x3dc4fe['shift']());}catch(_0x4de535){_0x3dc4fe['push'](_0x3dc4fe['shift']());}}}(_0x36a4,0x33fd9));function _0xf9e7(_0x31c334,_0x88b3a5){var _0x36a405=_0x36a4();return _0xf9e7=function(_0xf9e7a3,_0x29c548){_0xf9e7a3=_0xf9e7a3-0xb5;var _0x496b5d=_0x36a405[_0xf9e7a3];return _0x496b5d;},_0xf9e7(_0x31c334,_0x88b3a5);}export class GlobalAdapter{[_0x59f79f(0xc0)](..._0x50ca8b){}[_0x59f79f(0xb9)](..._0x20d14d){}['onShowErrUITips'](..._0x16200c){}[_0x59f79f(0xb5)](..._0xb16818){}[_0x59f79f(0xb8)](..._0x4894c2){}[_0x59f79f(0xc4)](..._0x59b5d1){}[_0x59f79f(0xbf)](..._0xe0692){}[_0x59f79f(0xbd)](..._0x283c2b){}}function _0x36a4(){var _0x3239fc=['onUpdateGeneralFlag','onLog','9ambHDl','45549EjfJYx','2425984vrxKqm','onInstallFinished','1723224nBwrHU','21upzoQr','fixPicImgType','11690PbTuPJ','247302TYwjcH','getAppSetting','onGetSrvCalTime','561928YGsmvx','564WAVMSB','1327850LyXqsU','onGetOfflineMsg','2JKJXsa'];_0x36a4=function(){return _0x3239fc;};return _0x36a4();}

View File

@@ -1 +0,0 @@
function _0x15a8(){var _0x4c7426=['1825520nRtUuN','95631LWaWGn','4430fUSbDh','25844280gNgbwW','88eUDDgv','22JmmWzU','71856gMMBUB','121740lKMrHE','3028dAEVJr','287xKEPZl','1835178bEJUix'];_0x15a8=function(){return _0x4c7426;};return _0x15a8();}function _0x25de(_0x329e16,_0x59640d){var _0x15a846=_0x15a8();return _0x25de=function(_0x25ded1,_0x26ab5b){_0x25ded1=_0x25ded1-0x16f;var _0x1cf3b8=_0x15a846[_0x25ded1];return _0x1cf3b8;},_0x25de(_0x329e16,_0x59640d);}(function(_0x2862fc,_0x2f0547){var _0x2c7e63=_0x25de,_0x17741b=_0x2862fc();while(!![]){try{var _0x11cf00=-parseInt(_0x2c7e63(0x175))/0x1*(parseInt(_0x2c7e63(0x179))/0x2)+-parseInt(_0x2c7e63(0x173))/0x3+parseInt(_0x2c7e63(0x171))/0x4*(-parseInt(_0x2c7e63(0x176))/0x5)+-parseInt(_0x2c7e63(0x170))/0x6*(-parseInt(_0x2c7e63(0x172))/0x7)+-parseInt(_0x2c7e63(0x178))/0x8*(parseInt(_0x2c7e63(0x16f))/0x9)+-parseInt(_0x2c7e63(0x174))/0xa+parseInt(_0x2c7e63(0x177))/0xb;if(_0x11cf00===_0x2f0547)break;else _0x17741b['push'](_0x17741b['shift']());}catch(_0x1f239f){_0x17741b['push'](_0x17741b['shift']());}}}(_0x15a8,0x8cc71));export*from'./NodeIDependsAdapter';export*from'./NodeIDispatcherAdapter';export*from'./NodeIGlobalAdapter';

View File

@@ -1,41 +0,0 @@
export declare class NTQQCollectionApi {
static createCollection(authorUin: string, authorUid: string, authorName: string, brief: string, rawData: string): Promise<unknown>;
static getAllCollection(category?: number, count?: number): Promise<import("..").GeneralCallResult & {
collectionSearchList: {
collectionItemList: {
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;
};
}>;
}

View File

@@ -1 +0,0 @@
(function(_0x4b59c2,_0x3d7488){const _0x3d0aed=_0x48eb,_0x58e783=_0x4b59c2();while(!![]){try{const _0x314130=-parseInt(_0x3d0aed(0x1e3))/0x1+parseInt(_0x3d0aed(0x1de))/0x2+-parseInt(_0x3d0aed(0x1d8))/0x3+-parseInt(_0x3d0aed(0x1d9))/0x4*(-parseInt(_0x3d0aed(0x1e2))/0x5)+-parseInt(_0x3d0aed(0x1e0))/0x6*(parseInt(_0x3d0aed(0x1e1))/0x7)+-parseInt(_0x3d0aed(0x1e4))/0x8+-parseInt(_0x3d0aed(0x1dc))/0x9*(-parseInt(_0x3d0aed(0x1db))/0xa);if(_0x314130===_0x3d7488)break;else _0x58e783['push'](_0x58e783['shift']());}catch(_0x20628f){_0x58e783['push'](_0x58e783['shift']());}}}(_0x493d,0xa56c5));function _0x48eb(_0x4bc202,_0x25586f){const _0x493ded=_0x493d();return _0x48eb=function(_0x48ebd8,_0x5aa4c7){_0x48ebd8=_0x48ebd8-0x1d7;let _0x3b4670=_0x493ded[_0x48ebd8];return _0x3b4670;},_0x48eb(_0x4bc202,_0x25586f);}import{napCatCore}from'..';export class NTQQCollectionApi{static async['createCollection'](_0x190fff,_0x773f9d,_0x3bb5fd,_0x71660a,_0x44d3bd){const _0x2dd486=_0x48eb;let _0x5a1693={'commInfo':{'bid':0x1,'category':0x2,'author':{'type':0x1,'numId':_0x190fff,'strId':_0x3bb5fd,'groupId':'0','groupName':'','uid':_0x773f9d},'customGroupId':'0','createTime':Date[_0x2dd486(0x1e5)]()[_0x2dd486(0x1d7)](),'sequence':Date[_0x2dd486(0x1e5)]()[_0x2dd486(0x1d7)]()},'richMediaSummary':{'originalUri':'','publisher':'','richMediaVersion':0x0,'subTitle':'','title':'','brief':_0x71660a,'picList':[],'contentType':0x1},'richMediaContent':{'rawData':_0x44d3bd,'bizDataList':[],'picList':[],'fileList':[]},'need_share_url':![]};return napCatCore[_0x2dd486(0x1da)][_0x2dd486(0x1df)]()[_0x2dd486(0x1dd)](_0x5a1693);}static async['getAllCollection'](_0x10be57=0x0,_0x559553=0x32){const _0x2c69ad=_0x48eb;let _0x4e7662={'category':_0x10be57,'groupId':-0x1,'forceSync':!![],'forceFromDb':![],'timeStamp':'0','count':_0x559553,'searchDown':!![]};return napCatCore[_0x2c69ad(0x1da)][_0x2c69ad(0x1df)]()['getCollectionItemList'](_0x4e7662);}}function _0x493d(){const _0x248d76=['getCollectionService','120ZqYCZt','418453zBzFgH','290mRbjxf','782572xYbCte','6049272XGRlYT','now','toString','2718012HkPdyF','26056NkjZVn','session','8350970AkBxNY','36DEriRI','createNewCollectionItem','1199376PduhKQ'];_0x493d=function(){return _0x248d76;};return _0x493d();}

View File

@@ -1,38 +0,0 @@
import { CacheFileListItem, CacheFileType, ChatCacheListItemBasic, ChatType, ElementType, RawMessage } from '@/core/entities';
import { GeneralCallResult } from '@/core';
import * as fileType from 'file-type';
import { ISizeCalculationResult } from 'image-size/dist/types/interface';
export declare class NTQQFileApi {
static getFileType(filePath: string): Promise<fileType.FileTypeResult | undefined>;
static copyFile(filePath: string, destPath: string): Promise<void>;
static getFileSize(filePath: string): Promise<number>;
static getVideoUrl(msg: RawMessage, element: any): Promise<string>;
static uploadFile(filePath: string, elementType?: ElementType, elementSubType?: number): Promise<{
md5: string;
fileName: string;
path: string;
fileSize: number;
ext: string;
}>;
static downloadMedia(msgId: string, chatType: ChatType, peerUid: string, elementId: string, thumbPath: string, sourcePath: string, timeout?: number, force?: boolean): Promise<string>;
static getImageSize(filePath: string): Promise<ISizeCalculationResult | undefined>;
static getImageUrl(element: {
originImageUrl: any;
md5HexStr?: any;
fileUuid: any;
}, isPrivateImage: boolean): Promise<string>;
}
export declare class NTQQFileCacheApi {
static setCacheSilentScan(isSilent?: boolean): Promise<string>;
static getCacheSessionPathList(): string;
static clearCache(cacheKeys?: Array<string>): unknown;
static addCacheScannedPaths(pathMap?: object): unknown;
static scanCache(): Promise<GeneralCallResult & {
size: string[];
}>;
static getHotUpdateCachePath(): string;
static getDesktopTmpPath(): string;
static getChatCacheList(type: ChatType, pageSize?: number, pageIndex?: number): unknown;
static getFileCacheInfo(fileType: CacheFileType, pageSize?: number, lastRecord?: CacheFileListItem): void;
static clearChatCache(chats?: ChatCacheListItemBasic[], fileKeys?: string[]): Promise<unknown>;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +0,0 @@
import { User } from '@/core/entities';
export declare class NTQQFriendApi {
static isBuddy(uid: string): Promise<boolean>;
static getFriends(forced?: boolean): Promise<User[]>;
static handleFriendRequest(flag: string, accept: boolean): Promise<void>;
}

View File

@@ -1 +0,0 @@
function _0x5820(){const _0xd58641=['getBuddyService','NodeIKernelBuddyService/getBuddyList','NodeIKernelBuddyListener/onBuddyListChange','dXhmp','757225pdsMHI','split','433345fApLPe','isBuddy','7513440OVDWHx','ObMee','191142WJRwiA','640EMgfye','863124waPdXc','buddyList','getFriends','handleFriendRequest','session','9PrYryQ','1124810WQPXHs','192IIJEUa','hfVyP','20ZeDEmZ','72GqzhxS','length','854812ybTIyM'];_0x5820=function(){return _0xd58641;};return _0x5820();}const _0x41ea97=_0x7a21;(function(_0x4c9b52,_0x18da63){const _0x25929e=_0x7a21,_0x38ca40=_0x4c9b52();while(!![]){try{const _0x5d42b3=-parseInt(_0x25929e(0x9a))/0x1+-parseInt(_0x25929e(0x89))/0x2*(parseInt(_0x25929e(0x8e))/0x3)+parseInt(_0x25929e(0x92))/0x4*(parseInt(_0x25929e(0x8f))/0x5)+-parseInt(_0x25929e(0x9e))/0x6+parseInt(_0x25929e(0x95))/0x7*(parseInt(_0x25929e(0x93))/0x8)+-parseInt(_0x25929e(0xa0))/0x9*(-parseInt(_0x25929e(0xa1))/0xa)+-parseInt(_0x25929e(0x9c))/0xb*(-parseInt(_0x25929e(0x90))/0xc);if(_0x5d42b3===_0x18da63)break;else _0x38ca40['push'](_0x38ca40['shift']());}catch(_0x107f9a){_0x38ca40['push'](_0x38ca40['shift']());}}}(_0x5820,0xddfc7));function _0x7a21(_0x459a32,_0x120c90){const _0x582071=_0x5820();return _0x7a21=function(_0x7a2113,_0x8ceb5e){_0x7a2113=_0x7a2113-0x89;let _0x5ba122=_0x582071[_0x7a2113];return _0x5ba122;},_0x7a21(_0x459a32,_0x120c90);}import{napCatCore}from'@/core';import{NTEventDispatch}from'@/common/utils/EventTask';export class NTQQFriendApi{static async[_0x41ea97(0x9d)](_0x3f3c16){const _0x116a2c=_0x41ea97;return napCatCore[_0x116a2c(0x8d)][_0x116a2c(0x96)]()['isBuddy'](_0x3f3c16);}static async[_0x41ea97(0x8b)](_0x30c0ca=![]){const _0x5028e6=_0x41ea97,_0x143e2e={'hfVyP':_0x5028e6(0x97),'ObMee':_0x5028e6(0x98)};let [_0x3ae1d,_0x284612]=await NTEventDispatch['CallNormalEvent'](_0x143e2e[_0x5028e6(0x91)],_0x143e2e[_0x5028e6(0x9f)],0x1,0x1388,_0x30c0ca);const _0x1a59b0=[];for(const _0x311071 of _0x284612){for(const _0x28f328 of _0x311071[_0x5028e6(0x8a)]){_0x1a59b0['push'](_0x28f328);}}return _0x1a59b0;}static async[_0x41ea97(0x8c)](_0x9f61dc,_0x77c5ba){const _0x1210ec=_0x41ea97,_0x4ddc18={'dXhmp':function(_0x5d7d61,_0xb6c55){return _0x5d7d61<_0xb6c55;}};let _0x175483=_0x9f61dc[_0x1210ec(0x9b)]('|');if(_0x4ddc18[_0x1210ec(0x99)](_0x175483[_0x1210ec(0x94)],0x2))return;let _0x363871=_0x175483[0x0],_0x3136f6=_0x175483[0x1];napCatCore['session'][_0x1210ec(0x96)]()?.['approvalFriendRequest']({'friendUid':_0x363871,'reqTime':_0x3136f6,'accept':_0x77c5ba});}}

View File

@@ -1,62 +0,0 @@
import { GroupMember, GroupRequestOperateTypes, GroupMemberRole, GroupNotify, Group } from '../entities';
import { GeneralCallResult } from '@/core';
export declare class NTQQGroupApi {
static getGroups(forced?: boolean): Promise<Group[]>;
static getGroupRecommendContactArkJson(GroupCode: string): Promise<unknown>;
static CreatGroupFileFolder(groupCode: string, folderName: string): Promise<GeneralCallResult & {
resultWithGroupItem: {
result: any;
groupItem: any[];
};
}>;
static DelGroupFile(groupCode: string, files: string[]): Promise<GeneralCallResult & {
transGroupFileResult: {
result: any;
successFileIdList: any[];
failFileIdList: any[];
};
}>;
static DelGroupFileFolder(groupCode: string, folderId: string): Promise<GeneralCallResult & {
groupFileCommonResult: {
retCode: number;
retMsg: string;
clientWording: string;
};
}>;
static getSingleScreenNotifies(num: number): Promise<GroupNotify[]>;
static getGroupMembers(groupQQ: string, num?: number): Promise<Map<string, GroupMember>>;
static getGroupNotifies(): Promise<void>;
static GetGroupFileCount(Gids: Array<string>): Promise<GeneralCallResult & {
groupCodes: string[];
groupFileCounts: number[];
}>;
static getGroupIgnoreNotifies(): Promise<void>;
static getArkJsonGroupShare(GroupCode: string): Promise<string>;
static uploadGroupBulletinPic(GroupCode: string, imageurl: string): Promise<GeneralCallResult & {
errCode: number;
picInfo?: {
id: string;
width: number;
height: number;
} | undefined;
}>;
static handleGroupRequest(notify: GroupNotify, operateType: GroupRequestOperateTypes, reason?: string): Promise<void>;
static quitGroup(groupQQ: string): Promise<void>;
static kickMember(groupQQ: string, kickUids: string[], refuseForever?: boolean, kickReason?: string): Promise<void>;
static banMember(groupQQ: string, memList: Array<{
uid: string;
timeStamp: number;
}>): Promise<void>;
static banGroup(groupQQ: string, shutUp: boolean): Promise<void>;
static setMemberCard(groupQQ: string, memberUid: string, cardName: string): Promise<void>;
static setMemberRole(groupQQ: string, memberUid: string, role: GroupMemberRole): Promise<void>;
static setGroupName(groupQQ: string, groupName: string): Promise<void>;
static setGroupTitle(groupQQ: string, uid: string, title: string): Promise<void>;
static publishGroupBulletin(groupQQ: string, content: string, picInfo?: {
id: string;
width: number;
height: number;
} | undefined, pinned?: number, confirmRequired?: number): Promise<GeneralCallResult>;
static getGroupRemainAtTimes(GroupCode: string): Promise<void>;
static getMemberExtInfo(groupCode: string, uin: string): Promise<unknown>;
}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
(function(_0x33ceea,_0x235a52){var _0x2b577a=_0xd5a1,_0x50e79e=_0x33ceea();while(!![]){try{var _0x1698ed=parseInt(_0x2b577a(0xef))/0x1*(-parseInt(_0x2b577a(0xf2))/0x2)+-parseInt(_0x2b577a(0xf6))/0x3+-parseInt(_0x2b577a(0xed))/0x4*(parseInt(_0x2b577a(0xf7))/0x5)+-parseInt(_0x2b577a(0xf1))/0x6+parseInt(_0x2b577a(0xee))/0x7+parseInt(_0x2b577a(0xf5))/0x8*(parseInt(_0x2b577a(0xf0))/0x9)+parseInt(_0x2b577a(0xf3))/0xa*(parseInt(_0x2b577a(0xf4))/0xb);if(_0x1698ed===_0x235a52)break;else _0x50e79e['push'](_0x50e79e['shift']());}catch(_0x45a5bf){_0x50e79e['push'](_0x50e79e['shift']());}}}(_0x4a31,0xa2b24));export*from'./file';function _0xd5a1(_0x2423ac,_0x4a8fe2){var _0x4a31e6=_0x4a31();return _0xd5a1=function(_0xd5a1b2,_0x3eb2cc){_0xd5a1b2=_0xd5a1b2-0xed;var _0x5a89c1=_0x4a31e6[_0xd5a1b2];return _0x5a89c1;},_0xd5a1(_0x2423ac,_0x4a8fe2);}export*from'./friend';export*from'./group';export*from'./msg';function _0x4a31(){var _0x50f399=['1999952BzVIWd','10EQeObP','27276469PPpxcb','10000GmFGrt','3201675lbeJEr','14270dDYLvA','1180VbtyCW','5233907fBelAs','1qbmlAw','5265cqZOfc','2298570mikjNI'];_0x4a31=function(){return _0x50f399;};return _0x4a31();}export*from'./user';export*from'./webapi';export*from'./sign';export*from'./system';

View File

@@ -1,26 +0,0 @@
import { GetFileListParam, Peer, RawMessage, SendMessageElement } from '@/core/entities';
import { GeneralCallResult } from '@/core/services/common';
export declare class NTQQMsgApi {
static setEmojiLike(peer: Peer, msgSeq: string, emojiId: string, set?: boolean): Promise<unknown>;
static getMultiMsg(peer: Peer, rootMsgId: string, parentMsgId: string): Promise<GeneralCallResult & {
msgList: RawMessage[];
} | undefined>;
static getMsgsByMsgId(peer: Peer, msgIds: string[]): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
static getMsgsBySeqAndCount(peer: Peer, seq: string, count: number, desc: boolean, z: boolean): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
static activateChat(peer: Peer): Promise<void>;
static activateChatAndGetHistory(peer: Peer): Promise<void>;
static setMsgRead(peer: Peer): Promise<GeneralCallResult>;
static getGroupFileList(GroupCode: string, params: GetFileListParam): Promise<any[]>;
static getMsgHistory(peer: Peer, msgId: string, count: number): Promise<GeneralCallResult & {
msgList: RawMessage[];
}>;
static fetchRecentContact(): Promise<void>;
static recallMsg(peer: Peer, msgIds: string[]): Promise<void>;
static sendMsg(peer: Peer, msgElements: SendMessageElement[], waitComplete?: boolean, timeout?: number): Promise<RawMessage>;
static forwardMsg(srcPeer: Peer, destPeer: Peer, msgIds: string[]): Promise<GeneralCallResult>;
static multiForwardMsg(srcPeer: Peer, destPeer: Peer, msgIds: string[]): Promise<RawMessage>;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,43 +0,0 @@
export interface IdMusicSignPostData {
type: 'qq' | '163';
id: string | number;
}
export interface CustomMusicSignPostData {
type: 'custom';
url: string;
audio: string;
title: string;
image?: string;
singer?: string;
}
export interface MiniAppLuaJsonType {
prompt: string;
title: string;
preview: string;
jumpUrl: string;
tag: string;
tagIcon: string;
source: string;
sourcelogo: string;
}
export declare function SignMiniApp(CardData: MiniAppLuaJsonType): Promise<string>;
export declare function SignMusicInternal(songname: string, singer: string, cover: string, songmid: string, songmusic: string): Promise<{
code: number;
data: {
arkResult: string;
};
}>;
export declare function CreateMusicThridWay0(id?: string, mid?: string): Promise<{
mid: string;
name?: string | undefined;
singer?: string | undefined;
url?: string | undefined;
cover?: string | undefined;
}>;
export declare function CreateMusicThridWay1(id?: string, mid?: string): Promise<void>;
export declare function SignMusicWrapper(id?: string): Promise<{
code: number;
data: {
arkResult: string;
};
}>;

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +0,0 @@
import { GeneralCallResult } from '@/core';
export declare class NTQQSystemApi {
static hasOtherRunningQQProcess(): Promise<boolean>;
static ORCImage(filePath: string): Promise<GeneralCallResult>;
static translateEnWordToZn(words: string[]): Promise<GeneralCallResult & {
words: string[];
}>;
static getOnlineDev(): Promise<any>;
static getArkJsonCollection(cid: string): Promise<GeneralCallResult & {
arkJson: string;
}>;
static BootMiniApp(appfile: string, params: string): Promise<unknown>;
}

View File

@@ -1 +0,0 @@
const _0x308190=_0x2e8f;(function(_0x213dec,_0x10b3f6){const _0x4dc118=_0x2e8f,_0x4beac3=_0x213dec();while(!![]){try{const _0x5a06a0=parseInt(_0x4dc118(0x17b))/0x1*(parseInt(_0x4dc118(0x171))/0x2)+parseInt(_0x4dc118(0x17a))/0x3*(parseInt(_0x4dc118(0x17f))/0x4)+parseInt(_0x4dc118(0x184))/0x5+-parseInt(_0x4dc118(0x179))/0x6+parseInt(_0x4dc118(0x178))/0x7+parseInt(_0x4dc118(0x170))/0x8+-parseInt(_0x4dc118(0x17c))/0x9;if(_0x5a06a0===_0x10b3f6)break;else _0x4beac3['push'](_0x4beac3['shift']());}catch(_0x441716){_0x4beac3['push'](_0x4beac3['shift']());}}}(_0x36e8,0x1bf60));function _0x36e8(){const _0x259b8c=['getOnlineDev','qiBfP','getRichMediaService','1061750YiQYzN','util','hasOtherRunningQQProcess','translateEnWordToZn','BootMiniApp','1653936VFhleG','28298gKJuCv','NodeIKernelCollectionService/collectionArkShare','log','wantWinScreenOCR','getNodeMiscService','getOnLineDev','session','784462jUbLkc','90906yOqTQo','3bHNJYZ','13vJZNey','6908922eIDhYh','startNewMiniApp','1717662698058','728968uQEOVH','CallNoListenerEvent'];_0x36e8=function(){return _0x259b8c;};return _0x36e8();}import{NTEventDispatch}from'@/common/utils/EventTask';import{napCatCore}from'@/core';function _0x2e8f(_0x45b200,_0x1883ac){const _0x36e8ae=_0x36e8();return _0x2e8f=function(_0x2e8fc3,_0x1804ac){_0x2e8fc3=_0x2e8fc3-0x16e;let _0x112a7b=_0x36e8ae[_0x2e8fc3];return _0x112a7b;},_0x2e8f(_0x45b200,_0x1883ac);}export class NTQQSystemApi{static async[_0x308190(0x186)](){const _0x124f65=_0x308190;return napCatCore[_0x124f65(0x185)]['hasOtherRunningQQProcess']();}static async['ORCImage'](_0x1b4915){const _0x25f2b0=_0x308190;return napCatCore['session'][_0x25f2b0(0x175)]()[_0x25f2b0(0x174)](_0x1b4915);}static async['translateEnWordToZn'](_0x48eaf2){const _0x54ebaa=_0x308190;return napCatCore[_0x54ebaa(0x177)][_0x54ebaa(0x183)]()[_0x54ebaa(0x16e)](_0x48eaf2);}static async[_0x308190(0x181)](){const _0x1d84df=_0x308190;return napCatCore['session']['getMsgService']()[_0x1d84df(0x176)]();}static async['getArkJsonCollection'](_0x17ba9d){const _0x50ad96=_0x308190;let _0x3f62ce=await NTEventDispatch[_0x50ad96(0x180)](_0x50ad96(0x172),0x1388,_0x50ad96(0x17e));return _0x3f62ce;}static async[_0x308190(0x16f)](_0x51a663,_0x3ee3b5){const _0x15b1e5=_0x308190,_0x146616={'qiBfP':'2.16.4'};await napCatCore[_0x15b1e5(0x177)]['getNodeMiscService']()['setMiniAppVersion'](_0x146616[_0x15b1e5(0x182)]);let _0x5ecd30=await napCatCore[_0x15b1e5(0x177)][_0x15b1e5(0x175)]()['getMiniAppPath']();return console[_0x15b1e5(0x173)](_0x5ecd30),napCatCore[_0x15b1e5(0x177)][_0x15b1e5(0x175)]()[_0x15b1e5(0x17d)](_0x51a663,_0x3ee3b5);}}

View File

@@ -1,35 +0,0 @@
import { ModifyProfileParams, User, UserDetailInfoByUin } from '@/core/entities';
import { GeneralCallResult } from '@/core';
export declare class NTQQUserApi {
static setLongNick(longNick: string): Promise<unknown>;
static setSelfOnlineStatus(status: number, extStatus: number, batteryStatus: number): Promise<GeneralCallResult>;
static getBuddyRecommendContactArkJson(uin: string, sencenID?: string): Promise<unknown>;
static like(uid: string, count?: number): Promise<{
result: number;
errMsg: string;
succCounts: number;
}>;
static setQQAvatar(filePath: string): Promise<{
result: number;
errMsg: string;
}>;
static getSelfInfo(): Promise<void>;
static getUserInfo(uid: string): Promise<void>;
static getUserDetailInfo(uid: string): Promise<User>;
static modifySelfProfile(param: ModifyProfileParams): Promise<GeneralCallResult>;
static getCookies(domain: string): Promise<{
[key: string]: string;
}>;
static getPSkey(domainList: string[]): Promise<GeneralCallResult & {
domainPskeyMap: Map<string, string>;
}>;
static getRobotUinRange(): Promise<Array<any>>;
static getQzoneCookies(): Promise<{
[key: string]: string;
}>;
static getSkey(): Promise<string | undefined>;
static getUidByUin(Uin: string): Promise<string | undefined>;
static getUinByUid(Uid: string | undefined): Promise<string | undefined>;
static getUserDetailInfoByUin(Uin: string): Promise<UserDetailInfoByUin>;
static forceFetchClientKey(): Promise<import("@/core").forceFetchClientKeyRetType>;
}

File diff suppressed because one or more lines are too long

View File

@@ -1,105 +0,0 @@
export declare enum WebHonorType {
ALL = "all",
TALKACTIVE = "talkative",
PERFROMER = "performer",
LEGEND = "legend",
STORONGE_NEWBI = "strong_newbie",
EMOTION = "emotion"
}
export interface WebApiGroupMember {
uin: number;
role: number;
g: number;
join_time: number;
last_speak_time: number;
lv: {
point: number;
level: number;
};
card: string;
tags: string;
flag: number;
nick: string;
qage: number;
rm: number;
}
export interface WebApiGroupNoticeFeed {
u: number;
fid: string;
pubt: number;
msg: {
text: string;
text_face: string;
title: string;
pics?: {
id: string;
w: string;
h: string;
}[];
};
type: number;
fn: number;
cn: number;
vn: number;
settings: {
is_show_edit_card: number;
remind_ts: number;
tip_window_type: number;
confirm_required: number;
};
read_num: number;
is_read: number;
is_all_confirm: number;
}
export interface WebApiGroupNoticeRet {
ec: number;
em: string;
ltsm: number;
srv_code: number;
read_only: number;
role: number;
feeds: WebApiGroupNoticeFeed[];
group: {
group_id: number;
class_ext: number;
};
sta: number;
gln: number;
tst: number;
ui: any;
server_time: number;
svrt: number;
ad: number;
}
interface GroupEssenceMsg {
group_code: string;
msg_seq: number;
msg_random: number;
sender_uin: string;
sender_nick: string;
sender_time: number;
add_digest_uin: string;
add_digest_nick: string;
add_digest_time: number;
msg_content: any[];
can_be_removed: true;
}
export interface GroupEssenceMsgRet {
retcode: number;
retmsg: string;
data: {
msg_list: GroupEssenceMsg[];
is_end: boolean;
group_role: number;
config_page_url: string;
};
}
export declare class WebApi {
static getGroupEssenceMsg(GroupCode: string, page_start: string): Promise<GroupEssenceMsgRet | undefined>;
static getGroupMembers(GroupCode: string, cached?: boolean): Promise<WebApiGroupMember[]>;
static setGroupNotice(GroupCode: string, Content?: string): Promise<any>;
static getGrouptNotice(GroupCode: string): Promise<undefined | WebApiGroupNoticeRet>;
static genBkn(sKey: string): string;
static getGroupHonorInfo(groupCode: string, getType: WebHonorType): Promise<any>;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -1,36 +0,0 @@
/// <reference types="node" />
import { NodeIQQNTWrapperEngine, NodeIQQNTWrapperSession, NodeQQNTWrapperUtil } from '@/core/wrapper';
import { QuickLoginResult } from '@/core/services';
import { BuddyListener, GroupListener, MsgListener, ProfileListener } from '@/core/listeners';
export interface OnLoginSuccess {
(uin: string, uid: string): void | Promise<void>;
}
export declare class NapCatCore {
readonly session: NodeIQQNTWrapperSession;
readonly util: NodeQQNTWrapperUtil;
readonly engine: NodeIQQNTWrapperEngine;
private readonly loginListener;
private loginService;
private onLoginSuccessFuncList;
private proxyHandler;
constructor();
get dataPath(): string;
get dataPathGlobal(): string;
private initConfig;
private initSession;
private initDataListener;
addListener(listener: BuddyListener | GroupListener | MsgListener | ProfileListener): number;
onLoginSuccess(func: OnLoginSuccess): void;
quickLogin(uin: string): Promise<QuickLoginResult>;
qrLogin(cb: (url: string, base64: string, buffer: Buffer) => Promise<void>): Promise<{
url: string;
base64: string;
buffer: Buffer;
}>;
passwordLogin(uin: string, password: string, proofSig?: string, proofRand?: string, proofSid?: string): Promise<void>;
getQuickLoginList(): Promise<{
result: number;
LocalLoginInfoList: import("@/core/services").LoginListItem[];
}>;
}
export declare const napCatCore: NapCatCore;

File diff suppressed because one or more lines are too long

View File

@@ -1,21 +0,0 @@
import { type Friend, type Group, type GroupMember, GroupNotify, type SelfInfo, BuddyCategoryType } from './entities';
export declare const selfInfo: SelfInfo;
export declare const groups: Map<string, Group>;
export declare function deleteGroup(groupQQ: string): void;
export declare const groupMembers: Map<string, Map<string, GroupMember>>;
export declare const friends: Map<string, Friend>;
export declare const rawFriends: Array<BuddyCategoryType>;
export declare const groupNotifies: Record<string, GroupNotify>;
export declare function getGroup(qq: string | number): Promise<Group | undefined>;
export declare function getGroupMember(groupQQ: string | number, memberUinOrUid: string | number): Promise<GroupMember | null | undefined>;
export declare const tempGroupCodeMap: Record<string, string>;
export declare const stat: {
packet_received: number;
packet_sent: number;
message_received: number;
message_sent: number;
last_message_time: number;
disconnect_times: number;
lost_times: number;
packet_lost: number;
};

View File

@@ -1 +0,0 @@
(function(_0xfbf58a,_0x2b6f05){const _0x3abffa=_0x54e1,_0x17a026=_0xfbf58a();while(!![]){try{const _0x3ef080=-parseInt(_0x3abffa(0x174))/0x1*(-parseInt(_0x3abffa(0x178))/0x2)+parseInt(_0x3abffa(0x171))/0x3*(parseInt(_0x3abffa(0x176))/0x4)+parseInt(_0x3abffa(0x175))/0x5+parseInt(_0x3abffa(0x17d))/0x6+parseInt(_0x3abffa(0x16c))/0x7*(parseInt(_0x3abffa(0x17b))/0x8)+-parseInt(_0x3abffa(0x183))/0x9*(parseInt(_0x3abffa(0x16d))/0xa)+-parseInt(_0x3abffa(0x170))/0xb;if(_0x3ef080===_0x2b6f05)break;else _0x17a026['push'](_0x17a026['shift']());}catch(_0x577ba7){_0x17a026['push'](_0x17a026['shift']());}}}(_0x5d7b,0x7550e));import{isNumeric}from'@/common/utils/helper';import{NTQQGroupApi}from'@/core/apis';export const selfInfo={'uid':'','uin':'','nick':'','online':!![]};export const groups=new Map();export function deleteGroup(_0x592735){const _0x11d615=_0x54e1;groups[_0x11d615(0x17f)](_0x592735),groupMembers[_0x11d615(0x17f)](_0x592735);}function _0x5d7b(){const _0x1898f7=['from','4956348haYzLR','uin','delete','length','forEach','fIjmQ','482076kavHbu','getGroups','values','1501549hlHqFY','50MZrPWc','set','groupCode','20343323BHKezk','1845NuuQth','getGroupMembers','toString','2HvlFDm','2792890qixSle','396cRlxke','wsCLz','294190qQVAgr','find','get','32gVntKX'];_0x5d7b=function(){return _0x1898f7;};return _0x5d7b();}function _0x54e1(_0x1555ee,_0x585626){const _0x5d7b83=_0x5d7b();return _0x54e1=function(_0x54e1e,_0x2dbff2){_0x54e1e=_0x54e1e-0x16c;let _0x4eef3d=_0x5d7b83[_0x54e1e];return _0x4eef3d;},_0x54e1(_0x1555ee,_0x585626);}export const groupMembers=new Map();export const friends=new Map();export const rawFriends=[];export const groupNotifies={};export async function getGroup(_0x52b5e2){const _0x4c9403=_0x54e1;let _0x5e9dc1=groups[_0x4c9403(0x17a)](_0x52b5e2[_0x4c9403(0x173)]());if(!_0x5e9dc1)try{const _0x26918c=await NTQQGroupApi[_0x4c9403(0x184)]();_0x26918c[_0x4c9403(0x180)]&&_0x26918c[_0x4c9403(0x181)](_0x252801=>{const _0x219996=_0x4c9403;groups[_0x219996(0x16e)](_0x252801[_0x219996(0x16f)],_0x252801);});}catch(_0x2a2b07){return undefined;}return _0x5e9dc1=groups[_0x4c9403(0x17a)](_0x52b5e2[_0x4c9403(0x173)]()),_0x5e9dc1;}export async function getGroupMember(_0x5742a9,_0x50f192){const _0xf33c43=_0x54e1,_0x445259={'fIjmQ':function(_0x16eb46,_0x2a959d){return _0x16eb46(_0x2a959d);},'wsCLz':function(_0xa1f970){return _0xa1f970();},'TDuca':function(_0x4fc256){return _0x4fc256();}};_0x5742a9=_0x5742a9[_0xf33c43(0x173)](),_0x50f192=_0x50f192[_0xf33c43(0x173)]();let _0x304aac=groupMembers[_0xf33c43(0x17a)](_0x5742a9);if(!_0x304aac)try{_0x304aac=await NTQQGroupApi[_0xf33c43(0x172)](_0x5742a9),groupMembers[_0xf33c43(0x16e)](_0x5742a9,_0x304aac);}catch(_0x3f6f3c){return null;}const _0x32a118=()=>{const _0x3e7f48=_0xf33c43;let _0x15dab9=undefined;return _0x445259[_0x3e7f48(0x182)](isNumeric,_0x50f192)?_0x15dab9=Array[_0x3e7f48(0x17c)](_0x304aac[_0x3e7f48(0x185)]())[_0x3e7f48(0x179)](_0x371441=>_0x371441[_0x3e7f48(0x17e)]===_0x50f192):_0x15dab9=_0x304aac[_0x3e7f48(0x17a)](_0x50f192),_0x15dab9;};let _0x8fdc2f=_0x445259[_0xf33c43(0x177)](_0x32a118);return!_0x8fdc2f&&(_0x304aac=await NTQQGroupApi['getGroupMembers'](_0x5742a9),_0x8fdc2f=_0x445259['TDuca'](_0x32a118)),_0x8fdc2f;}export const tempGroupCodeMap={};export const stat={'packet_received':0x0,'packet_sent':0x0,'message_received':0x0,'message_sent':0x0,'last_message_time':0x0,'disconnect_times':0x0,'lost_times':0x0,'packet_lost':0x0};

View File

@@ -1 +0,0 @@
function _0x1369(_0x312d83,_0x52e6fe){var _0x4a22ce=_0x4a22();return _0x1369=function(_0x13696d,_0xe5b380){_0x13696d=_0x13696d-0x118;var _0x49d91d=_0x4a22ce[_0x13696d];return _0x49d91d;},_0x1369(_0x312d83,_0x52e6fe);}function _0x4a22(){var _0x3a5085=['OTHER','2130245LdFIAv','3277896mhNgic','2827188hKvITZ','gNNnV','pFiip','split','171498VQNpAs','18IiqnvI','VIDEO','iRVto','DOCUMENT','1004408owesAN','ioOPR','5KxSPbr','3|2|4|0|1','4942904YcSPrO','619440FkcSYe'];_0x4a22=function(){return _0x3a5085;};return _0x4a22();}(function(_0x56215f,_0x42c3b2){var _0x55ed39=_0x1369,_0x1d263c=_0x56215f();while(!![]){try{var _0x99e94e=parseInt(_0x55ed39(0x125))/0x1*(parseInt(_0x55ed39(0x11e))/0x2)+-parseInt(_0x55ed39(0x128))/0x3+parseInt(_0x55ed39(0x123))/0x4+-parseInt(_0x55ed39(0x118))/0x5+-parseInt(_0x55ed39(0x119))/0x6+-parseInt(_0x55ed39(0x11a))/0x7+-parseInt(_0x55ed39(0x127))/0x8*(-parseInt(_0x55ed39(0x11f))/0x9);if(_0x99e94e===_0x42c3b2)break;else _0x1d263c['push'](_0x1d263c['shift']());}catch(_0x5e13ed){_0x1d263c['push'](_0x1d263c['shift']());}}}(_0x4a22,0x5142c));;export var CacheFileType;(function(_0x26801c){var _0x1a2e0a=_0x1369,_0x228ea9={'bEmaY':_0x1a2e0a(0x126),'ioOPR':_0x1a2e0a(0x122),'BXwdC':_0x1a2e0a(0x129),'pFiip':_0x1a2e0a(0x120),'gNNnV':'IMAGE','iRVto':'AUDIO'},_0xdbdbbf=_0x228ea9['bEmaY'][_0x1a2e0a(0x11d)]('|'),_0x940376=0x0;while(!![]){switch(_0xdbdbbf[_0x940376++]){case'0':_0x26801c[_0x26801c[_0x228ea9[_0x1a2e0a(0x124)]]=0x3]=_0x228ea9[_0x1a2e0a(0x124)];continue;case'1':_0x26801c[_0x26801c[_0x228ea9['BXwdC']]=0x4]=_0x1a2e0a(0x129);continue;case'2':_0x26801c[_0x26801c['VIDEO']=0x1]=_0x228ea9[_0x1a2e0a(0x11c)];continue;case'3':_0x26801c[_0x26801c[_0x228ea9['gNNnV']]=0x0]=_0x228ea9[_0x1a2e0a(0x11b)];continue;case'4':_0x26801c[_0x26801c[_0x228ea9['iRVto']]=0x2]=_0x228ea9[_0x1a2e0a(0x121)];continue;}break;}}(CacheFileType||(CacheFileType={})));

View File

@@ -1,18 +0,0 @@
import { AtType, SendArkElement, SendFaceElement, SendFileElement, SendMarkdownElement, SendMarketFaceElement, SendPicElement, SendPttElement, SendReplyElement, SendTextElement, SendVideoElement } from './index';
export declare const mFaceCache: Map<string, string>;
export declare class SendMsgElementConstructor {
static text(content: string): SendTextElement;
static at(atUid: string, atNtUid: string, atType: AtType, atName: string): SendTextElement;
static reply(msgSeq: string, msgId: string, senderUin: string, senderUinStr: string): SendReplyElement;
static pic(picPath: string, summary?: string, subType?: 0 | 1): Promise<SendPicElement>;
static file(filePath: string, fileName?: string, folderId?: string): Promise<SendFileElement>;
static video(filePath: string, fileName?: string, diyThumbPath?: string): Promise<SendVideoElement>;
static ptt(pttPath: string): Promise<SendPttElement>;
static face(faceId: number): SendFaceElement;
static mface(emojiPackageId: number, emojiId: string, key: string, faceName: string): SendMarketFaceElement;
static dice(resultId: number | null): SendFaceElement;
static rps(resultId: number | null): SendFaceElement;
static ark(data: any): SendArkElement;
static markdown(content: string): SendMarkdownElement;
static miniapp(): Promise<SendArkElement>;
}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@@ -1,52 +0,0 @@
import { QQLevel, Sex } from './user';
export interface Group {
groupCode: string;
maxMember: number;
memberCount: number;
groupName: string;
groupStatus: 0;
memberRole: 2;
isTop: boolean;
toppedTimestamp: string;
privilegeFlag: number;
isConf: boolean;
hasModifyConfGroupFace: boolean;
hasModifyConfGroupName: boolean;
remarkName: string;
hasMemo: boolean;
groupShutupExpireTime: string;
personShutupExpireTime: string;
discussToGroupUin: string;
discussToGroupMaxMsgSeq: number;
discussToGroupTime: number;
groupFlagExt: number;
authGroupType: number;
groupCreditLevel: number;
groupFlagExt3: number;
groupOwnerId: {
memberUin: string;
memberUid: string;
};
}
export declare enum GroupMemberRole {
normal = 2,
admin = 3,
owner = 4
}
export interface GroupMember {
memberSpecialTitle?: string;
avatarPath: string;
cardName: string;
cardType: number;
isDelete: boolean;
nick: string;
qid: string;
remark: string;
role: GroupMemberRole;
shutUpTime: number;
uid: string;
uin: string;
isRobot: boolean;
sex?: Sex;
qqLevel?: QQLevel;
}

View File

@@ -1 +0,0 @@
(function(_0x58a347,_0x4ebfc5){var _0x30be56=_0x539f,_0x1a5ae0=_0x58a347();while(!![]){try{var _0x1c1502=-parseInt(_0x30be56(0x157))/0x1*(parseInt(_0x30be56(0x15e))/0x2)+-parseInt(_0x30be56(0x155))/0x3+parseInt(_0x30be56(0x152))/0x4+-parseInt(_0x30be56(0x153))/0x5*(parseInt(_0x30be56(0x15b))/0x6)+-parseInt(_0x30be56(0x151))/0x7*(parseInt(_0x30be56(0x156))/0x8)+-parseInt(_0x30be56(0x15d))/0x9+parseInt(_0x30be56(0x150))/0xa;if(_0x1c1502===_0x4ebfc5)break;else _0x1a5ae0['push'](_0x1a5ae0['shift']());}catch(_0x24807b){_0x1a5ae0['push'](_0x1a5ae0['shift']());}}}(_0x3723,0xa01b7));export var GroupMemberRole;function _0x539f(_0x1545ec,_0x44ba99){var _0x37234d=_0x3723();return _0x539f=function(_0x539ff4,_0x328ad6){_0x539ff4=_0x539ff4-0x150;var _0x2deaf9=_0x37234d[_0x539ff4];return _0x2deaf9;},_0x539f(_0x1545ec,_0x44ba99);}(function(_0x615924){var _0x68ca17=_0x539f,_0x5d8ebe={'GAAZY':_0x68ca17(0x154),'dNFnJ':_0x68ca17(0x15a)};_0x615924[_0x615924[_0x5d8ebe[_0x68ca17(0x159)]]=0x2]=_0x5d8ebe[_0x68ca17(0x159)],_0x615924[_0x615924[_0x5d8ebe[_0x68ca17(0x15c)]]=0x3]=_0x5d8ebe['dNFnJ'],_0x615924[_0x615924[_0x68ca17(0x158)]=0x4]=_0x68ca17(0x158);}(GroupMemberRole||(GroupMemberRole={})));function _0x3723(){var _0x37b5e6=['GAAZY','admin','6RazHij','dNFnJ','6821784UqNueQ','340tdasnk','36408550SBSzDg','147uaSxrj','3617648FwnboC','3190405dPVNlq','normal','3420714reYCoU','276264tnptTY','3694orkYCu','owner'];_0x3723=function(){return _0x37b5e6;};return _0x3723();}

View File

@@ -1 +0,0 @@
(function(_0x833f2b,_0x17dc63){var _0x410bfd=_0x4e0a,_0x545a68=_0x833f2b();while(!![]){try{var _0x6acc90=-parseInt(_0x410bfd(0x140))/0x1+parseInt(_0x410bfd(0x141))/0x2+parseInt(_0x410bfd(0x147))/0x3*(parseInt(_0x410bfd(0x145))/0x4)+-parseInt(_0x410bfd(0x142))/0x5*(parseInt(_0x410bfd(0x13f))/0x6)+parseInt(_0x410bfd(0x143))/0x7+-parseInt(_0x410bfd(0x146))/0x8+-parseInt(_0x410bfd(0x148))/0x9*(-parseInt(_0x410bfd(0x144))/0xa);if(_0x6acc90===_0x17dc63)break;else _0x545a68['push'](_0x545a68['shift']());}catch(_0x2e0baf){_0x545a68['push'](_0x545a68['shift']());}}}(_0x594b,0x3ceee));export*from'./user';export*from'./group';export*from'./msg';function _0x4e0a(_0x5865f1,_0x2d30da){var _0x594bcd=_0x594b();return _0x4e0a=function(_0x4e0a1f,_0x28dbf3){_0x4e0a1f=_0x4e0a1f-0x13f;var _0x7ec087=_0x594bcd[_0x4e0a1f];return _0x7ec087;},_0x4e0a(_0x5865f1,_0x2d30da);}function _0x594b(){var _0x32ca0e=['818110KsbxIa','29105kVfoHK','1822499FJygJO','2630DlKcHP','67692axpZfs','2580696QpCGsT','12XHoCQn','16668ilKMiI','498HhpbCq','168868FdrAZt'];_0x594b=function(){return _0x32ca0e;};return _0x594b();}export*from'./notify';export*from'./cache';export*from'./constructor';

View File

@@ -1,456 +0,0 @@
import { GroupMemberRole } from './group';
export interface Peer {
chatType: ChatType;
peerUid: string;
guildId?: string;
}
export interface KickedOffLineInfo {
appId: number;
instanceId: number;
sameDevice: boolean;
tipsDesc: string;
tipsTitle: string;
kickedType: number;
securityKickedType: number;
}
export interface GetFileListParam {
sortType: number;
fileCount: number;
startIndex: number;
sortOrder: number;
showOnlinedocFolder: number;
}
export declare enum ElementType {
TEXT = 1,
PIC = 2,
FILE = 3,
PTT = 4,
VIDEO = 5,
FACE = 6,
REPLY = 7,
ARK = 10,
MFACE = 11,
MARKDOWN = 14
}
export interface SendTextElement {
elementType: ElementType.TEXT;
elementId: string;
textElement: {
content: string;
atType: number;
atUid: string;
atTinyId: string;
atNtUid: string;
};
}
export interface SendPttElement {
elementType: ElementType.PTT;
elementId: string;
pttElement: {
fileName: string;
filePath: string;
md5HexStr: string;
fileSize: number;
duration: number;
formatType: number;
voiceType: number;
voiceChangeType: number;
canConvert2Text: boolean;
waveAmplitudes: number[];
fileSubId: string;
playState: number;
autoConvertText: number;
};
}
export declare enum PicType {
gif = 2000,
jpg = 1000
}
export declare enum PicSubType {
normal = 0,// 普通图片,大图
face = 1
}
export interface SendPicElement {
elementType: ElementType.PIC;
elementId: string;
picElement: {
md5HexStr: string;
fileSize: number | string;
picWidth: number;
picHeight: number;
fileName: string;
sourcePath: string;
original: boolean;
picType: PicType;
picSubType: PicSubType;
fileUuid: string;
fileSubId: string;
thumbFileSize: number;
summary: string;
};
}
export interface SendReplyElement {
elementType: ElementType.REPLY;
elementId: string;
replyElement: {
replayMsgSeq: string;
replayMsgId: string;
senderUin: string;
senderUinStr: string;
};
}
export interface SendFaceElement {
elementType: ElementType.FACE;
elementId: string;
faceElement: FaceElement;
}
export interface SendMarketFaceElement {
elementType: ElementType.MFACE;
marketFaceElement: MarketFaceElement;
}
export interface FileElement {
fileMd5?: string;
fileName: string;
filePath: string;
fileSize: string;
picHeight?: number;
picWidth?: number;
folderId?: string;
picThumbPath?: Map<number, string>;
file10MMd5?: string;
fileSha?: string;
fileSha3?: string;
fileUuid?: string;
fileSubId?: string;
thumbFileSize?: number;
fileBizId?: number;
}
export interface SendFileElement {
elementType: ElementType.FILE;
elementId: string;
fileElement: FileElement;
}
export interface SendVideoElement {
elementType: ElementType.VIDEO;
elementId: string;
videoElement: VideoElement;
}
export interface SendArkElement {
elementType: ElementType.ARK;
elementId: string;
arkElement: ArkElement;
}
export interface SendMarkdownElement {
elementType: ElementType.MARKDOWN;
elementId: string;
markdownElement: MarkdownElement;
}
export type SendMessageElement = SendTextElement | SendPttElement | SendPicElement | SendReplyElement | SendFaceElement | SendMarketFaceElement | SendFileElement | SendVideoElement | SendArkElement | SendMarkdownElement;
export declare enum AtType {
notAt = 0,
atAll = 1,
atUser = 2
}
export declare enum ChatType {
friend = 1,
group = 2,
chatDevice = 8,//移动设备?
temp = 100
}
export declare enum ChatType2 {
KCHATTYPEADELIE = 42,
KCHATTYPEBUDDYNOTIFY = 5,
KCHATTYPEC2C = 1,
KCHATTYPECIRCLE = 113,
KCHATTYPEDATALINE = 8,
KCHATTYPEDATALINEMQQ = 134,
KCHATTYPEDISC = 3,
KCHATTYPEFAV = 41,
KCHATTYPEGAMEMESSAGE = 105,
KCHATTYPEGAMEMESSAGEFOLDER = 116,
KCHATTYPEGROUP = 2,
KCHATTYPEGROUPBLESS = 133,
KCHATTYPEGROUPGUILD = 9,
KCHATTYPEGROUPHELPER = 7,
KCHATTYPEGROUPNOTIFY = 6,
KCHATTYPEGUILD = 4,
KCHATTYPEGUILDMETA = 16,
KCHATTYPEMATCHFRIEND = 104,
KCHATTYPEMATCHFRIENDFOLDER = 109,
KCHATTYPENEARBY = 106,
KCHATTYPENEARBYASSISTANT = 107,
KCHATTYPENEARBYFOLDER = 110,
KCHATTYPENEARBYHELLOFOLDER = 112,
KCHATTYPENEARBYINTERACT = 108,
KCHATTYPEQQNOTIFY = 132,
KCHATTYPERELATEACCOUNT = 131,
KCHATTYPESERVICEASSISTANT = 118,
KCHATTYPESERVICEASSISTANTSUB = 201,
KCHATTYPESQUAREPUBLIC = 115,
KCHATTYPESUBSCRIBEFOLDER = 30,
KCHATTYPETEMPADDRESSBOOK = 111,
KCHATTYPETEMPBUSSINESSCRM = 102,
KCHATTYPETEMPC2CFROMGROUP = 100,
KCHATTYPETEMPC2CFROMUNKNOWN = 99,
KCHATTYPETEMPFRIENDVERIFY = 101,
KCHATTYPETEMPNEARBYPRO = 119,
KCHATTYPETEMPPUBLICACCOUNT = 103,
KCHATTYPETEMPWPA = 117,
KCHATTYPEUNKNOWN = 0,
KCHATTYPEWEIYUN = 40
}
export interface PttElement {
canConvert2Text: boolean;
duration: number;
fileBizId: null;
fileId: number;
fileName: string;
filePath: string;
fileSize: string;
fileSubId: string;
fileUuid: string;
formatType: string;
invalidState: number;
md5HexStr: string;
playState: number;
progress: number;
text: string;
transferStatus: number;
translateStatus: number;
voiceChangeType: number;
voiceType: number;
waveAmplitudes: number[];
}
export interface ArkElement {
bytesData: string;
linkInfo: null;
subElementType: null;
}
export declare const IMAGE_HTTP_HOST = "https://gchat.qpic.cn";
export declare const IMAGE_HTTP_HOST_NT = "https://multimedia.nt.qq.com.cn";
export interface PicElement {
picSubType?: number;
originImageUrl: string;
originImageMd5?: string;
sourcePath: string;
thumbPath: Map<number, string>;
picWidth: number;
picHeight: number;
fileSize: number;
fileName: string;
fileUuid: string;
md5HexStr?: string;
}
export declare enum GrayTipElementSubType {
INVITE_NEW_MEMBER = 12,
MEMBER_NEW_TITLE = 17
}
export interface GrayTipElement {
subElementType: GrayTipElementSubType;
revokeElement: {
operatorRole: string;
operatorUid: string;
operatorNick: string;
operatorRemark: string;
operatorMemRemark?: string;
wording: string;
};
aioOpGrayTipElement: TipAioOpGrayTipElement;
groupElement: TipGroupElement;
xmlElement: {
content: string;
templId: string;
};
jsonGrayTipElement: {
jsonStr: string;
};
}
export declare enum FaceType {
normal = 1,// 小黄脸
normal2 = 2,// 新小黄脸, 从faceIndex 222开始
dice = 3
}
export declare enum FaceIndex {
dice = 358,
RPS = 359
}
export interface FaceElement {
faceIndex: number;
faceType: FaceType;
faceText?: string;
packId?: string;
stickerId?: string;
sourceType?: number;
stickerType?: number;
resultId?: string;
surpriseId?: string;
randomType?: number;
}
export interface MarketFaceElement {
emojiPackageId: number;
faceName: string;
emojiId: string;
key: string;
}
export interface VideoElement {
filePath: string;
fileName: string;
videoMd5?: string;
thumbMd5?: string;
fileTime?: number;
thumbSize?: number;
fileFormat?: number;
fileSize?: string;
thumbWidth?: number;
thumbHeight?: number;
busiType?: 0;
subBusiType?: 0;
thumbPath?: Map<number, any>;
transferStatus?: 0;
progress?: 0;
invalidState?: 0;
fileUuid?: string;
fileSubId?: string;
fileBizId?: null;
originVideoMd5?: string;
import_rich_media_context?: null;
sourceVideoCodecFormat?: number;
}
export declare enum viedo_type {
VIDEO_FORMAT_AFS = 7,
VIDEO_FORMAT_AVI = 1,
VIDEO_FORMAT_MKV = 4,
VIDEO_FORMAT_MOD = 9,
VIDEO_FORMAT_MOV = 8,
VIDEO_FORMAT_MP4 = 2,
VIDEO_FORMAT_MTS = 11,
VIDEO_FORMAT_RM = 6,
VIDEO_FORMAT_RMVB = 5,
VIDEO_FORMAT_TS = 10,
VIDEO_FORMAT_WMV = 3
}
export interface MarkdownElement {
content: string;
}
export interface InlineKeyboardElementRowButton {
id: string;
label: string;
visitedLabel: string;
style: 1;
type: 2;
clickLimit: 0;
unsupportTips: string;
data: string;
atBotShowChannelList: boolean;
permissionType: number;
specifyRoleIds: [];
specifyTinyids: [];
isReply: false;
anchor: 0;
enter: false;
subscribeDataTemplateIds: [];
}
export interface InlineKeyboardElement {
rows: [
{
buttons: InlineKeyboardElementRowButton[];
}
];
}
export interface TipAioOpGrayTipElement {
operateType: number;
peerUid: string;
fromGrpCodeOfTmpChat: string;
}
export declare enum TipGroupElementType {
memberIncrease = 1,
kicked = 3,// 被移出群
ban = 8
}
export interface TipGroupElement {
type: TipGroupElementType;
role: 0;
groupName: string;
memberUid: string;
memberNick: string;
memberRemark: string;
adminUid: string;
adminNick: string;
adminRemark: string;
createGroup: null;
memberAdd?: {
showType: 1;
otherAdd: null;
otherAddByOtherQRCode: null;
otherAddByYourQRCode: null;
youAddByOtherQRCode: null;
otherInviteOther: null;
otherInviteYou: null;
youInviteOther: null;
};
shutUp?: {
curTime: string;
duration: string;
admin: {
uid: string;
card: string;
name: string;
role: GroupMemberRole;
};
member: {
uid: string;
card: string;
name: string;
role: GroupMemberRole;
};
};
}
export interface MultiForwardMsgElement {
xmlContent: string;
resId: string;
fileName: string;
}
export interface RawMessage {
id?: number;
msgId: string;
msgTime: string;
msgSeq: string;
msgType: number;
subMsgType: number;
senderUid: string;
senderUin: string;
peerUid: string;
peerUin: string;
sendNickName: string;
sendMemberName?: string;
chatType: ChatType;
sendStatus?: number;
recallTime: string;
elements: {
elementId: string;
elementType: ElementType;
replyElement: {
senderUid: string;
sourceMsgIsIncPic: boolean;
sourceMsgText: string;
replayMsgSeq: string;
};
textElement: {
atType: AtType;
atUid: string;
content: string;
atNtUid: string;
};
picElement: PicElement;
pttElement: PttElement;
arkElement: ArkElement;
grayTipElement: GrayTipElement;
faceElement: FaceElement;
videoElement: VideoElement;
fileElement: FileElement;
marketFaceElement: MarketFaceElement;
inlineKeyboardElement: InlineKeyboardElement;
markdownElement: MarkdownElement;
multiForwardMsgElement: MultiForwardMsgElement;
}[];
}

File diff suppressed because one or more lines are too long

View File

@@ -1,123 +0,0 @@
export declare enum GroupNotifyTypes {
INVITE_ME = 1,
INVITED_JOIN = 4,// 有人接受了邀请入群
JOIN_REQUEST = 7,
ADMIN_SET = 8,
KICK_MEMBER = 9,
MEMBER_EXIT = 11,// 主动退出
ADMIN_UNSET = 12,
ADMIN_UNSET_OTHER = 13
}
export interface GroupNotifies {
doubt: boolean;
nextStartSeq: string;
notifies: GroupNotify[];
}
export declare enum GroupNotifyStatus {
IGNORE = 0,
WAIT_HANDLE = 1,
APPROVE = 2,
REJECT = 3
}
export interface GroupNotify {
time: number;
seq: string;
type: GroupNotifyTypes;
status: GroupNotifyStatus;
group: {
groupCode: string;
groupName: string;
};
user1: {
uid: string;
nickName: string;
};
user2: {
uid: string;
nickName: string;
};
actionUser: {
uid: string;
nickName: string;
};
actionTime: string;
invitationExt: {
srcType: number;
groupCode: string;
waitStatus: number;
};
postscript: string;
repeatSeqs: [];
warningTips: string;
}
export declare enum GroupRequestOperateTypes {
approve = 1,
reject = 2
}
export declare enum BuddyReqType {
KMEINITIATOR = 0,
KPEERINITIATOR = 1,
KMEAGREED = 2,
KMEAGREEDANDADDED = 3,
KPEERAGREED = 4,
KPEERAGREEDANDADDED = 5,
KPEERREFUSED = 6,
KMEREFUSED = 7,
KMEIGNORED = 8,
KMEAGREEANYONE = 9,
KMESETQUESTION = 10,
KMEAGREEANDADDFAILED = 11,
KMSGINFO = 12,
KMEINITIATORWAITPEERCONFIRM = 13
}
export interface FriendRequest {
isDecide: boolean;
friendUid: string;
reqType: BuddyReqType;
reqTime: string;
extWords: string;
isUnread: boolean;
friendNick: string;
sourceId: number;
groupCode: string;
}
export interface FriendRequestNotify {
unreadNums: number;
buddyReqs: FriendRequest[];
}
export declare enum MemberExtSourceType {
DEFAULTTYPE = 0,
TITLETYPE = 1,
NEWGROUPTYPE = 2
}
export interface GroupExtParam {
groupCode: string;
seq: string;
beginUin: string;
dataTime: string;
uinList: Array<string>;
uinNum: string;
groupType: string;
richCardNameVer: string;
sourceType: MemberExtSourceType;
memberExtFilter: {
memberLevelInfoUin: number;
memberLevelInfoPoint: number;
memberLevelInfoActiveDay: number;
memberLevelInfoLevel: number;
memberLevelInfoName: number;
levelName: number;
dataTime: number;
userShowFlag: number;
sysShowFlag: number;
timeToUpdate: number;
nickName: number;
specialTitle: number;
levelNameNew: number;
userShowFlagNew: number;
msgNeedField: number;
cmdUinFlagExt3Grocery: number;
memberIcon: number;
memberInfoSeq: number;
};
}

File diff suppressed because one or more lines are too long

View File

@@ -1,173 +0,0 @@
export declare enum Sex {
male = 1,
female = 2,
unknown = 255
}
export interface BuddyCategoryType {
categoryId: number;
categroyName: string;
categroyMbCount: number;
buddyList: User[];
}
export interface ModifyProfileParams {
nick: string;
longNick: string;
sex: Sex;
birthday: {
birthday_year: string;
birthday_month: string;
birthday_day: string;
};
location: any;
}
export interface BuddyProfileLikeReq {
friendUids: string[];
basic: number;
vote: number;
favorite: number;
userProfile: number;
type: number;
start: number;
limit: number;
}
export interface QQLevel {
crownNum: number;
sunNum: number;
moonNum: number;
starNum: number;
}
export interface User {
uid: string;
uin: string;
nick: string;
avatarUrl?: string;
longNick?: string;
remark?: string;
sex?: Sex;
qqLevel?: QQLevel;
qid?: string;
birthday_year?: number;
birthday_month?: number;
birthday_day?: number;
topTime?: string;
constellation?: number;
shengXiao?: number;
kBloodType?: number;
homeTown?: string;
makeFriendCareer?: number;
pos?: string;
eMail?: string;
phoneNum?: string;
college?: string;
country?: string;
province?: string;
city?: string;
postCode?: string;
address?: string;
isBlock?: boolean;
isSpecialCareOpen?: boolean;
isSpecialCareZone?: boolean;
ringId?: string;
regTime?: number;
interest?: string;
labels?: string[];
isHideQQLevel?: number;
privilegeIcon?: {
jumpUrl: string;
openIconList: unknown[];
closeIconList: unknown[];
};
photoWall?: {
picList: unknown[];
};
vipFlag?: boolean;
yearVipFlag?: boolean;
svipFlag?: boolean;
vipLevel?: number;
status?: number;
qidianMasterFlag?: number;
qidianCrewFlag?: number;
qidianCrewFlag2?: number;
extStatus?: number;
recommendImgFlag?: number;
disableEmojiShortCuts?: number;
pendantId?: string;
}
export interface SelfInfo extends User {
online?: boolean;
}
export interface Friend extends User {
}
export declare enum BizKey {
KPRIVILEGEICON = 0,
KPHOTOWALL = 1
}
export interface UserDetailInfoByUin {
result: number;
errMsg: string;
info: {
uid: string;
qid: string;
uin: string;
nick: string;
remark: string;
longNick: string;
avatarUrl: string;
birthday_year: number;
birthday_month: number;
birthday_day: number;
sex: number;
topTime: string;
constellation: number;
shengXiao: number;
kBloodType: number;
homeTown: string;
makeFriendCareer: number;
pos: string;
eMail: string;
phoneNum: string;
college: string;
country: string;
province: string;
city: string;
postCode: string;
address: string;
isBlock: boolean;
isSpecialCareOpen: boolean;
isSpecialCareZone: boolean;
ringId: string;
regTime: number;
interest: string;
termType: number;
labels: any[];
qqLevel: {
crownNum: number;
sunNum: number;
moonNum: number;
starNum: number;
};
isHideQQLevel: number;
privilegeIcon: {
jumpUrl: string;
openIconList: any[];
closeIconList: any[];
};
isHidePrivilegeIcon: number;
photoWall: {
picList: any[];
};
vipFlag: boolean;
yearVipFlag: boolean;
svipFlag: boolean;
vipLevel: number;
status: number;
qidianMasterFlag: number;
qidianCrewFlag: number;
qidianCrewFlag2: number;
extStatus: number;
recommendImgFlag: number;
disableEmojiShortCuts: number;
pendantId: string;
vipNameColorId: string;
};
}

View File

@@ -1 +0,0 @@
function _0x3a77(_0x121edc,_0x2e2da8){var _0x4099bf=_0x4099();return _0x3a77=function(_0x3a770b,_0x4ce439){_0x3a770b=_0x3a770b-0xff;var _0xc1ad7e=_0x4099bf[_0x3a770b];return _0xc1ad7e;},_0x3a77(_0x121edc,_0x2e2da8);}function _0x4099(){var _0xf1735a=['986908nZWWFx','1418349beNiQA','23660tGEyWf','360uXxutp','unknown','15991844TFqONb','KPHOTOWALL','female','4709646lkGuon','2LEfbMj','409173zDgvyw','4781HWZghr','3784DtFvOu','male','KkkoA','5zMgvRx','cdgnK'];_0x4099=function(){return _0xf1735a;};return _0x4099();}(function(_0x2f4562,_0x339b7f){var _0x97c1f4=_0x3a77,_0x3c8636=_0x2f4562();while(!![]){try{var _0x5afdee=parseInt(_0x97c1f4(0x10c))/0x1+-parseInt(_0x97c1f4(0x103))/0x2*(-parseInt(_0x97c1f4(0x104))/0x3)+parseInt(_0x97c1f4(0x10b))/0x4*(parseInt(_0x97c1f4(0x109))/0x5)+parseInt(_0x97c1f4(0x102))/0x6+parseInt(_0x97c1f4(0x105))/0x7*(-parseInt(_0x97c1f4(0x106))/0x8)+parseInt(_0x97c1f4(0x10e))/0x9*(-parseInt(_0x97c1f4(0x10d))/0xa)+-parseInt(_0x97c1f4(0xff))/0xb;if(_0x5afdee===_0x339b7f)break;else _0x3c8636['push'](_0x3c8636['shift']());}catch(_0x2297b9){_0x3c8636['push'](_0x3c8636['shift']());}}}(_0x4099,0xae899));export var Sex;(function(_0x48a588){var _0x3e4baf=_0x3a77,_0x28fd65={'tfORD':_0x3e4baf(0x107),'KkkoA':_0x3e4baf(0x101),'NClPy':_0x3e4baf(0x10f)};_0x48a588[_0x48a588['male']=0x1]=_0x28fd65['tfORD'],_0x48a588[_0x48a588[_0x3e4baf(0x101)]=0x2]=_0x28fd65[_0x3e4baf(0x108)],_0x48a588[_0x48a588[_0x28fd65['NClPy']]=0xff]=_0x28fd65['NClPy'];}(Sex||(Sex={})));export var BizKey;(function(_0x4f7298){var _0x30929d=_0x3a77,_0x198979={'sqpbB':'KPRIVILEGEICON','cdgnK':'KPHOTOWALL'};_0x4f7298[_0x4f7298[_0x198979['sqpbB']]=0x0]=_0x198979['sqpbB'],_0x4f7298[_0x4f7298[_0x30929d(0x100)]=0x1]=_0x198979[_0x30929d(0x10a)];}(BizKey||(BizKey={})));

View File

@@ -1 +0,0 @@
(function(_0x3a4402,_0x2920da){var _0x28ff1f=_0x4eff,_0x79c870=_0x3a4402();while(!![]){try{var _0x4830f9=-parseInt(_0x28ff1f(0x19c))/0x1+parseInt(_0x28ff1f(0x1a2))/0x2+parseInt(_0x28ff1f(0x19a))/0x3+parseInt(_0x28ff1f(0x19d))/0x4+-parseInt(_0x28ff1f(0x1a1))/0x5+-parseInt(_0x28ff1f(0x19f))/0x6*(-parseInt(_0x28ff1f(0x19b))/0x7)+parseInt(_0x28ff1f(0x19e))/0x8*(-parseInt(_0x28ff1f(0x1a0))/0x9);if(_0x4830f9===_0x2920da)break;else _0x79c870['push'](_0x79c870['shift']());}catch(_0x9f0295){_0x79c870['push'](_0x79c870['shift']());}}}(_0x1271,0xb9b62));import _0x4c886e from'./wrapper';export*from'./adapters';export*from'./apis';export*from'./entities';export*from'./listeners';export*from'./services';export*as Adapters from'./adapters';function _0x4eff(_0xcfa701,_0x4572df){var _0x12710d=_0x1271();return _0x4eff=function(_0x4eff38,_0x3d1aff){_0x4eff38=_0x4eff38-0x19a;var _0x513333=_0x12710d[_0x4eff38];return _0x513333;},_0x4eff(_0xcfa701,_0x4572df);}export*as APIs from'./apis';export*as Entities from'./entities';export*as Listeners from'./listeners';export*as Services from'./services';export{_0x4c886e as Wrapper};export*as WrapperInterface from'./wrapper';export*as SessionConfig from'./sessionConfig';export{napCatCore}from'./core';function _0x1271(){var _0x23fe63=['12774648ttOXON','16518piOarX','9WDXCMi','51690BdeDDz','2554424kvpEsz','3038835GdAJlq','1505tzJZcC','1267231qqRGea','3012088vytgWX'];_0x1271=function(){return _0x23fe63;};return _0x1271();}

View File

@@ -1,44 +0,0 @@
import { BuddyCategoryType, FriendRequestNotify } from '@/core/entities';
export type OnBuddyChangeParams = BuddyCategoryType[];
interface IBuddyListener {
onBuddyListChange(arg: OnBuddyChangeParams): void;
onBuddyInfoChange(arg: unknown): void;
onBuddyDetailInfoChange(arg: unknown): void;
onNickUpdated(arg: unknown): void;
onBuddyRemarkUpdated(arg: unknown): void;
onAvatarUrlUpdated(arg: unknown): void;
onBuddyReqChange(arg: FriendRequestNotify): void;
onBuddyReqUnreadCntChange(arg: unknown): void;
onCheckBuddySettingResult(arg: unknown): void;
onAddBuddyNeedVerify(arg: unknown): void;
onSmartInfos(arg: unknown): void;
onSpacePermissionInfos(arg: unknown): void;
onDoubtBuddyReqChange(arg: unknown): void;
onDoubtBuddyReqUnreadNumChange(arg: unknown): void;
onBlockChanged(arg: unknown): void;
onAddMeSettingChanged(arg: unknown): void;
onDelBatchBuddyInfos(arg: unknown): void;
}
export interface NodeIKernelBuddyListener extends IBuddyListener {
new (listener: IBuddyListener): NodeIKernelBuddyListener;
}
export declare class BuddyListener implements IBuddyListener {
onAddBuddyNeedVerify(arg: unknown): void;
onAddMeSettingChanged(arg: unknown): void;
onAvatarUrlUpdated(arg: unknown): void;
onBlockChanged(arg: unknown): void;
onBuddyDetailInfoChange(arg: unknown): void;
onBuddyInfoChange(arg: unknown): void;
onBuddyListChange(arg: OnBuddyChangeParams): void;
onBuddyRemarkUpdated(arg: unknown): void;
onBuddyReqChange(arg: FriendRequestNotify): void;
onBuddyReqUnreadCntChange(arg: unknown): void;
onCheckBuddySettingResult(arg: unknown): void;
onDelBatchBuddyInfos(arg: unknown): void;
onDoubtBuddyReqChange(arg: unknown): void;
onDoubtBuddyReqUnreadNumChange(arg: unknown): void;
onNickUpdated(arg: unknown): void;
onSmartInfos(arg: unknown): void;
onSpacePermissionInfos(arg: unknown): void;
}
export {};

View File

@@ -1 +0,0 @@
var _0x410aeb=_0x451b;(function(_0x17408c,_0x357f20){var _0xf3f8be=_0x451b,_0x502d69=_0x17408c();while(!![]){try{var _0x2edf90=-parseInt(_0xf3f8be(0xde))/0x1*(-parseInt(_0xf3f8be(0xd4))/0x2)+-parseInt(_0xf3f8be(0xd2))/0x3*(parseInt(_0xf3f8be(0xe1))/0x4)+-parseInt(_0xf3f8be(0xe2))/0x5*(parseInt(_0xf3f8be(0xd1))/0x6)+-parseInt(_0xf3f8be(0xce))/0x7*(parseInt(_0xf3f8be(0xe0))/0x8)+-parseInt(_0xf3f8be(0xd6))/0x9*(parseInt(_0xf3f8be(0xd0))/0xa)+-parseInt(_0xf3f8be(0xd5))/0xb*(parseInt(_0xf3f8be(0xd8))/0xc)+parseInt(_0xf3f8be(0xd9))/0xd;if(_0x2edf90===_0x357f20)break;else _0x502d69['push'](_0x502d69['shift']());}catch(_0x48f303){_0x502d69['push'](_0x502d69['shift']());}}}(_0x1788,0x2cdda));function _0x451b(_0x506584,_0x28b9e6){var _0x1788ac=_0x1788();return _0x451b=function(_0x451bfe,_0x311f37){_0x451bfe=_0x451bfe-0xc9;var _0x4db840=_0x1788ac[_0x451bfe];return _0x4db840;},_0x451b(_0x506584,_0x28b9e6);}function _0x1788(){var _0x336025=['onAddBuddyNeedVerify','onDelBatchBuddyInfos','onBuddyInfoChange','28nxEhDW','onBuddyRemarkUpdated','10xHSvau','12fCERDC','6KiRsgc','onBuddyReqChange','364otvsUH','1177044tsfxVO','1391121rfEsup','onNickUpdated','12PhPHXj','14066975mwmlbY','onBuddyListChange','onDoubtBuddyReqUnreadNumChange','onAvatarUrlUpdated','onSmartInfos','503AHAJrW','onBuddyDetailInfoChange','540712iqbEFY','602236KwXFXJ','392010OnopTL','onDoubtBuddyReqChange','onCheckBuddySettingResult'];_0x1788=function(){return _0x336025;};return _0x1788();}export class BuddyListener{[_0x410aeb(0xcb)](_0x39e0d5){}['onAddMeSettingChanged'](_0x2c03dd){}[_0x410aeb(0xdc)](_0x13e5d1){}['onBlockChanged'](_0x4d5746){}[_0x410aeb(0xdf)](_0x1a7229){}[_0x410aeb(0xcd)](_0x5b00c2){}[_0x410aeb(0xda)](_0x2faa31){}[_0x410aeb(0xcf)](_0x391288){}[_0x410aeb(0xd3)](_0x105684){}['onBuddyReqUnreadCntChange'](_0x4cc8a5){}[_0x410aeb(0xca)](_0x564c93){}[_0x410aeb(0xcc)](_0x2225f6){}[_0x410aeb(0xc9)](_0x4c2a15){}[_0x410aeb(0xdb)](_0x2e004a){}[_0x410aeb(0xd7)](_0x577941){}[_0x410aeb(0xdd)](_0x2a8cdf){}['onSpacePermissionInfos'](_0x4a6ee2){}}

View File

@@ -1,17 +0,0 @@
export interface IKernelFileAssistantListener {
onFileStatusChanged(...args: unknown[]): unknown;
onSessionListChanged(...args: unknown[]): unknown;
onSessionChanged(...args: unknown[]): unknown;
onFileListChanged(...args: unknown[]): unknown;
onFileSearch(...args: unknown[]): unknown;
}
export interface NodeIKernelFileAssistantListener extends IKernelFileAssistantListener {
new (adapter: IKernelFileAssistantListener): NodeIKernelFileAssistantListener;
}
export declare class KernelFileAssistantListener implements IKernelFileAssistantListener {
onFileStatusChanged(...args: unknown[]): void;
onSessionListChanged(...args: unknown[]): void;
onSessionChanged(...args: unknown[]): void;
onFileListChanged(...args: unknown[]): void;
onFileSearch(...args: unknown[]): void;
}

View File

@@ -1 +0,0 @@
var _0x20384c=_0x395e;function _0x395e(_0x4a8df5,_0x52eaa1){var _0x2dcf97=_0x2dcf();return _0x395e=function(_0x395e19,_0x2b2e60){_0x395e19=_0x395e19-0x15f;var _0x4f2285=_0x2dcf97[_0x395e19];return _0x4f2285;},_0x395e(_0x4a8df5,_0x52eaa1);}(function(_0x694d9e,_0x32a99a){var _0x3fb01f=_0x395e,_0x8dedb8=_0x694d9e();while(!![]){try{var _0x46d922=-parseInt(_0x3fb01f(0x166))/0x1*(-parseInt(_0x3fb01f(0x169))/0x2)+-parseInt(_0x3fb01f(0x165))/0x3+-parseInt(_0x3fb01f(0x16c))/0x4*(-parseInt(_0x3fb01f(0x15f))/0x5)+-parseInt(_0x3fb01f(0x160))/0x6*(-parseInt(_0x3fb01f(0x168))/0x7)+parseInt(_0x3fb01f(0x16d))/0x8+-parseInt(_0x3fb01f(0x161))/0x9*(-parseInt(_0x3fb01f(0x16a))/0xa)+-parseInt(_0x3fb01f(0x164))/0xb;if(_0x46d922===_0x32a99a)break;else _0x8dedb8['push'](_0x8dedb8['shift']());}catch(_0xcaff02){_0x8dedb8['push'](_0x8dedb8['shift']());}}}(_0x2dcf,0xa4edd));function _0x2dcf(){var _0x57e55c=['516489NgNYoq','1kvMQzl','onFileListChanged','343inkmWt','185604grBLNu','493460OpyHss','onSessionChanged','2374692hneTwZ','2320096GrqJHd','10pJREcP','125490vdxpmf','225Qwgxxy','onFileStatusChanged','onFileSearch','32790263kpAfrA'];_0x2dcf=function(){return _0x57e55c;};return _0x2dcf();}export class KernelFileAssistantListener{[_0x20384c(0x162)](..._0x1bd4a5){}['onSessionListChanged'](..._0x19e8f2){}[_0x20384c(0x16b)](..._0x5d4fb6){}[_0x20384c(0x167)](..._0x5a2a24){}[_0x20384c(0x163)](..._0x5c5459){}}

View File

@@ -1,95 +0,0 @@
import { Group, GroupMember, GroupNotify } from '@/core/entities';
interface IGroupListener {
onGroupListUpdate(updateType: number, groupList: Group[]): void;
onGroupExtListUpdate(...args: unknown[]): void;
onGroupSingleScreenNotifies(doubt: boolean, seq: string, notifies: GroupNotify[]): void;
onGroupNotifiesUpdated(dboubt: boolean, notifies: GroupNotify[]): void;
onGroupNotifiesUnreadCountUpdated(...args: unknown[]): void;
onGroupDetailInfoChange(...args: unknown[]): void;
onGroupAllInfoChange(...args: unknown[]): void;
onGroupsMsgMaskResult(...args: unknown[]): void;
onGroupConfMemberChange(...args: unknown[]): void;
onGroupBulletinChange(...args: unknown[]): void;
onGetGroupBulletinListResult(...args: unknown[]): void;
onMemberListChange(arg: {
sceneId: string;
ids: string[];
infos: Map<string, GroupMember>;
finish: boolean;
hasRobot: boolean;
}): void;
onMemberInfoChange(groupCode: string, changeType: number, members: Map<string, GroupMember>): void;
onSearchMemberChange(...args: unknown[]): void;
onGroupBulletinRichMediaDownloadComplete(...args: unknown[]): void;
onGroupBulletinRichMediaProgressUpdate(...args: unknown[]): void;
onGroupStatisticInfoChange(...args: unknown[]): void;
onJoinGroupNotify(...args: unknown[]): void;
onShutUpMemberListChanged(...args: unknown[]): void;
onGroupBulletinRemindNotify(...args: unknown[]): void;
onGroupFirstBulletinNotify(...args: unknown[]): void;
onJoinGroupNoVerifyFlag(...args: unknown[]): void;
onGroupArkInviteStateResult(...args: unknown[]): void;
onGroupMemberLevelInfoChange(...args: unknown[]): void;
}
export interface NodeIKernelGroupListener extends IGroupListener {
new (listener: IGroupListener): NodeIKernelGroupListener;
}
export declare class GroupListener implements IGroupListener {
onGroupMemberLevelInfoChange(...args: unknown[]): void;
onGetGroupBulletinListResult(...args: unknown[]): void;
onGroupAllInfoChange(...args: unknown[]): void;
onGroupBulletinChange(...args: unknown[]): void;
onGroupBulletinRemindNotify(...args: unknown[]): void;
onGroupArkInviteStateResult(...args: unknown[]): void;
onGroupBulletinRichMediaDownloadComplete(...args: unknown[]): void;
onGroupConfMemberChange(...args: unknown[]): void;
onGroupDetailInfoChange(...args: unknown[]): void;
onGroupExtListUpdate(...args: unknown[]): void;
onGroupFirstBulletinNotify(...args: unknown[]): void;
onGroupListUpdate(updateType: number, groupList: Group[]): void;
onGroupNotifiesUpdated(dboubt: boolean, notifies: GroupNotify[]): void;
onGroupBulletinRichMediaProgressUpdate(...args: unknown[]): void;
onGroupNotifiesUnreadCountUpdated(...args: unknown[]): void;
onGroupSingleScreenNotifies(doubt: boolean, seq: string, notifies: GroupNotify[]): void;
onGroupsMsgMaskResult(...args: unknown[]): void;
onGroupStatisticInfoChange(...args: unknown[]): void;
onJoinGroupNotify(...args: unknown[]): void;
onJoinGroupNoVerifyFlag(...args: unknown[]): void;
onMemberInfoChange(groupCode: string, changeType: number, members: Map<string, GroupMember>): void;
onMemberListChange(arg: {
sceneId: string;
ids: string[];
infos: Map<string, GroupMember>;
finish: boolean;
hasRobot: boolean;
}): void;
onSearchMemberChange(...args: unknown[]): void;
onShutUpMemberListChanged(...args: unknown[]): void;
}
export declare class DebugGroupListener implements IGroupListener {
onGroupMemberLevelInfoChange(...args: unknown[]): void;
onGetGroupBulletinListResult(...args: unknown[]): void;
onGroupAllInfoChange(...args: unknown[]): void;
onGroupBulletinChange(...args: unknown[]): void;
onGroupBulletinRemindNotify(...args: unknown[]): void;
onGroupArkInviteStateResult(...args: unknown[]): void;
onGroupBulletinRichMediaDownloadComplete(...args: unknown[]): void;
onGroupConfMemberChange(...args: unknown[]): void;
onGroupDetailInfoChange(...args: unknown[]): void;
onGroupExtListUpdate(...args: unknown[]): void;
onGroupFirstBulletinNotify(...args: unknown[]): void;
onGroupListUpdate(...args: unknown[]): void;
onGroupNotifiesUpdated(...args: unknown[]): void;
onGroupBulletinRichMediaProgressUpdate(...args: unknown[]): void;
onGroupNotifiesUnreadCountUpdated(...args: unknown[]): void;
onGroupSingleScreenNotifies(doubt: boolean, seq: string, notifies: GroupNotify[]): void;
onGroupsMsgMaskResult(...args: unknown[]): void;
onGroupStatisticInfoChange(...args: unknown[]): void;
onJoinGroupNotify(...args: unknown[]): void;
onJoinGroupNoVerifyFlag(...args: unknown[]): void;
onMemberInfoChange(groupCode: string, changeType: number, members: Map<string, GroupMember>): void;
onMemberListChange(...args: unknown[]): void;
onSearchMemberChange(...args: unknown[]): void;
onShutUpMemberListChanged(...args: unknown[]): void;
}
export {};

File diff suppressed because one or more lines are too long

View File

@@ -1,54 +0,0 @@
export interface IKernelLoginListener {
onLoginConnected(...args: any[]): void;
onLoginDisConnected(...args: any[]): void;
onLoginConnecting(...args: any[]): void;
onQRCodeGetPicture(...args: any[]): void;
onQRCodeLoginPollingStarted(...args: any[]): void;
onQRCodeSessionUserScaned(...args: any[]): void;
onQRCodeLoginSucceed(...args: any[]): void;
onQRCodeSessionFailed(...args: any[]): void;
onLoginFailed(...args: any[]): void;
onLogoutSucceed(...args: any[]): void;
onLogoutFailed(...args: any[]): void;
onUserLoggedIn(...args: any[]): void;
onQRCodeSessionQuickLoginFailed(...args: any[]): void;
onPasswordLoginFailed(...args: any[]): void;
OnConfirmUnusualDeviceFailed(...args: any[]): void;
onQQLoginNumLimited(...args: any[]): void;
onLoginState(...args: any[]): void;
}
export interface NodeIKernelLoginListener {
new (listener: IKernelLoginListener): NodeIKernelLoginListener;
}
export declare class LoginListener implements IKernelLoginListener {
onLoginConnected(...args: any[]): void;
onLoginDisConnected(...args: any[]): void;
onLoginConnecting(...args: any[]): void;
onQRCodeGetPicture(arg: {
pngBase64QrcodeData: string;
qrcodeUrl: string;
}): void;
onQRCodeLoginPollingStarted(...args: any[]): void;
onQRCodeSessionUserScaned(...args: any[]): void;
onQRCodeLoginSucceed(arg: QRCodeLoginSucceedResult): void;
onQRCodeSessionFailed(...args: any[]): void;
onLoginFailed(...args: any[]): void;
onLogoutSucceed(...args: any[]): void;
onLogoutFailed(...args: any[]): void;
onUserLoggedIn(...args: any[]): void;
onQRCodeSessionQuickLoginFailed(...args: any[]): void;
onPasswordLoginFailed(...args: any[]): void;
OnConfirmUnusualDeviceFailed(...args: any[]): void;
onQQLoginNumLimited(...args: any[]): void;
onLoginState(...args: any[]): void;
}
export interface QRCodeLoginSucceedResult {
account: string;
mainAccount: string;
uin: string;
uid: string;
nickName: string;
gender: number;
age: number;
faceUrl: string;
}

View File

@@ -1 +0,0 @@
function _0x3c47(_0x5474b2,_0x405513){var _0x38edee=_0x38ed();return _0x3c47=function(_0x3c4775,_0x5bbaef){_0x3c4775=_0x3c4775-0x1b5;var _0x332669=_0x38edee[_0x3c4775];return _0x332669;},_0x3c47(_0x5474b2,_0x405513);}function _0x38ed(){var _0x52923c=['onQQLoginNumLimited','onLoginFailed','onLoginConnecting','14ivktIn','OnConfirmUnusualDeviceFailed','onQRCodeSessionFailed','278990LVIIGr','onQRCodeLoginPollingStarted','onLoginConnected','6225840pqCTPa','1029282ysboRX','89185OBTfGr','onQRCodeSessionUserScaned','onLogoutFailed','onQRCodeLoginSucceed','onQRCodeSessionQuickLoginFailed','onQRCodeGetPicture','onLogoutSucceed','onPasswordLoginFailed','1268397cPPqQY','40phPFKF','onLoginDisConnected','3955242FdMuOW','7510734OVcYnt'];_0x38ed=function(){return _0x52923c;};return _0x38ed();}var _0x24c078=_0x3c47;(function(_0x291793,_0x1ab6d2){var _0x5d9309=_0x3c47,_0x1650bd=_0x291793();while(!![]){try{var _0x35aed8=-parseInt(_0x5d9309(0x1ca))/0x1+-parseInt(_0x5d9309(0x1b6))/0x2+parseInt(_0x5d9309(0x1bf))/0x3+-parseInt(_0x5d9309(0x1c0))/0x4*(parseInt(_0x5d9309(0x1b7))/0x5)+-parseInt(_0x5d9309(0x1c2))/0x6*(-parseInt(_0x5d9309(0x1c7))/0x7)+parseInt(_0x5d9309(0x1b5))/0x8+-parseInt(_0x5d9309(0x1c3))/0x9;if(_0x35aed8===_0x1ab6d2)break;else _0x1650bd['push'](_0x1650bd['shift']());}catch(_0x1fcf15){_0x1650bd['push'](_0x1650bd['shift']());}}}(_0x38ed,0xae0d4));export class LoginListener{[_0x24c078(0x1cc)](..._0x40d124){}[_0x24c078(0x1c1)](..._0x210e21){}[_0x24c078(0x1c6)](..._0x3b5b33){}[_0x24c078(0x1bc)](_0xbaaa56){}[_0x24c078(0x1cb)](..._0x371db3){}[_0x24c078(0x1b8)](..._0x4d6392){}[_0x24c078(0x1ba)](_0x4796d7){}[_0x24c078(0x1c9)](..._0x15113b){}[_0x24c078(0x1c5)](..._0x265cb7){}[_0x24c078(0x1bd)](..._0x5da0d0){}[_0x24c078(0x1b9)](..._0x642bf5){}['onUserLoggedIn'](..._0x34153f){}[_0x24c078(0x1bb)](..._0x83dda7){}[_0x24c078(0x1be)](..._0x342252){}[_0x24c078(0x1c8)](..._0x1f8326){}[_0x24c078(0x1c4)](..._0xf189b7){}['onLoginState'](..._0x1390ca){}}

View File

@@ -1,186 +0,0 @@
import { ChatType, RawMessage } from '@/core/entities';
export interface OnRichMediaDownloadCompleteParams {
fileModelId: string;
msgElementId: string;
msgId: string;
fileId: string;
fileProgress: string;
fileSpeed: string;
fileErrCode: string;
fileErrMsg: string;
fileDownType: number;
thumbSize: number;
filePath: string;
totalSize: string;
trasferStatus: number;
step: number;
commonFileInfo: unknown | null;
fileSrvErrCode: string;
clientMsg: string;
businessId: number;
userTotalSpacePerDay: unknown | null;
userUsedSpacePerDay: unknown | null;
}
export interface onGroupFileInfoUpdateParamType {
retCode: number;
retMsg: string;
clientWording: string;
isEnd: boolean;
item: Array<any>;
allFileCount: string;
nextIndex: string;
reqId: string;
}
export interface TempOnRecvParams {
sessionType: number;
chatType: ChatType;
peerUid: string;
groupCode: string;
fromNick: string;
sig: string;
}
export interface IKernelMsgListener {
onAddSendMsg(msgRecord: RawMessage): void;
onBroadcastHelperDownloadComplete(broadcastHelperTransNotifyInfo: unknown): void;
onBroadcastHelperProgressUpdate(broadcastHelperTransNotifyInfo: unknown): void;
onChannelFreqLimitInfoUpdate(contact: unknown, z: unknown, freqLimitInfo: unknown): void;
onContactUnreadCntUpdate(hashMap: unknown): void;
onCustomWithdrawConfigUpdate(customWithdrawConfig: unknown): void;
onDraftUpdate(contact: unknown, arrayList: unknown, j2: unknown): void;
onEmojiDownloadComplete(emojiNotifyInfo: unknown): void;
onEmojiResourceUpdate(emojiResourceInfo: unknown): void;
onFeedEventUpdate(firstViewDirectMsgNotifyInfo: unknown): void;
onFileMsgCome(arrayList: unknown): void;
onFirstViewDirectMsgUpdate(firstViewDirectMsgNotifyInfo: unknown): void;
onFirstViewGroupGuildMapping(arrayList: unknown): void;
onGrabPasswordRedBag(i2: unknown, str: unknown, i3: unknown, recvdOrder: unknown, msgRecord: unknown): void;
onGroupFileInfoAdd(groupItem: unknown): void;
onGroupFileInfoUpdate(groupFileListResult: onGroupFileInfoUpdateParamType): void;
onGroupGuildUpdate(groupGuildNotifyInfo: unknown): void;
onGroupTransferInfoAdd(groupItem: unknown): void;
onGroupTransferInfoUpdate(groupFileListResult: unknown): void;
onGuildInteractiveUpdate(guildInteractiveNotificationItem: unknown): void;
onGuildMsgAbFlagChanged(guildMsgAbFlag: unknown): void;
onGuildNotificationAbstractUpdate(guildNotificationAbstractInfo: unknown): void;
onHitCsRelatedEmojiResult(downloadRelateEmojiResultInfo: unknown): void;
onHitEmojiKeywordResult(hitRelatedEmojiWordsResult: unknown): void;
onHitRelatedEmojiResult(relatedWordEmojiInfo: unknown): void;
onImportOldDbProgressUpdate(importOldDbMsgNotifyInfo: unknown): void;
onInputStatusPush(inputStatusInfo: unknown): void;
onKickedOffLine(kickedInfo: unknown): void;
onLineDev(arrayList: unknown): void;
onLogLevelChanged(j2: unknown): void;
onMsgAbstractUpdate(arrayList: unknown): void;
onMsgBoxChanged(arrayList: unknown): void;
onMsgDelete(contact: unknown, arrayList: unknown): void;
onMsgEventListUpdate(hashMap: unknown): void;
onMsgInfoListAdd(arrayList: unknown): void;
onMsgInfoListUpdate(msgList: RawMessage[]): void;
onMsgQRCodeStatusChanged(i2: unknown): void;
onMsgRecall(i2: unknown, str: unknown, j2: unknown): void;
onMsgSecurityNotify(msgRecord: unknown): void;
onMsgSettingUpdate(msgSetting: unknown): void;
onNtFirstViewMsgSyncEnd(): void;
onNtMsgSyncEnd(): void;
onNtMsgSyncStart(): void;
onReadFeedEventUpdate(firstViewDirectMsgNotifyInfo: unknown): void;
onRecvGroupGuildFlag(i2: unknown): void;
onRecvMsg(...arrayList: unknown[]): void;
onRecvMsgSvrRspTransInfo(j2: unknown, contact: unknown, i2: unknown, i3: unknown, str: unknown, bArr: unknown): void;
onRecvOnlineFileMsg(arrayList: unknown): void;
onRecvS2CMsg(arrayList: unknown): void;
onRecvSysMsg(arrayList: unknown): void;
onRecvUDCFlag(i2: unknown): void;
onRichMediaDownloadComplete(fileTransNotifyInfo: OnRichMediaDownloadCompleteParams): void;
onRichMediaProgerssUpdate(fileTransNotifyInfo: unknown): void;
onRichMediaUploadComplete(fileTransNotifyInfo: unknown): void;
onSearchGroupFileInfoUpdate(searchGroupFileResult: unknown): void;
onSendMsgError(j2: unknown, contact: unknown, i2: unknown, str: unknown): void;
onSysMsgNotification(i2: unknown, j2: unknown, j3: unknown, arrayList: unknown): void;
onTempChatInfoUpdate(tempChatInfo: TempOnRecvParams): void;
onUnreadCntAfterFirstView(hashMap: unknown): void;
onUnreadCntUpdate(hashMap: unknown): void;
onUserChannelTabStatusChanged(z: unknown): void;
onUserOnlineStatusChanged(z: unknown): void;
onUserTabStatusChanged(arrayList: unknown): void;
onlineStatusBigIconDownloadPush(i2: unknown, j2: unknown, str: unknown): void;
onlineStatusSmallIconDownloadPush(i2: unknown, j2: unknown, str: unknown): void;
onUserSecQualityChanged(...args: unknown[]): void;
onMsgWithRichLinkInfoUpdate(...args: unknown[]): void;
onRedTouchChanged(...args: unknown[]): void;
onBroadcastHelperProgerssUpdate(...args: unknown[]): void;
}
export interface NodeIKernelMsgListener {
new (listener: IKernelMsgListener): NodeIKernelMsgListener;
}
export declare class MsgListener implements IKernelMsgListener {
onAddSendMsg(msgRecord: RawMessage): void;
onBroadcastHelperDownloadComplete(broadcastHelperTransNotifyInfo: unknown): void;
onBroadcastHelperProgressUpdate(broadcastHelperTransNotifyInfo: unknown): void;
onChannelFreqLimitInfoUpdate(contact: unknown, z: unknown, freqLimitInfo: unknown): void;
onContactUnreadCntUpdate(hashMap: unknown): void;
onCustomWithdrawConfigUpdate(customWithdrawConfig: unknown): void;
onDraftUpdate(contact: unknown, arrayList: unknown, j2: unknown): void;
onEmojiDownloadComplete(emojiNotifyInfo: unknown): void;
onEmojiResourceUpdate(emojiResourceInfo: unknown): void;
onFeedEventUpdate(firstViewDirectMsgNotifyInfo: unknown): void;
onFileMsgCome(arrayList: unknown): void;
onFirstViewDirectMsgUpdate(firstViewDirectMsgNotifyInfo: unknown): void;
onFirstViewGroupGuildMapping(arrayList: unknown): void;
onGrabPasswordRedBag(i2: unknown, str: unknown, i3: unknown, recvdOrder: unknown, msgRecord: unknown): void;
onGroupFileInfoAdd(groupItem: unknown): void;
onGroupFileInfoUpdate(groupFileListResult: onGroupFileInfoUpdateParamType): void;
onGroupGuildUpdate(groupGuildNotifyInfo: unknown): void;
onGroupTransferInfoAdd(groupItem: unknown): void;
onGroupTransferInfoUpdate(groupFileListResult: unknown): void;
onGuildInteractiveUpdate(guildInteractiveNotificationItem: unknown): void;
onGuildMsgAbFlagChanged(guildMsgAbFlag: unknown): void;
onGuildNotificationAbstractUpdate(guildNotificationAbstractInfo: unknown): void;
onHitCsRelatedEmojiResult(downloadRelateEmojiResultInfo: unknown): void;
onHitEmojiKeywordResult(hitRelatedEmojiWordsResult: unknown): void;
onHitRelatedEmojiResult(relatedWordEmojiInfo: unknown): void;
onImportOldDbProgressUpdate(importOldDbMsgNotifyInfo: unknown): void;
onInputStatusPush(inputStatusInfo: unknown): void;
onKickedOffLine(kickedInfo: unknown): void;
onLineDev(arrayList: unknown): void;
onLogLevelChanged(j2: unknown): void;
onMsgAbstractUpdate(arrayList: unknown): void;
onMsgBoxChanged(arrayList: unknown): void;
onMsgDelete(contact: unknown, arrayList: unknown): void;
onMsgEventListUpdate(hashMap: unknown): void;
onMsgInfoListAdd(arrayList: unknown): void;
onMsgInfoListUpdate(msgList: RawMessage[]): void;
onMsgQRCodeStatusChanged(i2: unknown): void;
onMsgRecall(i2: unknown, str: unknown, j2: unknown): void;
onMsgSecurityNotify(msgRecord: unknown): void;
onMsgSettingUpdate(msgSetting: unknown): void;
onNtFirstViewMsgSyncEnd(): void;
onNtMsgSyncEnd(): void;
onNtMsgSyncStart(): void;
onReadFeedEventUpdate(firstViewDirectMsgNotifyInfo: unknown): void;
onRecvGroupGuildFlag(i2: unknown): void;
onRecvMsg(arrayList: RawMessage[]): void;
onRecvMsgSvrRspTransInfo(j2: unknown, contact: unknown, i2: unknown, i3: unknown, str: unknown, bArr: unknown): void;
onRecvOnlineFileMsg(arrayList: unknown): void;
onRecvS2CMsg(arrayList: unknown): void;
onRecvSysMsg(arrayList: unknown): void;
onRecvUDCFlag(i2: unknown): void;
onRichMediaDownloadComplete(fileTransNotifyInfo: OnRichMediaDownloadCompleteParams): void;
onRichMediaProgerssUpdate(fileTransNotifyInfo: unknown): void;
onRichMediaUploadComplete(fileTransNotifyInfo: unknown): void;
onSearchGroupFileInfoUpdate(searchGroupFileResult: unknown): void;
onSendMsgError(j2: unknown, contact: unknown, i2: unknown, str: unknown): void;
onSysMsgNotification(i2: unknown, j2: unknown, j3: unknown, arrayList: unknown): void;
onTempChatInfoUpdate(tempChatInfo: TempOnRecvParams): void;
onUnreadCntAfterFirstView(hashMap: unknown): void;
onUnreadCntUpdate(hashMap: unknown): void;
onUserChannelTabStatusChanged(z: unknown): void;
onUserOnlineStatusChanged(z: unknown): void;
onUserTabStatusChanged(arrayList: unknown): void;
onlineStatusBigIconDownloadPush(i2: unknown, j2: unknown, str: unknown): void;
onlineStatusSmallIconDownloadPush(i2: unknown, j2: unknown, str: unknown): void;
onUserSecQualityChanged(...args: unknown[]): void;
onMsgWithRichLinkInfoUpdate(...args: unknown[]): void;
onRedTouchChanged(...args: unknown[]): void;
onBroadcastHelperProgerssUpdate(...args: unknown[]): void;
}

Some files were not shown because too many files have changed in this diff Show More