@venizia/ignis-atlas 0.1.1-2 → 0.1.1-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/corpus/changelogs/index.md +0 -1
- package/dist/corpus/releases.json +24 -12
- package/dist/corpus/symbols.json +20 -20
- package/dist/corpus/wiki/best-practices/architectural-patterns.md +0 -2
- package/dist/corpus/wiki/guides/core-concepts/rest-controllers.md +0 -2
- package/dist/corpus/wiki/guides/tutorials/building-a-crud-api.md +0 -2
- package/dist/corpus/wiki/references/base/controllers.md +0 -3
- package/dist/corpus/wiki/references/base/filter-system/application-usage.md +0 -4
- package/dist/corpus/wiki/references/base/repositories/index.md +1 -1
- package/package.json +1 -1
- package/dist/corpus/changelogs/2026-10-02-body-filter-read-routes.md +0 -48
|
@@ -17,7 +17,6 @@ This section tracks the history of significant changes, refactors, and updates t
|
|
|
17
17
|
|
|
18
18
|
| Date | Title | Type |
|
|
19
19
|
|------|-------|------|
|
|
20
|
-
| 2026-10-02 | [Reads Whose Filter Rides in the Body](./2026-10-02-body-filter-read-routes) | Feature |
|
|
21
20
|
| 2026-10-02 | [HTTP Connector Errors Keep the Server Message Args](./2026-10-02-http-connector-error-args) | Bug Fix |
|
|
22
21
|
| 2026-10-02 | [The HTTP Connector Writes](./2026-10-02-http-connector-writes) | Feature |
|
|
23
22
|
| 2026-09-30 | [installBffFetch Matches Whole Path Segments, and Can Be Limited to Named Origins](./2026-09-30-bff-fetch-bridge-matching) | Bug Fix |
|
|
@@ -13,6 +13,12 @@
|
|
|
13
13
|
],
|
|
14
14
|
"releases": {
|
|
15
15
|
"atlas": [
|
|
16
|
+
{
|
|
17
|
+
"version": "0.1.1-2",
|
|
18
|
+
"date": "2026-10-02",
|
|
19
|
+
"sha": "34a103b4",
|
|
20
|
+
"order": 1557
|
|
21
|
+
},
|
|
16
22
|
{
|
|
17
23
|
"version": "0.1.1-1",
|
|
18
24
|
"date": "2026-10-02",
|
|
@@ -761,6 +767,12 @@
|
|
|
761
767
|
}
|
|
762
768
|
],
|
|
763
769
|
"connectors": [
|
|
770
|
+
{
|
|
771
|
+
"version": "0.2.1-3",
|
|
772
|
+
"date": "2026-10-02",
|
|
773
|
+
"sha": "1a36e346",
|
|
774
|
+
"order": 1560
|
|
775
|
+
},
|
|
764
776
|
{
|
|
765
777
|
"version": "0.2.1-2",
|
|
766
778
|
"date": "2026-10-02",
|
|
@@ -1917,6 +1929,12 @@
|
|
|
1917
1929
|
}
|
|
1918
1930
|
],
|
|
1919
1931
|
"core-server": [
|
|
1932
|
+
{
|
|
1933
|
+
"version": "0.2.1-3",
|
|
1934
|
+
"date": "2026-10-02",
|
|
1935
|
+
"sha": "f200bee0",
|
|
1936
|
+
"order": 1561
|
|
1937
|
+
},
|
|
1920
1938
|
{
|
|
1921
1939
|
"version": "0.2.1-2",
|
|
1922
1940
|
"date": "2026-10-02",
|
|
@@ -4183,6 +4201,12 @@
|
|
|
4183
4201
|
}
|
|
4184
4202
|
],
|
|
4185
4203
|
"kernel": [
|
|
4204
|
+
{
|
|
4205
|
+
"version": "0.2.1-2",
|
|
4206
|
+
"date": "2026-10-02",
|
|
4207
|
+
"sha": "6609b17f",
|
|
4208
|
+
"order": 1559
|
|
4209
|
+
},
|
|
4186
4210
|
{
|
|
4187
4211
|
"version": "0.2.1-1",
|
|
4188
4212
|
"date": "2026-10-02",
|
|
@@ -4514,18 +4538,6 @@
|
|
|
4514
4538
|
"kind": "Bug Fix",
|
|
4515
4539
|
"order": 1550
|
|
4516
4540
|
},
|
|
4517
|
-
{
|
|
4518
|
-
"id": "changelog:2026-10-02-body-filter-read-routes",
|
|
4519
|
-
"file": "2026-10-02-body-filter-read-routes.md",
|
|
4520
|
-
"date": "2026-10-02",
|
|
4521
|
-
"title": "Reads Whose Filter Rides in the Body",
|
|
4522
|
-
"packages": [
|
|
4523
|
-
"connectors",
|
|
4524
|
-
"kernel"
|
|
4525
|
-
],
|
|
4526
|
-
"kind": "Feature",
|
|
4527
|
-
"order": 1552
|
|
4528
|
-
},
|
|
4529
4541
|
{
|
|
4530
4542
|
"id": "changelog:2026-09-30-bff-fetch-bridge-matching",
|
|
4531
4543
|
"file": "2026-09-30-bff-fetch-bridge-matching.md",
|
package/dist/corpus/symbols.json
CHANGED
|
@@ -8742,7 +8742,7 @@
|
|
|
8742
8742
|
"specifier": "@venizia/ignis",
|
|
8743
8743
|
"kind": "const",
|
|
8744
8744
|
"file": "packages/kernel/src/base/controllers/common/constants.ts",
|
|
8745
|
-
"line":
|
|
8745
|
+
"line": 40,
|
|
8746
8746
|
"signature": "commonResponseHeaders: TResponseHeaders"
|
|
8747
8747
|
},
|
|
8748
8748
|
{
|
|
@@ -8762,7 +8762,7 @@
|
|
|
8762
8762
|
"specifier": "@venizia/ignis",
|
|
8763
8763
|
"kind": "const",
|
|
8764
8764
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
8765
|
-
"line":
|
|
8765
|
+
"line": 613,
|
|
8766
8766
|
"signature": "conditionalCountResponse: typeof RouteConfigResolver.conditionalCountResponse"
|
|
8767
8767
|
},
|
|
8768
8768
|
{
|
|
@@ -8902,7 +8902,7 @@
|
|
|
8902
8902
|
"specifier": "@venizia/ignis",
|
|
8903
8903
|
"kind": "const",
|
|
8904
8904
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
8905
|
-
"line":
|
|
8905
|
+
"line": 619,
|
|
8906
8906
|
"signature": "defineControllerRouteConfigs: typeof RouteConfigResolver.defineControllerRouteConfigs"
|
|
8907
8907
|
},
|
|
8908
8908
|
{
|
|
@@ -9072,7 +9072,7 @@
|
|
|
9072
9072
|
"specifier": "@venizia/ignis",
|
|
9073
9073
|
"kind": "const",
|
|
9074
9074
|
"file": "packages/kernel/src/base/controllers/common/constants.ts",
|
|
9075
|
-
"line":
|
|
9075
|
+
"line": 55,
|
|
9076
9076
|
"signature": "findResponseHeaders: TResponseHeaders"
|
|
9077
9077
|
},
|
|
9078
9078
|
{
|
|
@@ -9742,7 +9742,7 @@
|
|
|
9742
9742
|
"specifier": "@venizia/ignis",
|
|
9743
9743
|
"kind": "const",
|
|
9744
9744
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
9745
|
-
"line":
|
|
9745
|
+
"line": 614,
|
|
9746
9746
|
"signature": "resolveCountConfig: typeof RouteConfigResolver.resolveCountConfig"
|
|
9747
9747
|
},
|
|
9748
9748
|
{
|
|
@@ -9752,7 +9752,7 @@
|
|
|
9752
9752
|
"specifier": "@venizia/ignis",
|
|
9753
9753
|
"kind": "const",
|
|
9754
9754
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
9755
|
-
"line":
|
|
9755
|
+
"line": 618,
|
|
9756
9756
|
"signature": "resolveCreateConfig: typeof RouteConfigResolver.resolveCreateConfig"
|
|
9757
9757
|
},
|
|
9758
9758
|
{
|
|
@@ -9762,7 +9762,7 @@
|
|
|
9762
9762
|
"specifier": "@venizia/ignis",
|
|
9763
9763
|
"kind": "const",
|
|
9764
9764
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
9765
|
-
"line":
|
|
9765
|
+
"line": 616,
|
|
9766
9766
|
"signature": "resolveFindByIdConfig: typeof RouteConfigResolver.resolveFindByIdConfig"
|
|
9767
9767
|
},
|
|
9768
9768
|
{
|
|
@@ -9772,7 +9772,7 @@
|
|
|
9772
9772
|
"specifier": "@venizia/ignis",
|
|
9773
9773
|
"kind": "const",
|
|
9774
9774
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
9775
|
-
"line":
|
|
9775
|
+
"line": 615,
|
|
9776
9776
|
"signature": "resolveFindConfig: typeof RouteConfigResolver.resolveFindConfig"
|
|
9777
9777
|
},
|
|
9778
9778
|
{
|
|
@@ -9782,7 +9782,7 @@
|
|
|
9782
9782
|
"specifier": "@venizia/ignis",
|
|
9783
9783
|
"kind": "const",
|
|
9784
9784
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
9785
|
-
"line":
|
|
9785
|
+
"line": 617,
|
|
9786
9786
|
"signature": "resolveFindOneConfig: typeof RouteConfigResolver.resolveFindOneConfig"
|
|
9787
9787
|
},
|
|
9788
9788
|
{
|
|
@@ -17201,7 +17201,7 @@
|
|
|
17201
17201
|
"specifier": "@venizia/ignis-connectors/http",
|
|
17202
17202
|
"kind": "class",
|
|
17203
17203
|
"file": "packages/connectors/src/http/repository.ts",
|
|
17204
|
-
"line":
|
|
17204
|
+
"line": 30,
|
|
17205
17205
|
"signature": "class HttpRepository<E extends object = AnyType, P extends object = Partial<E>> implements IReadableRepository<E, {}>, IUpdatableRepository<E, P, {}>, IDeletableRepository<E, {}>"
|
|
17206
17206
|
},
|
|
17207
17207
|
{
|
|
@@ -17211,7 +17211,7 @@
|
|
|
17211
17211
|
"specifier": "@venizia/ignis-connectors/http",
|
|
17212
17212
|
"kind": "class",
|
|
17213
17213
|
"file": "packages/connectors/src/http/repository.ts",
|
|
17214
|
-
"line":
|
|
17214
|
+
"line": 19,
|
|
17215
17215
|
"signature": "class HttpResourceEntity extends AbstractEntity"
|
|
17216
17216
|
},
|
|
17217
17217
|
{
|
|
@@ -33533,7 +33533,7 @@
|
|
|
33533
33533
|
"specifier": "@venizia/ignis-kernel",
|
|
33534
33534
|
"kind": "const",
|
|
33535
33535
|
"file": "packages/kernel/src/base/controllers/common/constants.ts",
|
|
33536
|
-
"line":
|
|
33536
|
+
"line": 40,
|
|
33537
33537
|
"signature": "commonResponseHeaders: TResponseHeaders"
|
|
33538
33538
|
},
|
|
33539
33539
|
{
|
|
@@ -33553,7 +33553,7 @@
|
|
|
33553
33553
|
"specifier": "@venizia/ignis-kernel",
|
|
33554
33554
|
"kind": "const",
|
|
33555
33555
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33556
|
-
"line":
|
|
33556
|
+
"line": 613,
|
|
33557
33557
|
"signature": "conditionalCountResponse: typeof RouteConfigResolver.conditionalCountResponse"
|
|
33558
33558
|
},
|
|
33559
33559
|
{
|
|
@@ -33613,7 +33613,7 @@
|
|
|
33613
33613
|
"specifier": "@venizia/ignis-kernel",
|
|
33614
33614
|
"kind": "const",
|
|
33615
33615
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33616
|
-
"line":
|
|
33616
|
+
"line": 619,
|
|
33617
33617
|
"signature": "defineControllerRouteConfigs: typeof RouteConfigResolver.defineControllerRouteConfigs"
|
|
33618
33618
|
},
|
|
33619
33619
|
{
|
|
@@ -33653,7 +33653,7 @@
|
|
|
33653
33653
|
"specifier": "@venizia/ignis-kernel",
|
|
33654
33654
|
"kind": "const",
|
|
33655
33655
|
"file": "packages/kernel/src/base/controllers/common/constants.ts",
|
|
33656
|
-
"line":
|
|
33656
|
+
"line": 55,
|
|
33657
33657
|
"signature": "findResponseHeaders: TResponseHeaders"
|
|
33658
33658
|
},
|
|
33659
33659
|
{
|
|
@@ -33903,7 +33903,7 @@
|
|
|
33903
33903
|
"specifier": "@venizia/ignis-kernel",
|
|
33904
33904
|
"kind": "const",
|
|
33905
33905
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33906
|
-
"line":
|
|
33906
|
+
"line": 614,
|
|
33907
33907
|
"signature": "resolveCountConfig: typeof RouteConfigResolver.resolveCountConfig"
|
|
33908
33908
|
},
|
|
33909
33909
|
{
|
|
@@ -33913,7 +33913,7 @@
|
|
|
33913
33913
|
"specifier": "@venizia/ignis-kernel",
|
|
33914
33914
|
"kind": "const",
|
|
33915
33915
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33916
|
-
"line":
|
|
33916
|
+
"line": 618,
|
|
33917
33917
|
"signature": "resolveCreateConfig: typeof RouteConfigResolver.resolveCreateConfig"
|
|
33918
33918
|
},
|
|
33919
33919
|
{
|
|
@@ -33923,7 +33923,7 @@
|
|
|
33923
33923
|
"specifier": "@venizia/ignis-kernel",
|
|
33924
33924
|
"kind": "const",
|
|
33925
33925
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33926
|
-
"line":
|
|
33926
|
+
"line": 616,
|
|
33927
33927
|
"signature": "resolveFindByIdConfig: typeof RouteConfigResolver.resolveFindByIdConfig"
|
|
33928
33928
|
},
|
|
33929
33929
|
{
|
|
@@ -33933,7 +33933,7 @@
|
|
|
33933
33933
|
"specifier": "@venizia/ignis-kernel",
|
|
33934
33934
|
"kind": "const",
|
|
33935
33935
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33936
|
-
"line":
|
|
33936
|
+
"line": 615,
|
|
33937
33937
|
"signature": "resolveFindConfig: typeof RouteConfigResolver.resolveFindConfig"
|
|
33938
33938
|
},
|
|
33939
33939
|
{
|
|
@@ -33943,7 +33943,7 @@
|
|
|
33943
33943
|
"specifier": "@venizia/ignis-kernel",
|
|
33944
33944
|
"kind": "const",
|
|
33945
33945
|
"file": "packages/kernel/src/base/controllers/factory/definition.ts",
|
|
33946
|
-
"line":
|
|
33946
|
+
"line": 617,
|
|
33947
33947
|
"signature": "resolveFindOneConfig: typeof RouteConfigResolver.resolveFindOneConfig"
|
|
33948
33948
|
},
|
|
33949
33949
|
{
|
|
@@ -440,9 +440,7 @@ const _Controller = ControllerFactory.defineCrudController({
|
|
|
440
440
|
| Route | Method | Path | Description |
|
|
441
441
|
|-------|--------|------|-------------|
|
|
442
442
|
| `count` | GET | `/count` | Count records matching filter |
|
|
443
|
-
| `count` | POST | `/count` | Count, `where` in the body |
|
|
444
443
|
| `find` | GET | `/` | List records with filter |
|
|
445
|
-
| `find` | POST | `/find` | List, `filter` in the body |
|
|
446
444
|
| `findById` | GET | `/{id}` | Get single record |
|
|
447
445
|
| `findOne` | GET | `/find-one` | Get first matching record |
|
|
448
446
|
| `create` | POST | `/` | Create new record |
|
|
@@ -247,9 +247,7 @@ The `ControllerFactory.defineCrudController` method automatically sets up the fo
|
|
|
247
247
|
| Route Name | Method | Path | Description |
|
|
248
248
|
| :--- | :--- | :--- | :--- |
|
|
249
249
|
| `count` | `GET` | `/count` | Get the number of records matching a filter. |
|
|
250
|
-
| `count` | `POST` | `/count` | The same count, with the `where` in the body. |
|
|
251
250
|
| `find` | `GET` | `/` | Retrieve all records matching a filter. |
|
|
252
|
-
| `find` | `POST` | `/find` | The same list, with the `filter` in the body. |
|
|
253
251
|
| `findById` | `GET` | `/{id}` | Retrieve a single record by its ID. |
|
|
254
252
|
| `findOne` | `GET` | `/find-one` | Retrieve a single record matching a filter. |
|
|
255
253
|
| `create` | `POST` | `/` | Create a new record. |
|
|
@@ -352,8 +352,6 @@ export * from './todo.controller';
|
|
|
352
352
|
| GET | `/todos/{id}` | Get todo by ID (findById) |
|
|
353
353
|
| GET | `/todos/find-one` | Find one todo by filter (findOne) |
|
|
354
354
|
| GET | `/todos/count` | Count todos (count) |
|
|
355
|
-
| POST | `/todos/find` | List todos, filter in the body (find) |
|
|
356
|
-
| POST | `/todos/count` | Count todos, where in the body (count) |
|
|
357
355
|
| POST | `/todos` | Create todo (create) |
|
|
358
356
|
| PATCH | `/todos/{id}` | Update todo by ID (updateById) |
|
|
359
357
|
| PATCH | `/todos` | Update multiple todos by filter (updateBy) |
|
|
@@ -665,7 +665,6 @@ class RestPaths {
|
|
|
665
665
|
static readonly ROOT = '/';
|
|
666
666
|
static readonly COUNT = '/count';
|
|
667
667
|
static readonly FIND_ONE = '/find-one';
|
|
668
|
-
static readonly FIND = '/find'; // POST only: the filter in the body
|
|
669
668
|
}
|
|
670
669
|
```
|
|
671
670
|
|
|
@@ -692,9 +691,7 @@ Returns a `BaseRestController` subclass with standard CRUD endpoints pre-configu
|
|
|
692
691
|
| Route Name | Method | Path | Description |
|
|
693
692
|
| :--- | :--- | :--- | :--- |
|
|
694
693
|
| `count` | `GET` | `/count` | Count records matching a where condition |
|
|
695
|
-
| `count` | `POST` | `/count` | The same count, the `where` in the body - for one too long for a URL |
|
|
696
694
|
| `find` | `GET` | `/` | Find records with filter, pagination, sorting, and relations |
|
|
697
|
-
| `find` | `POST` | `/find` | The same find, the `filter` in the body - same rows, same `Content-Range` |
|
|
698
695
|
| `findById` | `GET` | `/{id}` | Find a single record by its ID |
|
|
699
696
|
| `findOne` | `GET` | `/find-one` | Find the first record matching a filter |
|
|
700
697
|
| `create` | `POST` | `/` | Create a new record |
|
|
@@ -56,13 +56,9 @@ This generates every filter-bearing endpoint the resource needs:
|
|
|
56
56
|
| GET | `/products/{id}` | `filter` (`where` is ignored - the id is the condition) |
|
|
57
57
|
| GET | `/products/find-one` | `filter` |
|
|
58
58
|
| GET | `/products/count` | `where` |
|
|
59
|
-
| POST | `/products/find` | `filter`, in the JSON body |
|
|
60
|
-
| POST | `/products/count` | `where`, in the JSON body |
|
|
61
59
|
|
|
62
60
|
Set `isStrict.requestSchema: true` to make these query params Zod-required; set `isStrict.path: true` to reject trailing-slash variants of the route. Write endpoints (`POST /`, `PATCH /{id}`, `DELETE /{id}`, ...) come from the same factory call and take no filter.
|
|
63
61
|
|
|
64
|
-
The two `POST` reads exist because a query string has a length limit: a long `inq` overflows it (a proxy commonly caps a request line near 8 KB, about 165 UUIDs). They answer exactly what their `GET` twins answer and ride the same route key, so `routes.find`/`routes.count` - `enabled`, `authenticate`, `authorize`, request schema - govern both, and `getBaseWhere` scopes both. A hand-written route gets the same by adding a POST twin whose body is `FilterQuerySchema` (it accepts an object as well as a JSON string) and whose handler reads `context.req.valid('json')`.
|
|
65
|
-
|
|
66
62
|
## Map a request query string to a parsed filter
|
|
67
63
|
|
|
68
64
|
`FilterSchema` and `WhereSchema` both accept a JSON string or a plain object, so the same schema validates a Hono query param (always a string) and a filter built in code:
|
|
@@ -197,7 +197,7 @@ await productRepository.deleteAll({ where: { id: { inq: staleIds } } });
|
|
|
197
197
|
|
|
198
198
|
- A write sends a partial row by default (`HttpRepository<TRow, TWrite = Partial<TRow>>`), since the server fills ids and defaults.
|
|
199
199
|
- The id is URL-encoded. A bulk `where` travels in the body, so a long id list does not hit the URL limit.
|
|
200
|
-
- A **read**
|
|
200
|
+
- A **read** filter travels in the GET query string, so a long `inq` does hit it: about 170 UUIDs fit behind an 8 KB proxy buffer and about 400 behind 16 KB, after which the server or proxy answers 414 or 431, and the error says the URL is too long. The generated routes take no body filter. Split the id list into reads that fit (a split read has no single `total`), or call a `POST` route the other service wrote by hand through `dataSource.read({ paths, method: 'POST', body: { filter } })`.
|
|
201
201
|
- An empty bulk `where` is refused before any request, as the server would refuse it; `force` cannot cross HTTP.
|
|
202
202
|
- `shouldReturn: false` answers the count with `data: null`. The count is the server's `x-response-count`.
|
|
203
203
|
- A failed write - or read - throws an `ApplicationError` with the server's status, its message appended, and its message code.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-atlas",
|
|
3
|
-
"version": "0.1.1-
|
|
3
|
+
"version": "0.1.1-3",
|
|
4
4
|
"description": "MCP server for IGNIS: search and read the wiki, changelogs and knowledge bundle by section, with citations. Bun-only, zero-dependency transport.",
|
|
5
5
|
"homepage": "https://ignis.venizia.ai",
|
|
6
6
|
"repository": {
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: Reads Whose Filter Rides in the Body
|
|
3
|
-
description: "Every generated CRUD controller answers POST /find and POST /count with the filter or where in the body, so a long inq no longer overflows the URL, and the http connector switches to it on its own."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Changelog - 2026-10-02
|
|
7
|
-
|
|
8
|
-
## `POST /find` and `POST /count`
|
|
9
|
-
|
|
10
|
-
<Badge type="tip" text="Feature" />
|
|
11
|
-
|
|
12
|
-
**In one line.** A long `inq` no longer overflows the URL: every generated CRUD controller also reads with the filter in a JSON body, and the http connector moves a read there when its URL would be too long.
|
|
13
|
-
|
|
14
|
-
## What is new
|
|
15
|
-
|
|
16
|
-
| Method | Path | Body | Answers |
|
|
17
|
-
|---|---|---|---|
|
|
18
|
-
| `POST` | `/<resource>/find` | `{ filter }` | what `GET /<resource>` answers - the same rows, the same `Content-Range` |
|
|
19
|
-
| `POST` | `/<resource>/count` | `{ where }` | what `GET /<resource>/count` answers |
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
await fetch('/api/items/find', {
|
|
23
|
-
method: 'POST',
|
|
24
|
-
headers: { 'content-type': 'application/json' },
|
|
25
|
-
body: JSON.stringify({ filter: { where: { id: { inq: twoThousandIds } }, limit: 2000 } }),
|
|
26
|
-
});
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
- **Same rules as the GET.** Each POST rides its GET's route key: `routes.find` and `routes.count` - `enabled`, `authenticate`, `authorize`, the request schema - govern both, `enabledRoutes: ['find']` turns on both, and `getBaseWhere` scopes both. Disabling `find` never leaves a POST door open.
|
|
30
|
-
- **A readonly controller keeps them.** They only read.
|
|
31
|
-
- **`RestPaths.FIND`** (`'/find'`) names the new path.
|
|
32
|
-
- **The http connector switches on its own.** `HttpRepository`'s `find`, `findOne`, `count` and `existsWith` stay on GET while the URL is under 6,000 characters, and use `POST /<resource>/find` past that.
|
|
33
|
-
|
|
34
|
-
## A hand-written list route
|
|
35
|
-
|
|
36
|
-
The generated routes do not reach a route you wrote yourself. Give it a POST twin: the same `authenticate`/`authorize`, `request.body: jsonContent({ schema: FilterQuerySchema })` - `FilterQuerySchema` already accepts an object - and a handler that reads `context.req.valid('json')` where the GET reads `'query'`.
|
|
37
|
-
|
|
38
|
-
## Who is affected
|
|
39
|
-
|
|
40
|
-
- **Every generated CRUD controller** gains two routes, under the permissions its `find` and `count` already have. Its OpenAPI document lists them.
|
|
41
|
-
- **A test that pins the exact set of generated routes** sees two more.
|
|
42
|
-
- **An http connector client reading a very long filter from an older server** gets a 404 instead of the 414/431 that read would have hit before. Shorter reads are unchanged.
|
|
43
|
-
|
|
44
|
-
**Files:**
|
|
45
|
-
|
|
46
|
-
- [`packages/kernel/src/base/controllers/factory/crud/readable.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/kernel/src/base/controllers/factory/crud/readable.ts)
|
|
47
|
-
- [`packages/kernel/src/base/controllers/factory/definition.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/kernel/src/base/controllers/factory/definition.ts)
|
|
48
|
-
- [`packages/connectors/src/http/repository.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/connectors/src/http/repository.ts)
|