Add company settings and number sequence API routes

- Add CompanySetting routes (list, get, set) backed by company-scoped store
- Add Number routes (list, update) for managing number sequences
- Register new store namespaces for numbers and companysetting
- Add CompanySetting and NumberSequence schemas to OpenAPI
- Regenerate API docs and index for the new routes
This commit is contained in:
seb
2026-08-08 09:01:28 +02:00
parent e6c24654dd
commit 57420ac0db
14 changed files with 1279 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# `GET /company/setting/{key}`
Protected. Requires a valid session cookie (`credentials: 'include'`).
Get company setting by key
Returns a single company setting for the authenticated user's selected
company, or `404` if it does not exist.
## Path parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `key` | yes | string | |
## Response `200`
Company setting
```json
{
"setting": {
"key": "…",
"value": "…"
}
}
```
## Errors
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Company setting or company not found — `{"error":"…"}` |
---
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._