@mgamadeus/ddd-web 0.10.0 → 0.11.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 +20 -0
- package/dist/{chunk-PZ6AAETR.js → chunk-XXMTSCOZ.js} +92 -29
- package/dist/chunk-XXMTSCOZ.js.map +1 -0
- package/dist/codegen/cli.js +1 -1
- package/dist/codegen/index.d.ts +19 -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,16 @@ 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
|
+
* `false`: no barrel `index.ts` in the models folder — the api file and the models import every model by its path.
|
|
213
|
+
* Default `true`. With `naming: 'document'` the barrel leaves out a model whose name another folder holds too.
|
|
214
|
+
*/
|
|
215
|
+
index?: boolean;
|
|
210
216
|
/**
|
|
211
217
|
* `const`: an enum property becomes two exported objects in its model's file, `<Model><Property>` and
|
|
212
218
|
* `<Model><Property>Strict` (`as const`), keyed by the enum values; the property is typed from the Strict object
|
|
@@ -214,6 +220,17 @@ interface ModelOptions {
|
|
|
214
220
|
* union of RTK codegen. Needs `naming: 'document'` (the const names start with the document's model name).
|
|
215
221
|
*/
|
|
216
222
|
enums?: 'union' | 'const';
|
|
223
|
+
/**
|
|
224
|
+
* With `enums: 'const'`: the property's type from the Strict object (`strict`, default: the union of the values) or
|
|
225
|
+
* from the plain object (`wide`: `(typeof X)[keyof typeof X]`, in effect `string`).
|
|
226
|
+
*/
|
|
227
|
+
enumPropertyType?: 'strict' | 'wide';
|
|
228
|
+
/**
|
|
229
|
+
* `const` (with `enums: 'const'`): a string property named `objectType` (the class name a DDD write reads) gets a
|
|
230
|
+
* one-value enum const of its schema name with `\\` for `.` (`<Model>ObjectType` = `{ App_Domain_X: "App\\Domain\\X" }`)
|
|
231
|
+
* and is required. Default `document` (as declared).
|
|
232
|
+
*/
|
|
233
|
+
objectType?: 'document' | 'const';
|
|
217
234
|
/** `| null` beside a `$ref` whose property is nullable (RTK codegen drops it). Default `false`. */
|
|
218
235
|
nullableRefs?: boolean;
|
|
219
236
|
/**
|
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.11.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",
|