@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,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.UpdatePageValidator = exports.CreatePageValidator = void 0;
28
- var class_validator_1 = require("class-validator");
29
- var CreatePageValidator = (function () {
30
- function CreatePageValidator() {
31
- this.description = null;
32
- }
33
- __decorate([
34
- (0, class_validator_1.IsString)(),
35
- __metadata("design:type", String)
36
- ], CreatePageValidator.prototype, "name", void 0);
37
- __decorate([
38
- (0, class_validator_1.IsString)(),
39
- __metadata("design:type", String)
40
- ], CreatePageValidator.prototype, "title", void 0);
41
- __decorate([
42
- (0, class_validator_1.IsString)(),
43
- (0, class_validator_1.IsOptional)(),
44
- __metadata("design:type", String)
45
- ], CreatePageValidator.prototype, "description", void 0);
46
- __decorate([
47
- (0, class_validator_1.IsObject)(),
48
- (0, class_validator_1.IsNotEmptyObject)(),
49
- __metadata("design:type", Object)
50
- ], CreatePageValidator.prototype, "content", void 0);
51
- return CreatePageValidator;
52
- }());
53
- exports.CreatePageValidator = CreatePageValidator;
54
- var UpdatePageValidator = (function (_super) {
55
- __extends(UpdatePageValidator, _super);
56
- function UpdatePageValidator() {
57
- return _super !== null && _super.apply(this, arguments) || this;
58
- }
59
- return UpdatePageValidator;
60
- }(CreatePageValidator));
61
- exports.UpdatePageValidator = UpdatePageValidator;
@@ -1,5 +0,0 @@
1
- import { HttpException } from '@nestjs/common';
2
- import { AbstractException } from '../../../abstract/abstract.exception';
3
- export declare class CustomerException 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.CustomerException = void 0;
25
- var common_1 = require("@nestjs/common");
26
- var abstract_exception_1 = require("../../../abstract/abstract.exception");
27
- var CustomerException = (function (_super) {
28
- __extends(CustomerException, _super);
29
- function CustomerException() {
30
- return _super !== null && _super.apply(this, arguments) || this;
31
- }
32
- CustomerException.prototype.handleError = function (exception) {
33
- return exception;
34
- };
35
- CustomerException = __decorate([
36
- (0, common_1.Catch)()
37
- ], CustomerException);
38
- return CustomerException;
39
- }(abstract_exception_1.AbstractException));
40
- exports.CustomerException = CustomerException;
@@ -1,10 +0,0 @@
1
- import { BillingMethod } from "./billing.types";
2
- import { BillingStatusEntity } from "./entities/status.entity";
3
- import { BillingAddressEntity } from "./entities/address.entity";
4
- import { BillingCustomerEntity } from "./entities/customer.entity";
5
- export declare class BillingEntity extends Map {
6
- address: BillingAddressEntity;
7
- customer: BillingCustomerEntity;
8
- method: BillingMethod;
9
- status: BillingStatusEntity[];
10
- }
@@ -1,9 +0,0 @@
1
- export declare enum BillingMethod {
2
- CASH = "CASH",
3
- CARD = "CARD",
4
- TRANSFER = "TRANSFER"
5
- }
6
- export declare enum BillingStatus {
7
- UNPAID = "UNPAID",
8
- PAID = "PAID"
9
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BillingStatus = exports.BillingMethod = void 0;
4
- var BillingMethod;
5
- (function (BillingMethod) {
6
- BillingMethod["CASH"] = "CASH";
7
- BillingMethod["CARD"] = "CARD";
8
- BillingMethod["TRANSFER"] = "TRANSFER";
9
- })(BillingMethod = exports.BillingMethod || (exports.BillingMethod = {}));
10
- var BillingStatus;
11
- (function (BillingStatus) {
12
- BillingStatus["UNPAID"] = "UNPAID";
13
- BillingStatus["PAID"] = "PAID";
14
- })(BillingStatus = exports.BillingStatus || (exports.BillingStatus = {}));
@@ -1,9 +0,0 @@
1
- import 'reflect-metadata';
2
- import { BillingMethod } from "./billing.types";
3
- import { BillingCustomerValidator } from "./validators/customer.validator";
4
- import { BillingAddressValidator } from "./validators/address.validator";
5
- export declare class CreateBillingValidator {
6
- customer: BillingCustomerValidator;
7
- address: BillingAddressValidator;
8
- method: BillingMethod;
9
- }
@@ -1,42 +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.CreateBillingValidator = void 0;
13
- var class_transformer_1 = require("class-transformer");
14
- var class_validator_1 = require("class-validator");
15
- require("reflect-metadata");
16
- var billing_types_1 = require("./billing.types");
17
- var customer_validator_1 = require("./validators/customer.validator");
18
- var address_validator_1 = require("./validators/address.validator");
19
- var CreateBillingValidator = (function () {
20
- function CreateBillingValidator() {
21
- this.customer = new customer_validator_1.BillingCustomerValidator();
22
- this.address = new address_validator_1.BillingAddressValidator();
23
- }
24
- __decorate([
25
- (0, class_validator_1.ValidateNested)(),
26
- (0, class_transformer_1.Type)(function () { return customer_validator_1.BillingCustomerValidator; }),
27
- (0, class_validator_1.IsNotEmptyObject)(),
28
- __metadata("design:type", Object)
29
- ], CreateBillingValidator.prototype, "customer", void 0);
30
- __decorate([
31
- (0, class_validator_1.ValidateNested)(),
32
- (0, class_transformer_1.Type)(function () { return address_validator_1.BillingAddressValidator; }),
33
- (0, class_validator_1.IsNotEmptyObject)(),
34
- __metadata("design:type", Object)
35
- ], CreateBillingValidator.prototype, "address", void 0);
36
- __decorate([
37
- (0, class_validator_1.IsEnum)(billing_types_1.BillingMethod),
38
- __metadata("design:type", String)
39
- ], CreateBillingValidator.prototype, "method", void 0);
40
- return CreateBillingValidator;
41
- }());
42
- exports.CreateBillingValidator = CreateBillingValidator;
@@ -1,10 +0,0 @@
1
- import { MetaAddress } from "../../../../../types";
2
- export declare class BillingAddressEntity extends Map implements MetaAddress {
3
- country: string;
4
- code: string;
5
- street: string;
6
- number: string;
7
- complement: string;
8
- city: string;
9
- state: string;
10
- }
@@ -1,5 +0,0 @@
1
- export declare class BillingCustomerEntity extends Map {
2
- name: string;
3
- email: string;
4
- phone: string;
5
- }
@@ -1,6 +0,0 @@
1
- import { BillingStatus } from "../billing.types";
2
- export declare class BillingStatusEntity {
3
- name: BillingStatus;
4
- user: string;
5
- date: any;
6
- }
@@ -1,10 +0,0 @@
1
- import { MetaAddress } from "../../../../../types";
2
- export declare class BillingAddressValidator implements MetaAddress {
3
- country: string;
4
- code: string;
5
- street: string;
6
- number: string;
7
- complement?: string;
8
- city: string;
9
- state: string;
10
- }
@@ -1,56 +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.BillingAddressValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var BillingAddressValidator = (function () {
15
- function BillingAddressValidator() {
16
- this.country = String();
17
- this.code = String();
18
- this.street = String();
19
- this.number = String();
20
- this.complement = undefined;
21
- this.city = String();
22
- this.state = String();
23
- }
24
- __decorate([
25
- (0, class_validator_1.IsISO31661Alpha2)(),
26
- __metadata("design:type", Object)
27
- ], BillingAddressValidator.prototype, "country", void 0);
28
- __decorate([
29
- (0, class_validator_1.IsString)(),
30
- __metadata("design:type", Object)
31
- ], BillingAddressValidator.prototype, "code", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsString)(),
34
- __metadata("design:type", Object)
35
- ], BillingAddressValidator.prototype, "street", void 0);
36
- __decorate([
37
- (0, class_validator_1.IsString)(),
38
- (0, class_validator_1.IsOptional)(),
39
- __metadata("design:type", Object)
40
- ], BillingAddressValidator.prototype, "number", void 0);
41
- __decorate([
42
- (0, class_validator_1.IsString)(),
43
- (0, class_validator_1.IsOptional)(),
44
- __metadata("design:type", String)
45
- ], BillingAddressValidator.prototype, "complement", void 0);
46
- __decorate([
47
- (0, class_validator_1.IsString)(),
48
- __metadata("design:type", Object)
49
- ], BillingAddressValidator.prototype, "city", void 0);
50
- __decorate([
51
- (0, class_validator_1.IsString)(),
52
- __metadata("design:type", Object)
53
- ], BillingAddressValidator.prototype, "state", void 0);
54
- return BillingAddressValidator;
55
- }());
56
- exports.BillingAddressValidator = BillingAddressValidator;
@@ -1,5 +0,0 @@
1
- export declare class BillingCustomerValidator {
2
- name: string;
3
- email: string;
4
- phone?: string;
5
- }
@@ -1,5 +0,0 @@
1
- export declare class CustomerEntity extends Map {
2
- name: string;
3
- email: string;
4
- phone: string;
5
- }
@@ -1,5 +0,0 @@
1
- export declare class CustomerValidator {
2
- name: string;
3
- email: string;
4
- phone?: string;
5
- }
@@ -1,36 +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.CustomerValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var CustomerValidator = (function () {
15
- function CustomerValidator() {
16
- this.name = String();
17
- this.email = String();
18
- this.phone = undefined;
19
- }
20
- __decorate([
21
- (0, class_validator_1.IsString)(),
22
- (0, class_validator_1.IsNotEmpty)(),
23
- __metadata("design:type", Object)
24
- ], CustomerValidator.prototype, "name", void 0);
25
- __decorate([
26
- (0, class_validator_1.IsEmail)(),
27
- __metadata("design:type", Object)
28
- ], CustomerValidator.prototype, "email", void 0);
29
- __decorate([
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.IsOptional)(),
32
- __metadata("design:type", String)
33
- ], CustomerValidator.prototype, "phone", void 0);
34
- return CustomerValidator;
35
- }());
36
- exports.CustomerValidator = CustomerValidator;
@@ -1,9 +0,0 @@
1
- import { AbstractEntity } from '../../../../abstract/abstract.entity';
2
- import { ProductEntity } from '../../../inventory/products/product.entity';
3
- export declare class ItemEntity extends AbstractEntity {
4
- quantity: number;
5
- price: number;
6
- refund: number;
7
- product: ProductEntity;
8
- readonly total: number;
9
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ItemSchema = void 0;
4
- var mongoose_1 = require("@nestjs/mongoose");
5
- var item_entity_1 = require("./item.entity");
6
- exports.ItemSchema = mongoose_1.SchemaFactory.createForClass(item_entity_1.ItemEntity);
7
- exports.ItemSchema.virtual('total').get(function () {
8
- return this.price * this.quantity;
9
- });
@@ -1,13 +0,0 @@
1
- import { NotAcceptableException } from '@nestjs/common/exceptions/not-acceptable.exception';
2
- import { ItemEntity } from './item/item.entity';
3
- export declare class OrderWithUnavailableProduct extends NotAcceptableException {
4
- readonly items: ItemEntity[];
5
- readonly message = "Some products are not available";
6
- readonly name: string;
7
- constructor(items: ItemEntity[]);
8
- getResponse(): {
9
- items: ItemEntity[];
10
- message: string;
11
- name: string;
12
- };
13
- }
@@ -1,46 +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 __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.OrderWithUnavailableProduct = void 0;
30
- var not_acceptable_exception_1 = require("@nestjs/common/exceptions/not-acceptable.exception");
31
- var OrderWithUnavailableProduct = (function (_super) {
32
- __extends(OrderWithUnavailableProduct, _super);
33
- function OrderWithUnavailableProduct(items) {
34
- var _this = _super.call(this) || this;
35
- _this.items = [];
36
- _this.message = 'Some products are not available';
37
- _this.name = OrderWithUnavailableProduct.name;
38
- _this.items = items;
39
- return _this;
40
- }
41
- OrderWithUnavailableProduct.prototype.getResponse = function () {
42
- return __assign(__assign({}, _super.prototype.getResponse.call(this)), { items: this.items, message: this.message, name: this.name });
43
- };
44
- return OrderWithUnavailableProduct;
45
- }(not_acceptable_exception_1.NotAcceptableException));
46
- exports.OrderWithUnavailableProduct = OrderWithUnavailableProduct;
@@ -1,10 +0,0 @@
1
- import { MetaAddress } from "../../../../../types";
2
- export declare class ShippingAddressEntity extends Map implements MetaAddress {
3
- country: string;
4
- code: string;
5
- street: string;
6
- number: string;
7
- complement: string;
8
- city: string;
9
- state: string;
10
- }
@@ -1,5 +0,0 @@
1
- export declare class ShippingCustomerEntity extends Map {
2
- name: string;
3
- email: string;
4
- phone: string;
5
- }
@@ -1,6 +0,0 @@
1
- import { ShippingStatus } from "../shipping.types";
2
- export declare class ShippingStatusEntity {
3
- name: ShippingStatus;
4
- user: string;
5
- date: any;
6
- }
@@ -1,11 +0,0 @@
1
- import { ShippingMethod } from "./shipping.types";
2
- import { ShippingAddressEntity } from "./entities/address.entity";
3
- import { ShippingCustomerEntity } from "./entities/customer.entity";
4
- import { ShippingStatusEntity } from "./entities/status.entity";
5
- export declare class ShippingEntity extends Map {
6
- address: ShippingAddressEntity;
7
- customer: ShippingCustomerEntity;
8
- method: ShippingMethod;
9
- price: number;
10
- status: ShippingStatusEntity[];
11
- }
@@ -1,11 +0,0 @@
1
- export declare enum ShippingMethod {
2
- RETIRE_ON_SITE = "RETIRE ON SITE",
3
- DIRECT_DELIVERY = "DIRECT DELIVERY"
4
- }
5
- export declare enum ShippingStatus {
6
- ORDERED = "ORDERED",
7
- PACKED = "PACKED",
8
- IN_TRANSIT = "IN_TRANSIT",
9
- FAILED = "FAILED",
10
- DELIVERED = "DELIVERED"
11
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShippingStatus = exports.ShippingMethod = void 0;
4
- var ShippingMethod;
5
- (function (ShippingMethod) {
6
- ShippingMethod["RETIRE_ON_SITE"] = "RETIRE ON SITE";
7
- ShippingMethod["DIRECT_DELIVERY"] = "DIRECT DELIVERY";
8
- })(ShippingMethod = exports.ShippingMethod || (exports.ShippingMethod = {}));
9
- var ShippingStatus;
10
- (function (ShippingStatus) {
11
- ShippingStatus["ORDERED"] = "ORDERED";
12
- ShippingStatus["PACKED"] = "PACKED";
13
- ShippingStatus["IN_TRANSIT"] = "IN_TRANSIT";
14
- ShippingStatus["FAILED"] = "FAILED";
15
- ShippingStatus["DELIVERED"] = "DELIVERED";
16
- })(ShippingStatus = exports.ShippingStatus || (exports.ShippingStatus = {}));
@@ -1,10 +0,0 @@
1
- import { ShippingMethod } from "./shipping.types";
2
- import 'reflect-metadata';
3
- import { ShippingAddressValidator } from "./validators/address.validator";
4
- import { ShippingCustomerValidator } from "./validators/customer.validator";
5
- export declare class CreateShippingValidator {
6
- customer: ShippingCustomerValidator;
7
- address: ShippingAddressValidator;
8
- method: ShippingMethod;
9
- price: number;
10
- }
@@ -1,48 +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.CreateShippingValidator = void 0;
13
- var class_transformer_1 = require("class-transformer");
14
- var class_validator_1 = require("class-validator");
15
- var shipping_types_1 = require("./shipping.types");
16
- require("reflect-metadata");
17
- var address_validator_1 = require("./validators/address.validator");
18
- var customer_validator_1 = require("./validators/customer.validator");
19
- var CreateShippingValidator = (function () {
20
- function CreateShippingValidator() {
21
- this.customer = new customer_validator_1.ShippingCustomerValidator();
22
- this.address = new address_validator_1.ShippingAddressValidator();
23
- this.price = 0;
24
- }
25
- __decorate([
26
- (0, class_validator_1.ValidateNested)(),
27
- (0, class_transformer_1.Type)(function () { return customer_validator_1.ShippingCustomerValidator; }),
28
- (0, class_validator_1.IsNotEmptyObject)(),
29
- __metadata("design:type", Object)
30
- ], CreateShippingValidator.prototype, "customer", void 0);
31
- __decorate([
32
- (0, class_validator_1.ValidateNested)(),
33
- (0, class_transformer_1.Type)(function () { return address_validator_1.ShippingAddressValidator; }),
34
- (0, class_validator_1.IsNotEmptyObject)(),
35
- __metadata("design:type", Object)
36
- ], CreateShippingValidator.prototype, "address", void 0);
37
- __decorate([
38
- (0, class_validator_1.IsEnum)(shipping_types_1.ShippingMethod),
39
- __metadata("design:type", String)
40
- ], CreateShippingValidator.prototype, "method", void 0);
41
- __decorate([
42
- (0, class_validator_1.IsNumber)(),
43
- (0, class_validator_1.Min)(0),
44
- __metadata("design:type", Object)
45
- ], CreateShippingValidator.prototype, "price", void 0);
46
- return CreateShippingValidator;
47
- }());
48
- exports.CreateShippingValidator = CreateShippingValidator;
@@ -1,10 +0,0 @@
1
- import { MetaAddress } from "../../../../../types";
2
- export declare class ShippingAddressValidator implements MetaAddress {
3
- country: string;
4
- code: string;
5
- street: string;
6
- number: string;
7
- complement?: string;
8
- city: string;
9
- state: string;
10
- }
@@ -1,56 +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.ShippingAddressValidator = void 0;
13
- var class_validator_1 = require("class-validator");
14
- var ShippingAddressValidator = (function () {
15
- function ShippingAddressValidator() {
16
- this.country = String();
17
- this.code = String();
18
- this.street = String();
19
- this.number = String();
20
- this.complement = undefined;
21
- this.city = String();
22
- this.state = String();
23
- }
24
- __decorate([
25
- (0, class_validator_1.IsISO31661Alpha2)(),
26
- __metadata("design:type", Object)
27
- ], ShippingAddressValidator.prototype, "country", void 0);
28
- __decorate([
29
- (0, class_validator_1.IsString)(),
30
- __metadata("design:type", Object)
31
- ], ShippingAddressValidator.prototype, "code", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsString)(),
34
- __metadata("design:type", Object)
35
- ], ShippingAddressValidator.prototype, "street", void 0);
36
- __decorate([
37
- (0, class_validator_1.IsString)(),
38
- (0, class_validator_1.IsOptional)(),
39
- __metadata("design:type", Object)
40
- ], ShippingAddressValidator.prototype, "number", void 0);
41
- __decorate([
42
- (0, class_validator_1.IsString)(),
43
- (0, class_validator_1.IsOptional)(),
44
- __metadata("design:type", String)
45
- ], ShippingAddressValidator.prototype, "complement", void 0);
46
- __decorate([
47
- (0, class_validator_1.IsString)(),
48
- __metadata("design:type", Object)
49
- ], ShippingAddressValidator.prototype, "city", void 0);
50
- __decorate([
51
- (0, class_validator_1.IsString)(),
52
- __metadata("design:type", Object)
53
- ], ShippingAddressValidator.prototype, "state", void 0);
54
- return ShippingAddressValidator;
55
- }());
56
- exports.ShippingAddressValidator = ShippingAddressValidator;
@@ -1,5 +0,0 @@
1
- export declare class ShippingCustomerValidator {
2
- name: string;
3
- email: string;
4
- phone?: string;
5
- }