Align store calls with selected-company scoping and add entity numbers.
Drop companyId from company-scoped store wrappers and routes, add GET /entity/next-number plus optional number on entity create/update, and document dashdbschema API.md lookup in sibling-repos.
This commit is contained in:
32
docs/api/routes/entity/next-number.md
Normal file
32
docs/api/routes/entity/next-number.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# `GET /entity/next-number`
|
||||
|
||||
Protected. Requires a valid session cookie (`credentials: 'include'`).
|
||||
|
||||
Peek next customer number
|
||||
|
||||
Returns the next customer number that would be allocated (`type` entity)
|
||||
without consuming it. Use on the customer add form.
|
||||
|
||||
|
||||
## Response `200`
|
||||
|
||||
Next number
|
||||
|
||||
```json
|
||||
{
|
||||
"number": "…"
|
||||
}
|
||||
```
|
||||
|
||||
## 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