mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
refactor: 整理Service
This commit is contained in:
parent
a804f90b9c
commit
09be7131c3
@ -1,4 +1,4 @@
|
|||||||
import { GroupMemberRole } from '@/core';
|
import { GroupMemberRole, Peer } from '@/core';
|
||||||
|
|
||||||
export interface Peer {
|
export interface Peer {
|
||||||
chatType: ChatType;
|
chatType: ChatType;
|
||||||
@ -934,3 +934,28 @@ export interface RawMessage {
|
|||||||
|
|
||||||
elements: MessageElement[];
|
elements: MessageElement[];
|
||||||
}
|
}
|
||||||
|
export interface QueryMsgsParams {
|
||||||
|
chatInfo: Peer;
|
||||||
|
filterMsgType: [];
|
||||||
|
filterSendersUid: string[];
|
||||||
|
filterMsgFromTime: string;
|
||||||
|
filterMsgToTime: string;
|
||||||
|
pageLimit: number;
|
||||||
|
isReverseOrder: boolean;
|
||||||
|
isIncludeCurrent: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TmpChatInfoApi {
|
||||||
|
errMsg: string;
|
||||||
|
result: number;
|
||||||
|
tmpChatInfo?: TmpChatInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TmpChatInfo {
|
||||||
|
chatType: number;
|
||||||
|
fromNick: string;
|
||||||
|
groupCode: string;
|
||||||
|
peerUid: string;
|
||||||
|
sessionType: number;
|
||||||
|
sig: string;
|
||||||
|
}
|
||||||
|
@ -364,3 +364,15 @@ export interface UserDetailInfoByUin {
|
|||||||
vipNameColorId: string
|
vipNameColorId: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export enum UserDetailSource {
|
||||||
|
KDB,
|
||||||
|
KSERVER
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum ProfileBizType {
|
||||||
|
KALL,
|
||||||
|
KBASEEXTEND,
|
||||||
|
KVAS,
|
||||||
|
KQZONE,
|
||||||
|
KOTHER
|
||||||
|
}
|
||||||
|
@ -1,32 +1,7 @@
|
|||||||
import { ElementType, MessageElement, Peer, RawMessage, SendMessageElement } from '@/core/entities';
|
import { ElementType, MessageElement, Peer, RawMessage, SendMessageElement } from '@/core/entities';
|
||||||
import { NodeIKernelMsgListener } from '@/core/listeners/NodeIKernelMsgListener';
|
import { NodeIKernelMsgListener } from '@/core/listeners/NodeIKernelMsgListener';
|
||||||
import { GeneralCallResult } from '@/core/services/common';
|
import { GeneralCallResult } from '@/core/services/common';
|
||||||
|
import { QueryMsgsParams, TmpChatInfoApi } from '../entities/msg';
|
||||||
export interface QueryMsgsParams {
|
|
||||||
chatInfo: Peer,
|
|
||||||
filterMsgType: [],
|
|
||||||
filterSendersUid: string[],
|
|
||||||
filterMsgFromTime: string,
|
|
||||||
filterMsgToTime: string,
|
|
||||||
pageLimit: number,
|
|
||||||
isReverseOrder: boolean,
|
|
||||||
isIncludeCurrent: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TmpChatInfoApi {
|
|
||||||
errMsg: string;
|
|
||||||
result: number;
|
|
||||||
tmpChatInfo?: TmpChatInfo;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TmpChatInfo {
|
|
||||||
chatType: number;
|
|
||||||
fromNick: string;
|
|
||||||
groupCode: string;
|
|
||||||
peerUid: string;
|
|
||||||
sessionType: number;
|
|
||||||
sig: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeIKernelMsgService {
|
export interface NodeIKernelMsgService {
|
||||||
|
|
||||||
@ -76,18 +51,12 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
downloadOnlineStatusCommonByUrl(arg0: string, arg1: string): unknown;
|
downloadOnlineStatusCommonByUrl(arg0: string, arg1: string): unknown;
|
||||||
|
|
||||||
// this.tokenType = i2;
|
|
||||||
// this.apnsToken = bArr;
|
|
||||||
// this.voipToken = bArr2;
|
|
||||||
// this.profileId = str;
|
|
||||||
|
|
||||||
setToken(arg: unknown): unknown;
|
setToken(arg: unknown): unknown;
|
||||||
|
|
||||||
switchForeGround(): unknown;
|
switchForeGround(): unknown;
|
||||||
|
|
||||||
switchBackGround(arg: unknown): unknown;
|
switchBackGround(arg: unknown): unknown;
|
||||||
|
|
||||||
//hex
|
|
||||||
setTokenForMqq(token: string): unknown;
|
setTokenForMqq(token: string): unknown;
|
||||||
|
|
||||||
switchForeGroundForMqq(...args: unknown[]): unknown;
|
switchForeGroundForMqq(...args: unknown[]): unknown;
|
||||||
@ -124,7 +93,6 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
forwardFile(...args: unknown[]): unknown;
|
forwardFile(...args: unknown[]): unknown;
|
||||||
|
|
||||||
//Array<Msg>, Peer from, Peer to
|
|
||||||
multiForwardMsg(...args: unknown[]): unknown;
|
multiForwardMsg(...args: unknown[]): unknown;
|
||||||
|
|
||||||
multiForwardMsgWithComment(...args: unknown[]): unknown;
|
multiForwardMsgWithComment(...args: unknown[]): unknown;
|
||||||
@ -185,11 +153,6 @@ export interface NodeIKernelMsgService {
|
|||||||
msgList: RawMessage[]
|
msgList: RawMessage[]
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
// this.$peer = contact;
|
|
||||||
// this.$msgTime = j2;
|
|
||||||
// this.$clientSeq = j3;
|
|
||||||
// this.$cnt = i2;
|
|
||||||
|
|
||||||
getMsgsWithMsgTimeAndClientSeqForC2C(...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[] }>;
|
getMsgsWithMsgTimeAndClientSeqForC2C(...args: unknown[]): Promise<GeneralCallResult & { msgList: RawMessage[] }>;
|
||||||
|
|
||||||
getMsgsWithStatus(params: {
|
getMsgsWithStatus(params: {
|
||||||
@ -226,7 +189,6 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
getSourceOfReplyMsgByClientSeqAndTime(peer: Peer, clientSeq: string, time: string): unknown;
|
getSourceOfReplyMsgByClientSeqAndTime(peer: Peer, clientSeq: string, time: string): unknown;
|
||||||
|
|
||||||
//cnt clientSeq?并不是吧
|
|
||||||
getMsgsByTypeFilter(peer: Peer, msgId: string, cnt: unknown, queryOrder: boolean, typeFilter: {
|
getMsgsByTypeFilter(peer: Peer, msgId: string, cnt: unknown, queryOrder: boolean, typeFilter: {
|
||||||
type: number,
|
type: number,
|
||||||
subtype: Array<number>
|
subtype: Array<number>
|
||||||
@ -241,49 +203,15 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
queryMsgsWithFilter(...args: unknown[]): unknown;
|
queryMsgsWithFilter(...args: unknown[]): unknown;
|
||||||
|
|
||||||
/**
|
//queryMsgsWithFilterVer2(MsgId: string, MsgTime: string, param: QueryMsgsParams): Promise<unknown>;
|
||||||
* @deprecated 该函数已被标记为废弃,请使用新的替代方法。
|
|
||||||
* 使用过滤条件查询消息列表的版本2接口。
|
|
||||||
*
|
|
||||||
* 该函数通过一系列过滤条件来查询特定聊天中的消息列表。这些条件包括消息类型、发送者、时间范围等。
|
|
||||||
* 函数返回一个Promise,解析为查询结果的未知类型对象。
|
|
||||||
*
|
|
||||||
* @param MsgId 消息ID,用于特定消息的查询。
|
|
||||||
* @param MsgTime 消息时间,用于指定消息的时间范围。
|
|
||||||
* @param param 查询参数对象,包含详细的过滤条件和分页信息。
|
|
||||||
* @param param.chatInfo 聊天信息,包括聊天类型和对方用户ID。
|
|
||||||
* @param param.filterMsgType 需要过滤的消息类型数组,留空表示不过滤。
|
|
||||||
* @param param.filterSendersUid 需要过滤的发送者用户ID数组。
|
|
||||||
* @param param.filterMsgFromTime 查询消息的起始时间。
|
|
||||||
* @param param.filterMsgToTime 查询消息的结束时间。
|
|
||||||
* @param param.pageLimit 每页的消息数量限制。
|
|
||||||
* @param param.isReverseOrder 是否按时间顺序倒序返回消息。
|
|
||||||
* @param param.isIncludeCurrent 是否包含当前页码。
|
|
||||||
* @returns 返回一个Promise,解析为查询结果的未知类型对象。
|
|
||||||
*/
|
|
||||||
queryMsgsWithFilterVer2(MsgId: string, MsgTime: string, param: QueryMsgsParams): Promise<unknown>;
|
|
||||||
|
|
||||||
// this.chatType = i2;
|
|
||||||
// this.peerUid = str;
|
|
||||||
|
|
||||||
// this.chatInfo = new ChatInfo();
|
|
||||||
// this.filterMsgType = new ArrayList<>();
|
|
||||||
// this.filterSendersUid = new ArrayList<>();
|
|
||||||
// this.chatInfo = chatInfo;
|
|
||||||
// this.filterMsgType = arrayList;
|
|
||||||
// this.filterSendersUid = arrayList2;
|
|
||||||
// this.filterMsgFromTime = j2;
|
|
||||||
// this.filterMsgToTime = j3;
|
|
||||||
// this.pageLimit = i2;
|
|
||||||
// this.isReverseOrder = z;
|
|
||||||
// this.isIncludeCurrent = z2;
|
|
||||||
//queryMsgsWithFilterEx(0L, 0L, 0L, new QueryMsgsParams(new ChatInfo(2, str), new ArrayList(), new ArrayList(), 0L, 0L, 250, false, true))
|
|
||||||
queryMsgsWithFilterEx(msgId: string, msgTime: string, megSeq: string, param: QueryMsgsParams): Promise<GeneralCallResult & {
|
queryMsgsWithFilterEx(msgId: string, msgTime: string, megSeq: string, param: QueryMsgsParams): Promise<GeneralCallResult & {
|
||||||
msgList: RawMessage[]
|
msgList: RawMessage[]
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
//queryMsgsWithFilterEx(this.$msgId, this.$msgTime, this.$msgSeq, this.$param)
|
queryFileMsgsDesktop(msgId: string, msgTime: string, msgSeq: string, param: QueryMsgsParams): Promise<GeneralCallResult & {
|
||||||
queryFileMsgsDesktop(...args: unknown[]): unknown;
|
msgList: RawMessage[]
|
||||||
|
}>;
|
||||||
|
|
||||||
setMsgRichInfoFlag(...args: unknown[]): unknown;
|
setMsgRichInfoFlag(...args: unknown[]): unknown;
|
||||||
|
|
||||||
@ -390,17 +318,11 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
getFileThumbSavePath(...args: unknown[]): unknown;
|
getFileThumbSavePath(...args: unknown[]): unknown;
|
||||||
|
|
||||||
//猜测居多
|
translatePtt2Text(msgId: string, peer: Peer, msgElement: unknown): unknown;
|
||||||
translatePtt2Text(MsgId: string, Peer: Peer, MsgElement: unknown): unknown;
|
|
||||||
|
|
||||||
setPttPlayedState(...args: unknown[]): unknown;
|
setPttPlayedState(...args: unknown[]): unknown;
|
||||||
|
|
||||||
// NodeIQQNTWrapperSession fetchFavEmojiList [
|
//uk1 uk2 true
|
||||||
// "",
|
|
||||||
// 48,
|
|
||||||
// true,
|
|
||||||
// true
|
|
||||||
// ]
|
|
||||||
fetchFavEmojiList(str: string, num: number, uk1: boolean, uk2: boolean): Promise<GeneralCallResult & {
|
fetchFavEmojiList(str: string, num: number, uk1: boolean, uk2: boolean): Promise<GeneralCallResult & {
|
||||||
emojiInfoList: Array<{
|
emojiInfoList: Array<{
|
||||||
uin: string,
|
uin: string,
|
||||||
@ -496,7 +418,7 @@ export interface NodeIKernelMsgService {
|
|||||||
getFirstUnreadMsgSeq(args: {
|
getFirstUnreadMsgSeq(args: {
|
||||||
peerUid: string
|
peerUid: string
|
||||||
guildId: string
|
guildId: string
|
||||||
}): unknown;
|
}): Promise<unknown>;
|
||||||
|
|
||||||
getFirstUnreadCommonMsg(...args: unknown[]): unknown;
|
getFirstUnreadCommonMsg(...args: unknown[]): unknown;
|
||||||
|
|
||||||
@ -590,7 +512,7 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
getFirstUnreadAtMsg(peer: Peer): unknown;
|
getFirstUnreadAtMsg(peer: Peer): unknown;
|
||||||
|
|
||||||
clearMsgRecords(...args: unknown[]): unknown;//设置已读后调用我觉得比较好 清理记录 现在别了
|
clearMsgRecords(...args: unknown[]): unknown;
|
||||||
|
|
||||||
IsExistOldDb(...args: unknown[]): unknown;
|
IsExistOldDb(...args: unknown[]): unknown;
|
||||||
|
|
||||||
@ -626,25 +548,10 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
enterOrExitAio(...args: unknown[]): unknown;
|
enterOrExitAio(...args: unknown[]): unknown;
|
||||||
|
|
||||||
// this.peerUid = "";
|
prepareTempChat(args: unknown): unknown;
|
||||||
// this.peerNickname = "";
|
|
||||||
// this.fromGroupCode = "";
|
|
||||||
// this.sig = new byte[0];
|
|
||||||
// this.selfUid = "";
|
|
||||||
// this.selfPhone = "";
|
|
||||||
// this.chatType = i2;
|
|
||||||
// this.peerUid = str;
|
|
||||||
// this.peerNickname = str2;
|
|
||||||
// this.fromGroupCode = str3;
|
|
||||||
// this.sig = bArr;
|
|
||||||
// this.selfUid = str4;
|
|
||||||
// this.selfPhone = str5;
|
|
||||||
// this.gameSession = tempChatGameSession;
|
|
||||||
prepareTempChat(args: unknown): unknown;//主动临时消息 不做
|
|
||||||
|
|
||||||
sendSsoCmdReqByContend(cmd: string, param: string): Promise<unknown>;
|
sendSsoCmdReqByContend(cmd: string, param: string): Promise<unknown>;
|
||||||
|
|
||||||
//chattype,uid->Promise<any>
|
|
||||||
getTempChatInfo(ChatType: number, Uid: string): Promise<TmpChatInfoApi>;
|
getTempChatInfo(ChatType: number, Uid: string): Promise<TmpChatInfoApi>;
|
||||||
|
|
||||||
setContactLocalTop(...args: unknown[]): unknown;
|
setContactLocalTop(...args: unknown[]): unknown;
|
||||||
@ -708,7 +615,6 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
dataMigrationStopOperation(...args: unknown[]): unknown;
|
dataMigrationStopOperation(...args: unknown[]): unknown;
|
||||||
|
|
||||||
//新的希望
|
|
||||||
dataMigrationImportMsgPbRecord(DataMigrationMsgInfo: Array<{
|
dataMigrationImportMsgPbRecord(DataMigrationMsgInfo: Array<{
|
||||||
extensionData: string//"Hex"
|
extensionData: string//"Hex"
|
||||||
extraData: string //""
|
extraData: string //""
|
||||||
@ -760,6 +666,6 @@ export interface NodeIKernelMsgService {
|
|||||||
|
|
||||||
getGuildMsgAbFlag(...args: unknown[]): unknown;
|
getGuildMsgAbFlag(...args: unknown[]): unknown;
|
||||||
|
|
||||||
getGroupMsgStorageTime(): unknown;//这是嘛啊
|
getGroupMsgStorageTime(): unknown;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { GeneralCallResult } from './common';
|
import { GeneralCallResult } from './common';
|
||||||
|
|
||||||
//没扒干净 因为用不着
|
|
||||||
export interface NodeIKernelNodeMiscService {
|
export interface NodeIKernelNodeMiscService {
|
||||||
getMiniAppPath(): unknown;
|
getMiniAppPath(): unknown;
|
||||||
|
|
||||||
@ -11,7 +10,4 @@ export interface NodeIKernelNodeMiscService {
|
|||||||
SendMiniAppMsg(arg1: string, arg2: string, arg3: string): unknown;
|
SendMiniAppMsg(arg1: string, arg2: string, arg3: string): unknown;
|
||||||
|
|
||||||
startNewMiniApp(appfile: string, params: string): unknown;
|
startNewMiniApp(appfile: string, params: string): unknown;
|
||||||
|
|
||||||
// 我的计划是转发给一个新程序避免吃掉Electron_AS_Node的环境 然后重写启动MiniApp 挂载相应JS脚本 这样有个问题
|
|
||||||
// 需要自己转发ipc参数 然后必须处在gui环境 且完成校验破解 才能实现发包 有点抽象了
|
|
||||||
}
|
}
|
||||||
|
@ -2,34 +2,12 @@ import { AnyCnameRecord } from 'node:dns';
|
|||||||
import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, SimpleInfo, UserDetailInfoByUinV2 } from '@/core';
|
import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, SimpleInfo, UserDetailInfoByUinV2 } from '@/core';
|
||||||
import { GeneralCallResult } from '@/core/services/common';
|
import { GeneralCallResult } from '@/core/services/common';
|
||||||
|
|
||||||
export enum UserDetailSource {
|
|
||||||
KDB,
|
|
||||||
KSERVER
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ProfileBizType {
|
|
||||||
KALL,
|
|
||||||
KBASEEXTEND,
|
|
||||||
KVAS,
|
|
||||||
KQZONE,
|
|
||||||
KOTHER
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeIKernelProfileService {
|
export interface NodeIKernelProfileService {
|
||||||
|
|
||||||
getUidByUin(callfrom: string, uin: Array<string>): Promise<Map<string, string>>;//uin->uid
|
getUidByUin(callfrom: string, uin: Array<string>): Promise<Map<string, string>>;
|
||||||
|
|
||||||
getUinByUid(callfrom: string, uid: Array<string>): Promise<Map<string, string>>;
|
getUinByUid(callfrom: string, uid: Array<string>): Promise<Map<string, string>>;
|
||||||
|
|
||||||
// {
|
|
||||||
// coreInfo: CoreInfo,
|
|
||||||
// baseInfo: BaseInfo,
|
|
||||||
// status: null,
|
|
||||||
// vasInfo: null,
|
|
||||||
// relationFlags: null,
|
|
||||||
// otherFlags: null,
|
|
||||||
// intimate: null
|
|
||||||
// }
|
|
||||||
getCoreAndBaseInfo(callfrom: string, uids: string[]): Promise<Map<string, SimpleInfo>>;
|
getCoreAndBaseInfo(callfrom: string, uids: string[]): Promise<Map<string, SimpleInfo>>;
|
||||||
|
|
||||||
fetchUserDetailInfo(trace: string, uids: string[], arg2: number, arg3: number[]): Promise<unknown>;
|
fetchUserDetailInfo(trace: string, uids: string[], arg2: number, arg3: number[]): Promise<unknown>;
|
||||||
@ -50,24 +28,11 @@ export interface NodeIKernelProfileService {
|
|||||||
|
|
||||||
enumAreaOptions(...args: unknown[]): unknown;
|
enumAreaOptions(...args: unknown[]): unknown;
|
||||||
|
|
||||||
//SimpleInfo
|
|
||||||
// this.uid = "";
|
|
||||||
// this.uid = str;
|
|
||||||
// this.uin = j2;
|
|
||||||
// this.isBuddy = z;
|
|
||||||
// this.coreInfo = coreInfo;
|
|
||||||
// this.baseInfo = baseInfo;
|
|
||||||
// this.status = statusInfo;
|
|
||||||
// this.vasInfo = vasInfo;
|
|
||||||
// this.relationFlags = relationFlag;
|
|
||||||
// this.otherFlags = otherFlag;
|
|
||||||
// this.intimate = intimate;
|
|
||||||
|
|
||||||
modifySelfProfile(...args: unknown[]): Promise<unknown>;
|
modifySelfProfile(...args: 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>;
|
||||||
|
|
||||||
@ -95,14 +60,12 @@ export interface NodeIKernelProfileService {
|
|||||||
|
|
||||||
getSelfStatus(): Promise<unknown>;
|
getSelfStatus(): Promise<unknown>;
|
||||||
|
|
||||||
//
|
|
||||||
setdisableEmojiShortCuts(...args: unknown[]): unknown;
|
setdisableEmojiShortCuts(...args: unknown[]): unknown;
|
||||||
|
|
||||||
getProfileQzonePicInfo(uid: string, type: number, force: boolean): Promise<unknown>;
|
getProfileQzonePicInfo(uid: string, type: number, force: boolean): Promise<unknown>;
|
||||||
|
|
||||||
//profileService.getCoreInfo("UserRemarkServiceImpl::getStrangerRemarkByUid", arrayList);
|
// UserRemarkServiceImpl::getStrangerRemarkByUid []
|
||||||
getCoreInfo(name: string, arg: any[]): unknown;
|
getCoreInfo(sceneId: string, arg: any[]): unknown;
|
||||||
|
|
||||||
//m429253e12.getOtherFlag("FriendListInfoCache_getKernelDataAndPutCache", new ArrayList<>());
|
|
||||||
isNull(): boolean;
|
isNull(): boolean;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user