This commit is contained in:
seb
2026-10-08 16:11:47 +02:00
parent c2d3cdb088
commit 8111c3f377
10 changed files with 190 additions and 11 deletions

View File

@@ -183,6 +183,7 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
| [`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/public/telemetry/crash.md`](routes/public/telemetry/crash.md) | `POST /public/telemetry/crash` |
| [`routes/public/_companyId/articles.md`](routes/public/_companyId/articles.md) | `GET /public/{companyId}/articles` |
| [`routes/public/_companyId/articles/_sku.md`](routes/public/_companyId/articles/_sku.md) | `GET /public/{companyId}/articles/{sku}` |
| [`routes/public/_companyId/categories.md`](routes/public/_companyId/categories.md) | `GET /public/{companyId}/categories` |
@@ -233,7 +234,7 @@ Clients subscribe via [`GET /events`](routes/events.md) (`text/event-stream`). A
| Signal | Emitted by |
|--------|------------|
| `article-<sku>` | `PUT /article/{sku}/brand`, `PUT /article/{sku}/categories`, `PUT /article/{sku}/eans`, `POST /article/{sku}/image`, `DELETE /article/{sku}/image/{fullHash}`, `PUT /article/{sku}/images/order`, `PUT /article/{sku}/prices`, `POST /article/{sku}/supplier`, `PUT /article/{sku}/supplier/order`, `DELETE /article/{sku}/supplier/{id}`, `PATCH /article/{sku}/supplier/{id}`, `PUT /article/{sku}/track_stock`, `PUT /article/{sku}/weight` |
| `articles` | `POST /article`, `DELETE /article/{sku}`, `PATCH /article/{sku}` |
| `articles` | `POST /article`, `DELETE /article/{sku}`, `PATCH /article/{sku}`, `DELETE /category/{id}` |
| `category` | `POST /category`, `PUT /category/order`, `DELETE /category/{id}`, `PATCH /category/{id}`, `DELETE /category/{id}/image`, `POST /category/{id}/image` |
| `vfs` | `POST /vfs/mkdir`, `POST /vfs/rename`, `POST /vfs/upload`, `DELETE /vfs/{*path}`, `PUT /vfs/{*path}` |

View File

@@ -1,6 +1,6 @@
# Dash API Routes Overview (All)
Overview of all 191 API endpoints across all modules.
Overview of all 192 API endpoints across all modules.
### Notation
@@ -232,7 +232,7 @@ _none_
_none_
- Returns: `200 { languageId: int, tree: { id: int, sort: int, posterminalIds: int[], parentId?: int|null, name?: str|null, slug?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }[], articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T28|null }[] }`
#### Delete category — `DELETE /category/{id}`
- Params: `id: int`
- Params: `id: int, query: recursive?: bool`
- Returns: `204 void`
#### Update category (rename or move) — `PATCH /category/{id}`
- Params: `id: int, body: { name?: str, parentId?: int }`
@@ -510,6 +510,9 @@ _none_
#### Update property name — `PATCH /propertyname/{id}`
- Params: `id: int, body: { name?: str, sort?: int, exclusive?: bool }`
- Returns: `200 { propertyname: T41 }`
#### Receipt crash dump — `POST /public/telemetry/crash`
- Params: `body: { content: any }`
- Returns: `200 { ok: bool, filename: str }`
#### List public articles — `GET /public/{companyId}/articles`
- Params: `companyId: int, query: categoryId?: int, search?: str, limit?: int, offset?: int`
- Returns: `200 { articles: { id: int, sku: str, name: str, slug: str, net: num|null, taxRate: num|null, gross: num|null, trackStock: bool, brand: { id: int|null, name: str }, fullHash: str|null, thumbW: int|null, thumbH: int|null, thumbHash: str|null }[] }`

View File

@@ -212,7 +212,7 @@ _none_
_none_
- Returns: `200 { languageId: int, tree: { id: int, sort: int, posterminalIds: int[], parentId?: int|null, name?: str|null, slug?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null }[], articles: { id: int, sku: str, name: str, slug: str, track_stock: bool, optionsCount: int, articleListCount: int, childCount: int, net?: num|null, taxRate?: num|null, parentArticleId?: int|null, parentSku?: str|null, fullHash?: str|null, thumbW?: int|null, thumbH?: int|null, thumbHash?: str|null, brand?: T27|null }[] }`
#### Delete category — `DELETE /category/{id}`
- Params: `id: int`
- Params: `id: int, query: recursive?: bool`
- Returns: `204 void`
#### Update category (rename or move) — `PATCH /category/{id}`
- Params: `id: int, body: { name?: str, parentId?: int }`

View File

@@ -4,7 +4,7 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Delete category
Deletes a category the user is authorized for (not the company root).
Deletes a category the user is authorized for (not the company root). When recursive=true, recursively deletes all child categories, unassigns POS terminals, and deletes articles that only exist in the deleted subtree (including their children).
## Path parameters
@@ -12,9 +12,15 @@ Deletes a category the user is authorized for (not the company root).
|-------|----------|------|-------------|
| `id` | yes | integer | Category id |
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `recursive` | no | boolean | When true, recursively deletes the category subtree and articles that only exist within it. |
## Signals
On success, emits SSE signal: `category` (see [`GET /events`](../events.md)).
On success, emits SSE signals: `category`, `articles` (see [`GET /events`](../events.md)).
## Response `204`

View File

@@ -0,0 +1,41 @@
# `POST /public/telemetry/crash`
Public. No cookie required.
Receipt crash dump
Public endpoint to receive crash dumps. Saves the content parameter to a file named with the epoch millisecond.
## Body (JSON)
| Field | Required | Type | Description |
|-------|----------|------|-------------|
| `content` | yes | | Crash dump content to store |
```json
{
"content": "…"
}
```
## Response `200`
Crash dump saved
```json
{
"ok": true,
"filename": "1728395535123"
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | Missing content parameter |
| 500 | Storage failure |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._