refactor(api): move 4 misc methods to MiscApi (#6 commit 10/13)

Inlines `actions/misc.ts` into `apis/misc.ts::MiscApi`. The Api holds
the methods that didn't naturally group into any other area:
translation, mini-app ARK card builder, inline-keyboard callback,
group sign-in.

No renaming — these names are already descriptive at the call site
under `apis.misc.X`.

Callers updated: `actions/extended.ts` (4 sites).
Tests rewritten to use `new MiscApi(bridge as any).method(...)`.

587/587 tests pass.
This commit is contained in:
DrSmoothl committed 2026-05-20 23:35:37 +08:00
1 parent d953b9824c
commit e5ac2a61b1
7 files changed
+168 -188

No files matched your search

+2 -5
View File
@@ -87,11 +87,8 @@ export interface BridgeInterface {
// - setAvatar / setGroupAvatar / fetchCustomFace
// - getLike / getUnidirectionalFriendList
// ─── Misc ───
translateEn2Zh(words: string[]): Promise<any>;
getMiniAppArk(type: string, title: string, desc: string, picUrl: string, jumpUrl: string): Promise<any>;
clickInlineKeyboardButton(groupId: number, botAppid: number, buttonId: string, callbackData: string, msgSeq: number): Promise<any>;
sendGroupSign(groupId: number): Promise<any>;
// ─── Misc (moved to apis.misc) ───
// - translateEn2Zh / getMiniAppArk / clickInlineKeyboardButton / sendGroupSign
// ─── Tier-2 napcat parity extras ───
setGroupTodo(groupId: number, msgSeq: bigint | number | string): Promise<void>;