This commit is contained in:
seb
2026-10-18 03:15:23 +02:00
parent e085e064ee
commit 04943fb7a6
12 changed files with 1372 additions and 867 deletions

View File

@@ -15,6 +15,11 @@ export async function getHistoryBySku(googleAuthId, sku, opts) {
return store.article.getHistoryBySku(googleAuthId, sku, opts);
}
export async function listHistory(googleAuthId, opts) {
const store = await getStore();
return store.article.listHistory(googleAuthId, opts);
}
export async function updateBySku(googleAuthId, sku, data) {
const store = await getStore();
return store.article.updateBySku(googleAuthId, sku, data);

View File

@@ -26,3 +26,16 @@ export async function listBySku(googleAuthId, sku, transactionType) {
const store = await getStore();
return store.ledger.listBySku(googleAuthId, sku, transactionType);
}
/**
* Lists ledger entries across all articles with pagination, seekMonths, and search.
*
* @param {number} googleAuthId - The id of the Google auth user.
* @param {object} [opts] - Query options.
* @returns {Promise<object>} Paged ledger history.
*/
export async function listHistory(googleAuthId, opts) {
const store = await getStore();
return store.ledger.listHistory(googleAuthId, opts);
}