u
This commit is contained in:
@@ -113,6 +113,8 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
|
||||
| [`routes/category/_id/property/_propertyId.md`](routes/category/_id/property/_propertyId.md) | `DELETE /category/{id}/property/{propertyId}` |
|
||||
| [`routes/company/list.md`](routes/company/list.md) | `GET /company` |
|
||||
| [`routes/company/create.md`](routes/company/create.md) | `POST /company` |
|
||||
| [`routes/company/export.md`](routes/company/export.md) | `GET /company/export` |
|
||||
| [`routes/company/export.post.md`](routes/company/export.post.md) | `POST /company/export` |
|
||||
| [`routes/company/history.md`](routes/company/history.md) | `GET /company/history` |
|
||||
| [`routes/company/addHistory.md`](routes/company/addHistory.md) | `POST /company/history` |
|
||||
| [`routes/company/import.md`](routes/company/import.md) | `POST /company/import` |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Dash API Routes Overview (All)
|
||||
|
||||
Overview of all 233 API endpoints across all modules.
|
||||
Overview of all 235 API endpoints across all modules.
|
||||
|
||||
### Notation
|
||||
|
||||
@@ -340,6 +340,12 @@ _none_
|
||||
#### Create company — `POST /company`
|
||||
- Params: `body: { iso639: str, name: str, taxrate: num, reducedtaxrate: num }`
|
||||
- Returns: `201 { company: T23, user: T45 }`
|
||||
#### Export company catalog as zip archive (SSE) — `GET /company/export`
|
||||
- Params: `query: stream?: str`
|
||||
- Returns: `200 SSE`
|
||||
#### Export company catalog as zip archive (SSE) — `POST /company/export`
|
||||
_none_
|
||||
- Returns: `200 SSE`
|
||||
#### Get company history — `GET /company/history`
|
||||
- Params: `query: limit?: int`
|
||||
- Returns: `200 { history: { id: int, date: str, text: str, companyuserId?: int|null }[], truncated: bool }`
|
||||
|
||||
33
docs/api/routes/company/export.md
Normal file
33
docs/api/routes/company/export.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# `GET /company/export`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Export company catalog as zip archive (SSE)
|
||||
|
||||
Exports full company catalog data (categories hierarchy, articles, variants, brands, pictures)
|
||||
into a round-trip compatible .zip archive matching the format of `/company/import`.
|
||||
Streams progress events via Server-Sent Events (`text/event-stream`), followed by base64-encoded
|
||||
binary chunks in `chunk` events and a final `done` event.
|
||||
|
||||
|
||||
## Query parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `stream` | no | string | Force SSE stream mode (`1`) or direct binary download (`0`) |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Export progress stream (`text/event-stream`) with binary chunks, or raw ZIP file
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Bad request (no company selected) — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 500 | Server error — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
23
docs/api/routes/company/export.post.md
Normal file
23
docs/api/routes/company/export.post.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# `POST /company/export`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Export company catalog as zip archive (SSE)
|
||||
|
||||
POST variant of `/company/export` with identical SSE streaming semantics.
|
||||
|
||||
## Response `200`
|
||||
|
||||
Export progress stream (`text/event-stream`) with binary chunks, or raw ZIP file
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Bad request (no company selected) — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 500 | Server error — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user