@merkaly/api 0.2.4-1 → 0.2.4-11

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 (77) hide show
  1. package/.output/abstract/abstract.entity.d.ts +1 -1
  2. package/.output/abstract/abstract.exception.d.ts +11 -0
  3. package/.output/abstract/abstract.exception.js +53 -0
  4. package/.output/abstract/abstract.validator.d.ts +1 -1
  5. package/.output/abstract/abstract.validator.js +1 -0
  6. package/.output/exceptions/missing-identity.exception.d.ts +5 -0
  7. package/.output/{modules/setting/organization/organization.entity.js → exceptions/missing-identity.exception.js} +12 -10
  8. package/.output/exceptions/store-not-implemented.exception.d.ts +5 -0
  9. package/.output/exceptions/store-not-implemented.exception.js +31 -0
  10. package/.output/exceptions/store-not-recognized.exception.d.ts +5 -0
  11. package/.output/exceptions/store-not-recognized.exception.js +30 -0
  12. package/.output/modules/inventory/brands/brand.exception.d.ts +5 -0
  13. package/.output/modules/{setting/theme/theme.entity.js → inventory/brands/brand.exception.js} +15 -21
  14. package/.output/modules/inventory/categories/category.exception.d.ts +5 -0
  15. package/.output/modules/{setting/layout/layout.entity.js → inventory/categories/category.exception.js} +15 -21
  16. package/.output/modules/inventory/products/product.entity.d.ts +1 -0
  17. package/.output/modules/inventory/products/product.exception.d.ts +5 -0
  18. package/.output/modules/inventory/products/{entities/price.entity.js → product.exception.js} +15 -24
  19. package/.output/modules/inventory/products/product.validator.d.ts +2 -1
  20. package/.output/modules/inventory/products/product.validator.js +7 -0
  21. package/.output/modules/inventory/properties/property.exception.d.ts +5 -0
  22. package/.output/modules/inventory/{brands/brand.entity.js → properties/property.exception.js} +15 -25
  23. package/.output/modules/sales/clients/client.exception.d.ts +5 -0
  24. package/.output/modules/sales/clients/client.exception.js +40 -0
  25. package/.output/modules/sales/orders/billing/billing.entity.d.ts +8 -6
  26. package/.output/modules/sales/orders/billing/billing.types.d.ts +9 -0
  27. package/.output/modules/sales/orders/billing/billing.types.js +14 -0
  28. package/.output/modules/sales/orders/billing/billing.validator.d.ts +6 -10
  29. package/.output/modules/sales/orders/billing/billing.validator.js +10 -15
  30. package/.output/modules/sales/orders/{address → billing/entities}/address.entity.d.ts +2 -1
  31. package/.output/modules/sales/orders/billing/entities/customer.entity.d.ts +5 -0
  32. package/.output/modules/sales/orders/billing/entities/status.entity.d.ts +6 -0
  33. package/.output/modules/sales/orders/{address → billing/validators}/address.validator.d.ts +2 -1
  34. package/.output/modules/sales/orders/{address → billing/validators}/address.validator.js +12 -14
  35. package/.output/modules/sales/orders/billing/validators/customer.validator.d.ts +5 -0
  36. package/.output/modules/sales/orders/{status/status.entity.js → billing/validators/customer.validator.js} +20 -21
  37. package/.output/modules/sales/orders/customer/customer.validator.d.ts +1 -1
  38. package/.output/modules/sales/orders/customer/customer.validator.js +8 -8
  39. package/.output/modules/sales/orders/order.entity.d.ts +1 -1
  40. package/.output/modules/sales/orders/order.exception.d.ts +13 -0
  41. package/.output/modules/sales/orders/order.exception.js +46 -0
  42. package/.output/modules/sales/orders/order.validator.d.ts +2 -2
  43. package/.output/modules/sales/orders/order.validator.js +3 -4
  44. package/.output/modules/sales/orders/shipping/entities/address.entity.d.ts +10 -0
  45. package/.output/modules/sales/orders/shipping/entities/customer.entity.d.ts +5 -0
  46. package/.output/modules/sales/orders/shipping/entities/status.entity.d.ts +6 -0
  47. package/.output/modules/sales/orders/shipping/shipping.entity.d.ts +8 -6
  48. package/.output/modules/sales/orders/shipping/shipping.types.d.ts +11 -0
  49. package/.output/modules/sales/orders/shipping/shipping.types.js +16 -0
  50. package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +6 -9
  51. package/.output/modules/sales/orders/shipping/shipping.validator.js +10 -14
  52. package/.output/modules/sales/orders/shipping/validators/address.validator.d.ts +10 -0
  53. package/.output/modules/sales/orders/shipping/validators/address.validator.js +56 -0
  54. package/.output/modules/sales/orders/shipping/validators/customer.validator.d.ts +5 -0
  55. package/.output/modules/sales/orders/shipping/validators/customer.validator.js +36 -0
  56. package/.output/services/logger.service.d.ts +11 -0
  57. package/.output/services/logger.service.js +54 -0
  58. package/.output/types.d.ts +4 -1
  59. package/README.md +14 -14
  60. package/package.json +8 -11
  61. package/.output/abstract/abstract.entity.js +0 -53
  62. package/.output/modules/assets/asset.entity.js +0 -69
  63. package/.output/modules/content/banners/banner.entity.js +0 -54
  64. package/.output/modules/content/pages/page.entity.js +0 -69
  65. package/.output/modules/inventory/categories/category.entity.js +0 -61
  66. package/.output/modules/inventory/products/entities/code.entity.js +0 -53
  67. package/.output/modules/inventory/products/entities/dimension.entity.js +0 -57
  68. package/.output/modules/inventory/products/entities/seo.entity.js +0 -53
  69. package/.output/modules/inventory/products/product.entity.js +0 -101
  70. package/.output/modules/inventory/properties/property.entity.js +0 -55
  71. package/.output/modules/sales/clients/client.entity.js +0 -64
  72. package/.output/modules/sales/orders/address/address.entity.js +0 -68
  73. package/.output/modules/sales/orders/billing/billing.entity.js +0 -59
  74. package/.output/modules/sales/orders/customer/customer.entity.js +0 -52
  75. package/.output/modules/sales/orders/item/item.entity.js +0 -58
  76. package/.output/modules/sales/orders/order.entity.js +0 -89
  77. package/.output/modules/sales/orders/shipping/shipping.entity.js +0 -63
@@ -1,4 +1,4 @@
1
- import { AppMetadata, User, UserMetadata } from 'auth0';
1
+ import { AppMetadata, OrganizationConnection, User, UserMetadata } from 'auth0';
2
2
  export interface MetaAddress {
3
3
  city: string;
4
4
  code: string;
@@ -8,6 +8,9 @@ export interface MetaAddress {
8
8
  state: string;
9
9
  street: string;
10
10
  }
11
+ export interface LocalOrganization extends OrganizationConnection {
12
+ connected: boolean;
13
+ }
11
14
  export interface UserMeta extends UserMetadata {
12
15
  addresses?: MetaAddress[];
13
16
  }
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  <p align="center">
2
- <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
2
+ <a href="https://www.merkaly.io/" target="blank">
3
+ <img src="https://www.merkaly.io/icon.png" width="320" alt="Merkaly Logo" />
4
+ </a>
3
5
  </p>
4
6
 
5
7
  [travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
@@ -34,33 +36,31 @@
34
36
  ## Installation
35
37
 
36
38
  ```bash
37
- $ npm install
39
+ $ yarn install
40
+ ```
41
+
42
+ ## Generate OpenSSL certificate
43
+
44
+ ```bash
45
+ $ mkdir ".cert"
46
+ $ openssl req -x509 -newkey rsa:4096 -nodes -keyout ./.cert/key.pem -out ./.cert/cert.pem -days 365
38
47
  ```
39
48
 
40
49
  ## Running the app
41
50
 
42
51
  ```bash
43
52
  # development
44
- $ npm run start
45
-
46
- # watch mode
47
- $ npm run start:dev
53
+ $ yarn dev
48
54
 
49
55
  # production mode
50
- $ npm run start:prod
56
+ $ npm start
51
57
  ```
52
58
 
53
59
  ## Test
54
60
 
55
61
  ```bash
56
62
  # unit tests
57
- $ npm run test
58
-
59
- # e2e tests
60
- $ npm run test:e2e
61
-
62
- # test coverage
63
- $ npm run test:cov
63
+ $ yarn test
64
64
  ```
65
65
 
66
66
  ## Support
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.4-1",
3
+ "version": "0.2.4-11",
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,8 @@
35
35
  "*.**": "yarn lint --cache --fix"
36
36
  },
37
37
  "dependencies": {
38
- "@types/auth0": "^2.35.2",
38
+ "@nestjs/common": "^9.0.11",
39
+ "@types/auth0": "^3.3.1",
39
40
  "class-transformer": "^0.5.1",
40
41
  "class-validator": "^0.14.0",
41
42
  "mongoose": "^6",
@@ -47,7 +48,6 @@
47
48
  "@google-cloud/storage": "^6.4.1",
48
49
  "@nestjs/axios": "^2.0.0",
49
50
  "@nestjs/cli": "^9.1.1",
50
- "@nestjs/common": "^9.0.11",
51
51
  "@nestjs/config": "^2.2.0",
52
52
  "@nestjs/core": "^9.0.11",
53
53
  "@nestjs/event-emitter": "^1.3.1",
@@ -55,11 +55,11 @@
55
55
  "@nestjs/mongoose": "^9.2.0",
56
56
  "@nestjs/passport": "^9.0.0",
57
57
  "@nestjs/platform-express": "^9.0.11",
58
- "@nestjs/platform-socket.io": "^9.3.9",
58
+ "@nestjs/platform-socket.io": "^9.4.0",
59
59
  "@nestjs/schematics": "^9.0.1",
60
60
  "@nestjs/swagger": "^6.1.0",
61
61
  "@nestjs/testing": "^9.0.11",
62
- "@nestjs/websockets": "^9.3.9",
62
+ "@nestjs/websockets": "^9.4.0",
63
63
  "@types/cache-manager": "^4.0.1",
64
64
  "@types/express": "^4.17.12",
65
65
  "@types/express-session": "^1.17.5",
@@ -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",
@@ -98,9 +98,6 @@
98
98
  "typescript": "4.4.4",
99
99
  "webpack": "^5"
100
100
  },
101
- "engines": {
102
- "node": "16"
103
- },
104
101
  "publishConfig": {
105
102
  "access": "public"
106
103
  }
@@ -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,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,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.SeoEntity = 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 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));
53
- exports.SeoEntity = SeoEntity;