import { getStore } from './store.js'; export async function getTreeForCompany(googleAuthId, companyId) { const store = await getStore(); return store.category.getTreeForCompany(googleAuthId, companyId); } export async function createUnderParent({ googleAuthId, parentId, name }) { const store = await getStore(); return store.category.createUnderParent({ googleAuthId, parentId, name }); } export async function deleteCategory({ googleAuthId, id }) { const store = await getStore(); await store.category.delete({ googleAuthId, id }); } export async function getCategoryArticles(googleAuthId, categoryId) { const store = await getStore(); return store.category.getCategoryArticles(googleAuthId, categoryId); } export async function rename({ googleAuthId, id, name }) { const store = await getStore(); return store.category.rename({ googleAuthId, id, name }); } export async function order({ googleAuthId, parentId, categoryIds }) { const store = await getStore(); return store.category.order({ googleAuthId, parentId, categoryIds }); } export async function move({ googleAuthId, id, parentId }) { const store = await getStore(); return store.category.move({ googleAuthId, id, parentId }); } export async function addImage(googleAuthId, categoryId, imageBuffer) { const store = await getStore(); return store.category.addImage(googleAuthId, categoryId, imageBuffer); } export async function deleteImage(googleAuthId, categoryId) { const store = await getStore(); return store.category.deleteImage(googleAuthId, categoryId); }