@venizia/ignis-atlas 0.1.1-0 → 0.1.1-2

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.
@@ -35,7 +35,7 @@ Before, a repository without `model` failed at decoration with `Missing 'model'`
35
35
  - **Inheritance:** a bare `@repository()` on a subclass inherits the parent's `type` with its model and datasource.
36
36
  - **`getRepositoryMetadata()`** now returns the `TRepositoryMetadata` union, so its `.model` is typed `... | undefined`. Code that passes `.model` on stops compiling. Check `model` or narrow on `type` first.
37
37
 
38
- See [Read another service's API](/references/base/repositories/#read-another-service-s-api).
38
+ See [Read another service's API](/references/base/repositories/#read-and-write-another-service-s-api).
39
39
 
40
40
  ## `defineCrudController` injects its repository
41
41
 
@@ -0,0 +1,48 @@
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)
@@ -0,0 +1,25 @@
1
+ ---
2
+ title: HTTP Connector Errors Keep the Server Message Args
3
+ description: "A failed read or write through connectors/http now carries the server's normalized.args, so a translated error message can fill its placeholders."
4
+ ---
5
+
6
+ # Changelog - 2026-10-02
7
+
8
+ ## Server message args survive the HTTP hop
9
+
10
+ <Badge type="info" text="Bug Fix" />
11
+
12
+ **In one line.** A failed read or write through `@venizia/ignis-connectors/http` now throws with the server's `normalized.args`, not just its `normalized.code`.
13
+
14
+ ## What changed
15
+
16
+ The IGNIS error envelope carries `normalized: { text, code, args }`. In 0.2.1-1 the connector read the code and dropped the args, so the thrown `ApplicationError` always had `normalized.args = {}`. A UI that renders the error by its code - `A category named %{name} already exists.` - then showed the placeholder unfilled.
17
+
18
+ Now the args come through when they are a plain object; anything else is left out.
19
+
20
+ ## Who is affected
21
+
22
+ - **A UI that translates connector errors by `normalized.code`.** Placeholders now fill.
23
+ - **Everyone else.** No change.
24
+
25
+ **Files:** [`packages/connectors/src/http/datasource.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/connectors/src/http/datasource.ts)
@@ -0,0 +1,58 @@
1
+ ---
2
+ title: The HTTP Connector Writes
3
+ description: "HttpRepository gains create, updateById, updateAll/updateBy, deleteById and deleteAll/deleteBy over the IGNIS CRUD routes, and HttpDataSource.request takes a body and headers on any method, PUT included."
4
+ ---
5
+
6
+ # Changelog - 2026-10-02
7
+
8
+ ## `@venizia/ignis-connectors/http` writes
9
+
10
+ <Badge type="tip" text="Feature" />
11
+
12
+ **In one line.** `HttpRepository` is no longer read-only: it writes through the CRUD routes another IGNIS server generates, and `HttpDataSource` can send a body on any method.
13
+
14
+ ```ts
15
+ const products = new HttpRepository<TProduct>({ dataSource, resource: 'products' });
16
+
17
+ const { data: product } = await products.create({ data: { name: 'Lamp' } });
18
+ await products.updateById({ id: product.id, data: { name: 'Desk lamp' } });
19
+ await products.updateBy({ where: { status: 'draft' }, data: { status: 'published' } });
20
+ await products.deleteAll({ where: { id: { inq: staleIds } } });
21
+
22
+ // A route the verbs do not cover:
23
+ await dataSource.write({ paths: ['products', product.id], method: 'PUT', body: replacement });
24
+ ```
25
+
26
+ ## What is new
27
+
28
+ | Method | Request |
29
+ |---|---|
30
+ | `create({ data })` | `POST /<resource>` |
31
+ | `updateById({ id, data })` | `PATCH /<resource>/:id` |
32
+ | `updateAll` / `updateBy({ where, data })` | `PATCH /<resource>`, `where` in the body beside the data |
33
+ | `deleteById({ id })` | `DELETE /<resource>/:id` |
34
+ | `deleteAll` / `deleteBy({ where })` | `DELETE /<resource>`, `where` in the body |
35
+
36
+ - **`HttpDataSource.request()`** takes `body` and per-request `headers`, on any method. A plain object or array goes out as JSON with `content-type: application/json`; a string, `FormData`, `Blob`, `URLSearchParams`, `ArrayBuffer` or typed array goes as it is. The 401 retry resends the same body.
37
+ - **`HttpDataSource.write()`** answers `{ data, count }` - the rows and the server's `x-response-count`.
38
+ - **Server errors come back as the server said them.** A failed read or write throws an `ApplicationError` with the server's status, its `message` appended to the connector's, and its `normalized.code` as the message code.
39
+ - **`HttpRepository<E, P = Partial<E>>`**: the second type parameter is what a write sends; the server fills ids and defaults.
40
+
41
+ ## Rules worth knowing
42
+
43
+ - The id in `/:id` is URL-encoded, for reads and writes alike.
44
+ - A bulk `where` travels in the body, so a long `inq` does not hit the URL limit. An empty bulk `where` is refused before any request - the IGNIS route would refuse it - and `force` cannot cross HTTP.
45
+ - `shouldReturn: false` answers `{ count, data: null }`.
46
+ - There is no `createAll`: the IGNIS REST contract has no bulk-create route.
47
+ - A per-request `x-request-count` is refused, as the setting already was: the connector owns it.
48
+
49
+ ## Who is affected
50
+
51
+ - **Code that wrote with bare `fetch` beside the connector.** Move to the repository verbs or `write()`; the auth token, the 401 retry and the error mapping come with them.
52
+ - **Code that matched a read error message exactly.** A failed read now appends the server's message after the URL.
53
+ - **Everyone else.** Nothing changes; the read verbs are untouched.
54
+
55
+ **Files:**
56
+
57
+ - [`packages/connectors/src/http/datasource.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/connectors/src/http/datasource.ts)
58
+ - [`packages/connectors/src/http/repository.ts`](https://github.com/VENIZIA-AI/ignis/blob/main/packages/connectors/src/http/repository.ts)
@@ -17,6 +17,9 @@ 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
+ | 2026-10-02 | [HTTP Connector Errors Keep the Server Message Args](./2026-10-02-http-connector-error-args) | Bug Fix |
22
+ | 2026-10-02 | [The HTTP Connector Writes](./2026-10-02-http-connector-writes) | Feature |
20
23
  | 2026-09-30 | [installBffFetch Matches Whole Path Segments, and Can Be Limited to Named Origins](./2026-09-30-bff-fetch-bridge-matching) | Bug Fix |
21
24
  | 2026-09-29 | [A Where Can Restrict a Column by a SQL Subquery](./2026-09-29-where-sql-subquery) | Feature |
22
25
  | 2026-09-29 | [Filter and Update Errors Quote the Rejected Key on One Line](./2026-09-29-escaped-input-in-filter-errors) | Bug Fix |
@@ -13,6 +13,18 @@
13
13
  ],
14
14
  "releases": {
15
15
  "atlas": [
16
+ {
17
+ "version": "0.1.1-1",
18
+ "date": "2026-10-02",
19
+ "sha": "64cb8e82",
20
+ "order": 1549
21
+ },
22
+ {
23
+ "version": "0.1.1-0",
24
+ "date": "2026-09-30",
25
+ "sha": "5f1e0445",
26
+ "order": 1544
27
+ },
16
28
  {
17
29
  "version": "0.1.0",
18
30
  "date": "2026-09-24",
@@ -749,6 +761,18 @@
749
761
  }
750
762
  ],
751
763
  "connectors": [
764
+ {
765
+ "version": "0.2.1-2",
766
+ "date": "2026-10-02",
767
+ "sha": "2f5b0c55",
768
+ "order": 1554
769
+ },
770
+ {
771
+ "version": "0.2.1-1",
772
+ "date": "2026-10-02",
773
+ "sha": "9dd503e2",
774
+ "order": 1546
775
+ },
752
776
  {
753
777
  "version": "0.2.1-0",
754
778
  "date": "2026-09-30",
@@ -1893,6 +1917,18 @@
1893
1917
  }
1894
1918
  ],
1895
1919
  "core-server": [
1920
+ {
1921
+ "version": "0.2.1-2",
1922
+ "date": "2026-10-02",
1923
+ "sha": "3336827a",
1924
+ "order": 1555
1925
+ },
1926
+ {
1927
+ "version": "0.2.1-1",
1928
+ "date": "2026-10-02",
1929
+ "sha": "f0ddfab0",
1930
+ "order": 1547
1931
+ },
1896
1932
  {
1897
1933
  "version": "0.2.1-0",
1898
1934
  "date": "2026-09-30",
@@ -4147,6 +4183,12 @@
4147
4183
  }
4148
4184
  ],
4149
4185
  "kernel": [
4186
+ {
4187
+ "version": "0.2.1-1",
4188
+ "date": "2026-10-02",
4189
+ "sha": "a1bf5455",
4190
+ "order": 1553
4191
+ },
4150
4192
  {
4151
4193
  "version": "0.2.1-0",
4152
4194
  "date": "2026-09-30",
@@ -4450,6 +4492,40 @@
4450
4492
  ]
4451
4493
  },
4452
4494
  "changelogs": [
4495
+ {
4496
+ "id": "changelog:2026-10-02-http-connector-writes",
4497
+ "file": "2026-10-02-http-connector-writes.md",
4498
+ "date": "2026-10-02",
4499
+ "title": "The HTTP Connector Writes",
4500
+ "packages": [
4501
+ "connectors"
4502
+ ],
4503
+ "kind": "Feature",
4504
+ "order": 1545
4505
+ },
4506
+ {
4507
+ "id": "changelog:2026-10-02-http-connector-error-args",
4508
+ "file": "2026-10-02-http-connector-error-args.md",
4509
+ "date": "2026-10-02",
4510
+ "title": "HTTP Connector Errors Keep the Server Message Args",
4511
+ "packages": [
4512
+ "connectors"
4513
+ ],
4514
+ "kind": "Bug Fix",
4515
+ "order": 1550
4516
+ },
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
+ },
4453
4529
  {
4454
4530
  "id": "changelog:2026-09-30-bff-fetch-bridge-matching",
4455
4531
  "file": "2026-09-30-bff-fetch-bridge-matching.md",
@@ -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": 40,
8745
+ "line": 42,
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": 613,
8765
+ "line": 648,
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": 619,
8905
+ "line": 654,
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": 55,
9075
+ "line": 57,
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": 614,
9745
+ "line": 649,
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": 618,
9755
+ "line": 653,
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": 616,
9765
+ "line": 651,
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": 615,
9775
+ "line": 650,
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": 617,
9785
+ "line": 652,
9786
9786
  "signature": "resolveFindOneConfig: typeof RouteConfigResolver.resolveFindOneConfig"
9787
9787
  },
9788
9788
  {
@@ -10932,7 +10932,7 @@
10932
10932
  "specifier": "@venizia/ignis/meilisearch",
10933
10933
  "kind": "class",
10934
10934
  "file": "packages/connectors/src/search/meilisearch/repositories/dialect/query-dialect.ts",
10935
- "line": 155,
10935
+ "line": 158,
10936
10936
  "signature": "class MeilisearchQueryDialect extends BaseHelper implements ISearchQueryDialect"
10937
10937
  },
10938
10938
  {
@@ -15291,7 +15291,7 @@
15291
15291
  "specifier": "@venizia/ignis/typesense",
15292
15292
  "kind": "class",
15293
15293
  "file": "packages/connectors/src/search/typesense/repositories/dialect/query-dialect.ts",
15294
- "line": 158,
15294
+ "line": 161,
15295
15295
  "signature": "class TypesenseQueryDialect extends BaseHelper implements ISearchQueryDialect"
15296
15296
  },
15297
15297
  {
@@ -17191,7 +17191,7 @@
17191
17191
  "specifier": "@venizia/ignis-connectors/http",
17192
17192
  "kind": "class",
17193
17193
  "file": "packages/connectors/src/http/datasource.ts",
17194
- "line": 112,
17194
+ "line": 208,
17195
17195
  "signature": "class HttpDataSource extends AbstractDataSource<IHttpDataSourceSettings>"
17196
17196
  },
17197
17197
  {
@@ -17201,8 +17201,8 @@
17201
17201
  "specifier": "@venizia/ignis-connectors/http",
17202
17202
  "kind": "class",
17203
17203
  "file": "packages/connectors/src/http/repository.ts",
17204
- "line": 23,
17205
- "signature": "class HttpRepository<E extends object = AnyType> implements IReadableRepository<E, {}>"
17204
+ "line": 36,
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
  {
17208
17208
  "name": "HttpResourceEntity",
@@ -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": 16,
17214
+ "line": 25,
17215
17215
  "signature": "class HttpResourceEntity extends AbstractEntity"
17216
17216
  },
17217
17217
  {
@@ -17231,7 +17231,7 @@
17231
17231
  "specifier": "@venizia/ignis-connectors/http",
17232
17232
  "kind": "interface",
17233
17233
  "file": "packages/connectors/src/http/common/types.ts",
17234
- "line": 14,
17234
+ "line": 22,
17235
17235
  "signature": "interface IHttpDataSourceSettings"
17236
17236
  },
17237
17237
  {
@@ -17241,9 +17241,19 @@
17241
17241
  "specifier": "@venizia/ignis-connectors/http",
17242
17242
  "kind": "interface",
17243
17243
  "file": "packages/connectors/src/http/common/types.ts",
17244
- "line": 30,
17244
+ "line": 38,
17245
17245
  "signature": "interface IHttpReadResult<R>"
17246
17246
  },
17247
+ {
17248
+ "name": "IHttpWriteResult",
17249
+ "package": "@venizia/ignis-connectors",
17250
+ "subpath": "./http",
17251
+ "specifier": "@venizia/ignis-connectors/http",
17252
+ "kind": "interface",
17253
+ "file": "packages/connectors/src/http/common/types.ts",
17254
+ "line": 49,
17255
+ "signature": "interface IHttpWriteResult<R>"
17256
+ },
17247
17257
  {
17248
17258
  "name": "TAuthTokenResolver",
17249
17259
  "package": "@venizia/ignis-connectors",
@@ -17254,6 +17264,16 @@
17254
17264
  "line": 10,
17255
17265
  "signature": "type TAuthTokenResolver = () => IAuthToken | undefined"
17256
17266
  },
17267
+ {
17268
+ "name": "THttpBody",
17269
+ "package": "@venizia/ignis-connectors",
17270
+ "subpath": "./http",
17271
+ "specifier": "@venizia/ignis-connectors/http",
17272
+ "kind": "type",
17273
+ "file": "packages/connectors/src/http/common/types.ts",
17274
+ "line": 20,
17275
+ "signature": "type THttpBody = string | object"
17276
+ },
17257
17277
  {
17258
17278
  "name": "THttpHeaders",
17259
17279
  "package": "@venizia/ignis-connectors",
@@ -17271,7 +17291,7 @@
17271
17291
  "specifier": "@venizia/ignis-connectors/http",
17272
17292
  "kind": "type",
17273
17293
  "file": "packages/connectors/src/http/common/types.ts",
17274
- "line": 40,
17294
+ "line": 54,
17275
17295
  "signature": "type THttpQuery<E extends object> = { filter?: TFilter<E>; }"
17276
17296
  },
17277
17297
  {
@@ -17401,7 +17421,7 @@
17401
17421
  "specifier": "@venizia/ignis-connectors/meilisearch",
17402
17422
  "kind": "class",
17403
17423
  "file": "packages/connectors/src/search/meilisearch/repositories/dialect/query-dialect.ts",
17404
- "line": 155,
17424
+ "line": 158,
17405
17425
  "signature": "class MeilisearchQueryDialect extends BaseHelper implements ISearchQueryDialect"
17406
17426
  },
17407
17427
  {
@@ -21340,7 +21360,7 @@
21340
21360
  "specifier": "@venizia/ignis-connectors/typesense",
21341
21361
  "kind": "class",
21342
21362
  "file": "packages/connectors/src/search/typesense/repositories/dialect/query-dialect.ts",
21343
- "line": 158,
21363
+ "line": 161,
21344
21364
  "signature": "class TypesenseQueryDialect extends BaseHelper implements ISearchQueryDialect"
21345
21365
  },
21346
21366
  {
@@ -33513,7 +33533,7 @@
33513
33533
  "specifier": "@venizia/ignis-kernel",
33514
33534
  "kind": "const",
33515
33535
  "file": "packages/kernel/src/base/controllers/common/constants.ts",
33516
- "line": 40,
33536
+ "line": 42,
33517
33537
  "signature": "commonResponseHeaders: TResponseHeaders"
33518
33538
  },
33519
33539
  {
@@ -33533,7 +33553,7 @@
33533
33553
  "specifier": "@venizia/ignis-kernel",
33534
33554
  "kind": "const",
33535
33555
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33536
- "line": 613,
33556
+ "line": 648,
33537
33557
  "signature": "conditionalCountResponse: typeof RouteConfigResolver.conditionalCountResponse"
33538
33558
  },
33539
33559
  {
@@ -33593,7 +33613,7 @@
33593
33613
  "specifier": "@venizia/ignis-kernel",
33594
33614
  "kind": "const",
33595
33615
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33596
- "line": 619,
33616
+ "line": 654,
33597
33617
  "signature": "defineControllerRouteConfigs: typeof RouteConfigResolver.defineControllerRouteConfigs"
33598
33618
  },
33599
33619
  {
@@ -33633,7 +33653,7 @@
33633
33653
  "specifier": "@venizia/ignis-kernel",
33634
33654
  "kind": "const",
33635
33655
  "file": "packages/kernel/src/base/controllers/common/constants.ts",
33636
- "line": 55,
33656
+ "line": 57,
33637
33657
  "signature": "findResponseHeaders: TResponseHeaders"
33638
33658
  },
33639
33659
  {
@@ -33883,7 +33903,7 @@
33883
33903
  "specifier": "@venizia/ignis-kernel",
33884
33904
  "kind": "const",
33885
33905
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33886
- "line": 614,
33906
+ "line": 649,
33887
33907
  "signature": "resolveCountConfig: typeof RouteConfigResolver.resolveCountConfig"
33888
33908
  },
33889
33909
  {
@@ -33893,7 +33913,7 @@
33893
33913
  "specifier": "@venizia/ignis-kernel",
33894
33914
  "kind": "const",
33895
33915
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33896
- "line": 618,
33916
+ "line": 653,
33897
33917
  "signature": "resolveCreateConfig: typeof RouteConfigResolver.resolveCreateConfig"
33898
33918
  },
33899
33919
  {
@@ -33903,7 +33923,7 @@
33903
33923
  "specifier": "@venizia/ignis-kernel",
33904
33924
  "kind": "const",
33905
33925
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33906
- "line": 616,
33926
+ "line": 651,
33907
33927
  "signature": "resolveFindByIdConfig: typeof RouteConfigResolver.resolveFindByIdConfig"
33908
33928
  },
33909
33929
  {
@@ -33913,7 +33933,7 @@
33913
33933
  "specifier": "@venizia/ignis-kernel",
33914
33934
  "kind": "const",
33915
33935
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33916
- "line": 615,
33936
+ "line": 650,
33917
33937
  "signature": "resolveFindConfig: typeof RouteConfigResolver.resolveFindConfig"
33918
33938
  },
33919
33939
  {
@@ -33923,7 +33943,7 @@
33923
33943
  "specifier": "@venizia/ignis-kernel",
33924
33944
  "kind": "const",
33925
33945
  "file": "packages/kernel/src/base/controllers/factory/definition.ts",
33926
- "line": 617,
33946
+ "line": 652,
33927
33947
  "signature": "resolveFindOneConfig: typeof RouteConfigResolver.resolveFindOneConfig"
33928
33948
  },
33929
33949
  {
@@ -440,7 +440,9 @@ 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 |
443
444
  | `find` | GET | `/` | List records with filter |
445
+ | `find` | POST | `/find` | List, `filter` in the body |
444
446
  | `findById` | GET | `/{id}` | Get single record |
445
447
  | `findOne` | GET | `/find-one` | Get first matching record |
446
448
  | `create` | POST | `/` | Create new record |
@@ -1,6 +1,6 @@
1
1
  # Repositories
2
2
 
3
- Repositories provide type-safe CRUD operations. Use `@repository` decorator with both `model` and `dataSource` for auto-discovery. A repository over another service's API has no model - declare it `type: RepositoryTypes.REMOTE` ([Read another service's API](/references/base/repositories/#read-another-service-s-api)).
3
+ Repositories provide type-safe CRUD operations. Use `@repository` decorator with both `model` and `dataSource` for auto-discovery. A repository over another service's API has no model - declare it `type: RepositoryTypes.REMOTE` ([Read another service's API](/references/base/repositories/#read-and-write-another-service-s-api)).
4
4
 
5
5
  ## Pattern 1: Zero Boilerplate (Recommended)
6
6
 
@@ -247,7 +247,9 @@ 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. |
250
251
  | `find` | `GET` | `/` | Retrieve all records matching a filter. |
252
+ | `find` | `POST` | `/find` | The same list, with the `filter` in the body. |
251
253
  | `findById` | `GET` | `/{id}` | Retrieve a single record by its ID. |
252
254
  | `findOne` | `GET` | `/find-one` | Retrieve a single record matching a filter. |
253
255
  | `create` | `POST` | `/` | Create a new record. |
@@ -352,6 +352,8 @@ 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) |
355
357
  | POST | `/todos` | Create todo (create) |
356
358
  | PATCH | `/todos/{id}` | Update todo by ID (updateById) |
357
359
  | PATCH | `/todos` | Update multiple todos by filter (updateBy) |
@@ -665,6 +665,7 @@ 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
668
669
  }
669
670
  ```
670
671
 
@@ -691,7 +692,9 @@ Returns a `BaseRestController` subclass with standard CRUD endpoints pre-configu
691
692
  | Route Name | Method | Path | Description |
692
693
  | :--- | :--- | :--- | :--- |
693
694
  | `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 |
694
696
  | `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` |
695
698
  | `findById` | `GET` | `/{id}` | Find a single record by its ID |
696
699
  | `findOne` | `GET` | `/find-one` | Find the first record matching a filter |
697
700
  | `create` | `POST` | `/` | Create a new record |
@@ -56,9 +56,13 @@ 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 |
59
61
 
60
62
  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.
61
63
 
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
+
62
66
  ## Map a request query string to a parsed filter
63
67
 
64
68
  `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:
@@ -27,7 +27,7 @@ That's it - `UserRepository` already has `find`, `findOne`, `findById`, `create`
27
27
 
28
28
  - **Engine-neutral contract, relational implementation.** `AbstractRepository` (engine-neutral, `@venizia/ignis-kernel`) declares the CRUD contract - no SQL, no Drizzle. The relational tier implements it as a chain of classes, each layer adding one capability (see table below).
29
29
  - **Datasource is auto-injected.** `@repository({ model, dataSource })` auto-injects the datasource at constructor param[0] and lazily resolves the entity class from its own metadata. A plain `extends DefaultCRUDRepository<...> {}` needs no constructor at all.
30
- - **Two repository types.** `type` defaults to `RepositoryTypes.MODEL`, which requires `model`. `RepositoryTypes.REMOTE` takes no `model` - see [Read another service's API](#read-another-service-s-api).
30
+ - **Two repository types.** `type` defaults to `RepositoryTypes.MODEL`, which requires `model`. `RepositoryTypes.REMOTE` takes no `model` - see [Read another service's API](#read-and-write-another-service-s-api).
31
31
  - **One options object per verb.** Reads and updates carry a `filter` (`where`, `fields`, `include`, `order`, `limit`, `offset`). Writes carry `data`. Every verb also accepts an `options` bag for `transaction` and `shouldSkipDefaultFilter`; `shouldReturn` is a write-only option, and `retry`/`shouldQueryRange` are read-only ones.
32
32
 
33
33
  **The relational class chain, and the Postgres binding of each rung**
@@ -145,7 +145,7 @@ const user = await userRepository.findById({
145
145
 
146
146
  Full options and rules: [Advanced Features - Read Retry](./advanced#read-retry-replica-lag).
147
147
 
148
- ### Read another service's API
148
+ ### Read and write another service's API
149
149
 
150
150
  Data behind another service has no local model, so `@repository` would have nothing to put in `model`. Declare the repository `RepositoryTypes.REMOTE` and give it the datasource only:
151
151
 
@@ -179,6 +179,46 @@ The datasource is still injected at constructor param[0]. No model binding is re
179
179
 
180
180
  TypeScript rejects a `MODEL` repository without `model` and a `REMOTE` one with it. A JavaScript caller gets the same answer at decoration time, as does an unknown `type`.
181
181
 
182
+ The same repository writes through the IGNIS CRUD routes the other service generates:
183
+
184
+ | Method | Request |
185
+ |---|---|
186
+ | `create({ data })` | `POST /products` |
187
+ | `updateById({ id, data })` | `PATCH /products/:id` |
188
+ | `updateAll({ where, data })` / `updateBy` | `PATCH /products`, `where` in the body beside the data |
189
+ | `deleteById({ id })` | `DELETE /products/:id` |
190
+ | `deleteAll({ where })` / `deleteBy` | `DELETE /products`, `where` in the body |
191
+
192
+ ```typescript
193
+ const { data: product } = await productRepository.create({ data: { name: 'Lamp' } });
194
+ await productRepository.updateById({ id: product.id, data: { name: 'Desk lamp' } });
195
+ await productRepository.deleteAll({ where: { id: { inq: staleIds } } });
196
+ ```
197
+
198
+ - A write sends a partial row by default (`HttpRepository<TRow, TWrite = Partial<TRow>>`), since the server fills ids and defaults.
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** (`find`, `findOne`, `count`, `existsWith`) sends its filter in the GET query string while the URL stays under 6,000 characters, and past that moves it into the body of `POST /<resource>/find` - the read route every generated controller answers with the same rows and the same `Content-Range`. A long `inq` therefore just works against a server on this release. Against an older server a read that long answers 404 instead of the 414/431 the GET would have hit; shorter reads are unchanged.
201
+ - An empty bulk `where` is refused before any request, as the server would refuse it; `force` cannot cross HTTP.
202
+ - `shouldReturn: false` answers the count with `data: null`. The count is the server's `x-response-count`.
203
+ - A failed write - or read - throws an `ApplicationError` with the server's status, its message appended, and its message code.
204
+ - There is no `createAll`: the IGNIS REST contract has no bulk-create route.
205
+
206
+ For a route the verbs do not cover - a `PUT`, an upload, an action endpoint - call the datasource:
207
+
208
+ ```typescript
209
+ // A plain object or array is sent as JSON; FormData, Blob, a string or binary goes as it is.
210
+ await catalogDataSource.write({ paths: ['products', id], method: 'PUT', body: replacement });
211
+
212
+ const response = await catalogDataSource.request({
213
+ paths: ['products', 'import'],
214
+ method: 'POST',
215
+ body: formData,
216
+ headers: { 'idempotency-key': key },
217
+ });
218
+ ```
219
+
220
+ `write` answers `{ data, count }` and throws on a non-2xx; `request` answers the raw `Response`. Both carry the auth token, and the 401 retry resends the same body.
221
+
182
222
  ## See also
183
223
 
184
224
  - [Relations & Includes](./relations) - eager loading, nested `scope` filters, many-to-many
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venizia/ignis-atlas",
3
- "version": "0.1.1-0",
3
+ "version": "0.1.1-2",
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": {