diff --git a/src/core/apis/cache.ts b/src/core/apis/cache.ts deleted file mode 100644 index 64bdddd0..00000000 --- a/src/core/apis/cache.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { - CacheFileListItem, - CacheFileType, - ChatCacheListItemBasic, - ChatType, - InstanceContext, - NapCatCore, -} from '@/core'; - -export class NTQQCacheApi { - context: InstanceContext; - core: NapCatCore; - - constructor(context: InstanceContext, core: NapCatCore) { - this.context = context; - this.core = core; - } - - async setCacheSilentScan(isSilent: boolean = true) { - return ''; - } - - getCacheSessionPathList() { - return ''; - } - - clearCache(cacheKeys: Array = ['tmp', 'hotUpdate']) { - // 参数未验证 - return this.context.session.getStorageCleanService().clearCacheDataByKeys(cacheKeys); - } - - addCacheScannedPaths(pathMap: object = {}) { - return this.context.session.getStorageCleanService().addCacheScanedPaths(pathMap); - } - - scanCache() { - //return (await this.context.session.getStorageCleanService().scanCache()).size; - } - - getHotUpdateCachePath() { - // 未实现 - return ''; - } - - getDesktopTmpPath() { - // 未实现 - return ''; - } - - getChatCacheList(type: ChatType, pageSize: number = 1000, pageIndex: number = 0) { - return this.context.session.getStorageCleanService().getChatCacheInfo(type, pageSize, 1, pageIndex); - } - - getFileCacheInfo(fileType: CacheFileType, pageSize: number = 1000, lastRecord?: CacheFileListItem) { - // const _lastRecord = lastRecord ? lastRecord : { fileType: fileType }; - // 需要五个参数 - // return napCatCore.session.getStorageCleanService().getFileCacheInfo(); - } - - async clearChatCache(chats: ChatCacheListItemBasic[] = [], fileKeys: string[] = []) { - return this.context.session.getStorageCleanService().clearChatCacheInfo(chats, fileKeys); - } -} diff --git a/src/core/apis/index.ts b/src/core/apis/index.ts index 19b444dc..4c0619e3 100644 --- a/src/core/apis/index.ts +++ b/src/core/apis/index.ts @@ -5,5 +5,4 @@ export * from './msg'; export * from './user'; export * from './webapi'; export * from './sign'; -export * from './system'; -export * from './cache'; +export * from './system'; \ No newline at end of file