querier-ts 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/core/errors/index.d.ts +1 -0
- package/lib/core/errors/index.d.ts.map +1 -0
- package/lib/core/errors/index.js +2 -17
- package/lib/core/errors/index.js.map +1 -0
- package/lib/core/errors/invalid-argument-error.d.ts +1 -0
- package/lib/core/errors/invalid-argument-error.d.ts.map +1 -0
- package/lib/core/errors/invalid-argument-error.js +2 -5
- package/lib/core/errors/invalid-argument-error.js.map +1 -0
- package/lib/core/types/attribute-validation-function.d.ts +1 -0
- package/lib/core/types/attribute-validation-function.d.ts.map +1 -0
- package/lib/core/types/attribute-validation-function.js +2 -2
- package/lib/core/types/attribute-validation-function.js.map +1 -0
- package/lib/core/types/column-condition.d.ts +3 -2
- package/lib/core/types/column-condition.d.ts.map +1 -0
- package/lib/core/types/column-condition.js +2 -2
- package/lib/core/types/column-condition.js.map +1 -0
- package/lib/core/types/index.d.ts +1 -0
- package/lib/core/types/index.d.ts.map +1 -0
- package/lib/core/types/index.js +5 -20
- package/lib/core/types/index.js.map +1 -0
- package/lib/core/types/query-conditions-group-nullable.d.ts +2 -1
- package/lib/core/types/query-conditions-group-nullable.d.ts.map +1 -0
- package/lib/core/types/query-conditions-group-nullable.js +2 -2
- package/lib/core/types/query-conditions-group-nullable.js.map +1 -0
- package/lib/core/types/query-conditions-group.d.ts +2 -1
- package/lib/core/types/query-conditions-group.d.ts.map +1 -0
- package/lib/core/types/query-conditions-group.js +2 -2
- package/lib/core/types/query-conditions-group.js.map +1 -0
- package/lib/core/types/query-row-validator-initializer.d.ts +2 -1
- package/lib/core/types/query-row-validator-initializer.d.ts.map +1 -0
- package/lib/core/types/query-row-validator-initializer.js +2 -2
- package/lib/core/types/query-row-validator-initializer.js.map +1 -0
- package/lib/core/validation/decorators/index.d.ts +1 -0
- package/lib/core/validation/decorators/index.d.ts.map +1 -0
- package/lib/core/validation/decorators/index.js +2 -17
- package/lib/core/validation/decorators/index.js.map +1 -0
- package/lib/core/validation/decorators/number-validaton.d.ts +5 -36
- package/lib/core/validation/decorators/number-validaton.d.ts.map +1 -0
- package/lib/core/validation/decorators/number-validaton.js +86 -113
- package/lib/core/validation/decorators/number-validaton.js.map +1 -0
- package/lib/core/validation/index.d.ts +1 -0
- package/lib/core/validation/index.d.ts.map +1 -0
- package/lib/core/validation/index.js +2 -17
- package/lib/core/validation/index.js.map +1 -0
- package/lib/core/validation/query-row-validator.d.ts +2 -1
- package/lib/core/validation/query-row-validator.d.ts.map +1 -0
- package/lib/core/validation/query-row-validator.js +9 -12
- package/lib/core/validation/query-row-validator.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -17
- package/lib/index.js.map +1 -0
- package/lib/query.d.ts +3 -2
- package/lib/query.d.ts.map +1 -0
- package/lib/query.js +20 -28
- package/lib/query.js.map +1 -0
- package/lib/utils/functions/generic/compare-arrays.d.ts +1 -0
- package/lib/utils/functions/generic/compare-arrays.d.ts.map +1 -0
- package/lib/utils/functions/generic/compare-arrays.js +3 -6
- package/lib/utils/functions/generic/compare-arrays.js.map +1 -0
- package/lib/utils/functions/generic/deep-equal.d.ts +1 -0
- package/lib/utils/functions/generic/deep-equal.d.ts.map +1 -0
- package/lib/utils/functions/generic/deep-equal.js +5 -8
- package/lib/utils/functions/generic/deep-equal.js.map +1 -0
- package/lib/utils/functions/generic/get-entries.d.ts +2 -5
- package/lib/utils/functions/generic/get-entries.d.ts.map +1 -0
- package/lib/utils/functions/generic/get-entries.js +3 -9
- package/lib/utils/functions/generic/get-entries.js.map +1 -0
- package/lib/utils/functions/generic/index.d.ts +1 -0
- package/lib/utils/functions/generic/index.d.ts.map +1 -0
- package/lib/utils/functions/generic/index.js +4 -19
- package/lib/utils/functions/generic/index.js.map +1 -0
- package/lib/utils/functions/sort/index.d.ts +1 -0
- package/lib/utils/functions/sort/index.d.ts.map +1 -0
- package/lib/utils/functions/sort/index.js +3 -18
- package/lib/utils/functions/sort/index.js.map +1 -0
- package/lib/utils/functions/sort/sort-by-properties.d.ts +2 -1
- package/lib/utils/functions/sort/sort-by-properties.d.ts.map +1 -0
- package/lib/utils/functions/sort/sort-by-properties.js +4 -7
- package/lib/utils/functions/sort/sort-by-properties.js.map +1 -0
- package/lib/utils/functions/sort/sort-by-property.d.ts +2 -1
- package/lib/utils/functions/sort/sort-by-property.d.ts.map +1 -0
- package/lib/utils/functions/sort/sort-by-property.js +2 -4
- package/lib/utils/functions/sort/sort-by-property.js.map +1 -0
- package/lib/utils/functions/type-guards/index.d.ts +1 -0
- package/lib/utils/functions/type-guards/index.d.ts.map +1 -0
- package/lib/utils/functions/type-guards/index.js +4 -19
- package/lib/utils/functions/type-guards/index.js.map +1 -0
- package/lib/utils/functions/type-guards/is-function.d.ts +1 -0
- package/lib/utils/functions/type-guards/is-function.d.ts.map +1 -0
- package/lib/utils/functions/type-guards/is-function.js +2 -5
- package/lib/utils/functions/type-guards/is-function.js.map +1 -0
- package/lib/utils/functions/type-guards/is-number.d.ts +1 -0
- package/lib/utils/functions/type-guards/is-number.d.ts.map +1 -0
- package/lib/utils/functions/type-guards/is-number.js +2 -5
- package/lib/utils/functions/type-guards/is-number.js.map +1 -0
- package/lib/utils/functions/type-guards/is-object.d.ts +1 -0
- package/lib/utils/functions/type-guards/is-object.d.ts.map +1 -0
- package/lib/utils/functions/type-guards/is-object.js +2 -5
- package/lib/utils/functions/type-guards/is-object.js.map +1 -0
- package/lib/utils/types/add-prefix-to-object.d.ts +1 -0
- package/lib/utils/types/add-prefix-to-object.d.ts.map +1 -0
- package/lib/utils/types/add-prefix-to-object.js +2 -2
- package/lib/utils/types/add-prefix-to-object.js.map +1 -0
- package/lib/utils/types/allowed-names.d.ts +2 -1
- package/lib/utils/types/allowed-names.d.ts.map +1 -0
- package/lib/utils/types/allowed-names.js +2 -2
- package/lib/utils/types/allowed-names.js.map +1 -0
- package/lib/utils/types/flag-excluded-type.d.ts +1 -0
- package/lib/utils/types/flag-excluded-type.d.ts.map +1 -0
- package/lib/utils/types/flag-excluded-type.js +2 -2
- package/lib/utils/types/flag-excluded-type.js.map +1 -0
- package/lib/utils/types/generic-object.d.ts +1 -0
- package/lib/utils/types/generic-object.d.ts.map +1 -0
- package/lib/utils/types/generic-object.js +2 -2
- package/lib/utils/types/generic-object.js.map +1 -0
- package/lib/utils/types/index.d.ts +1 -0
- package/lib/utils/types/index.d.ts.map +1 -0
- package/lib/utils/types/index.js +11 -26
- package/lib/utils/types/index.js.map +1 -0
- package/lib/utils/types/omit-type.d.ts +2 -1
- package/lib/utils/types/omit-type.d.ts.map +1 -0
- package/lib/utils/types/omit-type.js +2 -2
- package/lib/utils/types/omit-type.js.map +1 -0
- package/lib/utils/types/partial-of-properties.d.ts +2 -1
- package/lib/utils/types/partial-of-properties.d.ts.map +1 -0
- package/lib/utils/types/partial-of-properties.js +2 -2
- package/lib/utils/types/partial-of-properties.js.map +1 -0
- package/lib/utils/types/prop-of.d.ts +2 -1
- package/lib/utils/types/prop-of.d.ts.map +1 -0
- package/lib/utils/types/prop-of.js +2 -2
- package/lib/utils/types/prop-of.js.map +1 -0
- package/lib/utils/types/property-only.d.ts +2 -1
- package/lib/utils/types/property-only.d.ts.map +1 -0
- package/lib/utils/types/property-only.js +2 -2
- package/lib/utils/types/property-only.js.map +1 -0
- package/lib/utils/types/recursive-partial.d.ts +1 -0
- package/lib/utils/types/recursive-partial.d.ts.map +1 -0
- package/lib/utils/types/recursive-partial.js +2 -2
- package/lib/utils/types/recursive-partial.js.map +1 -0
- package/lib/utils/types/sort-function.d.ts +1 -0
- package/lib/utils/types/sort-function.d.ts.map +1 -0
- package/lib/utils/types/sort-function.js +2 -2
- package/lib/utils/types/sort-function.js.map +1 -0
- package/lib/utils/types/type.d.ts +1 -0
- package/lib/utils/types/type.d.ts.map +1 -0
- package/lib/utils/types/type.js +2 -2
- package/lib/utils/types/type.js.map +1 -0
- package/package.json +23 -16
- package/lib/base-object.d.ts +0 -6
- package/lib/base-object.js +0 -15
- package/lib/errors/index.d.ts +0 -2
- package/lib/errors/index.js +0 -5
- package/lib/errors/invalid-argument-error.d.ts +0 -10
- package/lib/errors/invalid-argument-error.js +0 -11
- package/lib/query-conditions-group-nullable.d.ts +0 -4
- package/lib/query-conditions-group-nullable.js +0 -2
- package/lib/query-conditions-group.d.ts +0 -4
- package/lib/query-conditions-group.js +0 -2
- package/lib/query-row-validator.d.ts +0 -72
- package/lib/query-row-validator.js +0 -85
- package/lib/utils/decorators/number-validaton.d.ts +0 -36
- package/lib/utils/decorators/number-validaton.js +0 -124
package/README.md
CHANGED
|
@@ -109,7 +109,7 @@ let isActive: bool;
|
|
|
109
109
|
const filteredUsers = Query.from(users)
|
|
110
110
|
.filterWhere({
|
|
111
111
|
id: 1,
|
|
112
|
-
isActive: isActive, //
|
|
112
|
+
isActive: isActive, // condition for "isActive" will be ignored, because the variable is still undefined
|
|
113
113
|
})
|
|
114
114
|
.all();
|
|
115
115
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/lib/core/errors/index.js
CHANGED
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./invalid-argument-error"), exports);
|
|
1
|
+
export * from './invalid-argument-error';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/errors/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalid-argument-error.d.ts","sourceRoot":"","sources":["../../../src/core/errors/invalid-argument-error.ts"],"names":[],"mappings":"AAAA,UAAU,0BAA0B;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,SAAgB,MAAM,EAAE,MAAM,CAAC;IAC/B,SAAgB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,SAAgB,QAAQ,EAAE,OAAO,CAAC;IAClC,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAErB,EACV,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,0BAA0B;CAc9B"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InvalidArgumentError = void 0;
|
|
4
|
-
class InvalidArgumentError extends Error {
|
|
1
|
+
export class InvalidArgumentError extends Error {
|
|
5
2
|
constructor({ method, param, argument, expected, }) {
|
|
6
3
|
super(`${String(argument)} is not a valid argument to param ${param} on ${method}(). ` +
|
|
7
4
|
`It should be ${expected}.`);
|
|
@@ -13,4 +10,4 @@ class InvalidArgumentError extends Error {
|
|
|
13
10
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
14
11
|
}
|
|
15
12
|
}
|
|
16
|
-
|
|
13
|
+
//# sourceMappingURL=invalid-argument-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalid-argument-error.js","sourceRoot":"","sources":["../../../src/core/errors/invalid-argument-error.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IAM7C,YAAY,EACV,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,GACmB;QAC3B,KAAK,CACH,GAAG,MAAM,CAAC,QAAQ,CAAC,qCAAqC,KAAK,OAAO,MAAM,MAAM;YAC9E,gBAAgB,QAAQ,GAAG,CAC9B,CAAC;QAEF,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute-validation-function.d.ts","sourceRoot":"","sources":["../../../src/core/types/attribute-validation-function.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,2BAA2B,CACrC,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,CAAC,IACzB,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=attribute-validation-function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attribute-validation-function.js","sourceRoot":"","sources":["../../../src/core/types/attribute-validation-function.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { AttributeValidationFunction } from './attribute-validation-function';
|
|
2
|
-
import { QueryConditionsGroupNullable } from './query-conditions-group-nullable';
|
|
1
|
+
import type { AttributeValidationFunction } from './attribute-validation-function';
|
|
2
|
+
import type { QueryConditionsGroupNullable } from './query-conditions-group-nullable';
|
|
3
3
|
/**
|
|
4
4
|
* Condition to apply to a row column.
|
|
5
5
|
*/
|
|
6
6
|
export type ColumnCondition<T extends object, P extends keyof T> = T[P] extends object ? QueryConditionsGroupNullable<T[P]> | undefined : T[P] | AttributeValidationFunction<T, P> | null | undefined;
|
|
7
|
+
//# sourceMappingURL=column-condition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-condition.d.ts","sourceRoot":"","sources":["../../../src/core/types/column-condition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;GAEG;AACH,MAAM,MAAM,eAAe,CACzB,CAAC,SAAS,MAAM,EAChB,CAAC,SAAS,MAAM,CAAC,IACf,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACnB,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAC9C,CAAC,CAAC,CAAC,CAAC,GAAG,2BAA2B,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=column-condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"column-condition.js","sourceRoot":"","sources":["../../../src/core/types/column-condition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC"}
|
package/lib/core/types/index.js
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./attribute-validation-function"), exports);
|
|
18
|
-
__exportStar(require("./query-conditions-group"), exports);
|
|
19
|
-
__exportStar(require("./query-conditions-group-nullable"), exports);
|
|
20
|
-
__exportStar(require("./query-row-validator-initializer"), exports);
|
|
1
|
+
export * from './attribute-validation-function';
|
|
2
|
+
export * from './query-conditions-group';
|
|
3
|
+
export * from './query-conditions-group-nullable';
|
|
4
|
+
export * from './query-row-validator-initializer';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PropertyOnly } from '../../utils/types';
|
|
1
|
+
import type { PropertyOnly } from '../../utils/types';
|
|
2
2
|
export type QueryConditionsGroupNullable<T extends object> = {
|
|
3
3
|
[P in keyof PropertyOnly<T>]?: T[P] extends object ? QueryConditionsGroupNullable<T[P]> : T[P] | ((value: T[P]) => boolean) | null;
|
|
4
4
|
};
|
|
5
|
+
//# sourceMappingURL=query-conditions-group-nullable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-conditions-group-nullable.d.ts","sourceRoot":"","sources":["../../../src/core/types/query-conditions-group-nullable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,4BAA4B,CAAC,CAAC,SAAS,MAAM,IAAI;KAC1D,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAC9C,4BAA4B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAClC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,GAAG,IAAI;CAC7C,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=query-conditions-group-nullable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-conditions-group-nullable.js","sourceRoot":"","sources":["../../../src/core/types/query-conditions-group-nullable.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PropertyOnly } from '../../utils/types';
|
|
1
|
+
import type { PropertyOnly } from '../../utils/types';
|
|
2
2
|
export type QueryConditionsGroup<T extends object> = {
|
|
3
3
|
[P in keyof PropertyOnly<T>]?: T[P] extends object ? QueryConditionsGroup<T[P]> : T[P] | ((value: T[P]) => boolean);
|
|
4
4
|
};
|
|
5
|
+
//# sourceMappingURL=query-conditions-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-conditions-group.d.ts","sourceRoot":"","sources":["../../../src/core/types/query-conditions-group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI;KAClD,CAAC,IAAI,MAAM,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GAC9C,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1B,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;CACtC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=query-conditions-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-conditions-group.js","sourceRoot":"","sources":["../../../src/core/types/query-conditions-group.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryConditionsGroupNullable } from './query-conditions-group-nullable';
|
|
1
|
+
import type { QueryConditionsGroupNullable } from './query-conditions-group-nullable';
|
|
2
2
|
/**
|
|
3
3
|
* Validator configuration.
|
|
4
4
|
*/
|
|
@@ -6,3 +6,4 @@ export interface QueryRowValidatorInitializer<T extends object> {
|
|
|
6
6
|
conditionsObject: QueryConditionsGroupNullable<T>;
|
|
7
7
|
ignoreNullValues: boolean;
|
|
8
8
|
}
|
|
9
|
+
//# sourceMappingURL=query-row-validator-initializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-row-validator-initializer.d.ts","sourceRoot":"","sources":["../../../src/core/types/query-row-validator-initializer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEtF;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAAC,CAAC,SAAS,MAAM;IAC5D,gBAAgB,EAAE,4BAA4B,CAAC,CAAC,CAAC,CAAC;IAClD,gBAAgB,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=query-row-validator-initializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-row-validator-initializer.js","sourceRoot":"","sources":["../../../src/core/types/query-row-validator-initializer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./number-validaton"), exports);
|
|
1
|
+
export * from './number-validaton';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/validation/decorators/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*
|
|
7
|
-
* @returns Decorator function.
|
|
8
|
-
*/
|
|
9
|
-
export declare function min(value: number): (target: object, propertyKey: string | symbol, parameterIndex: number) => void;
|
|
10
|
-
/**
|
|
11
|
-
* Sets a maximum value to be used as argument to the given parameter.
|
|
12
|
-
*
|
|
13
|
-
* @param value Maximal value to set.
|
|
14
|
-
*
|
|
15
|
-
* @returns Decorator function.
|
|
16
|
-
*/
|
|
17
|
-
export declare function max(value: number): (target: object, propertyKey: string | symbol, parameterIndex: number) => void;
|
|
18
|
-
/**
|
|
19
|
-
* Marks the given parameter as an integer.
|
|
20
|
-
*
|
|
21
|
-
* @param target Class to which the parameter belongs.
|
|
22
|
-
* @param propertyKey Method name.
|
|
23
|
-
* @param parameterIndex Parameter index.
|
|
24
|
-
*/
|
|
25
|
-
export declare function integer(target: object, propertyKey: string | symbol, parameterIndex: number): void;
|
|
26
|
-
/**
|
|
27
|
-
* Validates the property decorators `integer`, `min`, and `max`, throwing and error
|
|
28
|
-
* when the arguments passed to the parameters decorated by them are invalid.
|
|
29
|
-
*
|
|
30
|
-
* @param target Class to which the method belongs.
|
|
31
|
-
* @param propertyName Method name.
|
|
32
|
-
* @param descriptor Descriptor object.
|
|
33
|
-
*
|
|
34
|
-
* @throws {InvalidArgumentError} If an argument is invalid.
|
|
35
|
-
*/
|
|
36
|
-
export declare function validateNumbers(target: any, propertyName: string, descriptor: TypedPropertyDescriptor<any>): void;
|
|
1
|
+
export declare function min(value: number): (target: object, propertyKey: string | symbol, index: number) => void;
|
|
2
|
+
export declare function max(value: number): (target: object, propertyKey: string | symbol, index: number) => void;
|
|
3
|
+
export declare function integer(target: object, propertyKey: string | symbol, index: number): void;
|
|
4
|
+
export declare function validateNumbers(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<any>): void;
|
|
5
|
+
//# sourceMappingURL=number-validaton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-validaton.d.ts","sourceRoot":"","sources":["../../../../src/core/validation/decorators/number-validaton.ts"],"names":[],"mappings":"AAiCA,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,IAE7B,QAAQ,MAAM,EACd,aAAa,MAAM,GAAG,MAAM,EAC5B,OAAO,MAAM,KACZ,IAAI,CAWR;AAED,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,IAE7B,QAAQ,MAAM,EACd,aAAa,MAAM,GAAG,MAAM,EAC5B,OAAO,MAAM,KACZ,IAAI,CAWR;AAED,wBAAgB,OAAO,CACrB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,MAAM,EAC5B,KAAK,EAAE,MAAM,GACZ,IAAI,CAUN;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EAEnB,UAAU,EAAE,uBAAuB,CAAC,GAAG,CAAC,GACvC,IAAI,CAgDN"}
|
|
@@ -1,123 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* @param value Minimal value to set.
|
|
17
|
-
*
|
|
18
|
-
* @returns Decorator function.
|
|
19
|
-
*/
|
|
20
|
-
function min(value) {
|
|
21
|
-
return (target, propertyKey, parameterIndex) => {
|
|
22
|
-
const minParameters = Reflect.getOwnMetadata(minMetadataKey, target, propertyKey) || [];
|
|
23
|
-
minParameters.push({
|
|
24
|
-
value,
|
|
25
|
-
index: parameterIndex,
|
|
26
|
-
});
|
|
27
|
-
Reflect.defineMetadata(minMetadataKey, minParameters, target, propertyKey);
|
|
28
|
-
};
|
|
1
|
+
import { isNumber } from '../../../utils/functions/type-guards';
|
|
2
|
+
import { InvalidArgumentError } from '../../errors';
|
|
3
|
+
const metadata = new WeakMap();
|
|
4
|
+
function getParams(target, propertyKey) {
|
|
5
|
+
let methods = metadata.get(target);
|
|
6
|
+
if (!methods) {
|
|
7
|
+
methods = new Map();
|
|
8
|
+
metadata.set(target, methods);
|
|
9
|
+
}
|
|
10
|
+
let params = methods.get(propertyKey);
|
|
11
|
+
if (!params) {
|
|
12
|
+
params = [];
|
|
13
|
+
methods.set(propertyKey, params);
|
|
14
|
+
}
|
|
15
|
+
return params;
|
|
29
16
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
maxParameters.push({
|
|
41
|
-
value,
|
|
42
|
-
index: parameterIndex,
|
|
43
|
-
});
|
|
44
|
-
Reflect.defineMetadata(maxMetadataKey, maxParameters, target, propertyKey);
|
|
17
|
+
export function min(value) {
|
|
18
|
+
return function (target, propertyKey, index) {
|
|
19
|
+
const params = getParams(target, propertyKey);
|
|
20
|
+
const existing = params.find((p) => p.index === index);
|
|
21
|
+
if (existing) {
|
|
22
|
+
existing.min = value;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
params.push({ index, min: value });
|
|
26
|
+
}
|
|
45
27
|
};
|
|
46
28
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
index: parameterIndex,
|
|
58
|
-
});
|
|
59
|
-
Reflect.defineMetadata(integerMetadataKey, integerParameters, target, propertyKey);
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Validates the property decorators `integer`, `min`, and `max`, throwing and error
|
|
63
|
-
* when the arguments passed to the parameters decorated by them are invalid.
|
|
64
|
-
*
|
|
65
|
-
* @param target Class to which the method belongs.
|
|
66
|
-
* @param propertyName Method name.
|
|
67
|
-
* @param descriptor Descriptor object.
|
|
68
|
-
*
|
|
69
|
-
* @throws {InvalidArgumentError} If an argument is invalid.
|
|
70
|
-
*/
|
|
71
|
-
function validateNumbers(target, propertyName, descriptor) {
|
|
72
|
-
const method = descriptor.value;
|
|
73
|
-
descriptor.value = function () {
|
|
74
|
-
const minParams = Reflect.getOwnMetadata(minMetadataKey, target, propertyName) || [];
|
|
75
|
-
const maxParams = Reflect.getOwnMetadata(maxMetadataKey, target, propertyName) || [];
|
|
76
|
-
const integerParams = Reflect.getOwnMetadata(integerMetadataKey, target, propertyName) || [];
|
|
77
|
-
checkMinParams(propertyName, minParams, arguments);
|
|
78
|
-
checkMaxParams(propertyName, maxParams, arguments);
|
|
79
|
-
checkIntegerParams(propertyName, integerParams, arguments);
|
|
80
|
-
return method.apply(this, arguments);
|
|
29
|
+
export function max(value) {
|
|
30
|
+
return function (target, propertyKey, index) {
|
|
31
|
+
const params = getParams(target, propertyKey);
|
|
32
|
+
const existing = params.find((p) => p.index === index);
|
|
33
|
+
if (existing) {
|
|
34
|
+
existing.max = value;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
params.push({ index, max: value });
|
|
38
|
+
}
|
|
81
39
|
};
|
|
82
40
|
}
|
|
83
|
-
function
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
throw new errors_1.InvalidArgumentError({
|
|
89
|
-
method: methodName,
|
|
90
|
-
param: parameter.index,
|
|
91
|
-
argument: actualValue,
|
|
92
|
-
expected: `equal or greater than ${minValue}`,
|
|
93
|
-
});
|
|
94
|
-
}
|
|
41
|
+
export function integer(target, propertyKey, index) {
|
|
42
|
+
const params = getParams(target, propertyKey);
|
|
43
|
+
const existing = params.find((p) => p.index === index);
|
|
44
|
+
if (existing) {
|
|
45
|
+
existing.integer = true;
|
|
95
46
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
for (const parameter of params) {
|
|
99
|
-
const actualValue = actualArguments[parameter.index];
|
|
100
|
-
const maxValue = parameter.value;
|
|
101
|
-
if (!(0, type_guards_1.isNumber)(actualValue) || actualValue > maxValue) {
|
|
102
|
-
throw new errors_1.InvalidArgumentError({
|
|
103
|
-
method: methodName,
|
|
104
|
-
param: parameter.index,
|
|
105
|
-
argument: actualValue,
|
|
106
|
-
expected: `equal or less than ${maxValue}`,
|
|
107
|
-
});
|
|
108
|
-
}
|
|
47
|
+
else {
|
|
48
|
+
params.push({ index, integer: true });
|
|
109
49
|
}
|
|
110
50
|
}
|
|
111
|
-
function
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
51
|
+
export function validateNumbers(target, propertyKey,
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
+
descriptor) {
|
|
54
|
+
const original = descriptor.value;
|
|
55
|
+
descriptor.value = function (...args) {
|
|
56
|
+
const params = metadata.get(target)?.get(propertyKey) ?? [];
|
|
57
|
+
for (const rule of params) {
|
|
58
|
+
const value = args[rule.index];
|
|
59
|
+
// MIN
|
|
60
|
+
if (rule.min !== undefined) {
|
|
61
|
+
if (!isNumber(value) || value < rule.min) {
|
|
62
|
+
throw new InvalidArgumentError({
|
|
63
|
+
method: propertyKey,
|
|
64
|
+
param: rule.index,
|
|
65
|
+
argument: value,
|
|
66
|
+
expected: `equal or greater than ${rule.min}`,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
// MAX
|
|
71
|
+
if (rule.max !== undefined) {
|
|
72
|
+
if (!isNumber(value) || value > rule.max) {
|
|
73
|
+
throw new InvalidArgumentError({
|
|
74
|
+
method: propertyKey,
|
|
75
|
+
param: rule.index,
|
|
76
|
+
argument: value,
|
|
77
|
+
expected: `equal or less than ${rule.max}`,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// INTEGER
|
|
82
|
+
if (rule.integer) {
|
|
83
|
+
if (!Number.isSafeInteger(value)) {
|
|
84
|
+
throw new InvalidArgumentError({
|
|
85
|
+
method: propertyKey,
|
|
86
|
+
param: rule.index,
|
|
87
|
+
argument: value,
|
|
88
|
+
expected: 'an integer',
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
121
92
|
}
|
|
122
|
-
|
|
93
|
+
return original.apply(this, args);
|
|
94
|
+
};
|
|
123
95
|
}
|
|
96
|
+
//# sourceMappingURL=number-validaton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number-validaton.js","sourceRoot":"","sources":["../../../../src/core/validation/decorators/number-validaton.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./query-row-validator"), exports);
|
|
1
|
+
export * from './query-row-validator';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QueryRowValidatorInitializer } from '../types';
|
|
1
|
+
import type { QueryRowValidatorInitializer } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Validates a row in the query.
|
|
4
4
|
*/
|
|
@@ -55,3 +55,4 @@ export declare class QueryRowValidator<T extends object> {
|
|
|
55
55
|
*/
|
|
56
56
|
private validateInnerObject;
|
|
57
57
|
}
|
|
58
|
+
//# sourceMappingURL=query-row-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-row-validator.d.ts","sourceRoot":"","sources":["../../../src/core/validation/query-row-validator.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAGlB;;GAEG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,MAAM;IAC7C;;OAEG;IACH,OAAO,CAAC,GAAG,CAAK;IAEhB;;OAEG;IACH,OAAO,CAAC,gBAAgB,CAAkC;IAE1D;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAU;IAElC;;;;;OAKG;IACH,OAAO;IAMP;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,CAAC,SAAS,MAAM,EAC9B,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,4BAA4B,CAAC,CAAC,CAAC,GACtC,OAAO;IAMV;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAQhB;;;;;;;OAOG;IACH,OAAO,CAAC,uBAAuB;IAgC/B;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;CAS5B"}
|