@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.
Files changed (59) hide show
  1. package/.output/abstract/abstract.document.js +4 -6
  2. package/.output/abstract/abstract.entity.js +41 -21
  3. package/.output/abstract/abstract.validator.js +60 -43
  4. package/.output/modules/assets/asset.entity.js +56 -39
  5. package/.output/modules/insight/validators/order.validator.js +14 -13
  6. package/.output/modules/inventory/brands/brand.document.js +26 -5
  7. package/.output/modules/inventory/brands/brand.entity.js +37 -19
  8. package/.output/modules/inventory/brands/brand.validator.js +31 -29
  9. package/.output/modules/inventory/categories/category.document.js +27 -6
  10. package/.output/modules/inventory/categories/category.entity.js +48 -30
  11. package/.output/modules/inventory/categories/category.validator.js +43 -41
  12. package/.output/modules/inventory/products/entities/code.entity.d.ts +1 -1
  13. package/.output/modules/inventory/products/entities/code.entity.js +40 -23
  14. package/.output/modules/inventory/products/entities/dimension.entity.d.ts +1 -1
  15. package/.output/modules/inventory/products/entities/dimension.entity.js +44 -28
  16. package/.output/modules/inventory/products/entities/price.entity.d.ts +1 -1
  17. package/.output/modules/inventory/products/entities/price.entity.js +36 -18
  18. package/.output/modules/inventory/products/entities/seo.entity.d.ts +1 -1
  19. package/.output/modules/inventory/products/entities/seo.entity.js +40 -23
  20. package/.output/modules/inventory/products/product.document.js +28 -9
  21. package/.output/modules/inventory/products/product.entity.d.ts +4 -3
  22. package/.output/modules/inventory/products/product.entity.js +84 -66
  23. package/.output/modules/inventory/products/product.validator.d.ts +7 -6
  24. package/.output/modules/inventory/products/product.validator.js +99 -69
  25. package/.output/modules/inventory/products/validators/code.validator.js +24 -21
  26. package/.output/modules/inventory/products/validators/dimension.validator.js +30 -27
  27. package/.output/modules/inventory/products/validators/price.validator.d.ts +1 -1
  28. package/.output/modules/inventory/products/validators/price.validator.js +17 -14
  29. package/.output/modules/inventory/products/validators/seo.validator.js +24 -21
  30. package/.output/modules/inventory/properties/property.entity.js +42 -25
  31. package/.output/modules/inventory/properties/property.validator.js +33 -32
  32. package/.output/modules/search/search.validator.js +36 -26
  33. package/.output/modules/setting/connections/connection.validator.d.ts +0 -1
  34. package/.output/modules/setting/connections/connection.validator.js +23 -21
  35. package/.output/modules/setting/members/member.validator.d.ts +0 -1
  36. package/.output/modules/setting/members/member.validator.js +0 -1
  37. package/.output/modules/setting/organization/organization.types.js +86 -86
  38. package/.output/modules/setting/organization/organization.validator.js +68 -68
  39. package/.output/modules/setting/social/social.validator.js +15 -14
  40. package/.output/modules/store/clients/client.entity.js +60 -44
  41. package/.output/modules/store/clients/client.validator.js +53 -52
  42. package/.output/modules/store/orders/billing/billing.document.js +5 -7
  43. package/.output/modules/store/orders/billing/billing.entity.js +31 -33
  44. package/.output/modules/store/orders/billing/billing.validator.js +27 -28
  45. package/.output/modules/store/orders/item/item.document.js +5 -5
  46. package/.output/modules/store/orders/item/item.entity.js +41 -24
  47. package/.output/modules/store/orders/item/item.schema.js +2 -2
  48. package/.output/modules/store/orders/item/item.validator.js +16 -14
  49. package/.output/modules/store/orders/order.entity.js +76 -57
  50. package/.output/modules/store/orders/order.validator.js +60 -57
  51. package/.output/modules/store/orders/payment/payment.entity.js +15 -13
  52. package/.output/modules/store/orders/payment/payment.schema.js +2 -2
  53. package/.output/modules/store/orders/shipping/shipping.document.js +5 -7
  54. package/.output/modules/store/orders/shipping/shipping.entity.js +31 -33
  55. package/.output/modules/store/orders/shipping/shipping.validator.js +27 -28
  56. package/.output/modules/store/orders/status/status.document.js +5 -5
  57. package/.output/modules/store/orders/status/status.entity.js +24 -24
  58. package/.output/modules/users/user.validator.js +37 -41
  59. 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
- class AbstractDocument {
5
- id;
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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const mongoose_2 = require("mongoose");
15
- class AbstractEntity extends mongoose_2.Document {
16
- static $index;
17
- _id = String();
18
- createdAt = null;
19
- updatedAt = null;
20
- deletedAt = null;
21
- }
22
- __decorate([
23
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
24
- __metadata("design:type", Date)
25
- ], AbstractEntity.prototype, "createdAt", void 0);
26
- __decorate([
27
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
28
- __metadata("design:type", Date)
29
- ], AbstractEntity.prototype, "updatedAt", void 0);
30
- __decorate([
31
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
32
- __metadata("design:type", Date)
33
- ], AbstractEntity.prototype, "deletedAt", void 0);
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
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- class FindValidator {
16
- limit = 10;
17
- page = 1;
18
- sort = {};
19
- filters = {};
20
- join;
21
- }
22
- __decorate([
23
- (0, class_transformer_1.Transform)(({ value }) => value ? Number(value) : 10),
24
- (0, class_validator_1.IsInt)(),
25
- (0, class_validator_1.IsOptional)(),
26
- __metadata("design:type", Object)
27
- ], FindValidator.prototype, "limit", void 0);
28
- __decorate([
29
- (0, class_transformer_1.Transform)(({ value }) => value ? Number(value) : 1),
30
- (0, class_validator_1.IsInt)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", Object)
33
- ], FindValidator.prototype, "page", void 0);
34
- __decorate([
35
- (0, class_transformer_1.Transform)(({ value }) => value && JSON.parse(value)),
36
- (0, class_validator_1.IsOptional)(),
37
- __metadata("design:type", Object)
38
- ], FindValidator.prototype, "sort", void 0);
39
- __decorate([
40
- (0, class_transformer_1.Transform)(({ value }) => value && JSON.parse(value)),
41
- (0, class_validator_1.IsOptional)(),
42
- __metadata("design:type", Object)
43
- ], FindValidator.prototype, "filters", void 0);
44
- __decorate([
45
- (0, class_transformer_1.Transform)(({ value }) => value.map((path) => {
46
- try {
47
- return JSON.parse(path);
48
- }
49
- catch (e) {
50
- return path;
51
- }
52
- })),
53
- (0, class_validator_1.IsOptional)(),
54
- __metadata("design:type", Array)
55
- ], FindValidator.prototype, "join", void 0);
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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const mongoose_2 = require("mongoose");
15
- const abstract_entity_1 = require("../../abstract/abstract.entity");
16
- let AssetEntity = class AssetEntity extends abstract_entity_1.AbstractEntity {
17
- static $index = 'assets';
18
- name;
19
- url;
20
- weak = true;
21
- description;
22
- type;
23
- size = 0;
24
- };
25
- __decorate([
26
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
27
- __metadata("design:type", String)
28
- ], AssetEntity.prototype, "name", void 0);
29
- __decorate([
30
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
31
- __metadata("design:type", String)
32
- ], AssetEntity.prototype, "url", void 0);
33
- __decorate([
34
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
35
- __metadata("design:type", Object)
36
- ], AssetEntity.prototype, "weak", void 0);
37
- __decorate([
38
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
39
- __metadata("design:type", String)
40
- ], AssetEntity.prototype, "description", void 0);
41
- __decorate([
42
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
43
- __metadata("design:type", String)
44
- ], AssetEntity.prototype, "type", void 0);
45
- __decorate([
46
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, required: true, default: 0 }),
47
- __metadata("design:type", Object)
48
- ], AssetEntity.prototype, "size", void 0);
49
- AssetEntity = __decorate([
50
- (0, mongoose_1.Schema)({ timestamps: true })
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
- const class_validator_1 = require("class-validator");
14
- class SalesByRangeValdiator {
15
- from;
16
- to;
17
- }
18
- __decorate([
19
- (0, class_validator_1.IsDateString)(),
20
- __metadata("design:type", Date)
21
- ], SalesByRangeValdiator.prototype, "from", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsDateString)(),
24
- __metadata("design:type", Date)
25
- ], SalesByRangeValdiator.prototype, "to", void 0);
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
- const abstract_document_1 = require("../../../abstract/abstract.document");
5
- class BrandDocument extends abstract_document_1.AbstractDocument {
6
- name = String();
7
- description = String();
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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const mongoose_2 = require("mongoose");
15
- const abstract_entity_1 = require("../../../abstract/abstract.entity");
16
- let BrandEntity = class BrandEntity extends abstract_entity_1.AbstractEntity {
17
- static $index = 'inventory_brands';
18
- name;
19
- description;
20
- };
21
- __decorate([
22
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
23
- __metadata("design:type", String)
24
- ], BrandEntity.prototype, "name", void 0);
25
- __decorate([
26
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
27
- __metadata("design:type", String)
28
- ], BrandEntity.prototype, "description", void 0);
29
- BrandEntity = __decorate([
30
- (0, mongoose_1.Schema)({ timestamps: true })
31
- ], BrandEntity);
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
- const class_validator_1 = require("class-validator");
14
- class CreateBrandValidator {
15
- name;
16
- description;
17
- }
18
- __decorate([
19
- (0, class_validator_1.IsString)(),
20
- (0, class_validator_1.Length)(2, 32),
21
- __metadata("design:type", String)
22
- ], CreateBrandValidator.prototype, "name", void 0);
23
- __decorate([
24
- (0, class_validator_1.IsString)(),
25
- (0, class_validator_1.IsOptional)(),
26
- __metadata("design:type", String)
27
- ], CreateBrandValidator.prototype, "description", void 0);
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
- class UpdateBrandValidator {
30
- name;
31
- description;
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);
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
- const abstract_document_1 = require("../../../abstract/abstract.document");
5
- class CategoryDocument extends abstract_document_1.AbstractDocument {
6
- name = String();
7
- description = String();
8
- icon = String();
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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const mongoose_2 = require("mongoose");
15
- const abstract_entity_1 = require("../../../abstract/abstract.entity");
16
- const property_entity_1 = require("../properties/property.entity");
17
- let CategoryEntity = class CategoryEntity extends abstract_entity_1.AbstractEntity {
18
- static $index = 'inventory_categories';
19
- name;
20
- description;
21
- icon;
22
- properties = [];
23
- };
24
- __decorate([
25
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 32, unique: true, required: true }),
26
- __metadata("design:type", String)
27
- ], CategoryEntity.prototype, "name", void 0);
28
- __decorate([
29
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
30
- __metadata("design:type", String)
31
- ], CategoryEntity.prototype, "description", void 0);
32
- __decorate([
33
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 32, default: 'tag' }),
34
- __metadata("design:type", String)
35
- ], CategoryEntity.prototype, "icon", void 0);
36
- __decorate([
37
- (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Types.ObjectId, ref: property_entity_1.PropertyEntity.$index }] }),
38
- __metadata("design:type", Array)
39
- ], CategoryEntity.prototype, "properties", void 0);
40
- CategoryEntity = __decorate([
41
- (0, mongoose_1.Schema)({ timestamps: true })
42
- ], CategoryEntity);
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;