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:
39
docs/api/routes/companysetting/list.md
Normal file
39
docs/api/routes/companysetting/list.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# `GET /company/setting`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
List company settings
|
||||
|
||||
Returns the visible settings of the authenticated user's selected
|
||||
company: the full set of allowed keys (with `value: null` when unset)
|
||||
plus any stored settings that are frontend-visible. The `frontend`
|
||||
flag is stripped from responses.
|
||||
|
||||
|
||||
## Response `200`
|
||||
|
||||
Company settings
|
||||
|
||||
```json
|
||||
{
|
||||
"settings": [
|
||||
{
|
||||
"key": "…",
|
||||
"value": "…"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| Status | Description |
|
||||
|--------|-------------|
|
||||
| 400 | No company selected — `{"error":"…"}` |
|
||||
| 401 | Unauthorized — `{"error":"…"}` |
|
||||
| 403 | Not authorized — `{"error":"…"}` |
|
||||
| 404 | Company not found — `{"error":"…"}` |
|
||||
|
||||
---
|
||||
|
||||
_Generated from `@openapi` JSDoc. Do not edit by hand — run `npm run docs:api`._
|
||||
Reference in New Issue
Block a user