@allgemein/schema-api 1.5.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/LICENSE +23 -0
- package/README.md +34 -0
- package/api/IBaseRef.d.ts +44 -0
- package/api/IBaseRef.js +4 -0
- package/api/IBaseRef.js.map +1 -0
- package/api/IBuildOptions.d.ts +31 -0
- package/api/IBuildOptions.js +4 -0
- package/api/IBuildOptions.js.map +1 -0
- package/api/IClassRef.d.ts +24 -0
- package/api/IClassRef.js +13 -0
- package/api/IClassRef.js.map +1 -0
- package/api/IEntityRef.d.ts +16 -0
- package/api/IEntityRef.js +11 -0
- package/api/IEntityRef.js.map +1 -0
- package/api/IJsonSchema.d.ts +11 -0
- package/api/IJsonSchema.js +26 -0
- package/api/IJsonSchema.js.map +1 -0
- package/api/ILookupRegistry.d.ts +60 -0
- package/api/ILookupRegistry.js +17 -0
- package/api/ILookupRegistry.js.map +1 -0
- package/api/IPropertyExtentions.d.ts +8 -0
- package/api/IPropertyExtentions.js +5 -0
- package/api/IPropertyExtentions.js.map +1 -0
- package/api/IPropertyRef.d.ts +28 -0
- package/api/IPropertyRef.js +13 -0
- package/api/IPropertyRef.js.map +1 -0
- package/api/ISchemaRef.d.ts +8 -0
- package/api/ISchemaRef.js +4 -0
- package/api/ISchemaRef.js.map +1 -0
- package/api/ISerializeSupport.d.ts +11 -0
- package/api/ISerializeSupport.js +26 -0
- package/api/ISerializeSupport.js.map +1 -0
- package/browser.d.ts +62 -0
- package/browser.js +117 -0
- package/browser.js.map +1 -0
- package/decorators/Embeddable.d.ts +2 -0
- package/decorators/Embeddable.js +14 -0
- package/decorators/Embeddable.js.map +1 -0
- package/decorators/Entity.d.ts +2 -0
- package/decorators/Entity.js +14 -0
- package/decorators/Entity.js.map +1 -0
- package/decorators/Namespace.d.ts +1 -0
- package/decorators/Namespace.js +20 -0
- package/decorators/Namespace.js.map +1 -0
- package/decorators/Property.d.ts +3 -0
- package/decorators/Property.js +59 -0
- package/decorators/Property.js.map +1 -0
- package/decorators/PropertyOf.d.ts +2 -0
- package/decorators/PropertyOf.js +28 -0
- package/decorators/PropertyOf.js.map +1 -0
- package/decorators/Schema.d.ts +2 -0
- package/decorators/Schema.js +14 -0
- package/decorators/Schema.js.map +1 -0
- package/decorators/validate/Hostname.d.ts +6 -0
- package/decorators/validate/Hostname.js +38 -0
- package/decorators/validate/Hostname.js.map +1 -0
- package/decorators/validate/Ip4.d.ts +6 -0
- package/decorators/validate/Ip4.js +37 -0
- package/decorators/validate/Ip4.js.map +1 -0
- package/decorators/validate/Ip6.d.ts +5 -0
- package/decorators/validate/Ip6.js +37 -0
- package/decorators/validate/Ip6.js.map +1 -0
- package/decorators/validate/IsEmail.d.ts +5 -0
- package/decorators/validate/IsEmail.js +37 -0
- package/decorators/validate/IsEmail.js.map +1 -0
- package/decorators/validate/IsNotEmpty.d.ts +5 -0
- package/decorators/validate/IsNotEmpty.js +36 -0
- package/decorators/validate/IsNotEmpty.js.map +1 -0
- package/decorators/validate/MaxLength.d.ts +6 -0
- package/decorators/validate/MaxLength.js +34 -0
- package/decorators/validate/MaxLength.js.map +1 -0
- package/decorators/validate/MinLength.d.ts +6 -0
- package/decorators/validate/MinLength.js +34 -0
- package/decorators/validate/MinLength.js.map +1 -0
- package/decorators/validate/Regex.d.ts +7 -0
- package/decorators/validate/Regex.js +46 -0
- package/decorators/validate/Regex.js.map +1 -0
- package/decorators/validate/Required.d.ts +5 -0
- package/decorators/validate/Required.js +34 -0
- package/decorators/validate/Required.js.map +1 -0
- package/decorators/validate/index.d.ts +9 -0
- package/decorators/validate/index.js +21 -0
- package/decorators/validate/index.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +15 -0
- package/index.js.map +1 -0
- package/lib/AbstractRef.d.ts +26 -0
- package/lib/AbstractRef.js +126 -0
- package/lib/AbstractRef.js.map +1 -0
- package/lib/AnnotationsHelper.d.ts +7 -0
- package/lib/AnnotationsHelper.js +97 -0
- package/lib/AnnotationsHelper.js.map +1 -0
- package/lib/ClassRef.d.ts +120 -0
- package/lib/ClassRef.js +319 -0
- package/lib/ClassRef.js.map +1 -0
- package/lib/Constants.d.ts +45 -0
- package/lib/Constants.js +65 -0
- package/lib/Constants.js.map +1 -0
- package/lib/DataContainer.d.ts +31 -0
- package/lib/DataContainer.js +148 -0
- package/lib/DataContainer.js.map +1 -0
- package/lib/LookupRegistry.d.ts +36 -0
- package/lib/LookupRegistry.js +106 -0
- package/lib/LookupRegistry.js.map +1 -0
- package/lib/SchemaRef.d.ts +14 -0
- package/lib/SchemaRef.js +51 -0
- package/lib/SchemaRef.js.map +1 -0
- package/lib/SchemaUtils.d.ts +39 -0
- package/lib/SchemaUtils.js +129 -0
- package/lib/SchemaUtils.js.map +1 -0
- package/lib/json-schema/Constants.d.ts +2 -0
- package/lib/json-schema/Constants.js +7 -0
- package/lib/json-schema/Constants.js.map +1 -0
- package/lib/json-schema/IJsonSchemaSerializeOptions.d.ts +40 -0
- package/lib/json-schema/IJsonSchemaSerializeOptions.js +4 -0
- package/lib/json-schema/IJsonSchemaSerializeOptions.js.map +1 -0
- package/lib/json-schema/IJsonSchemaSerializer.d.ts +7 -0
- package/lib/json-schema/IJsonSchemaSerializer.js +4 -0
- package/lib/json-schema/IJsonSchemaSerializer.js.map +1 -0
- package/lib/json-schema/IJsonSchemaUnserializeOptions.d.ts +41 -0
- package/lib/json-schema/IJsonSchemaUnserializeOptions.js +4 -0
- package/lib/json-schema/IJsonSchemaUnserializeOptions.js.map +1 -0
- package/lib/json-schema/IJsonSchemaUnserializer.d.ts +5 -0
- package/lib/json-schema/IJsonSchemaUnserializer.js +4 -0
- package/lib/json-schema/IJsonSchemaUnserializer.js.map +1 -0
- package/lib/json-schema/IParseOptions.d.ts +16 -0
- package/lib/json-schema/IParseOptions.js +6 -0
- package/lib/json-schema/IParseOptions.js.map +1 -0
- package/lib/json-schema/JsonSchema.d.ts +22 -0
- package/lib/json-schema/JsonSchema.js +109 -0
- package/lib/json-schema/JsonSchema.js.map +1 -0
- package/lib/json-schema/JsonSchema7.d.ts +16 -0
- package/lib/json-schema/JsonSchema7.js +22 -0
- package/lib/json-schema/JsonSchema7.js.map +1 -0
- package/lib/json-schema/JsonSchema7Serializer.d.ts +42 -0
- package/lib/json-schema/JsonSchema7Serializer.js +438 -0
- package/lib/json-schema/JsonSchema7Serializer.js.map +1 -0
- package/lib/json-schema/JsonSchema7Unserializer.d.ts +60 -0
- package/lib/json-schema/JsonSchema7Unserializer.js +499 -0
- package/lib/json-schema/JsonSchema7Unserializer.js.map +1 -0
- package/lib/options/IAbstractOptions.d.ts +19 -0
- package/lib/options/IAbstractOptions.js +4 -0
- package/lib/options/IAbstractOptions.js.map +1 -0
- package/lib/options/IAttributeOptions.d.ts +7 -0
- package/lib/options/IAttributeOptions.js +4 -0
- package/lib/options/IAttributeOptions.js.map +1 -0
- package/lib/options/IEntityOptions.d.ts +4 -0
- package/lib/options/IEntityOptions.js +4 -0
- package/lib/options/IEntityOptions.js.map +1 -0
- package/lib/options/IObjectOptions.d.ts +4 -0
- package/lib/options/IObjectOptions.js +4 -0
- package/lib/options/IObjectOptions.js.map +1 -0
- package/lib/options/IPropertyOptions.d.ts +24 -0
- package/lib/options/IPropertyOptions.js +4 -0
- package/lib/options/IPropertyOptions.js.map +1 -0
- package/lib/options/ISchemaOptions.d.ts +4 -0
- package/lib/options/ISchemaOptions.js +4 -0
- package/lib/options/ISchemaOptions.js.map +1 -0
- package/lib/registry/AbstractRegistry.d.ts +91 -0
- package/lib/registry/AbstractRegistry.js +135 -0
- package/lib/registry/AbstractRegistry.js.map +1 -0
- package/lib/registry/Binding.d.ts +9 -0
- package/lib/registry/Binding.js +17 -0
- package/lib/registry/Binding.js.map +1 -0
- package/lib/registry/DefaultEntityRef.d.ts +30 -0
- package/lib/registry/DefaultEntityRef.js +60 -0
- package/lib/registry/DefaultEntityRef.js.map +1 -0
- package/lib/registry/DefaultNamespacedRegistry.d.ts +153 -0
- package/lib/registry/DefaultNamespacedRegistry.js +511 -0
- package/lib/registry/DefaultNamespacedRegistry.js.map +1 -0
- package/lib/registry/DefaultPropertyRef.d.ts +44 -0
- package/lib/registry/DefaultPropertyRef.js +175 -0
- package/lib/registry/DefaultPropertyRef.js.map +1 -0
- package/lib/registry/MetadataRegistry.d.ts +52 -0
- package/lib/registry/MetadataRegistry.js +186 -0
- package/lib/registry/MetadataRegistry.js.map +1 -0
- package/lib/registry/RegistryFactory.d.ts +43 -0
- package/lib/registry/RegistryFactory.js +109 -0
- package/lib/registry/RegistryFactory.js.map +1 -0
- package/lib/serializer/ISerializeOptions.d.ts +10 -0
- package/lib/serializer/ISerializeOptions.js +4 -0
- package/lib/serializer/ISerializeOptions.js.map +1 -0
- package/lib/serializer/ISerializer.d.ts +5 -0
- package/lib/serializer/ISerializer.js +4 -0
- package/lib/serializer/ISerializer.js.map +1 -0
- package/lib/serializer/ISerializerFactory.d.ts +13 -0
- package/lib/serializer/ISerializerFactory.js +4 -0
- package/lib/serializer/ISerializerFactory.js.map +1 -0
- package/lib/serializer/IUnserializeOptions.d.ts +14 -0
- package/lib/serializer/IUnserializeOptions.js +4 -0
- package/lib/serializer/IUnserializeOptions.js.map +1 -0
- package/lib/serializer/IUnserializer.d.ts +5 -0
- package/lib/serializer/IUnserializer.js +4 -0
- package/lib/serializer/IUnserializer.js.map +1 -0
- package/lib/serializer/SerializerRegistry.d.ts +8 -0
- package/lib/serializer/SerializerRegistry.js +20 -0
- package/lib/serializer/SerializerRegistry.js.map +1 -0
- package/lib/validation/DefaultValidator.d.ts +14 -0
- package/lib/validation/DefaultValidator.js +221 -0
- package/lib/validation/DefaultValidator.js.map +1 -0
- package/lib/validation/IValidateOptions.d.ts +4 -0
- package/lib/validation/IValidateOptions.js +4 -0
- package/lib/validation/IValidateOptions.js.map +1 -0
- package/lib/validation/IValidationError.d.ts +10 -0
- package/lib/validation/IValidationError.js +4 -0
- package/lib/validation/IValidationError.js.map +1 -0
- package/lib/validation/IValidationMessage.d.ts +4 -0
- package/lib/validation/IValidationMessage.js +4 -0
- package/lib/validation/IValidationMessage.js.map +1 -0
- package/lib/validation/IValidationOptions.d.ts +1 -0
- package/lib/validation/IValidationOptions.js +30 -0
- package/lib/validation/IValidationOptions.js.map +1 -0
- package/lib/validation/IValidationResult.d.ts +7 -0
- package/lib/validation/IValidationResult.js +4 -0
- package/lib/validation/IValidationResult.js.map +1 -0
- package/lib/validation/IValidator.d.ts +9 -0
- package/lib/validation/IValidator.js +4 -0
- package/lib/validation/IValidator.js.map +1 -0
- package/lib/validation/IValidatorEntry.d.ts +7 -0
- package/lib/validation/IValidatorEntry.js +4 -0
- package/lib/validation/IValidatorEntry.js.map +1 -0
- package/lib/validation/IValidatorHandle.d.ts +2 -0
- package/lib/validation/IValidatorHandle.js +4 -0
- package/lib/validation/IValidatorHandle.js.map +1 -0
- package/lib/validation/Validator.d.ts +17 -0
- package/lib/validation/Validator.js +54 -0
- package/lib/validation/Validator.js.map +1 -0
- package/package.json +73 -0
package/browser.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.XS_DEFAULT_CLASSES = exports.T_STRING = exports.STATE_KEY = exports.REFLECT_DESIGN_TYPE = exports.OPT_CREAT_AND_COPY = exports.METATYPE_EMBEDDABLE = exports.METADATA_REGISTRY = exports.JS_PRIMATIVE_TYPES = exports.JS_DATA_TYPES = exports.GLOBAL_NAMESPACE = exports.C_PROP_NAME = exports.C_EVENT_UPDATE = exports.C_EVENT_REMOVE = exports.C_EVENT_ADD = exports.__NS__ = exports.__CLASS__ = exports.XS_ANNOTATION_OPTIONS_CACHE = exports.DEFAULT_NAMESPACE = exports.METATYPE_NAMESPACE = exports.METATYPE_CLASS_REF = exports.METATYPE_PROPERTY = exports.METATYPE_ENTITY = exports.METATYPE_SCHEMA = exports.ClassRef = exports.AnnotationsHelper = exports.AbstractRegistry = exports.AbstractRef = exports.IsNotEmpty = exports.MaxLength = exports.MinLength = exports.Required = exports.Regex = exports.MAIL_REGEX = exports.IsEmail = exports.IP6_REGEX = exports.Ip6 = exports.IP4_REGEX = exports.Ip4 = exports.HOSTNAME_RFC952_REGEX = exports.HOSTNAME_RFC1034_REGEX = exports.Hostname = exports.Namespace = exports.Schema = exports.PropertyOf = exports.Embeddable = exports.Property = exports.Entity = exports.supportsJsonSchemaImport = exports.supportsJsonSchema = exports.supportsJsonSchemaExport = void 0;
|
|
4
|
+
exports.Validator = exports.DefaultValidator = exports.SchemaUtils = exports.SchemaRef = exports.Binding = exports.RegistryFactory = exports.MetadataRegistry = exports.DefaultPropertyRef = exports.DefaultNamespacedRegistry = exports.DefaultEntityRef = exports.LookupRegistry = exports.JsonSchema7Unserializer = exports.JsonSchema7Serializer = exports.JSON_SCHEMA_7_TYPES = exports.hasClassPropertiesInDefinition = exports.hasClassInDefinition = exports.JsonSchema = exports.DRAFT_07 = exports.DataContainer = exports.BINDING_SCHEMA_CLASS_REF = exports.BINDING_SCHEMA_ENTITY = exports.XS_ID_SEPARATOR = exports.XS_DEFAULT_SCHEMA = void 0;
|
|
5
|
+
var IJsonSchema_1 = require("./api/IJsonSchema");
|
|
6
|
+
Object.defineProperty(exports, "supportsJsonSchemaExport", { enumerable: true, get: function () { return IJsonSchema_1.supportsJsonSchemaExport; } });
|
|
7
|
+
Object.defineProperty(exports, "supportsJsonSchema", { enumerable: true, get: function () { return IJsonSchema_1.supportsJsonSchema; } });
|
|
8
|
+
Object.defineProperty(exports, "supportsJsonSchemaImport", { enumerable: true, get: function () { return IJsonSchema_1.supportsJsonSchemaImport; } });
|
|
9
|
+
var Entity_1 = require("./decorators/Entity");
|
|
10
|
+
Object.defineProperty(exports, "Entity", { enumerable: true, get: function () { return Entity_1.Entity; } });
|
|
11
|
+
var Property_1 = require("./decorators/Property");
|
|
12
|
+
Object.defineProperty(exports, "Property", { enumerable: true, get: function () { return Property_1.Property; } });
|
|
13
|
+
var Embeddable_1 = require("./decorators/Embeddable");
|
|
14
|
+
Object.defineProperty(exports, "Embeddable", { enumerable: true, get: function () { return Embeddable_1.Embeddable; } });
|
|
15
|
+
var PropertyOf_1 = require("./decorators/PropertyOf");
|
|
16
|
+
Object.defineProperty(exports, "PropertyOf", { enumerable: true, get: function () { return PropertyOf_1.PropertyOf; } });
|
|
17
|
+
var Schema_1 = require("./decorators/Schema");
|
|
18
|
+
Object.defineProperty(exports, "Schema", { enumerable: true, get: function () { return Schema_1.Schema; } });
|
|
19
|
+
var Namespace_1 = require("./decorators/Namespace");
|
|
20
|
+
Object.defineProperty(exports, "Namespace", { enumerable: true, get: function () { return Namespace_1.Namespace; } });
|
|
21
|
+
var Hostname_1 = require("./decorators/validate/Hostname");
|
|
22
|
+
Object.defineProperty(exports, "Hostname", { enumerable: true, get: function () { return Hostname_1.Hostname; } });
|
|
23
|
+
Object.defineProperty(exports, "HOSTNAME_RFC1034_REGEX", { enumerable: true, get: function () { return Hostname_1.HOSTNAME_RFC1034_REGEX; } });
|
|
24
|
+
Object.defineProperty(exports, "HOSTNAME_RFC952_REGEX", { enumerable: true, get: function () { return Hostname_1.HOSTNAME_RFC952_REGEX; } });
|
|
25
|
+
var Ip4_1 = require("./decorators/validate/Ip4");
|
|
26
|
+
Object.defineProperty(exports, "Ip4", { enumerable: true, get: function () { return Ip4_1.Ip4; } });
|
|
27
|
+
Object.defineProperty(exports, "IP4_REGEX", { enumerable: true, get: function () { return Ip4_1.IP4_REGEX; } });
|
|
28
|
+
var Ip6_1 = require("./decorators/validate/Ip6");
|
|
29
|
+
Object.defineProperty(exports, "Ip6", { enumerable: true, get: function () { return Ip6_1.Ip6; } });
|
|
30
|
+
Object.defineProperty(exports, "IP6_REGEX", { enumerable: true, get: function () { return Ip6_1.IP6_REGEX; } });
|
|
31
|
+
var IsEmail_1 = require("./decorators/validate/IsEmail");
|
|
32
|
+
Object.defineProperty(exports, "IsEmail", { enumerable: true, get: function () { return IsEmail_1.IsEmail; } });
|
|
33
|
+
Object.defineProperty(exports, "MAIL_REGEX", { enumerable: true, get: function () { return IsEmail_1.MAIL_REGEX; } });
|
|
34
|
+
var Regex_1 = require("./decorators/validate/Regex");
|
|
35
|
+
Object.defineProperty(exports, "Regex", { enumerable: true, get: function () { return Regex_1.Regex; } });
|
|
36
|
+
var Required_1 = require("./decorators/validate/Required");
|
|
37
|
+
Object.defineProperty(exports, "Required", { enumerable: true, get: function () { return Required_1.Required; } });
|
|
38
|
+
var MinLength_1 = require("./decorators/validate/MinLength");
|
|
39
|
+
Object.defineProperty(exports, "MinLength", { enumerable: true, get: function () { return MinLength_1.MinLength; } });
|
|
40
|
+
var MaxLength_1 = require("./decorators/validate/MaxLength");
|
|
41
|
+
Object.defineProperty(exports, "MaxLength", { enumerable: true, get: function () { return MaxLength_1.MaxLength; } });
|
|
42
|
+
var IsNotEmpty_1 = require("./decorators/validate/IsNotEmpty");
|
|
43
|
+
Object.defineProperty(exports, "IsNotEmpty", { enumerable: true, get: function () { return IsNotEmpty_1.IsNotEmpty; } });
|
|
44
|
+
var AbstractRef_1 = require("./lib/AbstractRef");
|
|
45
|
+
Object.defineProperty(exports, "AbstractRef", { enumerable: true, get: function () { return AbstractRef_1.AbstractRef; } });
|
|
46
|
+
var AbstractRegistry_1 = require("./lib/registry/AbstractRegistry");
|
|
47
|
+
Object.defineProperty(exports, "AbstractRegistry", { enumerable: true, get: function () { return AbstractRegistry_1.AbstractRegistry; } });
|
|
48
|
+
var AnnotationsHelper_1 = require("./lib/AnnotationsHelper");
|
|
49
|
+
Object.defineProperty(exports, "AnnotationsHelper", { enumerable: true, get: function () { return AnnotationsHelper_1.AnnotationsHelper; } });
|
|
50
|
+
var ClassRef_1 = require("./lib/ClassRef");
|
|
51
|
+
Object.defineProperty(exports, "ClassRef", { enumerable: true, get: function () { return ClassRef_1.ClassRef; } });
|
|
52
|
+
var Constants_1 = require("./lib/Constants");
|
|
53
|
+
Object.defineProperty(exports, "METATYPE_SCHEMA", { enumerable: true, get: function () { return Constants_1.METATYPE_SCHEMA; } });
|
|
54
|
+
Object.defineProperty(exports, "METATYPE_ENTITY", { enumerable: true, get: function () { return Constants_1.METATYPE_ENTITY; } });
|
|
55
|
+
Object.defineProperty(exports, "METATYPE_PROPERTY", { enumerable: true, get: function () { return Constants_1.METATYPE_PROPERTY; } });
|
|
56
|
+
Object.defineProperty(exports, "METATYPE_CLASS_REF", { enumerable: true, get: function () { return Constants_1.METATYPE_CLASS_REF; } });
|
|
57
|
+
Object.defineProperty(exports, "METATYPE_NAMESPACE", { enumerable: true, get: function () { return Constants_1.METATYPE_NAMESPACE; } });
|
|
58
|
+
Object.defineProperty(exports, "DEFAULT_NAMESPACE", { enumerable: true, get: function () { return Constants_1.DEFAULT_NAMESPACE; } });
|
|
59
|
+
Object.defineProperty(exports, "XS_ANNOTATION_OPTIONS_CACHE", { enumerable: true, get: function () { return Constants_1.XS_ANNOTATION_OPTIONS_CACHE; } });
|
|
60
|
+
Object.defineProperty(exports, "__CLASS__", { enumerable: true, get: function () { return Constants_1.__CLASS__; } });
|
|
61
|
+
Object.defineProperty(exports, "__NS__", { enumerable: true, get: function () { return Constants_1.__NS__; } });
|
|
62
|
+
Object.defineProperty(exports, "C_EVENT_ADD", { enumerable: true, get: function () { return Constants_1.C_EVENT_ADD; } });
|
|
63
|
+
Object.defineProperty(exports, "C_EVENT_REMOVE", { enumerable: true, get: function () { return Constants_1.C_EVENT_REMOVE; } });
|
|
64
|
+
Object.defineProperty(exports, "C_EVENT_UPDATE", { enumerable: true, get: function () { return Constants_1.C_EVENT_UPDATE; } });
|
|
65
|
+
Object.defineProperty(exports, "C_PROP_NAME", { enumerable: true, get: function () { return Constants_1.C_PROP_NAME; } });
|
|
66
|
+
Object.defineProperty(exports, "GLOBAL_NAMESPACE", { enumerable: true, get: function () { return Constants_1.GLOBAL_NAMESPACE; } });
|
|
67
|
+
Object.defineProperty(exports, "JS_DATA_TYPES", { enumerable: true, get: function () { return Constants_1.JS_DATA_TYPES; } });
|
|
68
|
+
Object.defineProperty(exports, "JS_PRIMATIVE_TYPES", { enumerable: true, get: function () { return Constants_1.JS_PRIMATIVE_TYPES; } });
|
|
69
|
+
Object.defineProperty(exports, "METADATA_REGISTRY", { enumerable: true, get: function () { return Constants_1.METADATA_REGISTRY; } });
|
|
70
|
+
Object.defineProperty(exports, "METATYPE_EMBEDDABLE", { enumerable: true, get: function () { return Constants_1.METATYPE_EMBEDDABLE; } });
|
|
71
|
+
Object.defineProperty(exports, "OPT_CREAT_AND_COPY", { enumerable: true, get: function () { return Constants_1.OPT_CREAT_AND_COPY; } });
|
|
72
|
+
Object.defineProperty(exports, "REFLECT_DESIGN_TYPE", { enumerable: true, get: function () { return Constants_1.REFLECT_DESIGN_TYPE; } });
|
|
73
|
+
Object.defineProperty(exports, "STATE_KEY", { enumerable: true, get: function () { return Constants_1.STATE_KEY; } });
|
|
74
|
+
Object.defineProperty(exports, "T_STRING", { enumerable: true, get: function () { return Constants_1.T_STRING; } });
|
|
75
|
+
Object.defineProperty(exports, "XS_DEFAULT_CLASSES", { enumerable: true, get: function () { return Constants_1.XS_DEFAULT_CLASSES; } });
|
|
76
|
+
Object.defineProperty(exports, "XS_DEFAULT_SCHEMA", { enumerable: true, get: function () { return Constants_1.XS_DEFAULT_SCHEMA; } });
|
|
77
|
+
Object.defineProperty(exports, "XS_ID_SEPARATOR", { enumerable: true, get: function () { return Constants_1.XS_ID_SEPARATOR; } });
|
|
78
|
+
Object.defineProperty(exports, "BINDING_SCHEMA_ENTITY", { enumerable: true, get: function () { return Constants_1.BINDING_SCHEMA_ENTITY; } });
|
|
79
|
+
Object.defineProperty(exports, "BINDING_SCHEMA_CLASS_REF", { enumerable: true, get: function () { return Constants_1.BINDING_SCHEMA_CLASS_REF; } });
|
|
80
|
+
var DataContainer_1 = require("./lib/DataContainer");
|
|
81
|
+
Object.defineProperty(exports, "DataContainer", { enumerable: true, get: function () { return DataContainer_1.DataContainer; } });
|
|
82
|
+
var Constants_2 = require("./lib/json-schema/Constants");
|
|
83
|
+
Object.defineProperty(exports, "DRAFT_07", { enumerable: true, get: function () { return Constants_2.DRAFT_07; } });
|
|
84
|
+
var JsonSchema_1 = require("./lib/json-schema/JsonSchema");
|
|
85
|
+
Object.defineProperty(exports, "JsonSchema", { enumerable: true, get: function () { return JsonSchema_1.JsonSchema; } });
|
|
86
|
+
var JsonSchema7_1 = require("./lib/json-schema/JsonSchema7");
|
|
87
|
+
Object.defineProperty(exports, "hasClassInDefinition", { enumerable: true, get: function () { return JsonSchema7_1.hasClassInDefinition; } });
|
|
88
|
+
Object.defineProperty(exports, "hasClassPropertiesInDefinition", { enumerable: true, get: function () { return JsonSchema7_1.hasClassPropertiesInDefinition; } });
|
|
89
|
+
Object.defineProperty(exports, "JSON_SCHEMA_7_TYPES", { enumerable: true, get: function () { return JsonSchema7_1.JSON_SCHEMA_7_TYPES; } });
|
|
90
|
+
var JsonSchema7Serializer_1 = require("./lib/json-schema/JsonSchema7Serializer");
|
|
91
|
+
Object.defineProperty(exports, "JsonSchema7Serializer", { enumerable: true, get: function () { return JsonSchema7Serializer_1.JsonSchema7Serializer; } });
|
|
92
|
+
var JsonSchema7Unserializer_1 = require("./lib/json-schema/JsonSchema7Unserializer");
|
|
93
|
+
Object.defineProperty(exports, "JsonSchema7Unserializer", { enumerable: true, get: function () { return JsonSchema7Unserializer_1.JsonSchema7Unserializer; } });
|
|
94
|
+
var LookupRegistry_1 = require("./lib/LookupRegistry");
|
|
95
|
+
Object.defineProperty(exports, "LookupRegistry", { enumerable: true, get: function () { return LookupRegistry_1.LookupRegistry; } });
|
|
96
|
+
var DefaultEntityRef_1 = require("./lib/registry/DefaultEntityRef");
|
|
97
|
+
Object.defineProperty(exports, "DefaultEntityRef", { enumerable: true, get: function () { return DefaultEntityRef_1.DefaultEntityRef; } });
|
|
98
|
+
var DefaultNamespacedRegistry_1 = require("./lib/registry/DefaultNamespacedRegistry");
|
|
99
|
+
Object.defineProperty(exports, "DefaultNamespacedRegistry", { enumerable: true, get: function () { return DefaultNamespacedRegistry_1.DefaultNamespacedRegistry; } });
|
|
100
|
+
var DefaultPropertyRef_1 = require("./lib/registry/DefaultPropertyRef");
|
|
101
|
+
Object.defineProperty(exports, "DefaultPropertyRef", { enumerable: true, get: function () { return DefaultPropertyRef_1.DefaultPropertyRef; } });
|
|
102
|
+
var MetadataRegistry_1 = require("./lib/registry/MetadataRegistry");
|
|
103
|
+
Object.defineProperty(exports, "MetadataRegistry", { enumerable: true, get: function () { return MetadataRegistry_1.MetadataRegistry; } });
|
|
104
|
+
var RegistryFactory_1 = require("./lib/registry/RegistryFactory");
|
|
105
|
+
Object.defineProperty(exports, "RegistryFactory", { enumerable: true, get: function () { return RegistryFactory_1.RegistryFactory; } });
|
|
106
|
+
var Binding_1 = require("./lib/registry/Binding");
|
|
107
|
+
Object.defineProperty(exports, "Binding", { enumerable: true, get: function () { return Binding_1.Binding; } });
|
|
108
|
+
var SchemaRef_1 = require("./lib/SchemaRef");
|
|
109
|
+
Object.defineProperty(exports, "SchemaRef", { enumerable: true, get: function () { return SchemaRef_1.SchemaRef; } });
|
|
110
|
+
var SchemaUtils_1 = require("./lib/SchemaUtils");
|
|
111
|
+
Object.defineProperty(exports, "SchemaUtils", { enumerable: true, get: function () { return SchemaUtils_1.SchemaUtils; } });
|
|
112
|
+
var DefaultValidator_1 = require("./lib/validation/DefaultValidator");
|
|
113
|
+
Object.defineProperty(exports, "DefaultValidator", { enumerable: true, get: function () { return DefaultValidator_1.DefaultValidator; } });
|
|
114
|
+
var Validator_1 = require("./lib/validation/Validator");
|
|
115
|
+
Object.defineProperty(exports, "Validator", { enumerable: true, get: function () { return Validator_1.Validator; } });
|
|
116
|
+
|
|
117
|
+
//# sourceMappingURL=browser.js.map
|
package/browser.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/browser.ts"],"names":[],"mappings":";;;;AASA,iDAAsH;AAAjG,uHAAA,wBAAwB,OAAA;AAAE,iHAAA,kBAAkB,OAAA;AAAE,uHAAA,wBAAwB,OAAA;AAE3F,8CAA2C;AAAnC,gGAAA,MAAM,OAAA;AACd,kDAA+C;AAAvC,oGAAA,QAAQ,OAAA;AAChB,sDAAmD;AAA3C,wGAAA,UAAU,OAAA;AAClB,sDAAmD;AAA3C,wGAAA,UAAU,OAAA;AAClB,8CAA2C;AAAnC,gGAAA,MAAM,OAAA;AACd,oDAAiD;AAAzC,sGAAA,SAAS,OAAA;AAEjB,2DAKwC;AAJtC,oGAAA,QAAQ,OAAA;AACR,kHAAA,sBAAsB,OAAA;AAEtB,iHAAA,qBAAqB,OAAA;AAGvB,iDAAsE;AAA9D,0FAAA,GAAG,OAAA;AAAE,gGAAA,SAAS,OAAA;AACtB,iDAAsE;AAA9D,0FAAA,GAAG,OAAA;AAAE,gGAAA,SAAS,OAAA;AACtB,yDAAmF;AAA3E,kGAAA,OAAO,OAAA;AAAE,qGAAA,UAAU,OAAA;AAC3B,qDAAiE;AAAzD,8FAAA,KAAK,OAAA;AACb,2DAA0E;AAAlE,oGAAA,QAAQ,OAAA;AAChB,6DAA6E;AAArE,sGAAA,SAAS,OAAA;AACjB,6DAA6E;AAArE,sGAAA,SAAS,OAAA;AACjB,+DAAgF;AAAxE,wGAAA,UAAU,OAAA;AAElB,iDAA8C;AAAtC,0GAAA,WAAW,OAAA;AACnB,oEAAiE;AAAzD,oHAAA,gBAAgB,OAAA;AAExB,6DAA0D;AAAlD,sHAAA,iBAAiB,OAAA;AACzB,2CAAwC;AAAhC,oGAAA,QAAQ,OAAA;AAChB,6CAoByB;AAnBvB,4GAAA,eAAe,OAAA;AACf,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,+GAAA,kBAAkB,OAAA;AAClB,+GAAA,kBAAkB,OAAA;AAElB,8GAAA,iBAAiB,OAAA;AACjB,wHAAA,2BAA2B,OAAA;AAE3B,sGAAA,SAAS,OAAA;AAAE,mGAAA,MAAM,OAAA;AACjB,wGAAA,WAAW,OAAA;AAAE,2GAAA,cAAc,OAAA;AAAE,2GAAA,cAAc,OAAA;AAC3C,wGAAA,WAAW,OAAA;AAAc,6GAAA,gBAAgB,OAAA;AAAE,0GAAA,aAAa,OAAA;AAAE,+GAAA,kBAAkB,OAAA;AAC5E,8GAAA,iBAAiB,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AACtC,+GAAA,kBAAkB,OAAA;AAAE,gHAAA,mBAAmB,OAAA;AAAE,sGAAA,SAAS,OAAA;AAClD,qGAAA,QAAQ,OAAA;AACR,+GAAA,kBAAkB,OAAA;AAClB,8GAAA,iBAAiB,OAAA;AAEjB,4GAAA,eAAe,OAAA;AAAE,kHAAA,qBAAqB,OAAA;AAAE,qHAAA,wBAAwB,OAAA;AAGlE,qDAAkD;AAA1C,8GAAA,aAAa,OAAA;AACrB,yDAAqD;AAA7C,qGAAA,QAAQ,OAAA;AAMhB,2DAAwD;AAAhD,wGAAA,UAAU,OAAA;AAElB,6DAOuC;AAJrC,mHAAA,oBAAoB,OAAA;AACpB,6HAAA,8BAA8B,OAAA;AAE9B,kHAAA,mBAAmB,OAAA;AAGrB,iFAA8E;AAAtE,8HAAA,qBAAqB,OAAA;AAC7B,qFAAkF;AAA1E,kIAAA,uBAAuB,OAAA;AAC/B,uDAAoD;AAA5C,gHAAA,cAAc,OAAA;AAMtB,oEAAiE;AAAzD,oHAAA,gBAAgB,OAAA;AACxB,sFAAmF;AAA3E,sIAAA,yBAAyB,OAAA;AACjC,wEAAqE;AAA7D,wHAAA,kBAAkB,OAAA;AAC1B,oEAAiE;AAAzD,oHAAA,gBAAgB,OAAA;AACxB,kEAA+D;AAAvD,kHAAA,eAAe,OAAA;AACvB,kDAA+C;AAAvC,kGAAA,OAAO,OAAA;AACf,6CAA0C;AAAlC,sGAAA,SAAS,OAAA;AACjB,iDAA8C;AAAtC,0GAAA,WAAW,OAAA;AACnB,sEAAmE;AAA3D,oHAAA,gBAAgB,OAAA;AAOxB,wDAAwE;AAAhE,sGAAA,SAAS,OAAA","file":"browser.js","sourcesContent":["// ---- Generated by gulp taskRef ----\nexport {IBaseRef} from './api/IBaseRef';\nexport {IBuildOptions} from './api/IBuildOptions';\nexport {IClassRef} from './api/IClassRef';\nexport {IEntityRef} from './api/IEntityRef';\nexport {ILookupRegistry} from './api/ILookupRegistry';\nexport {IPropertyExtentions} from './api/IPropertyExtentions';\nexport {IPropertyRef} from './api/IPropertyRef';\nexport {ISchemaRef} from './api/ISchemaRef';\nexport {IJsonSchema, supportsJsonSchemaExport, supportsJsonSchema, supportsJsonSchemaImport} from './api/IJsonSchema';\n\nexport {Entity} from './decorators/Entity';\nexport {Property} from './decorators/Property';\nexport {Embeddable} from './decorators/Embeddable';\nexport {PropertyOf} from './decorators/PropertyOf';\nexport {Schema} from './decorators/Schema';\nexport {Namespace} from './decorators/Namespace';\n\nexport {\n Hostname,\n HOSTNAME_RFC1034_REGEX,\n IHostnameOptions,\n HOSTNAME_RFC952_REGEX\n} from './decorators/validate/Hostname';\n\nexport {Ip4, IP4_REGEX, IIp4Options} from './decorators/validate/Ip4';\nexport {Ip6, IP6_REGEX, IIp6Options} from './decorators/validate/Ip6';\nexport {IsEmail, MAIL_REGEX, IIsEmailOptions} from './decorators/validate/IsEmail';\nexport {Regex, IRegexOptions} from './decorators/validate/Regex';\nexport {Required, IRequiredOptions} from './decorators/validate/Required';\nexport {MinLength, IMinLengthOptions} from './decorators/validate/MinLength';\nexport {MaxLength, IMaxLengthOptions} from './decorators/validate/MaxLength';\nexport {IsNotEmpty, IIsNotEmptyOptions} from './decorators/validate/IsNotEmpty';\n\nexport {AbstractRef} from './lib/AbstractRef';\nexport {AbstractRegistry} from './lib/registry/AbstractRegistry';\n\nexport {AnnotationsHelper} from './lib/AnnotationsHelper';\nexport {ClassRef} from './lib/ClassRef';\nexport {\n METATYPE_SCHEMA,\n METATYPE_ENTITY,\n METATYPE_PROPERTY,\n METATYPE_CLASS_REF,\n METATYPE_NAMESPACE,\n METADATA_TYPE,\n DEFAULT_NAMESPACE,\n XS_ANNOTATION_OPTIONS_CACHE,\n MERGE_TYPE, IMinMax, ClassType,\n __CLASS__, __NS__,\n C_EVENT_ADD, C_EVENT_REMOVE, C_EVENT_UPDATE,\n C_PROP_NAME, CLASS_TYPE, GLOBAL_NAMESPACE, JS_DATA_TYPES, JS_PRIMATIVE_TYPES,\n METADATA_REGISTRY, METATYPE_EMBEDDABLE,\n OPT_CREAT_AND_COPY, REFLECT_DESIGN_TYPE, STATE_KEY,\n T_STRING, XS_DATA_TYPES,\n XS_DEFAULT_CLASSES,\n XS_DEFAULT_SCHEMA,\n METADATA_AND_BIND_TYPE,\n XS_ID_SEPARATOR, BINDING_SCHEMA_ENTITY, BINDING_SCHEMA_CLASS_REF\n} from './lib/Constants';\n\nexport {DataContainer} from './lib/DataContainer';\nexport {DRAFT_07} from './lib/json-schema/Constants';\nexport {IJsonSchemaSerializeOptions} from './lib/json-schema/IJsonSchemaSerializeOptions';\nexport {IJsonSchemaSerializer} from './lib/json-schema/IJsonSchemaSerializer';\nexport {IJsonSchemaUnserializeOptions} from './lib/json-schema/IJsonSchemaUnserializeOptions';\nexport {IJsonSchemaUnserializer} from './lib/json-schema/IJsonSchemaUnserializer';\nexport {IParseOptions} from './lib/json-schema/IParseOptions';\nexport {JsonSchema} from './lib/json-schema/JsonSchema';\n\nexport {\n IJsonSchema7,\n IJsonSchema7Definition,\n hasClassInDefinition,\n hasClassPropertiesInDefinition,\n IJsonSchema7TypeName,\n JSON_SCHEMA_7_TYPES\n} from './lib/json-schema/JsonSchema7';\n\nexport {JsonSchema7Serializer} from './lib/json-schema/JsonSchema7Serializer';\nexport {JsonSchema7Unserializer} from './lib/json-schema/JsonSchema7Unserializer';\nexport {LookupRegistry} from './lib/LookupRegistry';\nexport {IAbstractOptions} from './lib/options/IAbstractOptions';\nexport {IEntityOptions} from './lib/options/IEntityOptions';\nexport {IObjectOptions} from './lib/options/IObjectOptions';\nexport {IPropertyOptions} from './lib/options/IPropertyOptions';\nexport {ISchemaOptions} from './lib/options/ISchemaOptions';\nexport {DefaultEntityRef} from './lib/registry/DefaultEntityRef';\nexport {DefaultNamespacedRegistry} from './lib/registry/DefaultNamespacedRegistry';\nexport {DefaultPropertyRef} from './lib/registry/DefaultPropertyRef';\nexport {MetadataRegistry} from './lib/registry/MetadataRegistry';\nexport {RegistryFactory} from './lib/registry/RegistryFactory';\nexport {Binding} from './lib/registry/Binding';\nexport {SchemaRef} from './lib/SchemaRef';\nexport {SchemaUtils} from './lib/SchemaUtils';\nexport {DefaultValidator} from './lib/validation/DefaultValidator';\nexport {IValidateOptions} from './lib/validation/IValidateOptions';\nexport {IValidatorEntry} from './lib/validation/IValidatorEntry';\nexport {IValidationError} from './lib/validation/IValidationError';\nexport {IValidationMessage} from './lib/validation/IValidationMessage';\nexport {IValidationResult} from './lib/validation/IValidationResult';\nexport {IValidator} from './lib/validation/IValidator';\nexport {Validator, validate_function} from './lib/validation/Validator';\n"],"sourceRoot":"."}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Embeddable = void 0;
|
|
4
|
+
const Constants_1 = require("../lib/Constants");
|
|
5
|
+
const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
|
|
6
|
+
function Embeddable(options = {}) {
|
|
7
|
+
return function (object) {
|
|
8
|
+
options.target = object;
|
|
9
|
+
MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_EMBEDDABLE, options);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.Embeddable = Embeddable;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Embeddable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/Embeddable.ts"],"names":[],"mappings":";;;AACA,gDAAqD;AACrD,uEAAkE;AAGlE,SAAgB,UAAU,CAAC,UAA0B,EAAE;IACrD,OAAO,UAAU,MAAgB;QAC/B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;QACxB,mCAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,+BAAmB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC,CAAC;AACJ,CAAC;AALD,gCAKC","file":"Embeddable.js","sourcesContent":["import {IObjectOptions} from '../lib/options/IObjectOptions';\nimport {METATYPE_EMBEDDABLE} from '../lib/Constants';\nimport {MetadataRegistry} from '../lib/registry/MetadataRegistry';\n\n\nexport function Embeddable(options: IObjectOptions = {}) {\n return function (object: Function) {\n options.target = object;\n MetadataRegistry.$().add(METATYPE_EMBEDDABLE, options);\n };\n}\n\n"],"sourceRoot":".."}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Entity = void 0;
|
|
4
|
+
const Constants_1 = require("../lib/Constants");
|
|
5
|
+
const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
|
|
6
|
+
function Entity(options = {}) {
|
|
7
|
+
return function (object) {
|
|
8
|
+
options.target = object;
|
|
9
|
+
MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_ENTITY, options);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.Entity = Entity;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/Entity.ts"],"names":[],"mappings":";;;AACA,gDAAiD;AACjD,uEAAkE;AAElE,SAAgB,MAAM,CAAC,UAA0B,EAAE;IACjD,OAAO,UAAU,MAAgB;QAC/B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;QACxB,mCAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,2BAAe,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AALD,wBAKC","file":"Entity.js","sourcesContent":["import {IEntityOptions} from '../lib/options/IEntityOptions';\nimport {METATYPE_ENTITY} from '../lib/Constants';\nimport {MetadataRegistry} from '../lib/registry/MetadataRegistry';\n\nexport function Entity(options: IEntityOptions = {}) {\n return function (object: Function) {\n options.target = object;\n MetadataRegistry.$().add(METATYPE_ENTITY, options);\n };\n}\n\n"],"sourceRoot":".."}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function Namespace(ns: string): (object: Function) => void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Namespace = void 0;
|
|
4
|
+
const Constants_1 = require("../lib/Constants");
|
|
5
|
+
const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
|
|
6
|
+
function Namespace(ns) {
|
|
7
|
+
return function (object) {
|
|
8
|
+
const options = {
|
|
9
|
+
target: object,
|
|
10
|
+
targetTypes: [Constants_1.METATYPE_ENTITY, Constants_1.METATYPE_CLASS_REF, Constants_1.METATYPE_EMBEDDABLE],
|
|
11
|
+
attributes: {
|
|
12
|
+
namespace: ns
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_NAMESPACE, options, false);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
exports.Namespace = Namespace;
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=Namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/Namespace.ts"],"names":[],"mappings":";;;AAAA,gDAA8G;AAC9G,uEAAkE;AAGlE,SAAgB,SAAS,CAAC,EAAU;IAClC,OAAO,UAAU,MAAgB;QAC/B,MAAM,OAAO,GAAsB;YACjC,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,CAAC,2BAAe,EAAE,8BAAkB,EAAE,+BAAmB,CAAC;YACvE,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE;aACd;SACF,CAAC;QACF,mCAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,8BAAkB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC/D,CAAC,CAAC;AACJ,CAAC;AAXD,8BAWC","file":"Namespace.js","sourcesContent":["import {METATYPE_CLASS_REF, METATYPE_EMBEDDABLE, METATYPE_ENTITY, METATYPE_NAMESPACE} from '../lib/Constants';\nimport {MetadataRegistry} from '../lib/registry/MetadataRegistry';\nimport {IAttributeOptions} from '../lib/options/IAttributeOptions';\n\nexport function Namespace(ns: string) {\n return function (object: Function) {\n const options: IAttributeOptions = {\n target: object,\n targetTypes: [METATYPE_ENTITY, METATYPE_CLASS_REF, METATYPE_EMBEDDABLE],\n attributes: {\n namespace: ns\n }\n };\n MetadataRegistry.$().add(METATYPE_NAMESPACE, options, false);\n };\n}\n\n"],"sourceRoot":".."}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Property = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const lodash_1 = require("lodash");
|
|
6
|
+
const base_1 = require("@allgemein/base");
|
|
7
|
+
const Constants_1 = require("../lib/Constants");
|
|
8
|
+
const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
|
|
9
|
+
function Property(typeOrOptions = null) {
|
|
10
|
+
return function (source, propertyName) {
|
|
11
|
+
let options = {
|
|
12
|
+
type: undefined
|
|
13
|
+
};
|
|
14
|
+
if (lodash_1.isString(typeOrOptions)) {
|
|
15
|
+
options.type = typeOrOptions;
|
|
16
|
+
}
|
|
17
|
+
else if (lodash_1.isFunction(typeOrOptions)) {
|
|
18
|
+
const name = base_1.ClassUtils.getClassName(typeOrOptions);
|
|
19
|
+
if ([Function.name, '', 'type'].includes(name)) {
|
|
20
|
+
options.type = typeOrOptions();
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
options.type = typeOrOptions;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else if (typeOrOptions && lodash_1.isObjectLike(typeOrOptions)) {
|
|
27
|
+
lodash_1.assign(options, typeOrOptions);
|
|
28
|
+
if (options.type && lodash_1.isFunction(options.type)) {
|
|
29
|
+
const name = base_1.ClassUtils.getClassName(options.type);
|
|
30
|
+
if ([Function.name, '', 'type'].includes(name)) {
|
|
31
|
+
options.type = options.type();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
options.target = source.constructor;
|
|
36
|
+
options.propertyName = propertyName;
|
|
37
|
+
const reflectMetadataType = Reflect && Reflect.getMetadata ? Reflect.getMetadata(Constants_1.REFLECT_DESIGN_TYPE, source, propertyName) : undefined;
|
|
38
|
+
if (reflectMetadataType) {
|
|
39
|
+
const className = base_1.ClassUtils.getClassName(reflectMetadataType);
|
|
40
|
+
if (Constants_1.JS_PRIMATIVE_TYPES.includes(className.toLowerCase())) {
|
|
41
|
+
options.type = options.type ? options.type : className.toLowerCase();
|
|
42
|
+
}
|
|
43
|
+
else if (className === Array.name) {
|
|
44
|
+
options.type = options.type ? options.type : 'object';
|
|
45
|
+
options.cardinality = 0;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
options.type = options.type ? options.type : reflectMetadataType;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (!options.type) {
|
|
52
|
+
options.type = Constants_1.T_STRING;
|
|
53
|
+
}
|
|
54
|
+
MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_PROPERTY, options);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
exports.Property = Property;
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=Property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/Property.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAC1B,mCAAkE;AAClE,0CAA2C;AAE3C,gDAAqH;AACrH,uEAAkE;AAElE,SAAgB,QAAQ,CAAC,gBAAsD,IAAI;IACjF,OAAO,UAAU,MAAW,EAAE,YAAoB;QAEhD,IAAI,OAAO,GAAqB;YAC9B,IAAI,EAAE,SAAS;SAChB,CAAC;QAGF,IAAI,iBAAQ,CAAC,aAAa,CAAC,EAAE;YAC3B,OAAO,CAAC,IAAI,GAAkB,aAAa,CAAC;SAC7C;aAAM,IAAI,mBAAU,CAAC,aAAa,CAAC,EAAE;YACpC,MAAM,IAAI,GAAG,iBAAU,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;YACpD,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBAC9C,OAAO,CAAC,IAAI,GAAG,aAAa,EAAE,CAAC;aAChC;iBAAM;gBACL,OAAO,CAAC,IAAI,GAAG,aAAa,CAAC;aAC9B;SACF;aAAM,IAAI,aAAa,IAAI,qBAAY,CAAC,aAAa,CAAC,EAAE;YACvD,eAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YAC/B,IAAI,OAAO,CAAC,IAAI,IAAI,mBAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;gBAC5C,MAAM,IAAI,GAAG,iBAAU,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACnD,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;oBAC9C,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;iBAC/B;aACF;SACF;QAED,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC;QACpC,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC;QAEpC,MAAM,mBAAmB,GAAG,OAAO,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,+BAAmB,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;QAExI,IAAI,mBAAmB,EAAE;YACvB,MAAM,SAAS,GAAG,iBAAU,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;YAC/D,IAAI,8BAAkB,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAS,CAAC,EAAE;gBAC/D,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;aACtE;iBAAM,IAAI,SAAS,KAAK,KAAK,CAAC,IAAI,EAAE;gBACnC,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;gBACtD,OAAO,CAAC,WAAW,GAAG,CAAC,CAAC;aACzB;iBAAM;gBACL,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC;aAClE;SACF;QAED,IAAG,CAAC,OAAO,CAAC,IAAI,EAAC;YACf,OAAO,CAAC,IAAI,GAAG,oBAAQ,CAAC;SACzB;QAED,mCAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,6BAAiB,EAAE,OAAO,CAAC,CAAC;IAEvD,CAAC,CAAC;AACJ,CAAC;AAnDD,4BAmDC","file":"Property.js","sourcesContent":["import 'reflect-metadata';\nimport {assign, isFunction, isObjectLike, isString} from 'lodash';\nimport {ClassUtils} from '@allgemein/base';\nimport {IPropertyOptions} from '../lib/options/IPropertyOptions';\nimport {JS_DATA_TYPES, JS_PRIMATIVE_TYPES, METATYPE_PROPERTY, REFLECT_DESIGN_TYPE, T_STRING} from '../lib/Constants';\nimport {MetadataRegistry} from '../lib/registry/MetadataRegistry';\n\nexport function Property(typeOrOptions: IPropertyOptions | Function | string = null) {\n return function (source: any, propertyName: string) {\n\n let options: IPropertyOptions = {\n type: undefined\n };\n\n\n if (isString(typeOrOptions)) {\n options.type = <JS_DATA_TYPES>typeOrOptions;\n } else if (isFunction(typeOrOptions)) {\n const name = ClassUtils.getClassName(typeOrOptions);\n if ([Function.name, '', 'type'].includes(name)) {\n options.type = typeOrOptions();\n } else {\n options.type = typeOrOptions;\n }\n } else if (typeOrOptions && isObjectLike(typeOrOptions)) {\n assign(options, typeOrOptions);\n if (options.type && isFunction(options.type)) {\n const name = ClassUtils.getClassName(options.type);\n if ([Function.name, '', 'type'].includes(name)) {\n options.type = options.type();\n }\n }\n }\n\n options.target = source.constructor;\n options.propertyName = propertyName;\n\n const reflectMetadataType = Reflect && Reflect.getMetadata ? Reflect.getMetadata(REFLECT_DESIGN_TYPE, source, propertyName) : undefined;\n\n if (reflectMetadataType) {\n const className = ClassUtils.getClassName(reflectMetadataType);\n if (JS_PRIMATIVE_TYPES.includes(className.toLowerCase() as any)) {\n options.type = options.type ? options.type : className.toLowerCase();\n } else if (className === Array.name) {\n options.type = options.type ? options.type : 'object';\n options.cardinality = 0;\n } else {\n options.type = options.type ? options.type : reflectMetadataType;\n }\n }\n\n if(!options.type){\n options.type = T_STRING;\n }\n\n MetadataRegistry.$().add(METATYPE_PROPERTY, options);\n\n };\n}\n"],"sourceRoot":".."}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PropertyOf = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
|
|
6
|
+
const Constants_1 = require("../lib/Constants");
|
|
7
|
+
function PropertyOf(propertyName, entityOrOptions, options = null) {
|
|
8
|
+
return function (object) {
|
|
9
|
+
if (!options) {
|
|
10
|
+
options = {};
|
|
11
|
+
}
|
|
12
|
+
if (lodash_1.isString(entityOrOptions) || lodash_1.isFunction(entityOrOptions)) {
|
|
13
|
+
options.target = entityOrOptions;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
options = entityOrOptions;
|
|
17
|
+
}
|
|
18
|
+
options.appended = true;
|
|
19
|
+
options.type = object;
|
|
20
|
+
if (propertyName) {
|
|
21
|
+
options.propertyName = propertyName;
|
|
22
|
+
}
|
|
23
|
+
MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_PROPERTY, options);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.PropertyOf = PropertyOf;
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=PropertyOf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/PropertyOf.ts"],"names":[],"mappings":";;;AAAA,mCAA4C;AAG5C,uEAAkE;AAClE,gDAAmD;AAGnD,SAAgB,UAAU,CAAC,YAAoB,EAAE,eAAqD,EAAE,UAA4B,IAAI;IACtI,OAAO,UAAU,MAAW;QAC1B,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QAED,IAAI,iBAAQ,CAAC,eAAe,CAAC,IAAI,mBAAU,CAAC,eAAe,CAAC,EAAE;YAC5D,OAAO,CAAC,MAAM,GAAG,eAAe,CAAC;SAClC;aAAM;YACL,OAAO,GAAqB,eAAe,CAAC;SAC7C;QAED,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC;QACxB,OAAO,CAAC,IAAI,GAAG,MAAM,CAAC;QACtB,IAAI,YAAY,EAAE;YAChB,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC;SACrC;QACD,mCAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,6BAAiB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC,CAAC;AACJ,CAAC;AAnBD,gCAmBC","file":"PropertyOf.js","sourcesContent":["import {isFunction, isString} from 'lodash';\n\nimport {IPropertyOptions} from '../lib/options/IPropertyOptions';\nimport {MetadataRegistry} from '../lib/registry/MetadataRegistry';\nimport {METATYPE_PROPERTY} from '../lib/Constants';\n\n\nexport function PropertyOf(propertyName: string, entityOrOptions: IPropertyOptions | string | Function, options: IPropertyOptions = null) {\n return function (object: any) {\n if (!options) {\n options = {};\n }\n\n if (isString(entityOrOptions) || isFunction(entityOrOptions)) {\n options.target = entityOrOptions;\n } else {\n options = <IPropertyOptions>entityOrOptions;\n }\n\n options.appended = true;\n options.type = object;\n if (propertyName) {\n options.propertyName = propertyName;\n }\n MetadataRegistry.$().add(METATYPE_PROPERTY, options);\n };\n}\n"],"sourceRoot":".."}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Schema = void 0;
|
|
4
|
+
const Constants_1 = require("../lib/Constants");
|
|
5
|
+
const MetadataRegistry_1 = require("../lib/registry/MetadataRegistry");
|
|
6
|
+
function Schema(options) {
|
|
7
|
+
return function (object) {
|
|
8
|
+
options.target = object;
|
|
9
|
+
MetadataRegistry_1.MetadataRegistry.$().add(Constants_1.METATYPE_SCHEMA, options);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
exports.Schema = Schema;
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/Schema.ts"],"names":[],"mappings":";;;AACA,gDAAiD;AACjD,uEAAkE;AAGlE,SAAgB,MAAM,CAAC,OAAuB;IAC5C,OAAO,UAAU,MAAgB;QAC/B,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;QACxB,mCAAgB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,2BAAe,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC,CAAC;AACJ,CAAC;AALD,wBAKC","file":"Schema.js","sourcesContent":["import {ISchemaOptions} from '../lib/options/ISchemaOptions';\nimport {METATYPE_SCHEMA} from '../lib/Constants';\nimport {MetadataRegistry} from '../lib/registry/MetadataRegistry';\n\n\nexport function Schema(options: ISchemaOptions) {\n return function (object: Function) {\n options.target = object;\n MetadataRegistry.$().add(METATYPE_SCHEMA, options);\n };\n}\n\n"],"sourceRoot":".."}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IValidateOptions } from '../../lib/validation/IValidateOptions';
|
|
2
|
+
export interface IHostnameOptions extends IValidateOptions {
|
|
3
|
+
}
|
|
4
|
+
export declare function Hostname(options?: IHostnameOptions): (source: any, propertyName: string) => void;
|
|
5
|
+
export declare const HOSTNAME_RFC952_REGEX: RegExp;
|
|
6
|
+
export declare const HOSTNAME_RFC1034_REGEX: RegExp;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HOSTNAME_RFC1034_REGEX = exports.HOSTNAME_RFC952_REGEX = exports.Hostname = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
|
|
6
|
+
const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
|
|
7
|
+
function Hostname(options) {
|
|
8
|
+
return function (source, propertyName) {
|
|
9
|
+
const opts = {
|
|
10
|
+
format: 'hostname',
|
|
11
|
+
};
|
|
12
|
+
if (options) {
|
|
13
|
+
lodash_1.assign(opts, { validateOptions: { hostname: {} } });
|
|
14
|
+
lodash_1.assign(opts.validateOptions.hostname, options);
|
|
15
|
+
}
|
|
16
|
+
AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.Hostname = Hostname;
|
|
20
|
+
exports.HOSTNAME_RFC952_REGEX = /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$/;
|
|
21
|
+
exports.HOSTNAME_RFC1034_REGEX = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/;
|
|
22
|
+
DefaultValidator_1.DefaultValidator.define({
|
|
23
|
+
name: 'hostname',
|
|
24
|
+
fn: (value, options, instance) => {
|
|
25
|
+
if (lodash_1.isUndefined(value) || lodash_1.isNull(value) || !lodash_1.isString(value)) {
|
|
26
|
+
// if (!get(options, 'required', false)) {
|
|
27
|
+
// return true;
|
|
28
|
+
// }
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
return exports.HOSTNAME_RFC952_REGEX.test(value);
|
|
32
|
+
},
|
|
33
|
+
defaultOptions: {
|
|
34
|
+
message: 'Value of property "%propertyName" must be a valid hostname.'
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=Hostname.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/validate/Hostname.ts"],"names":[],"mappings":";;;AAAA,mCAAkE;AAElE,mEAA8D;AAC9D,4EAAuE;AAOvE,SAAgB,QAAQ,CAAC,OAA0B;IACjD,OAAO,UAAU,MAAW,EAAE,YAAoB;QAChD,MAAM,IAAI,GAAQ;YAChB,MAAM,EAAE,UAAU;SAEnB,CAAC;QAEF,IAAI,OAAO,EAAE;YACX,eAAM,CAAC,IAAI,EAAE,EAAC,eAAe,EAAE,EAAC,QAAQ,EAAE,EAAE,EAAC,EAAC,CAAC,CAAC;YAChD,eAAM,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SAChD;QAED,qCAAiB,CAAC,aAAa,CAC7B,MAAM,CAAC,WAAW,EAClB,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAnBD,4BAmBC;AAEY,QAAA,qBAAqB,GAAG,iGAAiG,CAAC;AAC1H,QAAA,sBAAsB,GAAG,6GAA6G,CAAC;AAEpJ,mCAAgB,CAAC,MAAM,CAAC;IACpB,IAAI,EAAE,UAAU;IAChB,EAAE,EAAE,CAAC,KAAa,EAAE,OAA0B,EAAE,QAAc,EAAE,EAAE;QAChE,IAAI,oBAAW,CAAC,KAAK,CAAC,IAAI,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAQ,CAAC,KAAK,CAAC,EAAE;YAC3D,0CAA0C;YAC1C,iBAAiB;YACjB,IAAI;YACJ,OAAO,KAAK,CAAC;SACd;QACD,OAAO,6BAAqB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,cAAc,EAAE;QACd,OAAO,EAAE,6DAA6D;KACvE;CACF,CACF,CAAC","file":"Hostname.js","sourcesContent":["import {assign, get, isNull, isUndefined, isString} from 'lodash';\n\nimport {AnnotationsHelper} from '../../lib/AnnotationsHelper';\nimport {DefaultValidator} from '../../lib/validation/DefaultValidator';\nimport {IValidateOptions} from '../../lib/validation/IValidateOptions';\n\nexport interface IHostnameOptions extends IValidateOptions {\n // required?: boolean;\n}\n\nexport function Hostname(options?: IHostnameOptions) {\n return function (source: any, propertyName: string) {\n const opts: any = {\n format: 'hostname',\n\n };\n\n if (options) {\n assign(opts, {validateOptions: {hostname: {}}});\n assign(opts.validateOptions.hostname, options);\n }\n\n AnnotationsHelper.forPropertyOn(\n source.constructor,\n propertyName,\n opts,\n 'merge'\n );\n };\n}\n\nexport const HOSTNAME_RFC952_REGEX = /^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$/;\nexport const HOSTNAME_RFC1034_REGEX = /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$/;\n\nDefaultValidator.define({\n name: 'hostname',\n fn: (value: string, options?: IHostnameOptions, instance?: any) => {\n if (isUndefined(value) || isNull(value) || !isString(value)) {\n // if (!get(options, 'required', false)) {\n // return true;\n // }\n return false;\n }\n return HOSTNAME_RFC952_REGEX.test(value);\n },\n defaultOptions: {\n message: 'Value of property \"%propertyName\" must be a valid hostname.'\n }\n }\n);\n"],"sourceRoot":"../.."}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IValidateOptions } from '../../lib/validation/IValidateOptions';
|
|
2
|
+
export interface IIp4Options extends IValidateOptions {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function Ip4(options?: IIp4Options): (source: any, propertyName: string) => void;
|
|
6
|
+
export declare const IP4_REGEX: RegExp;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IP4_REGEX = exports.Ip4 = void 0;
|
|
4
|
+
const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
|
|
5
|
+
const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
function Ip4(options) {
|
|
8
|
+
return function (source, propertyName) {
|
|
9
|
+
const opts = {
|
|
10
|
+
format: 'ip4'
|
|
11
|
+
};
|
|
12
|
+
if (options) {
|
|
13
|
+
lodash_1.assign(opts, { validateOptions: { ip4: {} } });
|
|
14
|
+
lodash_1.assign(opts.validateOptions.ip4, options);
|
|
15
|
+
}
|
|
16
|
+
AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.Ip4 = Ip4;
|
|
20
|
+
exports.IP4_REGEX = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;
|
|
21
|
+
DefaultValidator_1.DefaultValidator.define({
|
|
22
|
+
name: 'ip4',
|
|
23
|
+
fn: (value, options, instance) => {
|
|
24
|
+
if (lodash_1.isUndefined(value) || lodash_1.isNull(value) || !lodash_1.isString(value)) {
|
|
25
|
+
// if (!get(options, 'required', false)) {
|
|
26
|
+
// return true;
|
|
27
|
+
// }
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return exports.IP4_REGEX.test(value);
|
|
31
|
+
},
|
|
32
|
+
defaultOptions: {
|
|
33
|
+
message: 'Value of property "%propertyName" must be a valid ip4 address.'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=Ip4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/validate/Ip4.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,4EAAuE;AAEvE,mCAA6D;AAO7D,SAAgB,GAAG,CAAC,OAAqB;IACvC,OAAO,UAAU,MAAW,EAAE,YAAoB;QAChD,MAAM,IAAI,GAAQ;YAChB,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,OAAO,EAAE;YACX,eAAM,CAAC,IAAI,EAAE,EAAC,eAAe,EAAE,EAAC,GAAG,EAAE,EAAE,EAAC,EAAC,CAAC,CAAC;YAC3C,eAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;SAC3C;QAED,qCAAiB,CAAC,aAAa,CAC7B,MAAM,CAAC,WAAW,EAClB,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAjBD,kBAiBC;AAEY,QAAA,SAAS,GAAG,2GAA2G,CAAC;AAGrI,mCAAgB,CAAC,MAAM,CAAC;IACpB,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,CAAC,KAAa,EAAE,OAAqB,EAAE,QAAc,EAAE,EAAE;QAC3D,IAAI,oBAAW,CAAC,KAAK,CAAC,IAAI,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAQ,CAAC,KAAK,CAAC,EAAE;YAC3D,0CAA0C;YAC1C,iBAAiB;YACjB,IAAI;YACJ,OAAO,KAAK,CAAC;SACd;QACD,OAAO,iBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,cAAc,EAAE;QACd,OAAO,EAAE,gEAAgE;KAC1E;CACF,CACF,CAAC","file":"Ip4.js","sourcesContent":["import {AnnotationsHelper} from '../../lib/AnnotationsHelper';\nimport {DefaultValidator} from '../../lib/validation/DefaultValidator';\nimport {IValidateOptions} from '../../lib/validation/IValidateOptions';\nimport {assign, isNull, isString, isUndefined} from 'lodash';\n\n\nexport interface IIp4Options extends IValidateOptions {\n required?: boolean;\n}\n\nexport function Ip4(options?: IIp4Options) {\n return function (source: any, propertyName: string) {\n const opts: any = {\n format: 'ip4'\n };\n if (options) {\n assign(opts, {validateOptions: {ip4: {}}});\n assign(opts.validateOptions.ip4, options);\n }\n\n AnnotationsHelper.forPropertyOn(\n source.constructor,\n propertyName,\n opts,\n 'merge'\n );\n };\n}\n\nexport const IP4_REGEX = /^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/;\n\n\nDefaultValidator.define({\n name: 'ip4',\n fn: (value: string, options?: IIp4Options, instance?: any) => {\n if (isUndefined(value) || isNull(value) || !isString(value)) {\n // if (!get(options, 'required', false)) {\n // return true;\n // }\n return false;\n }\n return IP4_REGEX.test(value);\n },\n defaultOptions: {\n message: 'Value of property \"%propertyName\" must be a valid ip4 address.'\n }\n }\n);\n"],"sourceRoot":"../.."}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IValidateOptions } from '../../lib/validation/IValidateOptions';
|
|
2
|
+
export interface IIp6Options extends IValidateOptions {
|
|
3
|
+
}
|
|
4
|
+
export declare function Ip6(options?: IIp6Options): (source: any, propertyName: string) => void;
|
|
5
|
+
export declare const IP6_REGEX: RegExp;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IP6_REGEX = exports.Ip6 = void 0;
|
|
4
|
+
const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
|
|
5
|
+
const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
function Ip6(options) {
|
|
8
|
+
return function (source, propertyName) {
|
|
9
|
+
const opts = {
|
|
10
|
+
format: 'ip6'
|
|
11
|
+
};
|
|
12
|
+
if (options) {
|
|
13
|
+
lodash_1.assign(opts, { validateOptions: { ip4: {} } });
|
|
14
|
+
lodash_1.assign(opts.validateOptions.ip4, options);
|
|
15
|
+
}
|
|
16
|
+
AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.Ip6 = Ip6;
|
|
20
|
+
exports.IP6_REGEX = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
|
21
|
+
DefaultValidator_1.DefaultValidator.define({
|
|
22
|
+
name: 'ip6',
|
|
23
|
+
fn: (value, options, instance) => {
|
|
24
|
+
if (lodash_1.isUndefined(value) || lodash_1.isNull(value) || !lodash_1.isString(value)) {
|
|
25
|
+
// if (!get(options, 'required', false)) {
|
|
26
|
+
// return true;
|
|
27
|
+
// }
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return exports.IP6_REGEX.test(value);
|
|
31
|
+
},
|
|
32
|
+
defaultOptions: {
|
|
33
|
+
message: 'Value of property "%propertyName" must be a valid ip6 address.'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=Ip6.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/validate/Ip6.ts"],"names":[],"mappings":";;;AAAA,mEAA8D;AAC9D,4EAAuE;AAEvE,mCAA6D;AAO7D,SAAgB,GAAG,CAAC,OAAqB;IACvC,OAAO,UAAU,MAAW,EAAE,YAAoB;QAChD,MAAM,IAAI,GAAQ;YAChB,MAAM,EAAE,KAAK;SACd,CAAC;QACF,IAAI,OAAO,EAAE;YACX,eAAM,CAAC,IAAI,EAAE,EAAC,eAAe,EAAE,EAAC,GAAG,EAAE,EAAE,EAAC,EAAC,CAAC,CAAC;YAC3C,eAAM,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;SAC3C;QAED,qCAAiB,CAAC,aAAa,CAC7B,MAAM,CAAC,WAAW,EAClB,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAjBD,kBAiBC;AAEY,QAAA,SAAS,GAAG,upBAAupB,CAAC;AAGjrB,mCAAgB,CAAC,MAAM,CAAC;IACpB,IAAI,EAAE,KAAK;IACX,EAAE,EAAE,CAAC,KAAa,EAAE,OAAqB,EAAE,QAAc,EAAE,EAAE;QAC3D,IAAI,oBAAW,CAAC,KAAK,CAAC,IAAI,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAQ,CAAC,KAAK,CAAC,EAAE;YAC3D,0CAA0C;YAC1C,iBAAiB;YACjB,IAAI;YACJ,OAAO,KAAK,CAAC;SACd;QACD,OAAO,iBAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IACD,cAAc,EAAE;QACd,OAAO,EAAE,gEAAgE;KAC1E;CACF,CACF,CAAC","file":"Ip6.js","sourcesContent":["import {AnnotationsHelper} from '../../lib/AnnotationsHelper';\nimport {DefaultValidator} from '../../lib/validation/DefaultValidator';\nimport {IValidateOptions} from '../../lib/validation/IValidateOptions';\nimport {assign, isNull, isString, isUndefined} from 'lodash';\n\n\nexport interface IIp6Options extends IValidateOptions {\n // required?: boolean;\n}\n\nexport function Ip6(options?: IIp6Options) {\n return function (source: any, propertyName: string) {\n const opts: any = {\n format: 'ip6'\n };\n if (options) {\n assign(opts, {validateOptions: {ip4: {}}});\n assign(opts.validateOptions.ip4, options);\n }\n\n AnnotationsHelper.forPropertyOn(\n source.constructor,\n propertyName,\n opts,\n 'merge'\n );\n };\n}\n\nexport const IP6_REGEX = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;\n\n\nDefaultValidator.define({\n name: 'ip6',\n fn: (value: string, options?: IIp6Options, instance?: any) => {\n if (isUndefined(value) || isNull(value) || !isString(value)) {\n // if (!get(options, 'required', false)) {\n // return true;\n // }\n return false;\n }\n return IP6_REGEX.test(value);\n },\n defaultOptions: {\n message: 'Value of property \"%propertyName\" must be a valid ip6 address.'\n }\n }\n);\n"],"sourceRoot":"../.."}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IValidateOptions } from '../../lib/validation/IValidateOptions';
|
|
2
|
+
export interface IIsEmailOptions extends IValidateOptions {
|
|
3
|
+
}
|
|
4
|
+
export declare function IsEmail(options?: IIsEmailOptions): (source: any, propertyName: string) => void;
|
|
5
|
+
export declare const MAIL_REGEX: RegExp;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAIL_REGEX = exports.IsEmail = void 0;
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
|
+
const AnnotationsHelper_1 = require("../../lib/AnnotationsHelper");
|
|
6
|
+
const DefaultValidator_1 = require("../../lib/validation/DefaultValidator");
|
|
7
|
+
function IsEmail(options = null) {
|
|
8
|
+
return function (source, propertyName) {
|
|
9
|
+
const opts = {
|
|
10
|
+
format: 'email'
|
|
11
|
+
};
|
|
12
|
+
if (options) {
|
|
13
|
+
lodash_1.assign(opts, { validateOptions: { email: {} } });
|
|
14
|
+
opts.validateOptions = { email: options };
|
|
15
|
+
}
|
|
16
|
+
AnnotationsHelper_1.AnnotationsHelper.forPropertyOn(source.constructor, propertyName, opts, 'merge');
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
exports.IsEmail = IsEmail;
|
|
20
|
+
exports.MAIL_REGEX = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/;
|
|
21
|
+
DefaultValidator_1.DefaultValidator.define({
|
|
22
|
+
name: 'email',
|
|
23
|
+
fn: (value, options, instance) => {
|
|
24
|
+
if (lodash_1.isUndefined(value) || lodash_1.isNull(value) || !lodash_1.isString(value)) {
|
|
25
|
+
// if (!get(options, 'required', false)) {
|
|
26
|
+
// return true;
|
|
27
|
+
// }
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
return exports.MAIL_REGEX.test(value);
|
|
31
|
+
},
|
|
32
|
+
defaultOptions: {
|
|
33
|
+
message: 'Value of property "%propertyName" must be a valid email.'
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=IsEmail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/decorators/validate/IsEmail.ts"],"names":[],"mappings":";;;AAAA,mCAA6D;AAE7D,mEAA8D;AAC9D,4EAAuE;AAOvE,SAAgB,OAAO,CAAC,UAA2B,IAAI;IACrD,OAAO,UAAU,MAAW,EAAE,YAAoB;QAChD,MAAM,IAAI,GAAQ;YAChB,MAAM,EAAE,OAAO;SAChB,CAAC;QACF,IAAI,OAAO,EAAE;YACX,eAAM,CAAC,IAAI,EAAE,EAAC,eAAe,EAAE,EAAC,KAAK,EAAE,EAAE,EAAC,EAAC,CAAC,CAAC;YAC7C,IAAI,CAAC,eAAe,GAAG,EAAC,KAAK,EAAE,OAAO,EAAC,CAAC;SACzC;QACD,qCAAiB,CAAC,aAAa,CAC7B,MAAM,CAAC,WAAW,EAClB,YAAY,EACZ,IAAI,EACJ,OAAO,CACR,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC;AAhBD,0BAgBC;AAEY,QAAA,UAAU,GAAG,4aAA4a,CAAC;AAGvc,mCAAgB,CAAC,MAAM,CAAC;IACpB,IAAI,EAAE,OAAO;IACb,EAAE,EAAE,CAAC,KAAa,EAAE,OAAwB,EAAE,QAAc,EAAE,EAAE;QAC9D,IAAI,oBAAW,CAAC,KAAK,CAAC,IAAI,eAAM,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAQ,CAAC,KAAK,CAAC,EAAE;YAC3D,0CAA0C;YAC1C,iBAAiB;YACjB,IAAI;YACJ,OAAO,KAAK,CAAC;SACd;QACD,OAAO,kBAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IACD,cAAc,EAAE;QACd,OAAO,EAAE,0DAA0D;KACpE;CACF,CACF,CAAC","file":"IsEmail.js","sourcesContent":["import {assign, isNull, isString, isUndefined} from 'lodash';\n\nimport {AnnotationsHelper} from '../../lib/AnnotationsHelper';\nimport {DefaultValidator} from '../../lib/validation/DefaultValidator';\nimport {IValidateOptions} from '../../lib/validation/IValidateOptions';\n\nexport interface IIsEmailOptions extends IValidateOptions {\n // required?: boolean;\n}\n\nexport function IsEmail(options: IIsEmailOptions = null) {\n return function (source: any, propertyName: string) {\n const opts: any = {\n format: 'email'\n };\n if (options) {\n assign(opts, {validateOptions: {email: {}}});\n opts.validateOptions = {email: options};\n }\n AnnotationsHelper.forPropertyOn(\n source.constructor,\n propertyName,\n opts,\n 'merge'\n );\n };\n}\n\nexport const MAIL_REGEX = /(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])/;\n\n\nDefaultValidator.define({\n name: 'email',\n fn: (value: string, options: IIsEmailOptions, instance?: any) => {\n if (isUndefined(value) || isNull(value) || !isString(value)) {\n // if (!get(options, 'required', false)) {\n // return true;\n // }\n return false;\n }\n return MAIL_REGEX.test(value);\n },\n defaultOptions: {\n message: 'Value of property \"%propertyName\" must be a valid email.'\n }\n }\n);\n"],"sourceRoot":"../.."}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IValidateOptions } from '../../lib/validation/IValidateOptions';
|
|
2
|
+
export interface IIsNotEmptyOptions extends IValidateOptions {
|
|
3
|
+
message?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function IsNotEmpty(options?: IIsNotEmptyOptions): (source: any, propertyName: string) => void;
|