@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,19 +1,20 @@
1
- import { AssetEntity } from '../../assets/asset.entity';
1
+ import 'reflect-metadata';
2
2
  import { ProductCodeValidator } from './validators/code.validator';
3
3
  import { ProductDimensionValidator } from './validators/dimension.validator';
4
4
  import { ProductPriceValidator } from './validators/price.validator';
5
5
  import { ProductSeoValidator } from './validators/seo.validator';
6
6
  export declare class CreateProductValidator {
7
7
  name: string;
8
- description?: string;
8
+ description: string;
9
+ active: boolean;
9
10
  category?: string;
10
11
  brand?: string;
11
- files: AssetEntity[];
12
+ files: string[];
12
13
  hashtags: string[];
13
14
  price: ProductPriceValidator;
14
- seo?: ProductSeoValidator;
15
- dimension?: ProductDimensionValidator;
16
- code?: ProductCodeValidator;
15
+ seo: ProductSeoValidator;
16
+ dimension: ProductDimensionValidator;
17
+ code: ProductCodeValidator;
17
18
  }
18
19
  export declare class UpdateProductValidator extends CreateProductValidator {
19
20
  }
@@ -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,74 +25,89 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
25
  };
11
26
  Object.defineProperty(exports, "__esModule", { value: true });
12
27
  exports.UpdateProductValidator = exports.CreateProductValidator = void 0;
13
- const class_transformer_1 = require("class-transformer");
14
- const class_validator_1 = require("class-validator");
15
- const code_validator_1 = require("./validators/code.validator");
16
- const dimension_validator_1 = require("./validators/dimension.validator");
17
- const price_validator_1 = require("./validators/price.validator");
18
- const seo_validator_1 = require("./validators/seo.validator");
19
- class CreateProductValidator {
20
- name;
21
- description;
22
- category;
23
- brand;
24
- files = [];
25
- hashtags = [];
26
- price;
27
- seo;
28
- dimension;
29
- code;
30
- }
31
- __decorate([
32
- (0, class_validator_1.IsString)(),
33
- __metadata("design:type", String)
34
- ], CreateProductValidator.prototype, "name", void 0);
35
- __decorate([
36
- (0, class_validator_1.IsString)(),
37
- (0, class_validator_1.IsOptional)(),
38
- __metadata("design:type", String)
39
- ], CreateProductValidator.prototype, "description", void 0);
40
- __decorate([
41
- (0, class_validator_1.IsOptional)(),
42
- (0, class_validator_1.IsMongoId)(),
43
- __metadata("design:type", String)
44
- ], CreateProductValidator.prototype, "category", void 0);
45
- __decorate([
46
- (0, class_validator_1.IsOptional)(),
47
- (0, class_validator_1.IsMongoId)(),
48
- __metadata("design:type", String)
49
- ], CreateProductValidator.prototype, "brand", void 0);
50
- __decorate([
51
- (0, class_transformer_1.Transform)(({ value }) => value.map(({ _id }) => _id)),
52
- (0, class_validator_1.IsOptional)(),
53
- __metadata("design:type", Array)
54
- ], CreateProductValidator.prototype, "files", void 0);
55
- __decorate([
56
- (0, class_validator_1.IsString)({ each: true }),
57
- __metadata("design:type", Array)
58
- ], CreateProductValidator.prototype, "hashtags", void 0);
59
- __decorate([
60
- (0, class_validator_1.ValidateNested)(),
61
- (0, class_validator_1.IsNotEmptyObject)(),
62
- (0, class_transformer_1.Type)(() => price_validator_1.ProductPriceValidator),
63
- __metadata("design:type", price_validator_1.ProductPriceValidator)
64
- ], CreateProductValidator.prototype, "price", void 0);
65
- __decorate([
66
- (0, class_validator_1.ValidateNested)(),
67
- (0, class_transformer_1.Type)(() => seo_validator_1.ProductSeoValidator),
68
- __metadata("design:type", seo_validator_1.ProductSeoValidator)
69
- ], CreateProductValidator.prototype, "seo", void 0);
70
- __decorate([
71
- (0, class_validator_1.ValidateNested)(),
72
- (0, class_transformer_1.Type)(() => dimension_validator_1.ProductDimensionValidator),
73
- __metadata("design:type", dimension_validator_1.ProductDimensionValidator)
74
- ], CreateProductValidator.prototype, "dimension", void 0);
75
- __decorate([
76
- (0, class_validator_1.ValidateNested)(),
77
- (0, class_transformer_1.Type)(() => code_validator_1.ProductCodeValidator),
78
- __metadata("design:type", code_validator_1.ProductCodeValidator)
79
- ], CreateProductValidator.prototype, "code", 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.active = Boolean(1);
40
+ this.category = null;
41
+ this.brand = null;
42
+ this.files = [];
43
+ this.hashtags = [];
44
+ this.price = new price_validator_1.ProductPriceValidator();
45
+ this.seo = new seo_validator_1.ProductSeoValidator();
46
+ this.dimension = new dimension_validator_1.ProductDimensionValidator();
47
+ this.code = new code_validator_1.ProductCodeValidator();
48
+ }
49
+ __decorate([
50
+ (0, class_validator_1.IsString)(),
51
+ __metadata("design:type", Object)
52
+ ], CreateProductValidator.prototype, "name", void 0);
53
+ __decorate([
54
+ (0, class_validator_1.IsString)(),
55
+ (0, class_validator_1.IsOptional)(),
56
+ __metadata("design:type", Object)
57
+ ], CreateProductValidator.prototype, "description", void 0);
58
+ __decorate([
59
+ (0, class_validator_1.IsBoolean)(),
60
+ (0, class_validator_1.IsOptional)(),
61
+ __metadata("design:type", Object)
62
+ ], CreateProductValidator.prototype, "active", void 0);
63
+ __decorate([
64
+ (0, class_validator_1.IsOptional)(),
65
+ (0, class_validator_1.IsMongoId)(),
66
+ __metadata("design:type", String)
67
+ ], CreateProductValidator.prototype, "category", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_validator_1.IsMongoId)(),
71
+ __metadata("design:type", String)
72
+ ], CreateProductValidator.prototype, "brand", void 0);
73
+ __decorate([
74
+ (0, class_validator_1.IsMongoId)({ each: true }),
75
+ (0, class_validator_1.IsOptional)(),
76
+ __metadata("design:type", Array)
77
+ ], CreateProductValidator.prototype, "files", void 0);
78
+ __decorate([
79
+ (0, class_validator_1.IsString)({ each: true }),
80
+ __metadata("design:type", Array)
81
+ ], CreateProductValidator.prototype, "hashtags", void 0);
82
+ __decorate([
83
+ (0, class_validator_1.ValidateNested)(),
84
+ (0, class_validator_1.IsNotEmptyObject)(),
85
+ (0, class_transformer_1.Type)(function () { return price_validator_1.ProductPriceValidator; }),
86
+ __metadata("design:type", Object)
87
+ ], CreateProductValidator.prototype, "price", void 0);
88
+ __decorate([
89
+ (0, class_validator_1.ValidateNested)(),
90
+ (0, class_transformer_1.Type)(function () { return seo_validator_1.ProductSeoValidator; }),
91
+ __metadata("design:type", Object)
92
+ ], CreateProductValidator.prototype, "seo", void 0);
93
+ __decorate([
94
+ (0, class_validator_1.ValidateNested)(),
95
+ (0, class_transformer_1.Type)(function () { return dimension_validator_1.ProductDimensionValidator; }),
96
+ __metadata("design:type", Object)
97
+ ], CreateProductValidator.prototype, "dimension", void 0);
98
+ __decorate([
99
+ (0, class_validator_1.ValidateNested)(),
100
+ (0, class_transformer_1.Type)(function () { return code_validator_1.ProductCodeValidator; }),
101
+ __metadata("design:type", Object)
102
+ ], CreateProductValidator.prototype, "code", void 0);
103
+ return CreateProductValidator;
104
+ }());
80
105
  exports.CreateProductValidator = CreateProductValidator;
81
- class UpdateProductValidator extends CreateProductValidator {
82
- }
106
+ var UpdateProductValidator = (function (_super) {
107
+ __extends(UpdateProductValidator, _super);
108
+ function UpdateProductValidator() {
109
+ return _super !== null && _super.apply(this, arguments) || this;
110
+ }
111
+ return UpdateProductValidator;
112
+ }(CreateProductValidator));
83
113
  exports.UpdateProductValidator = UpdateProductValidator;
@@ -10,25 +10,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductCodeValidator = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class ProductCodeValidator {
15
- sku;
16
- gtin;
17
- mpn;
18
- }
19
- __decorate([
20
- (0, class_validator_1.IsString)(),
21
- (0, class_validator_1.IsOptional)(),
22
- __metadata("design:type", String)
23
- ], ProductCodeValidator.prototype, "sku", void 0);
24
- __decorate([
25
- (0, class_validator_1.IsString)(),
26
- (0, class_validator_1.IsOptional)(),
27
- __metadata("design:type", String)
28
- ], ProductCodeValidator.prototype, "gtin", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", String)
33
- ], ProductCodeValidator.prototype, "mpn", 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
+ }());
34
37
  exports.ProductCodeValidator = ProductCodeValidator;
@@ -10,31 +10,34 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductDimensionValidator = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class ProductDimensionValidator {
15
- weight;
16
- height;
17
- width;
18
- depth;
19
- }
20
- __decorate([
21
- (0, class_validator_1.IsNumber)(),
22
- (0, class_validator_1.IsOptional)(),
23
- __metadata("design:type", Number)
24
- ], ProductDimensionValidator.prototype, "weight", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsNumber)(),
27
- (0, class_validator_1.IsOptional)(),
28
- __metadata("design:type", Number)
29
- ], ProductDimensionValidator.prototype, "height", void 0);
30
- __decorate([
31
- (0, class_validator_1.IsNumber)(),
32
- (0, class_validator_1.IsOptional)(),
33
- __metadata("design:type", Number)
34
- ], ProductDimensionValidator.prototype, "width", void 0);
35
- __decorate([
36
- (0, class_validator_1.IsNumber)(),
37
- (0, class_validator_1.IsOptional)(),
38
- __metadata("design:type", Number)
39
- ], ProductDimensionValidator.prototype, "depth", void 0);
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductDimensionValidator = (function () {
15
+ function ProductDimensionValidator() {
16
+ this.weight = 0;
17
+ this.height = 0;
18
+ this.width = 0;
19
+ this.depth = 0;
20
+ }
21
+ __decorate([
22
+ (0, class_validator_1.IsNumber)(),
23
+ (0, class_validator_1.IsOptional)(),
24
+ __metadata("design:type", Object)
25
+ ], ProductDimensionValidator.prototype, "weight", void 0);
26
+ __decorate([
27
+ (0, class_validator_1.IsNumber)(),
28
+ (0, class_validator_1.IsOptional)(),
29
+ __metadata("design:type", Object)
30
+ ], ProductDimensionValidator.prototype, "height", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsNumber)(),
33
+ (0, class_validator_1.IsOptional)(),
34
+ __metadata("design:type", Object)
35
+ ], ProductDimensionValidator.prototype, "width", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsNumber)(),
38
+ (0, class_validator_1.IsOptional)(),
39
+ __metadata("design:type", Object)
40
+ ], ProductDimensionValidator.prototype, "depth", void 0);
41
+ return ProductDimensionValidator;
42
+ }());
40
43
  exports.ProductDimensionValidator = ProductDimensionValidator;
@@ -1,4 +1,4 @@
1
1
  export declare class ProductPriceValidator {
2
2
  sale: number;
3
- purchase: number;
3
+ purchase?: number;
4
4
  }
@@ -10,18 +10,21 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductPriceValidator = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class ProductPriceValidator {
15
- sale;
16
- purchase;
17
- }
18
- __decorate([
19
- (0, class_validator_1.IsNumber)(),
20
- __metadata("design:type", Number)
21
- ], ProductPriceValidator.prototype, "sale", void 0);
22
- __decorate([
23
- (0, class_validator_1.IsNumber)(),
24
- (0, class_validator_1.IsOptional)(),
25
- __metadata("design:type", Number)
26
- ], ProductPriceValidator.prototype, "purchase", void 0);
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductPriceValidator = (function () {
15
+ function ProductPriceValidator() {
16
+ this.sale = 0;
17
+ this.purchase = 0;
18
+ }
19
+ __decorate([
20
+ (0, class_validator_1.IsNumber)(),
21
+ __metadata("design:type", Object)
22
+ ], ProductPriceValidator.prototype, "sale", void 0);
23
+ __decorate([
24
+ (0, class_validator_1.IsNumber)(),
25
+ (0, class_validator_1.IsOptional)(),
26
+ __metadata("design:type", Object)
27
+ ], ProductPriceValidator.prototype, "purchase", void 0);
28
+ return ProductPriceValidator;
29
+ }());
27
30
  exports.ProductPriceValidator = ProductPriceValidator;
@@ -10,25 +10,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ProductSeoValidator = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class ProductSeoValidator {
15
- title;
16
- slug;
17
- description;
18
- }
19
- __decorate([
20
- (0, class_validator_1.IsString)(),
21
- (0, class_validator_1.IsOptional)(),
22
- __metadata("design:type", String)
23
- ], ProductSeoValidator.prototype, "title", void 0);
24
- __decorate([
25
- (0, class_validator_1.IsString)(),
26
- (0, class_validator_1.IsOptional)(),
27
- __metadata("design:type", String)
28
- ], ProductSeoValidator.prototype, "slug", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", String)
33
- ], ProductSeoValidator.prototype, "description", void 0);
13
+ var class_validator_1 = require("class-validator");
14
+ var ProductSeoValidator = (function () {
15
+ function ProductSeoValidator() {
16
+ this.title = String();
17
+ this.slug = String();
18
+ this.description = String();
19
+ }
20
+ __decorate([
21
+ (0, class_validator_1.IsString)(),
22
+ (0, class_validator_1.IsOptional)(),
23
+ __metadata("design:type", Object)
24
+ ], ProductSeoValidator.prototype, "title", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ (0, class_validator_1.IsOptional)(),
28
+ __metadata("design:type", Object)
29
+ ], ProductSeoValidator.prototype, "slug", void 0);
30
+ __decorate([
31
+ (0, class_validator_1.IsString)(),
32
+ (0, class_validator_1.IsOptional)(),
33
+ __metadata("design:type", Object)
34
+ ], ProductSeoValidator.prototype, "description", void 0);
35
+ return ProductSeoValidator;
36
+ }());
34
37
  exports.ProductSeoValidator = ProductSeoValidator;
@@ -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,29 +25,31 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
25
  };
11
26
  Object.defineProperty(exports, "__esModule", { value: true });
12
27
  exports.PropertyEntity = 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_validator_1 = require("./property.validator");
17
- let PropertyEntity = class PropertyEntity extends abstract_entity_1.AbstractEntity {
18
- static $index = 'inventory_properties';
19
- name;
20
- title;
21
- type;
22
- };
23
- __decorate([
24
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
25
- __metadata("design:type", String)
26
- ], PropertyEntity.prototype, "name", void 0);
27
- __decorate([
28
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
29
- __metadata("design:type", String)
30
- ], PropertyEntity.prototype, "title", void 0);
31
- __decorate([
32
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: property_validator_1.PropertyType.STRING }),
33
- __metadata("design:type", String)
34
- ], PropertyEntity.prototype, "type", void 0);
35
- PropertyEntity = __decorate([
36
- (0, mongoose_1.Schema)({ timestamps: true })
37
- ], PropertyEntity);
28
+ var mongoose_1 = require("@nestjs/mongoose");
29
+ var mongoose_2 = require("mongoose");
30
+ var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
+ var property_validator_1 = require("./property.validator");
32
+ var PropertyEntity = (function (_super) {
33
+ __extends(PropertyEntity, _super);
34
+ function PropertyEntity() {
35
+ return _super !== null && _super.apply(this, arguments) || this;
36
+ }
37
+ PropertyEntity.$index = 'inventory_properties';
38
+ __decorate([
39
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
40
+ __metadata("design:type", String)
41
+ ], PropertyEntity.prototype, "name", void 0);
42
+ __decorate([
43
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
44
+ __metadata("design:type", String)
45
+ ], PropertyEntity.prototype, "title", void 0);
46
+ __decorate([
47
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: property_validator_1.PropertyType.STRING }),
48
+ __metadata("design:type", String)
49
+ ], PropertyEntity.prototype, "type", void 0);
50
+ PropertyEntity = __decorate([
51
+ (0, mongoose_1.Schema)({ timestamps: true })
52
+ ], PropertyEntity);
53
+ return PropertyEntity;
54
+ }(abstract_entity_1.AbstractEntity));
38
55
  exports.PropertyEntity = PropertyEntity;
@@ -10,41 +10,42 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.UpdatePropertyValidator = exports.CreatePropertyValidator = exports.PropertyType = void 0;
13
- const class_validator_1 = require("class-validator");
13
+ var class_validator_1 = require("class-validator");
14
14
  var PropertyType;
15
15
  (function (PropertyType) {
16
16
  PropertyType["STRING"] = "STRING";
17
17
  })(PropertyType = exports.PropertyType || (exports.PropertyType = {}));
18
- class CreatePropertyValidator {
19
- name;
20
- title;
21
- type;
22
- }
23
- __decorate([
24
- (0, class_validator_1.IsString)(),
25
- __metadata("design:type", String)
26
- ], CreatePropertyValidator.prototype, "name", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsString)(),
29
- __metadata("design:type", String)
30
- ], CreatePropertyValidator.prototype, "title", void 0);
31
- __decorate([
32
- (0, class_validator_1.IsString)(),
33
- __metadata("design:type", String)
34
- ], CreatePropertyValidator.prototype, "type", void 0);
18
+ var CreatePropertyValidator = (function () {
19
+ function CreatePropertyValidator() {
20
+ }
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], CreatePropertyValidator.prototype, "name", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], CreatePropertyValidator.prototype, "title", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], CreatePropertyValidator.prototype, "type", void 0);
33
+ return CreatePropertyValidator;
34
+ }());
35
35
  exports.CreatePropertyValidator = CreatePropertyValidator;
36
- class UpdatePropertyValidator {
37
- name;
38
- title;
39
- }
40
- __decorate([
41
- (0, class_validator_1.IsString)(),
42
- (0, class_validator_1.IsOptional)(),
43
- __metadata("design:type", String)
44
- ], UpdatePropertyValidator.prototype, "name", void 0);
45
- __decorate([
46
- (0, class_validator_1.IsString)(),
47
- (0, class_validator_1.IsOptional)(),
48
- __metadata("design:type", String)
49
- ], UpdatePropertyValidator.prototype, "title", void 0);
36
+ var UpdatePropertyValidator = (function () {
37
+ function UpdatePropertyValidator() {
38
+ }
39
+ __decorate([
40
+ (0, class_validator_1.IsString)(),
41
+ (0, class_validator_1.IsOptional)(),
42
+ __metadata("design:type", String)
43
+ ], UpdatePropertyValidator.prototype, "name", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsString)(),
46
+ (0, class_validator_1.IsOptional)(),
47
+ __metadata("design:type", String)
48
+ ], UpdatePropertyValidator.prototype, "title", void 0);
49
+ return UpdatePropertyValidator;
50
+ }());
50
51
  exports.UpdatePropertyValidator = UpdatePropertyValidator;