@decaf-ts/decorator-validation 1.19.0 → 1.21.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/lib/cjs/index.cjs +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/types/constants/index.d.cts +2 -2
- package/lib/types/constants/index.d.mts +2 -2
- package/lib/types/index.d.cts +7 -7
- package/lib/types/index.d.mts +7 -7
- package/lib/types/model/Builder.d.cts +3 -3
- package/lib/types/model/Builder.d.mts +3 -3
- package/lib/types/model/Model.d.cts +4 -4
- package/lib/types/model/Model.d.mts +4 -4
- package/lib/types/model/ModelErrorDefinition.d.cts +1 -1
- package/lib/types/model/ModelErrorDefinition.d.mts +1 -1
- package/lib/types/model/ModelRegistry.d.cts +3 -3
- package/lib/types/model/ModelRegistry.d.mts +3 -3
- package/lib/types/model/construction.d.cts +1 -1
- package/lib/types/model/construction.d.mts +1 -1
- package/lib/types/model/index.d.cts +10 -10
- package/lib/types/model/index.d.mts +10 -10
- package/lib/types/model/types.d.cts +3 -3
- package/lib/types/model/types.d.mts +3 -3
- package/lib/types/model/utils.d.cts +1 -1
- package/lib/types/model/utils.d.mts +1 -1
- package/lib/types/model/validation.d.cts +3 -3
- package/lib/types/model/validation.d.mts +3 -3
- package/lib/types/overrides/Metadata.d.cts +3 -3
- package/lib/types/overrides/Metadata.d.mts +3 -3
- package/lib/types/overrides/index.d.cts +3 -3
- package/lib/types/overrides/index.d.mts +3 -3
- package/lib/types/overrides/types.d.cts +1 -1
- package/lib/types/overrides/types.d.mts +1 -1
- package/lib/types/types/index.d.cts +1 -1
- package/lib/types/types/index.d.mts +1 -1
- package/lib/types/types/validation.d.cts +2 -2
- package/lib/types/types/validation.d.mts +2 -2
- package/lib/types/utils/index.d.cts +11 -11
- package/lib/types/utils/index.d.mts +11 -11
- package/lib/types/utils/serialization.d.cts +1 -1
- package/lib/types/utils/serialization.d.mts +1 -1
- package/lib/types/utils/serializers.d.cts +2 -2
- package/lib/types/utils/serializers.d.mts +2 -2
- package/lib/types/utils/types.d.cts +1 -1
- package/lib/types/utils/types.d.mts +1 -1
- package/lib/types/validation/Validation.d.cts +2 -2
- package/lib/types/validation/Validation.d.mts +2 -2
- package/lib/types/validation/Validators/AsyncValidator.d.cts +3 -3
- package/lib/types/validation/Validators/AsyncValidator.d.mts +3 -3
- package/lib/types/validation/Validators/BaseValidator.d.cts +3 -3
- package/lib/types/validation/Validators/BaseValidator.d.mts +3 -3
- package/lib/types/validation/Validators/DateValidator.d.cts +2 -2
- package/lib/types/validation/Validators/DateValidator.d.mts +2 -2
- package/lib/types/validation/Validators/DiffValidator.d.cts +3 -3
- package/lib/types/validation/Validators/DiffValidator.d.mts +3 -3
- package/lib/types/validation/Validators/EmailValidator.d.cts +2 -2
- package/lib/types/validation/Validators/EmailValidator.d.mts +2 -2
- package/lib/types/validation/Validators/EqualsValidator.d.cts +3 -3
- package/lib/types/validation/Validators/EqualsValidator.d.mts +3 -3
- package/lib/types/validation/Validators/GreaterThanOrEqualValidator.d.cts +3 -3
- package/lib/types/validation/Validators/GreaterThanOrEqualValidator.d.mts +3 -3
- package/lib/types/validation/Validators/GreaterThanValidator.d.cts +3 -3
- package/lib/types/validation/Validators/GreaterThanValidator.d.mts +3 -3
- package/lib/types/validation/Validators/LessThanOrEqualValidator.d.cts +3 -3
- package/lib/types/validation/Validators/LessThanOrEqualValidator.d.mts +3 -3
- package/lib/types/validation/Validators/LessThanValidator.d.cts +3 -3
- package/lib/types/validation/Validators/LessThanValidator.d.mts +3 -3
- package/lib/types/validation/Validators/ListValidator.d.cts +2 -2
- package/lib/types/validation/Validators/ListValidator.d.mts +2 -2
- package/lib/types/validation/Validators/MaxLengthValidator.d.cts +2 -2
- package/lib/types/validation/Validators/MaxLengthValidator.d.mts +2 -2
- package/lib/types/validation/Validators/MaxValidator.d.cts +2 -2
- package/lib/types/validation/Validators/MaxValidator.d.mts +2 -2
- package/lib/types/validation/Validators/MinLengthValidator.d.cts +2 -2
- package/lib/types/validation/Validators/MinLengthValidator.d.mts +2 -2
- package/lib/types/validation/Validators/MinValidator.d.cts +2 -2
- package/lib/types/validation/Validators/MinValidator.d.mts +2 -2
- package/lib/types/validation/Validators/OptionValidator.d.cts +2 -2
- package/lib/types/validation/Validators/OptionValidator.d.mts +2 -2
- package/lib/types/validation/Validators/PasswordValidator.d.cts +2 -2
- package/lib/types/validation/Validators/PasswordValidator.d.mts +2 -2
- package/lib/types/validation/Validators/PatternValidator.d.cts +2 -2
- package/lib/types/validation/Validators/PatternValidator.d.mts +2 -2
- package/lib/types/validation/Validators/RequiredValidator.d.cts +2 -2
- package/lib/types/validation/Validators/RequiredValidator.d.mts +2 -2
- package/lib/types/validation/Validators/StepValidator.d.cts +2 -2
- package/lib/types/validation/Validators/StepValidator.d.mts +2 -2
- package/lib/types/validation/Validators/TypeValidator.d.cts +2 -2
- package/lib/types/validation/Validators/TypeValidator.d.mts +2 -2
- package/lib/types/validation/Validators/URLValidator.d.cts +2 -2
- package/lib/types/validation/Validators/URLValidator.d.mts +2 -2
- package/lib/types/validation/Validators/Validator.d.cts +3 -3
- package/lib/types/validation/Validators/Validator.d.mts +3 -3
- package/lib/types/validation/Validators/ValidatorRegistry.d.cts +3 -3
- package/lib/types/validation/Validators/ValidatorRegistry.d.mts +3 -3
- package/lib/types/validation/Validators/decorators.d.cts +1 -1
- package/lib/types/validation/Validators/decorators.d.mts +1 -1
- package/lib/types/validation/Validators/index.d.cts +26 -26
- package/lib/types/validation/Validators/index.d.mts +26 -26
- package/lib/types/validation/decorators.d.cts +2 -2
- package/lib/types/validation/decorators.d.mts +2 -2
- package/lib/types/validation/index.d.cts +4 -4
- package/lib/types/validation/index.d.mts +4 -4
- package/lib/types/validation/types.d.cts +2 -2
- package/lib/types/validation/types.d.mts +2 -2
- package/package.json +1 -1
- package/lib/types/constants/errors.d.ts +0 -17
- package/lib/types/constants/index.d.ts +0 -2
- package/lib/types/constants/validation.d.ts +0 -16
- package/lib/types/index.d.ts +0 -20
- package/lib/types/model/Builder.d.ts +0 -86
- package/lib/types/model/Model.d.ts +0 -286
- package/lib/types/model/ModelErrorDefinition.d.ts +0 -22
- package/lib/types/model/ModelRegistry.d.ts +0 -181
- package/lib/types/model/constants.d.ts +0 -65
- package/lib/types/model/construction.d.ts +0 -46
- package/lib/types/model/decorators.d.ts +0 -47
- package/lib/types/model/index.d.ts +0 -10
- package/lib/types/model/types.d.ts +0 -145
- package/lib/types/model/utils.d.ts +0 -13
- package/lib/types/model/validation.d.ts +0 -92
- package/lib/types/overrides/Metadata.d.ts +0 -132
- package/lib/types/overrides/index.d.ts +0 -4
- package/lib/types/overrides/overrides.d.ts +0 -1
- package/lib/types/overrides/types.d.ts +0 -17
- package/lib/types/types/index.d.ts +0 -1
- package/lib/types/types/validation.d.ts +0 -28
- package/lib/types/utils/DateBuilder.d.ts +0 -121
- package/lib/types/utils/PathProxy.d.ts +0 -43
- package/lib/types/utils/constants.d.ts +0 -32
- package/lib/types/utils/dates.d.ts +0 -86
- package/lib/types/utils/equality.d.ts +0 -56
- package/lib/types/utils/hashing.d.ts +0 -82
- package/lib/types/utils/index.d.ts +0 -11
- package/lib/types/utils/registry.d.ts +0 -68
- package/lib/types/utils/serialization.d.ts +0 -12
- package/lib/types/utils/serializers.d.ts +0 -41
- package/lib/types/utils/strings.d.ts +0 -25
- package/lib/types/utils/types.d.ts +0 -35
- package/lib/types/validation/Validation.d.ts +0 -53
- package/lib/types/validation/Validators/AsyncValidator.d.ts +0 -72
- package/lib/types/validation/Validators/BaseValidator.d.ts +0 -118
- package/lib/types/validation/Validators/DateValidator.d.ts +0 -60
- package/lib/types/validation/Validators/DiffValidator.d.ts +0 -29
- package/lib/types/validation/Validators/EmailValidator.d.ts +0 -60
- package/lib/types/validation/Validators/EqualsValidator.d.ts +0 -29
- package/lib/types/validation/Validators/GreaterThanOrEqualValidator.d.ts +0 -29
- package/lib/types/validation/Validators/GreaterThanValidator.d.ts +0 -29
- package/lib/types/validation/Validators/LessThanOrEqualValidator.d.ts +0 -29
- package/lib/types/validation/Validators/LessThanValidator.d.ts +0 -29
- package/lib/types/validation/Validators/ListValidator.d.ts +0 -66
- package/lib/types/validation/Validators/MaxLengthValidator.d.ts +0 -29
- package/lib/types/validation/Validators/MaxValidator.d.ts +0 -74
- package/lib/types/validation/Validators/MinLengthValidator.d.ts +0 -29
- package/lib/types/validation/Validators/MinValidator.d.ts +0 -74
- package/lib/types/validation/Validators/OptionValidator.d.ts +0 -29
- package/lib/types/validation/Validators/PasswordValidator.d.ts +0 -28
- package/lib/types/validation/Validators/PatternValidator.d.ts +0 -103
- package/lib/types/validation/Validators/RequiredValidator.d.ts +0 -74
- package/lib/types/validation/Validators/StepValidator.d.ts +0 -29
- package/lib/types/validation/Validators/TypeValidator.d.ts +0 -79
- package/lib/types/validation/Validators/URLValidator.d.ts +0 -61
- package/lib/types/validation/Validators/Validator.d.ts +0 -65
- package/lib/types/validation/Validators/ValidatorRegistry.d.ts +0 -41
- package/lib/types/validation/Validators/constants.d.ts +0 -157
- package/lib/types/validation/Validators/decorators.d.ts +0 -12
- package/lib/types/validation/Validators/index.d.ts +0 -26
- package/lib/types/validation/Validators/utils.d.ts +0 -75
- package/lib/types/validation/decorators.d.ts +0 -313
- package/lib/types/validation/index.d.ts +0 -9
- package/lib/types/validation/types.d.ts +0 -309
package/lib/cjs/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ __exportStar(require("./model/index.cjs"), exports);
|
|
|
35
35
|
* @const VERSION
|
|
36
36
|
* @memberOf module:decorator-validation
|
|
37
37
|
*/
|
|
38
|
-
exports.VERSION = "1.
|
|
38
|
+
exports.VERSION = "1.20.0";
|
|
39
39
|
/**
|
|
40
40
|
* @description Current version of the reflection package
|
|
41
41
|
* @summary Stores the semantic version number of the package
|
package/lib/esm/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export * from "./model/index.js";
|
|
|
18
18
|
* @const VERSION
|
|
19
19
|
* @memberOf module:decorator-validation
|
|
20
20
|
*/
|
|
21
|
-
export const VERSION = "1.
|
|
21
|
+
export const VERSION = "1.20.0";
|
|
22
22
|
/**
|
|
23
23
|
* @description Current version of the reflection package
|
|
24
24
|
* @summary Stores the semantic version number of the package
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./errors.
|
|
2
|
-
export * from "./validation.
|
|
1
|
+
export * from "./errors.d.cts";
|
|
2
|
+
export * from "./validation.d.cts";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./errors.
|
|
2
|
-
export * from "./validation.
|
|
1
|
+
export * from "./errors.d.mts";
|
|
2
|
+
export * from "./validation.d.mts";
|
package/lib/types/index.d.cts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from "./overrides/index.
|
|
2
|
-
export * from "./constants/index.
|
|
3
|
-
export * from "./types/index.
|
|
4
|
-
export * from "./utils/index.
|
|
5
|
-
export * from "./validation/index.
|
|
6
|
-
export * from "./model/index.
|
|
1
|
+
export * from "./overrides/index.d.cts";
|
|
2
|
+
export * from "./constants/index.d.cts";
|
|
3
|
+
export * from "./types/index.d.cts";
|
|
4
|
+
export * from "./utils/index.d.cts";
|
|
5
|
+
export * from "./validation/index.d.cts";
|
|
6
|
+
export * from "./model/index.d.cts";
|
|
7
7
|
/**
|
|
8
8
|
* @description Current version of the reflection package
|
|
9
9
|
* @summary Stores the semantic version number of the package
|
|
10
10
|
* @const VERSION
|
|
11
11
|
* @memberOf module:decorator-validation
|
|
12
12
|
*/
|
|
13
|
-
export declare const VERSION = "1.
|
|
13
|
+
export declare const VERSION = "1.20.0";
|
|
14
14
|
/**
|
|
15
15
|
* @description Current version of the reflection package
|
|
16
16
|
* @summary Stores the semantic version number of the package
|
package/lib/types/index.d.mts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from "./overrides/index.
|
|
2
|
-
export * from "./constants/index.
|
|
3
|
-
export * from "./types/index.
|
|
4
|
-
export * from "./utils/index.
|
|
5
|
-
export * from "./validation/index.
|
|
6
|
-
export * from "./model/index.
|
|
1
|
+
export * from "./overrides/index.d.mts";
|
|
2
|
+
export * from "./constants/index.d.mts";
|
|
3
|
+
export * from "./types/index.d.mts";
|
|
4
|
+
export * from "./utils/index.d.mts";
|
|
5
|
+
export * from "./validation/index.d.mts";
|
|
6
|
+
export * from "./model/index.d.mts";
|
|
7
7
|
/**
|
|
8
8
|
* @description Current version of the reflection package
|
|
9
9
|
* @summary Stores the semantic version number of the package
|
|
10
10
|
* @const VERSION
|
|
11
11
|
* @memberOf module:decorator-validation
|
|
12
12
|
*/
|
|
13
|
-
export declare const VERSION = "1.
|
|
13
|
+
export declare const VERSION = "1.20.0";
|
|
14
14
|
/**
|
|
15
15
|
* @description Current version of the reflection package
|
|
16
16
|
* @summary Stores the semantic version number of the package
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Model } from "./Model.
|
|
1
|
+
import { Model } from "./Model.d.cts";
|
|
2
2
|
import { ObjectAccumulator } from "typed-object-accumulator";
|
|
3
3
|
import { Constructor } from "@decaf-ts/decoration";
|
|
4
|
-
import { ComparisonValidatorOptions } from "../validation/types.
|
|
5
|
-
import { ExtendedMetadata } from "../overrides/types.
|
|
4
|
+
import { ComparisonValidatorOptions } from "../validation/types.d.cts";
|
|
5
|
+
import { ExtendedMetadata } from "../overrides/types.d.cts";
|
|
6
6
|
type BuildableModel = Model & Record<PropertyKey, any>;
|
|
7
7
|
export interface DecorateOption<M extends Model> {
|
|
8
8
|
decorate(...decorators: PropertyDecorator[]): ModelBuilder<M>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Model } from "./Model.
|
|
1
|
+
import { Model } from "./Model.d.mts";
|
|
2
2
|
import { ObjectAccumulator } from "typed-object-accumulator";
|
|
3
3
|
import { Constructor } from "@decaf-ts/decoration";
|
|
4
|
-
import { ComparisonValidatorOptions } from "../validation/types.
|
|
5
|
-
import { ExtendedMetadata } from "../overrides/types.
|
|
4
|
+
import { ComparisonValidatorOptions } from "../validation/types.d.mts";
|
|
5
|
+
import { ExtendedMetadata } from "../overrides/types.d.mts";
|
|
6
6
|
type BuildableModel = Model & Record<PropertyKey, any>;
|
|
7
7
|
export interface DecorateOption<M extends Model> {
|
|
8
8
|
decorate(...decorators: PropertyDecorator[]): ModelBuilder<M>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BuilderRegistry } from "../utils/registry.
|
|
2
|
-
import { ModelErrorDefinition } from "./ModelErrorDefinition.
|
|
3
|
-
import { Comparable, Comparison, Hashable, ModelArg, ModelBuilderFunction, ModelConstructor, Serializable, Validatable } from "./types.
|
|
4
|
-
import { ConditionalAsync } from "../types/index.
|
|
1
|
+
import { BuilderRegistry } from "../utils/registry.d.cts";
|
|
2
|
+
import { ModelErrorDefinition } from "./ModelErrorDefinition.d.cts";
|
|
3
|
+
import { Comparable, Comparison, Hashable, ModelArg, ModelBuilderFunction, ModelConstructor, Serializable, Validatable } from "./types.d.cts";
|
|
4
|
+
import { ConditionalAsync } from "../types/index.d.cts";
|
|
5
5
|
import { Constructor } from "@decaf-ts/decoration";
|
|
6
6
|
/**
|
|
7
7
|
* @summary Abstract class representing a Validatable Model object
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BuilderRegistry } from "../utils/registry.
|
|
2
|
-
import { ModelErrorDefinition } from "./ModelErrorDefinition.
|
|
3
|
-
import { Comparable, Comparison, Hashable, ModelArg, ModelBuilderFunction, ModelConstructor, Serializable, Validatable } from "./types.
|
|
4
|
-
import { ConditionalAsync } from "../types/index.
|
|
1
|
+
import { BuilderRegistry } from "../utils/registry.d.mts";
|
|
2
|
+
import { ModelErrorDefinition } from "./ModelErrorDefinition.d.mts";
|
|
3
|
+
import { Comparable, Comparison, Hashable, ModelArg, ModelBuilderFunction, ModelConstructor, Serializable, Validatable } from "./types.d.mts";
|
|
4
|
+
import { ConditionalAsync } from "../types/index.d.mts";
|
|
5
5
|
import { Constructor } from "@decaf-ts/decoration";
|
|
6
6
|
/**
|
|
7
7
|
* @summary Abstract class representing a Validatable Model object
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
-
import { ModelBuilderFunction, ModelConstructor } from "./types.
|
|
3
|
-
import { type Model } from "./Model.
|
|
4
|
-
import { BuilderRegistry } from "../utils/registry.
|
|
2
|
+
import { ModelBuilderFunction, ModelConstructor } from "./types.d.cts";
|
|
3
|
+
import { type Model } from "./Model.d.cts";
|
|
4
|
+
import { BuilderRegistry } from "../utils/registry.d.cts";
|
|
5
5
|
/**
|
|
6
6
|
* @description Registry type for storing and retrieving model constructors
|
|
7
7
|
* @summary The ModelRegistry type defines a registry for model constructors that extends
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Constructor } from "@decaf-ts/decoration";
|
|
2
|
-
import { ModelBuilderFunction, ModelConstructor } from "./types.
|
|
3
|
-
import { type Model } from "./Model.
|
|
4
|
-
import { BuilderRegistry } from "../utils/registry.
|
|
2
|
+
import { ModelBuilderFunction, ModelConstructor } from "./types.d.mts";
|
|
3
|
+
import { type Model } from "./Model.d.mts";
|
|
4
|
+
import { BuilderRegistry } from "../utils/registry.d.mts";
|
|
5
5
|
/**
|
|
6
6
|
* @description Registry type for storing and retrieving model constructors
|
|
7
7
|
* @summary The ModelRegistry type defines a registry for model constructors that extends
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model } from "./Model.
|
|
1
|
+
import { Model } from "./Model.d.cts";
|
|
2
2
|
/**
|
|
3
3
|
* @description Helper function to create an instance by invoking a constructor with dynamic arguments.
|
|
4
4
|
* @summary Overrides standard construction patterns by wrapping the given constructor to allow spread argument invocation while preserving the prototype chain.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model } from "./Model.
|
|
1
|
+
import { Model } from "./Model.d.mts";
|
|
2
2
|
/**
|
|
3
3
|
* @description Helper function to create an instance by invoking a constructor with dynamic arguments.
|
|
4
4
|
* @summary Overrides standard construction patterns by wrapping the given constructor to allow spread argument invocation while preserving the prototype chain.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./constants.
|
|
2
|
-
export * from "./construction.
|
|
3
|
-
export * from "./decorators.
|
|
4
|
-
export * from "./ModelRegistry.
|
|
5
|
-
export * from "./Model.
|
|
6
|
-
export * from "./ModelErrorDefinition.
|
|
7
|
-
export * from "./Builder.
|
|
8
|
-
export * from "./types.
|
|
9
|
-
export * from "./validation.
|
|
10
|
-
export * from "./utils.
|
|
1
|
+
export * from "./constants.d.cts";
|
|
2
|
+
export * from "./construction.d.cts";
|
|
3
|
+
export * from "./decorators.d.cts";
|
|
4
|
+
export * from "./ModelRegistry.d.cts";
|
|
5
|
+
export * from "./Model.d.cts";
|
|
6
|
+
export * from "./ModelErrorDefinition.d.cts";
|
|
7
|
+
export * from "./Builder.d.cts";
|
|
8
|
+
export * from "./types.d.cts";
|
|
9
|
+
export * from "./validation.d.cts";
|
|
10
|
+
export * from "./utils.d.cts";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export * from "./constants.
|
|
2
|
-
export * from "./construction.
|
|
3
|
-
export * from "./decorators.
|
|
4
|
-
export * from "./ModelRegistry.
|
|
5
|
-
export * from "./Model.
|
|
6
|
-
export * from "./ModelErrorDefinition.
|
|
7
|
-
export * from "./Builder.
|
|
8
|
-
export * from "./types.
|
|
9
|
-
export * from "./validation.
|
|
10
|
-
export * from "./utils.
|
|
1
|
+
export * from "./constants.d.mts";
|
|
2
|
+
export * from "./construction.d.mts";
|
|
3
|
+
export * from "./decorators.d.mts";
|
|
4
|
+
export * from "./ModelRegistry.d.mts";
|
|
5
|
+
export * from "./Model.d.mts";
|
|
6
|
+
export * from "./ModelErrorDefinition.d.mts";
|
|
7
|
+
export * from "./Builder.d.mts";
|
|
8
|
+
export * from "./types.d.mts";
|
|
9
|
+
export * from "./validation.d.mts";
|
|
10
|
+
export * from "./utils.d.mts";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConditionalAsync } from "../types/index.
|
|
2
|
-
import { ModelErrorDefinition } from "./ModelErrorDefinition.
|
|
3
|
-
import { Model } from "./Model.
|
|
1
|
+
import type { ConditionalAsync } from "../types/index.d.cts";
|
|
2
|
+
import { ModelErrorDefinition } from "./ModelErrorDefinition.d.cts";
|
|
3
|
+
import { Model } from "./Model.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @description Function type for building model instances from objects
|
|
6
6
|
* @summary Type definition for a model builder function that populates model properties
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ConditionalAsync } from "../types/index.
|
|
2
|
-
import { ModelErrorDefinition } from "./ModelErrorDefinition.
|
|
3
|
-
import { Model } from "./Model.
|
|
1
|
+
import type { ConditionalAsync } from "../types/index.d.mts";
|
|
2
|
+
import { ModelErrorDefinition } from "./ModelErrorDefinition.d.mts";
|
|
3
|
+
import { Model } from "./Model.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @description Function type for building model instances from objects
|
|
6
6
|
* @summary Type definition for a model builder function that populates model properties
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ModelErrorDefinition } from "./ModelErrorDefinition.
|
|
2
|
-
import type { Model } from "./Model.
|
|
3
|
-
import { ConditionalAsync } from "../types/index.
|
|
1
|
+
import { ModelErrorDefinition } from "./ModelErrorDefinition.d.cts";
|
|
2
|
+
import type { Model } from "./Model.d.cts";
|
|
3
|
+
import { ConditionalAsync } from "../types/index.d.cts";
|
|
4
4
|
export declare function validateChildValue<M extends Model>(prop: string, childValue: any, parentModel: M, allowedTypes: string[], async: boolean, ...propsToIgnore: string[]): string | undefined | ModelErrorDefinition | Promise<string | undefined | ModelErrorDefinition>;
|
|
5
5
|
/**
|
|
6
6
|
* @description Retrieves nested properties to ignore for child validation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ModelErrorDefinition } from "./ModelErrorDefinition.
|
|
2
|
-
import type { Model } from "./Model.
|
|
3
|
-
import { ConditionalAsync } from "../types/index.
|
|
1
|
+
import { ModelErrorDefinition } from "./ModelErrorDefinition.d.mts";
|
|
2
|
+
import type { Model } from "./Model.d.mts";
|
|
3
|
+
import { ConditionalAsync } from "../types/index.d.mts";
|
|
4
4
|
export declare function validateChildValue<M extends Model>(prop: string, childValue: any, parentModel: M, allowedTypes: string[], async: boolean, ...propsToIgnore: string[]): string | undefined | ModelErrorDefinition | Promise<string | undefined | ModelErrorDefinition>;
|
|
5
5
|
/**
|
|
6
6
|
* @description Retrieves nested properties to ignore for child validation
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Model } from "../model/Model.
|
|
1
|
+
import { Model } from "../model/Model.d.cts";
|
|
2
2
|
import "@decaf-ts/decoration";
|
|
3
3
|
import { Constructor } from "@decaf-ts/decoration";
|
|
4
|
-
import { designTypeReturn, ExtendedMetadata } from "./types.
|
|
5
|
-
import { ValidationMetadata } from "../validation/types.
|
|
4
|
+
import { designTypeReturn, ExtendedMetadata } from "./types.d.cts";
|
|
5
|
+
import { ValidationMetadata } from "../validation/types.d.cts";
|
|
6
6
|
declare module "@decaf-ts/decoration" {
|
|
7
7
|
namespace Metadata {
|
|
8
8
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Model } from "../model/Model.
|
|
1
|
+
import { Model } from "../model/Model.d.mts";
|
|
2
2
|
import "@decaf-ts/decoration";
|
|
3
3
|
import { Constructor } from "@decaf-ts/decoration";
|
|
4
|
-
import { designTypeReturn, ExtendedMetadata } from "./types.
|
|
5
|
-
import { ValidationMetadata } from "../validation/types.
|
|
4
|
+
import { designTypeReturn, ExtendedMetadata } from "./types.d.mts";
|
|
5
|
+
import { ValidationMetadata } from "../validation/types.d.mts";
|
|
6
6
|
declare module "@decaf-ts/decoration" {
|
|
7
7
|
namespace Metadata {
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./overrides";
|
|
2
|
-
export * from "./Metadata.
|
|
3
|
-
export * from "./overrides.
|
|
4
|
-
export * from "./types.
|
|
2
|
+
export * from "./Metadata.d.cts";
|
|
3
|
+
export * from "./overrides.d.cts";
|
|
4
|
+
export * from "./types.d.cts";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import "./overrides";
|
|
2
|
-
export * from "./Metadata.
|
|
3
|
-
export * from "./overrides.
|
|
4
|
-
export * from "./types.
|
|
2
|
+
export * from "./Metadata.d.mts";
|
|
3
|
+
export * from "./overrides.d.mts";
|
|
4
|
+
export * from "./types.d.mts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BasicMetadata } from "@decaf-ts/decoration";
|
|
2
|
-
import { ValidatorOptions } from "../validation/types.
|
|
2
|
+
import { ValidatorOptions } from "../validation/types.d.cts";
|
|
3
3
|
export type ExtendedMetadata<M> = BasicMetadata<M> & {
|
|
4
4
|
validation: Record<keyof M, ValidatorOptions>;
|
|
5
5
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BasicMetadata } from "@decaf-ts/decoration";
|
|
2
|
-
import { ValidatorOptions } from "../validation/types.
|
|
2
|
+
import { ValidatorOptions } from "../validation/types.d.mts";
|
|
3
3
|
export type ExtendedMetadata<M> = BasicMetadata<M> & {
|
|
4
4
|
validation: Record<keyof M, ValidatorOptions>;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./validation.
|
|
1
|
+
export * from "./validation.d.cts";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./validation.
|
|
1
|
+
export * from "./validation.d.mts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Model } from "../model/Model.
|
|
2
|
-
import { ModelErrorDefinition } from "../model/ModelErrorDefinition.
|
|
1
|
+
import { Model } from "../model/Model.d.cts";
|
|
2
|
+
import { ModelErrorDefinition } from "../model/ModelErrorDefinition.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Conditionally wraps a type in a `Promise` based on the `Async` flag.
|
|
5
5
|
* @summary Utility type that resolves to `T` if `Async` is `false`, or to `Promise<T>` if `Async` is `true`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Model } from "../model/Model.
|
|
2
|
-
import { ModelErrorDefinition } from "../model/ModelErrorDefinition.
|
|
1
|
+
import { Model } from "../model/Model.d.mts";
|
|
2
|
+
import { ModelErrorDefinition } from "../model/ModelErrorDefinition.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Conditionally wraps a type in a `Promise` based on the `Async` flag.
|
|
5
5
|
* @summary Utility type that resolves to `T` if `Async` is `false`, or to `Promise<T>` if `Async` is `true`.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./constants.
|
|
2
|
-
export * from "./DateBuilder.
|
|
3
|
-
export * from "./dates.
|
|
4
|
-
export * from "./equality.
|
|
5
|
-
export * from "./hashing.
|
|
6
|
-
export * from "./PathProxy.
|
|
7
|
-
export * from "./registry.
|
|
8
|
-
export * from "./serializers.
|
|
9
|
-
export * from "./serialization.
|
|
10
|
-
export * from "./strings.
|
|
11
|
-
export * from "./types.
|
|
1
|
+
export * from "./constants.d.cts";
|
|
2
|
+
export * from "./DateBuilder.d.cts";
|
|
3
|
+
export * from "./dates.d.cts";
|
|
4
|
+
export * from "./equality.d.cts";
|
|
5
|
+
export * from "./hashing.d.cts";
|
|
6
|
+
export * from "./PathProxy.d.cts";
|
|
7
|
+
export * from "./registry.d.cts";
|
|
8
|
+
export * from "./serializers.d.cts";
|
|
9
|
+
export * from "./serialization.d.cts";
|
|
10
|
+
export * from "./strings.d.cts";
|
|
11
|
+
export * from "./types.d.cts";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export * from "./constants.
|
|
2
|
-
export * from "./DateBuilder.
|
|
3
|
-
export * from "./dates.
|
|
4
|
-
export * from "./equality.
|
|
5
|
-
export * from "./hashing.
|
|
6
|
-
export * from "./PathProxy.
|
|
7
|
-
export * from "./registry.
|
|
8
|
-
export * from "./serializers.
|
|
9
|
-
export * from "./serialization.
|
|
10
|
-
export * from "./strings.
|
|
11
|
-
export * from "./types.
|
|
1
|
+
export * from "./constants.d.mts";
|
|
2
|
+
export * from "./DateBuilder.d.mts";
|
|
3
|
+
export * from "./dates.d.mts";
|
|
4
|
+
export * from "./equality.d.mts";
|
|
5
|
+
export * from "./hashing.d.mts";
|
|
6
|
+
export * from "./PathProxy.d.mts";
|
|
7
|
+
export * from "./registry.d.mts";
|
|
8
|
+
export * from "./serializers.d.mts";
|
|
9
|
+
export * from "./serialization.d.mts";
|
|
10
|
+
export * from "./strings.d.mts";
|
|
11
|
+
export * from "./types.d.mts";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Serializer } from "./types.
|
|
2
|
-
import { Model } from "../model/Model.
|
|
1
|
+
import { Serializer } from "./types.d.cts";
|
|
2
|
+
import { Model } from "../model/Model.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Concrete implementation of a {@link Serializer} in JSON format
|
|
5
5
|
* @description JS's native JSON.stringify (used here) is not deterministic
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Serializer } from "./types.
|
|
2
|
-
import { Model } from "../model/Model.
|
|
1
|
+
import { Serializer } from "./types.d.mts";
|
|
2
|
+
import { Model } from "../model/Model.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Concrete implementation of a {@link Serializer} in JSON format
|
|
5
5
|
* @description JS's native JSON.stringify (used here) is not deterministic
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model } from "../model/index.
|
|
1
|
+
import { Model } from "../model/index.d.cts";
|
|
2
2
|
/**
|
|
3
3
|
* @description Interface for serializing and deserializing model objects
|
|
4
4
|
* @summary Defines the contract for classes that can convert model objects to and from string representations.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model } from "../model/index.
|
|
1
|
+
import { Model } from "../model/index.d.mts";
|
|
2
2
|
/**
|
|
3
3
|
* @description Interface for serializing and deserializing model objects
|
|
4
4
|
* @summary Defines the contract for classes that can convert model objects to and from string representations.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validators/Validator.
|
|
2
|
-
import { IValidatorRegistry, ValidatorDefinition } from "./types.
|
|
1
|
+
import { Validator } from "./Validators/Validator.d.cts";
|
|
2
|
+
import { IValidatorRegistry, ValidatorDefinition } from "./types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Static class acting as a namespace for the Validation
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validators/Validator.
|
|
2
|
-
import { IValidatorRegistry, ValidatorDefinition } from "./types.
|
|
1
|
+
import { Validator } from "./Validators/Validator.d.mts";
|
|
2
|
+
import { IValidatorRegistry, ValidatorDefinition } from "./types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Static class acting as a namespace for the Validation
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ValidatorOptions } from "../types.
|
|
2
|
-
import type { PathProxy } from "../../utils/index.
|
|
3
|
-
import { BaseValidator } from "./BaseValidator.
|
|
1
|
+
import type { ValidatorOptions } from "../types.d.cts";
|
|
2
|
+
import type { PathProxy } from "../../utils/index.d.cts";
|
|
3
|
+
import { BaseValidator } from "./BaseValidator.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* Abstract class for defining asynchronous validators.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ValidatorOptions } from "../types.
|
|
2
|
-
import type { PathProxy } from "../../utils/index.
|
|
3
|
-
import { BaseValidator } from "./BaseValidator.
|
|
1
|
+
import type { ValidatorOptions } from "../types.d.mts";
|
|
2
|
+
import type { PathProxy } from "../../utils/index.d.mts";
|
|
3
|
+
import { BaseValidator } from "./BaseValidator.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* Abstract class for defining asynchronous validators.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ValidatorOptions } from "../types.
|
|
2
|
-
import type { PathProxy } from "../../utils/index.
|
|
3
|
-
import type { ConditionalAsync } from "../../types/index.
|
|
1
|
+
import { ValidatorOptions } from "../types.d.cts";
|
|
2
|
+
import type { PathProxy } from "../../utils/index.d.cts";
|
|
3
|
+
import type { ConditionalAsync } from "../../types/index.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @description Abstract base class for all validators in the validation framework.
|
|
6
6
|
* @summary The BaseValidator class provides the foundation for all synchronous and asynchronous validator implementations.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ValidatorOptions } from "../types.
|
|
2
|
-
import type { PathProxy } from "../../utils/index.
|
|
3
|
-
import type { ConditionalAsync } from "../../types/index.
|
|
1
|
+
import { ValidatorOptions } from "../types.d.mts";
|
|
2
|
+
import type { PathProxy } from "../../utils/index.d.mts";
|
|
3
|
+
import type { ConditionalAsync } from "../../types/index.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @description Abstract base class for all validators in the validation framework.
|
|
6
6
|
* @summary The BaseValidator class provides the foundation for all synchronous and asynchronous validator implementations.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { DateValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { DateValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a value is a valid date
|
|
5
5
|
* @summary The DateValidator checks if a value is a valid date object or a string that can be converted to a valid date.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { DateValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { DateValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a value is a valid date
|
|
5
5
|
* @summary The DateValidator checks if a value is a valid date object or a string that can be converted to a valid date.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { DiffValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/index.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { DiffValidatorOptions } from "../types.d.cts";
|
|
3
|
+
import type { PathProxy } from "../../utils/index.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Diff Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { DiffValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/index.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { DiffValidatorOptions } from "../types.d.mts";
|
|
3
|
+
import type { PathProxy } from "../../utils/index.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Diff Validator
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PatternValidator } from "./PatternValidator.
|
|
2
|
-
import { PatternValidatorOptions } from "../types.
|
|
1
|
+
import { PatternValidator } from "./PatternValidator.d.cts";
|
|
2
|
+
import { PatternValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a string is a valid email address
|
|
5
5
|
* @summary The EmailValidator checks if a string matches a standard email address pattern.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PatternValidator } from "./PatternValidator.
|
|
2
|
-
import { PatternValidatorOptions } from "../types.
|
|
1
|
+
import { PatternValidator } from "./PatternValidator.d.mts";
|
|
2
|
+
import { PatternValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a string is a valid email address
|
|
5
5
|
* @summary The EmailValidator checks if a string matches a standard email address pattern.
|