@decaf-ts/decorator-validation 1.11.10 → 1.11.12
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/README.md +1 -1
- package/dist/decorator-validation.cjs +1 -1
- package/dist/decorator-validation.cjs.map +1 -1
- package/dist/decorator-validation.js +1 -1
- package/dist/decorator-validation.js.map +1 -1
- package/lib/esm/index.d.ts +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/esm/model/Model.d.ts +0 -103
- package/lib/esm/model/Model.js +11 -250
- package/lib/esm/model/Model.js.map +1 -1
- package/lib/esm/model/ModelRegistry.d.ts +181 -0
- package/lib/esm/model/ModelRegistry.js +291 -0
- package/lib/esm/model/ModelRegistry.js.map +1 -0
- package/lib/esm/model/index.d.ts +1 -0
- package/lib/esm/model/index.js +1 -0
- package/lib/esm/model/index.js.map +1 -1
- package/lib/esm/model/validation.d.ts +1 -1
- package/lib/esm/model/validation.js +6 -6
- package/lib/esm/model/validation.js.map +1 -1
- package/lib/esm/overrides/Metadata.d.ts +4 -1
- package/lib/esm/overrides/overrides.js +49 -0
- package/lib/esm/overrides/overrides.js.map +1 -1
- package/lib/esm/overrides/types.d.ts +1 -1
- package/lib/esm/utils/constants.d.ts +1 -0
- package/lib/esm/utils/constants.js +1 -0
- package/lib/esm/utils/constants.js.map +1 -1
- package/lib/esm/utils/index.d.ts +1 -0
- package/lib/esm/utils/index.js +1 -0
- package/lib/esm/utils/index.js.map +1 -1
- package/lib/esm/utils/serialization.d.ts +0 -41
- package/lib/esm/utils/serialization.js +1 -72
- package/lib/esm/utils/serialization.js.map +1 -1
- package/lib/esm/utils/serializers.d.ts +41 -0
- package/lib/esm/utils/serializers.js +73 -0
- package/lib/esm/utils/serializers.js.map +1 -0
- package/lib/esm/validation/Validation.js +1 -1
- package/lib/esm/validation/Validation.js.map +1 -1
- package/lib/esm/validation/Validators/constants.d.ts +1 -0
- package/lib/esm/validation/Validators/constants.js +1 -0
- package/lib/esm/validation/Validators/constants.js.map +1 -1
- package/lib/esm/validation/Validators/utils.js +1 -1
- package/lib/esm/validation/Validators/utils.js.map +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/model/Model.cjs +14 -255
- package/lib/model/Model.d.ts +0 -103
- package/lib/model/Model.js.map +1 -1
- package/lib/model/ModelRegistry.cjs +296 -0
- package/lib/model/ModelRegistry.d.ts +181 -0
- package/lib/model/ModelRegistry.js.map +1 -0
- package/lib/model/index.cjs +1 -0
- package/lib/model/index.d.ts +1 -0
- package/lib/model/index.js.map +1 -1
- package/lib/model/validation.cjs +6 -6
- package/lib/model/validation.d.ts +1 -1
- package/lib/model/validation.js.map +1 -1
- package/lib/overrides/Metadata.d.ts +4 -1
- package/lib/overrides/overrides.cjs +49 -0
- package/lib/overrides/overrides.js.map +1 -1
- package/lib/overrides/types.d.ts +1 -1
- package/lib/utils/constants.cjs +2 -1
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/index.cjs +1 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js.map +1 -1
- package/lib/utils/serialization.cjs +2 -74
- package/lib/utils/serialization.d.ts +0 -41
- package/lib/utils/serialization.js.map +1 -1
- package/lib/utils/serializers.cjs +77 -0
- package/lib/utils/serializers.d.ts +41 -0
- package/lib/utils/serializers.js.map +1 -0
- package/lib/validation/Validation.cjs +4 -4
- package/lib/validation/Validation.js.map +1 -1
- package/lib/validation/Validators/constants.cjs +1 -0
- package/lib/validation/Validators/constants.d.ts +1 -0
- package/lib/validation/Validators/constants.js.map +1 -1
- package/lib/validation/Validators/utils.cjs +6 -6
- package/lib/validation/Validators/utils.js.map +1 -1
- package/package.json +1 -1
package/lib/model/Model.cjs
CHANGED
|
@@ -1,132 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Model =
|
|
4
|
-
exports.bulkModelRegister = bulkModelRegister;
|
|
3
|
+
exports.Model = void 0;
|
|
5
4
|
const serialization_1 = require("./../utils/serialization.cjs");
|
|
6
5
|
const validation_1 = require("./validation.cjs");
|
|
7
6
|
const hashing_1 = require("./../utils/hashing.cjs");
|
|
8
7
|
const constants_1 = require("./../utils/constants.cjs");
|
|
9
|
-
const constants_2 = require("./../
|
|
10
|
-
const constants_3 = require("./constants.cjs");
|
|
11
|
-
const constants_4 = require("./../constants/index.cjs");
|
|
8
|
+
const constants_2 = require("./../constants/index.cjs");
|
|
12
9
|
const decoration_1 = require("@decaf-ts/decoration");
|
|
13
10
|
const equality_1 = require("./../utils/equality.cjs");
|
|
14
|
-
|
|
15
|
-
let actingModelRegistry;
|
|
16
|
-
/**
|
|
17
|
-
* @description Registry manager for model constructors that enables serialization and rebuilding
|
|
18
|
-
* @summary The ModelRegistryManager implements the ModelRegistry interface and provides
|
|
19
|
-
* functionality for registering, retrieving, and building model instances. It maintains
|
|
20
|
-
* a cache of model constructors indexed by name, allowing for efficient lookup and instantiation.
|
|
21
|
-
* This class is essential for the serialization and deserialization of model objects.
|
|
22
|
-
*
|
|
23
|
-
* @param {function(Record<string, any>): boolean} [testFunction] - Function to test if an object is a model, defaults to {@link Model#isModel}
|
|
24
|
-
*
|
|
25
|
-
* @class ModelRegistryManager
|
|
26
|
-
* @template M Type of model that can be registered, must extend Model
|
|
27
|
-
* @implements ModelRegistry<M>
|
|
28
|
-
* @category Model
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```typescript
|
|
32
|
-
* // Create a model registry
|
|
33
|
-
* const registry = new ModelRegistryManager();
|
|
34
|
-
*
|
|
35
|
-
* // Register a model class
|
|
36
|
-
* registry.register(User);
|
|
37
|
-
*
|
|
38
|
-
* // Retrieve a model constructor by name
|
|
39
|
-
* const UserClass = registry.get("User");
|
|
40
|
-
*
|
|
41
|
-
* // Build a model instance from a plain object
|
|
42
|
-
* const userData = { name: "John", age: 30 };
|
|
43
|
-
* const user = registry.build(userData, "User");
|
|
44
|
-
* ```
|
|
45
|
-
*
|
|
46
|
-
* @mermaid
|
|
47
|
-
* sequenceDiagram
|
|
48
|
-
* participant C as Client
|
|
49
|
-
* participant R as ModelRegistryManager
|
|
50
|
-
* participant M as Model Class
|
|
51
|
-
*
|
|
52
|
-
* C->>R: new ModelRegistryManager(testFunction)
|
|
53
|
-
* C->>R: register(ModelClass)
|
|
54
|
-
* R->>R: Store in cache
|
|
55
|
-
* C->>R: get("ModelName")
|
|
56
|
-
* R-->>C: ModelClass constructor
|
|
57
|
-
* C->>R: build(data, "ModelName")
|
|
58
|
-
* R->>R: Get constructor from cache
|
|
59
|
-
* R->>M: new ModelClass(data)
|
|
60
|
-
* M-->>R: Model instance
|
|
61
|
-
* R-->>C: Model instance
|
|
62
|
-
*/
|
|
63
|
-
class ModelRegistryManager {
|
|
64
|
-
constructor(testFunction = Model.isModel) {
|
|
65
|
-
this.cache = {};
|
|
66
|
-
this.testFunction = testFunction;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* @description Registers a model constructor with the registry
|
|
70
|
-
* @summary Adds a model constructor to the registry cache, making it available for
|
|
71
|
-
* later retrieval and instantiation. If no name is provided, the constructor's name
|
|
72
|
-
* property is used as the key in the registry.
|
|
73
|
-
*
|
|
74
|
-
* @param {ModelConstructor<M>} constructor - The model constructor to register
|
|
75
|
-
* @param {string} [name] - Optional name to register the constructor under, defaults to constructor.name
|
|
76
|
-
* @return {void}
|
|
77
|
-
* @throws {Error} If the constructor is not a function
|
|
78
|
-
*/
|
|
79
|
-
register(constructor, name) {
|
|
80
|
-
if (typeof constructor !== "function")
|
|
81
|
-
throw new Error("Model registering failed. Missing Class name or constructor");
|
|
82
|
-
name = name || constructor.name;
|
|
83
|
-
this.cache[name] = constructor;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* @summary Gets a registered Model {@link ModelConstructor}
|
|
87
|
-
* @param {string} name
|
|
88
|
-
*/
|
|
89
|
-
get(name) {
|
|
90
|
-
try {
|
|
91
|
-
return this.cache[name];
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
93
|
-
}
|
|
94
|
-
catch (e) {
|
|
95
|
-
return undefined;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* @param {Record<string, any>} obj
|
|
100
|
-
* @param {string} [clazz] when provided, it will attempt to find the matching constructor
|
|
101
|
-
*
|
|
102
|
-
* @throws Error If clazz is not found, or obj is not a {@link Model} meaning it has no {@link ModelKeys.ANCHOR} property
|
|
103
|
-
*/
|
|
104
|
-
build(obj = {}, clazz) {
|
|
105
|
-
if (!clazz && !this.testFunction(obj))
|
|
106
|
-
throw new Error("Provided obj is not a Model object");
|
|
107
|
-
const name = clazz || decoration_1.Metadata.modelName(obj.constructor);
|
|
108
|
-
if (!(name in this.cache))
|
|
109
|
-
throw new Error(`Provided class ${name} is not a registered Model object`);
|
|
110
|
-
return new this.cache[name](obj);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
exports.ModelRegistryManager = ModelRegistryManager;
|
|
114
|
-
/**
|
|
115
|
-
* @summary Bulk Registers Models
|
|
116
|
-
* @description Useful when using bundlers that might not evaluate all the code at once
|
|
117
|
-
*
|
|
118
|
-
* @template M extends Model
|
|
119
|
-
* @param {Array<Constructor<M>> | Array<{name: string, constructor: Constructor<M>}>} [models]
|
|
120
|
-
*
|
|
121
|
-
* @memberOf module:decorator-validation
|
|
122
|
-
* @category Model
|
|
123
|
-
*/
|
|
124
|
-
function bulkModelRegister(...models) {
|
|
125
|
-
models.forEach((m) => {
|
|
126
|
-
const constructor = (m.constructor ? m.constructor : m);
|
|
127
|
-
Model.register(constructor, m.name);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
11
|
+
const ModelRegistry_1 = require("./ModelRegistry.cjs");
|
|
130
12
|
/**
|
|
131
13
|
* @summary Abstract class representing a Validatable Model object
|
|
132
14
|
* @description Meant to be used as a base class for all Model classes
|
|
@@ -156,7 +38,7 @@ class Model {
|
|
|
156
38
|
constructor(arg = undefined) { }
|
|
157
39
|
isAsync() {
|
|
158
40
|
const self = this;
|
|
159
|
-
return !!(self[
|
|
41
|
+
return !!(self[constants_2.ASYNC_META_KEY] ?? self?.constructor[constants_2.ASYNC_META_KEY]);
|
|
160
42
|
}
|
|
161
43
|
/**
|
|
162
44
|
* @description Validates the model object against its defined validation rules
|
|
@@ -338,91 +220,7 @@ class Model {
|
|
|
338
220
|
* M-->>C: Return updated self
|
|
339
221
|
*/
|
|
340
222
|
static fromModel(self, obj) {
|
|
341
|
-
|
|
342
|
-
obj = {};
|
|
343
|
-
let decorators;
|
|
344
|
-
const props = Model.getAttributes(self);
|
|
345
|
-
const proto = Object.getPrototypeOf(self);
|
|
346
|
-
let descriptor;
|
|
347
|
-
for (const prop of props) {
|
|
348
|
-
try {
|
|
349
|
-
self[prop] =
|
|
350
|
-
obj[prop] ??
|
|
351
|
-
self[prop] ??
|
|
352
|
-
undefined;
|
|
353
|
-
}
|
|
354
|
-
catch (e) {
|
|
355
|
-
descriptor = Object.getOwnPropertyDescriptor(proto, prop);
|
|
356
|
-
if (!descriptor || descriptor.writable)
|
|
357
|
-
throw new Error(`Unable to write property ${prop} to model: ${e}`);
|
|
358
|
-
}
|
|
359
|
-
if (typeof self[prop] !== "object")
|
|
360
|
-
continue;
|
|
361
|
-
const propM = Model.isPropertyModel(self, prop);
|
|
362
|
-
if (propM) {
|
|
363
|
-
try {
|
|
364
|
-
self[prop] = Model.build(self[prop], typeof propM === "string" ? propM : undefined);
|
|
365
|
-
}
|
|
366
|
-
catch (e) {
|
|
367
|
-
console.log(e);
|
|
368
|
-
}
|
|
369
|
-
continue;
|
|
370
|
-
}
|
|
371
|
-
decorators = decoration_1.Metadata.allowedTypes(self.constructor, prop);
|
|
372
|
-
if (!decorators || !decorators.length)
|
|
373
|
-
throw new Error(`failed to find decorators for property ${prop}`);
|
|
374
|
-
const clazz = decorators.map((t) => typeof t === "function" && !t.name ? t() : t);
|
|
375
|
-
const reserved = Object.values(constants_3.ReservedModels);
|
|
376
|
-
clazz.forEach((c) => {
|
|
377
|
-
if (!reserved.includes(c))
|
|
378
|
-
try {
|
|
379
|
-
switch (c.name) {
|
|
380
|
-
case "Array":
|
|
381
|
-
case "Set": {
|
|
382
|
-
const validation = decoration_1.Metadata.validationFor(self.constructor, prop);
|
|
383
|
-
if (!validation || !validation[constants_2.ValidationKeys.LIST])
|
|
384
|
-
break;
|
|
385
|
-
const listDec = validation[constants_2.ValidationKeys.LIST];
|
|
386
|
-
const clazzName = listDec.clazz
|
|
387
|
-
.map((t) => typeof t === "function" && !t.name
|
|
388
|
-
? t()
|
|
389
|
-
: t)
|
|
390
|
-
.find((t) => !constants_3.jsTypes.includes(t.name));
|
|
391
|
-
if (c.name === "Array")
|
|
392
|
-
self[prop] = self[prop].map((el) => {
|
|
393
|
-
return ["object", "function"].includes(typeof el) &&
|
|
394
|
-
clazzName
|
|
395
|
-
? Model.build(el, clazzName.name)
|
|
396
|
-
: el;
|
|
397
|
-
});
|
|
398
|
-
if (c.name === "Set") {
|
|
399
|
-
const s = new Set();
|
|
400
|
-
for (const v of self[prop]) {
|
|
401
|
-
if (["object", "function"].includes(typeof v) &&
|
|
402
|
-
clazzName) {
|
|
403
|
-
s.add(Model.build(v, clazzName.name));
|
|
404
|
-
}
|
|
405
|
-
else {
|
|
406
|
-
s.add(v);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
self[prop] = s;
|
|
410
|
-
}
|
|
411
|
-
break;
|
|
412
|
-
}
|
|
413
|
-
default:
|
|
414
|
-
if (typeof self[prop] !== "undefined" &&
|
|
415
|
-
Model.get(c.name))
|
|
416
|
-
self[prop] = Model.build(self[prop], c.name);
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
catch (e) {
|
|
420
|
-
console.log(e);
|
|
421
|
-
// do nothing. we have no registry of this class
|
|
422
|
-
}
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
|
-
return self;
|
|
223
|
+
return ModelRegistry_1.ModelRegistryManager.fromModel(self, obj);
|
|
426
224
|
}
|
|
427
225
|
/**
|
|
428
226
|
* @description Configures the global model builder function
|
|
@@ -432,7 +230,7 @@ class Model {
|
|
|
432
230
|
* @return {void}
|
|
433
231
|
*/
|
|
434
232
|
static setBuilder(builder) {
|
|
435
|
-
|
|
233
|
+
ModelRegistry_1.ModelRegistryManager.setBuilder(builder);
|
|
436
234
|
}
|
|
437
235
|
/**
|
|
438
236
|
* @description Retrieves the currently configured global model builder function
|
|
@@ -441,7 +239,7 @@ class Model {
|
|
|
441
239
|
* @return {ModelBuilderFunction | undefined} - The current global builder function or undefined if not set
|
|
442
240
|
*/
|
|
443
241
|
static getBuilder() {
|
|
444
|
-
return
|
|
242
|
+
return ModelRegistry_1.ModelRegistryManager.getBuilder();
|
|
445
243
|
}
|
|
446
244
|
/**
|
|
447
245
|
* @description Provides access to the current model registry
|
|
@@ -451,9 +249,7 @@ class Model {
|
|
|
451
249
|
* @private
|
|
452
250
|
*/
|
|
453
251
|
static getRegistry() {
|
|
454
|
-
|
|
455
|
-
actingModelRegistry = new ModelRegistryManager();
|
|
456
|
-
return actingModelRegistry;
|
|
252
|
+
return ModelRegistry_1.ModelRegistryManager.getRegistry();
|
|
457
253
|
}
|
|
458
254
|
/**
|
|
459
255
|
* @description Configures the model registry to be used by the Model system
|
|
@@ -463,7 +259,7 @@ class Model {
|
|
|
463
259
|
* @return {void}
|
|
464
260
|
*/
|
|
465
261
|
static setRegistry(modelRegistry) {
|
|
466
|
-
|
|
262
|
+
ModelRegistry_1.ModelRegistryManager.setRegistry(modelRegistry);
|
|
467
263
|
}
|
|
468
264
|
/**
|
|
469
265
|
* @description Registers a model constructor with the model registry
|
|
@@ -477,7 +273,7 @@ class Model {
|
|
|
477
273
|
* @see ModelRegistry
|
|
478
274
|
*/
|
|
479
275
|
static register(constructor, name) {
|
|
480
|
-
return
|
|
276
|
+
return ModelRegistry_1.ModelRegistryManager.getRegistry().register(constructor, name);
|
|
481
277
|
}
|
|
482
278
|
/**
|
|
483
279
|
* @description Retrieves a registered model constructor by name
|
|
@@ -490,7 +286,7 @@ class Model {
|
|
|
490
286
|
* @see ModelRegistry
|
|
491
287
|
*/
|
|
492
288
|
static get(name) {
|
|
493
|
-
return
|
|
289
|
+
return ModelRegistry_1.ModelRegistryManager.getRegistry().get(name);
|
|
494
290
|
}
|
|
495
291
|
/**
|
|
496
292
|
* @description Creates a model instance from a plain object
|
|
@@ -516,23 +312,7 @@ class Model {
|
|
|
516
312
|
* @return {string[]} - Array of attribute names defined in the model
|
|
517
313
|
*/
|
|
518
314
|
static getAttributes(model) {
|
|
519
|
-
|
|
520
|
-
const seen = new Set();
|
|
521
|
-
const collect = (current) => {
|
|
522
|
-
if (!current)
|
|
523
|
-
return [];
|
|
524
|
-
const parent = Object.getPrototypeOf(current);
|
|
525
|
-
const attributes = collect(parent);
|
|
526
|
-
const props = decoration_1.Metadata.properties(current) ?? [];
|
|
527
|
-
for (const prop of props) {
|
|
528
|
-
if (!seen.has(prop)) {
|
|
529
|
-
seen.add(prop);
|
|
530
|
-
attributes.push(prop);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
return attributes;
|
|
534
|
-
};
|
|
535
|
-
return collect(constructor);
|
|
315
|
+
return decoration_1.Metadata.getAttributes(model);
|
|
536
316
|
}
|
|
537
317
|
/**
|
|
538
318
|
* @description Compares two model instances for equality
|
|
@@ -617,22 +397,7 @@ class Model {
|
|
|
617
397
|
* ```
|
|
618
398
|
*/
|
|
619
399
|
static isModel(target) {
|
|
620
|
-
|
|
621
|
-
if (target instanceof Model)
|
|
622
|
-
return true;
|
|
623
|
-
const constr = decoration_1.Metadata.constr(target);
|
|
624
|
-
if (!constr || constr === target)
|
|
625
|
-
return false;
|
|
626
|
-
return !!decoration_1.Metadata.modelName(constr);
|
|
627
|
-
//
|
|
628
|
-
// // return target instanceof Model || !!Metadata.modelName(target as any);
|
|
629
|
-
// const modelName = Metadata.modelName(target as any);
|
|
630
|
-
// return target instanceof Model || !!Model.get(modelName);
|
|
631
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
632
|
-
}
|
|
633
|
-
catch (e) {
|
|
634
|
-
return false;
|
|
635
|
-
}
|
|
400
|
+
return decoration_1.Metadata.isModel(target);
|
|
636
401
|
}
|
|
637
402
|
/**
|
|
638
403
|
* @description Checks if a property of a model is itself a model or has a model type
|
|
@@ -646,13 +411,7 @@ class Model {
|
|
|
646
411
|
* the model name if the property has a model type, or undefined if not a model
|
|
647
412
|
*/
|
|
648
413
|
static isPropertyModel(target, attribute) {
|
|
649
|
-
|
|
650
|
-
if (isModel)
|
|
651
|
-
return true;
|
|
652
|
-
const metadata = decoration_1.Metadata.type(target.constructor, attribute);
|
|
653
|
-
if (!metadata)
|
|
654
|
-
return undefined;
|
|
655
|
-
return Model.get(metadata.name) ? metadata.name : undefined;
|
|
414
|
+
return decoration_1.Metadata.isPropertyModel(target, attribute);
|
|
656
415
|
}
|
|
657
416
|
static describe(model, key) {
|
|
658
417
|
return decoration_1.Metadata.description(model, key);
|
package/lib/model/Model.d.ts
CHANGED
|
@@ -3,109 +3,6 @@ import { ModelErrorDefinition } from "./ModelErrorDefinition";
|
|
|
3
3
|
import { Comparable, Comparison, Hashable, ModelArg, ModelBuilderFunction, ModelConstructor, Serializable, Validatable } from "./types";
|
|
4
4
|
import { ConditionalAsync } from "../types";
|
|
5
5
|
import { Constructor } from "@decaf-ts/decoration";
|
|
6
|
-
/**
|
|
7
|
-
* @description Registry type for storing and retrieving model constructors
|
|
8
|
-
* @summary The ModelRegistry type defines a registry for model constructors that extends
|
|
9
|
-
* the BuilderRegistry interface. It provides a standardized way to register, retrieve,
|
|
10
|
-
* and build model instances, enabling the model system to work with different types of models.
|
|
11
|
-
*
|
|
12
|
-
* @interface ModelRegistry
|
|
13
|
-
* @template T Type of model that can be registered, must extend Model
|
|
14
|
-
* @extends BuilderRegistry<T>
|
|
15
|
-
* @memberOf module:decorator-validation
|
|
16
|
-
* @category Model
|
|
17
|
-
*/
|
|
18
|
-
export type ModelRegistry<T extends Model> = BuilderRegistry<T>;
|
|
19
|
-
/**
|
|
20
|
-
* @description Registry manager for model constructors that enables serialization and rebuilding
|
|
21
|
-
* @summary The ModelRegistryManager implements the ModelRegistry interface and provides
|
|
22
|
-
* functionality for registering, retrieving, and building model instances. It maintains
|
|
23
|
-
* a cache of model constructors indexed by name, allowing for efficient lookup and instantiation.
|
|
24
|
-
* This class is essential for the serialization and deserialization of model objects.
|
|
25
|
-
*
|
|
26
|
-
* @param {function(Record<string, any>): boolean} [testFunction] - Function to test if an object is a model, defaults to {@link Model#isModel}
|
|
27
|
-
*
|
|
28
|
-
* @class ModelRegistryManager
|
|
29
|
-
* @template M Type of model that can be registered, must extend Model
|
|
30
|
-
* @implements ModelRegistry<M>
|
|
31
|
-
* @category Model
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* // Create a model registry
|
|
36
|
-
* const registry = new ModelRegistryManager();
|
|
37
|
-
*
|
|
38
|
-
* // Register a model class
|
|
39
|
-
* registry.register(User);
|
|
40
|
-
*
|
|
41
|
-
* // Retrieve a model constructor by name
|
|
42
|
-
* const UserClass = registry.get("User");
|
|
43
|
-
*
|
|
44
|
-
* // Build a model instance from a plain object
|
|
45
|
-
* const userData = { name: "John", age: 30 };
|
|
46
|
-
* const user = registry.build(userData, "User");
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* @mermaid
|
|
50
|
-
* sequenceDiagram
|
|
51
|
-
* participant C as Client
|
|
52
|
-
* participant R as ModelRegistryManager
|
|
53
|
-
* participant M as Model Class
|
|
54
|
-
*
|
|
55
|
-
* C->>R: new ModelRegistryManager(testFunction)
|
|
56
|
-
* C->>R: register(ModelClass)
|
|
57
|
-
* R->>R: Store in cache
|
|
58
|
-
* C->>R: get("ModelName")
|
|
59
|
-
* R-->>C: ModelClass constructor
|
|
60
|
-
* C->>R: build(data, "ModelName")
|
|
61
|
-
* R->>R: Get constructor from cache
|
|
62
|
-
* R->>M: new ModelClass(data)
|
|
63
|
-
* M-->>R: Model instance
|
|
64
|
-
* R-->>C: Model instance
|
|
65
|
-
*/
|
|
66
|
-
export declare class ModelRegistryManager<M extends Model<true | false>> implements ModelRegistry<M> {
|
|
67
|
-
private cache;
|
|
68
|
-
private readonly testFunction;
|
|
69
|
-
constructor(testFunction?: (obj: Record<string, any>) => boolean);
|
|
70
|
-
/**
|
|
71
|
-
* @description Registers a model constructor with the registry
|
|
72
|
-
* @summary Adds a model constructor to the registry cache, making it available for
|
|
73
|
-
* later retrieval and instantiation. If no name is provided, the constructor's name
|
|
74
|
-
* property is used as the key in the registry.
|
|
75
|
-
*
|
|
76
|
-
* @param {ModelConstructor<M>} constructor - The model constructor to register
|
|
77
|
-
* @param {string} [name] - Optional name to register the constructor under, defaults to constructor.name
|
|
78
|
-
* @return {void}
|
|
79
|
-
* @throws {Error} If the constructor is not a function
|
|
80
|
-
*/
|
|
81
|
-
register(constructor: ModelConstructor<M>, name?: string): void;
|
|
82
|
-
/**
|
|
83
|
-
* @summary Gets a registered Model {@link ModelConstructor}
|
|
84
|
-
* @param {string} name
|
|
85
|
-
*/
|
|
86
|
-
get(name: string): ModelConstructor<M> | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* @param {Record<string, any>} obj
|
|
89
|
-
* @param {string} [clazz] when provided, it will attempt to find the matching constructor
|
|
90
|
-
*
|
|
91
|
-
* @throws Error If clazz is not found, or obj is not a {@link Model} meaning it has no {@link ModelKeys.ANCHOR} property
|
|
92
|
-
*/
|
|
93
|
-
build(obj?: Record<string, any>, clazz?: string): M;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @summary Bulk Registers Models
|
|
97
|
-
* @description Useful when using bundlers that might not evaluate all the code at once
|
|
98
|
-
*
|
|
99
|
-
* @template M extends Model
|
|
100
|
-
* @param {Array<Constructor<M>> | Array<{name: string, constructor: Constructor<M>}>} [models]
|
|
101
|
-
*
|
|
102
|
-
* @memberOf module:decorator-validation
|
|
103
|
-
* @category Model
|
|
104
|
-
*/
|
|
105
|
-
export declare function bulkModelRegister<M extends Model>(...models: (Constructor<M> | {
|
|
106
|
-
name: string;
|
|
107
|
-
constructor: Constructor<M>;
|
|
108
|
-
})[]): void;
|
|
109
6
|
/**
|
|
110
7
|
* @summary Abstract class representing a Validatable Model object
|
|
111
8
|
* @description Meant to be used as a base class for all Model classes
|
package/lib/model/Model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Model.js","sourceRoot":"","sources":["../../src/model/Model.ts"],"names":[],"mappings":";;;AAkKA,8CAWC;AA7KD,gEAAuD;AAavD,iDAAwC;AACxC,oDAA2C;AAC3C,wDAA+C;AAC/C,wEAAoE;AACpE,+CAAsD;AAGtD,wDAA8C;AAC9C,qDAA6D;AAC7D,sDAA4C;AAG5C,IAAI,oBAAsD,CAAC;AAC3D,IAAI,mBAAyC,CAAC;AAgB9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAa,oBAAoB;IAM/B,YACE,eAAsD,KAAK,CAAC,OAAO;QAJ7D,UAAK,GAAwC,EAAE,CAAC;QAMtD,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,WAAgC,EAAE,IAAa;QACtD,IAAI,OAAO,WAAW,KAAK,UAAU;YACnC,MAAM,IAAI,KAAK,CACb,6DAA6D,CAC9D,CAAC;QACJ,IAAI,GAAG,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC;QAChC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC;IACjC,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,IAAY;QACd,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC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