docs: expand input and output object types in API signatures

This commit is contained in:
seb
2026-09-16 17:45:46 +02:00
parent 9b1b7615e2
commit 5a7773df79
22 changed files with 128 additions and 89 deletions

View File

@@ -18,11 +18,11 @@ Creates a new order for the user's selected company with its lines.
| `body.date` | `string` | The order date. |
| `[body.entityId]` | `number` | The id of the customer entity. |
| `[body.externalNumber]` | `string` | An external (customer) reference number. |
| `[body.lines]` | `Array<object>` | The order lines. |
| `[body.lines]` | `Array<{sku?: string, name?: string, pu?: number, amount: number, net: number, rebate?: number, tax: number, comment?: string|null}>` | The order lines. |
**Returns**
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The created order.
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<{id: number, sku: string|null, name: string|null, pu: number, amount: number, net: number, rebate: number, tax: number, comment: string|null}>}>` — The created order.
**Throws**
@@ -77,7 +77,7 @@ Returns a single order by its id within the user's selected company.
**Returns**
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The order with its lines.
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<{id: number, sku: string|null, name: string|null, pu: number, amount: number, net: number, rebate: number, tax: number, comment: string|null}>}>` — The order with its lines.
**Throws**
@@ -130,11 +130,11 @@ Updates an order's header and/or lines.
| `[patch.date]` | `string` | The new order date. |
| `[patch.entityId]` | `number` | The new customer entity id. |
| `[patch.externalNumber]` | `string` | The new external (customer) reference number. |
| `[patch.lines]` | `Array<object>` | The new order lines. |
| `[patch.lines]` | `Array<{sku?: string, name?: string, pu?: number, amount: number, net: number, rebate?: number, tax: number, comment?: string|null}>` | The new order lines. |
**Returns**
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<object>}>` — The updated order.
`Promise<{id: number, number: string, type: string, entityId: number|null, externalNumber: string|null, date: string, lines: Array<{id: number, sku: string|null, name: string|null, pu: number, amount: number, net: number, rebate: number, tax: number, comment: string|null}>}>` — The updated order.
**Throws**