From a04094a7be72d431cbd5347e7a53c2a7b50883d8 Mon Sep 17 00:00:00 2001 From: seb Date: Mon, 19 Oct 2026 23:57:00 +0200 Subject: [PATCH] u --- docs/api/README.md | 1 - docs/api/routes-all.md | 5 +-- docs/api/routes.md | 5 +-- docs/api/routes/company/create.md | 1 - docs/api/routes/company/update.md | 1 - docs/api/routes/shipment.md | 64 ------------------------------- src/api/routes/company.js | 12 ------ 7 files changed, 2 insertions(+), 87 deletions(-) delete mode 100644 docs/api/routes/shipment.md diff --git a/docs/api/README.md b/docs/api/README.md index 937fb78..a7f08fc 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -242,7 +242,6 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route | [`routes/quote/_id/pdf.md`](routes/quote/_id/pdf.md) | `POST /quote/{id}/pdf` | | [`routes/serper/image.md`](routes/serper/image.md) | `POST /serper/image` | | [`routes/serper/images.md`](routes/serper/images.md) | `POST /serper/images` | -| [`routes/shipment.md`](routes/shipment.md) | `GET /shipment` | | [`routes/shipment/_id.delete.md`](routes/shipment/_id.delete.md) | `DELETE /shipment/{id}` | | [`routes/shipment/_id.get.md`](routes/shipment/_id.get.md) | `GET /shipment/{id}` | | [`routes/shipment/_id.patch.md`](routes/shipment/_id.patch.md) | `PATCH /shipment/{id}` | diff --git a/docs/api/routes-all.md b/docs/api/routes-all.md index f2682c9..6298d92 100644 --- a/docs/api/routes-all.md +++ b/docs/api/routes-all.md @@ -1,6 +1,6 @@ # Dash API Routes Overview (All) -Overview of all 264 API endpoints across all modules. +Overview of all 263 API endpoints across all modules. ### Notation @@ -804,9 +804,6 @@ _none_ ### Section: /shipment -#### List shipments — `GET /shipment` -- Params: `query: offset?: int, limit?: int, search?: str, state?: str, seekMonths?: int` -- Returns: `200 { shipments: { id: int, number: str, type: str, date: str, positions: int, totalQuantity: num, packageCount: int, state: str, entityId?: int|null, externalNumber?: str|null, createdAt?: str|null, orderId?: int|null, orderNumber?: str|null, customerName?: str|null, carrier?: str|null, trackingCode?: str|null }[], total: int, unfilteredTotal: int, offset: int, limit: int }` #### Delete shipment — `DELETE /shipment/{id}` - Params: `id: int` - Returns: `204 void` diff --git a/docs/api/routes.md b/docs/api/routes.md index a26d181..ed80c6f 100644 --- a/docs/api/routes.md +++ b/docs/api/routes.md @@ -1,6 +1,6 @@ # Dash API Routes Overview -Overview of all 187 API endpoints across all modules. +Overview of all 186 API endpoints across all modules. ### Notation @@ -557,9 +557,6 @@ _none_ ### Section: /shipment -#### List shipments — `GET /shipment` -- Params: `query: offset?: int, limit?: int, search?: str, state?: str, seekMonths?: int` -- Returns: `200 { shipments: { id: int, number: str, type: str, date: str, positions: int, totalQuantity: num, packageCount: int, state: str, entityId?: int|null, externalNumber?: str|null, createdAt?: str|null, orderId?: int|null, orderNumber?: str|null, customerName?: str|null, carrier?: str|null, trackingCode?: str|null }[], total: int, unfilteredTotal: int, offset: int, limit: int }` #### Delete shipment — `DELETE /shipment/{id}` - Params: `id: int` - Returns: `204 void` diff --git a/docs/api/routes/company/create.md b/docs/api/routes/company/create.md index 3112283..f8cd089 100644 --- a/docs/api/routes/company/create.md +++ b/docs/api/routes/company/create.md @@ -55,7 +55,6 @@ Created; selected company updated |--------|-------------| | 400 | Validation error — `{"error":"…"}` | | 401 | Unauthorized — `{"error":"…"}` | -| 409 | Company name not available — `{"error":"…"}` | --- diff --git a/docs/api/routes/company/update.md b/docs/api/routes/company/update.md index 2a0bb78..fb7f65f 100644 --- a/docs/api/routes/company/update.md +++ b/docs/api/routes/company/update.md @@ -56,7 +56,6 @@ Updated | 400 | Validation error — `{"error":"…"}` | | 401 | Unauthorized — `{"error":"…"}` | | 404 | Company not found — `{"error":"…"}` | -| 409 | Company name not available — `{"error":"…"}` | --- diff --git a/docs/api/routes/shipment.md b/docs/api/routes/shipment.md deleted file mode 100644 index bb07fb5..0000000 --- a/docs/api/routes/shipment.md +++ /dev/null @@ -1,64 +0,0 @@ -# `GET /shipment` - -Protected. Requires a valid session cookie (`credentials: 'include'`). - -List shipments - -Company-wide paginated list of shipment manifests (`manifest` rows with `type = 'shipment'`) -with delivery state, package tracking info, and order references. - - -## Query parameters - -| Param | Required | Type | Description | -|-------|----------|------|-------------| -| `offset` | no | integer | Number of shipments to skip | -| `limit` | no | integer | Number of shipments to return | -| `search` | no | string | Free-text search matching shipment number, order number, external number, tracking code, or customer name | -| `state` | no | string | Optional filter by delivery state | -| `seekMonths` | no | integer | Negative integer for cutoff months ago (e.g. -1 for shipments older than 1 month) | - -## Response `200` - -Paginated shipment list - -```json -{ - "shipments": [ - { - "id": 1, - "number": "…", - "type": "shipment", - "entityId": 1, - "externalNumber": "…", - "date": "…", - "createdAt": "…", - "orderId": 1, - "orderNumber": "…", - "customerName": "…", - "positions": 1, - "totalQuantity": 1, - "packageCount": 1, - "carrier": "…", - "trackingCode": "…", - "state": "new" - } - ], - "total": 1, - "unfilteredTotal": 1, - "offset": 1, - "limit": 1 -} -``` - -## Errors - -| Status | Description | -|--------|-------------| -| 400 | Invalid query parameters or no company selected — `{"error":"…"}` | -| 401 | Unauthorized — `{"error":"…"}` | -| 403 | Not authorized — `{"error":"…"}` | - ---- - -_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._ diff --git a/src/api/routes/company.js b/src/api/routes/company.js index ca3b028..3418b7c 100644 --- a/src/api/routes/company.js +++ b/src/api/routes/company.js @@ -182,12 +182,6 @@ export function register(app, basePath = '') { * application/json: * schema: * $ref: '#/components/schemas/Error' - * 409: - * description: Company name not available - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Error' */ // #region GET /company @@ -890,12 +884,6 @@ export function register(app, basePath = '') { * application/json: * schema: * $ref: '#/components/schemas/Error' - * 409: - * description: Company name not available - * content: - * application/json: - * schema: - * $ref: '#/components/schemas/Error' * delete: * tags: [Company] * summary: Delete company