@merkaly/api 0.2.2-25 → 0.2.2-27
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/.output/abstract/abstract.document.js +4 -6
- package/.output/abstract/abstract.entity.js +41 -21
- package/.output/abstract/abstract.validator.js +60 -43
- package/.output/modules/assets/asset.entity.js +56 -39
- package/.output/modules/insight/validators/order.validator.js +14 -13
- package/.output/modules/inventory/brands/brand.document.js +26 -5
- package/.output/modules/inventory/brands/brand.entity.js +37 -19
- package/.output/modules/inventory/brands/brand.validator.js +31 -29
- package/.output/modules/inventory/categories/category.document.js +27 -6
- package/.output/modules/inventory/categories/category.entity.js +48 -30
- package/.output/modules/inventory/categories/category.validator.js +43 -41
- package/.output/modules/inventory/products/entities/code.entity.d.ts +5 -0
- package/.output/modules/inventory/products/entities/code.entity.js +53 -0
- package/.output/modules/inventory/products/entities/dimension.entity.d.ts +6 -0
- package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
- package/.output/modules/inventory/products/entities/price.entity.d.ts +4 -0
- package/.output/modules/inventory/products/entities/price.entity.js +49 -0
- package/.output/modules/inventory/products/entities/seo.entity.d.ts +5 -0
- package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
- package/.output/modules/inventory/products/product.document.js +28 -9
- package/.output/modules/inventory/products/product.entity.d.ts +10 -1
- package/.output/modules/inventory/products/product.entity.js +84 -42
- package/.output/modules/inventory/products/product.validator.d.ts +14 -11
- package/.output/modules/inventory/products/product.validator.js +99 -77
- package/.output/modules/inventory/products/validators/code.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/code.validator.js +37 -0
- package/.output/modules/inventory/products/validators/dimension.validator.d.ts +6 -0
- package/.output/modules/inventory/products/validators/dimension.validator.js +43 -0
- package/.output/modules/inventory/products/validators/price.validator.d.ts +4 -0
- package/.output/modules/inventory/products/validators/price.validator.js +30 -0
- package/.output/modules/inventory/products/validators/seo.validator.d.ts +5 -0
- package/.output/modules/inventory/products/validators/seo.validator.js +37 -0
- package/.output/modules/inventory/properties/property.entity.js +42 -25
- package/.output/modules/inventory/properties/property.validator.js +33 -32
- package/.output/modules/search/search.validator.js +36 -26
- package/.output/modules/setting/connections/connection.validator.d.ts +0 -1
- package/.output/modules/setting/connections/connection.validator.js +23 -21
- package/.output/modules/setting/members/member.validator.d.ts +0 -1
- package/.output/modules/setting/members/member.validator.js +0 -1
- package/.output/modules/setting/organization/organization.types.js +86 -86
- package/.output/modules/setting/organization/organization.validator.js +68 -68
- package/.output/modules/setting/social/social.validator.js +15 -14
- package/.output/modules/store/clients/client.entity.js +60 -44
- package/.output/modules/store/clients/client.validator.js +53 -52
- package/.output/modules/store/orders/billing/billing.document.js +5 -7
- package/.output/modules/store/orders/billing/billing.entity.js +31 -33
- package/.output/modules/store/orders/billing/billing.validator.js +27 -28
- package/.output/modules/store/orders/item/item.document.js +5 -5
- package/.output/modules/store/orders/item/item.entity.js +41 -24
- package/.output/modules/store/orders/item/item.schema.js +2 -2
- package/.output/modules/store/orders/item/item.validator.js +16 -14
- package/.output/modules/store/orders/order.entity.d.ts +2 -1
- package/.output/modules/store/orders/order.entity.js +77 -55
- package/.output/modules/store/orders/order.validator.js +60 -57
- package/.output/modules/store/orders/payment/payment.entity.js +15 -13
- package/.output/modules/store/orders/payment/payment.schema.js +2 -2
- package/.output/modules/store/orders/shipping/shipping.document.js +5 -7
- package/.output/modules/store/orders/shipping/shipping.entity.js +31 -33
- package/.output/modules/store/orders/shipping/shipping.validator.js +27 -28
- package/.output/modules/store/orders/status/status.document.js +5 -5
- package/.output/modules/store/orders/status/status.entity.js +24 -24
- package/.output/modules/users/user.validator.js +37 -41
- package/.output/types.d.ts +2 -4
- package/package.json +11 -3
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -10,82 +25,89 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.UpdateProductValidator = exports.CreateProductValidator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
28
|
+
var class_transformer_1 = require("class-transformer");
|
|
29
|
+
var class_validator_1 = require("class-validator");
|
|
30
|
+
require("reflect-metadata");
|
|
31
|
+
var code_validator_1 = require("./validators/code.validator");
|
|
32
|
+
var dimension_validator_1 = require("./validators/dimension.validator");
|
|
33
|
+
var price_validator_1 = require("./validators/price.validator");
|
|
34
|
+
var seo_validator_1 = require("./validators/seo.validator");
|
|
35
|
+
var CreateProductValidator = (function () {
|
|
36
|
+
function CreateProductValidator() {
|
|
37
|
+
this.name = String();
|
|
38
|
+
this.description = String();
|
|
39
|
+
this.active = Boolean(1);
|
|
40
|
+
this.category = null;
|
|
41
|
+
this.brand = null;
|
|
42
|
+
this.files = [];
|
|
43
|
+
this.hashtags = [];
|
|
44
|
+
this.price = new price_validator_1.ProductPriceValidator();
|
|
45
|
+
this.seo = new seo_validator_1.ProductSeoValidator();
|
|
46
|
+
this.dimension = new dimension_validator_1.ProductDimensionValidator();
|
|
47
|
+
this.code = new code_validator_1.ProductCodeValidator();
|
|
48
|
+
}
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], CreateProductValidator.prototype, "name", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], CreateProductValidator.prototype, "description", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsBoolean)(),
|
|
60
|
+
(0, class_validator_1.IsOptional)(),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], CreateProductValidator.prototype, "active", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsMongoId)(),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], CreateProductValidator.prototype, "category", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.IsMongoId)(),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], CreateProductValidator.prototype, "brand", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
75
|
+
(0, class_validator_1.IsOptional)(),
|
|
76
|
+
__metadata("design:type", Array)
|
|
77
|
+
], CreateProductValidator.prototype, "files", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
80
|
+
__metadata("design:type", Array)
|
|
81
|
+
], CreateProductValidator.prototype, "hashtags", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.ValidateNested)(),
|
|
84
|
+
(0, class_validator_1.IsNotEmptyObject)(),
|
|
85
|
+
(0, class_transformer_1.Type)(function () { return price_validator_1.ProductPriceValidator; }),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], CreateProductValidator.prototype, "price", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, class_validator_1.ValidateNested)(),
|
|
90
|
+
(0, class_transformer_1.Type)(function () { return seo_validator_1.ProductSeoValidator; }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], CreateProductValidator.prototype, "seo", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.ValidateNested)(),
|
|
95
|
+
(0, class_transformer_1.Type)(function () { return dimension_validator_1.ProductDimensionValidator; }),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], CreateProductValidator.prototype, "dimension", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.ValidateNested)(),
|
|
100
|
+
(0, class_transformer_1.Type)(function () { return code_validator_1.ProductCodeValidator; }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], CreateProductValidator.prototype, "code", void 0);
|
|
103
|
+
return CreateProductValidator;
|
|
104
|
+
}());
|
|
52
105
|
exports.CreateProductValidator = CreateProductValidator;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, class_validator_1.IsString)(),
|
|
63
|
-
(0, class_validator_1.IsOptional)(),
|
|
64
|
-
__metadata("design:type", String)
|
|
65
|
-
], UpdateProductValidator.prototype, "name", void 0);
|
|
66
|
-
__decorate([
|
|
67
|
-
(0, class_validator_1.IsString)(),
|
|
68
|
-
(0, class_validator_1.IsOptional)(),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], UpdateProductValidator.prototype, "description", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, class_validator_1.IsNumber)(),
|
|
73
|
-
(0, class_validator_1.IsOptional)(),
|
|
74
|
-
__metadata("design:type", Object)
|
|
75
|
-
], UpdateProductValidator.prototype, "price", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, class_validator_1.IsOptional)(),
|
|
78
|
-
(0, class_validator_1.IsMongoId)(),
|
|
79
|
-
__metadata("design:type", String)
|
|
80
|
-
], UpdateProductValidator.prototype, "category", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, class_validator_1.IsOptional)(),
|
|
83
|
-
(0, class_validator_1.IsMongoId)(),
|
|
84
|
-
__metadata("design:type", String)
|
|
85
|
-
], UpdateProductValidator.prototype, "brand", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
(0, class_transformer_1.Transform)(({ value }) => value.map(({ _id }) => _id)),
|
|
88
|
-
(0, class_validator_1.IsOptional)(),
|
|
89
|
-
__metadata("design:type", Array)
|
|
90
|
-
], UpdateProductValidator.prototype, "files", void 0);
|
|
106
|
+
var UpdateProductValidator = (function (_super) {
|
|
107
|
+
__extends(UpdateProductValidator, _super);
|
|
108
|
+
function UpdateProductValidator() {
|
|
109
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
110
|
+
}
|
|
111
|
+
return UpdateProductValidator;
|
|
112
|
+
}(CreateProductValidator));
|
|
91
113
|
exports.UpdateProductValidator = UpdateProductValidator;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductCodeValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var ProductCodeValidator = (function () {
|
|
15
|
+
function ProductCodeValidator() {
|
|
16
|
+
this.sku = String();
|
|
17
|
+
this.gtin = String();
|
|
18
|
+
this.mpn = String();
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], ProductCodeValidator.prototype, "sku", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], ProductCodeValidator.prototype, "gtin", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], ProductCodeValidator.prototype, "mpn", void 0);
|
|
35
|
+
return ProductCodeValidator;
|
|
36
|
+
}());
|
|
37
|
+
exports.ProductCodeValidator = ProductCodeValidator;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductDimensionValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var ProductDimensionValidator = (function () {
|
|
15
|
+
function ProductDimensionValidator() {
|
|
16
|
+
this.weight = 0;
|
|
17
|
+
this.height = 0;
|
|
18
|
+
this.width = 0;
|
|
19
|
+
this.depth = 0;
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsNumber)(),
|
|
23
|
+
(0, class_validator_1.IsOptional)(),
|
|
24
|
+
__metadata("design:type", Object)
|
|
25
|
+
], ProductDimensionValidator.prototype, "weight", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsNumber)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], ProductDimensionValidator.prototype, "height", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsNumber)(),
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], ProductDimensionValidator.prototype, "width", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsNumber)(),
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
|
+
], ProductDimensionValidator.prototype, "depth", void 0);
|
|
41
|
+
return ProductDimensionValidator;
|
|
42
|
+
}());
|
|
43
|
+
exports.ProductDimensionValidator = ProductDimensionValidator;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductPriceValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var ProductPriceValidator = (function () {
|
|
15
|
+
function ProductPriceValidator() {
|
|
16
|
+
this.sale = 0;
|
|
17
|
+
this.purchase = 0;
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsNumber)(),
|
|
21
|
+
__metadata("design:type", Object)
|
|
22
|
+
], ProductPriceValidator.prototype, "sale", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsNumber)(),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
__metadata("design:type", Object)
|
|
27
|
+
], ProductPriceValidator.prototype, "purchase", void 0);
|
|
28
|
+
return ProductPriceValidator;
|
|
29
|
+
}());
|
|
30
|
+
exports.ProductPriceValidator = ProductPriceValidator;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ProductSeoValidator = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var ProductSeoValidator = (function () {
|
|
15
|
+
function ProductSeoValidator() {
|
|
16
|
+
this.title = String();
|
|
17
|
+
this.slug = String();
|
|
18
|
+
this.description = String();
|
|
19
|
+
}
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsString)(),
|
|
22
|
+
(0, class_validator_1.IsOptional)(),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], ProductSeoValidator.prototype, "title", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
__metadata("design:type", Object)
|
|
29
|
+
], ProductSeoValidator.prototype, "slug", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], ProductSeoValidator.prototype, "description", void 0);
|
|
35
|
+
return ProductSeoValidator;
|
|
36
|
+
}());
|
|
37
|
+
exports.ProductSeoValidator = ProductSeoValidator;
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
2
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -10,29 +25,31 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.PropertyEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
__decorate([
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
], PropertyEntity.prototype, "name", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
], PropertyEntity.prototype, "title", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
], PropertyEntity.prototype, "type", void 0);
|
|
35
|
-
PropertyEntity = __decorate([
|
|
36
|
-
|
|
37
|
-
], PropertyEntity);
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var property_validator_1 = require("./property.validator");
|
|
32
|
+
var PropertyEntity = (function (_super) {
|
|
33
|
+
__extends(PropertyEntity, _super);
|
|
34
|
+
function PropertyEntity() {
|
|
35
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
}
|
|
37
|
+
PropertyEntity.$index = 'inventory_properties';
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], PropertyEntity.prototype, "name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], PropertyEntity.prototype, "title", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: property_validator_1.PropertyType.STRING }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], PropertyEntity.prototype, "type", void 0);
|
|
50
|
+
PropertyEntity = __decorate([
|
|
51
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
52
|
+
], PropertyEntity);
|
|
53
|
+
return PropertyEntity;
|
|
54
|
+
}(abstract_entity_1.AbstractEntity));
|
|
38
55
|
exports.PropertyEntity = PropertyEntity;
|
|
@@ -10,41 +10,42 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UpdatePropertyValidator = exports.CreatePropertyValidator = exports.PropertyType = void 0;
|
|
13
|
-
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
14
|
var PropertyType;
|
|
15
15
|
(function (PropertyType) {
|
|
16
16
|
PropertyType["STRING"] = "STRING";
|
|
17
17
|
})(PropertyType = exports.PropertyType || (exports.PropertyType = {}));
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
var CreatePropertyValidator = (function () {
|
|
19
|
+
function CreatePropertyValidator() {
|
|
20
|
+
}
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CreatePropertyValidator.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CreatePropertyValidator.prototype, "title", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CreatePropertyValidator.prototype, "type", void 0);
|
|
33
|
+
return CreatePropertyValidator;
|
|
34
|
+
}());
|
|
35
35
|
exports.CreatePropertyValidator = CreatePropertyValidator;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
36
|
+
var UpdatePropertyValidator = (function () {
|
|
37
|
+
function UpdatePropertyValidator() {
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsString)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], UpdatePropertyValidator.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
(0, class_validator_1.IsOptional)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], UpdatePropertyValidator.prototype, "title", void 0);
|
|
49
|
+
return UpdatePropertyValidator;
|
|
50
|
+
}());
|
|
50
51
|
exports.UpdatePropertyValidator = UpdatePropertyValidator;
|
|
@@ -10,30 +10,40 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SearchValidator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
var class_transformer_1 = require("class-transformer");
|
|
14
|
+
var class_validator_1 = require("class-validator");
|
|
15
|
+
var SearchValidator = (function () {
|
|
16
|
+
function SearchValidator() {
|
|
17
|
+
this.from = 0;
|
|
18
|
+
}
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsOptional)(),
|
|
21
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
22
|
+
var value = _a.value;
|
|
23
|
+
return JSON.parse(value || 'null');
|
|
24
|
+
}),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], SearchValidator.prototype, "query", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
30
|
+
var value = _a.value;
|
|
31
|
+
return Number(value);
|
|
32
|
+
}),
|
|
33
|
+
(0, class_validator_1.IsInt)(),
|
|
34
|
+
(0, class_validator_1.Min)(1),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], SearchValidator.prototype, "size", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsOptional)(),
|
|
39
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
40
|
+
var value = _a.value;
|
|
41
|
+
return Number(value);
|
|
42
|
+
}),
|
|
43
|
+
(0, class_validator_1.IsInt)(),
|
|
44
|
+
(0, class_validator_1.Min)(0),
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
|
+
], SearchValidator.prototype, "from", void 0);
|
|
47
|
+
return SearchValidator;
|
|
48
|
+
}());
|
|
39
49
|
exports.SearchValidator = SearchValidator;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AddOrganizationEnabledConnection, UpdateOrganizationEnabledConnection } from 'auth0';
|
|
2
|
-
import 'reflect-metadata';
|
|
3
2
|
export declare class CreateConnectionValidator implements AddOrganizationEnabledConnection {
|
|
4
3
|
connection_id: AddOrganizationEnabledConnection['connection_id'];
|
|
5
4
|
assign_membership_on_login: AddOrganizationEnabledConnection['assign_membership_on_login'];
|
|
@@ -10,26 +10,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UpdateConnectionValidator = exports.CreateConnectionValidator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var CreateConnectionValidator = (function () {
|
|
15
|
+
function CreateConnectionValidator() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", Object)
|
|
20
|
+
], CreateConnectionValidator.prototype, "connection_id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsBoolean)(),
|
|
23
|
+
__metadata("design:type", Object)
|
|
24
|
+
], CreateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
25
|
+
return CreateConnectionValidator;
|
|
26
|
+
}());
|
|
27
27
|
exports.CreateConnectionValidator = CreateConnectionValidator;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
__decorate([
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
], UpdateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
28
|
+
var UpdateConnectionValidator = (function () {
|
|
29
|
+
function UpdateConnectionValidator() {
|
|
30
|
+
}
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsBoolean)(),
|
|
33
|
+
__metadata("design:type", Object)
|
|
34
|
+
], UpdateConnectionValidator.prototype, "assign_membership_on_login", void 0);
|
|
35
|
+
return UpdateConnectionValidator;
|
|
36
|
+
}());
|
|
35
37
|
exports.UpdateConnectionValidator = UpdateConnectionValidator;
|