mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
style: 强类型大法
This commit is contained in:
@@ -1,15 +1,16 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import { MsfChangeReasonType, MsfStatusType } from '@/core/types/adapter';
|
||||
|
||||
export class NodeIDependsAdapter {
|
||||
onMSFStatusChange(statusType: MsfStatusType, changeReasonType: MsfChangeReasonType) {
|
||||
onMSFStatusChange(_statusType: MsfStatusType, _changeReasonType: MsfChangeReasonType) {
|
||||
|
||||
}
|
||||
|
||||
onMSFSsoError(args: unknown) {
|
||||
onMSFSsoError(_args: unknown) {
|
||||
|
||||
}
|
||||
|
||||
getGroupCode(args: unknown) {
|
||||
getGroupCode(_args: unknown) {
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
export class NodeIDispatcherAdapter {
|
||||
dispatchRequest(arg: unknown) {
|
||||
dispatchRequest(_arg: unknown) {
|
||||
}
|
||||
|
||||
dispatchCall(arg: unknown) {
|
||||
dispatchCall(_arg: unknown) {
|
||||
}
|
||||
|
||||
dispatchCallWithJson(arg: unknown) {
|
||||
dispatchCallWithJson(_arg: unknown) {
|
||||
}
|
||||
}
|
||||
|
@@ -1,25 +1,26 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
export class NodeIGlobalAdapter {
|
||||
onLog(...args: unknown[]) {
|
||||
onLog(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
onGetSrvCalTime(...args: unknown[]) {
|
||||
onGetSrvCalTime(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
onShowErrUITips(...args: unknown[]) {
|
||||
onShowErrUITips(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
fixPicImgType(...args: unknown[]) {
|
||||
fixPicImgType(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
getAppSetting(...args: unknown[]) {
|
||||
getAppSetting(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
onInstallFinished(...args: unknown[]) {
|
||||
onInstallFinished(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
onUpdateGeneralFlag(...args: unknown[]) {
|
||||
onUpdateGeneralFlag(..._args: unknown[]) {
|
||||
}
|
||||
|
||||
onGetOfflineMsg(...args: unknown[]) {
|
||||
onGetOfflineMsg(..._args: unknown[]) {
|
||||
}
|
||||
}
|
||||
|
@@ -27,6 +27,7 @@ import { encodeSilk } from '@/common/audio';
|
||||
import { SendMessageContext } from '@/onebot/api';
|
||||
import { getFileTypeForSendType } from '../helper/msg';
|
||||
import { FFmpegService } from '@/common/ffmpeg';
|
||||
import { rkeyDataType } from '../types/file';
|
||||
|
||||
export class NTQQFileApi {
|
||||
context: InstanceContext;
|
||||
@@ -61,7 +62,7 @@ export class NTQQFileApi {
|
||||
|
||||
async uploadFile(filePath: string, elementType: ElementType = ElementType.PIC, elementSubType: number = 0) {
|
||||
const fileMd5 = await calculateFileMD5(filePath);
|
||||
const extOrEmpty = await fileTypeFromFile(filePath).then(e => e?.ext ?? '').catch(e => '');
|
||||
const extOrEmpty = await fileTypeFromFile(filePath).then(e => e?.ext ?? '').catch(() => '');
|
||||
const ext = extOrEmpty ? `.${extOrEmpty}` : '';
|
||||
let fileName = `${path.basename(filePath)}`;
|
||||
if (fileName.indexOf('.') === -1) {
|
||||
@@ -140,7 +141,7 @@ export class NTQQFileApi {
|
||||
};
|
||||
}
|
||||
|
||||
async createValidSendVideoElement(context: SendMessageContext, filePath: string, fileName: string = '', diyThumbPath: string = ''): Promise<SendVideoElement> {
|
||||
async createValidSendVideoElement(context: SendMessageContext, filePath: string, fileName: string = '', _diyThumbPath: string = ''): Promise<SendVideoElement> {
|
||||
let videoInfo = {
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
@@ -170,10 +171,16 @@ export class NTQQFileApi {
|
||||
const thumbPath = pathLib.join(pathLib.dirname(thumbDir), `${md5}_0.png`);
|
||||
try {
|
||||
videoInfo = await FFmpegService.getVideoInfo(filePath, thumbPath);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
fs.writeFileSync(thumbPath, Buffer.from(defaultVideoThumbB64, 'base64'));
|
||||
}
|
||||
|
||||
if (_diyThumbPath) {
|
||||
try {
|
||||
await this.copyFile(_diyThumbPath, thumbPath);
|
||||
} catch (e) {
|
||||
this.context.logger.logError('复制自定义缩略图失败', e);
|
||||
}
|
||||
}
|
||||
const thumbSize = (await fsPromises.stat(thumbPath)).size;
|
||||
const thumbMd5 = await calculateFileMD5(thumbPath);
|
||||
context.deleteAfterSentFiles.push(path);
|
||||
@@ -275,16 +282,16 @@ export class NTQQFileApi {
|
||||
) {
|
||||
switch (element.elementType) {
|
||||
case ElementType.PIC:
|
||||
element.picElement!.sourcePath = elementResults[elementIndex];
|
||||
element.picElement!.sourcePath = elementResults?.[elementIndex] ?? '';
|
||||
break;
|
||||
case ElementType.VIDEO:
|
||||
element.videoElement!.filePath = elementResults[elementIndex];
|
||||
element.videoElement!.filePath = elementResults?.[elementIndex] ?? '';
|
||||
break;
|
||||
case ElementType.PTT:
|
||||
element.pttElement!.filePath = elementResults[elementIndex];
|
||||
element.pttElement!.filePath = elementResults?.[elementIndex] ?? '';
|
||||
break;
|
||||
case ElementType.FILE:
|
||||
element.fileElement!.filePath = elementResults[elementIndex];
|
||||
element.fileElement!.filePath = elementResults?.[elementIndex] ?? '';
|
||||
break;
|
||||
}
|
||||
elementIndex++;
|
||||
@@ -299,7 +306,7 @@ export class NTQQFileApi {
|
||||
if (force) {
|
||||
try {
|
||||
await fsPromises.unlink(sourcePath);
|
||||
} catch (e) {
|
||||
} catch {
|
||||
//
|
||||
}
|
||||
} else {
|
||||
@@ -401,27 +408,27 @@ export class NTQQFileApi {
|
||||
}
|
||||
|
||||
private async getRkeyData() {
|
||||
const rkeyData = {
|
||||
const rkeyData: rkeyDataType = {
|
||||
private_rkey: 'CAQSKAB6JWENi5LM_xp9vumLbuThJSaYf-yzMrbZsuq7Uz2qEc3Rbib9LP4',
|
||||
group_rkey: 'CAQSKAB6JWENi5LM_xp9vumLbuThJSaYf-yzMrbZsuq7Uz2qffcqm614gds',
|
||||
online_rkey: false
|
||||
};
|
||||
|
||||
try {
|
||||
if (this.core.apis.PacketApi.available) {
|
||||
if (this.core.apis.PacketApi.available && this.packetRkey?.[0] && this.packetRkey?.[1]) {
|
||||
const rkey_expired_private = !this.packetRkey || this.packetRkey[0].time + Number(this.packetRkey[0].ttl) < Date.now() / 1000;
|
||||
const rkey_expired_group = !this.packetRkey || this.packetRkey[0].time + Number(this.packetRkey[0].ttl) < Date.now() / 1000;
|
||||
if (rkey_expired_private || rkey_expired_group) {
|
||||
this.packetRkey = await this.core.apis.PacketApi.pkt.operation.FetchRkey();
|
||||
}
|
||||
if (this.packetRkey && this.packetRkey.length > 0) {
|
||||
rkeyData.group_rkey = this.packetRkey[1].rkey.slice(6);
|
||||
rkeyData.private_rkey = this.packetRkey[0].rkey.slice(6);
|
||||
rkeyData.group_rkey = this.packetRkey[1]?.rkey.slice(6) ?? '';
|
||||
rkeyData.private_rkey = this.packetRkey[0]?.rkey.slice(6) ?? '';
|
||||
rkeyData.online_rkey = true;
|
||||
}
|
||||
}
|
||||
} catch (error: any) {
|
||||
this.context.logger.logError('获取rkey失败', error.message);
|
||||
} catch (error: unknown) {
|
||||
this.context.logger.logError('获取rkey失败', (error as Error).message);
|
||||
}
|
||||
|
||||
if (!rkeyData.online_rkey) {
|
||||
@@ -438,7 +445,7 @@ export class NTQQFileApi {
|
||||
return rkeyData;
|
||||
}
|
||||
|
||||
private getImageUrlFromParsedUrl(imageFileId: string, appid: string, rkeyData: any): string {
|
||||
private getImageUrlFromParsedUrl(imageFileId: string, appid: string, rkeyData: rkeyDataType): string {
|
||||
const rkey = appid === '1406' ? rkeyData.private_rkey : rkeyData.group_rkey;
|
||||
if (rkeyData.online_rkey) {
|
||||
return IMAGE_HTTP_HOST_NT + `/download?appid=${appid}&fileid=${imageFileId}&rkey=${rkey}`;
|
||||
|
@@ -13,7 +13,7 @@ export class NTQQFriendApi {
|
||||
async setBuddyRemark(uid: string, remark: string) {
|
||||
return this.context.session.getBuddyService().setBuddyRemark({ uid, remark });
|
||||
}
|
||||
async getBuddyV2SimpleInfoMap(refresh = false) {
|
||||
async getBuddyV2SimpleInfoMap() {
|
||||
const buddyService = this.context.session.getBuddyService();
|
||||
const buddyListV2 = await buddyService.getBuddyListV2('0', BuddyListReqType.KNOMAL);
|
||||
const uids = buddyListV2.data.flatMap(item => item.buddyUids);
|
||||
@@ -24,13 +24,13 @@ export class NTQQFriendApi {
|
||||
);
|
||||
}
|
||||
|
||||
async getBuddy(refresh = false): Promise<FriendV2[]> {
|
||||
return Array.from((await this.getBuddyV2SimpleInfoMap(refresh)).values());
|
||||
async getBuddy(): Promise<FriendV2[]> {
|
||||
return Array.from((await this.getBuddyV2SimpleInfoMap()).values());
|
||||
}
|
||||
|
||||
async getBuddyIdMap(refresh = false): Promise<LimitedHashTable<string, string>> {
|
||||
async getBuddyIdMap(): Promise<LimitedHashTable<string, string>> {
|
||||
const retMap: LimitedHashTable<string, string> = new LimitedHashTable<string, string>(5000);
|
||||
const data = await this.getBuddyV2SimpleInfoMap(refresh);
|
||||
const data = await this.getBuddyV2SimpleInfoMap();
|
||||
data.forEach((value) => retMap.set(value.uin!, value.uid!));
|
||||
return retMap;
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ export class NTQQGroupApi {
|
||||
}, pskey);
|
||||
}
|
||||
|
||||
async getGroupShutUpMemberList(groupCode: string) {
|
||||
async getGroupShutUpMemberList(groupCode: string): Promise<ShutUpGroupMember[]> {
|
||||
const executor: TaskExecutor<ShutUpGroupMember[]> = async (resolve, reject, onCancel) => {
|
||||
this.core.eventWrapper.registerListen(
|
||||
'NodeIKernelGroupListener/onShutUpMemberListChanged',
|
||||
@@ -215,6 +215,9 @@ export class NTQQGroupApi {
|
||||
guildId: '',
|
||||
peerUid: groupCode,
|
||||
}, msgId, 1, false);
|
||||
if (!MsgData.msgList[0]) {
|
||||
throw new Error('消息不存在');
|
||||
}
|
||||
const param = {
|
||||
groupCode: groupCode,
|
||||
msgRandom: parseInt(MsgData.msgList[0].msgRandom),
|
||||
@@ -255,6 +258,9 @@ export class NTQQGroupApi {
|
||||
guildId: '',
|
||||
peerUid: groupCode,
|
||||
}, msgId, 1, false);
|
||||
if (!MsgData.msgList[0]) {
|
||||
throw new Error('消息不存在');
|
||||
}
|
||||
const param = {
|
||||
groupCode: groupCode,
|
||||
msgRandom: parseInt(MsgData.msgList[0].msgRandom),
|
||||
|
@@ -4,4 +4,6 @@ export * from './group';
|
||||
export * from './msg';
|
||||
export * from './user';
|
||||
export * from './webapi';
|
||||
export * from './system';
|
||||
export * from './system';
|
||||
export * from './packet';
|
||||
export * from './file';
|
@@ -201,7 +201,7 @@ export class NTQQMsgApi {
|
||||
return this.context.session.getMsgService().getTempChatInfo(chatType, peerUid);
|
||||
}
|
||||
|
||||
async sendMsg(peer: Peer, msgElements: SendMessageElement[], waitComplete = true, timeout = 10000) {
|
||||
async sendMsg(peer: Peer, msgElements: SendMessageElement[], timeout = 10000) {
|
||||
//唉?!我有个想法
|
||||
if (peer.chatType === ChatType.KCHATTYPETEMPC2CFROMGROUP && peer.guildId && peer.guildId !== '') {
|
||||
const member = await this.core.apis.GroupApi.getGroupMember(peer.guildId, peer.peerUid);
|
||||
@@ -268,7 +268,7 @@ export class NTQQMsgApi {
|
||||
if (!arkElement) {
|
||||
continue;
|
||||
}
|
||||
const forwardData: any = JSON.parse(arkElement.arkElement?.bytesData ?? '');
|
||||
const forwardData: { app: string } = JSON.parse(arkElement.arkElement?.bytesData ?? '');
|
||||
if (forwardData.app != 'com.tencent.multimsg') {
|
||||
continue;
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ export class NTQQSystemApi {
|
||||
this.context.session.getMsgService().getOnLineDev();
|
||||
}
|
||||
|
||||
async getArkJsonCollection(cid: string) {
|
||||
async getArkJsonCollection() {
|
||||
return await this.core.eventWrapper.callNoListenerEvent('NodeIKernelCollectionService/collectionArkShare', '1717662698058');
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ export class NTQQUserApi {
|
||||
}
|
||||
|
||||
async fetchUserDetailInfo(uid: string, mode: UserDetailSource = UserDetailSource.KDB) {
|
||||
const [_retData, profile] = await this.core.eventWrapper.callNormalEventV2(
|
||||
const [, profile] = await this.core.eventWrapper.callNormalEventV2(
|
||||
'NodeIKernelProfileService/fetchUserDetailInfo',
|
||||
'NodeIKernelProfileListener/onUserDetailInfoChanged',
|
||||
[
|
||||
@@ -130,10 +130,10 @@ export class NTQQUserApi {
|
||||
const requestUrl = 'https://ssl.ptlogin2.qq.com/jump?ptlang=1033&clientuin=' + this.core.selfInfo.uin +
|
||||
'&clientkey=' + ClientKeyData.clientKey + '&u1=https%3A%2F%2F' + domain + '%2F' + this.core.selfInfo.uin + '%2Finfocenter&keyindex=19%27';
|
||||
const data = await RequestUtil.HttpsGetCookies(requestUrl);
|
||||
if (!data.p_skey || data.p_skey.length == 0) {
|
||||
if (!data['p_skey'] || data['p_skey'].length == 0) {
|
||||
try {
|
||||
const pskey = (await this.getPSkey([domain])).domainPskeyMap.get(domain);
|
||||
if (pskey) data.p_skey = pskey;
|
||||
if (pskey) data['p_skey'] = pskey;
|
||||
} catch {
|
||||
return data;
|
||||
}
|
||||
@@ -145,7 +145,7 @@ export class NTQQUserApi {
|
||||
return await this.context.session.getTipOffService().getPskey(domainList, true);
|
||||
}
|
||||
|
||||
async getRobotUinRange(): Promise<Array<any>> {
|
||||
async getRobotUinRange(): Promise<Array<unknown>> {
|
||||
const robotUinRanges = await this.context.session.getRobotService().getRobotUinRange({
|
||||
justFetchMsgConfig: '1',
|
||||
type: 1,
|
||||
|
@@ -32,7 +32,7 @@ export class NTQQWebApi {
|
||||
}).toString()}`;
|
||||
try {
|
||||
return RequestUtil.HttpGetText(url, 'GET', '', { 'Cookie': this.cookieToString(cookieObject) });
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ export class NTQQWebApi {
|
||||
}
|
||||
}
|
||||
|
||||
async getGroupMembers(GroupCode: string, cached: boolean = true): Promise<WebApiGroupMember[]> {
|
||||
async getGroupMembers(GroupCode: string): Promise<WebApiGroupMember[]> {
|
||||
//logDebug('webapi 获取群成员', GroupCode);
|
||||
const memberData: Array<WebApiGroupMember> = new Array<WebApiGroupMember>();
|
||||
const cookieObject = await this.core.apis.UserApi.getCookies('qun.qq.com');
|
||||
@@ -88,7 +88,9 @@ export class NTQQWebApi {
|
||||
return [];
|
||||
} else {
|
||||
for (const key in fastRet.mems) {
|
||||
memberData.push(fastRet.mems[key]);
|
||||
if (fastRet.mems[key]) {
|
||||
memberData.push(fastRet.mems[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//初始化获取PageNum
|
||||
@@ -116,7 +118,9 @@ export class NTQQWebApi {
|
||||
continue;
|
||||
}
|
||||
for (const key in ret.mems) {
|
||||
memberData.push(ret.mems[key]);
|
||||
if (ret.mems[key]) {
|
||||
memberData.push(ret.mems[key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return memberData;
|
||||
@@ -185,7 +189,7 @@ export class NTQQWebApi {
|
||||
{ 'Cookie': this.cookieToString(cookieObject) }
|
||||
);
|
||||
return ret;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
@@ -210,12 +214,12 @@ export class NTQQWebApi {
|
||||
{ 'Cookie': this.cookieToString(cookieObject) }
|
||||
);
|
||||
return ret?.ec === 0 ? ret : undefined;
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
private async getDataInternal(cookieObject: any, groupCode: string, type: number) {
|
||||
private async getDataInternal(cookieObject: { [key: string]: string }, groupCode: string, type: number) {
|
||||
let resJson;
|
||||
try {
|
||||
const res = await RequestUtil.HttpGetText(
|
||||
@@ -228,7 +232,7 @@ export class NTQQWebApi {
|
||||
{ 'Cookie': this.cookieToString(cookieObject) }
|
||||
);
|
||||
const match = /window\.__INITIAL_STATE__=(.*?);/.exec(res);
|
||||
if (match) {
|
||||
if (match?.[1]) {
|
||||
resJson = JSON.parse(match[1].trim());
|
||||
}
|
||||
return type === 1 ? resJson?.talkativeList : resJson?.actorList;
|
||||
@@ -238,13 +242,18 @@ export class NTQQWebApi {
|
||||
}
|
||||
}
|
||||
|
||||
private async getHonorList(cookieObject: any, groupCode: string, type: number) {
|
||||
private async getHonorList(cookieObject: { [key: string]: string }, groupCode: string, type: number) {
|
||||
const data = await this.getDataInternal(cookieObject, groupCode, type);
|
||||
if (!data) {
|
||||
this.context.logger.logError(`获取类型 ${type} 的荣誉信息失败`);
|
||||
return [];
|
||||
}
|
||||
return data.map((item: any) => ({
|
||||
return data.map((item: {
|
||||
uin: string,
|
||||
name: string,
|
||||
avatar: string,
|
||||
desc: string,
|
||||
}) => ({
|
||||
user_id: item?.uin,
|
||||
nickname: item?.name,
|
||||
avatar: item?.avatar,
|
||||
@@ -254,7 +263,15 @@ export class NTQQWebApi {
|
||||
|
||||
async getGroupHonorInfo(groupCode: string, getType: WebHonorType) {
|
||||
const cookieObject = await this.core.apis.UserApi.getCookies('qun.qq.com');
|
||||
const HonorInfo: any = { group_id: groupCode };
|
||||
let HonorInfo = {
|
||||
group_id: groupCode,
|
||||
current_talkative: {},
|
||||
talkative_list: [],
|
||||
performer_list: [],
|
||||
legend_list: [],
|
||||
emotion_list: [],
|
||||
strong_newbie_list: [],
|
||||
};
|
||||
|
||||
if (getType === WebHonorType.TALKATIVE || getType === WebHonorType.ALL) {
|
||||
const talkativeList = await this.getHonorList(cookieObject, groupCode, 1);
|
||||
@@ -284,12 +301,12 @@ export class NTQQWebApi {
|
||||
return HonorInfo;
|
||||
}
|
||||
|
||||
private cookieToString(cookieObject: any) {
|
||||
private cookieToString(cookieObject: { [key: string]: string }) {
|
||||
return Object.entries(cookieObject).map(([key, value]) => `${key}=${value}`).join('; ');
|
||||
}
|
||||
|
||||
public getBknFromCookie(cookieObject: any) {
|
||||
const sKey = cookieObject.skey as string;
|
||||
public getBknFromCookie(cookieObject: { [key: string]: string }) {
|
||||
const sKey = cookieObject['skey'] as string;
|
||||
|
||||
let hash = 5381;
|
||||
for (let i = 0; i < sKey.length; i++) {
|
||||
|
@@ -51,7 +51,7 @@ export class RkeyManager {
|
||||
return now > this.rkeyData.expired_time;
|
||||
}
|
||||
|
||||
async refreshRkey(): Promise<any> {
|
||||
async refreshRkey() {
|
||||
//刷新rkey
|
||||
for (const url of this.serverUrl) {
|
||||
try {
|
||||
|
@@ -35,9 +35,9 @@ export class StatusHelper {
|
||||
const { total, active } = currentTimes.map((times, index) => {
|
||||
const prevTimes = this.cpuTimes[index];
|
||||
const totalCurrent = times.user + times.nice + times.sys + times.idle + times.irq;
|
||||
const totalPrev = prevTimes.user + prevTimes.nice + prevTimes.sys + prevTimes.idle + prevTimes.irq;
|
||||
const totalPrev = (prevTimes?.user ?? 0) + (prevTimes?.nice ?? 0) + (prevTimes?.sys ?? 0) + (prevTimes?.idle ?? 0) + (prevTimes?.irq ?? 0);
|
||||
const activeCurrent = totalCurrent - times.idle;
|
||||
const activePrev = totalPrev - prevTimes.idle;
|
||||
const activePrev = totalPrev - (prevTimes?.idle ?? 0);
|
||||
return {
|
||||
total: totalCurrent - totalPrev,
|
||||
active: activeCurrent - activePrev
|
||||
@@ -49,8 +49,8 @@ export class StatusHelper {
|
||||
this.cpuTimes = currentTimes;
|
||||
return {
|
||||
usage: this.replaceNaN(((active / total) * 100)).toFixed(2),
|
||||
model: os.cpus()[0].model,
|
||||
speed: os.cpus()[0].speed,
|
||||
model: os.cpus()[0]?.model ?? 'none',
|
||||
speed: os.cpus()[0]?.speed ?? 0,
|
||||
core: os.cpus().length
|
||||
};
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
import { hostname, systemName, systemVersion } from '@/common/system';
|
||||
import { NTEventWrapper } from '@/common/event';
|
||||
import { GroupMember, KickedOffLineInfo, SelfInfo, SelfStatusInfo } from '@/core/types';
|
||||
import { KickedOffLineInfo, SelfInfo, SelfStatusInfo } from '@/core/types';
|
||||
import { NapCatConfigLoader } from '@/core/helper/config';
|
||||
import os from 'node:os';
|
||||
import { NodeIKernelMsgListener, NodeIKernelProfileListener } from '@/core/listeners';
|
||||
@@ -58,7 +58,7 @@ export function loadQQWrapper(QQVersion: string): WrapperNodeApi {
|
||||
if (!fs.existsSync(wrapperNodePath)) {
|
||||
wrapperNodePath = path.join(path.dirname(process.execPath), `./resources/app/versions/${QQVersion}/wrapper.node`);
|
||||
}
|
||||
const nativemodule: any = { exports: {} };
|
||||
const nativemodule: { exports: WrapperNodeApi } = { exports: {} as WrapperNodeApi };
|
||||
process.dlopen(nativemodule, wrapperNodePath);
|
||||
return nativemodule.exports;
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ export class WsPacketClient extends IPacketClient {
|
||||
try {
|
||||
await this.connect();
|
||||
return;
|
||||
} catch (error) {
|
||||
} catch {
|
||||
this.reconnectAttempts++;
|
||||
this.logStack.pushLogWarn(`第 ${this.reconnectAttempts}/${this.maxReconnectAttempts} 次尝试重连失败!`);
|
||||
await this.delay(5000);
|
||||
|
@@ -5,11 +5,11 @@ import { OidbPacket } from '@/core/packet/transformer/base';
|
||||
import { PacketLogger } from '@/core/packet/context/loggerContext';
|
||||
import { NapCoreContext } from '@/core/packet/context/napCoreContext';
|
||||
|
||||
type clientPriority = {
|
||||
type clientPriorityType = {
|
||||
[key: number]: (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack) => IPacketClient;
|
||||
}
|
||||
|
||||
const clientPriority: clientPriority = {
|
||||
const clientPriority: clientPriorityType = {
|
||||
10: (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack) => new NativePacketClient(napCore, logger, logStack),
|
||||
1: (napCore: NapCoreContext, logger: PacketLogger, logStack: LogStack) => new WsPacketClient(napCore, logger, logStack),
|
||||
};
|
||||
|
@@ -1,3 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import { LogLevel, LogWrapper } from '@/common/log';
|
||||
import { NapCoreContext } from '@/core/packet/context/napCoreContext';
|
||||
|
||||
|
@@ -61,7 +61,7 @@ export class PacketOperationContext {
|
||||
}
|
||||
status = Number((extBigInt & 0xff00n) + ((extBigInt >> 16n) & 0xffn));
|
||||
return { status: 10, ext_status: status };
|
||||
} catch (e) {
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
@@ -27,7 +27,8 @@ export class PacketHighwayClient {
|
||||
port: number = 80;
|
||||
logger: PacketLogger;
|
||||
|
||||
constructor(sig: PacketHighwaySig, logger: PacketLogger, server: string = 'htdata3.qq.com', port: number = 80) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
constructor(sig: PacketHighwaySig, logger: PacketLogger, _server: string = 'htdata3.qq.com', _port: number = 80) {
|
||||
this.sig = sig;
|
||||
this.logger = logger;
|
||||
}
|
||||
|
@@ -17,7 +17,8 @@ class HighwayTcpUploaderTransform extends stream.Transform {
|
||||
this.offset = 0;
|
||||
}
|
||||
|
||||
_transform(data: Buffer, _: BufferEncoding, callback: stream.TransformCallback) {
|
||||
// eslint-disable-next-line no-undef
|
||||
override _transform(data: Buffer, _: BufferEncoding, callback: stream.TransformCallback) {
|
||||
let chunkOffset = 0;
|
||||
while (chunkOffset < data.length) {
|
||||
const chunkSize = Math.min(BlockSize, data.length - chunkOffset);
|
||||
@@ -60,6 +61,7 @@ export class HighwayTcpUploader extends IHighwayUploader {
|
||||
socket.end();
|
||||
reject(new Error('Upload aborted due to timeout'));
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const [head, _] = Frame.unpack(chunk);
|
||||
handleRspHeader(head);
|
||||
});
|
||||
|
@@ -14,7 +14,6 @@ import {
|
||||
GroupFileExtra
|
||||
} from '@/core/packet/transformer/proto';
|
||||
import {
|
||||
BaseEmojiType,
|
||||
FaceType,
|
||||
NTMsgAtType,
|
||||
PicType,
|
||||
@@ -36,7 +35,8 @@ import { PacketMsg, PacketSendMsgElement } from '@/core/packet/message/message';
|
||||
// raw <-> packet
|
||||
// TODO: SendStructLongMsgElement
|
||||
export abstract class IPacketMsgElement<T extends PacketSendMsgElement> {
|
||||
protected constructor(rawElement: T) {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
protected constructor(_rawElement: T) {
|
||||
}
|
||||
|
||||
get valid(): boolean {
|
||||
@@ -64,7 +64,7 @@ export class PacketMsgTextElement extends IPacketMsgElement<SendTextElement> {
|
||||
this.text = element.textElement.content;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
text: {
|
||||
str: this.text
|
||||
@@ -72,7 +72,7 @@ export class PacketMsgTextElement extends IPacketMsgElement<SendTextElement> {
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return this.text;
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,7 @@ export class PacketMsgAtElement extends PacketMsgTextElement {
|
||||
this.atAll = element.textElement.atType === NTMsgAtType.ATTYPEALL;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
text: {
|
||||
str: this.text,
|
||||
@@ -127,7 +127,7 @@ export class PacketMsgReplyElement extends IPacketMsgElement<SendReplyElement> {
|
||||
return this.messageClientSeq === 0;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
srcMsg: {
|
||||
origSeqs: [this.isGroupReply ? this.messageClientSeq : this.messageSeq],
|
||||
@@ -152,7 +152,7 @@ export class PacketMsgReplyElement extends IPacketMsgElement<SendReplyElement> {
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return '[回复消息]';
|
||||
}
|
||||
}
|
||||
@@ -169,7 +169,7 @@ export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
|
||||
this.isLargeFace = element.faceElement.faceType === FaceType.AniSticke;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
if (this.isLargeFace) {
|
||||
return [{
|
||||
commonElem: {
|
||||
@@ -207,7 +207,7 @@ export class PacketMsgFaceElement extends IPacketMsgElement<SendFaceElement> {
|
||||
}
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return '[表情]';
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ export class PacketMsgMarkFaceElement extends IPacketMsgElement<SendMarketFaceEl
|
||||
this.emojiKey = element.marketFaceElement.key;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
marketFace: {
|
||||
faceName: this.emojiName,
|
||||
@@ -245,7 +245,7 @@ export class PacketMsgMarkFaceElement extends IPacketMsgElement<SendMarketFaceEl
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return `${this.emojiName}`;
|
||||
}
|
||||
}
|
||||
@@ -280,11 +280,11 @@ export class PacketMsgPicElement extends IPacketMsgElement<SendPicElement> {
|
||||
) : element.picElement.summary;
|
||||
}
|
||||
|
||||
get valid(): boolean {
|
||||
override get valid(): boolean {
|
||||
return !!this.msgInfo;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
if (!this.msgInfo) return [];
|
||||
return [{
|
||||
commonElem: {
|
||||
@@ -295,7 +295,7 @@ export class PacketMsgPicElement extends IPacketMsgElement<SendPicElement> {
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return this.summary;
|
||||
}
|
||||
}
|
||||
@@ -318,18 +318,18 @@ export class PacketMsgVideoElement extends IPacketMsgElement<SendVideoElement> {
|
||||
this.fileSize = element.videoElement.fileSize;
|
||||
this.filePath = element.videoElement.filePath;
|
||||
this.thumbSize = element.videoElement.thumbSize;
|
||||
this.thumbPath = element.videoElement.thumbPath?.get(0);
|
||||
this.thumbPath = element.videoElement.thumbPath?.get(0) as string | undefined;
|
||||
this.fileMd5 = element.videoElement.videoMd5;
|
||||
this.thumbMd5 = element.videoElement.thumbMd5;
|
||||
this.thumbWidth = element.videoElement.thumbWidth;
|
||||
this.thumbHeight = element.videoElement.thumbHeight;
|
||||
}
|
||||
|
||||
get valid(): boolean {
|
||||
override get valid(): boolean {
|
||||
return !!this.msgInfo;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
if (!this.msgInfo) return [];
|
||||
return [{
|
||||
commonElem: {
|
||||
@@ -340,7 +340,7 @@ export class PacketMsgVideoElement extends IPacketMsgElement<SendVideoElement> {
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return '[视频]';
|
||||
}
|
||||
}
|
||||
@@ -361,11 +361,11 @@ export class PacketMsgPttElement extends IPacketMsgElement<SendPttElement> {
|
||||
this.fileDuration = Math.round(element.pttElement.duration); // TODO: cc
|
||||
}
|
||||
|
||||
get valid(): boolean {
|
||||
override get valid(): boolean {
|
||||
return false;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [];
|
||||
// if (!this.msgInfo) return [];
|
||||
// return [{
|
||||
@@ -377,7 +377,7 @@ export class PacketMsgPttElement extends IPacketMsgElement<SendPttElement> {
|
||||
// }];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return '[语音]';
|
||||
}
|
||||
}
|
||||
@@ -402,11 +402,11 @@ export class PacketMsgFileElement extends IPacketMsgElement<SendFileElement> {
|
||||
this.fileSize = +element.fileElement.fileSize;
|
||||
}
|
||||
|
||||
get valid(): boolean {
|
||||
override get valid(): boolean {
|
||||
return this.isGroupFile || Boolean(this._e37_800_rsp);
|
||||
}
|
||||
|
||||
buildContent(): Uint8Array | undefined {
|
||||
override buildContent(): Uint8Array | undefined {
|
||||
if (this.isGroupFile || !this._e37_800_rsp) return undefined;
|
||||
return new NapProtoMsg(FileExtra).encode({
|
||||
file: {
|
||||
@@ -437,7 +437,7 @@ export class PacketMsgFileElement extends IPacketMsgElement<SendFileElement> {
|
||||
});
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
if (!this.isGroupFile) return [];
|
||||
const lb = Buffer.alloc(2);
|
||||
const transElemVal = new NapProtoMsg(GroupFileExtra).encode({
|
||||
@@ -464,7 +464,7 @@ export class PacketMsgFileElement extends IPacketMsgElement<SendFileElement> {
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return `[文件]${this.fileName}`;
|
||||
}
|
||||
}
|
||||
@@ -477,7 +477,7 @@ export class PacketMsgLightAppElement extends IPacketMsgElement<SendArkElement>
|
||||
this.payload = element.arkElement.bytesData;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
lightAppElem: {
|
||||
data: Buffer.concat([
|
||||
@@ -488,7 +488,7 @@ export class PacketMsgLightAppElement extends IPacketMsgElement<SendArkElement>
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return '[卡片消息]';
|
||||
}
|
||||
}
|
||||
@@ -501,7 +501,7 @@ export class PacketMsgMarkDownElement extends IPacketMsgElement<SendMarkdownElem
|
||||
this.content = element.markdownElement.content;
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
commonElem: {
|
||||
serviceType: 45,
|
||||
@@ -513,7 +513,7 @@ export class PacketMsgMarkDownElement extends IPacketMsgElement<SendMarkdownElem
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return `[Markdown消息 ${this.content}]`;
|
||||
}
|
||||
}
|
||||
@@ -528,7 +528,7 @@ export class PacketMultiMsgElement extends IPacketMsgElement<SendStructLongMsgEl
|
||||
this.message = message ?? [];
|
||||
}
|
||||
|
||||
buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
override buildElement(): NapProtoEncodeStructType<typeof Elem>[] {
|
||||
return [{
|
||||
lightAppElem: {
|
||||
data: Buffer.concat([
|
||||
@@ -539,7 +539,7 @@ export class PacketMultiMsgElement extends IPacketMsgElement<SendStructLongMsgEl
|
||||
}];
|
||||
}
|
||||
|
||||
toPreview(): string {
|
||||
override toPreview(): string {
|
||||
return '[聊天记录]';
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck
|
||||
export class Sha1Stream {
|
||||
readonly Sha1BlockSize = 64;
|
||||
readonly Sha1DigestSize = 20;
|
||||
|
@@ -16,7 +16,8 @@ export class CalculateStreamBytesTransform extends stream.Transform {
|
||||
this.byteArrayList = [];
|
||||
}
|
||||
|
||||
_transform(chunk: Buffer, _: BufferEncoding, callback: stream.TransformCallback): void {
|
||||
// eslint-disable-next-line no-undef
|
||||
override _transform(chunk: Buffer, _: BufferEncoding, callback: stream.TransformCallback): void {
|
||||
try {
|
||||
this.buffer = Buffer.concat([this.buffer, chunk]);
|
||||
let offset = 0;
|
||||
@@ -37,7 +38,7 @@ export class CalculateStreamBytesTransform extends stream.Transform {
|
||||
}
|
||||
}
|
||||
|
||||
_flush(callback: stream.TransformCallback): void {
|
||||
override _flush(callback: stream.TransformCallback): void {
|
||||
try {
|
||||
if (this.buffer.length > 0) this.sha1.update(this.buffer);
|
||||
const finalDigest = this.sha1.final();
|
||||
|
@@ -1,4 +1,6 @@
|
||||
// love from https://github.com/LagrangeDev/lagrangejs/blob/main/src/core/tea.ts & https://github.com/takayama-lily/oicq/blob/main/lib/core/tea.ts
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-nocheck
|
||||
const BUF7 = Buffer.alloc(7);
|
||||
const deltas = [
|
||||
0x9e3779b9, 0x3c6ef372, 0xdaa66d2b, 0x78dde6e4, 0x1715609d, 0xb54cda56, 0x5384540f, 0xf1bbcdc8, 0x8ff34781,
|
||||
|
@@ -1,47 +1,47 @@
|
||||
export interface NodeIKernelAlbumService {
|
||||
|
||||
setAlbumServiceInfo(...args: any[]): unknown;// needs 3 arguments
|
||||
setAlbumServiceInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
getMainPage(...args: any[]): unknown;// needs 2 arguments
|
||||
getMainPage(...args: unknown[]): unknown;// needs 2 arguments
|
||||
|
||||
getAlbumList(...args: any[]): unknown;// needs 1 arguments
|
||||
getAlbumList(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
getAlbumInfo(...args: any[]): unknown;// needs 1 arguments
|
||||
getAlbumInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
deleteAlbum(...args: any[]): unknown;// needs 3 arguments
|
||||
deleteAlbum(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
addAlbum(...args: any[]): unknown;// needs 2 arguments
|
||||
addAlbum(...args: unknown[]): unknown;// needs 2 arguments
|
||||
|
||||
deleteMedias(...args: any[]): unknown;// needs 4 arguments
|
||||
deleteMedias(...args: unknown[]): unknown;// needs 4 arguments
|
||||
|
||||
modifyAlbum(...args: any[]): unknown;// needs 3 arguments
|
||||
modifyAlbum(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
getMediaList(...args: any[]): unknown;// needs 1 arguments
|
||||
getMediaList(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
quoteToQzone(...args: any[]): unknown;// needs 1 arguments
|
||||
quoteToQzone(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
quoteToQunAlbum(...args: any[]): unknown;// needs 1 arguments
|
||||
quoteToQunAlbum(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
queryQuoteToQunAlbumStatus(...args: any[]): unknown;// needs 1 arguments
|
||||
queryQuoteToQunAlbumStatus(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
getQunFeeds(...args: any[]): unknown;//needs 1 arguments
|
||||
getQunFeeds(...args: unknown[]): unknown;//needs 1 arguments
|
||||
|
||||
getQunFeedDetail(...args: any[]): unknown;// needs 1 arguments
|
||||
getQunFeedDetail(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
getQunNoticeList(...args: any[]): unknown;// needs 4 arguments
|
||||
getQunNoticeList(...args: unknown[]): unknown;// needs 4 arguments
|
||||
|
||||
getQunComment(...args: any[]): unknown;// needs 1 arguments
|
||||
getQunComment(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
getQunLikes(...args: any[]): unknown;// needs 4 arguments
|
||||
getQunLikes(...args: unknown[]): unknown;// needs 4 arguments
|
||||
|
||||
deleteQunFeed(...args: any[]): unknown;// needs 1 arguments
|
||||
deleteQunFeed(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
doQunComment(...args: any[]): unknown;// needs 6 arguments
|
||||
doQunComment(...args: unknown[]): unknown;// needs 6 arguments
|
||||
|
||||
doQunReply(...args: any[]): unknown;// needs 7 arguments
|
||||
doQunReply(...args: unknown[]): unknown;// needs 7 arguments
|
||||
|
||||
doQunLike(...args: any[]): unknown;// needs 5 arguments
|
||||
doQunLike(...args: unknown[]): unknown;// needs 5 arguments
|
||||
|
||||
getRedPoints(...args: any[]): unknown;// needs 3 arguments
|
||||
getRedPoints(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { GeneralCallResult } from './common';
|
||||
|
||||
export interface NodeIKernelCollectionService {
|
||||
addKernelCollectionListener(...args: any[]): void;//needs 1 arguments
|
||||
addKernelCollectionListener(...args: unknown[]): void;//needs 1 arguments
|
||||
|
||||
removeKernelCollectionListener(listenerId: number): void;
|
||||
|
||||
@@ -55,37 +55,37 @@ export interface NodeIKernelCollectionService {
|
||||
}
|
||||
>;
|
||||
|
||||
getCollectionContent(...args: any[]): unknown;//needs 5 arguments
|
||||
getCollectionContent(...args: unknown[]): unknown;//needs 5 arguments
|
||||
|
||||
getCollectionCustomGroupList(...args: any[]): unknown;//needs 0 arguments
|
||||
getCollectionCustomGroupList(...args: unknown[]): unknown;//needs 0 arguments
|
||||
|
||||
getCollectionUserInfo(...args: any[]): unknown;//needs 0 arguments
|
||||
getCollectionUserInfo(...args: unknown[]): unknown;//needs 0 arguments
|
||||
|
||||
searchCollectionItemList(...args: any[]): unknown;//needs 2 arguments
|
||||
searchCollectionItemList(...args: unknown[]): unknown;//needs 2 arguments
|
||||
|
||||
addMsgToCollection(...args: any[]): unknown;//needs 2 arguments
|
||||
addMsgToCollection(...args: unknown[]): unknown;//needs 2 arguments
|
||||
|
||||
collectionArkShare(...args: any[]): unknown;//needs 1 arguments
|
||||
collectionArkShare(...args: unknown[]): unknown;//needs 1 arguments
|
||||
|
||||
collectionFileForward(...args: any[]): unknown;//needs 3 arguments
|
||||
collectionFileForward(...args: unknown[]): unknown;//needs 3 arguments
|
||||
|
||||
downloadCollectionFile(...args: any[]): unknown;//needs 4 arguments
|
||||
downloadCollectionFile(...args: unknown[]): unknown;//needs 4 arguments
|
||||
|
||||
downloadCollectionFileThumbPic(...args: any[]): unknown;//needs 4 arguments
|
||||
downloadCollectionFileThumbPic(...args: unknown[]): unknown;//needs 4 arguments
|
||||
|
||||
downloadCollectionPic(...args: any[]): unknown;//needs 3 arguments
|
||||
downloadCollectionPic(...args: unknown[]): unknown;//needs 3 arguments
|
||||
|
||||
cancelDownloadCollectionFile(...args: any[]): unknown;//needs 1 arguments
|
||||
cancelDownloadCollectionFile(...args: unknown[]): unknown;//needs 1 arguments
|
||||
|
||||
deleteCollectionItemList(...args: any[]): unknown;//needs 1 arguments
|
||||
deleteCollectionItemList(...args: unknown[]): unknown;//needs 1 arguments
|
||||
|
||||
editCollectionItem(...args: any[]): unknown;//needs 2 arguments
|
||||
editCollectionItem(...args: unknown[]): unknown;//needs 2 arguments
|
||||
|
||||
getEditPicInfoByPath(...args: any[]): unknown;//needs 1 arguments
|
||||
getEditPicInfoByPath(...args: unknown[]): unknown;//needs 1 arguments
|
||||
|
||||
collectionFastUpload(...args: any[]): unknown;//needs 1 arguments
|
||||
collectionFastUpload(...args: unknown[]): unknown;//needs 1 arguments
|
||||
|
||||
editCollectionItemAfterFastUpload(...args: any[]): unknown;//needs 2 arguments
|
||||
editCollectionItemAfterFastUpload(...args: unknown[]): unknown;//needs 2 arguments
|
||||
|
||||
createNewCollectionItem(...args: any[]): unknown;//needs 1 arguments
|
||||
createNewCollectionItem(...args: unknown[]): unknown;//needs 1 arguments
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ export interface NodeIKernelGroupService {
|
||||
getAllGroupPrivilegeFlag(troopUinList: string[], serviceType: number): Promise<unknown>;
|
||||
// <---
|
||||
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, any> } }>;
|
||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, unknown> } }>;
|
||||
|
||||
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||
|
||||
@@ -153,7 +153,7 @@ export interface NodeIKernelGroupService {
|
||||
|
||||
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req
|
||||
|
||||
getGroupAllInfo(groupId: string, sourceId: number): Promise<any>;
|
||||
getGroupAllInfo(groupId: string, sourceId: number): Promise<unknown>;
|
||||
|
||||
getDiscussExistInfo(): unknown;
|
||||
|
||||
@@ -213,7 +213,7 @@ export interface NodeIKernelGroupService {
|
||||
|
||||
deleteGroupBulletin(groupCode: string, seq: string, noticeId: string): void;
|
||||
|
||||
publishGroupBulletin(groupCode: string, pskey: string, data: any): Promise<GeneralCallResult>;
|
||||
publishGroupBulletin(groupCode: string, pskey: string, data: unknown): Promise<GeneralCallResult>;
|
||||
|
||||
publishInstructionForNewcomers(groupCode: string, arg: unknown): void;
|
||||
|
||||
|
@@ -82,7 +82,7 @@ export interface NodeIKernelLoginService {
|
||||
|
||||
quickLoginWithUin(uin: string): Promise<QuickLoginResult>;
|
||||
|
||||
passwordLogin(param: PasswordLoginArgType): Promise<any>;
|
||||
passwordLogin(param: PasswordLoginArgType): Promise<unknown>;
|
||||
|
||||
getQRCodePicture(): boolean;
|
||||
}
|
||||
|
@@ -3,25 +3,25 @@ export interface NodeIKernelMsgBackupService {
|
||||
|
||||
removeKernelMsgBackupListener(listenerId: number): void;
|
||||
|
||||
getMsgBackupLocation(...args: any[]): unknown;// needs 0 arguments
|
||||
getMsgBackupLocation(...args: unknown[]): unknown;// needs 0 arguments
|
||||
|
||||
setMsgBackupLocation(...args: any[]): unknown;// needs 1 arguments
|
||||
setMsgBackupLocation(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
requestMsgBackup(...args: any[]): unknown;// needs 0 arguments
|
||||
requestMsgBackup(...args: unknown[]): unknown;// needs 0 arguments
|
||||
|
||||
requestMsgRestore(...args: any[]): unknown;// needs 1 arguments
|
||||
requestMsgRestore(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
requestMsgMigrate(...args: any[]): unknown;// needs 1 arguments
|
||||
requestMsgMigrate(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
getLocalStorageBackup(...args: any[]): unknown;// needs 0 arguments
|
||||
getLocalStorageBackup(...args: unknown[]): unknown;// needs 0 arguments
|
||||
|
||||
deleteLocalBackup(...args: any[]): unknown;// needs 1 arguments
|
||||
deleteLocalBackup(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
clearCache(...args: any[]): unknown;// needs 0 arguments
|
||||
clearCache(...args: unknown[]): unknown;// needs 0 arguments
|
||||
|
||||
start(...args: any[]): unknown;// needs 1 arguments
|
||||
start(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
stop(...args: any[]): unknown;// needs 1 arguments
|
||||
stop(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
pause(...args: any[]): unknown;// needs 2 arguments
|
||||
pause(...args: unknown[]): unknown;// needs 2 arguments
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
addKernelMsgListener(nodeIKernelMsgListener: NodeIKernelMsgListener): number;
|
||||
|
||||
sendMsg(msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<any, any>): Promise<GeneralCallResult>;
|
||||
sendMsg(msgId: string, peer: Peer, msgElements: SendMessageElement[], map: Map<unknown, unknown>): Promise<GeneralCallResult>;
|
||||
|
||||
recallMsg(peer: Peer, msgIds: string[]): Promise<GeneralCallResult>;
|
||||
|
||||
@@ -114,9 +114,9 @@ export interface NodeIKernelMsgService {
|
||||
|
||||
addLocalTofuRecordMsg(...args: unknown[]): unknown;
|
||||
|
||||
addLocalRecordMsg(Peer: Peer, msgId: string, ele: MessageElement, attr: Array<any> | number, front: boolean): Promise<unknown>;
|
||||
addLocalRecordMsg(Peer: Peer, msgId: string, ele: MessageElement, attr: Array<unknown> | number, front: boolean): Promise<unknown>;
|
||||
|
||||
deleteMsg(Peer: Peer, msgIds: Array<string>): Promise<any>;
|
||||
deleteMsg(Peer: Peer, msgIds: Array<string>): Promise<unknown>;
|
||||
|
||||
updateElementExtBufForUI(...args: unknown[]): unknown;
|
||||
|
||||
|
@@ -30,7 +30,7 @@ export interface NodeIKernelOnlineStatusService {
|
||||
checkLikeStatus(param: {
|
||||
businessType: number,
|
||||
uins: string[]
|
||||
}): Promise<any>;
|
||||
}): Promise<unknown>;
|
||||
|
||||
isNull(): boolean;
|
||||
}
|
||||
|
@@ -3,11 +3,11 @@ import { BizKey, ModifyProfileParams, NodeIKernelProfileListener, ProfileBizType
|
||||
import { GeneralCallResult } from '@/core/services/common';
|
||||
|
||||
export interface NodeIKernelProfileService {
|
||||
getOtherFlag(callfrom: string, uids: string[]): Promise<Map<string, any>>;
|
||||
getOtherFlag(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getVasInfo(callfrom: string, uids: string[]): Promise<Map<string, any>>;
|
||||
getVasInfo(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getRelationFlag(callfrom: string, uids: string[]): Promise<Map<string, any>>;
|
||||
getRelationFlag(callfrom: string, uids: string[]): Promise<Map<string, unknown>>;
|
||||
|
||||
getUidByUin(callfrom: string, uin: Array<string>): Map<string, string>;
|
||||
|
||||
@@ -70,7 +70,7 @@ export interface NodeIKernelProfileService {
|
||||
getProfileQzonePicInfo(uid: string, type: number, force: boolean): Promise<unknown>;
|
||||
|
||||
// UserRemarkServiceImpl::getStrangerRemarkByUid []
|
||||
getCoreInfo(sceneId: string, arg: any[]): unknown;
|
||||
getCoreInfo(sceneId: string, arg: unknown[]): unknown;
|
||||
|
||||
isNull(): boolean;
|
||||
}
|
||||
|
@@ -20,10 +20,10 @@ export interface NodeIKernelRecentContactService {
|
||||
errMsg: string,
|
||||
sortedContactList: Array<number>,
|
||||
changedList: Array<{
|
||||
remark: any;
|
||||
peerName: any;
|
||||
sendMemberName: any;
|
||||
sendNickName: any;
|
||||
remark: unknown;
|
||||
peerName: unknown;
|
||||
sendMemberName: unknown;
|
||||
sendNickName: unknown;
|
||||
peerUid: string; peerUin: string, msgTime: string, chatType: ChatType, msgId: string
|
||||
}>
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export interface NodeIKernelRecentContactService {
|
||||
|
||||
deleteRecentContactsVer2(...args: unknown[]): unknown; // 1 arguments
|
||||
|
||||
getRecentContactList(): Promise<any>;
|
||||
getRecentContactList(): Promise<unknown>;
|
||||
|
||||
getMsgUnreadCount(): unknown;
|
||||
|
||||
|
@@ -158,7 +158,7 @@ export interface NodeIKernelRichMediaService {
|
||||
downloadFileForFileInfo(fileInfo: CommonFileInfo[], savePath: string): unknown;
|
||||
|
||||
createGroupFolder(GroupCode: string, FolderName: string): Promise<GeneralCallResult & {
|
||||
resultWithGroupItem: { result: any, groupItem: Array<any> }
|
||||
resultWithGroupItem: { result: unknown, groupItem: Array<unknown> }
|
||||
}>;
|
||||
|
||||
downloadFile(commonFile: CommonFileInfo, arg2: unknown, arg3: unknown, savePath: string): unknown;
|
||||
@@ -217,9 +217,9 @@ export interface NodeIKernelRichMediaService {
|
||||
|
||||
deleteGroupFile(GroupCode: string, params: Array<number>, Files: Array<string>): Promise<GeneralCallResult & {
|
||||
transGroupFileResult: {
|
||||
result: any
|
||||
successFileIdList: Array<any>
|
||||
failFileIdList: Array<any>
|
||||
result: unknown
|
||||
successFileIdList: Array<unknown>
|
||||
failFileIdList: Array<unknown>
|
||||
}
|
||||
}>;
|
||||
|
||||
|
@@ -29,7 +29,7 @@ export interface NodeIKernelRobotService {
|
||||
|
||||
setRobotPickTts(arg1: unknown, arg2: unknown): unknown;
|
||||
|
||||
getRobotUinRange(data: any): Promise<{ response: { robotUinRanges: any } }>;
|
||||
getRobotUinRange(data: unknown): Promise<{ response: { robotUinRanges: Array<unknown> } }>;
|
||||
|
||||
isNull(): boolean;
|
||||
}
|
||||
|
@@ -18,65 +18,65 @@ export interface NodeIKernelSearchService {
|
||||
|
||||
searchLocalInfo(keywords: string, type: number/*4*/): unknown;
|
||||
|
||||
cancelSearchLocalInfo(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchLocalInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchBuddyChatInfo(...args: any[]): unknown;// needs 2 arguments
|
||||
searchBuddyChatInfo(...args: unknown[]): unknown;// needs 2 arguments
|
||||
|
||||
searchMoreBuddyChatInfo(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreBuddyChatInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchBuddyChatInfo(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchBuddyChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchContact(...args: any[]): unknown;// needs 2 arguments
|
||||
searchContact(...args: unknown[]): unknown;// needs 2 arguments
|
||||
|
||||
searchMoreContact(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreContact(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchContact(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchContact(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchGroupChatInfo(...args: any[]): unknown;// needs 3 arguments
|
||||
searchGroupChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
resetSearchGroupChatInfoSortType(...args: any[]): unknown;// needs 3 arguments
|
||||
resetSearchGroupChatInfoSortType(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
resetSearchGroupChatInfoFilterMembers(...args: any[]): unknown;// needs 3 arguments
|
||||
resetSearchGroupChatInfoFilterMembers(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchMoreGroupChatInfo(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreGroupChatInfo(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchGroupChatInfo(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchGroupChatInfo(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchChatsWithKeywords(...args: any[]): unknown;// needs 3 arguments
|
||||
searchChatsWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchMoreChatsWithKeywords(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreChatsWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchChatsWithKeywords(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatsWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchChatMsgs(...args: any[]): unknown;// needs 2 arguments
|
||||
searchChatMsgs(...args: unknown[]): unknown;// needs 2 arguments
|
||||
|
||||
searchMoreChatMsgs(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreChatMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchChatMsgs(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatMsgs(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchMsgWithKeywords(...args: any[]): unknown;// needs 2 arguments
|
||||
searchMsgWithKeywords(...args: unknown[]): unknown;// needs 2 arguments
|
||||
|
||||
searchMoreMsgWithKeywords(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreMsgWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchMsgWithKeywords(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchMsgWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchFileWithKeywords(keywords: string[], source: number): Promise<string>;// needs 2 arguments
|
||||
|
||||
searchMoreFileWithKeywords(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreFileWithKeywords(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchFileWithKeywords(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchFileWithKeywords(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchAtMeChats(...args: any[]): unknown;// needs 3 arguments
|
||||
searchAtMeChats(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchMoreAtMeChats(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreAtMeChats(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchAtMeChats(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchAtMeChats(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
searchChatAtMeMsgs(...args: any[]): unknown;// needs 1 arguments
|
||||
searchChatAtMeMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
searchMoreChatAtMeMsgs(...args: any[]): unknown;// needs 1 arguments
|
||||
searchMoreChatAtMeMsgs(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
cancelSearchChatAtMeMsgs(...args: any[]): unknown;// needs 3 arguments
|
||||
cancelSearchChatAtMeMsgs(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
addSearchHistory(param: {
|
||||
type: number,//4
|
||||
@@ -127,10 +127,10 @@ export interface NodeIKernelSearchService {
|
||||
id?: number
|
||||
}>;
|
||||
|
||||
removeSearchHistory(...args: any[]): unknown;// needs 1 arguments
|
||||
removeSearchHistory(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
searchCache(...args: any[]): unknown;// needs 3 arguments
|
||||
searchCache(...args: unknown[]): unknown;// needs 3 arguments
|
||||
|
||||
clearSearchCache(...args: any[]): unknown;// needs 1 arguments
|
||||
clearSearchCache(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
}
|
||||
|
@@ -3,6 +3,6 @@ export interface NodeIKernelTianShuService {
|
||||
|
||||
removeKernelTianShuListener(listenerId:number): void;
|
||||
|
||||
reportTianShuNumeralRed(...args: any[]): unknown;// needs 1 arguments
|
||||
reportTianShuNumeralRed(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
}
|
||||
|
@@ -4,11 +4,11 @@ export interface NodeIKernelUnitedConfigService {
|
||||
|
||||
removeKernelUnitedConfigListener(listenerId:number): void;
|
||||
|
||||
fetchUnitedSwitchConfig(...args: any[]): unknown;// needs 1 arguments
|
||||
fetchUnitedSwitchConfig(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
isUnitedConfigSwitchOn(...args: any[]): unknown;// needs 1 arguments
|
||||
isUnitedConfigSwitchOn(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
registerUnitedConfigPushGroupList(...args: any[]): unknown;// needs 1 arguments
|
||||
registerUnitedConfigPushGroupList(...args: unknown[]): unknown;// needs 1 arguments
|
||||
|
||||
fetchUnitedCommendConfig(ids: `${string}`[]): void
|
||||
|
||||
|
@@ -94,7 +94,7 @@ export interface VideoElement {
|
||||
thumbHeight?: number;
|
||||
busiType?: 0; //
|
||||
subBusiType?: 0; // 未知
|
||||
thumbPath?: Map<number, any>;
|
||||
thumbPath?: Map<number, unknown>;
|
||||
transferStatus?: 0; // 未知
|
||||
progress?: 0; // 下载进度?
|
||||
invalidState?: 0; // 未知
|
||||
|
5
src/core/types/file.ts
Normal file
5
src/core/types/file.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface rkeyDataType {
|
||||
private_rkey: string;
|
||||
group_rkey: string;
|
||||
online_rkey: boolean;
|
||||
};
|
@@ -33,7 +33,7 @@ export interface GroupDetailInfo {
|
||||
groupQuestion: string;
|
||||
certType: number;
|
||||
richFingerMemo: string;
|
||||
tagRecord: any[];
|
||||
tagRecord: unknown[];
|
||||
shutUpAllTimestamp: number;
|
||||
shutUpMeTimestamp: number;
|
||||
groupTypeFlag: number;
|
||||
@@ -73,7 +73,7 @@ export interface GroupDetailInfo {
|
||||
cmdUinFlagExt3Grocery: number;
|
||||
groupCardPrefix: {
|
||||
introduction: string;
|
||||
rptPrefix: any[];
|
||||
rptPrefix: unknown[];
|
||||
};
|
||||
groupExt: {
|
||||
groupInfoExtSeq: number;
|
||||
@@ -102,13 +102,13 @@ export interface GroupDetailInfo {
|
||||
showPlayTogetherSwitch: number;
|
||||
groupFlagPro1: string;
|
||||
groupBindGuildIds: {
|
||||
guildIds: any[];
|
||||
guildIds: unknown[];
|
||||
};
|
||||
viewedMsgDisappearTime: string;
|
||||
groupExtFlameData: {
|
||||
switchState: number;
|
||||
state: number;
|
||||
dayNums: any[];
|
||||
dayNums: unknown[];
|
||||
version: number;
|
||||
updateTime: string;
|
||||
isDisplayDayNum: boolean;
|
||||
@@ -116,7 +116,7 @@ export interface GroupDetailInfo {
|
||||
groupBindGuildSwitch: number;
|
||||
groupAioBindGuildId: string;
|
||||
groupExcludeGuildIds: {
|
||||
guildIds: any[];
|
||||
guildIds: unknown[];
|
||||
};
|
||||
fullGroupExpansionSwitch: number;
|
||||
fullGroupExpansionSeq: string;
|
||||
@@ -157,10 +157,10 @@ export interface GroupDetailInfo {
|
||||
headPortraitSeq: number;
|
||||
groupHeadPortrait: {
|
||||
portraitCnt: number;
|
||||
portraitInfo: any[];
|
||||
portraitInfo: unknown[];
|
||||
defaultId: number;
|
||||
verifyingPortraitCnt: number;
|
||||
verifyingPortraitInfo: any[];
|
||||
verifyingPortraitInfo: unknown[];
|
||||
};
|
||||
cmdUinJoinMsgSeq: number;
|
||||
cmdUinJoinRealMsgSeq: number;
|
||||
|
@@ -77,7 +77,7 @@ interface VideoInfo {
|
||||
// 扩展在线业务信息
|
||||
interface ExtOnlineBusinessInfo {
|
||||
buf: string;
|
||||
customStatus: any;
|
||||
customStatus: unknown;
|
||||
videoBizInfo: VideoBizInfo;
|
||||
videoInfo: VideoInfo;
|
||||
}
|
||||
@@ -97,7 +97,7 @@ interface UserStatus {
|
||||
termType: number;
|
||||
netType: number;
|
||||
iconType: number;
|
||||
customStatus: any;
|
||||
customStatus: unknown;
|
||||
setTime: string;
|
||||
specialFlag: number;
|
||||
abiFlag: number;
|
||||
@@ -112,8 +112,8 @@ interface UserStatus {
|
||||
// 特权图标
|
||||
interface PrivilegeIcon {
|
||||
jumpUrl: string;
|
||||
openIconList: any[];
|
||||
closeIconList: any[];
|
||||
openIconList: unknown[];
|
||||
closeIconList: unknown[];
|
||||
}
|
||||
|
||||
// 增值服务信息
|
||||
@@ -137,7 +137,7 @@ interface VasInfo {
|
||||
fontEffect: number;
|
||||
newLoverDiamondFlag: number;
|
||||
extendNameplateId: number;
|
||||
diyNameplateIDs: any[];
|
||||
diyNameplateIDs: unknown[];
|
||||
vipStartFlag: number;
|
||||
vipDataFlag: number;
|
||||
gameNameplateId: string;
|
||||
@@ -183,7 +183,7 @@ interface CommonExt {
|
||||
address: string;
|
||||
regTime: number;
|
||||
interest: string;
|
||||
labels: any[];
|
||||
labels: string[];
|
||||
qqLevel: QQLevel;
|
||||
}
|
||||
|
||||
@@ -214,8 +214,8 @@ export interface SimpleInfo {
|
||||
status: UserStatus | null;
|
||||
vasInfo: VasInfo | null;
|
||||
relationFlags: RelationFlags | null;
|
||||
otherFlags: any;
|
||||
intimate: any;
|
||||
otherFlags: unknown;
|
||||
intimate: unknown;
|
||||
}
|
||||
|
||||
// 好友类型
|
||||
@@ -229,7 +229,7 @@ export interface SelfStatusInfo {
|
||||
termType: number;
|
||||
netType: number;
|
||||
iconType: number;
|
||||
customStatus: any;
|
||||
customStatus: unknown;
|
||||
setTime: string;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ export interface ModifyProfileParams {
|
||||
longNick: string;
|
||||
sex: NTSex;
|
||||
birthday: { birthday_year: string, birthday_month: string, birthday_day: string };
|
||||
location: any;
|
||||
location: unknown;
|
||||
}
|
||||
|
||||
// 好友资料点赞请求
|
||||
|
@@ -46,7 +46,7 @@ export interface WebApiGroupMemberRet {
|
||||
em: string;
|
||||
cache: number;
|
||||
adm_num: number;
|
||||
levelname: any;
|
||||
levelname: string;
|
||||
mems: WebApiGroupMember[];
|
||||
count: number;
|
||||
svr_time: number;
|
||||
@@ -99,7 +99,7 @@ export interface WebApiGroupNoticeRet {
|
||||
sta: number,
|
||||
gln: number
|
||||
tst: number,
|
||||
ui: any
|
||||
ui: unknown
|
||||
server_time: number
|
||||
svrt: number
|
||||
ad: number
|
||||
@@ -115,7 +115,7 @@ export interface GroupEssenceMsg {
|
||||
add_digest_uin: string;
|
||||
add_digest_nick: string;
|
||||
add_digest_time: number;
|
||||
msg_content: any[];
|
||||
msg_content: unknown[];
|
||||
can_be_removed: true;
|
||||
}
|
||||
|
||||
|
@@ -71,7 +71,7 @@ export interface NodeQQNTWrapperUtil {
|
||||
|
||||
getPinyin(arg0: string, arg1: boolean): unknown;
|
||||
|
||||
matchInPinyin(arg0: any[], arg1: string): unknown; //参数特复杂 arg0是个复杂数据类型
|
||||
matchInPinyin(arg0: unknown[], arg1: string): unknown; //参数特复杂 arg0是个复杂数据类型
|
||||
|
||||
makeDirByPath(arg0: string): unknown;
|
||||
|
||||
@@ -91,7 +91,7 @@ export interface NodeQQNTWrapperUtil {
|
||||
|
||||
resetUserDataSavePathToDocument(): unknown;
|
||||
|
||||
getSoBuildInfo(): any; //例如 0[0]_d491dc01e0a_0
|
||||
getSoBuildInfo(): unknown; //例如 0[0]_d491dc01e0a_0
|
||||
|
||||
registerCountInstruments(arg0: string, arg1: string[], arg2: number, arg3: number): unknown;
|
||||
|
||||
@@ -123,9 +123,9 @@ export interface NodeQQNTWrapperUtil {
|
||||
|
||||
checkNewUserDataSaveDirAvailable(arg0: string): unknown;
|
||||
|
||||
copyUserData(arg0: string, arg1: string): Promise<any>;
|
||||
copyUserData(arg0: string, arg1: string): Promise<unknown>;
|
||||
|
||||
setUserDataSaveDirectory(arg0: string): Promise<any>;
|
||||
setUserDataSaveDirectory(arg0: string): Promise<unknown>;
|
||||
|
||||
hasOtherRunningQQProcess(): boolean;
|
||||
|
||||
|
Reference in New Issue
Block a user