u
This commit is contained in:
@@ -14,16 +14,10 @@ Replaces all attribute values for an article. Enforces exclusive constraint (max
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `attributevalues` | yes | any[] | Array of attribute value IDs (numbers) or objects with id or attributeValueId |
|
||||
|
||||
```json
|
||||
{
|
||||
"attributevalues": [
|
||||
"…"
|
||||
]
|
||||
}
|
||||
[
|
||||
166
|
||||
]
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
@@ -16,6 +16,17 @@ Deletes an attribute name and cascades to attribute values and article assignmen
|
||||
|
||||
Deleted successfully
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Bad request or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Forbidden — `{"error":"…"}` |
|
||||
| 404 | Attribute name not found — `{"error":"…"}` |
|
||||
| 409 | Attribute name in use — `{"error":"…"}` |
|
||||
| 500 | Server error — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
|
||||
@@ -16,6 +16,17 @@ Deletes an attribute value and cascades to article assignments.
|
||||
|
||||
Deleted successfully
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Bad request or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Forbidden — `{"error":"…"}` |
|
||||
| 404 | Attribute value not found — `{"error":"…"}` |
|
||||
| 409 | Attribute value in use — `{"error":"…"}` |
|
||||
| 500 | Server error — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
|
||||
@@ -14,16 +14,10 @@ Replaces all attribute values for a category. Enforces exclusive constraint (max
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `attributevalues` | yes | any[] | Array of attribute value IDs (numbers) or objects with id or attributeValueId |
|
||||
|
||||
```json
|
||||
{
|
||||
"attributevalues": [
|
||||
"…"
|
||||
]
|
||||
}
|
||||
[
|
||||
166
|
||||
]
|
||||
```
|
||||
|
||||
## Response `200`
|
||||
|
||||
48
docs/api/routes/company/addHistory.md
Normal file
48
docs/api/routes/company/addHistory.md
Normal file
@@ -0,0 +1,48 @@
|
||||
# `POST /company/history`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Add company history entry
|
||||
|
||||
Appends an entry to `companyhistory` for the selected company.
|
||||
|
||||
|
||||
## Body (JSON)
|
||||
|
||||
| Field | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `text` | yes | string | History entry text or note |
|
||||
|
||||
```json
|
||||
{
|
||||
"text": "…"
|
||||
}
|
||||
```
|
||||
|
||||
## Response `201`
|
||||
|
||||
History entry created
|
||||
|
||||
```json
|
||||
{
|
||||
"history": {
|
||||
"id": 1,
|
||||
"companyuserId": 1,
|
||||
"date": "2026-08-10T00:00:00.000Z",
|
||||
"text": "…"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Text required or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Forbidden — `{"error":"…"}` |
|
||||
| 500 | Server error — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
45
docs/api/routes/company/history.md
Normal file
45
docs/api/routes/company/history.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# `GET /company/history`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Get company history
|
||||
|
||||
Returns `companyhistory` rows for the selected company, newest first (`date` DESC, `id` DESC).
|
||||
|
||||
|
||||
## Query parameters
|
||||
|
||||
| Param | Required | Type | Description |
|
||||
|-------|----------|------|-------------|
|
||||
| `limit` | no | integer | Maximum number of entries to return (newest first). Omit for all entries. |
|
||||
|
||||
## Response `200`
|
||||
|
||||
Company history (newest first)
|
||||
|
||||
```json
|
||||
{
|
||||
"history": [
|
||||
{
|
||||
"id": 1,
|
||||
"companyuserId": 1,
|
||||
"date": "2026-08-10T00:00:00.000Z",
|
||||
"text": "…"
|
||||
}
|
||||
],
|
||||
"truncated": true
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Invalid limit or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Forbidden — `{"error":"…"}` |
|
||||
| 500 | Server error — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
@@ -16,6 +16,17 @@ Deletes a property name and cascades to article properties.
|
||||
|
||||
Deleted successfully
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | Bad request or no company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Forbidden — `{"error":"…"}` |
|
||||
| 404 | Property name not found — `{"error":"…"}` |
|
||||
| 409 | Property name in use — `{"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