Feat(Electron-store): Add electron store
Add electron store to support install tool
This commit is contained in:
78
src/main/global.d.ts
vendored
78
src/main/global.d.ts
vendored
@@ -11,3 +11,81 @@ interface ImportMetaEnv {
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
|
||||
interface StoreSchema {
|
||||
installedTools: Record<string, Record<Platform, ToolVo>>
|
||||
}
|
||||
|
||||
interface ToolVo {
|
||||
id: string
|
||||
name: string
|
||||
toolId: string
|
||||
icon: string
|
||||
platform: Platform
|
||||
description: string
|
||||
base: ToolBaseVo
|
||||
author: UserWithInfoVo
|
||||
ver: string
|
||||
keywords: string[]
|
||||
categories: ToolCategoryVo[]
|
||||
source: ToolDataVo
|
||||
dist: ToolDataVo
|
||||
entryPoint: string
|
||||
publish: string
|
||||
review: 'NONE' | 'PROCESSING' | 'PASS' | 'REJECT'
|
||||
createTime: string
|
||||
updateTime: string
|
||||
favorite: boolean
|
||||
}
|
||||
|
||||
interface ToolBaseVo {
|
||||
id: string
|
||||
name: string
|
||||
source: ToolDataVo
|
||||
dist: ToolDataVo
|
||||
platform: Platform
|
||||
compiled: boolean
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
interface ToolDataVo {
|
||||
id: string
|
||||
data?: string
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
interface UserWithInfoVo {
|
||||
id: string
|
||||
username: string
|
||||
twoFactor: boolean
|
||||
verified: boolean
|
||||
locking: boolean
|
||||
expiration: string
|
||||
credentialsExpiration: string
|
||||
enable: boolean
|
||||
currentLoginTime: string
|
||||
currentLoginIp: string
|
||||
lastLoginTime: string
|
||||
lastLoginIp: string
|
||||
createTime: string
|
||||
updateTime: string
|
||||
userInfo: UserInfoVo
|
||||
}
|
||||
|
||||
interface UserInfoVo {
|
||||
id: string
|
||||
userId: string
|
||||
nickname: string
|
||||
avatar: string
|
||||
email: string
|
||||
}
|
||||
|
||||
interface ToolCategoryVo {
|
||||
id: string
|
||||
name: string
|
||||
enable: boolean
|
||||
createTime: string
|
||||
updateTime: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user