docs: add JSDoc headers to all externally exported store functions
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
import { QUOTE_TYPE } from '../../sql/manifestDoc.js';
|
||||
import createManifestDocStore from '../manifestDoc/createStore.js';
|
||||
|
||||
/**
|
||||
* Creates a quote store (list, getById, create, update, delete) backed by the
|
||||
* manifest / manifestarticle tables.
|
||||
*
|
||||
* @param {object} pool - The mssql connection pool.
|
||||
* @returns {object} An object with `list`, `getById`, `create`, `update` and `delete` functions.
|
||||
*
|
||||
* @example
|
||||
* const store = createQuoteStore(pool);
|
||||
* const quotes = await store.list(42, 1);
|
||||
* // => [{ id, number, type, entityId, date }]
|
||||
*/
|
||||
export default function createQuoteStore(pool) {
|
||||
return createManifestDocStore(pool, { type: QUOTE_TYPE, label: 'Quote' });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user