@merkaly/api 0.2.4-6 → 0.2.4-8

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 (32) hide show
  1. package/.output/abstract/abstract.entity.d.ts +1 -1
  2. package/.output/modules/sales/orders/order.entity.d.ts +1 -1
  3. package/.output/modules/sales/orders/order.validator.js +2 -3
  4. package/package.json +6 -6
  5. package/.output/abstract/abstract.entity.js +0 -53
  6. package/.output/modules/assets/asset.entity.js +0 -69
  7. package/.output/modules/content/banners/banner.entity.js +0 -54
  8. package/.output/modules/content/pages/page.entity.js +0 -69
  9. package/.output/modules/inventory/brands/brand.entity.js +0 -50
  10. package/.output/modules/inventory/categories/category.entity.js +0 -61
  11. package/.output/modules/inventory/products/entities/code.entity.js +0 -53
  12. package/.output/modules/inventory/products/entities/dimension.entity.js +0 -57
  13. package/.output/modules/inventory/products/entities/price.entity.js +0 -49
  14. package/.output/modules/inventory/products/entities/seo.entity.js +0 -53
  15. package/.output/modules/inventory/products/product.entity.js +0 -101
  16. package/.output/modules/inventory/properties/property.entity.js +0 -55
  17. package/.output/modules/sales/clients/client.entity.js +0 -64
  18. package/.output/modules/sales/orders/billing/billing.entity.js +0 -64
  19. package/.output/modules/sales/orders/billing/entities/address.entity.js +0 -68
  20. package/.output/modules/sales/orders/billing/entities/customer.entity.js +0 -52
  21. package/.output/modules/sales/orders/billing/entities/status.entity.js +0 -37
  22. package/.output/modules/sales/orders/customer/customer.entity.js +0 -52
  23. package/.output/modules/sales/orders/item/item.entity.js +0 -58
  24. package/.output/modules/sales/orders/order.entity.js +0 -89
  25. package/.output/modules/sales/orders/shipping/entities/address.entity.js +0 -68
  26. package/.output/modules/sales/orders/shipping/entities/customer.entity.js +0 -52
  27. package/.output/modules/sales/orders/shipping/entities/status.entity.js +0 -37
  28. package/.output/modules/sales/orders/shipping/shipping.entity.js +0 -68
  29. package/.output/modules/sales/orders/status/status.entity.js +0 -37
  30. package/.output/modules/setting/layout/layout.entity.js +0 -46
  31. package/.output/modules/setting/organization/organization.entity.js +0 -28
  32. package/.output/modules/setting/theme/theme.entity.js +0 -46
@@ -1,4 +1,4 @@
1
- import { Document } from 'mongoose';
1
+
2
2
  export declare abstract class AbstractEntity {
3
3
  static $index: string;
4
4
  readonly _id: string;
@@ -10,7 +10,7 @@ export declare class OrderEntity extends AbstractEntity {
10
10
  number: number;
11
11
  status: StatusEntity[];
12
12
  items: ItemEntity[];
13
- client: ClientEntity;
13
+ client?: ClientEntity;
14
14
  billing: BillingEntity;
15
15
  shipping: ShippingEntity;
16
16
  customer: CustomerEntity;
@@ -40,7 +40,6 @@ var CreateOrderValidator = (function (_super) {
40
40
  _this.items = [];
41
41
  _this.billing = new billing_validator_1.CreateBillingValidator();
42
42
  _this.shipping = new shipping_validator_1.CreateShippingValidator();
43
- _this.customer = new customer_validator_1.CustomerValidator();
44
43
  return _this;
45
44
  }
46
45
  __decorate([
@@ -69,8 +68,8 @@ var CreateOrderValidator = (function (_super) {
69
68
  __decorate([
70
69
  (0, class_validator_1.ValidateNested)(),
71
70
  (0, class_transformer_1.Type)(function () { return customer_validator_1.CustomerValidator; }),
72
- (0, class_validator_1.IsNotEmptyObject)(),
73
- __metadata("design:type", Object)
71
+ (0, class_validator_1.IsOptional)(),
72
+ __metadata("design:type", customer_validator_1.CustomerValidator)
74
73
  ], CreateOrderValidator.prototype, "customer", void 0);
75
74
  __decorate([
76
75
  (0, class_validator_1.IsOptional)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.4-6",
3
+ "version": "0.2.4-8",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,10 +17,10 @@
17
17
  "prebuild": "yarn run clean",
18
18
  "build": "nest build",
19
19
  "clean": "tsc -b --clean",
20
- "console": "ts-node -r tsconfig-paths/register ./src/app.console.ts",
20
+ "console": "yarn clean && ts-node -r tsconfig-paths/register ./src/app.console.ts",
21
21
  "dev": "yarn start --watch",
22
22
  "lint": "eslint \"{src,test}/**/*.ts\" . ",
23
- "migrate": "tsc --target es5 ./src/migrations/*.ts && migrate --config ./src/app.migration.ts",
23
+ "migrate": "tsc --target es5 --experimentalDecorators ./src/migrations/*.ts && migrate --config ./src/app.migration.ts",
24
24
  "prepack": ".bin/package.sh",
25
25
  "postpack": "yarn run clean",
26
26
  "semantic-release": "yarn run build:package && semantic-release",
@@ -35,7 +35,7 @@
35
35
  "*.**": "yarn lint --cache --fix"
36
36
  },
37
37
  "dependencies": {
38
- "@types/auth0": "^2.35.2",
38
+ "@types/auth0": "^3.3.1",
39
39
  "class-transformer": "^0.5.1",
40
40
  "class-validator": "^0.14.0",
41
41
  "mongoose": "^6",
@@ -86,7 +86,7 @@
86
86
  "nestjs-console": "^8.0.0",
87
87
  "passport": "^0.6.0",
88
88
  "passport-jwt": "^4.0.0",
89
- "rimraf": "^4.1.2",
89
+ "rimraf": "^5.0.0",
90
90
  "rxjs": "^7.2.0",
91
91
  "short-unique-id": "^4.4.4",
92
92
  "supertest": "^6.1.3",
@@ -99,7 +99,7 @@
99
99
  "webpack": "^5"
100
100
  },
101
101
  "engines": {
102
- "node": "16"
102
+ "node": ">=16"
103
103
  },
104
104
  "publishConfig": {
105
105
  "access": "public"
@@ -1,53 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.AbstractEntity = 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.updatedAt = null;
36
- _this.deletedAt = null;
37
- return _this;
38
- }
39
- __decorate([
40
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
41
- __metadata("design:type", Date)
42
- ], AbstractEntity.prototype, "createdAt", void 0);
43
- __decorate([
44
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
45
- __metadata("design:type", Date)
46
- ], AbstractEntity.prototype, "updatedAt", void 0);
47
- __decorate([
48
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date, default: null }),
49
- __metadata("design:type", Date)
50
- ], AbstractEntity.prototype, "deletedAt", void 0);
51
- return AbstractEntity;
52
- }(mongoose_2.Document));
53
- exports.AbstractEntity = AbstractEntity;
@@ -1,69 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.AssetEntity = void 0;
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));
69
- exports.AssetEntity = AssetEntity;
@@ -1,54 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.BannerEntity = void 0;
28
- var mongoose_1 = require("@nestjs/mongoose");
29
- var mongoose_2 = require("mongoose");
30
- var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
- var BannerEntity = (function (_super) {
32
- __extends(BannerEntity, _super);
33
- function BannerEntity() {
34
- return _super !== null && _super.apply(this, arguments) || this;
35
- }
36
- BannerEntity.$index = 'content_banners';
37
- __decorate([
38
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
39
- __metadata("design:type", String)
40
- ], BannerEntity.prototype, "name", void 0);
41
- __decorate([
42
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
43
- __metadata("design:type", String)
44
- ], BannerEntity.prototype, "image", void 0);
45
- __decorate([
46
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: '#' }),
47
- __metadata("design:type", String)
48
- ], BannerEntity.prototype, "href", void 0);
49
- BannerEntity = __decorate([
50
- (0, mongoose_1.Schema)({ timestamps: true })
51
- ], BannerEntity);
52
- return BannerEntity;
53
- }(abstract_entity_1.AbstractEntity));
54
- exports.BannerEntity = BannerEntity;
@@ -1,69 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.PageEntity = void 0;
28
- var mongoose_1 = require("@nestjs/mongoose");
29
- var mongoose_2 = require("mongoose");
30
- var abstract_entity_1 = require("../../../abstract/abstract.entity");
31
- var page_types_1 = require("./page.types");
32
- var PageEntity = (function (_super) {
33
- __extends(PageEntity, _super);
34
- function PageEntity() {
35
- var _this = _super !== null && _super.apply(this, arguments) || this;
36
- _this.type = page_types_1.PageTypes.PAGE;
37
- return _this;
38
- }
39
- PageEntity.$index = 'content_pages';
40
- __decorate([
41
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
42
- __metadata("design:type", String)
43
- ], PageEntity.prototype, "slug", void 0);
44
- __decorate([
45
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
46
- __metadata("design:type", String)
47
- ], PageEntity.prototype, "title", void 0);
48
- __decorate([
49
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
50
- __metadata("design:type", String)
51
- ], PageEntity.prototype, "description", void 0);
52
- __decorate([
53
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
54
- __metadata("design:type", String)
55
- ], PageEntity.prototype, "image", void 0);
56
- __decorate([
57
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: page_types_1.PageTypes, required: true, default: page_types_1.PageTypes.PAGE }),
58
- __metadata("design:type", Object)
59
- ], PageEntity.prototype, "type", void 0);
60
- __decorate([
61
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
62
- __metadata("design:type", String)
63
- ], PageEntity.prototype, "content", void 0);
64
- PageEntity = __decorate([
65
- (0, mongoose_1.Schema)({ timestamps: true })
66
- ], PageEntity);
67
- return PageEntity;
68
- }(abstract_entity_1.AbstractEntity));
69
- exports.PageEntity = PageEntity;
@@ -1,50 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.BrandEntity = void 0;
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));
50
- exports.BrandEntity = BrandEntity;
@@ -1,61 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.CategoryEntity = void 0;
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));
61
- exports.CategoryEntity = CategoryEntity;
@@ -1,53 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.CodeEntity = void 0;
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));
53
- exports.CodeEntity = CodeEntity;
@@ -1,57 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.DimensionEntity = void 0;
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));
57
- exports.DimensionEntity = DimensionEntity;
@@ -1,49 +0,0 @@
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
- })();
17
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
- return c > 3 && r && Object.defineProperty(target, key, r), r;
22
- };
23
- var __metadata = (this && this.__metadata) || function (k, v) {
24
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.PriceEntity = void 0;
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));
49
- exports.PriceEntity = PriceEntity;