Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6f6468377 | ||
|
|
9d5f0ee604 | ||
|
|
07d4d80ab7 | ||
|
|
7a974d38d4 | ||
|
|
e9b74138d1 | ||
|
|
df0795f2c5 | ||
|
|
85b56e52ac | ||
|
|
77c89d0923 | ||
|
|
58b36cd331 | ||
|
|
deae7fd467 | ||
|
|
8b2207e109 | ||
|
|
f3b76e8b3a | ||
|
|
466d9a3c4f | ||
|
|
4af49c5761 | ||
|
|
442ad4f9a3 | ||
|
|
7ee2f1c40d | ||
|
|
7380665cc2 | ||
|
|
2c57faf117 | ||
|
|
8b0d186625 | ||
|
|
3ba1bd9565 | ||
|
|
8aec6aec1b | ||
|
|
36ae7bf923 | ||
|
|
4ed4dfd450 | ||
|
|
b15d02535e | ||
|
|
974528fe7e | ||
|
|
d2d0b258bc | ||
|
|
2dcba633ba | ||
|
|
53ceb85801 | ||
|
|
dbba6b3ffe | ||
|
|
03dd89add0 | ||
|
|
7fc70bc5ce | ||
|
|
6758825895 | ||
|
|
ae53d27313 | ||
|
|
86884b6ba2 | ||
|
|
776cc8cefd | ||
|
|
66542eda26 | ||
|
|
34a699c568 | ||
|
|
2a06688479 | ||
|
|
976331af94 | ||
|
|
46b0532f84 | ||
|
|
819f76afbf | ||
|
|
938074c654 | ||
|
|
d16f493136 | ||
|
|
4c8419d5ab | ||
|
|
fbba3d5ade | ||
|
|
cf80c787c3 | ||
|
|
7b58681b2b | ||
|
|
7c2eacf0dc | ||
|
|
e09c3c1146 | ||
|
|
cec011bdfa | ||
|
|
9cbaafe806 | ||
|
|
0ddf21a2f5 | ||
|
|
b9dcedacf5 | ||
|
|
b42b6c3cf0 | ||
|
|
740d2118f1 | ||
|
|
77bdcfd249 | ||
|
|
896e1c209a | ||
|
|
cff07c7ce5 | ||
|
|
5c04b799a6 | ||
|
|
1fc4655ae1 | ||
|
|
eb07cdb715 | ||
|
|
964fd98914 | ||
|
|
f9764c9559 | ||
|
|
b71a4913eb | ||
|
|
f961830836 | ||
|
|
dd8b5f84a6 | ||
|
|
48ffd5597a | ||
|
|
1b73d68cbf | ||
|
|
5fec649425 | ||
|
|
052e7fa2b3 | ||
|
|
04e425d17a | ||
|
|
cbe0506577 | ||
|
|
32ec097f51 | ||
|
|
53f27ea9e2 | ||
|
|
41d94cd5e2 | ||
|
|
285d352bc8 | ||
|
|
a3b3836b8a | ||
|
|
b9f61cc0ee | ||
|
|
9998207346 | ||
|
|
4f47af233f | ||
|
|
6aadc2402d | ||
|
|
eb937b29e4 | ||
|
|
f44aca9a2f | ||
|
|
c34812bc9c | ||
|
|
d93b430034 | ||
|
|
c91e1378cf | ||
|
|
cad567dc3f | ||
|
|
82c8de00d0 | ||
|
|
f17abccfdc | ||
|
|
35af50bb73 | ||
|
|
5c72f771c3 | ||
|
|
62c9246368 | ||
|
|
d622178b25 | ||
|
|
9887eb8565 | ||
|
|
2f8569f30c | ||
|
|
82d0c51716 | ||
|
|
37fb2d68d7 |
No files matched your search
@@ -1,16 +1,6 @@
|
||||
# {VERSION}
|
||||
[使用文档](https://napneko.github.io/)
|
||||
|
||||
## Windows 一键包
|
||||
我们提供了轻量化的一键部署方案
|
||||
相对于普通需要安装QQ的方案,下面已内置QQ和Napcat 阅读使用文档参考
|
||||
|
||||
你可以下载
|
||||
|
||||
NapCat.Shell.Windows.OneKey.zip (无头)
|
||||
|
||||
启动后可自动化部署一键包,教程参考使用文档安装部分
|
||||
|
||||
## 警告
|
||||
**注意QQ版本推荐使用 40768+ 版本 最低可以使用40768版本**
|
||||
**默认WebUi密钥为随机密码 控制台查看**
|
||||
|
||||
@@ -84,8 +84,8 @@ export function generateBuildingComment (prSha: string, targets: string[]): stri
|
||||
'',
|
||||
'## 📋 构建信息',
|
||||
'',
|
||||
`| 项目 | 值 |`,
|
||||
`| :--- | :--- |`,
|
||||
'| 项目 | 值 |',
|
||||
'| :--- | :--- |',
|
||||
`| 📝 提交 | \`${shortSha}\` |`,
|
||||
`| 🕐 开始时间 | ${time} |`,
|
||||
'',
|
||||
@@ -165,8 +165,8 @@ export function generateResultComment (
|
||||
'',
|
||||
'## 📋 构建信息',
|
||||
'',
|
||||
`| 项目 | 值 |`,
|
||||
`| :--- | :--- |`,
|
||||
'| 项目 | 值 |',
|
||||
'| :--- | :--- |',
|
||||
...(version ? [`| 🏷️ 版本号 | \`${version}\` |`] : []),
|
||||
`| 📝 提交 | \`${shortSha}\` |`,
|
||||
`| 🔗 构建日志 | [查看详情](${runUrl}) |`,
|
||||
@@ -179,7 +179,7 @@ export function generateResultComment (
|
||||
lines.push('', '---', '', '## ⚠️ 错误详情', '');
|
||||
for (const target of failedTargets) {
|
||||
lines.push(
|
||||
`<details>`,
|
||||
'<details>',
|
||||
`<summary>🔴 <b>${target.name}</b> 构建错误</summary>`,
|
||||
'',
|
||||
'```',
|
||||
@@ -228,4 +228,3 @@ export function generateResultComment (
|
||||
|
||||
return lines.join('\n');
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* publish-release-hash.mjs
|
||||
*
|
||||
* 读取 release.json(不存在则创建),追加新版本的 Shell/Framework napcat.mjs SHA512,
|
||||
* 保留最近 100 条后写回文件。
|
||||
*
|
||||
* 用法:
|
||||
* node .github/scripts/publish-release-hash.mjs \
|
||||
* --version v4.9.0 \
|
||||
* --shell ./artifacts/NapCat.Shell/napcat.mjs \
|
||||
* --framework ./artifacts/NapCat.Framework/napcat.mjs \
|
||||
* --file ./hash-repo/release.json
|
||||
*/
|
||||
|
||||
import crypto from 'node:crypto';
|
||||
import fs from 'node:fs';
|
||||
|
||||
// ─── CLI 参数解析 ────────────────────────────────────────────────────────────
|
||||
|
||||
function parseArgs () {
|
||||
const args = process.argv.slice(2);
|
||||
const result = {};
|
||||
for (let i = 0; i < args.length; i += 2) {
|
||||
result[args[i].replace(/^--/, '')] = args[i + 1];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
const { version, shell: shellPath, framework: frameworkPath, file: outputFile } = parseArgs();
|
||||
|
||||
if (!version || !shellPath || !frameworkPath || !outputFile) {
|
||||
console.error('Usage: node publish-release-hash.mjs --version <v> --shell <path> --framework <path> --file <path>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// ─── 工具函数 ────────────────────────────────────────────────────────────────
|
||||
|
||||
function sha512File (filePath) {
|
||||
if (!fs.existsSync(filePath)) {
|
||||
throw new Error(`File not found: ${filePath}`);
|
||||
}
|
||||
const buf = fs.readFileSync(filePath);
|
||||
return crypto.createHash('sha512').update(buf).digest('hex');
|
||||
}
|
||||
|
||||
// ─── 主逻辑 ──────────────────────────────────────────────────────────────────
|
||||
|
||||
const MAX_ENTRIES = 100;
|
||||
|
||||
// 1. 计算哈希
|
||||
console.log(`Computing SHA512 for Shell: ${shellPath}`);
|
||||
const shellHash = sha512File(shellPath);
|
||||
console.log(`Computing SHA512 for Framework: ${frameworkPath}`);
|
||||
const frameworkHash = sha512File(frameworkPath);
|
||||
|
||||
// 2. 读取现有 release.json,不存在则创建空数组
|
||||
let entries = [];
|
||||
if (fs.existsSync(outputFile)) {
|
||||
entries = JSON.parse(fs.readFileSync(outputFile, 'utf-8'));
|
||||
console.log(`Loaded existing ${outputFile} with ${entries.length} entries.`);
|
||||
} else {
|
||||
console.log(`${outputFile} not found, will create it.`);
|
||||
}
|
||||
|
||||
// 3. 追加新条目,去除同版本旧条目,滚动保留最近 MAX_ENTRIES 条
|
||||
const newEntry = {
|
||||
version,
|
||||
shell: { sha512: shellHash },
|
||||
framework: { sha512: frameworkHash },
|
||||
updatedAt: new Date().toISOString(),
|
||||
};
|
||||
|
||||
const updated = [
|
||||
...entries.filter(e => e.version !== version),
|
||||
newEntry,
|
||||
].slice(-MAX_ENTRIES);
|
||||
|
||||
// 4. 写回文件
|
||||
fs.writeFileSync(outputFile, JSON.stringify(updated, null, 2) + '\n', 'utf-8');
|
||||
console.log(`✅ Written ${updated.length} entries to ${outputFile}`);
|
||||
@@ -9,12 +9,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
pnpm run build:openapi
|
||||
|
||||
- name: Checkout NapCatDocs
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: NapNeko/NapCatDocs
|
||||
token: ${{ secrets.NAPCAT_BUILD }}
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Get Latest NapCat Version
|
||||
id: get_version
|
||||
run: |
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Get Latest NapCat Version
|
||||
id: get_version
|
||||
run: |
|
||||
@@ -150,4 +150,4 @@ jobs:
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer $GH_TOKEN" \
|
||||
https://api.github.com/repos/NapNeko/NapCatLinuxNodeLoader/actions/workflows/docker-publish.yml/dispatches \
|
||||
-d "{\"ref\":\"main\",\"inputs\":{\"napcat_version\":\"${NAPCAT_VERSION}\",\"qq_url_amd64\":\"${QQ_VERSION_X86_64}\",\"qq_url_arm64\":\"${QQ_VERSION_ARM64}\"}}"
|
||||
-d "{\"ref\":\"main\",\"inputs\":{\"napcat_version\":\"${NAPCAT_VERSION}\",\"qq_url_amd64\":\"${QQ_VERSION_X86_64}\",\"qq_url_arm64\":\"${QQ_VERSION_ARM64}\"}}"
|
||||
@@ -12,11 +12,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone Main Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0 # 需要完整历史来获取 tags
|
||||
- name: Use Node.js 20.X
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Generate Version
|
||||
@@ -47,7 +47,7 @@ jobs:
|
||||
npm install --omit=dev
|
||||
rm ./package-lock.json || exit 0
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Framework
|
||||
path: framework-dist
|
||||
@@ -55,11 +55,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone Main Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0 # 需要完整历史来获取 tags
|
||||
- name: Use Node.js 20.X
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Generate Version
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
npm install --omit=dev
|
||||
rm ./package-lock.json || exit 0
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Shell
|
||||
path: shell-dist
|
||||
@@ -73,14 +73,14 @@ jobs:
|
||||
steps:
|
||||
# 仅 checkout 脚本目录,加快速度
|
||||
- name: Checkout scripts
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
sparse-checkout: .github/scripts
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
# 使用 Node.js 24 以支持原生 TypeScript 执行
|
||||
- name: Setup Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
@@ -102,13 +102,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout scripts
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
sparse-checkout: .github/scripts
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Setup Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
@@ -137,7 +137,7 @@ jobs:
|
||||
# 【安全】先从 base 分支 checkout 构建脚本
|
||||
# 这样即使 PR 中修改了脚本,也不会被执行
|
||||
- name: Checkout scripts from base
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
sparse-checkout: .github/scripts
|
||||
sparse-checkout-cone-mode: false
|
||||
@@ -145,7 +145,7 @@ jobs:
|
||||
|
||||
# 将 PR 代码 checkout 到单独的 workspace 目录
|
||||
- name: Checkout PR code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: ${{ needs.check-build.outputs.pr_head_repo }}
|
||||
ref: ${{ needs.check-build.outputs.pr_sha }}
|
||||
@@ -153,7 +153,7 @@ jobs:
|
||||
fetch-depth: 0 # 需要完整历史来获取 tags
|
||||
|
||||
- name: Setup Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
@@ -186,7 +186,7 @@ jobs:
|
||||
# 构建成功时上传产物
|
||||
- name: Upload Artifact
|
||||
if: steps.build.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Framework
|
||||
path: workspace/framework-dist
|
||||
@@ -208,7 +208,7 @@ jobs:
|
||||
steps:
|
||||
# 【安全】先从 base 分支 checkout 构建脚本
|
||||
- name: Checkout scripts from base
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
sparse-checkout: .github/scripts
|
||||
sparse-checkout-cone-mode: false
|
||||
@@ -216,7 +216,7 @@ jobs:
|
||||
|
||||
# 将 PR 代码 checkout 到单独的 workspace 目录
|
||||
- name: Checkout PR code
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
repository: ${{ needs.check-build.outputs.pr_head_repo }}
|
||||
ref: ${{ needs.check-build.outputs.pr_sha }}
|
||||
@@ -224,7 +224,7 @@ jobs:
|
||||
fetch-depth: 0 # 需要完整历史来获取 tags
|
||||
|
||||
- name: Setup Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
@@ -258,7 +258,7 @@ jobs:
|
||||
# 构建成功时上传产物
|
||||
- name: Upload Artifact
|
||||
if: steps.build.outcome == 'success'
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Shell
|
||||
path: workspace/shell-dist
|
||||
@@ -276,13 +276,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout scripts
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
sparse-checkout: .github/scripts
|
||||
sparse-checkout-cone-mode: false
|
||||
|
||||
- name: Setup Node.js 24
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ on:
|
||||
permissions: write-all
|
||||
|
||||
env:
|
||||
OPENROUTER_API_URL: https://91vip.futureppo.top/v1/chat/completions
|
||||
OPENROUTER_MODEL: "gemini-3-flash-preview"
|
||||
OPENAI_API_URL: https://openrouter.ai/api/v1/chat/completions
|
||||
OPENAI_MODEL: "stepfun/step-3.5-flash:free"
|
||||
RELEASE_NAME: "NapCat"
|
||||
|
||||
jobs:
|
||||
@@ -49,9 +49,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone Main Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Use Node.js 20.X
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Build NapCat.Framework
|
||||
@@ -68,7 +68,7 @@ jobs:
|
||||
npm install --omit=dev
|
||||
rm ./package-lock.json || exit 0
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Framework
|
||||
path: framework-dist
|
||||
@@ -79,9 +79,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone Main Repository
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
- name: Use Node.js 20.X
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20.x
|
||||
- name: Build NapCat.Shell
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
npm install --omit=dev
|
||||
rm ./package-lock.json || exit 0
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Shell
|
||||
path: shell-dist
|
||||
@@ -106,10 +106,10 @@ jobs:
|
||||
needs: Build-Shell
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
path: ./artifacts
|
||||
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
cp -a "$NODE_EXTRACT/node-v$NODE_VER-win-x64/node.exe" "$OUT_DIR/" || true
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: NapCat.Shell.Windows.Node
|
||||
path: NapCat.Shell.Windows.Node
|
||||
@@ -197,12 +197,12 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
path: ./artifacts
|
||||
|
||||
@@ -218,11 +218,11 @@ jobs:
|
||||
[ -d NapCat.Shell.Windows.Node ] && (cd NapCat.Shell.Windows.Node && zip -qr ../../NapCat.Shell.Windows.Node.zip .)
|
||||
cd ..
|
||||
|
||||
- name: Generate release note via OpenRouter
|
||||
- name: Generate release note
|
||||
env:
|
||||
OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
|
||||
OPENROUTER_API_URL: ${{ env.OPENROUTER_API_URL }}
|
||||
OPENROUTER_MODEL: ${{ env.OPENROUTER_MODEL }}
|
||||
OPENAI_API_URL: ${{ env.OPENAI_API_URL }}
|
||||
OPENAI_MODEL: ${{ env.OPENAI_MODEL }}
|
||||
GITHUB_OWNER: "NapNeko" # 替换成你的 repo owner
|
||||
GITHUB_REPO: "NapCatQQ" # 替换成你的 repo 名
|
||||
run: |
|
||||
@@ -395,20 +395,19 @@ jobs:
|
||||
BODY=$(jq -n \
|
||||
--arg system "$SYSTEM_PROMPT" \
|
||||
--arg user "$USER_CONTENT" \
|
||||
--arg model "$OPENROUTER_MODEL" \
|
||||
'{model: $model, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.2, max_tokens:1500}')
|
||||
--arg model "$OPENAI_MODEL" \
|
||||
'{model: $model, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:0.2, max_tokens:5000}')
|
||||
|
||||
echo "=== OpenRouter request body ==="
|
||||
echo "=== request body ==="
|
||||
echo "$BODY" | jq .
|
||||
|
||||
# 调用 OpenRouter
|
||||
if RESPONSE=$(curl -s -X POST "$OPENROUTER_API_URL" \
|
||||
if RESPONSE=$(curl -s -X POST "$OPENAI_API_URL" \
|
||||
-H "Authorization: Bearer $OPENAI_KEY" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "$BODY"); then
|
||||
echo "=== raw response ==="
|
||||
echo "$RESPONSE"
|
||||
echo "=== OpenRouter raw response ==="
|
||||
echo "=== parsed response ==="
|
||||
if echo "$RESPONSE" | jq . >/dev/null 2>&1; then
|
||||
echo "$RESPONSE" | jq .
|
||||
else
|
||||
@@ -419,7 +418,7 @@ jobs:
|
||||
RELEASE_BODY=$(echo "$RESPONSE" | jq -r '.choices[0].message.content // .choices[0].text // ""' 2>/dev/null || echo "")
|
||||
|
||||
if [ -z "$RELEASE_BODY" ]; then
|
||||
echo "❌ OpenRouter failed to generate release note, using default.md"
|
||||
echo "❌ LLM failed to generate release note, using default.md"
|
||||
# 替换默认模板中的版本占位符
|
||||
sed "s/{VERSION}/$CURRENT_TAG/g" .github/prompt/default.md > CHANGELOG.md
|
||||
else
|
||||
@@ -436,18 +435,19 @@ jobs:
|
||||
echo "=== generated release note ==="
|
||||
cat CHANGELOG.md
|
||||
|
||||
- name: Create Release Draft and Upload Artifacts
|
||||
uses: softprops/action-gh-release@v1
|
||||
- name: Create Release and Upload Artifacts
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ github.ref_name }}
|
||||
name: NapCat ${{ github.ref_name }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
token: ${{ secrets.NAPCAT_BUILD }}
|
||||
body_path: CHANGELOG.md
|
||||
files: |
|
||||
NapCat.Shell.Windows.Node.zip
|
||||
NapCat.Framework.zip
|
||||
NapCat.Shell.zip
|
||||
NapCat.Shell.Windows.OneKey.zip
|
||||
draft: true
|
||||
draft: false
|
||||
|
||||
|
||||
- name: Update apifox
|
||||
@@ -478,3 +478,30 @@ jobs:
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-binary @apifox_payload.json
|
||||
|
||||
- name: Publish release hash
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.NAPCAT_BUILD }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION="${GITHUB_REF#refs/tags/}"
|
||||
HASH_REPO="NapNeko/napcat-release-hash"
|
||||
|
||||
gh auth setup-git
|
||||
gh repo clone "$HASH_REPO" hash-repo
|
||||
|
||||
node .github/scripts/publish-release-hash.mjs \
|
||||
--version "$VERSION" \
|
||||
--shell "./artifacts/NapCat.Shell/napcat.mjs" \
|
||||
--framework "./artifacts/NapCat.Framework/napcat.mjs" \
|
||||
--file "./hash-repo/release.json"
|
||||
|
||||
cd hash-repo
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add release.json
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git commit -m "chore: update release hash for ${VERSION}"
|
||||
git push origin HEAD:main || git push origin HEAD:master
|
||||
fi
|
||||
@@ -10,6 +10,9 @@ devconfig/*
|
||||
!.vscode/extensions.json
|
||||
.idea/*
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
# Build
|
||||
*.db
|
||||
checkVersion.sh
|
||||
|
||||
Vendored
+1
-1
@@ -6,7 +6,7 @@
|
||||
"vite.config.ts": "vite*.ts",
|
||||
"README.md": "CODE_OF_CONDUCT.md, RELEASES.md, CONTRIBUTING.md, CHANGELOG.md, SECURITY.md",
|
||||
"tsconfig.json": "tsconfig.*.json, env.d.ts",
|
||||
"package.json": "package-lock.json, eslint*, .prettier*, .editorconfig, manifest.json, logo.png, .gitignore, LICENSE"
|
||||
"package.json": "package-lock.json, eslint*, .prettier*, .editorconfig, logo.png, .gitignore, LICENSE"
|
||||
},
|
||||
"css.customData": [
|
||||
".vscode/tailwindcss.json"
|
||||
|
||||
@@ -53,7 +53,7 @@ _Modern protocol-side framework implemented based on NTQQ._
|
||||
| Docs | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| QQ Group | [](https://qm.qq.com/q/CMmPbGw0jA) | [](https://qm.qq.com/q/8zJMLjqy2Y) | [](https://qm.qq.com/q/CMmPbGw0jA) | [](https://qm.qq.com/q/I6LU87a0Yq) |
|
||||
| QQ Group | [](https://qm.qq.com/q/E4nfkGD6oK) | [](https://qm.qq.com/q/XyiyGPqa42) | [](https://qm.qq.com/q/gq18RH7o7S) | [](https://qm.qq.com/q/VwpnklcXqo) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
| Telegram | [](https://t.me/napcatqq) |
|
||||
@@ -62,7 +62,11 @@ _Modern protocol-side framework implemented based on NTQQ._
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
> 请不要在其余社区提及本项目(包括其余协议端/相关应用端项目)引发争论,如有建议到达官方交流群讨论或PR。
|
||||
> QQ群因为特殊原因需要入群密钥,请在webui关于页面获取,仅最新的100个版本以内有效。
|
||||
|
||||
下面的QQ Group 无需密钥,随时清理不活跃人员和Bot,仅500人容量。
|
||||
|
||||
[困困猫猫的高中](https://qm.qq.com/q/14aUVclRUA)
|
||||
|
||||
## Thanks
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
<div dir="rtl">
|
||||
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=left />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_إطار عمل حديث على جانب البروتوكول مبني على NTQQ._
|
||||
|
||||
> حيث تنهض السحب وتولد الرياح، يتوق القلب إلى أراضٍ بعيدة لم تُسلك بعد.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Русский](./README_ru.md) | العربية
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## إعلان
|
||||
يبحث NapCat حالياً عن مشرف رئيسي جديد. يرجى التواصل عبر البريد الإلكتروني nanaeonn@outlook.com.
|
||||
|
||||
### مجموعات المجتمع
|
||||
|
||||
يمكنك الحصول على كلمة مرور الانضمام مباشرةً من **صفحة "حول" في WebUI**:
|
||||
|
||||
- [NapCat Family] Happy Family 1090875633:https://qm.qq.com/q/VwpnklcXqo
|
||||
- [NapCat Family] Royal Relatives 1059714215:https://qm.qq.com/q/gq18RH7o7S
|
||||
- [NapCat Family] Loving Family 1085662710:https://qm.qq.com/q/XyiyGPqa42
|
||||
- [NapCat Family] Joyful Family 1085359803:https://qm.qq.com/q/E4nfkGD6oK
|
||||
|
||||
## مرحباً
|
||||
|
||||
- NapCatQQ هو تطبيق حديث لبروتوكول Bot مبني على NTQQ
|
||||
|
||||
## المميزات
|
||||
|
||||
- **سهل الاستخدام**
|
||||
- يمكن للمبتدئين البدء بسهولة.
|
||||
- **سريع وفعال**
|
||||
- يعمل لفترات طويلة على أنظمة ذات ذاكرة منخفضة.
|
||||
- **واجهة API غنية**
|
||||
- تنفيذ كامل لمعظم الواجهات القياسية.
|
||||
- **مستقر وموثوق**
|
||||
- تطوير وصيانة مستمرة ومستقرة.
|
||||
|
||||
## البداية السريعة
|
||||
|
||||
قم بتنزيل أحدث إصدار من صفحة [Release](https://github.com/NapNeko/NapCatQQ/releases/)
|
||||
|
||||
**للمستخدمين لأول مرة** تأكد من قراءة الوثائق أدناه للحصول على دليل الاستخدام
|
||||
|
||||
> هذا مشروع غير ربحي. للمشاكل المتعلقة بالتكامل والأسئلة الأساسية ومشاكل إطار العمل الأساسي، يرجى البحث عن الحلول بنفسك — مجتمع هذا المشروع لا يقدم مثل هذا الدعم.
|
||||
|
||||
## الروابط
|
||||
|
||||
| الوثائق | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| الوثائق | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
| مجموعات QQ | [Happy Family](https://qm.qq.com/q/VwpnklcXqo) | [Royal Relatives](https://qm.qq.com/q/gq18RH7o7S) | [Loving Family](https://qm.qq.com/q/XyiyGPqa42) | [Joyful Family](https://qm.qq.com/q/E4nfkGD6oK) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
> يرجى عدم ذكر هذا المشروع في مجتمعات أخرى (بما في ذلك مشاريع البروتوكول الأخرى / مشاريع التطبيقات ذات الصلة) لتجنب الخلافات. إذا كانت لديك اقتراحات، يرجى مناقشتها في المجموعة الرسمية أو تقديم PR.
|
||||
|
||||
## شكر وتقدير
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — دعم كبير لهذا المشروع؛ تمت الإشارة إلى بعض الأكواد (بإذن)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — إطار عمل LLM Bot متوافق تماماً مع هذا المشروع
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — إطار عمل Bot رفيق سيبراني
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — أداة تصدير الرسائل مبنية على NapCat
|
||||
|
||||
- والأهم من ذلك كله، شكراً لك — أنت الذي تقرأ هذا الآن~
|
||||
|
||||
---
|
||||
|
||||
## الرخصة
|
||||
|
||||
هذا المشروع مفتوح المصدر بموجب رخصة هجينة. عند استخدام هذا المشروع، يرجى ملاحظة ما يلي:
|
||||
|
||||
1. كود المكتبات الخارجية أو الأجزاء المعدلة تخضع لرخصها مفتوحة المصدر الأصلية.
|
||||
2. حصل هذا المشروع على إذن من بعض المشاريع ولا يخضع لبعض القيود.
|
||||
3. باقي الكود المنطقي للمشروع يخضع [لرخصة هذا المستودع](../LICENSE).
|
||||
|
||||
**هذا المستودع مخصص فقط لتحسين سهولة الاستخدام وتنفيذ ميزات دفع الرسائل. علاوة على ذلك، يُحظر تطوير أي مشروع بناءً على كود NapCat دون إذن مسبق من المؤلف الرئيسي للمستودع. يرجى الامتثال للقوانين واللوائح المحلية عند الاستخدام. أي مشاكل ناتجة عن سوء الاستخدام تقع على عاتق المستخدم ومن يقدم تعليمات الاستخدام غير المصرح به.**
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,91 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_NTQQをベースにした最新のプロトコル側フレームワーク._
|
||||
|
||||
> 雲起きて風生じ、心は遠方を向けど路は未だ至らず.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | 日本語 | [한국어](./README_ko.md) | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## お知らせ
|
||||
NapCat は現在、新しいメインメンテナーを募集しています。nanaeonn@outlook.com までメールでご連絡ください。
|
||||
|
||||
### コミュニティグループ
|
||||
|
||||
**WebUI の「について」ページ** から参加パスワードを直接取得できます:
|
||||
|
||||
- [NapCat Family Group 1](https://qm.qq.com/q/VwpnklcXqo) Group ID(1090875633)
|
||||
- [NapCat Family Group 2](https://qm.qq.com/q/gq18RH7o7S) Group ID(1059714215)
|
||||
- [NapCat Family Group 3](https://qm.qq.com/q/XyiyGPqa42) Group ID(1085662710)
|
||||
- [NapCat Family Group 4](https://qm.qq.com/q/E4nfkGD6oK) Group ID(1085359803)
|
||||
|
||||
> 注意:入会キーは最新の100バージョンにのみ有効で、NapCatバージョン >= 4.17.31 が必要です。エラーが発生した場合は更新してください。
|
||||
|
||||
## ようこそ
|
||||
|
||||
- NapCatQQ は NTQQ をベースにした最新の Bot プロトコル側実装です
|
||||
|
||||
## 特徴
|
||||
|
||||
- **簡単に使える**
|
||||
- 初心者でも簡単に使用できます.
|
||||
- **高速で効率的**
|
||||
- 低メモリ環境のOSで長時間稼働できます.
|
||||
- **豊富な API インターフェース**
|
||||
- ほとんどの標準インターフェースを完全に実装しています.
|
||||
- **安定して信頼できる**
|
||||
- 継続的で安定した開発とメンテナンスを行っています.
|
||||
|
||||
## クイックスタート
|
||||
|
||||
最新バージョンは [Release](https://github.com/NapNeko/NapCatQQ/releases/) ページからダウンロードできます
|
||||
|
||||
**初めてご使用の方**は、以下のドキュメントで使用ガイドを必ずご確認ください
|
||||
|
||||
> このプロジェクトは非営利です。連携に関する問題/基本的な問題/下位フレームワークの問題については、ご自身で検索して解決してください。本プロジェクトのコミュニティではそのような回答は提供していません。
|
||||
|
||||
## リンク
|
||||
|
||||
| ドキュメント | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| ドキュメント | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
| QQ グループ | [Happy Family](https://qm.qq.com/q/VwpnklcXqo) | [Royal Relatives](https://qm.qq.com/q/gq18RH7o7S) | [Loving Family](https://qm.qq.com/q/XyiyGPqa42) | [Joyful Family](https://qm.qq.com/q/E4nfkGD6oK) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
> 他のコミュニティでこのプロジェクト(他のプロトコル側/関連アプリケーション側のプロジェクトを含む)に言及して論争を引き起こさないでください。提案がある場合は、公式交流グループで議論するか、PRを提出してください。
|
||||
|
||||
## 謝辞
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 本プロジェクトへの多大なサポート、一部コードを参考にしています(許可済み)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 本プロジェクトに完璧に対応した LLM Bot フレームワークです
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) サイバー仲間の 麦麦 Bot フレームワークです
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) NapCat ベースのメッセージエクスポートツールです
|
||||
|
||||
- そして何より大切なのは、画面の前のあなたに感謝することです~
|
||||
|
||||
---
|
||||
|
||||
## ライセンス
|
||||
|
||||
本プロジェクトはハイブリッドライセンスの下でオープンソース化されています。本プロジェクトを使用する際は、以下の点にご注意ください:
|
||||
|
||||
1. サードパーティライブラリのコードまたは修正部分は、元のオープンソースライセンスに従います.
|
||||
2. 本プロジェクトは一部のプロジェクトから許可を得ており、一部の制約を受けません.
|
||||
3. プロジェクトのその他のロジックコードは[本リポジトリのオープンソースライセンス](../LICENSE)に従います.
|
||||
|
||||
**本リポジトリは使いやすさの향上とメッセージプッシュ機能の実装のみを目的としています。また、リポジトリの主要作者の事前許可なく NapCat のコードに基づいてプロジェクトを開発することは禁止されています。使用する際は現地の法律と規制を遵守してください。これに起因する問題は、使用者および違反使用チュートリアルの提供者の責任となります。**
|
||||
@@ -0,0 +1,89 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_NTQQ 기반으로 구현된 최신 프로토콜 사이드 프레임워크._
|
||||
|
||||
> 구름이 일고 바람이 불어, 마음은 먼 곳을 향하나 길은 아직 닿지 못했네.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | 한국어 | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 공지
|
||||
NapCat은 현재 새로운 주요 메인테이너를 찾고 있습니다. nanaeonn@outlook.com 으로 이메일을 보내주세요.
|
||||
### 커뮤니티 그룹
|
||||
|
||||
**WebUI 의 「정보」페이지** 에서 입장 비밀번호를 바로 확인할 수 있습니다:
|
||||
|
||||
- [NapCat Family Group 1](https://qm.qq.com/q/VwpnklcXqo) Group ID(1090875633)
|
||||
- [NapCat Family Group 2](https://qm.qq.com/q/gq18RH7o7S) Group ID(1059714215)
|
||||
- [NapCat Family Group 3](https://qm.qq.com/q/XyiyGPqa42) Group ID(1085662710)
|
||||
- [NapCat Family Group 4](https://qm.qq.com/q/E4nfkGD6oK) Group ID(1085359803)
|
||||
|
||||
> 참고: 가입 키는 최신 100개 버전에서만 유효하며, NapCat 버전 >= 4.17.31이 필요합니다. 오류가 발생하면 업데이트하세요.
|
||||
## 환영합니다
|
||||
|
||||
- NapCatQQ는 NTQQ를 기반으로 한 최신 Bot 프로토콜 구현체입니다
|
||||
|
||||
## 특징
|
||||
|
||||
- **사용하기 쉬움**
|
||||
- 초보자도 쉽게 사용할 수 있습니다.
|
||||
- **빠르고 효율적**
|
||||
- 저메모리 시스템에서도 장시간 안정적으로 실행됩니다.
|
||||
- **풍부한 API 인터페이스**
|
||||
- 대부분의 표준 인터페이스를 완전히 구현했습니다.
|
||||
- **안정적이고 신뢰할 수 있음**
|
||||
- 지속적이고 안정적인 개발과 유지보수를 하고 있습니다.
|
||||
|
||||
## 빠른 시작
|
||||
|
||||
[Release](https://github.com/NapNeko/NapCatQQ/releases/) 페이지에서 최신 버전을 다운로드할 수 있습니다
|
||||
|
||||
**처음 사용하시는 분**은 아래 문서에서 사용 가이드를 반드시 확인해 주세요
|
||||
|
||||
> 이 프로젝트는 비영리입니다. 연동 문제/기본 문제/하위 프레임워크 문제는 직접 검색하여 해결해 주세요. 본 프로젝트 커뮤니티에서는 이러한 지원을 제공하지 않습니다.
|
||||
|
||||
## 링크
|
||||
|
||||
| 문서 | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| 문서 | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
| QQ 그룹 | [Happy Family](https://qm.qq.com/q/VwpnklcXqo) | [Royal Relatives](https://qm.qq.com/q/gq18RH7o7S) | [Loving Family](https://qm.qq.com/q/XyiyGPqa42) | [Joyful Family](https://qm.qq.com/q/E4nfkGD6oK) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
> 다른 커뮤니티에서 이 프로젝트(다른 프로토콜 측/관련 애플리케이션 측 프로젝트 포함)를 언급하여 논쟁을 일으키지 마세요. 제안이 있으시면 공식 그룹에서 토론하거나 PR을 제출해 주세요.
|
||||
|
||||
## 감사의 말
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — 본 프로젝트에 대한 큰 지원, 일부 코드 참고 (허가 완료)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — 본 프로젝트와 완벽하게 호환되는 LLM Bot 프레임워크
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — 사이버 친구 麦麦 Bot 프레임워크
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — NapCat 기반의 메시지 내보내기 도구
|
||||
|
||||
- 그리고 가장 중요한 것은, 지금 이 글을 읽고 있는 당신에게 감사드립니다~
|
||||
|
||||
---
|
||||
|
||||
## 라이선스
|
||||
|
||||
이 프로젝트는 하이브리드 라이선스로 오픈소스화되어 있습니다. 이 프로젝트를 사용할 때 다음 사항에 유의해 주세요:
|
||||
|
||||
1. 서드파티 라이브러리 코드 또는 수정된 부분은 원래의 오픈소스 라이선스를 따릅니다.
|
||||
2. 이 프로젝트는 일부 프로젝트로부터 허가를 받아 일부 제한을 받지 않습니다.
|
||||
3. 프로젝트의 나머지 로직 코드는 [본 리포지토리 라이선스](../LICENSE)를 따릅니다.
|
||||
|
||||
**이 리포지토리는 사용 편의성 향상과 메시지 푸시 기능 구현만을 목적으로 합니다. 또한, 리포지토리 주요 작성자의 사전 승인 없이 NapCat 코드를 기반으로 프로젝트를 개발하는 것은 금지되어 있습니다. 사용 시 현지 법률 및 규정을 준수해 주세요. 이로 인해 발생하는 문제는 사용자 및 위반 사용 튜토리얼 제공자의 책임입니다.**
|
||||
@@ -0,0 +1,91 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_Современный фреймворк на стороне протокола, реализованный на базе NTQQ._
|
||||
|
||||
> Облака поднимаются, ветер рождается, сердце стремится вдаль, но путь ещё не пройден.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | Русский | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Объявление
|
||||
NapCat в настоящее время ищет нового основного мейнтейнера. Пожалуйста, свяжитесь с нами по электронной почте nanaeonn@outlook.com.
|
||||
|
||||
### Группы сообщества
|
||||
|
||||
Пароль для вступления можно получить прямо на **странице «О программе» в WebUI**:
|
||||
|
||||
- [NapCat Family Group 1](https://qm.qq.com/q/VwpnklcXqo) Group ID(1090875633)
|
||||
- [NapCat Family Group 2](https://qm.qq.com/q/gq18RH7o7S) Group ID(1059714215)
|
||||
- [NapCat Family Group 3](https://qm.qq.com/q/XyiyGPqa42) Group ID(1085662710)
|
||||
- [NapCat Family Group 4](https://qm.qq.com/q/E4nfkGD6oK) Group ID(1085359803)
|
||||
|
||||
> Примечание: Ключ для входа действителен только для последних 100 версий и требует версию NapCat >= 4.17.31. Если возникает ошибка, пожалуйста, обновитесь.
|
||||
|
||||
## Добро пожаловать
|
||||
|
||||
- NapCatQQ — это современная реализация протокола Bot на базе NTQQ
|
||||
|
||||
## Особенности
|
||||
|
||||
- **Простота использования**
|
||||
- Начинающие пользователи смогут легко освоить работу.
|
||||
- **Скорость и эффективность**
|
||||
- Длительная работа на системах с ограниченным объёмом памяти.
|
||||
- **Богатый API-интерфейс**
|
||||
- Полная реализация большинства стандартных интерфейсов.
|
||||
- **Стабильность и надёжность**
|
||||
- Постоянная стабильная разработка и поддержка.
|
||||
|
||||
## Быстрый старт
|
||||
|
||||
Скачайте последнюю версию на странице [Release](https://github.com/NapNeko/NapCatQQ/releases/)
|
||||
|
||||
**При первом использовании** обязательно ознакомьтесь с руководством в документации ниже
|
||||
|
||||
> Проект является некоммерческим. Вопросы интеграции, базовые вопросы и вопросы по нижележащему фреймворку решайте самостоятельно — сообщество данного проекта не предоставляет такой поддержки.
|
||||
|
||||
## Ссылки
|
||||
|
||||
| Документация | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| Документация | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
| QQ группы | [Happy Family](https://qm.qq.com/q/VwpnklcXqo) | [Royal Relatives](https://qm.qq.com/q/gq18RH7o7S) | [Loving Family](https://qm.qq.com/q/XyiyGPqa42) | [Joyful Family](https://qm.qq.com/q/E4nfkGD6oK) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
> Пожалуйста, не упоминайте данный проект (включая другие протокольные/прикладные проекты) в других сообществах во избежание споров. Если у вас есть предложения, обсуждайте их в официальной группе или отправляйте PR.
|
||||
|
||||
## Благодарности
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) — большая поддержка данного проекта, частично использован код (с разрешения)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) — фреймворк LLM Bot, идеально совместимый с данным проектом
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) — кибер-друг 麦麦, Bot-фреймворк
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) — инструмент экспорта сообщений на базе NapCat
|
||||
|
||||
- И самое главное — спасибо вам, читающему это~
|
||||
|
||||
---
|
||||
|
||||
## Лицензия
|
||||
|
||||
Данный проект распространяется с открытым исходным кодом под гибридной лицензией. При использовании данного проекта обратите внимание на следующее:
|
||||
|
||||
1. Код сторонних библиотек или модифицированные части подчиняются их исходным лицензиям с открытым исходным кодом.
|
||||
2. Данный проект получил разрешение от ряда проектов и не подчиняется некоторым ограничениям.
|
||||
3. Остальной логический код проекта распространяется по [лицензии данного репозитория](../LICENSE).
|
||||
|
||||
**Данный репозиторий предназначен исключительно для повышения удобства использования и реализации функций отправки сообщений. Кроме того, запрещается разработка проектов на основе кода NapCat без предварительного разрешения главного автора репозитория. При использовании соблюдайте местное законодательство. За любые проблемы, вызванные нарушением, несут ответственность пользователь и лицо, предоставившее инструкции по незаконному использованию.**
|
||||
@@ -0,0 +1,91 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_基于 NTQQ 实现的现代化协议端框架._
|
||||
|
||||
> 云起兮风生,心向远方兮路未曾至.
|
||||
|
||||
[English](../README.md) | 简体中文 | [繁體中文](./README_zh-TW.md) | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 公告
|
||||
NapCat 当前正在寻找新的主要维护者,欢迎email到 nanaeonn@outlook.com 。
|
||||
|
||||
### 交流群
|
||||
|
||||
可直接在 **WebUI 关于页面** 获取入群密码:
|
||||
|
||||
- [NapCat家族一群](https://qm.qq.com/q/VwpnklcXqo) 群号(1090875633)
|
||||
- [NapCat家族二群](https://qm.qq.com/q/gq18RH7o7S) 群号(1059714215)
|
||||
- [NapCat家族三群](https://qm.qq.com/q/XyiyGPqa42) 群号(1085662710)
|
||||
- [NapCat家族四群](https://qm.qq.com/q/E4nfkGD6oK) 群号(1085359803)
|
||||
|
||||
> 注意:入群密钥只适合最新的100个版本,且 NapCat 版本需 >= 4.17.31,如果不符合请更新。
|
||||
|
||||
## 欢迎
|
||||
|
||||
- NapCatQQ 是现代化的基于 NTQQ 的 Bot 协议端实现
|
||||
|
||||
## 特性
|
||||
|
||||
- **易于使用**
|
||||
- 作为初学者能够轻松使用.
|
||||
- **快速高效**
|
||||
- 在低内存操作系统长时运行.
|
||||
- **丰富的 API 接口**
|
||||
- 完整实现了大部分标准接口.
|
||||
- **稳定可靠**
|
||||
- 持续稳定的开发与维护.
|
||||
|
||||
## 快速开始
|
||||
|
||||
可前往 [Release](https://github.com/NapNeko/NapCatQQ/releases/) 页面下载最新版本
|
||||
|
||||
**首次使用**请务必查看如下文档看使用教程
|
||||
|
||||
> 项目非盈利,涉及 对接问题/基础问题/下层框架问题 请自行搜索解决,本项目社区不提供此类解答。
|
||||
|
||||
## 链接
|
||||
|
||||
| 文档 | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| 文档 | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
| QQ 群 | [欢乐一家亲](https://qm.qq.com/q/VwpnklcXqo) | [皇亲国戚](https://qm.qq.com/q/gq18RH7o7S) | [相亲相爱一家人](https://qm.qq.com/q/XyiyGPqa42) | [开心家族](https://qm.qq.com/q/E4nfkGD6oK) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
> 请不要在其余社区提及本项目(包括其余协议端/相关应用端项目)引发争论,如有建议到达官方交流群讨论或PR。
|
||||
|
||||
## 致谢
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 对本项目的大力支持 参考部分代码 已获授权
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 是完美适配本项目的LLM Bot框架 在此推荐一下
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) 一只赛博群友 麦麦 Bot框架 在此推荐一下
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) 基于NapCat的消息导出工具 在此推荐一下
|
||||
|
||||
- 不过最最重要的 还是需要感谢屏幕前的你哦~
|
||||
|
||||
---
|
||||
|
||||
## 许可证
|
||||
|
||||
本项目采用 混合协议 开源,因此使用本项目时,你需要注意以下几点:
|
||||
|
||||
1. 第三方库代码或修改部分遵循其原始开源许可.
|
||||
2. 本项目获取部分项目授权而不受部分约束
|
||||
2. 项目其余逻辑代码采用[本仓库开源许可](../LICENSE).
|
||||
|
||||
**本仓库仅用于提高易用性,实现消息推送类功能,此外,禁止任何项目未经仓库主作者授权基于 NapCat 代码开发。使用请遵守当地法律法规,由此造成的问题由使用者和提供违规使用教程者负责。**
|
||||
@@ -0,0 +1,91 @@
|
||||
<img src="https://napneko.github.io/assets/newnewlogo.png" width = "305" height = "411" alt="NapCat" align=right />
|
||||
<div align="center">
|
||||
|
||||
# NapCat
|
||||
|
||||
_基於 NTQQ 實現的現代化協議端框架._
|
||||
|
||||
> 雲起兮風生,心向遠方兮路未曾至.
|
||||
|
||||
[English](../README.md) | [简体中文](./README_zh-CN.md) | 繁體中文 | [日本語](./README_ja.md) | [한국어](./README_ko.md) | [Русский](./README_ru.md) | [العربية](./README_ar.md)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## 公告
|
||||
NapCat 目前正在尋找新的主要維護者,歡迎透過 email 聯繫 nanaeonn@outlook.com。
|
||||
|
||||
### 交流群
|
||||
|
||||
可直接在 **WebUI 關於頁面** 取得入群密碼:
|
||||
|
||||
- [NapCat家族一群](https://qm.qq.com/q/VwpnklcXqo) 群號(1090875633)
|
||||
- [NapCat家族二群](https://qm.qq.com/q/gq18RH7o7S) 群號(1059714215)
|
||||
- [NapCat家族三群](https://qm.qq.com/q/XyiyGPqa42) 群號(1085662710)
|
||||
- [NapCat家族四群](https://qm.qq.com/q/E4nfkGD6oK) 群號(1085359803)
|
||||
|
||||
> 注意:入群密鑰只適用於最新的100個版本,且 NapCat 版本需 >= 4.17.31,如果錯誤請更新。
|
||||
|
||||
## 歡迎
|
||||
|
||||
- NapCatQQ 是現代化的基於 NTQQ 的 Bot 協議端實現
|
||||
|
||||
## 特性
|
||||
|
||||
- **易於使用**
|
||||
- 初學者也能輕鬆上手.
|
||||
- **快速高效**
|
||||
- 在低記憶體系統長時間穩定運行.
|
||||
- **豐富的 API 介面**
|
||||
- 完整實現了大部分標準介面.
|
||||
- **穩定可靠**
|
||||
- 持續穩定的開發與維護.
|
||||
|
||||
## 快速開始
|
||||
|
||||
可前往 [Release](https://github.com/NapNeko/NapCatQQ/releases/) 頁面下載最新版本
|
||||
|
||||
**首次使用**請務必查看以下文件中的使用教學
|
||||
|
||||
> 專案為非營利性質,涉及 對接問題/基礎問題/底層框架問題 請自行搜尋解決,本專案社群不提供此類解答。
|
||||
|
||||
## 連結
|
||||
|
||||
| 文件 | [](https://napneko.github.io/) | [](https://doc.napneko.icu/) | [](https://napcat.napneko.icu/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| 文件 | [](https://napneko.pages.dev/) | [](https://napcat.top/) | [](https://napcat.top/) |
|
||||
|:-:|:-:|:-:|:-:|
|
||||
|
||||
| DeepWiki | [](https://deepwiki.com/NapNeko/NapCatQQ) |
|
||||
|:-:|:-:|
|
||||
|
||||
| QQ 群 | [歡樂一家親](https://qm.qq.com/q/VwpnklcXqo) | [皇親國戚](https://qm.qq.com/q/gq18RH7o7S) | [相親相愛一家人](https://qm.qq.com/q/XyiyGPqa42) | [開心家族](https://qm.qq.com/q/E4nfkGD6oK) |
|
||||
|:-:|:-:|:-:|:-:|:-:|
|
||||
|
||||
> 請不要在其他社群提及本專案(包括其他協議端/相關應用端專案)以免引發爭論。如有建議,請到官方交流群討論或提交 PR。
|
||||
|
||||
## 致謝
|
||||
|
||||
- [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 對本專案的大力支持,參考部分程式碼(已獲授權)
|
||||
|
||||
- [AstrBot](https://github.com/AstrBotDevs/AstrBot) 是完美適配本專案的 LLM Bot 框架,在此推薦
|
||||
|
||||
- [MaiBot](https://github.com/MaiM-with-u/MaiBot) 一隻賽博群友 麥麥 Bot 框架,在此推薦
|
||||
|
||||
- [qq-chat-exporter](https://github.com/shuakami/qq-chat-exporter/) 基於 NapCat 的訊息匯出工具,在此推薦
|
||||
|
||||
- 不過最最重要的,還是要感謝螢幕前的你哦~
|
||||
|
||||
---
|
||||
|
||||
## 授權條款
|
||||
|
||||
本專案採用混合協議開源,因此使用本專案時,您需要注意以下幾點:
|
||||
|
||||
1. 第三方函式庫程式碼或修改部分遵循其原始開源授權.
|
||||
2. 本專案已獲取部分專案授權而不受部分約束.
|
||||
3. 專案其餘邏輯程式碼採用[本倉庫開源授權](../LICENSE).
|
||||
|
||||
**本倉庫僅用於提高易用性,實現訊息推送類功能,此外,禁止任何專案未經倉庫主作者授權基於 NapCat 程式碼開發。使用請遵守當地法律法規,由此造成的問題由使用者和提供違規使用教學者負責。**
|
||||
@@ -16,7 +16,6 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"ajv": "^8.13.0",
|
||||
"file-type": "^21.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -12,11 +12,12 @@ export interface HttpDownloadOptions {
|
||||
proxy?: string;
|
||||
}
|
||||
|
||||
type Uri2LocalRes = {
|
||||
export type Uri2LocalRes = {
|
||||
success: boolean,
|
||||
errMsg: string,
|
||||
fileName: string,
|
||||
path: string;
|
||||
isLocal: boolean; // true=用户本地文件(不可删除),false=临时下载/解码文件(需清理)
|
||||
};
|
||||
|
||||
// 定义一个异步函数来检查文件是否存在
|
||||
@@ -151,7 +152,7 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
|
||||
const isTargetHttps = targetUrl.protocol === 'https:';
|
||||
const proxyPort = parseInt(proxyUrl.port) || (proxyUrl.protocol === 'https:' ? 443 : 80);
|
||||
|
||||
|
||||
// 代理认证头
|
||||
const proxyAuthHeader = proxyUrl.username && proxyUrl.password
|
||||
? { 'Proxy-Authorization': 'Basic ' + Buffer.from(`${decodeURIComponent(proxyUrl.username)}:${decodeURIComponent(proxyUrl.password)}`).toString('base64') }
|
||||
@@ -165,7 +166,7 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
method: 'CONNECT',
|
||||
path: `${targetUrl.hostname}:${targetUrl.port || 443}`,
|
||||
headers: {
|
||||
'Host': `${targetUrl.hostname}:${targetUrl.port || 443}`,
|
||||
Host: `${targetUrl.hostname}:${targetUrl.port || 443}`,
|
||||
...proxyAuthHeader,
|
||||
},
|
||||
});
|
||||
@@ -179,7 +180,7 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
|
||||
// 在隧道上建立 TLS 连接
|
||||
const tlsSocket = tls.connect({
|
||||
socket: socket,
|
||||
socket,
|
||||
servername: targetUrl.hostname,
|
||||
rejectUnauthorized: true,
|
||||
}, () => {
|
||||
@@ -187,14 +188,14 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
const requestPath = targetUrl.pathname + targetUrl.search;
|
||||
const requestHeaders = {
|
||||
...headers,
|
||||
'Host': targetUrl.hostname,
|
||||
'Connection': 'close',
|
||||
Host: targetUrl.hostname,
|
||||
Connection: 'close',
|
||||
};
|
||||
|
||||
|
||||
const headerLines = Object.entries(requestHeaders)
|
||||
.map(([key, value]) => `${key}: ${value}`)
|
||||
.join('\r\n');
|
||||
|
||||
|
||||
const httpRequest = `GET ${requestPath} HTTP/1.1\r\n${headerLines}\r\n\r\n`;
|
||||
tlsSocket.write(httpRequest);
|
||||
});
|
||||
@@ -209,19 +210,19 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
|
||||
tlsSocket.on('data', (chunk: Buffer) => {
|
||||
responseData = Buffer.concat([responseData, chunk]);
|
||||
|
||||
|
||||
if (!headersParsed) {
|
||||
const headerEndIndex = responseData.indexOf('\r\n\r\n');
|
||||
if (headerEndIndex !== -1) {
|
||||
headersParsed = true;
|
||||
const headerStr = responseData.subarray(0, headerEndIndex).toString();
|
||||
const headerLines = headerStr.split('\r\n');
|
||||
|
||||
|
||||
// 解析状态码
|
||||
const statusLine = headerLines[0];
|
||||
const statusMatch = statusLine?.match(/HTTP\/\d\.\d\s+(\d+)/);
|
||||
statusCode = statusMatch ? parseInt(statusMatch[1]!) : 0;
|
||||
|
||||
|
||||
// 解析响应头
|
||||
for (const line of headerLines.slice(1)) {
|
||||
const [key, ...valueParts] = line.split(':');
|
||||
@@ -232,7 +233,7 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
redirectLocation = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bodyData = responseData.subarray(headerEndIndex + 4);
|
||||
}
|
||||
} else {
|
||||
@@ -243,18 +244,18 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
tlsSocket.on('end', () => {
|
||||
// 处理重定向
|
||||
if (statusCode >= 300 && statusCode < 400 && redirectLocation) {
|
||||
const redirectUrl = redirectLocation.startsWith('http')
|
||||
? redirectLocation
|
||||
const redirectUrl = redirectLocation.startsWith('http')
|
||||
? redirectLocation
|
||||
: `${targetUrl.protocol}//${targetUrl.host}${redirectLocation}`;
|
||||
httpDownloadWithProxy(redirectUrl, headers, proxy).then(resolve).catch(reject);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (statusCode !== 200) {
|
||||
reject(new Error(`下载失败: ${statusCode}`));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 处理 chunked 编码
|
||||
if (isChunked) {
|
||||
resolve(parseChunkedBody(bodyData));
|
||||
@@ -282,7 +283,7 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
path: url, // 完整 URL
|
||||
headers: {
|
||||
...headers,
|
||||
'Host': targetUrl.hostname,
|
||||
Host: targetUrl.hostname,
|
||||
...proxyAuthHeader,
|
||||
},
|
||||
}, (response) => {
|
||||
@@ -304,26 +305,26 @@ function httpDownloadWithProxy (url: string, headers: Record<string, string>, pr
|
||||
function parseChunkedBody (data: Buffer): Buffer {
|
||||
const chunks: Buffer[] = [];
|
||||
let offset = 0;
|
||||
|
||||
|
||||
while (offset < data.length) {
|
||||
// 查找 chunk 大小行的结束
|
||||
const lineEnd = data.indexOf('\r\n', offset);
|
||||
if (lineEnd === -1) break;
|
||||
|
||||
|
||||
const sizeStr = data.subarray(offset, lineEnd).toString().split(';')[0]; // 忽略 chunk 扩展
|
||||
const chunkSize = parseInt(sizeStr!, 16);
|
||||
|
||||
|
||||
if (chunkSize === 0) break; // 最后一个 chunk
|
||||
|
||||
|
||||
const chunkStart = lineEnd + 2;
|
||||
const chunkEnd = chunkStart + chunkSize;
|
||||
|
||||
|
||||
if (chunkEnd > data.length) break;
|
||||
|
||||
|
||||
chunks.push(data.subarray(chunkStart, chunkEnd));
|
||||
offset = chunkEnd + 2; // 跳过 chunk 数据后的 \r\n
|
||||
}
|
||||
|
||||
|
||||
return Buffer.concat(chunks);
|
||||
}
|
||||
|
||||
@@ -416,25 +417,24 @@ export async function uriToLocalFile (dir: string, uri: string, filename: string
|
||||
case FileUriType.Local: {
|
||||
const fileExt = path.extname(HandledUri);
|
||||
const localFileName = path.basename(HandledUri, fileExt) + fileExt;
|
||||
const tempFilePath = path.join(dir, filename + fileExt);
|
||||
fs.copyFileSync(HandledUri, tempFilePath);
|
||||
return { success: true, errMsg: '', fileName: localFileName, path: tempFilePath };
|
||||
// 直接返回原始路径,不复制,避免不必要的 IO
|
||||
return { success: true, errMsg: '', fileName: localFileName, path: HandledUri, isLocal: true };
|
||||
}
|
||||
|
||||
case FileUriType.Remote: {
|
||||
const buffer = await httpDownload({ url: HandledUri, headers: headers ?? {}, proxy });
|
||||
fs.writeFileSync(filePath, buffer);
|
||||
return { success: true, errMsg: '', fileName: filename, path: filePath };
|
||||
return { success: true, errMsg: '', fileName: filename, path: filePath, isLocal: false };
|
||||
}
|
||||
|
||||
case FileUriType.Base64: {
|
||||
const base64 = HandledUri.replace(/^base64:\/\//, '');
|
||||
const base64Buffer = Buffer.from(base64, 'base64');
|
||||
fs.writeFileSync(filePath, base64Buffer);
|
||||
return { success: true, errMsg: '', fileName: filename, path: filePath };
|
||||
return { success: true, errMsg: '', fileName: filename, path: filePath, isLocal: false };
|
||||
}
|
||||
|
||||
default:
|
||||
return { success: false, errMsg: `识别URL失败, uri= ${uri}`, fileName: '', path: '' };
|
||||
return { success: false, errMsg: `识别URL失败, uri= ${uri}`, fileName: '', path: '', isLocal: false };
|
||||
}
|
||||
}
|
||||
@@ -184,6 +184,35 @@ export function stringifyWithBigInt (obj: any) {
|
||||
);
|
||||
}
|
||||
|
||||
export function parseAppidFromMajorV2 (nodeMajor: string): string | undefined {
|
||||
const marker = Buffer.from('QQAppId/', 'utf-8');
|
||||
const filePath = path.resolve(nodeMajor);
|
||||
const fileContent = fs.readFileSync(filePath);
|
||||
|
||||
let searchPosition = 0;
|
||||
while (true) {
|
||||
const index = fileContent.indexOf(marker, searchPosition);
|
||||
if (index === -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
const start = index + marker.length;
|
||||
const end = fileContent.indexOf(0x00, start);
|
||||
if (end === -1) {
|
||||
break;
|
||||
}
|
||||
const content = fileContent.subarray(start, end);
|
||||
const str = content.toString('utf-8');
|
||||
if (/^\d+$/.test(str)) {
|
||||
return str;
|
||||
}
|
||||
|
||||
searchPosition = end + 1;
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
export function parseAppidFromMajor (nodeMajor: string): string | undefined {
|
||||
const hexSequence = 'A4 09 00 00 00 35';
|
||||
const sequenceBytes = Buffer.from(hexSequence.replace(/ /g, ''), 'hex');
|
||||
@@ -224,7 +253,6 @@ export async function getAllTags (mirror?: string): Promise<{ tags: string[], mi
|
||||
return getAllTagsFromMirror('NapNeko', 'NapCatQQ', mirror);
|
||||
}
|
||||
|
||||
|
||||
export async function getLatestTag (mirror?: string): Promise<string> {
|
||||
const { tags } = await getAllTags(mirror);
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@ export interface ILogWrapper {
|
||||
logWarn (...args: any[]): void;
|
||||
logFatal (...args: any[]): void;
|
||||
logMessage (msg: unknown, selfInfo: unknown): void;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* GitHub 镜像配置模块
|
||||
* 提供统一的镜像源管理,支持复杂网络环境
|
||||
*
|
||||
*
|
||||
* 镜像源测试时间: 2026-01-03
|
||||
* 测试通过: 55/61 完全可用
|
||||
*/
|
||||
@@ -17,7 +17,7 @@ import { PromiseTimer } from './helper';
|
||||
* GitHub 文件加速镜像
|
||||
* 用于加速 release assets 下载
|
||||
* 按延迟排序,优先使用快速镜像
|
||||
*
|
||||
*
|
||||
* 测试时间: 2026-01-03
|
||||
* 镜像支持 301/302 重定向
|
||||
* 懒加载测速:首次使用时自动测速,缓存 30 分钟
|
||||
@@ -74,7 +74,7 @@ export const GITHUB_FILE_MIRRORS = [
|
||||
* GitHub API 镜像
|
||||
* 用于访问 GitHub API(作为备选方案)
|
||||
* 注:优先使用非 API 方法,减少对 API 的依赖
|
||||
*
|
||||
*
|
||||
* 经测试,大部分代理镜像不支持 API 转发
|
||||
* 建议使用 getLatestReleaseTag 等方法避免 API 调用
|
||||
*/
|
||||
@@ -271,8 +271,6 @@ async function performMirrorTest (): Promise<string[]> {
|
||||
.sort((a, b) => a.latency - b.latency)
|
||||
.map(r => r.mirror);
|
||||
|
||||
|
||||
|
||||
// 至少返回原始 URL
|
||||
if (successfulMirrors.length === 0) {
|
||||
return [''];
|
||||
@@ -287,7 +285,6 @@ async function performMirrorTest (): Promise<string[]> {
|
||||
export function clearMirrorCache (): void {
|
||||
cachedFastMirrors = null;
|
||||
cacheTimestamp = 0;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -664,7 +661,7 @@ export function buildReleaseDownloadUrl (
|
||||
|
||||
/**
|
||||
* 获取 GitHub release 信息(优先使用非 API 方法)
|
||||
*
|
||||
*
|
||||
* 策略:
|
||||
* 1. 先通过 git refs 获取 tags
|
||||
* 2. 直接构建下载 URL,不依赖 API
|
||||
@@ -725,7 +722,7 @@ export async function getGitHubRelease (
|
||||
const response = await PromiseTimer(
|
||||
RequestUtil.HttpGetJson<any>(url, 'GET', undefined, {
|
||||
'User-Agent': 'NapCat',
|
||||
'Accept': 'application/vnd.github.v3+json',
|
||||
Accept: 'application/vnd.github.v3+json',
|
||||
}),
|
||||
currentConfig.timeout
|
||||
);
|
||||
@@ -958,7 +955,7 @@ async function getWorkflowRunsFromHtml (
|
||||
allRuns.push({
|
||||
id,
|
||||
created_at: timeMatch[1],
|
||||
title: title.trim()
|
||||
title: title.trim(),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -994,7 +991,7 @@ async function getWorkflowRunsFromHtml (
|
||||
/**
|
||||
* 通过 API 获取最新的 workflow runs,然后直接拼接 nightly.link 下载链接
|
||||
* 无需解析 HTML,直接使用固定的 URL 格式
|
||||
*
|
||||
*
|
||||
* 策略:
|
||||
* 1. 优先使用 GitHub API
|
||||
* 2. API 失败时,从 GitHub Actions HTML 页面解析
|
||||
@@ -1042,7 +1039,6 @@ async function getArtifactsFromNightlyLink (
|
||||
}
|
||||
}
|
||||
return { artifacts, mirror: runsMirror };
|
||||
|
||||
} catch {
|
||||
return { artifacts: [], mirror: '' };
|
||||
}
|
||||
@@ -1051,7 +1047,7 @@ async function getArtifactsFromNightlyLink (
|
||||
/**
|
||||
* 获取 GitHub Action 最新运行的 artifacts
|
||||
* 用于下载 nightly/dev 版本
|
||||
*
|
||||
*
|
||||
* 策略:
|
||||
* 1. 检查缓存(10分钟有效)
|
||||
* 2. 优先尝试从 nightly.link 获取(无需认证,更稳定)
|
||||
|
||||
@@ -3,4 +3,4 @@ export interface ISubscription {
|
||||
subscribe (listener: LogListener): void;
|
||||
unsubscribe (listener: LogListener): void;
|
||||
notify (msg: string): void;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
import path from 'node:path';
|
||||
import { InstanceContext, NapCatCore } from '@/napcat-core/index';
|
||||
import {
|
||||
checkSqliteAvailable,
|
||||
DatabaseHandle,
|
||||
openDatabase,
|
||||
decryptAndOpen,
|
||||
readSingleDatabase,
|
||||
scanAllDatabases,
|
||||
formatScanResults,
|
||||
decryptDatabaseFile,
|
||||
type DatabaseScanResult,
|
||||
type DatabaseReadOptions,
|
||||
type TableInfo,
|
||||
} from 'napcat-database';
|
||||
|
||||
type SQLInputValue = import('node:sqlite').SQLInputValue;
|
||||
|
||||
export class NTQQDatabaseApi {
|
||||
context: InstanceContext;
|
||||
core: NapCatCore;
|
||||
|
||||
constructor (context: InstanceContext, core: NapCatCore) {
|
||||
this.context = context;
|
||||
this.core = core;
|
||||
}
|
||||
|
||||
/** node:sqlite 是否可用 */
|
||||
async isSqliteAvailable (): Promise<boolean> {
|
||||
return checkSqliteAvailable();
|
||||
}
|
||||
|
||||
/** 获取当前账号的 nt_db 目录 */
|
||||
getNtDbDir (): string {
|
||||
return path.resolve(this.core.dataPath, this.core.selfInfo.uin, 'nt_qq', 'nt_db');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取解密缓存目录
|
||||
* 默认: <NapCatDataPath>/db_<uin>/
|
||||
* 可通过 customDir 完全自定义
|
||||
*/
|
||||
getDefaultCacheDir (customDir?: string): string {
|
||||
if (customDir) return customDir;
|
||||
return path.resolve(this.core.NapCatDataPath, `db_${this.core.selfInfo.uin}`);
|
||||
}
|
||||
|
||||
/** 当前是否已获取到数据库 passphrase */
|
||||
hasPassphrase (): boolean {
|
||||
return !!this.core.dbPassphrase;
|
||||
}
|
||||
|
||||
/** 获取 passphrase Buffer,未获取时返回 null */
|
||||
getPassphraseBuffer (): Buffer | null {
|
||||
return this.core.dbPassphrase ? Buffer.from(this.core.dbPassphrase) : null;
|
||||
}
|
||||
|
||||
// ======================== SQLite 数据库操作 ========================
|
||||
|
||||
/**
|
||||
* 打开一个已解密的 SQLite 数据库文件
|
||||
* @param filePath 解密后 .db 文件路径
|
||||
* @param readOnly 是否只读 (默认 true)
|
||||
* @returns DatabaseHandle 实例,使用完毕后需调用 .close()
|
||||
*/
|
||||
openDecryptedDb (filePath: string, readOnly = true): DatabaseHandle {
|
||||
return openDatabase(filePath, readOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密并打开一个 NTQQ 加密数据库
|
||||
* @param dbName 数据库文件名 (如 'nt_msg.db') 或完整路径
|
||||
* @param readOnly 是否只读 (默认 true)
|
||||
* @param cacheDir 自定义缓存目录,默认 db_<uin>
|
||||
* @returns DatabaseHandle 实例,使用完毕后需调用 .close()
|
||||
*/
|
||||
openDatabase (dbName: string, readOnly = true, cacheDir?: string): DatabaseHandle | null {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return null;
|
||||
|
||||
const dbPath = path.isAbsolute(dbName) ? dbName : path.resolve(this.getNtDbDir(), dbName);
|
||||
const resolvedCacheDir = this.getDefaultCacheDir(cacheDir);
|
||||
|
||||
return decryptAndOpen(dbPath, passphrase, resolvedCacheDir, readOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对加密数据库执行查询并自动关闭连接
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param sql SQL 查询语句
|
||||
* @param params 绑定参数
|
||||
* @returns 查询结果行数组,passphrase 不可用时返回 null
|
||||
*/
|
||||
query<T = Record<string, unknown>> (
|
||||
dbName: string,
|
||||
sql: string,
|
||||
params?: SQLInputValue[] | Record<string, SQLInputValue>
|
||||
): T[] | null {
|
||||
const db = this.openDatabase(dbName);
|
||||
if (!db) return null;
|
||||
try {
|
||||
return db.query<T>(sql, params);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对加密数据库执行查询,仅返回第一行
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param sql SQL 查询语句
|
||||
* @param params 绑定参数
|
||||
*/
|
||||
queryOne<T = Record<string, unknown>> (
|
||||
dbName: string,
|
||||
sql: string,
|
||||
params?: SQLInputValue[] | Record<string, SQLInputValue>
|
||||
): T | undefined | null {
|
||||
const db = this.openDatabase(dbName);
|
||||
if (!db) return null;
|
||||
try {
|
||||
return db.queryOne<T>(sql, params);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 对加密数据库执行非查询 SQL (INSERT/UPDATE/DELETE 等) 并自动关闭
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param sql SQL 语句
|
||||
* @param params 绑定参数
|
||||
*/
|
||||
execute (
|
||||
dbName: string,
|
||||
sql: string,
|
||||
params?: SQLInputValue[] | Record<string, SQLInputValue>
|
||||
): { changes: number | bigint; lastInsertRowid: number | bigint; } | null {
|
||||
const db = this.openDatabase(dbName, false);
|
||||
if (!db) return null;
|
||||
try {
|
||||
return db.execute(sql, params);
|
||||
} finally {
|
||||
db.close();
|
||||
}
|
||||
}
|
||||
|
||||
// ======================== 批量扫描 ========================
|
||||
|
||||
/**
|
||||
* 读取单个加密数据库的表信息
|
||||
* @param dbName 数据库文件名 (如 'nt_msg.db'),或完整路径
|
||||
* @param cacheDir 自定义缓存目录,默认 db_<uin>
|
||||
* @param options 其他选项
|
||||
*/
|
||||
readDatabase (dbName: string, cacheDir?: string, options?: Omit<DatabaseReadOptions, 'cacheDir'>): DatabaseScanResult | null {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return null;
|
||||
|
||||
const dbPath = path.isAbsolute(dbName) ? dbName : path.resolve(this.getNtDbDir(), dbName);
|
||||
const resolvedCacheDir = this.getDefaultCacheDir(cacheDir);
|
||||
|
||||
return readSingleDatabase(dbPath, passphrase, { cacheDir: resolvedCacheDir, ...options });
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫描所有加密数据库
|
||||
* @param cacheDir 自定义缓存目录,默认 db_<uin>
|
||||
* @param options 其他选项
|
||||
*/
|
||||
scanDatabases (cacheDir?: string, options?: Omit<DatabaseReadOptions, 'cacheDir'>): DatabaseScanResult[] {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return [];
|
||||
|
||||
const resolvedCacheDir = this.getDefaultCacheDir(cacheDir);
|
||||
return scanAllDatabases(this.getNtDbDir(), passphrase, { cacheDir: resolvedCacheDir, ...options });
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅解密数据库文件(不读取表信息,不需要 node:sqlite)
|
||||
* @param dbName 数据库文件名或完整路径
|
||||
* @param outputPath 输出路径,默认保存到 db_<uin>/<dbName>
|
||||
*/
|
||||
decryptDatabase (dbName: string, outputPath?: string): string | null {
|
||||
const passphrase = this.getPassphraseBuffer();
|
||||
if (!passphrase) return null;
|
||||
|
||||
const dbPath = path.isAbsolute(dbName) ? dbName : path.resolve(this.getNtDbDir(), dbName);
|
||||
const outPath = outputPath ?? path.resolve(this.getDefaultCacheDir(), path.basename(dbName));
|
||||
|
||||
return decryptDatabaseFile(dbPath, passphrase, outPath);
|
||||
}
|
||||
|
||||
/** 格式化扫描结果为可读字符串 */
|
||||
formatResults (results: DatabaseScanResult[]): string {
|
||||
return formatScanResults(results);
|
||||
}
|
||||
}
|
||||
|
||||
export { DatabaseHandle };
|
||||
export type { DatabaseScanResult, DatabaseReadOptions, TableInfo };
|
||||
@@ -33,7 +33,7 @@ export class NTQQFileApi {
|
||||
'http://ss.xingzhige.com/music_card/rkey',
|
||||
'https://secret-service.bietiaop.com/rkeys',
|
||||
],
|
||||
this.context.logger
|
||||
this.context.logger
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,3 +9,4 @@ export * from './packet';
|
||||
export * from './file';
|
||||
export * from './online';
|
||||
export * from './flash';
|
||||
export * from './database';
|
||||
@@ -114,7 +114,7 @@ export class NTQQOnlineApi {
|
||||
fileElement: {
|
||||
fileName: actualFolderName,
|
||||
filePath: folderPath,
|
||||
fileSize: "",
|
||||
fileSize: '',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ export class NTQQPacketApi {
|
||||
this.pkt = new PacketClientSession(this.core);
|
||||
await this.pkt.init(process.pid, table.recv, table.send);
|
||||
try {
|
||||
await this.pkt.operation.FetchRkey(1500);
|
||||
await this.pkt.operation.FetchRkey(3000);
|
||||
} catch (error) {
|
||||
this.logger.logError('测试Packet状态异常', error);
|
||||
return false;
|
||||
|
||||
@@ -164,8 +164,6 @@ export class NTQQWebApi {
|
||||
imgWidth: number = 540,
|
||||
imgHeight: number = 300
|
||||
) {
|
||||
|
||||
|
||||
const cookieObject = await this.core.apis.UserApi.getCookies('qun.qq.com');
|
||||
|
||||
try {
|
||||
@@ -330,10 +328,10 @@ export class NTQQWebApi {
|
||||
return (hash & 0x7FFFFFFF).toString();
|
||||
}
|
||||
|
||||
async getAlbumListByNTQQ (gc: string) {
|
||||
async getAlbumListByNTQQ (gc: string, attach_info: string = '') {
|
||||
return await this.context.session.getAlbumService().getAlbumList({
|
||||
qun_id: gc,
|
||||
attach_info: '',
|
||||
attach_info,
|
||||
seq: 3331,
|
||||
request_time_line: {
|
||||
request_invoke_time: '0',
|
||||
@@ -477,10 +475,10 @@ export class NTQQWebApi {
|
||||
const client_key = Date.now() * 1000;
|
||||
return await this.context.session.getAlbumService().doQunComment(
|
||||
random_seq, {
|
||||
map_info: [],
|
||||
map_bytes_info: [],
|
||||
map_user_account: [],
|
||||
},
|
||||
map_info: [],
|
||||
map_bytes_info: [],
|
||||
map_user_account: [],
|
||||
},
|
||||
qunId,
|
||||
2,
|
||||
createAlbumMediaFeed(uin, albumId, lloc),
|
||||
@@ -511,13 +509,13 @@ export class NTQQWebApi {
|
||||
const uin = this.core.selfInfo.uin || '10001';
|
||||
return await this.context.session.getAlbumService().doQunLike(
|
||||
random_seq, {
|
||||
map_info: [],
|
||||
map_bytes_info: [],
|
||||
map_user_account: [],
|
||||
}, {
|
||||
id,
|
||||
status: 1,
|
||||
},
|
||||
map_info: [],
|
||||
map_bytes_info: [],
|
||||
map_user_account: [],
|
||||
}, {
|
||||
id,
|
||||
status: 1,
|
||||
},
|
||||
createAlbumFeedPublish(qunId, uin, albumId, lloc)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ export enum UploadSceneType {
|
||||
KUPLOADSCENEH5LAUNCHCLIENTSHORTCUTKEYCTRLCV,
|
||||
KUPLOADSCENEAIODRAG,
|
||||
KUPLOADSCENEAIOFILESELECTOR,
|
||||
KUPLOADSCENEAIOSHORTCUTKEYCTRLCV
|
||||
KUPLOADSCENEAIOSHORTCUTKEYCTRLCV,
|
||||
}
|
||||
export interface StartFlashTaskRequests {
|
||||
screen: number; // 1 PC-QQ
|
||||
@@ -237,7 +237,7 @@ export interface StartFlashTaskRequests {
|
||||
}
|
||||
export enum BusiScene {
|
||||
KBUSISCENEINVALID,
|
||||
KBUSISCENEFLASHSCENE
|
||||
KBUSISCENEFLASHSCENE,
|
||||
}
|
||||
export interface FileListInfoRequests {
|
||||
seq: number, // 0
|
||||
@@ -274,7 +274,7 @@ export enum DownloadSceneType {
|
||||
KDOWNLOADSCENELINKOTHERINQQ,
|
||||
KDOWNLOADSCENESCANQRCODE,
|
||||
KDWONLOADSCENEFLASHTRANSFERCENTERCLIENT,
|
||||
KDWONLOADSCENEFLASHTRANSFERCENTERSCHEMA
|
||||
KDWONLOADSCENEFLASHTRANSFERCENTERSCHEMA,
|
||||
}
|
||||
export interface FlashFileSetInfo {
|
||||
fileSetId: string,
|
||||
|
||||
+12
@@ -534,5 +534,17 @@
|
||||
"9.9.27-45758": {
|
||||
"appid": 537340213,
|
||||
"qua": "V1_WIN_NQ_9.9.27_45758_GW_B"
|
||||
},
|
||||
"3.2.26-46494": {
|
||||
"appid": 537345891,
|
||||
"qua": "V1_LNX_NQ_3.2.26_46494_GW_B"
|
||||
},
|
||||
"9.9.28-46494": {
|
||||
"appid": 537345855,
|
||||
"qua": "V1_WIN_NQ_9.9.28_46494_GW_B"
|
||||
},
|
||||
"6.9.90-46494": {
|
||||
"appid": 537345879,
|
||||
"qua": "V1_MAC_NQ_6.9.90_46494_GW_B"
|
||||
}
|
||||
}
|
||||
+16
-8
@@ -1,9 +1,17 @@
|
||||
{
|
||||
"fileLog": false,
|
||||
"consoleLog": true,
|
||||
"fileLogLevel": "debug",
|
||||
"consoleLogLevel": "info",
|
||||
"packetBackend": "auto",
|
||||
"packetServer": "",
|
||||
"o3HookMode": 1
|
||||
}
|
||||
"fileLog": false,
|
||||
"consoleLog": true,
|
||||
"fileLogLevel": "debug",
|
||||
"consoleLogLevel": "info",
|
||||
"packetBackend": "auto",
|
||||
"packetServer": "",
|
||||
"o3HookMode": 1,
|
||||
"bypass": {
|
||||
"hook": false,
|
||||
"window": false,
|
||||
"module": false,
|
||||
"process": false,
|
||||
"container": false,
|
||||
"js": false
|
||||
}
|
||||
}
|
||||
+12
@@ -178,5 +178,17 @@
|
||||
"9.9.27-45758-x64": {
|
||||
"send": "0A6A6BC",
|
||||
"recv": "1E87EC1"
|
||||
},
|
||||
"9.9.28-46949-x64": {
|
||||
"send": "0A6D66C",
|
||||
"recv": "1E9890D"
|
||||
},
|
||||
"3.2.26-46949-x64": {
|
||||
"send": "5D30910",
|
||||
"recv": "31814B0"
|
||||
},
|
||||
"3.2.26-46949-arm64": {
|
||||
"send": "3EDC654",
|
||||
"recv": "14A3124"
|
||||
}
|
||||
}
|
||||
+12
@@ -686,5 +686,17 @@
|
||||
"3.2.25-45758-arm64": {
|
||||
"send": "6D6F9A0",
|
||||
"recv": "6D73350"
|
||||
},
|
||||
"3.2.26-46494-x64": {
|
||||
"send": "AB341C0",
|
||||
"recv": "AB37C60"
|
||||
},
|
||||
"9.9.28-46494-x64": {
|
||||
"send": "2E77C20",
|
||||
"recv": "2E7B1A0"
|
||||
},
|
||||
"3.2.26-46494-arm64": {
|
||||
"send": "6DBBBB0",
|
||||
"recv": "6DBF560"
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ export async function encodeSilk (filePath: string, TEMP_DIR: string, logger: Lo
|
||||
return {
|
||||
converted: true,
|
||||
path: pttPath,
|
||||
duration: duration,
|
||||
duration,
|
||||
};
|
||||
} else {
|
||||
let duration = 0;
|
||||
|
||||
@@ -2,22 +2,24 @@ import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import type { NapCatCore } from '@/napcat-core';
|
||||
import json5 from 'json5';
|
||||
import Ajv, { AnySchema, ValidateFunction } from 'ajv';
|
||||
import { TypeCompiler, TypeCheck } from '@sinclair/typebox/compiler';
|
||||
import { Value } from '@sinclair/typebox/value';
|
||||
import { TSchema } from '@sinclair/typebox';
|
||||
|
||||
export abstract class ConfigBase<T> {
|
||||
name: string;
|
||||
core: NapCatCore;
|
||||
configPath: string;
|
||||
configData: T = {} as T;
|
||||
ajv: Ajv;
|
||||
validate: ValidateFunction<T>;
|
||||
configSchema: TSchema;
|
||||
validate: TypeCheck<TSchema>;
|
||||
|
||||
protected constructor (name: string, core: NapCatCore, configPath: string, ConfigSchema: AnySchema) {
|
||||
protected constructor (name: string, core: NapCatCore, configPath: string, ConfigSchema: TSchema) {
|
||||
this.name = name;
|
||||
this.core = core;
|
||||
this.configPath = configPath;
|
||||
this.ajv = new Ajv({ useDefaults: true, coerceTypes: true });
|
||||
this.validate = this.ajv.compile<T>(ConfigSchema);
|
||||
this.configSchema = ConfigSchema;
|
||||
this.validate = TypeCompiler.Compile(ConfigSchema);
|
||||
fs.mkdirSync(this.configPath, { recursive: true });
|
||||
this.read();
|
||||
}
|
||||
@@ -43,8 +45,12 @@ export abstract class ConfigBase<T> {
|
||||
private loadConfig (configPath: string): T {
|
||||
try {
|
||||
const newConfigData = json5.parse(fs.readFileSync(configPath, 'utf-8'));
|
||||
this.validate(newConfigData);
|
||||
this.configData = newConfigData;
|
||||
let data: unknown = newConfigData;
|
||||
data = Value.Parse(this.configSchema, data);
|
||||
if (!this.validate.Check(data)) {
|
||||
throw new Error([...this.validate.Errors(data)].map(e => e.message).join(', '));
|
||||
}
|
||||
this.configData = data as T;
|
||||
this.core.context.logger.logDebug(`[Core] [Config] 配置文件${configPath}加载`, this.configData);
|
||||
return this.configData;
|
||||
} catch (e: unknown) {
|
||||
@@ -55,8 +61,12 @@ export abstract class ConfigBase<T> {
|
||||
|
||||
save (newConfigData: T = this.configData): void {
|
||||
const configPath = this.getConfigPath(this.core.selfInfo.uin);
|
||||
this.validate(newConfigData);
|
||||
this.configData = newConfigData;
|
||||
let data: unknown = newConfigData;
|
||||
data = Value.Parse(this.configSchema, data);
|
||||
if (!this.validate.Check(data)) {
|
||||
throw new Error([...this.validate.Errors(data)].map(e => e.message).join(', '));
|
||||
}
|
||||
this.configData = data as T;
|
||||
try {
|
||||
fs.writeFileSync(configPath, JSON.stringify(this.configData, null, 2));
|
||||
} catch (e: unknown) {
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
import { ConfigBase } from '@/napcat-core/helper/config-base';
|
||||
import { NapCatCore } from '@/napcat-core/index';
|
||||
import { Type, Static } from '@sinclair/typebox';
|
||||
import { AnySchema } from 'ajv';
|
||||
import { Type, Static, TSchema } from '@sinclair/typebox';
|
||||
|
||||
import { Value } from '@sinclair/typebox/value';
|
||||
|
||||
import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import json5 from 'json5';
|
||||
|
||||
export const BypassOptionsSchema = Type.Object({
|
||||
hook: Type.Boolean({ default: true }),
|
||||
window: Type.Boolean({ default: true }),
|
||||
module: Type.Boolean({ default: true }),
|
||||
process: Type.Boolean({ default: true }),
|
||||
container: Type.Boolean({ default: true }),
|
||||
js: Type.Boolean({ default: true }),
|
||||
});
|
||||
|
||||
export const NapcatConfigSchema = Type.Object({
|
||||
fileLog: Type.Boolean({ default: false }),
|
||||
@@ -11,12 +25,32 @@ export const NapcatConfigSchema = Type.Object({
|
||||
packetBackend: Type.String({ default: 'auto' }),
|
||||
packetServer: Type.String({ default: '' }),
|
||||
o3HookMode: Type.Number({ default: 0 }),
|
||||
autoTimeSync: Type.Boolean({ default: true }),
|
||||
bypass: Type.Optional(BypassOptionsSchema),
|
||||
});
|
||||
|
||||
export type NapcatConfig = Static<typeof NapcatConfigSchema>;
|
||||
|
||||
/**
|
||||
* 从指定配置目录读取 napcat.json,按 NapcatConfigSchema 校验并填充默认值
|
||||
* 用于登录前(无 NapCatCore 实例时)的早期配置读取
|
||||
*/
|
||||
export function loadNapcatConfig (configPath: string): NapcatConfig {
|
||||
let data: Record<string, unknown> = {};
|
||||
try {
|
||||
const configFile = path.join(configPath, 'napcat.json');
|
||||
if (fs.existsSync(configFile)) {
|
||||
data = json5.parse(fs.readFileSync(configFile, 'utf-8'));
|
||||
}
|
||||
} catch {
|
||||
// 读取失败时使用 schema 默认值
|
||||
}
|
||||
data = Value.Parse(NapcatConfigSchema, data) as Record<string, unknown>;
|
||||
return data as NapcatConfig;
|
||||
}
|
||||
|
||||
export class NapCatConfigLoader extends ConfigBase<NapcatConfig> {
|
||||
constructor (core: NapCatCore, configPath: string, schema: AnySchema) {
|
||||
constructor (core: NapCatCore, configPath: string, schema: TSchema) {
|
||||
super('napcat', core, configPath, schema);
|
||||
}
|
||||
}
|
||||
@@ -64,10 +64,12 @@ export class FFmpegService {
|
||||
}
|
||||
return this.adapter;
|
||||
}
|
||||
|
||||
public static async convertToNTSilkTct (inputFile: string, outputFile: string): Promise<void> {
|
||||
const adapter = await this.getAdapter();
|
||||
await adapter.convertToNTSilkTct(inputFile, outputFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 FFmpeg 路径并更新适配器
|
||||
* @deprecated 建议使用 init() 方法初始化
|
||||
|
||||
@@ -112,11 +112,11 @@ export class ForwardMsgBuilder {
|
||||
preview: m.valid ? m.toPreview() : '[该消息类型暂不支持查看]',
|
||||
})),
|
||||
})),
|
||||
source,
|
||||
news,
|
||||
summary,
|
||||
prompt,
|
||||
uuid,
|
||||
source,
|
||||
news,
|
||||
summary,
|
||||
prompt,
|
||||
uuid
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -59,13 +59,17 @@ class Subscription {
|
||||
export const logSubscription = new Subscription();
|
||||
|
||||
export class LogWrapper implements ILogWrapper {
|
||||
fileLogEnabled = true;
|
||||
fileLogEnabled = false;
|
||||
consoleLogEnabled = true;
|
||||
logger: winston.Logger;
|
||||
|
||||
private logPath: string;
|
||||
private fileTransportAdded = false;
|
||||
private fileLogLevel: string = LogLevel.DEBUG;
|
||||
|
||||
constructor (logDir: string) {
|
||||
const filename = `${getFormattedTimestamp()}.log`;
|
||||
const logPath = path.join(logDir, filename);
|
||||
this.logPath = path.join(logDir, filename);
|
||||
|
||||
this.logger = winston.createLogger({
|
||||
level: 'debug',
|
||||
@@ -77,12 +81,6 @@ export class LogWrapper implements ILogWrapper {
|
||||
})
|
||||
),
|
||||
transports: [
|
||||
new transports.File({
|
||||
filename: logPath,
|
||||
level: 'debug',
|
||||
maxsize: 5 * 1024 * 1024, // 5MB
|
||||
maxFiles: 5,
|
||||
}),
|
||||
new transports.Console({
|
||||
format: format.combine(
|
||||
format.colorize(),
|
||||
@@ -107,7 +105,7 @@ export class LogWrapper implements ILogWrapper {
|
||||
this.deleteOldLogFile(filePath, oneWeekAgo);
|
||||
});
|
||||
}).catch((err) => {
|
||||
this.logger.error('Failed to read log directory', err);
|
||||
this.logError('Failed to read log directory', err);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -117,21 +115,22 @@ export class LogWrapper implements ILogWrapper {
|
||||
fs.unlink(filePath).catch((err) => {
|
||||
if (err) {
|
||||
if (err.code === 'ENOENT') {
|
||||
this.logger.warn(`File already deleted: ${filePath}`);
|
||||
this.logWarn(`File already deleted: ${filePath}`);
|
||||
} else {
|
||||
this.logger.error('Failed to delete old log file', err);
|
||||
this.logError('Failed to delete old log file', err);
|
||||
}
|
||||
} else {
|
||||
this.logger.info(`Deleted old log file: ${filePath}`);
|
||||
this.log(`Deleted old log file: ${filePath}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
}).catch((err) => {
|
||||
this.logger.error('Failed to get file stats', err);
|
||||
this.logError('Failed to get file stats', err);
|
||||
});
|
||||
}
|
||||
|
||||
setFileAndConsoleLogLevel (fileLogLevel: LogLevel, consoleLogLevel: LogLevel) {
|
||||
this.fileLogLevel = fileLogLevel;
|
||||
this.logger.transports.forEach((transport) => {
|
||||
if (transport instanceof transports.File) {
|
||||
transport.level = fileLogLevel;
|
||||
@@ -148,6 +147,15 @@ export class LogWrapper implements ILogWrapper {
|
||||
|
||||
setFileLogEnabled (isEnabled: boolean) {
|
||||
this.fileLogEnabled = isEnabled;
|
||||
if (isEnabled && !this.fileTransportAdded) {
|
||||
this.fileTransportAdded = true;
|
||||
this.logger.add(new transports.File({
|
||||
filename: this.logPath,
|
||||
level: this.fileLogLevel,
|
||||
maxsize: 5 * 1024 * 1024, // 5MB
|
||||
maxFiles: 5,
|
||||
}));
|
||||
}
|
||||
this.logger.transports.forEach((transport) => {
|
||||
if (transport instanceof transports.File) {
|
||||
transport.silent = !isEnabled;
|
||||
@@ -178,16 +186,18 @@ export class LogWrapper implements ILogWrapper {
|
||||
}
|
||||
|
||||
_log (level: LogLevel, ...args: any[]) {
|
||||
const message = this.formatMsg(args);
|
||||
if (this.consoleLogEnabled && this.fileLogEnabled) {
|
||||
this.logger.log(level, message);
|
||||
} else if (this.consoleLogEnabled) {
|
||||
this.logger.log(level, message);
|
||||
} else if (this.fileLogEnabled) {
|
||||
// eslint-disable-next-line no-control-regex
|
||||
this.logger.log(level, message.replace(/\x1B[@-_][0-?]*[ -/]*[@-~]/g, ''));
|
||||
if (this.consoleLogEnabled || this.fileLogEnabled) {
|
||||
const message = this.formatMsg(args);
|
||||
if (this.consoleLogEnabled && this.fileLogEnabled) {
|
||||
this.logger.log(level, message);
|
||||
} else if (this.consoleLogEnabled) {
|
||||
this.logger.log(level, message);
|
||||
} else if (this.fileLogEnabled) {
|
||||
// eslint-disable-next-line no-control-regex
|
||||
this.logger.log(level, message.replace(/\x1B[@-_][0-?]*[ -/]*[@-~]/g, ''));
|
||||
}
|
||||
logSubscription.notify(JSON.stringify({ level, message }));
|
||||
}
|
||||
logSubscription.notify(JSON.stringify({ level, message }));
|
||||
}
|
||||
|
||||
log (...args: any[]) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import fs from 'node:fs';
|
||||
import { systemPlatform } from 'napcat-common/src/system';
|
||||
import { getDefaultQQVersionConfigInfo, getQQPackageInfoPath, getQQVersionConfigPath, parseAppidFromMajor } from 'napcat-common/src/helper';
|
||||
import { getDefaultQQVersionConfigInfo, getQQPackageInfoPath, getQQVersionConfigPath, parseAppidFromMajor, parseAppidFromMajorV2 } from 'napcat-common/src/helper';
|
||||
import AppidTable from '@/napcat-core/external/appid.json';
|
||||
import { LogWrapper } from './log';
|
||||
import { getMajorPath } from '@/napcat-core/index';
|
||||
@@ -107,7 +107,13 @@ export class QQBasicInfoWrapper {
|
||||
if (!this.QQMainPath) {
|
||||
throw new Error('QQMainPath未定义 无法通过Major获取Appid');
|
||||
}
|
||||
const majorPath = getMajorPath(QQVersion, this.QQMainPath);
|
||||
const majorPath = getMajorPath(this.QQMainPath, QQVersion);
|
||||
// 优先通过 QQAppId/ 标记搜索
|
||||
const appidV2 = parseAppidFromMajorV2(majorPath);
|
||||
if (appidV2) {
|
||||
return appidV2;
|
||||
}
|
||||
// 回落到旧方式
|
||||
const appid = parseAppidFromMajor(majorPath);
|
||||
return appid;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* 服务器时间矫正 - 全局 Hook
|
||||
*
|
||||
* 保留 Date.now 原始引用,启动后通过 getServerTime 计算偏移量,
|
||||
* 直接覆盖 Date.now(),使全局所有调用自动获得矫正后的时间戳。
|
||||
*/
|
||||
|
||||
/** 原始 Date.now 引用,不受 hook 影响 */
|
||||
export const OriginalDateNow: () => number = Date.now.bind(Date);
|
||||
|
||||
/**
|
||||
* 初始化全局时间矫正,覆盖 Date.now()
|
||||
* @param getServerTimeFn 获取服务器时间的函数,返回毫秒级时间戳字符串
|
||||
* @returns 偏移量(毫秒)
|
||||
*/
|
||||
export function hookGlobalDateNow (getServerTimeFn: () => string): number {
|
||||
const start = OriginalDateNow();
|
||||
const serverTimeStr = getServerTimeFn();
|
||||
const end = OriginalDateNow();
|
||||
const serverTimeMs = parseInt(serverTimeStr, 10);
|
||||
|
||||
if (isNaN(serverTimeMs) || serverTimeMs <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 补偿网络延迟:假定往返时间对称,服务器时间对应本地时间的中点 (start + end) / 2
|
||||
const offsetMs = Math.round(serverTimeMs - (start + end) / 2);
|
||||
|
||||
if (Math.abs(offsetMs) > 5000) {
|
||||
Date.now = () => OriginalDateNow() + offsetMs;
|
||||
}
|
||||
|
||||
return offsetMs;
|
||||
}
|
||||
@@ -6,13 +6,13 @@ import { NTEventWrapper } from './event';
|
||||
* 创建 Service 方法的代理
|
||||
* 拦截所有方法调用,通过 EventWrapper 进行调用
|
||||
*/
|
||||
function createServiceMethodProxy<S extends keyof ServiceNamingMapping>(
|
||||
function createServiceMethodProxy<S extends keyof ServiceNamingMapping> (
|
||||
serviceName: S,
|
||||
originalService: ServiceNamingMapping[S],
|
||||
eventWrapper: NTEventWrapper
|
||||
): ServiceNamingMapping[S] {
|
||||
return new Proxy(originalService as object, {
|
||||
get(target, prop, receiver) {
|
||||
get (target, prop, receiver) {
|
||||
const originalValue = Reflect.get(target, prop, receiver);
|
||||
|
||||
// 如果不是函数,直接返回原始值
|
||||
@@ -50,7 +50,7 @@ function createServiceMethodProxy<S extends keyof ServiceNamingMapping>(
|
||||
* 第一层:拦截 getXXXService 方法
|
||||
* 第二层:拦截 Service 上的具体方法调用
|
||||
*/
|
||||
export function createSessionProxy(
|
||||
export function createSessionProxy (
|
||||
session: NodeIQQNTWrapperSession,
|
||||
eventWrapper: NTEventWrapper
|
||||
): NodeIQQNTWrapperSession {
|
||||
@@ -58,7 +58,7 @@ export function createSessionProxy(
|
||||
const serviceProxyCache = new Map<string, unknown>();
|
||||
|
||||
return new Proxy(session, {
|
||||
get(target, prop, receiver) {
|
||||
get (target, prop, receiver) {
|
||||
const propName = prop as string;
|
||||
|
||||
// 检查是否是 getXXXService 方法
|
||||
@@ -105,7 +105,7 @@ export function createSessionProxy(
|
||||
/**
|
||||
* 检查 Service 名称是否在已知的映射中
|
||||
*/
|
||||
function isKnownService(serviceName: string): serviceName is keyof ServiceNamingMapping {
|
||||
function isKnownService (serviceName: string): serviceName is keyof ServiceNamingMapping {
|
||||
const knownServices: string[] = [
|
||||
'NodeIKernelAvatarService',
|
||||
'NodeIKernelBuddyService',
|
||||
@@ -132,7 +132,7 @@ function isKnownService(serviceName: string): serviceName is keyof ServiceNaming
|
||||
* 创建带有 EventWrapper 集成的 InstanceContext
|
||||
* 这是推荐的使用方式,在创建 context 时自动代理 session
|
||||
*/
|
||||
export function createProxiedSession(
|
||||
export function createProxiedSession (
|
||||
session: NodeIQQNTWrapperSession,
|
||||
eventWrapper: NTEventWrapper
|
||||
): NodeIQQNTWrapperSession {
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
NTQQWebApi,
|
||||
NTQQFlashApi,
|
||||
NTQQOnlineApi,
|
||||
NTQQDatabaseApi,
|
||||
} from '@/napcat-core/apis';
|
||||
import { NTQQCollectionApi } from '@/napcat-core/apis/collection';
|
||||
import {
|
||||
@@ -33,9 +34,11 @@ import { NodeIKernelMsgListener, NodeIKernelProfileListener } from '@/napcat-cor
|
||||
import { proxiedListenerOf } from '@/napcat-core/helper/proxy-handler';
|
||||
import { NTQQPacketApi } from './apis/packet';
|
||||
import { NativePacketHandler } from './packet/handler/client';
|
||||
import { Napi2NativeLoader } from './packet/handler/napi2nativeLoader';
|
||||
import { container, ReceiverServiceRegistry } from './packet/handler/serviceRegister';
|
||||
import { appEvent } from './packet/handler/eventList';
|
||||
import { TypedEventEmitter } from './packet/handler/typeEvent';
|
||||
import { hookGlobalDateNow } from './helper/server-time';
|
||||
export * from './wrapper';
|
||||
export * from './types/index';
|
||||
export * from './services/index';
|
||||
@@ -48,6 +51,7 @@ export * from './helper/config';
|
||||
export * from './helper/config-base';
|
||||
export * from './helper/proxy-handler';
|
||||
export * from './helper/session-proxy';
|
||||
export * from './helper/server-time';
|
||||
|
||||
export enum NapCatCoreWorkingEnv {
|
||||
Unknown = 0,
|
||||
@@ -117,6 +121,8 @@ export class NapCatCore {
|
||||
selfInfo: SelfInfo;
|
||||
util: NodeQQNTWrapperUtil;
|
||||
configLoader: NapCatConfigLoader;
|
||||
/** 数据库 passphrase,由 OidbSvcTrpcTcp.0xcde_2 包获取 */
|
||||
dbPassphrase: string | undefined;
|
||||
|
||||
// 通过构造器递过去的 runtime info 应该尽量少
|
||||
constructor (context: InstanceContext, selfInfo: SelfInfo) {
|
||||
@@ -147,6 +153,7 @@ export class NapCatCore {
|
||||
GroupApi: new NTQQGroupApi(this.context, this),
|
||||
FlashApi: new NTQQFlashApi(this.context, this),
|
||||
OnlineApi: new NTQQOnlineApi(this.context, this),
|
||||
DatabaseApi: new NTQQDatabaseApi(this.context, this),
|
||||
};
|
||||
container.bind(NapCatCore).toConstantValue(this);
|
||||
container.bind(TypedEventEmitter).toConstantValue(this.event);
|
||||
@@ -168,6 +175,22 @@ export class NapCatCore {
|
||||
if (!fs.existsSync(this.NapCatTempPath)) {
|
||||
fs.mkdirSync(this.NapCatTempPath, { recursive: true });
|
||||
}
|
||||
// 通过 getServerTime 全局 hook Date.now() 矫正本地时间偏差
|
||||
// 可通过环境变量 NAPCAT_DISABLE_TIME_SYNC=1 或配置 autoTimeSync: false 禁用
|
||||
if (process.env['NAPCAT_DISABLE_TIME_SYNC'] === '1' || !this.configLoader.configData.autoTimeSync) {
|
||||
this.context.logger.log('[ServerTime] 自动对时已禁用');
|
||||
} else {
|
||||
try {
|
||||
const offsetMs = hookGlobalDateNow(() => this.context.session.getMSFService().getServerTime());
|
||||
if (Math.abs(offsetMs) > 5000) {
|
||||
this.context.logger.logWarn(`[ServerTime] 本地时间与服务器时间偏差 ${(offsetMs / 1000).toFixed(1)}s,已自动矫正`);
|
||||
} else {
|
||||
this.context.logger.log(`[ServerTime] 时间同步完成,偏差 ${offsetMs}ms`);
|
||||
}
|
||||
} catch (e) {
|
||||
this.context.logger.logError('[ServerTime] 时间矫正失败', e);
|
||||
}
|
||||
}
|
||||
// 遍历this.apis[i].initApi 如果存在该函数进行async 调用
|
||||
for (const apiKey in this.apis) {
|
||||
const api = this.apis[apiKey as keyof StableNTApiWrapper];
|
||||
@@ -314,6 +337,7 @@ export interface InstanceContext {
|
||||
readonly basicInfoWrapper: QQBasicInfoWrapper;
|
||||
readonly pathWrapper: NapCatPathWrapper;
|
||||
readonly packetHandler: NativePacketHandler;
|
||||
readonly napi2nativeLoader: Napi2NativeLoader;
|
||||
}
|
||||
|
||||
export interface StableNTApiWrapper {
|
||||
@@ -328,4 +352,5 @@ export interface StableNTApiWrapper {
|
||||
GroupApi: NTQQGroupApi;
|
||||
FlashApi: NTQQFlashApi,
|
||||
OnlineApi: NTQQOnlineApi,
|
||||
DatabaseApi: NTQQDatabaseApi,
|
||||
}
|
||||
@@ -53,6 +53,7 @@ export class NodeIKernelLoginListener {
|
||||
|
||||
onLoginState (..._args: any[]): any {
|
||||
}
|
||||
|
||||
onLoginRecordUpdate (..._args: any[]): any {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
{
|
||||
"name": "napcat-core",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
||||
"name": "napcat-core",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"main": "index.ts",
|
||||
"scripts": {
|
||||
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.ts"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./index.ts"
|
||||
},
|
||||
"./*": {
|
||||
"import": "./*"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"winston": "^3.17.0",
|
||||
"json5": "^2.2.3",
|
||||
"inversify": "^7.10.4",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"@protobuf-ts/runtime": "^2.11.1",
|
||||
"ajv": "^8.13.0",
|
||||
"@sinclair/typebox": "^0.34.38",
|
||||
"file-type": "^21.0.0",
|
||||
"compressing": "^1.10.1",
|
||||
"napcat-image-size": "workspace:*",
|
||||
"napcat-common": "workspace:*",
|
||||
"napcat-protobuf": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
"./*": {
|
||||
"import": "./*"
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@protobuf-ts/runtime": "^2.11.1",
|
||||
"@sinclair/typebox": "^0.34.38",
|
||||
"compressing": "^1.10.1",
|
||||
"file-type": "^21.0.0",
|
||||
"inversify": "^7.10.4",
|
||||
"json5": "^2.2.3",
|
||||
"napcat-common": "workspace:*",
|
||||
"napcat-database": "workspace:*",
|
||||
"napcat-image-size": "workspace:*",
|
||||
"napcat-protobuf": "workspace:*",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"winston": "^3.17.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,8 @@
|
||||
import path, { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import fs from 'fs';
|
||||
import { constants } from 'node:os';
|
||||
import { LogStack } from '@/napcat-core/packet/context/clientContext';
|
||||
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
|
||||
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
|
||||
import { OidbPacket, PacketBuf } from '@/napcat-core/packet/transformer/base';
|
||||
import { Napi2NativeLoader } from '@/napcat-core/packet/handler/napi2nativeLoader';
|
||||
export interface RecvPacket {
|
||||
type: string, // 仅recv
|
||||
data: RecvPacketData;
|
||||
@@ -17,48 +14,36 @@ export interface RecvPacketData {
|
||||
data: Buffer;
|
||||
}
|
||||
|
||||
// 0 send 1 recv
|
||||
export interface NativePacketExportType {
|
||||
initHook?: (send: string, recv: string) => boolean;
|
||||
}
|
||||
|
||||
export class NativePacketClient {
|
||||
protected readonly napcore: NapCoreContext;
|
||||
protected readonly logger: PacketLogger;
|
||||
protected readonly cb = new Map<string, (json: RecvPacketData) => Promise<any> | any>(); // hash-type callback
|
||||
protected readonly napi2nativeLoader: Napi2NativeLoader;
|
||||
logStack: LogStack;
|
||||
available: boolean = false;
|
||||
private readonly supportedPlatforms = ['win32.x64', 'linux.x64', 'linux.arm64', 'darwin.x64', 'darwin.arm64'];
|
||||
private readonly MoeHooExport: { exports: NativePacketExportType; } = { exports: {} };
|
||||
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack) {
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack, napi2nativeLoader: Napi2NativeLoader) {
|
||||
this.napcore = napCore;
|
||||
this.logger = logger;
|
||||
this.logStack = logStack;
|
||||
this.napi2nativeLoader = napi2nativeLoader;
|
||||
}
|
||||
|
||||
check (): boolean {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
if (!this.supportedPlatforms.includes(platform)) {
|
||||
this.logStack.pushLogWarn(`NativePacketClient: 不支持的平台: ${platform}`);
|
||||
return false;
|
||||
}
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './native/napi2native/napi2native.' + platform + '.node');
|
||||
if (!fs.existsSync(moehoo_path)) {
|
||||
this.logStack.pushLogWarn(`NativePacketClient: 缺失运行时文件: ${moehoo_path}`);
|
||||
if (!this.napi2nativeLoader.loaded) {
|
||||
this.logStack.pushLogWarn('NativePacketClient: Napi2NativeLoader 未成功加载');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async init (_pid: number, recv: string, send: string): Promise<void> {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
const isNewQQ = this.napcore.basicInfo.requireMinNTQQBuild('40824');
|
||||
if (isNewQQ) {
|
||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './native/napi2native/napi2native.' + platform + '.node');
|
||||
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
||||
this.MoeHooExport?.exports.initHook?.(send, recv);
|
||||
this.available = true;
|
||||
const success = this.napi2nativeLoader.initHook(send, recv);
|
||||
if (success) {
|
||||
this.available = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { NativePacketClient } from '@/napcat-core/packet/client/nativeClient';
|
||||
import { OidbPacket } from '@/napcat-core/packet/transformer/base';
|
||||
import { PacketLogger } from '@/napcat-core/packet/context/loggerContext';
|
||||
import { NapCoreContext } from '@/napcat-core/packet/context/napCoreContext';
|
||||
import { Napi2NativeLoader } from '@/napcat-core/packet/handler/napi2nativeLoader';
|
||||
|
||||
export class LogStack {
|
||||
private stack: string[] = [];
|
||||
@@ -43,12 +44,14 @@ export class PacketClientContext {
|
||||
private readonly napCore: NapCoreContext;
|
||||
private readonly logger: PacketLogger;
|
||||
private readonly logStack: LogStack;
|
||||
private readonly napi2nativeLoader: Napi2NativeLoader;
|
||||
private readonly _client: NativePacketClient;
|
||||
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger) {
|
||||
constructor (napCore: NapCoreContext, logger: PacketLogger, napi2nativeLoader: Napi2NativeLoader) {
|
||||
this.napCore = napCore;
|
||||
this.logger = logger;
|
||||
this.logStack = new LogStack(logger);
|
||||
this.napi2nativeLoader = napi2nativeLoader;
|
||||
this._client = this.newClient();
|
||||
}
|
||||
|
||||
@@ -64,14 +67,14 @@ export class PacketClientContext {
|
||||
await this._client.init(pid, recv, send);
|
||||
}
|
||||
|
||||
async sendOidbPacket<T extends boolean = false>(pkt: OidbPacket, rsp?: T, timeout?: number): Promise<T extends true ? Buffer : void> {
|
||||
async sendOidbPacket<T extends boolean = false> (pkt: OidbPacket, rsp?: T, timeout?: number): Promise<T extends true ? Buffer : void> {
|
||||
const raw = await this._client.sendOidbPacket(pkt, rsp, timeout);
|
||||
return raw.data as T extends true ? Buffer : void;
|
||||
}
|
||||
|
||||
private newClient (): NativePacketClient {
|
||||
this.logger.info('使用 NativePacketClient 作为后端');
|
||||
const client = new NativePacketClient(this.napCore, this.logger, this.logStack);
|
||||
const client = new NativePacketClient(this.napCore, this.logger, this.logStack, this.napi2nativeLoader);
|
||||
if (!client.check()) {
|
||||
throw new Error('[Core] [Packet] NativePacketClient 不可用,NapCat.Packet将不会加载!');
|
||||
}
|
||||
|
||||
@@ -34,5 +34,9 @@ export class NapCoreContext {
|
||||
return this.core.configLoader.configData;
|
||||
}
|
||||
|
||||
get napi2nativeLoader () {
|
||||
return this.core.context.napi2nativeLoader;
|
||||
}
|
||||
|
||||
sendSsoCmdReqByContend = (cmd: string, data: Buffer) => this.core.context.session.getMsgService().sendSsoCmdReqByContend(cmd, data);
|
||||
}
|
||||
@@ -228,15 +228,17 @@ export class PacketOperationContext {
|
||||
const res = trans.UploadForwardMsg.parse(resp);
|
||||
return res.result.resId;
|
||||
}
|
||||
|
||||
async UploadForwardMsgV2 (msg: UploadForwardMsgParams[], groupUin: number = 0) {
|
||||
//await this.SendPreprocess(msg, groupUin);
|
||||
// 遍历上传资源
|
||||
await Promise.allSettled(msg.map(async (item) => { return await this.SendPreprocess(item.actionMsg, groupUin); }));
|
||||
// await this.SendPreprocess(msg, groupUin);
|
||||
// 遍历上传资源(跳过已有原始数据的项)
|
||||
await Promise.allSettled(msg.filter(item => item.actionMsg).map(async (item) => { return await this.SendPreprocess(item.actionMsg!, groupUin); }));
|
||||
const req = trans.UploadForwardMsgV2.build(this.context.napcore.basicInfo.uid, msg, groupUin);
|
||||
const resp = await this.context.client.sendOidbPacket(req, true);
|
||||
const res = trans.UploadForwardMsg.parse(resp);
|
||||
return res.result.resId;
|
||||
}
|
||||
|
||||
async MoveGroupFile (
|
||||
groupUin: number,
|
||||
fileUUID: string,
|
||||
@@ -312,6 +314,15 @@ export class PacketOperationContext {
|
||||
}
|
||||
}
|
||||
|
||||
async FetchForwardMsgRaw (resId: string) {
|
||||
const req = trans.DownloadForwardMsg.build(this.context.napcore.basicInfo.uid, resId);
|
||||
const resp = await this.context.client.sendOidbPacket(req, true);
|
||||
const res = trans.DownloadForwardMsg.parse(resp);
|
||||
const inflate = gunzipSync(res.result.payload);
|
||||
const result = new NapProtoMsg(LongMsgResult).decode(inflate);
|
||||
return result.action;
|
||||
}
|
||||
|
||||
async FetchForwardMsg (res_id: string): Promise<RawMessage[]> {
|
||||
const req = trans.DownloadForwardMsg.build(this.context.napcore.basicInfo.uid, res_id);
|
||||
const resp = await this.context.client.sendOidbPacket(req, true);
|
||||
|
||||
@@ -18,7 +18,7 @@ export class PacketContext {
|
||||
this.msgConverter = new PacketMsgConverter();
|
||||
this.napcore = new NapCoreContext(core);
|
||||
this.logger = new PacketLogger(this.napcore);
|
||||
this.client = new PacketClientContext(this.napcore, this.logger);
|
||||
this.client = new PacketClientContext(this.napcore, this.logger, this.napcore.napi2nativeLoader);
|
||||
this.highway = new PacketHighwayContext(this.napcore, this.logger, this.client);
|
||||
this.operation = new PacketOperationContext(this);
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ export class NativePacketHandler {
|
||||
}
|
||||
}
|
||||
|
||||
async init (version: string): Promise<boolean> {
|
||||
async init (version: string, o3HookMode: boolean = false): Promise<boolean> {
|
||||
const version_arch = version + '-' + process.arch;
|
||||
try {
|
||||
if (!this.loaded) {
|
||||
@@ -215,7 +215,7 @@ export class NativePacketHandler {
|
||||
|
||||
this.MoeHooExport.exports.initHook?.(send, recv, (type: PacketType, uin: string, cmd: string, seq: number, hex_data: string) => {
|
||||
this.emitPacket(type, uin, cmd, seq, hex_data);
|
||||
}, true);
|
||||
}, o3HookMode);
|
||||
this.logger.log('[PacketHandler] 初始化成功');
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
import path, { dirname } from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import fs from 'fs';
|
||||
import { constants } from 'node:os';
|
||||
import { LogWrapper } from '../../helper/log';
|
||||
|
||||
export interface BypassOptions {
|
||||
hook?: boolean;
|
||||
window?: boolean;
|
||||
module?: boolean;
|
||||
process?: boolean;
|
||||
container?: boolean;
|
||||
js?: boolean;
|
||||
}
|
||||
|
||||
export interface Napi2NativeExportType {
|
||||
initHook?: (send: string, recv: string) => boolean;
|
||||
setVerbose?: (verbose: boolean) => void; // 默认关闭日志
|
||||
enableAllBypasses?: (options?: BypassOptions) => boolean;
|
||||
}
|
||||
|
||||
export class Napi2NativeLoader {
|
||||
private readonly supportedPlatforms = ['win32.x64', 'linux.x64', 'linux.arm64', 'darwin.x64', 'darwin.arm64'];
|
||||
private readonly exports: { exports: Napi2NativeExportType; } = { exports: {} };
|
||||
protected readonly logger: LogWrapper;
|
||||
private _loaded: boolean = false;
|
||||
|
||||
constructor ({ logger }: { logger: LogWrapper; }) {
|
||||
this.logger = logger;
|
||||
this.load();
|
||||
}
|
||||
|
||||
private load (): void {
|
||||
const platform = process.platform + '.' + process.arch;
|
||||
|
||||
if (!this.supportedPlatforms.includes(platform)) {
|
||||
this.logger.logWarn(`Napi2NativeLoader: 不支持的平台: ${platform}`);
|
||||
this._loaded = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const nativeModulePath = path.join(
|
||||
dirname(fileURLToPath(import.meta.url)),
|
||||
'./native/napi2native/napi2native.' + platform + '.node'
|
||||
);
|
||||
|
||||
if (!fs.existsSync(nativeModulePath)) {
|
||||
this.logger.logWarn(`Napi2NativeLoader: 缺失运行时文件: ${nativeModulePath}`);
|
||||
this._loaded = false;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
process.dlopen(this.exports, nativeModulePath, constants.dlopen.RTLD_LAZY);
|
||||
this._loaded = true;
|
||||
this.logger.log('[Napi2NativeLoader] 加载成功');
|
||||
} catch (error) {
|
||||
this.logger.logError('Napi2NativeLoader 加载出错:', error);
|
||||
this._loaded = false;
|
||||
}
|
||||
}
|
||||
|
||||
get loaded (): boolean {
|
||||
return this._loaded;
|
||||
}
|
||||
|
||||
get nativeExports (): Napi2NativeExportType {
|
||||
return this.exports.exports;
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化 Hook
|
||||
* @param send send 偏移地址
|
||||
* @param recv recv 偏移地址
|
||||
* @returns 是否初始化成功
|
||||
*/
|
||||
initHook (send: string, recv: string): boolean {
|
||||
if (!this._loaded) {
|
||||
this.logger.logWarn('Napi2NativeLoader 未成功加载,无法初始化 Hook');
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return this.nativeExports.initHook?.(send, recv) ?? false;
|
||||
} catch (error) {
|
||||
this.logger.logError('Napi2NativeLoader initHook 出错:', error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as crypto from 'node:crypto';
|
||||
import * as zlib from 'node:zlib';
|
||||
import { NapProtoDecodeStructType, NapProtoEncodeStructType, NapProtoMsg } from 'napcat-protobuf';
|
||||
import {
|
||||
@@ -510,14 +511,14 @@ export class PacketMsgPttElement extends IPacketMsgElement<SendPttElement> {
|
||||
}
|
||||
|
||||
override buildElement (): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
//return [];
|
||||
// return [];
|
||||
if (!this.msgInfo) return [];
|
||||
return [{
|
||||
commonElem: {
|
||||
serviceType: 48,
|
||||
pbElem: new NapProtoMsg(MsgInfo).encode(this.msgInfo),
|
||||
businessType: 22,
|
||||
}
|
||||
},
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -665,11 +666,13 @@ export class PacketMsgMarkDownElement extends IPacketMsgElement<SendMarkdownElem
|
||||
export class PacketMultiMsgElement extends IPacketMsgElement<SendMultiForwardMsgElement> {
|
||||
resid: string;
|
||||
message: PacketMsg[];
|
||||
uuid: string;
|
||||
|
||||
constructor (rawElement: SendMultiForwardMsgElement, message?: PacketMsg[]) {
|
||||
super(rawElement);
|
||||
this.resid = rawElement.multiForwardMsgElement.resId;
|
||||
this.message = message ?? [];
|
||||
this.uuid = rawElement.multiForwardMsgElement.fileName || crypto.randomUUID();
|
||||
}
|
||||
|
||||
override buildElement (): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
@@ -677,7 +680,7 @@ export class PacketMultiMsgElement extends IPacketMsgElement<SendMultiForwardMsg
|
||||
lightAppElem: {
|
||||
data: Buffer.concat([
|
||||
Buffer.from([0x01]),
|
||||
zlib.deflateSync(Buffer.from(JSON.stringify(ForwardMsgBuilder.fromPacketMsg(this.resid, this.message)), 'utf-8')),
|
||||
zlib.deflateSync(Buffer.from(JSON.stringify(ForwardMsgBuilder.fromPacketMsg(this.resid, this.message, undefined, undefined, undefined, undefined, this.uuid)), 'utf-8')),
|
||||
]),
|
||||
},
|
||||
}];
|
||||
|
||||
@@ -1,20 +1,21 @@
|
||||
import zlib from 'node:zlib';
|
||||
import * as proto from '@/napcat-core/packet/transformer/proto';
|
||||
import { NapProtoMsg } from 'napcat-protobuf';
|
||||
import { NapProtoEncodeStructType, NapProtoMsg } from 'napcat-protobuf';
|
||||
import { OidbPacket, PacketBufBuilder, PacketTransformer } from '@/napcat-core/packet/transformer/base';
|
||||
import { PacketMsg } from '@/napcat-core/packet/message/message';
|
||||
|
||||
export interface UploadForwardMsgParams {
|
||||
actionCommand: string;
|
||||
actionMsg: PacketMsg[];
|
||||
actionMsg?: PacketMsg[];
|
||||
actionMsgBody?: NapProtoEncodeStructType<typeof proto.PushMsgBody>[];
|
||||
}
|
||||
class UploadForwardMsgV2 extends PacketTransformer<typeof proto.SendLongMsgResp> {
|
||||
build (selfUid: string, msg: UploadForwardMsgParams[], groupUin: number = 0): OidbPacket {
|
||||
const reqdata = msg.map((item) => ({
|
||||
actionCommand: item.actionCommand,
|
||||
actionData: {
|
||||
msgBody: this.msgBuilder.buildFakeMsg(selfUid, item.actionMsg),
|
||||
}
|
||||
msgBody: item.actionMsgBody ?? this.msgBuilder.buildFakeMsg(selfUid, item.actionMsg ?? []),
|
||||
},
|
||||
}));
|
||||
const longMsgResultData = new NapProtoMsg(proto.LongMsgResult).encode(
|
||||
{
|
||||
|
||||
@@ -2,4 +2,4 @@ export { default as UploadForwardMsg } from './UploadForwardMsg';
|
||||
export { default as FetchGroupMessage } from './FetchGroupMessage';
|
||||
export { default as FetchC2CMessage } from './FetchC2CMessage';
|
||||
export { default as DownloadForwardMsg } from './DownloadForwardMsg';
|
||||
export { default as UploadForwardMsgV2 } from './UploadForwardMsgV2';
|
||||
export { default as UploadForwardMsgV2 } from './UploadForwardMsgV2';
|
||||
@@ -25,6 +25,7 @@ export * from './oidb/Oidb.0x929';
|
||||
export * from './oidb/Oidb.0xE37_1200';
|
||||
export * from './oidb/Oidb.0xE37_1700';
|
||||
export * from './oidb/Oidb.0XE37_800';
|
||||
export * from './oidb/Oidb.0xCDE_2';
|
||||
export * from './oidb/Oidb.0xEB7';
|
||||
export * from './oidb/Oidb.0xED3_1';
|
||||
export * from './oidb/Oidb.0XFE1_2';
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import { ProtoField, ScalarType } from 'napcat-protobuf';
|
||||
|
||||
// OidbSvcTrpcTcp.0xcde_2 响应体
|
||||
// body.field2.field1 为目标字符串值
|
||||
export const OidbSvcTrpcTcp0XCDE_2RespBodyInner = {
|
||||
value: ProtoField(1, ScalarType.STRING),
|
||||
};
|
||||
|
||||
export const OidbSvcTrpcTcp0XCDE_2RespBody = {
|
||||
inner: ProtoField(2, () => OidbSvcTrpcTcp0XCDE_2RespBodyInner),
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelAVSDKService {
|
||||
addKernelAVSDKListener (listener: unknown): number;
|
||||
|
||||
removeKernelAVSDKListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelAddBuddyService {
|
||||
addBuddy (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getAddBuddyRequestTag (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getBuddySetting (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
getSmartInfo (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
queryUinSafetyFlag (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
requestInfoByAccount (arg1: string, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -2,17 +2,17 @@ import { AlbumCommentReplyContent, AlbumFeedLikePublish, AlbumListRequest, Album
|
||||
|
||||
export interface NodeIKernelAlbumService {
|
||||
|
||||
setAlbumServiceInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
setAlbumServiceInfo (arg1: string, arg2: string, arg3: string): unknown;// needs 3 arguments
|
||||
|
||||
getMainPage(...args: unknown[]): unknown;// needs 2 arguments
|
||||
getMainPage (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
getAlbumList(params: {
|
||||
getAlbumList (params: {
|
||||
qun_id: string,
|
||||
attach_info: string,
|
||||
seq: number,
|
||||
request_time_line: {
|
||||
request_invoke_time: string
|
||||
}
|
||||
request_invoke_time: string;
|
||||
};
|
||||
}): Promise<{
|
||||
response: {
|
||||
seq: number,
|
||||
@@ -21,57 +21,57 @@ export interface NodeIKernelAlbumService {
|
||||
trace_id: string,
|
||||
is_from_cache: boolean,
|
||||
request_time_line: unknown,
|
||||
album_list: Array<{ name: string, album_id: string }>,
|
||||
album_list: Array<{ name: string, album_id: string; }>,
|
||||
attach_info: string,
|
||||
has_more: boolean,
|
||||
right: unknown,
|
||||
banner: unknown
|
||||
}
|
||||
}>
|
||||
getAlbumInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
banner: unknown;
|
||||
};
|
||||
}>;
|
||||
getAlbumInfo (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
deleteAlbum(...args: unknown[]): unknown;// needs 3 arguments
|
||||
deleteAlbum (arg1: number, arg2: string, arg3: string): unknown;// needs 3 arguments
|
||||
|
||||
addAlbum(...args: unknown[]): unknown;// needs 2 arguments
|
||||
addAlbum (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
deleteMedias(seq: number, group_code: string, album_id: string, media_ids: string[], ban_ids: unknown[]): Promise<unknown>;// needs 4 arguments
|
||||
deleteMedias (seq: number, group_code: string, album_id: string, media_ids: string[], ban_ids: unknown[]): Promise<unknown>;// needs 4 arguments
|
||||
|
||||
modifyAlbum(...args: unknown[]): unknown;// needs 3 arguments
|
||||
modifyAlbum (arg1: number, arg2: unknown, arg3: Array<unknown>[]): unknown;// needs 3 arguments
|
||||
|
||||
getMediaList(param: AlbumListRequest): Promise<{
|
||||
getMediaList (param: AlbumListRequest): Promise<{
|
||||
response: {
|
||||
seq: number,
|
||||
result: number,
|
||||
errMs: string, // 没错就是errMs不是errMsg
|
||||
trace_id: string,
|
||||
request_time_line: unknown,
|
||||
}
|
||||
};
|
||||
}>;// needs 1 arguments
|
||||
|
||||
quoteToQzone(...args: unknown[]): unknown;// needs 1 arguments
|
||||
quoteToQzone (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
quoteToQunAlbum(...args: unknown[]): unknown;// needs 1 arguments
|
||||
quoteToQunAlbum (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
queryQuoteToQunAlbumStatus(...args: unknown[]): unknown;// needs 1 arguments
|
||||
queryQuoteToQunAlbumStatus (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunFeeds(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getQunFeeds (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunFeedDetail(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getQunFeedDetail (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunNoticeList(...args: unknown[]): unknown;// needs 4 arguments
|
||||
getQunNoticeList (arg1: number, arg2: unknown, arg3: string, arg4: string): unknown;// needs 4 arguments
|
||||
|
||||
getQunComment(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getQunComment (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getQunLikes(...args: unknown[]): unknown;// needs 4 arguments
|
||||
getQunLikes (arg1: number, arg2: unknown, arg3: string, arg4: string): unknown;// needs 4 arguments
|
||||
|
||||
deleteQunFeed(...args: unknown[]): unknown;// needs 1 arguments
|
||||
deleteQunFeed (arg: unknown): unknown;// needs 1 arguments
|
||||
// seq random
|
||||
// stCommonExt {"map_info":[],"map_bytes_info":[],"map_user_account":[]}
|
||||
// qunId string
|
||||
doQunComment(seq: number, ext: {
|
||||
doQunComment (seq: number, ext: {
|
||||
map_info: unknown[],
|
||||
map_bytes_info: unknown[],
|
||||
map_user_account: unknown[]
|
||||
map_user_account: unknown[];
|
||||
},
|
||||
qunId: string,
|
||||
commentType: number,
|
||||
@@ -79,23 +79,23 @@ export interface NodeIKernelAlbumService {
|
||||
content: AlbumCommentReplyContent,
|
||||
): Promise<unknown>;// needs 6 arguments
|
||||
|
||||
doQunReply(...args: unknown[]): unknown;// needs 7 arguments
|
||||
doQunReply (arg1: number, arg2: unknown, arg3: string, arg4: number, arg5: unknown, arg6: unknown, arg7: unknown): unknown;// needs 7 arguments
|
||||
|
||||
doQunLike(
|
||||
doQunLike (
|
||||
seq: number,
|
||||
ext: {
|
||||
map_info: unknown[],
|
||||
map_bytes_info: unknown[],
|
||||
map_user_account: unknown[]
|
||||
map_user_account: unknown[];
|
||||
},
|
||||
param: {
|
||||
// {"id":"421_1_0_1012959257|V61Yiali4PELg90bThrH4Bo2iI1M5Kab|V5bCgAxMDEyOTU5MjU3e*KqaLVYdic!^||^421_1_0_1012959257|V61Yiali4PELg90bThrH4Bo2iI1M5Kab|17560336594^||^1","status":1}
|
||||
id: string,
|
||||
status: number
|
||||
status: number;
|
||||
},
|
||||
like: AlbumFeedLikePublish
|
||||
): Promise<unknown>;// needs 5 arguments
|
||||
|
||||
getRedPoints(...args: unknown[]): unknown;// needs 3 arguments
|
||||
getRedPoints (arg1: string, arg2: number, arg3: string): unknown;// needs 3 arguments
|
||||
|
||||
}
|
||||
@@ -13,13 +13,13 @@ export interface NodeIKernelAvatarService {
|
||||
|
||||
forceDownloadGroupAvatar(arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupPortraitPath(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
getGroupPortraitPath(arg1: string, arg2: number, arg3: number): unknown;
|
||||
|
||||
forceDownloadGroupPortrait(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
forceDownloadGroupPortrait(arg1: string, arg2: number, arg3: number): unknown;
|
||||
|
||||
getAvatarPaths(arg1: unknown, arg2: unknown): unknown;
|
||||
getAvatarPaths(arg1: Array<unknown>[], arg2: number): unknown;
|
||||
|
||||
getGroupAvatarPaths(arg1: unknown, arg2: unknown): unknown;
|
||||
getGroupAvatarPaths(arg1: Array<unknown>[], arg2: string): unknown;
|
||||
|
||||
getConfGroupAvatarPaths(arg: unknown): unknown;
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface NodeIKernelBdhUploadService {
|
||||
addKernelBdhUploadListener (listener: unknown): number;
|
||||
|
||||
removeKernelBdhUploadListener (listenerId: number): void;
|
||||
|
||||
setBdhTestEnv (arg1: string, arg2: number): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -130,5 +130,21 @@ export interface NodeIKernelBuddyService {
|
||||
|
||||
getBuddyRecommendContactArkJson (uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string; }>;
|
||||
|
||||
checkIsBuddyAsync (uid: string): Promise<unknown>;
|
||||
|
||||
areBuddies (callFrom: string, uids: string[]): unknown;
|
||||
|
||||
getCategoryById (id: number): unknown;
|
||||
|
||||
addCategoryV2 (name: string, buddyUids?: unknown): Promise<unknown>;
|
||||
|
||||
isNull (): boolean;
|
||||
|
||||
getAddFriendBlockedList (): unknown;
|
||||
|
||||
getAddFriendBlockedRedPoint (): unknown;
|
||||
|
||||
reportAddFriendBlocked (): unknown;
|
||||
|
||||
setWXMsgNotify (arg: unknown): unknown;
|
||||
}
|
||||
@@ -1,91 +1,91 @@
|
||||
import { GeneralCallResult } from './common';
|
||||
|
||||
export interface NodeIKernelCollectionService {
|
||||
addKernelCollectionListener(...args: unknown[]): void;// needs 1 arguments
|
||||
addKernelCollectionListener (listener: unknown): void;// needs 1 arguments
|
||||
|
||||
removeKernelCollectionListener(listenerId: number): void;
|
||||
removeKernelCollectionListener (listenerId: number): void;
|
||||
|
||||
getCollectionItemList(param: {
|
||||
getCollectionItemList (param: {
|
||||
category: number,
|
||||
groupId: number,
|
||||
forceSync: boolean,
|
||||
forceFromDb: boolean,
|
||||
timeStamp: string,
|
||||
count: number,
|
||||
searchDown: boolean
|
||||
searchDown: boolean;
|
||||
}): Promise<GeneralCallResult &
|
||||
{
|
||||
collectionSearchList: {
|
||||
collectionItemList: Array<
|
||||
{
|
||||
cid: string,
|
||||
type: number,
|
||||
status: number,
|
||||
author: {
|
||||
type: number,
|
||||
numId: string,
|
||||
strId: string,
|
||||
groupId: string,
|
||||
groupName: string,
|
||||
uid: string
|
||||
},
|
||||
bid: number,
|
||||
category: number,
|
||||
createTime: string,
|
||||
collectTime: string,
|
||||
modifyTime: string,
|
||||
sequence: string,
|
||||
shareUrl: string,
|
||||
customGroupId: number,
|
||||
securityBeat: boolean,
|
||||
summary: {
|
||||
textSummary: unknown,
|
||||
linkSummary: unknown,
|
||||
gallerySummary: unknown,
|
||||
audioSummary: unknown,
|
||||
videoSummary: unknown,
|
||||
fileSummary: unknown,
|
||||
locationSummary: unknown,
|
||||
richMediaSummary: unknown,
|
||||
}
|
||||
}>,
|
||||
hasMore: boolean,
|
||||
bottomTimeStamp: string
|
||||
}
|
||||
}
|
||||
>;
|
||||
{
|
||||
collectionSearchList: {
|
||||
collectionItemList: Array<
|
||||
{
|
||||
cid: string,
|
||||
type: number,
|
||||
status: number,
|
||||
author: {
|
||||
type: number,
|
||||
numId: string,
|
||||
strId: string,
|
||||
groupId: string,
|
||||
groupName: string,
|
||||
uid: string;
|
||||
},
|
||||
bid: number,
|
||||
category: number,
|
||||
createTime: string,
|
||||
collectTime: string,
|
||||
modifyTime: string,
|
||||
sequence: string,
|
||||
shareUrl: string,
|
||||
customGroupId: number,
|
||||
securityBeat: boolean,
|
||||
summary: {
|
||||
textSummary: unknown,
|
||||
linkSummary: unknown,
|
||||
gallerySummary: unknown,
|
||||
audioSummary: unknown,
|
||||
videoSummary: unknown,
|
||||
fileSummary: unknown,
|
||||
locationSummary: unknown,
|
||||
richMediaSummary: unknown,
|
||||
};
|
||||
}>,
|
||||
hasMore: boolean,
|
||||
bottomTimeStamp: string;
|
||||
};
|
||||
}
|
||||
>;
|
||||
|
||||
getCollectionContent(...args: unknown[]): unknown;// needs 5 arguments
|
||||
getCollectionContent (arg1: string, arg2: number, arg3: string, arg4: string, arg5: boolean): unknown;// needs 5 arguments
|
||||
|
||||
getCollectionCustomGroupList(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getCollectionCustomGroupList (): unknown;// needs 0 arguments
|
||||
|
||||
getCollectionUserInfo(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getCollectionUserInfo (): unknown;// needs 0 arguments
|
||||
|
||||
searchCollectionItemList(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchCollectionItemList (arg1: string, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
addMsgToCollection(...args: unknown[]): unknown;// needs 2 arguments
|
||||
addMsgToCollection (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
collectionArkShare(...args: unknown[]): unknown;// needs 1 arguments
|
||||
collectionArkShare (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
collectionFileForward(...args: unknown[]): unknown;// needs 3 arguments
|
||||
collectionFileForward (arg1: number, arg2: string, arg3: unknown): unknown;// needs 3 arguments
|
||||
|
||||
downloadCollectionFile(...args: unknown[]): unknown;// needs 4 arguments
|
||||
downloadCollectionFile (arg1: string, arg2: string, arg3: unknown, arg4: string): unknown;// needs 4 arguments
|
||||
|
||||
downloadCollectionFileThumbPic(...args: unknown[]): unknown;// needs 4 arguments
|
||||
downloadCollectionFileThumbPic (arg1: string, arg2: string, arg3: unknown, arg4: number): unknown;// needs 4 arguments
|
||||
|
||||
downloadCollectionPic(...args: unknown[]): unknown;// needs 3 arguments
|
||||
downloadCollectionPic (arg1: string, arg2: string, arg3: unknown): unknown;// needs 3 arguments
|
||||
|
||||
cancelDownloadCollectionFile(...args: unknown[]): unknown;// needs 1 arguments
|
||||
cancelDownloadCollectionFile (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
deleteCollectionItemList(...args: unknown[]): unknown;// needs 1 arguments
|
||||
deleteCollectionItemList (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
editCollectionItem(...args: unknown[]): unknown;// needs 2 arguments
|
||||
editCollectionItem (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
getEditPicInfoByPath(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getEditPicInfoByPath (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
collectionFastUpload(...args: unknown[]): unknown;// needs 1 arguments
|
||||
collectionFastUpload (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
editCollectionItemAfterFastUpload(...args: unknown[]): unknown;// needs 2 arguments
|
||||
editCollectionItemAfterFastUpload (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
|
||||
createNewCollectionItem(...args: unknown[]): unknown;// needs 1 arguments
|
||||
createNewCollectionItem (arg: unknown): unknown;// needs 1 arguments
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelConfigMgrService {
|
||||
addKernelConfigMgrListener (listener: unknown): number;
|
||||
|
||||
removeKernelConfigMgrListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
export interface NodeIKernelDbToolsService {
|
||||
|
||||
depositDatabase(...args: unknown[]): unknown;
|
||||
depositDatabase (arg: unknown): unknown;
|
||||
|
||||
backupDatabase(...args: unknown[]): unknown;
|
||||
backupDatabase (arg: unknown): unknown;
|
||||
|
||||
retrieveDatabase(...args: unknown[]): unknown;
|
||||
retrieveDatabase (arg: unknown): unknown;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelDirectSessionService {
|
||||
addKernelDirectSessionListener (listener: unknown): number;
|
||||
|
||||
removeKernelDirectSessionListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,3 +1,13 @@
|
||||
export interface NodeIKernelECDHService {
|
||||
sendOIDBECRequest: (data: Uint8Array) => Promise<Uint8Array>;
|
||||
|
||||
init (): unknown;
|
||||
|
||||
setIsDebug (isDebug: boolean): unknown;
|
||||
|
||||
setGuid (guid: string): unknown;
|
||||
|
||||
sendOIDBRequest (cmd: number, serviceType: number, subCmd: number, data: string, extraData: unknown): Promise<unknown>;
|
||||
|
||||
sendSSORequest (cmd: string, serviceType: number, data: string, extraData: unknown): Promise<unknown>;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
export interface NodeIKernelEmojiService {
|
||||
getAIGCEmojiList (arg1: unknown, arg2: boolean): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface NodeIKernelFeedService {
|
||||
addKernelFeedListener (listener: unknown): number;
|
||||
|
||||
removeKernelFeedListener (listenerId: number): void;
|
||||
|
||||
getChannelDraft (arg1: string, arg2: number): unknown;
|
||||
|
||||
getFeedCount (arg: unknown): unknown;
|
||||
|
||||
getFeedLikeUserList (arg1: unknown, arg2: number): unknown;
|
||||
|
||||
getFeedRichMediaFilePath (arg1: number, arg2: string, arg3: string, arg4: number, arg5: boolean): unknown;
|
||||
|
||||
getJoinedRecommendItems (arg1: unknown, arg2: boolean): unknown;
|
||||
|
||||
setChannelDraft (arg1: string, arg2: string, arg3: number): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,37 +1,41 @@
|
||||
import { NodeIKernelFileAssistantListener } from '@/napcat-core/index';
|
||||
|
||||
export interface NodeIKernelFileAssistantService {
|
||||
addKernelFileAssistantListener(listener: NodeIKernelFileAssistantListener): unknown;
|
||||
addKernelFileAssistantListener (listener: NodeIKernelFileAssistantListener): unknown;
|
||||
|
||||
removeKernelFileAssistantListener(arg1: unknown[]): unknown;
|
||||
removeKernelFileAssistantListener (arg1: unknown[]): unknown;
|
||||
|
||||
getFileAssistantList(arg1: unknown[]): unknown;
|
||||
getFileAssistantList (arg1: unknown[]): unknown;
|
||||
|
||||
getMoreFileAssistantList(arg1: unknown[]): unknown;
|
||||
getMoreFileAssistantList (arg1: unknown[]): unknown;
|
||||
|
||||
getFileSessionList(): unknown;
|
||||
getFileSessionList (): unknown;
|
||||
|
||||
searchFile(keywords: string[], params: { resultType: number, pageLimit: number }, resultId: number): number;
|
||||
searchFile (keywords: string[], params: { resultType: number, pageLimit: number; }, resultId: number): number;
|
||||
|
||||
resetSearchFileSortType(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
resetSearchFileSortType (arg1: number, arg2: number, arg3: number): unknown;
|
||||
|
||||
searchMoreFile(arg1: unknown[]): unknown;
|
||||
searchMoreFile (arg1: unknown[]): unknown;
|
||||
|
||||
cancelSearchFile(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
cancelSearchFile (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
downloadFile(fileIds: string[]): { result: number, errMsg: string };
|
||||
downloadFile (fileIds: string[]): { result: number, errMsg: string; };
|
||||
|
||||
forwardFile(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
forwardFile (arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
cancelFileAction(arg1: unknown[]): unknown;
|
||||
cancelFileAction (arg1: unknown[]): unknown;
|
||||
|
||||
retryFileAction(arg1: unknown[]): unknown;
|
||||
retryFileAction (arg1: unknown[]): unknown;
|
||||
|
||||
deleteFile(arg1: unknown[]): unknown;
|
||||
deleteFile (arg1: unknown[]): unknown;
|
||||
|
||||
saveAs(arg1: unknown, arg2: unknown): unknown;
|
||||
saveAs (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
saveAsWithRename(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
saveAsWithRename (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
isNull(): boolean;
|
||||
getFilePathCount (arg: unknown): unknown;
|
||||
|
||||
updateRecentOperateForMsg (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface NodeIKernelFileBridgeClientService {
|
||||
addKernelFileBridgeClientListener (listener: unknown): number;
|
||||
|
||||
removeKernelFileBridgeClientListener (listenerId: number): void;
|
||||
|
||||
getPageContent (arg1: boolean, arg2: string): unknown;
|
||||
|
||||
getThumbnail (arg1: boolean, arg2: string, arg3: unknown): unknown;
|
||||
|
||||
searchFolderForFiles (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelFileBridgeHostService {
|
||||
addKernelFileBridgeHostListener (listener: unknown): number;
|
||||
|
||||
removeKernelFileBridgeHostListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -24,13 +24,13 @@ export interface NodeIKernelFlashTransferService {
|
||||
seq: number;
|
||||
}>; // 2 arg 重点 // 自动上传
|
||||
|
||||
createMergeShareTask (...args: unknown[]): unknown; // 2 arg
|
||||
createMergeShareTask (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
updateFlashTransfer (...args: unknown[]): unknown; // 2 arg
|
||||
updateFlashTransfer (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
getFileSetList (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetList (arg: unknown): unknown; // 1 arg
|
||||
|
||||
getFileSetListCount (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetListCount (arg: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 获取file set 的信息
|
||||
@@ -50,11 +50,11 @@ export interface NodeIKernelFlashTransferService {
|
||||
rsp: FileListResponse;
|
||||
}>; // 1 arg 这个方法QQ有bug??? 并没有,是我参数有问题
|
||||
|
||||
getDownloadedFileCount (...args: unknown[]): unknown; // 1 arg
|
||||
getDownloadedFileCount (arg: unknown): unknown; // 1 arg
|
||||
|
||||
getLocalFileList (...args: unknown[]): unknown; // 3 arg
|
||||
getLocalFileList (arg1: number, arg2: string, arg3: Array<unknown>[]): unknown; // 3 arg
|
||||
|
||||
batchRemoveUserFileSetHistory (...args: unknown[]): unknown; // 1 arg
|
||||
batchRemoveUserFileSetHistory (arg: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 获取分享链接
|
||||
@@ -73,26 +73,26 @@ export interface NodeIKernelFlashTransferService {
|
||||
fileSetId: string;
|
||||
}>; // 1 arg code == share code
|
||||
|
||||
batchRemoveFile (...args: unknown[]): unknown; // 1 arg
|
||||
batchRemoveFile (arg: unknown): unknown; // 1 arg
|
||||
|
||||
checkUploadPathValid (...args: unknown[]): unknown; // 1 arg
|
||||
checkUploadPathValid (arg: unknown): unknown; // 1 arg
|
||||
|
||||
cleanFailedFiles (...args: unknown[]): unknown; // 2 arg
|
||||
cleanFailedFiles (arg1: number, arg2: Array<unknown>[]): unknown; // 2 arg
|
||||
|
||||
/**
|
||||
* 暂停所有的任务
|
||||
*/
|
||||
resumeAllUnfinishedTasks (): unknown; // 0 arg !!
|
||||
|
||||
addFileSetUploadListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetUploadListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetUploadListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetUploadListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 开始上传任务 适用于已暂停的
|
||||
* @param fileSetId
|
||||
*/
|
||||
startFileSetUpload (fileSetId: string): void; // 1 arg 并不是新建任务,应该是暂停后的启动
|
||||
startFileSetUpload (fileSetId: unknown): void; // 1 arg 并不是新建任务,应该是暂停后的启动
|
||||
|
||||
/**
|
||||
* 结束,无法再次启动
|
||||
@@ -110,27 +110,27 @@ export interface NodeIKernelFlashTransferService {
|
||||
* 继续上传
|
||||
* @param args
|
||||
*/
|
||||
resumeFileSetUpload (...args: unknown[]): unknown; // 1 arg 继续
|
||||
resumeFileSetUpload (fileSetId: unknown): unknown; // 1 arg 继续
|
||||
|
||||
pauseFileUpload (...args: unknown[]): unknown; // 1 arg
|
||||
pauseFileUpload (arg: unknown): unknown; // 1 arg
|
||||
|
||||
resumeFileUpload (...args: unknown[]): unknown; // 1 arg
|
||||
resumeFileUpload (arg: unknown): unknown; // 1 arg
|
||||
|
||||
stopFileUpload (...args: unknown[]): unknown; // 1 arg
|
||||
stopFileUpload (arg: unknown): unknown; // 1 arg
|
||||
|
||||
asyncGetThumbnailPath (...args: unknown[]): unknown; // 2 arg
|
||||
asyncGetThumbnailPath (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
setDownLoadDefaultFileDir (...args: unknown[]): unknown; // 1 arg
|
||||
setDownLoadDefaultFileDir (dir: unknown): unknown; // 1 arg
|
||||
|
||||
setFileSetDownloadDir (...args: unknown[]): unknown; // 2 arg
|
||||
setFileSetDownloadDir (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
getFileSetDownloadDir (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetDownloadDir (arg: unknown): unknown; // 1 arg
|
||||
|
||||
setFlashTransferDir (...args: unknown[]): unknown; // 2 arg
|
||||
setFlashTransferDir (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
addFileSetDownloadListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetDownloadListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetDownloadListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetDownloadListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
/**
|
||||
* 开始下载file set的函数 同开始上传
|
||||
@@ -154,13 +154,13 @@ export interface NodeIKernelFlashTransferService {
|
||||
extraInfo: 0;
|
||||
}>; // 2 arg
|
||||
|
||||
startFileListDownLoad (...args: unknown[]): unknown; // 4 arg // 大概率是选择set里面的部分文件进行下载,没必要,不想写
|
||||
startFileListDownLoad (arg1: string, arg2: number, arg3: Array<unknown>[], arg4: unknown): unknown; // 4 arg // 大概率是选择set里面的部分文件进行下载,没必要,不想写
|
||||
|
||||
pauseFileListDownLoad (...args: unknown[]): unknown; // 2 arg
|
||||
pauseFileListDownLoad (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
resumeFileListDownLoad (...args: unknown[]): unknown; // 2 arg
|
||||
resumeFileListDownLoad (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
stopFileListDownLoad (...args: unknown[]): unknown; // 2 arg
|
||||
stopFileListDownLoad (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
startThumbnailListDownload (fileSetId: string): Promise<GeneralCallResult>; // 1 arg // 缩略图下载
|
||||
|
||||
@@ -174,31 +174,31 @@ export interface NodeIKernelFlashTransferService {
|
||||
expireTimestampSeconds: string;
|
||||
}>; // 1 arg
|
||||
|
||||
startFileListDownLoadBySessionId (...args: unknown[]): unknown; // 2 arg
|
||||
startFileListDownLoadBySessionId (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
addFileSetSimpleStatusListener (...args: unknown[]): unknown; // 2 arg
|
||||
addFileSetSimpleStatusListener (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
addFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 2 arg
|
||||
addFileSetSimpleStatusMonitoring (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
removeFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 2 arg
|
||||
removeFileSetSimpleStatusMonitoring (arg1: unknown, arg2: unknown): unknown; // 2 arg
|
||||
|
||||
removeFileSetSimpleStatusListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetSimpleStatusListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addDesktopFileSetSimpleStatusListener (...args: unknown[]): unknown; // 1 arg
|
||||
addDesktopFileSetSimpleStatusListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addDesktopFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
addDesktopFileSetSimpleStatusMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeDesktopFileSetSimpleStatusMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
removeDesktopFileSetSimpleStatusMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeDesktopFileSetSimpleStatusListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeDesktopFileSetSimpleStatusListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFileSetSimpleUploadInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetSimpleUploadInfoListener (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFileSetSimpleUploadInfoMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetSimpleUploadInfoMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetSimpleUploadInfoMonitoring (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetSimpleUploadInfoMonitoring (arg: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetSimpleUploadInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetSimpleUploadInfoListener (arg: unknown): unknown; // 1 arg
|
||||
/**
|
||||
* 发送闪传消息
|
||||
* @param sendArgs
|
||||
@@ -211,9 +211,9 @@ export interface NodeIKernelFlashTransferService {
|
||||
};
|
||||
}>; // 1 arg 估计是file set id
|
||||
|
||||
addFlashTransferTaskInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFlashTransferTaskInfoListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFlashTransferTaskInfoListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFlashTransferTaskInfoListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
retrieveLocalLastFailedSetTasksInfo (): unknown; // 0 arg
|
||||
|
||||
@@ -227,77 +227,77 @@ export interface NodeIKernelFlashTransferService {
|
||||
};
|
||||
}>; // 1 arg
|
||||
|
||||
getLocalFileListByStatuses (...args: unknown[]): unknown; // 1 arg
|
||||
getLocalFileListByStatuses (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addTransferStateListener (...args: unknown[]): unknown; // 1 arg
|
||||
addTransferStateListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeTransferStateListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeTransferStateListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
getFileSetFirstClusteringList (...args: unknown[]): unknown; // 3 arg
|
||||
getFileSetFirstClusteringList (arg1: number, arg2: string, arg3: number): unknown; // 3 arg
|
||||
|
||||
getFileSetClusteringList (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetClusteringList (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFileSetClusteringListListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFileSetClusteringListListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFileSetClusteringListListener (...args: unknown[]): unknown; // 1 arg
|
||||
removeFileSetClusteringListListener (listenerId: unknown): unknown; // 1 arg
|
||||
|
||||
getFileSetClusteringDetail (...args: unknown[]): unknown; // 1 arg
|
||||
getFileSetClusteringDetail (arg: unknown): unknown; // 1 arg
|
||||
|
||||
doAIOFlashTransferBubbleActionWithStatus (...args: unknown[]): unknown; // 4 arg
|
||||
doAIOFlashTransferBubbleActionWithStatus (arg1: string, arg2: number, arg3: number, arg4: unknown): unknown; // 4 arg
|
||||
|
||||
getFilesTransferProgress (...args: unknown[]): unknown; // 1 arg
|
||||
getFilesTransferProgress (arg: unknown): unknown; // 1 arg
|
||||
|
||||
pollFilesTransferProgress (...args: unknown[]): unknown; // 1 arg
|
||||
pollFilesTransferProgress (arg: unknown): unknown; // 1 arg
|
||||
|
||||
cancelPollFilesTransferProgress (...args: unknown[]): unknown; // 1 arg
|
||||
cancelPollFilesTransferProgress (arg: unknown): unknown; // 1 arg
|
||||
|
||||
checkDownloadStatusBeforeLocalFileOper (...args: unknown[]): unknown; // 3 arg
|
||||
checkDownloadStatusBeforeLocalFileOper (arg1: number, arg2: string, arg3: string): unknown; // 3 arg
|
||||
|
||||
getCompressedFileFolder (...args: unknown[]): unknown; // 1 arg
|
||||
getCompressedFileFolder (arg: unknown): unknown; // 1 arg
|
||||
|
||||
addFolderListener (...args: unknown[]): unknown; // 1 arg
|
||||
addFolderListener (listener: unknown): unknown; // 1 arg
|
||||
|
||||
removeFolderListener (...args: unknown[]): unknown;
|
||||
removeFolderListener (listenerId: unknown): unknown;
|
||||
|
||||
addCompressedFileListener (...args: unknown[]): unknown;
|
||||
addCompressedFileListener (listener: unknown): unknown;
|
||||
|
||||
removeCompressedFileListener (...args: unknown[]): unknown;
|
||||
removeCompressedFileListener (listenerId: unknown): unknown;
|
||||
|
||||
getFileCategoryList (...args: unknown[]): unknown;
|
||||
getFileCategoryList (arg: unknown): unknown;
|
||||
|
||||
addDeviceStatusListener (...args: unknown[]): unknown;
|
||||
addDeviceStatusListener (listener: unknown): unknown;
|
||||
|
||||
removeDeviceStatusListener (...args: unknown[]): unknown;
|
||||
removeDeviceStatusListener (listenerId: unknown): unknown;
|
||||
|
||||
checkDeviceStatus (...args: unknown[]): unknown;
|
||||
checkDeviceStatus (arg: unknown): unknown;
|
||||
|
||||
pauseAllTasks (...args: unknown[]): unknown; // 2 arg
|
||||
pauseAllTasks (arg1: number, arg2: number): unknown; // 2 arg
|
||||
|
||||
resumePausedTasksAfterDeviceStatus (...args: unknown[]): unknown;
|
||||
resumePausedTasksAfterDeviceStatus (arg: unknown): unknown;
|
||||
|
||||
onSystemGoingToSleep (...args: unknown[]): unknown;
|
||||
onSystemGoingToSleep (arg: unknown): unknown;
|
||||
|
||||
onSystemWokeUp (...args: unknown[]): unknown;
|
||||
onSystemWokeUp (arg: unknown): unknown;
|
||||
|
||||
getFileMetas (...args: unknown[]): unknown;
|
||||
getFileMetas (arg: unknown): unknown;
|
||||
|
||||
addDownloadCntStatisticsListener (...args: unknown[]): unknown;
|
||||
addDownloadCntStatisticsListener (listener: unknown): unknown;
|
||||
|
||||
removeDownloadCntStatisticsListener (...args: unknown[]): unknown;
|
||||
removeDownloadCntStatisticsListener (listenerId: unknown): unknown;
|
||||
|
||||
detectPrivacyInfoInPaths (...args: unknown[]): unknown;
|
||||
detectPrivacyInfoInPaths (arg: unknown): unknown;
|
||||
|
||||
getFileThumbnailUrl (...args: unknown[]): unknown;
|
||||
getFileThumbnailUrl (arg: unknown): unknown;
|
||||
|
||||
handleDownloadFinishAfterSaveToAlbum (...args: unknown[]): unknown;
|
||||
handleDownloadFinishAfterSaveToAlbum (arg: unknown): unknown;
|
||||
|
||||
checkBatchFilesDownloadStatus (...args: unknown[]): unknown;
|
||||
checkBatchFilesDownloadStatus (arg: unknown): unknown;
|
||||
|
||||
onCheckAlbumStorageStatusResult (...args: unknown[]): unknown;
|
||||
onCheckAlbumStorageStatusResult (arg: unknown): unknown;
|
||||
|
||||
addFileAlbumStorageListener (...args: unknown[]): unknown;
|
||||
addFileAlbumStorageListener (listener: unknown): unknown;
|
||||
|
||||
removeFileAlbumStorageListener (...args: unknown[]): unknown;
|
||||
removeFileAlbumStorageListener (listenerId: unknown): unknown;
|
||||
|
||||
refreshFolderStatus (...args: unknown[]): unknown;
|
||||
refreshFolderStatus (arg: unknown): unknown;
|
||||
}
|
||||
@@ -16,29 +16,29 @@ import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
|
||||
export interface NodeIKernelGroupService {
|
||||
|
||||
modifyGroupExtInfoV2(groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult &
|
||||
{
|
||||
result: {
|
||||
groupCode: string,
|
||||
result: number
|
||||
}
|
||||
}>;
|
||||
modifyGroupExtInfoV2 (groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult &
|
||||
{
|
||||
result: {
|
||||
groupCode: string,
|
||||
result: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
// --->
|
||||
// 待启用 For Next Version 3.2.0
|
||||
// isTroopMember ? 0 : 111
|
||||
getGroupMemberMaxNum(groupCode: string, serviceType: number): Promise<unknown>;
|
||||
getGroupMemberMaxNum (groupCode: string, serviceType: number): Promise<unknown>;
|
||||
|
||||
getAllGroupPrivilegeFlag(troopUinList: string[], serviceType: number): Promise<unknown>;
|
||||
getAllGroupPrivilegeFlag (troopUinList: string[], serviceType: number): Promise<unknown>;
|
||||
// <---
|
||||
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, unknown> } }>;
|
||||
getGroupExt0xEF0Info (enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, unknown>; }; }>;
|
||||
|
||||
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
kickMemberV2 (param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
|
||||
quitGroupV2(param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||
quitGroupV2 (param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||
|
||||
getMemberCommonInfo(Req: {
|
||||
getMemberCommonInfo (Req: {
|
||||
groupCode: string,
|
||||
startUin: string,
|
||||
identifyFlag: string,
|
||||
@@ -54,39 +54,39 @@ export interface NodeIKernelGroupService {
|
||||
memberNum: number,
|
||||
filterMethod: string,
|
||||
onlineFlag: string,
|
||||
realSpecialTitleFlag: number
|
||||
realSpecialTitleFlag: number;
|
||||
}): Promise<unknown>;
|
||||
|
||||
getGroupMemberLevelInfo(groupCode: string): Promise<unknown>;
|
||||
getGroupMemberLevelInfo (groupCode: string): Promise<unknown>;
|
||||
|
||||
getGroupInfoForJoinGroup(groupCode: string, needPrivilegeFlag: boolean, serviceType: number): Promise<unknown>;
|
||||
getGroupInfoForJoinGroup (groupCode: string, needPrivilegeFlag: boolean, serviceType: number): Promise<unknown>;
|
||||
|
||||
getGroupHonorList(req: { groupCodes: Array<string> }): Promise<unknown>;
|
||||
getGroupHonorList (req: { groupCodes: Array<string>; }): Promise<unknown>;
|
||||
|
||||
getUinByUids(uins: string[]): Promise<{
|
||||
getUinByUids (uins: string[]): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
uins: Map<string, string>
|
||||
uins: Map<string, string>;
|
||||
}>;
|
||||
|
||||
getUidByUins(uins: string[]): Promise<{
|
||||
getUidByUins (uins: string[]): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
uids: Map<string, string>
|
||||
uids: Map<string, string>;
|
||||
}>;
|
||||
|
||||
checkGroupMemberCache(arrayList: Array<string>): Promise<unknown>;
|
||||
checkGroupMemberCache (arrayList: Array<string>): Promise<unknown>;
|
||||
|
||||
getGroupLatestEssenceList(groupCode: string): Promise<unknown>;
|
||||
getGroupLatestEssenceList (groupCode: string): Promise<unknown>;
|
||||
|
||||
shareDigest(Req: {
|
||||
shareDigest (Req: {
|
||||
appId: string,
|
||||
appType: number,
|
||||
msgStyle: number,
|
||||
recvUin: string,
|
||||
sendType: number,
|
||||
clientInfo: {
|
||||
platform: number
|
||||
platform: number;
|
||||
},
|
||||
richMsg: {
|
||||
usingArk: boolean,
|
||||
@@ -94,122 +94,122 @@ export interface NodeIKernelGroupService {
|
||||
summary: string,
|
||||
url: string,
|
||||
pictureUrl: string,
|
||||
brief: string
|
||||
}
|
||||
brief: string;
|
||||
};
|
||||
}): Promise<unknown>;
|
||||
|
||||
isEssenceMsg(req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<unknown>;
|
||||
isEssenceMsg (req: { groupCode: string, msgRandom: number, msgSeq: number; }): Promise<unknown>;
|
||||
|
||||
queryCachedEssenceMsg(req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<{ items: Array<unknown> }>;
|
||||
queryCachedEssenceMsg (req: { groupCode: string, msgRandom: number, msgSeq: number; }): Promise<{ items: Array<unknown>; }>;
|
||||
|
||||
fetchGroupEssenceList(req: {
|
||||
fetchGroupEssenceList (req: {
|
||||
groupCode: string,
|
||||
pageStart: number,
|
||||
pageLimit: number
|
||||
}, Arg: unknown): Promise<unknown>;
|
||||
pageLimit: number;
|
||||
}, Arg: string): Promise<unknown>;
|
||||
|
||||
getAllMemberList(groupCode: string, forceFetch: boolean): Promise<{
|
||||
getAllMemberList (groupCode: string, forceFetch: boolean): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
result: {
|
||||
ids: Array<{
|
||||
uid: string,
|
||||
index: number// 0
|
||||
index: number;// 0
|
||||
}>,
|
||||
infos: Map<string, GroupMember>,
|
||||
finish: true,
|
||||
hasRobot: false
|
||||
}
|
||||
hasRobot: false;
|
||||
};
|
||||
}>;
|
||||
|
||||
setHeader(uid: string, path: string): Promise<GeneralCallResult>;
|
||||
setHeader (uid: string, path: string): Promise<GeneralCallResult>;
|
||||
|
||||
addKernelGroupListener(listener: NodeIKernelGroupListener): number;
|
||||
addKernelGroupListener (listener: NodeIKernelGroupListener): number;
|
||||
|
||||
removeKernelGroupListener(listenerId: number): void;
|
||||
removeKernelGroupListener (listenerId: number): void;
|
||||
|
||||
createMemberListScene(groupCode: string, scene: string): string;
|
||||
createMemberListScene (groupCode: string, scene: string): string;
|
||||
|
||||
destroyMemberListScene(SceneId: string): void;
|
||||
destroyMemberListScene (SceneId: string): void;
|
||||
|
||||
getNextMemberList(sceneId: string, groupMemberInfoListId: { index: number, uid: string } | undefined, num: number): Promise<{
|
||||
getNextMemberList (sceneId: string, groupMemberInfoListId: { index: number, uid: string; } | undefined, num: number): Promise<{
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
result: { ids: string[], infos: Map<string, GroupMember>, finish: boolean, hasRobot: boolean }
|
||||
result: { ids: string[], infos: Map<string, GroupMember>, finish: boolean, hasRobot: boolean; };
|
||||
}>;
|
||||
|
||||
getPrevMemberList(): unknown;
|
||||
getPrevMemberList (): unknown;
|
||||
|
||||
monitorMemberList(): unknown;
|
||||
monitorMemberList (): unknown;
|
||||
|
||||
searchMember(sceneId: string, keywords: string[]): unknown;
|
||||
searchMember (sceneId: string, keywords: string[]): unknown;
|
||||
|
||||
getMemberInfo(group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
|
||||
getMemberInfo (group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
kickMember(groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
|
||||
kickMember (groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
|
||||
|
||||
modifyMemberRole(groupCode: string, uid: string, role: NTGroupMemberRole): void;
|
||||
modifyMemberRole (groupCode: string, uid: string, role: NTGroupMemberRole): void;
|
||||
|
||||
modifyMemberCardName(groupCode: string, uid: string, cardName: string): void;
|
||||
modifyMemberCardName (groupCode: string, uid: string, cardName: string): void;
|
||||
|
||||
getTransferableMemberInfo(groupCode: string): unknown;// 获取整个群的
|
||||
getTransferableMemberInfo (groupCode: string): unknown;// 获取整个群的
|
||||
|
||||
transferGroup(uid: string): void;
|
||||
transferGroup (uid: string): void;
|
||||
|
||||
getGroupList(force: boolean): Promise<GeneralCallResult>;
|
||||
getGroupList (force: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupExtList(force: boolean): Promise<GeneralCallResult>;
|
||||
getGroupExtList (force: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): Promise<GeneralCallResult>;
|
||||
getGroupDetailInfo (groupCode: string, groupInfoSource: GroupInfoSource): Promise<GeneralCallResult>;
|
||||
|
||||
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;// req
|
||||
getMemberExtInfo (param: GroupExtParam): Promise<unknown>;// req
|
||||
|
||||
getGroupAllInfo(groupId: string, sourceId: number): Promise<unknown>;
|
||||
getGroupAllInfo (groupId: string, sourceId: number): Promise<unknown>;
|
||||
|
||||
getDiscussExistInfo(): unknown;
|
||||
getDiscussExistInfo (): unknown;
|
||||
|
||||
getGroupConfMember(): unknown;
|
||||
getGroupConfMember (): unknown;
|
||||
|
||||
getGroupMsgMask(): unknown;
|
||||
getGroupMsgMask (): unknown;
|
||||
|
||||
getGroupPortrait(): void;
|
||||
getGroupPortrait (): void;
|
||||
|
||||
modifyGroupName(groupCode: string, groupName: string, isNormalMember: boolean): Promise<GeneralCallResult>;
|
||||
modifyGroupName (groupCode: string, groupName: string, isNormalMember: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
modifyGroupRemark(groupCode: string, remark: string): Promise<GeneralCallResult>;
|
||||
modifyGroupRemark (groupCode: string, remark: string): Promise<GeneralCallResult>;
|
||||
|
||||
modifyGroupDetailInfo(groupCode: string, arg: unknown): void;
|
||||
modifyGroupDetailInfo (groupCode: string, arg: unknown): void;
|
||||
|
||||
// 第二个参数在大多数情况为0 设置群成员权限 例如上传群文件权限和群成员付费/加入邀请加入时为8
|
||||
modifyGroupDetailInfoV2(param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
|
||||
modifyGroupDetailInfoV2 (param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
|
||||
|
||||
setGroupMsgMask(groupCode: string, arg: unknown): void;
|
||||
setGroupMsgMask (groupCode: string, arg: unknown): void;
|
||||
|
||||
changeGroupShieldSettingTemp(groupCode: string, arg: unknown): void;
|
||||
changeGroupShieldSettingTemp (groupCode: string, arg: unknown): void;
|
||||
|
||||
inviteToGroup(arg: unknown): void;
|
||||
inviteToGroup (arg: unknown): void;
|
||||
|
||||
inviteMembersToGroup(args: unknown[]): void;
|
||||
inviteMembersToGroup (args: unknown[]): void;
|
||||
|
||||
inviteMembersToGroupWithMsg(args: unknown): void;
|
||||
inviteMembersToGroupWithMsg (args: unknown): void;
|
||||
|
||||
createGroup(arg: unknown): void;
|
||||
createGroup (arg: unknown): void;
|
||||
|
||||
createGroupWithMembers(arg: unknown): void;
|
||||
createGroupWithMembers (arg: unknown): void;
|
||||
|
||||
quitGroup(groupCode: string): void;
|
||||
quitGroup (groupCode: string): void;
|
||||
|
||||
destroyGroup(groupCode: string): void;
|
||||
destroyGroup (groupCode: string): void;
|
||||
|
||||
getSingleScreenNotifies(doubt: boolean, startSeq: string, count: number): Promise<GeneralCallResult>;
|
||||
getSingleScreenNotifies (doubt: boolean, startSeq: string, count: number): Promise<GeneralCallResult>;
|
||||
|
||||
clearGroupNotifies(groupCode: string): void;
|
||||
clearGroupNotifies (groupCode: string): void;
|
||||
|
||||
getGroupNotifiesUnreadCount(doubt: boolean): Promise<GeneralCallResult>;
|
||||
getGroupNotifiesUnreadCount (doubt: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
clearGroupNotifiesUnreadCount(doubt: boolean): void;
|
||||
clearGroupNotifiesUnreadCount (doubt: boolean): void;
|
||||
|
||||
operateSysNotify(
|
||||
operateSysNotify (
|
||||
doubt: boolean,
|
||||
operateMsg: {
|
||||
operateType: NTGroupRequestOperateTypes,
|
||||
@@ -217,80 +217,277 @@ export interface NodeIKernelGroupService {
|
||||
seq: string,
|
||||
type: GroupNotifyMsgType,
|
||||
groupCode: string,
|
||||
postscript: string
|
||||
}
|
||||
postscript: string;
|
||||
};
|
||||
}): Promise<void>;
|
||||
|
||||
setTop(groupCode: string, isTop: boolean): void;
|
||||
setTop (groupCode: string, isTop: boolean): void;
|
||||
|
||||
getGroupBulletin(groupCode: string): unknown;
|
||||
getGroupBulletin (groupCode: string): unknown;
|
||||
|
||||
deleteGroupBulletin(groupCode: string, seq: string, noticeId: string): void;
|
||||
deleteGroupBulletin (groupCode: string, seq: string, noticeId: string): void;
|
||||
|
||||
publishGroupBulletin(groupCode: string, pskey: string, data: unknown): Promise<GeneralCallResult>;
|
||||
publishGroupBulletin (groupCode: string, pskey: string, data: unknown): Promise<GeneralCallResult>;
|
||||
|
||||
publishInstructionForNewcomers(groupCode: string, arg: unknown): void;
|
||||
publishInstructionForNewcomers (groupCode: string, arg: unknown): void;
|
||||
|
||||
uploadGroupBulletinPic(groupCode: string, pskey: string, imagePath: string): Promise<GeneralCallResult & {
|
||||
uploadGroupBulletinPic (groupCode: string, pskey: string, imagePath: string): Promise<GeneralCallResult & {
|
||||
errCode: number;
|
||||
picInfo?: {
|
||||
id: string,
|
||||
width: number,
|
||||
height: number
|
||||
}
|
||||
height: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
downloadGroupBulletinRichMedia(groupCode: string): unknown;
|
||||
downloadGroupBulletinRichMedia (groupCode: string): unknown;
|
||||
|
||||
getGroupBulletinList(groupCode: string): unknown;
|
||||
getGroupBulletinList (groupCode: string): unknown;
|
||||
|
||||
getGroupStatisticInfo(groupCode: string): unknown;
|
||||
getGroupStatisticInfo (groupCode: string): unknown;
|
||||
|
||||
getGroupRemainAtTimes(groupCode: string): Promise<Omit<GeneralCallResult, 'result'> & {
|
||||
getGroupRemainAtTimes (groupCode: string): Promise<Omit<GeneralCallResult, 'result'> & {
|
||||
errCode: number,
|
||||
atInfo: {
|
||||
canAtAll: boolean
|
||||
RemainAtAllCountForUin: number
|
||||
RemainAtAllCountForGroup: number
|
||||
atTimesMsg: string
|
||||
canNotAtAllMsg: ''
|
||||
}
|
||||
canAtAll: boolean;
|
||||
RemainAtAllCountForUin: number;
|
||||
RemainAtAllCountForGroup: number;
|
||||
atTimesMsg: string;
|
||||
canNotAtAllMsg: '';
|
||||
};
|
||||
}>;
|
||||
|
||||
getJoinGroupNoVerifyFlag(groupCode: string): unknown;
|
||||
getJoinGroupNoVerifyFlag (groupCode: string): unknown;
|
||||
|
||||
getGroupArkInviteState(groupCode: string): unknown;
|
||||
getGroupArkInviteState (groupCode: string): unknown;
|
||||
|
||||
reqToJoinGroup(groupCode: string, arg: unknown): void;
|
||||
reqToJoinGroup (groupCode: string, arg: unknown): void;
|
||||
|
||||
setGroupShutUp(groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
|
||||
setGroupShutUp (groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>;
|
||||
getGroupShutUpMemberList (groupCode: string): Promise<GeneralCallResult>;
|
||||
|
||||
setMemberShutUp(groupCode: string, memberTimes: { uid: string, timeStamp: number }[]): Promise<GeneralCallResult>;
|
||||
setMemberShutUp (groupCode: string, memberTimes: { uid: string, timeStamp: number; }[]): Promise<GeneralCallResult>;
|
||||
|
||||
getGroupRecommendContactArkJson(groupCode: string): Promise<GeneralCallResult & { arkJson: string }>;
|
||||
getGroupRecommendContactArkJson (groupCode: string): Promise<GeneralCallResult & { arkJson: string; }>;
|
||||
|
||||
getJoinGroupLink(param: {
|
||||
getJoinGroupLink (param: {
|
||||
groupCode: string,
|
||||
srcId: number, // 73
|
||||
needShortUrl: boolean, // true
|
||||
additionalParam: string// ''
|
||||
}): Promise<GeneralCallResult & { url?: string }>;
|
||||
additionalParam: string;// ''
|
||||
}): Promise<GeneralCallResult & { url?: string; }>;
|
||||
|
||||
modifyGroupExtInfo(groupCode: string, arg: unknown): void;
|
||||
modifyGroupExtInfo (groupCode: string, arg: unknown): void;
|
||||
|
||||
addGroupEssence(param: {
|
||||
groupCode: string
|
||||
addGroupEssence (param: {
|
||||
groupCode: string;
|
||||
msgRandom: number,
|
||||
msgSeq: number
|
||||
msgSeq: number;
|
||||
}): Promise<unknown>;
|
||||
|
||||
removeGroupEssence(param: {
|
||||
groupCode: string
|
||||
removeGroupEssence (param: {
|
||||
groupCode: string;
|
||||
msgRandom: number,
|
||||
msgSeq: number
|
||||
msgSeq: number;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
|
||||
// --- Methods from IDA binary analysis ---
|
||||
clearGroupNotifyLocalUnreadCount (groupCode: string, arg: number): unknown;
|
||||
|
||||
getCardAppList (groupCode: string, arg: boolean): unknown;
|
||||
|
||||
getGroupBulletinDetail (arg1: string, arg2: string, arg3: string, arg4: boolean): unknown;
|
||||
|
||||
getGroupBulletinReadUsers (arg1: string, arg2: string, arg3: string, arg4: number, arg5: number, arg6: number): unknown;
|
||||
|
||||
getGroupDetailInfoByFilter (arg1: unknown, arg2: number, arg3: number, arg4: boolean): unknown;
|
||||
|
||||
getGroupDetailInfoForMqq (arg1: string, arg2: number, arg3: number, arg4: boolean): unknown;
|
||||
|
||||
getMemberInfoForMqq (arg1: string, arg2: Array<unknown>[], arg3: boolean): unknown;
|
||||
|
||||
getMemberInfoForMqqV2 (arg1: string, arg2: Array<unknown>[], arg3: boolean, arg4: string): unknown;
|
||||
|
||||
getRecGroups (arg1: string, arg2: unknown, arg3: string): unknown;
|
||||
|
||||
getSingleScreenNotifiesV2 (arg1: boolean, arg2: string, arg3: number, arg4: number): unknown;
|
||||
|
||||
modifyWxNotifyStatus (arg1: string, arg2: number): unknown;
|
||||
|
||||
operateSpecialFocus (arg1: string, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
remindGroupBulletinRead (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
transferGroupV2 (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
operateSysNotifyV2 (arg1: unknown, arg2: unknown): Promise<unknown>;
|
||||
|
||||
getAllMemberListV2 (groupCode: string, arg: unknown): unknown;
|
||||
|
||||
createGroupV2 (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
modifyGroupExtInfoV2 (groupExtInfo: GroupExtInfo, groupExtFilter: GroupExtFilter): Promise<GeneralCallResult & {
|
||||
result: { groupCode: string, result: number; };
|
||||
}>;
|
||||
|
||||
modifyGroupDetailInfoV2 (param: GroupDetailInfoV2Param, arg: number): Promise<GeneralCallResult>;
|
||||
|
||||
setGroupMsgMaskV2 (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupSquareRedpointInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupSquareHomeHead (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getCapsuleApp (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getCapsuleAppPro (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getMemberInfoCache (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupSecLevelInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getSubGroupInfo (arg: unknown): unknown;
|
||||
|
||||
getSwitchStatusForEssenceMsg (arg: unknown): unknown;
|
||||
|
||||
getTeamUpDetail (arg: unknown): unknown;
|
||||
|
||||
getTeamUpList (arg: unknown): unknown;
|
||||
|
||||
getTeamUpMembers (arg: unknown): unknown;
|
||||
|
||||
getTeamUpTemplateList (arg: unknown): unknown;
|
||||
|
||||
getTopicPage (arg1: string, arg2: string, arg3: string, arg4: string): unknown;
|
||||
|
||||
getTopicRecall (arg: unknown): unknown;
|
||||
|
||||
getWxNotifyStatus (arg: unknown): unknown;
|
||||
|
||||
getGroupPayToJoinStatus (arg: unknown): unknown;
|
||||
|
||||
getGroupSeqAndJoinTimeForGrayTips (arg: unknown): unknown;
|
||||
|
||||
getGroupTagRecords (arg: unknown): unknown;
|
||||
|
||||
getGroupBindGuilds (arg: unknown): unknown;
|
||||
|
||||
getGroupFlagForThirdApp (arg: unknown): unknown;
|
||||
|
||||
getGroupMsgLimitFreq (arg: unknown): unknown;
|
||||
|
||||
getGroupMedalList (arg: unknown): unknown;
|
||||
|
||||
getGroupDBVersion (arg: unknown): unknown;
|
||||
|
||||
getGroupInviteNoAuthLimitNum (arg: unknown): unknown;
|
||||
|
||||
getAIOBindGuildInfo (arg: unknown): unknown;
|
||||
|
||||
getAppCenter (arg: unknown): unknown;
|
||||
|
||||
getAICommonVoice (arg: unknown): unknown;
|
||||
|
||||
groupBlacklistDelApply (arg: unknown): unknown;
|
||||
|
||||
groupBlacklistGetAllApply (arg: unknown): unknown;
|
||||
|
||||
fetchGroupNotify (arg: unknown): unknown;
|
||||
|
||||
queryJoinGroupCanNoVerify (arg: unknown): unknown;
|
||||
|
||||
halfScreenPullNotice (arg: unknown): unknown;
|
||||
|
||||
halfScreenReportClick (arg: unknown): unknown;
|
||||
|
||||
joinGroup (arg: unknown): unknown;
|
||||
|
||||
listAllAIVoice (arg: unknown): unknown;
|
||||
|
||||
miniAppGetGroupInfo (arg: unknown): unknown;
|
||||
|
||||
postTeamUp (arg: unknown): unknown;
|
||||
|
||||
queryAIOBindGuild (arg: unknown): unknown;
|
||||
|
||||
removeGroupFromGroupList (arg: unknown): unknown;
|
||||
|
||||
saveAIVoice (arg: unknown): unknown;
|
||||
|
||||
setActiveExtGroup (arg: unknown): unknown;
|
||||
|
||||
setAIOBindGuild (arg: unknown): unknown;
|
||||
|
||||
setCapsuleSwitch (arg: unknown): unknown;
|
||||
|
||||
setGroupAppList (arg: unknown): unknown;
|
||||
|
||||
setGroupGeoInfo (arg: unknown): unknown;
|
||||
|
||||
setGroupRelationToGuild (arg: unknown): unknown;
|
||||
|
||||
setRcvJoinVerifyMsg (arg: unknown): unknown;
|
||||
|
||||
teamUpCreateGroup (arg: unknown): unknown;
|
||||
|
||||
teamUpInviteToGroup (arg: unknown): unknown;
|
||||
|
||||
teamUpRequestToJoin (arg: unknown): unknown;
|
||||
|
||||
teamUpSubmitDeadline (arg: unknown): unknown;
|
||||
|
||||
topicFeedback (arg: unknown): unknown;
|
||||
|
||||
topicReport (arg: unknown): unknown;
|
||||
|
||||
shareTopic (arg: unknown): unknown;
|
||||
|
||||
unbindAllGuilds (arg: unknown): unknown;
|
||||
|
||||
updateGroupInfoByMqq (arg: unknown): unknown;
|
||||
|
||||
updateMemberInfoByMqq (arg: unknown): unknown;
|
||||
|
||||
updateTeamUp (arg: unknown): unknown;
|
||||
|
||||
applyTeamUp (arg: unknown): unknown;
|
||||
|
||||
deleteTeamUp (arg: unknown): unknown;
|
||||
|
||||
getFindPageRecommendGroup (arg: unknown): unknown;
|
||||
|
||||
getTransferableMemberInfo (groupCode: string): unknown;
|
||||
|
||||
createGroupProfileShare (arg: unknown): unknown;
|
||||
|
||||
destroyMemberListScene (sceneId: string): void;
|
||||
|
||||
clearGroupSquareRedpointCache (arg: unknown): unknown;
|
||||
|
||||
checkGroupMemberCache (arrayList: Array<string>): Promise<unknown>;
|
||||
|
||||
cleanCapsuleCache (arg: unknown): unknown;
|
||||
|
||||
downloadGroupBulletinRichMedia (groupCode: string): unknown;
|
||||
|
||||
kickMemberV2 (param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
|
||||
destroyGroupV2 (arg: unknown): unknown;
|
||||
|
||||
quitGroupV2 (param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||
|
||||
inviteToGroupV2 (arg: unknown): unknown;
|
||||
|
||||
getGroupMsgMask (): unknown;
|
||||
|
||||
batchQueryCachedGroupDetailInfo (arg: unknown): unknown;
|
||||
|
||||
getGroupMemberLevelInfo (groupCode: string): Promise<unknown>;
|
||||
|
||||
getIllegalMemberList (arg: unknown): unknown;
|
||||
|
||||
getGroupRecommendContactArkJsonToWechat (arg: unknown): unknown;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface NodeIKernelGroupTabService {
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
getGroupTab (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelHandOffService {
|
||||
addKernelHandOffListener (listener: unknown): number;
|
||||
|
||||
removeKernelHandOffListener (listenerId: number): void;
|
||||
|
||||
changeHandOffActivities (arg: unknown): unknown;
|
||||
|
||||
deleteRecentHandOffActivities (arg: unknown): unknown;
|
||||
|
||||
getHandOffActivities (arg: unknown): unknown;
|
||||
|
||||
sendCapsulePanelActivities (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface NodeIKernelLiteBusinessService {
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
clearLiteBusiness (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
clickLiteAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
exposeLiteAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getLiteBusiness (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
getRevealTofuAuthority (arg: unknown): unknown;
|
||||
|
||||
recentRevealExposure (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelLockService {
|
||||
addKernelLockListener (listener: unknown): number;
|
||||
|
||||
removeKernelLockListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -29,10 +29,11 @@ export interface PasswordLoginArgType {
|
||||
uin: string;
|
||||
passwordMd5: string;// passwMD5
|
||||
step: number;// 猜测是需要二次认证 参数 一次为0
|
||||
newDeviceLoginSig: string;
|
||||
proofWaterSig: string;
|
||||
proofWaterRand: string;
|
||||
proofWaterSid: string;
|
||||
newDeviceLoginSig: Uint8Array;
|
||||
proofWaterSig: Uint8Array;
|
||||
proofWaterRand: Uint8Array;
|
||||
proofWaterSid: Uint8Array;
|
||||
unusualDeviceCheckSig: Uint8Array;
|
||||
}
|
||||
|
||||
export interface LoginListItem {
|
||||
@@ -63,7 +64,9 @@ export interface QuickLoginResult {
|
||||
export interface NodeIKernelLoginService {
|
||||
getMsfStatus: () => number;
|
||||
|
||||
setLoginMiscData (arg0: string, value: string): unknown;
|
||||
setLoginMiscData (key: string, value: string): unknown;
|
||||
|
||||
getLoginMiscData (key: string): Promise<GeneralCallResult & { value: string; }>;
|
||||
|
||||
getMachineGuid (): string;
|
||||
|
||||
@@ -73,14 +76,12 @@ export interface NodeIKernelLoginService {
|
||||
|
||||
addKernelLoginListener (listener: NodeIKernelLoginListener): number;
|
||||
|
||||
removeKernelLoginListener (listener: number): void;
|
||||
removeKernelLoginListener (listenerId: number): void;
|
||||
|
||||
initConfig (config: LoginInitConfig): void;
|
||||
|
||||
getLoginMiscData (data: string): Promise<GeneralCallResult & { value: string; }>;
|
||||
|
||||
getLoginList (): Promise<{
|
||||
result: number, // 0是ok
|
||||
result: number,
|
||||
LocalLoginInfoList: LoginListItem[];
|
||||
}>;
|
||||
|
||||
@@ -89,4 +90,32 @@ export interface NodeIKernelLoginService {
|
||||
passwordLogin (param: PasswordLoginArgType): Promise<QuickLoginResult>;
|
||||
|
||||
getQRCodePicture (): boolean;
|
||||
|
||||
destroy (): unknown;
|
||||
|
||||
cancel (): unknown;
|
||||
|
||||
abortPolling (): unknown;
|
||||
|
||||
startPolling (): unknown;
|
||||
|
||||
deleteLoginInfo (arg: unknown): unknown;
|
||||
|
||||
isHasLoginInfo (uin: string): boolean;
|
||||
|
||||
loadNoLoginUnitedConfig (arg: unknown): unknown;
|
||||
|
||||
loginUnusualDevice (arg: unknown): unknown;
|
||||
|
||||
registerUnitedConfigPushGroupList (groupList: unknown): unknown;
|
||||
|
||||
resetLoginInfo (arg: unknown): unknown;
|
||||
|
||||
setAutoLogin (arg: unknown): unknown;
|
||||
|
||||
setRemerberPwd (remember: boolean): unknown;
|
||||
|
||||
online (): unknown;
|
||||
|
||||
offline (): unknown;
|
||||
}
|
||||
@@ -6,6 +6,9 @@ enum ProxyType {
|
||||
}
|
||||
export interface NodeIKernelMSFService {
|
||||
getServerTime (): string;
|
||||
getMsfStatus (): number;
|
||||
online (): unknown;
|
||||
offline (): unknown;
|
||||
setNetworkProxy (param: {
|
||||
userName: string,
|
||||
userPwd: string,
|
||||
@@ -50,4 +53,5 @@ export interface NodeIKernelMSFService {
|
||||
accountType: number,
|
||||
transInfoMap: Map<string, unknown>;
|
||||
}): Promise<Buffer>;
|
||||
onMsfPushForTesting (arg1: unknown, arg2: unknown): unknown;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface NodeIKernelMiniAppService {
|
||||
addKernelMiniAppListener (listener: unknown): number;
|
||||
|
||||
removeKernelMiniAppListener (listenerId: number): void;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
export interface NodeIKernelMsgBackupService {
|
||||
addKernelMsgBackupListener(listener: unknown): number;
|
||||
addKernelMsgBackupListener (listener: unknown): number;
|
||||
|
||||
removeKernelMsgBackupListener(listenerId: number): void;
|
||||
removeKernelMsgBackupListener (listenerId: number): void;
|
||||
|
||||
getMsgBackupLocation(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getMsgBackupLocation (): unknown;// needs 0 arguments
|
||||
|
||||
setMsgBackupLocation(...args: unknown[]): unknown;// needs 1 arguments
|
||||
setMsgBackupLocation (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
requestMsgBackup(...args: unknown[]): unknown;// needs 0 arguments
|
||||
requestMsgBackup (): unknown;// needs 0 arguments
|
||||
|
||||
requestMsgRestore(...args: unknown[]): unknown;// needs 1 arguments
|
||||
requestMsgRestore (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
requestMsgMigrate(...args: unknown[]): unknown;// needs 1 arguments
|
||||
requestMsgMigrate (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
getLocalStorageBackup(...args: unknown[]): unknown;// needs 0 arguments
|
||||
getLocalStorageBackup (): unknown;// needs 0 arguments
|
||||
|
||||
deleteLocalBackup(...args: unknown[]): unknown;// needs 1 arguments
|
||||
deleteLocalBackup (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
clearCache(...args: unknown[]): unknown;// needs 0 arguments
|
||||
clearCache (): unknown;// needs 0 arguments
|
||||
|
||||
start(...args: unknown[]): unknown;// needs 1 arguments
|
||||
start (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
stop(...args: unknown[]): unknown;// needs 1 arguments
|
||||
stop (arg: unknown): unknown;// needs 1 arguments
|
||||
|
||||
pause(...args: unknown[]): unknown;// needs 2 arguments
|
||||
pause (arg1: unknown, arg2: unknown): unknown;// needs 2 arguments
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ElementType, MessageElement, Peer, RawMessage, FileElement, SendMessageElement } from '@/napcat-core/types';
|
||||
import { ElementType, MessageElement, Peer, RawMessage, FileElement, SendMessageElement, AvRecordElement, TofuRecordElement } from '@/napcat-core/types';
|
||||
import { NodeIKernelMsgListener } from '@/napcat-core/listeners/NodeIKernelMsgListener';
|
||||
import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
import { MsgReqType, QueryMsgsParams, TmpChatInfoApi } from '@/napcat-core/types/msg';
|
||||
import { MsgReqType, QueryMsgsParams, TmpChatInfoApi, MsgTypeFilter, MsgIdentity, SgrpStreamParams, GrayTipJsonInfo, ForwardFileInfo, LocalGrayTipInfo, TokenInfo, BackGroundInfo } from '@/napcat-core/types/msg';
|
||||
|
||||
export interface NodeIKernelMsgService {
|
||||
buildMultiForwardMsg (req: { srcMsgIds: Array<string>, srcContact: Peer; }): Promise<GeneralCallResult & { rspInfo: { elements: unknown; }; }>;
|
||||
@@ -10,21 +10,21 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
addKernelMsgListener (nodeIKernelMsgListener: NodeIKernelMsgListener): number;
|
||||
|
||||
sendMsg (msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<unknown, unknown>): Promise<GeneralCallResult>;
|
||||
sendMsg (msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<number, unknown>): Promise<GeneralCallResult>;
|
||||
|
||||
recallMsg (peer: Peer, msgIds: string[]): Promise<GeneralCallResult>;
|
||||
|
||||
addKernelMsgImportToolListener (arg: unknown): unknown;
|
||||
addKernelMsgImportToolListener (listener: unknown): string;
|
||||
|
||||
removeKernelMsgListener (args: unknown): unknown;
|
||||
removeKernelMsgListener (listenerId: string): void;
|
||||
|
||||
addKernelTempChatSigListener (...args: unknown[]): unknown;
|
||||
addKernelTempChatSigListener (listener: unknown): string;
|
||||
|
||||
removeKernelTempChatSigListener (...args: unknown[]): unknown;
|
||||
removeKernelTempChatSigListener (listenerId: string): void;
|
||||
|
||||
setAutoReplyTextList (AutoReplyText: Array<unknown>, i2: number): unknown;
|
||||
|
||||
getAutoReplyTextList (...args: unknown[]): unknown;
|
||||
getAutoReplyTextList (): unknown;
|
||||
|
||||
getOnLineDev (): void;
|
||||
|
||||
@@ -52,85 +52,85 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
downloadOnlineStatusCommonByUrl (arg0: string, arg1: string): unknown;
|
||||
|
||||
setToken (arg: unknown): unknown;
|
||||
setToken (tokenInfo: TokenInfo): Promise<GeneralCallResult>;
|
||||
|
||||
switchForeGround (): unknown;
|
||||
|
||||
switchBackGround (arg: unknown): unknown;
|
||||
switchBackGround (info: BackGroundInfo): Promise<GeneralCallResult>;
|
||||
|
||||
setTokenForMqq (token: string): unknown;
|
||||
|
||||
switchForeGroundForMqq (...args: unknown[]): unknown;
|
||||
switchForeGroundForMqq (data: string | Uint8Array): Promise<GeneralCallResult>;
|
||||
|
||||
switchBackGroundForMqq (...args: unknown[]): unknown;
|
||||
switchBackGroundForMqq (data: string | Uint8Array): Promise<GeneralCallResult>;
|
||||
|
||||
getMsgSetting (...args: unknown[]): unknown;
|
||||
getMsgSetting (): unknown;
|
||||
|
||||
setMsgSetting (...args: unknown[]): unknown;
|
||||
setMsgSetting (setting: unknown): unknown;
|
||||
|
||||
addSendMsg (...args: unknown[]): unknown;
|
||||
addSendMsg (msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<number, unknown>): unknown;
|
||||
|
||||
cancelSendMsg (peer: Peer, msgId: string): Promise<void>;
|
||||
|
||||
switchToOfflineSendMsg (peer: Peer, MsgId: string): unknown;
|
||||
|
||||
reqToOfflineSendMsg (...args: unknown[]): unknown;
|
||||
reqToOfflineSendMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
refuseReceiveOnlineFileMsg (peer: Peer, MsgId: string): unknown;
|
||||
|
||||
resendMsg (peer: Peer, msgId: string): Promise<void>;
|
||||
|
||||
recallMsg (...args: unknown[]): unknown;
|
||||
reeditRecallMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
reeditRecallMsg (...args: unknown[]): unknown;
|
||||
forwardMsg (msgIds: string[], peer: Peer, dstPeers: Peer[], commentElements: unknown): Promise<GeneralCallResult>;
|
||||
|
||||
forwardMsg (...args: unknown[]): Promise<GeneralCallResult>;
|
||||
forwardMsgWithComment (msgIds: string[], srcContact: Peer, dstContacts: Peer[], commentElements: Array<unknown>, arg5: unknown): unknown;
|
||||
|
||||
forwardMsgWithComment (...args: unknown[]): unknown;
|
||||
forwardSubMsgWithComment (msgIds: string[], subMsgIds: string[], srcContact: Peer, dstContacts: Peer[], commentElements: Array<unknown>, arg6: unknown): unknown;
|
||||
|
||||
forwardSubMsgWithComment (...args: unknown[]): unknown;
|
||||
forwardRichMsgInVist (richMsgInfos: Array<unknown>, dstContacts: Peer[]): unknown;
|
||||
|
||||
forwardRichMsgInVist (...args: unknown[]): unknown;
|
||||
forwardFile (fileInfo: ForwardFileInfo, peer: Peer): unknown;
|
||||
|
||||
forwardFile (...args: unknown[]): unknown;
|
||||
multiForwardMsg (peer: Peer, srcContact: Peer, msgIds: string[]): unknown;
|
||||
|
||||
multiForwardMsg (...args: unknown[]): unknown;
|
||||
multiForwardMsgWithComment (msgInfos: Array<unknown>, srcContact: Peer, dstContact: Peer, commentElements: Array<unknown>, arg5: unknown): unknown;
|
||||
|
||||
multiForwardMsgWithComment (...args: unknown[]): unknown;
|
||||
deleteRecallMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
deleteRecallMsg (...args: unknown[]): unknown;
|
||||
deleteRecallMsgForLocal (peer: Peer, msgId: string): unknown;
|
||||
|
||||
deleteRecallMsgForLocal (...args: unknown[]): unknown;
|
||||
addLocalGrayTipMsg (peer: Peer, grayTipInfo: LocalGrayTipInfo, isUnread: boolean): unknown;
|
||||
|
||||
addLocalGrayTipMsg (...args: unknown[]): unknown;
|
||||
addLocalJsonGrayTipMsg (arg1: Peer, arg2: GrayTipJsonInfo, arg3: boolean, arg4: boolean): unknown;
|
||||
|
||||
addLocalJsonGrayTipMsg (...args: unknown[]): unknown;
|
||||
addLocalJsonGrayTipMsgExt (arg1: Peer, arg2: MsgIdentity, arg3: GrayTipJsonInfo, arg4: boolean, arg5: boolean): unknown;
|
||||
|
||||
addLocalJsonGrayTipMsgExt (...args: unknown[]): unknown;
|
||||
IsLocalJsonTipValid (tipType: number): boolean;
|
||||
|
||||
IsLocalJsonTipValid (...args: unknown[]): unknown;
|
||||
addLocalAVRecordMsg (peer: Peer, avRecord: AvRecordElement): unknown;
|
||||
|
||||
addLocalAVRecordMsg (...args: unknown[]): unknown;
|
||||
|
||||
addLocalTofuRecordMsg (...args: unknown[]): unknown;
|
||||
addLocalTofuRecordMsg (peer: Peer, tofuRecord: TofuRecordElement): unknown;
|
||||
|
||||
addLocalRecordMsg (Peer: Peer, msgId: string, ele: MessageElement, attr: Array<unknown> | number, front: boolean): Promise<unknown>;
|
||||
|
||||
addLocalRecordMsgWithExtInfos (peer: Peer, msgId: string, extInfos: unknown): unknown;
|
||||
|
||||
deleteMsg (Peer: Peer, msgIds: Array<string>): Promise<unknown>;
|
||||
|
||||
updateElementExtBufForUI (...args: unknown[]): unknown;
|
||||
updateElementExtBufForUI (arg1: Peer, arg2: string, arg3: string, arg4: string | Uint8Array): unknown;
|
||||
|
||||
updateMsgRecordExtPbBufForUI (...args: unknown[]): unknown;
|
||||
updateMsgRecordExtPbBufForUI (arg1: Peer, arg2: string, arg3: unknown): unknown;
|
||||
|
||||
startMsgSync (...args: unknown[]): unknown;
|
||||
startMsgSync (): unknown;
|
||||
|
||||
startGuildMsgSync (...args: unknown[]): unknown;
|
||||
startGuildMsgSync (): unknown;
|
||||
|
||||
isGuildChannelSync (...args: unknown[]): unknown;
|
||||
isGuildChannelSync (): unknown;
|
||||
|
||||
getMsgUniqueId (UniqueId: string): string;
|
||||
|
||||
isMsgMatched (...args: unknown[]): unknown;
|
||||
isMsgMatched (matchInfo: unknown): unknown;
|
||||
|
||||
getOnlineFileMsgs (peer: Peer): Promise<GeneralCallResult & {
|
||||
msgList: {
|
||||
@@ -147,7 +147,7 @@ export interface NodeIKernelMsgService {
|
||||
}[]; // 一大坨,懒得写
|
||||
}>;
|
||||
|
||||
getAllOnlineFileMsgs (...args: unknown[]): unknown;
|
||||
getAllOnlineFileMsgs (): unknown;
|
||||
|
||||
getLatestDbMsgs (peer: Peer, cnt: number): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
@@ -171,7 +171,7 @@ export interface NodeIKernelMsgService {
|
||||
}>;
|
||||
|
||||
// @deprecated
|
||||
getMsgsWithMsgTimeAndClientSeqForC2C (...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
getMsgsWithMsgTimeAndClientSeqForC2C (peer: Peer, arg2: string, arg3: string, arg4: number, arg5: boolean, arg6: boolean, arg7: boolean): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgsWithStatus (params: {
|
||||
peer: Peer;
|
||||
@@ -186,6 +186,7 @@ export interface NodeIKernelMsgService {
|
||||
getMsgsBySeqRange (peer: Peer, startSeq: string, endSeq: string): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
|
||||
// @deprecated
|
||||
getMsgsBySeqAndCount (peer: Peer, seq: string, count: number, desc: boolean, isReverseOrder: boolean): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
@@ -211,19 +212,19 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
getSourceOfReplyMsgByClientSeqAndTime (peer: Peer, clientSeq: string, time: string, replyMsgId: string): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgsByTypeFilter (peer: Peer, msgId: string, cnt: unknown, queryOrder: boolean, typeFilter: {
|
||||
getMsgsByTypeFilter (peer: Peer, msgId: string, cnt: Array<unknown>, queryOrder: boolean, typeFilter: {
|
||||
type: number,
|
||||
subtype: Array<number>;
|
||||
}): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgsByTypeFilters (peer: Peer, msgId: string, cnt: unknown, queryOrder: boolean, typeFilters: Array<{
|
||||
getMsgsByTypeFilters (peer: Peer, msgId: string, cnt: number, queryOrder: boolean, typeFilters: Array<{
|
||||
type: number,
|
||||
subtype: Array<number>;
|
||||
}>): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
getMsgWithAbstractByFilterParam (...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
getMsgWithAbstractByFilterParam (arg1: Peer, arg2: string, arg3: string, arg4: number, arg5: MsgTypeFilter): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
queryMsgsWithFilter (...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
queryMsgsWithFilter (msgId: string, msgTime: string, param: QueryMsgsParams): Promise<GeneralCallResult & { msgList: RawMessage[]; }>;
|
||||
|
||||
// queryMsgsWithFilterVer2(MsgId: string, MsgTime: string, param: QueryMsgsParams): Promise<unknown>;
|
||||
|
||||
@@ -235,11 +236,11 @@ export interface NodeIKernelMsgService {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
|
||||
setMsgRichInfoFlag (...args: unknown[]): unknown;
|
||||
setMsgRichInfoFlag (flag: boolean): void;
|
||||
|
||||
queryPicOrVideoMsgs (msgId: string, msgTime: string, megSeq: string, param: QueryMsgsParams): Promise<unknown>;
|
||||
|
||||
queryPicOrVideoMsgsDesktop (...args: unknown[]): unknown;
|
||||
queryPicOrVideoMsgsDesktop (msgId: string, msgTime: string, msgSeq: string, param: QueryMsgsParams): unknown;
|
||||
|
||||
queryEmoticonMsgs (msgId: string, msgTime: string, msgSeq: string, Params: QueryMsgsParams): Promise<unknown>;
|
||||
|
||||
@@ -247,81 +248,81 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
queryMsgsAndAbstractsWithFilter (msgId: string, msgTime: string, megSeq: string, param: QueryMsgsParams): unknown;
|
||||
|
||||
setFocusOnGuild (...args: unknown[]): unknown;
|
||||
setFocusOnGuild (arg: unknown): unknown;
|
||||
|
||||
setFocusSession (...args: unknown[]): unknown;
|
||||
setFocusSession (arg: unknown): unknown;
|
||||
|
||||
enableFilterUnreadInfoNotify (...args: unknown[]): unknown;
|
||||
enableFilterUnreadInfoNotify (arg: unknown): unknown;
|
||||
|
||||
enableFilterMsgAbstractNotify (...args: unknown[]): unknown;
|
||||
enableFilterMsgAbstractNotify (arg: unknown): unknown;
|
||||
|
||||
onScenesChangeForSilenceMode (...args: unknown[]): unknown;
|
||||
onScenesChangeForSilenceMode (arg: unknown): unknown;
|
||||
|
||||
getContactUnreadCnt (...args: unknown[]): unknown;
|
||||
getContactUnreadCnt (peers: Peer[]): unknown;
|
||||
|
||||
getUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getGuildUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getGuildUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getGuildUnreadCntTabInfo (...args: unknown[]): unknown;
|
||||
getGuildUnreadCntTabInfo (arg: unknown): unknown;
|
||||
|
||||
getAllGuildUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getAllGuildUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getAllJoinGuildCnt (...args: unknown[]): unknown;
|
||||
getAllJoinGuildCnt (arg: unknown): unknown;
|
||||
|
||||
getAllDirectSessionUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getAllDirectSessionUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getCategoryUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getCategoryUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
getGuildFeedsUnreadCntInfo (...args: unknown[]): unknown;
|
||||
getGuildFeedsUnreadCntInfo (arg: unknown): unknown;
|
||||
|
||||
setUnVisibleChannelCntInfo (...args: unknown[]): unknown;
|
||||
setUnVisibleChannelCntInfo (arg: unknown): unknown;
|
||||
|
||||
setUnVisibleChannelTypeCntInfo (...args: unknown[]): unknown;
|
||||
setUnVisibleChannelTypeCntInfo (arg: unknown): unknown;
|
||||
|
||||
setVisibleGuildCntInfo (...args: unknown[]): unknown;
|
||||
setVisibleGuildCntInfo (arg: unknown): unknown;
|
||||
|
||||
setMsgRead (peer: Peer): Promise<GeneralCallResult>;
|
||||
|
||||
setAllC2CAndGroupMsgRead (): Promise<unknown>;
|
||||
|
||||
setGuildMsgRead (...args: unknown[]): unknown;
|
||||
setGuildMsgRead (arg: unknown): unknown;
|
||||
|
||||
setAllGuildMsgRead (...args: unknown[]): unknown;
|
||||
setAllGuildMsgRead (arg: unknown): unknown;
|
||||
|
||||
setMsgReadAndReport (...args: unknown[]): unknown;
|
||||
setMsgReadAndReport (peer: Peer, msg: RawMessage): unknown;
|
||||
|
||||
setSpecificMsgReadAndReport (...args: unknown[]): unknown;
|
||||
setSpecificMsgReadAndReport (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
setLocalMsgRead (...args: unknown[]): unknown;
|
||||
setLocalMsgRead (peer: Peer): unknown;
|
||||
|
||||
setGroupGuildMsgRead (...args: unknown[]): unknown;
|
||||
setGroupGuildMsgRead (arg: unknown): unknown;
|
||||
|
||||
getGuildGroupTransData (...args: unknown[]): unknown;
|
||||
getGuildGroupTransData (arg: unknown): unknown;
|
||||
|
||||
setGroupGuildBubbleRead (...args: unknown[]): unknown;
|
||||
setGroupGuildBubbleRead (arg: unknown): unknown;
|
||||
|
||||
getGuildGroupBubble (...args: unknown[]): unknown;
|
||||
getGuildGroupBubble (arg: unknown): unknown;
|
||||
|
||||
fetchGroupGuildUnread (...args: unknown[]): unknown;
|
||||
fetchGroupGuildUnread (arg: unknown): unknown;
|
||||
|
||||
setGroupGuildFlag (...args: unknown[]): unknown;
|
||||
setGroupGuildFlag (arg: unknown): unknown;
|
||||
|
||||
setGuildUDCFlag (...args: unknown[]): unknown;
|
||||
setGuildUDCFlag (arg: unknown): unknown;
|
||||
|
||||
setGuildTabUserFlag (...args: unknown[]): unknown;
|
||||
setGuildTabUserFlag (arg: unknown): unknown;
|
||||
|
||||
setBuildMode (flag: number/* 0 1 3 */): unknown;
|
||||
|
||||
setConfigurationServiceData (...args: unknown[]): unknown;
|
||||
setConfigurationServiceData (arg: unknown): unknown;
|
||||
|
||||
setMarkUnreadFlag (...args: unknown[]): unknown;
|
||||
setMarkUnreadFlag (peer: Peer, unread: boolean): unknown;
|
||||
|
||||
getChannelEventFlow (...args: unknown[]): unknown;
|
||||
getChannelEventFlow (arg: unknown): unknown;
|
||||
|
||||
getMsgEventFlow (...args: unknown[]): unknown;
|
||||
getMsgEventFlow (arg: unknown): unknown;
|
||||
|
||||
getRichMediaFilePathForMobileQQSend (...args: unknown[]): unknown;
|
||||
getRichMediaFilePathForMobileQQSend (arg: unknown): unknown;
|
||||
|
||||
getRichMediaFilePathForGuild (arg: {
|
||||
md5HexStr: string,
|
||||
@@ -334,15 +335,15 @@ export interface NodeIKernelMsgService {
|
||||
file_uuid: '';
|
||||
}): string;
|
||||
|
||||
assembleMobileQQRichMediaFilePath (...args: unknown[]): unknown;
|
||||
assembleMobileQQRichMediaFilePath (arg: unknown): unknown;
|
||||
|
||||
getFileThumbSavePathForSend (thumbSize: number, createNeed: boolean): string;
|
||||
|
||||
getFileThumbSavePath (...args: unknown[]): unknown;
|
||||
getFileThumbSavePath (arg1: string, arg2: number, arg3: boolean): unknown;
|
||||
|
||||
translatePtt2Text (msgId: string, peer: Peer, msgElement: MessageElement): unknown;
|
||||
|
||||
setPttPlayedState (...args: unknown[]): unknown;
|
||||
setPttPlayedState (arg1: string, arg2: Peer, arg3: string): unknown;
|
||||
|
||||
fetchFavEmojiList (str: string, num: number, backward: boolean, forceRefresh: boolean): Promise<GeneralCallResult & {
|
||||
emojiInfoList: Array<{
|
||||
@@ -368,49 +369,49 @@ export interface NodeIKernelMsgService {
|
||||
}>;
|
||||
}>;
|
||||
|
||||
addFavEmoji (...args: unknown[]): unknown;
|
||||
addFavEmoji (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmoticonList (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonList (arg1: number, arg2: number): unknown;
|
||||
|
||||
fetchMarketEmoticonShowImage (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonShowImage (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmoticonAioImage (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonAioImage (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmotionJsonFile (...args: unknown[]): unknown;
|
||||
fetchMarketEmotionJsonFile (arg: unknown): unknown;
|
||||
|
||||
getMarketEmoticonPath (...args: unknown[]): unknown;
|
||||
getMarketEmoticonPath (arg1: number, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
getMarketEmoticonPathBySync (...args: unknown[]): unknown;
|
||||
getMarketEmoticonPathBySync (arg1: number, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
fetchMarketEmoticonFaceImages (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonFaceImages (arg: unknown): unknown;
|
||||
|
||||
fetchMarketEmoticonAuthDetail (...args: unknown[]): unknown;
|
||||
fetchMarketEmoticonAuthDetail (arg: unknown): unknown;
|
||||
|
||||
getFavMarketEmoticonInfo (...args: unknown[]): unknown;
|
||||
getFavMarketEmoticonInfo (tabId: number, emojiId: string): unknown;
|
||||
|
||||
addRecentUsedFace (...args: unknown[]): unknown;
|
||||
addRecentUsedFace (arg: unknown): unknown;
|
||||
|
||||
getRecentUsedFaceList (...args: unknown[]): unknown;
|
||||
getRecentUsedFaceList (arg: unknown): unknown;
|
||||
|
||||
getMarketEmoticonEncryptKeys (...args: unknown[]): unknown;
|
||||
getMarketEmoticonEncryptKeys (arg1: number, arg2: Array<unknown>[]): unknown;
|
||||
|
||||
downloadEmojiPic (...args: unknown[]): unknown;
|
||||
downloadEmojiPic (arg1: number, arg2: Array<unknown>[], arg3: number, arg4: Map<unknown, unknown>): unknown;
|
||||
|
||||
deleteFavEmoji (...args: unknown[]): unknown;
|
||||
deleteFavEmoji (arg: unknown): unknown;
|
||||
|
||||
modifyFavEmojiDesc (...args: unknown[]): unknown;
|
||||
modifyFavEmojiDesc (arg: unknown): unknown;
|
||||
|
||||
queryFavEmojiByDesc (...args: unknown[]): unknown;
|
||||
queryFavEmojiByDesc (arg: unknown): unknown;
|
||||
|
||||
getHotPicInfoListSearchString (...args: unknown[]): unknown;
|
||||
getHotPicInfoListSearchString (arg1: string, arg2: string, arg3: number, arg4: number, arg5: boolean): unknown;
|
||||
|
||||
getHotPicSearchResult (...args: unknown[]): unknown;
|
||||
getHotPicSearchResult (arg: unknown): unknown;
|
||||
|
||||
getHotPicHotWords (...args: unknown[]): unknown;
|
||||
getHotPicHotWords (arg: unknown): unknown;
|
||||
|
||||
getHotPicJumpInfo (...args: unknown[]): unknown;
|
||||
getHotPicJumpInfo (arg: unknown): unknown;
|
||||
|
||||
getEmojiResourcePath (...args: unknown[]): unknown;
|
||||
getEmojiResourcePath (arg: unknown): unknown;
|
||||
|
||||
JoinDragonGroupEmoji (JoinDragonGroupEmojiReq: {
|
||||
latestMsgSeq: string,
|
||||
@@ -419,17 +420,17 @@ export interface NodeIKernelMsgService {
|
||||
peerContact: Peer;
|
||||
}): Promise<unknown>;
|
||||
|
||||
getMsgAbstracts (...args: unknown[]): unknown;
|
||||
getMsgAbstracts (arg: unknown): unknown;
|
||||
|
||||
getMsgAbstract (...args: unknown[]): unknown;
|
||||
getMsgAbstract (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
getMsgAbstractList (...args: unknown[]): unknown;
|
||||
getMsgAbstractList (arg: unknown): unknown;
|
||||
|
||||
getMsgAbstractListBySeqRange (...args: unknown[]): unknown;
|
||||
getMsgAbstractListBySeqRange (arg: unknown): unknown;
|
||||
|
||||
refreshMsgAbstracts (...args: unknown[]): unknown;
|
||||
refreshMsgAbstracts (arg: unknown): unknown;
|
||||
|
||||
refreshMsgAbstractsByGuildIds (...args: unknown[]): unknown;
|
||||
refreshMsgAbstractsByGuildIds (arg: unknown): unknown;
|
||||
|
||||
getRichMediaElement (arg: {
|
||||
msgId: string,
|
||||
@@ -440,7 +441,7 @@ export interface NodeIKernelMsgService {
|
||||
downloadType: number,
|
||||
}): Promise<any>;
|
||||
|
||||
cancelGetRichMediaElement (...args: unknown[]): unknown;
|
||||
cancelGetRichMediaElement (arg: unknown): unknown;
|
||||
|
||||
refuseGetRichMediaElement (args: {
|
||||
msgId: string,
|
||||
@@ -451,7 +452,7 @@ export interface NodeIKernelMsgService {
|
||||
downSourceType: number, // 1
|
||||
}): Promise<void>;
|
||||
|
||||
switchToOfflineGetRichMediaElement (...args: unknown[]): unknown;
|
||||
switchToOfflineGetRichMediaElement (arg: unknown): unknown;
|
||||
|
||||
downloadRichMedia (args: {
|
||||
fileModelId: string,
|
||||
@@ -473,21 +474,21 @@ export interface NodeIKernelMsgService {
|
||||
guildId: string;
|
||||
}): Promise<unknown>;
|
||||
|
||||
getFirstUnreadCommonMsg (...args: unknown[]): unknown;
|
||||
getFirstUnreadCommonMsg (arg: unknown): unknown;
|
||||
|
||||
getFirstUnreadAtmeMsg (...args: unknown[]): unknown;
|
||||
getFirstUnreadAtmeMsg (peer: Peer): unknown;
|
||||
|
||||
getFirstUnreadAtallMsg (...args: unknown[]): unknown;
|
||||
getFirstUnreadAtallMsg (peer: Peer): unknown;
|
||||
|
||||
getNavigateInfo (...args: unknown[]): unknown;
|
||||
getNavigateInfo (arg: unknown): unknown;
|
||||
|
||||
getChannelFreqLimitInfo (...args: unknown[]): unknown;
|
||||
getChannelFreqLimitInfo (arg: unknown): unknown;
|
||||
|
||||
getRecentUseEmojiList (...args: unknown[]): unknown;
|
||||
getRecentUseEmojiList (): unknown;
|
||||
|
||||
getRecentEmojiList (...args: unknown[]): unknown;
|
||||
getRecentEmojiList (arg: unknown): unknown;
|
||||
|
||||
setMsgEmojiLikes (...args: unknown[]): unknown;
|
||||
setMsgEmojiLikes (peer: Peer, msgSeq: string, emojiId: string, emojiType: string, setOrCancel: boolean): unknown;
|
||||
|
||||
getMsgEmojiLikesList (peer: Peer, msgSeq: string, emojiId: string, emojiType: string, cookie: string, bForward: boolean, number: number): Promise<{
|
||||
result: number,
|
||||
@@ -503,7 +504,7 @@ export interface NodeIKernelMsgService {
|
||||
isFirstPage: boolean;
|
||||
}>;
|
||||
|
||||
setMsgEmojiLikesForRole (...args: unknown[]): unknown;
|
||||
setMsgEmojiLikesForRole (arg1: Peer, arg2: string, arg3: string, arg4: string, arg5: string, arg6: string, arg7: boolean, arg8: boolean, arg9: SgrpStreamParams): unknown;
|
||||
|
||||
clickInlineKeyboardButton (params: {
|
||||
guildId?: string,
|
||||
@@ -516,7 +517,7 @@ export interface NodeIKernelMsgService {
|
||||
chatType: number; // 1私聊 2群
|
||||
}): Promise<GeneralCallResult & { status: number, promptText: string, promptType: number, promptIcon: number; }>;
|
||||
|
||||
setCurOnScreenMsg (...args: unknown[]): unknown;
|
||||
setCurOnScreenMsg (arg: unknown): unknown;
|
||||
|
||||
setCurOnScreenMsgForMsgEvent (peer: Peer, msgRegList: Map<string, Uint8Array>): void;
|
||||
|
||||
@@ -524,91 +525,91 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
setMiscData (key: string, value: string): unknown;
|
||||
|
||||
getBookmarkData (...args: unknown[]): unknown;
|
||||
getBookmarkData (key: string): unknown;
|
||||
|
||||
setBookmarkData (...args: unknown[]): unknown;
|
||||
setBookmarkData (key: string, value: string): unknown;
|
||||
|
||||
sendShowInputStatusReq (ChatType: number, EventType: number, toUid: string): Promise<unknown>;
|
||||
|
||||
queryCalendar (...args: unknown[]): unknown;
|
||||
queryCalendar (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
queryFirstMsgSeq (peer: Peer, ...args: unknown[]): unknown;
|
||||
queryFirstMsgSeq (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
queryRoamCalendar (...args: unknown[]): unknown;
|
||||
queryRoamCalendar (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
queryFirstRoamMsg (...args: unknown[]): unknown;
|
||||
queryFirstRoamMsg (peer: Peer, msgTime: number): unknown;
|
||||
|
||||
fetchLongMsg (peer: Peer, msgId: string): unknown;
|
||||
|
||||
fetchLongMsgWithCb (...args: unknown[]): unknown;
|
||||
fetchLongMsgWithCb (peer: Peer, msgId: number): unknown;
|
||||
|
||||
setIsStopKernelFetchLongMsg (...args: unknown[]): unknown;
|
||||
setIsStopKernelFetchLongMsg (arg: unknown): unknown;
|
||||
|
||||
insertGameResultAsMsgToDb (...args: unknown[]): unknown;
|
||||
insertGameResultAsMsgToDb (arg: unknown): unknown;
|
||||
|
||||
getMultiMsg (...args: unknown[]): Promise<GeneralCallResult & {
|
||||
getMultiMsg (arg1: Peer, arg2: string, arg3: string): Promise<GeneralCallResult & {
|
||||
msgList: RawMessage[];
|
||||
}>;
|
||||
|
||||
setDraft (...args: unknown[]): unknown;
|
||||
setDraft (arg1: Peer, arg2: Array<unknown>[]): unknown;
|
||||
|
||||
getDraft (...args: unknown[]): unknown;
|
||||
getDraft (peer: Peer): unknown;
|
||||
|
||||
deleteDraft (...args: unknown[]): unknown;
|
||||
deleteDraft (peer: Peer): unknown;
|
||||
|
||||
getRecentHiddenSesionList (...args: unknown[]): unknown;
|
||||
getRecentHiddenSesionList (): unknown;
|
||||
|
||||
setRecentHiddenSession (...args: unknown[]): unknown;
|
||||
setRecentHiddenSession (arg: unknown): unknown;
|
||||
|
||||
delRecentHiddenSession (...args: unknown[]): unknown;
|
||||
delRecentHiddenSession (arg: unknown): unknown;
|
||||
|
||||
getCurHiddenSession (...args: unknown[]): unknown;
|
||||
getCurHiddenSession (): unknown;
|
||||
|
||||
setCurHiddenSession (...args: unknown[]): unknown;
|
||||
setCurHiddenSession (arg: unknown): unknown;
|
||||
|
||||
setReplyDraft (...args: unknown[]): unknown;
|
||||
setReplyDraft (arg1: Peer, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
getReplyDraft (...args: unknown[]): unknown;
|
||||
getReplyDraft (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
deleteReplyDraft (...args: unknown[]): unknown;
|
||||
deleteReplyDraft (arg1: Peer, arg2: string): unknown;
|
||||
|
||||
getFirstUnreadAtMsg (peer: Peer): unknown;
|
||||
|
||||
clearMsgRecords (...args: unknown[]): unknown;
|
||||
clearMsgRecords (peer: Peer): unknown;
|
||||
|
||||
IsExistOldDb (...args: unknown[]): unknown;
|
||||
IsExistOldDb (): unknown;
|
||||
|
||||
canImportOldDbMsg (...args: unknown[]): unknown;
|
||||
canImportOldDbMsg (): unknown;
|
||||
|
||||
setPowerStatus (isPowerOn: boolean): unknown;
|
||||
|
||||
canProcessDataMigration (...args: unknown[]): unknown;
|
||||
canProcessDataMigration (): unknown;
|
||||
|
||||
importOldDbMsg (...args: unknown[]): unknown;
|
||||
importOldDbMsg (): unknown;
|
||||
|
||||
stopImportOldDbMsgAndroid (...args: unknown[]): unknown;
|
||||
stopImportOldDbMsgAndroid (): unknown;
|
||||
|
||||
isMqqDataImportFinished (...args: unknown[]): unknown;
|
||||
isMqqDataImportFinished (): unknown;
|
||||
|
||||
getMqqDataImportTableNames (...args: unknown[]): unknown;
|
||||
getMqqDataImportTableNames (): unknown;
|
||||
|
||||
getCurChatImportStatusByUin (...args: unknown[]): unknown;
|
||||
getCurChatImportStatusByUin (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getDataImportUserLevel (): unknown;
|
||||
|
||||
getMsgQRCode (...args: unknown[]): unknown;
|
||||
getMsgQRCode (): unknown;
|
||||
|
||||
getGuestMsgAbstracts (...args: unknown[]): unknown;
|
||||
getGuestMsgAbstracts (arg: unknown): unknown;
|
||||
|
||||
getGuestMsgByRange (...args: unknown[]): unknown;
|
||||
getGuestMsgByRange (arg: unknown): unknown;
|
||||
|
||||
getGuestMsgAbstractByRange (...args: unknown[]): unknown;
|
||||
getGuestMsgAbstractByRange (arg: unknown): unknown;
|
||||
|
||||
registerSysMsgNotification (...args: unknown[]): unknown;
|
||||
registerSysMsgNotification (arg1: number, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
unregisterSysMsgNotification (...args: unknown[]): unknown;
|
||||
unregisterSysMsgNotification (arg1: number, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
enterOrExitAio (...args: unknown[]): unknown;
|
||||
enterOrExitAio (arg: unknown): unknown;
|
||||
|
||||
prepareTempChat (args: unknown): unknown;
|
||||
|
||||
@@ -616,66 +617,66 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
getTempChatInfo (ChatType: number, Uid: string): Promise<TmpChatInfoApi>;
|
||||
|
||||
setContactLocalTop (...args: unknown[]): unknown;
|
||||
setContactLocalTop (peer: Peer, isTop: boolean): unknown;
|
||||
|
||||
switchAnonymousChat (...args: unknown[]): unknown;
|
||||
switchAnonymousChat (arg1: string, arg2: boolean): unknown;
|
||||
|
||||
renameAnonyChatNick (...args: unknown[]): unknown;
|
||||
renameAnonyChatNick (arg: unknown): unknown;
|
||||
|
||||
getAnonymousInfo (...args: unknown[]): unknown;
|
||||
getAnonymousInfo (peer: Peer): unknown;
|
||||
|
||||
updateAnonymousInfo (...args: unknown[]): unknown;
|
||||
updateAnonymousInfo (peer: Peer, arg2: unknown): unknown;
|
||||
|
||||
sendSummonMsg (peer: Peer, MsgElement: unknown, MsgAttributeInfo: unknown): Promise<unknown>;// 频道的东西
|
||||
|
||||
outputGuildUnreadInfo (...args: unknown[]): unknown;
|
||||
outputGuildUnreadInfo (arg: unknown): unknown;
|
||||
|
||||
checkMsgWithUrl (...args: unknown[]): unknown;
|
||||
checkMsgWithUrl (arg: unknown): unknown;
|
||||
|
||||
checkTabListStatus (...args: unknown[]): unknown;
|
||||
checkTabListStatus (): unknown;
|
||||
|
||||
getABatchOfContactMsgBoxInfo (...args: unknown[]): unknown;
|
||||
getABatchOfContactMsgBoxInfo (arg: unknown): unknown;
|
||||
|
||||
insertMsgToMsgBox (peer: Peer, msgId: string, arg: 2006): unknown;
|
||||
|
||||
isHitEmojiKeyword (...args: unknown[]): unknown;
|
||||
isHitEmojiKeyword (arg: unknown): unknown;
|
||||
|
||||
getKeyWordRelatedEmoji (...args: unknown[]): unknown;
|
||||
getKeyWordRelatedEmoji (arg: unknown): unknown;
|
||||
|
||||
recordEmoji (...args: unknown[]): unknown;
|
||||
recordEmoji (type: number, emojiList: Array<unknown>): unknown;
|
||||
|
||||
fetchGetHitEmotionsByWord (args: unknown): Promise<unknown>;// 表情推荐?
|
||||
|
||||
deleteAllRoamMsgs (...args: unknown[]): unknown;// 漫游消息?
|
||||
deleteAllRoamMsgs (arg1: number, arg2: string): unknown;// 漫游消息?
|
||||
|
||||
packRedBag (...args: unknown[]): unknown;
|
||||
packRedBag (arg: unknown): unknown;
|
||||
|
||||
grabRedBag (...args: unknown[]): unknown;
|
||||
grabRedBag (arg: unknown): unknown;
|
||||
|
||||
pullDetail (...args: unknown[]): unknown;
|
||||
pullDetail (arg: unknown): unknown;
|
||||
|
||||
selectPasswordRedBag (...args: unknown[]): unknown;
|
||||
selectPasswordRedBag (arg: unknown): unknown;
|
||||
|
||||
pullRedBagPasswordList (...args: unknown[]): unknown;
|
||||
pullRedBagPasswordList (): unknown;
|
||||
|
||||
requestTianshuAdv (...args: unknown[]): unknown;
|
||||
requestTianshuAdv (arg: unknown): unknown;
|
||||
|
||||
tianshuReport (...args: unknown[]): unknown;
|
||||
tianshuReport (arg: unknown): unknown;
|
||||
|
||||
tianshuMultiReport (...args: unknown[]): unknown;
|
||||
tianshuMultiReport (arg: unknown): unknown;
|
||||
|
||||
GetMsgSubType (a0: number, a1: number): unknown;
|
||||
|
||||
setIKernelPublicAccountAdapter (...args: unknown[]): unknown;
|
||||
setIKernelPublicAccountAdapter (arg: unknown): unknown;
|
||||
|
||||
// tempChatGameSession有关
|
||||
createUidFromTinyId (fromTinyId: string, toTinyId: string): string;
|
||||
|
||||
dataMigrationGetDataAvaiableContactList (...args: unknown[]): unknown;
|
||||
dataMigrationGetDataAvaiableContactList (): unknown;
|
||||
|
||||
dataMigrationGetMsgList (...args: unknown[]): unknown;
|
||||
dataMigrationGetMsgList (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
dataMigrationStopOperation (...args: unknown[]): unknown;
|
||||
dataMigrationStopOperation (arg: unknown): unknown;
|
||||
|
||||
dataMigrationImportMsgPbRecord (DataMigrationMsgInfo: Array<{
|
||||
extensionData: string;// "Hex"
|
||||
@@ -687,47 +688,46 @@ export interface NodeIKernelMsgService {
|
||||
msgSeq: string;
|
||||
msgRandom: string;
|
||||
}>, DataMigrationResourceInfo: {
|
||||
extraData: string;
|
||||
filePath: string;
|
||||
fileSize: string;
|
||||
msgRandom: string;
|
||||
msgSeq: string;
|
||||
msgSubType: number;
|
||||
msgType: number;
|
||||
}): unknown;
|
||||
extraData: string;
|
||||
filePath: string;
|
||||
fileSize: string;
|
||||
msgRandom: string;
|
||||
msgSeq: string;
|
||||
msgSubType: number;
|
||||
msgType: number;
|
||||
}): unknown;
|
||||
|
||||
dataMigrationGetResourceLocalDestinyPath (...args: unknown[]): unknown;
|
||||
dataMigrationGetResourceLocalDestinyPath (arg: unknown): unknown;
|
||||
|
||||
dataMigrationSetIOSPathPrefix (...args: unknown[]): unknown;
|
||||
dataMigrationSetIOSPathPrefix (arg: unknown): unknown;
|
||||
|
||||
getServiceAssistantSwitch (...args: unknown[]): unknown;
|
||||
getServiceAssistantSwitch (arg: unknown): unknown;
|
||||
|
||||
setServiceAssistantSwitch (...args: unknown[]): unknown;
|
||||
setServiceAssistantSwitch (arg: unknown): unknown;
|
||||
|
||||
setSubscribeFolderUsingSmallRedPoint (...args: unknown[]): unknown;
|
||||
setSubscribeFolderUsingSmallRedPoint (arg: unknown): unknown;
|
||||
|
||||
clearGuildNoticeRedPoint (...args: unknown[]): unknown;
|
||||
clearGuildNoticeRedPoint (arg: unknown): unknown;
|
||||
|
||||
clearFeedNoticeRedPoint (...args: unknown[]): unknown;
|
||||
clearFeedNoticeRedPoint (arg: unknown): unknown;
|
||||
|
||||
clearFeedSquareRead (...args: unknown[]): unknown;
|
||||
clearFeedSquareRead (arg: unknown): unknown;
|
||||
|
||||
IsC2CStyleChatType (...args: unknown[]): unknown;
|
||||
IsC2CStyleChatType (chatType: unknown): unknown;
|
||||
|
||||
IsTempChatType (uin: number): unknown;// 猜的
|
||||
|
||||
getGuildInteractiveNotification (...args: unknown[]): unknown;
|
||||
getGuildInteractiveNotification (arg: unknown): unknown;
|
||||
|
||||
getGuildNotificationAbstract (...args: unknown[]): unknown;
|
||||
getGuildNotificationAbstract (arg: unknown): unknown;
|
||||
|
||||
setFocusOnBase (...args: unknown[]): unknown;
|
||||
setFocusOnBase (arg: unknown): unknown;
|
||||
|
||||
queryArkInfo (...args: unknown[]): unknown;
|
||||
queryArkInfo (arg: unknown): unknown;
|
||||
|
||||
queryUserSecQuality (...args: unknown[]): unknown;
|
||||
queryUserSecQuality (): unknown;
|
||||
|
||||
getGuildMsgAbFlag (...args: unknown[]): unknown;
|
||||
getGuildMsgAbFlag (arg: unknown): unknown;
|
||||
|
||||
getGroupMsgStorageTime (): unknown;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
export interface NodeIKernelNearbyProService {
|
||||
addKernelNearbyProListener (listener: unknown): number;
|
||||
|
||||
removeKernelNearbyProListener (listenerId: number): void;
|
||||
|
||||
fetchNearbyProUserInfo (arg1: unknown[], arg2: unknown, arg3: boolean): unknown;
|
||||
|
||||
setCommonExtInfo (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -14,4 +14,118 @@ export interface NodeIKernelNodeMiscService {
|
||||
startNewMiniApp (appfile: string, params: string): unknown;
|
||||
|
||||
getQimei36WithNewSdk (): Promise<string>;
|
||||
|
||||
adaptMiniAppShareInfo (arg: unknown): unknown;
|
||||
|
||||
addBind (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
changeSendKey (arg: unknown): unknown;
|
||||
|
||||
checkIfHaveAvailableSidecarDevice (arg: unknown): unknown;
|
||||
|
||||
clearQzoneUnreadCount (arg: unknown): unknown;
|
||||
|
||||
clearQzoneUnreadCountWithRedDot (arg: unknown): unknown;
|
||||
|
||||
closeWXMiniApp (arg: unknown): unknown;
|
||||
|
||||
delBind (arg: unknown): unknown;
|
||||
|
||||
deleteShareFile (arg: unknown): unknown;
|
||||
|
||||
dispatchWmpfEvent (arg: unknown): unknown;
|
||||
|
||||
doAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
doPostAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
downloadMiniApp (arg: unknown): unknown;
|
||||
|
||||
downloadMiniGame (arg: unknown): unknown;
|
||||
|
||||
encodeAES (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
flashWindowInTaskbar (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getAppLaunchInfo (arg: unknown): unknown;
|
||||
|
||||
getCurWindowInfo (arg: unknown): unknown;
|
||||
|
||||
getCurWindowInfoExceptList (arg: unknown): unknown;
|
||||
|
||||
getMiniGameV2EngineConfig (arg: unknown): unknown;
|
||||
|
||||
getMyAppList (arg: unknown): unknown;
|
||||
|
||||
getOpenAuth (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getQQlevelInfo (arg: unknown): unknown;
|
||||
|
||||
getQzoneUnreadCount (arg: unknown): unknown;
|
||||
|
||||
installApp (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
isAppInstalled (arg: unknown): unknown;
|
||||
|
||||
isOldQQRunning (arg: unknown): unknown;
|
||||
|
||||
judgeTimingRequest (arg: unknown): unknown;
|
||||
|
||||
listenWindowEvents (arg: unknown): unknown;
|
||||
|
||||
loginWXMiniApp (arg: unknown): unknown;
|
||||
|
||||
openFileAndDirSelectDlg (arg: unknown): unknown;
|
||||
|
||||
prefetch (arg: unknown): unknown;
|
||||
|
||||
qqConnectBatchShare (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
qqConnectShare (arg: unknown): unknown;
|
||||
|
||||
qqConnectShareCheck (arg: unknown): unknown;
|
||||
|
||||
registerSchemes (arg: unknown): unknown;
|
||||
|
||||
registerScreenCaptureShortcutWithKeycode (arg: unknown): unknown;
|
||||
|
||||
registerScreenRecordShortcutWithKeycode (arg: unknown): unknown;
|
||||
|
||||
removeQuarantineAttribute (arg: unknown): unknown;
|
||||
|
||||
reportExecuteRequest (arg: unknown): unknown;
|
||||
|
||||
scanQBar (arg: unknown): unknown;
|
||||
|
||||
sendMessageResponseToWX (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
sendRequestToApiGateway (arg: unknown): unknown;
|
||||
|
||||
sendWXCustomMenuClickedAction (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setBackgroudWindowLevel (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setMiniGameVersion (arg: unknown): unknown;
|
||||
|
||||
setVulkanEnable (arg: unknown): unknown;
|
||||
|
||||
setWindowLevelNT (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setWindowsMenuInstallStatus (arg: unknown): unknown;
|
||||
|
||||
setWXCustomMenuConfig (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
startNewApp (arg: unknown): unknown;
|
||||
|
||||
startScreenCapture (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
stopFlashWindow (arg: unknown): unknown;
|
||||
|
||||
unlistenWindowEvents (arg: unknown): unknown;
|
||||
|
||||
unregisterHotkey (arg: unknown): unknown;
|
||||
|
||||
writeBitmapToClipboard (arg: unknown): unknown;
|
||||
|
||||
writeClipboard (arg1: unknown, arg2: unknown): unknown;
|
||||
}
|
||||
@@ -1,36 +1,29 @@
|
||||
export interface NodeIKernelOnlineStatusService {
|
||||
|
||||
addKernelOnlineStatusListener(listener: unknown): number;
|
||||
addKernelOnlineStatusListener (listener: unknown): number;
|
||||
|
||||
removeKernelOnlineStatusListener(listenerId: number): void;
|
||||
removeKernelOnlineStatusListener (listenerId: number): void;
|
||||
|
||||
getShouldShowAIOStatusAnimation(arg: unknown): unknown;
|
||||
getShouldShowAIOStatusAnimation (arg: unknown): unknown;
|
||||
|
||||
setReadLikeList(arg: unknown): unknown;
|
||||
setReadLikeList (arg: unknown): unknown;
|
||||
|
||||
getLikeList(arg: unknown): unknown;
|
||||
getLikeList (arg: unknown): Promise<unknown>;
|
||||
|
||||
setLikeStatus(arg: unknown): unknown;
|
||||
setLikeStatus (arg: unknown): Promise<unknown>;
|
||||
|
||||
getAggregationPageEntrance(): unknown;
|
||||
setOnlineStatusLiteBusinessSwitch (enabled: boolean): void;
|
||||
|
||||
didClickAggregationPageEntrance(): unknown;
|
||||
getAggregationPageEntrance (): unknown;
|
||||
|
||||
getAggregationGroupModels(): unknown;
|
||||
didClickAggregationPageEntrance (): unknown;
|
||||
|
||||
// {
|
||||
// "businessType": 1,
|
||||
// "uins": [
|
||||
// "1627126029",
|
||||
// "66600000",
|
||||
// "71702575"
|
||||
// ]
|
||||
// }
|
||||
getAggregationGroupModels (): unknown;
|
||||
|
||||
checkLikeStatus(param: {
|
||||
checkLikeStatus (param: {
|
||||
businessType: number,
|
||||
uins: string[]
|
||||
uins: string[];
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
export interface NodeIKernelPersonalAlbumService {
|
||||
addAlbumPermissions (arg: unknown): unknown;
|
||||
|
||||
addComment (arg: unknown): unknown;
|
||||
|
||||
addReply (arg: unknown): unknown;
|
||||
|
||||
createAlbum (arg: unknown): unknown;
|
||||
|
||||
delBatchPhoto (arg: unknown): unknown;
|
||||
|
||||
deleteAlbum (arg: unknown): unknown;
|
||||
|
||||
deleteComment (arg: unknown): unknown;
|
||||
|
||||
deleteReply (arg: unknown): unknown;
|
||||
|
||||
doLike (arg: unknown): unknown;
|
||||
|
||||
editAlbum (arg: unknown): unknown;
|
||||
|
||||
editTravelAlbumScence (arg: unknown): unknown;
|
||||
|
||||
forwardAlbumToQzone (arg: unknown): unknown;
|
||||
|
||||
getAlbumInviteJoinPage (arg: unknown): unknown;
|
||||
|
||||
getAlbumJoinApprovalPage (arg: unknown): unknown;
|
||||
|
||||
getAlbumList (arg: unknown): unknown;
|
||||
|
||||
getAlbumMemberList (arg: unknown): unknown;
|
||||
|
||||
getCommentList (arg: unknown): unknown;
|
||||
|
||||
getLayerTailpageRecommend (arg: unknown): unknown;
|
||||
|
||||
getPhotoList (arg: unknown): unknown;
|
||||
|
||||
getPhotoListByTimeLine (arg: unknown): unknown;
|
||||
|
||||
getPhotoTabByTimeLine (arg: unknown): unknown;
|
||||
|
||||
getShareInfo (arg: unknown): unknown;
|
||||
|
||||
getVideoTabByTimeLine (arg: unknown): unknown;
|
||||
|
||||
inviteCheckForLoversAlbum (arg: unknown): unknown;
|
||||
|
||||
joinShareAlbum (arg: unknown): unknown;
|
||||
|
||||
moveBatchPhoto (arg: unknown): unknown;
|
||||
|
||||
queryAlbum (arg: unknown): unknown;
|
||||
|
||||
quitSharedAlbum (arg: unknown): unknown;
|
||||
|
||||
removeAlbumMember (arg: unknown): unknown;
|
||||
|
||||
respondToJoinRequest (arg: unknown): unknown;
|
||||
|
||||
sendAlbumInvitation (arg: unknown): unknown;
|
||||
|
||||
setAlbumServiceInfo (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
setTopAlbum (arg: unknown): unknown;
|
||||
|
||||
unLike (arg: unknown): unknown;
|
||||
|
||||
updateAlbumMember (arg: unknown): unknown;
|
||||
|
||||
verifyAlbumQuestion (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -1,37 +1,37 @@
|
||||
import { BuddyProfileLikeReq, GeneralCallResult, NTVoteInfo } from '@/napcat-core/index';
|
||||
|
||||
export interface NodeIKernelProfileLikeService {
|
||||
addKernelProfileLikeListener(listener: unknown): number;
|
||||
addKernelProfileLikeListener (listener: unknown): number;
|
||||
|
||||
removeKernelProfileLikeListener(listenerId: unknown): void;
|
||||
removeKernelProfileLikeListener (listenerId: number): void;
|
||||
|
||||
setBuddyProfileLike(...args: unknown[]): { result: number, errMsg: string, succCounts: number };
|
||||
setBuddyProfileLike (arg: unknown): Promise<{ result: number, errMsg: string, succCounts: number; }>;
|
||||
|
||||
getBuddyProfileLike(req: BuddyProfileLikeReq): Promise<GeneralCallResult & {
|
||||
getBuddyProfileLike (req: BuddyProfileLikeReq): Promise<GeneralCallResult & {
|
||||
info: {
|
||||
userLikeInfos: Array<{
|
||||
uid: string,
|
||||
time: string,
|
||||
favoriteInfo: {
|
||||
userInfos: Array<NTVoteInfo>, // 哪些人点我
|
||||
userInfos: Array<NTVoteInfo>,
|
||||
total_count: number,
|
||||
last_time: number,
|
||||
today_count: number
|
||||
today_count: number;
|
||||
},
|
||||
voteInfo: {
|
||||
total_count: number,
|
||||
new_count: number,
|
||||
new_nearby_count: number,
|
||||
last_visit_time: number,
|
||||
userInfos: Array<NTVoteInfo>, // 点过哪些人
|
||||
}
|
||||
userInfos: Array<NTVoteInfo>;
|
||||
};
|
||||
}>,
|
||||
friendMaxVotes: number,
|
||||
start: number
|
||||
}
|
||||
start: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
getProfileLikeScidResourceInfo(...args: unknown[]): void;
|
||||
getProfileLikeScidResourceInfo (arg: unknown): void;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -3,80 +3,94 @@ import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, ProfileBizType
|
||||
import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
|
||||
export interface NodeIKernelProfileService {
|
||||
getOtherFlag(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
getOtherFlag (callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getVasInfo(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
getVasInfo (callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getRelationFlag(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
getRelationFlag (callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getUidByUin(callfrom: string, uin: Array<string>): Map<string, string>;
|
||||
getUidByUin (callfrom: string, uin: Array<string>): Map<string, string>;
|
||||
|
||||
getUinByUid(callfrom: string, uid: Array<string>): Map<string, string>;
|
||||
getUinByUid (callfrom: string, uid: Array<string>): Map<string, string>;
|
||||
|
||||
getCoreAndBaseInfo(callfrom: string, uids: string[]): Promise<Map<string, SimpleInfo>>;
|
||||
getCoreAndBaseInfo (callfrom: string, uids: string[]): Promise<Map<string, SimpleInfo>>;
|
||||
|
||||
fetchUserDetailInfo(trace: string, uids: string[], source: UserDetailSource, bizType: ProfileBizType[]): Promise<GeneralCallResult &
|
||||
{
|
||||
source: UserDetailSource,
|
||||
// uid -> detail
|
||||
detail: Map<string, UserDetailInfoListenerArg>,
|
||||
}
|
||||
>;
|
||||
fetchUserDetailInfo (trace: string, uids: string[], source: UserDetailSource, bizType: ProfileBizType[]): Promise<GeneralCallResult &
|
||||
{
|
||||
source: UserDetailSource,
|
||||
// uid -> detail
|
||||
detail: Map<string, UserDetailInfoListenerArg>,
|
||||
}
|
||||
>;
|
||||
|
||||
addKernelProfileListener(listener: NodeIKernelProfileListener): number;
|
||||
addKernelProfileListener (listener: NodeIKernelProfileListener): number;
|
||||
|
||||
removeKernelProfileListener(listenerId: number): void;
|
||||
removeKernelProfileListener (listenerId: number): void;
|
||||
|
||||
prepareRegionConfig(...args: unknown[]): unknown;
|
||||
prepareRegionConfig (): unknown;
|
||||
|
||||
getLocalStrangerRemark(): Promise<AnyCnameRecord>;
|
||||
getLocalStrangerRemark (): Promise<AnyCnameRecord>;
|
||||
|
||||
enumCountryOptions(): Array<string>;
|
||||
enumCountryOptions (): Array<string>;
|
||||
|
||||
enumProvinceOptions(country: string): Array<string>;
|
||||
enumProvinceOptions (country: string): Array<string>;
|
||||
|
||||
enumCityOptions(country: string, province: string): unknown;
|
||||
enumCityOptions (country: string, province: string): unknown;
|
||||
|
||||
enumAreaOptions(...args: unknown[]): unknown;
|
||||
enumAreaOptions (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
modifySelfProfile(...args: unknown[]): Promise<unknown>;
|
||||
modifySelfProfile (param: unknown): Promise<unknown>;
|
||||
|
||||
modifyDesktopMiniProfile(param: ModifyProfileParams): Promise<GeneralCallResult>;
|
||||
modifyDesktopMiniProfile (param: ModifyProfileParams): Promise<GeneralCallResult>;
|
||||
|
||||
setNickName(nickName: string): Promise<unknown>;
|
||||
setNickName (nickName: string): Promise<unknown>;
|
||||
|
||||
setLongNick(longNick: string): Promise<unknown>;
|
||||
setLongNick (longNick: string): Promise<unknown>;
|
||||
|
||||
setBirthday(...args: unknown[]): Promise<unknown>;
|
||||
setBirthday (year: number, month: number, day: number): Promise<unknown>;
|
||||
|
||||
setGander(...args: unknown[]): Promise<unknown>;
|
||||
setGander (gender: unknown): Promise<unknown>;
|
||||
|
||||
setHeader(arg: string): Promise<GeneralCallResult>;
|
||||
setHeader (arg: string): Promise<GeneralCallResult>;
|
||||
|
||||
setRecommendImgFlag(...args: unknown[]): Promise<unknown>;
|
||||
setRecommendImgFlag (flag: unknown): Promise<unknown>;
|
||||
|
||||
getUserSimpleInfo(force: boolean, uids: string[]): Promise<unknown>;
|
||||
getUserSimpleInfo (force: boolean, uids: string[]): Promise<unknown>;
|
||||
|
||||
getUserDetailInfo(uid: string): Promise<unknown>;
|
||||
getUserDetailInfo (uid: string): Promise<unknown>;
|
||||
|
||||
getUserDetailInfoWithBizInfo(uid: string, Biz: BizKey[]): Promise<GeneralCallResult>;
|
||||
getUserDetailInfoWithBizInfo (uid: string, Biz: BizKey[]): Promise<GeneralCallResult>;
|
||||
|
||||
getUserDetailInfoByUin(uin: string): Promise<UserDetailInfoByUin>;
|
||||
getUserDetailInfoByUin (uin: string): Promise<UserDetailInfoByUin>;
|
||||
|
||||
getZplanAvatarInfos(args: string[]): Promise<unknown>;
|
||||
getZplanAvatarInfos (args: string[]): Promise<unknown>;
|
||||
|
||||
getStatus(uid: string): Promise<unknown>;
|
||||
getStatus (uid: string): Promise<unknown>;
|
||||
|
||||
startStatusPolling(isForceReset: boolean): Promise<unknown>;
|
||||
startStatusPolling (isForceReset: boolean): Promise<unknown>;
|
||||
|
||||
getSelfStatus(): Promise<unknown>;
|
||||
getSelfStatus (): Promise<unknown>;
|
||||
|
||||
setdisableEmojiShortCuts(...args: unknown[]): unknown;
|
||||
setdisableEmojiShortCuts (arg: unknown): unknown;
|
||||
|
||||
getProfileQzonePicInfo(uid: string, type: number, force: boolean): Promise<unknown>;
|
||||
getProfileQzonePicInfo (uid: string, type: number, force: boolean): Promise<unknown>;
|
||||
|
||||
// UserRemarkServiceImpl::getStrangerRemarkByUid []
|
||||
getCoreInfo(sceneId: string, arg: unknown[]): unknown;
|
||||
getCoreInfo (sceneId: string, arg: unknown[]): unknown;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
|
||||
addKernelProfileListenerForUICache (listener: unknown): number;
|
||||
|
||||
asyncGetCoreInfo (callfrom: string, uids: string[]): unknown;
|
||||
|
||||
getIntimate (uid: string, arg: unknown): unknown;
|
||||
|
||||
getStatusInfo (uid: string, arg: unknown): unknown;
|
||||
|
||||
getStockLocalData (key: string, arg: unknown): unknown;
|
||||
|
||||
updateProfileData (uid: string, data: unknown): unknown;
|
||||
|
||||
updateStockLocalData (key: string, data: unknown): unknown;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface NodeIKernelPublicAccountService {
|
||||
addListener (listener: unknown): number;
|
||||
|
||||
removeListener (listenerId: number): void;
|
||||
|
||||
follow (arg: unknown): unknown;
|
||||
|
||||
queryTemplateInfo (arg: unknown): unknown;
|
||||
|
||||
subscribeTemplate (arg: unknown): unknown;
|
||||
|
||||
unfollow (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
export interface NodeIKernelQQPlayService {
|
||||
addKernelQQPlayListener (listener: unknown): number;
|
||||
|
||||
removeKernelQQPlayListener (listenerId: number): void;
|
||||
|
||||
createLnkShortcut (arg1: string, arg2: string, arg3: string, arg4: string): unknown;
|
||||
|
||||
getSystemRegValue (arg1: number, arg2: string, arg3: string): unknown;
|
||||
|
||||
setSystemRegValue (arg1: number, arg2: string, arg3: string, arg4: string): unknown;
|
||||
|
||||
sendMsg2Simulator (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setForegroundWindow (arg: unknown): unknown;
|
||||
|
||||
startSimulator (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export interface NodeIKernelQiDianService {
|
||||
addKernelQiDianListener (listener: unknown): number;
|
||||
|
||||
removeKernelQiDianListener (listenerId: number): void;
|
||||
|
||||
requestExtUinForRemoteControl (arg1: string, arg2: string, arg3: number): unknown;
|
||||
|
||||
requestMainUinForRemoteControl (arg: unknown): unknown;
|
||||
|
||||
requestNaviConfig (arg: unknown): unknown;
|
||||
|
||||
requestQidianUidFromUin (arg: unknown): unknown;
|
||||
|
||||
requestWpaCorpInfo (arg: unknown): unknown;
|
||||
|
||||
requestWpaSigT (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
requestWpaUserInfo (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
export interface NodeIKernelRDeliveryService {
|
||||
addDataChangeListener (listener: unknown): number;
|
||||
|
||||
removeDataChangeListener (listenerId: number): void;
|
||||
|
||||
getRDeliveryDataByKey (arg: unknown): unknown;
|
||||
|
||||
requestBatchRemoteDataByScene (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
requestSingleRemoteDataByKey (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -4,17 +4,19 @@ import { GeneralCallResult } from '@/napcat-core/services/common';
|
||||
import { FSABRecentContactParams } from '@/napcat-core/types/contact';
|
||||
|
||||
export interface NodeIKernelRecentContactService {
|
||||
setGuildDisplayStatus(...args: unknown[]): unknown; // 2 arguments
|
||||
setGuildDisplayStatus (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setContactListTop(...args: unknown[]): unknown; // 2 arguments
|
||||
setContactListTop (peer: Peer, isTop: boolean): unknown;
|
||||
|
||||
updateRecentContactExtBufForUI(...args: unknown[]): unknown; // 2 arguments
|
||||
updateRecentContactExtBufForUI (peer: Peer, extBuf: unknown): unknown;
|
||||
|
||||
upsertRecentContactManually(...args: unknown[]): unknown; // 1 arguments
|
||||
upsertRecentContactManually (arg: unknown): unknown;
|
||||
|
||||
enterOrExitMsgList(...args: unknown[]): unknown; // 1 arguments
|
||||
manageContactMergeWindow (arg: unknown): unknown;
|
||||
|
||||
getRecentContactListSnapShot(count: number): Promise<GeneralCallResult & {
|
||||
enterOrExitMsgList (arg: unknown): unknown;
|
||||
|
||||
getRecentContactListSnapShot (count: number): Promise<GeneralCallResult & {
|
||||
info: {
|
||||
errCode: number,
|
||||
errMsg: string,
|
||||
@@ -28,56 +30,56 @@ export interface NodeIKernelRecentContactService {
|
||||
peerUin: string,
|
||||
msgTime: string,
|
||||
chatType: ChatType,
|
||||
msgId: string
|
||||
}>
|
||||
}
|
||||
}>; // 1 arguments
|
||||
msgId: string;
|
||||
}>;
|
||||
};
|
||||
}>;
|
||||
|
||||
clearMsgUnreadCount(...args: unknown[]): unknown; // 1 arguments
|
||||
clearMsgUnreadCount (peer: Peer): unknown;
|
||||
|
||||
getRecentContactListSyncLimit(count: number): unknown;
|
||||
getRecentContactListSyncLimit (count: number): unknown;
|
||||
|
||||
jumpToSpecifyRecentContact(...args: unknown[]): unknown; // 1 arguments
|
||||
jumpToSpecifyRecentContact (arg: unknown): unknown;
|
||||
|
||||
fetchAndSubscribeABatchOfRecentContact(params: FSABRecentContactParams): unknown; // 1 arguments
|
||||
fetchAndSubscribeABatchOfRecentContact (params: FSABRecentContactParams): unknown;
|
||||
|
||||
addRecentContact(peer: Peer): unknown;
|
||||
addRecentContact (peer: Peer): unknown;
|
||||
|
||||
deleteRecentContacts(peer: Peer): unknown; // 猜测
|
||||
deleteRecentContacts (peer: Peer): unknown;
|
||||
|
||||
getContacts(peers: Peer[]): Promise<unknown>;
|
||||
getContacts (peers: Peer[]): Promise<unknown>;
|
||||
|
||||
setThirdPartyBusinessInfos(...args: unknown[]): unknown; // 1 arguments
|
||||
setThirdPartyBusinessInfos (arg: unknown): unknown;
|
||||
|
||||
updateGameMsgConfigs(...args: unknown[]): unknown; // 1 arguments
|
||||
updateGameMsgConfigs (arg: unknown): unknown;
|
||||
|
||||
removeKernelRecentContactListener(listenerid: number): unknown; // 1 arguments
|
||||
removeKernelRecentContactListener (listenerId: number): unknown;
|
||||
|
||||
addKernelRecentContactListener(listener: NodeIKernelRecentContactListener): void;
|
||||
addKernelRecentContactListener (listener: NodeIKernelRecentContactListener): void;
|
||||
|
||||
clearRecentContactsByChatType(...args: unknown[]): unknown; // 1 arguments
|
||||
clearRecentContactsByChatType (chatType: ChatType): unknown;
|
||||
|
||||
upInsertModule(...args: unknown[]): unknown; // 1 arguments
|
||||
upInsertModule (arg: unknown): unknown;
|
||||
|
||||
jumpToSpecifyRecentContactVer2(...args: unknown[]): unknown; // 1 arguments
|
||||
jumpToSpecifyRecentContactVer2 (arg: unknown): unknown;
|
||||
|
||||
deleteRecentContactsVer2(...args: unknown[]): unknown; // 1 arguments
|
||||
deleteRecentContactsVer2 (arg: unknown): unknown;
|
||||
|
||||
getRecentContactList(): Promise<unknown>;
|
||||
getRecentContactList (): Promise<unknown>;
|
||||
|
||||
getMsgUnreadCount(): unknown;
|
||||
getMsgUnreadCount (): unknown;
|
||||
|
||||
clearRecentContacts(): unknown;
|
||||
clearRecentContacts (): unknown;
|
||||
|
||||
getServiceAssistantRecentContactInfos(): unknown;
|
||||
getServiceAssistantRecentContactInfos (): unknown;
|
||||
|
||||
getRecentContactInfos(): unknown;
|
||||
getRecentContactInfos (): unknown;
|
||||
|
||||
getUnreadDetailsInfos(): unknown;
|
||||
getUnreadDetailsInfos (): unknown;
|
||||
|
||||
cleanAllModule(): unknown;
|
||||
cleanAllModule (): unknown;
|
||||
|
||||
setAllGameMsgRead(): unknown;
|
||||
setAllGameMsgRead (): unknown;
|
||||
|
||||
getRecentContactListSync(): unknown;
|
||||
getRecentContactListSync (): unknown;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
export interface NodeIKernelRemotingService {
|
||||
addKernelRemotingListener (listener: unknown): number;
|
||||
|
||||
removeKernelRemotingListener (listenerId: number): void;
|
||||
|
||||
accept (arg1: string, arg2: boolean): unknown;
|
||||
|
||||
setPenetrateBuffer (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
startRemotingClient (arg: unknown): unknown;
|
||||
|
||||
startRemotingInvite (arg: unknown): unknown;
|
||||
|
||||
stopRemoting (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ export interface NodeIKernelRichMediaService {
|
||||
// KHAND,
|
||||
// KAUTO
|
||||
// }
|
||||
getVideoPlayUrl(peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, VideoRequestWay: number): Promise<unknown>;
|
||||
getVideoPlayUrl (peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, VideoRequestWay: number): Promise<unknown>;
|
||||
|
||||
// exParams (RMReqExParams)
|
||||
// this.downSourceType = i2;
|
||||
@@ -81,9 +81,9 @@ export interface NodeIKernelRichMediaService {
|
||||
// public static final int KTRIGGERTYPEAUTO = 1;
|
||||
// public static final int KTRIGGERTYPEMANUAL = 0;
|
||||
|
||||
getVideoPlayUrlV2(peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, exParams: {
|
||||
getVideoPlayUrlV2 (peer: Peer, msgId: string, elemId: string, videoCodecFormat: number, exParams: {
|
||||
downSourceType: number,
|
||||
triggerType: number
|
||||
triggerType: number;
|
||||
}): Promise<GeneralCallResult & {
|
||||
urlResult: {
|
||||
v4IpUrl: [],
|
||||
@@ -91,15 +91,15 @@ export interface NodeIKernelRichMediaService {
|
||||
domainUrl: Array<{
|
||||
url: string,
|
||||
isHttps: boolean,
|
||||
httpsDomain: string
|
||||
httpsDomain: string;
|
||||
}>,
|
||||
videoCodecFormat: number
|
||||
}
|
||||
videoCodecFormat: number;
|
||||
};
|
||||
}>;
|
||||
|
||||
getRichMediaFileDir(elementType: number, downType: number, isTemp: boolean): unknown;
|
||||
getRichMediaFileDir (elementType: number, downType: number, isTemp: boolean): unknown;
|
||||
|
||||
getVideoPlayUrlInVisit(arg: {
|
||||
getVideoPlayUrlInVisit (arg: {
|
||||
downloadType: number,
|
||||
thumbSize: number,
|
||||
msgId: string,
|
||||
@@ -111,17 +111,17 @@ export interface NodeIKernelRichMediaService {
|
||||
peerUid: string,
|
||||
guildId: string,
|
||||
ele: MessageElement,
|
||||
useHttps: boolean
|
||||
useHttps: boolean;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isFileExpired(arg: number): unknown;
|
||||
isFileExpired (arg: number): unknown;
|
||||
|
||||
deleteGroupFolder(GroupCode: string, FolderId: string): Promise<GeneralCallResult & {
|
||||
groupFileCommonResult: { retCode: number, retMsg: string, clientWording: string }
|
||||
deleteGroupFolder (GroupCode: string, FolderId: string): Promise<GeneralCallResult & {
|
||||
groupFileCommonResult: { retCode: number, retMsg: string, clientWording: string; };
|
||||
}>;
|
||||
|
||||
// 参数与getVideoPlayUrlInVisit一样
|
||||
downloadRichMediaInVisit(arg: {
|
||||
downloadRichMediaInVisit (arg: {
|
||||
downloadType: number,
|
||||
thumbSize: number,
|
||||
msgId: string,
|
||||
@@ -133,10 +133,10 @@ export interface NodeIKernelRichMediaService {
|
||||
peerUid: string,
|
||||
guildId: string,
|
||||
ele: MessageElement,
|
||||
useHttps: boolean
|
||||
useHttps: boolean;
|
||||
}): unknown;
|
||||
|
||||
downloadFileForModelId(peer: Peer, ModelId: string[], unknown: string): Promise<unknown>;
|
||||
downloadFileForModelId (peer: Peer, ModelId: string[], unknown: string): Promise<unknown>;
|
||||
|
||||
// 第三个参数 Array<Type>
|
||||
// this.fileId = "";
|
||||
@@ -146,83 +146,83 @@ export interface NodeIKernelRichMediaService {
|
||||
// this.fileSize = j2;
|
||||
// this.fileModelId = j3;
|
||||
|
||||
downloadFileForFileUuid(peer: Peer, uuid: string, arg3: {
|
||||
downloadFileForFileUuid (peer: Peer, uuid: string, arg3: {
|
||||
fileId: string,
|
||||
fileName: string,
|
||||
fileSize: string,
|
||||
fileModelId: string
|
||||
fileModelId: string;
|
||||
}[]): Promise<unknown>;
|
||||
|
||||
downloadFileByUrlList(fileDownloadTyp: UrlFileDownloadType, urlList: Array<string>): unknown;
|
||||
downloadFileByUrlList (fileDownloadTyp: UrlFileDownloadType, urlList: Array<string>): unknown;
|
||||
|
||||
downloadFileForFileInfo(fileInfo: CommonFileInfo[], savePath: string): unknown;
|
||||
downloadFileForFileInfo (fileInfo: CommonFileInfo[], savePath: string): unknown;
|
||||
|
||||
createGroupFolder(GroupCode: string, FolderName: string): Promise<GeneralCallResult & {
|
||||
resultWithGroupItem: { result: unknown, groupItem: Array<unknown> }
|
||||
createGroupFolder (GroupCode: string, FolderName: string): Promise<GeneralCallResult & {
|
||||
resultWithGroupItem: { result: unknown, groupItem: Array<unknown>; };
|
||||
}>;
|
||||
|
||||
downloadFile(commonFile: CommonFileInfo, arg2: unknown, arg3: unknown, savePath: string): unknown;
|
||||
downloadFile (arg1: unknown, arg2: number, arg3: number, arg4: string): unknown;
|
||||
|
||||
createGroupFolder(arg1: unknown, arg2: unknown): unknown;
|
||||
createGroupFolder (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
downloadGroupFolder(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
downloadGroupFolder (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
renameGroupFolder(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
renameGroupFolder (arg1: string, arg2: string, arg3: string): unknown;
|
||||
|
||||
deleteGroupFolder(arg1: unknown, arg2: unknown): unknown;
|
||||
deleteGroupFolder (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
deleteTransferInfo(arg1: unknown, arg2: unknown): unknown;
|
||||
deleteTransferInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
cancelTransferTask(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
cancelTransferTask (arg1: Peer, arg2: Array<unknown>[], arg3: string): unknown;
|
||||
|
||||
cancelUrlDownload(arg: unknown): unknown;
|
||||
cancelUrlDownload (arg: unknown): unknown;
|
||||
|
||||
updateOnlineVideoElemStatus(arg: unknown): unknown;
|
||||
updateOnlineVideoElemStatus (arg: unknown): unknown;
|
||||
|
||||
getGroupSpace(arg: unknown): unknown;
|
||||
getGroupSpace (arg: unknown): unknown;
|
||||
|
||||
getGroupFileList(groupCode: string, params: GetFileListParam): Promise<GeneralCallResult & {
|
||||
getGroupFileList (groupCode: string, params: GetFileListParam): Promise<GeneralCallResult & {
|
||||
groupSpaceResult: {
|
||||
retCode: number
|
||||
retMsg: string
|
||||
clientWording: string
|
||||
totalSpace: number
|
||||
usedSpace: number
|
||||
allUpload: boolean
|
||||
}
|
||||
retCode: number;
|
||||
retMsg: string;
|
||||
clientWording: string;
|
||||
totalSpace: number;
|
||||
usedSpace: number;
|
||||
allUpload: boolean;
|
||||
};
|
||||
}>;
|
||||
|
||||
getGroupFileInfo(arg1: unknown, arg2: unknown): unknown;
|
||||
getGroupFileInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getGroupTransferList(arg1: unknown, arg2: unknown): unknown;
|
||||
getGroupTransferList (arg1: string, arg2: unknown): unknown;
|
||||
|
||||
renameGroupFile(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): unknown;
|
||||
renameGroupFile (arg1: string, arg2: number, arg3: string, arg4: string, arg5: string): unknown;
|
||||
|
||||
moveGroupFile(groupCode: string, busId: Array<number>, fileList: Array<string>, currentParentDirectory: string, targetParentDirectory: string): Promise<GeneralCallResult & {
|
||||
moveGroupFile (groupCode: string, busId: Array<number>, fileList: Array<string>, currentParentDirectory: string, targetParentDirectory: string): Promise<GeneralCallResult & {
|
||||
moveGroupFileResult: {
|
||||
result: {
|
||||
retCode: number,
|
||||
retMsg: symbol,
|
||||
clientWording: string
|
||||
clientWording: string;
|
||||
},
|
||||
successFileIdList: Array<string>,
|
||||
failFileIdList: Array<string>
|
||||
}
|
||||
failFileIdList: Array<string>;
|
||||
};
|
||||
}>;
|
||||
|
||||
transGroupFile(groupCode: string, fileId: string): Promise<GeneralCallResult & {
|
||||
transGroupFile (groupCode: string, fileId: string): Promise<GeneralCallResult & {
|
||||
transGroupFileResult: {
|
||||
result: {
|
||||
retCode: number
|
||||
retMsg: string
|
||||
clientWording: string
|
||||
}
|
||||
saveBusId: number
|
||||
saveFilePath: string
|
||||
}
|
||||
retCode: number;
|
||||
retMsg: string;
|
||||
clientWording: string;
|
||||
};
|
||||
saveBusId: number;
|
||||
saveFilePath: string;
|
||||
};
|
||||
}>;
|
||||
|
||||
searchGroupFile(
|
||||
searchGroupFile (
|
||||
keywords: Array<string>,
|
||||
param: {
|
||||
groupIds: Array<string>,
|
||||
@@ -230,55 +230,57 @@ export interface NodeIKernelRichMediaService {
|
||||
context: string,
|
||||
count: number,
|
||||
sortType: number,
|
||||
groupNames: Array<string>
|
||||
groupNames: Array<string>;
|
||||
}): Promise<unknown>;
|
||||
|
||||
searchGroupFileByWord(arg1: unknown, arg2: unknown, arg3: unknown, arg4: unknown, arg5: unknown): unknown;
|
||||
searchGroupFileByWord (arg1: unknown[], arg2: unknown[], arg3: string, arg4: string, arg5: number): unknown;
|
||||
|
||||
deleteGroupFile(GroupCode: string, params: Array<number>, Files: Array<string>): Promise<GeneralCallResult & {
|
||||
deleteGroupFile (GroupCode: string, params: Array<number>, Files: Array<string>): Promise<GeneralCallResult & {
|
||||
transGroupFileResult: {
|
||||
result: unknown
|
||||
successFileIdList: Array<unknown>
|
||||
failFileIdList: Array<unknown>
|
||||
}
|
||||
result: unknown;
|
||||
successFileIdList: Array<unknown>;
|
||||
failFileIdList: Array<unknown>;
|
||||
};
|
||||
}>;
|
||||
|
||||
translateEnWordToZn(words: string[]): Promise<GeneralCallResult & { words: string[] }>;
|
||||
translateEnWordToZn (words: string[]): Promise<GeneralCallResult & { words: string[]; }>;
|
||||
|
||||
getScreenOCR(path: string): Promise<unknown>;
|
||||
getScreenOCR (path: string): Promise<unknown>;
|
||||
|
||||
batchGetGroupFileCount(Gids: Array<string>): Promise<GeneralCallResult & {
|
||||
batchGetGroupFileCount (Gids: Array<string>): Promise<GeneralCallResult & {
|
||||
groupCodes: Array<string>,
|
||||
groupFileCounts: Array<number>
|
||||
groupFileCounts: Array<number>;
|
||||
}>;
|
||||
|
||||
queryPicDownloadSize(arg: unknown): unknown;
|
||||
queryPicDownloadSize (arg: unknown): unknown;
|
||||
|
||||
searchGroupFile(arg1: unknown, arg2: unknown): unknown;
|
||||
searchGroupFile (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
searchMoreGroupFile(arg: unknown): unknown;
|
||||
searchMoreGroupFile (arg: unknown): unknown;
|
||||
|
||||
cancelSearcheGroupFile(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
cancelSearcheGroupFile (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
onlyDownloadFile(peer: Peer, arg2: unknown, arg3: Array<{
|
||||
fileId: string,
|
||||
fileName: string,
|
||||
fileSize: string,
|
||||
fileModelId: string
|
||||
}
|
||||
>): unknown;
|
||||
onlyDownloadFile (arg1: Peer, arg2: string, arg3: Array<unknown>[]): unknown;
|
||||
|
||||
onlyUploadFile(arg1: unknown, arg2: unknown): unknown;
|
||||
onlyUploadFile (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
isExtraLargePic(arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
isExtraLargePic (arg1: unknown, arg2: unknown, arg3: unknown): unknown;
|
||||
|
||||
uploadRMFileWithoutMsg(arg: {
|
||||
uploadRMFileWithoutMsg (arg: {
|
||||
bizType: RMBizTypeEnum,
|
||||
filePath: string,
|
||||
peerUid: string,
|
||||
transferId: string
|
||||
useNTV2: string
|
||||
transferId: string;
|
||||
useNTV2: string;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
isNull (): boolean;
|
||||
|
||||
getRichMediaCodecInfo (arg: unknown): unknown;
|
||||
|
||||
getScreenOCRWithSourceType (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
imageTranslate (arg1: string, arg2: string, arg3: number): unknown;
|
||||
|
||||
downloadFileByUrl (arg1: number, arg2: string, arg3: boolean): unknown;
|
||||
}
|
||||
@@ -2,47 +2,127 @@ import { NodeIKernelRobotListener } from '@/napcat-core/listeners';
|
||||
import { GeneralCallResult, Peer } from '..';
|
||||
|
||||
export interface NodeIKernelRobotService {
|
||||
fetchGroupRobotStoreDiscovery(arg: unknown): unknown;
|
||||
addKernelRobotListener (listener: NodeIKernelRobotListener): number;
|
||||
|
||||
sendGroupRobotStoreSearch(arg: unknown): unknown;
|
||||
removeKernelRobotListener (listenerId: number): void;
|
||||
|
||||
fetchGroupRobotStoreCategoryList(arg: unknown): unknown;
|
||||
fetchGroupRobotStoreDiscovery (arg: unknown): unknown;
|
||||
|
||||
FetchSubscribeMsgTemplate(arg: unknown): unknown;
|
||||
fetchGroupRobotStoreCategoryList (arg: unknown): unknown;
|
||||
|
||||
FetchSubcribeMsgTemplateStatus(arg: unknown): unknown;
|
||||
FetchSubscribeMsgTemplate (arg: unknown): unknown;
|
||||
|
||||
SubscribeMsgTemplateSet(arg1: unknown, arg2: unknown): unknown;
|
||||
FetchSubcribeMsgTemplateStatus (arg: unknown): unknown;
|
||||
|
||||
fetchRecentUsedRobots(arg: unknown): unknown;
|
||||
SubscribeMsgTemplateSet (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
fetchShareArkInfo(arg: unknown): unknown;
|
||||
fetchRecentUsedRobots (arg: unknown): unknown;
|
||||
|
||||
addKernelRobotListener(Listener: NodeIKernelRobotListener): number;
|
||||
fetchShareArkInfo (arg: unknown): unknown;
|
||||
|
||||
removeKernelRobotListener(ListenerId: number): unknown;
|
||||
getAllRobotFriendsFromCache (): Promise<unknown>;
|
||||
|
||||
getAllRobotFriendsFromCache(): Promise<unknown>;
|
||||
fetchAllRobots (arg1: boolean, arg2: unknown): unknown;
|
||||
|
||||
fetchAllRobots(arg1: unknown, arg2: unknown): unknown;
|
||||
removeAllRecommendCache (): unknown;
|
||||
|
||||
removeAllRecommendCache(): unknown;
|
||||
setRobotPickTts (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
setRobotPickTts(arg1: unknown, arg2: unknown): unknown;
|
||||
getRobotUinRange (data: unknown): Promise<{ response: { robotUinRanges: Array<unknown>; }; }>;
|
||||
|
||||
getRobotUinRange(data: unknown): Promise<{ response: { robotUinRanges: Array<unknown> } }>;
|
||||
|
||||
getRobotFunctions(peer: Peer, params: {
|
||||
getRobotFunctions (peer: Peer, params: {
|
||||
uins: Array<string>,
|
||||
num: 0,
|
||||
client_info: { platform: 4, version: '', build_num: 9999 },
|
||||
client_info: { platform: 4, version: '', build_num: 9999; },
|
||||
tinyids: [],
|
||||
page: 0,
|
||||
full_fetch: false,
|
||||
scene: 4,
|
||||
filter: 1,
|
||||
bkn: ''
|
||||
}): Promise<GeneralCallResult & { response: { bot_features: Array<unknown>, next_page: number } }>;
|
||||
bkn: '';
|
||||
}): Promise<GeneralCallResult & { response: { bot_features: Array<unknown>, next_page: number; }; }>;
|
||||
|
||||
isNull(): boolean;
|
||||
fetchRobotShareLimit (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
updateGroupRobotProfile (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
sendCommonRobotToGuild (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
sendGroupRobotStoreSearch (arg: unknown): unknown;
|
||||
|
||||
fetchMyRobotLists (arg: unknown): unknown;
|
||||
|
||||
batchGetBotsMenu (arg: unknown): unknown;
|
||||
|
||||
fetchAddRobotGroupList (arg: unknown): unknown;
|
||||
|
||||
getGuildRobotList (arg: unknown): unknown;
|
||||
|
||||
querySessionList (arg: unknown): unknown;
|
||||
|
||||
fetchListRobot (arg: unknown): unknown;
|
||||
|
||||
subscribeGuildGlobalRobot (arg: unknown): unknown;
|
||||
|
||||
addGuildRobot (arg: unknown): unknown;
|
||||
|
||||
upMicGuildRobot (arg: unknown): unknown;
|
||||
|
||||
downMicGuildRobot (arg: unknown): unknown;
|
||||
|
||||
getRedDot (arg: unknown): unknown;
|
||||
|
||||
delRedDot (arg: unknown): unknown;
|
||||
|
||||
changeMyBot (arg: unknown): unknown;
|
||||
|
||||
getAudioLiveRobotStatus (arg: unknown): unknown;
|
||||
|
||||
backFlowRobotCoreInfos (arg: unknown): unknown;
|
||||
|
||||
batchFetchRobotCoreInfos (arg: unknown): unknown;
|
||||
|
||||
queryPicRecomQuestions (arg: unknown): unknown;
|
||||
|
||||
delSessionMsgs (arg: unknown): unknown;
|
||||
|
||||
fetchMobileRobotRecommendCards (arg: unknown): unknown;
|
||||
|
||||
saveSelectedAIModelOrOptIds (arg: unknown): unknown;
|
||||
|
||||
setRobotStoryEnter (arg: unknown): unknown;
|
||||
|
||||
aiGenAvatar (arg: unknown): unknown;
|
||||
|
||||
fetchRobotFeatureWithReq (arg: unknown): unknown;
|
||||
|
||||
fetchGroupRobotProfileWithReq (arg: unknown): unknown;
|
||||
|
||||
setAddRobotToGroup (arg: unknown): unknown;
|
||||
|
||||
setRemoveRobotFromGroup (arg: unknown): unknown;
|
||||
|
||||
FetchGroupRobotInfo (arg: unknown): unknown;
|
||||
|
||||
fetchGuildRobotInfo (arg: unknown): unknown;
|
||||
|
||||
aiGenBotInfo (arg: unknown): unknown;
|
||||
|
||||
fetchAiGenTemplateInfo (arg: unknown): unknown;
|
||||
|
||||
fetchShareInfo (arg: unknown): unknown;
|
||||
|
||||
updateShareInfo (arg: unknown): unknown;
|
||||
|
||||
queryGuildGlobalRobotSubscription (arg: unknown): unknown;
|
||||
|
||||
resetConversation (arg: unknown): unknown;
|
||||
|
||||
setGuildRobotPermission (arg: unknown): unknown;
|
||||
|
||||
fetchGuildRobotPermission (arg: unknown): unknown;
|
||||
|
||||
editSession (arg: unknown): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
@@ -3,134 +3,146 @@ import { GeneralCallResult } from './common';
|
||||
|
||||
export interface NodeIKernelSearchService {
|
||||
|
||||
addKernelSearchListener(listener: unknown): number;
|
||||
addKernelSearchListener (listener: unknown): number;
|
||||
|
||||
removeKernelSearchListener(listenerId: number): void;
|
||||
removeKernelSearchListener (listenerId: number): void;
|
||||
|
||||
searchStranger(unknown: string, searchStranger: unknown, searchParams: unknown): Promise<unknown>;
|
||||
searchStranger (keyword: string, searchType: unknown, searchParams: unknown): Promise<unknown>;
|
||||
|
||||
searchGroup(param: {
|
||||
searchGroup (param: {
|
||||
keyWords: string,
|
||||
groupNum: number,
|
||||
exactSearch: boolean,
|
||||
penetrate: string
|
||||
}): Promise<GeneralCallResult>;// needs 1 arguments
|
||||
penetrate: string;
|
||||
}): Promise<GeneralCallResult>;
|
||||
|
||||
searchLocalInfo(keywords: string, type: number/* 4 */): unknown;
|
||||
searchLocalInfo (keywords: string, type: number): unknown;
|
||||
|
||||
cancelSearchLocalInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchLocalInfo (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchBuddyChatInfo(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchBuddyChatInfo (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
searchMoreBuddyChatInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreBuddyChatInfo (arg: unknown): unknown;
|
||||
|
||||
cancelSearchBuddyChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchBuddyChatInfo (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchContact(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchContact (arg1: Array<unknown>[], arg2: unknown): unknown;
|
||||
|
||||
searchMoreContact(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreContact (arg: unknown): unknown;
|
||||
|
||||
cancelSearchContact(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchContact (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchGroupChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
searchGroupChatInfo (arg1: unknown[], arg2: unknown, arg3: number): unknown;
|
||||
|
||||
resetSearchGroupChatInfoSortType(...args: unknown[]): unknown;// needs 3 arguments
|
||||
resetSearchGroupChatInfoSortType (arg1: number, arg2: number, arg3: number): unknown;
|
||||
|
||||
resetSearchGroupChatInfoFilterMembers(...args: unknown[]): unknown;// needs 3 arguments
|
||||
resetSearchGroupChatInfoFilterMembers (arg1: number, arg2: Array<unknown>[], arg3: number): unknown;
|
||||
|
||||
searchMoreGroupChatInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreGroupChatInfo (arg: unknown): unknown;
|
||||
|
||||
cancelSearchGroupChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchGroupChatInfo (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchChatsWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
searchChatsWithKeywords (arg1: unknown[], arg2: number, arg3: number): unknown;
|
||||
|
||||
searchMoreChatsWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreChatsWithKeywords (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatsWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatsWithKeywords (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchChatMsgs(...args: unknown[]): unknown;// needs 2 arguments
|
||||
searchChatMsgs (arg1: Array<unknown>[], arg2: unknown): unknown;
|
||||
|
||||
searchMoreChatMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreChatMsgs (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatMsgs(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatMsgs (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchMsgWithKeywords(keyWords: string[], param: Peer & { searchFields: number, pageLimit: number }): Promise<GeneralCallResult>;
|
||||
searchMsgWithKeywords (keyWords: string[], param: Peer & { searchFields: number, pageLimit: number; }): Promise<GeneralCallResult>;
|
||||
|
||||
searchMoreMsgWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreMsgWithKeywords (arg: unknown): unknown;
|
||||
|
||||
cancelSearchMsgWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchMsgWithKeywords (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchFileWithKeywords(keywords: string[], source: number): Promise<string>;// needs 2 arguments
|
||||
searchFileWithKeywords (keywords: string[], source: number): Promise<string>;
|
||||
|
||||
searchMoreFileWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreFileWithKeywords (arg: unknown): unknown;
|
||||
|
||||
cancelSearchFileWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchFileWithKeywords (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchAtMeChats(...args: unknown[]): unknown;// needs 3 arguments
|
||||
searchFileInFileCenterForPC (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
searchMoreAtMeChats(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreFileInFileCenter (arg: unknown): unknown;
|
||||
|
||||
cancelSearchAtMeChats(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchFileInFileCenter (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchChatAtMeMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchAtMeChats (arg1: boolean, arg2: number, arg3: number): unknown;
|
||||
|
||||
searchMoreChatAtMeMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
searchMoreAtMeChats (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatAtMeMsgs(...args: unknown[]): unknown;// needs 3 arguments
|
||||
cancelSearchAtMeChats (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
addSearchHistory(param: {
|
||||
type: number, // 4
|
||||
searchChatAtMeMsgs (arg: unknown): unknown;
|
||||
|
||||
searchMoreChatAtMeMsgs (arg: unknown): unknown;
|
||||
|
||||
cancelSearchChatAtMeMsgs (arg1: number, arg2: number, arg3: string): unknown;
|
||||
|
||||
searchRobot (arg: unknown): unknown;
|
||||
|
||||
searchCache (arg1: string, arg2: string, arg3: unknown): unknown;
|
||||
|
||||
addSearchHistory (param: {
|
||||
type: number,
|
||||
contactList: [],
|
||||
id: number, // -1
|
||||
id: number,
|
||||
groupInfos: [],
|
||||
msgs: [],
|
||||
fileInfos: [
|
||||
{
|
||||
chatType: ChatType,
|
||||
buddyChatInfo: Array<{ category_name: string, peerUid: string, peerUin: string, remark: string }>,
|
||||
discussChatInfo: [],
|
||||
groupChatInfo: Array<
|
||||
{
|
||||
groupCode: string,
|
||||
isConf: boolean,
|
||||
hasModifyConfGroupFace: boolean,
|
||||
hasModifyConfGroupName: boolean,
|
||||
groupName: string,
|
||||
remark: string
|
||||
}>,
|
||||
dataLineChatInfo: [],
|
||||
tmpChatInfo: [],
|
||||
msgId: string,
|
||||
msgSeq: string,
|
||||
msgTime: string,
|
||||
senderUid: string,
|
||||
senderNick: string,
|
||||
senderRemark: string,
|
||||
senderCard: string,
|
||||
elemId: string,
|
||||
elemType: string, // 3
|
||||
fileSize: string,
|
||||
filePath: string,
|
||||
fileName: string,
|
||||
hits: Array<
|
||||
{
|
||||
start: 12,
|
||||
end: 14
|
||||
}
|
||||
>
|
||||
}
|
||||
]
|
||||
|
||||
fileInfos: Array<{
|
||||
chatType: ChatType,
|
||||
buddyChatInfo: Array<{ category_name: string, peerUid: string, peerUin: string, remark: string; }>,
|
||||
discussChatInfo: [],
|
||||
groupChatInfo: Array<{
|
||||
groupCode: string,
|
||||
isConf: boolean,
|
||||
hasModifyConfGroupFace: boolean,
|
||||
hasModifyConfGroupName: boolean,
|
||||
groupName: string,
|
||||
remark: string;
|
||||
}>,
|
||||
dataLineChatInfo: [],
|
||||
tmpChatInfo: [],
|
||||
msgId: string,
|
||||
msgSeq: string,
|
||||
msgTime: string,
|
||||
senderUid: string,
|
||||
senderNick: string,
|
||||
senderRemark: string,
|
||||
senderCard: string,
|
||||
elemId: string,
|
||||
elemType: string,
|
||||
fileSize: string,
|
||||
filePath: string,
|
||||
fileName: string,
|
||||
hits: Array<{ start: number, end: number; }>;
|
||||
}>;
|
||||
}): Promise<{
|
||||
result: number,
|
||||
errMsg: string,
|
||||
id?: number
|
||||
id?: number;
|
||||
}>;
|
||||
|
||||
removeSearchHistory(...args: unknown[]): unknown;// needs 1 arguments
|
||||
removeSearchHistory (arg: unknown): unknown;
|
||||
|
||||
searchCache(...args: unknown[]): unknown;// needs 3 arguments
|
||||
addOrUpdateSearchMostUseItem (arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
clearSearchCache(...args: unknown[]): unknown;// needs 1 arguments
|
||||
getSearchMostUseItem (arg: unknown): unknown;
|
||||
|
||||
deleteSearchMostUseItem (arg: unknown): unknown;
|
||||
|
||||
deleteGroupHistoryFile (arg: unknown): unknown;
|
||||
|
||||
clearSearchCache (arg: unknown): unknown;
|
||||
|
||||
clearSearchHistory (): unknown;
|
||||
|
||||
loadSearchHistory (): unknown;
|
||||
|
||||
initTokenizeUtil (): unknown;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
export interface NodeIKernelSettingService {
|
||||
addKernelSettingListener (listener: unknown): number;
|
||||
|
||||
removeKernelSettingListener (listenerId: number): void;
|
||||
|
||||
getSettingForBuffer (key: unknown): unknown;
|
||||
|
||||
getSettingForNum (key: unknown): unknown;
|
||||
|
||||
getSettingForStr (key: unknown): unknown;
|
||||
|
||||
setSettingForBuffer (arg: unknown): unknown;
|
||||
|
||||
setSettingForNum (arg: unknown): unknown;
|
||||
|
||||
setSettingForStr (arg: unknown): unknown;
|
||||
|
||||
setAutoLoginSwitch (enabled: boolean): unknown;
|
||||
|
||||
setNeedConfirmSwitch (enabled: boolean): unknown;
|
||||
|
||||
setPrivacySetting (arg: unknown): unknown;
|
||||
|
||||
setSelfStartSwitch (enabled: boolean): unknown;
|
||||
|
||||
modifyAccount (arg: unknown): unknown;
|
||||
|
||||
verifyNewAccount (arg: unknown): unknown;
|
||||
|
||||
openUrlWithQQBrowser (url: string): unknown;
|
||||
|
||||
openUrlInIM (url: string): unknown;
|
||||
|
||||
clearCache (arg: unknown): unknown;
|
||||
|
||||
destroyAccount (): unknown;
|
||||
|
||||
isQQBrowserInstall (): boolean;
|
||||
|
||||
getSelfStartSwitch (): unknown;
|
||||
|
||||
getAutoLoginSwitch (): unknown;
|
||||
|
||||
getNeedConfirmSwitch (): unknown;
|
||||
|
||||
getPrivacySetting (): unknown;
|
||||
|
||||
scanCache (): unknown;
|
||||
|
||||
getQQBrowserSwitchFromQldQQ (): unknown;
|
||||
|
||||
isNull (): boolean;
|
||||
}
|
||||
Loaded 100 of 368 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user