@merkaly/api 0.2.5-5 → 0.2.5-7

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 (166) hide show
  1. package/.output/abstracts/abstract.entity.d.ts +14 -0
  2. package/.output/{abstract → abstracts}/abstract.validator.d.ts +13 -9
  3. package/.output/{abstract → abstracts}/abstract.validator.js +36 -23
  4. package/.output/exceptions/missing-identity.exception.js +1 -1
  5. package/.output/modules/asset/files/file.entity.d.ts +1 -2
  6. package/.output/modules/{sale/orders/item/item.schema.d.ts → asset/files/file.schema.d.ts} +9 -2
  7. package/.output/modules/asset/files/file.schema.js +10 -0
  8. package/.output/modules/auth/organizations/organization.entity.d.ts +8 -0
  9. package/.output/modules/auth/users/user.entity.d.ts +9 -0
  10. package/.output/modules/{inventory/products/schemas/variant.schema.d.ts → auth/users/user.schema.d.ts} +9 -2
  11. package/.output/modules/auth/users/user.schema.js +10 -0
  12. package/.output/modules/auth/users/user.validator.d.ts +11 -9
  13. package/.output/modules/auth/users/user.validator.js +24 -16
  14. package/.output/modules/inventory/brands/brand.entity.d.ts +1 -4
  15. package/.output/modules/inventory/brands/brand.schema.d.ts +34 -0
  16. package/.output/modules/inventory/brands/brand.schema.js +10 -0
  17. package/.output/modules/inventory/brands/brand.validator.d.ts +1 -1
  18. package/.output/modules/inventory/brands/brand.validator.js +4 -5
  19. package/.output/modules/inventory/categories/category.entity.d.ts +2 -8
  20. package/.output/modules/inventory/categories/category.schema.d.ts +34 -0
  21. package/.output/modules/inventory/categories/category.schema.js +10 -0
  22. package/.output/modules/inventory/categories/category.validator.d.ts +2 -7
  23. package/.output/modules/inventory/categories/category.validator.js +4 -50
  24. package/.output/modules/inventory/complements/complement.entity.d.ts +6 -0
  25. package/.output/modules/inventory/complements/complement.validator.d.ts +10 -0
  26. package/.output/modules/inventory/{products/validators/variant.validator.js → complements/complement.validator.js} +27 -24
  27. package/.output/modules/inventory/products/documents/attribute.document.d.ts +5 -0
  28. package/.output/modules/{sale/orders/billing/validators/customer.validator.js → inventory/products/documents/attribute.document.js} +15 -18
  29. package/.output/modules/inventory/products/{entities/dimension.entity.d.ts → documents/dimension.document.d.ts} +1 -1
  30. package/.output/modules/inventory/products/documents/dimension.document.js +35 -0
  31. package/.output/modules/inventory/products/product.entity.d.ts +11 -18
  32. package/.output/modules/inventory/products/product.schema.d.ts +34 -0
  33. package/.output/modules/inventory/products/product.schema.js +18 -0
  34. package/.output/modules/inventory/products/product.validator.d.ts +17 -26
  35. package/.output/modules/inventory/products/product.validator.js +76 -132
  36. package/.output/modules/inventory/products/validators/attributes.validator.d.ts +5 -0
  37. package/.output/modules/inventory/products/validators/{seo.validator.js → attributes.validator.js} +14 -13
  38. package/.output/modules/inventory/products/validators/dimension.validator.d.ts +5 -5
  39. package/.output/modules/inventory/products/validators/dimension.validator.js +16 -21
  40. package/.output/modules/sale/customers/customer.entity.d.ts +7 -11
  41. package/.output/modules/sale/customers/customer.schema.d.ts +34 -0
  42. package/.output/modules/sale/customers/customer.schema.js +10 -0
  43. package/.output/modules/sale/customers/customer.validator.d.ts +9 -13
  44. package/.output/modules/sale/customers/customer.validator.js +26 -39
  45. package/.output/modules/sale/orders/documents/address.document.d.ts +8 -0
  46. package/.output/modules/sale/orders/documents/address.document.js +43 -0
  47. package/.output/modules/sale/orders/documents/status.document.d.ts +8 -0
  48. package/.output/modules/sale/orders/{shipping/validators/customer.validator.js → documents/status.document.js} +17 -19
  49. package/.output/modules/sale/orders/entities/item.entity.d.ts +38 -0
  50. package/.output/modules/sale/orders/{status/status.validator.d.ts → enums/order.status.d.ts} +1 -3
  51. package/.output/modules/sale/orders/enums/order.status.js +10 -0
  52. package/.output/modules/sale/orders/order.entity.d.ts +16 -16
  53. package/.output/modules/sale/orders/order.validator.d.ts +11 -23
  54. package/.output/modules/sale/orders/order.validator.js +26 -80
  55. package/.output/modules/sale/orders/validators/address.validator.d.ts +17 -0
  56. package/.output/modules/sale/orders/validators/address.validator.js +81 -0
  57. package/.output/modules/sale/orders/validators/billing.validator.d.ts +8 -0
  58. package/.output/modules/sale/orders/validators/billing.validator.js +13 -0
  59. package/.output/modules/sale/orders/{item → validators}/item.validator.d.ts +2 -1
  60. package/.output/modules/sale/orders/{item → validators}/item.validator.js +11 -8
  61. package/.output/modules/sale/orders/validators/payment.validator.d.ts +10 -0
  62. package/.output/modules/sale/orders/validators/payment.validator.js +62 -0
  63. package/.output/modules/sale/orders/validators/shipping.validator.d.ts +9 -0
  64. package/.output/modules/sale/orders/validators/shipping.validator.js +14 -0
  65. package/.output/modules/sale/payments/entities/status.entity.d.ts +8 -0
  66. package/.output/modules/sale/payments/enums/billing.type.d.ts +6 -0
  67. package/.output/modules/sale/payments/enums/billing.type.js +10 -0
  68. package/.output/modules/sale/payments/enums/payment.status.d.ts +7 -0
  69. package/.output/modules/sale/payments/enums/payment.status.js +11 -0
  70. package/.output/modules/sale/payments/enums/shipping.type.d.ts +4 -0
  71. package/.output/modules/sale/payments/enums/shipping.type.js +8 -0
  72. package/.output/modules/sale/payments/payment.entity.d.ts +12 -0
  73. package/.output/modules/sale/payments/payment.schema.d.ts +34 -0
  74. package/.output/modules/sale/payments/payment.schema.js +14 -0
  75. package/.output/modules/sale/payments/payment.validator.d.ts +16 -0
  76. package/.output/modules/sale/payments/payment.validator.js +77 -0
  77. package/.output/tsconfig.package.tsbuildinfo +1 -0
  78. package/package.json +69 -78
  79. package/.output/abstract/abstract.entity.d.ts +0 -9
  80. package/.output/abstract/abstract.exception.d.ts +0 -11
  81. package/.output/abstract/abstract.exception.js +0 -53
  82. package/.output/abstract/abstract.fixture.d.ts +0 -4
  83. package/.output/abstract/abstract.fixture.js +0 -11
  84. package/.output/exceptions/store-not-implemented.exception.d.ts +0 -5
  85. package/.output/exceptions/store-not-implemented.exception.js +0 -31
  86. package/.output/exceptions/store-not-recognized.exception.d.ts +0 -5
  87. package/.output/exceptions/store-not-recognized.exception.js +0 -30
  88. package/.output/modules/auth/auth.types.d.ts +0 -3
  89. package/.output/modules/auth/auth.types.js +0 -7
  90. package/.output/modules/config/organization/organization.entity.d.ts +0 -21
  91. package/.output/modules/config/organization/organization.types.d.ts +0 -23
  92. package/.output/modules/config/organization/organization.types.js +0 -107
  93. package/.output/modules/config/organization/organization.validator.d.ts +0 -18
  94. package/.output/modules/config/organization/organization.validator.js +0 -88
  95. package/.output/modules/insight/validators/order.validator.d.ts +0 -4
  96. package/.output/modules/insight/validators/order.validator.js +0 -27
  97. package/.output/modules/inventory/brands/brand.exception.d.ts +0 -5
  98. package/.output/modules/inventory/brands/brand.exception.js +0 -40
  99. package/.output/modules/inventory/categories/category.exception.d.ts +0 -5
  100. package/.output/modules/inventory/categories/category.exception.js +0 -40
  101. package/.output/modules/inventory/categories/category.fixture.d.ts +0 -5
  102. package/.output/modules/inventory/categories/category.fixture.js +0 -38
  103. package/.output/modules/inventory/products/entities/code.entity.d.ts +0 -5
  104. package/.output/modules/inventory/products/entities/seo.entity.d.ts +0 -5
  105. package/.output/modules/inventory/products/entities/variant.entity.d.ts +0 -13
  106. package/.output/modules/inventory/products/product.exception.d.ts +0 -5
  107. package/.output/modules/inventory/products/product.exception.js +0 -40
  108. package/.output/modules/inventory/products/product.fixture.d.ts +0 -5
  109. package/.output/modules/inventory/products/product.fixture.js +0 -39
  110. package/.output/modules/inventory/products/schemas/variant.schema.js +0 -6
  111. package/.output/modules/inventory/products/validators/code.validator.d.ts +0 -5
  112. package/.output/modules/inventory/products/validators/code.validator.js +0 -37
  113. package/.output/modules/inventory/products/validators/seo.validator.d.ts +0 -5
  114. package/.output/modules/inventory/products/validators/variant.validator.d.ts +0 -10
  115. package/.output/modules/inventory/properties/property.entity.d.ts +0 -8
  116. package/.output/modules/inventory/properties/property.exception.d.ts +0 -5
  117. package/.output/modules/inventory/properties/property.exception.js +0 -40
  118. package/.output/modules/inventory/properties/property.types.d.ts +0 -6
  119. package/.output/modules/inventory/properties/property.types.js +0 -10
  120. package/.output/modules/inventory/properties/property.validator.d.ts +0 -12
  121. package/.output/modules/inventory/properties/property.validator.js +0 -79
  122. package/.output/modules/layout/pages/page.entity.d.ts +0 -8
  123. package/.output/modules/layout/pages/page.fixture.d.ts +0 -5
  124. package/.output/modules/layout/pages/page.fixture.js +0 -36
  125. package/.output/modules/layout/pages/page.types.d.ts +0 -20
  126. package/.output/modules/layout/pages/page.types.js +0 -2
  127. package/.output/modules/layout/pages/page.validator.d.ts +0 -8
  128. package/.output/modules/layout/pages/page.validator.js +0 -61
  129. package/.output/modules/sale/customers/customer.exception.d.ts +0 -5
  130. package/.output/modules/sale/customers/customer.exception.js +0 -40
  131. package/.output/modules/sale/orders/billing/billing.entity.d.ts +0 -10
  132. package/.output/modules/sale/orders/billing/billing.types.d.ts +0 -9
  133. package/.output/modules/sale/orders/billing/billing.types.js +0 -14
  134. package/.output/modules/sale/orders/billing/billing.validator.d.ts +0 -9
  135. package/.output/modules/sale/orders/billing/billing.validator.js +0 -42
  136. package/.output/modules/sale/orders/billing/entities/address.entity.d.ts +0 -10
  137. package/.output/modules/sale/orders/billing/entities/customer.entity.d.ts +0 -5
  138. package/.output/modules/sale/orders/billing/entities/status.entity.d.ts +0 -6
  139. package/.output/modules/sale/orders/billing/validators/address.validator.d.ts +0 -10
  140. package/.output/modules/sale/orders/billing/validators/address.validator.js +0 -56
  141. package/.output/modules/sale/orders/billing/validators/customer.validator.d.ts +0 -5
  142. package/.output/modules/sale/orders/customer/customer.entity.d.ts +0 -5
  143. package/.output/modules/sale/orders/customer/customer.validator.d.ts +0 -5
  144. package/.output/modules/sale/orders/customer/customer.validator.js +0 -36
  145. package/.output/modules/sale/orders/item/item.entity.d.ts +0 -9
  146. package/.output/modules/sale/orders/item/item.schema.js +0 -9
  147. package/.output/modules/sale/orders/order.exception.d.ts +0 -13
  148. package/.output/modules/sale/orders/order.exception.js +0 -46
  149. package/.output/modules/sale/orders/shipping/entities/address.entity.d.ts +0 -10
  150. package/.output/modules/sale/orders/shipping/entities/customer.entity.d.ts +0 -5
  151. package/.output/modules/sale/orders/shipping/entities/status.entity.d.ts +0 -6
  152. package/.output/modules/sale/orders/shipping/shipping.entity.d.ts +0 -11
  153. package/.output/modules/sale/orders/shipping/shipping.types.d.ts +0 -11
  154. package/.output/modules/sale/orders/shipping/shipping.types.js +0 -16
  155. package/.output/modules/sale/orders/shipping/shipping.validator.d.ts +0 -10
  156. package/.output/modules/sale/orders/shipping/shipping.validator.js +0 -48
  157. package/.output/modules/sale/orders/shipping/validators/address.validator.d.ts +0 -10
  158. package/.output/modules/sale/orders/shipping/validators/address.validator.js +0 -56
  159. package/.output/modules/sale/orders/shipping/validators/customer.validator.d.ts +0 -5
  160. package/.output/modules/sale/orders/status/status.entity.d.ts +0 -6
  161. package/.output/modules/sale/orders/status/status.validator.js +0 -12
  162. package/.output/services/logger.service.d.ts +0 -11
  163. package/.output/services/logger.service.js +0 -50
  164. package/.output/types.d.ts +0 -18
  165. package/.output/types.js +0 -2
  166. package/LICENSE +0 -674
@@ -1,27 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.SalesByRangeValdiator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var SalesByRangeValdiator = (function () {
15
- function SalesByRangeValdiator() {
16
- }
17
- __decorate([
18
- (0, class_validator_1.IsDateString)(),
19
- __metadata("design:type", Date)
20
- ], SalesByRangeValdiator.prototype, "from", void 0);
21
- __decorate([
22
- (0, class_validator_1.IsDateString)(),
23
- __metadata("design:type", Date)
24
- ], SalesByRangeValdiator.prototype, "to", void 0);
25
- return SalesByRangeValdiator;
26
- }());
27
- exports.SalesByRangeValdiator = SalesByRangeValdiator;
@@ -1,5 +0,0 @@
1
- import { HttpException } from '@nestjs/common';
2
- import { AbstractException } from '../../../abstract/abstract.exception';
3
- export declare class BrandException extends AbstractException {
4
- handleError(exception: HttpException): HttpException;
5
- }
@@ -1,40 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.BrandException = void 0;
25
- var common_1 = require("@nestjs/common");
26
- var abstract_exception_1 = require("../../../abstract/abstract.exception");
27
- var BrandException = (function (_super) {
28
- __extends(BrandException, _super);
29
- function BrandException() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- BrandException.prototype.handleError = function (exception) {
33
- return exception;
34
- };
35
- BrandException = __decorate([
36
- (0, common_1.Catch)()
37
- ], BrandException);
38
- return BrandException;
39
- }(abstract_exception_1.AbstractException));
40
- exports.BrandException = BrandException;
@@ -1,5 +0,0 @@
1
- import { HttpException } from '@nestjs/common';
2
- import { AbstractException } from '../../../abstract/abstract.exception';
3
- export declare class CategoryException extends AbstractException {
4
- handleError(exception: HttpException): HttpException;
5
- }
@@ -1,40 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.CategoryException = void 0;
25
- var common_1 = require("@nestjs/common");
26
- var abstract_exception_1 = require("../../../abstract/abstract.exception");
27
- var CategoryException = (function (_super) {
28
- __extends(CategoryException, _super);
29
- function CategoryException() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- CategoryException.prototype.handleError = function (exception) {
33
- return exception;
34
- };
35
- CategoryException = __decorate([
36
- (0, common_1.Catch)()
37
- ], CategoryException);
38
- return CategoryException;
39
- }(abstract_exception_1.AbstractException));
40
- exports.CategoryException = CategoryException;
@@ -1,5 +0,0 @@
1
- import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
- import { CategoryEntity } from "./category.entity";
3
- export declare class CategoryFixture extends AbstractFixture {
4
- normal(): CategoryEntity;
5
- }
@@ -1,38 +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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.CategoryFixture = void 0;
19
- var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
20
- var category_entity_1 = require("./category.entity");
21
- var CategoryFixture = (function (_super) {
22
- __extends(CategoryFixture, _super);
23
- function CategoryFixture() {
24
- return _super !== null && _super.apply(this, arguments) || this;
25
- }
26
- CategoryFixture.prototype.normal = function () {
27
- var category = new category_entity_1.CategoryEntity({
28
- _id: this.$faker.datatype.uuid(),
29
- createdAt: this.$faker.date.past(1),
30
- updatedAt: this.$faker.date.past(1),
31
- });
32
- category.name = this.$faker.vehicle.manufacturer();
33
- category.description = this.$faker.lorem.sentence();
34
- return category;
35
- };
36
- return CategoryFixture;
37
- }(abstract_fixture_1.AbstractFixture));
38
- exports.CategoryFixture = CategoryFixture;
@@ -1,5 +0,0 @@
1
- export declare class CodeEntity extends Map {
2
- sku: string;
3
- gtin: string;
4
- mpn: string;
5
- }
@@ -1,5 +0,0 @@
1
- export declare class SeoEntity extends Map {
2
- title: string;
3
- slug: string;
4
- description: string;
5
- }
@@ -1,13 +0,0 @@
1
- import { PropertyEntity } from '../../properties/property.entity';
2
- import { ProductVariantValidator } from "../validators/variant.validator";
3
- export declare class VariantEntity {
4
- active?: boolean;
5
- title?: string;
6
- price?: number;
7
- stock?: number;
8
- combinations: {
9
- property: PropertyEntity;
10
- value: string;
11
- }[];
12
- static validatorToEntity?(validator: ProductVariantValidator): VariantEntity;
13
- }
@@ -1,5 +0,0 @@
1
- import { HttpException } from '@nestjs/common';
2
- import { AbstractException } from '../../../abstract/abstract.exception';
3
- export declare class ProductException extends AbstractException {
4
- handleError(exception: HttpException): HttpException;
5
- }
@@ -1,40 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ProductException = void 0;
25
- var common_1 = require("@nestjs/common");
26
- var abstract_exception_1 = require("../../../abstract/abstract.exception");
27
- var ProductException = (function (_super) {
28
- __extends(ProductException, _super);
29
- function ProductException() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- ProductException.prototype.handleError = function (exception) {
33
- return exception;
34
- };
35
- ProductException = __decorate([
36
- (0, common_1.Catch)()
37
- ], ProductException);
38
- return ProductException;
39
- }(abstract_exception_1.AbstractException));
40
- exports.ProductException = ProductException;
@@ -1,5 +0,0 @@
1
- import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
- import { ProductEntity } from "./product.entity";
3
- export declare class ProductFixture extends AbstractFixture {
4
- normal(): ProductEntity;
5
- }
@@ -1,39 +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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ProductFixture = void 0;
19
- var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
20
- var product_entity_1 = require("./product.entity");
21
- var ProductFixture = (function (_super) {
22
- __extends(ProductFixture, _super);
23
- function ProductFixture() {
24
- return _super !== null && _super.apply(this, arguments) || this;
25
- }
26
- ProductFixture.prototype.normal = function () {
27
- var product = new product_entity_1.ProductEntity({
28
- _id: this.$faker.datatype.uuid(),
29
- createdAt: this.$faker.date.past(1),
30
- updatedAt: this.$faker.date.past(1),
31
- });
32
- product.name = this.$faker.vehicle.vehicle();
33
- product.description = this.$faker.commerce.productDescription();
34
- product.price = Number(this.$faker.commerce.price(1000, 10000, 2));
35
- return product;
36
- };
37
- return ProductFixture;
38
- }(abstract_fixture_1.AbstractFixture));
39
- exports.ProductFixture = ProductFixture;
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VariantSchema = void 0;
4
- var mongoose_1 = require("@nestjs/mongoose");
5
- var variant_entity_1 = require("../entities/variant.entity");
6
- exports.VariantSchema = mongoose_1.SchemaFactory.createForClass(variant_entity_1.VariantEntity);
@@ -1,5 +0,0 @@
1
- export declare class ProductCodeValidator {
2
- sku?: string;
3
- gtin?: string;
4
- mpn?: string;
5
- }
@@ -1,37 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ProductCodeValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var ProductCodeValidator = (function () {
15
- function ProductCodeValidator() {
16
- this.sku = String();
17
- this.gtin = String();
18
- this.mpn = String();
19
- }
20
- __decorate([
21
- (0, class_validator_1.IsString)(),
22
- (0, class_validator_1.IsOptional)(),
23
- __metadata("design:type", Object)
24
- ], ProductCodeValidator.prototype, "sku", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsString)(),
27
- (0, class_validator_1.IsOptional)(),
28
- __metadata("design:type", Object)
29
- ], ProductCodeValidator.prototype, "gtin", void 0);
30
- __decorate([
31
- (0, class_validator_1.IsString)(),
32
- (0, class_validator_1.IsOptional)(),
33
- __metadata("design:type", Object)
34
- ], ProductCodeValidator.prototype, "mpn", void 0);
35
- return ProductCodeValidator;
36
- }());
37
- exports.ProductCodeValidator = ProductCodeValidator;
@@ -1,5 +0,0 @@
1
- export declare class ProductSeoValidator {
2
- title?: string;
3
- slug?: string;
4
- description?: string;
5
- }
@@ -1,10 +0,0 @@
1
- export declare class ProductVariantValidator {
2
- active?: boolean;
3
- title?: string;
4
- stock?: number;
5
- price?: number;
6
- combinations: {
7
- property: string;
8
- value: string;
9
- }[];
10
- }
@@ -1,8 +0,0 @@
1
- import { AbstractEntity } from '../../../abstract/abstract.entity';
2
- export declare class PropertyEntity extends AbstractEntity {
3
- static readonly $index = "inventory_properties";
4
- name: string;
5
- title: string;
6
- values: string[];
7
- type: string;
8
- }
@@ -1,5 +0,0 @@
1
- import { HttpException } from '@nestjs/common';
2
- import { AbstractException } from '../../../abstract/abstract.exception';
3
- export declare class PropertyException extends AbstractException {
4
- handleError(exception: HttpException): HttpException;
5
- }
@@ -1,40 +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
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.PropertyException = void 0;
25
- var common_1 = require("@nestjs/common");
26
- var abstract_exception_1 = require("../../../abstract/abstract.exception");
27
- var PropertyException = (function (_super) {
28
- __extends(PropertyException, _super);
29
- function PropertyException() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- PropertyException.prototype.handleError = function (exception) {
33
- return exception;
34
- };
35
- PropertyException = __decorate([
36
- (0, common_1.Catch)()
37
- ], PropertyException);
38
- return PropertyException;
39
- }(abstract_exception_1.AbstractException));
40
- exports.PropertyException = PropertyException;
@@ -1,6 +0,0 @@
1
- export declare enum PropertyType {
2
- TEXT = "TEXT",
3
- COLOR = "COLOR",
4
- RADIO = "RADIO",
5
- CHECKBOX = "CHECKBOX"
6
- }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PropertyType = void 0;
4
- var PropertyType;
5
- (function (PropertyType) {
6
- PropertyType["TEXT"] = "TEXT";
7
- PropertyType["COLOR"] = "COLOR";
8
- PropertyType["RADIO"] = "RADIO";
9
- PropertyType["CHECKBOX"] = "CHECKBOX";
10
- })(PropertyType = exports.PropertyType || (exports.PropertyType = {}));
@@ -1,12 +0,0 @@
1
- import { AbstractValidator } from "../../../abstract/abstract.validator";
2
- import { PropertyType } from './property.types';
3
- export declare class CreatePropertyValidator extends AbstractValidator {
4
- name: string;
5
- title?: string;
6
- type: PropertyType;
7
- values: string[];
8
- }
9
- export declare class UpdatePropertyValidator extends AbstractValidator {
10
- name?: string;
11
- values?: string[];
12
- }
@@ -1,79 +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.UpdatePropertyValidator = exports.CreatePropertyValidator = void 0;
28
- var class_validator_1 = require("class-validator");
29
- var abstract_validator_1 = require("../../../abstract/abstract.validator");
30
- var property_types_1 = require("./property.types");
31
- var CreatePropertyValidator = (function (_super) {
32
- __extends(CreatePropertyValidator, _super);
33
- function CreatePropertyValidator() {
34
- var _this = _super !== null && _super.apply(this, arguments) || this;
35
- _this.type = property_types_1.PropertyType.TEXT;
36
- _this.values = [];
37
- return _this;
38
- }
39
- __decorate([
40
- (0, class_validator_1.IsString)(),
41
- __metadata("design:type", String)
42
- ], CreatePropertyValidator.prototype, "name", void 0);
43
- __decorate([
44
- (0, class_validator_1.IsString)(),
45
- (0, class_validator_1.IsOptional)(),
46
- __metadata("design:type", String)
47
- ], CreatePropertyValidator.prototype, "title", void 0);
48
- __decorate([
49
- (0, class_validator_1.IsEnum)(property_types_1.PropertyType),
50
- (0, class_validator_1.IsOptional)(),
51
- __metadata("design:type", String)
52
- ], CreatePropertyValidator.prototype, "type", void 0);
53
- __decorate([
54
- (0, class_validator_1.IsString)({ each: true }),
55
- __metadata("design:type", Array)
56
- ], CreatePropertyValidator.prototype, "values", void 0);
57
- return CreatePropertyValidator;
58
- }(abstract_validator_1.AbstractValidator));
59
- exports.CreatePropertyValidator = CreatePropertyValidator;
60
- var UpdatePropertyValidator = (function (_super) {
61
- __extends(UpdatePropertyValidator, _super);
62
- function UpdatePropertyValidator() {
63
- var _this = _super !== null && _super.apply(this, arguments) || this;
64
- _this.values = [];
65
- return _this;
66
- }
67
- __decorate([
68
- (0, class_validator_1.IsString)(),
69
- (0, class_validator_1.IsOptional)(),
70
- __metadata("design:type", String)
71
- ], UpdatePropertyValidator.prototype, "name", void 0);
72
- __decorate([
73
- (0, class_validator_1.IsString)({ each: true }),
74
- (0, class_validator_1.IsOptional)(),
75
- __metadata("design:type", Array)
76
- ], UpdatePropertyValidator.prototype, "values", void 0);
77
- return UpdatePropertyValidator;
78
- }(abstract_validator_1.AbstractValidator));
79
- exports.UpdatePropertyValidator = UpdatePropertyValidator;
@@ -1,8 +0,0 @@
1
- import { AbstractEntity } from '../../../abstract/abstract.entity';
2
- export declare class PageEntity<C = Record<string, any>> extends AbstractEntity {
3
- static readonly $index = "layout_pages";
4
- name: string;
5
- title: string;
6
- description: string;
7
- content: C;
8
- }
@@ -1,5 +0,0 @@
1
- import { AbstractFixture } from '../../../abstract/abstract.fixture';
2
- import { CreatePageValidator } from './page.validator';
3
- export declare class PageFixture extends AbstractFixture {
4
- normal(): CreatePageValidator;
5
- }
@@ -1,36 +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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.PageFixture = void 0;
19
- var abstract_fixture_1 = require("../../../abstract/abstract.fixture");
20
- var page_validator_1 = require("./page.validator");
21
- var PageFixture = (function (_super) {
22
- __extends(PageFixture, _super);
23
- function PageFixture() {
24
- return _super !== null && _super.apply(this, arguments) || this;
25
- }
26
- PageFixture.prototype.normal = function () {
27
- var page = new page_validator_1.CreatePageValidator();
28
- page.title = this.$faker.random.words(6);
29
- page.name = this.$faker.helpers.slugify(page.title);
30
- page.description = this.$faker.lorem.words(45);
31
- page.content = {};
32
- return page;
33
- };
34
- return PageFixture;
35
- }(abstract_fixture_1.AbstractFixture));
36
- exports.PageFixture = PageFixture;
@@ -1,20 +0,0 @@
1
- import { ProductEntity } from '../../inventory/products/product.entity';
2
- import { BrandEntity } from '../../inventory/brands/brand.entity';
3
- import { CategoryEntity } from '../../inventory/categories/category.entity';
4
- export interface IndexPageContent {
5
- hero: {
6
- src: string;
7
- }[];
8
- banners: {
9
- src: string;
10
- }[];
11
- products: ProductEntity[];
12
- categories: CategoryEntity[];
13
- brands: BrandEntity[];
14
- promotions: ProductEntity[];
15
- services: {
16
- icon: string;
17
- title: string;
18
- description: string;
19
- }[];
20
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- export declare class CreatePageValidator {
2
- name: string;
3
- title: string;
4
- description: string;
5
- content: Record<string, any>;
6
- }
7
- export declare class UpdatePageValidator extends CreatePageValidator {
8
- }