@merkaly/api 0.2.2-26 → 0.2.2-28
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 +3 -3
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AbstractDocument = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
createdAt;
|
|
7
|
-
updatedAt;
|
|
8
|
-
constructor(entity) {
|
|
4
|
+
var AbstractDocument = (function () {
|
|
5
|
+
function AbstractDocument(entity) {
|
|
9
6
|
this.id = entity._id;
|
|
10
7
|
this.createdAt = entity.createdAt;
|
|
11
8
|
this.updatedAt = entity.updatedAt;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
return AbstractDocument;
|
|
11
|
+
}());
|
|
14
12
|
exports.AbstractDocument = AbstractDocument;
|
|
@@ -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,25 +25,30 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.AbstractEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var AbstractEntity = (function (_super) {
|
|
31
|
+
__extends(AbstractEntity, _super);
|
|
32
|
+
function AbstractEntity() {
|
|
33
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
_this._id = String();
|
|
35
|
+
_this.createdAt = null;
|
|
36
|
+
_this.updatedAt = null;
|
|
37
|
+
_this.deletedAt = null;
|
|
38
|
+
return _this;
|
|
39
|
+
}
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
42
|
+
__metadata("design:type", Date)
|
|
43
|
+
], AbstractEntity.prototype, "createdAt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], AbstractEntity.prototype, "updatedAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
50
|
+
__metadata("design:type", Date)
|
|
51
|
+
], AbstractEntity.prototype, "deletedAt", void 0);
|
|
52
|
+
return AbstractEntity;
|
|
53
|
+
}(mongoose_2.Document));
|
|
34
54
|
exports.AbstractEntity = AbstractEntity;
|
|
@@ -10,47 +10,64 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.FindValidator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
__decorate([
|
|
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
|
-
], FindValidator.prototype, "
|
|
13
|
+
var class_transformer_1 = require("class-transformer");
|
|
14
|
+
var class_validator_1 = require("class-validator");
|
|
15
|
+
var FindValidator = (function () {
|
|
16
|
+
function FindValidator() {
|
|
17
|
+
this.limit = 10;
|
|
18
|
+
this.page = 1;
|
|
19
|
+
this.sort = {};
|
|
20
|
+
this.filters = {};
|
|
21
|
+
}
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
24
|
+
var value = _a.value;
|
|
25
|
+
return value ? Number(value) : 10;
|
|
26
|
+
}),
|
|
27
|
+
(0, class_validator_1.IsInt)(),
|
|
28
|
+
(0, class_validator_1.IsOptional)(),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], FindValidator.prototype, "limit", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
33
|
+
var value = _a.value;
|
|
34
|
+
return value ? Number(value) : 1;
|
|
35
|
+
}),
|
|
36
|
+
(0, class_validator_1.IsInt)(),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], FindValidator.prototype, "page", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
42
|
+
var value = _a.value;
|
|
43
|
+
return value && JSON.parse(value);
|
|
44
|
+
}),
|
|
45
|
+
(0, class_validator_1.IsOptional)(),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], FindValidator.prototype, "sort", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
50
|
+
var value = _a.value;
|
|
51
|
+
return value && JSON.parse(value);
|
|
52
|
+
}),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
__metadata("design:type", Object)
|
|
55
|
+
], FindValidator.prototype, "filters", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_transformer_1.Transform)(function (_a) {
|
|
58
|
+
var value = _a.value;
|
|
59
|
+
return value.map(function (path) {
|
|
60
|
+
try {
|
|
61
|
+
return JSON.parse(path);
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
return path;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
__metadata("design:type", Array)
|
|
70
|
+
], FindValidator.prototype, "join", void 0);
|
|
71
|
+
return FindValidator;
|
|
72
|
+
}());
|
|
56
73
|
exports.FindValidator = FindValidator;
|
|
@@ -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,43 +25,45 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.AssetEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
__decorate([
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
], AssetEntity.prototype, "name", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
], AssetEntity.prototype, "url", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
], AssetEntity.prototype, "weak", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
], AssetEntity.prototype, "description", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
], AssetEntity.prototype, "type", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
], AssetEntity.prototype, "size", void 0);
|
|
49
|
-
AssetEntity = __decorate([
|
|
50
|
-
|
|
51
|
-
], AssetEntity);
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../abstract/abstract.entity");
|
|
31
|
+
var AssetEntity = (function (_super) {
|
|
32
|
+
__extends(AssetEntity, _super);
|
|
33
|
+
function AssetEntity() {
|
|
34
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
_this.weak = true;
|
|
36
|
+
_this.size = 0;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
AssetEntity.$index = 'assets';
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], AssetEntity.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AssetEntity.prototype, "url", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], AssetEntity.prototype, "weak", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], AssetEntity.prototype, "description", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], AssetEntity.prototype, "type", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, required: true, default: 0 }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], AssetEntity.prototype, "size", void 0);
|
|
64
|
+
AssetEntity = __decorate([
|
|
65
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
66
|
+
], AssetEntity);
|
|
67
|
+
return AssetEntity;
|
|
68
|
+
}(abstract_entity_1.AbstractEntity));
|
|
52
69
|
exports.AssetEntity = AssetEntity;
|
|
@@ -10,17 +10,18 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SalesByRangeValdiator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var SalesByRangeValdiator = (function () {
|
|
15
|
+
function SalesByRangeValdiator() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsDateString)(),
|
|
19
|
+
__metadata("design:type", Date)
|
|
20
|
+
], SalesByRangeValdiator.prototype, "from", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsDateString)(),
|
|
23
|
+
__metadata("design:type", Date)
|
|
24
|
+
], SalesByRangeValdiator.prototype, "to", void 0);
|
|
25
|
+
return SalesByRangeValdiator;
|
|
26
|
+
}());
|
|
26
27
|
exports.SalesByRangeValdiator = SalesByRangeValdiator;
|
|
@@ -1,9 +1,30 @@
|
|
|
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.BrandDocument = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
19
|
+
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
+
var BrandDocument = (function (_super) {
|
|
21
|
+
__extends(BrandDocument, _super);
|
|
22
|
+
function BrandDocument() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.name = String();
|
|
25
|
+
_this.description = String();
|
|
26
|
+
return _this;
|
|
27
|
+
}
|
|
28
|
+
return BrandDocument;
|
|
29
|
+
}(abstract_document_1.AbstractDocument));
|
|
9
30
|
exports.BrandDocument = BrandDocument;
|
|
@@ -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,23 +25,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.BrandEntity = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
BrandEntity
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var BrandEntity = (function (_super) {
|
|
32
|
+
__extends(BrandEntity, _super);
|
|
33
|
+
function BrandEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
BrandEntity.$index = 'inventory_brands';
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], BrandEntity.prototype, "name", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], BrandEntity.prototype, "description", void 0);
|
|
45
|
+
BrandEntity = __decorate([
|
|
46
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
47
|
+
], BrandEntity);
|
|
48
|
+
return BrandEntity;
|
|
49
|
+
}(abstract_entity_1.AbstractEntity));
|
|
32
50
|
exports.BrandEntity = BrandEntity;
|
|
@@ -10,34 +10,36 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UpdateBrandValidator = exports.CreateBrandValidator = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
var class_validator_1 = require("class-validator");
|
|
14
|
+
var CreateBrandValidator = (function () {
|
|
15
|
+
function CreateBrandValidator() {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.Length)(2, 32),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CreateBrandValidator.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CreateBrandValidator.prototype, "description", void 0);
|
|
27
|
+
return CreateBrandValidator;
|
|
28
|
+
}());
|
|
28
29
|
exports.CreateBrandValidator = CreateBrandValidator;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
var UpdateBrandValidator = (function () {
|
|
31
|
+
function UpdateBrandValidator() {
|
|
32
|
+
}
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.IsOptional)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], UpdateBrandValidator.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
(0, class_validator_1.IsOptional)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], UpdateBrandValidator.prototype, "description", void 0);
|
|
43
|
+
return UpdateBrandValidator;
|
|
44
|
+
}());
|
|
43
45
|
exports.UpdateBrandValidator = UpdateBrandValidator;
|
|
@@ -1,10 +1,31 @@
|
|
|
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.CategoryDocument = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
var abstract_document_1 = require("../../../abstract/abstract.document");
|
|
20
|
+
var CategoryDocument = (function (_super) {
|
|
21
|
+
__extends(CategoryDocument, _super);
|
|
22
|
+
function CategoryDocument() {
|
|
23
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
_this.name = String();
|
|
25
|
+
_this.description = String();
|
|
26
|
+
_this.icon = String();
|
|
27
|
+
return _this;
|
|
28
|
+
}
|
|
29
|
+
return CategoryDocument;
|
|
30
|
+
}(abstract_document_1.AbstractDocument));
|
|
10
31
|
exports.CategoryDocument = CategoryDocument;
|
|
@@ -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,34 +25,37 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
25
|
};
|
|
11
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
27
|
exports.CategoryEntity = 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
|
-
CategoryEntity
|
|
41
|
-
|
|
42
|
-
|
|
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_entity_1 = require("../properties/property.entity");
|
|
32
|
+
var CategoryEntity = (function (_super) {
|
|
33
|
+
__extends(CategoryEntity, _super);
|
|
34
|
+
function CategoryEntity() {
|
|
35
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
_this.properties = [];
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
CategoryEntity.$index = 'inventory_categories';
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 32, unique: true, required: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CategoryEntity.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CategoryEntity.prototype, "description", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 32, default: 'tag' }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CategoryEntity.prototype, "icon", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Types.ObjectId, ref: property_entity_1.PropertyEntity.$index }] }),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], CategoryEntity.prototype, "properties", void 0);
|
|
56
|
+
CategoryEntity = __decorate([
|
|
57
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
58
|
+
], CategoryEntity);
|
|
59
|
+
return CategoryEntity;
|
|
60
|
+
}(abstract_entity_1.AbstractEntity));
|
|
43
61
|
exports.CategoryEntity = CategoryEntity;
|