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

Function getPageStoreInterface

src/renderer/src/stores/pagesStore.ts:158–179  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156 * 获取页面 Store 的接口实现
157 */
158export function getPageStoreInterface(): IPageStore {
159 const store = usePagesStore
160 return {
161 get initialized() {
162 return store.getState().initialized
163 },
164 get pages() {
165 return store.getState().pages
166 },
167 init: () => store.getState().init(),
168 reset: () => store.getState().reset(),
169 getById: (id) => store.getState().getById(id),
170 getAll: () => store.getState().getAll(),
171 create: (data) => store.getState().create(data),
172 createMany: (data) => store.getState().createMany(data),
173 update: (id, changes) => store.getState().update(id, changes),
174 updateMany: (updates) => store.getState().updateMany(updates),
175 delete: (id) => store.getState().delete(id),
176 deleteMany: (ids) => store.getState().deleteMany(ids),
177 findByFolderId: (folderId) => store.getState().findByFolderId(folderId)
178 }
179}

Callers 1

initStoresFunction · 0.90

Calls 11

createMethod · 0.80
createManyMethod · 0.80
updateManyMethod · 0.80
deleteManyMethod · 0.80
findByFolderIdMethod · 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