@merkaly/api 0.2.2-9 → 0.2.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/.output/abstract/abstract.document.d.ts +10 -0
- package/.output/abstract/abstract.document.js +13 -0
- package/.output/{configs/app.entity.d.ts → abstract/abstract.entity.d.ts} +3 -3
- package/.output/abstract/abstract.entity.js +54 -0
- package/.output/abstract/abstract.fixture.d.ts +4 -0
- package/.output/abstract/abstract.fixture.js +11 -0
- package/.output/abstract/abstract.validator.d.ts +18 -0
- package/.output/abstract/abstract.validator.js +73 -0
- package/.output/modules/assets/asset.entity.d.ts +2 -2
- package/.output/modules/assets/asset.entity.js +59 -33
- package/.output/modules/content/banners/banner.document.d.ts +6 -0
- package/.output/modules/content/banners/banner.document.js +30 -0
- package/.output/modules/content/banners/banner.entity.d.ts +7 -0
- package/.output/modules/content/banners/banner.entity.js +54 -0
- package/.output/modules/content/banners/banner.fixture.d.ts +5 -0
- package/.output/modules/content/banners/banner.fixture.js +39 -0
- package/.output/modules/content/banners/banner.validator.d.ts +8 -0
- package/.output/modules/content/banners/banner.validator.js +63 -0
- package/.output/modules/content/pages/page.document.d.ts +10 -0
- package/.output/modules/content/pages/page.document.js +32 -0
- package/.output/modules/content/pages/page.entity.d.ts +11 -0
- package/.output/modules/content/pages/page.entity.js +69 -0
- package/.output/modules/content/pages/page.fixture.d.ts +5 -0
- package/.output/modules/content/pages/page.fixture.js +39 -0
- package/.output/modules/content/pages/page.types.d.ts +8 -0
- package/.output/modules/content/pages/page.types.js +13 -0
- package/.output/modules/content/pages/page.validator.d.ts +11 -0
- package/.output/modules/content/pages/page.validator.js +73 -0
- package/.output/modules/insight/validators/order.validator.d.ts +4 -0
- package/.output/modules/insight/validators/order.validator.js +27 -0
- package/.output/modules/inventory/brands/brand.document.d.ts +5 -0
- package/.output/modules/inventory/brands/brand.document.js +30 -0
- package/.output/modules/inventory/brands/brand.entity.d.ts +2 -2
- package/.output/modules/inventory/brands/brand.entity.js +40 -17
- package/.output/modules/inventory/brands/brand.validator.js +34 -25
- package/.output/modules/inventory/categories/category.document.d.ts +6 -0
- package/.output/modules/inventory/categories/category.document.js +31 -0
- package/.output/modules/inventory/categories/category.entity.d.ts +5 -2
- package/.output/modules/inventory/categories/category.entity.js +51 -17
- package/.output/modules/inventory/categories/category.fixture.d.ts +5 -0
- package/.output/modules/inventory/categories/category.fixture.js +38 -0
- package/.output/modules/inventory/categories/category.validator.d.ts +2 -0
- package/.output/modules/inventory/categories/category.validator.js +46 -25
- 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.d.ts +24 -0
- package/.output/modules/inventory/products/product.document.js +33 -0
- package/.output/modules/inventory/products/product.entity.d.ts +13 -3
- package/.output/modules/inventory/products/product.entity.js +91 -36
- package/.output/modules/inventory/products/product.fixture.d.ts +5 -0
- package/.output/modules/inventory/products/product.fixture.js +54 -0
- package/.output/modules/inventory/products/product.validator.d.ts +15 -11
- package/.output/modules/inventory/products/product.validator.js +107 -65
- 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.d.ts +7 -0
- package/.output/modules/inventory/properties/property.entity.js +55 -0
- package/.output/modules/inventory/properties/property.validator.d.ts +12 -0
- package/.output/modules/inventory/properties/property.validator.js +51 -0
- package/.output/modules/sales/clients/client.entity.d.ts +12 -0
- package/.output/modules/sales/clients/client.entity.js +73 -0
- package/.output/modules/sales/clients/client.validator.d.ts +12 -0
- package/.output/modules/sales/clients/client.validator.js +67 -0
- package/.output/modules/{store/orders/billing/billing.validator.d.ts → sales/orders/billing/billing.document.d.ts} +4 -4
- package/.output/modules/sales/orders/billing/billing.document.js +9 -0
- package/.output/modules/{store → sales}/orders/billing/billing.entity.d.ts +0 -0
- package/.output/modules/sales/orders/billing/billing.entity.js +44 -0
- package/.output/modules/sales/orders/billing/billing.validator.d.ts +7 -0
- package/.output/modules/sales/orders/billing/billing.validator.js +40 -0
- package/.output/modules/sales/orders/item/item.document.d.ts +6 -0
- package/.output/modules/sales/orders/item/item.document.js +9 -0
- package/.output/modules/sales/orders/item/item.entity.d.ts +7 -0
- package/.output/modules/sales/orders/item/item.entity.js +54 -0
- package/.output/modules/{store/orders/item/item.entity.d.ts → sales/orders/item/item.schema.d.ts} +3 -9
- package/.output/modules/sales/orders/item/item.schema.js +6 -0
- package/.output/modules/{store → sales}/orders/item/item.validator.d.ts +0 -0
- package/.output/modules/sales/orders/item/item.validator.js +29 -0
- package/.output/modules/sales/orders/order.entity.d.ts +19 -0
- package/.output/modules/sales/orders/order.entity.js +82 -0
- package/.output/modules/sales/orders/order.validator.d.ts +18 -0
- package/.output/modules/sales/orders/order.validator.js +75 -0
- package/.output/modules/sales/orders/payment/payment.entity.d.ts +4 -0
- package/.output/modules/sales/orders/payment/payment.entity.js +28 -0
- package/.output/modules/sales/orders/payment/payment.schema.d.ts +27 -0
- package/.output/modules/sales/orders/payment/payment.schema.js +6 -0
- package/.output/modules/sales/orders/payment/payment.validator.d.ts +6 -0
- package/.output/modules/sales/orders/payment/payment.validator.js +10 -0
- package/.output/modules/{store/orders/shipping/shipping.validator.d.ts → sales/orders/shipping/shipping.document.d.ts} +4 -4
- package/.output/modules/sales/orders/shipping/shipping.document.js +9 -0
- package/.output/modules/{store → sales}/orders/shipping/shipping.entity.d.ts +0 -0
- package/.output/modules/sales/orders/shipping/shipping.entity.js +44 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +7 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.js +40 -0
- package/.output/modules/sales/orders/status/status.document.d.ts +5 -0
- package/.output/modules/sales/orders/status/status.document.js +9 -0
- package/.output/modules/sales/orders/status/status.entity.d.ts +6 -0
- package/.output/modules/sales/orders/status/status.entity.js +37 -0
- package/.output/modules/sales/orders/status/status.validator.d.ts +8 -0
- package/.output/modules/sales/orders/status/status.validator.js +12 -0
- package/.output/modules/search/search.validator.d.ts +6 -0
- package/.output/modules/search/search.validator.js +49 -0
- package/.output/modules/{auth → setting}/connections/connection.validator.d.ts +0 -1
- package/.output/modules/setting/connections/connection.validator.js +37 -0
- package/.output/modules/setting/layout/layout.document.d.ts +5 -0
- package/.output/modules/setting/layout/layout.document.js +29 -0
- package/.output/modules/setting/layout/layout.entity.d.ts +6 -0
- package/.output/modules/setting/layout/layout.entity.js +46 -0
- package/.output/modules/{auth → setting}/members/member.validator.d.ts +0 -1
- package/.output/modules/{auth → setting}/members/member.validator.js +0 -1
- package/.output/modules/setting/organization/organization.document.d.ts +15 -0
- package/.output/modules/setting/organization/organization.document.js +31 -0
- package/.output/modules/setting/organization/organization.entity.d.ts +4 -0
- package/.output/modules/setting/organization/organization.entity.js +28 -0
- package/.output/modules/setting/organization/organization.types.d.ts +22 -0
- package/.output/modules/setting/organization/organization.types.js +102 -0
- package/.output/modules/setting/organization/organization.validator.d.ts +17 -0
- package/.output/modules/setting/organization/organization.validator.js +83 -0
- package/.output/modules/setting/theme/theme.entity.d.ts +6 -0
- package/.output/modules/setting/theme/theme.entity.js +46 -0
- package/.output/modules/users/user.validator.d.ts +10 -0
- package/.output/modules/users/user.validator.js +50 -0
- package/.output/types.d.ts +23 -0
- package/.output/types.js +2 -0
- package/package.json +21 -9
- package/.output/configs/app.entity.js +0 -28
- package/.output/main.d.ts +0 -0
- package/.output/modules/auth/connections/connection.validator.js +0 -29
- package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
- package/.output/modules/auth/organizations/organization.validator.js +0 -27
- package/.output/modules/settings/payments/payment.entity.d.ts +0 -10
- package/.output/modules/settings/payments/payment.entity.js +0 -35
- package/.output/modules/store/cart/cart.entity.d.ts +0 -14
- package/.output/modules/store/cart/cart.entity.js +0 -39
- package/.output/modules/store/cart/cart.validator.d.ts +0 -13
- package/.output/modules/store/cart/cart.validator.js +0 -48
- package/.output/modules/store/orders/billing/billing.entity.js +0 -38
- package/.output/modules/store/orders/billing/billing.validator.js +0 -36
- package/.output/modules/store/orders/item/item.entity.js +0 -32
- package/.output/modules/store/orders/item/item.validator.js +0 -22
- package/.output/modules/store/orders/order.entity.d.ts +0 -15
- package/.output/modules/store/orders/order.entity.js +0 -47
- package/.output/modules/store/orders/order.validator.d.ts +0 -12
- package/.output/modules/store/orders/order.validator.js +0 -42
- package/.output/modules/store/orders/shipping/shipping.entity.js +0 -38
- package/.output/modules/store/orders/shipping/shipping.validator.js +0 -36
- package/.output/modules/store/orders/status/status.entity.d.ts +0 -13
- package/.output/modules/store/orders/status/status.entity.js +0 -39
|
@@ -1,76 +1,118 @@
|
|
|
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);
|
|
5
20
|
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
21
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
22
|
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
8
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
27
|
exports.UpdateProductValidator = exports.CreateProductValidator = void 0;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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.measurement = String();
|
|
40
|
+
this.active = Boolean(1);
|
|
41
|
+
this.category = null;
|
|
42
|
+
this.brand = null;
|
|
43
|
+
this.files = [];
|
|
44
|
+
this.hashtags = [];
|
|
45
|
+
this.price = new price_validator_1.ProductPriceValidator();
|
|
46
|
+
this.seo = new seo_validator_1.ProductSeoValidator();
|
|
47
|
+
this.dimension = new dimension_validator_1.ProductDimensionValidator();
|
|
48
|
+
this.code = new code_validator_1.ProductCodeValidator();
|
|
49
|
+
}
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], CreateProductValidator.prototype, "name", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
(0, class_validator_1.IsOptional)(),
|
|
57
|
+
__metadata("design:type", Object)
|
|
58
|
+
], CreateProductValidator.prototype, "description", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_validator_1.IsString)(),
|
|
61
|
+
__metadata("design:type", Object)
|
|
62
|
+
], CreateProductValidator.prototype, "measurement", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsBoolean)(),
|
|
65
|
+
(0, class_validator_1.IsOptional)(),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], CreateProductValidator.prototype, "active", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.IsMongoId)(),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], CreateProductValidator.prototype, "category", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsMongoId)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], CreateProductValidator.prototype, "brand", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
__metadata("design:type", Array)
|
|
82
|
+
], CreateProductValidator.prototype, "files", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
85
|
+
__metadata("design:type", Array)
|
|
86
|
+
], CreateProductValidator.prototype, "hashtags", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, class_validator_1.ValidateNested)(),
|
|
89
|
+
(0, class_validator_1.IsNotEmptyObject)(),
|
|
90
|
+
(0, class_transformer_1.Type)(function () { return price_validator_1.ProductPriceValidator; }),
|
|
91
|
+
__metadata("design:type", Object)
|
|
92
|
+
], CreateProductValidator.prototype, "price", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, class_validator_1.ValidateNested)(),
|
|
95
|
+
(0, class_transformer_1.Type)(function () { return seo_validator_1.ProductSeoValidator; }),
|
|
96
|
+
__metadata("design:type", Object)
|
|
97
|
+
], CreateProductValidator.prototype, "seo", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, class_validator_1.ValidateNested)(),
|
|
100
|
+
(0, class_transformer_1.Type)(function () { return dimension_validator_1.ProductDimensionValidator; }),
|
|
101
|
+
__metadata("design:type", Object)
|
|
102
|
+
], CreateProductValidator.prototype, "dimension", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.ValidateNested)(),
|
|
105
|
+
(0, class_transformer_1.Type)(function () { return code_validator_1.ProductCodeValidator; }),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], CreateProductValidator.prototype, "code", void 0);
|
|
108
|
+
return CreateProductValidator;
|
|
109
|
+
}());
|
|
43
110
|
exports.CreateProductValidator = CreateProductValidator;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, class_validator_1.IsString)(),
|
|
54
|
-
(0, class_validator_1.IsOptional)()
|
|
55
|
-
], UpdateProductValidator.prototype, "name", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, class_validator_1.IsString)(),
|
|
58
|
-
(0, class_validator_1.IsOptional)()
|
|
59
|
-
], UpdateProductValidator.prototype, "description", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, class_validator_1.IsNumber)(),
|
|
62
|
-
(0, class_validator_1.IsOptional)()
|
|
63
|
-
], UpdateProductValidator.prototype, "price", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, class_validator_1.IsOptional)(),
|
|
66
|
-
(0, class_validator_1.IsMongoId)()
|
|
67
|
-
], UpdateProductValidator.prototype, "category", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, class_validator_1.IsOptional)(),
|
|
70
|
-
(0, class_validator_1.IsMongoId)()
|
|
71
|
-
], UpdateProductValidator.prototype, "brand", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, class_transformer_1.Transform)(({ value }) => value.map(({ _id }) => _id)),
|
|
74
|
-
(0, class_validator_1.IsOptional)()
|
|
75
|
-
], UpdateProductValidator.prototype, "files", void 0);
|
|
111
|
+
var UpdateProductValidator = (function (_super) {
|
|
112
|
+
__extends(UpdateProductValidator, _super);
|
|
113
|
+
function UpdateProductValidator() {
|
|
114
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
115
|
+
}
|
|
116
|
+
return UpdateProductValidator;
|
|
117
|
+
}(CreateProductValidator));
|
|
76
118
|
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;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.PropertyEntity = void 0;
|
|
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));
|
|
55
|
+
exports.PropertyEntity = PropertyEntity;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.UpdatePropertyValidator = exports.CreatePropertyValidator = exports.PropertyType = void 0;
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var PropertyType;
|
|
15
|
+
(function (PropertyType) {
|
|
16
|
+
PropertyType["STRING"] = "STRING";
|
|
17
|
+
})(PropertyType = exports.PropertyType || (exports.PropertyType = {}));
|
|
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
|
+
exports.CreatePropertyValidator = CreatePropertyValidator;
|
|
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
|
+
}());
|
|
51
|
+
exports.UpdatePropertyValidator = UpdatePropertyValidator;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { User } from 'auth0';
|
|
2
|
+
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
3
|
+
export declare class ClientEntity extends AbstractEntity implements User {
|
|
4
|
+
static readonly $index = "store_clients";
|
|
5
|
+
readonly user_id: string;
|
|
6
|
+
readonly email: string;
|
|
7
|
+
readonly email_verified: boolean;
|
|
8
|
+
readonly phone?: string;
|
|
9
|
+
readonly phone_verified: boolean;
|
|
10
|
+
readonly picture?: string;
|
|
11
|
+
readonly name?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.ClientEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var ClientEntity = (function (_super) {
|
|
32
|
+
__extends(ClientEntity, _super);
|
|
33
|
+
function ClientEntity() {
|
|
34
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
_this.email_verified = false;
|
|
36
|
+
_this.phone_verified = false;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
ClientEntity.$index = 'store_clients';
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ClientEntity.prototype, "user_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, unique: true, required: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ClientEntity.prototype, "email", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: false }),
|
|
50
|
+
__metadata("design:type", Boolean)
|
|
51
|
+
], ClientEntity.prototype, "email_verified", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], ClientEntity.prototype, "phone", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: false }),
|
|
58
|
+
__metadata("design:type", Boolean)
|
|
59
|
+
], ClientEntity.prototype, "phone_verified", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], ClientEntity.prototype, "picture", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], ClientEntity.prototype, "name", void 0);
|
|
68
|
+
ClientEntity = __decorate([
|
|
69
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
70
|
+
], ClientEntity);
|
|
71
|
+
return ClientEntity;
|
|
72
|
+
}(abstract_entity_1.AbstractEntity));
|
|
73
|
+
exports.ClientEntity = ClientEntity;
|