@merkaly/api 0.2.2-8 → 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 +69 -0
- 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 +50 -0
- package/.output/modules/inventory/brands/brand.validator.js +45 -0
- 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 +61 -0
- 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 +57 -0
- 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 +101 -0
- 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 +118 -0
- 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 -8
- 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/setting/members/member.validator.js +2 -0
- 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 +22 -11
- package/.output/main.d.ts +0 -0
- package/.output/modules/auth/organizations/organization.validator.d.ts +0 -6
- package/.output/modules/store/cart/cart.entity.d.ts +0 -14
- package/.output/modules/store/cart/cart.validator.d.ts +0 -11
- package/.output/modules/store/orders/order.entity.d.ts +0 -14
- package/.output/modules/store/orders/order.validator.d.ts +0 -10
- package/.output/modules/store/orders/status/status.entity.d.ts +0 -13
|
@@ -0,0 +1,57 @@
|
|
|
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.DimensionEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var DimensionEntity = (function (_super) {
|
|
32
|
+
__extends(DimensionEntity, _super);
|
|
33
|
+
function DimensionEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], DimensionEntity.prototype, "weight", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], DimensionEntity.prototype, "height", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], DimensionEntity.prototype, "width", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], DimensionEntity.prototype, "depth", void 0);
|
|
52
|
+
DimensionEntity = __decorate([
|
|
53
|
+
(0, schema_decorator_1.Schema)()
|
|
54
|
+
], DimensionEntity);
|
|
55
|
+
return DimensionEntity;
|
|
56
|
+
}(Map));
|
|
57
|
+
exports.DimensionEntity = DimensionEntity;
|
|
@@ -0,0 +1,49 @@
|
|
|
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.PriceEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var PriceEntity = (function (_super) {
|
|
32
|
+
__extends(PriceEntity, _super);
|
|
33
|
+
function PriceEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, required: true }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], PriceEntity.prototype, "sale", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], PriceEntity.prototype, "purchase", void 0);
|
|
44
|
+
PriceEntity = __decorate([
|
|
45
|
+
(0, schema_decorator_1.Schema)()
|
|
46
|
+
], PriceEntity);
|
|
47
|
+
return PriceEntity;
|
|
48
|
+
}(Map));
|
|
49
|
+
exports.PriceEntity = PriceEntity;
|
|
@@ -0,0 +1,53 @@
|
|
|
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.SeoEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var SeoEntity = (function (_super) {
|
|
32
|
+
__extends(SeoEntity, _super);
|
|
33
|
+
function SeoEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SeoEntity.prototype, "title", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], SeoEntity.prototype, "slug", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SeoEntity.prototype, "description", void 0);
|
|
48
|
+
SeoEntity = __decorate([
|
|
49
|
+
(0, schema_decorator_1.Schema)()
|
|
50
|
+
], SeoEntity);
|
|
51
|
+
return SeoEntity;
|
|
52
|
+
}(Map));
|
|
53
|
+
exports.SeoEntity = SeoEntity;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AbstractDocument } from '../../../abstract/abstract.document';
|
|
2
|
+
export declare class ProductDocument extends AbstractDocument {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
measurement: string;
|
|
6
|
+
price: number;
|
|
7
|
+
brand?: ProductBrand;
|
|
8
|
+
category?: ProductCategory;
|
|
9
|
+
files: ProductFile[];
|
|
10
|
+
}
|
|
11
|
+
interface ProductCategory {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
interface ProductBrand {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
19
|
+
interface ProductFile {
|
|
20
|
+
id: string;
|
|
21
|
+
url: string;
|
|
22
|
+
alt: string;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ProductDocument = void 0;
|
|
19
|
+
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
+
var ProductDocument = (function (_super) {
|
|
21
|
+
__extends(ProductDocument, _super);
|
|
22
|
+
function ProductDocument() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.name = String();
|
|
25
|
+
_this.description = String();
|
|
26
|
+
_this.measurement = String();
|
|
27
|
+
_this.price = Number();
|
|
28
|
+
_this.files = [];
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
return ProductDocument;
|
|
32
|
+
}(abstract_document_1.AbstractDocument));
|
|
33
|
+
exports.ProductDocument = ProductDocument;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AbstractEntity } from '../../../abstract/abstract.entity';
|
|
2
2
|
import { AssetEntity } from '../../assets/asset.entity';
|
|
3
3
|
import { BrandEntity } from '../brands/brand.entity';
|
|
4
4
|
import { CategoryEntity } from '../categories/category.entity';
|
|
5
|
-
|
|
5
|
+
import { CodeEntity } from './entities/code.entity';
|
|
6
|
+
import { DimensionEntity } from './entities/dimension.entity';
|
|
7
|
+
import { PriceEntity } from './entities/price.entity';
|
|
8
|
+
import { SeoEntity } from './entities/seo.entity';
|
|
9
|
+
export declare class ProductEntity extends AbstractEntity {
|
|
6
10
|
static readonly $index = "inventory_products";
|
|
7
11
|
name: string;
|
|
12
|
+
measurement: string;
|
|
13
|
+
active: boolean;
|
|
8
14
|
description: string;
|
|
9
|
-
|
|
15
|
+
hashtags: string[];
|
|
10
16
|
category?: CategoryEntity;
|
|
11
17
|
brand?: BrandEntity;
|
|
12
18
|
files: AssetEntity[];
|
|
19
|
+
price: PriceEntity;
|
|
20
|
+
code: CodeEntity;
|
|
21
|
+
dimension: DimensionEntity;
|
|
22
|
+
seo: SeoEntity;
|
|
13
23
|
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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.ProductEntity = 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 asset_entity_1 = require("../../assets/asset.entity");
|
|
32
|
+
var brand_entity_1 = require("../brands/brand.entity");
|
|
33
|
+
var category_entity_1 = require("../categories/category.entity");
|
|
34
|
+
var code_entity_1 = require("./entities/code.entity");
|
|
35
|
+
var dimension_entity_1 = require("./entities/dimension.entity");
|
|
36
|
+
var price_entity_1 = require("./entities/price.entity");
|
|
37
|
+
var seo_entity_1 = require("./entities/seo.entity");
|
|
38
|
+
var ProductEntity = (function (_super) {
|
|
39
|
+
__extends(ProductEntity, _super);
|
|
40
|
+
function ProductEntity() {
|
|
41
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
42
|
+
_this.active = true;
|
|
43
|
+
_this.hashtags = [];
|
|
44
|
+
_this.files = [];
|
|
45
|
+
return _this;
|
|
46
|
+
}
|
|
47
|
+
ProductEntity.$index = 'inventory_products';
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], ProductEntity.prototype, "name", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 256 }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], ProductEntity.prototype, "measurement", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], ProductEntity.prototype, "active", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], ProductEntity.prototype, "description", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
|
|
66
|
+
__metadata("design:type", Array)
|
|
67
|
+
], ProductEntity.prototype, "hashtags", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: category_entity_1.CategoryEntity.$index }),
|
|
70
|
+
__metadata("design:type", category_entity_1.CategoryEntity)
|
|
71
|
+
], ProductEntity.prototype, "category", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: brand_entity_1.BrandEntity.$index }),
|
|
74
|
+
__metadata("design:type", brand_entity_1.BrandEntity)
|
|
75
|
+
], ProductEntity.prototype, "brand", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId, ref: asset_entity_1.AssetEntity.$index }] }),
|
|
78
|
+
__metadata("design:type", Array)
|
|
79
|
+
], ProductEntity.prototype, "files", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return price_entity_1.PriceEntity; }, default: new Map() }),
|
|
82
|
+
__metadata("design:type", price_entity_1.PriceEntity)
|
|
83
|
+
], ProductEntity.prototype, "price", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return code_entity_1.CodeEntity; }, default: new Map() }),
|
|
86
|
+
__metadata("design:type", code_entity_1.CodeEntity)
|
|
87
|
+
], ProductEntity.prototype, "code", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return dimension_entity_1.DimensionEntity; }, default: new Map() }),
|
|
90
|
+
__metadata("design:type", dimension_entity_1.DimensionEntity)
|
|
91
|
+
], ProductEntity.prototype, "dimension", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return seo_entity_1.SeoEntity; }, default: new Map() }),
|
|
94
|
+
__metadata("design:type", seo_entity_1.SeoEntity)
|
|
95
|
+
], ProductEntity.prototype, "seo", void 0);
|
|
96
|
+
ProductEntity = __decorate([
|
|
97
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
98
|
+
], ProductEntity);
|
|
99
|
+
return ProductEntity;
|
|
100
|
+
}(abstract_entity_1.AbstractEntity));
|
|
101
|
+
exports.ProductEntity = ProductEntity;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.ProductFixture = void 0;
|
|
19
|
+
var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
|
|
20
|
+
var product_document_1 = require("./product.document");
|
|
21
|
+
var ProductFixture = (function (_super) {
|
|
22
|
+
__extends(ProductFixture, _super);
|
|
23
|
+
function ProductFixture() {
|
|
24
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
+
}
|
|
26
|
+
ProductFixture.prototype.normal = function () {
|
|
27
|
+
var _this = this;
|
|
28
|
+
var product = new product_document_1.ProductDocument({
|
|
29
|
+
_id: this.$faker.datatype.uuid(),
|
|
30
|
+
createdAt: this.$faker.date.past(1),
|
|
31
|
+
updatedAt: this.$faker.date.past(1),
|
|
32
|
+
});
|
|
33
|
+
product.name = this.$faker.vehicle.vehicle();
|
|
34
|
+
product.description = this.$faker.commerce.productDescription();
|
|
35
|
+
product.price = Number(this.$faker.commerce.price(1000, 10000, 2));
|
|
36
|
+
product.brand = {
|
|
37
|
+
id: this.$faker.datatype.uuid(),
|
|
38
|
+
name: this.$faker.vehicle.model(),
|
|
39
|
+
};
|
|
40
|
+
product.category = {
|
|
41
|
+
id: this.$faker.datatype.uuid(),
|
|
42
|
+
name: this.$faker.vehicle.manufacturer(),
|
|
43
|
+
};
|
|
44
|
+
var randomFiles = this.$faker.datatype.number({ min: 1, max: 8 });
|
|
45
|
+
product.files = Array(randomFiles).fill(0).map(function (value) { return ({
|
|
46
|
+
id: _this.$faker.datatype.uuid(),
|
|
47
|
+
alt: _this.$faker.lorem.paragraph(),
|
|
48
|
+
url: _this.$faker.image.transport(215, 215, true) + "?" + product.id,
|
|
49
|
+
}); });
|
|
50
|
+
return product;
|
|
51
|
+
};
|
|
52
|
+
return ProductFixture;
|
|
53
|
+
}(abstract_fixture_1.AbstractFixture));
|
|
54
|
+
exports.ProductFixture = ProductFixture;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { ProductCodeValidator } from './validators/code.validator';
|
|
3
|
+
import { ProductDimensionValidator } from './validators/dimension.validator';
|
|
4
|
+
import { ProductPriceValidator } from './validators/price.validator';
|
|
5
|
+
import { ProductSeoValidator } from './validators/seo.validator';
|
|
2
6
|
export declare class CreateProductValidator {
|
|
3
7
|
name: string;
|
|
4
|
-
description
|
|
5
|
-
|
|
8
|
+
description: string;
|
|
9
|
+
measurement: string;
|
|
10
|
+
active: boolean;
|
|
6
11
|
category?: string;
|
|
7
12
|
brand?: string;
|
|
8
|
-
files:
|
|
13
|
+
files: string[];
|
|
14
|
+
hashtags: string[];
|
|
15
|
+
price: ProductPriceValidator;
|
|
16
|
+
seo: ProductSeoValidator;
|
|
17
|
+
dimension: ProductDimensionValidator;
|
|
18
|
+
code: ProductCodeValidator;
|
|
9
19
|
}
|
|
10
|
-
export declare class UpdateProductValidator {
|
|
11
|
-
name?: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
price?: any;
|
|
14
|
-
category?: string;
|
|
15
|
-
brand?: string;
|
|
16
|
-
files: any[];
|
|
20
|
+
export declare class UpdateProductValidator extends CreateProductValidator {
|
|
17
21
|
}
|
|
@@ -0,0 +1,118 @@
|
|
|
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.UpdateProductValidator = exports.CreateProductValidator = void 0;
|
|
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
|
+
}());
|
|
110
|
+
exports.CreateProductValidator = CreateProductValidator;
|
|
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));
|
|
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;
|