u
This commit is contained in:
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