@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.
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 +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
- const class_validator_1 = require("class-validator");
14
- class CreateCategoryValidator {
15
- name;
16
- description;
17
- icon = 'tag';
18
- }
19
- __decorate([
20
- (0, class_validator_1.IsString)(),
21
- (0, class_validator_1.Length)(5, 32),
22
- __metadata("design:type", String)
23
- ], CreateCategoryValidator.prototype, "name", void 0);
24
- __decorate([
25
- (0, class_validator_1.IsString)(),
26
- (0, class_validator_1.IsOptional)(),
27
- __metadata("design:type", String)
28
- ], CreateCategoryValidator.prototype, "description", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", Object)
33
- ], CreateCategoryValidator.prototype, "icon", void 0);
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
- class UpdateCategoryValidator {
36
- name;
37
- description;
38
- 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);
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,4 @@
1
- export declare class CodeEntity {
1
+ export declare class CodeEntity extends Map {
2
2
  sku: string;
3
3
  gtin: string;
4
4
  mpn: string;
@@ -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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- const mongoose_2 = require("mongoose");
16
- let CodeEntity = class CodeEntity {
17
- sku;
18
- gtin;
19
- mpn;
20
- };
21
- __decorate([
22
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
23
- __metadata("design:type", String)
24
- ], CodeEntity.prototype, "sku", void 0);
25
- __decorate([
26
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
27
- __metadata("design:type", String)
28
- ], CodeEntity.prototype, "gtin", void 0);
29
- __decorate([
30
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
31
- __metadata("design:type", String)
32
- ], CodeEntity.prototype, "mpn", void 0);
33
- CodeEntity = __decorate([
34
- (0, schema_decorator_1.Schema)()
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,4 @@
1
- export declare class DimensionEntity {
1
+ export declare class DimensionEntity extends Map {
2
2
  weight: number;
3
3
  height: number;
4
4
  width: number;
@@ -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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- const mongoose_2 = require("mongoose");
16
- let DimensionEntity = class DimensionEntity {
17
- weight;
18
- height;
19
- width;
20
- depth;
21
- };
22
- __decorate([
23
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
24
- __metadata("design:type", Number)
25
- ], DimensionEntity.prototype, "weight", void 0);
26
- __decorate([
27
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
28
- __metadata("design:type", Number)
29
- ], DimensionEntity.prototype, "height", void 0);
30
- __decorate([
31
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
32
- __metadata("design:type", Number)
33
- ], DimensionEntity.prototype, "width", void 0);
34
- __decorate([
35
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
36
- __metadata("design:type", Number)
37
- ], DimensionEntity.prototype, "depth", void 0);
38
- DimensionEntity = __decorate([
39
- (0, schema_decorator_1.Schema)()
40
- ], DimensionEntity);
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,4 @@
1
- export declare class PriceEntity {
1
+ export declare class PriceEntity extends Map {
2
2
  sale: number;
3
3
  purchase: number;
4
4
  }
@@ -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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- const mongoose_2 = require("mongoose");
16
- let PriceEntity = class PriceEntity {
17
- sale;
18
- purchase;
19
- };
20
- __decorate([
21
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
22
- __metadata("design:type", Number)
23
- ], PriceEntity.prototype, "sale", void 0);
24
- __decorate([
25
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
26
- __metadata("design:type", Number)
27
- ], PriceEntity.prototype, "purchase", void 0);
28
- PriceEntity = __decorate([
29
- (0, schema_decorator_1.Schema)()
30
- ], PriceEntity);
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,4 @@
1
- export declare class SeoEntity {
1
+ export declare class SeoEntity extends Map {
2
2
  title: string;
3
3
  slug: string;
4
4
  description: string;
@@ -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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- const mongoose_2 = require("mongoose");
16
- let SeoEntity = class SeoEntity {
17
- title;
18
- slug;
19
- description;
20
- };
21
- __decorate([
22
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
23
- __metadata("design:type", String)
24
- ], SeoEntity.prototype, "title", void 0);
25
- __decorate([
26
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
27
- __metadata("design:type", String)
28
- ], SeoEntity.prototype, "slug", void 0);
29
- __decorate([
30
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
31
- __metadata("design:type", String)
32
- ], SeoEntity.prototype, "description", void 0);
33
- SeoEntity = __decorate([
34
- (0, schema_decorator_1.Schema)()
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
- const abstract_document_1 = require("../../../abstract/abstract.document");
5
- class ProductDocument extends abstract_document_1.AbstractDocument {
6
- name = String();
7
- description = String();
8
- price = Number();
9
- brand;
10
- category;
11
- files = [];
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?: CodeEntity;
19
- dimension?: DimensionEntity;
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
- const mongoose_1 = require("@nestjs/mongoose");
14
- const mongoose_2 = require("mongoose");
15
- const abstract_entity_1 = require("../../../abstract/abstract.entity");
16
- const asset_entity_1 = require("../../assets/asset.entity");
17
- const brand_entity_1 = require("../brands/brand.entity");
18
- const category_entity_1 = require("../categories/category.entity");
19
- const code_entity_1 = require("./entities/code.entity");
20
- const dimension_entity_1 = require("./entities/dimension.entity");
21
- const price_entity_1 = require("./entities/price.entity");
22
- const seo_entity_1 = require("./entities/seo.entity");
23
- let ProductEntity = class ProductEntity extends abstract_entity_1.AbstractEntity {
24
- static $index = 'inventory_products';
25
- name;
26
- description;
27
- category;
28
- brand;
29
- hashtags = [];
30
- files = [];
31
- price;
32
- code;
33
- dimension;
34
- seo;
35
- };
36
- __decorate([
37
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
38
- __metadata("design:type", String)
39
- ], ProductEntity.prototype, "name", void 0);
40
- __decorate([
41
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
42
- __metadata("design:type", String)
43
- ], ProductEntity.prototype, "description", void 0);
44
- __decorate([
45
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: category_entity_1.CategoryEntity.$index }),
46
- __metadata("design:type", category_entity_1.CategoryEntity)
47
- ], ProductEntity.prototype, "category", void 0);
48
- __decorate([
49
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: brand_entity_1.BrandEntity.$index }),
50
- __metadata("design:type", brand_entity_1.BrandEntity)
51
- ], ProductEntity.prototype, "brand", void 0);
52
- __decorate([
53
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
54
- __metadata("design:type", Array)
55
- ], ProductEntity.prototype, "hashtags", void 0);
56
- __decorate([
57
- (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId, ref: asset_entity_1.AssetEntity.$index }] }),
58
- __metadata("design:type", Array)
59
- ], ProductEntity.prototype, "files", void 0);
60
- __decorate([
61
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => price_entity_1.PriceEntity }),
62
- __metadata("design:type", price_entity_1.PriceEntity)
63
- ], ProductEntity.prototype, "price", void 0);
64
- __decorate([
65
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => code_entity_1.CodeEntity }),
66
- __metadata("design:type", code_entity_1.CodeEntity)
67
- ], ProductEntity.prototype, "code", void 0);
68
- __decorate([
69
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => dimension_entity_1.DimensionEntity }),
70
- __metadata("design:type", dimension_entity_1.DimensionEntity)
71
- ], ProductEntity.prototype, "dimension", void 0);
72
- __decorate([
73
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: () => seo_entity_1.SeoEntity }),
74
- __metadata("design:type", seo_entity_1.SeoEntity)
75
- ], ProductEntity.prototype, "seo", void 0);
76
- ProductEntity = __decorate([
77
- (0, mongoose_1.Schema)({ timestamps: true })
78
- ], ProductEntity);
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;