docs: add JSDoc headers to all externally exported store functions

This commit is contained in:
seb
2026-08-07 03:58:48 +02:00
parent c290fe8f4b
commit 4833acd680
101 changed files with 1134 additions and 0 deletions

View File

@@ -5,6 +5,17 @@ import langEnsure from '../lang/ensure.js';
import taxEnsure from '../tax/ensure.js';
import request from '../request.js';
/**
* Updates an existing company's name, language and tax rates.
*
* @param {object} pool - The mssql connection pool.
* @returns {Function} An async function that updates a company.
*
* @example
* const fn = update(pool);
* const result = await fn(1, { iso639: 'de', name: 'Acme', taxrate: 19, reducedtaxrate: 7 });
* // => { id, rootCategoryId, languageId, taxrateId, reducedtaxrateId, taxfreerateId }
*/
export default function update(pool) {
const byId = getById(pool);
const byName = getByName(pool);