@decaf-ts/decorator-validation 1.20.0 → 1.21.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/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/cjs/index.cjs +2 -1
- package/lib/cjs/index.cjs.map +1 -1
- package/lib/esm/index.js +2 -1
- package/lib/esm/index.js.map +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 +8 -7
- package/lib/types/index.d.mts +8 -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 +9 -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
|
@@ -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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { EqualsValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/index.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { EqualsValidatorOptions } from "../types.d.cts";
|
|
3
|
+
import type { PathProxy } from "../../utils/index.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Equals Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { EqualsValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/index.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { EqualsValidatorOptions } from "../types.d.mts";
|
|
3
|
+
import type { PathProxy } from "../../utils/index.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Equals Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { GreaterThanOrEqualValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { GreaterThanOrEqualValidatorOptions } from "../types.d.cts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Greater Than or Equal Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { GreaterThanOrEqualValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { GreaterThanOrEqualValidatorOptions } from "../types.d.mts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Greater Than or Equal Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { GreaterThanValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { GreaterThanValidatorOptions } from "../types.d.cts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Greater Than Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { GreaterThanValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { GreaterThanValidatorOptions } from "../types.d.mts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Greater Than Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import type { LessThanOrEqualValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import type { LessThanOrEqualValidatorOptions } from "../types.d.cts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Less Than or Equal Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import type { LessThanOrEqualValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import type { LessThanOrEqualValidatorOptions } from "../types.d.mts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Less Than or Equal Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { LessThanValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { LessThanValidatorOptions } from "../types.d.cts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.cts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Less Than Validator
|
|
6
6
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { LessThanValidatorOptions } from "../types.
|
|
3
|
-
import type { PathProxy } from "../../utils/PathProxy.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { LessThanValidatorOptions } from "../types.d.mts";
|
|
3
|
+
import type { PathProxy } from "../../utils/PathProxy.d.mts";
|
|
4
4
|
/**
|
|
5
5
|
* @summary Less Than Validator
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { ListValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { ListValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if elements in a list or set match expected types
|
|
5
5
|
* @summary The ListValidator validates that all elements in an array or Set match the expected types.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { ListValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { ListValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if elements in a list or set match expected types
|
|
5
5
|
* @summary The ListValidator validates that all elements in an array or Set match the expected types.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MaxLengthValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { MaxLengthValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Maximum Length Validator
|
|
5
5
|
* @description Validates strings and Arrays on their maximum length
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MaxLengthValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { MaxLengthValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Maximum Length Validator
|
|
5
5
|
* @description Validates strings and Arrays on their maximum length
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MaxValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { MaxValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a value is less than or equal to a maximum
|
|
5
5
|
* @summary The MaxValidator checks if a numeric value, date, or string is less than or equal to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MaxValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { MaxValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a value is less than or equal to a maximum
|
|
5
5
|
* @summary The MaxValidator checks if a numeric value, date, or string is less than or equal to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MinLengthValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { MinLengthValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Minimum Length Validator
|
|
5
5
|
* @description Validates strings and Arrays on their minimum length
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MinLengthValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { MinLengthValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Minimum Length Validator
|
|
5
5
|
* @description Validates strings and Arrays on their minimum length
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MinValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { MinValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a value is greater than or equal to a minimum
|
|
5
5
|
* @summary The MinValidator checks if a numeric value, date, or string is greater than or equal to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { MinValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.mts";
|
|
2
|
+
import { MinValidatorOptions } from "../types.d.mts";
|
|
3
3
|
/**
|
|
4
4
|
* @description Validator for checking if a value is greater than or equal to a minimum
|
|
5
5
|
* @summary The MinValidator checks if a numeric value, date, or string is greater than or equal to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Validator } from "./Validator.
|
|
2
|
-
import { EnumValidatorOptions } from "../types.
|
|
1
|
+
import { Validator } from "./Validator.d.cts";
|
|
2
|
+
import { EnumValidatorOptions } from "../types.d.cts";
|
|
3
3
|
/**
|
|
4
4
|
* @summary Option Validator
|
|
5
5
|
* @description Validates properties against an object or a list of accepted values
|