u
This commit is contained in:
@@ -91,8 +91,13 @@ Generated from `@openapi` annotations in [`src/api/routes/`](../../src/api/route
|
||||
| [`routes/category/delete.md`](routes/category/delete.md) | `DELETE /category/{id}` |
|
||||
| [`routes/category/update.md`](routes/category/update.md) | `PATCH /category/{id}` |
|
||||
| [`routes/category/articles.md`](routes/category/articles.md) | `GET /category/{id}/articles` |
|
||||
| [`routes/category/_id/attributevalue.get.md`](routes/category/_id/attributevalue.get.md) | `GET /category/{id}/attributevalue` |
|
||||
| [`routes/category/_id/attributevalue.put.md`](routes/category/_id/attributevalue.put.md) | `PUT /category/{id}/attributevalue` |
|
||||
| [`routes/category/delete-image.md`](routes/category/delete-image.md) | `DELETE /category/{id}/image` |
|
||||
| [`routes/category/add-image.md`](routes/category/add-image.md) | `POST /category/{id}/image` |
|
||||
| [`routes/category/_id/property.get.md`](routes/category/_id/property.get.md) | `GET /category/{id}/property` |
|
||||
| [`routes/category/_id/property.put.md`](routes/category/_id/property.put.md) | `PUT /category/{id}/property` |
|
||||
| [`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/companysetting/list.md`](routes/companysetting/list.md) | `GET /company/setting` |
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Dash API Routes Overview
|
||||
|
||||
Overview of all 136 API endpoints across all modules.
|
||||
Overview of all 141 API endpoints across all modules.
|
||||
|
||||
### Parameter Notation
|
||||
|
||||
@@ -66,7 +66,12 @@ Overview of all 136 API endpoints across all modules.
|
||||
| `DELETE` | `/category/{id}` | `id:integer` | `204 void` | Delete category |
|
||||
| `PATCH` | `/category/{id}` | `id:integer, body: { name?, parentId? }` | `200 { category: { id, name, slug, parentId, sort } }` | Update category (rename or move) |
|
||||
| `GET` | `/category/{id}/articles` | `id:integer` | `200 { articles: { id, sku, name, slug, net, taxRate, track_stock, optionsCount, articleListCount, childCount, fullHash, thumbW, thumbH, thumbHash, brand }[] }` | Articles in category |
|
||||
| `GET` | `/category/{id}/attributevalue` | `id:integer` | `200 { attributevalues: { id, categoryId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | List category attribute values |
|
||||
| `PUT` | `/category/{id}/attributevalue` | `id:integer, body: { attributevalues: any[] }` | `200 { attributevalues: { id, categoryId, attributeId, attributeName, exclusive, attributeValueId, value, sort }[] }` | Bulk set category attribute values |
|
||||
| `DELETE` | `/category/{id}/image` | `id:integer` | `200 { category: { id, thumbW, thumbH, thumbHash } }` | Delete category image |
|
||||
| `GET` | `/category/{id}/property` | `id:integer` | `200 { properties: { id, categoryId, propertyId, name, exclusive, value, sort }[] }` | List category properties |
|
||||
| `PUT` | `/category/{id}/property` | `id:integer, body: { properties: { propertyId, value, sort? }[] }` | `200 { properties: { id, categoryId, propertyId, name, exclusive, value, sort }[] }` | Bulk set category properties |
|
||||
| `DELETE` | `/category/{id}/property/{propertyId}` | `id:integer, propertyId:integer` | `200` | Delete category property |
|
||||
| `GET` | `/company` | — | `200 { companies: { id, iso639, name, taxrate, reducedtaxrate }[] }` | List companies |
|
||||
| `GET` | `/company/setting` | — | `200 { settings: { key, value }[] }` | List company settings |
|
||||
| `GET` | `/company/setting/{key}` | `key:string` | `200 { setting: { key, value } }` | Get company setting by key |
|
||||
|
||||
38
docs/api/routes/category/_id/attributevalue.get.md
Normal file
38
docs/api/routes/category/_id/attributevalue.get.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# `GET /category/{id}/attributevalue`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List category attribute values
|
||||
|
||||
Fetches all attribute values assigned to a category.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | Category ID |
|
||||
|
||||
## Response `200`
|
||||
|
||||
List of attribute values assigned to this category
|
||||
|
||||
```json
|
||||
{
|
||||
"attributevalues": [
|
||||
{
|
||||
"id": 1,
|
||||
"categoryId": 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`._
|
||||
52
docs/api/routes/category/_id/attributevalue.put.md
Normal file
52
docs/api/routes/category/_id/attributevalue.put.md
Normal file
@@ -0,0 +1,52 @@
|
||||
# `PUT /category/{id}/attributevalue`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Bulk set category attribute values
|
||||
|
||||
Replaces all attribute values for a category. Enforces exclusive constraint (max one value per exclusive attribute).
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | Category ID |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `attributevalues` | yes | any[] | Array of attribute value IDs (numbers) or objects with id or attributeValueId |
|
||||
|
||||
```json
|
||||
{
|
||||
"attributevalues": [
|
||||
"…"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
Updated category attribute values
|
||||
|
||||
```json
|
||||
{
|
||||
"attributevalues": [
|
||||
{
|
||||
"id": 1,
|
||||
"categoryId": 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`._
|
||||
37
docs/api/routes/category/_id/property.get.md
Normal file
37
docs/api/routes/category/_id/property.get.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# `GET /category/{id}/property`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List category properties
|
||||
|
||||
Fetches all free-form properties set on a category.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | Category ID |
|
||||
|
||||
## Response `200`
|
||||
|
||||
List of properties for this category
|
||||
|
||||
```json
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"id": 1,
|
||||
"categoryId": 1,
|
||||
"propertyId": 1,
|
||||
"name": "…",
|
||||
"exclusive": true,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
58
docs/api/routes/category/_id/property.put.md
Normal file
58
docs/api/routes/category/_id/property.put.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# `PUT /category/{id}/property`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Bulk set category properties
|
||||
|
||||
Replaces all properties for a category.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | Category ID |
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `properties` | yes | object[] | |
|
||||
| `properties[].propertyId` | yes | integer | |
|
||||
| `properties[].value` | yes | string | |
|
||||
| `properties[].sort` | no | integer | |
|
||||
|
||||
```json
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"propertyId": 1,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
Updated category properties
|
||||
|
||||
```json
|
||||
{
|
||||
"properties": [
|
||||
{
|
||||
"id": 1,
|
||||
"categoryId": 1,
|
||||
"propertyId": 1,
|
||||
"name": "…",
|
||||
"exclusive": true,
|
||||
"value": "…",
|
||||
"sort": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
22
docs/api/routes/category/_id/property/_propertyId.md
Normal file
22
docs/api/routes/category/_id/property/_propertyId.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# `DELETE /category/{id}/property/{propertyId}`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Delete category property
|
||||
|
||||
Removes a single property from a category.
|
||||
|
||||
## Path parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `id` | yes | integer | |
|
||||
| `propertyId` | yes | integer | |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Deleted successfully
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user