@archbase/core 3.0.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.
Files changed (248) hide show
  1. package/README.md +42 -0
  2. package/dist/archbase-core-3.0.0.tgz +0 -0
  3. package/dist/context/ArchbaseAppContext.d.ts +43 -0
  4. package/dist/context/ArchbaseGlobalProvider.d.ts +33 -0
  5. package/dist/context/ArchbaseSimpleAppContext.d.ts +34 -0
  6. package/dist/context/index.d.ts +5 -0
  7. package/dist/error/ArchbaseError.d.ts +14 -0
  8. package/dist/error/index.d.ts +11 -0
  9. package/dist/errorboundary/ArchbaseErrorBoundary.d.ts +21 -0
  10. package/dist/errorboundary/ArchbaseErrorBoundaryContext.d.ts +6 -0
  11. package/dist/errorboundary/ArchbaseErrorFallback.d.ts +7 -0
  12. package/dist/errorboundary/assertArchbaseErrorBoundaryContext.d.ts +2 -0
  13. package/dist/errorboundary/index.d.ts +6 -0
  14. package/dist/errorboundary/types.d.ts +39 -0
  15. package/dist/errorboundary/useArchbaseErrorBoundary.d.ts +5 -0
  16. package/dist/errorboundary/withArchbaseErrorBoundary.d.ts +3 -0
  17. package/dist/exceptions/ApiError.d.ts +27 -0
  18. package/dist/exceptions/ArchbaseErrorHelper.d.ts +2 -0
  19. package/dist/exceptions/ArchbaseException.d.ts +9 -0
  20. package/dist/exceptions/index.d.ts +3 -0
  21. package/dist/fallback/ArchbaseSafeMigrationWrapper.d.ts +57 -0
  22. package/dist/helper/ArchbaseClickOutside.d.ts +9 -0
  23. package/dist/helper/ArchbaseObjectHelper.d.ts +9 -0
  24. package/dist/helper/index.d.ts +2 -0
  25. package/dist/hooks/ArchbaseDepencyManager.d.ts +70 -0
  26. package/dist/hooks/index.d.ts +15 -0
  27. package/dist/hooks/lifecycle/index.d.ts +54 -0
  28. package/dist/hooks/useArchbaseAsyncFunction.d.ts +1 -0
  29. package/dist/hooks/useArchbaseBool.d.ts +6 -0
  30. package/dist/hooks/useArchbaseForceRenderer.d.ts +1 -0
  31. package/dist/hooks/useArchbaseLatest.d.ts +3 -0
  32. package/dist/hooks/useArchbasePassiveLayoutEffect.d.ts +3 -0
  33. package/dist/hooks/useArchbasePasswordRemember.d.ts +11 -0
  34. package/dist/hooks/useArchbaseReducer.d.ts +21 -0
  35. package/dist/hooks/useArchbaseResizeObserver.d.ts +11 -0
  36. package/dist/hooks/useArchbaseSize.d.ts +12 -0
  37. package/dist/hooks/useArchbaseStateWithCallback.d.ts +2 -0
  38. package/dist/hooks/useArchbaseTextSelection.d.ts +14 -0
  39. package/dist/hooks/useArchbaseTheme.d.ts +6 -0
  40. package/dist/hooks/useArchbaseValidator.d.ts +2 -0
  41. package/dist/index.css +108 -0
  42. package/dist/index.d.ts +25 -0
  43. package/dist/index.js +9728 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/ioc/ArchbaseIOCHelper.d.ts +56 -0
  46. package/dist/ioc/ArchbaseIOCTypes.d.ts +11 -0
  47. package/dist/ioc/index.d.ts +2 -0
  48. package/dist/json/ArchbaseJacksonParser.d.ts +15 -0
  49. package/dist/json/index.d.ts +1 -0
  50. package/dist/locales/config.d.ts +1781 -0
  51. package/dist/locales/index.d.ts +1 -0
  52. package/dist/rsql/ast/ComparisonOperator.d.ts +24 -0
  53. package/dist/rsql/ast/LogicOperator.d.ts +13 -0
  54. package/dist/rsql/ast/Node.d.ts +41 -0
  55. package/dist/rsql/ast/ReservedChars.d.ts +4 -0
  56. package/dist/rsql/ast/index.d.ts +4 -0
  57. package/dist/rsql/builder/index.d.ts +20 -0
  58. package/dist/rsql/emitter/index.d.ts +19 -0
  59. package/dist/rsql/index.d.ts +7 -0
  60. package/dist/rsql/parser/Error.d.ts +7 -0
  61. package/dist/rsql/parser/ParserContext.d.ts +15 -0
  62. package/dist/rsql/parser/ParserOperation.d.ts +43 -0
  63. package/dist/rsql/parser/ParserProduction.d.ts +14 -0
  64. package/dist/rsql/parser/index.d.ts +3 -0
  65. package/dist/rsql/parser/lexer/LexerContext.d.ts +8 -0
  66. package/dist/rsql/parser/lexer/LexerProcessor.d.ts +8 -0
  67. package/dist/rsql/parser/lexer/Token.d.ts +38 -0
  68. package/dist/rsql/parser/lexer/lex.d.ts +3 -0
  69. package/dist/rsql/parser/lexer/processors/scanNonReservedSymbol.d.ts +3 -0
  70. package/dist/rsql/parser/lexer/processors/scanSymbol.d.ts +3 -0
  71. package/dist/rsql/parser/lexer/processors/seekAnyToken.d.ts +4 -0
  72. package/dist/rsql/parser/lexer/processors/seekComparisonCustomOperatorToken.d.ts +4 -0
  73. package/dist/rsql/parser/lexer/processors/seekComparisonOperatorToken.d.ts +4 -0
  74. package/dist/rsql/parser/lexer/processors/seekLogicCanonicalOperatorToken.d.ts +4 -0
  75. package/dist/rsql/parser/lexer/processors/seekLogicVerboseOperatorToken.d.ts +4 -0
  76. package/dist/rsql/parser/lexer/processors/seekParenthesisToken.d.ts +4 -0
  77. package/dist/rsql/parser/lexer/processors/seekQuotedToken.d.ts +4 -0
  78. package/dist/rsql/parser/lexer/processors/seekUnquotedToken.d.ts +4 -0
  79. package/dist/rsql/parser/lexer/processors/skipWhitespace.d.ts +3 -0
  80. package/dist/types/OptionsResult.d.ts +8 -0
  81. package/dist/types/filter.d.ts +56 -0
  82. package/dist/types/index.d.ts +5 -0
  83. package/dist/types/querybuilder.d.ts +85 -0
  84. package/dist/types/token.d.ts +50 -0
  85. package/dist/types/types.d.ts +5 -0
  86. package/dist/utils/archbaseLogo.d.ts +3 -0
  87. package/dist/utils/array.d.ts +1 -0
  88. package/dist/utils/convertImageToBase64.d.ts +1 -0
  89. package/dist/utils/deepFilter.d.ts +2 -0
  90. package/dist/utils/deepFind.d.ts +2 -0
  91. package/dist/utils/deepForEach.d.ts +2 -0
  92. package/dist/utils/deepMap.d.ts +2 -0
  93. package/dist/utils/dom.d.ts +2 -0
  94. package/dist/utils/enum-utils.d.ts +1 -0
  95. package/dist/utils/filter.d.ts +2 -0
  96. package/dist/utils/getElementName.d.ts +2 -0
  97. package/dist/utils/groupByType.d.ts +2 -0
  98. package/dist/utils/hasChildren.d.ts +4 -0
  99. package/dist/utils/hasComplexChildren.d.ts +4 -0
  100. package/dist/utils/index.d.ts +24 -0
  101. package/dist/utils/isBase64.d.ts +1 -0
  102. package/dist/utils/isEmail.d.ts +1 -0
  103. package/dist/utils/masker.d.ts +27 -0
  104. package/dist/utils/nestedObject.d.ts +7 -0
  105. package/dist/utils/object.d.ts +10 -0
  106. package/dist/utils/objectPrototype.d.ts +2 -0
  107. package/dist/utils/onlyText.d.ts +3 -0
  108. package/dist/utils/onlyValid.d.ts +2 -0
  109. package/dist/utils/propertyUtils.d.ts +1 -0
  110. package/dist/utils/string-utils.d.ts +138 -0
  111. package/dist/utils/string.d.ts +11 -0
  112. package/dist/validation/ValidationErrorsContext.d.ts +25 -0
  113. package/dist/validator/ArchbaseValidator.d.ts +21 -0
  114. package/dist/validator/container.d.ts +25 -0
  115. package/dist/validator/decorator/ValidationOptions.d.ts +25 -0
  116. package/dist/validator/decorator/array/ArrayContains.d.ts +12 -0
  117. package/dist/validator/decorator/array/ArrayMaxSize.d.ts +12 -0
  118. package/dist/validator/decorator/array/ArrayMinSize.d.ts +12 -0
  119. package/dist/validator/decorator/array/ArrayNotContains.d.ts +12 -0
  120. package/dist/validator/decorator/array/ArrayNotEmpty.d.ts +12 -0
  121. package/dist/validator/decorator/array/ArrayUnique.d.ts +13 -0
  122. package/dist/validator/decorator/common/Allow.d.ts +5 -0
  123. package/dist/validator/decorator/common/Equals.d.ts +10 -0
  124. package/dist/validator/decorator/common/IsDefined.d.ts +10 -0
  125. package/dist/validator/decorator/common/IsEmpty.d.ts +10 -0
  126. package/dist/validator/decorator/common/IsIn.d.ts +10 -0
  127. package/dist/validator/decorator/common/IsLatLong.d.ts +10 -0
  128. package/dist/validator/decorator/common/IsLatitude.d.ts +10 -0
  129. package/dist/validator/decorator/common/IsLongitude.d.ts +10 -0
  130. package/dist/validator/decorator/common/IsNotEmpty.d.ts +10 -0
  131. package/dist/validator/decorator/common/IsNotIn.d.ts +10 -0
  132. package/dist/validator/decorator/common/IsOptional.d.ts +5 -0
  133. package/dist/validator/decorator/common/NotEquals.d.ts +10 -0
  134. package/dist/validator/decorator/common/Validate.d.ts +14 -0
  135. package/dist/validator/decorator/common/ValidateBy.d.ts +11 -0
  136. package/dist/validator/decorator/common/ValidateIf.d.ts +5 -0
  137. package/dist/validator/decorator/common/ValidateNested.d.ts +5 -0
  138. package/dist/validator/decorator/common/ValidatePromise.d.ts +5 -0
  139. package/dist/validator/decorator/date/MaxDate.d.ts +10 -0
  140. package/dist/validator/decorator/date/MinDate.d.ts +10 -0
  141. package/dist/validator/decorator/decorators.d.ts +111 -0
  142. package/dist/validator/decorator/number/IsDivisibleBy.d.ts +10 -0
  143. package/dist/validator/decorator/number/IsNegative.d.ts +10 -0
  144. package/dist/validator/decorator/number/IsPositive.d.ts +10 -0
  145. package/dist/validator/decorator/number/Max.d.ts +10 -0
  146. package/dist/validator/decorator/number/Min.d.ts +10 -0
  147. package/dist/validator/decorator/object/IsInstance.d.ts +10 -0
  148. package/dist/validator/decorator/object/IsNotEmptyObject.d.ts +16 -0
  149. package/dist/validator/decorator/string/Contains.d.ts +12 -0
  150. package/dist/validator/decorator/string/IsAlpha.d.ts +12 -0
  151. package/dist/validator/decorator/string/IsAlphanumeric.d.ts +12 -0
  152. package/dist/validator/decorator/string/IsAscii.d.ts +12 -0
  153. package/dist/validator/decorator/string/IsBIC.d.ts +12 -0
  154. package/dist/validator/decorator/string/IsBase32.d.ts +12 -0
  155. package/dist/validator/decorator/string/IsBase58.d.ts +12 -0
  156. package/dist/validator/decorator/string/IsBase64.d.ts +12 -0
  157. package/dist/validator/decorator/string/IsBooleanString.d.ts +12 -0
  158. package/dist/validator/decorator/string/IsBtcAddress.d.ts +12 -0
  159. package/dist/validator/decorator/string/IsByteLength.d.ts +12 -0
  160. package/dist/validator/decorator/string/IsCreditCard.d.ts +12 -0
  161. package/dist/validator/decorator/string/IsCurrency.d.ts +12 -0
  162. package/dist/validator/decorator/string/IsDataURI.d.ts +12 -0
  163. package/dist/validator/decorator/string/IsDateString.d.ts +10 -0
  164. package/dist/validator/decorator/string/IsDecimal.d.ts +12 -0
  165. package/dist/validator/decorator/string/IsEAN.d.ts +12 -0
  166. package/dist/validator/decorator/string/IsEmail.d.ts +12 -0
  167. package/dist/validator/decorator/string/IsEthereumAddress.d.ts +12 -0
  168. package/dist/validator/decorator/string/IsFQDN.d.ts +12 -0
  169. package/dist/validator/decorator/string/IsFirebasePushId.d.ts +12 -0
  170. package/dist/validator/decorator/string/IsFullWidth.d.ts +12 -0
  171. package/dist/validator/decorator/string/IsHSL.d.ts +14 -0
  172. package/dist/validator/decorator/string/IsHalfWidth.d.ts +12 -0
  173. package/dist/validator/decorator/string/IsHash.d.ts +14 -0
  174. package/dist/validator/decorator/string/IsHexColor.d.ts +12 -0
  175. package/dist/validator/decorator/string/IsHexadecimal.d.ts +12 -0
  176. package/dist/validator/decorator/string/IsIBAN.d.ts +12 -0
  177. package/dist/validator/decorator/string/IsIP.d.ts +13 -0
  178. package/dist/validator/decorator/string/IsISBN.d.ts +13 -0
  179. package/dist/validator/decorator/string/IsISIN.d.ts +12 -0
  180. package/dist/validator/decorator/string/IsISO31661Alpha2.d.ts +10 -0
  181. package/dist/validator/decorator/string/IsISO31661Alpha3.d.ts +10 -0
  182. package/dist/validator/decorator/string/IsISO8601.d.ts +14 -0
  183. package/dist/validator/decorator/string/IsISRC.d.ts +12 -0
  184. package/dist/validator/decorator/string/IsISSN.d.ts +12 -0
  185. package/dist/validator/decorator/string/IsIdentityCard.d.ts +16 -0
  186. package/dist/validator/decorator/string/IsJSON.d.ts +12 -0
  187. package/dist/validator/decorator/string/IsJWT.d.ts +12 -0
  188. package/dist/validator/decorator/string/IsLocale.d.ts +12 -0
  189. package/dist/validator/decorator/string/IsLowercase.d.ts +12 -0
  190. package/dist/validator/decorator/string/IsMacAddress.d.ts +13 -0
  191. package/dist/validator/decorator/string/IsMagnetURI.d.ts +12 -0
  192. package/dist/validator/decorator/string/IsMilitaryTime.d.ts +12 -0
  193. package/dist/validator/decorator/string/IsMimeType.d.ts +12 -0
  194. package/dist/validator/decorator/string/IsMobilePhone.d.ts +28 -0
  195. package/dist/validator/decorator/string/IsMongoId.d.ts +12 -0
  196. package/dist/validator/decorator/string/IsMultibyte.d.ts +12 -0
  197. package/dist/validator/decorator/string/IsNumberString.d.ts +12 -0
  198. package/dist/validator/decorator/string/IsOctal.d.ts +12 -0
  199. package/dist/validator/decorator/string/IsPassportNumber.d.ts +12 -0
  200. package/dist/validator/decorator/string/IsPhoneNumber.d.ts +19 -0
  201. package/dist/validator/decorator/string/IsPort.d.ts +10 -0
  202. package/dist/validator/decorator/string/IsPostalCode.d.ts +12 -0
  203. package/dist/validator/decorator/string/IsRFC3339.d.ts +12 -0
  204. package/dist/validator/decorator/string/IsRgbColor.d.ts +14 -0
  205. package/dist/validator/decorator/string/IsSemVer.d.ts +12 -0
  206. package/dist/validator/decorator/string/IsStrongPassword.d.ts +16 -0
  207. package/dist/validator/decorator/string/IsSurrogatePair.d.ts +12 -0
  208. package/dist/validator/decorator/string/IsTimeZone.d.ts +12 -0
  209. package/dist/validator/decorator/string/IsUUID.d.ts +12 -0
  210. package/dist/validator/decorator/string/IsUppercase.d.ts +12 -0
  211. package/dist/validator/decorator/string/IsUrl.d.ts +12 -0
  212. package/dist/validator/decorator/string/IsVariableWidth.d.ts +12 -0
  213. package/dist/validator/decorator/string/Length.d.ts +12 -0
  214. package/dist/validator/decorator/string/Matches.d.ts +14 -0
  215. package/dist/validator/decorator/string/MaxLength.d.ts +12 -0
  216. package/dist/validator/decorator/string/MinLength.d.ts +12 -0
  217. package/dist/validator/decorator/string/NotContains.d.ts +12 -0
  218. package/dist/validator/decorator/string/is-iso4217-currency-code.d.ts +10 -0
  219. package/dist/validator/decorator/string/is-tax-id.d.ts +20 -0
  220. package/dist/validator/decorator/typechecker/IsArray.d.ts +10 -0
  221. package/dist/validator/decorator/typechecker/IsBoolean.d.ts +10 -0
  222. package/dist/validator/decorator/typechecker/IsDate.d.ts +10 -0
  223. package/dist/validator/decorator/typechecker/IsEnum.d.ts +10 -0
  224. package/dist/validator/decorator/typechecker/IsInt.d.ts +10 -0
  225. package/dist/validator/decorator/typechecker/IsNumber.d.ts +18 -0
  226. package/dist/validator/decorator/typechecker/IsObject.d.ts +12 -0
  227. package/dist/validator/decorator/typechecker/IsString.d.ts +10 -0
  228. package/dist/validator/index.d.ts +49 -0
  229. package/dist/validator/metadata/ConstraintMetadata.d.ts +23 -0
  230. package/dist/validator/metadata/MetadataStorage.d.ts +42 -0
  231. package/dist/validator/metadata/ValidationMetadata.d.ts +53 -0
  232. package/dist/validator/metadata/ValidationMetadataArgs.d.ts +38 -0
  233. package/dist/validator/register-decorator.d.ts +36 -0
  234. package/dist/validator/utils/convert-to-array.util.d.ts +4 -0
  235. package/dist/validator/utils/get-global.util.d.ts +7 -0
  236. package/dist/validator/utils/index.d.ts +3 -0
  237. package/dist/validator/utils/is-promise.util.d.ts +1 -0
  238. package/dist/validator/validation/ValidationArguments.d.ts +26 -0
  239. package/dist/validator/validation/ValidationError.d.ts +42 -0
  240. package/dist/validator/validation/ValidationExecutor.d.ts +28 -0
  241. package/dist/validator/validation/ValidationTypes.d.ts +15 -0
  242. package/dist/validator/validation/ValidationUtils.d.ts +8 -0
  243. package/dist/validator/validation/Validator.d.ts +37 -0
  244. package/dist/validator/validation/ValidatorConstraintInterface.d.ts +14 -0
  245. package/dist/validator/validation/ValidatorOptions.d.ts +75 -0
  246. package/dist/validator/validation-schema/ValidationSchema.d.ts +57 -0
  247. package/dist/validator/validation-schema/ValidationSchemaToMetadataTransformer.d.ts +8 -0
  248. package/package.json +88 -0
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_DEFINED: string;
3
+ /**
4
+ * Checks if value is defined (!== undefined, !== null).
5
+ */
6
+ export declare function isDefined(value: any): boolean;
7
+ /**
8
+ * Checks if value is defined (!== undefined, !== null).
9
+ */
10
+ export declare function IsDefined(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_EMPTY = "isEmpty";
3
+ /**
4
+ * Checks if given value is empty (=== '', === null, === undefined).
5
+ */
6
+ export declare function isEmpty(value: unknown): boolean;
7
+ /**
8
+ * Checks if given value is empty (=== '', === null, === undefined).
9
+ */
10
+ export declare function IsEmpty(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_IN = "isIn";
3
+ /**
4
+ * Checks if given value is in a array of allowed values.
5
+ */
6
+ export declare function isIn(value: unknown, possibleValues: readonly unknown[]): boolean;
7
+ /**
8
+ * Checks if given value is in a array of allowed values.
9
+ */
10
+ export declare function IsIn(values: readonly any[], validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_LATLONG = "isLatLong";
3
+ /**
4
+ * Checks if a value is string in format a "latitude,longitude".
5
+ */
6
+ export declare function isLatLong(value: string): boolean;
7
+ /**
8
+ * Checks if a value is string in format a "latitude,longitude".
9
+ */
10
+ export declare function IsLatLong(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_LATITUDE = "isLatitude";
3
+ /**
4
+ * Checks if a given value is a latitude.
5
+ */
6
+ export declare function isLatitude(value: string): boolean;
7
+ /**
8
+ * Checks if a given value is a latitude.
9
+ */
10
+ export declare function IsLatitude(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_LONGITUDE = "isLongitude";
3
+ /**
4
+ * Checks if a given value is a longitude.
5
+ */
6
+ export declare function isLongitude(value: string): boolean;
7
+ /**
8
+ * Checks if a given value is a longitude.
9
+ */
10
+ export declare function IsLongitude(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_NOT_EMPTY = "isNotEmpty";
3
+ /**
4
+ * Checks if given value is not empty (!== '', !== null, !== undefined).
5
+ */
6
+ export declare function isNotEmpty(value: unknown): boolean;
7
+ /**
8
+ * Checks if given value is not empty (!== '', !== null, !== undefined).
9
+ */
10
+ export declare function IsNotEmpty(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_NOT_IN = "isNotIn";
3
+ /**
4
+ * Checks if given value not in a array of allowed values.
5
+ */
6
+ export declare function isNotIn(value: unknown, possibleValues: readonly unknown[]): boolean;
7
+ /**
8
+ * Checks if given value not in a array of allowed values.
9
+ */
10
+ export declare function IsNotIn(values: readonly any[], validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,5 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ /**
3
+ * Checks if value is missing and if so, ignores all validators.
4
+ */
5
+ export declare function IsOptional(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const NOT_EQUALS = "notEquals";
3
+ /**
4
+ * Checks if value does not match ("!==") the comparison.
5
+ */
6
+ export declare function notEquals(value: unknown, comparison: unknown): boolean;
7
+ /**
8
+ * Checks if value does not match ("!==") the comparison.
9
+ */
10
+ export declare function NotEquals(comparison: any, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,14 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ /**
3
+ * Registers custom validator class.
4
+ */
5
+ export declare function ValidatorConstraint(options?: {
6
+ name?: string;
7
+ async?: boolean;
8
+ }): (target: Function) => void;
9
+ /**
10
+ * Performs validation based on the given custom validation class.
11
+ * Validation class must be decorated with ValidatorConstraint decorator.
12
+ */
13
+ export declare function Validate(constraintClass: Function, validationOptions?: ValidationOptions): PropertyDecorator;
14
+ export declare function Validate(constraintClass: Function, constraints?: any[], validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,11 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ import { ValidationArguments } from '../../validation/ValidationArguments';
3
+ import { ValidatorConstraintInterface } from '../../validation/ValidatorConstraintInterface';
4
+ export interface ValidateByOptions {
5
+ name: string;
6
+ constraints?: any[];
7
+ validator: ValidatorConstraintInterface | Function;
8
+ async?: boolean;
9
+ }
10
+ export declare function buildMessage(impl: (eachPrefix: string, args?: ValidationArguments) => string, validationOptions?: ValidationOptions): (validationArguments?: ValidationArguments) => string;
11
+ export declare function ValidateBy(options: ValidateByOptions, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,5 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ /**
3
+ * Ignores the other validators on a property when the provided condition function returns false.
4
+ */
5
+ export declare function ValidateIf(condition: (object: any, value: any) => boolean, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,5 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ /**
3
+ * Objects / object arrays marked with this decorator will also be validated.
4
+ */
5
+ export declare function ValidateNested(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,5 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ /**
3
+ * Resolve promise before validation
4
+ */
5
+ export declare function ValidatePromise(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const MAX_DATE = "maxDate";
3
+ /**
4
+ * Checks if the value is a date that's before the specified date.
5
+ */
6
+ export declare function maxDate(date: unknown, maxDate: Date | (() => Date)): boolean;
7
+ /**
8
+ * Checks if the value is a date that's after the specified date.
9
+ */
10
+ export declare function MaxDate(date: Date | (() => Date), validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const MIN_DATE = "minDate";
3
+ /**
4
+ * Checks if the value is a date that's after the specified date.
5
+ */
6
+ export declare function minDate(date: unknown, minDate: Date | (() => Date)): boolean;
7
+ /**
8
+ * Checks if the value is a date that's after the specified date.
9
+ */
10
+ export declare function MinDate(date: Date | (() => Date), validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,111 @@
1
+ export * from './common/Allow';
2
+ export * from './common/IsDefined';
3
+ export * from './common/IsOptional';
4
+ export * from './common/Validate';
5
+ export * from './common/ValidateBy';
6
+ export * from './common/ValidateIf';
7
+ export * from './common/ValidateNested';
8
+ export * from './common/ValidatePromise';
9
+ export * from './common/IsLatLong';
10
+ export * from './common/IsLatitude';
11
+ export * from './common/IsLongitude';
12
+ export * from './common/Equals';
13
+ export * from './common/NotEquals';
14
+ export * from './common/IsEmpty';
15
+ export * from './common/IsNotEmpty';
16
+ export * from './common/IsIn';
17
+ export * from './common/IsNotIn';
18
+ export * from './number/IsDivisibleBy';
19
+ export * from './number/IsPositive';
20
+ export * from './number/IsNegative';
21
+ export * from './number/Max';
22
+ export * from './number/Min';
23
+ export * from './date/MinDate';
24
+ export * from './date/MaxDate';
25
+ export * from './string/Contains';
26
+ export * from './string/NotContains';
27
+ export * from './string/IsAlpha';
28
+ export * from './string/IsAlphanumeric';
29
+ export * from './string/IsDecimal';
30
+ export * from './string/IsAscii';
31
+ export * from './string/IsBase64';
32
+ export * from './string/IsByteLength';
33
+ export * from './string/IsCreditCard';
34
+ export * from './string/IsCurrency';
35
+ export * from './string/IsEmail';
36
+ export * from './string/IsFQDN';
37
+ export * from './string/IsFullWidth';
38
+ export * from './string/IsHalfWidth';
39
+ export * from './string/IsVariableWidth';
40
+ export * from './string/IsHexColor';
41
+ export * from './string/IsHexadecimal';
42
+ export * from './string/IsMacAddress';
43
+ export * from './string/IsIP';
44
+ export * from './string/IsPort';
45
+ export * from './string/IsISBN';
46
+ export * from './string/IsISIN';
47
+ export * from './string/IsISO8601';
48
+ export * from './string/IsJSON';
49
+ export * from './string/IsJWT';
50
+ export * from './string/IsLowercase';
51
+ export * from './string/IsMobilePhone';
52
+ export * from './string/IsISO31661Alpha2';
53
+ export * from './string/IsISO31661Alpha3';
54
+ export * from './string/IsMongoId';
55
+ export * from './string/IsMultibyte';
56
+ export * from './string/IsSurrogatePair';
57
+ export * from './string/IsUrl';
58
+ export * from './string/IsUUID';
59
+ export * from './string/IsFirebasePushId';
60
+ export * from './string/IsUppercase';
61
+ export * from './string/Length';
62
+ export * from './string/MaxLength';
63
+ export * from './string/MinLength';
64
+ export * from './string/Matches';
65
+ export * from './string/IsPhoneNumber';
66
+ export * from './string/IsMilitaryTime';
67
+ export * from './string/IsHash';
68
+ export * from './string/IsISSN';
69
+ export * from './string/IsDateString';
70
+ export * from './string/IsBooleanString';
71
+ export * from './string/IsNumberString';
72
+ export * from './string/IsBase32';
73
+ export * from './string/IsBIC';
74
+ export * from './string/IsBtcAddress';
75
+ export * from './string/IsDataURI';
76
+ export * from './string/IsEAN';
77
+ export * from './string/IsEthereumAddress';
78
+ export * from './string/IsHSL';
79
+ export * from './string/IsIBAN';
80
+ export * from './string/IsIdentityCard';
81
+ export * from './string/IsISRC';
82
+ export * from './string/IsLocale';
83
+ export * from './string/IsMagnetURI';
84
+ export * from './string/IsMimeType';
85
+ export * from './string/IsOctal';
86
+ export * from './string/IsPassportNumber';
87
+ export * from './string/IsPostalCode';
88
+ export * from './string/IsRFC3339';
89
+ export * from './string/IsRgbColor';
90
+ export * from './string/IsSemVer';
91
+ export * from './string/IsStrongPassword';
92
+ export * from './string/IsTimeZone';
93
+ export * from './string/IsBase58';
94
+ export * from './string/is-tax-id';
95
+ export * from './string/is-iso4217-currency-code';
96
+ export * from './typechecker/IsBoolean';
97
+ export * from './typechecker/IsDate';
98
+ export * from './typechecker/IsNumber';
99
+ export * from './typechecker/IsEnum';
100
+ export * from './typechecker/IsInt';
101
+ export * from './typechecker/IsString';
102
+ export * from './typechecker/IsArray';
103
+ export * from './typechecker/IsObject';
104
+ export * from './array/ArrayContains';
105
+ export * from './array/ArrayNotContains';
106
+ export * from './array/ArrayNotEmpty';
107
+ export * from './array/ArrayMinSize';
108
+ export * from './array/ArrayMaxSize';
109
+ export * from './array/ArrayUnique';
110
+ export * from './object/IsNotEmptyObject';
111
+ export * from './object/IsInstance';
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_DIVISIBLE_BY = "isDivisibleBy";
3
+ /**
4
+ * Checks if value is a number that's divisible by another.
5
+ */
6
+ export declare function isDivisibleBy(value: unknown, num: number): boolean;
7
+ /**
8
+ * Checks if value is a number that's divisible by another.
9
+ */
10
+ export declare function IsDivisibleBy(num: number, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_NEGATIVE = "isNegative";
3
+ /**
4
+ * Checks if the value is a negative number smaller than zero.
5
+ */
6
+ export declare function isNegative(value: unknown): boolean;
7
+ /**
8
+ * Checks if the value is a negative number smaller than zero.
9
+ */
10
+ export declare function IsNegative(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_POSITIVE = "isPositive";
3
+ /**
4
+ * Checks if the value is a positive number greater than zero.
5
+ */
6
+ export declare function isPositive(value: unknown): boolean;
7
+ /**
8
+ * Checks if the value is a positive number greater than zero.
9
+ */
10
+ export declare function IsPositive(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const MAX = "max";
3
+ /**
4
+ * Checks if the first number is less than or equal to the second.
5
+ */
6
+ export declare function max(num: unknown, max: number): boolean;
7
+ /**
8
+ * Checks if the value is less than or equal to the allowed maximum value.
9
+ */
10
+ export declare function Max(maxValue: number, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const MIN = "min";
3
+ /**
4
+ * Checks if the first number is greater than or equal to the second.
5
+ */
6
+ export declare function min(num: unknown, min: number): boolean;
7
+ /**
8
+ * Checks if the value is greater than or equal to the allowed minimum value.
9
+ */
10
+ export declare function Min(minValue: number, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_INSTANCE = "isInstance";
3
+ /**
4
+ * Checks if the value is an instance of the specified object.
5
+ */
6
+ export declare function isInstance(object: unknown, targetTypeConstructor: new (...args: any[]) => any): boolean;
7
+ /**
8
+ * Checks if the value is an instance of the specified object.
9
+ */
10
+ export declare function IsInstance(targetType: new (...args: any[]) => any, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,16 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_NOT_EMPTY_OBJECT = "isNotEmptyObject";
3
+ /**
4
+ * Checks if the value is valid Object & not empty.
5
+ * Returns false if the value is not an object or an empty valid object.
6
+ */
7
+ export declare function isNotEmptyObject(value: unknown, options?: {
8
+ nullable?: boolean;
9
+ }): boolean;
10
+ /**
11
+ * Checks if the value is valid Object & not empty.
12
+ * Returns false if the value is not an object or an empty valid object.
13
+ */
14
+ export declare function IsNotEmptyObject(options?: {
15
+ nullable?: boolean;
16
+ }, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const CONTAINS = "contains";
3
+ /**
4
+ * Checks if the string contains the seed.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function contains(value: unknown, seed: string): boolean;
8
+ /**
9
+ * Checks if the string contains the seed.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function Contains(seed: string, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_ALPHA = "isAlpha";
3
+ /**
4
+ * Checks if the string contains only letters (a-zA-Z).
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isAlpha(value: unknown, locale?: validator.AlphaLocale): boolean;
8
+ /**
9
+ * Checks if the string contains only letters (a-zA-Z).
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsAlpha(locale?: validator.AlphaLocale, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_ALPHANUMERIC = "isAlphanumeric";
3
+ /**
4
+ * Checks if the string contains only letters and numbers.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isAlphanumeric(value: unknown, locale?: validator.AlphanumericLocale): boolean;
8
+ /**
9
+ * Checks if the string contains only letters and numbers.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsAlphanumeric(locale?: validator.AlphanumericLocale, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_ASCII = "isAscii";
3
+ /**
4
+ * Checks if the string contains ASCII chars only.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isAscii(value: unknown): boolean;
8
+ /**
9
+ * Checks if the string contains ASCII chars only.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsAscii(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BIC = "isBIC";
3
+ /**
4
+ * Check if a string is a BIC (Bank Identification Code) or SWIFT code.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isBIC(value: unknown): boolean;
8
+ /**
9
+ * Check if a string is a BIC (Bank Identification Code) or SWIFT code.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsBIC(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BASE32 = "isBase32";
3
+ /**
4
+ * Checks if a string is base32 encoded.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isBase32(value: unknown): boolean;
8
+ /**
9
+ * Check if a string is base32 encoded.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsBase32(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BASE58 = "isBase58";
3
+ /**
4
+ * Checks if a string is base58 encoded.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isBase58(value: unknown): boolean;
8
+ /**
9
+ * Checks if a string is base58 encoded.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsBase58(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BASE64 = "isBase64";
3
+ /**
4
+ * Checks if a string is base64 encoded.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isBase64Validate(value: unknown, options?: any): boolean;
8
+ /**
9
+ * Checks if a string is base64 encoded.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsBase64(options?: any, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BOOLEAN_STRING = "isBooleanString";
3
+ /**
4
+ * Checks if a string is a boolean.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isBooleanString(value: unknown): boolean;
8
+ /**
9
+ * Checks if a string is a boolean.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsBooleanString(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BTC_ADDRESS = "isBtcAddress";
3
+ /**
4
+ * Check if the string is a valid BTC address.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isBtcAddress(value: unknown): boolean;
8
+ /**
9
+ * Check if the string is a valid BTC address.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsBtcAddress(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_BYTE_LENGTH = "isByteLength";
3
+ /**
4
+ * Checks if the string's length (in bytes) falls in a range.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isByteLength(value: unknown, min: number, max?: number): boolean;
8
+ /**
9
+ * Checks if the string's length (in bytes) falls in a range.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsByteLength(min: number, max?: number, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_CREDIT_CARD = "isCreditCard";
3
+ /**
4
+ * Checks if the string is a credit card.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isCreditCard(value: unknown): boolean;
8
+ /**
9
+ * Checks if the string is a credit card.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsCreditCard(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_CURRENCY = "isCurrency";
3
+ /**
4
+ * Checks if the string is a valid currency amount.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isCurrency(value: unknown, options?: validator.IsCurrencyOptions): boolean;
8
+ /**
9
+ * Checks if the string is a valid currency amount.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsCurrency(options?: validator.IsCurrencyOptions, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_DATA_URI = "isDataURI";
3
+ /**
4
+ * Check if the string is a data uri format.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isDataURI(value: unknown): boolean;
8
+ /**
9
+ * Check if the string is a data uri format.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsDataURI(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,10 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_DATE_STRING = "isDateString";
3
+ /**
4
+ * Alias for IsISO8601 validator
5
+ */
6
+ export declare function isDateString(value: unknown, options?: validator.IsISO8601Options): boolean;
7
+ /**
8
+ * Alias for IsISO8601 validator
9
+ */
10
+ export declare function IsDateString(options?: validator.IsISO8601Options, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_DECIMAL = "isDecimal";
3
+ /**
4
+ * Checks if the string is a valid decimal.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isDecimal(value: unknown, options?: validator.IsDecimalOptions): boolean;
8
+ /**
9
+ * Checks if the string is a valid decimal.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsDecimal(options?: validator.IsDecimalOptions, validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_EAN = "isEAN";
3
+ /**
4
+ * Check if the string is an EAN (European Article Number).
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isEAN(value: unknown): boolean;
8
+ /**
9
+ * Check if the string is an EAN (European Article Number).
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsEAN(validationOptions?: ValidationOptions): PropertyDecorator;
@@ -0,0 +1,12 @@
1
+ import { ValidationOptions } from '../ValidationOptions';
2
+ export declare const IS_EMAIL = "isEmail";
3
+ /**
4
+ * Checks if the string is an email.
5
+ * If given value is not a string, then it returns false.
6
+ */
7
+ export declare function isEmailValidate(value: unknown, options?: validator.IsEmailOptions): boolean;
8
+ /**
9
+ * Checks if the string is an email.
10
+ * If given value is not a string, then it returns false.
11
+ */
12
+ export declare function IsEmail(options?: validator.IsEmailOptions, validationOptions?: ValidationOptions): PropertyDecorator;