This commit is contained in:
seb
2026-10-26 19:22:01 +01:00
parent a5a9e51898
commit 69388c789f
23 changed files with 1307 additions and 28 deletions

View File

@@ -241,6 +241,20 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
| [`routes/quote/_id/file/_fileId.get.md`](routes/quote/_id/file/_fileId.get.md) | `GET /quote/{id}/file/{fileId}` |
| [`routes/quote/order.md`](routes/quote/order.md) | `POST /quote/{id}/order` |
| [`routes/quote/_id/pdf.md`](routes/quote/_id/pdf.md) | `POST /quote/{id}/pdf` |
| [`routes/retoure.get.md`](routes/retoure.get.md) | `GET /retoure` |
| [`routes/retoure.post.md`](routes/retoure.post.md) | `POST /retoure` |
| [`routes/retoure/rebuild-summaries.md`](routes/retoure/rebuild-summaries.md) | `POST /retoure/rebuild-summaries` |
| [`routes/retoure/_id.delete.md`](routes/retoure/_id.delete.md) | `DELETE /retoure/{id}` |
| [`routes/retoure/_id.get.md`](routes/retoure/_id.get.md) | `GET /retoure/{id}` |
| [`routes/retoure/_id.put.md`](routes/retoure/_id.put.md) | `PUT /retoure/{id}` |
| [`routes/retoure/_id/shipment.md`](routes/retoure/_id/shipment.md) | `POST /retoure/{id}/shipment` |
| [`routes/return.get.md`](routes/return.get.md) | `GET /return` |
| [`routes/return.post.md`](routes/return.post.md) | `POST /return` |
| [`routes/return/rebuild-summaries.md`](routes/return/rebuild-summaries.md) | `POST /return/rebuild-summaries` |
| [`routes/return/_id.delete.md`](routes/return/_id.delete.md) | `DELETE /return/{id}` |
| [`routes/return/_id.get.md`](routes/return/_id.get.md) | `GET /return/{id}` |
| [`routes/return/_id.put.md`](routes/return/_id.put.md) | `PUT /return/{id}` |
| [`routes/return/_id/book.md`](routes/return/_id/book.md) | `POST /return/{id}/book` |
| [`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` |

View File

@@ -1,6 +1,6 @@
# Dash API Routes Overview (All)
Overview of all 270 API endpoints across all modules.
Overview of all 284 API endpoints across all modules.
### Notation
@@ -787,6 +787,54 @@ _none_
- Params: `id: int`
- Returns: `201 { attachment: T9, fileUrl: str }`
### Section: /retoure
#### List retoures — `GET /retoure`
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnpaid?: bool, onlyUndelivered?: bool, entityId?: int, seekMonths?: int`
- Returns: `200`
#### Create retoure — `POST /retoure`
- Params: `body: { date: str, number?: str, entityId?: int, externalNumber?: str, lines?: any[] }`
- Returns: `201`
#### Rebuild retoure summaries — `POST /retoure/rebuild-summaries`
_none_
- Returns: `200`
#### Delete retoure — `DELETE /retoure/{id}`
- Params: `id: int`
- Returns: `204 void`
#### Get retoure by ID — `GET /retoure/{id}`
- Params: `id: int`
- Returns: `200`
#### Update retoure — `PUT /retoure/{id}`
- Params: `id: int, body: {}`
- Returns: `200`
#### Create shipment for retoure — `POST /retoure/{id}/shipment`
- Params: `id: int`
- Returns: `201`
### Section: /return
#### List returns — `GET /return`
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnbooked?: bool, supplierId?: int`
- Returns: `200`
#### Create return — `POST /return`
- Params: `body: {}`
- Returns: `201`
#### Rebuild return summaries — `POST /return/rebuild-summaries`
_none_
- Returns: `200`
#### Delete return — `DELETE /return/{id}`
- Params: `id: int`
- Returns: `204 void`
#### Get return by ID — `GET /return/{id}`
- Params: `id: int`
- Returns: `200`
#### Update return — `PUT /return/{id}`
- Params: `id: int`
- Returns: `200`
#### Book return to ledger — `POST /return/{id}/book`
- Params: `id: int`
- Returns: `200`
### Section: /serper
#### Crawl image from URL, crop white/transparency borders, and return AVIF — `POST /serper/image`

View File

@@ -1,6 +1,6 @@
# Dash API Routes Overview
Overview of all 190 API endpoints across all modules.
Overview of all 204 API endpoints across all modules.
### Notation
@@ -554,6 +554,54 @@ _none_
- Params: `id: int`
- Returns: `201 { attachment: T7, fileUrl: str }`
### Section: /retoure
#### List retoures — `GET /retoure`
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnpaid?: bool, onlyUndelivered?: bool, entityId?: int, seekMonths?: int`
- Returns: `200`
#### Create retoure — `POST /retoure`
- Params: `body: { date: str, number?: str, entityId?: int, externalNumber?: str, lines?: any[] }`
- Returns: `201`
#### Rebuild retoure summaries — `POST /retoure/rebuild-summaries`
_none_
- Returns: `200`
#### Delete retoure — `DELETE /retoure/{id}`
- Params: `id: int`
- Returns: `204 void`
#### Get retoure by ID — `GET /retoure/{id}`
- Params: `id: int`
- Returns: `200`
#### Update retoure — `PUT /retoure/{id}`
- Params: `id: int, body: {}`
- Returns: `200`
#### Create shipment for retoure — `POST /retoure/{id}/shipment`
- Params: `id: int`
- Returns: `201`
### Section: /return
#### List returns — `GET /return`
- Params: `query: offset?: int, limit?: int, search?: str, onlyUnbooked?: bool, supplierId?: int`
- Returns: `200`
#### Create return — `POST /return`
- Params: `body: {}`
- Returns: `201`
#### Rebuild return summaries — `POST /return/rebuild-summaries`
_none_
- Returns: `200`
#### Delete return — `DELETE /return/{id}`
- Params: `id: int`
- Returns: `204 void`
#### Get return by ID — `GET /return/{id}`
- Params: `id: int`
- Returns: `200`
#### Update return — `PUT /return/{id}`
- Params: `id: int`
- Returns: `200`
#### Book return to ledger — `POST /return/{id}/book`
- Params: `id: int`
- Returns: `200`
### Section: /shipment
#### List shipments — `GET /shipment`

View File

@@ -0,0 +1,36 @@
# `GET /retoure`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List retoures
Lists customer return manifests (`manifest` rows with `type = 'retoure'`)
for the authenticated user's selected company.
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `offset` | no | integer | |
| `limit` | no | integer | |
| `search` | no | string | |
| `onlyUnpaid` | no | boolean | |
| `onlyUndelivered` | no | boolean | |
| `entityId` | no | integer | |
| `seekMonths` | no | integer | |
## Response `200`
List of retoures
## Errors
| Status | Description |
|--------|-------------|
| 400 | Validation error |
| 403 | Not authorized |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,33 @@
# `POST /retoure`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create retoure
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `number` | no | string | |
| `date` | yes | string | |
| `entityId` | no | integer | |
| `externalNumber` | no | string | |
| `lines` | no | any[] | |
```json
{
"number": "…",
"date": "…",
"entityId": 1,
"externalNumber": "…",
"lines": []
}
```
## Response `201`
Retoure created
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /retoure/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete retoure
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `204`
Retoure deleted
_No content_
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,25 @@
# `GET /retoure/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get retoure by ID
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Retoure details
## Errors
| Status | Description |
|--------|-------------|
| 404 | Retoure not found |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,25 @@
# `PUT /retoure/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update retoure
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{}
```
## Response `200`
Retoure updated
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,19 @@
# `POST /retoure/{id}/shipment`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create shipment for retoure
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `201`
Shipment created
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,13 @@
# `POST /retoure/rebuild-summaries`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Rebuild retoure summaries
## Response `200`
Summaries rebuilt
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,23 @@
# `GET /return`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List returns
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `offset` | no | integer | |
| `limit` | no | integer | |
| `search` | no | string | |
| `onlyUnbooked` | no | boolean | |
| `supplierId` | no | integer | |
## Response `200`
List of returns
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,19 @@
# `POST /return`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create return
## Body (JSON)
```json
{}
```
## Response `201`
Return created
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /return/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete return
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `204`
Return deleted
_No content_
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,19 @@
# `GET /return/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get return by ID
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Return details
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,19 @@
# `PUT /return/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update return
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Return updated
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,19 @@
# `POST /return/{id}/book`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Book return to ledger
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Return booked
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,13 @@
# `POST /return/rebuild-summaries`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Rebuild return summaries
## Response `200`
Summaries rebuilt
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._