MCPcopy Create free account
hub / github.com/experdot/pointer / getFolderStoreInterface

Function getFolderStoreInterface

src/renderer/src/stores/foldersStore.ts:161–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

159 * 获取文件夹 Store 的接口实现
160 */
161export function getFolderStoreInterface(): IFolderStore {
162 const store = useFoldersStore
163 return {
164 get initialized() {
165 return store.getState().initialized
166 },
167 get folders() {
168 return store.getState().folders
169 },
170 init: () => store.getState().init(),
171 reset: () => store.getState().reset(),
172 getById: (id) => store.getState().getById(id),
173 getAll: () => store.getState().getAll(),
174 create: (data) => store.getState().create(data),
175 createMany: (data) => store.getState().createMany(data),
176 update: (id, changes) => store.getState().update(id, changes),
177 updateMany: (updates) => store.getState().updateMany(updates),
178 delete: (id) => store.getState().delete(id),
179 deleteMany: (ids) => store.getState().deleteMany(ids),
180 findByParentId: (parentId) => store.getState().findByParentId(parentId),
181 toggleExpanded: (id) => store.getState().toggleExpanded(id)
182 }
183}

Callers 1

initStoresFunction · 0.90

Calls 12

createMethod · 0.80
createManyMethod · 0.80
updateManyMethod · 0.80
deleteManyMethod · 0.80
findByParentIdMethod · 0.80
toggleExpandedMethod · 0.80
initMethod · 0.65
resetMethod · 0.65
getByIdMethod · 0.65
getAllMethod · 0.65
updateMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected