@postxl/generator 0.39.0 → 0.40.1
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/generator.js +37 -21
- package/dist/generators/indices/businesslogic-update-module.generator.js +1 -1
- package/dist/generators/indices/businesslogic-view-module.generator.js +1 -1
- package/dist/generators/indices/{seed-service.generator.d.ts → data-types.generator.d.ts} +2 -2
- package/dist/generators/indices/data-types.generator.js +48 -0
- package/dist/generators/indices/datamock-module.generator.js +7 -7
- package/dist/generators/indices/datamodule.generator.js +13 -34
- package/dist/generators/indices/dataservice.generator.js +201 -8
- package/dist/generators/indices/dispatcher-service.generator.js +14 -5
- package/dist/generators/indices/importexport-convert-import-functions.generator.d.ts +9 -0
- package/dist/generators/indices/importexport-convert-import-functions.generator.js +528 -0
- package/dist/generators/indices/{seed-template-decoder.generator.d.ts → importexport-exporter-class.generator.d.ts} +2 -2
- package/dist/generators/indices/importexport-exporter-class.generator.js +116 -0
- package/dist/generators/indices/importexport-import-service.generator.d.ts +9 -0
- package/dist/generators/indices/importexport-import-service.generator.js +563 -0
- package/dist/generators/indices/{seeddata-type.generator.d.ts → importexport-types.generator.d.ts} +2 -2
- package/dist/generators/indices/importexport-types.generator.js +234 -0
- package/dist/generators/indices/repositories.generator.js +7 -7
- package/dist/generators/indices/seed-template.generator.js +1 -1
- package/dist/generators/indices/testdata-service.generator.js +5 -4
- package/dist/generators/models/businesslogic-update.generator.js +5 -5
- package/dist/generators/models/businesslogic-view.generator.js +3 -3
- package/dist/generators/models/importexport-decoder.generator.d.ts +23 -0
- package/dist/generators/models/importexport-decoder.generator.js +234 -0
- package/dist/generators/models/repository.generator.js +50 -21
- package/dist/lib/imports.d.ts +1 -1
- package/dist/lib/meta.d.ts +468 -134
- package/dist/lib/meta.js +187 -80
- package/dist/lib/schema/schema.d.ts +54 -43
- package/dist/lib/schema/types.d.ts +63 -12
- package/dist/lib/schema/types.js +27 -7
- package/dist/lib/utils/string.d.ts +1 -0
- package/dist/lib/utils/string.js +4 -0
- package/dist/prisma/parse.js +4 -4
- package/package.json +1 -1
- package/dist/generators/indices/seed-service.generator.js +0 -354
- package/dist/generators/indices/seed-template-decoder.generator.js +0 -151
- package/dist/generators/indices/seeddata-type.generator.js +0 -42
package/dist/lib/meta.d.ts
CHANGED
|
@@ -13,27 +13,38 @@ export type SchemaMetaData = {
|
|
|
13
13
|
* Path that may be used to import from the action module.
|
|
14
14
|
*/
|
|
15
15
|
importPath: Types.Path;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
actionExecution: {
|
|
17
|
+
/**
|
|
18
|
+
* Path to the file containing the execution interface definition.
|
|
19
|
+
*/
|
|
20
|
+
filePath: Types.Path;
|
|
21
|
+
/**
|
|
22
|
+
* The name of the interface that handles the action execution.
|
|
23
|
+
*/
|
|
24
|
+
interface: Types.ClassName;
|
|
25
|
+
/**
|
|
26
|
+
* The name of the class that handles the action execution.
|
|
27
|
+
*/
|
|
28
|
+
class: Types.ClassName;
|
|
29
|
+
/**
|
|
30
|
+
* The name of the mock for the actionExecution class.
|
|
31
|
+
*/
|
|
32
|
+
mock: Types.ClassName;
|
|
33
|
+
};
|
|
34
|
+
dispatcherService: {
|
|
35
|
+
/**
|
|
36
|
+
* Path to the file containing the dispatcher service class definition.
|
|
37
|
+
*/
|
|
38
|
+
filePath: Types.Path;
|
|
39
|
+
/**
|
|
40
|
+
* The name of the dispatcher service class.
|
|
41
|
+
*/
|
|
42
|
+
class: Types.ClassName;
|
|
43
|
+
};
|
|
36
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* Meta data for the data generators
|
|
47
|
+
*/
|
|
37
48
|
data: {
|
|
38
49
|
/**
|
|
39
50
|
* The name of the Module class
|
|
@@ -51,6 +62,38 @@ export type SchemaMetaData = {
|
|
|
51
62
|
* Path to the file containing the mock data for the database.
|
|
52
63
|
*/
|
|
53
64
|
dataMockModuleFilePath: Types.Path;
|
|
65
|
+
repository: {
|
|
66
|
+
/**
|
|
67
|
+
* Path to the file containing the repository type definition.
|
|
68
|
+
*/
|
|
69
|
+
typeFilePath: Types.Path;
|
|
70
|
+
/**
|
|
71
|
+
* Name of the repository type.
|
|
72
|
+
*/
|
|
73
|
+
typeName: Types.TypeName;
|
|
74
|
+
/**
|
|
75
|
+
* Path to the file containing the array with all repositories.
|
|
76
|
+
*/
|
|
77
|
+
constFilePath: Types.Path;
|
|
78
|
+
/**
|
|
79
|
+
* Path to the file containing the index file for the repositories.
|
|
80
|
+
*/
|
|
81
|
+
indexFilePath: Types.Path;
|
|
82
|
+
};
|
|
83
|
+
types: {
|
|
84
|
+
/**
|
|
85
|
+
* Path to the types definition.
|
|
86
|
+
*/
|
|
87
|
+
filePath: Types.Path;
|
|
88
|
+
/**
|
|
89
|
+
* The name of the BulkMutation type.
|
|
90
|
+
*/
|
|
91
|
+
bulkMutation: Types.TypeName;
|
|
92
|
+
/**
|
|
93
|
+
* The name of the generic BulkMutation type for a model
|
|
94
|
+
*/
|
|
95
|
+
bulkMutationForModel: Types.TypeName;
|
|
96
|
+
};
|
|
54
97
|
/**
|
|
55
98
|
* Name of the mock data module class.
|
|
56
99
|
*/
|
|
@@ -59,22 +102,24 @@ export type SchemaMetaData = {
|
|
|
59
102
|
* Name of the data mock type/interface.
|
|
60
103
|
*/
|
|
61
104
|
dataMockDataType: Types.TypeName;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
105
|
+
dataService: {
|
|
106
|
+
/**
|
|
107
|
+
* Path to the file containing data service class definitions.
|
|
108
|
+
*/
|
|
109
|
+
filePath: Types.Path;
|
|
110
|
+
/**
|
|
111
|
+
* Name of the data service class.
|
|
112
|
+
*/
|
|
113
|
+
class: Types.ClassName;
|
|
114
|
+
/**
|
|
115
|
+
* Name of the function that performs BulkMutations.
|
|
116
|
+
*/
|
|
117
|
+
executeBulkMutations: Types.FunctionName;
|
|
118
|
+
/**
|
|
119
|
+
* Name of the function that performs BulkMutation.
|
|
120
|
+
*/
|
|
121
|
+
executeBulkMutation: Types.FunctionName;
|
|
122
|
+
};
|
|
78
123
|
/**
|
|
79
124
|
* Path to the file containing data mocker class definitions.
|
|
80
125
|
*/
|
|
@@ -96,17 +141,268 @@ export type SchemaMetaData = {
|
|
|
96
141
|
*/
|
|
97
142
|
dataMockerStubImportPath: Types.Path;
|
|
98
143
|
/**
|
|
99
|
-
* Path to the file containing the
|
|
144
|
+
* Path to the file containing the index file for the subs.
|
|
100
145
|
*/
|
|
101
|
-
|
|
146
|
+
stubIndexFilePath: Types.Path;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Meta data for import/export operations.
|
|
150
|
+
*/
|
|
151
|
+
importExport: {
|
|
102
152
|
/**
|
|
103
|
-
* Path
|
|
153
|
+
* Path that may be used to import from the import-export module.
|
|
104
154
|
*/
|
|
105
|
-
|
|
155
|
+
importPath: Types.Path;
|
|
106
156
|
/**
|
|
107
|
-
*
|
|
157
|
+
* Meta data for decoder functions.
|
|
108
158
|
*/
|
|
109
|
-
|
|
159
|
+
decoder: {
|
|
160
|
+
/**
|
|
161
|
+
* Path to the file containing the import-export decoder index.
|
|
162
|
+
*/
|
|
163
|
+
indexFilePath: Types.Path;
|
|
164
|
+
/**
|
|
165
|
+
* Path to the file containing the data decoder
|
|
166
|
+
*/
|
|
167
|
+
fullDecoderFilePath: Types.Path;
|
|
168
|
+
/**
|
|
169
|
+
* Name of the data decoder function
|
|
170
|
+
*/
|
|
171
|
+
fullDecoderName: Types.FunctionName;
|
|
172
|
+
/**
|
|
173
|
+
* Name of the data encoder function
|
|
174
|
+
*/
|
|
175
|
+
fullEncoderFunctionName: Types.FunctionName;
|
|
176
|
+
/**
|
|
177
|
+
* Name of the type that represents the data in encoded Excel format
|
|
178
|
+
*/
|
|
179
|
+
encodedExcelDataTypeName: Types.TypeName;
|
|
180
|
+
/**
|
|
181
|
+
* Name of the type that represents the data in the PXL model format
|
|
182
|
+
*/
|
|
183
|
+
decodedPXLModelDataTypeName: Types.TypeName;
|
|
184
|
+
};
|
|
185
|
+
/**
|
|
186
|
+
* Meta data for the exporter class.
|
|
187
|
+
*/
|
|
188
|
+
exporterClass: {
|
|
189
|
+
/**
|
|
190
|
+
* Path to the file containing the exporter class.
|
|
191
|
+
*/
|
|
192
|
+
filePath: Types.Path;
|
|
193
|
+
/**
|
|
194
|
+
* The name of the exporter class.
|
|
195
|
+
*/
|
|
196
|
+
name: Types.ClassName;
|
|
197
|
+
};
|
|
198
|
+
exportService: {
|
|
199
|
+
/**
|
|
200
|
+
* Path to the file containing the export service class.
|
|
201
|
+
*/
|
|
202
|
+
filePath: Types.Path;
|
|
203
|
+
/**
|
|
204
|
+
* The name of the export service class.
|
|
205
|
+
*/
|
|
206
|
+
name: Types.ClassName;
|
|
207
|
+
};
|
|
208
|
+
importService: {
|
|
209
|
+
/**
|
|
210
|
+
* Path to the file containing the import service class.
|
|
211
|
+
*/
|
|
212
|
+
filePath: Types.Path;
|
|
213
|
+
/**
|
|
214
|
+
* The name of the import service class.
|
|
215
|
+
*/
|
|
216
|
+
name: Types.ClassName;
|
|
217
|
+
/**
|
|
218
|
+
* Name of the instantiated import service as used in other services.
|
|
219
|
+
*
|
|
220
|
+
* Background: Normally, NestJS's dependency injection would be used to inject the import service into other services.
|
|
221
|
+
* However, due to a circular dependency between the import service and the dispatcher service, this is not possible.
|
|
222
|
+
* Instead, the dispatcher service has a public instance of the import service, which is set in the constructor of the import service.
|
|
223
|
+
* The `sharedName` is the name of this public instance.
|
|
224
|
+
*/
|
|
225
|
+
sharedName: Types.VariableName;
|
|
226
|
+
};
|
|
227
|
+
/**
|
|
228
|
+
* Meta data for functions that handle the import of Excel data.
|
|
229
|
+
*/
|
|
230
|
+
converterFunctions: {
|
|
231
|
+
/**
|
|
232
|
+
* Path to the file containing the import function.
|
|
233
|
+
*/
|
|
234
|
+
filePath: Types.Path;
|
|
235
|
+
/**
|
|
236
|
+
* Name of the function that convert import data to BulkMutations.
|
|
237
|
+
*/
|
|
238
|
+
importedDataToBulkMutations: Types.FunctionName;
|
|
239
|
+
/**
|
|
240
|
+
* Name of the function that converts a delta to BulkMutations.
|
|
241
|
+
*/
|
|
242
|
+
deltaToBulkMutations: Types.FunctionName;
|
|
243
|
+
/**
|
|
244
|
+
* Name of the function that converts mock data to BulkMutations.
|
|
245
|
+
*/
|
|
246
|
+
mockDataToBulkMutations: Types.FunctionName;
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Meta data for the import export types file.
|
|
250
|
+
*/
|
|
251
|
+
types: {
|
|
252
|
+
/**
|
|
253
|
+
* Path to the types definition.
|
|
254
|
+
*/
|
|
255
|
+
filePath: Types.Path;
|
|
256
|
+
/**
|
|
257
|
+
* The name of the type that represents the delta of all models.
|
|
258
|
+
*/
|
|
259
|
+
delta: Types.TypeName;
|
|
260
|
+
delta_Model: {
|
|
261
|
+
/**
|
|
262
|
+
* The name of the type that represents the delta of a model.
|
|
263
|
+
*/
|
|
264
|
+
type: Types.TypeName;
|
|
265
|
+
create: {
|
|
266
|
+
/**
|
|
267
|
+
* The name of the type that represents the items of a model that should be created.
|
|
268
|
+
*/
|
|
269
|
+
type: Types.TypeName;
|
|
270
|
+
/**
|
|
271
|
+
* The discriminant for the delta of a model that should be created.
|
|
272
|
+
*/
|
|
273
|
+
discriminant: Types.DiscriminantName;
|
|
274
|
+
/**
|
|
275
|
+
* The name of the type guard function that checks if a delta item is a create delta.
|
|
276
|
+
*/
|
|
277
|
+
typeGuard: Types.FunctionName;
|
|
278
|
+
};
|
|
279
|
+
update: {
|
|
280
|
+
/**
|
|
281
|
+
* The name of the type that represents the delta of existing model items that should be updated.
|
|
282
|
+
*/
|
|
283
|
+
type: Types.TypeName;
|
|
284
|
+
/**
|
|
285
|
+
* The discriminant for the delta of existing model items that should be updated.
|
|
286
|
+
*/
|
|
287
|
+
discriminant: Types.DiscriminantName;
|
|
288
|
+
/**
|
|
289
|
+
* The name of the type guard function that checks if a delta item is an update delta.
|
|
290
|
+
*/
|
|
291
|
+
typeGuard: Types.FunctionName;
|
|
292
|
+
};
|
|
293
|
+
delete: {
|
|
294
|
+
/**
|
|
295
|
+
* The name of the type that represents the items of a model that should be deleted.
|
|
296
|
+
*/
|
|
297
|
+
type: Types.TypeName;
|
|
298
|
+
/**
|
|
299
|
+
* The discriminant for the delta of a model that should be deleted.
|
|
300
|
+
*/
|
|
301
|
+
discriminant: Types.DiscriminantName;
|
|
302
|
+
/**
|
|
303
|
+
* The name of the type that represents the items of a model that should be deleted.
|
|
304
|
+
*/
|
|
305
|
+
typeGuard: Types.FunctionName;
|
|
306
|
+
};
|
|
307
|
+
unchanged: {
|
|
308
|
+
/**
|
|
309
|
+
* The name of the type that represents unchanged items of model.
|
|
310
|
+
*/
|
|
311
|
+
type: Types.TypeName;
|
|
312
|
+
/**
|
|
313
|
+
* The discriminant for unchanged items of a model.
|
|
314
|
+
*/
|
|
315
|
+
discriminant: Types.DiscriminantName;
|
|
316
|
+
/**
|
|
317
|
+
* The name of the type that represents unchanged items of a model.
|
|
318
|
+
*/
|
|
319
|
+
typeGuard: Types.FunctionName;
|
|
320
|
+
};
|
|
321
|
+
errors: {
|
|
322
|
+
/**
|
|
323
|
+
* The name of the type that represents the items of a model that contain errors.
|
|
324
|
+
*/
|
|
325
|
+
type: Types.TypeName;
|
|
326
|
+
/**
|
|
327
|
+
* The discriminant for the items of a model that contain errors.
|
|
328
|
+
*/
|
|
329
|
+
discriminant: Types.DiscriminantName;
|
|
330
|
+
/**
|
|
331
|
+
* The name of the type guard function that checks if a delta item is an error.
|
|
332
|
+
*/
|
|
333
|
+
typeGuard: Types.FunctionName;
|
|
334
|
+
/**
|
|
335
|
+
* Meta data for the model error type for a missing field.
|
|
336
|
+
*/
|
|
337
|
+
missingField: {
|
|
338
|
+
/**
|
|
339
|
+
* The name of the type that represents the error of missing fields.
|
|
340
|
+
*/
|
|
341
|
+
type: Types.TypeName;
|
|
342
|
+
/**
|
|
343
|
+
* The discriminant for the error of missing fields.
|
|
344
|
+
*/
|
|
345
|
+
discriminant: Types.DiscriminantName;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Meta data for the model error type for an invalid reference.
|
|
349
|
+
*/
|
|
350
|
+
invalidReference: {
|
|
351
|
+
/**
|
|
352
|
+
* The name of the type that represents the error of invalid references.
|
|
353
|
+
*/
|
|
354
|
+
type: Types.TypeName;
|
|
355
|
+
/**
|
|
356
|
+
* The discriminant for the error of invalid references.
|
|
357
|
+
*/
|
|
358
|
+
discriminant: Types.DiscriminantName;
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Meta data for the model error type for non-unique fields.
|
|
362
|
+
*/
|
|
363
|
+
nonUnique: {
|
|
364
|
+
/**
|
|
365
|
+
* The name of the type that represents the error of non-unique fields.
|
|
366
|
+
*/
|
|
367
|
+
type: Types.TypeName;
|
|
368
|
+
/**
|
|
369
|
+
* The discriminant for the error of non-unique fields.
|
|
370
|
+
*/
|
|
371
|
+
discriminant: Types.DiscriminantName;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Meta data for the model error type for invalid types.
|
|
375
|
+
*/
|
|
376
|
+
invalidType: {
|
|
377
|
+
/**
|
|
378
|
+
* The name of the type that represents the error of invalid types.
|
|
379
|
+
*/
|
|
380
|
+
type: Types.TypeName;
|
|
381
|
+
/**
|
|
382
|
+
* The discriminant for the error of invalid types.
|
|
383
|
+
*/
|
|
384
|
+
discriminant: Types.DiscriminantName;
|
|
385
|
+
};
|
|
386
|
+
/**
|
|
387
|
+
* Meta data for the model error type where the item is a required dependency of another item.
|
|
388
|
+
*/
|
|
389
|
+
isRequiredDependency: {
|
|
390
|
+
/**
|
|
391
|
+
* The name of the type that represents an item to be deleted that is a required dependency of another item.
|
|
392
|
+
*/
|
|
393
|
+
type: Types.TypeName;
|
|
394
|
+
/**
|
|
395
|
+
* The discriminant for the error of missing required dependencies.
|
|
396
|
+
*/
|
|
397
|
+
discriminant: Types.DiscriminantName;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* The name of the type representing modified fields of a model.
|
|
403
|
+
*/
|
|
404
|
+
delta_Fields: Types.TypeName;
|
|
405
|
+
};
|
|
110
406
|
};
|
|
111
407
|
businessLogic: {
|
|
112
408
|
/**
|
|
@@ -201,24 +497,8 @@ export type SchemaMetaData = {
|
|
|
201
497
|
* Path to seed Excel template file.
|
|
202
498
|
*/
|
|
203
499
|
templateExcelFilePath: Types.Path;
|
|
204
|
-
/**
|
|
205
|
-
* Path to template decoder **
|
|
206
|
-
*/
|
|
207
|
-
templateDecoderFilePath: Types.Path;
|
|
208
|
-
/**
|
|
209
|
-
* The name of the template decoder function.
|
|
210
|
-
*/
|
|
211
|
-
templateDecoderName: Types.Fnction;
|
|
212
500
|
};
|
|
213
501
|
seed: {
|
|
214
|
-
/**
|
|
215
|
-
* Path to the seed data type.
|
|
216
|
-
*/
|
|
217
|
-
seedDataTypeFilePath: Types.Path;
|
|
218
|
-
/**
|
|
219
|
-
* Path to the SeedService file.
|
|
220
|
-
*/
|
|
221
|
-
serviceFilePath: Types.Path;
|
|
222
502
|
/**
|
|
223
503
|
* The name of the SeedService class.
|
|
224
504
|
*/
|
|
@@ -227,10 +507,6 @@ export type SchemaMetaData = {
|
|
|
227
507
|
* Path that may be used in the import statement.
|
|
228
508
|
*/
|
|
229
509
|
importPath: Types.Path;
|
|
230
|
-
/**
|
|
231
|
-
* Name of the function that converts mock data to seed data.
|
|
232
|
-
*/
|
|
233
|
-
mockDataToCreateFunction: Types.Fnction;
|
|
234
510
|
};
|
|
235
511
|
trpc: {
|
|
236
512
|
/**
|
|
@@ -259,6 +535,14 @@ export type SchemaMetaData = {
|
|
|
259
535
|
* Path to the file containing DTO type definitions.
|
|
260
536
|
*/
|
|
261
537
|
path: Types.Path;
|
|
538
|
+
/**
|
|
539
|
+
* Type for generic models
|
|
540
|
+
*/
|
|
541
|
+
genericModel: Types.TypeName;
|
|
542
|
+
/**
|
|
543
|
+
* Generic type for an ID.
|
|
544
|
+
*/
|
|
545
|
+
idType: Types.TypeName;
|
|
262
546
|
/**
|
|
263
547
|
* Generic type for a Create DTO.
|
|
264
548
|
*/
|
|
@@ -318,6 +602,13 @@ export type ModelMetaData = {
|
|
|
318
602
|
* (e.g. `reactCreateModalComponentName`)
|
|
319
603
|
*/
|
|
320
604
|
internalSingularName: Types.VariableName;
|
|
605
|
+
/**
|
|
606
|
+
* The name of the capitalized model in singular form.
|
|
607
|
+
*
|
|
608
|
+
* NOTE: This name is meant to be used in internal types only.
|
|
609
|
+
* For any types, class names, etc. that are exposed, please use a more specific name.
|
|
610
|
+
*/
|
|
611
|
+
internalSingularNameCapitalized: Types.VariableName;
|
|
321
612
|
/**
|
|
322
613
|
* The name of the model in plural form.
|
|
323
614
|
*
|
|
@@ -326,12 +617,19 @@ export type ModelMetaData = {
|
|
|
326
617
|
* (e.g. `reactCreateModalComponentName`)
|
|
327
618
|
*/
|
|
328
619
|
internalPluralName: Types.VariableName;
|
|
620
|
+
/**
|
|
621
|
+
* The name of the capitalized model in plural form.
|
|
622
|
+
*
|
|
623
|
+
* NOTE: This name is meant to be used in internal types only.
|
|
624
|
+
* For any variables, class names, etc. that are exposed, please use a more specific name.
|
|
625
|
+
*/
|
|
626
|
+
internalPluralNameCapitalized: Types.VariableName;
|
|
329
627
|
/**
|
|
330
628
|
* Properties provided by the `actions` generators.
|
|
331
629
|
*/
|
|
332
630
|
actions: {
|
|
333
631
|
/**
|
|
334
|
-
* Each model defines its own action scope as a
|
|
632
|
+
* Each model defines its own action scope as a discriminant for the action execution. (e.g. `aggregation`)
|
|
335
633
|
*/
|
|
336
634
|
actionScopeConstType: Types.TypeName;
|
|
337
635
|
};
|
|
@@ -362,52 +660,112 @@ export type ModelMetaData = {
|
|
|
362
660
|
/**
|
|
363
661
|
* The name of the function that adds missing values to the partially populated model value.
|
|
364
662
|
*/
|
|
365
|
-
stubGenerationFnName: Types.
|
|
663
|
+
stubGenerationFnName: Types.FunctionName;
|
|
366
664
|
/**
|
|
367
|
-
*
|
|
665
|
+
* The name by which the repository is exposed in the dataService/context. (e.g. aggregations)
|
|
368
666
|
*/
|
|
369
|
-
|
|
667
|
+
dataServiceName: Types.VariableName;
|
|
370
668
|
/**
|
|
371
|
-
*
|
|
669
|
+
* The name for internal use of modelIds in data mocker
|
|
372
670
|
*/
|
|
373
|
-
|
|
671
|
+
dataServiceIdName: Types.VariableName;
|
|
672
|
+
repository: {
|
|
673
|
+
/**
|
|
674
|
+
* Name of the file containing the repository definition for this model.
|
|
675
|
+
*/
|
|
676
|
+
fileName: Types.FileName;
|
|
677
|
+
/**
|
|
678
|
+
* Path to the file containing the repository definition.
|
|
679
|
+
*/
|
|
680
|
+
filePath: Types.Path;
|
|
681
|
+
/**
|
|
682
|
+
* The name of the class for the repository definition of this model (e.g. AggregationRepository).
|
|
683
|
+
*/
|
|
684
|
+
className: Types.ClassName;
|
|
685
|
+
/**
|
|
686
|
+
* The name of the function that decodes a source (database) object to a fully typed object, e.g. `toAggregation`.
|
|
687
|
+
*/
|
|
688
|
+
decoderFnName: Types.FunctionName;
|
|
689
|
+
/**
|
|
690
|
+
* The name of the method that should be used to get objects from the database, e.g. `aggregations`.
|
|
691
|
+
*/
|
|
692
|
+
getMethodFnName: Types.FunctionName;
|
|
693
|
+
};
|
|
694
|
+
mockRepository: {
|
|
695
|
+
/**
|
|
696
|
+
* Name of the file containing the mock repository definition for this model.
|
|
697
|
+
*/
|
|
698
|
+
fileName: Types.FileName;
|
|
699
|
+
/**
|
|
700
|
+
* Path to the file containing the mock repository definition.
|
|
701
|
+
*/
|
|
702
|
+
filePath: Types.Path;
|
|
703
|
+
/**
|
|
704
|
+
* The name of the class for the in-memory mock repository definition of this model (e.g. MockAggregationRepository).
|
|
705
|
+
*/
|
|
706
|
+
className: Types.ClassName;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
/**
|
|
710
|
+
* Properties provided by the `importExport` generators
|
|
711
|
+
*/
|
|
712
|
+
importExport: {
|
|
374
713
|
/**
|
|
375
|
-
* Name of the
|
|
714
|
+
* Name of the data exports model property (e.g. `Aggregations`).
|
|
376
715
|
*/
|
|
377
|
-
|
|
716
|
+
exportDataPropertyName: Types.VariableName;
|
|
378
717
|
/**
|
|
379
|
-
*
|
|
718
|
+
* Name of the data exports model in the full export (e.g. `aggregations`).
|
|
380
719
|
*/
|
|
381
|
-
|
|
720
|
+
exportDataFullPropertyName: Types.VariableName;
|
|
382
721
|
/**
|
|
383
|
-
*
|
|
722
|
+
* Name of the data export type (e.g. `Aggregations_Export`).
|
|
384
723
|
*/
|
|
385
|
-
|
|
724
|
+
exportDataTypeName: Types.TypeName;
|
|
386
725
|
/**
|
|
387
|
-
*
|
|
726
|
+
* Name of the function that adds an instance of this model to the exporter, e.g. `addAggregation`.
|
|
388
727
|
*/
|
|
389
|
-
|
|
728
|
+
exportAddFunctionName: Types.FunctionName;
|
|
390
729
|
/**
|
|
391
|
-
* The name
|
|
730
|
+
* The name of the export Excel table (e.g. `Aggregations`).
|
|
392
731
|
*/
|
|
393
|
-
|
|
732
|
+
tableName: string;
|
|
394
733
|
/**
|
|
395
|
-
*
|
|
734
|
+
* Name of the model specific error type
|
|
396
735
|
*/
|
|
397
|
-
|
|
736
|
+
delta_Model_Errors: Types.TypeName;
|
|
398
737
|
/**
|
|
399
|
-
*
|
|
738
|
+
* Meta data of the model's Excel decoders
|
|
400
739
|
*/
|
|
401
|
-
|
|
402
|
-
repository: {
|
|
740
|
+
decoder: {
|
|
403
741
|
/**
|
|
404
|
-
*
|
|
742
|
+
* Name of the file containing the model's Excel decoders.
|
|
405
743
|
*/
|
|
406
|
-
|
|
744
|
+
fileName: Types.FileName;
|
|
407
745
|
/**
|
|
408
|
-
*
|
|
746
|
+
* Path to the file containing the model's Excel decoders.
|
|
747
|
+
*/
|
|
748
|
+
filePath: Types.Path;
|
|
749
|
+
/**
|
|
750
|
+
* Name of the type that represents the model in Excel import/export, e.g. `Aggregation_EncodedExcelData`.
|
|
409
751
|
*/
|
|
410
|
-
|
|
752
|
+
encodedExcelType: Types.TypeName;
|
|
753
|
+
/**
|
|
754
|
+
* Name of the decoder function that represents the Excel table import type, e.g. `aggregationExcelTableDecoder`.
|
|
755
|
+
*/
|
|
756
|
+
tableDecoder: Types.FunctionName;
|
|
757
|
+
/**
|
|
758
|
+
* Name of the function that converts a model item to the Excel format, e.g. `encodeAggregation`.
|
|
759
|
+
*/
|
|
760
|
+
itemEncoderFunctionName: Types.FunctionName;
|
|
761
|
+
/**
|
|
762
|
+
* Name of the function that converts an array of model items to the Excel format, e.g. `encodeAggregations`.
|
|
763
|
+
*/
|
|
764
|
+
arrayEncoderFunctionName: Types.FunctionName;
|
|
765
|
+
/**
|
|
766
|
+
* Name of the array in the decoded data containing all entities of this model, e.g. `aggregations`.
|
|
767
|
+
*/
|
|
768
|
+
decodedModelArrayName: Types.VariableName;
|
|
411
769
|
};
|
|
412
770
|
};
|
|
413
771
|
/**
|
|
@@ -466,7 +824,7 @@ export type ModelMetaData = {
|
|
|
466
824
|
*/
|
|
467
825
|
serviceFilePath: Types.Path;
|
|
468
826
|
/**
|
|
469
|
-
* The name of the model used as a
|
|
827
|
+
* The name of the model used as a discriminant for the action execution. (e.g. `aggregation`)
|
|
470
828
|
*/
|
|
471
829
|
actionModelDiscriminantName: Types.VariableName;
|
|
472
830
|
/**
|
|
@@ -485,35 +843,35 @@ export type ModelMetaData = {
|
|
|
485
843
|
/**
|
|
486
844
|
* Name of the function that creates a `create` action for the model (e.g. `createActionAggregationCreate`)
|
|
487
845
|
*/
|
|
488
|
-
createActionFunctionNameCreate: Types.
|
|
846
|
+
createActionFunctionNameCreate: Types.FunctionName;
|
|
489
847
|
/**
|
|
490
848
|
* Name of the function that creates a `createMany` action for the model (e.g. `createActionAggregationCreateMany`)
|
|
491
849
|
*/
|
|
492
|
-
createActionFunctionNameCreateMany: Types.
|
|
850
|
+
createActionFunctionNameCreateMany: Types.FunctionName;
|
|
493
851
|
/**
|
|
494
852
|
* Name of the function that creates a `update` action for the model (e.g. `createActionAggregationUpdate`)
|
|
495
853
|
*/
|
|
496
|
-
createActionFunctionNameUpdate: Types.
|
|
854
|
+
createActionFunctionNameUpdate: Types.FunctionName;
|
|
497
855
|
/**
|
|
498
856
|
* Name of the function that creates a `updateMany` action for the model (e.g. `createActionAggregationUpdateMany`)
|
|
499
857
|
*/
|
|
500
|
-
createActionFunctionNameUpdateMany: Types.
|
|
858
|
+
createActionFunctionNameUpdateMany: Types.FunctionName;
|
|
501
859
|
/**
|
|
502
860
|
* Name of the function that creates a `upsert` action for the model (e.g. `createActionAggregationUpsert`)
|
|
503
861
|
*/
|
|
504
|
-
createActionFunctionNameUpsert: Types.
|
|
862
|
+
createActionFunctionNameUpsert: Types.FunctionName;
|
|
505
863
|
/**
|
|
506
864
|
* Name of the function that creates a `upsertMany` action for the model (e.g. `createActionAggregationUpsertMany`)
|
|
507
865
|
*/
|
|
508
|
-
createActionFunctionNameUpsertMany: Types.
|
|
866
|
+
createActionFunctionNameUpsertMany: Types.FunctionName;
|
|
509
867
|
/**
|
|
510
868
|
* Name of the function that creates a `delete` action for the model (e.g. `createActionAggregationDelete`)
|
|
511
869
|
*/
|
|
512
|
-
createActionFunctionNameDelete: Types.
|
|
870
|
+
createActionFunctionNameDelete: Types.FunctionName;
|
|
513
871
|
/**
|
|
514
872
|
* Name of the function that creates a `deleteMany` action for the model (e.g. `createActionAggregationDeleteMany`)
|
|
515
873
|
*/
|
|
516
|
-
createActionFunctionNameDeleteMany: Types.
|
|
874
|
+
createActionFunctionNameDeleteMany: Types.FunctionName;
|
|
517
875
|
};
|
|
518
876
|
/**
|
|
519
877
|
* Name by which the business logic service exposes the data service.
|
|
@@ -536,30 +894,6 @@ export type ModelMetaData = {
|
|
|
536
894
|
* The file or package name that contains the seed data for this model (e.g. `@d2i/aggregations`).
|
|
537
895
|
*/
|
|
538
896
|
importPath: Types.Path;
|
|
539
|
-
excel: {
|
|
540
|
-
/**
|
|
541
|
-
* The name of the Excel table, e.g. `Aggregations`.
|
|
542
|
-
*/
|
|
543
|
-
tableName: string;
|
|
544
|
-
};
|
|
545
|
-
decoder: {
|
|
546
|
-
/**
|
|
547
|
-
* The name of the Zod schema, e.g. `aggregationSchema`.
|
|
548
|
-
*/
|
|
549
|
-
schemaName: Types.VariableName;
|
|
550
|
-
/**
|
|
551
|
-
* The name of the decoder, e.g. `aggregationDecoder`.
|
|
552
|
-
*/
|
|
553
|
-
decoderName: Types.VariableName;
|
|
554
|
-
/**
|
|
555
|
-
* The name of the inferred decoder type, e.g. `AggregationType`.
|
|
556
|
-
*/
|
|
557
|
-
decoderTypeName: Types.TypeName;
|
|
558
|
-
/**
|
|
559
|
-
* The name of the resulting field in the seed data
|
|
560
|
-
*/
|
|
561
|
-
dataName: Types.VariableName;
|
|
562
|
-
};
|
|
563
897
|
};
|
|
564
898
|
/**
|
|
565
899
|
* Properties provided by the `react` generators.
|
|
@@ -577,11 +911,11 @@ export type ModelMetaData = {
|
|
|
577
911
|
/**
|
|
578
912
|
* Name of the function that should be used as React hook (e.g. `useAggregationContext`).
|
|
579
913
|
*/
|
|
580
|
-
hookFnName: Types.
|
|
914
|
+
hookFnName: Types.FunctionName;
|
|
581
915
|
/**
|
|
582
916
|
* Name of the function that may be used to get a single instance of this model (e.g. `useAggregation`).
|
|
583
917
|
*/
|
|
584
|
-
instanceGetterHookFnName: Types.
|
|
918
|
+
instanceGetterHookFnName: Types.FunctionName;
|
|
585
919
|
};
|
|
586
920
|
/**
|
|
587
921
|
* Names of React components that should be generated for this model.
|
|
@@ -638,7 +972,7 @@ export type ModelMetaData = {
|
|
|
638
972
|
/**
|
|
639
973
|
* The full method name of the React Query method (e.g. `aggregations.getMap`).
|
|
640
974
|
*/
|
|
641
|
-
reactQueryMethod: Types.
|
|
975
|
+
reactQueryMethod: Types.FunctionName;
|
|
642
976
|
};
|
|
643
977
|
create: {
|
|
644
978
|
/**
|
|
@@ -648,7 +982,7 @@ export type ModelMetaData = {
|
|
|
648
982
|
/**
|
|
649
983
|
* The full method name of the React Query method (e.g. `aggregations.create`).
|
|
650
984
|
*/
|
|
651
|
-
reactQueryMethod: Types.
|
|
985
|
+
reactQueryMethod: Types.FunctionName;
|
|
652
986
|
};
|
|
653
987
|
update: {
|
|
654
988
|
/**
|
|
@@ -658,7 +992,7 @@ export type ModelMetaData = {
|
|
|
658
992
|
/**
|
|
659
993
|
* The full method name of the React Query method (e.g. `aggregations.update`).
|
|
660
994
|
*/
|
|
661
|
-
reactQueryMethod: Types.
|
|
995
|
+
reactQueryMethod: Types.FunctionName;
|
|
662
996
|
};
|
|
663
997
|
delete: {
|
|
664
998
|
/**
|
|
@@ -668,7 +1002,7 @@ export type ModelMetaData = {
|
|
|
668
1002
|
/**
|
|
669
1003
|
* The full method name of the React Query method (e.g. `aggregations.delete`).
|
|
670
1004
|
*/
|
|
671
|
-
reactQueryMethod: Types.
|
|
1005
|
+
reactQueryMethod: Types.FunctionName;
|
|
672
1006
|
};
|
|
673
1007
|
};
|
|
674
1008
|
/**
|
|
@@ -691,28 +1025,28 @@ export type ModelMetaData = {
|
|
|
691
1025
|
* Function that may be used to convert a scalar value to a branded ID type,
|
|
692
1026
|
* e.g. `toAggregationId`.
|
|
693
1027
|
*/
|
|
694
|
-
toBrandedIdTypeFnName: Types.
|
|
1028
|
+
toBrandedIdTypeFnName: Types.FunctionName;
|
|
695
1029
|
zodDecoderFnNames: {
|
|
696
1030
|
/**
|
|
697
1031
|
* The name of the function that decodes a scalar value to a branded ID type, e.g. `aggregationIdDecoder`.
|
|
698
1032
|
*/
|
|
699
|
-
id: Types.
|
|
1033
|
+
id: Types.FunctionName;
|
|
700
1034
|
/**
|
|
701
1035
|
* The name of the function that decodes a source (database) object to a fully typed object, e.g. `aggregationDatabaseDecoder`.
|
|
702
1036
|
*/
|
|
703
|
-
fromDatabase: Types.
|
|
1037
|
+
fromDatabase: Types.FunctionName;
|
|
704
1038
|
/**
|
|
705
1039
|
* The name of the function that decodes a Create object to a fully typed object, e.g. `aggregationCreateDecoder`.
|
|
706
1040
|
*/
|
|
707
|
-
createObject: Types.
|
|
1041
|
+
createObject: Types.FunctionName;
|
|
708
1042
|
/**
|
|
709
1043
|
* The name of the function that decodes an Update object to a fully typed object, e.g. `aggregationUpdateDecoder`.
|
|
710
1044
|
*/
|
|
711
|
-
updateObject: Types.
|
|
1045
|
+
updateObject: Types.FunctionName;
|
|
712
1046
|
/**
|
|
713
1047
|
* The name of the function that decodes an Upsert object to a fully typed object, e.g. `aggregationUpsertDecoder`.
|
|
714
1048
|
*/
|
|
715
|
-
upsertObject: Types.
|
|
1049
|
+
upsertObject: Types.FunctionName;
|
|
716
1050
|
};
|
|
717
1051
|
/**
|
|
718
1052
|
* Type definitions for the different Data Transfer Objects (DTOs).
|
|
@@ -765,11 +1099,11 @@ export type FieldMetaData = {
|
|
|
765
1099
|
/**
|
|
766
1100
|
* The name of the method that should be used to get all child objects for a given item, e.g. `getItemsForAggregation`.
|
|
767
1101
|
*/
|
|
768
|
-
getByForeignKeyMethodFnName: Types.
|
|
1102
|
+
getByForeignKeyMethodFnName: Types.FunctionName;
|
|
769
1103
|
/**
|
|
770
1104
|
* The name of the method that should be used to get all child Ids for a given item, e.g. `getIdsForAggregation`.
|
|
771
1105
|
*/
|
|
772
|
-
getByForeignKeyIdsMethodFnName: Types.
|
|
1106
|
+
getByForeignKeyIdsMethodFnName: Types.FunctionName;
|
|
773
1107
|
/**
|
|
774
1108
|
* The name of the column in the seed Excel table, e.g. `Aggregation`.
|
|
775
1109
|
*/
|