This commit is contained in:
seb
2026-08-02 19:04:56 +02:00
parent bfb1d8762a
commit aed0857f23
21 changed files with 1953 additions and 0 deletions

View File

@@ -39,3 +39,23 @@ export async function setPricesBySku(googleAuthId, sku, prices) {
const store = await getStore();
return store.article.setPricesBySku(googleAuthId, sku, prices);
}
export async function setEansBySku(googleAuthId, sku, eans) {
const store = await getStore();
return store.article.setEansBySku(googleAuthId, sku, eans);
}
export async function setBrandIdBySku(googleAuthId, sku, brandId) {
const store = await getStore();
return store.article.setBrandIdBySku(googleAuthId, sku, brandId);
}
export async function setWeightBySku(googleAuthId, sku, weight) {
const store = await getStore();
return store.article.setWeightBySku(googleAuthId, sku, weight);
}
export async function setCategoryIdsBySku(googleAuthId, sku, categoryIds) {
const store = await getStore();
return store.article.setCategoryIdsBySku(googleAuthId, sku, categoryIds);
}

16
src/db/brand.js Normal file
View File

@@ -0,0 +1,16 @@
import { getStore } from './store.js';
export async function list(googleAuthId, companyId) {
const store = await getStore();
return store.brand.list(googleAuthId, companyId);
}
export async function upsert(googleAuthId, companyId, data) {
const store = await getStore();
return store.brand.upsert(googleAuthId, companyId, data);
}
export async function remove(googleAuthId, companyId, id) {
const store = await getStore();
return store.brand.delete(googleAuthId, companyId, id);
}

View File

@@ -19,3 +19,8 @@ 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 });
}

View File

@@ -14,6 +14,7 @@ const STORE_NAMESPACES = [
'article',
'pic',
'unit',
'brand',
'lang',
'tax',
'google_auth',