@merkaly/api 0.2.2-26 → 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 +1 -1
- package/.output/modules/inventory/products/entities/code.entity.js +40 -23
- package/.output/modules/inventory/products/entities/dimension.entity.d.ts +1 -1
- package/.output/modules/inventory/products/entities/dimension.entity.js +44 -28
- package/.output/modules/inventory/products/entities/price.entity.d.ts +1 -1
- package/.output/modules/inventory/products/entities/price.entity.js +36 -18
- package/.output/modules/inventory/products/entities/seo.entity.d.ts +1 -1
- package/.output/modules/inventory/products/entities/seo.entity.js +40 -23
- package/.output/modules/inventory/products/product.document.js +28 -9
- package/.output/modules/inventory/products/product.entity.d.ts +4 -3
- package/.output/modules/inventory/products/product.entity.js +84 -66
- package/.output/modules/inventory/products/product.validator.d.ts +7 -6
- package/.output/modules/inventory/products/product.validator.js +99 -69
- package/.output/modules/inventory/products/validators/code.validator.js +24 -21
- package/.output/modules/inventory/products/validators/dimension.validator.js +30 -27
- package/.output/modules/inventory/products/validators/price.validator.d.ts +1 -1
- package/.output/modules/inventory/products/validators/price.validator.js +17 -14
- package/.output/modules/inventory/products/validators/seo.validator.js +24 -21
- 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.js +76 -57
- 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/package.json +1 -1
|
@@ -10,46 +10,48 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UpdateCategoryValidator = exports.CreateCategoryValidator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var CreateCategoryValidator = (function () {
|
|
15
|
+
function CreateCategoryValidator() {
|
|
16
|
+
this.icon = 'tag';
|
|
17
|
+
}
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
(0, class_validator_1.Length)(5, 32),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], CreateCategoryValidator.prototype, "name", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
(0, class_validator_1.IsOptional)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CreateCategoryValidator.prototype, "description", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], CreateCategoryValidator.prototype, "icon", void 0);
|
|
33
|
+
return CreateCategoryValidator;
|
|
34
|
+
}());
|
|
34
35
|
exports.CreateCategoryValidator = CreateCategoryValidator;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
var UpdateCategoryValidator = (function () {
|
|
37
|
+
function UpdateCategoryValidator() {
|
|
38
|
+
this.icon = 'tag';
|
|
39
|
+
}
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], UpdateCategoryValidator.prototype, "name", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsString)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], UpdateCategoryValidator.prototype, "description", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", Object)
|
|
54
|
+
], UpdateCategoryValidator.prototype, "icon", void 0);
|
|
55
|
+
return UpdateCategoryValidator;
|
|
56
|
+
}());
|
|
55
57
|
exports.UpdateCategoryValidator = UpdateCategoryValidator;
|
|
@@ -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,27 +25,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.CodeEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
], CodeEntity.prototype, "sku", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
], CodeEntity.prototype, "gtin", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
], CodeEntity.prototype, "mpn", void 0);
|
|
33
|
-
CodeEntity = __decorate([
|
|
34
|
-
|
|
35
|
-
], CodeEntity);
|
|
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 CodeEntity = (function (_super) {
|
|
32
|
+
__extends(CodeEntity, _super);
|
|
33
|
+
function CodeEntity() {
|
|
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
|
+
], CodeEntity.prototype, "sku", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CodeEntity.prototype, "gtin", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CodeEntity.prototype, "mpn", void 0);
|
|
48
|
+
CodeEntity = __decorate([
|
|
49
|
+
(0, schema_decorator_1.Schema)()
|
|
50
|
+
], CodeEntity);
|
|
51
|
+
return CodeEntity;
|
|
52
|
+
}(Map));
|
|
36
53
|
exports.CodeEntity = CodeEntity;
|
|
@@ -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,32 +25,33 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.DimensionEntity = 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
|
-
|
|
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));
|
|
41
57
|
exports.DimensionEntity = DimensionEntity;
|
|
@@ -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,22 +25,25 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.PriceEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
PriceEntity
|
|
29
|
-
|
|
30
|
-
|
|
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));
|
|
31
49
|
exports.PriceEntity = PriceEntity;
|
|
@@ -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,27 +25,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.SeoEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
__decorate([
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
], SeoEntity.prototype, "title", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
], SeoEntity.prototype, "slug", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
], SeoEntity.prototype, "description", void 0);
|
|
33
|
-
SeoEntity = __decorate([
|
|
34
|
-
|
|
35
|
-
], SeoEntity);
|
|
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));
|
|
36
53
|
exports.SeoEntity = SeoEntity;
|
|
@@ -1,13 +1,32 @@
|
|
|
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
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
18
|
exports.ProductDocument = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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.price = Number();
|
|
27
|
+
_this.files = [];
|
|
28
|
+
return _this;
|
|
29
|
+
}
|
|
30
|
+
return ProductDocument;
|
|
31
|
+
}(abstract_document_1.AbstractDocument));
|
|
13
32
|
exports.ProductDocument = ProductDocument;
|
|
@@ -9,13 +9,14 @@ import { SeoEntity } from './entities/seo.entity';
|
|
|
9
9
|
export declare class ProductEntity extends AbstractEntity {
|
|
10
10
|
static readonly $index = "inventory_products";
|
|
11
11
|
name: string;
|
|
12
|
+
active: boolean;
|
|
12
13
|
description: string;
|
|
14
|
+
hashtags: string[];
|
|
13
15
|
category?: CategoryEntity;
|
|
14
16
|
brand?: BrandEntity;
|
|
15
|
-
hashtags: string[];
|
|
16
17
|
files: AssetEntity[];
|
|
17
18
|
price: PriceEntity;
|
|
18
|
-
code
|
|
19
|
-
dimension
|
|
19
|
+
code: CodeEntity;
|
|
20
|
+
dimension: DimensionEntity;
|
|
20
21
|
seo: SeoEntity;
|
|
21
22
|
}
|
|
@@ -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,70 +25,73 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.ProductEntity = 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
|
-
|
|
52
|
-
|
|
53
|
-
(
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
(
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
ProductEntity
|
|
77
|
-
|
|
78
|
-
|
|
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.Boolean, default: true }),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], ProductEntity.prototype, "active", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ProductEntity.prototype, "description", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
|
|
62
|
+
__metadata("design:type", Array)
|
|
63
|
+
], ProductEntity.prototype, "hashtags", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: category_entity_1.CategoryEntity.$index }),
|
|
66
|
+
__metadata("design:type", category_entity_1.CategoryEntity)
|
|
67
|
+
], ProductEntity.prototype, "category", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: brand_entity_1.BrandEntity.$index }),
|
|
70
|
+
__metadata("design:type", brand_entity_1.BrandEntity)
|
|
71
|
+
], ProductEntity.prototype, "brand", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId, ref: asset_entity_1.AssetEntity.$index }] }),
|
|
74
|
+
__metadata("design:type", Array)
|
|
75
|
+
], ProductEntity.prototype, "files", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return price_entity_1.PriceEntity; }, default: new Map() }),
|
|
78
|
+
__metadata("design:type", price_entity_1.PriceEntity)
|
|
79
|
+
], ProductEntity.prototype, "price", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return code_entity_1.CodeEntity; }, default: new Map() }),
|
|
82
|
+
__metadata("design:type", code_entity_1.CodeEntity)
|
|
83
|
+
], ProductEntity.prototype, "code", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return dimension_entity_1.DimensionEntity; }, default: new Map() }),
|
|
86
|
+
__metadata("design:type", dimension_entity_1.DimensionEntity)
|
|
87
|
+
], ProductEntity.prototype, "dimension", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return seo_entity_1.SeoEntity; }, default: new Map() }),
|
|
90
|
+
__metadata("design:type", seo_entity_1.SeoEntity)
|
|
91
|
+
], ProductEntity.prototype, "seo", void 0);
|
|
92
|
+
ProductEntity = __decorate([
|
|
93
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
94
|
+
], ProductEntity);
|
|
95
|
+
return ProductEntity;
|
|
96
|
+
}(abstract_entity_1.AbstractEntity));
|
|
79
97
|
exports.ProductEntity = ProductEntity;
|