mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
Refine NodeIKernel service interfaces (#1619)
Add multiple NodeIKernel service interface files and tighten up method signatures and types across napcat-core. New interfaces added (e.g. NodeIKernelAVSDKService, NodeIKernelAddBuddyService, NodeIKernelBdhUploadService, NodeIKernelConfigMgrService, NodeIKernelDirectSessionService, NodeIKernelEmojiService, NodeIKernelFeedService, NodeIKernelFileBridgeClientService, NodeIKernelFileBridgeHostService, etc.). Updated existing interfaces with clearer parameter and return types, consistent spacing/semicolons, improved complex return shapes (AlbumService, CollectionService), listener methods, isNull checks, and many other method signature refinements (Avatar, Buddy, DbTools, ECDH, FileAssistant, FlashTransfer, GroupService, and more) to improve type safety and readability.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user