feat(manifest): add externalNumber reference to quote/order/delivery

- Add `external_number NVARCHAR(100)` column to the `manifest` table.
- Thread `externalNumber` through manifestDoc and delivery SQL (list,
  header, create, update).
- Include `externalNumber` in shapeSummary and quote/order/delivery
  create/update/list/getById handlers (optional, clearable on update).
- Update README type definitions and regenerate API/schema docs.
This commit is contained in:
seb
2026-08-08 09:13:20 +02:00
parent f302cda39e
commit 29099b2a16
23 changed files with 210 additions and 143 deletions

View File

@@ -9,11 +9,11 @@ export default function list(pool) {
* Lists the deliveries of the user's selected company.
*
* @param {number} googleAuthId - The id of the Google auth user.
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number, date: string}>>} The deliveries.
* @returns {Promise<Array<{id: number, number: string, type: string, entityId: number, externalNumber: string|null, date: string}>>} The deliveries.
*
* @example
* const deliveries = await store.delivery.list(42);
* // => [{ id, number, type, entityId, date }]
* // => [{ id, number, type, entityId, externalNumber, date }]
*/
return async (googleAuthId) => {
const { companyId } = await access(googleAuthId);