This commit is contained in:
seb
2026-09-29 16:16:03 +02:00
parent b92e2deb41
commit 7f3558b4cb
34 changed files with 3112 additions and 0 deletions

View File

@@ -37,6 +37,8 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
| [`routes/article/delete.md`](routes/article/delete.md) | `DELETE /article/{sku}` |
| [`routes/article/get.md`](routes/article/get.md) | `GET /article/{sku}` |
| [`routes/article/update.md`](routes/article/update.md) | `PATCH /article/{sku}` |
| [`routes/article/_sku/attributevalue.get.md`](routes/article/_sku/attributevalue.get.md) | `GET /article/{sku}/attributevalue` |
| [`routes/article/_sku/attributevalue.put.md`](routes/article/_sku/attributevalue.put.md) | `PUT /article/{sku}/attributevalue` |
| [`routes/article/set-brand.md`](routes/article/set-brand.md) | `PUT /article/{sku}/brand` |
| [`routes/article/set-categories.md`](routes/article/set-categories.md) | `PUT /article/{sku}/categories` |
| [`routes/article/set-eans.md`](routes/article/set-eans.md) | `PUT /article/{sku}/eans` |
@@ -46,6 +48,9 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
| [`routes/article/order-images.md`](routes/article/order-images.md) | `PUT /article/{sku}/images/order` |
| [`routes/article/set-prices.md`](routes/article/set-prices.md) | `PUT /article/{sku}/prices` |
| [`routes/article/_sku/print.md`](routes/article/_sku/print.md) | `POST /article/{sku}/print` |
| [`routes/article/_sku/property.get.md`](routes/article/_sku/property.get.md) | `GET /article/{sku}/property` |
| [`routes/article/_sku/property.put.md`](routes/article/_sku/property.put.md) | `PUT /article/{sku}/property` |
| [`routes/article/_sku/property/_propertyId.md`](routes/article/_sku/property/_propertyId.md) | `DELETE /article/{sku}/property/{propertyId}` |
| [`routes/article/supplier/list.md`](routes/article/supplier/list.md) | `GET /article/{sku}/supplier` |
| [`routes/article/supplier/create.md`](routes/article/supplier/create.md) | `POST /article/{sku}/supplier` |
| [`routes/article/supplier/order.md`](routes/article/supplier/order.md) | `PUT /article/{sku}/supplier/order` |
@@ -54,6 +59,16 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
| [`routes/article/_sku/track_stock.md`](routes/article/_sku/track_stock.md) | `PUT /article/{sku}/track_stock` |
| [`routes/article/set-weight.md`](routes/article/set-weight.md) | `PUT /article/{sku}/weight` |
| [`routes/articleIndex.md`](routes/articleIndex.md) | `GET /articleIndex` |
| [`routes/attributename.get.md`](routes/attributename.get.md) | `GET /attributename` |
| [`routes/attributename.post.md`](routes/attributename.post.md) | `POST /attributename` |
| [`routes/attributename/order.md`](routes/attributename/order.md) | `PUT /attributename/order` |
| [`routes/attributename/_attributeId/value.get.md`](routes/attributename/_attributeId/value.get.md) | `GET /attributename/{attributeId}/value` |
| [`routes/attributename/_attributeId/value.post.md`](routes/attributename/_attributeId/value.post.md) | `POST /attributename/{attributeId}/value` |
| [`routes/attributename/_attributeId/value/order.md`](routes/attributename/_attributeId/value/order.md) | `PUT /attributename/{attributeId}/value/order` |
| [`routes/attributename/_id.delete.md`](routes/attributename/_id.delete.md) | `DELETE /attributename/{id}` |
| [`routes/attributename/_id.patch.md`](routes/attributename/_id.patch.md) | `PATCH /attributename/{id}` |
| [`routes/attributevalue/_id.delete.md`](routes/attributevalue/_id.delete.md) | `DELETE /attributevalue/{id}` |
| [`routes/attributevalue/_id.patch.md`](routes/attributevalue/_id.patch.md) | `PATCH /attributevalue/{id}` |
| [`routes/auth/login.md`](routes/auth/login.md) | `POST /auth/login` |
| [`routes/auth/logout.md`](routes/auth/logout.md) | `POST /auth/logout` |
| [`routes/auth/me.md`](routes/auth/me.md) | `GET /auth/me` |
@@ -137,6 +152,11 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
| [`routes/printer/get.md`](routes/printer/get.md) | `GET /printer/{id}` |
| [`routes/printer/update.md`](routes/printer/update.md) | `PATCH /printer/{id}` |
| [`routes/printer/_id.put.md`](routes/printer/_id.put.md) | `PUT /printer/{id}` |
| [`routes/propertyname.get.md`](routes/propertyname.get.md) | `GET /propertyname` |
| [`routes/propertyname.post.md`](routes/propertyname.post.md) | `POST /propertyname` |
| [`routes/propertyname/order.md`](routes/propertyname/order.md) | `PUT /propertyname/order` |
| [`routes/propertyname/_id.delete.md`](routes/propertyname/_id.delete.md) | `DELETE /propertyname/{id}` |
| [`routes/propertyname/_id.patch.md`](routes/propertyname/_id.patch.md) | `PATCH /propertyname/{id}` |
| [`routes/quote/list.md`](routes/quote/list.md) | `GET /quote` |
| [`routes/quote/create.md`](routes/quote/create.md) | `POST /quote` |
| [`routes/quote/delete.md`](routes/quote/delete.md) | `DELETE /quote/{id}` |

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
# `GET /article/{sku}/attributevalue`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List article attribute values
Fetches all attribute values assigned to an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Response `200`
List of attribute values assigned to this article
```json
{
"attributevalues": [
{
"id": 1,
"articleId": 1,
"attributeId": 1,
"attributeName": "…",
"exclusive": true,
"attributeValueId": 1,
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,48 @@
# `PUT /article/{sku}/attributevalue`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Bulk set article attribute values
Replaces all attribute values for an article. Enforces exclusive constraint (max one value per exclusive attribute).
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Body (JSON)
```json
{
"attributevalues": [
"…"
]
}
```
## Response `200`
Updated article attribute values
```json
{
"attributevalues": [
{
"id": 1,
"articleId": 1,
"attributeId": 1,
"attributeName": "…",
"exclusive": true,
"attributeValueId": 1,
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,36 @@
# `GET /article/{sku}/property`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List article properties
Fetches all free-form properties set on an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Response `200`
List of properties for this article
```json
{
"properties": [
{
"id": 1,
"articleId": 1,
"propertyId": 1,
"name": "…",
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,50 @@
# `PUT /article/{sku}/property`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Bulk set article properties
Replaces all properties for an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | Article SKU |
## Body (JSON)
```json
{
"properties": [
{
"propertyId": 1,
"value": "…",
"sort": 1
}
]
}
```
## Response `200`
Updated article properties
```json
{
"properties": [
{
"id": 1,
"articleId": 1,
"propertyId": 1,
"name": "…",
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,22 @@
# `DELETE /article/{sku}/property/{propertyId}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete article property
Removes a single property from an article.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `sku` | yes | string | |
| `propertyId` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,36 @@
# `GET /attributename`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List attribute names
Lists all attribute names defined for the selected company, including nested values.
## Response `200`
List of attribute names
```json
{
"attributenames": [
{
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,44 @@
# `POST /attributename`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create attribute name
Creates an attribute name for the selected company.
## Body (JSON)
```json
{
"name": "…",
"sort": 1,
"exclusive": true
}
```
## Response `201`
Created attribute name
```json
{
"attributename": {
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,34 @@
# `GET /attributename/{attributeId}/value`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List values for an attribute
Lists all values for a specific attribute.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `attributeId` | yes | integer | |
## Response `200`
List of attribute values
```json
{
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,41 @@
# `POST /attributename/{attributeId}/value`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create value for an attribute
Adds a new predefined value to an attribute.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `attributeId` | yes | integer | |
## Body (JSON)
```json
{
"value": "…",
"sort": 1
}
```
## Response `201`
Created attribute value
```json
{
"attributevalue": {
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,31 @@
# `PUT /attributename/{attributeId}/value/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder values of an attribute
Updates the display sort order of values belonging to an attribute.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `attributeId` | yes | integer | |
## Body (JSON)
```json
{
"attributevalueIds": [
1
]
}
```
## Response `200`
Reordered successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /attributename/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete attribute name
Deletes an attribute name and cascades to attribute values and article assignments.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,50 @@
# `PATCH /attributename/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update attribute name
Updates name, sort, and/or exclusive flag for an attribute name.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{
"name": "…",
"sort": 1,
"exclusive": true
}
```
## Response `200`
Updated attribute name
```json
{
"attributename": {
"id": 1,
"name": "…",
"sort": 1,
"exclusive": true,
"values": [
{
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
]
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,25 @@
# `PUT /attributename/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder attribute names
Updates the display sort order of attribute names for the selected company.
## Body (JSON)
```json
{
"attributenameIds": [
1
]
}
```
## Response `200`
Reordered successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /attributevalue/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete attribute value
Deletes an attribute value and cascades to article assignments.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,41 @@
# `PATCH /attributevalue/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update attribute value
Updates value text and/or sort for an attribute value.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{
"value": "…",
"sort": 1
}
```
## Response `200`
Updated attribute value
```json
{
"attributevalue": {
"id": 1,
"attributeId": 1,
"value": "…",
"sort": 1
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,33 @@
# `GET /propertyname`
Protected. Requires a valid session cookie (`credentials: 'include'`).
List property names
Lists all property names defined for the selected company, ordered by sort.
## Response `200`
List of property names
```json
{
"propertynames": [
{
"id": 1,
"name": "…",
"sort": 1
}
]
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,40 @@
# `POST /propertyname`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Create property name
Creates a new property name for the selected company.
## Body (JSON)
```json
{
"name": "…",
"sort": 1
}
```
## Response `201`
Created property name
```json
{
"propertyname": {
"id": 1,
"name": "…",
"sort": 1
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Bad request — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,21 @@
# `DELETE /propertyname/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete property name
Deletes a property name and cascades to article properties.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Response `200`
Deleted successfully
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,40 @@
# `PATCH /propertyname/{id}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Update property name
Updates name and/or sort for a property name.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `id` | yes | integer | |
## Body (JSON)
```json
{
"name": "…",
"sort": 1
}
```
## Response `200`
Updated property name
```json
{
"propertyname": {
"id": 1,
"name": "…",
"sort": 1
}
}
```
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._

View File

@@ -0,0 +1,31 @@
# `PUT /propertyname/order`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Reorder property names
Updates the display sort order of property names for the selected company.
## Body (JSON)
```json
{
"propertynameIds": [
1
]
}
```
## Response `200`
Reordered successfully
## Errors
| Status | Description |
|--------|-------------|
| 400 | Bad request |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._