@mgamadeus/ddd-web 0.10.0 → 0.12.0
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/.claude/skills/ddd-web-specialist/references/consumer.md +2 -2
- package/CHANGELOG.md +32 -0
- package/dist/{chunk-PZ6AAETR.js → chunk-J2RLNVKK.js} +119 -43
- package/dist/chunk-J2RLNVKK.js.map +1 -0
- package/dist/codegen/cli.js +1 -1
- package/dist/codegen/index.d.ts +25 -2
- package/dist/codegen/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-PZ6AAETR.js.map +0 -1
package/dist/codegen/cli.js
CHANGED
package/dist/codegen/index.d.ts
CHANGED
|
@@ -203,10 +203,22 @@ interface ModelOptions {
|
|
|
203
203
|
* `document`: a model is named and placed by its schema name as the document writes it — the last dot segment is
|
|
204
204
|
* the model name, unchanged (`AIConversationMessage`, not `AiConversationMessage`), the segments before it are the
|
|
205
205
|
* folders; a folder that happens to prefix the last segment never splits it (`…Messages.DelegationResults` stays
|
|
206
|
-
* `DelegationResults` beside a `…Messages.Delegation` namespace).
|
|
207
|
-
*
|
|
206
|
+
* `DelegationResults` beside a `…Messages.Delegation` namespace). Every model file exports its own schema's name,
|
|
207
|
+
* also when another folder holds the same name (the path tells them apart; an importer aliases it). `rtk` (default):
|
|
208
|
+
* RTK codegen's names, placed by the namespace registry.
|
|
208
209
|
*/
|
|
209
210
|
naming?: 'rtk' | 'document';
|
|
211
|
+
/**
|
|
212
|
+
* `all`: every schema an operation of the document reaches is written, also when `filterEndpoints` leaves its
|
|
213
|
+
* operations out of the api file (a models-only pass over all operations; their argument types are not written).
|
|
214
|
+
* `reachable` (default): the schemas of the generated endpoints.
|
|
215
|
+
*/
|
|
216
|
+
scope?: 'reachable' | 'all';
|
|
217
|
+
/**
|
|
218
|
+
* `false`: no barrel `index.ts` in the models folder — the api file and the models import every model by its path.
|
|
219
|
+
* Default `true`. With `naming: 'document'` the barrel leaves out a model whose name another folder holds too.
|
|
220
|
+
*/
|
|
221
|
+
index?: boolean;
|
|
210
222
|
/**
|
|
211
223
|
* `const`: an enum property becomes two exported objects in its model's file, `<Model><Property>` and
|
|
212
224
|
* `<Model><Property>Strict` (`as const`), keyed by the enum values; the property is typed from the Strict object
|
|
@@ -214,6 +226,17 @@ interface ModelOptions {
|
|
|
214
226
|
* union of RTK codegen. Needs `naming: 'document'` (the const names start with the document's model name).
|
|
215
227
|
*/
|
|
216
228
|
enums?: 'union' | 'const';
|
|
229
|
+
/**
|
|
230
|
+
* With `enums: 'const'`: the property's type from the Strict object (`strict`, default: the union of the values) or
|
|
231
|
+
* from the plain object (`wide`: `(typeof X)[keyof typeof X]`, in effect `string`).
|
|
232
|
+
*/
|
|
233
|
+
enumPropertyType?: 'strict' | 'wide';
|
|
234
|
+
/**
|
|
235
|
+
* `const` (with `enums: 'const'`): a string property named `objectType` (the class name a DDD write reads) gets a
|
|
236
|
+
* one-value enum const of its schema name with `\\` for `.` (`<Model>ObjectType` = `{ App_Domain_X: "App\\Domain\\X" }`)
|
|
237
|
+
* and is required. Default `document` (as declared).
|
|
238
|
+
*/
|
|
239
|
+
objectType?: 'document' | 'const';
|
|
217
240
|
/** `| null` beside a `$ref` whose property is nullable (RTK codegen drops it). Default `false`. */
|
|
218
241
|
nullableRefs?: boolean;
|
|
219
242
|
/**
|
package/dist/codegen/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mgamadeus/ddd-web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "TypeScript web client for backends built with mgamadeus/ddd, the DDD entity framework for Symfony and Doctrine (Composer/Packagist). Generates a typed RTK Query SDK from the backend's OpenAPI document, builds DDD QueryOptions (filters, orderBy, expand, select, paging) and handles JWT auth with token refresh.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ddd",
|